projects/guix·blob wip-node-riscv64 · refs

14616 lines · 608.5 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 Jan (janneke) Nieuwenhuizen <[email protected]>
15;;; Copyright © 2020 Raghav Gururajan <[email protected]>
16;;; Copyright © 2020, 2022 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 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;;;
26;;; This file is part of GNU Guix.
27;;;
28;;; GNU Guix is free software; you can redistribute it and/or modify it
29;;; under the terms of the GNU General Public License as published by
30;;; the Free Software Foundation; either version 3 of the License, or (at
31;;; your option) any later version.
32;;;
33;;; GNU Guix is distributed in the hope that it will be useful, but
34;;; WITHOUT ANY WARRANTY; without even the implied warranty of
35;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
36;;; GNU General Public License for more details.
37;;;
38;;; You should have received a copy of the GNU General Public License
39;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
40
41(define-module (gnu packages java)
42 #:use-module ((guix licenses) #:prefix license:)
43 #:use-module (guix packages)
44 #:use-module (guix download)
45 #:use-module (guix hg-download)
46 #:use-module (guix git-download)
47 #:use-module (guix svn-download)
48 #:use-module ((guix build utils) #:select (alist-replace))
49 #:use-module (guix utils)
50 #:use-module (guix gexp)
51 #:use-module (guix build-system ant)
52 #:use-module (guix build-system cmake)
53 #:use-module (guix build-system gnu)
54 #:use-module (guix build-system maven)
55 #:use-module (guix build-system python)
56 #:use-module (gnu packages)
57 #:use-module (gnu packages attr)
58 #:use-module (gnu packages autotools)
59 #:use-module (gnu packages base)
60 #:use-module (gnu packages bash)
61 #:use-module (gnu packages certs)
62 #:use-module (gnu packages cpio)
63 #:use-module (gnu packages cups)
64 #:use-module (gnu packages compression)
65 #:use-module (gnu packages elf)
66 #:use-module (gnu packages fontutils)
67 #:use-module (gnu packages freedesktop) ; wayland
68 #:use-module (gnu packages gawk)
69 #:use-module (gnu packages gcc)
70 #:use-module (gnu packages gettext)
71 #:use-module (gnu packages gl)
72 #:use-module (gnu packages ghostscript) ;lcms
73 #:use-module (gnu packages gnome)
74 #:use-module (gnu packages groovy)
75 #:use-module (gnu packages gtk)
76 #:use-module (gnu packages guile)
77 #:use-module (gnu packages icu4c)
78 #:use-module (gnu packages image)
79 #:use-module (gnu packages java-bootstrap)
80 #:use-module (gnu packages java-compression)
81 #:use-module (gnu packages java-xml)
82 #:use-module (gnu packages libffi)
83 #:use-module (gnu packages linux) ;alsa
84 #:use-module (gnu packages maths)
85 #:use-module (gnu packages maven)
86 #:use-module (gnu packages maven-parent-pom)
87 #:use-module (gnu packages ncurses)
88 #:use-module (gnu packages nss)
89 #:use-module (gnu packages onc-rpc)
90 #:use-module (gnu packages web)
91 #:use-module (gnu packages wget)
92 #:use-module (gnu packages pkg-config)
93 #:use-module (gnu packages perl)
94 #:use-module (gnu packages popt)
95 #:use-module (gnu packages kerberos)
96 #:use-module (gnu packages security-token)
97 #:use-module (gnu packages xml)
98 #:use-module (gnu packages xdisorg)
99 #:use-module (gnu packages xorg)
100 #:use-module (gnu packages texinfo)
101 #:use-module ((srfi srfi-1) #:select (fold alist-delete))
102 #:use-module (srfi srfi-11)
103 #:use-module (ice-9 match))
104
105(define-public icedtea-7
106 (let* ((version "2.6.13")
107 (drop (lambda* (name hash #:optional (patches '()))
108 (origin
109 (method url-fetch)
110 (uri (string-append
111 "http://icedtea.classpath.org/download/drops"
112 "/icedtea7/" version "/" name ".tar.bz2"))
113 (sha256 (base32 hash))
114 (patches patches)))))
115 (package
116 (name "icedtea")
117 (version version)
118 (source (origin
119 (method url-fetch)
120 (uri (string-append
121 "http://icedtea.wildebeest.org/download/source/icedtea-"
122 version ".tar.xz"))
123 (sha256
124 (base32
125 "1w331rdqx1dcx2xb0fmjmrkdc71xqn20fxsgw8by4xhiblh88khh"))
126 (modules '((guix build utils)))
127 (snippet
128 '(begin
129 (substitute* "Makefile.in"
130 ;; do not leak information about the build host
131 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
132 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
133 #t))))
134 (build-system gnu-build-system)
135 (outputs '("out" ; Java Runtime Environment
136 "jdk" ; Java Development Kit
137 "doc")) ; all documentation
138 (arguments
139 `(;; There are many test failures. Some are known to
140 ;; fail upstream, others relate to not having an X
141 ;; server running at test time, yet others are a
142 ;; complete mystery to me.
143
144 ;; hotspot: passed: 241; failed: 45; error: 2
145 ;; langtools: passed: 1,934; failed: 26
146 ;; jdk: unknown
147 #:tests? #f
148
149 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
150 ;; gremlin) doesn't support it yet, so skip this phase.
151 #:validate-runpath? #f
152
153 #:modules ((guix build utils)
154 (guix build gnu-build-system)
155 (ice-9 match)
156 (ice-9 popen)
157 (srfi srfi-19)
158 (srfi srfi-26))
159
160 #:configure-flags
161 ;; TODO: package sctp and add to inputs
162 `("--disable-system-sctp"
163 "--enable-system-pcsc"
164 "--enable-system-lcms"
165 "--enable-bootstrap"
166 "--enable-nss"
167 "--without-rhino"
168 ,(string-append "--with-parallel-jobs="
169 (number->string (parallel-job-count)))
170 "--disable-downloading"
171 "--disable-tests" ;they are run in the check phase instead
172 "--with-openjdk-src-dir=./openjdk.src"
173 ,(string-append "--with-ecj="
174 (assoc-ref %build-inputs "ecj4-javac-wrapper")
175 "/bin/javac")
176 ,(string-append "--with-jdk-home="
177 (assoc-ref %build-inputs "classpath"))
178 ,(string-append "--with-java="
179 (assoc-ref %build-inputs "jamvm")
180 "/bin/jamvm")
181 ,(string-append "--with-jar="
182 (assoc-ref %build-inputs "classpath")
183 "/bin/gjar"))
184 #:phases
185 (modify-phases %standard-phases
186 (replace 'unpack
187 (lambda* (#:key source inputs #:allow-other-keys)
188 (let ((target (string-append "icedtea-" ,version))
189 (unpack (lambda* (name #:optional dir)
190 (let ((dir (or dir
191 (string-drop-right name 5))))
192 (mkdir dir)
193 (invoke "tar" "xvf"
194 (assoc-ref inputs name)
195 "-C" dir
196 "--strip-components=1")))))
197 (mkdir target)
198 (invoke "tar" "xvf" source
199 "-C" target "--strip-components=1")
200 (chdir target)
201 (unpack "openjdk-src" "openjdk.src")
202 (with-directory-excursion "openjdk.src"
203 (for-each unpack
204 (filter (cut string-suffix? "-drop" <>)
205 (map (match-lambda
206 ((name . _) name))
207 inputs)))))))
208 (add-after 'unpack 'use-classpath
209 (lambda* (#:key inputs #:allow-other-keys)
210 (let ((tools (search-input-file inputs "/share/classpath/tools.zip"))
211 (rt.jar (search-input-file inputs "/lib/rt.jar")))
212 ;; GNU Classpath does not provide rt.jar, but jamvm provides
213 ;; Classpath's glibj.zip as rt.jar, so we just use that.
214 (substitute* "Makefile.in"
215 (("\\$\\(SYSTEM_JDK_DIR\\)/jre/lib/rt.jar") rt.jar))
216 ;; Make sure we can find all classes.
217 (setenv "CLASSPATH"
218 (string-append rt.jar ":" tools))
219 (setenv "JAVACFLAGS"
220 (string-append "-cp " rt.jar ":" tools)))))
221 (add-after 'unpack 'patch-bitrot
222 (lambda _
223 (substitute* '("patches/boot/revert-6973616.patch"
224 "openjdk.src/jdk/make/common/shared/Defs-versions.gmk")
225 (("REQUIRED_FREETYPE_VERSION = 2.2.1")
226 "REQUIRED_FREETYPE_VERSION = 2.10.1"))
227 ;; As of attr 2.4.48 this header is no longer
228 ;; included. It is provided by the libc instead.
229 (substitute* '("configure"
230 "openjdk.src/jdk/src/solaris/native/sun/nio/fs/LinuxNativeDispatcher.c")
231 (("attr/xattr.h") "sys/xattr.h"))))
232 (add-after 'unpack 'fix-openjdk
233 (lambda _
234 (substitute* "openjdk.src/jdk/make/common/Defs-linux.gmk"
235 (("CFLAGS_COMMON = -fno-strict-aliasing" all)
236 (string-append all " -fcommon")))
237 (substitute*
238 '("openjdk.src/jdk/src/solaris/native/java/net/PlainSocketImpl.c"
239 "openjdk.src/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c")
240 (("#include <sys/sysctl.h>")
241 "#include <linux/sysctl.h>"))
242
243 ;; XXX 'ldd' in glibc 2.35 segfaults upon reading
244 ;; openjdk.build-boot/lib/amd64/libnio.so (!).
245 ;; It is only used as a verification step, so ignore it;
246 ;; try removing this substitution for newer versions of glibc.
247 (substitute* "openjdk.src/jdk/make/common/shared/Defs-linux.gmk"
248 (("\\$\\(LDD\\) \\$1 &&")
249 ""))
250
251 ;; It looks like the "h = 31 * h + c" line of the jsum()
252 ;; function gets miscompiled. After a few iterations of the loop
253 ;; the result of "31 * h" is always 0x8000000000000000.
254 ;; Disable optimizations of dump.cpp as a workaround.
255 (substitute* "openjdk.src/hotspot/make/linux/makefiles/gcc.make"
256 (("OPT_CFLAGS/NOOPT.*" all)
257 (string-append all "\n"
258 "OPT_CFLAGS/dump.o += -O0")))))
259 (add-after 'unpack 'fix-x11-extension-include-path
260 (lambda* (#:key inputs #:allow-other-keys)
261 (substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk"
262 (((string-append "\\$\\(firstword \\$\\(wildcard "
263 "\\$\\(OPENWIN_HOME\\)"
264 "/include/X11/extensions\\).*$"))
265 (string-append (assoc-ref inputs "libxrender")
266 "/include/X11/extensions"
267 " -I" (assoc-ref inputs "libxtst")
268 "/include/X11/extensions"
269 " -I" (assoc-ref inputs "libxinerama")
270 "/include/X11/extensions"))
271 (("\\$\\(wildcard /usr/include/X11/extensions\\)\\)") ""))))
272 (add-after 'unpack 'patch-paths
273 (lambda* (#:key inputs #:allow-other-keys)
274 ;; buildtree.make generates shell scripts, so we need to replace
275 ;; the generated shebang
276 (substitute* '("openjdk.src/hotspot/make/linux/makefiles/buildtree.make")
277 (("/bin/sh") (which "bash")))
278
279 (let ((corebin (string-append
280 (assoc-ref inputs "coreutils") "/bin/"))
281 (binbin (string-append
282 (assoc-ref inputs "binutils") "/bin/"))
283 (grepbin (string-append
284 (assoc-ref inputs "grep") "/bin/")))
285 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-linux.gmk"
286 "openjdk.src/corba/make/common/shared/Defs-linux.gmk")
287 (("UNIXCOMMAND_PATH = /bin/")
288 (string-append "UNIXCOMMAND_PATH = " corebin))
289 (("USRBIN_PATH = /usr/bin/")
290 (string-append "USRBIN_PATH = " corebin))
291 (("DEVTOOLS_PATH *= */usr/bin/")
292 (string-append "DEVTOOLS_PATH = " corebin))
293 (("COMPILER_PATH *= */usr/bin/")
294 (string-append "COMPILER_PATH = "
295 (assoc-ref inputs "gcc") "/bin/"))
296 (("DEF_OBJCOPY *=.*objcopy")
297 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
298
299 ;; fix path to alsa header
300 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
301 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
302 (string-append "ALSA_INCLUDE="
303 (assoc-ref inputs "alsa-lib")
304 "/include/alsa/version.h")))
305
306 ;; fix hard-coded utility paths
307 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-utils.gmk"
308 "openjdk.src/corba/make/common/shared/Defs-utils.gmk")
309 (("ECHO *=.*echo")
310 (string-append "ECHO = " (which "echo")))
311 (("^GREP *=.*grep")
312 (string-append "GREP = " (which "grep")))
313 (("EGREP *=.*egrep")
314 (string-append "EGREP = " (which "egrep")))
315 (("CPIO *=.*cpio")
316 (string-append "CPIO = " (which "cpio")))
317 (("READELF *=.*readelf")
318 (string-append "READELF = " (which "readelf")))
319 (("^ *AR *=.*ar")
320 (string-append "AR = " (which "ar")))
321 (("^ *TAR *=.*tar")
322 (string-append "TAR = " (which "tar")))
323 (("AS *=.*as")
324 (string-append "AS = " (which "as")))
325 (("LD *=.*ld")
326 (string-append "LD = " (which "ld")))
327 (("STRIP *=.*strip")
328 (string-append "STRIP = " (which "strip")))
329 (("NM *=.*nm")
330 (string-append "NM = " (which "nm")))
331 (("^SH *=.*sh")
332 (string-append "SH = " (which "bash")))
333 (("^FIND *=.*find")
334 (string-append "FIND = " (which "find")))
335 (("LDD *=.*ldd")
336 (string-append "LDD = " (which "ldd")))
337 (("NAWK *=.*(n|g)awk")
338 (string-append "NAWK = " (which "gawk")))
339 (("XARGS *=.*xargs")
340 (string-append "XARGS = " (which "xargs")))
341 (("UNZIP *=.*unzip")
342 (string-append "UNZIP = " (which "unzip")))
343 (("ZIPEXE *=.*zip")
344 (string-append "ZIPEXE = " (which "zip")))
345 (("SED *=.*sed")
346 (string-append "SED = " (which "sed"))))
347
348 ;; Some of these timestamps cause problems as they are more than
349 ;; 10 years ago, failing the build process.
350 (substitute*
351 "openjdk.src/jdk/src/share/classes/java/util/CurrencyData.properties"
352 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
353 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
354 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
355 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY")))))
356 (add-before 'configure 'set-additional-paths
357 (lambda* (#:key inputs #:allow-other-keys)
358 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
359 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
360 (string-append "ALSA_INCLUDE="
361 (assoc-ref inputs "alsa-lib")
362 "/include/alsa/version.h")))
363 (setenv "CC" "gcc")
364 (setenv "CPATH"
365 (string-append (assoc-ref inputs "libxcomposite")
366 "/include/X11/extensions" ":"
367 (assoc-ref inputs "libxrender")
368 "/include/X11/extensions" ":"
369 (assoc-ref inputs "libxtst")
370 "/include/X11/extensions" ":"
371 (assoc-ref inputs "libxinerama")
372 "/include/X11/extensions" ":"
373 (or (getenv "CPATH") "")))
374 (setenv "ALT_OBJCOPY" (which "objcopy"))
375 (setenv "ALT_CUPS_HEADERS_PATH"
376 (string-append (assoc-ref inputs "cups")
377 "/include"))
378 (setenv "ALT_FREETYPE_HEADERS_PATH"
379 (string-append (assoc-ref inputs "freetype")
380 "/include"))
381 (setenv "ALT_FREETYPE_LIB_PATH"
382 (string-append (assoc-ref inputs "freetype")
383 "/lib"))))
384 (add-before 'build 'disable-os-version-check
385 ;; allow build on linux major version change
386 (lambda _
387 (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok")))
388 (add-before 'check 'fix-test-framework
389 (lambda _
390 ;; Fix PATH in test environment
391 (substitute* "test/jtreg/com/sun/javatest/regtest/Main.java"
392 (("PATH=/bin:/usr/bin")
393 (string-append "PATH=" (getenv "PATH"))))
394 (substitute* "test/jtreg/com/sun/javatest/util/SysEnv.java"
395 (("/usr/bin/env") (which "env")))
396 (substitute* "openjdk.src/hotspot/test/test_env.sh"
397 (("/bin/rm") (which "rm"))
398 (("/bin/cp") (which "cp"))
399 (("/bin/mv") (which "mv")))))
400 (add-before 'check 'fix-hotspot-tests
401 (lambda _
402 (with-directory-excursion "openjdk.src/hotspot/test/"
403 (substitute* "jprt.config"
404 (("PATH=\"\\$\\{path4sdk\\}\"")
405 (string-append "PATH=" (getenv "PATH")))
406 (("make=/usr/bin/make")
407 (string-append "make=" (which "make"))))
408 (substitute* '("runtime/6626217/Test6626217.sh"
409 "runtime/7110720/Test7110720.sh")
410 (("/bin/rm") (which "rm"))
411 (("/bin/cp") (which "cp"))
412 (("/bin/mv") (which "mv"))))))
413 (add-before 'check 'fix-jdk-tests
414 (lambda _
415 (with-directory-excursion "openjdk.src/jdk/test/"
416 (substitute* "com/sun/jdi/JdbReadTwiceTest.sh"
417 (("/bin/pwd") (which "pwd")))
418 (substitute* "com/sun/jdi/ShellScaffold.sh"
419 (("/bin/kill") (which "kill")))
420 (substitute* "start-Xvfb.sh"
421 ;;(("/usr/bin/X11/Xvfb") (which "Xvfb"))
422 (("/usr/bin/nohup") (which "nohup")))
423 (substitute* "javax/security/auth/Subject/doAs/Test.sh"
424 (("/bin/rm") (which "rm")))
425 (substitute* "tools/launcher/MultipleJRE.sh"
426 (("echo \"#!/bin/sh\"")
427 (string-append "echo \"#!" (which "rm") "\""))
428 (("/usr/bin/zip") (which "zip")))
429 (substitute* "com/sun/jdi/OnThrowTest.java"
430 (("#!/bin/sh") (string-append "#!" (which "sh"))))
431 (substitute* "java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java"
432 (("/usr/bin/uptime") (which "uptime")))
433 (substitute* "java/lang/ProcessBuilder/Basic.java"
434 (("/usr/bin/env") (which "env"))
435 (("/bin/false") (which "false"))
436 (("/bin/true") (which "true"))
437 (("/bin/cp") (which "cp"))
438 (("/bin/sh") (which "sh")))
439 (substitute* "java/lang/ProcessBuilder/FeelingLucky.java"
440 (("/bin/sh") (which "sh")))
441 (substitute* "java/lang/ProcessBuilder/Zombies.java"
442 (("/usr/bin/perl") (which "perl"))
443 (("/bin/ps") (which "ps"))
444 (("/bin/true") (which "true")))
445 (substitute* "java/lang/Runtime/exec/ConcurrentRead.java"
446 (("/usr/bin/tee") (which "tee")))
447 (substitute* "java/lang/Runtime/exec/ExecWithDir.java"
448 (("/bin/true") (which "true")))
449 (substitute* "java/lang/Runtime/exec/ExecWithInput.java"
450 (("/bin/cat") (which "cat")))
451 (substitute* "java/lang/Runtime/exec/ExitValue.java"
452 (("/bin/sh") (which "sh"))
453 (("/bin/true") (which "true"))
454 (("/bin/kill") (which "kill")))
455 (substitute* "java/lang/Runtime/exec/LotsOfDestroys.java"
456 (("/usr/bin/echo") (which "echo")))
457 (substitute* "java/lang/Runtime/exec/LotsOfOutput.java"
458 (("/usr/bin/cat") (which "cat")))
459 (substitute* "java/lang/Runtime/exec/SleepyCat.java"
460 (("/bin/cat") (which "cat"))
461 (("/bin/sleep") (which "sleep"))
462 (("/bin/sh") (which "sh")))
463 (substitute* "java/lang/Runtime/exec/StreamsSurviveDestroy.java"
464 (("/bin/cat") (which "cat")))
465 (substitute* "java/rmi/activation/CommandEnvironment/SetChildEnv.java"
466 (("/bin/chmod") (which "chmod")))
467 (substitute* "java/util/zip/ZipFile/Assortment.java"
468 (("/bin/sh") (which "sh"))))))
469 (replace 'check
470 (lambda* (#:key tests? #:allow-other-keys)
471 ;; The "make check-*" targets always return zero, so we need to
472 ;; check for errors in the associated log files to determine
473 ;; whether any tests have failed.
474 (when tests?
475 (use-modules (ice-9 rdelim))
476 (let* ((error-pattern (make-regexp "^(Error|FAILED):.*"))
477 (checker (lambda (port)
478 (let loop ()
479 (let ((line (read-line port)))
480 (cond
481 ((eof-object? line) #t)
482 ((regexp-exec error-pattern line)
483 (error "test failed"))
484 (else (loop)))))))
485 (run-test (lambda (test)
486 (invoke "make" test)
487 (call-with-input-file
488 (string-append "test/" test ".log")
489 checker))))
490 (run-test "check-hotspot")
491 (run-test "check-langtools")
492 (run-test "check-jdk")))))
493 (replace 'install
494 (lambda* (#:key outputs #:allow-other-keys)
495 (let ((doc (string-append (assoc-ref outputs "doc")
496 "/share/doc/icedtea"))
497 (jre (assoc-ref outputs "out"))
498 (jdk (assoc-ref outputs "jdk")))
499 (copy-recursively "openjdk.build/docs" doc)
500 (copy-recursively "openjdk.build/j2re-image" jre)
501 (copy-recursively "openjdk.build/j2sdk-image" jdk))))
502 ;; Some of the libraries in the lib/amd64 folder link to libjvm.so.
503 ;; But that shared object is located in the server/ folder, so it
504 ;; cannot be found. This phase creates a symbolic link in the
505 ;; lib/amd64 folder so that the other libraries can find it.
506 ;;
507 ;; See:
508 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
509 ;;
510 ;; FIXME: Find the bug in the build system, so that this symlink is
511 ;; not needed.
512 (add-after 'install 'install-libjvm
513 (lambda* (#:key inputs outputs #:allow-other-keys)
514 (let* ((lib-path (string-append (assoc-ref outputs "out")
515 ;; See 'INSTALL_ARCH_DIR' in
516 ;; 'configure'.
517 ,(match (%current-system)
518 ("i686-linux"
519 "/lib/i386")
520 ("x86_64-linux"
521 "/lib/amd64")
522 ("armhf-linux"
523 "/lib/arm")
524 ("aarch64-linux"
525 "/lib/aarch64")
526 ("powerpc-linux"
527 "/lib/ppc")
528 ;; We need a catch-all, dropping
529 ;; '-linux' works in most cases.
530 (_
531 (string-append
532 "/lib/"
533 (string-drop-right
534 (%current-system) 6)))))))
535 (symlink (string-append lib-path "/server/libjvm.so")
536 (string-append lib-path "/libjvm.so")))))
537 ;; By default IcedTea only generates an empty keystore. In order to
538 ;; be able to use certificates in Java programs we need to generate a
539 ;; keystore from a set of certificates. For convenience we use the
540 ;; certificates from the nss-certs package.
541 (add-after 'install 'install-keystore
542 (lambda* (#:key inputs outputs #:allow-other-keys)
543 (use-modules (ice-9 rdelim))
544 (let* ((keystore "cacerts")
545 (certs-dir (search-input-directory inputs
546 "etc/ssl/certs"))
547 (keytool (string-append (assoc-ref outputs "jdk")
548 "/bin/keytool")))
549 (define (extract-cert file target)
550 (call-with-input-file file
551 (lambda (in)
552 (call-with-output-file target
553 (lambda (out)
554 (let loop ((line (read-line in 'concat))
555 (copying? #f))
556 (cond
557 ((eof-object? line) #t)
558 ((string-prefix? "-----BEGIN" line)
559 (display line out)
560 (loop (read-line in 'concat) #t))
561 ((string-prefix? "-----END" line)
562 (display line out)
563 #t)
564 (else
565 (when copying? (display line out))
566 (loop (read-line in 'concat) copying?)))))))))
567 (define (import-cert cert)
568 (format #t "Importing certificate ~a\n" (basename cert))
569 (let ((temp "tmpcert"))
570 (extract-cert cert temp)
571 (let ((port (open-pipe* OPEN_WRITE keytool
572 "-import"
573 "-alias" (basename cert)
574 "-keystore" keystore
575 "-storepass" "changeit"
576 "-file" temp)))
577 (display "yes\n" port)
578 (when (not (zero? (status:exit-val (close-pipe port))))
579 (format #t "failed to import ~a\n" cert)))
580 (delete-file temp)))
581
582 ;; This is necessary because the certificate directory contains
583 ;; files with non-ASCII characters in their names.
584 (setlocale LC_ALL "C.UTF-8")
585 (setenv "LC_ALL" "C.UTF-8")
586
587 (for-each import-cert (find-files certs-dir "\\.pem$"))
588 (mkdir-p (string-append (assoc-ref outputs "out")
589 "/lib/security"))
590 (mkdir-p (string-append (assoc-ref outputs "jdk")
591 "/jre/lib/security"))
592
593 ;; The cacerts files we are going to overwrite are chmod'ed as
594 ;; read-only (444) in icedtea-8 (which derives from this
595 ;; package). We have to change this so we can overwrite them.
596 (chmod (string-append (assoc-ref outputs "out")
597 "/lib/security/" keystore) #o644)
598 (chmod (string-append (assoc-ref outputs "jdk")
599 "/jre/lib/security/" keystore) #o644)
600
601 (install-file keystore
602 (string-append (assoc-ref outputs "out")
603 "/lib/security"))
604 (install-file keystore
605 (string-append (assoc-ref outputs "jdk")
606 "/jre/lib/security"))))))))
607 (native-inputs
608 `(("openjdk-src"
609 ,(drop "openjdk"
610 "0l34ikyf62hbzlf9032alzkkqvf7bpmckz4gvirvph755w7gka8l"))
611 ("corba-drop"
612 ,(drop "corba"
613 "050gv2jbg1pi6qkn8w18bwpbklfa5b0kymjvan9pncddbj8m84fz"))
614 ("jaxp-drop"
615 ,(drop "jaxp"
616 "1k6yldwnxfzdg5926r1nlfv8d1r1j7rlp2nkz6gqh05vgyamnfhl"))
617 ("jaxws-drop"
618 ,(drop "jaxws"
619 "110j7jlz47x2gg6f7653x12mssan5kvj9l9h1m1c8c92drfxbqyk"))
620 ("jdk-drop"
621 ,(drop "jdk"
622 "0d1mca38ksxvdskp9im3pp7fdijhj1n3lwq9w13r9s4v3qyskgdd"
623 (search-patches "jdk-currency-time-bomb.patch")))
624 ("langtools-drop"
625 ,(drop "langtools"
626 "0nq5236fzxn3p6x8cgncl56mzcmsj07q9gymysnws4c8byc6n0qj"))
627 ("hotspot-drop"
628 ,(origin
629 (method url-fetch)
630 (uri (string-append
631 "http://icedtea.classpath.org/downloads/drops"
632 "/icedtea7/" version "/hotspot.tar.bz2"))
633 (sha256
634 (base32
635 "17bdv39n4lh8l5737c96f3xgamx4y305m067p01cywgp7zaddqws"))
636 (patches (search-patches
637 "icedtea-7-hotspot-aarch64-use-c++98.patch"
638 "icedtea-7-hotspot-pointer-comparison.patch"))))
639 ("ant" ,ant-bootstrap)
640 ("attr" ,attr)
641 ("classpath" ,classpath-devel)
642 ("coreutils" ,coreutils)
643 ("diffutils" ,diffutils) ;for tests
644 ("ecj4-javac-wrapper" ,ecj4-javac-wrapper)
645 ("fastjar" ,fastjar) ;only for the configure phase; we actually use gjar
646 ("gawk" ,gawk)
647 ("grep" ,grep)
648 ("jamvm" ,jamvm-with-ecj4)
649 ("libtool" ,libtool)
650 ("pkg-config" ,pkg-config)
651 ("wget" ,wget)
652 ("which" ,which)
653 ("cpio" ,cpio)
654 ("zip" ,zip)
655 ("unzip" ,unzip)
656 ("libxslt" ,libxslt) ;for xsltproc
657 ("nss-certs" ,nss-certs)
658 ("perl" ,perl)
659 ("procps" ,procps))) ;for "free", even though I'm not sure we should use it
660 (inputs
661 (list alsa-lib
662 cups
663 fontconfig
664 freetype
665 giflib
666 gtk+-2
667 lcms
668 libjpeg-turbo
669 libpng
670 libx11
671 libxcomposite
672 libxi
673 libxinerama
674 libxrender
675 libxt
676 libxtst
677 mit-krb5
678 nss
679 pcsc-lite
680 zlib))
681 (home-page "https://icedtea.classpath.org")
682 (synopsis "Java development kit")
683 (description
684 "This package provides the Java development kit OpenJDK built with the
685IcedTea build harness.")
686
687 ;; 'configure' lists "mips" and "mipsel", but not "mips64el'.
688 (supported-systems (delete "mips64el-linux" %supported-systems))
689
690 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
691 ;; same license as both GNU Classpath and OpenJDK.
692 (license license:gpl2+))))
693
694(define-public icedtea-8
695 (let* ((version "3.19.0")
696 (drop (lambda* (name hash #:optional (patches '()))
697 (origin
698 (method url-fetch)
699 (uri (string-append
700 "http://icedtea.classpath.org/download/drops"
701 "/icedtea8/" version "/" name ".tar.xz"))
702 (sha256 (base32 hash))
703 (patches patches)))))
704 (package (inherit icedtea-7)
705 (version "3.19.0")
706 (source (origin
707 (method url-fetch)
708 (uri (string-append
709 "http://icedtea.wildebeest.org/download/source/icedtea-"
710 version ".tar.xz"))
711 (sha256
712 (base32
713 "1cmms7cb2sav3ywc36ynqmybzx73sl279rm6j8i5nqrmp98ixmpf"))
714 (modules '((guix build utils)))
715 (snippet
716 '(substitute* '("configure"
717 "acinclude.m4")
718 ;; Do not embed build time
719 (("(DIST_ID=\"Custom build).*$" _ prefix)
720 (string-append prefix "\"\n"))
721 ;; Do not leak information about the build host
722 (("DIST_NAME=\"\\$build_os\"")
723 "DIST_NAME=\"guix\"")))))
724 (arguments
725 `(#:imported-modules
726 ((guix build ant-build-system)
727 ,@%default-gnu-imported-modules)
728
729 #:disallowed-references ,(list (gexp-input icedtea-7 "jdk"))
730
731 ,@(substitute-keyword-arguments (package-arguments icedtea-7)
732 ((#:modules modules)
733 `((guix build utils)
734 (guix build gnu-build-system)
735 ((guix build ant-build-system) #:prefix ant:)
736 (ice-9 match)
737 (ice-9 popen)
738 (srfi srfi-19)
739 (srfi srfi-26)))
740 ((#:configure-flags flags)
741 `(let ((jdk (assoc-ref %build-inputs "jdk")))
742 `("CFLAGS=-fcommon"
743 "CXXFLAGS=-fcommon"
744 "--enable-bootstrap"
745 "--enable-nss"
746 ,(string-append "--with-parallel-jobs="
747 (number->string (parallel-job-count)))
748 ;; Java Flight Recorder isn't supported on some architectures.
749 ,@(if ,(target-ppc32?)
750 `("--enable-jfr=no")
751 '())
752 "--disable-docs" ; This phase can take hours on slow machines.
753 "--disable-downloading"
754 "--disable-system-pcsc"
755 "--disable-system-sctp"
756 "--disable-tests" ;they are run in the check phase instead
757 "--with-openjdk-src-dir=./openjdk.src"
758 ,(string-append "--with-jdk-home=" jdk))))
759 ((#:phases phases)
760 `(modify-phases ,phases
761 (delete 'fix-x11-extension-include-path)
762 (delete 'patch-paths)
763 (delete 'set-additional-paths)
764 (delete 'patch-patches)
765 (delete 'patch-bitrot)
766 (delete 'use-classpath)
767 ;; Prevent passing -j (parallel-job-count) to make
768 (replace 'build
769 (lambda* (#:key (make-flags '()) #:allow-other-keys)
770 (apply invoke "make" make-flags)))
771 ;; Prevent the keytool from recording the current time when
772 ;; adding certificates at build time.
773 (add-after 'unpack 'patch-keystore
774 (lambda _
775 (substitute* "openjdk.src/jdk/src/share/classes/sun/security/provider/JavaKeyStore.java"
776 (("date = new Date\\(\\);")
777 "\
778date = (System.getenv(\"SOURCE_DATE_EPOCH\") != null) ?\
779new Date(Long.parseLong(System.getenv(\"SOURCE_DATE_EPOCH\"))) :\
780new Date();"))
781 #t))
782 (add-after 'unpack 'patch-jni-libs
783 ;; Hardcode dynamically loaded libraries.
784 (lambda _
785 (define remove
786 (@ (srfi srfi-1) remove))
787
788 (define (icedtea-or-openjdk? path)
789 (or (string-contains path "openjdk")
790 (string-contains path "icedtea")))
791
792 (let* ((library-path (remove icedtea-or-openjdk?
793 (search-path-as-string->list
794 (getenv "LIBRARY_PATH"))))
795 (find-library (lambda (name)
796 (or (search-path
797 library-path
798 (string-append "lib" name ".so"))
799 (string-append "lib" name ".so")))))
800 (for-each
801 (lambda (file)
802 (catch 'decoding-error
803 (lambda ()
804 (substitute* file
805 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
806 _ name version)
807 (string-append "\"" (find-library name) "\""))
808 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
809 (string-append "\"" (find-library name) "\""))))
810 (lambda _
811 ;; Those are safe to skip.
812 (format (current-error-port)
813 "warning: failed to substitute: ~a~%"
814 file))))
815 (find-files "openjdk.src/jdk/src/solaris/native"
816 "\\.c|\\.h")))))
817 (replace 'fix-openjdk
818 (lambda _
819 (substitute*
820 '("openjdk.src/jdk/src/solaris/native/java/net/PlainSocketImpl.c"
821 "openjdk.src/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c")
822 (("#include <sys/sysctl.h>")
823 "#include <linux/sysctl.h>"))))
824 (replace 'install
825 (lambda* (#:key outputs #:allow-other-keys)
826 (let ((doc (string-append (assoc-ref outputs "doc")
827 "/share/doc/icedtea"))
828 (jre (assoc-ref outputs "out"))
829 (jdk (assoc-ref outputs "jdk")))
830 (copy-recursively "openjdk.build/docs" doc)
831 (copy-recursively "openjdk.build/images/j2re-image" jre)
832 (copy-recursively "openjdk.build/images/j2sdk-image" jdk)
833 ;; Install the nss.cfg file to JRE to enable SSL/TLS
834 ;; support via NSS.
835 (copy-file (string-append jdk "/jre/lib/security/nss.cfg")
836 (string-append jre "/lib/security/nss.cfg")))))
837 (add-after 'install 'strip-jar-timestamps
838 (assoc-ref ant:%standard-phases 'strip-jar-timestamps)))))))
839 (native-inputs
840 `(("jdk" ,icedtea-7 "jdk")
841 ("openjdk-src"
842 ,(drop "openjdk"
843 "1l3bzmd3s38scxpwamfhnwbv7vndgjq6hz3bl58437fgl9kgbl69"))
844 ("aarch32-drop"
845 ,(drop "aarch32"
846 "0k4dwpi3x3lj41rj32xyxbn76r7cb2g2whh44r1z4iwhw1xd2lpq"))
847 ("corba-drop"
848 ,(drop "corba"
849 "0xhh6gf5gh5c6vf1607xcy49wnp5prch2rim13x14wvsn817xf0r"))
850 ("jaxp-drop"
851 ,(drop "jaxp"
852 "043g335rgi5ipl8dp3q2cc3gcfhxk77ipxs43sv344z71bn8xmxr"))
853 ("jaxws-drop"
854 ,(drop "jaxws"
855 "1pc0pv4v2mn2mjc0vp19d94v2150xigyhxsmckqasy647zcm6w0r"))
856 ("jdk-drop"
857 ,(drop "jdk"
858 "1742lcm55l8zhi522x83v65ccr0rd6511q9rj7crw44x3ymdrhrv"
859 (search-patches "jdk-currency-time-bomb2.patch")))
860 ("langtools-drop"
861 ,(drop "langtools"
862 "08iz7p2xcddlphipf6gahyabr5cawlnydap12p1n4f0md069b50b"))
863 ("hotspot-drop"
864 ,(drop "hotspot"
865 "1ffaxfnb3yn1i7crivqigc1r1q0z6cp044i6nfring4z6c8pfhd2"))
866 ("nashorn-drop"
867 ,(drop "nashorn"
868 "15fn7cpm2i1npa88h57njxg0f8qkrqhrc30pb54d3hxlx5zyjl94"))
869 ("shenandoah-drop"
870 ,(drop "shenandoah"
871 "1jjzjjx1ykyhbc4llh8249dlr8j5g1ki6r7g9baj2mxyb9whc5nq"))
872 ,@(fold alist-delete (package-native-inputs icedtea-7)
873 '("openjdk-src" "corba-drop" "jaxp-drop" "jaxws-drop"
874 "jdk-drop" "langtools-drop" "hotspot-drop"
875 "classpath" "ecj4-javac-wrapper" "jamvm" "fastjar")))))))
876
877(define-public icedtea icedtea-8)
878
879(define-public openjdk9
880 (package
881 (name "openjdk")
882 (version "9.181")
883 (source (origin
884 (method hg-fetch)
885 (uri (hg-reference (url "https://hg.openjdk.org/jdk/jdk")
886 (changeset "jdk-9+181")))
887 (file-name (hg-file-name name version))
888 (modules '((guix build utils)))
889 (snippet '(for-each delete-file
890 (find-files "." ".*.(bin|exe|jar)$")))
891 (sha256
892 (base32
893 "1v92nzdqx07c35x945awzir4yk0fk22vky6fpp8mq9js930sxsz0"))
894 (patches
895 (search-patches "openjdk-9-pointer-comparison.patch"
896 "openjdk-9-classlist-reproducibility.patch"
897 "openjdk-currency-time-bomb.patch"
898 "openjdk-9-jar-reproducibility.patch"
899 "openjdk-9-module-reproducibility.patch"
900 "openjdk-9-module2-reproducibility.patch"
901 "openjdk-9-module3-reproducibility.patch"
902 "openjdk-9-idlj-reproducibility.patch"
903 "openjdk-9-setsignalhandler.patch"))))
904 (build-system gnu-build-system)
905 (outputs '("out" "jdk" "doc"))
906 (arguments
907 `(#:imported-modules
908 ((guix build ant-build-system)
909 ,@%default-gnu-imported-modules)
910 #:modules
911 ((guix build utils)
912 (guix build gnu-build-system)
913 (ice-9 popen))
914 #:tests? #f ; require jtreg
915 #:make-flags '("all")
916 #:disallowed-references ,(list (gexp-input icedtea-8)
917 (gexp-input icedtea-8 "jdk"))
918
919 #:phases
920 (modify-phases %standard-phases
921 ,@(if (target-aarch64?)
922 `((add-after 'unpack 'patch-for-aarch64
923 (lambda _
924 (substitute* "hotspot/src/cpu/aarch64/vm/interp_masm_aarch64.hpp"
925 ;; This line is duplicated, so remove both occurrences,
926 ;; then add back one occurrence by substituting a
927 ;; comment that occurs once.
928 (("using MacroAssembler::call_VM_leaf_base;") "")
929 (("Interpreter specific version of call_VM_base")
930 "Interpreter specific version of call_VM_base
931 using MacroAssembler::call_VM_leaf_base;")))))
932 '())
933 (add-after 'patch-source-shebangs 'fix-java-shebangs
934 (lambda _
935 ;; This file was "fixed" by patch-source-shebangs, but it requires
936 ;; this exact first line.
937 (substitute* "jdk/make/data/blacklistedcertsconverter/blacklisted.certs.pem"
938 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))))
939 (replace 'configure
940 (lambda* (#:key inputs outputs #:allow-other-keys)
941 ;; TODO: unbundle libpng and lcms
942 (invoke "bash" "./configure"
943 ;; Add flags for compilation with gcc >= 10
944 ,(string-append "--with-extra-cflags=-fcommon"
945 " -fno-delete-null-pointer-checks"
946 " -fno-lifetime-dse")
947 (string-append "--with-freetype="
948 (assoc-ref inputs "freetype"))
949 "--disable-freetype-bundling"
950 "--disable-warnings-as-errors"
951 "--disable-hotspot-gtest"
952 "--with-giflib=system"
953 "--with-libjpeg=system"
954 (string-append "--prefix=" (assoc-ref outputs "out")))))
955 (add-before 'build 'write-source-revision-file
956 (lambda _
957 (with-output-to-file ".src-rev"
958 (lambda _
959 (display ,version)))))
960 (replace 'build
961 (lambda* (#:key make-flags parallel-build? #:allow-other-keys)
962 (apply invoke "make"
963 `(,@(if parallel-build?
964 (list (string-append "JOBS="
965 (number->string (parallel-job-count))))
966 '())
967 ,@make-flags))))
968 (add-after 'unpack 'patch-jni-libs
969 ;; Hardcode dynamically loaded libraries.
970 (lambda _
971 (define remove
972 (@ (srfi srfi-1) remove))
973
974 (define (icedtea-or-openjdk? path)
975 (or (string-contains path "openjdk")
976 (string-contains path "icedtea")))
977
978 (let* ((library-path (remove icedtea-or-openjdk?
979 (search-path-as-string->list
980 (getenv "LIBRARY_PATH"))))
981 (find-library (lambda (name)
982 (or (search-path
983 library-path
984 (string-append "lib" name ".so"))
985 (string-append "lib" name ".so")))))
986 (for-each
987 (lambda (file)
988 (catch 'decoding-error
989 (lambda ()
990 (substitute* file
991 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
992 _ name version)
993 (string-append "\"" (find-library name) "\""))
994 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
995 (string-append "\"" (find-library name) "\""))))
996 (lambda _
997 ;; Those are safe to skip.
998 (format (current-error-port)
999 "warning: failed to substitute: ~a~%"
1000 file))))
1001 (find-files "."
1002 "\\.c$|\\.h$")))))
1003 ;; By default OpenJDK only generates an empty keystore. In order to
1004 ;; be able to use certificates in Java programs we need to generate a
1005 ;; keystore from a set of certificates. For convenience we use the
1006 ;; certificates from the nss-certs package.
1007 (add-after 'install 'install-keystore
1008 (lambda* (#:key inputs outputs #:allow-other-keys)
1009 (use-modules (ice-9 rdelim))
1010 (let* ((keystore "cacerts")
1011 (certs-dir (search-input-directory inputs
1012 "etc/ssl/certs"))
1013 (keytool (string-append (assoc-ref outputs "jdk")
1014 "/bin/keytool")))
1015 (define (extract-cert file target)
1016 (call-with-input-file file
1017 (lambda (in)
1018 (call-with-output-file target
1019 (lambda (out)
1020 (let loop ((line (read-line in 'concat))
1021 (copying? #f))
1022 (cond
1023 ((eof-object? line) #t)
1024 ((string-prefix? "-----BEGIN" line)
1025 (display line out)
1026 (loop (read-line in 'concat) #t))
1027 ((string-prefix? "-----END" line)
1028 (display line out)
1029 #t)
1030 (else
1031 (when copying? (display line out))
1032 (loop (read-line in 'concat) copying?)))))))))
1033 (define (import-cert cert)
1034 (format #t "Importing certificate ~a\n" (basename cert))
1035 (let ((temp "tmpcert"))
1036 (extract-cert cert temp)
1037 (let ((port (open-pipe* OPEN_WRITE keytool
1038 "-import"
1039 "-alias" (basename cert)
1040 "-keystore" keystore
1041 "-storepass" "changeit"
1042 "-file" temp)))
1043 (display "yes\n" port)
1044 (when (not (zero? (status:exit-val (close-pipe port))))
1045 (format #t "failed to import ~a\n" cert)))
1046 (delete-file temp)))
1047
1048 ;; This is necessary because the certificate directory contains
1049 ;; files with non-ASCII characters in their names.
1050 (setlocale LC_ALL "C.UTF-8")
1051 (setenv "LC_ALL" "C.UTF-8")
1052
1053 (copy-file (string-append (assoc-ref outputs "out")
1054 "/lib/security/cacerts")
1055 keystore)
1056 (chmod keystore #o644)
1057 (for-each import-cert (find-files certs-dir "\\.pem$"))
1058 (mkdir-p (string-append (assoc-ref outputs "out")
1059 "/lib/security"))
1060 (mkdir-p (string-append (assoc-ref outputs "jdk")
1061 "/lib/security"))
1062
1063 ;; The cacerts files we are going to overwrite are chmod'ed as
1064 ;; read-only (444) in icedtea-8 (which derives from this
1065 ;; package). We have to change this so we can overwrite them.
1066 (chmod (string-append (assoc-ref outputs "out")
1067 "/lib/security/" keystore) #o644)
1068 (chmod (string-append (assoc-ref outputs "jdk")
1069 "/lib/security/" keystore) #o644)
1070
1071 (install-file keystore
1072 (string-append (assoc-ref outputs "out")
1073 "/lib/security"))
1074 (install-file keystore
1075 (string-append (assoc-ref outputs "jdk")
1076 "/lib/security")))))
1077 ;; Some of the libraries in the lib/ folder link to libjvm.so.
1078 ;; But that shared object is located in the server/ folder, so it
1079 ;; cannot be found. This phase creates a symbolic link in the
1080 ;; lib/ folder so that the other libraries can find it.
1081 ;;
1082 ;; See:
1083 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1084 ;;
1085 ;; FIXME: Find the bug in the build system, so that this symlink is
1086 ;; not needed.
1087 (add-after 'install 'install-libjvm
1088 (lambda* (#:key inputs outputs #:allow-other-keys)
1089 (let* ((lib-out (string-append (assoc-ref outputs "out")
1090 "/lib"))
1091 (lib-jdk (string-append (assoc-ref outputs "jdk")
1092 "/lib")))
1093 (symlink (string-append lib-jdk "/server/libjvm.so")
1094 (string-append lib-jdk "/libjvm.so"))
1095 (symlink (string-append lib-out "/server/libjvm.so")
1096 (string-append lib-out "/libjvm.so")))))
1097 (replace 'install
1098 (lambda* (#:key outputs #:allow-other-keys)
1099 (let ((out (assoc-ref outputs "out"))
1100 (jdk (assoc-ref outputs "jdk"))
1101 (doc (assoc-ref outputs "doc"))
1102 (images (car (find-files "build" ".*-server-release"
1103 #:directories? #t))))
1104 (copy-recursively (string-append images "/images/jdk") jdk)
1105 (copy-recursively (string-append images "/images/jre") out)
1106 (copy-recursively (string-append images "/images/docs") doc))))
1107 (add-after 'install 'strip-zip-timestamps
1108 (lambda* (#:key outputs #:allow-other-keys)
1109 (for-each
1110 (lambda (zip)
1111 (let ((dir (mkdtemp "zip-contents.XXXXXX")))
1112 (with-directory-excursion dir
1113 ;; This is an exact copy of the implementation of invoke,
1114 ;; but this accepts exit code 1 as OK.
1115 (let ((code (system* "unzip" "--" zip)))
1116 ;; jmod files are zip files with an extra header in
1117 ;; front. unzip will warn about that -- but otherwise
1118 ;; work.
1119 (when (> (status:exit-val code) 1) ; 1 is just a warning
1120 (raise
1121 (condition
1122 (&invoke-error
1123 (program "unzip")
1124 (arguments (list "--" zip))
1125 (exit-status (status:exit-val code))
1126 (term-signal (status:term-sig code))
1127 (stop-signal (status:stop-sig code))))))))
1128 (delete-file zip)
1129 (for-each (lambda (file)
1130 (let ((s (lstat file)))
1131 (format #t "reset ~a~%" file)
1132 (utime file 1 1 0 0
1133 AT_SYMLINK_NOFOLLOW)))
1134 (find-files dir #:directories? #t))
1135 (with-directory-excursion dir
1136 (let ((files (cons "./META-INF/MANIFEST.MF"
1137 (append
1138 (find-files "./META-INF" ".*")
1139 ;; for jmod:
1140 (list "./classes/module-info.class")
1141 (find-files "." ".*")))))
1142 (apply invoke "zip" "--symlinks" "-0" "-X" zip files)
1143 (when (string-suffix? ".jmod" zip)
1144 (let ((new-zip (string-append zip "n"))
1145 (contents (call-with-input-file zip
1146 (@ (ice-9 binary-ports)
1147 get-bytevector-all))))
1148 (call-with-output-file new-zip
1149 (lambda (output-port)
1150 ((@ (ice-9 binary-ports) put-bytevector)
1151 output-port
1152 #vu8(#x4a #x4d #x01 #x00)) ; JM
1153 ((@ (ice-9 binary-ports) put-bytevector)
1154 output-port
1155 contents)))
1156 (rename-file new-zip zip)))))))
1157 (append (find-files (string-append
1158 (assoc-ref outputs "doc")
1159 "/api")
1160 "\\.zip$")
1161 (find-files (assoc-ref outputs "doc") "src\\.zip$")
1162 (find-files (assoc-ref outputs "jdk") "src\\.zip$")
1163 (find-files (assoc-ref outputs "jdk") "\\.jmod$")
1164 (find-files (assoc-ref outputs "jdk") "\\.diz$")
1165 (find-files (assoc-ref outputs "out") "\\.diz$")
1166
1167 (list (string-append (assoc-ref outputs "jdk")
1168 "/lib/jrt-fs.jar"))
1169 (find-files (string-append (assoc-ref outputs "jdk")
1170 "/demo")
1171 "\\.jar$"))))))))
1172 (inputs
1173 (list alsa-lib
1174 cups
1175 fontconfig
1176 freetype
1177 giflib
1178 lcms
1179 libelf
1180 libjpeg-turbo
1181 libice
1182 libpng
1183 libx11
1184 libxcomposite
1185 libxi
1186 libxinerama
1187 libxrender
1188 libxt
1189 libxtst))
1190 (native-inputs
1191 (list icedtea-8
1192 `(,icedtea-8 "jdk")
1193 ;; XXX: The build system fails with newer versions of GNU Make.
1194 gnu-make-4.2
1195 nss-certs
1196 unzip
1197 which
1198 zip))
1199 (home-page "https://openjdk.org/projects/jdk9/")
1200 (synopsis "Java development kit")
1201 (description
1202 "This package provides the Java development kit OpenJDK.")
1203 (license license:gpl2+)))
1204
1205(define-public openjdk10
1206 (package
1207 (inherit openjdk9)
1208 (name "openjdk")
1209 (version "10.46")
1210 (source (origin
1211 (method hg-fetch)
1212 (uri (hg-reference (url "https://hg.openjdk.org/jdk/jdk")
1213 (changeset "jdk-10+46")))
1214 (file-name (hg-file-name name version))
1215 (modules '((guix build utils)))
1216 (snippet `(begin
1217 (for-each delete-file
1218 (find-files "." ".*.(bin|exe|jar)$"))))
1219 (sha256
1220 (base32
1221 "0i47ar8lxzjrkkiwbzybfxs473390h4jq9ahm3xqdvy5zpchxy3y"))
1222 (patches (search-patches
1223 "openjdk-10-char-reproducibility.patch"
1224 "openjdk-10-classlist-reproducibility.patch"
1225 "openjdk-10-corba-reproducibility.patch"
1226 "openjdk-10-idlj-reproducibility.patch"
1227 "openjdk-10-module-reproducibility.patch"
1228 "openjdk-10-module3-reproducibility.patch"
1229 "openjdk-10-module4-reproducibility.patch"
1230 "openjdk-10-jar-reproducibility.patch"
1231 "openjdk-10-jtask-reproducibility.patch"
1232 "openjdk-10-pointer-comparison.patch"
1233 "openjdk-10-setsignalhandler.patch"
1234 "openjdk-currency-time-bomb2.patch"))))
1235 (arguments
1236 (substitute-keyword-arguments (package-arguments openjdk9)
1237 ((#:phases phases)
1238 `(modify-phases ,phases
1239 ,@(if (target-aarch64?)
1240 `((replace 'patch-for-aarch64
1241 (lambda _
1242 (substitute* "src/hotspot/cpu/aarch64/interp_masm_aarch64.hpp"
1243 ;; This line is duplicated, so remove both occurrences,
1244 ;; then add back one occurrence by substituting a
1245 ;; comment that occurs once.
1246 (("using MacroAssembler::call_VM_leaf_base;") "")
1247 (("Interpreter specific version of call_VM_base")
1248 (string-append "Interpreter specific version of call_VM_base\n"
1249 " using MacroAssembler::call_VM_leaf_base;"))))))
1250 '())
1251 (replace 'fix-java-shebangs
1252 (lambda _
1253 ;; This file was "fixed" by patch-source-shebangs, but it requires
1254 ;; this exact first line.
1255 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1256 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))))
1257 (add-after 'unpack 'remove-timestamping
1258 (lambda _
1259 (substitute* "./src/hotspot/share/runtime/vm_version.cpp"
1260 (("__DATE__") "")
1261 (("__TIME__") ""))))
1262 (replace 'configure
1263 (lambda* (#:key inputs outputs #:allow-other-keys)
1264 (invoke "bash" "./configure"
1265 ;; Add flags for compilation with gcc >= 10
1266 ,(string-append "--with-extra-cflags=-fcommon"
1267 " -fno-delete-null-pointer-checks"
1268 " -fno-lifetime-dse")
1269 (string-append "--with-freetype="
1270 (assoc-ref inputs "freetype"))
1271 "--disable-freetype-bundling"
1272 "--disable-warnings-as-errors"
1273 "--disable-hotspot-gtest"
1274 "--with-giflib=system"
1275 "--with-libjpeg=system"
1276 "--with-native-debug-symbols=zipped"
1277 (string-append "--prefix=" (assoc-ref outputs "out")))))
1278 (add-after 'unpack 'disable-warnings-as-errors
1279 (lambda _
1280 ;; It looks like the "--disable-warnings-as-errors" option of
1281 ;; the 'configure' phase is not working.
1282 (substitute* "make/autoconf/generated-configure.sh"
1283 (("-Werror") ""))))))
1284 ((#:disallowed-references _ '())
1285 `(,(gexp-input openjdk9)
1286 ,(gexp-input openjdk9 "jdk")))))
1287 (native-inputs
1288 `(("openjdk9" ,openjdk9)
1289 ("openjdk9:jdk" ,openjdk9 "jdk")
1290 ("[email protected]" ,gnu-make-4.2)
1291 ("nss-certs" ,nss-certs)
1292 ("unzip" ,unzip)
1293 ("which" ,which)
1294 ("zip" ,zip)))))
1295
1296(define-public openjdk11
1297 (package
1298 (name "openjdk")
1299 (version "11.0.22")
1300 (source (origin
1301 (method url-fetch)
1302 (uri (string-append "https://openjdk-sources.osci.io/openjdk11/openjdk-"
1303 version "-ga.tar.xz"))
1304 (file-name (string-append name "-" version ".tar.xz"))
1305 (sha256
1306 (base32
1307 "18ca4syp9xlrqjgyjkb1sp9835riy6aym5xs81r8byrz6jlb2473"))
1308 (modules '((guix build utils)))
1309 (snippet
1310 '(for-each delete-file (find-files "." "\\.(bin|exe|jar)$")))
1311 (patches
1312 (search-patches "openjdk-10-module3-reproducibility.patch"
1313 "openjdk-10-module4-reproducibility.patch"
1314 "openjdk-10-char-reproducibility.patch"
1315 "openjdk-11-classlist-reproducibility.patch"
1316 "openjdk-10-jar-reproducibility.patch"
1317 "openjdk-10-jtask-reproducibility.patch"
1318 "openjdk-currency-time-bomb2.patch"))))
1319 (build-system gnu-build-system)
1320 (outputs '("out" "jdk" "doc"))
1321 (arguments
1322 (list
1323 #:modules `((guix build gnu-build-system)
1324 (guix build utils)
1325 (ice-9 match)
1326 (ice-9 popen)
1327 (srfi srfi-1)
1328 (srfi srfi-26))
1329 #:disallowed-references (list (gexp-input openjdk10)
1330 (gexp-input openjdk10 "jdk"))
1331
1332 #:tests? #f ; requires jtreg
1333 ;; TODO package jtreg
1334 #:configure-flags
1335 #~(list
1336 ;; Add flags for compilation with gcc >= 10.
1337 #$(string-append "--with-extra-cflags=-fcommon"
1338 " -fno-delete-null-pointer-checks"
1339 " -fno-lifetime-dse")
1340 ;; Otherwise, the '--enable-fast-install' causes an error.
1341 "--disable-option-checking"
1342 "--disable-warnings-as-errors"
1343 ;; Make validate-runpath pass (see:
1344 ;; http://issues.guix.info/issue/32894).
1345 "--with-native-debug-symbols=zipped"
1346 ;; Do not use the bundled libraries.
1347 "--with-giflib=system"
1348 "--with-lcms=system"
1349 "--with-libjpeg=system"
1350 "--with-libpng=system"
1351 "--with-version-pre="
1352 ;; Should be set by SOURCE_DATE_EPOCH handler, but isn't being
1353 ;; set; do it manually.
1354 "--with-hotspot-build-time=1970-01-01T00:00:01"
1355 "--enable-reproducible-build" ; to be sure
1356 ;; Allow the build system to locate the system freetype.
1357 (string-append "--with-freetype-include="
1358 #$(this-package-input "freetype") "/include")
1359 (string-append "--with-freetype-lib="
1360 #$(this-package-input "freetype") "/lib"))
1361 #:phases
1362 #~(modify-phases %standard-phases
1363 (add-after 'patch-source-shebangs 'fix-java-shebangs
1364 (lambda _
1365 ;; This file was "fixed" by patch-source-shebangs, but it requires
1366 ;; this exact first line.
1367 (substitute* "make/data/blockedcertsconverter/blocked.certs.pem"
1368 (("^#!.*") "#! java BlockedCertsConverter SHA-256\n"))))
1369 (add-after 'unpack 'remove-timestamping
1370 (lambda _
1371 (substitute* "src/hotspot/share/runtime/abstract_vm_version.cpp"
1372 (("__DATE__") "")
1373 (("__TIME__") ""))))
1374 (add-after 'unpack 'patch-jni-libs
1375 ;; Hardcode dynamically loaded libraries.
1376 (lambda _
1377 (define remove
1378 (@ (srfi srfi-1) remove))
1379
1380 (define (icedtea-or-openjdk? path)
1381 (or (string-contains path "openjdk")
1382 (string-contains path "icedtea")))
1383
1384 (let* ((library-path (remove icedtea-or-openjdk?
1385 (search-path-as-string->list
1386 (getenv "LIBRARY_PATH"))))
1387 (find-library (lambda (name)
1388 (or (search-path
1389 library-path
1390 (string-append "lib" name ".so"))
1391 (string-append "lib" name ".so")))))
1392 (for-each
1393 (lambda (file)
1394 (catch 'decoding-error
1395 (lambda ()
1396 (substitute* file
1397 (("VERSIONED_JNI_LIB_NAME\\(\"([^\"]*)\", \"([^\"]*)\"\\)"
1398 _ name version)
1399 (string-append "\"" (find-library name) "\""))
1400 (("JNI_LIB_NAME\\(\"([^\"]*)\"\\)" _ name)
1401 (string-append "\"" (find-library name) "\""))))
1402 (lambda _
1403 ;; Those are safe to skip.
1404 (format (current-error-port)
1405 "warning: failed to substitute: ~a~%"
1406 file))))
1407 (find-files "." "\\.c$|\\.h$")))))
1408 (add-before 'build 'write-source-revision-file
1409 (lambda _
1410 (with-output-to-file ".src-rev"
1411 (lambda _
1412 (display #$version)))))
1413 (replace 'build
1414 (lambda* (#:key parallel-build? make-flags #:allow-other-keys)
1415 (apply invoke "make" "all"
1416 `(,@(if parallel-build?
1417 (list (string-append "JOBS="
1418 (number->string (parallel-job-count))))
1419 '())
1420 ,@make-flags))))
1421 ;; jdk 11 does not build jre by default any more; so explicitly build
1422 ;; it (see:
1423 ;; https://github.com/AdoptOpenJDK/openjdk-build/issues/356).
1424 (add-after 'build 'build-jre
1425 (lambda* (#:key parallel-build? make-flags #:allow-other-keys)
1426 (apply invoke "make" "legacy-jre-image"
1427 `(,@(if parallel-build?
1428 (list (string-append "JOBS="
1429 (number->string (parallel-job-count))))
1430 '())
1431 ,@make-flags))))
1432 (replace 'install
1433 (lambda _
1434 (let ((images (car (find-files "build" "-server-release"
1435 #:directories? #t))))
1436 (copy-recursively (string-append images "/images/jdk")
1437 #$output:jdk)
1438 (copy-recursively (string-append images "/images/jre")
1439 #$output)
1440 (copy-recursively (string-append images "/images/docs")
1441 #$output:doc))))
1442 ;; Some of the libraries in the lib/ folder link to libjvm.so.
1443 ;; But that shared object is located in the server/ folder, so it
1444 ;; cannot be found. This phase creates a symbolic link in the
1445 ;; lib/ folder so that the other libraries can find it.
1446 ;;
1447 ;; See:
1448 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1449 ;;
1450 ;; FIXME: Find the bug in the build system, so that this symlink is
1451 ;; not needed.
1452 (add-after 'install 'install-libjvm
1453 (lambda _
1454 (let ((lib-out (string-append #$output "/lib"))
1455 (lib-jdk (string-append #$output:jdk "/lib")))
1456 (symlink (string-append lib-jdk "/server/libjvm.so")
1457 (string-append lib-jdk "/libjvm.so"))
1458 (symlink (string-append lib-out "/server/libjvm.so")
1459 (string-append lib-out "/libjvm.so")))))
1460 (add-after 'install 'strip-character-data-timestamps
1461 (lambda _
1462 (let ((archive (string-append #$output:jdk "/lib/src.zip"))
1463 (dir (mkdtemp "zip-contents.XXXXXX")))
1464 (with-directory-excursion dir
1465 (invoke "unzip" archive))
1466 (delete-file archive)
1467 (with-directory-excursion dir
1468 (let ((char-data-files (find-files "." "CharacterData")))
1469 (for-each (lambda (file)
1470 (substitute* file
1471 (((string-append "This file was generated "
1472 "AUTOMATICALLY from a template "
1473 "file.*"))
1474 (string-append "This file was generated "
1475 "AUTOMATICALLY from a template "
1476 "file"))))
1477 char-data-files)))
1478 (with-directory-excursion dir
1479 (let ((files (find-files "." #:directories? #t)))
1480 (apply invoke "zip" "-0" "-X" archive files))))))
1481 (add-after 'strip-character-data-timestamps 'remove-extraneous-files
1482 (lambda* (#:key outputs #:allow-other-keys)
1483 ;; Remove the *.diz and src.zip files for space considerations.
1484 ;; The former are compressed debuginfo files not typically
1485 ;; shipped with Java distributions, while the later corresponds
1486 ;; to Java core API source files.
1487 (for-each delete-file
1488 (append-map (cut find-files <> "(^src\\.zip|\\.diz)$")
1489 (map (match-lambda
1490 ((name . dir)
1491 dir))
1492 outputs)))))
1493 (add-after 'remove-extraneous-files 'strip-archive-timestamps
1494 (lambda _
1495 (use-modules (ice-9 binary-ports)
1496 (rnrs bytevectors))
1497 (letrec ((repack-archive
1498 (lambda (archive)
1499 (let ((dir (mkdtemp "zip-contents.XXXXXX")))
1500 (with-directory-excursion dir
1501 (invoke "unzip" archive))
1502 (delete-file archive)
1503 (for-each (compose repack-archive canonicalize-path)
1504 (find-files dir "(ct\\.sym|\\.jar)$"))
1505 (let ((reset-file-timestamp
1506 (lambda (file)
1507 (let ((s (lstat file)))
1508 (unless (eq? (stat:type s) 'symlink)
1509 (format #t "reset ~a~%" file)
1510 (utime file 0 0 0 0))))))
1511 (for-each reset-file-timestamp
1512 (find-files dir #:directories? #t)))
1513 (with-directory-excursion dir
1514 (let ((files (find-files "." #:directories? #t)))
1515 (apply invoke "zip" "-0" "-X" archive files)))))))
1516 (for-each repack-archive
1517 (find-files #$output:doc "\\.zip$"))
1518 (for-each repack-archive
1519 (find-files #$output:jdk "\\.(zip|jar)$"))
1520 (repack-archive (string-append #$output:jdk "/lib/ct.sym"))
1521 (let ((repack-jmod
1522 (lambda (file-name)
1523 (call-with-input-file file-name
1524 (lambda (file)
1525 (let ((header #vu8(#x4a #x4d #x01 #x00)))
1526 (if (equal? (get-bytevector-n
1527 file (bytevector-length header))
1528 header)
1529 (let* ((header-length (bytevector-length header))
1530 (temp-file (mkstemp!
1531 (string-copy
1532 "temp-file.XXXXXX")))
1533 (temp-filename (port-filename temp-file))
1534 (content-length
1535 (- (stat:size (stat file))
1536 header-length)))
1537 (sendfile temp-file file content-length header-length)
1538 (delete-file file-name)
1539 (close-port temp-file)
1540 (repack-archive (canonicalize-path temp-filename))
1541 (call-with-output-file file-name
1542 (lambda (file)
1543 (put-bytevector file header)
1544 (call-with-input-file temp-filename
1545 (lambda (temp-file)
1546 (sendfile
1547 file temp-file
1548 (stat:size (stat temp-file)) 0)))))))))))))
1549 (for-each repack-jmod
1550 (find-files #$output:jdk "\\.jmod$"))))))
1551 (add-after 'install 'remove-timestamp-from-api-summary
1552 (lambda _
1553 (substitute* (string-append #$output:doc
1554 "/api/overview-summary.html")
1555 (("Generated by javadoc \\(11-internal\\).*$")
1556 "Generated by javadoc (11-internal) -->\n")))))))
1557 (inputs
1558 (list alsa-lib
1559 cups
1560 fontconfig
1561 freetype
1562 giflib
1563 lcms
1564 libjpeg-turbo
1565 libpng
1566 libx11
1567 libxext
1568 libxrandr
1569 libxrender
1570 libxt
1571 libxtst))
1572 (native-inputs
1573 (list autoconf
1574 bash ; not bash-minimal, needs ulimit
1575 openjdk10
1576 `(,openjdk10 "jdk")
1577 gnu-make-4.2
1578 nss-certs
1579 pkg-config
1580 unzip
1581 which
1582 zip))
1583 (home-page "https://openjdk.org/projects/jdk/11/")
1584 (synopsis "Java development kit")
1585 (description
1586 "This package provides the Java development kit OpenJDK.")
1587 (license license:gpl2+)))
1588
1589(define-syntax make-openjdk
1590 ;; Return an OpenJDK package at VERSION with checksum HASH, using BOOTSTRAP,
1591 ;; the bootstrap package. One or more FIELD can be provided to further
1592 ;; refine the package definition; for convenience, the BASE, NAME and
1593 ;; VERSION are defined in their scope.
1594 (lambda (x)
1595 (syntax-case x ()
1596 ((_ bootstrap version* hash field ...)
1597 (with-syntax ((base (datum->syntax x 'base))
1598 (name (datum->syntax x 'name))
1599 (version (datum->syntax x 'version)))
1600 #'(let ((base (package
1601 (inherit bootstrap)
1602 (name "openjdk")
1603 (version version*)
1604 (source
1605 (origin
1606 (inherit (package-source bootstrap))
1607 (method git-fetch)
1608 (uri (git-reference
1609 (url (format
1610 #f "https://github.com/openjdk/jdk~au"
1611 (version-major version*)))
1612 (commit (string-append "jdk-" version*
1613 "-ga"))))
1614 (file-name (git-file-name name version))
1615 (sha256 (base32 hash))))
1616 (native-inputs
1617 (modify-inputs (package-native-inputs bootstrap)
1618 (replace "openjdk" bootstrap)))
1619 (home-page (string-append
1620 "https://openjdk.java.net/projects/jdk/"
1621 (version-major version)))))
1622 (name "openjdk")
1623 (version version*))
1624 (package
1625 (inherit base)
1626 field
1627 ...)))))))
1628
1629(define-public openjdk12
1630 (make-openjdk
1631 openjdk11 "12.33" "0pi2gwib3j2imi4l623iaywrmvfh9rqzh82lj2gxqbrmg55swvjf"
1632 (source
1633 (origin
1634 (method url-fetch)
1635 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/0276cba45aac.tar.bz2")
1636 (file-name (string-append name "-" version ".tar.bz2"))
1637 (sha256
1638 (base32
1639 "0pi2gwib3j2imi4l623iaywrmvfh9rqzh82lj2gxqbrmg55swvjf"))
1640 (modules '((guix build utils)))
1641 (snippet
1642 '(for-each delete-file (find-files "." "\\.(bin|exe|jar)$")))
1643 (patches (search-patches "openjdk-10-setsignalhandler.patch"))))
1644 (arguments
1645 (substitute-keyword-arguments (package-arguments openjdk11)
1646 ((#:phases phases)
1647 #~(modify-phases #$phases
1648 #$@(if (target-aarch64?)
1649 #~((add-after 'unpack 'patch-for-aarch64
1650 (lambda _
1651 (substitute* "src/hotspot/cpu/aarch64/interp_masm_aarch64.hpp"
1652 ;; This line is duplicated, so remove both occurrences,
1653 ;; then add back one occurrence by substituting a
1654 ;; comment that occurs once.
1655 (("using MacroAssembler::call_VM_leaf_base;") "")
1656 (("Interpreter specific version of call_VM_base")
1657 (string-append "Interpreter specific version of call_VM_base\n"
1658 " using MacroAssembler::call_VM_leaf_base;"))))))
1659 #~())
1660 (replace 'remove-timestamping
1661 (lambda _
1662 (substitute* "src/hotspot/share/runtime/vm_version.cpp"
1663 (("__DATE__") "")
1664 (("__TIME__") ""))))
1665 (replace 'fix-java-shebangs
1666 (lambda _
1667 ;; 'blocked' was renamed to 'blacklisted' in this version for
1668 ;; some reason.
1669 (substitute* "make/data/blacklistedcertsconverter/\
1670blacklisted.certs.pem"
1671 (("^#!.*")
1672 "#! java BlacklistedCertsConverter SHA-256\n"))))))))))
1673
1674(define-public openjdk13
1675 (make-openjdk openjdk12 "13.0.14"
1676 "1v92i5rhahqkjw8mz09c9qasnxqc67ygy0y266kdmm534z0da755"
1677 (source (origin
1678 (inherit (package-source base))
1679 (patches (search-patches "openjdk-13-classlist-reproducibility.patch"
1680 "openjdk-10-jtask-reproducibility.patch"))))
1681 (arguments
1682 (substitute-keyword-arguments (package-arguments openjdk12)
1683 ((#:phases phases)
1684 #~(modify-phases #$phases
1685 (replace 'remove-timestamping
1686 (lambda _
1687 (substitute*
1688 "src/hotspot/share/runtime/abstract_vm_version.cpp"
1689 (("__DATE__") "")
1690 (("__TIME__") ""))))))))))
1691
1692(define-public openjdk14
1693 (make-openjdk
1694 openjdk13 "14.0.2"
1695 "07k9bsbxwyf2z2n50z96nvhsdai916mxdxcr5lm44jz7f6xrwfq6"
1696 (source (origin
1697 (inherit (package-source base))
1698 (snippet ;override snippet
1699 '(begin
1700 ;; The m4 macro uses 'help' to search for builtins, which is
1701 ;; not available in bash-minimal
1702 (substitute* "make/autoconf/basics.m4"
1703 (("if help") "if command -v"))
1704 (for-each delete-file (find-files "." "\\.(bin|exe|jar)$"))))
1705 (patches (search-patches "openjdk-10-setsignalhandler.patch"
1706 "openjdk-10-jtask-reproducibility.patch"
1707 "openjdk-13-classlist-reproducibility.patch"))))))
1708
1709(define-public openjdk15
1710 (make-openjdk
1711 openjdk14 "15.0.10"
1712 "0hdllv348bws6m992bh73jik18x0sv0k2m9l817b3zb7q802sp7x"
1713 (source (origin
1714 (inherit (package-source base))
1715 (modules '())
1716 (snippet #f)
1717 (patches
1718 (search-patches "openjdk-15-jtask-reproducibility.patch"
1719 "openjdk-15-xcursor-no-dynamic.patch"))))
1720 (inputs
1721 (modify-inputs (package-inputs base)
1722 (append libxcursor))) ;for our patch to work
1723 (native-inputs
1724 (modify-inputs (package-native-inputs base)
1725 (delete "make" ;remove old gnu-make-4.2
1726 "openjdk") ;to remove non-jdk output
1727 (append `(,openjdk14 "jdk"))))))
1728
1729(define-public openjdk16
1730 (make-openjdk openjdk15 "16.0.2"
1731 "0587px2qbz07g3xi4a3ya6m630p72dvkxcn0bj1813pxnwvcgigz"
1732 (source (origin
1733 (inherit (package-source base))
1734 (patches (search-patches "openjdk-15-xcursor-no-dynamic.patch"
1735 "openjdk-10-setsignalhandler.patch"))))))
1736
1737(define-public openjdk17
1738 (make-openjdk
1739 openjdk16 "17.0.10"
1740 "1bq1rqnipz6wdr05s20gm8nlpb3328ljxckzvc5ag0gf7fzlhn5f"
1741 (source (origin
1742 (inherit (package-source base))
1743 (patches (search-patches "openjdk-15-xcursor-no-dynamic.patch"))))
1744 (arguments
1745 (substitute-keyword-arguments (package-arguments openjdk16)
1746 ((#:phases phases)
1747 #~(modify-phases #$phases
1748 (replace 'fix-java-shebangs
1749 (lambda _
1750 ;; 'blacklisted' was renamed back to 'blocked'.
1751 (substitute* "make/data/blockedcertsconverter/blocked.certs.pem"
1752 (("^#!.*") "#! java BlockedCertsConverter SHA-256\n"))))))))))
1753
1754(define-public openjdk18
1755 (make-openjdk openjdk17 "18.0.2.1"
1756 "0zxanjzz4p3psqahlidh55vx1ldanq70c2ygk3gcfn9a94vnr9rg"))
1757
1758(define-public openjdk19
1759 (make-openjdk openjdk18 "19.0.2"
1760 "08kvx7n8qhhfl25pig966881j5h4x7y0pf4brq16x0283fc0f4d4"
1761 (arguments
1762 (substitute-keyword-arguments (package-arguments openjdk18)
1763 ((#:phases phases)
1764 #~(modify-phases #$phases
1765 (replace 'fix-java-shebangs
1766 (lambda _
1767 ;; Update file path.
1768 (substitute* "src/java.base/share/data/blockedcertsconverter/blocked.certs.pem"
1769 (("^#!.*") "#! java BlockedCertsConverter SHA-256\n"))))
1770 (add-before 'configure 'define-java-environment-variables
1771 (lambda* (#:key inputs #:allow-other-keys)
1772 ;; Fix for "valid range 1980-01-01T00:00:02Z to 2099-12-31T23:59:59Z".
1773 (setenv "SOURCE_DATE_EPOCH" "1234567890")))))))))
1774
1775(define-public openjdk20
1776 (make-openjdk openjdk19 "20.0.2"
1777 "1af1v2c3d8x4c6shzl6cv9qwq7a4hn5map5pjh9vjcky0hkzd489"))
1778
1779(define-public openjdk21
1780 (make-openjdk openjdk20 "21.0.2"
1781 "0d1g3wnzr5whjpq8gvxq0h7kd7lxd3xgc6bh3kg8vzz096asn0kj"
1782 (source (origin
1783 (inherit (package-source base))
1784 (patches (search-patches "openjdk-21-fix-rpath.patch"
1785 "openjdk-15-xcursor-no-dynamic.patch"))))
1786 (arguments
1787 (substitute-keyword-arguments (package-arguments base)
1788 ((#:phases phases)
1789 #~(modify-phases #$phases
1790 (replace 'fix-java-shebangs
1791 (lambda _
1792 ;; 'blacklisted' was renamed back to 'blocked'.
1793 (substitute* "src/java.base/share/data/blockedcertsconverter/blocked.certs.pem"
1794 (("^#!.*") "#! java BlockedCertsConverter SHA-256\n"))))))))))
1795
1796;;; Convenience alias to point to the latest version of OpenJDK.
1797(define-public openjdk openjdk21)
1798
1799
1800;; This version of JBR is here in order to be able to build custom
1801;; IntelliJ plugins. Those usually need both jbr11 and jbr17 for
1802;; tests.
1803(define-public jbr11
1804 (package
1805 (inherit openjdk11)
1806 (name "jbr")
1807 (version "11_0_16-b2248")
1808 (source (origin
1809 (method git-fetch)
1810 (uri (git-reference
1811 (url "https://github.com/JetBrains/JetBrainsRuntime.git")
1812 (commit (string-append "jb" version))))
1813 (file-name (string-append name "-" version "-checkout"))
1814 (sha256
1815 (base32
1816 "1fnrdx0wb21ghm6jczjzk7b9fz9hbdzd62512xhwpzvca57v2z09"))))
1817 (arguments
1818 (substitute-keyword-arguments (package-arguments openjdk11)
1819 ((#:configure-flags configure-flags)
1820 #~(append #$configure-flags
1821 (list "--with-jvm-features=shenandoahgc"
1822 "--enable-cds=yes"
1823 "--with-vendor-name=JetBrains s.r.o"
1824 "--with-vendor-url=https://www.jetbrains.com/"
1825 "--with-vendor-bug-url=https://youtrack.jetbrains.com/issues/JBR")))))
1826 (synopsis "JetBrains Java Runtime")
1827 (description "This package provides a Java runtime environment for
1828and Java development kit. It supports enhanced class redefinition (DCEVM),
1829includes a number of improvements in font rendering, keyboards support,
1830windowing/focus subsystems, HiDPI, accessibility, and performance,
1831provides better desktop integration and bugfixes not yet present in
1832OpenJDK.")
1833 (home-page "https://www.jetbrains.com/")
1834 (license license:gpl2+)))
1835
1836(define-public jbr17
1837 (package
1838 (inherit openjdk17)
1839 (name "jbr")
1840 (version "17.0.11b1207.30")
1841 (source (origin
1842 (method git-fetch)
1843 (uri (git-reference
1844 (url "https://github.com/JetBrains/JetBrainsRuntime.git")
1845 (commit (string-append "jbr-release-" version))))
1846 (file-name (string-append name "-" version "-checkout"))
1847 (sha256
1848 (base32
1849 "5bbf5z8faf9sdkig2fwkj06hb7hs9s3bpzzvbqn2i75lbwqk3bln"))
1850 (patches (search-patches "jbr-17-xcursor-no-dynamic.patch"))))
1851 (arguments
1852 (substitute-keyword-arguments (package-arguments openjdk17)
1853 ((#:configure-flags configure-flags)
1854 #~(append #$configure-flags
1855 (list "--with-jvm-features=shenandoahgc"
1856 "--enable-cds=yes"
1857 "--with-vendor-name=JetBrains s.r.o"
1858 "--with-vendor-url=https://www.jetbrains.com/"
1859 "--with-vendor-bug-url=https://youtrack.jetbrains.com/issues/JBR")))))
1860 (synopsis "JetBrains Java Runtime")
1861 (description "This package provides a Java runtime environment for
1862and Java development kit. It supports enhanced class redefinition (DCEVM),
1863includes a number of improvements in font rendering, keyboards support,
1864windowing/focus subsystems, HiDPI, accessibility, and performance,
1865provides better desktop integration and bugfixes not yet present in
1866OpenJDK.")
1867 (home-page "https://www.jetbrains.com/")
1868 (license license:gpl2+)))
1869
1870(define-public jbr21
1871 (package
1872 (inherit openjdk21)
1873 (name "jbr")
1874 (version "21.0.3b509.11")
1875 (source (origin
1876 (method git-fetch)
1877 (uri (git-reference
1878 (url "https://github.com/JetBrains/JetBrainsRuntime.git")
1879 (commit (string-append "jbr-release-" version))))
1880 (file-name (string-append name "-" version "-checkout"))
1881 (sha256
1882 (base32
1883 "03xkghbp0b1czc2ags9n8ilprf9sy4bhsma0wf8xfapqn6d2sfyd"))
1884 (patches (search-patches "openjdk-21-fix-rpath.patch"
1885 "jbr-17-xcursor-no-dynamic.patch"))))
1886 (inputs
1887 `(("wayland" ,wayland)
1888 ("libxkbcommon" ,libxkbcommon) ; for wayland
1889 ,@(package-inputs openjdk21)))
1890 (arguments
1891 (substitute-keyword-arguments (package-arguments openjdk21)
1892 ((#:configure-flags configure-flags)
1893 #~(append #$configure-flags
1894 (list "--with-jvm-features=shenandoahgc"
1895 "--enable-cds=yes"
1896 "--with-vendor-name=JetBrains s.r.o"
1897 "--with-vendor-url=https://www.jetbrains.com/"
1898 "--with-vendor-bug-url=https://youtrack.jetbrains.com/issues/JBR")))))
1899 (synopsis "JetBrains Java Runtime")
1900 (description "This package provides a Java runtime environment for
1901and Java development kit. It supports enhanced class redefinition (DCEVM),
1902includes a number of improvements in font rendering, keyboards support,
1903windowing/focus subsystems, HiDPI, accessibility, and performance,
1904provides better desktop integration and bugfixes not yet present in
1905OpenJDK.")
1906 (home-page "https://www.jetbrains.com/")
1907 (license license:gpl2+)))
1908
1909
1910(define-public ant/java8
1911 (package
1912 (name "ant")
1913 (version "1.10.13")
1914 (source (origin
1915 (method url-fetch)
1916 (uri (string-append "mirror://apache/ant/source/apache-ant-"
1917 version "-src.tar.gz"))
1918 (sha256
1919 (base32
1920 "01l4g9b1xnnq450ljvhrlvcf8wzzmr45wmhkybrx0hcdi166y06s"))
1921 (modules '((guix build utils)))
1922 (snippet
1923 '(begin
1924 (for-each delete-file
1925 (find-files "lib/optional" "\\.jar$"))
1926 #t))))
1927 (build-system gnu-build-system)
1928 (arguments
1929 (list
1930 #:modules '((srfi srfi-1)
1931 (guix build gnu-build-system)
1932 (guix build utils))
1933 #:tests? #f ;no "check" target
1934 #:phases
1935 #~(modify-phases %standard-phases
1936 (add-after 'unpack 'remove-scripts
1937 ;; Remove bat / cmd scripts for DOS as well as the antRun and runant
1938 ;; wrappers.
1939 (lambda _
1940 (for-each delete-file
1941 (find-files "src/script"
1942 "(.*\\.(bat|cmd)|runant.*|antRun.*)"))))
1943 (delete 'bootstrap)
1944 (delete 'configure)
1945 (replace 'build
1946 (lambda* (#:key inputs #:allow-other-keys)
1947 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
1948
1949 ;; Disable tests to avoid dependency on hamcrest-core, which needs
1950 ;; Ant to build. This is necessary in addition to disabling the
1951 ;; "check" phase, because the dependency on "test-jar" would always
1952 ;; result in the tests to be run.
1953 (substitute* "build.xml"
1954 (("depends=\"jars,test-jar") "depends=\"jars"))
1955 (invoke "bash" "bootstrap.sh"
1956 (string-append "-Ddist.dir=" #$output))))
1957 (add-after 'build 'strip-jar-timestamps ;based on ant-build-system
1958 (lambda _
1959 (define (repack-archive jar)
1960 (let* ((dir (mkdtemp "jar-contents.XXXXXX"))
1961 (manifest (string-append dir "/META-INF/MANIFESTS.MF")))
1962 (with-directory-excursion dir
1963 (invoke "unzip" jar))
1964 (delete-file jar)
1965 ;; XXX: copied from (gnu build install)
1966 (for-each (lambda (file)
1967 (let ((s (lstat file)))
1968 (unless (eq? (stat:type s) 'symlink)
1969 (utime file 0 0 0 0))))
1970 (find-files dir #:directories? #t))
1971 ;; It is important that the manifest appears first.
1972 (with-directory-excursion dir
1973 (let* ((files (find-files "." ".*" #:directories? #t))
1974 ;; To ensure that the reference scanner can
1975 ;; detect all store references in the jars
1976 ;; we disable compression with the "-0" option.
1977 (command (if (file-exists? manifest)
1978 `("zip" "-0" "-X" ,jar ,manifest
1979 ,@files)
1980 `("zip" "-0" "-X" ,jar ,@files))))
1981 (apply invoke command)))))
1982 (for-each repack-archive
1983 (find-files
1984 (string-append #$output "/lib")
1985 "\\.jar$"))))
1986 (delete 'install))))
1987 (native-inputs
1988 `(("jdk" ,icedtea-8 "jdk")
1989 ("zip" ,zip)
1990 ("unzip" ,unzip)))
1991 (home-page "https://ant.apache.org")
1992 (synopsis "Build tool for Java")
1993 (description
1994 "Ant is a platform-independent build tool for Java. It is similar to
1995make but is implemented using the Java language, requires the Java platform,
1996and is best suited to building Java projects. Ant uses XML to describe the
1997build process and its dependencies, whereas Make uses Makefile format.")
1998 (license license:asl2.0)))
1999
2000;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x series
2001;; requires Java 8.
2002(define-public ant
2003 (package (inherit ant/java8)
2004 (version "1.9.15")
2005 (source (origin
2006 (method url-fetch)
2007 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2008 version "-src.tar.gz"))
2009 (sha256
2010 (base32
2011 "1xy30f1w5gaqk6g3f0vw7ygix4rb6032qkcw42y4z8wd9jihgygd"))))
2012 ;; XXX: we do this to avoid a rebuild. This mess will be cleaned up
2013 ;; later.
2014 (arguments
2015 (substitute-keyword-arguments
2016 `(#:modules ((srfi srfi-1)
2017 (guix build gnu-build-system)
2018 (guix build utils))
2019 #:tests? #f ; no "check" target
2020 #:phases
2021 (modify-phases %standard-phases
2022 (delete 'bootstrap)
2023 (delete 'configure)
2024 (add-before 'build 'define-java-environment-variables
2025 (lambda* (#:key inputs #:allow-other-keys)
2026 ;; First, set environment variables (eases debugging on -K).
2027 (setenv "JAVA_HOME" (assoc-ref inputs "jamvm"))
2028 (setenv "JAVACMD" (search-input-file inputs "/bin/jamvm"))
2029 (setenv "JAVAC" (search-input-file inputs "/bin/jikes"))
2030 (setenv "CLASSPATH" (search-input-file inputs "/lib/rt.jar"))))
2031 (replace 'build
2032 (lambda* (#:key inputs outputs #:allow-other-keys)
2033 ;; Ant complains if this file doesn't exist.
2034 (setenv "HOME" "/tmp")
2035 (with-output-to-file "/tmp/.ant.properties"
2036 (lambda _ (display "")))
2037
2038 ;; Use jikes instead of javac for <javac ...> tags in build.xml
2039 (setenv "ANT_OPTS" "-Dbuild.compiler=jikes")
2040
2041 ;; jikes produces lots of warnings, but they are not very
2042 ;; interesting, so we silence them.
2043 (setenv "$BOOTJAVAC_OPTS" "-nowarn")
2044
2045 ;; Without these JamVM options the build may freeze.
2046 (substitute* "bootstrap.sh"
2047 (("^\"\\$\\{JAVACMD\\}\" " m)
2048 ,@(if (string-prefix? "armhf" (or (%current-system)
2049 (%current-target-system)))
2050 `((string-append m "-Xnocompact "))
2051 `((string-append m "-Xnocompact -Xnoinlining ")))))
2052
2053 ;; Disable tests because we are bootstrapping and thus don't have
2054 ;; any of the dependencies required to build and run the tests.
2055 (substitute* "build.xml"
2056 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
2057 (invoke "bash" "bootstrap.sh"
2058 (string-append "-Ddist.dir="
2059 (assoc-ref outputs "out")))))
2060 (add-after 'build 'strip-jar-timestamps ;based on ant-build-system
2061 (lambda* (#:key outputs #:allow-other-keys)
2062 (define (repack-archive jar)
2063 (let* ((dir (mkdtemp "jar-contents.XXXXXX"))
2064 (manifest (string-append dir "/META-INF/MANIFESTS.MF")))
2065 (with-directory-excursion dir
2066 (invoke "unzip" jar))
2067 (delete-file jar)
2068 ;; XXX: copied from (gnu build install)
2069 (for-each (lambda (file)
2070 (let ((s (lstat file)))
2071 (unless (eq? (stat:type s) 'symlink)
2072 (utime file 0 0 0 0))))
2073 (find-files dir #:directories? #t))
2074 ;; It is important that the manifest appears first.
2075 (with-directory-excursion dir
2076 (let* ((files (find-files "." ".*" #:directories? #t))
2077 ;; To ensure that the reference scanner can
2078 ;; detect all store references in the jars
2079 ;; we disable compression with the "-0" option.
2080 (command (if (file-exists? manifest)
2081 `("zip" "-0" "-X" ,jar ,manifest
2082 ,@files)
2083 `("zip" "-0" "-X" ,jar ,@files))))
2084 (apply invoke command)))))
2085 (for-each repack-archive
2086 (find-files
2087 (string-append (assoc-ref %outputs "out") "/lib")
2088 "\\.jar$"))))
2089 (delete 'install)))
2090 ((#:phases phases)
2091 `(modify-phases ,phases
2092 (delete 'define-java-environment-variables)
2093 (add-after 'unpack 'remove-scripts
2094 ;; Remove bat / cmd scripts for DOS as well as the antRun and runant
2095 ;; wrappers.
2096 (lambda _
2097 (for-each delete-file
2098 (find-files "src/script"
2099 "(.*\\.(bat|cmd)|runant.*|antRun.*)"))
2100 #t))
2101 (replace 'build
2102 (lambda* (#:key inputs outputs #:allow-other-keys)
2103 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
2104
2105 ;; Disable tests to avoid dependency on hamcrest-core, which needs
2106 ;; Ant to build. This is necessary in addition to disabling the
2107 ;; "check" phase, because the dependency on "test-jar" would always
2108 ;; result in the tests to be run.
2109 (substitute* "build.xml"
2110 (("depends=\"jars,test-jar") "depends=\"jars"))
2111 (invoke "bash" "bootstrap.sh"
2112 (string-append "-Ddist.dir="
2113 (assoc-ref outputs "out")))))))))
2114 (native-inputs
2115 `(("jdk" ,icedtea-7 "jdk")
2116 ("zip" ,zip)
2117 ("unzip" ,unzip)))))
2118
2119(define-public ant-apache-bcel
2120 (package
2121 (inherit ant/java8)
2122 (name "ant-apache-bcel")
2123 (arguments
2124 (substitute-keyword-arguments (package-arguments ant/java8)
2125 ((#:phases phases)
2126 #~(modify-phases #$phases
2127 (add-after 'unpack 'link-bcel
2128 (lambda* (#:key inputs #:allow-other-keys)
2129 (for-each (lambda (file)
2130 (symlink file
2131 (string-append "lib/optional/"
2132 (basename file))))
2133 (find-files (assoc-ref inputs "java-commons-bcel")
2134 "\\.jar$"))))
2135 (add-after 'build 'install
2136 (lambda _
2137 (let ((share (string-append #$output "/share/java"))
2138 (bin (string-append #$output "/bin"))
2139 (lib (string-append #$output "/lib")))
2140 (mkdir-p share)
2141 (install-file (string-append lib "/ant-apache-bcel.jar") share)
2142 (delete-file-recursively bin)
2143 (delete-file-recursively lib))))))))
2144 (inputs
2145 (modify-inputs (package-inputs ant/java8)
2146 (prepend java-commons-bcel)))))
2147
2148(define-public ant-junit
2149 (package
2150 (inherit ant/java8)
2151 (name "ant-junit")
2152 (arguments
2153 (substitute-keyword-arguments (package-arguments ant/java8)
2154 ((#:phases phases)
2155 #~(modify-phases #$phases
2156 (add-after 'unpack 'link-junit
2157 (lambda* (#:key inputs #:allow-other-keys)
2158 (for-each (lambda (file)
2159 (symlink file
2160 (string-append "lib/optional/"
2161 (basename file))))
2162 (find-files (assoc-ref inputs "java-junit")
2163 "\\.jar$"))))
2164 (add-after 'build 'install
2165 (lambda _
2166 (let ((share (string-append #$output "/share/java"))
2167 (bin (string-append #$output "/bin"))
2168 (lib (string-append #$output "/lib")))
2169 (mkdir-p share)
2170 (install-file (string-append lib "/ant-junit.jar") share)
2171 (delete-file-recursively bin)
2172 (delete-file-recursively lib))))))))
2173 (inputs
2174 (modify-inputs (package-inputs ant/java8)
2175 (prepend java-junit)))))
2176
2177(define-public libantlr3c
2178 (package
2179 (name "libantlr3c")
2180 (version "3.4")
2181 (source
2182 (origin
2183 (method url-fetch)
2184 (uri
2185 (string-append "https://www.antlr3.org/download/C/"
2186 name "-" version ".tar.gz"))
2187 (sha256
2188 (base32 "0lpbnb4dq4azmsvlhp6khq1gy42kyqyjv8gww74g5lm2y6blm4fa"))))
2189 (build-system gnu-build-system)
2190 (arguments
2191 (list #:configure-flags
2192 #~(list "--enable-debuginfo"
2193 "--disable-static"
2194 #$@(if (target-64bit?)
2195 #~("--enable-64bit")
2196 #~())
2197 #$@(if (target-riscv64?)
2198 #~("--disable-abiflags")
2199 #~()))))
2200 (synopsis "ANTLR C Library")
2201 (description "LIBANTLR3C provides run-time C libraries for ANTLR3 (ANother
2202Tool for Language Recognition v3).")
2203 (home-page "https://www.antlr3.org/")
2204 (license license:bsd-3)))
2205
2206(define-public drip
2207 ;; Last release is from 2014, with a few important commits afterwards.
2208 (let ((commit "a4bd00df0199e78243847f06cc04ecaea31f8f08"))
2209 (package
2210 (name "drip")
2211 (version (git-version "0.2.4" "1" commit))
2212 (source (origin
2213 (method git-fetch)
2214 (uri (git-reference
2215 (url "https://github.com/ninjudd/drip")
2216 (commit commit)))
2217 (file-name (git-file-name name version))
2218 (sha256
2219 (base32
2220 "0wzmjwfyldr3jn49517xd8yn7dgdk8h88qkga3kjyg1zc375ylg2"))))
2221 (build-system gnu-build-system)
2222 (native-inputs
2223 `(("jdk" ,icedtea "jdk")))
2224 (arguments
2225 `(#:tests? #f ; No tests.
2226 #:phases
2227 (modify-phases %standard-phases
2228 (delete 'configure)
2229 (add-before 'install 'fix-wrapper
2230 (lambda* (#:key inputs #:allow-other-keys)
2231 (let ((jps (search-input-file inputs "/bin/jps")))
2232 (substitute* "bin/drip"
2233 (("jps") jps)
2234 (("brew update && brew upgrade drip") "guix pull && guix install drip")
2235 ;; No need to make:
2236 (("\\(cd -- \"\\$drip_dir\" && make -s\\) \\|\\| exit 1") "")
2237 ;; No need to include source:
2238 (("\\[\\[ -r \\$drip_dir/src/org/flatland/drip/Main\\.java \\]\\]")
2239 "true"))
2240 #t)))
2241 (replace 'install
2242 (lambda* (#:key outputs #:allow-other-keys)
2243 (let* ((out (assoc-ref outputs "out"))
2244 (bin (string-append out "/bin"))
2245 (share (string-append out "/share/drip")))
2246 (mkdir-p bin)
2247 (for-each
2248 (lambda (file)
2249 (install-file (string-append "bin/" file) bin))
2250 '("drip" "drip_daemon" "drip_proxy"))
2251 (install-file "drip.jar" share)
2252 (substitute* (string-append bin "/drip")
2253 (("drip_dir=\\$bin_dir/..")
2254 (string-append "drip_dir=" share)))
2255 #t))))))
2256 (home-page "https://github.com/ninjudd/drip")
2257 (synopsis "Faster Java Virtual Machine launching")
2258 (description "Drip is a launcher for the Java Virtual Machine that
2259provides much faster startup times than the @command{java} command. The @command{drip}
2260script is intended to be a drop-in replacement for the @command{java} command,
2261only faster.")
2262 (license license:epl1.0))))
2263
2264(define-public java-openjfx-build
2265 (package
2266 (name "java-openjfx-build")
2267 ;; This is a java-8 version
2268 (version "8.202")
2269 (source (origin
2270 (method hg-fetch)
2271 (uri (hg-reference
2272 (url "http://hg.openjdk.java.net/openjfx/8u-dev/rt")
2273 (changeset (string-append
2274 (string-join (string-split version #\.) "u")
2275 "-ga"))))
2276 (file-name (string-append name "-" version "-checkout"))
2277 (modules '((guix build utils)))
2278 (snippet
2279 '(begin
2280 ;; Delete included gradle jar
2281 (delete-file-recursively "gradle/wrapper")
2282 #t))
2283 (sha256
2284 (base32
2285 "0yg38mwpivswccv9n96k06x3iv82i4px1a9xg9l8dswzwmfj259f"))
2286 (patches (search-patches "java-openjfx-build-jdk_version.patch"))))
2287 (build-system ant-build-system)
2288 (arguments
2289 `(#:jar-name "java-openjfx.jar"
2290 #:source-dir "buildSrc/src/main/java"
2291 #:test-dir "buildSrc/src/test"
2292 #:phases
2293 (modify-phases %standard-phases
2294 (add-before 'configure 'generate-jsl-parser
2295 (lambda _
2296 (invoke "antlr3" "-o"
2297 "buildSrc/src/main/java/com/sun/scenario/effect/compiler"
2298 "buildSrc/src/main/antlr/JSL.g"))))))
2299 (inputs
2300 (list antlr3 java-stringtemplate))
2301 (native-inputs
2302 (list java-junit java-hamcrest-core))
2303 (home-page "https://openjfx.io")
2304 (synopsis "Graphical application toolkit in Java")
2305 (description "OpenJFX is a client application platform for desktop,
2306mobile and embedded systems built on Java. Its goal is to produce a
2307modern, efficient, and fully featured toolkit for developing rich client
2308applications. This package contains base classes for the OpenJFX
2309distribution and helper classes for building other parts of the
2310distribution.")
2311 (license license:gpl2))) ;gpl2 only, with classpath exception
2312
2313(define-public java-openjfx-base
2314 (package (inherit java-openjfx-build)
2315 (name "java-openjfx-base")
2316 (arguments
2317 `(#:jar-name "java-openjfx-base.jar"
2318 #:source-dir "modules/base/src/main/java:modules/base/src/main/java8:modules/base/src/main/version-info"
2319 #:test-dir "modules/base/src/test"
2320 #:phases
2321 (modify-phases %standard-phases
2322 (add-before 'check 'remove-empty-file
2323 (lambda _
2324 (with-directory-excursion "modules/base/src/test/java"
2325 ;; These files are completely commented, but junit expects them to
2326 ;; contain a class, so tests fail.
2327 (delete-file
2328 "com/sun/javafx/property/adapter/PropertyDescriptorTest.java")
2329 (delete-file
2330 "com/sun/javafx/property/adapter/ReadOnlyPropertyDescriptorTest.java")
2331 (delete-file "javafx/beans/property/PropertiesTest.java")
2332 (delete-file
2333 "javafx/beans/property/adapter/ReadOnlyJavaBeanPropertyBuilder_General_Test.java")
2334 ;; This one fails
2335 (delete-file "com/sun/javafx/runtime/VersionInfoTest.java"))
2336 #t)))))
2337 (propagated-inputs
2338 (list java-openjfx-build))
2339 (description "OpenJFX is a client application platform for desktop,
2340mobile and embedded systems built on Java. Its goal is to produce a
2341modern, efficient, and fully featured toolkit for developing rich client
2342applications. This package contains base classes for the OpenJFX
2343distribution.")))
2344
2345(define-public java-openjfx-graphics
2346 (package (inherit java-openjfx-build)
2347 (name "java-openjfx-graphics")
2348 (arguments
2349 `(#:jar-name "java-openjfx-graphics.jar"
2350 #:source-dir "modules/graphics/src/main/java"
2351 #:tests? #f; require X
2352 #:test-dir "modules/graphics/src/test"
2353 #:phases
2354 (modify-phases %standard-phases
2355 (add-after 'unpack 'copy-missing-file
2356 (lambda* (#:key inputs #:allow-other-keys)
2357 (let ((target "modules/graphics/src/main/native-prism-sw/JNativeSurface.c"))
2358 (copy-file (assoc-ref inputs "JNativeSurface.c") target)
2359 ;; XXX: looks like the missing file we found isn't *quite*
2360 ;; compatible...
2361 (substitute* target
2362 (("case TYPE_INT_ARGB:") "")))))
2363 (add-after 'build 'build-native
2364 (lambda* (#:key inputs outputs #:allow-other-keys)
2365 (let ((jdk (assoc-ref inputs "jdk"))
2366 (class-file->class-name
2367 (lambda (class-file)
2368 (string-map (lambda (c)
2369 (if (char=? c #\/) #\. c))
2370 (string-drop-right class-file
2371 (string-length ".class"))))))
2372 (setenv "CPPFLAGS"
2373 (string-append "-DINLINE=inline "
2374 "-DLINUX "
2375 "-I" jdk "/include "
2376 "-I" jdk "/include/linux "
2377 "-I " (getcwd) "/build/classes/include "
2378 "-I " (getcwd) "/modules/graphics/src/main/native-prism-sw"))
2379
2380 ;; Instructions have been adapted from buildSrc/linux.gradle
2381 (with-directory-excursion "build/classes"
2382 ;; Build prism
2383 (mkdir-p "include")
2384
2385 ;; Generate headers for prism
2386 (apply invoke "javah" "-d" "include" "-cp" "."
2387 (map class-file->class-name
2388 (append (find-files "com/sun/prism/impl" "\\.class$")
2389 (find-files "com/sun/prism" "PresentableState.*\\.class$"))))
2390
2391 ;; ...then for prism_sw
2392 (apply invoke "javah" "-d" "include" "-cp" "."
2393 (map class-file->class-name
2394 (find-files "com/sun/pisces" "\\.class$")))
2395
2396 ;; ...and for prism_es2
2397 (apply invoke "javah" "-d" "include" "-cp" "."
2398 (map class-file->class-name
2399 (find-files "com/sun/prism/es2" "\\.class$")))))
2400
2401 (with-directory-excursion "netbeans/native-prism"
2402 (invoke "make" "CONF=Release"))
2403 (with-directory-excursion "netbeans/native-prism-sw"
2404 (invoke "make" "CONF=Release"))
2405 ;; TODO: This fails due to unknown EGL procedure names
2406 #;
2407 (with-directory-excursion "netbeans/native-prism-es2"
2408 (invoke "make" "CONF=Release"))
2409
2410 (let* ((out (assoc-ref outputs "out"))
2411 (dir ,(match (%current-system)
2412 ("i686-linux"
2413 "i386")
2414 ((or "armhf-linux" "aarch64-linux")
2415 "arm")
2416 ((or "x86_64-linux")
2417 "amd64")
2418 (_ "unknown")))
2419 (target (string-append out "/share/" dir "/")))
2420 (mkdir-p target)
2421 (for-each (lambda (file)
2422 (let ((new-name
2423 (string-append "lib"
2424 (string-map
2425 (lambda (c)
2426 (if (char=? c #\-) #\_ c))
2427 (string-drop (basename file)
2428 (string-length "libnative-"))))))
2429 (copy-file file
2430 (string-append target new-name))))
2431 (find-files "netbeans" "\\.so$"))))))))
2432 (propagated-inputs
2433 (list java-openjfx-base))
2434 (inputs
2435 (list java-swt))
2436 ;; XXX: for unknown reasons
2437 ;; modules/graphics/src/main/native-prism-sw/JNativeSurface.c is missing
2438 ;; in this revision.
2439 (native-inputs
2440 `(("JNativeSurface.c"
2441 ,(origin
2442 (method url-fetch)
2443 (uri "https://raw.githubusercontent.com/openjdk/jfx/8u20-b02\
2444/modules/graphics/src/main/native-prism-sw/JNativeSurface.c")
2445 (sha256
2446 (base32
2447 "1kp15wbnd6rn0nciczp5ibq0ikby2yysvx1gnz5fa05vl2mm8mbm"))))))
2448 (description "OpenJFX is a client application platform for desktop,
2449mobile and embedded systems built on Java. Its goal is to produce a
2450modern, efficient, and fully featured toolkit for developing rich client
2451applications. This package contains graphics-related classes for the
2452OpenJFX distribution.")))
2453
2454(define-public java-openjfx-media
2455 (package (inherit java-openjfx-build)
2456 (name "java-openjfx-media")
2457 (propagated-inputs
2458 `(("java-openjxf-graphics" ,java-openjfx-graphics)))
2459 (arguments
2460 `(#:jar-name "java-openjfx-media.jar"
2461 #:source-dir "modules/media/src/main/java"
2462 #:tests? #f)); no tests
2463 (description "OpenJFX is a client application platform for desktop,
2464mobile and embedded systems built on Java. Its goal is to produce a
2465modern, efficient, and fully featured toolkit for developing rich client
2466applications. This package contains media-related classes for the
2467OpenJFX distribution.")))
2468
2469(define-public java-openjfx-controls
2470 (package (inherit java-openjfx-build)
2471 (name "java-openjfx-controls")
2472 (propagated-inputs
2473 `(("java-openjxf-graphics" ,java-openjfx-graphics)))
2474 (arguments
2475 `(#:jar-name "java-openjfx-controls.jar"
2476 #:source-dir "modules/controls/src/main/java"
2477 #:test-dir "modules/controls/src/test"
2478 ;; TODO: tests require com.sun.javafx.pgstub,
2479 ;; javafx.collections.MockSetObserver, and
2480 ;; com.sun.javafx.binding.ExpressionHelperUtility
2481 #:tests? #false
2482 #:phases
2483 (modify-phases %standard-phases
2484 (add-after 'unpack 'copy-resources
2485 (lambda _
2486 (copy-recursively "modules/controls/src/test/resources"
2487 "build/test-classes")
2488 (copy-recursively "modules/controls/src/main/resources"
2489 "build/classes"))))))
2490 (description "OpenJFX is a client application platform for desktop,
2491mobile and embedded systems built on Java. Its goal is to produce a
2492modern, efficient, and fully featured toolkit for developing rich client
2493applications. This package contains UI control classes for the
2494OpenJFX distribution.")))
2495
2496(define-public javacc-4
2497 (package
2498 (name "javacc")
2499 (version "4.1")
2500 (source (origin
2501 (method git-fetch)
2502 (uri (git-reference
2503 (url "https://github.com/javacc/javacc")
2504 (commit "release_41")))
2505 (file-name (string-append "javacc-" version "-checkout"))
2506 (sha256
2507 (base32
2508 "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0"))
2509 (modules '((guix build utils)))
2510 ;; delete bundled jars
2511 (snippet '(begin (delete-file-recursively "lib") #t))))
2512 (build-system ant-build-system)
2513 ;; Tests fail with
2514 ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60:
2515 ;; JAVACODE failed
2516 (arguments
2517 `(#:tests? #f
2518 #:phases
2519 (modify-phases %standard-phases
2520 ;; Delete tests to avoid build failure (we don't run them anyway).
2521 (add-after 'unpack 'delete-tests
2522 (lambda _
2523 (for-each delete-file
2524 '("src/org/javacc/JavaCCTestCase.java"
2525 "src/org/javacc/parser/ExpansionTest.java"
2526 "src/org/javacc/parser/OptionsTest.java"
2527 "src/org/javacc/jjtree/JJTreeOptionsTest.java"))
2528 (for-each delete-file-recursively
2529 '("src/org/javacc/parser/test"
2530 "src/org/javacc/jjdoc/test"))
2531 #t))
2532 (replace 'install (install-jars "bin/lib")))))
2533 (home-page "https://javacc.org/")
2534 (synopsis "Java parser generator")
2535 (description "Java Compiler Compiler (JavaCC) is the most popular parser
2536generator for use with Java applications. A parser generator is a tool that
2537reads a grammar specification and converts it to a Java program that can
2538recognize matches to the grammar. In addition to the parser generator itself,
2539JavaCC provides other standard capabilities related to parser generation such
2540as tree building (via a tool called JJTree included with JavaCC), actions,
2541debugging, etc.")
2542 (license license:bsd-3)))
2543
2544;; javacc-3, as javacc-4 is not properly bootstrapped: is contains a javacc.jar
2545;; in the bootstrap/ directory.
2546(define-public javacc-3
2547 (package
2548 (inherit javacc-4)
2549 (version "3.2")
2550 (source (origin
2551 (method git-fetch)
2552 (uri (git-reference
2553 (url "https://github.com/javacc/javacc")
2554 (commit "release_32")))
2555 (file-name (string-append "javacc-" version "-checkout"))
2556 (sha256
2557 (base32
2558 "1pyf1xyh8gk83nxqn2v2mdws32l68ydznha41cxa4l2kkbq1v1g3"))))
2559 (arguments
2560 `(#:tests? #f
2561 #:phases
2562 (modify-phases %standard-phases
2563 (add-before 'build 'set-java-version
2564 (lambda _
2565 (for-each
2566 (lambda (file)
2567 (substitute* file
2568 (("debug=") "source=\"1.4\" debug=")))
2569 (find-files "." "build.xml"))
2570 #t))
2571 (replace 'install (install-jars "bin/lib")))))))
2572
2573(define-public javacc
2574 (package
2575 (inherit javacc-4)
2576 (version "7.0.4")
2577 (source
2578 (origin
2579 (method git-fetch)
2580 (uri (git-reference
2581 (url "https://github.com/javacc/javacc")
2582 (commit version)))
2583 (file-name (git-file-name "javacc" version))
2584 (sha256
2585 (base32 "18kkak3gda93gr25jrgy6q00g0jr8i24ri2wk4kybz1v234fxx9i"))
2586 (modules '((guix build utils)))
2587 ;; Delete bundled jars.
2588 (snippet '(begin (for-each delete-file-recursively
2589 '("bootstrap" "lib"))))))
2590 (arguments
2591 `(#:make-flags ; bootstrap from javacc-4
2592 ,#~(list (string-append "-Dbootstrap-jar="
2593 #$(this-package-native-input "javacc")
2594 "/share/java/javacc.jar"))
2595 #:test-target "test"
2596 #:phases
2597 (modify-phases %standard-phases
2598 (replace 'install (install-jars "target"))
2599 (add-after 'install 'install-bin
2600 (lambda* (#:key outputs inputs #:allow-other-keys)
2601 (let* ((out (assoc-ref outputs "out"))
2602 (dir (string-append out "/share/java"))
2603 (bin (string-append out "/bin"))
2604 (javacc (string-append bin "/javacc")))
2605 (mkdir-p bin)
2606 (with-output-to-file javacc
2607 (lambda _
2608 (display
2609 (string-append "#!/bin/sh\n"
2610 (assoc-ref inputs "icedtea") "/bin/java"
2611 " -cp " dir "/javacc.jar" " `basename $0`" " $*"))))
2612 (chmod javacc #o755)
2613 ;; symlink to different names to affect the first argument and
2614 ;; change the behavior of the jar file.
2615 (symlink javacc (string-append bin "/jjdoc"))
2616 (symlink javacc (string-append bin "/jjtree"))))))))
2617 (native-inputs
2618 (list javacc-4))
2619 (inputs (list icedtea-8))))
2620
2621(define-public java-ecj
2622 (package
2623 (name "java-ecj")
2624 (version "4.6.3")
2625 (source
2626 (origin
2627 (method url-fetch)
2628 (uri (string-append "http://archive.eclipse.org/eclipse/"
2629 "downloads/drops4/R-" version "-201703010400/"
2630 "ecjsrc-" version ".jar"))
2631 (sha256
2632 (base32
2633 "11cfgsdgznja1pvlxkjbqykxd7pcd5655vkm7s44xmahmap15gpl"))))
2634 (build-system ant-build-system)
2635 (arguments
2636 `(#:tests? #f ; none included
2637 #:build-target "build"
2638 #:phases
2639 (modify-phases %standard-phases
2640 (add-after 'unpack 'fix-build.xml
2641 (lambda _
2642 (substitute* "src/build.xml"
2643 (("^.*MANIFEST.*$")
2644 "")
2645 (("^.*properties.*$")
2646 "<include name=\"**/*.properties\"/>
2647 <include name=\"**/*.props\"/>"))))
2648 (add-before 'build 'chdir
2649 (lambda _ (chdir "src")))
2650 (replace 'install (install-jars ".")))))
2651 (home-page "https://eclipse.org")
2652 (synopsis "Eclipse Java development tools core batch compiler")
2653 (description "This package provides the Eclipse Java core batch compiler.")
2654 (license license:epl1.0)))
2655
2656(define-public java-cisd-base
2657 (let ((revision 38938)
2658 (base-version "14.12.0"))
2659 (package
2660 (name "java-cisd-base")
2661 (version (string-append base-version "-" (number->string revision)))
2662 (source (origin
2663 (method svn-fetch)
2664 (uri (svn-reference
2665 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2666 "base/tags/release/"
2667 (version-major+minor base-version)
2668 ".x/" base-version "/base/"))
2669 (revision revision)))
2670 (file-name (string-append "java-cisd-base-" version "-checkout"))
2671 (sha256
2672 (base32
2673 "1i5adyf7nzclb0wydgwa1az04qliid8035vpahaandmkmigbnxiy"))
2674 (modules '((guix build utils)))
2675 (snippet
2676 '(begin
2677 ;; Delete included gradle jar
2678 (delete-file-recursively "gradle/wrapper")
2679 ;; Delete pre-built native libraries
2680 (delete-file-recursively "libs")
2681 #t))))
2682 (build-system ant-build-system)
2683 (arguments
2684 `(#:make-flags '("-file" "build/build.xml")
2685 #:test-target "jar-test"
2686 #:jdk ,icedtea-8
2687 #:phases
2688 (modify-phases %standard-phases
2689 (add-after 'unpack 'unpack-build-resources
2690 (lambda* (#:key inputs #:allow-other-keys)
2691 (copy-recursively (assoc-ref inputs "build-resources")
2692 "../build_resources")
2693 #t))
2694 (add-after 'unpack-build-resources 'fix-dependencies
2695 (lambda* (#:key inputs #:allow-other-keys)
2696 (substitute* "build/build.xml"
2697 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2698 (search-input-file inputs
2699 "/share/java/java-testng.jar"))
2700 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2701 (search-input-file inputs
2702 (string-append
2703 "/share/java/commons-lang-"
2704 ,(package-version java-commons-lang)
2705 ".jar")))
2706 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2707 (search-input-file inputs
2708 (string-append
2709 "/lib/m2/commons-io/commons-io/"
2710 ,(package-version java-commons-io)
2711 "/commons-io-"
2712 ,(package-version java-commons-io)
2713 ".jar")))
2714 ;; Remove dependency on svn
2715 (("<build-info.*") "")
2716 (("\\$\\{revision.number\\}")
2717 ,(number->string revision))
2718 (("\\$\\{version.number\\}") ,base-version))
2719 ;; Remove dependency on classycle
2720 (substitute* "../build_resources/ant/build-common.xml"
2721 (("<taskdef name=\"dependency-checker.*") "")
2722 (("classname=\"classycle.*") "")
2723 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2724 #t))
2725 ;; A few tests fail because of the lack of a proper /etc/groups and
2726 ;; /etc/passwd file in the build container.
2727 (add-after 'unpack 'disable-broken-tests
2728 (lambda _
2729 (substitute* "sourceTest/java/ch/systemsx/cisd/base/AllTests.java"
2730 (("Unix.isOperational\\(\\)") "false"))
2731 #t))
2732 ;; These decorators are almost useless and pull in an unpackaged
2733 ;; dependency.
2734 (add-after 'unpack 'remove-useless-decorators
2735 (lambda _
2736 (substitute* "source/java/ch/systemsx/cisd/base/unix/Unix.java"
2737 (("@Private") "")
2738 (("import ch.rinn.restrictions.Private;") ""))
2739 (substitute* "sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java"
2740 (("@Friend.*") "")
2741 (("import ch.rinn.restrictions.Friend;") ""))
2742 #t))
2743 (add-before 'configure 'build-native-code
2744 (lambda* (#:key inputs #:allow-other-keys)
2745 (let ((jdk (assoc-ref inputs "jdk"))
2746 (dir ,(match (%current-system)
2747 ("i686-linux"
2748 "i386-Linux")
2749 ((or "armhf-linux" "aarch64-linux")
2750 "arm-Linux")
2751 ((or "x86_64-linux")
2752 "amd64-Linux")
2753 (_ "unknown-Linux"))))
2754 (with-directory-excursion "source/c"
2755 (invoke "gcc" "-shared" "-O3" "-fPIC" "unix.c"
2756 (string-append "-I" jdk "/include")
2757 (string-append "-I" jdk "/include/linux")
2758 "-o" "libunix.so")
2759 (invoke "gcc" "-shared" "-O3" "-fPIC"
2760 "-DMACHINE_BYTE_ORDER=1"
2761 "copyCommon.c"
2762 "copyByteChar.c"
2763 "copyByteDouble.c"
2764 "copyByteFloat.c"
2765 "copyByteInt.c"
2766 "copyByteLong.c"
2767 "copyByteShort.c"
2768 (string-append "-I" jdk "/include")
2769 (string-append "-I" jdk "/include/linux")
2770 "-o" "libnativedata.so"))
2771 (install-file "source/c/libunix.so"
2772 (string-append "libs/native/unix/" dir))
2773 (install-file "source/c/libnativedata.so"
2774 (string-append "libs/native/nativedata/" dir))
2775 #t)))
2776 ;; In the "check" phase we only build the test executable.
2777 (add-after 'check 'run-tests
2778 (lambda _
2779 (invoke "java" "-jar" "targets/dist/sis-base-test.jar")
2780 (delete-file "targets/dist/sis-base-test.jar")
2781 #t))
2782 (replace 'install (install-jars "targets/dist")))))
2783 (native-inputs
2784 `(("jdk" ,icedtea-8)
2785 ("java-commons-lang" ,java-commons-lang)
2786 ("java-commons-io" ,java-commons-io)
2787 ("java-testng" ,java-testng)
2788 ("build-resources"
2789 ,(origin
2790 (method svn-fetch)
2791 (uri (svn-reference
2792 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2793 "base/tags/release/"
2794 (version-major+minor base-version)
2795 ".x/" base-version
2796 "/build_resources/"))
2797 (revision revision)))
2798 (sha256
2799 (base32
2800 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
2801 (home-page "https://svnsis.ethz.ch")
2802 (synopsis "Utility classes for libraries from ETH Zurich")
2803 (description "This library supplies some utility classes needed for
2804libraries from the SIS division at ETH Zurich like jHDF5.")
2805 ;; The C sources are under a non-copyleft license, which looks like a
2806 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
2807 (license (list license:asl2.0
2808 (license:non-copyleft "file://source/c/COPYING"))))))
2809
2810(define-public java-cisd-args4j
2811 (let ((revision 39162)
2812 (base-version "9.11.2"))
2813 (package
2814 (name "java-cisd-args4j")
2815 (version (string-append base-version "-" (number->string revision)))
2816 (source (origin
2817 (method svn-fetch)
2818 (uri (svn-reference
2819 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2820 "args4j/tags/release/"
2821 (version-major+minor base-version)
2822 ".x/" base-version "/args4j/"))
2823 (revision revision)))
2824 (file-name (string-append "java-cisd-args4j-" version "-checkout"))
2825 (sha256
2826 (base32
2827 "0hhqznjaivq7ips7mkwas78z42s6djsm20rrs7g1zd59rcsakxn2"))))
2828 (build-system ant-build-system)
2829 (arguments
2830 `(#:make-flags '("-file" "build/build.xml")
2831 #:tests? #f ; there are no tests
2832 #:modules ((guix build ant-build-system)
2833 (guix build utils)
2834 (guix build java-utils)
2835 (sxml simple)
2836 (sxml transform)
2837 (sxml xpath))
2838 #:phases
2839 (modify-phases %standard-phases
2840 (add-after 'unpack 'unpack-build-resources
2841 (lambda* (#:key inputs #:allow-other-keys)
2842 (mkdir-p "../build_resources")
2843 (copy-recursively (assoc-ref inputs "build-resources")
2844 "../build_resources")
2845 (mkdir-p "../build_resources/lib")))
2846 (add-after 'unpack-build-resources 'fix-dependencies
2847 (lambda* (#:key inputs #:allow-other-keys)
2848 ;; FIXME: There should be a more convenient abstraction for
2849 ;; editing XML files.
2850 (with-directory-excursion "../build_resources/ant/"
2851 (chmod "build-common.xml" #o664)
2852 (call-with-output-file "build-common.xml.new"
2853 (lambda (port)
2854 (sxml->xml
2855 (pre-post-order
2856 (with-input-from-file "build-common.xml"
2857 (lambda _ (xml->sxml #:trim-whitespace? #t)))
2858 `(;; Remove dependency on classycle and custom ant tasks
2859 (taskdef . ,(lambda (tag . kids)
2860 (let ((name ((sxpath '(name *text*)) kids)))
2861 (if (or (member "build-info" name)
2862 (member "dependency-checker" name)
2863 (member "build-java-subprojects" name)
2864 (member "project-classpath" name))
2865 '() ; skip
2866 `(,tag ,@kids)))))
2867 (typedef . ,(lambda (tag . kids)
2868 (let ((name ((sxpath '(name *text*)) kids)))
2869 (if (member "recursive-jar" name)
2870 '() ; skip
2871 `(,tag ,@kids)))))
2872 (build-java-subprojects . ,(lambda _ '()))
2873 ;; Ignore everything else
2874 (*default* . ,(lambda (tag . kids) `(,tag ,@kids)))
2875 (*text* . ,(lambda (_ txt) txt))))
2876 port)))
2877 (rename-file "build-common.xml.new" "build-common.xml"))
2878 (substitute* "build/build.xml"
2879 (("\\$\\{lib\\}/cisd-base/cisd-base.jar")
2880 (search-input-file inputs "/share/java/sis-base.jar"))
2881 ;; Remove dependency on svn
2882 (("<build-info.*") "")
2883 (("\\$\\{revision.number\\}")
2884 ,(number->string revision))
2885 (("\\$\\{version.number\\}") ,base-version)
2886 ;; Don't use custom ant tasks.
2887 (("recursive-jar") "jar")
2888 (("<project-classpath.*") ""))))
2889 (replace 'install (install-jars "targets/dist")))))
2890 (inputs
2891 (list java-cisd-base))
2892 (native-inputs
2893 `(("ecj" ,java-ecj)
2894 ("build-resources"
2895 ,(origin
2896 (method svn-fetch)
2897 (uri (svn-reference
2898 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2899 "args4j/tags/release/"
2900 (version-major+minor base-version)
2901 ".x/" base-version
2902 "/build_resources/"))
2903 (revision revision)))
2904 (sha256
2905 (base32
2906 "056cam4k8pll7ass31sy6gwn8g8719njc41yf4l02b0342nilkyf"))
2907 (modules '((guix build utils)))
2908 ;; Delete bundled pre-built jars.
2909 (snippet
2910 '(begin (delete-file-recursively "lib/") #t))))))
2911 (home-page "https://svnsis.ethz.ch")
2912 (synopsis "Command line parser library")
2913 (description "This package provides a parser for command line arguments.")
2914 (license license:asl2.0))))
2915
2916(define-public java-cisd-jhdf5
2917 (let ((revision 39162)
2918 (base-version "14.12.6"))
2919 (package
2920 (name "java-cisd-jhdf5")
2921 (version (string-append base-version "-" (number->string revision)))
2922 (source (origin
2923 (method svn-fetch)
2924 (uri (svn-reference
2925 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2926 "jhdf5/tags/release/"
2927 (version-major+minor base-version)
2928 ".x/" base-version "/jhdf5/"))
2929 (revision revision)))
2930 (file-name (string-append "java-cisd-jhdf5-" version "-checkout"))
2931 (sha256
2932 (base32
2933 "13i17s2hn0q9drdqvp8csy7770p3hdbh9rp30ihln2ldkfawdmz0"))
2934 (modules '((guix build utils)))
2935 (snippet
2936 '(begin
2937 ;; Delete included gradle jar
2938 (delete-file-recursively "gradle/wrapper")
2939 ;; Delete pre-built native libraries
2940 (delete-file-recursively "libs")))))
2941 (build-system ant-build-system)
2942 (arguments
2943 `(#:make-flags '("-file" "build/build.xml")
2944 #:build-target "jar-all"
2945 #:test-target "jar-test"
2946 #:phases
2947 (modify-phases %standard-phases
2948 ;; FIXME: this build phase fails.
2949 (delete 'generate-jar-indices)
2950 ;; Don't erase results from the build phase when building tests.
2951 (add-after 'unpack 'separate-test-target-from-clean
2952 (lambda _
2953 (substitute* "build/build.xml"
2954 (("\"jar-test\" depends=\"clean, ")
2955 "\"jar-test\" depends=\""))))
2956 (add-after 'unpack 'unpack-build-resources
2957 (lambda* (#:key inputs #:allow-other-keys)
2958 (copy-recursively (assoc-ref inputs "build-resources")
2959 "../build_resources")
2960 (delete-file-recursively "../build_resources/lib/")
2961 (mkdir-p "../build_resources/lib")
2962 ;; Remove dependency on classycle
2963 (substitute* "../build_resources/ant/build-common.xml"
2964 (("<taskdef name=\"dependency-checker.*") "")
2965 (("classname=\"classycle.*") "")
2966 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2967 ;; Remove dependency on svn
2968 (substitute* "build/build.xml"
2969 (("<build-info.*") "")
2970 (("\\$\\{revision.number\\}")
2971 ,(number->string revision))
2972 (("\\$\\{version.number\\}") ,base-version))))
2973 (add-after 'unpack-build-resources 'fix-dependencies
2974 (lambda* (#:key inputs #:allow-other-keys)
2975 (substitute* "../build_resources/ant/build-common.xml"
2976 (("../libraries/testng/testng-jdk15.jar")
2977 (search-input-file inputs
2978 "/share/java/java-testng.jar")))
2979 (substitute* "build/build.xml"
2980 (("\\$\\{lib\\}/sis-base/sis-base.jar")
2981 (search-input-file inputs
2982 "/share/java/sis-base.jar"))
2983 (("\\$\\{lib\\}/cisd-args4j/cisd-args4j.jar")
2984 (search-input-file inputs
2985 "/share/java/cisd-args4j.jar"))
2986 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2987 (search-input-file inputs
2988 (string-append
2989 "/share/java/commons-lang-"
2990 ,(package-version java-commons-lang)
2991 ".jar")))
2992 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2993 (search-input-file inputs
2994 (string-append
2995 "/lib/m2/commons-io/commons-io/"
2996 ,(package-version java-commons-io)
2997 "/commons-io-"
2998 ,(package-version java-commons-io)
2999 ".jar")))
3000 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
3001 (search-input-file inputs
3002 "/share/java/java-testng.jar"))
3003 (("\\$\\{lib\\}/junit4/junit.jar")
3004 (car (find-files (assoc-ref inputs "java-junit") "jar$")))
3005 (("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar")
3006 (car (find-files (assoc-ref inputs "java-hamcrest-core")
3007 "jar$"))))
3008 ;; Remove dependency on ch.rinn.restrictions
3009 (with-directory-excursion "source/java/ch/systemsx/cisd/hdf5/"
3010 (substitute* '("BitSetConversionUtils.java"
3011 "HDF5Utils.java")
3012 (("import ch.rinn.restrictions.Private;") "")
3013 (("@Private") "")))
3014 (with-directory-excursion "sourceTest/java/ch/systemsx/cisd/hdf5/"
3015 (substitute* '("BitSetConversionTest.java"
3016 "h5ar/HDF5ArchiverTest.java")
3017 (("import ch.rinn.restrictions.Friend;") "")
3018 (("@Friend.*") ""))
3019 ;; Remove leftovers from removing @Friend
3020 (substitute* "h5ar/HDF5ArchiverTest.java"
3021 (("\\{ HDF5Archiver.class, IdCache.class, LinkRecord.class \\}\\)")
3022 "")))))
3023 (add-before 'configure 'build-native-library
3024 (lambda* (#:key inputs #:allow-other-keys)
3025 (let ((jdk (assoc-ref inputs "jdk"))
3026 (hdf5 (assoc-ref inputs "hdf5"))
3027 (dir ,(match (%current-system)
3028 ("i686-linux"
3029 "i386-Linux")
3030 ((or "armhf-linux" "aarch64-linux")
3031 "arm-Linux")
3032 ((or "x86_64-linux")
3033 "amd64-Linux")
3034 (_ "unknown-Linux"))))
3035 (with-directory-excursion "source/c"
3036 (apply invoke `("gcc" "-shared" "-O3"
3037 "-fPIC"
3038 "-Wl,--exclude-libs,ALL"
3039 ,@(find-files "jhdf5" "\\.c$")
3040 ,@(find-files "hdf-java" "\\.c$")
3041 ,(string-append "-I" hdf5 "/include")
3042 ,(string-append "-I" jdk "/include")
3043 ,(string-append "-I" jdk "/include/linux")
3044 ,(string-append hdf5 "/lib/libhdf5.a")
3045 "-o" "libjhdf5.so" "-lz")))
3046 (install-file "source/c/libjhdf5.so"
3047 (string-append "libs/native/jhdf5/" dir)))))
3048 ;; In the "check" phase we only build the test executable.
3049 (add-after 'check 'run-tests
3050 (lambda _
3051 (invoke "java" "-jar" "targets/dist/sis-jhdf5-test.jar")
3052 (delete-file "targets/dist/sis-jhdf5-test.jar")))
3053 (replace 'install
3054 (install-jars "targets/dist")))))
3055 (inputs
3056 (list java-cisd-base
3057 java-cisd-args4j
3058 java-commons-lang
3059 java-commons-io
3060 hdf5-1.8
3061 zlib))
3062 (native-inputs
3063 `(("jdk" ,icedtea-8)
3064 ("java-testng" ,java-testng)
3065 ("java-junit" ,java-junit)
3066 ("java-jmock" ,java-jmock)
3067 ("java-hamcrest-core" ,java-hamcrest-core)
3068 ("build-resources"
3069 ,(origin
3070 (method svn-fetch)
3071 (uri (svn-reference
3072 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3073 "jhdf5/tags/release/"
3074 (version-major+minor base-version)
3075 ".x/" base-version
3076 "/build_resources/"))
3077 (revision revision)))
3078 (sha256
3079 (base32
3080 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
3081 (home-page "https://wiki-bsse.ethz.ch/display/JHDF5/")
3082 (synopsis "Java binding for HDF5")
3083 (description "JHDF5 is a high-level API in Java for reading and writing
3084HDF5 files, building on the libraries provided by the HDF Group.")
3085 ;; The C sources are under a non-copyleft license, which looks like a
3086 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
3087 (license (list license:asl2.0
3088 (license:non-copyleft "file://source/c/COPYING"))))))
3089
3090(define-public java-classpathx-servletapi
3091 (package
3092 (name "java-classpathx-servletapi")
3093 (version "3.0.1")
3094 (source (origin
3095 (method url-fetch)
3096 (uri (string-append "mirror://gnu/classpathx/servletapi/"
3097 "servletapi-" version ".tar.gz"))
3098 (sha256
3099 (base32
3100 "07d8h051siga2f33fra72hk12sbq1bxa4jifjg0qj0vfazjjff0x"))))
3101 (build-system ant-build-system)
3102 (arguments
3103 `(#:tests? #f ; there is no test target
3104 #:build-target "compile"
3105 #:make-flags
3106 ,#~(list "-Dbuild.compiler=javac1.8"
3107 (string-append "-Ddist=" #$output))
3108 #:phases
3109 (modify-phases %standard-phases
3110 (replace 'install
3111 (lambda* (#:key make-flags #:allow-other-keys)
3112 (apply invoke `("ant" "dist" ,@make-flags)))))))
3113 (home-page "https://www.gnu.org/software/classpathx/")
3114 (synopsis "Java servlet API implementation")
3115 (description "This is the GNU servlet API distribution, part of the
3116ClasspathX project. It provides implementations of version 3.0 of the servlet
3117API and version 2.1 of the Java ServerPages API.")
3118 (license license:gpl3+)))
3119
3120(define-public java-javaee-servletapi
3121 (package
3122 (name "java-javaee-servletapi")
3123 (version "3.1.0")
3124 (source (origin
3125 (method git-fetch)
3126 (uri (git-reference
3127 (url "https://github.com/javaee/servlet-spec")
3128 (commit version)))
3129 (file-name (git-file-name name version))
3130 (sha256
3131 (base32
3132 "0s03lj8w5an70lkqbjycgfrfk0kc07vbfav91jzk87gh3awf9ksl"))))
3133 (build-system ant-build-system)
3134 (arguments
3135 `(#:jar-name "javax-servletapi.jar"
3136 ;; no tests
3137 #:tests? #f
3138 #:source-dir "src/main/java"
3139 #:phases
3140 (modify-phases %standard-phases
3141 (add-before 'build 'copy-resources
3142 (lambda _
3143 (mkdir-p "build/classes/javax/servlet/http")
3144 (let ((from-prefix "src/main/java/javax/servlet/")
3145 (to-prefix "build/classes/javax/servlet/"))
3146 (for-each (lambda (f)
3147 (copy-file (string-append from-prefix f)
3148 (string-append to-prefix f)))
3149 (list "LocalStrings_ja.properties"
3150 "LocalStrings.properties"
3151 "LocalStrings_fr.properties"
3152 "http/LocalStrings_es.properties"
3153 "http/LocalStrings_ja.properties"
3154 "http/LocalStrings.properties"
3155 "http/LocalStrings_fr.properties")))
3156 #t)))))
3157 (native-inputs
3158 (list unzip))
3159 (home-page "https://javaee.github.io/servlet-spec/")
3160 (synopsis "Java servlet API")
3161 (description "Java Servlet is the foundation web specification in the
3162Java Enterprise Platform. Developers can build web applications using the
3163Servlet API to interact with the request/response workflow. This project
3164provides information on the continued development of the Java Servlet
3165specification.")
3166 ;; Main code is dual-licensed by Oracle under either GLP2 or CDDL 1.1.
3167 ;; Some files are licensed under ASL 2.0.
3168 (license (list license:asl2.0 license:gpl2 license:cddl1.1))))
3169
3170(define-public java-swt
3171 (package
3172 (name "java-swt")
3173 (version "4.7.1a")
3174 (source
3175 ;; The types of many variables and procedures differ in the sources
3176 ;; dependent on whether the target architecture is a 32-bit system or a
3177 ;; 64-bit system. Instead of patching the sources on demand in a build
3178 ;; phase we download either the 32-bit archive (which mostly uses "int"
3179 ;; types) or the 64-bit archive (which mostly uses "long" types).
3180 (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9")
3181 (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q")
3182 (file32 "x86")
3183 (file64 "x86_64"))
3184 (let-values (((hash file)
3185 (match (or (%current-target-system) (%current-system))
3186 ("x86_64-linux" (values hash64 file64))
3187 (_ (values hash32 file32)))))
3188 (origin
3189 (method url-fetch)
3190 (uri (string-append
3191 "https://archive.eclipse.org/eclipse/downloads/drops4/"
3192 "R-" version "-201710090410/swt-" version
3193 "-gtk-linux-" file ".zip"))
3194 (sha256 (base32 hash))))))
3195 (build-system ant-build-system)
3196 (arguments
3197 `(#:jar-name "swt.jar"
3198 #:jdk ,icedtea-8
3199 #:tests? #f ; no "check" target
3200 #:phases
3201 (modify-phases %standard-phases
3202 (replace 'unpack
3203 (lambda* (#:key source #:allow-other-keys)
3204 (mkdir "swt")
3205 (invoke "unzip" source "-d" "swt")
3206 (chdir "swt")
3207 (mkdir "src")
3208 (invoke "unzip" "src.zip" "-d" "src")))
3209 ;; The classpath contains invalid icecat jars. Since we don't need
3210 ;; anything other than the JDK on the classpath, we can simply unset
3211 ;; it.
3212 (add-after 'configure 'unset-classpath
3213 (lambda _ (unsetenv "CLASSPATH") #t))
3214 (add-before 'build 'build-native
3215 (lambda* (#:key inputs outputs #:allow-other-keys)
3216 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3217 ;; Build shared libraries. Users of SWT have to set the system
3218 ;; property swt.library.path to the "lib" directory of this
3219 ;; package output.
3220 (mkdir-p lib)
3221 (setenv "OUTPUT_DIR" lib)
3222 (setenv "CC" ,(cc-for-target))
3223 (with-directory-excursion "src"
3224 (invoke "bash" "build.sh")))))
3225 (add-after 'install 'install-native
3226 (lambda* (#:key outputs #:allow-other-keys)
3227 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3228 (for-each (lambda (file)
3229 (install-file file lib))
3230 (find-files "." "\\.so$"))
3231 #t))))))
3232 (inputs
3233 `(("gtk" ,gtk+-2)
3234 ("libxtst" ,libxtst)
3235 ("libxt" ,libxt)
3236 ("mesa" ,mesa)
3237 ("glu" ,glu)))
3238 (native-inputs
3239 (list pkg-config unzip))
3240 (home-page "https://www.eclipse.org/swt/")
3241 (synopsis "Widget toolkit for Java")
3242 (description
3243 "SWT is a widget toolkit for Java designed to provide efficient, portable
3244access to the user-interface facilities of the operating systems on which it
3245is implemented.")
3246 ;; SWT code is licensed under EPL1.0
3247 ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1
3248 ;; Cairo bindings contain code under MPL1.1
3249 ;; XULRunner 1.9 bindings contain code under MPL2.0
3250 (license (list
3251 license:epl1.0
3252 license:mpl1.1
3253 license:mpl2.0
3254 license:lgpl2.1+))))
3255
3256;; java-hamcrest-core uses qdox version 1.12. We package this version instead
3257;; of the latest release.
3258(define-public java-qdox-1.12
3259 (package
3260 (name "java-qdox")
3261 (version "1.12.1")
3262 (source (origin
3263 (method url-fetch)
3264 (uri (string-append "https://repo1.maven.org/maven2/"
3265 "com/thoughtworks/qdox/qdox/" version
3266 "/qdox-" version "-sources.jar"))
3267 (sha256
3268 (base32
3269 "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl"))))
3270 (build-system ant-build-system)
3271 (arguments
3272 `(;; Tests require junit
3273 #:tests? #f
3274 #:jar-name "qdox.jar"
3275 #:phases
3276 (modify-phases %standard-phases
3277 (replace 'unpack
3278 (lambda* (#:key source #:allow-other-keys)
3279 (mkdir "src")
3280 (with-directory-excursion "src"
3281 (invoke "jar" "-xf" source))))
3282 ;; At this point we don't have junit, so we must remove the API
3283 ;; tests.
3284 (add-after 'unpack 'delete-tests
3285 (lambda _
3286 (delete-file-recursively "src/com/thoughtworks/qdox/junit")
3287 #t)))))
3288 (home-page "https://github.com/codehaus/qdox")
3289 (synopsis "Parse definitions from Java source files")
3290 (description
3291 "QDox is a high speed, small footprint parser for extracting
3292class/interface/method definitions from source files complete with JavaDoc
3293@code{@@tags}. It is designed to be used by active code generators or
3294documentation tools.")
3295 (license license:asl2.0)))
3296
3297(define-public java-qdox
3298 (package
3299 (name "java-qdox")
3300 ; Newer version exists, but this version is required by java-plexus-component-metadata
3301 (version "2.0-M2")
3302 (source (origin
3303 (method url-fetch)
3304 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
3305 ;; Older releases at https://github.com/codehaus/qdox/
3306 ;; Note: The release at maven is pre-generated. The release at
3307 ;; github requires jflex.
3308 (uri (string-append "https://repo1.maven.org/maven2/"
3309 "com/thoughtworks/qdox/qdox/" version
3310 "/qdox-" version "-sources.jar"))
3311 (sha256
3312 (base32
3313 "10xxrcaicq6axszcr2jpygisa4ch4sinyx5q7kqqxv4lknrmxp5x"))))
3314 (build-system ant-build-system)
3315 (arguments
3316 `(#:jar-name "qdox.jar"
3317 #:tests? #f; no tests
3318 #:phases
3319 (modify-phases %standard-phases
3320 (add-before 'install 'create-pom
3321 (generate-pom.xml "pom.xml" "com.thoughtworks.qdox" "qdox" ,version
3322 #:name "QDox"))
3323 (replace 'install
3324 (install-from-pom "pom.xml")))))
3325 (home-page "https://github.com/codehaus/qdox")
3326 (synopsis "Parse definitions from Java source files")
3327 (description "QDox is a high speed, small footprint parser for extracting
3328class/interface/method definitions from source files complete with JavaDoc
3329@code{@@tags}. It is designed to be used by active code generators or
3330documentation tools.")
3331 (license license:asl2.0)))
3332
3333(define-public java-qdox-2-M9
3334 (package
3335 (inherit java-qdox)
3336 (version "2.0-M9"); required by plexus-java
3337 (source (origin
3338 (method url-fetch)
3339 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
3340 ;; Older releases at https://github.com/codehaus/qdox/
3341 ;; Note: The release at maven is pre-generated. The release at
3342 ;; github requires jflex.
3343 (uri (string-append "https://repo1.maven.org/maven2/"
3344 "com/thoughtworks/qdox/qdox/" version
3345 "/qdox-" version "-sources.jar"))
3346 (sha256
3347 (base32
3348 "1s2jnmx2dkwnaha12lcj26aynywgwa8sslc47z82wx8xai13y4fg"))))
3349 (arguments
3350 (substitute-keyword-arguments (package-arguments java-qdox)
3351 ((#:phases phases)
3352 `(modify-phases ,phases
3353 (replace 'create-pom
3354 (generate-pom.xml "pom.xml" "com.thoughtworks.qdox" "qdox" ,version
3355 #:name "QDox"))))))))
3356
3357(define-public java-jarjar
3358 (package
3359 (name "java-jarjar")
3360 (version "1.4")
3361 (source (origin
3362 (method url-fetch)
3363 (uri (string-append
3364 "https://storage.googleapis.com/google-code-archive-downloads/v2/"
3365 "code.google.com/jarjar/jarjar-src-" version ".zip"))
3366 (sha256
3367 (base32
3368 "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl"))
3369 (modules '((guix build utils)))
3370 (snippet
3371 '(begin
3372 ;; Delete bundled thirds-party jar archives.
3373 (delete-file-recursively "lib")
3374 (delete-file "src/test/enumtest.jar")
3375 ;; the CLASSPATH needs this directory, create an empty one
3376 (mkdir-p "lib")
3377 #t))))
3378 (build-system ant-build-system)
3379 (arguments
3380 `(;; Tests require junit, which ultimately depends on this package.
3381 #:tests? #f
3382 #:build-target "jar"
3383 #:phases
3384 (modify-phases %standard-phases
3385 (add-before 'build 'do-not-use-bundled-asm
3386 (lambda* (#:key inputs #:allow-other-keys)
3387 (substitute* "build.xml"
3388 (("<path id=\"path.build\">")
3389 (string-append "<path id=\"path.build\"><fileset dir=\""
3390 (assoc-ref inputs "java-asm-bootstrap")
3391 "/lib/m2\" includes=\"**/*.jar\"/>"))
3392 (("<zipfileset src=\"lib/asm-4.0.jar\"/>") "")
3393 (("lib/asm-commons-4.0.jar")
3394 (car (find-files (assoc-ref inputs "java-asm-bootstrap")
3395 "asm-6.0.jar")))
3396 (("<include name=\"org/objectweb/asm/commons/Remap\\*\\.class\"/>")
3397 (string-append "<include name=\"org/objectweb/asm/"
3398 "commons/Remap*.class\"/>"
3399 "<include name=\"org/objectweb/asm/*.class\"/>"
3400 "<include name=\"org/objectweb/asm/"
3401 "signature/*.class\"/>"
3402 "<include name=\"org/objectweb/asm/"
3403 "commons/SignatureRemapper.class\"/>")))
3404 #t))
3405 (add-before 'build 'remove-maven-dependency
3406 (lambda _
3407 ;; We do not need to build jarjar as a maven plugin just yet, so
3408 ;; remove this file. Maven requires jarjar (but not that plugin),
3409 ;; so removing it improves the bootstrap.
3410 (delete-file "src/main/com/tonicsystems/jarjar/JarJarMojo.java")
3411 #t))
3412 (replace 'install
3413 (lambda* (#:key outputs #:allow-other-keys)
3414 (let ((target (string-append (assoc-ref outputs "out")
3415 "/share/java")))
3416 (install-file (string-append "dist/jarjar-" ,version ".jar")
3417 target))
3418 #t)))))
3419 (inputs
3420 (list java-asm-bootstrap))
3421 (native-inputs
3422 (list unzip))
3423 (home-page "https://code.google.com/archive/p/jarjar/")
3424 (synopsis "Repackage Java libraries")
3425 (description
3426 "Jar Jar Links is a utility that makes it easy to repackage Java
3427libraries and embed them into your own distribution. Jar Jar Links includes
3428an Ant task that extends the built-in @code{jar} task.")
3429 (license license:asl2.0)))
3430
3431(define-public java-hamcrest-core
3432 (package
3433 (name "java-hamcrest-core")
3434 (version "1.3")
3435 (source (origin
3436 (method git-fetch)
3437 (uri (git-reference
3438 (url "https://github.com/hamcrest/JavaHamcrest/")
3439 (commit (string-append "hamcrest-java-" version))))
3440 (file-name (git-file-name name version))
3441 (sha256
3442 (base32
3443 "16fxxkrd31ahqvcaby30jgh3z1i0zxh51m24hxgz0z2agxj6bc63"))
3444 (modules '((guix build utils)))
3445 (snippet
3446 '(begin
3447 ;; Delete bundled thirds-party jar archives.
3448 (delete-file-recursively "lib")
3449 #t))))
3450 (build-system ant-build-system)
3451 (arguments
3452 `(#:tests? #f ; Tests require junit
3453 #:modules ((guix build ant-build-system)
3454 (guix build java-utils)
3455 (guix build utils)
3456 (srfi srfi-1))
3457 #:make-flags (list (string-append "-Dversion=" ,version))
3458 #:test-target "unit-test"
3459 #:build-target "core"
3460 #:phases
3461 (modify-phases %standard-phases
3462 ;; Disable unit tests, because they require junit, which requires
3463 ;; hamcrest-core. We also give a fixed value to the "Built-Date"
3464 ;; attribute from the manifest for reproducibility.
3465 (add-before 'configure 'patch-build.xml
3466 (lambda _
3467 (substitute* "build.xml"
3468 (("unit-test, ") "")
3469 (("\\$\\{build.timestamp\\}") "guix"))
3470 #t))
3471 ;; Java's "getMethods()" returns methods in an unpredictable order.
3472 ;; To make the output of the generated code deterministic we must
3473 ;; sort the array of methods.
3474 (add-after 'unpack 'make-method-order-deterministic
3475 (lambda _
3476 (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java"
3477 (("import java\\.util\\.Iterator;" line)
3478 (string-append line "\n"
3479 "import java.util.Arrays; import java.util.Comparator;"))
3480 (("allMethods = cls\\.getMethods\\(\\);" line)
3481 (string-append "_" line
3482 "
3483private Method[] getSortedMethods() {
3484 Arrays.sort(_allMethods, new Comparator<Method>() {
3485 @Override
3486 public int compare(Method a, Method b) {
3487 return a.toString().compareTo(b.toString());
3488 }
3489 });
3490 return _allMethods;
3491}
3492
3493private Method[] allMethods = getSortedMethods();")))
3494 #t))
3495 (add-before 'build 'do-not-use-bundled-qdox
3496 (lambda* (#:key inputs #:allow-other-keys)
3497 (substitute* "build.xml"
3498 (("lib/generator/qdox-1.12.jar")
3499 (string-append (assoc-ref inputs "java-qdox-1.12")
3500 "/share/java/qdox.jar")))
3501 #t))
3502 ;; build.xml searches for .jar files in this directoy, which
3503 ;; we remove from the source archive.
3504 (add-before 'build 'create-dummy-directories
3505 (lambda _
3506 (mkdir-p "lib/integration")
3507 #t))
3508 (add-before 'build 'create-pom
3509 (lambda _
3510 (substitute* "pom/hamcrest-core.pom"
3511 (("@VERSION@") ,version))
3512 #t))
3513 (replace 'install
3514 (install-from-pom "pom/hamcrest-core.pom")))))
3515 (native-inputs
3516 `(("java-qdox-1.12" ,java-qdox-1.12)
3517 ("java-jarjar" ,java-jarjar)))
3518 (propagated-inputs
3519 (list java-hamcrest-parent-pom))
3520 (home-page "https://hamcrest.org/")
3521 (synopsis "Library of matchers for building test expressions")
3522 (description
3523 "This package provides a library of matcher objects (also known as
3524constraints or predicates) allowing @code{match} rules to be defined
3525declaratively, to be used in other frameworks. Typical scenarios include
3526testing frameworks, mocking libraries and UI validation rules.")
3527 (license license:bsd-2)))
3528
3529(define-public java-hamcrest-parent-pom
3530 (package
3531 (inherit java-hamcrest-core)
3532 (properties '((hidden? . #t)))
3533 (name "java-hamcrest-parent-pom")
3534 (propagated-inputs '())
3535 (native-inputs '())
3536 (arguments
3537 `(#:tests? #f
3538 #:phases
3539 (modify-phases %standard-phases
3540 (delete 'configure)
3541 (replace 'build
3542 (lambda _
3543 (substitute* "pom/hamcrest-parent.pom"
3544 (("@VERSION@") ,(package-version java-hamcrest-core)))
3545 #t))
3546 (replace 'install
3547 (install-pom-file "pom/hamcrest-parent.pom")))))))
3548
3549(define-public java-hamcrest-library
3550 (package
3551 (inherit java-hamcrest-core)
3552 (name "java-hamcrest-library")
3553 (arguments
3554 (substitute-keyword-arguments (package-arguments java-hamcrest-core)
3555 ((#:build-target _) "library")
3556 ((#:phases phases)
3557 `(modify-phases ,phases
3558 (add-after 'unpack 'patch-classpath-for-integration
3559 (lambda* (#:key inputs #:allow-other-keys)
3560 (substitute* "build.xml"
3561 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
3562 (car (find-files (assoc-ref inputs "java-hamcrest-core")
3563 "jar$"))))
3564 #t))
3565 (replace 'create-pom
3566 (lambda _
3567 (substitute* "pom/hamcrest-library.pom"
3568 (("@VERSION@") ,(package-version java-hamcrest-core)))
3569 #t))
3570 (replace 'install
3571 (install-from-pom "pom/hamcrest-library.pom"))))))
3572 (propagated-inputs
3573 (list java-hamcrest-core java-hamcrest-parent-pom))))
3574
3575(define-public java-junit
3576 (package
3577 (name "java-junit")
3578 (version "4.12")
3579 (source (origin
3580 (method git-fetch)
3581 (uri (git-reference
3582 (url "https://github.com/junit-team/junit/")
3583 (commit (string-append "r" version))))
3584 (file-name (git-file-name name version))
3585 (sha256
3586 (base32
3587 "1j8avi91px1z8rjc89cfikwrvfifdmmsarwiyrcnr59ynvpz0v8h"))
3588 (modules '((guix build utils)))
3589 (snippet
3590 '(begin
3591 ;; Delete bundled jar archives.
3592 (delete-file-recursively "lib")
3593 #t))))
3594 (build-system ant-build-system)
3595 (arguments
3596 `(#:jar-name "junit.jar"
3597 #:source-dir "src/main/java"
3598 #:test-dir "src/test"
3599 #:test-exclude (list "**/SimpleTest.java" "**/StackTracesTest.java"
3600 "**/RuleChainTest.java" "**/TestWatchmanTest.java")
3601 #:phases
3602 (modify-phases %standard-phases
3603 (add-before 'check 'copy-test-resources
3604 (lambda _
3605 (copy-recursively "src/test/resources" "build/test-classes")
3606 #t))
3607 (replace 'install
3608 (install-from-pom "pom.xml")))))
3609 (propagated-inputs
3610 (list java-hamcrest-core))
3611 (native-inputs
3612 (list java-hamcrest-library))
3613 (home-page "https://junit.org/junit4/")
3614 (synopsis "Test framework for Java")
3615 (description
3616 "JUnit is a simple framework to write repeatable tests for Java projects.
3617JUnit provides assertions for testing expected results, test fixtures for
3618sharing common test data, and test runners for running tests.")
3619 (license license:epl1.0)))
3620
3621(define-public java-junitparams
3622 (package
3623 (name "java-junitparams")
3624 (version "1.1.1")
3625 (source (origin
3626 (method git-fetch)
3627 (uri (git-reference
3628 (url "https://github.com/Pragmatists/JUnitParams")
3629 (commit (string-append "JUnitParams-" version))))
3630 (file-name (git-file-name name version))
3631 (sha256
3632 (base32
3633 "0rb52xdfp99invyjrras3w0bf0a81cz30yd47rkkiyqcqj0y1q9b"))))
3634 (build-system ant-build-system)
3635 (arguments
3636 `(#:jar-name "junitparams.jar"
3637 #:source-dir "src/main/java"
3638 #:test-dir "src/test"
3639 #:test-exclude (list "**/SuperclassTest.java")))
3640 (inputs
3641 (list java-junit))
3642 (native-inputs
3643 (list java-junit java-hamcrest-core java-assertj))
3644 (home-page "https://github.com/Pragmatists/JUnitParams")
3645 (synopsis "Parameterised test support for JUnit")
3646 (description "The JUnitParams project adds a new runner to JUnit and
3647provides much easier and readable parametrised tests for JUnit.")
3648 (license license:asl2.0)))
3649
3650(define-public java-plexus-utils
3651 (package
3652 (name "java-plexus-utils")
3653 (version "3.3.0")
3654 (source (origin
3655 (method git-fetch)
3656 (uri (git-reference
3657 (url "https://github.com/codehaus-plexus/plexus-utils")
3658 (commit (string-append "plexus-utils-" version))))
3659 (file-name (git-file-name name version))
3660 (sha256
3661 (base32
3662 "0d0fq21rzjy0j55kcp8w9k1rbq9rwr0r7cc8239p9jbz54vihp0g"))))
3663 (build-system ant-build-system)
3664 ;; FIXME: The default build.xml does not include a target to install
3665 ;; javadoc files.
3666 (arguments
3667 `(#:jar-name "plexus-utils.jar"
3668 #:source-dir "src/main"
3669 #:phases
3670 (modify-phases %standard-phases
3671 (add-after 'unpack 'fix-reference-to-/bin-and-/usr
3672 (lambda _
3673 (substitute* "src/main/java/org/codehaus/plexus/util/\
3674cli/shell/BourneShell.java"
3675 (("/bin/sh") (which "sh"))
3676 (("/usr/") (getcwd)))
3677 #t))
3678 (add-after 'unpack 'fix-or-disable-broken-tests
3679 (lambda _
3680 (with-directory-excursion "src/test/java/org/codehaus/plexus/util"
3681 (substitute* '("cli/CommandlineTest.java"
3682 "cli/shell/BourneShellTest.java")
3683 (("/bin/sh") (which "sh"))
3684 (("/bin/echo") (which "echo")))
3685
3686 ;; This test depends on MavenProjectStub, but we don't have
3687 ;; a package for Maven.
3688 (delete-file "introspection/ReflectionValueExtractorTest.java")
3689
3690 ;; FIXME: The command line tests fail, maybe because they use
3691 ;; absolute paths.
3692 (delete-file "cli/CommandlineTest.java")
3693
3694 ;; These tests require openjdk jmh, which is not packaged yet
3695 (for-each delete-file (find-files "." "PerfTest.java$")))
3696 #t))
3697 (add-before 'build 'copy-resources
3698 (lambda _
3699 (copy-recursively "src/main/resources" "build/classes")
3700 #t))
3701 (replace 'install (install-from-pom "pom.xml")))))
3702 (native-inputs
3703 (list java-hamcrest-core java-junit))
3704 (propagated-inputs
3705 (list plexus-parent-pom-5.1))
3706 (home-page "https://codehaus-plexus.github.io/plexus-utils/")
3707 (synopsis "Common utilities for the Plexus framework")
3708 (description "This package provides various Java utility classes for the
3709Plexus framework to ease working with strings, files, command lines, XML and
3710more.")
3711 (license license:asl2.0)))
3712
3713(define-public java-plexus-utils-3.2.1
3714 (package
3715 (inherit java-plexus-utils)
3716 ;; plexus-build-api needs this version, later versions don't work
3717 (version "3.2.1")
3718 (source (origin
3719 (method git-fetch)
3720 (uri (git-reference
3721 (url "https://github.com/codehaus-plexus/plexus-utils")
3722 (commit (string-append "plexus-utils-" version))))
3723 (file-name (git-file-name "java-plexus-utils" version))
3724 (sha256
3725 (base32
3726 "1w169glixyk94jbczj8jzg897lsab46jihiaa3dhw0p06g35va8b"))))))
3727
3728(define-public java-plexus-interpolation
3729 (package
3730 (name "java-plexus-interpolation")
3731 (version "1.26")
3732 (source (origin
3733 (method git-fetch)
3734 (uri (git-reference
3735 (url "https://github.com/codehaus-plexus/plexus-interpolation")
3736 (commit (string-append "plexus-interpolation-" version))))
3737 (file-name (git-file-name name version))
3738 (sha256
3739 (base32
3740 "1rahjmhywf6d5m32qzlc9izawyvcd71abfm9k03f13rs2xmfxzlh"))))
3741 (build-system ant-build-system)
3742 (arguments
3743 `(#:jar-name "plexus-interpolation.jar"
3744 #:source-dir "src/main"
3745 #:phases
3746 (modify-phases %standard-phases
3747 (replace 'install (install-from-pom "pom.xml")))))
3748 (propagated-inputs
3749 `(("plexus-parent-pom-5.1" ,plexus-parent-pom-5.1)))
3750 (native-inputs
3751 (list java-junit java-hamcrest-core))
3752 (home-page "https://codehaus-plexus.github.io/plexus-interpolation/")
3753 (synopsis "Java components for interpolating ${} strings and the like")
3754 (description "Plexus interpolator is a modular, flexible interpolation
3755framework for the expression language style commonly seen in Maven, Plexus,
3756and other related projects.
3757
3758It has its foundation in the @code{org.codehaus.plexus.utils.interpolation}
3759package within @code{plexus-utils}, but has been separated in order to allow
3760these two libraries to vary independently of one another.")
3761 (license license:asl2.0)))
3762
3763(define-public java-plexus-classworlds
3764 (package
3765 (name "java-plexus-classworlds")
3766 (version "2.6.0")
3767 (source (origin
3768 (method git-fetch)
3769 (uri (git-reference
3770 (url "https://github.com/codehaus-plexus/plexus-classworlds")
3771 (commit (string-append "plexus-classworlds-" version))))
3772 (file-name (git-file-name name version))
3773 (sha256
3774 (base32
3775 "034k2hgvj1saalwbnzrbg4n0zgzwcpz1lhlb8q4kgglsp9pmm03s"))))
3776 (build-system ant-build-system)
3777 (arguments
3778 `(#:jar-name "plexus-classworlds.jar"
3779 #:source-dir "src/main"
3780 #:tests? #f;; FIXME: we need to generate some resources as in pom.xml
3781 #:phases
3782 (modify-phases %standard-phases
3783 (replace 'install (install-from-pom "pom.xml")))))
3784 (propagated-inputs
3785 `(("plexus-parent-pom-5.1" ,plexus-parent-pom-5.1)))
3786 (native-inputs
3787 (list java-junit))
3788 (home-page "https://codehaus-plexus.github.io/plexus-classworlds/")
3789 (synopsis "Java class loader framework")
3790 (description "Plexus classworlds replaces the native @code{ClassLoader}
3791mechanism of Java. It is especially useful for dynamic loading of application
3792components.")
3793 (license license:asl2.0)))
3794
3795(define java-plexus-container-default-bootstrap
3796 (package
3797 (name "java-plexus-container-default-bootstrap")
3798 (version "2.1.0")
3799 (source (origin
3800 (method git-fetch)
3801 (uri (git-reference
3802 (url "https://github.com/codehaus-plexus/plexus-containers")
3803 (commit (string-append "plexus-containers-" version))))
3804 (file-name (git-file-name name version))
3805 (sha256
3806 (base32
3807 "0r9yq67c1hvi1pz5wmx6x6hk5fmavp8a7yal3j5hkaad757firn1"))))
3808 (build-system ant-build-system)
3809 (arguments
3810 `(#:jar-name "container-default.jar"
3811 #:source-dir "plexus-container-default/src/main/java"
3812 #:test-dir "plexus-container-default/src/test"
3813 #:tests? #f; requires plexus-archiver, which depends on this package
3814 #:phases
3815 (modify-phases %standard-phases
3816 (add-before 'build 'fix-google-collections
3817 (lambda _
3818 ;; Google collections are now replaced with guava
3819 (substitute* "plexus-container-default/pom.xml"
3820 (("google-collections") "guava")
3821 (("com.google.collections") "com.google.guava"))
3822 #t))
3823 (add-before 'build 'copy-resources
3824 (lambda _
3825 (copy-recursively
3826 "plexus-container-default/src/main/resources/"
3827 "build/classes")
3828 #t))
3829 (replace 'install
3830 (install-from-pom "plexus-container-default/pom.xml")))))
3831 (propagated-inputs
3832 `(("java-plexus-worldclass" ,java-plexus-classworlds)
3833 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
3834 ("java-plexus-utils" ,java-plexus-utils)
3835 ("java-junit" ,java-junit)
3836 ("java-guava" ,java-guava)
3837 ("java-plexus-containers-parent-pom" ,java-plexus-containers-parent-pom)))
3838 (home-page "https://github.com/codehaus-plexus/plexus-containers")
3839 (synopsis "Inversion-of-control container")
3840 (description "Plexus-default-container is Plexus' inversion-of-control
3841(@dfn{IoC}) container. It is composed of its public API and its default
3842implementation.")
3843 (license license:asl2.0)))
3844
3845(define java-plexus-containers-parent-pom
3846 (package
3847 (inherit java-plexus-container-default-bootstrap)
3848 (name "java-plexus-containers-parent-pom")
3849 (arguments
3850 `(#:tests? #f
3851 #:phases
3852 (modify-phases %standard-phases
3853 (delete 'configure)
3854 (delete 'build)
3855 (replace 'install
3856 (install-pom-file "pom.xml")))))
3857 (propagated-inputs
3858 `(("plexus-parent-pom" ,plexus-parent-pom-4.0)))))
3859
3860(define-public java-plexus-io
3861 (package
3862 (name "java-plexus-io")
3863 (version "3.2.0")
3864 (source (origin
3865 (method git-fetch)
3866 (uri (git-reference
3867 (url "https://github.com/codehaus-plexus/plexus-io")
3868 (commit (string-append "plexus-io-" version))))
3869 (file-name (git-file-name name version))
3870 (sha256
3871 (base32
3872 "1r3wqfpbxq8vp4p914i8p88r0994rmcjw02hz14n11cfb6gsyvlr"))))
3873 (build-system ant-build-system)
3874 (arguments
3875 `(#:jar-name "plexus-io.jar"
3876 #:source-dir "src/main/java"
3877 #:test-dir "src/test"
3878 #:phases
3879 (modify-phases %standard-phases
3880 (add-before 'build 'copy-resources
3881 (lambda _
3882 (mkdir-p "build/classes")
3883 (copy-recursively "src/main/resources" "build/classes")
3884 (mkdir-p "build/test-classes")
3885 (copy-recursively "src/test/resources" "build/test-classes")
3886 #t))
3887 (replace 'install (install-from-pom "pom.xml")))))
3888 (propagated-inputs
3889 (list java-plexus-utils java-commons-io plexus-parent-pom-5.1))
3890 (inputs
3891 (list java-jsr305))
3892 (native-inputs
3893 `(("junit" ,java-junit)
3894 ("hamcrest" ,java-hamcrest-core)
3895 ("guava" ,java-guava)
3896 ("classworlds" ,java-plexus-classworlds)
3897 ("xbean" ,java-geronimo-xbean-reflect)
3898 ("container-default" ,java-plexus-container-default-bootstrap)))
3899 (home-page "https://github.com/codehaus-plexus/plexus-io")
3900 (synopsis "I/O plexus components")
3901 (description "Plexus IO is a set of plexus components, which are designed
3902for use in I/O operations. This implementation using plexus components allows
3903reusing it in maven.")
3904 (license license:asl2.0)))
3905
3906(define-public java-plexus-archiver
3907 (package
3908 (name "java-plexus-archiver")
3909 (version "4.2.2")
3910 (source (origin
3911 (method url-fetch)
3912 (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver"
3913 "/archive/plexus-archiver-" version ".tar.gz"))
3914 (sha256
3915 (base32
3916 "144n971r3lfrx3l12nf2scm80x4xdvgbkk4bjpa4vcvvdrll6qys"))))
3917 (build-system ant-build-system)
3918 (arguments
3919 `(#:jar-name "plexus-archiver.jar"
3920 #:source-dir "src/main/java"
3921 #:test-dir "src/test"
3922 #:test-exclude (list "**/Abstract*.java" "**/Base*.java")
3923 #:phases
3924 (modify-phases %standard-phases
3925 (add-before 'check 'remove-failing
3926 (lambda _
3927 ;; Requires an older version of plexus container
3928 (delete-file
3929 "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java")
3930 #t))
3931 (add-before 'check 'fix-test-building
3932 (lambda _
3933 (substitute* "build.xml"
3934 (("srcdir=\"src/test\"") "srcdir=\"src/test/java\""))
3935 #t))
3936 (add-before 'build 'copy-resources
3937 (lambda _
3938 (mkdir-p "build/classes")
3939 (copy-recursively "src/main/resources" "build/classes")
3940 (mkdir-p "build/test-classes")
3941 (copy-recursively "src/test/resources" "build/test-classes")
3942 #t))
3943 (replace 'install (install-from-pom "pom.xml")))))
3944 (propagated-inputs
3945 (list java-plexus-utils java-plexus-io java-iq80-snappy
3946 java-commons-compress plexus-parent-pom-6.1))
3947 (inputs
3948 `(("java-jsr305" ,java-jsr305)
3949 ("java-plexus-container-default"
3950 ,java-plexus-container-default-bootstrap)))
3951 (native-inputs
3952 `(("java-hamcrest-core" ,java-hamcrest-core)
3953 ("junit" ,java-junit)
3954 ("classworld" ,java-plexus-classworlds)
3955 ("xbean" ,java-geronimo-xbean-reflect)
3956 ("xz" ,java-xz)
3957 ("guava" ,java-guava)))
3958 (home-page "https://github.com/codehaus-plexus/plexus-archiver")
3959 (synopsis "Archiver component of the Plexus project")
3960 (description "Plexus-archiver contains a component to deal with project
3961archives (jar).")
3962 (license license:asl2.0)))
3963
3964(define-public java-plexus-container-default
3965 (package
3966 (inherit java-plexus-container-default-bootstrap)
3967 (name "java-plexus-container-default")
3968 (arguments
3969 `(#:jar-name "container-default.jar"
3970 #:source-dir "plexus-container-default/src/main/java"
3971 #:test-dir "plexus-container-default/src/test"
3972 #:test-exclude (list ;"**/*Test.java"
3973 "**/Abstract*.java"
3974 ;; Requires plexus-hierarchy
3975 "**/PlexusHierarchyTest.java"
3976 ;; Failures
3977 "**/ComponentRealmCompositionTest.java"
3978 "**/PlexusContainerTest.java")
3979 #:phases
3980 (modify-phases %standard-phases
3981 (add-before 'build 'fix-google-collections
3982 (lambda _
3983 ;; Google collections are now replaced with guava
3984 (substitute* "plexus-container-default/pom.xml"
3985 (("google-collections") "guava")
3986 (("com.google.collections") "com.google.guava"))
3987 #t))
3988 (add-before 'build 'copy-resources
3989 (lambda _
3990 (copy-recursively
3991 "plexus-container-default/src/main/resources/"
3992 "build/classes")
3993 #t))
3994 (add-before 'check 'fix-paths
3995 (lambda _
3996 (let ((dir "plexus-container-default/src/test/java/org/codehaus"))
3997 (substitute*
3998 (string-append
3999 dir "/plexus/component/composition/"
4000 "ComponentRealmCompositionTest.java")
4001 (("src/test") "plexus-container-default/src/test"))
4002 #t)))
4003 (replace 'install
4004 (install-from-pom "plexus-container-default/pom.xml")))))
4005 (inputs
4006 `(("worldclass" ,java-plexus-classworlds)
4007 ("xbean" ,java-geronimo-xbean-reflect)
4008 ("utils" ,java-plexus-utils)
4009 ("junit" ,java-junit)
4010 ("guava" ,java-guava)))
4011 (native-inputs
4012 `(("archiver" ,java-plexus-archiver)
4013 ("hamcrest" ,java-hamcrest-core)))))
4014
4015(define-public java-plexus-component-annotations
4016 (package
4017 (inherit java-plexus-container-default)
4018 (name "java-plexus-component-annotations")
4019 (arguments
4020 `(#:jar-name "plexus-component-annotations.jar"
4021 #:source-dir "plexus-component-annotations/src/main/java"
4022 #:tests? #f; no tests
4023 #:phases
4024 (modify-phases %standard-phases
4025 (replace 'install
4026 (install-from-pom "plexus-component-annotations/pom.xml")))))
4027 (propagated-inputs
4028 (list java-plexus-containers-parent-pom))
4029 (inputs '())
4030 (native-inputs '())
4031 (synopsis "Plexus descriptors generator")
4032 (description "This package is a Maven plugin to generate Plexus descriptors
4033from source tags and class annotations.")))
4034
4035(define-public java-plexus-component-metadata
4036 (package
4037 (inherit java-plexus-container-default)
4038 (name "java-plexus-component-metadata")
4039 (arguments
4040 `(#:jar-name "plexus-component-metadata.jar"
4041 #:source-dir "src/main/java"
4042 #:test-dir "src/test"
4043 #:jdk ,icedtea-8
4044 #:phases
4045 (modify-phases %standard-phases
4046 (add-before 'configure 'chdir
4047 (lambda _
4048 (chdir "plexus-component-metadata")
4049 #t))
4050 (add-before 'build 'copy-resources
4051 (lambda _
4052 (copy-recursively "src/main/resources"
4053 "build/classes/")
4054 #t))
4055 (add-before 'build 'fix-jdom
4056 (lambda _
4057 ;; The newer version of jdom now sets multiple features by default
4058 ;; that are not supported.
4059 ;; Skip these features
4060 (substitute* "src/main/java/org/codehaus/plexus/metadata/merge/MXParser.java"
4061 (("throw new XmlPullParserException\\(\"unsupporte feature \"\\+name\\);")
4062 "// skip"))))
4063 (add-before 'build 'reinstate-cli
4064 ;; The CLI was removed in 2.1.0, but we still need it to build some
4065 ;; maven dependencies, and some parts of maven itself. We can't use
4066 ;; the maven plugin for that yet.
4067 (lambda _
4068 (with-output-to-file "src/main/java/org/codehaus/plexus/metadata/PlexusMetadataGeneratorCli.java"
4069 (lambda _
4070 ;; Copied from a previous version of this package.
4071 (display "package org.codehaus.plexus.metadata;
4072
4073import java.io.File;
4074import java.util.Arrays;
4075import java.util.Collections;
4076
4077import org.apache.commons.cli.CommandLine;
4078import org.apache.commons.cli.OptionBuilder;
4079import org.apache.commons.cli.Options;
4080import org.codehaus.plexus.PlexusContainer;
4081import org.codehaus.plexus.tools.cli.AbstractCli;
4082
4083public class PlexusMetadataGeneratorCli
4084 extends AbstractCli
4085{
4086 public static final char SOURCE_DIRECTORY = 's';
4087 public static final char SOURCE_ENCODING = 'e';
4088 public static final char CLASSES_DIRECTORY = 'c';
4089 public static final char OUTPUT_FILE = 'o';
4090 public static final char DESCRIPTORS_DIRECTORY = 'm';
4091
4092 public static void main( String[] args )
4093 throws Exception
4094 {
4095 new PlexusMetadataGeneratorCli().execute( args );
4096 }
4097
4098 @Override
4099 public String getPomPropertiesPath()
4100 {
4101 return \"META-INF/maven/org.codehaus.plexus/plexus-metadata-generator/pom.properties\";
4102 }
4103
4104 @Override
4105 @SuppressWarnings(\"static-access\")
4106 public Options buildCliOptions( Options options )
4107 {
4108 options.addOption( OptionBuilder.withLongOpt( \"source\" ).hasArg().withDescription( \"Source directory.\" ).create( SOURCE_DIRECTORY ) );
4109 options.addOption( OptionBuilder.withLongOpt( \"encoding\" ).hasArg().withDescription( \"Source file encoding.\" ).create( SOURCE_ENCODING ) );
4110 options.addOption( OptionBuilder.withLongOpt( \"classes\" ).hasArg().withDescription( \"Classes directory.\" ).create( CLASSES_DIRECTORY ) );
4111 options.addOption( OptionBuilder.withLongOpt( \"output\" ).hasArg().withDescription( \"Output directory.\" ).create( OUTPUT_FILE ) );
4112 options.addOption( OptionBuilder.withLongOpt( \"descriptors\" ).hasArg().withDescription( \"Descriptors directory.\" ).create( DESCRIPTORS_DIRECTORY ) );
4113 return options;
4114 }
4115
4116 public void invokePlexusComponent( CommandLine cli, PlexusContainer plexus )
4117 throws Exception
4118 {
4119 MetadataGenerator metadataGenerator = plexus.lookup( MetadataGenerator.class );
4120
4121 MetadataGenerationRequest request = new MetadataGenerationRequest();
4122 request.classesDirectory = new File( cli.getOptionValue( CLASSES_DIRECTORY ) );
4123 request.classpath = Collections.emptyList();
4124 request.sourceDirectories = Arrays.asList( new String[]{ new File( cli.getOptionValue( SOURCE_DIRECTORY ) ).getAbsolutePath() } );
4125 request.sourceEncoding = cli.getOptionValue( SOURCE_ENCODING );
4126 request.useContextClassLoader = true;
4127 request.outputFile = new File( cli.getOptionValue( OUTPUT_FILE ) );
4128 request.componentDescriptorDirectory = new File( cli.getOptionValue( DESCRIPTORS_DIRECTORY ) );
4129
4130 metadataGenerator.generateDescriptor( request );
4131 }
4132}")))))
4133 (add-before 'check 'fix-test-location
4134 (lambda _
4135 (substitute* '("src/test/java/org/codehaus/plexus/metadata/DefaultComponentDescriptorWriterTest.java"
4136 "src/test/java/org/codehaus/plexus/metadata/merge/ComponentsXmlMergerTest.java")
4137 (("target") "build")))))))
4138 (propagated-inputs
4139 `(("java-plexus-container-default" ,java-plexus-container-default)
4140 ("java-plexu-component-annotations" ,java-plexus-component-annotations)
4141 ("java-plexus-utils" ,java-plexus-utils)
4142 ("java-plexus-cli" ,java-plexus-cli)
4143 ("java-plexus-classworlds" ,java-plexus-classworlds)
4144 ("maven-plugin-api" ,maven-plugin-api)
4145 ("maven-plugin-annotations" ,maven-plugin-annotations)
4146 ("maven-core-bootstrap" ,maven-core-bootstrap)
4147 ("maven-model" ,maven-model)
4148 ("java-commons-cli" ,java-commons-cli)
4149 ("java-qdox" ,java-qdox)
4150 ("java-jdom2" ,java-jdom2)
4151 ("java-asm-8" ,java-asm-8)))
4152 (native-inputs
4153 (list java-junit java-guava java-geronimo-xbean-reflect))
4154 (synopsis "Inversion-of-control container for Maven")
4155 (description "The Plexus project provides a full software stack for creating
4156and executing software projects. Based on the Plexus container, the
4157applications can utilise component-oriented programming to build modular,
4158reusable components that can easily be assembled and reused. This package
4159provides the Maven plugin generating the component metadata.")))
4160
4161(define-public java-plexus-container-default-1.7
4162 (package
4163 (inherit java-plexus-container-default)
4164 (version "1.7.1")
4165 (source (origin
4166 (method git-fetch)
4167 (uri (git-reference
4168 (url "https://github.com/codehaus-plexus/plexus-containers")
4169 (commit (string-append "plexus-containers-" version))))
4170 (file-name (git-file-name "java-plexus-container-default" version))
4171 (sha256
4172 (base32
4173 "1316hrp5vqfv0aw7miq2fp0wwy833h66h502h29vnh5sxj27x228"))))))
4174
4175(define java-plexus-containers-parent-pom-1.7
4176 (package
4177 (inherit java-plexus-container-default-1.7)
4178 (name "java-plexus-containers-parent-pom")
4179 (arguments
4180 `(#:tests? #f
4181 #:phases
4182 (modify-phases %standard-phases
4183 (delete 'configure)
4184 (delete 'build)
4185 (replace 'install
4186 (install-pom-file "pom.xml")))))
4187 (propagated-inputs
4188 `(("plexus-parent-pom" ,plexus-parent-pom-4.0)))))
4189
4190(define-public java-plexus-component-annotations-1.7
4191 (package
4192 (inherit java-plexus-container-default-1.7)
4193 (name "java-plexus-component-annotations")
4194 (arguments
4195 `(#:jar-name "plexus-component-annotations.jar"
4196 #:source-dir "plexus-component-annotations/src/main/java"
4197 #:tests? #f; no tests
4198 #:phases
4199 (modify-phases %standard-phases
4200 (replace 'install
4201 (install-from-pom "plexus-component-annotations/pom.xml")))))
4202 (propagated-inputs
4203 `(("java-plexus-containers-parent-pom-1.7" ,java-plexus-containers-parent-pom-1.7)))
4204 (inputs '())
4205 (native-inputs '())
4206 (synopsis "Plexus descriptors generator")
4207 (description "This package is a Maven plugin to generate Plexus descriptors
4208from source tags and class annotations.")))
4209
4210(define-public java-plexus-component-metadata-1.7
4211 (package
4212 (inherit java-plexus-container-default-1.7)
4213 (name "java-plexus-component-metadata")
4214 (arguments
4215 `(#:jar-name "plexus-component-metadata.jar"
4216 #:source-dir "src/main/java"
4217 #:test-dir "src/test"
4218 #:phases
4219 (modify-phases %standard-phases
4220 (add-before 'configure 'chdir
4221 (lambda _
4222 (chdir "plexus-component-metadata")
4223 #t))
4224 (add-before 'build 'copy-resources
4225 (lambda _
4226 (copy-recursively "src/main/resources"
4227 "build/classes/")
4228 #t))
4229 (add-before 'build 'fix-jdom
4230 (lambda _
4231 ;; The newer version of jdom now sets multiple features by default
4232 ;; that are not supported.
4233 ;; Skip these features
4234 (substitute* "src/main/java/org/codehaus/plexus/metadata/merge/MXParser.java"
4235 (("throw new XmlPullParserException\\(\"unsupporte feature \"\\+name\\);")
4236 "// skip"))))
4237 (add-before 'check 'fix-test-location
4238 (lambda _
4239 (substitute* '("src/test/java/org/codehaus/plexus/metadata/DefaultComponentDescriptorWriterTest.java"
4240 "src/test/java/org/codehaus/plexus/metadata/merge/ComponentsXmlMergerTest.java")
4241 (("target") "build")))))))
4242 (propagated-inputs
4243 (list java-plexus-container-default-1.7
4244 java-plexus-component-annotations-1.7
4245 java-plexus-utils
4246 java-plexus-cli
4247 java-plexus-cli
4248 java-plexus-classworlds
4249 maven-plugin-api
4250 maven-plugin-annotations
4251 maven-core-bootstrap
4252 maven-model
4253 java-commons-cli
4254 java-qdox
4255 java-jdom2
4256 java-asm-8))
4257 (native-inputs
4258 (list java-junit java-guava java-geronimo-xbean-reflect))
4259 (synopsis "Inversion-of-control container for Maven")
4260 (description "The Plexus project provides a full software stack for creating
4261and executing software projects. Based on the Plexus container, the
4262applications can utilise component-oriented programming to build modular,
4263reusable components that can easily be assembled and reused. This package
4264provides the Maven plugin generating the component metadata.")))
4265
4266(define-public java-plexus-cipher
4267 (package
4268 (name "java-plexus-cipher")
4269 (version "2.0")
4270 (source (origin
4271 (method git-fetch)
4272 (uri (git-reference
4273 (url "https://github.com/codehaus-plexus/plexus-cipher")
4274 (commit (string-append "plexus-cipher-" version))))
4275 (file-name (git-file-name name version))
4276 (sha256
4277 (base32
4278 "01fipdsm090n8j4207fl8kbxznkgkmkkgyazf53hm1nwn6na5aai"))))
4279 (build-system ant-build-system)
4280 (arguments
4281 `(#:jar-name "plexus-cipher.jar"
4282 #:source-dir "src/main/java"
4283 #:phases
4284 (modify-phases %standard-phases
4285 (add-before 'build 'generate-javax.inject.Named
4286 (lambda _
4287 (mkdir-p "build/classes/META-INF/sisu")
4288 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
4289 (lambda _
4290 (display
4291 "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
4292 #t))
4293 (replace 'install (install-from-pom "pom.xml")))))
4294 (inputs
4295 `(("java-cdi-api" ,java-cdi-api)
4296 ("java-javax-inject" ,java-javax-inject)))
4297 (propagated-inputs
4298 `(("java-sonatype-spice-parent-pom" ,java-sonatype-spice-parent-pom-15)
4299 ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)))
4300 (native-inputs
4301 `(("java-junit" ,java-junit)))
4302 (home-page "https://github.com/sonatype/plexus-cipher")
4303 (synopsis "Encryption/decryption Component")
4304 (description "Plexus-cipher contains a component to deal with encryption
4305and decryption.")
4306 (license license:asl2.0)))
4307
4308(define-public java-plexus-cipher-1.7
4309 (package
4310 (inherit java-plexus-cipher)
4311 (version "1.7")
4312 (source (origin
4313 (method git-fetch)
4314 (uri (git-reference
4315 (url "https://github.com/codehaus-plexus/plexus-cipher")
4316 (commit (string-append "plexus-cipher-" version))))
4317 (file-name (git-file-name "java-plexus-cipher" version))
4318 (sha256
4319 (base32
4320 "0m638nzlxbmnbcj5cwdpgs326ab584yv0k803zlx37r6iqwvf6b0"))))
4321 (arguments
4322 `(#:jar-name "plexus-cipher.jar"
4323 #:source-dir "src/main/java"
4324 #:tests? #f; FIXME: requires sisu-inject-bean
4325 #:phases
4326 (modify-phases %standard-phases
4327 (add-before 'build 'copy-resources
4328 (lambda _
4329 (copy-recursively "src/main/resources" "build/classes")
4330 (mkdir-p "build/classes/META-INF/sisu")
4331 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
4332 (lambda _
4333 (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
4334 #t))
4335 (add-before 'install 'fix-test-dependency
4336 (lambda _
4337 ;; sisu-inject-bean is only used for tests, but its scope is "provided".
4338 (substitute* "pom.xml"
4339 (("provided") "test"))
4340 #t))
4341 (replace 'install (install-from-pom "pom.xml")))))
4342 (propagated-inputs
4343 (list java-sonatype-spice-parent-pom-15))))
4344
4345(define-public java-plexus-java
4346 (package
4347 (name "java-plexus-java")
4348 (version "0.9.10")
4349 (source (origin
4350 (method git-fetch)
4351 (uri (git-reference
4352 (url "https://github.com/codehaus-plexus/plexus-languages")
4353 (commit (string-append "plexus-languages-" version))))
4354 (file-name (git-file-name name version))
4355 (sha256
4356 (base32
4357 "0vmvgq5hfxs90yyxgssfpwq78l7vwx1ljwpkk594mrdr8sm668b5"))
4358 (modules '((guix build utils)))
4359 (snippet
4360 `(begin
4361 (for-each delete-file (find-files "." ".*.jar$"))
4362 #t))))
4363 (build-system ant-build-system)
4364 (arguments
4365 `(#:jar-name "plexus-java.java"
4366 #:source-dir "plexus-java/src/main/java"
4367 #:test-dir "plexus-java/src/test"
4368 #:tests? #f; require mockito 2
4369 #:phases
4370 (modify-phases %standard-phases
4371 (add-after 'build 'generate-metadata
4372 (lambda _
4373 (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes")
4374 "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli"
4375 "--source" "plexus-java/src/main/java"
4376 "--output" "build/classes/META-INF/plexus/components.xml"
4377 "--classes" "build/classes"
4378 "--descriptors" "build/classes/META-INF")
4379 (invoke "ant" "jar")
4380 #t))
4381 (add-before 'install 'install-parent
4382 (install-pom-file "pom.xml"))
4383 (replace 'install
4384 (install-from-pom "plexus-java/pom.xml")))))
4385 (propagated-inputs
4386 (list java-asm java-qdox-2-M9 java-javax-inject
4387 plexus-parent-pom-4.0))
4388 (inputs
4389 (list java-plexus-component-annotations-1.7))
4390 (native-inputs
4391 (list java-plexus-component-metadata-1.7 java-junit))
4392 (home-page "https://codehaus-plexus.github.io/plexus-languages/plexus-java")
4393 (synopsis "Shared language features for Java")
4394 (description "This package contains shared language features of the Java
4395language, for the plexus project.")
4396 (license license:asl2.0)))
4397
4398(define-public java-plexus-compiler-api
4399 (package
4400 (name "java-plexus-compiler-api")
4401 (version "2.8.4")
4402 (source (origin
4403 (method git-fetch)
4404 (uri (git-reference
4405 (url "https://github.com/codehaus-plexus/plexus-compiler")
4406 (commit (string-append "plexus-compiler-" version))))
4407 (file-name (git-file-name name version))
4408 (sha256
4409 (base32
4410 "1nq1gnn3s6z1j29gmi1hqbklsmm8b1lmnafb0191914f95mn18gk"))))
4411 (build-system ant-build-system)
4412 (arguments
4413 `(#:jar-name "plexus-compiler-api.jar"
4414 #:source-dir "plexus-compiler-api/src/main/java"
4415 #:test-dir "plexus-compiler-api/src/test"
4416 #:phases
4417 (modify-phases %standard-phases
4418 (replace 'install
4419 (install-from-pom "plexus-compiler-api/pom.xml")))))
4420 (propagated-inputs
4421 `(("java-plexus-container-default" ,java-plexus-container-default)
4422 ("java-plexus-compiler-pom" ,java-plexus-compiler-pom)
4423 ("java-plexus-util" ,java-plexus-utils)))
4424 (native-inputs
4425 (list java-junit))
4426 (home-page "https://github.com/codehaus-plexus/plexus-compiler")
4427 (synopsis "Plexus Compilers component's API to manipulate compilers")
4428 (description "This package contains the API used by components to manipulate
4429compilers.")
4430 (license (list license:asl2.0
4431 license:expat))))
4432
4433(define java-plexus-compiler-pom
4434 (package
4435 (inherit java-plexus-compiler-api)
4436 (name "java-plexus-compiler-pom")
4437 (arguments
4438 `(#:tests? #f
4439 #:phases
4440 (modify-phases %standard-phases
4441 (delete 'configure)
4442 (delete 'build)
4443 (replace 'install
4444 (install-pom-file "pom.xml"))
4445 (add-after 'install 'install-compilers
4446 (install-pom-file "plexus-compilers/pom.xml")))))
4447 (propagated-inputs
4448 `(("plexus-components-parent-pom-4.0" ,plexus-components-parent-pom-4.0)))))
4449
4450(define plexus-components-parent-pom-4.0
4451 (package
4452 (name "plexus-components-parent-pom")
4453 (version "4.0")
4454 (source (origin
4455 (method git-fetch)
4456 (uri (git-reference
4457 (url "https://github.com/codehaus-plexus/plexus-components")
4458 (commit (string-append "plexus-components-" version))))
4459 (file-name (git-file-name name version))
4460 (sha256
4461 (base32
4462 "041bm8yv0m2i17mqg8zljib4ykpha7ijls2qfdwvkma4d39lhysi"))))
4463 (build-system ant-build-system)
4464 (arguments
4465 `(#:tests? #f
4466 #:phases
4467 (modify-phases %standard-phases
4468 (delete 'configure)
4469 (delete 'build)
4470 (replace 'install
4471 (install-pom-file "pom.xml")))))
4472 (propagated-inputs
4473 `(("plexus-parent-pom-4.0" ,plexus-parent-pom-4.0)))
4474 (home-page "https://codehaus-plexus.github.io/plexus-components")
4475 (synopsis "Plexus parent pom")
4476 (description "This package contains the Plexus components parent POM.")
4477 (license license:asl2.0)))
4478
4479(define-public java-plexus-compiler-manager
4480 (package
4481 (inherit java-plexus-compiler-api)
4482 (name "java-plexus-compiler-manager")
4483 (arguments
4484 `(#:jar-name "compiler-compiler-manager.java"
4485 #:source-dir "plexus-compiler-manager/src/main/java"
4486 #:test-dir "plexus-compiler-manager/src/test"
4487 #:tests? #f
4488 #:phases
4489 (modify-phases %standard-phases
4490 (add-after 'build 'generate-metadata
4491 (lambda _
4492 (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes")
4493 "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli"
4494 "--source" "plexus-compiler-manager/src/main/java"
4495 "--output" "build/classes/META-INF/plexus/components.xml"
4496 "--classes" "build/classes"
4497 "--descriptors" "build/classes/META-INF")
4498 (invoke "ant" "jar")
4499 #t))
4500 (add-after 'generate-metadata 'rebuild
4501 (lambda _
4502 (invoke "ant" "jar")
4503 #t))
4504 (replace 'install
4505 (install-from-pom "plexus-compiler-manager/pom.xml")))))
4506 (propagated-inputs
4507 (list java-plexus-compiler-api java-plexus-compiler-pom
4508 java-plexus-container-default-1.7))
4509 (native-inputs
4510 (list unzip java-plexus-component-metadata-1.7))
4511 (synopsis "Compiler management for Plexus Compiler component")
4512 (description "Plexus Compiler is a Plexus component to use different
4513compilers through a uniform API. This component chooses the compiler
4514implementation to use in a project.")))
4515
4516(define-public java-plexus-compiler-javac
4517 (package
4518 (inherit java-plexus-compiler-api)
4519 (name "java-plexus-compiler-javac")
4520 (arguments
4521 `(#:jar-name "plexus-compiler-javac.jar"
4522 #:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java"
4523 #:jdk ,icedtea-8
4524 #:tests? #f; depends on compiler-test -> maven-core -> ... -> this package.
4525 #:test-dir "plexus-compilers/plexus-compiler-javac/src/test"
4526 #:modules ((guix build ant-build-system)
4527 (guix build utils)
4528 (guix build java-utils)
4529 (sxml simple))
4530 #:phases
4531 (modify-phases %standard-phases
4532 ;; We cannot use java-plexus-component-metadata to generate the metadata
4533 ;; because it ultimately depends on this package.
4534 ;; Create it manually instead
4535 (add-before 'build 'create-metadata
4536 (lambda _
4537 (let* ((dir "build/classes/META-INF/plexus")
4538 (file (string-append dir "/components.xml")))
4539 (mkdir-p dir)
4540 (with-output-to-file file
4541 (lambda _
4542 (sxml->xml
4543 `(component-set
4544 (components
4545 (component
4546 (role "org.codehaus.plexus.compiler.Compiler")
4547 (role-hint "javac")
4548 (implementation "org.codehaus.plexus.compiler.javac.JavacCompiler")
4549 (isolated-realm "false"))))))))
4550 #t))
4551 (replace 'install
4552 (install-from-pom "plexus-compilers/plexus-compiler-javac/pom.xml")))))
4553 (propagated-inputs
4554 (list java-plexus-compiler-api java-plexus-utils
4555 java-plexus-container-default))
4556 (synopsis "Javac Compiler support for Plexus Compiler component")
4557 (description "This package contains the Javac Compiler support for Plexus
4558Compiler component.")))
4559
4560(define plexus-components-pom-1.1.20
4561 (package
4562 (name "plexus-components-pom-1.1.20")
4563 (version "1.1.20")
4564 (source (origin
4565 (method git-fetch)
4566 (uri (git-reference
4567 (url "https://github.com/codehaus-plexus/plexus-components")
4568 (commit (string-append "plexus-components-" version))))
4569 (file-name (git-file-name name version))
4570 (sha256
4571 (base32
4572 "1q254k95m9icyfsvaw8c226midg8v6v436wvivhv7im825mnp5yb"))))
4573 (build-system ant-build-system)
4574 (arguments
4575 `(#:tests? #f
4576 #:phases
4577 (modify-phases %standard-phases
4578 (delete 'configure)
4579 (delete 'build)
4580 (replace 'install
4581 (install-pom-file "pom.xml")))))
4582 (propagated-inputs
4583 `(("plexus-parent-pom" ,plexus-parent-pom-3.1)))
4584 (home-page "https://github.com/codehaus-plexus/plexus-components")
4585 (synopsis "Maven parent pom for plexus packages")
4586 (description "This package contains the parent pom for plexus component
4587packages.")
4588 (license license:asl2.0)))
4589
4590(define-public java-plexus-digest
4591 (package
4592 (name "java-plexus-digest")
4593 (version "1.2")
4594 (source (origin
4595 (method git-fetch)
4596 (uri (git-reference
4597 (url "https://github.com/codehaus-plexus/plexus-digest")
4598 (commit "2a52ad1bda8297fa0e287163d2fa37245ec6a430")))
4599 (file-name (git-file-name name version))
4600 (sha256
4601 (base32
4602 "19w5wxsliz8r42niry68qa665kvjsb8081dazg9vgd3pca72w07x"))))
4603 (build-system ant-build-system)
4604 (arguments
4605 `(#:jar-name "plexus-digest.jar"
4606 #:source-dir "src/main/java"
4607 #:tests? #f
4608 #:phases
4609 (modify-phases %standard-phases
4610 (replace 'install
4611 (install-from-pom "pom.xml")))))
4612 (propagated-inputs
4613 (list java-plexus-utils plexus-components-pom-1.1.20))
4614 (native-inputs
4615 (list java-junit))
4616 (home-page "https://github.com/codehaus-plexus/plexus-digest")
4617 (synopsis "Hash function utilities for Java")
4618 (description "This package is a plexus component that contains hash
4619function utilities.")
4620 (license license:asl2.0)))
4621
4622(define-public java-plexus-sec-dispatcher
4623 (package
4624 (name "java-plexus-sec-dispatcher")
4625 (version "2.0")
4626 (source (origin
4627 (method git-fetch)
4628 (uri (git-reference
4629 (url "https://github.com/codehaus-plexus/plexus-sec-dispatcher")
4630 (commit (string-append "plexus-sec-dispatcher-" version))))
4631 (sha256
4632 (base32
4633 "0665zcyxkv2knydxgv2dn64zvy1dx9j9af12ds9s64qmzd1rk6pk"))
4634 (file-name (git-file-name name version))))
4635 (arguments
4636 `(#:jar-name "plexus-sec-dispatcher.jar"
4637 #:source-dir "src/main/java"
4638 #:phases
4639 (modify-phases %standard-phases
4640 (add-before 'build 'generate-models
4641 (lambda* (#:key inputs #:allow-other-keys)
4642 (define (modello-single-mode file version mode)
4643 (invoke "java"
4644 "org.codehaus.modello.ModelloCli"
4645 file mode "src/main/java" version
4646 "false" "true"))
4647 (let ((file "src/main/mdo/settings-security.mdo"))
4648 (modello-single-mode file "1.0.0" "java")
4649 (modello-single-mode file "1.0.0" "xpp3-reader")
4650 (modello-single-mode file "1.0.0" "xpp3-writer"))
4651 #t))
4652 (add-before 'build 'generate-javax.inject.Named
4653 (lambda _
4654 (mkdir-p "build/classes/META-INF/sisu")
4655 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
4656 (lambda _
4657 (display
4658 "org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher\n")))
4659 #t))
4660 (add-before 'check 'fix-paths
4661 (lambda _
4662 (copy-recursively "src/test/resources" "target")
4663 #t))
4664 (replace 'install (install-from-pom "pom.xml")))))
4665 (propagated-inputs
4666 (list java-plexus-utils java-plexus-cipher plexus-parent-pom-8))
4667 (native-inputs
4668 (list java-javax-inject
4669 java-modello-core
4670 ;; for modello
4671 java-plexus-container-default
4672 java-plexus-classworlds
4673 java-plexus-utils
4674 java-guava
4675 java-geronimo-xbean-reflect
4676 ;; modello plugins
4677 java-modello-plugins-java
4678 java-modello-plugins-xml
4679 java-modello-plugins-xpp3
4680 ;; for tests
4681 java-junit))
4682 (build-system ant-build-system)
4683 (home-page "https://github.com/sonatype/plexus-sec-dispatcher")
4684 (synopsis "Plexus Security Dispatcher Component")
4685 (description "This package is the Plexus Security Dispatcher Component.
4686This component decrypts a string passed to it.")
4687 (license license:asl2.0)))
4688
4689(define-public java-plexus-sec-dispatcher-1.4
4690 (package
4691 (inherit java-plexus-sec-dispatcher)
4692 (version "1.4")
4693 (source (origin
4694 (method git-fetch)
4695 (uri (git-reference
4696 (url "https://github.com/codehaus-plexus/plexus-sec-dispatcher")
4697 (commit (string-append "sec-dispatcher-" version))))
4698 (sha256
4699 (base32
4700 "1ng4yliy4cqpjr4fxxjbpwyk1wkch5f8vblm1kvwf328s4gibszs"))
4701 (file-name (git-file-name "java-plexus-sec-dispatcher" version))))
4702 (arguments
4703 (substitute-keyword-arguments (package-arguments java-plexus-sec-dispatcher)
4704 ((#:phases phases)
4705 `(modify-phases ,phases
4706 (delete 'generate-javax.inject.Named)
4707 (add-before 'build 'generate-components.xml
4708 (lambda _
4709 (mkdir-p "build/classes/META-INF/plexus")
4710 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
4711 (lambda _
4712 (display
4713 "<component-set>\n
4714 <components>\n
4715 <component>\n
4716 <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n
4717 <role-hint>default</role-hint>\n
4718 <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n
4719 <description></description>\n
4720 <requirements>\n
4721 <requirement>\n
4722 <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n
4723 <field-name>_cipher</field-name>\n
4724 </requirement>\n
4725 <requirement>\n
4726 <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n
4727 <field-name>_decryptors</field-name>\n
4728 </requirement>\n
4729 </requirements>\n
4730 <configuration>\n
4731 <_configuration-file>~/.settings-security.xml</_configuration-file>\n
4732 </configuration>\n
4733 </component>\n
4734 </components>\n
4735</component-set>\n")))))))))
4736 (propagated-inputs
4737 (list java-plexus-utils java-plexus-cipher-1.7
4738 java-sonatype-spice-parent-pom-12))))
4739
4740(define-public java-plexus-cli
4741 (package
4742 (name "java-plexus-cli")
4743 (version "1.7")
4744 (source (origin
4745 (method git-fetch)
4746 (uri (git-reference
4747 (url "https://github.com/sonatype/plexus-cli")
4748 (commit "a776afa6bca84e5107bedb69440329cdb24ed645")))
4749 (file-name (string-append name "-" version))
4750 (sha256
4751 (base32
4752 "0xjrlay605rypv3zd7y24vlwf0039bil3n2cqw54r1ddpysq46vx"))))
4753 (build-system ant-build-system)
4754 (arguments
4755 `(#:jar-name "plexus-cli.jar"
4756 #:source-dir "src/main/java"
4757 #:jdk ,icedtea-8
4758 #:test-dir "src/test"))
4759 (inputs
4760 (list java-commons-cli java-plexus-container-default
4761 java-plexus-classworlds))
4762 (native-inputs
4763 (list java-plexus-utils java-junit java-guava))
4764 (home-page "https://codehaus-plexus.github.io/plexus-cli")
4765 (synopsis "CLI building library for plexus")
4766 (description "This package is a library to help creating CLI around
4767Plexus components.")
4768 (license license:asl2.0)))
4769
4770(define-public java-plexus-build-api
4771 (package
4772 (name "java-plexus-build-api")
4773 (version "0.0.7")
4774 (source (origin
4775 (method git-fetch)
4776 (uri (git-reference
4777 (url "https://github.com/codehaus-plexus/plexus-build-api")
4778 (commit (string-append "plexus-build-api-" version))))
4779 (file-name (git-file-name name version))
4780 (sha256
4781 (base32
4782 "1d5w6c58gkx30d51v7qwv1xrhc0ly76848gihmgshj19yf6yhca0"))))
4783 (build-system ant-build-system)
4784 (arguments
4785 `(#:jar-name "plexus-build-api.jar"
4786 #:source-dir "src/main/java"
4787 #:jdk ,icedtea-8
4788 #:tests? #f; FIXME: how to run the tests?
4789 #:phases
4790 (modify-phases %standard-phases
4791 (add-before 'build 'copy-resources
4792 (lambda _
4793 (copy-recursively "src/main/resources" "build/classes")
4794 (substitute* (find-files "build/classes")
4795 (("\\$\\{project.version\\}") ,version))
4796 #t))
4797 (add-before 'build 'generate-plexus-compontent
4798 (lambda _
4799 (mkdir-p "build/classes/META-INF/plexus")
4800 ;; This file is required for plexus to inject this package.
4801 ;; FIXME: how is it generated?
4802 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
4803 (lambda _
4804 (display
4805 "<component-set>\n
4806 <components>\n
4807 <component>\n
4808 <role>org.sonatype.plexus.build.incremental.BuildContext</role>\n
4809 <role-hint>default</role-hint>\n
4810 <implementation>org.sonatype.plexus.build.incremental.DefaultBuildContext</implementation>\n
4811 <description>Filesystem based non-incremental build context implementation\n
4812which behaves as if all files were just created.</description>\n
4813 </component>\n
4814 </components>\n
4815</component-set>\n")))
4816 #t))
4817 (replace 'install
4818 (install-from-pom "pom.xml")))))
4819 (inputs
4820 (list java-plexus-utils-3.2.1 java-plexus-container-default))
4821 (home-page "https://github.com/codehaus-plexus/plexus-build-api/")
4822 (synopsis "Base build API for maven")
4823 (description "This package contains the base build API for maven and
4824a default implementation of it. This API is about scanning files in a
4825project and determining what files need to be rebuilt.")
4826 (license license:asl2.0)))
4827
4828(define-public java-modello-core
4829 (package
4830 (name "java-modello-core")
4831 (version "1.11")
4832 (source (origin
4833 (method git-fetch)
4834 (uri (git-reference
4835 (url "https://github.com/codehaus-plexus/modello")
4836 (commit (string-append "modello-" version))))
4837 (file-name (git-file-name name version))
4838 (sha256
4839 (base32
4840 "18885sim7z9j3wy19i9083y9kc8l9xxl2px823a96q4rnqj5z8s2"))))
4841 (build-system ant-build-system)
4842 (arguments
4843 `(#:jar-name "modello-core.jar"
4844 #:source-dir "modello-core/src/main/java"
4845 #:test-dir "modello-core/src/test"
4846 #:main-class "org.codehaus.modello.ModelloCli"
4847 #:jdk ,icedtea-8
4848 #:phases
4849 (modify-phases %standard-phases
4850 (add-before 'build 'copy-resources
4851 (lambda _
4852 (mkdir-p "build/classes/META-INF/plexus")
4853 (copy-file "modello-core/src/main/resources/META-INF/plexus/components.xml"
4854 "build/classes/META-INF/plexus/components.xml")
4855 #t))
4856 (add-before 'check 'fix-tests
4857 (lambda _
4858 (with-directory-excursion "modello-core/src/test/java/org/codehaus"
4859 (substitute* '("modello/core/DefaultModelloCoreTest.java"
4860 "modello/core/io/ModelReaderTest.java")
4861 (("src/test") "modello-core/src/test")))
4862 #t)))))
4863 (propagated-inputs
4864 (list java-plexus-utils java-plexus-container-default
4865 java-plexus-build-api))
4866 (native-inputs
4867 (list java-junit java-plexus-classworlds java-geronimo-xbean-reflect
4868 java-guava))
4869 (home-page "https://codehaus-plexus.github.io/modello/")
4870 (synopsis "Framework for code generation from a simple model")
4871 (description "Modello is a framework for code generation from a simple model.
4872
4873Modello generates code from a simple model format: based on a plugin
4874architecture, various types of code and descriptors can be generated from the
4875single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers,
4876XSD and documentation.")
4877 (license (list
4878 license:expat
4879 ;; Although this package uses only files licensed under expat,
4880 ;; other parts of the source are licensed under different
4881 ;; licenses. We include them to be inherited by other packages.
4882 license:asl2.0
4883 ;; Some files in modello-plugin-java are licensed under a
4884 ;; 5-clause BSD license.
4885 (license:non-copyleft
4886 (string-append "file:///modello-plugins/modello-plugin-java/"
4887 "src/main/java/org/codehaus/modello/plugin/"
4888 "java/javasource/JNaming.java"))))))
4889
4890(define-public java-modello-plugins-java
4891 (package
4892 (inherit java-modello-core)
4893 (name "java-modello-plugins-java")
4894 (arguments
4895 `(#:jar-name "modello-plugins-java.jar"
4896 #:source-dir "modello-plugins/modello-plugin-java/src/main/java"
4897 #:test-dir "modello-plugins/modello-plugin-java/src/test"
4898 #:jdk ,icedtea-8
4899 #:tests? #f; requires maven-model, which depends on this package
4900 #:phases
4901 (modify-phases %standard-phases
4902 (add-before 'build 'copy-resources
4903 (lambda _
4904 (mkdir-p "build/classes")
4905 (copy-recursively "modello-plugins/modello-plugin-java/src/main/resources"
4906 "build/classes")
4907 #t)))))
4908 (inputs
4909 (list java-modello-core))
4910 (synopsis "Modello Java Plugin")
4911 (description "Modello Java Plugin generates Java objects for the model.")))
4912
4913(define-public java-modello-plugins-xml
4914 (package
4915 (inherit java-modello-core)
4916 (name "java-modello-plugins-xml")
4917 (arguments
4918 `(#:jar-name "modello-plugins-xml.jar"
4919 #:source-dir "modello-plugins/modello-plugin-xml/src/main/java"
4920 #:test-dir "modello-plugins/modello-plugin-xml/src/test"
4921 #:jdk ,icedtea-8
4922 #:phases
4923 (modify-phases %standard-phases
4924 (add-before 'build 'copy-resources
4925 (lambda _
4926 (mkdir-p "build/classes")
4927 (copy-recursively
4928 "modello-plugins/modello-plugin-xml/src/main/resources"
4929 "build/classes")
4930 #t))
4931 (add-before 'check 'fix-paths
4932 (lambda _
4933 (with-directory-excursion "modello-plugins/modello-plugin-xml/src/test"
4934 (substitute*
4935 "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java"
4936 (("src/test") "modello-plugins/modello-plugin-xml/src/test")))
4937 #t)))))
4938 (propagated-inputs
4939 (list java-modello-core java-modello-plugins-java))
4940 (synopsis "Modello XML Plugin")
4941 (description "Modello XML Plugin contains shared code for every plugins
4942working on XML representation of the model.")))
4943
4944(define-public java-modello-test
4945 (package
4946 (inherit java-modello-core)
4947 (name "java-modello-test")
4948 (arguments
4949 `(#:jar-name "modello-test.jar"
4950 #:source-dir "modello-test/src/main/java"
4951 #:tests? #f; no tests
4952 #:jdk ,icedtea-8))
4953 (inputs
4954 (list java-plexus-utils java-plexus-compiler-api
4955 java-plexus-compiler-javac java-plexus-container-default))
4956 (synopsis "Modello test package")
4957 (description "The modello test package contains the basis to create
4958Modello generator unit-tests, including sample models and xml files to test
4959every feature for every plugin.")))
4960
4961(define-public java-modello-plugins-xpp3
4962 (package
4963 (inherit java-modello-core)
4964 (name "java-modello-plugins-xpp3")
4965 (arguments
4966 `(#:jar-name "modello-plugins-xpp3.jar"
4967 #:source-dir "modello-plugins/modello-plugin-xpp3/src/main/java"
4968 #:test-dir "modello-plugins/modello-plugin-xpp3/src/test"
4969 ;; One of the test dependencies is maven-model which depends on this package.
4970 #:tests? #f
4971 #:jdk ,icedtea-8
4972 #:phases
4973 (modify-phases %standard-phases
4974 (add-before 'build 'copy-resources
4975 (lambda _
4976 (mkdir-p "build/classes")
4977 (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources"
4978 "build/classes")
4979 #t)))))
4980 (propagated-inputs
4981 (list java-modello-core java-modello-plugins-java
4982 java-modello-plugins-xml))
4983 (native-inputs
4984 (modify-inputs (package-native-inputs java-modello-core)
4985 (prepend java-xmlunit java-modello-test)))
4986 (synopsis "Modello XPP3 Plugin")
4987 (description "The modello XPP3 plugin generates XML readers and writers based
4988on the XPP3 API (XML Pull Parser).")))
4989
4990(define-public java-ow-util-ant-tasks
4991 (package
4992 (name "java-ow-util-ant-tasks")
4993 (version "1.3.2")
4994 (source (origin
4995 (method url-fetch)
4996 (uri (string-append
4997 "mirror://debian/pool/main/o/ow-util-ant-tasks/"
4998 "ow-util-ant-tasks_" version ".orig.tar.gz"))
4999 (sha256
5000 (base32
5001 "1y5ln1g36aligwcadqksdj18i5ghqnxn523wjbzy2zyd7w58fgy5"))))
5002 (build-system ant-build-system)
5003 (arguments
5004 `(#:jar-name "ow-util-ant-tasks.jar"
5005 #:tests? #f; no tests
5006 #:phases
5007 (modify-phases %standard-phases
5008 (add-before 'build 'delete-cyclic-dependency
5009 (lambda _
5010 ;; This file depends on asm-3, which depends on this package
5011 (delete-file "src/org/objectweb/util/ant/DependencyAnalyzer.java")
5012 ;; This file depends on xalan
5013 (delete-file "src/org/objectweb/util/ant/Xalan2Liaison.java")))
5014 (add-before 'build 'fix-new-ant
5015 (lambda _
5016 (substitute* "src/org/objectweb/util/ant/MultipleCopy.java"
5017 ((", destFile.getAbsolutePath\\(\\)")
5018 ", new String[] { destFile.getAbsolutePath() }")))))))
5019 (home-page "https://packages.debian.org/source/stretch/ow-util-ant-tasks")
5020 (synopsis "Replacement for base ant tasks")
5021 (description "This library is used in the legacy build process of several
5022key frameworks developed by ObjectWeb, among them legacy versions of the
5023ObjectWeb ASM bytecode manipulation framework.")
5024 (license license:lgpl2.0+)))
5025
5026(define-public java-asm
5027 (package
5028 (name "java-asm")
5029 (version "6.0")
5030 (source (origin
5031 (method url-fetch)
5032 (uri (string-append "https://download.forge.ow2.org/asm/"
5033 "asm-" version ".tar.gz"))
5034 (sha256
5035 (base32
5036 "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00"))))
5037 (build-system ant-build-system)
5038 (arguments
5039 `(#:build-target "compile"
5040 ;; The tests require an old version of Janino, which no longer compiles
5041 ;; with the JDK7.
5042 #:tests? #f
5043 #:make-flags
5044 (list
5045 ;; We don't need these extra ant tasks, but the build system asks us to
5046 ;; provide a path anyway.
5047 "-Dobjectweb.ant.tasks.path=dummy-path"
5048 ;; The java-aqute.bndlib JAR file will be put onto the classpath and
5049 ;; used during the build automatically by ant-build-system, but
5050 ;; java-asm's build.xml fails unless we provide something here.
5051 "-Dbiz.aQute.bnd.path=dummy-path")
5052 #:phases
5053 (modify-phases %standard-phases
5054 (add-before 'build 'remove-bnd-dependency
5055 (lambda _
5056 ;; This file is the only one to require bnd, and is not needed
5057 ;; because we don't build a bundle.
5058 (delete-file "src/org/objectweb/asm/tools/ModuleInfoBndPlugin.java")
5059 #t))
5060 (add-before 'install 'build-jars
5061 (lambda* (#:key make-flags #:allow-other-keys)
5062 ;; We cannot use the "jar" target because it depends on a couple
5063 ;; of unpackaged, complicated tools.
5064 (mkdir "dist")
5065 (invoke "jar"
5066 "-cf" (string-append "dist/asm-" ,version ".jar")
5067 "-C" "output/build/tmp" ".")))
5068 (add-before 'install 'fix-pom
5069 (lambda _
5070 (substitute* (find-files "archive" "\\.pom$")
5071 (("@product.artifact@") ,version))
5072 #t))
5073 (add-before 'install 'install-parent
5074 (install-pom-file "archive/asm-parent.pom"))
5075 (replace 'install
5076 (install-from-pom "archive/asm.pom")))))
5077 (native-inputs
5078 (list java-junit))
5079 (propagated-inputs
5080 (list java-org-ow2-parent-pom-1.3))
5081 (home-page "https://asm.ow2.io/")
5082 (synopsis "Very small and fast Java bytecode manipulation framework")
5083 (description "ASM is an all purpose Java bytecode manipulation and
5084analysis framework. It can be used to modify existing classes or dynamically
5085generate classes, directly in binary form. The provided common
5086transformations and analysis algorithms allow easily assembling custom
5087complex transformations and code analysis tools.")
5088 (license license:bsd-3)))
5089
5090(define-public java-org-ow2-parent-pom-1.3
5091 (package
5092 (name "java-org-ow2-parent-pom")
5093 (version "1.3")
5094 (source (origin
5095 (method url-fetch)
5096 (uri "https://repo1.maven.org/maven2/org/ow2/ow2/1.3/ow2-1.3.pom")
5097 (sha256
5098 (base32
5099 "1yr8hfx8gffpppa4ii6cvrsq029a6x8hzy7nsavxhs60s9kmq8ai"))))
5100 (build-system ant-build-system)
5101 (arguments
5102 `(#:tests? #f
5103 #:phases
5104 (modify-phases %standard-phases
5105 (delete 'unpack)
5106 (delete 'build)
5107 (delete 'configure)
5108 (replace 'install
5109 ,#~(install-pom-file #$source)))))
5110 (home-page "https://ow2.org")
5111 (synopsis "Ow2.org parent pom")
5112 (description "This package contains the parent pom for projects from ow2.org,
5113including java-asm.")
5114 (properties '((hidden? . #t)))
5115 (license license:lgpl2.1+)))
5116
5117(define-public java-asm-bootstrap
5118 (package
5119 (inherit java-asm)
5120 (name "java-asm-bootstrap")
5121 (properties '((hidden? . #t)))
5122 (arguments
5123 (substitute-keyword-arguments (package-arguments java-asm)
5124 ((#:tests? _) #f)))
5125 (native-inputs `())))
5126
5127(define-public java-asm-3
5128 (package
5129 (inherit java-asm)
5130 (version "3.1")
5131 (source (origin
5132 (method git-fetch)
5133 (uri (git-reference
5134 (url "https://gitlab.ow2.org/asm/asm")
5135 (commit "ASM_3_1")))
5136 (file-name (git-file-name "java-asm" version))
5137 (sha256
5138 (base32
5139 "0xbyf2sl8j6mrvfpg2da0vjdp906rac62l66gkk82x5cn3vc30h4"))
5140 (modules '((guix build utils)))
5141 (snippet `(for-each delete-file (find-files "." "\\.jar$")))))
5142 (arguments
5143 `(#:build-target "jar"
5144 #:test-target "test"
5145 #:tests? #f; require legacy test software
5146 #:phases
5147 (modify-phases %standard-phases
5148 (replace 'install (install-jars "output/dist"))
5149 (delete 'generate-jar-indices))))
5150 (native-inputs (list java-ow-util-ant-tasks))))
5151
5152(define-public java-asm-8
5153 (package
5154 (inherit java-asm)
5155 (version "8.0.1")
5156 (source (origin
5157 (method git-fetch)
5158 (uri (git-reference
5159 (url "https://gitlab.ow2.org/asm/asm")
5160 (commit (string-append
5161 "ASM_" (string-join (string-split version #\.)
5162 "_")))))
5163 (file-name (git-file-name "java-asm" version))
5164 (sha256
5165 (base32
5166 "1s6j27zc1i76gh891w2g48b1c3abp9w8zp5j54yb1vm5h8djkd69"))))
5167 (arguments
5168 `(#:jar-name "asm8.jar"
5169 #:source-dir "asm/src/main/java"
5170 #:test-dir "asm/src/test"
5171 ;; tests depend on junit5
5172 #:tests? #f))
5173 (propagated-inputs '())
5174 (native-inputs '())))
5175
5176(define-public java-asm-tree-8
5177 (package
5178 (inherit java-asm-8)
5179 (name "java-asm-tree")
5180 (arguments
5181 `(#:jar-name "asm-tree.jar"
5182 #:source-dir "asm-tree/src/main/java"
5183 #:test-dir "asm-tree/src/test"
5184 ;; tests depend on junit5
5185 #:tests? #f))
5186 (inputs
5187 (list java-asm-8))))
5188
5189(define-public java-asm-analysis-8
5190 (package
5191 (inherit java-asm-8)
5192 (name "java-asm-analysis")
5193 (arguments
5194 `(#:jar-name "asm-analysis.jar"
5195 #:source-dir "asm-analysis/src/main/java"
5196 #:test-dir "asm-analysis/src/test"
5197 ;; tests depend on junit5
5198 #:tests? #f))
5199 (inputs
5200 (list java-asm-8 java-asm-tree-8))))
5201
5202(define-public java-asm-util-8
5203 (package
5204 (inherit java-asm-8)
5205 (name "java-asm-util")
5206 (arguments
5207 `(#:jar-name "asm-util8.jar"
5208 #:source-dir "asm-util/src/main/java"
5209 #:test-dir "asm-util/src/test"
5210 ;; tests depend on junit5
5211 #:tests? #f))
5212 (inputs
5213 (list java-asm-8 java-asm-analysis-8 java-asm-tree-8))))
5214
5215(define-public java-asm-commons-8
5216 (package
5217 (inherit java-asm-8)
5218 (name "java-asm-commons")
5219 (arguments
5220 (list #:jar-name "asm-commons8.jar"
5221 #:source-dir "asm-commons/src/main/java"
5222 #:test-dir "asm-commons/src/test"
5223 ;; tests depend on junit5
5224 #:tests? #f))
5225 (inputs (list java-asm-8 java-asm-analysis-8 java-asm-tree-8))))
5226
5227(define-public java-asm-9
5228 (package
5229 (inherit java-asm)
5230 (version "9.4")
5231 (source (origin
5232 (method git-fetch)
5233 (uri (git-reference
5234 (url "https://gitlab.ow2.org/asm/asm")
5235 (commit (string-append
5236 "ASM_" (string-join (string-split version #\.)
5237 "_")))))
5238 (file-name (git-file-name "java-asm" version))
5239 (sha256
5240 (base32
5241 "0c00m638skr5md1p6y1c2xn11kj5w6sjapyvwp9mh70rw095bwzk"))))
5242 (arguments
5243 `(#:jar-name "asm9.jar"
5244 #:source-dir "asm/src/main/java"
5245 #:test-dir "asm/src/test"
5246 ;; tests depend on junit5
5247 #:tests? #f))
5248 (propagated-inputs '())
5249 (native-inputs '())))
5250
5251(define-public java-asm-tree-9
5252 (package
5253 (inherit java-asm-9)
5254 (name "java-asm-tree")
5255 (arguments
5256 `(#:jar-name "asm-tree.jar"
5257 #:source-dir "asm-tree/src/main/java"
5258 #:test-dir "asm-tree/src/test"
5259 ;; tests depend on junit5
5260 #:tests? #f))
5261 (inputs
5262 (list java-asm-9))))
5263
5264(define-public java-asm-analysis-9
5265 (package
5266 (inherit java-asm-9)
5267 (name "java-asm-analysis")
5268 (arguments
5269 `(#:jar-name "asm-analysis.jar"
5270 #:source-dir "asm-analysis/src/main/java"
5271 #:test-dir "asm-analysis/src/test"
5272 ;; tests depend on junit5
5273 #:tests? #f))
5274 (inputs
5275 (list java-asm-9 java-asm-tree-9))))
5276
5277(define-public java-asm-util-9
5278 (package
5279 (inherit java-asm-9)
5280 (name "java-asm-util")
5281 (arguments
5282 `(#:jar-name "asm-util8.jar"
5283 #:source-dir "asm-util/src/main/java"
5284 #:test-dir "asm-util/src/test"
5285 ;; tests depend on junit5
5286 #:tests? #f))
5287 (inputs
5288 (list java-asm-9 java-asm-analysis-9 java-asm-tree-9))))
5289
5290(define-public java-asm-commons-9
5291 (package
5292 (inherit java-asm-9)
5293 (name "java-asm-commons")
5294 (arguments
5295 (list #:jar-name "asm-commons8.jar"
5296 #:source-dir "asm-commons/src/main/java"
5297 #:test-dir "asm-commons/src/test"
5298 ;; tests depend on junit5
5299 #:tests? #f))
5300 (inputs (list java-asm-9 java-asm-analysis-9 java-asm-tree-9))))
5301
5302(define-public java-cglib
5303 (package
5304 (name "java-cglib")
5305 (version "3.3.0")
5306 (source
5307 (origin
5308 (method git-fetch)
5309 (uri (git-reference
5310 (url "https://github.com/cglib/cglib")
5311 (commit (string-append
5312 "RELEASE_"
5313 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
5314 version)))))
5315 (file-name (git-file-name name version))
5316 (sha256
5317 (base32 "1lnscamc6bnhh7jgij5garxagp3zn2jp4cbq0rsn4xr3l0cnd014"))))
5318 (build-system ant-build-system)
5319 (arguments
5320 `(;; FIXME: tests fail because junit runs
5321 ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem
5322 ;; to describe a test at all.
5323 #:tests? #f
5324 #:jar-name "cglib.jar"
5325 #:phases
5326 (modify-phases %standard-phases
5327 (add-after 'unpack 'chdir
5328 (lambda _ (chdir "cglib") #t)))))
5329 (native-inputs (list java-junit))
5330 (propagated-inputs (list java-asm-8))
5331 (home-page "https://github.com/cglib/cglib/")
5332 (synopsis "Java byte code generation library")
5333 (description "The byte code generation library CGLIB is a high level API
5334to generate and transform Java byte code.")
5335 (license license:asl2.0)))
5336
5337(define-public java-objenesis
5338 (package
5339 (name "java-objenesis")
5340 (version "3.3")
5341 (source (origin
5342 (method git-fetch)
5343 (uri (git-reference
5344 (url "https://github.com/easymock/objenesis")
5345 (commit version)))
5346 (file-name (git-file-name name version))
5347 (sha256
5348 (base32
5349 "1brlcn536p4s1v1f3vzxhr38lvyhc33wjrbj2x06kdrd8agy90cr"))))
5350 (build-system ant-build-system)
5351 (arguments
5352 `(#:tests? #f; require junit-5
5353 #:jar-name "objenesis.jar"
5354 #:source-dir "main/src/main/java"
5355 #:test-dir "main/src/test/"))
5356 (native-inputs
5357 (list java-junit java-hamcrest-core))
5358 (home-page "http://objenesis.org/")
5359 (synopsis "Bypass the constructor when creating an object")
5360 (description "Objenesis is a small Java library that serves one purpose:
5361to instantiate a new object of a particular class. It is common to see
5362restrictions in libraries stating that classes must require a default
5363constructor. Objenesis aims to overcome these restrictions by bypassing the
5364constructor on object instantiation.")
5365 (license license:asl2.0)))
5366
5367(define-public java-easymock
5368 (package
5369 (name "java-easymock")
5370 (version "3.4")
5371 (source (origin
5372 (method git-fetch)
5373 (uri (git-reference
5374 (url "https://github.com/easymock/easymock/")
5375 (commit (string-append "easymock-" version))))
5376 (file-name (git-file-name name version))
5377 (sha256
5378 (base32
5379 "02vybm8hc0i0n9sp2f2iiqn54zwqhq835f76wc6b2m7819z5a8dq"))))
5380 (build-system ant-build-system)
5381 (arguments
5382 `(#:jar-name "easymock.jar"
5383 #:source-dir "core/src/main"
5384 #:test-dir "core/src/test"
5385 #:phases
5386 (modify-phases %standard-phases
5387 ;; FIXME: Android support requires the following packages to be
5388 ;; available: com.google.dexmaker.stock.ProxyBuilder
5389 (add-after 'unpack 'delete-android-support
5390 (lambda _
5391 (with-directory-excursion "core/src/main/java/org/easymock/internal"
5392 (substitute* "MocksControl.java"
5393 (("AndroidSupport.isAndroid\\(\\)") "false")
5394 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
5395 (delete-file "AndroidClassProxyFactory.java"))
5396 #t))
5397 (add-after 'unpack 'delete-broken-tests
5398 (lambda _
5399 (with-directory-excursion "core/src/test/java/org/easymock"
5400 ;; This test depends on dexmaker.
5401 (delete-file "tests2/ClassExtensionHelperTest.java")
5402
5403 ;; This is not a test.
5404 (delete-file "tests/BaseEasyMockRunnerTest.java")
5405
5406 ;; This test should be executed with a different runner...
5407 (delete-file "tests2/EasyMockAnnotationsTest.java")
5408 ;; ...but deleting it means that we also have to delete these
5409 ;; dependent files.
5410 (delete-file "tests2/EasyMockRunnerTest.java")
5411 (delete-file "tests2/EasyMockRuleTest.java")
5412
5413 ;; This test fails because the file "easymock.properties" does
5414 ;; not exist.
5415 (delete-file "tests2/EasyMockPropertiesTest.java"))
5416 #t)))))
5417 (inputs
5418 (list java-cglib java-objenesis))
5419 (native-inputs
5420 (list java-junit java-hamcrest-core))
5421 (home-page "https://easymock.org/")
5422 (synopsis "Java library providing mock objects for unit tests")
5423 (description "EasyMock is a Java library that provides an easy way to use
5424mock objects in unit testing.")
5425 (license license:asl2.0)))
5426
5427(define-public java-easymock-3.2
5428 (package
5429 (inherit java-easymock)
5430 (name "java-easymock")
5431 (version "3.2")
5432 (source (origin
5433 (method git-fetch)
5434 (uri (git-reference
5435 (url "https://github.com/easymock/easymock/")
5436 (commit (string-append "easymock-" version))))
5437 (file-name (git-file-name name version))
5438 (sha256
5439 (base32
5440 "0cn6qqa261mhk9mwxrsz39lkkknfv2h7iprr5zw7wpz9p96dwgv4"))))
5441 (arguments
5442 (list #:jar-name "easymock.jar"
5443 #:source-dir "easymock/src/main"
5444 #:test-dir "easymock/src/test"
5445 #:phases
5446 #~(modify-phases %standard-phases
5447 (add-after 'unpack 'delete-android-support
5448 (lambda _
5449 (with-directory-excursion "easymock/src/main/java/org/easymock/internal"
5450 (substitute* "MocksControl.java"
5451 (("AndroidSupport.isAndroid\\(\\)") "false")
5452 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
5453 (delete-file "AndroidClassProxyFactory.java"))))
5454 (add-after 'unpack 'delete-broken-tests
5455 (lambda _
5456 (with-directory-excursion "easymock/src/test/java/org/easymock"
5457 ;; This test depends on dexmaker.
5458 (delete-file "tests2/ClassExtensionHelperTest.java")
5459 ;; This is not a test.
5460 (delete-file "tests/BaseEasyMockRunnerTest.java")
5461 ;; ...but deleting it means that we also have to delete these
5462 ;; dependent files.
5463 (delete-file "tests2/EasyMockRunnerTest.java")
5464 ;; This test fails because the file "easymock.properties" does
5465 ;; not exist.
5466 (delete-file "tests2/EasyMockPropertiesTest.java")))))))))
5467
5468(define-public java-easymock-class-extension
5469 (package
5470 (inherit java-easymock-3.2)
5471 (name "java-easymock-class-extension")
5472 (build-system ant-build-system)
5473 (arguments
5474 (list #:jar-name "easymock-class-extensions.jar"
5475 #:source-dir "easymock-classextension/src/main/java"
5476 #:test-dir "easymock-classextension/src/test"))
5477 (inputs (list java-asm-8
5478 java-easymock-3.2
5479 java-cglib
5480 java-objenesis))
5481 (native-inputs
5482 (list java-junit java-hamcrest-core))
5483 (home-page "https://easymock.org/")
5484 (synopsis "Easymock extension to mock classes")
5485 (description "This package provides an extension to earlier versions of
5486easymock that allows mocking classes.")
5487 (license license:asl2.0)))
5488
5489(define-public java-jmock-1
5490 (package
5491 (name "java-jmock")
5492 (version "1.2.0")
5493 (source (origin
5494 (method git-fetch)
5495 (uri (git-reference
5496 (url "https://github.com/jmock-developers/jmock-library")
5497 (commit version)))
5498 (file-name (git-file-name name version))
5499 (sha256
5500 (base32
5501 "0lkga995xd9b9mmzxmcd301hlw83p1h78nibh7djlx7wydscr85z"))))
5502 (build-system ant-build-system)
5503 (arguments
5504 `(#:build-target "jars"
5505 #:test-target "run.tests"
5506 #:phases
5507 (modify-phases %standard-phases
5508 (replace 'install (install-jars "build")))))
5509 (home-page "http://jmock.org/")
5510 (synopsis "Mock object library for test-driven development")
5511 (description "JMock is a library that supports test-driven development of
5512Java code with mock objects. Mock objects help you design and test the
5513interactions between the objects in your programs.
5514
5515The jMock library
5516
5517@itemize
5518@item makes it quick and easy to define mock objects
5519@item lets you precisely specify the interactions between
5520 your objects, reducing the brittleness of your tests
5521@item plugs into your favourite test framework
5522@item is easy to extend.
5523@end itemize\n")
5524 (license license:bsd-3)))
5525
5526(define-public java-jmock
5527 (package
5528 (inherit java-jmock-1)
5529 (name "java-jmock")
5530 (version "2.8.2")
5531 (source (origin
5532 (method git-fetch)
5533 (uri (git-reference
5534 (url "https://github.com/jmock-developers/jmock-library")
5535 (commit version)))
5536 (file-name (git-file-name name version))
5537 (sha256
5538 (base32
5539 "12b7l22g3nrjvf2dzcw3z03fpd2chrgp0d8xkvn8w55rwb57pax6"))))
5540 (inputs
5541 (list java-hamcrest-all java-bsh java-junit))
5542 (native-inputs
5543 `(("cglib" ,java-cglib)))
5544 (arguments
5545 `(#:jar-name "java-jmock.jar"
5546 #:source-dir "jmock/src/main/java"
5547 #:test-dir "jmock/src/test"))))
5548
5549(define-public java-jmock-junit4
5550 (package
5551 (inherit java-jmock)
5552 (name "java-jmock-junit4")
5553 (arguments
5554 `(#:jar-name "java-jmock-junit4.jar"
5555 #:source-dir "jmock-junit4/src/main/java"
5556 #:test-dir "jmock-junit4/src/test"))
5557 (inputs
5558 `(("java-hamcrest-all" ,java-hamcrest-all)
5559 ("java-bsh" ,java-bsh)
5560 ("java-jmock" ,java-jmock)
5561 ("java-jumit" ,java-junit)))))
5562
5563(define-public java-jmock-legacy
5564 (package
5565 (inherit java-jmock)
5566 (name "java-jmock-legacy")
5567 (arguments
5568 `(#:jar-name "java-jmock-legacy.jar"
5569 #:source-dir "jmock-legacy/src/main/java"
5570 #:test-dir "jmock-legacy/src/test"
5571 #:phases
5572 (modify-phases %standard-phases
5573 (add-before 'check 'copy-tests
5574 (lambda _
5575 ;; This file is a dependancy of some tests
5576 (let ((file "org/jmock/test/acceptance/PackageProtectedType.java"))
5577 (copy-file (string-append "jmock/src/test/java/" file)
5578 (string-append "jmock-legacy/src/test/java/" file))
5579 #t))))))
5580 (inputs
5581 (list java-hamcrest-all
5582 java-objenesis
5583 java-cglib
5584 java-jmock
5585 java-bsh
5586 java-junit))
5587 (native-inputs
5588 (list java-jmock-junit4))))
5589
5590(define-public java-hamcrest-all
5591 (package (inherit java-hamcrest-core)
5592 (name "java-hamcrest-all")
5593 (arguments
5594 `(#:jdk ,icedtea-8
5595 ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core)
5596 ((#:build-target _) "bigjar")
5597 ((#:phases phases)
5598 `(modify-phases ,phases
5599 ;; Some build targets override the classpath, so we need to patch
5600 ;; the build.xml to ensure that required dependencies are on the
5601 ;; classpath.
5602 (add-after 'unpack 'patch-classpath-for-integration
5603 (lambda* (#:key inputs #:allow-other-keys)
5604 (substitute* "build.xml"
5605 ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
5606 (string-join
5607 (cons line
5608 (append
5609 (find-files (assoc-ref inputs "java-junit") "\\.jar$")
5610 (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
5611 (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
5612 ";"))
5613 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
5614 (car (find-files (assoc-ref inputs "java-hamcrest-core")
5615 "jar$"))))
5616 #t))
5617 (replace 'install
5618 (lambda* (#:key outputs #:allow-other-keys)
5619 (let* ((target (string-append (assoc-ref outputs "out")
5620 "/share/java/"))
5621 (version-suffix
5622 ,(string-append
5623 "-" (package-version java-hamcrest-core) ".jar"))
5624 (install-without-version-suffix
5625 (lambda (jar)
5626 (copy-file jar
5627 (string-append target
5628 (basename jar version-suffix)
5629 ".jar")))))
5630 (mkdir-p target)
5631 (for-each
5632 install-without-version-suffix
5633 (find-files "build"
5634 (lambda (name _)
5635 (and (string-suffix? ".jar" name)
5636 (not (string-suffix? "-sources.jar" name)))))))
5637 #t)))))))
5638 (inputs
5639 (modify-inputs (package-inputs java-hamcrest-core)
5640 (prepend java-junit
5641 java-jmock-1
5642 ;; This is necessary because of what seems to be a race condition.
5643 ;; This package would sometimes fail to build because hamcrest-core.jar
5644 ;; could not be found, even though it is built as part of this package.
5645 ;; Adding java-hamcrest-core appears to fix this problem. See
5646 ;; https://debbugs.gnu.org/31390 for more information.
5647 java-hamcrest-core
5648 java-easymock)))))
5649
5650(define-public java-jopt-simple
5651 (package
5652 (name "java-jopt-simple")
5653 (version "5.0.3")
5654 (source (origin
5655 (method url-fetch)
5656 (uri (string-append "https://repo1.maven.org/maven2/"
5657 "net/sf/jopt-simple/jopt-simple/"
5658 version "/jopt-simple-"
5659 version "-sources.jar"))
5660 (sha256
5661 (base32
5662 "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa"))))
5663 (build-system ant-build-system)
5664 (arguments
5665 `(#:tests? #f ; there are no tests
5666 #:jar-name "jopt-simple.jar"
5667 #:phases
5668 (modify-phases %standard-phases
5669 (add-before 'install 'create-pom
5670 (generate-pom.xml "pom.xml" "net.sf.jopt-simple" "jopt-simple" ,version))
5671 (replace 'install
5672 (install-from-pom "pom.xml")))))
5673 (home-page "https://jopt-simple.github.io/jopt-simple/")
5674 (synopsis "Java library for parsing command line options")
5675 (description "JOpt Simple is a Java library for parsing command line
5676options, such as those you might pass to an invocation of @code{javac}. In
5677the interest of striving for simplicity, as closely as possible JOpt Simple
5678attempts to honor the command line option syntaxes of POSIX @code{getopt} and
5679GNU @code{getopt_long}. It also aims to make option parser configuration and
5680retrieval of options and their arguments simple and expressive, without being
5681overly clever.")
5682 (license license:expat)))
5683
5684;; Required by jmh
5685(define-public java-jopt-simple-4
5686 (package
5687 (inherit java-jopt-simple)
5688 (version "4.6")
5689 (source (origin
5690 (method url-fetch)
5691 (uri (string-append "https://repo1.maven.org/maven2/"
5692 "net/sf/jopt-simple/jopt-simple/"
5693 version "/jopt-simple-"
5694 version "-sources.jar"))
5695 (sha256
5696 (base32
5697 "0ny82zczxkn201ld0b7rps0ifzjhfs8m1ncdmy1f50145ciszkpd"))))
5698 (arguments
5699 (substitute-keyword-arguments (package-arguments java-jopt-simple)
5700 ((#:phases phases)
5701 `(modify-phases ,phases
5702 (replace 'create-pom
5703 (generate-pom.xml "pom.xml" "net.sf.jopt-simple" "jopt-simple"
5704 ,version))))))))
5705
5706(define-public java-commons-math3
5707 (package
5708 (name "java-commons-math3")
5709 (version "3.6.1")
5710 (source (origin
5711 (method url-fetch)
5712 (uri (string-append "mirror://apache/commons/math/source/"
5713 "commons-math3-" version "-src.tar.gz"))
5714 (sha256
5715 (base32
5716 "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6"))))
5717 (build-system ant-build-system)
5718 (arguments
5719 `(#:build-target "jar"
5720 #:test-target "test"
5721 #:make-flags
5722 ,#~(let ((hamcrest #$(this-package-native-input "java-hamcrest-core"))
5723 (junit #$(this-package-native-input "java-junit")))
5724 (list (string-append "-Djunit.jar="
5725 (car (find-files junit "jar$")))
5726 (string-append "-Dhamcrest.jar="
5727 (car (find-files hamcrest ".*.jar$")))))
5728 #:phases
5729 (modify-phases %standard-phases
5730 ;; We want to build the jar in the build phase and run the tests
5731 ;; later in a separate phase.
5732 (add-after 'unpack 'untangle-targets
5733 (lambda _
5734 (substitute* "build.xml"
5735 (("name=\"jar\" depends=\"test\"")
5736 "name=\"jar\" depends=\"compile\""))))
5737 ;; There is no install target.
5738 (replace 'install
5739 (install-from-pom "pom.xml")))))
5740 (native-inputs
5741 (list java-junit java-hamcrest-core))
5742 (home-page "https://commons.apache.org/math/")
5743 (synopsis "Apache Commons mathematics library")
5744 (description "Commons Math is a library of lightweight, self-contained
5745mathematics and statistics components addressing the most common problems not
5746available in the Java programming language or Commons Lang.")
5747 (license license:asl2.0)))
5748
5749(define-public java-jmh
5750 (package
5751 (name "java-jmh")
5752 (version "1.32")
5753 (source (origin
5754 (method git-fetch)
5755 (uri (git-reference
5756 (url "https://github.com/openjdk/jmh")
5757 (commit version)))
5758 (file-name (git-file-name name version))
5759 (sha256
5760 (base32
5761 "0i7fa7l3gdqkkgz5ddayp6m46dgbj9rqlz35xffrcbyiz3gpljy0"))))
5762 (build-system maven-build-system)
5763 (arguments
5764 `(#:exclude
5765 (("org.apache.maven.plugins" .
5766 ("maven-source-plugin" "maven-archetype-plugin" "maven-shade-plugin"
5767 "maven-site-plugin" "maven-javadoc-plugin" "maven-eclipse-plugin"))
5768 ("com.mycila.maven-license-plugin" . ("maven-license-plugin"))
5769 ("org.apache.maven.wagon" . ("wagon-ssh")))
5770 #:maven-plugins
5771 (("maven-enforcer-plugin" ,maven-enforcer-plugin)
5772 ,@(default-maven-plugins))
5773 #:phases
5774 (modify-phases %standard-phases
5775 (add-after 'unpack 'remove-unnecessary
5776 (lambda _
5777 ;; requires org.apache.maven.archetype:archetype-packaging.
5778 ;; Its subprojects also require groovy, kotlin and scala,
5779 ;; respectively.
5780 (delete-file-recursively "jmh-archetypes"))))))
5781 (propagated-inputs
5782 (list java-jopt-simple-4 java-commons-math3))
5783 (native-inputs
5784 (list java-junit java-hamcrest-core))
5785 (home-page "https://openjdk.java.net/projects/code-tools/jmh/")
5786 (synopsis "Benchmark harness for the JVM")
5787 (description "JMH is a Java harness for building, running, and analysing
5788nano/micro/milli/macro benchmarks written in Java and other languages
5789targeting the JVM.")
5790 ;; GPLv2 only
5791 (license license:gpl2)))
5792
5793(define-public java-commons-collections4
5794 (package
5795 (name "java-commons-collections4")
5796 (version "4.1")
5797 (source (origin
5798 (method url-fetch)
5799 (uri (string-append "mirror://apache/commons/collections/source/"
5800 "commons-collections4-" version "-src.tar.gz"))
5801 (sha256
5802 (base32
5803 "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl"))))
5804 (build-system ant-build-system)
5805 (arguments
5806 `(#:test-target "test"
5807 #:make-flags
5808 ,#~(let ((hamcrest #$(this-package-native-input "java-hamcrest-core"))
5809 (junit #$(this-package-native-input "java-junit"))
5810 (easymock #$(this-package-native-input "java-easymock")))
5811 (list (string-append "-Djunit.jar="
5812 (car (find-files junit "jar$")))
5813 (string-append "-Dhamcrest.jar="
5814 (car (find-files hamcrest "jar$")))
5815 (string-append "-Deasymock.jar=" easymock
5816 "/share/java/easymock.jar")))
5817 #:phases
5818 (modify-phases %standard-phases
5819 (replace 'install
5820 (install-jars "target")))))
5821 (native-inputs
5822 (list java-junit java-hamcrest-core java-easymock))
5823 (home-page "https://commons.apache.org/collections/")
5824 (synopsis "Collections framework")
5825 (description "The Java Collections Framework is the recognised standard
5826for collection handling in Java. Commons-Collections seek to build upon the
5827JDK classes by providing new interfaces, implementations and utilities. There
5828are many features, including:
5829
5830@itemize
5831@item @code{Bag} interface for collections that have a number of copies of
5832 each object
5833@item @code{BidiMap} interface for maps that can be looked up from value to
5834 key as well and key to value
5835@item @code{MapIterator} interface to provide simple and quick iteration over
5836 maps
5837@item Transforming decorators that alter each object as it is added to the
5838 collection
5839@item Composite collections that make multiple collections look like one
5840@item Ordered maps and sets that retain the order elements are added in,
5841 including an LRU based map
5842@item Reference map that allows keys and/or values to be garbage collected
5843 under close control
5844@item Many comparator implementations
5845@item Many iterator implementations
5846@item Adapter classes from array and enumerations to collections
5847@item Utilities to test or create typical set-theory properties of collections
5848 such as union, intersection, and closure.
5849@end itemize\n")
5850 (license license:asl2.0)))
5851
5852(define-public java-commons-collections
5853 (package
5854 (inherit java-commons-collections4)
5855 (name "java-commons-collections")
5856 (version "3.2.2")
5857 (source (origin
5858 (method url-fetch)
5859 (uri (string-append "mirror://apache/commons/collections/source/"
5860 "commons-collections-" version "-src.tar.gz"))
5861 (sha256
5862 (base32
5863 "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387"))
5864 (patches
5865 (search-patches "java-commons-collections-fix-java8.patch"))))
5866 (arguments
5867 (substitute-keyword-arguments (package-arguments java-commons-collections4)
5868 ((#:phases phases)
5869 `(modify-phases ,phases
5870 ;; The manifest is required by the build procedure
5871 (add-before 'build 'add-manifest
5872 (lambda _
5873 (mkdir-p "build/conf")
5874 (call-with-output-file "build/conf/MANIFEST.MF"
5875 (lambda (file)
5876 (format file "Manifest-Version: 1.0\n")))
5877 #t))
5878 (replace 'install
5879 (install-jars "build"))))))))
5880
5881(define java-commons-collections-test-classes
5882 (package
5883 (inherit java-commons-collections)
5884 (arguments
5885 `(#:jar-name "commons-collections-test-classes.jar"
5886 #:source-dir "src/test"
5887 #:tests? #f))
5888 (inputs
5889 `(("collection" ,java-commons-collections)))))
5890
5891(define-public java-commons-beanutils
5892 (package
5893 (name "java-commons-beanutils")
5894 (version "1.9.3")
5895 (source (origin
5896 (method url-fetch)
5897 (uri (string-append "mirror://apache/commons/beanutils/source/"
5898 "commons-beanutils-" version "-src.tar.gz"))
5899 (sha256
5900 (base32
5901 "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk"))))
5902 (build-system ant-build-system)
5903 (arguments
5904 `(#:test-target "test"
5905 #:tests? #f
5906 #:phases
5907 (modify-phases %standard-phases
5908 (replace 'install
5909 (lambda* (#:key outputs #:allow-other-keys)
5910 (rename-file (string-append "dist/commons-beanutils-" ,version
5911 "-SNAPSHOT.jar")
5912 "commons-beanutils.jar")
5913 (install-file "commons-beanutils.jar"
5914 (string-append (assoc-ref outputs "out") "/share/java/"))
5915 #t)))))
5916 (inputs
5917 `(("logging" ,java-commons-logging-minimal)
5918 ("collections" ,java-commons-collections)))
5919 (native-inputs
5920 `(("junit" ,java-junit)
5921 ("collections-test" ,java-commons-collections-test-classes)))
5922 (home-page "https://commons.apache.org/beanutils/")
5923 (synopsis "Dynamically set or get properties in Java")
5924 (description "BeanUtils provides a simplified interface to reflection and
5925introspection to set or get dynamically determined properties through their
5926setter and getter method.")
5927 (license license:asl2.0)))
5928
5929(define-public java-commons-io
5930 (package
5931 (name "java-commons-io")
5932 (version "2.5")
5933 (source
5934 (origin
5935 (method url-fetch)
5936 (uri (string-append "mirror://apache/commons/io/source/"
5937 "commons-io-" version "-src.tar.gz"))
5938 (sha256
5939 (base32
5940 "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3"))))
5941 (build-system ant-build-system)
5942 (outputs '("out" "doc"))
5943 (arguments
5944 `(#:test-target "test"
5945 #:make-flags
5946 ,#~(list (string-append "-Djunit.jar="
5947 (car (find-files #$(this-package-native-input "java-junit")
5948 "jar$"))))
5949 #:phases
5950 (modify-phases %standard-phases
5951 (add-after 'build 'build-javadoc ant-build-javadoc)
5952 (replace 'install (install-from-pom "pom.xml"))
5953 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
5954 (native-inputs
5955 (list java-junit java-hamcrest-core))
5956 (propagated-inputs
5957 (list apache-commons-parent-pom-39))
5958 (home-page "https://commons.apache.org/io/")
5959 (synopsis "Common useful IO related classes")
5960 (description "Commons-IO contains utility classes, stream implementations,
5961file filters and endian classes.")
5962 (license license:asl2.0)))
5963
5964(define-public java-commons-exec-1.1
5965 (package
5966 (name "java-commons-exec")
5967 (version "1.1")
5968 (source
5969 (origin
5970 (method url-fetch)
5971 (uri (string-append "mirror://apache/commons/exec/source/"
5972 "commons-exec-" version "-src.tar.gz"))
5973 (sha256
5974 (base32
5975 "025dk8xgj10lxwwwqp0hng2rn7fr4vcirxzydqzx9k4dim667alk"))))
5976 (build-system ant-build-system)
5977 (arguments
5978 `(#:test-target "test"
5979 #:make-flags
5980 ,#~(list (string-append "-Dmaven.junit.jar="
5981 (car (find-files #$(this-package-native-input "java-junit")
5982 "jar$"))))
5983 #:phases
5984 (modify-phases %standard-phases
5985 (add-before 'build 'delete-network-tests
5986 (lambda _
5987 (delete-file "src/test/java/org/apache/commons/exec/DefaultExecutorTest.java")
5988 (substitute* "src/test/java/org/apache/commons/exec/TestRunner.java"
5989 (("suite\\.addTestSuite\\(DefaultExecutorTest\\.class\\);") ""))
5990 #t))
5991 ;; The "build" phase automatically tests.
5992 (delete 'check)
5993 (replace 'install (install-jars "target")))))
5994 (native-inputs
5995 (list java-junit))
5996 (home-page "https://commons.apache.org/proper/commons-exec/")
5997 (synopsis "Common program execution related classes")
5998 (description "Commons-Exec simplifies executing external processes.")
5999 (license license:asl2.0)))
6000
6001(define-public java-commons-exec
6002 (package
6003 (inherit java-commons-exec-1.1)
6004 (version "1.3")
6005 (source
6006 (origin
6007 (method url-fetch)
6008 (uri (string-append "mirror://apache/commons/exec/source/"
6009 "commons-exec-" version "-src.tar.gz"))
6010 (sha256
6011 (base32
6012 "17yb4h6f8l49c5iyyvda4z2nmw0bxrx857nrwmsr7mmpb7x441yv"))))
6013 (arguments
6014 `(#:test-target "test"
6015 #:make-flags
6016 ,#~(list (string-append "-Dmaven.junit.jar="
6017 (car (find-files #$(this-package-native-input "java-junit")
6018 "jar$")))
6019 "-Dmaven.compiler.source=1.7"
6020 "-Dmaven.compiler.target=1.7")
6021 #:phases
6022 (modify-phases %standard-phases
6023 (add-before 'build 'delete-network-tests
6024 (lambda* (#:key inputs #:allow-other-keys)
6025 ;; This test hangs indefinitely.
6026 (delete-file "src/test/java/org/apache/commons/exec/issues/Exec60Test.java")
6027 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec41Test.java"
6028 (("ping -c 10 127.0.0.1") "sleep 10"))
6029 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec49Test.java"
6030 (("/bin/ls") "ls"))
6031 (call-with-output-file "src/test/scripts/ping.sh"
6032 (lambda (port)
6033 (format port "#!~a/bin/sh\nsleep $1\n"
6034 (assoc-ref inputs "bash"))))
6035 #t))
6036 ;; The "build" phase automatically tests.
6037 (delete 'check)
6038 (replace 'install (install-jars "target")))))
6039 (native-inputs
6040 (list java-junit java-hamcrest-core))))
6041
6042(define-public java-commons-lang
6043 (package
6044 (name "java-commons-lang")
6045 (version "2.6")
6046 (source
6047 (origin
6048 (method url-fetch)
6049 (uri (string-append "mirror://apache/commons/lang/source/"
6050 "commons-lang-" version "-src.tar.gz"))
6051 (sha256
6052 (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5"))))
6053 (build-system ant-build-system)
6054 (outputs '("out" "doc"))
6055 (arguments
6056 `(#:test-target "test"
6057 #:test-exclude (list "**/Abstract*.java" "**/Random*.java")
6058 #:phases
6059 (modify-phases %standard-phases
6060 (add-after 'build 'build-javadoc ant-build-javadoc)
6061 (add-before 'check 'disable-failing-test
6062 (lambda _
6063 ;; Disable a failing test
6064 (substitute* "src/test/java/org/apache/commons/lang/\
6065time/FastDateFormatTest.java"
6066 (("public void testFormat\\(\\)")
6067 "public void disabled_testFormat()"))
6068 #t))
6069 (replace 'install (install-jars "target"))
6070 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
6071 (native-inputs
6072 (list java-junit))
6073 (home-page "https://commons.apache.org/lang/")
6074 (synopsis "Extension of the java.lang package")
6075 (description "The Commons Lang components contains a set of Java classes
6076that provide helper methods for standard Java classes, especially those found
6077in the @code{java.lang} package in the Sun JDK. The following classes are
6078included:
6079
6080@itemize
6081@item StringUtils - Helper for @code{java.lang.String}.
6082@item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets
6083 of characters such as @code{[a-z]} and @code{[abcdez]}.
6084@item RandomStringUtils - Helper for creating randomised strings.
6085@item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
6086@item NumberRange - A range of numbers with an upper and lower bound.
6087@item ObjectUtils - Helper for @code{java.lang.Object}.
6088@item SerializationUtils - Helper for serializing objects.
6089@item SystemUtils - Utility class defining the Java system properties.
6090@item NestedException package - A sub-package for the creation of nested
6091 exceptions.
6092@item Enum package - A sub-package for the creation of enumerated types.
6093@item Builder package - A sub-package for the creation of @code{equals},
6094 @code{hashCode}, @code{compareTo} and @code{toString} methods.
6095@end itemize\n")
6096 (license license:asl2.0)))
6097
6098(define-public java-commons-lang3
6099 (package
6100 (name "java-commons-lang3")
6101 (version "3.12.0")
6102 (source
6103 (origin
6104 (method url-fetch)
6105 (uri (string-append "mirror://apache/commons/lang/source/"
6106 "commons-lang3-" version "-src.tar.gz"))
6107 (sha256
6108 (base32 "09dcv1pkdx3hpf06py8p9511f1wkin6jpacdll0c8vxpbi3yfwzv"))
6109 (patches
6110 (search-patches "java-commons-lang-fix-dependency.patch"))))
6111 (build-system ant-build-system)
6112 (arguments
6113 `(#:jar-name "commons-lang3.jar"
6114 #:source-dir "src/main/java"
6115 #:tests? #f; require junit5
6116 #:phases
6117 (modify-phases %standard-phases
6118 (replace 'install (install-from-pom "pom.xml")))))
6119 (propagated-inputs
6120 (list apache-commons-parent-pom-48))
6121 (home-page "https://commons.apache.org/lang/")
6122 (synopsis "Extension of the java.lang package")
6123 (description "The Commons Lang components contains a set of Java classes
6124that provide helper methods for standard Java classes, especially those found
6125in the @code{java.lang} package. The following classes are included:
6126
6127@itemize
6128@item StringUtils - Helper for @code{java.lang.String}.
6129@item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of
6130 characters such as @code{[a-z]} and @code{[abcdez]}.
6131@item RandomStringUtils - Helper for creating randomised strings.
6132@item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
6133@item NumberRange - A range of numbers with an upper and lower bound.
6134@item ObjectUtils - Helper for @code{java.lang.Object}.
6135@item SerializationUtils - Helper for serializing objects.
6136@item SystemUtils - Utility class defining the Java system properties.
6137@item NestedException package - A sub-package for the creation of nested
6138 exceptions.
6139@item Enum package - A sub-package for the creation of enumerated types.
6140@item Builder package - A sub-package for the creation of @code{equals},
6141 @code{hashCode}, @code{compareTo} and @code{toString} methods.
6142@end itemize\n")
6143 (license license:asl2.0)))
6144
6145(define-public java-commons-bsf
6146 (package
6147 (name "java-commons-bsf")
6148 (version "2.4.0")
6149 (source (origin
6150 (method url-fetch)
6151 (uri (string-append "mirror://apache/commons/bsf/source/bsf-src-"
6152 version ".tar.gz"))
6153 (sha256
6154 (base32
6155 "1sbamr8jl32p1jgf59nw0b2w9qivyg145954hm6ly54cfgsqrdas"))
6156 (modules '((guix build utils)))
6157 (snippet
6158 '(begin
6159 (for-each delete-file
6160 (find-files "." "\\.jar$"))
6161 #t))))
6162 (build-system ant-build-system)
6163 (arguments
6164 `(#:build-target "jar"
6165 #:tests? #f; No test file
6166 #:modules ((guix build ant-build-system)
6167 (guix build utils)
6168 (guix build java-utils)
6169 (sxml simple))
6170 #:phases
6171 (modify-phases %standard-phases
6172 (add-before 'build 'create-properties
6173 (lambda _
6174 ;; This file is missing from the distribution
6175 (call-with-output-file "build-properties.xml"
6176 (lambda (port)
6177 (sxml->xml
6178 `(project (@ (basedir ".") (name "build-properties") (default ""))
6179 (property (@ (name "project.name") (value "bsf")))
6180 (property (@ (name "source.level") (value "1.5")))
6181 (property (@ (name "build.lib") (value "build/jar")))
6182 (property (@ (name "src.dir") (value "src")))
6183 (property (@ (name "tests.dir") (value "src/org/apache/bsf/test")))
6184 (property (@ (name "build.tests") (value "build/test-classes")))
6185 (property (@ (name "build.dest") (value "build/classes"))))
6186 port)))
6187 #t))
6188 (replace 'install (install-jars "build")))))
6189 (native-inputs
6190 (list java-junit))
6191 (inputs
6192 (list java-commons-logging-minimal))
6193 (home-page "https://commons.apache.org/proper/commons-bsf")
6194 (synopsis "Bean Scripting Framework")
6195 (description "The Bean Scripting Framework (BSF) is a set of Java classes
6196which provides scripting language support within Java applications, and access
6197to Java objects and methods from scripting languages. BSF allows one to write
6198JSPs in languages other than Java while providing access to the Java class
6199library. In addition, BSF permits any Java application to be implemented in
6200part (or dynamically extended) by a language that is embedded within it. This
6201is achieved by providing an API that permits calling scripting language engines
6202from within Java, as well as an object registry that exposes Java objects to
6203these scripting language engines.")
6204 (license license:asl2.0)))
6205
6206(define-public java-commons-jxpath
6207 (package
6208 (name "java-commons-jxpath")
6209 (version "1.3")
6210 (source (origin
6211 (method url-fetch)
6212 (uri (string-append "mirror://apache/commons/jxpath/source/"
6213 "commons-jxpath-" version "-src.tar.gz"))
6214 (sha256
6215 (base32
6216 "1rpgg31ayn9fwr4bfi2i1ij0npcg79ad2fv0w9hacvawsyc42cfs"))))
6217 (build-system ant-build-system)
6218 (arguments
6219 `(#:jar-name "commons-jxpath.jar"
6220 ;; tests require more dependencies, including mockrunner which depends on old software
6221 #:tests? #f
6222 #:source-dir "src/java"))
6223 (inputs
6224 `(("servlet" ,java-classpathx-servletapi)
6225 ("java-jdom" ,java-jdom)
6226 ("java-commons-beanutils" ,java-commons-beanutils)))
6227 (native-inputs
6228 (list java-junit))
6229 (home-page "https://commons.apache.org/jxpath/")
6230 (synopsis "Simple interpreter of an expression language called XPath")
6231 (description "The org.apache.commons.jxpath package defines a simple
6232interpreter of an expression language called XPath. JXPath applies XPath
6233expressions to graphs of objects of all kinds: JavaBeans, Maps, Servlet
6234contexts, DOM etc, including mixtures thereof.")
6235 (license license:asl2.0)))
6236
6237(define-public java-commons-pool
6238 (package
6239 (name "java-commons-pool")
6240 (version "2.6.2")
6241 (source (origin
6242 (method url-fetch)
6243 (uri (string-append "mirror://apache/commons/pool/source/"
6244 "commons-pool2-" version "-src.tar.gz"))
6245 (sha256
6246 (base32
6247 "1fi1hgqmq01bs6azbj3sfswxzadp2r8sjjfiq6ryilz1m50kvrv6"))))
6248 (arguments
6249 `(#:jar-name "common-pool.jar"
6250 #:source-dir "src/main/java"
6251 #:test-exclude
6252 (list "**/PerformanceTest.java")))
6253 (build-system ant-build-system)
6254 (inputs
6255 (list java-cglib))
6256 (native-inputs
6257 (list java-junit java-hamcrest-core java-asm java-objenesis))
6258 (home-page "https://commons.apache.org/proper/commons-pool/")
6259 (synopsis "Object-pooling API in Java")
6260 (description "The commons-pool package provides an object-pooling API
6261and a number of object pool implementations. This package defines a
6262handful of pooling interfaces and some base classes that may be useful when
6263creating new pool implementations.")
6264 (license license:asl2.0)))
6265
6266(define-public java-commons-dbcp
6267 (package
6268 (name "java-commons-dbcp")
6269 (version "2.6.0")
6270 (source (origin
6271 (method url-fetch)
6272 (uri (string-append "mirror://apache/commons/dbcp/source/"
6273 "commons-dbcp2-" version "-src.tar.gz"))
6274 (sha256
6275 (base32
6276 "0axbvcbnf2l70fc3ybrlp3siw2w4ka9mia2pnx4py8gz54cpw3rc"))))
6277 (arguments
6278 `(#:source-dir "src/main/java"
6279 #:jar-name "java-commons-dbcp.jar"
6280 #:tests? #f)); requires apache-geronimo
6281 (inputs
6282 `(("java-commons-pool" ,java-commons-pool)
6283 ("java-commons-logging" ,java-commons-logging-minimal)
6284 ("java-jboss-transaction-api-spec" ,java-jboss-transaction-api-spec)))
6285 (native-inputs
6286 (list java-junit))
6287 (build-system ant-build-system)
6288 (home-page "https://commons.apache.org/proper/commons-dbcp/")
6289 (synopsis "Database Connection Pool for Java")
6290 (description "Commons-dbcp allows you to share a pool of database
6291connections between users. Creating a new connection for each user can be
6292time consuming and even unfeasible when the number of simultaneous users is
6293very large. This package provides a way to share a poole of connections to
6294reduce that load.")
6295 (license license:asl2.0)))
6296
6297(define-public java-commons-jcs
6298 (package
6299 (name "java-commons-jcs")
6300 (version "3.1")
6301 (source (origin
6302 (method url-fetch)
6303 (uri (string-append "mirror://apache/commons/jcs/source/"
6304 "commons-jcs3-dist-" version "-src.tar.gz"))
6305 (sha256
6306 (base32
6307 "0y1lm1xnsj99bf7y9mkvbzqfy8dr7ac8zcbkpsjgzb9vhabfsbac"))))
6308 (build-system ant-build-system)
6309 (arguments
6310 `(#:jar-name "commons-jcs.jar"
6311 #:source-dir "commons-jcs-core/src/main/java"
6312 #:test-dir "commons-jcs-core/src/test"
6313 #:tests? #f; requires hsqldb
6314 #:phases
6315 (modify-phases %standard-phases
6316 (add-before 'build 'copy-resources
6317 (lambda _
6318 (copy-recursively "commons-jcs-core/src/main/resources"
6319 "build/classes"))))))
6320 (propagated-inputs
6321 (list java-classpathx-servletapi
6322 java-commons-dbcp
6323 java-httpcomponents-httpclient
6324 java-httpcomponents-httpcore
6325 java-log4j-api))
6326 (native-inputs
6327 (list java-junit))
6328 (home-page "https://commons.apache.org/proper/commons-jcs/")
6329 (synopsis "Distributed caching system in Java")
6330 (description "JCS is a distributed caching system written in Java. It
6331is intended to speed up applications by providing a means to manage cached
6332data of various dynamic natures. Like any caching system, JCS is most useful
6333for high read, low put applications. Latency times drop sharply and
6334bottlenecks move away from the database in an effectively cached system.")
6335 (license license:asl2.0)))
6336
6337(define-public java-jsr250
6338 (package
6339 (name "java-jsr250")
6340 (version "1.3")
6341 (source (origin
6342 (method git-fetch)
6343 (uri (git-reference
6344 (url "https://github.com/javaee/javax.annotation")
6345 (commit version)))
6346 (file-name (git-file-name name version))
6347 (sha256
6348 (base32
6349 "1g22a9d75g01s9yxgdig0ss7i30j4ysnnp08gn4krn0wly4lpqq0"))))
6350 (build-system ant-build-system)
6351 (arguments
6352 `(#:tests? #f ; no tests included
6353 #:jdk ,icedtea-8
6354 #:jar-name "jsr250.jar"
6355 #:phases
6356 (modify-phases %standard-phases
6357 (replace 'install
6358 (install-from-pom "pom.xml")))))
6359 (propagated-inputs (list java-jvnet-parent-pom-3))
6360 (home-page "https://jcp.org/en/jsr/detail?id=250")
6361 (synopsis "Security-related annotations")
6362 (description "This package provides annotations for security. It provides
6363packages in the @code{javax.annotation} and @code{javax.annotation.security}
6364namespaces.")
6365 ;; either cddl or gpl2 only, with classpath exception
6366 (license (list license:cddl1.0
6367 license:gpl2))))
6368
6369(define-public java-jsr305
6370 (package
6371 (name "java-jsr305")
6372 (version "3.0.1")
6373 (source (origin
6374 (method url-fetch)
6375 (uri (string-append "https://repo1.maven.org/maven2/"
6376 "com/google/code/findbugs/"
6377 "jsr305/" version "/jsr305-"
6378 version "-sources.jar"))
6379 (sha256
6380 (base32
6381 "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n"))))
6382 (build-system ant-build-system)
6383 (arguments
6384 `(#:tests? #f ; no tests included
6385 #:jar-name "jsr305.jar"
6386 #:phases
6387 (modify-phases %standard-phases
6388 (add-before 'install 'create-pom
6389 (generate-pom.xml "pom.xml" "com.google.code.findbugs" "jsr305" ,version))
6390 (replace 'install
6391 (install-from-pom "pom.xml")))))
6392 (home-page "https://findbugs.sourceforge.net/")
6393 (synopsis "Annotations for the static analyzer called findbugs")
6394 (description "This package provides annotations for the findbugs package.
6395It provides packages in the @code{javax.annotations} namespace.")
6396 (license license:asl2.0)))
6397
6398(define-public java-error-prone-annotations
6399 (package
6400 (name "java-error-prone-annotations")
6401 (version "2.18.0")
6402 (source (origin
6403 (method git-fetch)
6404 (uri (git-reference
6405 (url "https://github.com/google/error-prone")
6406 (commit (string-append "v" version))))
6407 (file-name (git-file-name "java-error-prone" version))
6408 (sha256
6409 (base32
6410 "19sqsz0b308rhadr3ff10azdbqjq37nvrn9c06224dwpxap0931f"))))
6411 (build-system ant-build-system)
6412 (arguments
6413 `(#:tests? #f; no tests
6414 #:jar-name (string-append ,name "-" ,version ".jar")
6415 #:source-dir "annotations/src/main/java"
6416 #:test-dir "annotations/src/altest"
6417 #:phases
6418 (modify-phases %standard-phases
6419 (replace 'install (install-from-pom "annotations/pom.xml")))))
6420 (propagated-inputs (list java-error-prone-parent-pom java-jsr305))
6421 (home-page "https://errorprone.info")
6422 (synopsis "Java static analyzer at compile-time")
6423 (description "Error Prone is a static analysis tool for Java that catches
6424common programming mistakes at compile-time. This package contains annotations
6425used by programmers to guide the static analysis.")
6426 (license license:asl2.0)))
6427
6428(define java-error-prone-parent-pom
6429 (package
6430 (inherit java-error-prone-annotations)
6431 (name "java-error-prone-parent-pom")
6432 (arguments
6433 `(#:tests? #f
6434 #:phases
6435 (modify-phases %standard-phases
6436 (delete 'configure)
6437 (delete 'build)
6438 (replace 'install
6439 (install-pom-file "pom.xml")))))
6440 (propagated-inputs '())))
6441
6442(define-public java-guava
6443 (package
6444 (name "java-guava")
6445 (version "31.1")
6446 (source (origin
6447 (method git-fetch)
6448 (uri (git-reference
6449 (url "https://github.com/google/guava/")
6450 (commit (string-append "v" version))))
6451 (file-name (git-file-name name version))
6452 (sha256
6453 (base32
6454 "0sv1w5cnids9ad3l7qhrh3dh1wdqwc946iinsxryafr25wg5z1lp"))
6455 (patches
6456 (search-patches "java-guava-remove-annotation-deps.patch"))))
6457 (build-system ant-build-system)
6458 (arguments
6459 `(#:tests? #f ; no tests included
6460 #:jar-name "guava.jar"
6461 #:source-dir "guava/src"
6462 #:phases
6463 (modify-phases %standard-phases
6464 (add-after 'unpack 'trim-sources
6465 (lambda _
6466 (with-directory-excursion "guava/src/com/google/common"
6467 ;; Remove annotations to avoid extra dependencies:
6468 ;; * "j2objc" annotations are used when converting Java to
6469 ;; Objective C;
6470 ;; * "IgnoreJRERequirement" is used for Android.
6471 ;; * "Nullable" is used to catch NPE at build time.
6472 (substitute* (find-files "." "\\.java$")
6473 (("import com.google.j2objc.*") "")
6474 (("import org.checkerframework.checker.*") "")
6475 (("@ReflectionSupport.*") "")
6476 (("@WeakOuter") "")
6477 (("@RetainedWith") "")
6478 (("@Weak") "")
6479 (("@J2ObjCIncompatible") "")
6480 (("@IgnoreJRERequirement") "")
6481 (("@Nullable") "")))))
6482 ;; This is required by guava, but this is just an empty stub
6483 (add-before 'install 'install-listenablefuture-stub
6484 (install-pom-file "futures/listenablefuture9999/pom.xml"))
6485 (replace 'install (install-from-pom "guava/pom.xml")))))
6486 (inputs
6487 (list java-error-prone-annotations java-jsr305))
6488 (propagated-inputs
6489 (list java-guava-futures-failureaccess java-guava-parent-pom))
6490 (home-page "https://github.com/google/guava")
6491 (synopsis "Google core libraries for Java")
6492 (description "Guava is a set of core libraries that includes new
6493collection types (such as multimap and multiset), immutable collections, a
6494graph library, functional types, an in-memory cache, and APIs/utilities for
6495concurrency, I/O, hashing, primitives, reflection, string processing, and much
6496more!")
6497 (license license:asl2.0)))
6498
6499(define-public java-guava-futures-failureaccess
6500 (package
6501 (inherit java-guava)
6502 (name "java-guava-futures-failureaccess")
6503 (arguments
6504 `(#:tests? #f; no tests
6505 #:jar-name "guava-futures-failureaccess.jar"
6506 #:source-dir "futures/failureaccess/src"
6507 #:phases
6508 (modify-phases %standard-phases
6509 (replace 'install
6510 (install-from-pom "futures/failureaccess/pom.xml")))))
6511 (propagated-inputs
6512 `(("java-sonatype-oss-parent-pom" ,java-sonatype-oss-parent-pom-7)))))
6513
6514(define java-guava-parent-pom
6515 (package
6516 (inherit java-guava)
6517 (name "java-guava-parent-pom")
6518 (arguments
6519 `(#:tests? #f
6520 #:phases
6521 (modify-phases %standard-phases
6522 (delete 'configure)
6523 (delete 'build)
6524 (replace 'install
6525 (install-pom-file "pom.xml")))))
6526 (propagated-inputs
6527 `(("java-sonatype-oss-parent-pom" ,java-sonatype-oss-parent-pom-7)))))
6528
6529;; The java-commons-logging package provides adapters to many different
6530;; logging frameworks. To avoid an excessive dependency graph we try to build
6531;; it with only a minimal set of adapters.
6532(define-public java-commons-logging-minimal
6533 (package
6534 (name "java-commons-logging-minimal")
6535 (version "1.2")
6536 (source (origin
6537 (method url-fetch)
6538 (uri (string-append "mirror://apache/commons/logging/source/"
6539 "commons-logging-" version "-src.tar.gz"))
6540 (sha256
6541 (base32
6542 "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9"))))
6543 (build-system ant-build-system)
6544 (arguments
6545 `(#:tests? #f ; avoid dependency on logging frameworks
6546 #:jar-name "commons-logging-minimal.jar"
6547 #:phases
6548 (modify-phases %standard-phases
6549 (add-after 'unpack 'delete-adapters-and-tests
6550 (lambda _
6551 ;; Delete all adapters except for NoOpLog, SimpleLog, and
6552 ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl
6553 ;; is used by applications; SimpleLog is the only actually usable
6554 ;; implementation that does not depend on another logging
6555 ;; framework.
6556 (for-each
6557 (lambda (file)
6558 (delete-file (string-append
6559 "src/main/java/org/apache/commons/logging/impl/" file)))
6560 (list "Jdk13LumberjackLogger.java"
6561 "WeakHashtable.java"
6562 "Log4JLogger.java"
6563 "ServletContextCleaner.java"
6564 "Jdk14Logger.java"
6565 "AvalonLogger.java"
6566 "LogKitLogger.java"))
6567 (delete-file-recursively "src/test")
6568 #t)))))
6569 (home-page "https://commons.apache.org/logging/")
6570 (synopsis "Common API for logging implementations")
6571 (description "The Logging package is a thin bridge between different
6572logging implementations. A library that uses the commons-logging API can be
6573used with any logging implementation at runtime.")
6574 (license license:asl2.0)))
6575
6576;; This is the last release of the 1.x series.
6577(define-public java-mockito-1
6578 (package
6579 (name "java-mockito")
6580 (version "1.10.19")
6581 (source (origin
6582 (method url-fetch)
6583 (uri (string-append "https://repo1.maven.org/maven2/"
6584 "org/mockito/mockito-core/" version
6585 "/mockito-core-" version "-sources.jar"))
6586 (sha256
6587 (base32
6588 "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc"))))
6589 (build-system ant-build-system)
6590 (arguments
6591 `(#:jar-name "mockito.jar"
6592 #:tests? #f ; no tests included
6593 ;; FIXME: patch-and-repack does not support jars, so we have to apply
6594 ;; patches in build phases.
6595 #:phases
6596 (modify-phases %standard-phases
6597 ;; Mockito was developed against a different version of hamcrest,
6598 ;; which does not require matcher implementations to provide an
6599 ;; implementation of the "describeMismatch" method. We add this
6600 ;; simple definition to pass the build with our version of hamcrest.
6601 (add-after 'unpack 'fix-hamcrest-build-error
6602 (lambda _
6603 (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java"
6604 (("public Matcher getActualMatcher\\(\\) .*" line)
6605 (string-append "
6606 public void describeMismatch(Object item, Description description) {
6607 actualMatcher.describeMismatch(item, description);
6608 }"
6609 line)))
6610 #t))
6611 ;; Mockito bundles cglib. We have a cglib package, so let's use
6612 ;; that instead.
6613 (add-after 'unpack 'use-system-libraries
6614 (lambda _
6615 (with-directory-excursion "src/org/mockito/internal/creation/cglib"
6616 (substitute* '("CGLIBHacker.java"
6617 "CglibMockMaker.java"
6618 "ClassImposterizer.java"
6619 "DelegatingMockitoMethodProxy.java"
6620 "MethodInterceptorFilter.java"
6621 "MockitoNamingPolicy.java"
6622 "SerializableMockitoMethodProxy.java"
6623 "SerializableNoOp.java")
6624 (("import org.mockito.cglib") "import net.sf.cglib")))
6625 #t)))))
6626 (inputs
6627 (list java-junit java-objenesis java-cglib java-hamcrest-core))
6628 (home-page "http://mockito.org")
6629 (synopsis "Mockito is a mock library for Java")
6630 (description "Mockito is a mocking library for Java which lets you write
6631tests with a clean and simple API. It generates mocks using reflection, and
6632it records all mock invocations, including methods arguments.")
6633 (license license:asl2.0)))
6634
6635(define-public java-httpcomponents-httpcore
6636 (package
6637 (name "java-httpcomponents-httpcore")
6638 (version "4.4.6")
6639 (source (origin
6640 (method url-fetch)
6641 (uri (string-append "mirror://apache//httpcomponents/httpcore/"
6642 "source/httpcomponents-core-"
6643 version "-src.tar.gz"))
6644 (sha256
6645 (base32
6646 "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy"))))
6647 (build-system ant-build-system)
6648 (arguments
6649 `(#:jar-name "httpcomponents-httpcore.jar"
6650 #:phases
6651 (modify-phases %standard-phases
6652 (add-after 'unpack 'chdir
6653 (lambda _ (chdir "httpcore") #t)))))
6654 (inputs
6655 (list java-commons-logging-minimal java-commons-lang3))
6656 (native-inputs
6657 (list java-junit java-mockito-1))
6658 (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html")
6659 (synopsis "Low level HTTP transport components")
6660 (description "HttpCore is a set of low level HTTP transport components
6661that can be used to build custom client and server side HTTP services with a
6662minimal footprint. HttpCore supports two I/O models: blocking I/O model based
6663on the classic Java I/O and non-blocking, event driven I/O model based on Java
6664NIO.
6665
6666This package provides the blocking I/O model library.")
6667 (license license:asl2.0)))
6668
6669(define-public java-httpcomponents-httpcore-nio
6670 (package (inherit java-httpcomponents-httpcore)
6671 (name "java-httpcomponents-httpcore-nio")
6672 (arguments
6673 `(#:jar-name "httpcomponents-httpcore-nio.jar"
6674 #:phases
6675 (modify-phases %standard-phases
6676 (add-after 'unpack 'chdir
6677 (lambda _ (chdir "httpcore-nio") #t)))))
6678 (inputs
6679 (modify-inputs (package-inputs java-httpcomponents-httpcore)
6680 (prepend java-httpcomponents-httpcore java-hamcrest-core)))
6681 (description "HttpCore is a set of low level HTTP transport components
6682that can be used to build custom client and server side HTTP services with a
6683minimal footprint. HttpCore supports two I/O models: blocking I/O model based
6684on the classic Java I/O and non-blocking, event driven I/O model based on Java
6685NIO.
6686
6687This package provides the non-blocking I/O model library based on Java
6688NIO.")))
6689
6690(define-public java-httpcomponents-httpcore-ab
6691 (package (inherit java-httpcomponents-httpcore)
6692 (name "java-httpcomponents-httpcore-ab")
6693 (arguments
6694 `(#:jar-name "httpcomponents-httpcore-ab.jar"
6695 #:phases
6696 (modify-phases %standard-phases
6697 (add-after 'unpack 'chdir
6698 (lambda _ (chdir "httpcore-ab") #t)))))
6699 (inputs
6700 (modify-inputs (package-inputs java-httpcomponents-httpcore)
6701 (prepend java-httpcomponents-httpcore java-commons-cli
6702 java-hamcrest-core)))
6703 (synopsis "Apache HttpCore benchmarking tool")
6704 (description "This package provides the HttpCore benchmarking tool. It is
6705an Apache AB clone based on HttpCore.")))
6706
6707(define-public java-httpcomponents-httpcore-osgi
6708 (package (inherit java-httpcomponents-httpcore)
6709 (name "java-httpcomponents-httpcore-osgi")
6710 (arguments
6711 `(#:jar-name "httpcomponents-httpcore-osgi.jar"
6712 #:phases
6713 (modify-phases %standard-phases
6714 (add-after 'unpack 'chdir
6715 (lambda _ (chdir "httpcore-osgi"))))))
6716 (inputs
6717 (modify-inputs (package-inputs java-httpcomponents-httpcore)
6718 (prepend java-httpcomponents-httpcore
6719 java-httpcomponents-httpcore-nio
6720 java-hamcrest-core)))
6721 (native-inputs (list java-ops4j-pax-exam-core
6722 java-ops4j-pax-exam-core-junit
6723 java-ops4j-pax-exam-core-spi
6724 java-junit))
6725 (description "HttpCore is a set of low level HTTP transport components
6726that can be used to build custom client and server side HTTP services with a
6727minimal footprint. HttpCore supports two I/O models: blocking I/O model based
6728on the classic Java I/O and non-blocking, event driven I/O model based on Java
6729NIO.
6730
6731This package provides... some tests.")))
6732
6733(define-public java-httpcomponents-httpclient
6734 (package
6735 (name "java-httpcomponents-httpclient")
6736 (version "4.5.12")
6737 (source (origin
6738 (method url-fetch)
6739 (uri (string-append "mirror://apache/httpcomponents/httpclient/"
6740 "source/httpcomponents-client-"
6741 version "-src.tar.gz"))
6742 (sha256
6743 (base32
6744 "1va99m2zc2liv0v9vn72p5ja8yz4s5wq7zpahaai5nr966kvxzkb"))))
6745 (build-system ant-build-system)
6746 (arguments
6747 `(#:jar-name "httpcomponents-httpclient.jar"
6748 #:phases
6749 (modify-phases %standard-phases
6750 (add-after 'unpack 'chdir
6751 (lambda _ (chdir "httpclient") #t)))))
6752 (inputs
6753 (list java-commons-logging-minimal
6754 java-commons-codec
6755 java-hamcrest-core
6756 java-httpcomponents-httpcore
6757 java-mockito-1
6758 java-junit))
6759 (home-page "https://hc.apache.org/httpcomponents-client-ga/")
6760 (synopsis "HTTP client library for Java")
6761 (description "Although the @code{java.net} package provides basic
6762functionality for accessing resources via HTTP, it doesn't provide the full
6763flexibility or functionality needed by many applications. @code{HttpClient}
6764seeks to fill this void by providing an efficient, up-to-date, and
6765feature-rich package implementing the client side of the most recent HTTP
6766standards and recommendations.")
6767 (license license:asl2.0)))
6768
6769(define-public java-httpcomponents-httpclient-cache
6770 (package (inherit java-httpcomponents-httpclient)
6771 (name "java-httpcomponents-httpclient-cache")
6772 (arguments
6773 `(#:jar-name "httpcomponents-httpclient-cache.jar"
6774 #:source-dir "src/main/java"
6775 #:test-dir "src/test"
6776 #:tests? #f; tests are broken with current cglib.
6777 #:phases
6778 (modify-phases %standard-phases
6779 (add-after 'unpack 'delete-unused-impls
6780 (lambda _
6781 (for-each
6782 delete-file-recursively
6783 '("src/main/java/org/apache/http/impl/client/cache/ehcache/"
6784 "src/main/java/org/apache/http/impl/client/cache/memcached/"
6785 "src/test/java/org/apache/http/impl/client/cache/ehcache/"
6786 "src/test/java/org/apache/http/impl/client/cache/memcached/"))))
6787 (add-after 'unpack 'chdir
6788 (lambda _ (chdir "httpclient-cache"))))))
6789 (inputs
6790 (modify-inputs (package-inputs java-httpcomponents-httpclient)
6791 (prepend java-httpcomponents-httpclient
6792 java-httpcomponents-httpmime
6793 java-hamcrest-core)))
6794 (description "This package provides an API for caching accessed HTTP
6795resources.")))
6796
6797(define-public java-httpcomponents-httpclient-osgi
6798 (package (inherit java-httpcomponents-httpclient)
6799 (name "java-httpcomponents-httpclient-osgi")
6800 (arguments
6801 `(#:jar-name "httpcomponents-httpclient-osgi.jar"
6802 #:tests? #f; tests are broken with current cglib.
6803 #:phases
6804 (modify-phases %standard-phases
6805 (add-after 'unpack 'chdir
6806 (lambda _ (chdir "httpclient-osgi") #t)))))
6807 (inputs
6808 (modify-inputs (package-inputs java-httpcomponents-httpclient)
6809 (prepend java-httpcomponents-httpclient
6810 java-httpcomponents-httpclient-cache
6811 java-osgi-framework
6812 java-osgi-service-cm
6813 java-hamcrest-core)))))
6814
6815(define-public java-httpcomponents-httpmime
6816 (package (inherit java-httpcomponents-httpclient)
6817 (name "java-httpcomponents-httpmime")
6818 (arguments
6819 `(#:jar-name "httpcomponents-httpmime.jar"
6820 #:phases
6821 (modify-phases %standard-phases
6822 (add-after 'unpack 'chdir
6823 (lambda _ (chdir "httpmime") #t)))))
6824 (inputs
6825 (list java-httpcomponents-httpclient java-httpcomponents-httpcore
6826 java-junit java-hamcrest-core))))
6827
6828(define-public java-commons-net
6829 (package
6830 (name "java-commons-net")
6831 (version "3.6")
6832 (source (origin
6833 (method url-fetch)
6834 (uri (string-append "mirror://apache/commons/net/source/"
6835 "commons-net-" version "-src.tar.gz"))
6836 (sha256
6837 (base32
6838 "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr"))))
6839 (build-system ant-build-system)
6840 (arguments
6841 `(;; FIXME: MainTest.java tries to read "examples.properties" (which
6842 ;; should be "resources/examples/examples.properties"), but gets "null"
6843 ;; instead.
6844 #:tests? #f
6845 #:jar-name "commons-net.jar"))
6846 (native-inputs
6847 (list java-junit java-hamcrest-core))
6848 (home-page "https://commons.apache.org/net/")
6849 (synopsis "Client library for many basic Internet protocols")
6850 (description "The Apache Commons Net library implements the client side of
6851many basic Internet protocols. The purpose of the library is to provide
6852fundamental protocol access, not higher-level abstractions.")
6853 (license license:asl2.0)))
6854
6855(define-public java-jsch
6856 (package
6857 (name "java-jsch")
6858 (version "0.1.55")
6859 (source (origin
6860 (method url-fetch)
6861 (uri (string-append "mirror://sourceforge/jsch/jsch/"
6862 version "/jsch-" version ".zip"))
6863 (sha256
6864 (base32
6865 "1lxyjwvmwa723wcf3bqn816hkvc03vz4xhbsi7bvfhrz2rpgcfq6"))))
6866 (build-system ant-build-system)
6867 (arguments
6868 `(#:build-target "dist"
6869 #:tests? #f ; no tests included
6870 #:phases
6871 (modify-phases %standard-phases
6872 (replace 'install (install-jars "dist")))))
6873 (native-inputs
6874 (list unzip))
6875 (home-page "http://www.jcraft.com/jsch/")
6876 (synopsis "Pure Java implementation of SSH2")
6877 (description "JSch is a pure Java implementation of SSH2. JSch allows you
6878to connect to an SSH server and use port forwarding, X11 forwarding, file
6879transfer, etc., and you can integrate its functionality into your own Java
6880programs.")
6881 (license license:bsd-3)))
6882
6883(define-public java-commons-compress
6884 (package
6885 (name "java-commons-compress")
6886 (version "1.21")
6887 (source (origin
6888 (method url-fetch)
6889 (uri (string-append "mirror://apache/commons/compress/source/"
6890 "commons-compress-" version "-src.tar.gz"))
6891 (sha256
6892 (base32
6893 "1rkpb6xcyly1wnbx4q6iq6p5hrr0h1d0ppb5r07psc75cbmizjry"))))
6894 (build-system ant-build-system)
6895 (arguments
6896 `(#:jar-name "commons-compress.jar"
6897 #:source-dir "src/main/java"
6898 #:tests? #f; requires java-mockito-3
6899 #:phases
6900 (modify-phases %standard-phases
6901 (replace 'install (install-from-pom "pom.xml")))))
6902 (propagated-inputs
6903 (list java-asm-3
6904 java-brotli
6905 java-osgi-core
6906 java-xz
6907 java-zstd
6908 apache-commons-parent-pom-52))
6909 (home-page "https://commons.apache.org/proper/commons-compress/")
6910 (synopsis "Java library for working with compressed files")
6911 (description "The Apache Commons Compress library defines an API for
6912working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ,
6913Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.")
6914 (license license:asl2.0)))
6915
6916(define-public java-commons-csv
6917 (package
6918 (name "java-commons-csv")
6919 (version "1.4")
6920 (source (origin
6921 (method url-fetch)
6922 (uri (string-append "mirror://apache/commons/csv/source/"
6923 "commons-csv-" version "-src.tar.gz"))
6924 (sha256
6925 (base32
6926 "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij"))))
6927 (build-system ant-build-system)
6928 (arguments
6929 `(#:jar-name "commons-csv.jar"
6930 #:source-dir "src/main/java"
6931 #:tests? #f)); FIXME: requires java-h2
6932 (inputs
6933 `(("java-hamcrest-core" ,java-hamcrest-core)
6934 ("java-commons-io" ,java-commons-io)
6935 ("java-commons-lang3" ,java-commons-lang3)
6936 ("junit" ,java-junit)))
6937 (home-page "https://commons.apache.org/proper/commons-csv/")
6938 (synopsis "Read and write CSV documents")
6939 (description "Commons CSV reads and writes files in variations of the Comma
6940Separated Value (CSV) format. The most common CSV formats are predefined in the
6941CSVFormat class:
6942
6943@itemize
6944@item Microsoft Excel
6945@item Informix UNLOAD
6946@item Informix UNLOAD CSV
6947@item MySQL
6948@item RFC 4180
6949@item TDF
6950@end itemize
6951
6952Custom formats can be created using a fluent style API.")
6953 (license license:asl2.0)))
6954
6955(define-public java-osgi-annotation
6956 (package
6957 (name "java-osgi-annotation")
6958 (version "6.0.0")
6959 (source (origin
6960 (method url-fetch)
6961 (uri (string-append "https://repo1.maven.org/maven2/"
6962 "org/osgi/org.osgi.annotation/" version "/"
6963 "org.osgi.annotation-" version "-sources.jar"))
6964 (sha256
6965 (base32
6966 "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w"))))
6967 (build-system ant-build-system)
6968 (arguments
6969 `(#:tests? #f ; no tests
6970 #:jar-name "osgi-annotation.jar"
6971 #:phases
6972 (modify-phases %standard-phases
6973 (add-before 'install 'create-pom
6974 (generate-pom.xml "pom.xml" "osgi" "osgi-annotation" ,version))
6975 (replace 'install (install-from-pom "pom.xml")))))
6976 (home-page "https://www.osgi.org")
6977 (synopsis "Annotation module of OSGi framework")
6978 (description
6979 "OSGi, for Open Services Gateway initiative framework, is a module system
6980and service platform for the Java programming language. This package contains
6981the OSGi annotation module, providing additional services to help dynamic
6982components.")
6983 (license license:asl2.0)))
6984
6985(define-public java-osgi-core
6986 (package
6987 (name "java-osgi-core")
6988 (version "6.0.0")
6989 (source (origin
6990 (method url-fetch)
6991 (uri (string-append "https://repo1.maven.org/maven2/"
6992 "org/osgi/org.osgi.core/" version "/"
6993 "org.osgi.core-" version "-sources.jar"))
6994 (sha256
6995 (base32
6996 "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv"))))
6997 (build-system ant-build-system)
6998 (arguments
6999 `(#:tests? #f ; no tests
7000 #:jar-name "osgi-core.jar"
7001 #:phases
7002 (modify-phases %standard-phases
7003 (add-before 'install 'create-pom
7004 (generate-pom.xml "pom.xml" "org.osgi" "org.osgi.core" ,version))
7005 (replace 'install (install-from-pom "pom.xml")))))
7006 (inputs
7007 (list java-osgi-annotation))
7008 (home-page "https://www.osgi.org")
7009 (synopsis "Core module of OSGi framework")
7010 (description
7011 "OSGi, for Open Services Gateway initiative framework, is a module system
7012and service platform for the Java programming language. This package contains
7013the OSGi Core module.")
7014 (license license:asl2.0)))
7015
7016(define-public java-osgi-service-event
7017 (package
7018 (name "java-osgi-service-event")
7019 (version "1.3.1")
7020 (source (origin
7021 (method url-fetch)
7022 (uri (string-append "https://repo1.maven.org/maven2/"
7023 "org/osgi/org.osgi.service.event/"
7024 version "/org.osgi.service.event-"
7025 version "-sources.jar"))
7026 (sha256
7027 (base32
7028 "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm"))))
7029 (build-system ant-build-system)
7030 (arguments
7031 `(#:tests? #f ; no tests
7032 #:jar-name "osgi-service-event.jar"))
7033 (inputs
7034 (list java-osgi-annotation java-osgi-core))
7035 (home-page "https://www.osgi.org")
7036 (synopsis "OSGi service event module")
7037 (description
7038 "OSGi, for Open Services Gateway initiative framework, is a module system
7039and service platform for the Java programming language. This package contains
7040the OSGi @code{org.osgi.service.event} module.")
7041 (license license:asl2.0)))
7042
7043(define-public java-eclipse-osgi
7044 (package
7045 (name "java-eclipse-osgi")
7046 (version "3.11.3")
7047 (source (origin
7048 (method url-fetch)
7049 (uri (string-append "https://repo1.maven.org/maven2/"
7050 "org/eclipse/platform/org.eclipse.osgi/"
7051 version "/org.eclipse.osgi-"
7052 version "-sources.jar"))
7053 (sha256
7054 (base32
7055 "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b"))))
7056 (build-system ant-build-system)
7057 (arguments
7058 `(#:tests? #f ; no tests included
7059 #:jar-name "eclipse-equinox-osgi.jar"))
7060 (inputs
7061 (list java-osgi-annotation))
7062 (home-page "https://www.eclipse.org/equinox/")
7063 (synopsis "Eclipse Equinox OSGi framework")
7064 (description "This package provides an implementation of the OSGi Core
7065specification.")
7066 (license license:epl1.0)))
7067
7068(define-public java-eclipse-equinox-common
7069 (package
7070 (name "java-eclipse-equinox-common")
7071 (version "3.10.200")
7072 (source (origin
7073 (method url-fetch)
7074 (uri (string-append "https://repo1.maven.org/maven2/"
7075 "org/eclipse/platform/org.eclipse.equinox.common/"
7076 version "/org.eclipse.equinox.common-"
7077 version "-sources.jar"))
7078 (sha256
7079 (base32
7080 "1yn8ij6xsljlf35sr2l7wvyvc0ss4n1rv0ry5zkgb49dj4hyrqrj"))))
7081 (build-system ant-build-system)
7082 (arguments
7083 `(#:tests? #f ; no tests included
7084 #:jar-name "eclipse-equinox-common.jar"))
7085 (inputs
7086 (list java-eclipse-osgi))
7087 (home-page "https://www.eclipse.org/equinox/")
7088 (synopsis "Common Eclipse runtime")
7089 (description "This package provides the common Eclipse runtime.")
7090 (license license:epl1.0)))
7091
7092(define-public java-eclipse-core-jobs
7093 (package
7094 (name "java-eclipse-core-jobs")
7095 (version "3.8.0")
7096 (source (origin
7097 (method url-fetch)
7098 (uri (string-append "https://repo1.maven.org/maven2/"
7099 "org/eclipse/platform/org.eclipse.core.jobs/"
7100 version "/org.eclipse.core.jobs-"
7101 version "-sources.jar"))
7102 (sha256
7103 (base32
7104 "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b"))))
7105 (build-system ant-build-system)
7106 (arguments
7107 `(#:tests? #f ; no tests included
7108 #:jar-name "eclipse-core-jobs.jar"))
7109 (inputs
7110 (list java-eclipse-equinox-common java-eclipse-osgi))
7111 (home-page "https://www.eclipse.org/equinox/")
7112 (synopsis "Eclipse jobs mechanism")
7113 (description "This package provides the Eclipse jobs mechanism.")
7114 (license license:epl1.0)))
7115
7116(define-public java-eclipse-equinox-registry
7117 (package
7118 (name "java-eclipse-equinox-registry")
7119 (version "3.6.100")
7120 (source (origin
7121 (method url-fetch)
7122 (uri (string-append "https://repo1.maven.org/maven2/"
7123 "org/eclipse/platform/org.eclipse.equinox.registry/"
7124 version "/org.eclipse.equinox.registry-"
7125 version "-sources.jar"))
7126 (sha256
7127 (base32
7128 "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k"))))
7129 (build-system ant-build-system)
7130 (arguments
7131 `(#:tests? #f ; no tests included
7132 #:jar-name "eclipse-equinox-registry.jar"))
7133 (inputs
7134 (list java-eclipse-core-jobs java-eclipse-equinox-common
7135 java-eclipse-osgi))
7136 (home-page "https://www.eclipse.org/equinox/")
7137 (synopsis "Eclipse extension registry support")
7138 (description "This package provides support for the Eclipse extension
7139registry.")
7140 (license license:epl1.0)))
7141
7142(define-public java-eclipse-equinox-app
7143 (package
7144 (name "java-eclipse-equinox-app")
7145 (version "1.3.400")
7146 (source (origin
7147 (method url-fetch)
7148 (uri (string-append "https://repo1.maven.org/maven2/"
7149 "org/eclipse/platform/org.eclipse.equinox.app/"
7150 version "/org.eclipse.equinox.app-"
7151 version "-sources.jar"))
7152 (sha256
7153 (base32
7154 "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab"))))
7155 (build-system ant-build-system)
7156 (arguments
7157 `(#:tests? #f ; no tests included
7158 #:jar-name "eclipse-equinox-app.jar"))
7159 (inputs
7160 (list java-eclipse-equinox-common java-eclipse-equinox-registry
7161 java-eclipse-osgi java-osgi-service-event))
7162 (home-page "https://www.eclipse.org/equinox/")
7163 (synopsis "Equinox application container")
7164 (description "This package provides the Equinox application container for
7165Eclipse.")
7166 (license license:epl1.0)))
7167
7168(define-public java-eclipse-equinox-preferences
7169 (package
7170 (name "java-eclipse-equinox-preferences")
7171 (version "3.6.1")
7172 (source (origin
7173 (method url-fetch)
7174 (uri (string-append "https://repo1.maven.org/maven2/"
7175 "org/eclipse/platform/org.eclipse.equinox.preferences/"
7176 version "/org.eclipse.equinox.preferences-"
7177 version "-sources.jar"))
7178 (sha256
7179 (base32
7180 "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2"))))
7181 (build-system ant-build-system)
7182 (arguments
7183 `(#:tests? #f ; no tests included
7184 #:jar-name "eclipse-equinox-preferences.jar"))
7185 (inputs
7186 (list java-eclipse-equinox-common java-eclipse-equinox-registry
7187 java-eclipse-osgi))
7188 (home-page "https://www.eclipse.org/equinox/")
7189 (synopsis "Eclipse preferences mechanism")
7190 (description "This package provides the Eclipse preferences mechanism with
7191the module @code{org.eclipse.equinox.preferences}.")
7192 (license license:epl1.0)))
7193
7194(define-public java-eclipse-core-contenttype
7195 (package
7196 (name "java-eclipse-core-contenttype")
7197 (version "3.5.100")
7198 (source (origin
7199 (method url-fetch)
7200 (uri (string-append "https://repo1.maven.org/maven2/"
7201 "org/eclipse/platform/org.eclipse.core.contenttype/"
7202 version "/org.eclipse.core.contenttype-"
7203 version "-sources.jar"))
7204 (sha256
7205 (base32
7206 "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi"))))
7207 (build-system ant-build-system)
7208 (arguments
7209 `(#:tests? #f ; no tests included
7210 #:jar-name "eclipse-core-contenttype.jar"))
7211 (inputs
7212 (list java-eclipse-equinox-common java-eclipse-equinox-preferences
7213 java-eclipse-equinox-registry java-eclipse-osgi))
7214 (home-page "https://www.eclipse.org/")
7215 (synopsis "Eclipse content mechanism")
7216 (description "This package provides the Eclipse content mechanism in the
7217@code{org.eclipse.core.contenttype} module.")
7218 (license license:epl1.0)))
7219
7220(define-public java-eclipse-core-runtime
7221 (package
7222 (name "java-eclipse-core-runtime")
7223 (version "3.15.100")
7224 (source (origin
7225 (method url-fetch)
7226 (uri (string-append "https://repo1.maven.org/maven2/"
7227 "org/eclipse/platform/org.eclipse.core.runtime/"
7228 version "/org.eclipse.core.runtime-"
7229 version "-sources.jar"))
7230 (sha256
7231 (base32
7232 "0l8xayacsbjvz5hypx2fv47vpw2n4dspamcfb3hx30x9hj8vmg7r"))))
7233 (build-system ant-build-system)
7234 (arguments
7235 `(#:tests? #f ; no tests included
7236 #:jar-name "eclipse-core-runtime.jar"))
7237 (inputs
7238 (list java-eclipse-core-contenttype
7239 java-eclipse-core-jobs
7240 java-eclipse-equinox-app
7241 java-eclipse-equinox-common
7242 java-eclipse-equinox-registry
7243 java-eclipse-equinox-preferences
7244 java-eclipse-osgi))
7245 (home-page "https://www.eclipse.org/")
7246 (synopsis "Eclipse core runtime")
7247 (description "This package provides the Eclipse core runtime with the
7248module @code{org.eclipse.core.runtime}.")
7249 (license license:epl1.0)))
7250
7251(define-public java-eclipse-core-filesystem
7252 (package
7253 (name "java-eclipse-core-filesystem")
7254 (version "1.6.1")
7255 (source (origin
7256 (method url-fetch)
7257 (uri (string-append "https://repo1.maven.org/maven2/"
7258 "org/eclipse/platform/org.eclipse.core.filesystem/"
7259 version "/org.eclipse.core.filesystem-"
7260 version "-sources.jar"))
7261 (sha256
7262 (base32
7263 "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj"))))
7264 (build-system ant-build-system)
7265 (arguments
7266 `(#:tests? #f ; no tests included
7267 #:jar-name "eclipse-core-filesystem.jar"))
7268 (inputs
7269 (list java-eclipse-equinox-common java-eclipse-equinox-registry
7270 java-eclipse-osgi))
7271 (home-page "https://www.eclipse.org/")
7272 (synopsis "Eclipse core file system")
7273 (description "This package provides the Eclipse core file system with the
7274module @code{org.eclipse.core.filesystem}.")
7275 (license license:epl1.0)))
7276
7277(define-public java-eclipse-core-expressions
7278 (package
7279 (name "java-eclipse-core-expressions")
7280 (version "3.5.100")
7281 (source (origin
7282 (method url-fetch)
7283 (uri (string-append "https://repo1.maven.org/maven2/"
7284 "org/eclipse/platform/org.eclipse.core.expressions/"
7285 version "/org.eclipse.core.expressions-"
7286 version "-sources.jar"))
7287 (sha256
7288 (base32
7289 "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f"))))
7290 (build-system ant-build-system)
7291 (arguments
7292 `(#:tests? #f ; no tests included
7293 #:jar-name "eclipse-core-expressions.jar"))
7294 (inputs
7295 (list java-eclipse-equinox-common java-eclipse-equinox-registry
7296 java-eclipse-equinox-preferences java-eclipse-core-runtime
7297 java-eclipse-osgi))
7298 (home-page "https://www.eclipse.org/")
7299 (synopsis "Eclipse core expression language")
7300 (description "This package provides the Eclipse core expression language
7301with the @code{org.eclipse.core.expressions} module.")
7302 (license license:epl1.0)))
7303
7304(define-public java-eclipse-core-variables
7305 (package
7306 (name "java-eclipse-core-variables")
7307 (version "3.3.0")
7308 (source (origin
7309 (method url-fetch)
7310 (uri (string-append "https://repo1.maven.org/maven2/"
7311 "org/eclipse/platform/org.eclipse.core.variables/"
7312 version "/org.eclipse.core.variables-"
7313 version "-sources.jar"))
7314 (sha256
7315 (base32
7316 "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy"))))
7317 (build-system ant-build-system)
7318 (arguments
7319 `(#:tests? #f ; no tests included
7320 #:jar-name "eclipse-core-variables.jar"))
7321 (inputs
7322 (list java-eclipse-equinox-common java-eclipse-equinox-registry
7323 java-eclipse-equinox-preferences java-eclipse-core-runtime
7324 java-eclipse-osgi))
7325 (home-page "https://www.eclipse.org/platform")
7326 (synopsis "Eclipse core variables")
7327 (description "This package provides the Eclipse core variables module
7328@code{org.eclipse.core.variables}.")
7329 (license license:epl1.0)))
7330
7331(define-public java-eclipse-ant-core
7332 (package
7333 (name "java-eclipse-ant-core")
7334 (version "3.4.100")
7335 (source (origin
7336 (method url-fetch)
7337 (uri (string-append "https://repo1.maven.org/maven2/"
7338 "org/eclipse/platform/org.eclipse.ant.core/"
7339 version "/org.eclipse.ant.core-"
7340 version "-sources.jar"))
7341 (sha256
7342 (base32
7343 "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7"))))
7344 (build-system ant-build-system)
7345 (arguments
7346 `(#:tests? #f ; no tests included
7347 #:jar-name "eclipse-ant-core.jar"))
7348 (inputs
7349 (list java-eclipse-equinox-app
7350 java-eclipse-equinox-common
7351 java-eclipse-equinox-registry
7352 java-eclipse-equinox-preferences
7353 java-eclipse-core-contenttype
7354 java-eclipse-core-runtime
7355 java-eclipse-core-variables
7356 java-eclipse-osgi))
7357 (home-page "https://www.eclipse.org/platform")
7358 (synopsis "Ant build tool core libraries")
7359 (description "This package provides the ant build tool core libraries with
7360the module @code{org.eclipse.ant.core}.")
7361 (license license:epl1.0)))
7362
7363(define-public java-eclipse-core-resources
7364 (package
7365 (name "java-eclipse-core-resources")
7366 (version "3.13.200")
7367 (source (origin
7368 (method url-fetch)
7369 (uri (string-append "https://repo1.maven.org/maven2/"
7370 "org/eclipse/platform/org.eclipse.core.resources/"
7371 version "/org.eclipse.core.resources-"
7372 version "-sources.jar"))
7373 (sha256
7374 (base32
7375 "1sn3b6ky72hkvxcgf9b2jkpbdh3y8lbhi9xxwv1dsiddpkkq91hs"))))
7376 (build-system ant-build-system)
7377 (arguments
7378 `(#:tests? #f ; no tests included
7379 #:jar-name "eclipse-core-resources.jar"))
7380 (inputs
7381 (list java-eclipse-equinox-common
7382 java-eclipse-equinox-preferences
7383 java-eclipse-equinox-registry
7384 java-eclipse-core-contenttype
7385 java-eclipse-core-expressions
7386 java-eclipse-core-filesystem
7387 java-eclipse-core-jobs
7388 java-eclipse-core-runtime
7389 java-eclipse-ant-core
7390 java-eclipse-osgi))
7391 (home-page "https://www.eclipse.org/")
7392 (synopsis "Eclipse core resource management")
7393 (description "This package provides the Eclipse core resource management
7394module @code{org.eclipse.core.resources}.")
7395 (license license:epl1.0)))
7396
7397(define-public java-eclipse-compare-core
7398 (package
7399 (name "java-eclipse-compare-core")
7400 (version "3.6.0")
7401 (source (origin
7402 (method url-fetch)
7403 (uri (string-append "https://repo1.maven.org/maven2/"
7404 "org/eclipse/platform/org.eclipse.compare.core/"
7405 version "/org.eclipse.compare.core-"
7406 version "-sources.jar"))
7407 (sha256
7408 (base32
7409 "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg"))))
7410 (build-system ant-build-system)
7411 (arguments
7412 `(#:tests? #f ; no tests included
7413 #:jar-name "eclipse-compare-core.jar"))
7414 (inputs
7415 (list java-eclipse-core-runtime java-eclipse-equinox-common
7416 java-eclipse-osgi java-icu4j))
7417 (home-page "https://www.eclipse.org/")
7418 (synopsis "Eclipse core compare support")
7419 (description "This package provides the Eclipse core compare support
7420module @code{org.eclipse.compare.core}.")
7421 (license license:epl1.0)))
7422
7423(define-public java-eclipse-team-core
7424 (package
7425 (name "java-eclipse-team-core")
7426 (version "3.8.0")
7427 (source (origin
7428 (method url-fetch)
7429 (uri (string-append "https://repo1.maven.org/maven2/"
7430 "org/eclipse/platform/org.eclipse.team.core/"
7431 version "/org.eclipse.team.core-"
7432 version "-sources.jar"))
7433 (sha256
7434 (base32
7435 "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7"))))
7436 (build-system ant-build-system)
7437 (arguments
7438 `(#:tests? #f ; no tests included
7439 #:jar-name "eclipse-team-core.jar"))
7440 (inputs
7441 (list java-eclipse-compare-core
7442 java-eclipse-core-contenttype
7443 java-eclipse-core-filesystem
7444 java-eclipse-core-jobs
7445 java-eclipse-core-resources
7446 java-eclipse-core-runtime
7447 java-eclipse-equinox-common
7448 java-eclipse-equinox-registry
7449 java-eclipse-equinox-preferences
7450 java-eclipse-osgi))
7451 (home-page "https://www.eclipse.org/platform")
7452 (synopsis "Eclipse team support core")
7453 (description "This package provides the Eclipse team support core module
7454@code{org.eclipse.team.core}.")
7455 (license license:epl1.0)))
7456
7457(define-public java-eclipse-core-commands
7458 (package
7459 (name "java-eclipse-core-commands")
7460 (version "3.8.1")
7461 (source (origin
7462 (method url-fetch)
7463 (uri (string-append "https://repo1.maven.org/maven2/"
7464 "org/eclipse/platform/org.eclipse.core.commands/"
7465 version "/org.eclipse.core.commands-"
7466 version "-sources.jar"))
7467 (sha256
7468 (base32
7469 "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9"))))
7470 (build-system ant-build-system)
7471 (arguments
7472 `(#:tests? #f ; no tests included
7473 #:jar-name "eclipse-core-commands.jar"))
7474 (inputs
7475 (list java-eclipse-equinox-common))
7476 (home-page "https://www.eclipse.org/platform")
7477 (synopsis "Eclipse core commands")
7478 (description "This package provides Eclipse core commands in the module
7479@code{org.eclipse.core.commands}.")
7480 (license license:epl1.0)))
7481
7482(define-public java-eclipse-text
7483 (package
7484 (name "java-eclipse-text")
7485 (version "3.6.0")
7486 (source (origin
7487 (method url-fetch)
7488 (uri (string-append "https://repo1.maven.org/maven2/"
7489 "org/eclipse/platform/org.eclipse.text/"
7490 version "/org.eclipse.text-"
7491 version "-sources.jar"))
7492 (sha256
7493 (base32
7494 "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1"))))
7495 (build-system ant-build-system)
7496 (arguments
7497 `(#:tests? #f ; no tests included
7498 #:jar-name "eclipse-text.jar"
7499 #:phases
7500 (modify-phases %standard-phases
7501 ;; When creating a new category we must make sure that the new list
7502 ;; matches List<Position>. By default it seems to be too generic
7503 ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>.
7504 ;; Without this we get this error:
7505 ;;
7506 ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376:
7507 ;; error: method put in interface Map<K,V> cannot be applied to given types;
7508 ;; [javac] fPositions.put(category, new ArrayList<>());
7509 ;; [javac] ^
7510 ;; [javac] required: String,List<Position>
7511 ;; [javac] found: String,ArrayList<Object>
7512 ;; [javac] reason: actual argument ArrayList<Object> cannot be converted
7513 ;; to List<Position> by method invocation conversion
7514 ;; [javac] where K,V are type-variables:
7515 ;; [javac] K extends Object declared in interface Map
7516 ;; [javac] V extends Object declared in interface Map
7517 ;;
7518 ;; I don't know if this is a good fix. I suspect it is not, but it
7519 ;; seems to work.
7520 (add-after 'unpack 'fix-compilation-error
7521 (lambda _
7522 (substitute* "src/org/eclipse/jface/text/AbstractDocument.java"
7523 (("Positions.put\\(category, new ArrayList<>\\(\\)\\);")
7524 "Positions.put(category, new ArrayList<Position>());"))
7525 #t)))))
7526 (inputs
7527 (list java-eclipse-equinox-common java-eclipse-core-commands
7528 java-icu4j))
7529 (home-page "https://www.eclipse.org/platform")
7530 (synopsis "Eclipse text library")
7531 (description "Platform Text is part of the Platform UI project and
7532provides the basic building blocks for text and text editors within Eclipse
7533and contributes the Eclipse default text editor.")
7534 (license license:epl1.0)))
7535
7536(define-public java-eclipse-jdt-core
7537 (package
7538 (name "java-eclipse-jdt-core")
7539 (version "3.16.0")
7540 (source (origin
7541 (method url-fetch)
7542 (uri (string-append "https://repo1.maven.org/maven2/"
7543 "org/eclipse/jdt/org.eclipse.jdt.core/"
7544 version "/org.eclipse.jdt.core-"
7545 version "-sources.jar"))
7546 (sha256
7547 (base32
7548 "1g560yr9v2kzv34gc2m3ifpgnj7krcdd6h4gd4z83pwqacwkfz0k"))))
7549 (build-system ant-build-system)
7550 (arguments
7551 `(#:tests? #f ; no tests included
7552 #:jar-name "eclipse-jdt-core.jar"
7553 #:phases
7554 (modify-phases %standard-phases
7555 (add-after 'unpack 'move-sources
7556 (lambda _
7557 (with-directory-excursion "src/jdtCompilerAdaptersrc/"
7558 (for-each (lambda (file)
7559 (install-file file (string-append "../" (dirname file))))
7560 (find-files "." ".*")))
7561 (delete-file-recursively "src/jdtCompilerAdaptersrc/")
7562 #t))
7563 (add-before 'build 'copy-resources
7564 (lambda _
7565 (with-directory-excursion "src"
7566 (for-each (lambda (file)
7567 (install-file file (string-append "../build/classes/" (dirname file))))
7568 (find-files "." ".*.(props|properties|rsc)")))
7569 #t)))))
7570 (inputs
7571 (list java-eclipse-core-contenttype
7572 java-eclipse-core-filesystem
7573 java-eclipse-core-jobs
7574 java-eclipse-core-resources
7575 java-eclipse-core-runtime
7576 java-eclipse-equinox-app
7577 java-eclipse-equinox-common
7578 java-eclipse-equinox-preferences
7579 java-eclipse-equinox-registry
7580 java-eclipse-osgi
7581 java-eclipse-text))
7582 (home-page "https://www.eclipse.org/jdt")
7583 (synopsis "Java development tools core libraries")
7584 (description "This package provides the core libraries of the Eclipse Java
7585development tools.")
7586 (license license:epl1.0)))
7587
7588(define-public java-eclipse-jdt-compiler-apt
7589 (package
7590 (name "java-eclipse-jdt-compiler-apt")
7591 (version "1.3.400")
7592 (source (origin
7593 (method url-fetch)
7594 (uri (string-append "https://repo1.maven.org/maven2/"
7595 "org/eclipse/jdt/org.eclipse.jdt.compiler.apt/"
7596 version "/org.eclipse.jdt.compiler.apt-"
7597 version "-sources.jar"))
7598 (sha256
7599 (base32
7600 "1s285k9p2ixdqrknb40jbbvw682n9a7l5lqpn583a8pvlzg2l6r8"))))
7601 (build-system ant-build-system)
7602 (arguments
7603 `(#:tests? #f ; no tests included
7604 #:jar-name "eclipse-jdt-compiler-apt.jar"
7605 #:jdk ,openjdk11))
7606 (inputs
7607 (list java-eclipse-jdt-core))
7608 (home-page "https://www.eclipse.org/jdt/apt/")
7609 (synopsis "Annotation processing tool")
7610 (description "APT stands for Annotation Processing Tool. APT provides a
7611means for generating files and compiling new Java classes based on annotations
7612found in your source code.")
7613 (license license:epl2.0)))
7614
7615(define-public java-eclipse-lsp4j-common
7616 (package
7617 (name "java-eclipse-lsp4j-common")
7618 (version "0.10.0")
7619 (source (origin
7620 (method git-fetch)
7621 (uri (git-reference
7622 (url "https://github.com/eclipse/lsp4j")
7623 (commit (string-append "v" version))))
7624 (file-name (git-file-name name version))
7625 (sha256
7626 (base32
7627 "17srrac0pkpybwwc21rzdvn762zzl9m80rlqihc9b4l55hkqpk98"))))
7628 (build-system ant-build-system)
7629 (home-page "https://eclipse.org/lsp4j/")
7630 (synopsis "LSP4J common package")
7631 (description "Eclipse LSP4J provides Java bindings for the Language
7632Server Protocol and the Debug Adapter Protocol. This package is a common
7633definition intended to be inherited by other packages.")
7634 (license license:epl2.0)))
7635
7636(define-public java-eclipse-lsp4j-debug
7637 (package
7638 (inherit java-eclipse-lsp4j-common)
7639 (name "java-eclipse-lsp4j-debug")
7640 (arguments
7641 `(#:jar-name "eclipse-lsp4j-debug.jar"
7642 #:jdk ,openjdk11
7643 #:tests? #f; tests fail with reflection errors
7644 #:source-dir "org.eclipse.lsp4j.debug/src/main/java"
7645 #:test-dir "org.eclipse.lsp4j.debug/src/test"
7646 #:phases
7647 (modify-phases %standard-phases
7648 (add-before 'build 'copy-xtend
7649 (lambda _
7650 (copy-recursively "org.eclipse.lsp4j.debug/src/main/xtend-gen"
7651 "org.eclipse.lsp4j.debug/src/main/java"))))))
7652 (native-inputs
7653 (list java-junit))
7654 (inputs
7655 `(("java-gson" ,java-gson-2.8.6)
7656 ("java-eclipse-lsp4j-generaor" ,java-eclipse-lsp4j-generator)
7657 ("java-eclipse-lsp4j-jsonrpc" ,java-eclipse-lsp4j-jsonrpc)
7658 ("java-eclipse-lsp4j-jsonrpc-debug" ,java-eclipse-lsp4j-jsonrpc-debug)
7659 ("java-eclipse-xtext-xbase-lib" ,java-eclipse-xtext-xbase-lib)))
7660 (synopsis "Eclipse LSP4J Java bindings for the Debug Server Protocol")
7661 (description "Eclipse LSP4J provides Java bindings for the Language
7662Server Protocol and the Debug Adapter Protocol. This package contains its
7663LSP4J Java bindings for the Debug Server Protocol.")))
7664
7665(define-public java-eclipse-lsp4j-generator
7666 (package
7667 (inherit java-eclipse-lsp4j-common)
7668 (name "java-eclipse-lsp4j-generator")
7669 (arguments
7670 `(#:jar-name "eclipse-lsp4j-generator.jar"
7671 #:jdk ,openjdk11
7672 #:tests? #f; no tests
7673 #:source-dir "org.eclipse.lsp4j.generator/src/main/java"))
7674 (inputs
7675 (list java-eclipse-lsp4j-jsonrpc))
7676 (synopsis "Eclipse LSP4J Generator")
7677 (description "Eclipse LSP4J provides Java bindings for the Language
7678Server Protocol and the Debug Adapter Protocol. This package contains its
7679LSP4J code generator for Language Server Protocol classes.")))
7680
7681(define-public java-eclipse-lsp4j-jsonrpc
7682 (package
7683 (inherit java-eclipse-lsp4j-common)
7684 (name "java-eclipse-lsp4j-jsonrpc")
7685 (arguments
7686 `(#:jar-name "eclipse-lsp4j-jsonrpc.jar"
7687 #:jdk ,openjdk11
7688 #:source-dir "org.eclipse.lsp4j.jsonrpc/src/main/java"
7689 #:test-dir "org.eclipse.lsp4j.jsonrpc/src/test"))
7690 (native-inputs
7691 (list java-junit))
7692 (inputs
7693 (list java-gson-2.8.6))
7694 (synopsis "Java JSON-RPC implementation")
7695 (description "Eclipse LSP4J provides Java bindings for the Language
7696Server Protocol and the Debug Adapter Protocol. This package contains its
7697JSON-RPC implementation.")))
7698
7699(define-public java-eclipse-lsp4j-jsonrpc-debug
7700 (package
7701 (inherit java-eclipse-lsp4j-common)
7702 (name "java-eclipse-lsp4j-jsonrpc-debug")
7703 (arguments
7704 `(#:jar-name "eclipse-lsp4j-jsonrpc-debug.jar"
7705 #:jdk ,openjdk11
7706 #:source-dir "org.eclipse.lsp4j.jsonrpc.debug/src/main/java"
7707 #:test-dir "org.eclipse.lsp4j.jsonrpc.debug/src/test"))
7708 (native-inputs
7709 (list java-junit))
7710 (inputs
7711 (list java-eclipse-lsp4j-jsonrpc java-gson-2.8.6))
7712 (synopsis "Java JSON-RPC implementation (debug protocol)")
7713 (description "Eclipse LSP4J provides Java bindings for the Language
7714Server Protocol and the Debug Adapter Protocol. This package contains its
7715JSON-RPC implementation's debug protocol.")))
7716
7717(define-public java-eclipse-xtext-xbase-lib
7718 (package
7719 (name "java-eclipse-xtext-xbase-lib")
7720 (version "2.25.0")
7721 (source (origin
7722 (method git-fetch)
7723 (uri (git-reference
7724 (url "https://github.com/eclipse/xtext-lib")
7725 (commit (string-append "v" version))))
7726 (file-name (git-file-name name version))
7727 (sha256
7728 (base32
7729 "13b9lf6lnsprkik665m1qcyyc8cs16k33xm7as4rjcfcpn4pln71"))))
7730 (build-system ant-build-system)
7731 (arguments
7732 `(#:jar-name "eclipse-xtext-xbase-lib.jar"
7733 #:jdk ,openjdk11
7734 #:tests? #f; TODO (maybe needs newer guava version?)
7735 #:source-dir "org.eclipse.xtext.xbase.lib/src"
7736 #:test-dir "org.eclipse.xtext.xbase.lib.tests/src"))
7737 (native-inputs
7738 (list java-junit))
7739 (inputs
7740 (list java-guava))
7741 (home-page "https://www.eclipse.org/Xtext/")
7742 (synopsis "Eclipse Xbase Runtime Library")
7743 (description "This package contains runtime libraries for Xbase languages
7744such as Xtend.")
7745 (license license:epl2.0)))
7746
7747(define-public java-javax-mail
7748 (package
7749 (name "java-javax-mail")
7750 (version "1.5.6")
7751 (source (origin
7752 (method url-fetch)
7753 (uri (string-append "https://repo1.maven.org/maven2/"
7754 "com/sun/mail/javax.mail/"
7755 version "/javax.mail-"
7756 version "-sources.jar"))
7757 (sha256
7758 (base32
7759 "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9"))))
7760 (build-system ant-build-system)
7761 (arguments
7762 `(#:tests? #f ; no tests
7763 #:jar-name "javax-mail.jar"))
7764 (home-page "https://javamail.java.net")
7765 (synopsis "Reference implementation of the JavaMail API")
7766 (description
7767 "This package provides versions of the JavaMail API implementation, IMAP,
7768SMTP, and POP3 service providers, some examples, and documentation for the
7769JavaMail API.")
7770 ;; GPLv2 only with "classpath exception".
7771 (license license:gpl2)))
7772
7773(define-public java-log4j-api
7774 (package
7775 (name "java-log4j-api")
7776 (version "2.17.1")
7777 (source (origin
7778 (method url-fetch)
7779 (uri (string-append "mirror://apache/logging/log4j/" version
7780 "/apache-log4j-" version "-src.tar.gz"))
7781 (sha256
7782 (base32
7783 "05xssljdgxfv8ql42db8ydjfsvvbdqmsgip75phybm259ydzbsd6"))))
7784 (build-system ant-build-system)
7785 (arguments
7786 `(#:tests? #f ; tests require unpackaged software
7787 #:jar-name "log4j-api.jar"
7788 #:make-flags
7789 ,#~(list (string-append "-Ddist.dir=" #$output "/share/java"))
7790 #:phases
7791 (modify-phases %standard-phases
7792 (add-after 'unpack 'enter-dir
7793 (lambda _ (chdir "log4j-api") #t))
7794 ;; FIXME: The tests require additional software that has not been
7795 ;; packaged yet, such as
7796 ;; * org.apache.maven
7797 ;; * org.apache.felix
7798 (add-after 'enter-dir 'delete-tests
7799 (lambda _ (delete-file-recursively "src/test") #t)))))
7800 (inputs
7801 (list java-osgi-core java-hamcrest-core java-junit))
7802 (properties '((cpe-name . "log4j")))
7803 (home-page "https://logging.apache.org/log4j/2.x/")
7804 (synopsis "API module of the Log4j logging framework for Java")
7805 (description
7806 "This package provides the API module of the Log4j logging framework for
7807Java.")
7808 (license license:asl2.0)))
7809
7810(define-public java-log4j-core
7811 (package
7812 (inherit java-log4j-api)
7813 (name "java-log4j-core")
7814 (inputs
7815 `(("java-osgi-core" ,java-osgi-core)
7816 ("java-hamcrest-core" ,java-hamcrest-core)
7817 ("java-log4j-api" ,java-log4j-api)
7818 ("java-mail" ,java-mail)
7819 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
7820 ("java-conversant-disruptor" ,java-conversant-disruptor)
7821 ("java-lmax-disruptor" ,java-lmax-disruptor)
7822 ("java-jctools-core" ,java-jctools-core-1)
7823 ("java-stax2-api" ,java-stax2-api)
7824 ("java-jansi" ,java-jansi)
7825 ("java-kafka" ,java-kafka-clients)
7826 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
7827 ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7828 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
7829 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
7830 ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml)
7831 ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml)
7832 ("java-commons-compress" ,java-commons-compress)
7833 ("java-commons-csv" ,java-commons-csv)
7834 ("java-jeromq" ,java-jeromq)
7835 ("java-junit" ,java-junit)))
7836 (native-inputs
7837 `(("hamcrest" ,java-hamcrest-all)
7838 ("java-commons-io" ,java-commons-io)
7839 ("java-commons-lang3" ,java-commons-lang3)
7840 ("slf4j" ,java-slf4j-api)))
7841 (arguments
7842 `(#:tests? #f ; tests require more dependencies
7843 #:test-dir "src/test"
7844 #:source-dir "src/main/java"
7845 #:jar-name "log4j-core.jar"
7846 #:jdk ,icedtea-8
7847 #:make-flags
7848 ,#~(list (string-append "-Ddist.dir=" #$output "/share/java"))
7849 #:phases
7850 (modify-phases %standard-phases
7851 (add-after 'unpack 'enter-dir
7852 (lambda _ (chdir "log4j-core") #t)))))
7853 (synopsis "Core component of the Log4j framework")
7854 (description "This package provides the core component of the Log4j
7855logging framework for Java.")))
7856
7857(define-public java-log4j-1.2-api
7858 (package
7859 (inherit java-log4j-api)
7860 (name "java-log4j-1.2-api")
7861 (arguments
7862 `(#:jar-name "java-log4j-1.2-api.jar"
7863 #:source-dir "log4j-1.2-api/src/main/java"
7864 #:jdk ,icedtea-8
7865 ;; Tests require maven-model (and other maven subprojects), which is a
7866 ;; cyclic dependency.
7867 #:tests? #f))
7868 (inputs
7869 `(("log4j-api" ,java-log4j-api)
7870 ("log4j-core" ,java-log4j-core)
7871 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
7872 ("osgi-core" ,java-osgi-core)
7873 ("eclipse-osgi" ,java-eclipse-osgi)
7874 ("java-lmax-disruptor" ,java-lmax-disruptor)))))
7875
7876(define-public java-commons-cli
7877 (package
7878 (name "java-commons-cli")
7879 (version "1.4")
7880 (source (origin
7881 (method url-fetch)
7882 (uri (string-append "mirror://apache/commons/cli/source/"
7883 "commons-cli-" version "-src.tar.gz"))
7884 (sha256
7885 (base32
7886 "05hgi2z01fqz374y719gl1dxzqvzci5af071zm7vxrjg9vczipm1"))))
7887 (build-system ant-build-system)
7888 ;; TODO: javadoc
7889 (arguments
7890 `(#:jar-name "commons-cli.jar"
7891 #:phases
7892 (modify-phases %standard-phases
7893 (replace 'install
7894 (install-from-pom "pom.xml")))))
7895 (native-inputs
7896 (list java-junit java-hamcrest-core))
7897 (home-page "https://commons.apache.org/cli/")
7898 (synopsis "Command line arguments and options parsing library")
7899 (description "The Apache Commons CLI library provides an API for parsing
7900command line options passed to programs. It is also able to print help
7901messages detailing the options available for a command line tool.
7902
7903Commons CLI supports different types of options:
7904
7905@itemize
7906@item POSIX like options (ie. tar -zxvf foo.tar.gz)
7907@item GNU like long options (ie. du --human-readable --max-depth=1)
7908@item Java like properties (ie. java -Djava.awt.headless=true Foo)
7909@item Short options with value attached (ie. gcc -O2 foo.c)
7910@item long options with single hyphen (ie. ant -projecthelp)
7911@end itemize
7912
7913This is a part of the Apache Commons Project.")
7914 (license license:asl2.0)))
7915
7916(define-public java-commons-text
7917 (package
7918 (name "java-commons-text")
7919 (version "1.9")
7920 (source (origin
7921 (method url-fetch)
7922 (uri (string-append "mirror://apache/commons/text/source/"
7923 "commons-text-" version "-src.tar.gz"))
7924 (sha256
7925 (base32
7926 "1k99ib2dxlqxb5y94kpzf4ix8xgxz1j3n9kq3ddssqqcccsp5ik2"))))
7927 (build-system ant-build-system)
7928 (arguments
7929 (list #:jar-name "java-commons-text.jar"
7930 #:source-dir "src/main/java"
7931 #:test-dir "src/test"
7932 #:tests? #f ; Tests require JUnit5.
7933 #:phases
7934 #~(modify-phases %standard-phases
7935 (replace 'install
7936 (install-from-pom "pom.xml")))))
7937 (inputs
7938 (list java-commons-io))
7939 (propagated-inputs
7940 (list java-commons-lang3
7941 apache-commons-parent-pom-51))
7942 (home-page "https://commons.apache.org/text/")
7943 (synopsis "Library focused on algorithms working on strings")
7944 (description "Apache Commons Text is a library focused on algorithms
7945working on strings.
7946
7947This is a part of the Apache Commons Project.")
7948 (license license:asl2.0)))
7949
7950(define-public java-commons-codec
7951 (package
7952 (name "java-commons-codec")
7953 (version "1.15")
7954 (source (origin
7955 (method url-fetch)
7956 (uri (string-append "mirror://apache/commons/codec/source/"
7957 "commons-codec-" version "-src.tar.gz"))
7958 (sha256
7959 (base32
7960 "01z9qmg8fd8d7p7xxipwj1vi9bmvpgqyi29kldjz2x6vzwm171jj"))))
7961 (build-system ant-build-system)
7962 (arguments
7963 `(#:jar-name "java-commons-codec.jar"
7964 #:source-dir "src/main/java"
7965 #:test-dir "src/test"
7966 #:test-exclude (list "**/*AbstractTest.java")
7967 #:phases
7968 (modify-phases %standard-phases
7969 (add-before 'build 'copy-resources
7970 (lambda _
7971 (copy-recursively "src/main/resources"
7972 "build/classes")))
7973 (add-before 'check 'copy-test-resources
7974 (lambda _
7975 (copy-recursively "src/test/resources"
7976 "build/test-classes")))
7977 (add-before 'check 'skip-ravenous-test
7978 (lambda _
7979 ;; This test admits to being "memory hungry", but reliably fails
7980 ;; even on a machine that should have plenty (12 GiB). Skip it.
7981 (substitute*
7982 "src/test/java/org/apache/commons/codec/binary/BaseNCodecTest.java"
7983 (("\\bassertEnsureBufferSizeExpandsToMaxBufferSize.*;")
7984 "return;"))))
7985 (replace 'install (install-from-pom "pom.xml")))))
7986 (native-inputs
7987 (list java-commons-lang3 java-junit))
7988 (propagated-inputs
7989 (list apache-commons-parent-pom-52))
7990 (home-page "https://commons.apache.org/codec/")
7991 (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs")
7992 (description "The codec package contains simple encoder and decoders for
7993various formats such as Base64 and Hexadecimal. In addition to these widely
7994used encoders and decoders, the codec package also maintains a collection of
7995phonetic encoding utilities.
7996
7997This is a part of the Apache Commons Project.")
7998 (license license:asl2.0)))
7999
8000(define-public java-commons-daemon
8001 (package
8002 (name "java-commons-daemon")
8003 (version "1.1.0")
8004 (source (origin
8005 (method url-fetch)
8006 (uri (string-append "mirror://apache/commons/daemon/source/"
8007 "commons-daemon-" version "-src.tar.gz"))
8008 (sha256
8009 (base32
8010 "141gkhfzv5v3pdhic6y4ardq2dhsa3v36j8wmmhy6f8mac48fp7n"))))
8011 (build-system ant-build-system)
8012 (arguments
8013 `(#:test-target "test"
8014 #:phases
8015 (modify-phases %standard-phases
8016 (add-after 'build 'build-javadoc ant-build-javadoc)
8017 (replace 'install (install-jars "dist"))
8018 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
8019 (native-inputs
8020 (list java-junit))
8021 (home-page "https://commons.apache.org/daemon/")
8022 (synopsis "Library to launch Java applications as daemons")
8023 (description "The Daemon package from Apache Commons can be used to
8024implement Java applications which can be launched as daemons. For example the
8025program will be notified about a shutdown so that it can perform cleanup tasks
8026before its process of execution is destroyed by the operation system.
8027
8028This package contains the Java library. You will also need the actual binary
8029for your architecture which is provided by the jsvc package.
8030
8031This is a part of the Apache Commons Project.")
8032 (license license:asl2.0)))
8033
8034(define-public java-javaewah
8035 (package
8036 (name "java-javaewah")
8037 (version "1.1.6")
8038 (source (origin
8039 (method git-fetch)
8040 (uri (git-reference
8041 (url "https://github.com/lemire/javaewah/")
8042 (commit (string-append "JavaEWAH-" version))))
8043 (file-name (git-file-name name version))
8044 (sha256
8045 (base32
8046 "1m8qcb1py76v7avbjjrkvyy6fhr5dk2ywy73gbsxqry04gkm2nhw"))))
8047 (build-system ant-build-system)
8048 (arguments `(#:jar-name "javaewah.jar"))
8049 (inputs
8050 (list java-junit java-hamcrest-core))
8051 (home-page "https://github.com/lemire/javaewah")
8052 (synopsis "Compressed alternative to the Java @code{BitSet} class")
8053 (description "This is a word-aligned compressed variant of the Java
8054@code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like
8055compression scheme. It can be used to implement bitmap indexes.
8056
8057The goal of word-aligned compression is not to achieve the best compression,
8058but rather to improve query processing time. Hence, JavaEWAH tries to save CPU
8059cycles, maybe at the expense of storage. However, the EWAH scheme is always
8060more efficient storage-wise than an uncompressed bitmap (as implemented in the
8061@code{BitSet} class by Sun).")
8062 ;; GPL2.0 derivates are explicitly allowed.
8063 (license license:asl2.0)))
8064
8065(define-public java-slf4j-api
8066 (package
8067 (name "java-slf4j-api")
8068 (version "1.7.25")
8069 (source (origin
8070 (method git-fetch)
8071 (uri (git-reference
8072 (url "https://github.com/qos-ch/slf4j")
8073 (commit (string-append "v_" version))))
8074 (file-name (git-file-name name version))
8075 (sha256
8076 (base32
8077 "15n42zq3k1iyn752nwdcbs44hxns2rmxhglwjfr4np7lxx56apjl"))
8078 (modules '((guix build utils)))
8079 ;; Delete bundled jars.
8080 (snippet
8081 '(begin
8082 (for-each delete-file (find-files "." "\\.jar$"))
8083 #t))))
8084 (build-system ant-build-system)
8085 (arguments
8086 `(#:jar-name "slf4j-api.jar"
8087 #:source-dir "slf4j-api/src/main"
8088 #:test-dir "slf4j-api/src/test"
8089 #:phases
8090 (modify-phases %standard-phases
8091 (add-after 'build 'regenerate-jar
8092 (lambda _
8093 ;; pom.xml ignores these files in the jar creation process. If we don't,
8094 ;; we get the error "This code should have never made it into slf4j-api.jar"
8095 (delete-file-recursively "build/classes/org/slf4j/impl")
8096 (invoke "jar" "-cf" "build/jar/slf4j-api.jar" "-C"
8097 "build/classes" ".")))
8098 (add-before 'check 'dont-test-abstract-classes
8099 (lambda _
8100 ;; abstract classes are not meant to be run with junit
8101 (substitute* "build.xml"
8102 (("<include name=\"\\*\\*/\\*Test.java\" />")
8103 (string-append "<include name=\"**/*Test.java\" />"
8104 "<exclude name=\"**/MultithreadedInitializationTest"
8105 ".java\" />")))
8106 #t))
8107 (replace 'install
8108 (install-from-pom "slf4j-api/pom.xml")))))
8109 (propagated-inputs
8110 (list java-slf4j-parent))
8111 (native-inputs
8112 (list java-junit java-hamcrest-core))
8113 (home-page "https://www.slf4j.org/")
8114 (synopsis "Simple logging facade for Java")
8115 (description "The Simple Logging Facade for Java (SLF4J) serves as a
8116simple facade or abstraction for various logging
8117frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j})
8118allowing the end user to plug in the desired logging framework at deployment
8119time.")
8120 (license license:expat)))
8121
8122(define java-slf4j-parent
8123 (package
8124 (inherit java-slf4j-api)
8125 (name "java-slf4j-parent")
8126 (native-inputs `())
8127 (propagated-inputs '())
8128 (arguments
8129 `(#:tests? #f
8130 #:phases
8131 (modify-phases %standard-phases
8132 (delete 'build)
8133 (delete 'configure)
8134 (replace 'install
8135 (install-pom-file "pom.xml")))))))
8136
8137(define-public java-slf4j-simple
8138 (package
8139 (name "java-slf4j-simple")
8140 (version "1.7.25")
8141 (source (package-source java-slf4j-api))
8142 (build-system ant-build-system)
8143 (arguments
8144 `(#:jar-name "slf4j-simple.jar"
8145 #:source-dir "slf4j-simple/src/main"
8146 #:test-dir "slf4j-simple/src/test"
8147 #:test-exclude (list "**/*SimpleLoggerMultithreadedInitializationTest.java")
8148 #:phases
8149 (modify-phases %standard-phases
8150 ;; The tests need some test classes from slf4j-api
8151 (add-before 'check 'build-slf4j-api-test-helpers
8152 (lambda _
8153 ;; Add current dir to CLASSPATH ...
8154 (setenv "CLASSPATH"
8155 (string-append (getcwd) ":" (getenv "CLASSPATH")))
8156 ;; ... and build test helper classes here:
8157 (apply invoke
8158 `("javac" "-d" "."
8159 ,@(find-files "slf4j-api/src/test" ".*\\.java")))))
8160 (replace 'install
8161 (install-from-pom "slf4j-simple/pom.xml")))))
8162 (propagated-inputs
8163 (list java-slf4j-api))
8164 (native-inputs
8165 (list java-junit java-hamcrest-core))
8166 (home-page "https://www.slf4j.org/")
8167 (synopsis "Simple implementation of simple logging facade for Java")
8168 (description "SLF4J binding for the Simple implementation, which outputs
8169all events to System.err. Only messages of level INFO and higher are
8170printed.")
8171 (license license:expat)))
8172
8173(define-public java-slf4j-nop
8174 (package
8175 (name "java-slf4j-nop")
8176 (version "1.7.25")
8177 (source (package-source java-slf4j-api))
8178 (build-system ant-build-system)
8179 (arguments
8180 `(#:jar-name "slf4j-nop.jar"
8181 #:source-dir "slf4j-nop/src/main"
8182 #:test-dir "slf4j-nop/src/test"
8183 #:phases (modify-phases %standard-phases
8184 ;; The tests need some test classes from slf4j-api
8185 (add-before 'check 'build-slf4j-api-test-helpers
8186 (lambda _
8187 ;; Add current dir to CLASSPATH ...
8188 (setenv "CLASSPATH"
8189 (string-append (getcwd) ":"
8190 (getenv "CLASSPATH")))
8191 ;; ... and build test helper classes here:
8192 (apply invoke
8193 `("javac" "-d" "."
8194 ,@(find-files "slf4j-api/src/test" ".*\\.java")))))
8195 (replace 'install
8196 (install-from-pom "slf4j-nop/pom.xml")))))
8197 (propagated-inputs (list java-slf4j-api))
8198 (native-inputs (list java-junit java-hamcrest-core))
8199 (home-page "https://www.slf4j.org/")
8200 (synopsis "SLF4J binding that silently discards all logging messages")
8201 (description "Binding/provider for NOP, an implementation that silently
8202discards all logging messages.")
8203 (license license:expat)))
8204
8205(define-public antlr2
8206 (package
8207 (name "antlr2")
8208 (version "2.7.7")
8209 (source (origin
8210 (method url-fetch)
8211 (uri (string-append "https://www.antlr2.org/download/antlr-"
8212 version ".tar.gz"))
8213 (sha256
8214 (base32
8215 "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5"))
8216 (modules '((guix build utils)))
8217 (snippet
8218 '(begin
8219 (delete-file "antlr.jar")
8220 (substitute* "lib/cpp/antlr/CharScanner.hpp"
8221 (("#include <map>")
8222 (string-append
8223 "#include <map>\n"
8224 "#define EOF (-1)\n"
8225 "#include <strings.h>")))
8226 (substitute* "configure"
8227 (("/bin/sh") "sh"))
8228 #t))))
8229 (build-system gnu-build-system)
8230 (arguments
8231 `(#:tests? #f ; no test target
8232 #:imported-modules ((guix build ant-build-system)
8233 ,@%default-gnu-imported-modules)
8234 #:modules (((guix build ant-build-system) #:prefix ant:)
8235 (guix build gnu-build-system)
8236 (guix build utils))
8237 #:phases
8238 (modify-phases %standard-phases
8239 (add-after 'install 'strip-jar-timestamps
8240 (assoc-ref ant:%standard-phases 'strip-jar-timestamps))
8241 (add-before 'configure 'fix-timestamp
8242 (lambda _
8243 (substitute* "configure"
8244 (("^TIMESTAMP.*") "TIMESTAMP=19700101\n"))
8245 #t))
8246 (add-after 'configure 'fix-bin-ls
8247 (lambda _
8248 (substitute* (find-files "." "Makefile")
8249 (("/bin/ls") "ls"))
8250 #t)))))
8251 (native-inputs
8252 `(("which" ,which)
8253 ("zip" ,zip)
8254 ("java" ,icedtea "jdk")))
8255 (inputs
8256 `(("java" ,icedtea)))
8257 (home-page "https://www.antlr2.org")
8258 (synopsis "Framework for constructing recognizers, compilers, and translators")
8259 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
8260is a language tool that provides a framework for constructing recognizers,
8261compilers, and translators from grammatical descriptions containing Java, C#,
8262C++, or Python actions. ANTLR provides excellent support for tree construction,
8263tree walking, and translation.")
8264 (license license:public-domain)))
8265
8266(define-public java-stringtemplate-3
8267 (package
8268 (name "java-stringtemplate")
8269 (version "3.2.1")
8270 (source (origin
8271 (method url-fetch)
8272 (uri (string-append "https://github.com/antlr/website-st4/raw/"
8273 "gh-pages/download/stringtemplate-"
8274 version ".tar.gz"))
8275 (sha256
8276 (base32
8277 "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is"))))
8278 (build-system ant-build-system)
8279 (arguments
8280 `(#:jar-name (string-append ,name "-" ,version ".jar")
8281 #:test-dir "test"
8282 #:modules ((guix build ant-build-system)
8283 (guix build utils)
8284 (srfi srfi-1))
8285 #:phases
8286 (modify-phases %standard-phases
8287 (add-before 'check 'fix-tests
8288 (lambda _
8289 (substitute* "build.xml"
8290 (("\\$\\{test.home\\}/java")
8291 "${test.home}/org"))
8292 #t))
8293 (add-before 'build 'generate-grammar
8294 (lambda _
8295 (with-directory-excursion "src/org/antlr/stringtemplate/language/"
8296 (for-each (lambda (file)
8297 (format #t "~a\n" file)
8298 (invoke "antlr" file))
8299 '("template.g" "angle.bracket.template.g" "action.g"
8300 "eval.g" "group.g" "interface.g")))
8301 #t)))))
8302 (native-inputs
8303 `(("antlr" ,antlr2)
8304 ("java-junit" ,java-junit)))
8305 (home-page "https://www.stringtemplate.org")
8306 (synopsis "Template engine to generate formatted text output")
8307 (description "StringTemplate is a java template engine (with ports for C#,
8308Objective-C, JavaScript, Scala) for generating source code, web pages, emails,
8309or any other formatted text output. StringTemplate is particularly good at
8310code generators, multiple site skins, and internationalization / localization.
8311StringTemplate also powers ANTLR.")
8312 (license license:bsd-3)))
8313
8314;; antlr3 is partially written using antlr3 grammar files. It also depends on
8315;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar
8316;; files and uses antlr3 at runtime. The latest version requires a recent version
8317;; of antlr3 at runtime.
8318;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3.
8319;; This version of ST4 is sufficient for the latest antlr3.
8320;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build
8321;; the latest ST4 with it. Then we build our final antlr3 that will be linked
8322;; against the latest ST4.
8323;; antlr3.3 still depends on antlr3 to generate some files, so we use an
8324;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses
8325;; only grammar files with the antlr2 syntax.
8326;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3.
8327
8328(define-public java-stringtemplate
8329 (package (inherit java-stringtemplate-3)
8330 (name "java-stringtemplate")
8331 (version "4.0.8")
8332 (source (origin
8333 (method url-fetch)
8334 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/"
8335 version ".tar.gz"))
8336 (file-name (string-append name "-" version ".tar.gz"))
8337 (sha256
8338 (base32
8339 "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087"))))
8340 (build-system ant-build-system)
8341 (arguments
8342 `(#:jar-name (string-append ,name "-" ,version ".jar")
8343 #:tests? #f ; FIXME: tests fail for unknown reasons
8344 #:test-dir "test"
8345 #:modules ((guix build ant-build-system)
8346 (guix build utils)
8347 (srfi srfi-1))
8348 #:phases
8349 (modify-phases %standard-phases
8350 (add-before 'check 'fix-test-target
8351 (lambda _
8352 (substitute* "build.xml"
8353 (("\\$\\{test.home\\}/java") "${test.home}/")
8354 (("\\*Test.java") "Test*.java"))
8355 #t))
8356 (add-before 'build 'generate-grammar
8357 (lambda _
8358 (with-directory-excursion "src/org/stringtemplate/v4/compiler/"
8359 (for-each (lambda (file)
8360 (format #t "~a\n" file)
8361 (invoke "antlr3" file))
8362 '("STParser.g" "Group.g" "CodeGenerator.g")))
8363 #t)))))
8364 (inputs
8365 `(("antlr3" ,antlr3-bootstrap)
8366 ("antlr2" ,antlr2)
8367 ("java-stringtemplate" ,java-stringtemplate-3)
8368 ("java-junit" ,java-junit)))))
8369
8370(define java-stringtemplate-4.0.6
8371 (package (inherit java-stringtemplate)
8372 (name "java-stringtemplate")
8373 (version "4.0.6")
8374 (source (origin
8375 (method url-fetch)
8376 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-"
8377 version ".tar.gz"))
8378 (file-name (string-append name "-" version ".tar.gz"))
8379 (sha256
8380 (base32
8381 "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp"))))
8382 (inputs
8383 `(("antlr3" ,antlr3-3.3)
8384 ("antlr2" ,antlr2)
8385 ("java-stringtemplate" ,java-stringtemplate-3)))))
8386
8387(define-public antlr3
8388 (package
8389 (name "antlr3")
8390 (version "3.5.2")
8391 (source (origin
8392 (method git-fetch)
8393 (uri (git-reference
8394 (url "https://github.com/antlr/antlr3")
8395 (commit version)))
8396 (file-name (git-file-name name version))
8397 (sha256
8398 (base32
8399 "0cafavrjmzqhklghrk8c2jqxkdwxgzskm20pbrfd3r41cn00dpnf"))))
8400 (build-system ant-build-system)
8401 (arguments
8402 `(#:jar-name (string-append ,name "-" ,version ".jar")
8403 #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3"
8404 #:tests? #f
8405 #:phases
8406 (modify-phases %standard-phases
8407 (add-after 'install 'bin-install
8408 (lambda* (#:key inputs outputs #:allow-other-keys)
8409 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
8410 (bin (string-append (assoc-ref outputs "out") "/bin")))
8411 (mkdir-p bin)
8412 (with-output-to-file (string-append bin "/antlr3")
8413 (lambda _
8414 (display
8415 (string-append "#!" (which "sh") "\n"
8416 "java -cp " jar "/" ,name "-" ,version ".jar:"
8417 (string-concatenate
8418 (find-files (assoc-ref inputs "stringtemplate")
8419 ".*\\.jar"))
8420 ":"
8421 (string-concatenate
8422 (find-files (assoc-ref inputs "stringtemplate4")
8423 ".*\\.jar"))
8424 ":"
8425 (string-concatenate
8426 (find-files (string-append
8427 (assoc-ref inputs "antlr")
8428 "/lib")
8429 ".*\\.jar"))
8430 " org.antlr.Tool $*"))))
8431 (chmod (string-append bin "/antlr3") #o755))
8432 #t))
8433 (add-before 'build 'generate-grammar
8434 (lambda _
8435 (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/")
8436 (for-each (lambda (file)
8437 (display file)
8438 (newline)
8439 (invoke "antlr3" file))
8440 '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g"
8441 "AssignTokenTypesWalker.g"
8442 "ActionTranslator.g" "TreeToNFAConverter.g"
8443 "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g"
8444 "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g"))
8445 (substitute* "ANTLRParser.java"
8446 (("public Object getTree") "public GrammarAST getTree"))
8447 (substitute* "ANTLRv3Parser.java"
8448 (("public Object getTree") "public CommonTree getTree"))
8449 (chdir "../../../../../java")
8450 (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java"
8451 (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*;
8452import org.antlr.grammar.v3.ANTLRTreePrinter;"))
8453 (substitute* "org/antlr/tool/ErrorManager.java"
8454 (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") ""))
8455 (chdir "../../../..")
8456 #t))
8457 (add-before 'build 'fix-build-xml
8458 (lambda _
8459 (substitute* "build.xml"
8460 (("target name=\"compile\">")
8461 "target name=\"compile\">
8462<copy todir=\"${classes.dir}\">
8463<fileset dir=\"tool/src/main/resources\">
8464<include name=\"**/*.stg\"/>
8465<include name=\"**/*.st\"/>
8466<include name=\"**/*.sti\"/>
8467<include name=\"**/STLexer.tokens\"/>
8468</fileset>
8469</copy>"))
8470 #t)))))
8471 (native-inputs
8472 `(("antlr" ,antlr2)
8473 ("antlr3" ,antlr3-bootstrap)))
8474 (inputs
8475 `(("junit" ,java-junit)
8476 ("stringtemplate" ,java-stringtemplate-3)
8477 ("stringtemplate4" ,java-stringtemplate)))
8478 (propagated-inputs
8479 `(("stringtemplate" ,java-stringtemplate-3)
8480 ("antlr" ,antlr2)
8481 ("stringtemplate4" ,java-stringtemplate-4.0.6)))
8482 (home-page "https://www.antlr3.org")
8483 (synopsis "Framework for constructing recognizers, compilers, and translators")
8484 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
8485is a language tool that provides a framework for constructing recognizers,
8486compilers, and translators from grammatical descriptions containing Java, C#,
8487C++, or Python actions. ANTLR provides excellent support for tree construction,
8488tree walking, and translation.")
8489 (license license:bsd-3)))
8490
8491(define antlr3-bootstrap
8492 (package
8493 (inherit antlr3)
8494 (name "antlr3-bootstrap")
8495 (native-inputs
8496 `(("antlr" ,antlr2)
8497 ("antlr3" ,antlr3-3.3)))
8498 (inputs
8499 `(("junit" ,java-junit)))))
8500
8501(define-public antlr3-3.3
8502 (package
8503 (inherit antlr3)
8504 (name "antlr3")
8505 (version "3.3")
8506 (source (origin
8507 (method url-fetch)
8508 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
8509 "gh-pages/download/antlr-"
8510 version ".tar.gz"))
8511 (sha256
8512 (base32
8513 "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m"))
8514 (patches
8515 (search-patches "antlr3-3_3-fix-java8-compilation.patch"))))
8516 (arguments
8517 `(#:jar-name (string-append ,name "-" ,version ".jar")
8518 #:source-dir (string-join '("tool/src/main/java"
8519 "runtime/Java/src/main/java"
8520 "tool/src/main/antlr2"
8521 "tool/src/main/antlr3")
8522 ":")
8523 #:tests? #f ; FIXME: tests seem to require maven plugin
8524 #:modules ((guix build ant-build-system)
8525 (guix build utils)
8526 (srfi srfi-1))
8527 #:phases
8528 (modify-phases %standard-phases
8529 (add-after 'install 'bin-install
8530 (lambda* (#:key inputs outputs #:allow-other-keys)
8531 (let* ((out (assoc-ref outputs "out"))
8532 (jar (string-append out "/share/java"))
8533 (bin (string-append out "/bin")))
8534 (mkdir-p bin)
8535 (with-output-to-file (string-append bin "/antlr3")
8536 (lambda _
8537 (display
8538 (string-append
8539 "#!" (which "sh") "\n"
8540 "java -cp " jar "/antlr3-3.3.jar:"
8541 (string-join
8542 (append (find-files (assoc-ref inputs "java-stringtemplate")
8543 ".*\\.jar$")
8544 (find-files (string-append (assoc-ref inputs "antlr")
8545 "/lib")
8546 ".*\\.jar$"))
8547 ":")
8548 " org.antlr.Tool $*"))))
8549 (chmod (string-append bin "/antlr3") #o755)
8550 #t)))
8551 (add-before 'build 'generate-grammar
8552 (lambda _
8553 (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java"
8554 (("import org.antlr.grammar.v2.\\*;")
8555 "import org.antlr.grammar.v2.*;\n
8556import org.antlr.grammar.v2.TreeToNFAConverter;\n
8557import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n
8558import org.antlr.grammar.v2.ANTLRTreePrinter;"))
8559 (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/"
8560 (for-each (lambda (file)
8561 (format #t "~a\n" file)
8562 (invoke "antlr" file))
8563 '("antlr.g" "antlr.print.g" "assign.types.g"
8564 "buildnfa.g" "codegen.g" "define.g")))
8565 (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/"
8566 (for-each (lambda (file)
8567 (format #t "~a\n" file)
8568 (invoke "antlr3" file))
8569 '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g"
8570 "ANTLRv3Tree.g")))
8571 #t))
8572 (add-before 'build 'fix-build-xml
8573 (lambda _
8574 (substitute* "build.xml"
8575 (("target name=\"compile\">")
8576 "target name=\"compile\">
8577<copy todir=\"${classes.dir}\">
8578<fileset dir=\"tool/src/main/resources\">
8579<include name=\"**/*.stg\"/>
8580<include name=\"**/*.st\"/>
8581<include name=\"**/*.sti\"/>
8582<include name=\"**/STLexer.tokens\"/>
8583</fileset>
8584</copy>"))
8585 #t)))))
8586 (native-inputs
8587 `(("antlr" ,antlr2)
8588 ("antlr3" ,antlr3-3.1)))
8589 (inputs
8590 `(("junit" ,java-junit)))
8591 (propagated-inputs
8592 `(("java-stringtemplate" ,java-stringtemplate-3)
8593 ("antlr" ,antlr2)))))
8594
8595(define-public antlr3-3.1
8596 (package
8597 (inherit antlr3)
8598 (version "3.1")
8599 (source (origin
8600 (method url-fetch)
8601 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
8602 "gh-pages/download/antlr-"
8603 version ".tar.gz"))
8604 (sha256
8605 (base32
8606 "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z"))
8607 (patches
8608 (search-patches "antlr3-3_1-fix-java8-compilation.patch"))))
8609 (arguments
8610 `(#:jar-name (string-append "antlr3-" ,version ".jar")
8611 #:source-dir "src:runtime/Java/src"
8612 #:tests? #f
8613 #:phases
8614 (modify-phases %standard-phases
8615 (add-after 'install 'bin-install
8616 (lambda* (#:key inputs outputs #:allow-other-keys)
8617 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
8618 (bin (string-append (assoc-ref outputs "out") "/bin")))
8619 (mkdir-p bin)
8620 (with-output-to-file (string-append bin "/antlr3")
8621 (lambda _
8622 (display
8623 (string-append "#!" (which "sh") "\n"
8624 "java -cp " jar "/antlr3-3.1.jar:"
8625 (string-concatenate
8626 (find-files (assoc-ref inputs "stringtemplate")
8627 ".*\\.jar"))
8628 ":"
8629 (string-concatenate
8630 (find-files (string-append
8631 (assoc-ref inputs "antlr")
8632 "/lib")
8633 ".*\\.jar"))
8634 " org.antlr.Tool $*"))))
8635 (chmod (string-append bin "/antlr3") #o755))
8636 #t))
8637 (add-before 'build 'generate-grammar
8638 (lambda _
8639 (let ((dir "src/org/antlr/tool/"))
8640 (for-each (lambda (file)
8641 (display file)
8642 (newline)
8643 (invoke "antlr" "-o" dir (string-append dir file)))
8644 '("antlr.g" "antlr.print.g" "assign.types.g"
8645 "buildnfa.g" "define.g")))
8646 (format #t "codegen.g\n")
8647 (invoke "antlr" "-o" "src/org/antlr/codegen"
8648 "src/org/antlr/codegen/codegen.g")
8649 #t))
8650 (add-before 'build 'fix-build-xml
8651 (lambda _
8652 (substitute* "build.xml"
8653 (("target name=\"compile\">")
8654 "target name=\"compile\">
8655<copy todir=\"${classes.dir}\">
8656<fileset dir=\"src\">
8657<include name=\"**/*.stg\"/>
8658<include name=\"**/*.st\"/>
8659<include name=\"**/*.sti\"/>
8660<include name=\"**/STLexer.tokens\"/>
8661</fileset>
8662</copy>"))
8663 #t)))))
8664 (native-inputs
8665 `(("antlr" ,antlr2)))
8666 (inputs
8667 `(("junit" ,java-junit)))
8668 (propagated-inputs
8669 `(("stringtemplate" ,java-stringtemplate-3)))))
8670
8671(define-public java-treelayout
8672 (package
8673 (name "java-treelayout")
8674 (version "1.0.3")
8675 (source (origin
8676 (method git-fetch)
8677 (uri (git-reference
8678 (url "https://github.com/abego/treelayout")
8679 (commit (string-append "v" version))))
8680 (file-name (git-file-name name version))
8681 (sha256
8682 (base32
8683 "18my8ql9b1y0n0zrvkih7xfhf3dpgfhyfifvkcfhmwcvw3divxak"))))
8684 (build-system ant-build-system)
8685 (arguments
8686 `(#:jar-name (string-append ,name "-" ,version ".jar")
8687 #:source-dir "org.abego.treelayout/src/main/java"
8688 #:test-dir "org.abego.treelayout/src/test"))
8689 (inputs
8690 (list java-junit))
8691 (native-inputs
8692 (list java-hamcrest-core))
8693 (home-page "https://treelayout.sourceforge.net")
8694 (synopsis "Tree Layout Algorithm in Java")
8695 (description "TreeLayout creates tree layouts for arbitrary trees. It is
8696not restricted to a specific output or format, but can be used for any kind of
8697two dimensional diagram. Examples are Swing based components, SVG files, etc.
8698This is possible because TreeLayout separates the layout of a tree from the
8699actual rendering.")
8700 (license license:bsd-3)))
8701
8702(define-public java-antlr4-runtime
8703 (package
8704 (name "java-antlr4-runtime")
8705 (version "4.10.1")
8706 (source (origin
8707 (method git-fetch)
8708 (uri (git-reference
8709 (url "https://github.com/antlr/antlr4")
8710 (commit version)))
8711 (file-name (git-file-name name version))
8712 (sha256
8713 (base32
8714 "0ldvd9jm4nrivaw7i7wh1q40q6xgzmzirsywiakbhg8sppagqlv7"))
8715 (patches
8716 (search-patches "java-antlr4-Add-standalone-generator.patch"))))
8717 (build-system ant-build-system)
8718 (arguments
8719 `(#:jar-name "java-antlr4-runtime.jar"
8720 #:source-dir "runtime/Java/src/org"
8721 #:tests? #f; tests depend on java-antlr4 itself
8722 #:phases
8723 (modify-phases %standard-phases
8724 (add-before 'build 'copy-resources
8725 (lambda _
8726 (copy-recursively "runtime/Java/src/main/dot"
8727 "build/classes")
8728 #t)))))
8729 (home-page "https://www.antlr.org")
8730 (synopsis "ANTLR runtime library")
8731 (description "This package contains the runtime library used with generated
8732sources by ANTLR.")
8733 (license license:bsd-3)))
8734
8735(define-public java-antlr4-runtime-cpp
8736 (package
8737 (inherit java-antlr4-runtime)
8738 (name "java-antlr4-runtime-cpp")
8739 (outputs '("out" "static"))
8740 (build-system cmake-build-system)
8741 (arguments
8742 (list
8743 ;; TODO: try to run the tests under
8744 ;; runtime-testsuite/test/org/antlr/v4/test/runtime/cpp with antlr4.
8745 #:tests? #f ;no CMake test target
8746 ;; TODO: Building the tests wants to download googletest.
8747 #:configure-flags #~'("-DANTLR_BUILD_CPP_TESTS=OFF")
8748 #:phases
8749 #~(modify-phases %standard-phases
8750 (add-after 'unpack 'chdir
8751 (lambda _
8752 (chdir "runtime/Cpp")))
8753 (add-after 'install 'move-static-library
8754 (lambda* (#:key outputs #:allow-other-keys)
8755 (let ((static (assoc-ref outputs "static"))
8756 (libantlr4-runtime.a (search-input-file
8757 outputs "lib/libantlr4-runtime.a")))
8758 (mkdir-p (string-append static "/lib"))
8759 (rename-file
8760 libantlr4-runtime.a
8761 (string-append static "/lib/"
8762 (basename libantlr4-runtime.a)))))))))
8763 (native-inputs (list pkg-config))
8764 (inputs (list `(,util-linux "lib"))) ;libuuid
8765 (synopsis "ANTL C++ runtime library")
8766 (description "This package contains the C++ runtime library used with C++
8767generated sources by ANTLR.")))
8768
8769(define-public java-antlr4-runtime-python
8770 (package
8771 (inherit java-antlr4-runtime)
8772 (name "java-antlr4-runtime-python")
8773 (outputs '("out"))
8774 (build-system python-build-system)
8775 (arguments
8776 (list
8777 #:tests? #f ; tests require antlr
8778 #:phases
8779 #~(modify-phases %standard-phases
8780 (add-after 'unpack 'chdir
8781 (lambda _
8782 (chdir "runtime/Python3"))))))
8783 (native-inputs (list pkg-config))
8784 (inputs (list `(,util-linux "lib"))) ; libuuid
8785 (synopsis "ANTLR Python runtime library")
8786 (description "This package contains the Python runtime library used with
8787Python generated sources by ANTLR.")))
8788
8789(define-public antlr4
8790 (package
8791 (inherit java-antlr4-runtime)
8792 (name "antlr4")
8793 (arguments
8794 `(#:jar-name "antlr4.jar"
8795 #:source-dir "tool/src"
8796 #:test-dir "tool-testsuite/test:runtime-testsuite/test"
8797 #:test-include (list "**/Test*.java")
8798 #:test-exclude (list
8799 ;; These have no runnable methods and fail because
8800 ;; test-include above is too broad.
8801 "**/TestContext.java"
8802 "**/TestOutputReading.java"
8803 ;; no @Test methods
8804 "**/TestParserErrors.java"
8805 "**/TestSemPredEvalParser.java"
8806 "**/TestSets.java"
8807 "**/TestListeners.java"
8808 "**/TestParseTrees.java"
8809 "**/TestParserExec.java"
8810 "**/TestLexerErrors.java"
8811 "**/TestPerformance.java"
8812 "**/TestCompositeParsers.java"
8813 "**/TestLexerExec.java"
8814 "**/TestSemPredEvalLexer.java"
8815 "**/TestLeftRecursion.java"
8816 "**/TestFullContextParsing.java"
8817 "**/TestCompositeLexers.java"
8818 ;; Null pointer exception
8819 "**/TestCompositeGrammars.java")
8820 #:phases
8821 (modify-phases %standard-phases
8822 (add-before 'build 'fix-build.xml
8823 (lambda _
8824 ;; tests are not in a java subdirectory
8825 (substitute* "build.xml"
8826 (("\\$\\{test.home\\}/java") "${test.home}"))
8827 #t))
8828 ;; tests require to have a working antlr4 binary
8829 (delete 'check)
8830 (add-after 'install 'check
8831 (lambda _
8832 (invoke "ant" "compile-tests")
8833 (invoke "ant" "check" "-Dtest.home=runtime-testsuite/test")
8834 (invoke "ant" "check" "-Dtest.home=tool-testsuite/test")
8835 #t))
8836 (add-before 'check 'remove-unrelated-languages
8837 (lambda _
8838 ;; There are tests for other languages that ANTLR can generate, but
8839 ;; we don't have the infrastructure for that yet. Let's test Java
8840 ;; generation only.
8841 (for-each
8842 (lambda (language)
8843 (delete-file-recursively
8844 (string-append "runtime-testsuite/test/org/antlr/v4/test/runtime/"
8845 language)))
8846 '("cpp" "csharp" "go" "javascript" "php" "python" "python2"
8847 "python3" "swift"))
8848 #t))
8849 (add-before 'check 'generate-test-parsers
8850 (lambda* (#:key outputs #:allow-other-keys)
8851 (define (run-antlr dir filename package)
8852 (invoke "antlr4" "-lib" dir "-visitor" "-no-listener"
8853 "-package" package (string-append dir "/" filename)
8854 "-Xlog"))
8855 (setenv "PATH" (string-append (getenv "PATH") ":"
8856 (assoc-ref outputs "out") "/bin"))
8857 (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api"
8858 "Java.g4" "org.antlr.v4.test.runtime.java.api")
8859 (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api"
8860 "VisitorBasic.g4" "org.antlr.v4.test.runtime.java.api")
8861 (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api"
8862 "VisitorCalc.g4" "org.antlr.v4.test.runtime.java.api")
8863 #t))
8864 (add-before 'check 'remove-graphemes
8865 (lambda _
8866 ;; When running antlr on grahemes.g4, we get a runtime exception:
8867 ;; set is empty. So delete the file that depends on it.
8868 (delete-file
8869 "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api/perf/TimeLexerSpeed.java")
8870 #t))
8871 (add-after 'install 'bin-install
8872 (lambda* (#:key inputs outputs #:allow-other-keys)
8873 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
8874 (bin (string-append (assoc-ref outputs "out") "/bin")))
8875 (mkdir-p bin)
8876 (with-output-to-file (string-append bin "/antlr4")
8877 (lambda _
8878 (display
8879 (string-append "#!" (which "sh") "\n"
8880 "java -cp " jar "/antlr4.jar:"
8881 (string-join
8882 (apply
8883 append
8884 (map
8885 (lambda (input)
8886 (find-files (assoc-ref inputs input)
8887 ".*\\.jar"))
8888 '("antlr3" "java-stringtemplate"
8889 "java-antlr4-runtime" "java-treelayout"
8890 "java-jsonp-api" "java-icu4j")))
8891 ":")
8892 " org.antlr.v4.Tool $*"))))
8893 (chmod (string-append bin "/antlr4") #o755)
8894 #t)))
8895 (add-before 'build 'copy-resources
8896 (lambda _
8897 (copy-recursively "tool/resources/" "build/classes")
8898 #t))
8899 (add-before 'build 'generate-unicode
8900 (lambda _
8901 ;; First: build the generator
8902 (invoke "javac" "-cp" (getenv "CLASSPATH")
8903 "tool/src/org/antlr/v4/unicode/UnicodeRenderer.java"
8904 "tool/src/org/antlr/v4/unicode/UnicodeDataTemplateController.java")
8905 ;; Then use it
8906 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8907 ":tool/src:runtime/Java")
8908 "org.antlr.v4.unicode.UnicodeRenderer"
8909 "tool/resources/org/antlr/v4/tool/templates"
8910 "unicodedata"
8911 "tool/src/org/antlr/v4/unicode/UnicodeData.java")
8912 ;; It seems there is a bug with our ST4
8913 (substitute* "tool/src/org/antlr/v4/unicode/UnicodeData.java"
8914 (("\\\\>") ">"))
8915 ;; Remove the additional file
8916 (delete-file "tool/src/org/antlr/v4/unicode/UnicodeRenderer.java")
8917 #t))
8918 (add-before 'build 'generate-grammar
8919 (lambda* (#:key inputs #:allow-other-keys)
8920 (with-directory-excursion "tool/src/org/antlr/v4/parse"
8921 (for-each (lambda (file)
8922 (display file)
8923 (newline)
8924 (invoke "antlr3" file))
8925 '("ANTLRLexer.g" "ANTLRParser.g" "BlockSetTransformer.g"
8926 "GrammarTreeVisitor.g" "ATNBuilder.g"
8927 "ActionSplitter.g" "LeftRecursiveRuleWalker.g")))
8928 (with-directory-excursion "tool/src/org/antlr/v4/codegen"
8929 (install-file "../parse/ANTLRParser.tokens" ".")
8930 (display "SourceGenTriggers.g\n")
8931 (invoke "antlr3" "SourceGenTriggers.g"))
8932 #t)))))
8933 (inputs
8934 (list antlr3
8935 java-antlr4-runtime
8936 java-icu4j
8937 java-jsonp-api
8938 java-stringtemplate
8939 java-treelayout))
8940 (native-inputs
8941 (list java-junit))
8942 (synopsis "Parser and lexer generator in Java")
8943 (description "ANTLR (ANother Tool for Language Recognition) is a powerful
8944parser generator for reading, processing, executing, or translating structured
8945text or binary files. It's widely used to build languages, tools, and
8946frameworks. From a grammar, ANTLR generates a parser that can build and walk
8947parse trees.")))
8948
8949(define-public java-antlr4-runtime-4.1
8950 (package
8951 (inherit java-antlr4-runtime)
8952 (version "4.1")
8953 (source (origin
8954 (method git-fetch)
8955 (uri (git-reference
8956 (url "https://github.com/antlr/antlr4")
8957 (commit version)))
8958 (file-name (git-file-name "antlr4" version))
8959 (sha256
8960 (base32
8961 "1i8hmx5an58cjyvhji0xgpvd6lq00z1k1mjys025q2wqc25wv4c1"))))
8962 (arguments
8963 (substitute-keyword-arguments (package-arguments java-antlr4-runtime)
8964 ((#:phases phases)
8965 `(modify-phases ,phases
8966 (add-before 'configure 'chmod
8967 (lambda _
8968 (chmod "build.xml" #o644)
8969 #t))))))
8970 (inputs
8971 (list java-treelayout))))
8972
8973(define-public antlr4-4.1
8974 (package
8975 (inherit antlr4)
8976 (version (package-version java-antlr4-runtime-4.1))
8977 (source (package-source java-antlr4-runtime-4.1))
8978 (arguments
8979 (substitute-keyword-arguments (package-arguments antlr4)
8980 ((#:test-dir _)
8981 "tool/test")
8982 ((#:test-exclude excludes)
8983 `(list "**/TestParseErrors.java"
8984 "**/TestTopologicalSort.java"
8985 ,@excludes))
8986 ((#:phases phases)
8987 `(modify-phases ,phases
8988 (delete 'generate-unicode)
8989 (replace 'check
8990 (lambda _
8991 (invoke "ant" "check")
8992 #t))
8993 (add-before 'configure 'chmod
8994 (lambda _
8995 (chmod "build.xml" #o644)
8996 #t))
8997 (delete 'remove-graphemes)
8998 (delete 'remove-unrelated-languages)
8999 (delete 'generate-test-parsers)))))
9000 (inputs
9001 (alist-replace
9002 "java-antlr4-runtime" (list java-antlr4-runtime-4.1)
9003 (package-inputs antlr4)))))
9004
9005(define-public java-tunnelvisionlabs-antlr4-runtime-annotations
9006 (package
9007 (inherit java-antlr4-runtime)
9008 (name "java-tunnelvisionlabs-antlr4-runtime-annotations")
9009 (version "4.7.4")
9010 (source (origin
9011 (method git-fetch)
9012 (uri (git-reference
9013 (url "https://github.com/tunnelvisionlabs/antlr4")
9014 (commit (string-append version "-opt"))))
9015 (file-name (git-file-name "java-tunnelvisionlabs-antlr4" version))
9016 (sha256
9017 (base32
9018 "1mf2lvvsszpialsk23ma83pwp50nd32lrbjpa847zlm5gmranbr8"))
9019 (patches
9020 (search-patches "java-antlr4-Add-standalone-generator.patch"
9021 "java-tunnelvisionlabs-antlr-code-too-large.patch"))))
9022 (arguments
9023 `(#:jar-name "java-antlr4-runtime-annotations.jar"
9024 #:source-dir "runtime/JavaAnnotations/src"
9025 #:tests? #f; no tests
9026 #:phases
9027 (modify-phases %standard-phases
9028 (add-after 'build 'copy-resources
9029 (lambda _
9030 (copy-recursively "runtime/JavaAnnotations/resources"
9031 "build/classes")
9032 #t))
9033 (add-after 'copy-resources 'rebuild-jar
9034 (lambda _
9035 (invoke "ant" "jar")
9036 #t)))))
9037 (inputs '())
9038 (native-inputs '())
9039 (synopsis "Annotations for ANTLR's runtime library")
9040 (description "This package contains annotations used during the build of
9041the runtime library of ANTLR.")))
9042
9043;; the runtime of this library requires a lexer that is generated by antlr4.
9044;; However, antlr4 itself requires this library at build and run-time. We
9045;; use [email protected], the closest version of antlr that doesn't need this
9046;; bootstrap process, to generate the lexer. The generated lexer is built
9047;; for the 4.1 runtime, which is slightly different from this runtime.
9048;; So, we build the runtime with antlr 4.1, with a broken xml lexer, that we
9049;; use to build antlr4. We then re-use this antlr4 to build the runtime, and
9050;; the proper, working, runtime to build antlr4 again.
9051(define java-tunnelvisionlabs-antlr4-runtime-bootstrap
9052 (package
9053 (inherit java-antlr4-runtime)
9054 (name "java-tunnelvisionlabs-antlr4-runtime")
9055 (version (package-version java-tunnelvisionlabs-antlr4-runtime-annotations))
9056 (source (package-source java-tunnelvisionlabs-antlr4-runtime-annotations))
9057 (arguments
9058 `(#:jar-name "java-antlr4-runtime.jar"
9059 #:source-dir "runtime/Java/src"
9060 #:tests? #f; tests require antlr4, but antlr4 depends on this package
9061 #:phases
9062 (modify-phases %standard-phases
9063 (add-before 'build 'generate-xpath-lexer
9064 (lambda _
9065 (invoke "antlr4" "-lib" "runtime/Java/src/org/antlr/v4/runtime/tree/xpath"
9066 "-visitor" "-no-listener"
9067 "-package" "org.antlr.v4.runtime.tree.xpath"
9068 "runtime/Java/src/org/antlr/v4/runtime/tree/xpath/XPathLexer.g4")
9069 ;; Generated code is for an incompatible version of the runtime
9070 (substitute* "runtime/Java/src/org/antlr/v4/runtime/tree/xpath/XPathLexer.java"
9071 (("LexerATNSimulator\\(this,_ATN,_decisionToDFA,_sharedContextCache\\)")
9072 "LexerATNSimulator(this,_ATN)"))
9073 #t))
9074 (add-before 'build 'copy-resources
9075 (lambda _
9076 (copy-recursively "runtime/Java/src/main/dot"
9077 "build/classes")
9078 #t)))))
9079 (native-inputs
9080 `(("antlr4" ,antlr4-4.1)
9081 ("java-tunnelvisionlabs-antlr4-runtime-annotations"
9082 ,java-tunnelvisionlabs-antlr4-runtime-annotations)))))
9083
9084(define java-tunnelvisionlabs-antlr4-bootstrap
9085 (package
9086 (inherit antlr4)
9087 (name "java-tunnelvisionlabs-antlr4")
9088 (version (package-version java-tunnelvisionlabs-antlr4-runtime-annotations))
9089 (source (package-source java-tunnelvisionlabs-antlr4-runtime-annotations))
9090 (arguments
9091 (substitute-keyword-arguments (package-arguments antlr4)
9092 ((#:test-dir _)
9093 "tool/test:runtime-testsuite/src")
9094 ((#:phases phases)
9095 `(modify-phases ,phases
9096 (delete 'remove-unrelated-languages)
9097 (delete 'remove-graphemes)
9098 (delete 'generate-test-parsers)
9099 (delete 'check)))))
9100 (native-inputs '())
9101 (inputs
9102 `(("antlr3" ,antlr3)
9103 ("java-antlr4-runtime" ,java-tunnelvisionlabs-antlr4-runtime-bootstrap)
9104 ("java-tunnelvisionlabs-antlr4-runtime-annotations"
9105 ,java-tunnelvisionlabs-antlr4-runtime-annotations)
9106 ("java-icu4j" ,java-icu4j)
9107 ("java-jsonp-api" ,java-jsonp-api)
9108 ("java-stringtemplate" ,java-stringtemplate)
9109 ("java-treelayout" ,java-treelayout)))))
9110
9111(define-public java-tunnelvisionlabs-antlr4-runtime
9112 (package
9113 (inherit java-tunnelvisionlabs-antlr4-runtime-bootstrap)
9114 (native-inputs
9115 (alist-replace
9116 "antlr4" (list java-tunnelvisionlabs-antlr4-bootstrap)
9117 (package-native-inputs java-tunnelvisionlabs-antlr4-runtime-bootstrap)))))
9118
9119(define-public java-tunnelvisionlabs-antlr4
9120 (package
9121 (inherit java-tunnelvisionlabs-antlr4-bootstrap)
9122 (inputs
9123 (alist-replace
9124 "java-antlr4-runtime" (list java-tunnelvisionlabs-antlr4-runtime)
9125 (package-inputs java-tunnelvisionlabs-antlr4-bootstrap)))))
9126
9127(define-public java-commons-cli-1.2
9128 ;; This is a bootstrap dependency for Maven2.
9129 (package
9130 (inherit java-commons-cli)
9131 (version "1.2")
9132 (source (origin
9133 (method url-fetch)
9134 (uri (string-append "mirror://apache/commons/cli/source/"
9135 "commons-cli-" version "-src.tar.gz"))
9136 (sha256
9137 (base32
9138 "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm"))))
9139 (arguments
9140 `(#:jar-name "commons-cli.jar"
9141 #:phases
9142 (modify-phases %standard-phases
9143 (add-before 'check 'fix-build-xml
9144 (lambda* (#:key inputs #:allow-other-keys)
9145 (substitute* "build.xml"
9146 (("dir=\"\\$\\{test.home\\}/java\"")
9147 "dir=\"${test.home}\""))
9148 #t)))))
9149 (native-inputs
9150 (list java-junit))))
9151
9152(define-public java-microemulator-cldc
9153 (package
9154 (name "java-microemulator-cldc")
9155 (version "2.0.4")
9156 (source (origin
9157 (method url-fetch)
9158 (uri (string-append "https://github.com/barteo/microemu/archive/"
9159 "microemulator_"
9160 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
9161 version)
9162 ".tar.gz"))
9163 (file-name (string-append name "-" version ".tar.gz"))
9164 (sha256
9165 (base32
9166 "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll"))))
9167 (build-system ant-build-system)
9168 (arguments
9169 `(#:jar-name "microemulator-cldc.jar"
9170 #:source-dir "microemu-cldc/src/main/java"
9171 #:tests? #f)); Requires even older software
9172 (home-page "https://github.com/barteo/microemu")
9173 (synopsis "J2ME CLDC emulator")
9174 (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP
9175Emulator. It demonstrates MIDlet based applications in web browser
9176applet and can be run as a standalone java application.")
9177 (license (list license:asl2.0
9178 ;; or altenatively:
9179 license:lgpl2.1+))))
9180
9181(define-public java-datanucleus-javax-persistence
9182 (package
9183 (name "java-datanucleus-javax-persistence")
9184 (version "2.2.0")
9185 (source (origin
9186 (method url-fetch)
9187 (uri (string-append "https://github.com/datanucleus/"
9188 "javax.persistence/archive/javax.persistence-"
9189 version "-release.tar.gz"))
9190 (sha256
9191 (base32
9192 "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx"))))
9193 (build-system ant-build-system)
9194 (arguments
9195 `(#:jar-name "java-datanucleus-javax-persistence.jar"
9196 #:jdk ,icedtea-8
9197 #:source-dir "src/main/java"
9198 #:tests? #f)); no tests
9199 (home-page "https://github.com/datanucleus/javax.persistence")
9200 (synopsis "JPA API")
9201 (description "This package contains a clean definition of JPA API intended
9202for use with DataNucleus JPA since the JCP haven't provided an official JPA API
9203jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification
9204used to generate this API.")
9205 (license (list license:edl1.0 license:epl1.0))))
9206
9207(define-public java-osgi-cmpn
9208 (package
9209 (name "java-osgi-cmpn")
9210 (version "6.0.0")
9211 (source (origin
9212 (method url-fetch)
9213 (uri (string-append "https://repo1.maven.org/maven2/"
9214 "org/osgi/osgi.cmpn/" version "/osgi.cmpn-"
9215 version "-sources.jar"))
9216 (sha256
9217 (base32
9218 "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys"))))
9219 (build-system ant-build-system)
9220 (arguments
9221 `(#:jar-name "osgi-cmpn.jar"
9222 #:tests? #f)); no tests
9223 (inputs
9224 `(("annotation" ,java-osgi-annotation)
9225 ("core" ,java-osgi-core)
9226 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
9227 ("microemulator" ,java-microemulator-cldc)
9228 ("servlet" ,java-classpathx-servletapi)))
9229 (home-page "https://www.osgi.org")
9230 (synopsis "Compendium specification module of OSGi framework")
9231 (description
9232 "OSGi, for Open Services Gateway initiative framework, is a module system
9233and service platform for the Java programming language. This package contains
9234the compendium specification module, providing interfaces and classes for use
9235in compiling bundles.")
9236 (license license:asl2.0)))
9237
9238(define-public java-osgi-service-component-annotations
9239 (package
9240 (name "java-osgi-service-component-annotations")
9241 (version "1.3.0")
9242 (source (origin
9243 (method url-fetch)
9244 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9245 "org.osgi.service.component.annotations/"
9246 version "/org.osgi.service.component.annotations-"
9247 version "-sources.jar"))
9248 (sha256
9249 (base32
9250 "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0"))))
9251 (build-system ant-build-system)
9252 (arguments
9253 `(#:jar-name "osgi-service-component-annotations.jar"
9254 #:tests? #f)); no tests
9255 (inputs
9256 `(("annotation" ,java-osgi-annotation)))
9257 (home-page "https://www.osgi.org")
9258 (synopsis "Support annotations for osgi-service-component")
9259 (description
9260 "OSGi, for Open Services Gateway initiative framework, is a module system
9261and service platform for the Java programming language. This package contains
9262the support annotations for osgi-service-component.")
9263 (license license:asl2.0)))
9264
9265(define-public java-osgi-dto
9266 (package
9267 (name "java-osgi-dto")
9268 (version "1.0.0")
9269 (source (origin
9270 (method url-fetch)
9271 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9272 "org.osgi.dto/" version "/org.osgi.dto-"
9273 version "-sources.jar"))
9274 (sha256
9275 (base32
9276 "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr"))))
9277 (build-system ant-build-system)
9278 (arguments
9279 `(#:jar-name "osgi-dto.jar"
9280 #:tests? #f)); no tests
9281 (inputs
9282 `(("annotation" ,java-osgi-annotation)))
9283 (home-page "https://www.osgi.org")
9284 (synopsis "Data Transfer Objects")
9285 (description
9286 "OSGi, for Open Services Gateway initiative framework, is a module system
9287and service platform for the Java programming language. This package contains
9288the Data Transfer Objects. It is easily serializable having only public fields
9289of primitive types and their wrapper classes, Strings, and DTOs. List, Set,
9290Map and array aggregates may also be used. The aggregates must only hold
9291objects of the listed types or aggregates.")
9292 (license license:asl2.0)))
9293
9294(define-public java-osgi-resource
9295 (package
9296 (name "java-osgi-resource")
9297 (version "1.0.0")
9298 (source (origin
9299 (method url-fetch)
9300 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9301 "org.osgi.resource/"
9302 version "/org.osgi.resource-"
9303 version "-sources.jar"))
9304 (sha256
9305 (base32
9306 "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d"))))
9307 (build-system ant-build-system)
9308 (arguments
9309 `(#:jar-name "osgi-resource.jar"
9310 #:tests? #f)); no tests
9311 (inputs
9312 `(("annotation" ,java-osgi-annotation)
9313 ("dto" ,java-osgi-dto)))
9314 (home-page "https://www.osgi.org")
9315 (synopsis "OSGI Resource")
9316 (description
9317 "OSGi, for Open Services Gateway initiative framework, is a module system
9318and service platform for the Java programming language. This package contains
9319the definition of common types in osgi packages.")
9320 (license license:asl2.0)))
9321
9322(define-public java-osgi-namespace-contract
9323 (package
9324 (name "java-osgi-namespace-contract")
9325 (version "1.0.0")
9326 (source (origin
9327 (method url-fetch)
9328 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9329 "org.osgi.namespace.contract/"
9330 version "/org.osgi.namespace.contract-"
9331 version "-sources.jar"))
9332 (sha256
9333 (base32
9334 "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36"))))
9335 (build-system ant-build-system)
9336 (inputs
9337 `(("resource" ,java-osgi-resource)
9338 ("annotation" ,java-osgi-annotation)))
9339 (arguments
9340 `(#:jar-name "osgi-namespace-contract.jar"
9341 #:tests? #f)); no tests
9342 (home-page "https://www.osgi.org")
9343 (synopsis "Contract Capability and Requirement Namespace")
9344 (description
9345 "OSGi, for Open Services Gateway initiative framework, is a module system
9346and service platform for the Java programming language. This package contains
9347the names for the attributes and directives for a namespace with contracts.")
9348 (license license:asl2.0)))
9349
9350(define-public java-osgi-namespace-extender
9351 (package
9352 (name "java-osgi-namespace-extender")
9353 (version "1.0.1")
9354 (source (origin
9355 (method url-fetch)
9356 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9357 "org.osgi.namespace.extender/"
9358 version "/org.osgi.namespace.extender-"
9359 version "-sources.jar"))
9360 (sha256
9361 (base32
9362 "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz"))))
9363 (build-system ant-build-system)
9364 (inputs
9365 `(("resource" ,java-osgi-resource)
9366 ("annotation" ,java-osgi-annotation)))
9367 (arguments
9368 `(#:jar-name "osgi-namespace-extendent.jar"
9369 #:tests? #f)); no tests
9370 (home-page "https://www.osgi.org")
9371 (synopsis "Extender Capability and Requirement Namespace")
9372 (description
9373 "OSGi, for Open Services Gateway initiative framework, is a module system
9374and service platform for the Java programming language. This package contains
9375the names for the attributes and directives for an extender namespace.")
9376 (license license:asl2.0)))
9377
9378(define-public java-osgi-namespace-service
9379 (package
9380 (name "java-osgi-namespace-service")
9381 (version "1.0.0")
9382 (source (origin
9383 (method url-fetch)
9384 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9385 "org.osgi.namespace.service/"
9386 version "/org.osgi.namespace.service-"
9387 version "-sources.jar"))
9388 (sha256
9389 (base32
9390 "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8"))))
9391 (build-system ant-build-system)
9392 (inputs
9393 `(("resource" ,java-osgi-resource)
9394 ("annotation" ,java-osgi-annotation)))
9395 (arguments
9396 `(#:jar-name "osgi-namespace-service.jar"
9397 #:tests? #f)); no tests
9398 (home-page "https://www.osgi.org")
9399 (synopsis "Service Capability and Requirement Namespace")
9400 (description
9401 "OSGi, for Open Services Gateway initiative framework, is a module system
9402and service platform for the Java programming language. This package contains
9403the names for the attributes and directives for a service namespace.")
9404 (license license:asl2.0)))
9405
9406(define-public java-osgi-util-function
9407 (package
9408 (name "java-osgi-util-function")
9409 (version "1.0.0")
9410 (source (origin
9411 (method url-fetch)
9412 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9413 "org.osgi.util.function/"
9414 version "/org.osgi.util.function-"
9415 version "-sources.jar"))
9416 (sha256
9417 (base32
9418 "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x"))))
9419 (build-system ant-build-system)
9420 (arguments
9421 `(#:jar-name "osgi-util-function.jar"
9422 #:tests? #f)); no tests
9423 (inputs
9424 `(("annotation" ,java-osgi-annotation)))
9425 (home-page "https://www.osgi.org")
9426 (synopsis "OSGI Util Function")
9427 (description
9428 "OSGi, for Open Services Gateway initiative framework, is a module system
9429and service platform for the Java programming language. This package contains
9430an interface for a function that accepts a single argument and produces a result.")
9431 (license license:asl2.0)))
9432
9433(define-public java-osgi-util-promise
9434 (package
9435 (name "java-osgi-util-promise")
9436 (version "1.0.0")
9437 (source (origin
9438 (method url-fetch)
9439 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9440 "org.osgi.util.promise/"
9441 version "/org.osgi.util.promise-"
9442 version "-sources.jar"))
9443 (sha256
9444 (base32
9445 "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c"))))
9446 (build-system ant-build-system)
9447 (arguments
9448 `(#:jar-name "osgi-util-promise.jar"
9449 #:tests? #f)); no tests
9450 (inputs
9451 `(("annotation" ,java-osgi-annotation)
9452 ("function" ,java-osgi-util-function)))
9453 (home-page "https://www.osgi.org")
9454 (synopsis "Promise of a value")
9455 (description
9456 "OSGi, for Open Services Gateway initiative framework, is a module system
9457and service platform for the Java programming language. This package contains
9458an interface and utilitary classes for promises. A Promise represents a future
9459value. It handles the interactions for asynchronous processing.")
9460 (license license:asl2.0)))
9461
9462(define-public java-osgi-service-metatype-annotations
9463 (package
9464 (name "java-osgi-service-metatype-annotations")
9465 (version "1.3.0")
9466 (source (origin
9467 (method url-fetch)
9468 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9469 "org.osgi.service.metatype.annotations/"
9470 version "/org.osgi.service.metatype.annotations-"
9471 version "-sources.jar"))
9472 (sha256
9473 (base32
9474 "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6"))))
9475 (build-system ant-build-system)
9476 (arguments
9477 `(#:jar-name "osgi-service-metatype-annotations.jar"
9478 #:tests? #f)); no tests
9479 (inputs
9480 `(("annotation" ,java-osgi-annotation)))
9481 (home-page "https://www.osgi.org")
9482 (synopsis "Support annotations for metatype")
9483 (description
9484 "OSGi, for Open Services Gateway initiative framework, is a module system
9485and service platform for the Java programming language. This package contains
9486the support annotations for metatype.")
9487 (license license:asl2.0)))
9488
9489(define-public java-osgi-service-repository
9490 (package
9491 (name "java-osgi-service-repository")
9492 (version "1.1.0")
9493 (source (origin
9494 (method url-fetch)
9495 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9496 "org.osgi.service.repository/"
9497 version "/org.osgi.service.repository-"
9498 version "-sources.jar"))
9499 (sha256
9500 (base32
9501 "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n"))))
9502 (build-system ant-build-system)
9503 (arguments
9504 `(#:jar-name "osgi-service-repository.jar"
9505 #:tests? #f)); no tests
9506 (inputs
9507 `(("annotation" ,java-osgi-annotation)
9508 ("promise" ,java-osgi-util-promise)
9509 ("resource" ,java-osgi-resource)))
9510 (home-page "https://www.osgi.org")
9511 (synopsis "OSGI service repository")
9512 (description
9513 "OSGi, for Open Services Gateway initiative framework, is a module system
9514and service platform for the Java programming language. This package contains
9515a repository service that contains resources.")
9516 (license license:asl2.0)))
9517
9518(define-public java-osgi-framework
9519 (package
9520 (name "java-osgi-framework")
9521 (version "1.8.0")
9522 (source (origin
9523 (method url-fetch)
9524 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9525 "org.osgi.framework/" version "/org.osgi.framework-"
9526 version "-sources.jar"))
9527 (sha256
9528 (base32
9529 "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s"))))
9530 (build-system ant-build-system)
9531 (arguments
9532 `(#:jar-name "osgi-framework.jar"
9533 #:tests? #f)); no tests
9534 (inputs
9535 `(("annotation" ,java-osgi-annotation)
9536 ("resource" ,java-osgi-resource)
9537 ("dto" ,java-osgi-dto)))
9538 (home-page "https://www.osgi.org")
9539 (synopsis "OSGi framework")
9540 (description
9541 "OSGi, for Open Services Gateway initiative framework, is a module system
9542and service platform for the Java programming language.")
9543 (license license:asl2.0)))
9544
9545(define-public java-osgi-service-log
9546 (package
9547 (name "java-osgi-service-log")
9548 (version "1.3.0")
9549 (source (origin
9550 (method url-fetch)
9551 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9552 "org.osgi.service.log/"
9553 version "/org.osgi.service.log-"
9554 version "-sources.jar"))
9555 (sha256
9556 (base32
9557 "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0"))))
9558 (build-system ant-build-system)
9559 (arguments
9560 `(#:jar-name "osgi-service-log.jar"
9561 #:tests? #f)); no tests
9562 (inputs
9563 (list java-osgi-framework))
9564 (home-page "https://www.osgi.org")
9565 (synopsis "Provides methods for bundles to write messages to the log")
9566 (description
9567 "OSGi, for Open Services Gateway initiative framework, is a module system
9568and service platform for the Java programming language. This package contains
9569the log service.")
9570 (license license:asl2.0)))
9571
9572(define-public java-osgi-service-jdbc
9573 (package
9574 (name "java-osgi-service-jdbc")
9575 (version "1.0.0")
9576 (source (origin
9577 (method url-fetch)
9578 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9579 "org.osgi.service.jdbc/"
9580 version "/org.osgi.service.jdbc-"
9581 version "-sources.jar"))
9582 (sha256
9583 (base32
9584 "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz"))))
9585 (build-system ant-build-system)
9586 (arguments
9587 `(#:jar-name "osgi-service-jdbc.jar"
9588 #:tests? #f)); no tests
9589 (home-page "https://www.osgi.org")
9590 (synopsis "Factory for JDBC connection factories")
9591 (description
9592 "OSGi, for Open Services Gateway initiative framework, is a module system
9593and service platform for the Java programming language. This package contains
9594a factory for JDBC connection factories. There are 3 preferred connection
9595factories for getting JDBC connections:
9596
9597@itemize
9598@item @code{javax.sql.DataSource};
9599@item @code{javax.sql.ConnectionPoolDataSource};
9600@item @code{javax.sql.XADataSource}.
9601@end itemize")
9602 (license license:asl2.0)))
9603
9604(define-public java-osgi-service-resolver
9605 (package
9606 (name "java-osgi-service-resolver")
9607 (version "1.0.1")
9608 (source (origin
9609 (method url-fetch)
9610 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9611 "org.osgi.service.resolver/"
9612 version "/org.osgi.service.resolver-"
9613 version "-sources.jar"))
9614 (sha256
9615 (base32
9616 "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd"))))
9617 (build-system ant-build-system)
9618 (arguments
9619 `(#:jar-name "osgi-service-resolver.jar"
9620 #:tests? #f)); no tests
9621 (inputs
9622 `(("annotation" ,java-osgi-annotation)
9623 ("resource" ,java-osgi-resource)))
9624 (home-page "https://www.osgi.org")
9625 (synopsis "OSGI Resolver service")
9626 (description
9627 "OSGi, for Open Services Gateway initiative framework, is a module system
9628and service platform for the Java programming language. This package contains
9629a resolver service that resolves the specified resources in the context supplied
9630by the caller.")
9631 (license license:asl2.0)))
9632
9633(define-public java-osgi-util-tracker
9634 (package
9635 (name "java-osgi-util-tracker")
9636 (version "1.5.1")
9637 (source (origin
9638 (method url-fetch)
9639 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9640 "org.osgi.util.tracker/"
9641 version "/org.osgi.util.tracker-"
9642 version "-sources.jar"))
9643 (sha256
9644 (base32
9645 "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz"))))
9646 (build-system ant-build-system)
9647 (arguments
9648 `(#:jar-name "osgi-util-tracker.jar"
9649 #:tests? #f)); no tests
9650 (inputs
9651 `(("framework" ,java-osgi-framework)
9652 ("annotation" ,java-osgi-annotation)))
9653 (home-page "https://www.osgi.org")
9654 (synopsis "Bundle tracking")
9655 (description
9656 "OSGi, for Open Services Gateway initiative framework, is a module system
9657and service platform for the Java programming language. This package contains
9658bundle tracking utility classes.")
9659 (license license:asl2.0)))
9660
9661(define-public java-osgi-service-cm
9662 (package
9663 (name "java-osgi-service-cm")
9664 (version "1.5.0")
9665 (source (origin
9666 (method url-fetch)
9667 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9668 "org.osgi.service.cm/"
9669 version "/org.osgi.service.cm-"
9670 version "-sources.jar"))
9671 (sha256
9672 (base32
9673 "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6"))))
9674 (build-system ant-build-system)
9675 (arguments
9676 `(#:jar-name "osgi-service-cm.jar"
9677 #:tests? #f)); no tests
9678 (inputs
9679 `(("framework" ,java-osgi-framework)
9680 ("annotation" ,java-osgi-annotation)))
9681 (home-page "https://www.osgi.org")
9682 (synopsis "OSGI Configuration Management")
9683 (description
9684 "OSGi, for Open Services Gateway initiative framework, is a module system
9685and service platform for the Java programming language. This package contains
9686utility classes for the configuration of services.")
9687 (license license:asl2.0)))
9688
9689(define-public java-osgi-service-packageadmin
9690 (package
9691 (name "java-osgi-service-packageadmin")
9692 (version "1.2.0")
9693 (source (origin
9694 (method url-fetch)
9695 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9696 "org.osgi.service.packageadmin/"
9697 version "/org.osgi.service.packageadmin-"
9698 version "-sources.jar"))
9699 (sha256
9700 (base32
9701 "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52"))))
9702 (build-system ant-build-system)
9703 (arguments
9704 `(#:jar-name "osgi-service-packageadmin.jar"
9705 #:tests? #f)); no tests
9706 (inputs
9707 `(("framework" ,java-osgi-framework)))
9708 (home-page "https://www.osgi.org")
9709 (synopsis "OSGI Package Administration")
9710 (description
9711 "OSGi, for Open Services Gateway initiative framework, is a module system
9712and service platform for the Java programming language. This package contains
9713the packageadmin service.")
9714 (license license:asl2.0)))
9715
9716(define-public java-ops4j-base-lang
9717 (package
9718 (name "java-ops4j-base-lang")
9719 (version "1.5.0")
9720 (source (origin
9721 (method url-fetch)
9722 (uri (string-append "https://github.com/ops4j/org.ops4j.base/"
9723 "archive/base-" version ".tar.gz"))
9724 (sha256
9725 (base32
9726 "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw"))))
9727 (build-system ant-build-system)
9728 (arguments
9729 `(#:jar-name "java-ops4j-base-lang.jar"
9730 #:source-dir "ops4j-base-lang/src/main/java"
9731 #:tests? #f; no tests
9732 #:phases
9733 (modify-phases %standard-phases
9734 (add-before 'build 'add-test-file
9735 (lambda _
9736 ;; That file is required by a test in ops4j-pax-exam-core-spi
9737 (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang")
9738 (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties"
9739 (lambda _
9740 (display
9741 (string-append
9742 "version=" ,version "\n"
9743 "groupId=org.ops4j.base"
9744 "artifactId=ops4j-base-lang\n"))))
9745 #t)))))
9746 (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview")
9747 (synopsis "Utility classes and extensions to be used in OPS4J projects")
9748 (description "OPS4J stands for Open Participation Software for Java. This
9749package contains utilities and extensions related to @code{java.lang}.")
9750 (license license:asl2.0)))
9751
9752(define-public java-ops4j-base-monitors
9753 (package
9754 (inherit java-ops4j-base-lang)
9755 (name "java-ops4j-base-monitors")
9756 (arguments
9757 `(#:jar-name "java-ops4j-base-monitors.jar"
9758 #:source-dir "ops4j-base-monitors/src/main/java"
9759 #:tests? #f)); no tests
9760 (inputs
9761 `(("lang" ,java-ops4j-base-lang)))
9762 (description "OPS4J stands for Open Participation Software for Java. This
9763package contains utilities and extensions related to monitoring.")))
9764
9765(define-public java-ops4j-base-io
9766 (package
9767 (inherit java-ops4j-base-lang)
9768 (name "java-ops4j-base-io")
9769 (arguments
9770 `(#:jar-name "java-ops4j-base-io.jar"
9771 #:source-dir "ops4j-base-io/src/main/java"
9772 #:test-dir "ops4j-base-io/src/test"
9773 #:test-exclude
9774 (list "**/ListerTest.java")))
9775 (inputs
9776 `(("lang" ,java-ops4j-base-monitors)
9777 ("lang" ,java-ops4j-base-lang)))
9778 (native-inputs
9779 `(("junit" ,java-junit)
9780 ("hamcrest" ,java-hamcrest-core)))
9781 (description "OPS4J stands for Open Participation Software for Java. This
9782package contains utilities and extensions related to handling streams and files.")))
9783
9784(define-public java-ops4j-base-util
9785 (package
9786 (inherit java-ops4j-base-lang)
9787 (name "java-ops4j-base-util")
9788 (arguments
9789 `(#:jar-name "java-ops4j-base-util.jar"
9790 #:source-dir "ops4j-base-util/src/main/java"
9791 #:test-dir "ops4j-base-util/src/test"))
9792 (inputs
9793 `(("lang" ,java-ops4j-base-lang)))
9794 (native-inputs
9795 `(("junit" ,java-junit)))
9796 (description "OPS4J stands for Open Participation Software for Java. This
9797package contains utilities and extensions related to environment, i18n and
9798mime types.")))
9799
9800(define-public java-ops4j-base-util-property
9801 (package
9802 (inherit java-ops4j-base-lang)
9803 (name "java-ops4j-base-util-property")
9804 (arguments
9805 `(#:jar-name "java-ops4j-base-util-property.jar"
9806 #:source-dir "ops4j-base-util-property/src/main/java"
9807 #:tests? #f)); no tests
9808 (inputs
9809 `(("lang" ,java-ops4j-base-lang)
9810 ("util" ,java-ops4j-base-util)))
9811 (description "OPS4J stands for Open Participation Software for Java. This
9812package contains utilities and extensions related to resolving properties from
9813different sources.")))
9814
9815(define-public java-ops4j-base-store
9816 (package
9817 (inherit java-ops4j-base-lang)
9818 (name "java-ops4j-base-store")
9819 (arguments
9820 `(#:jar-name "java-ops4j-base-store.jar"
9821 #:source-dir "ops4j-base-store/src/main/java"
9822 #:tests? #f)); no tests
9823 (inputs
9824 `(("lang" ,java-ops4j-base-lang)
9825 ("slf4j" ,java-slf4j-api)
9826 ("io" ,java-ops4j-base-io)))
9827 (description "OPS4J stands for Open Participation Software for Java. This
9828package contains utilities for storing and retrieving data from an
9829@code{InputStream}.")))
9830
9831(define-public java-ops4j-base-spi
9832 (package
9833 (inherit java-ops4j-base-lang)
9834 (name "java-ops4j-base-spi")
9835 (arguments
9836 `(#:jar-name "java-ops4j-base-spi.jar"
9837 #:source-dir "ops4j-base-spi/src/main/java"
9838 #:test-dir "ops4j-base-spi/src/test"))
9839 (native-inputs
9840 `(("junit" ,java-junit)
9841 ("hamcrest" ,java-hamcrest-core)))
9842 (description "OPS4J stands for Open Participation Software for Java. This
9843package contains utilities for obtaining services via the Java SE 6
9844@code{ServiceLoader}.")))
9845
9846(define-public java-aqute-bnd-annotation
9847 (package
9848 (name "java-aqute-bnd-annotation")
9849 (version "3.5.0")
9850 (source (origin
9851 (method url-fetch)
9852 (uri (string-append "https://github.com/bndtools/bnd/archive/"
9853 version ".REL.tar.gz"))
9854 (file-name (string-append name "-" version ".tar.gz"))
9855 (sha256
9856 (base32
9857 "1ggyiq0as0f6cz333a0dh98j72kmvv5pf2s47v9554yh905lfqdl"))))
9858 (build-system ant-build-system)
9859 (arguments
9860 `(#:jar-name "java-aqute-bnd-annotation.jar"
9861 #:source-dir "biz.aQute.bnd.annotation/src"
9862 #:tests? #f)); empty test dir
9863 (home-page "https://bnd.bndtools.org/")
9864 (synopsis "Tools for OSGi")
9865 (description "Bnd is a swiss army knife for OSGi, it creates manifest
9866headers based on analyzing the class code, it verifies the project settings,
9867it manages project dependencies, gives diffs jars, and much more.")
9868 (license license:asl2.0)))
9869
9870(define-public java-aqute-libg
9871 (package
9872 (inherit java-aqute-bnd-annotation)
9873 (name "java-aqute-libg")
9874 (arguments
9875 `(#:jar-name "java-aqute-libg.jar"
9876 ;; The build fails when source/target more recent than 1.7. This
9877 ;; is a known issue. See: https://github.com/bndtools/bnd/issues/1327
9878 ;;
9879 ;; It is closed as won't fix. There is no way to change the source
9880 ;; so that it works on 1.8, and still works on 1.6, the upstream
9881 ;; target. It work fine on 1.7, so we use 1.7.
9882 #:make-flags (list "-Dant.build.javac.source=1.7"
9883 "-Dant.build.javac.target=1.7")
9884 #:phases
9885 (modify-phases %standard-phases
9886 (add-before 'configure 'chdir
9887 ;; Change to aQute.libg directory, so that the relative
9888 ;; paths in the tests aren't broken.
9889 (lambda _
9890 (chdir "aQute.libg")
9891 #t))
9892 (add-before 'check 'create-test-directory
9893 ;; Copy the test directory to test/java, since that's where
9894 ;; ant-build-system's default project in build.xml expects to find
9895 ;; the test classes. Leave a copy in the original place to not
9896 ;; break paths in tests.
9897 (lambda _
9898 (mkdir "src/test")
9899 (copy-recursively "test" "src/test/java")
9900 #t)))))
9901 (inputs
9902 `(("slf4j" ,java-slf4j-api)
9903 ("osgi-annot" ,java-osgi-annotation)
9904 ("java-osgi-cmpn" ,java-osgi-cmpn)
9905 ("osgi" ,java-osgi-core)))
9906 (native-inputs
9907 `(("hamcrest" ,java-hamcrest-core)
9908 ("java-junit" ,java-junit)))))
9909
9910(define-public java-aqute-bndlib
9911 (package
9912 (inherit java-aqute-bnd-annotation)
9913 (name "java-aqute-bndlib")
9914 (arguments
9915 `(#:jar-name "java-bndlib.jar"
9916 #:source-dir "biz.aQute.bndlib/src"
9917 #:tests? #f)); no tests
9918 (inputs
9919 `(("slf4j" ,java-slf4j-api)
9920 ("osgi-annot" ,java-osgi-annotation)
9921 ("java-aqute-libg" ,java-aqute-libg)
9922 ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation)
9923 ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations)
9924 ("java-osgi-service-repository" ,java-osgi-service-repository)
9925 ("java-osgi-service-log" ,java-osgi-service-log)
9926 ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations)
9927 ("java-osgi-namespace-contract" ,java-osgi-namespace-contract)
9928 ("java-osgi-namespace-extender" ,java-osgi-namespace-extender)
9929 ("java-osgi-namespace-service" ,java-osgi-namespace-service)
9930 ("promise" ,java-osgi-util-promise)
9931 ("osgi" ,java-osgi-core)))))
9932
9933(define-public java-ops4j-pax-tinybundles
9934 (package
9935 (name "java-ops4j-pax-tinybundles")
9936 (version "2.1.1")
9937 (source (origin
9938 (method url-fetch)
9939 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/"
9940 "archive/tinybundles-" version ".tar.gz"))
9941 (sha256
9942 (base32
9943 "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871"))))
9944 (arguments
9945 `(#:jar-name "java-ops4j-pax-tinybundles.jar"
9946 #:source-dir "src/main/java"
9947 #:test-exclude
9948 ;; Abstract base classes for other tests
9949 (list "**/BndTest.java" "**/CoreTest.java")
9950 #:phases
9951 (modify-phases %standard-phases
9952 (add-before 'check 'fix-version
9953 (lambda _
9954 ;; This test has a reference to an old version of bndlib we are not
9955 ;; packaging. It uses the version referenced in pom.xml. We replace
9956 ;; it with our own version.
9957 (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
9958 (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*")
9959 ,(package-version java-aqute-bndlib)))
9960 #t)))))
9961 (inputs
9962 `(("lang" ,java-ops4j-base-lang)
9963 ("io" ,java-ops4j-base-io)
9964 ("store" ,java-ops4j-base-store)
9965 ("slf4j" ,java-slf4j-api)
9966 ("libg" ,java-aqute-libg)
9967 ("bndlib" ,java-aqute-bndlib)))
9968 (native-inputs
9969 `(("junit" ,java-junit)
9970 ("hamcrest" ,java-hamcrest-core)
9971 ("log4j" ,java-log4j-api)
9972 ("bndannotation" ,java-aqute-bnd-annotation)
9973 ("framework" ,java-osgi-framework)))
9974 (build-system ant-build-system)
9975 (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles")
9976 (synopsis "Java APIs to create OSGi related artifacts")
9977 (description "Tinybundles is all about creating OSGi related artifacts like
9978Bundles, Fragments and Deployment Packages with Java Api. It is very convenient
9979to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the
9980other hand, this library can be a foundation of real end user tools that need
9981to create those artifacts.")
9982 (license license:asl2.0)))
9983
9984(define-public java-ops4j-pax-exam-core
9985 (package
9986 (name "java-ops4j-pax-exam-core")
9987 (version "4.11.0")
9988 (source (origin
9989 (method url-fetch)
9990 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/"
9991 "archive/exam-reactor-" version ".tar.gz"))
9992 (sha256
9993 (base32
9994 "08mzw8nkah3rj3vznlplnawspxhp61zgvb44ifqa1rni1cvbms2g"))))
9995 (arguments
9996 `(#:jar-name "java-ops4j-pax-exam-core.jar"
9997 #:source-dir "core/pax-exam/src/main/java"
9998 #:test-dir "core/pax-exam/src/test"))
9999 (inputs
10000 `(("slf4j" ,java-slf4j-api)
10001 ("lang" ,java-ops4j-base-lang)
10002 ("io" ,java-ops4j-base-io)
10003 ("util-property" ,java-ops4j-base-util-property)
10004 ("util-store" ,java-ops4j-base-store)
10005 ("java-osgi-core" ,java-osgi-core)))
10006 (native-inputs
10007 `(("junit" ,java-junit)
10008 ("hamcrest" ,java-hamcrest-core)))
10009 (build-system ant-build-system)
10010 (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview")
10011 (synopsis "In-Container Testing for OSGi, Java EE and CDI")
10012 (description "Pax Exam creates OSGi bundles for testing purposes. It lets
10013the user take control of the OSGi framework, the test framework (e.g. JUnit) and
10014the system under test at the same time.")
10015 (license license:asl2.0)))
10016
10017(define-public java-ops4j-pax-exam-core-spi
10018 (package
10019 (inherit java-ops4j-pax-exam-core)
10020 (name "java-ops4j-pax-exam-core-spi")
10021 (arguments
10022 `(#:jar-name "java-ops4j-pax-exam-spi.jar"
10023 #:source-dir "src/main/java"
10024 #:test-exclude
10025 (list
10026 ;; Abstract base class, not a test
10027 "**/BaseStagedReactorTest.java"
10028 ;; Depends on org.mortbay.jetty.testwars:test-war-dump
10029 "**/WarBuilderTest.java")
10030 #:phases
10031 (modify-phases %standard-phases
10032 (add-before 'configure 'chdir
10033 (lambda _
10034 ;; Tests assume we are in this directory
10035 (chdir "core/pax-exam-spi")
10036 #t))
10037 (add-before 'check 'fix-tests
10038 (lambda _
10039 ;; One test checks that this file is present.
10040 (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi")
10041 (with-output-to-file
10042 "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties"
10043 (lambda _
10044 (display
10045 (string-append "artifactId = pax-exam-spi\n"
10046 "version = " ,(package-version java-ops4j-pax-exam-core-spi)))))
10047 ;; Maven puts compilation results in the target directory, while we
10048 ;; put them in the build directory.
10049 (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java"
10050 "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java"
10051 "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java")
10052 (("target") "build"))
10053 ;; One test is expected to fail, but it doesn't throw the expected exception
10054 (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java"
10055 (("AssertionError") "IllegalArgumentException"))
10056 #t)))))
10057 (inputs
10058 `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core)
10059 ("lang" ,java-ops4j-base-lang)
10060 ("monitors" ,java-ops4j-base-monitors)
10061 ("store" ,java-ops4j-base-store)
10062 ("io" ,java-ops4j-base-io)
10063 ("spi" ,java-ops4j-base-spi)
10064 ("osgi" ,java-osgi-core)
10065 ("slf4j" ,java-slf4j-api)
10066 ("tinybundles" ,java-ops4j-pax-tinybundles)))
10067 (native-inputs
10068 `(("mockito" ,java-mockito-1)
10069 ("junit" ,java-junit)
10070 ("hamcrest" ,java-hamcrest-core)
10071 ("cglib" ,java-cglib)
10072 ("objenesis" ,java-objenesis)))))
10073
10074(define-public java-ops4j-pax-exam-core-junit
10075 (package
10076 (inherit java-ops4j-pax-exam-core)
10077 (name "java-ops4j-pax-exam-core-junit")
10078 (arguments
10079 `(#:jar-name "ops4j-pax-exam-core-junit.jar"
10080 #:source-dir "drivers/pax-exam-junit4/src/main/java"
10081 #:tests? #f)); no tests
10082 (inputs
10083 `(("junit" ,java-junit)
10084 ("slf4j" ,java-slf4j-api)
10085 ("core" ,java-ops4j-pax-exam-core)
10086 ("spi" ,java-ops4j-pax-exam-core-spi)))
10087 (native-inputs '())))
10088
10089(define-public java-fasterxml-jackson-annotations
10090 (package
10091 (name "java-fasterxml-jackson-annotations")
10092 (version "2.9.4")
10093 (source (origin
10094 (method url-fetch)
10095 (uri (string-append "https://github.com/FasterXML/"
10096 "jackson-annotations/archive/"
10097 "jackson-annotations-" version ".tar.gz"))
10098 (sha256
10099 (base32
10100 "0mr95xd0da6a4g95zvrl1ryk5n5zv2rc696w3xnsr5hxk2gicfc4"))))
10101 (build-system ant-build-system)
10102 (arguments
10103 `(#:jar-name "jackson-annotations.jar"
10104 #:source-dir "src/main/java"
10105 #:test-dir "src/test"))
10106 (native-inputs
10107 `(("junit" ,java-junit)))
10108 (home-page "https://github.com/FasterXML/jackson-annotations")
10109 (synopsis "General purpose annotations for the Jackson Data Processor")
10110 (description "This package contains general purpose annotations for the
10111Jackson Data Processor, used on value and handler types. The only annotations
10112not included are ones that require dependency to the Databind package.")
10113 (license license:asl2.0)))
10114
10115(define-public java-fasterxml-jackson-core
10116 (package
10117 (name "java-fasterxml-jackson-core")
10118 (version "2.9.4")
10119 (source (origin
10120 (method url-fetch)
10121 (uri (string-append "https://github.com/FasterXML/"
10122 "jackson-core/archive/"
10123 "jackson-core-" version ".tar.gz"))
10124 (sha256
10125 (base32
10126 "159hsnk17jr1gyzkf01cxvsn45srnk37g949r7364qlsr527gjgd"))))
10127 (build-system ant-build-system)
10128 (arguments
10129 `(#:jar-name "jackson-core.jar"
10130 #:source-dir "src/main/java"
10131 #:test-dir "src/test"
10132 #:test-exclude
10133 (list
10134 ;; Expected failure. pom.xml excludes these
10135 "**/failing/**"
10136 ;; Base classes that have no constructor for junit
10137 "**/BaseTest.java"
10138 "**/ConcurrencyReadTest.java"
10139 "**/ManualCharAccessTest.java"
10140 "**/ManualCharAccessTest.java"
10141 "**/TrailingCommasTest.java"
10142 "**/AsyncMissingValuesInObjectTest.java"
10143 "**/AsyncMissingValuesInArrayTest.java")
10144 #:phases
10145 (modify-phases %standard-phases
10146 (add-before 'configure 'generate-PackageVersion.java
10147 (lambda _
10148 (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java")
10149 (in (string-append out ".in")))
10150 (copy-file in out)
10151 (substitute* out
10152 (("@package@") "com.fasterxml.jackson.core.json")
10153 (("@projectversion@") ,version)
10154 (("@projectgroupid@") "com.fasterxml.jackson.core")
10155 (("@projectartifactid@") "jackson-core")))
10156 #t))
10157 (add-before 'build 'copy-resources
10158 (lambda _
10159 (copy-recursively "src/main/resources"
10160 "build/classes")
10161 #t))
10162 (add-before 'check 'copy-test-resources
10163 (lambda _
10164 (copy-recursively "src/test/resources"
10165 "build/test-classes")
10166 #t)))))
10167 (native-inputs
10168 `(("junit" ,java-junit)
10169 ("hamcrest" ,java-hamcrest-core)))
10170 (home-page "https://github.com/FasterXML/jackson-core")
10171 (synopsis "Low-level streaming parser and generator abstractions")
10172 (description "This package contains core low-level incremental
10173(streaming) parser and generator abstractions used by the Jackson Data
10174Processor. It also includes the default implementation of handler types
10175(parser, generator) that handle JSON format.")
10176 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
10177
10178(define-public java-fasterxml-jackson-databind
10179 (package
10180 (name "java-fasterxml-jackson-databind")
10181 (version "2.9.4")
10182 (source (origin
10183 (method url-fetch)
10184 (uri (string-append "https://github.com/FasterXML/"
10185 "jackson-databind/archive/"
10186 "jackson-databind-" version ".tar.gz"))
10187 (sha256
10188 (base32
10189 "1zd2cw4z6kdkbx8za96xh9pyicv2a2l7y0rkcx2fqd8hv6d47s08"))))
10190 (build-system ant-build-system)
10191 (arguments
10192 `(#:jar-name "jackson-databind.jar"
10193 #:source-dir "src/main/java"
10194 #:tests? #f; requires javax.measures for which I can't find a free implementation
10195 #:phases
10196 (modify-phases %standard-phases
10197 (add-before 'configure 'generate-PackageVersion.java
10198 (lambda _
10199 (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java")
10200 (in (string-append out ".in")))
10201 (copy-file in out)
10202 (substitute* out
10203 (("@package@") "com.fasterxml.jackson.databind.cfg")
10204 (("@projectversion@") ,version)
10205 (("@projectgroupid@") "com.fasterxml.jackson.databind")
10206 (("@projectartifactid@") "jackson-databind")))
10207 #t))
10208 (add-before 'build 'copy-resources
10209 (lambda _
10210 (copy-recursively "src/main/resources" "build/classes")
10211 #t)))))
10212 (inputs
10213 (list java-fasterxml-jackson-annotations java-fasterxml-jackson-core))
10214 (home-page "https://github.com/FasterXML/jackson-databind")
10215 (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor")
10216 (description "This package contains the general-purpose data-binding
10217functionality and tree-model for Jackson Data Processor. It builds on core
10218streaming parser/generator package, and uses Jackson Annotations for
10219configuration.")
10220 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
10221
10222(define-public java-fasterxml-jackson-modules-base-jaxb
10223 (package
10224 (name "java-fasterxml-jackson-modules-base-jaxb")
10225 (version "2.9.4")
10226 (source (origin
10227 (method url-fetch)
10228 (uri (string-append "https://github.com/FasterXML/"
10229 "jackson-modules-base/archive/"
10230 "jackson-modules-base-" version ".tar.gz"))
10231 (sha256
10232 (base32
10233 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
10234 (build-system ant-build-system)
10235 (arguments
10236 `(#:jar-name "jackson-modules-base-jaxb.jar"
10237 #:source-dir "jaxb/src/main/java"
10238 #:test-dir "jaxb/src/test"
10239 #:test-exclude
10240 ;; Base class for tests
10241 (list "**/BaseJaxbTest.java")
10242 #:phases
10243 (modify-phases %standard-phases
10244 (add-before 'configure 'generate-PackageVersion.java
10245 (lambda _
10246 (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/"
10247 "jackson/module/jaxb/PackageVersion.java"))
10248 (in (string-append out ".in")))
10249 (copy-file in out)
10250 (substitute* out
10251 (("@package@") "com.fasterxml.jackson.module.jaxb")
10252 (("@projectversion@") ,version)
10253 (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb")
10254 (("@projectartifactid@") "jackson-module-jaxb")))
10255 #t))
10256 (add-before 'build 'copy-resources
10257 (lambda _
10258 (copy-recursively "jaxb/src/main/resources" "build/classes")
10259 #t)))))
10260 (inputs
10261 (list java-fasterxml-jackson-annotations java-fasterxml-jackson-core
10262 java-fasterxml-jackson-databind))
10263 (native-inputs
10264 (list java-junit))
10265 (home-page "https://github.com/FasterXML/jackson-modules-base")
10266 (synopsis "Jaxb annotations jackson module")
10267 (description "This package is the jaxb annotations module for jackson.")
10268 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
10269
10270(define-public java-fasterxml-jackson-modules-base-mrbean
10271 (package
10272 (name "java-fasterxml-jackson-modules-base-mrbean")
10273 (version "2.9.4")
10274 (source (origin
10275 (method url-fetch)
10276 (uri (string-append "https://github.com/FasterXML/"
10277 "jackson-modules-base/archive/"
10278 "jackson-modules-base-" version ".tar.gz"))
10279 (sha256
10280 (base32
10281 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
10282 (build-system ant-build-system)
10283 (arguments
10284 `(#:jar-name "jackson-modules-base-mrbean.jar"
10285 #:source-dir "mrbean/src/main/java"
10286 #:test-dir "mrbean/src/test"
10287 #:test-exclude
10288 ;; Base class for tests
10289 (list "**/BaseTest.java")
10290 #:phases
10291 (modify-phases %standard-phases
10292 (add-before 'configure 'generate-PackageVersion.java
10293 (lambda _
10294 (let* ((out (string-append "mrbean/src/main/java/com/fasterxml/"
10295 "jackson/module/mrbean/PackageVersion.java"))
10296 (in (string-append out ".in")))
10297 (copy-file in out)
10298 (substitute* out
10299 (("@package@") "com.fasterxml.jackson.module.mrbean")
10300 (("@projectversion@") ,version)
10301 (("@projectgroupid@") "com.fasterxml.jackson.module.mrbean")
10302 (("@projectartifactid@") "jackson-module-mrbean")))
10303 #t)))))
10304 (inputs
10305 (list java-asm java-fasterxml-jackson-annotations
10306 java-fasterxml-jackson-core java-fasterxml-jackson-databind))
10307 (native-inputs
10308 (list java-junit))
10309 (home-page "https://github.com/FasterXML/jackson-modules-base")
10310 (synopsis "POJO type materialization for Java")
10311 (description "This package implements POJO type materialization.
10312Databinders can construct implementation classes for Java interfaces as part
10313of deserialization.")
10314 (license license:asl2.0)))
10315
10316(define-public java-snakeyaml
10317 (package
10318 (name "java-snakeyaml")
10319 (version "1.18")
10320 (source (origin
10321 (method url-fetch)
10322 (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
10323 version ".tar.gz"))
10324 (file-name (string-append name "-" version ".tar.gz"))
10325 (sha256
10326 (base32
10327 "0474cqcv46zgv9bhms2vgawakq1vyj0hp3h3f1bfys46msia90bh"))))
10328 (build-system ant-build-system)
10329 (arguments
10330 `(#:jar-name "java-snakeyaml.jar"
10331 #:source-dir "src/main/java"
10332 ;; Tests require velocity, a cyclic dependency, and
10333 ;; java-spring-framework-context which is not packaged.
10334 #:tests? #f))
10335 (home-page "https://bitbucket.org/asomov/snakeyaml")
10336 (synopsis "YAML processor")
10337 (description "SnakeYAML is a YAML processor for the Java Virtual Machine.")
10338 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
10339
10340(define-public java-fasterxml-jackson-dataformat-yaml
10341 (package
10342 (name "java-fasterxml-jackson-dataformat-yaml")
10343 (version "2.9.4")
10344 (source (origin
10345 (method url-fetch)
10346 (uri (string-append "https://github.com/FasterXML/"
10347 "jackson-dataformats-text/archive/"
10348 "jackson-dataformats-text-" version ".tar.gz"))
10349 (sha256
10350 (base32
10351 "1hikl06khaxbg439avf442qifcadap8w0lx13f0nnhp2vh3dkbz7"))))
10352 (build-system ant-build-system)
10353 (arguments
10354 `(#:jar-name "jackson-dataformat-yaml.jar"
10355 #:source-dir "yaml/src/main/java"
10356 #:test-dir "yaml/src/test"
10357 #:test-exclude (list "**/failing/**.java")
10358 #:phases
10359 (modify-phases %standard-phases
10360 (add-before 'configure 'generate-PackageVersion.java
10361 (lambda _
10362 (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java")
10363 (in (string-append out ".in")))
10364 (copy-file in out)
10365 (substitute* out
10366 (("@package@") "com.fasterxml.jackson.dataformat.yaml")
10367 (("@projectversion@") ,version)
10368 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml")
10369 (("@projectartifactid@") "jackson-dataformat-yaml")))
10370 #t)))))
10371 (inputs
10372 (list java-fasterxml-jackson-annotations java-fasterxml-jackson-core
10373 java-fasterxml-jackson-databind java-snakeyaml))
10374 (native-inputs
10375 `(("junit" ,java-junit)
10376 ("hamcrest" ,java-hamcrest-core)
10377 ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi)
10378 ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit)
10379 ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core)))
10380 (home-page "https://github.com/FasterXML/jackson-dataformats-text")
10381 (synopsis "Yaml backend for Jackson")
10382 (description "Dataformat backends are used to support format alternatives
10383to JSON, supported by default. This is done by sub-classing Jackson core
10384abstractions.")
10385 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
10386
10387(define-public java-stax2-api
10388 (package
10389 (name "java-stax2-api")
10390 (version "4.0.0")
10391 (source (origin
10392 (method url-fetch)
10393 (uri (string-append "https://github.com/FasterXML/stax2-api/archive/"
10394 "stax2-api-" version ".tar.gz"))
10395 (sha256
10396 (base32
10397 "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq"))))
10398 (build-system ant-build-system)
10399 (arguments
10400 `(#:jar-name "java-stax2-api.jar"
10401 #:source-dir "src/main/java"
10402 #:tests? #f)); no tests
10403 (home-page "https://github.com/FasterXML/stax2-api")
10404 (synopsis "Stax2 API")
10405 (description "Stax2 API is an extension to basic Stax 1.0 API that adds
10406significant new functionalities, such as full-featured bi-direction validation
10407interface and high-performance Typed Access API.")
10408 (license license:bsd-2)))
10409
10410(define-public java-woodstox-core
10411 (package
10412 (name "java-woodstox-core")
10413 (version "5.0.3")
10414 (source (origin
10415 (method git-fetch)
10416 (uri (git-reference
10417 (url "https://github.com/FasterXML/woodstox")
10418 (commit (string-append "woodstox-core-" version))))
10419 (file-name (git-file-name name version))
10420 (sha256
10421 (base32
10422 "0bfylk24a967hwxprxqbg6cdvm6n4ldcarp54yg980viwvjiglyp"))))
10423 (build-system ant-build-system)
10424 (arguments
10425 `(#:jar-name "woodstox.jar"
10426 #:test-exclude
10427 (list "**/Base*.java" "failing/**")
10428 #:phases
10429 (modify-phases %standard-phases
10430 (add-before 'build 'remove-msv-dep
10431 (lambda _
10432 ;; we don't need osgi, and it depends on msv
10433 (delete-file-recursively "src/main/java/com/ctc/wstx/osgi")
10434 ;; msv's latest release is from 2011 and we don't need it
10435 (delete-file-recursively "src/main/java/com/ctc/wstx/msv")
10436 (delete-file-recursively "src/test/java/wstxtest/osgi")
10437 (delete-file-recursively "src/test/java/wstxtest/msv")
10438 #t))
10439 (add-before 'build 'copy-resources
10440 (lambda _
10441 (copy-recursively "src/main/resources" "build/classes")
10442 #t)))))
10443 (inputs
10444 `(("stax2" ,java-stax2-api)))
10445 (native-inputs
10446 `(("junit" ,java-junit)))
10447 (home-page "https://github.com/FasterXML/woodstox")
10448 (synopsis "Stax XML API implementation")
10449 (description "Woodstox is a stax XML API implementation.")
10450 (license license:asl2.0)))
10451
10452(define-public java-fasterxml-jackson-dataformat-xml
10453 (package
10454 (name "java-fasterxml-jackson-dataformat-xml")
10455 (version "2.9.4")
10456 (source (origin
10457 (method git-fetch)
10458 (uri (git-reference
10459 (url "https://github.com/FasterXML/jackson-dataformat-xml")
10460 (commit (string-append "jackson-dataformat-xml-" version))))
10461 (file-name (git-file-name name version))
10462 (sha256
10463 (base32
10464 "0s1wl65mbs57c2hz2v8rnh8i04y5lpyyvnjz562j5j6b83vwwpfx"))))
10465 (build-system ant-build-system)
10466 (arguments
10467 `(#:jar-name "jackson-dataformat-xml.jar"
10468 #:source-dir "src/main/java"
10469 #:test-exclude
10470 (list "**/failing/**")
10471 #:phases
10472 (modify-phases %standard-phases
10473 (add-before 'configure 'generate-PackageVersion.java
10474 (lambda _
10475 (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java")
10476 (in (string-append out ".in")))
10477 (copy-file in out)
10478 (newline)
10479 (substitute* out
10480 (("@package@") "com.fasterxml.jackson.dataformat.xml")
10481 (("@projectversion@") ,version)
10482 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml")
10483 (("@projectartifactid@") "jackson-dataformat-xml")))
10484 #t))
10485 (add-before 'build 'copy-resources
10486 (lambda _
10487 (copy-recursively "src/main/resources" "build/classes")
10488 #t)))))
10489 (inputs
10490 `(("jackson-annotations" ,java-fasterxml-jackson-annotations)
10491 ("jackson-core" ,java-fasterxml-jackson-core)
10492 ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb)
10493 ("jackson-databind" ,java-fasterxml-jackson-databind)
10494 ("stax2-api" ,java-stax2-api)
10495 ("woodstox" ,java-woodstox-core)))
10496 (native-inputs
10497 `(("junit" ,java-junit)
10498 ("hamcrest" ,java-hamcrest-core)))
10499 (home-page "https://github.com/FasterXML/jackson-dataformat-xml")
10500 (synopsis "Read and write XML")
10501 (description "This package contains Jackson extension component for reading
10502and writing XML encoded data.
10503
10504Further, the goal is to emulate how JAXB data-binding works with \"Code-first\"
10505approach (that is, no support is added for \"Schema-first\" approach). Support
10506for JAXB annotations is provided by JAXB annotation module; this module
10507provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator},
10508@code{JsonFactory}) as well as small number of higher level overrides needed to
10509make data-binding work.")
10510 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
10511
10512(define-public java-hdrhistogram
10513 (package
10514 (name "java-hdrhistogram")
10515 (version "2.1.9")
10516 (source (origin
10517 (method git-fetch)
10518 (uri (git-reference
10519 (url "https://github.com/HdrHistogram/HdrHistogram")
10520 (commit (string-append "HdrHistogram-" version))))
10521 (file-name (git-file-name name version))
10522 (sha256
10523 (base32
10524 "1cw8aa1vk258k42xs6wpy72m4gbai540jq032qsa7c5586iawx2d"))))
10525 (build-system ant-build-system)
10526 (arguments
10527 `(#:jar-name "java-hdrhistogram.jar"
10528 #:source-dir "src/main/java"
10529 #:phases
10530 (modify-phases %standard-phases
10531 (add-after 'unpack 'make-files-writable
10532 (lambda _
10533 (for-each make-file-writable (find-files "."))
10534 #t))
10535 (add-before 'configure 'set-version
10536 (lambda _
10537 (let* ((version-java "src/main/java/org/HdrHistogram/Version.java")
10538 (template (string-append version-java ".template")))
10539 (copy-file template version-java)
10540 (substitute* version-java
10541 (("\\$VERSION\\$") ,version)
10542 (("\\$BUILD_TIME\\$") "0"))
10543 #t))))))
10544 (native-inputs
10545 `(("junit" ,java-junit)
10546 ("hamcrest" ,java-hamcrest-core)))
10547 (home-page "https://hdrhistogram.github.io/HdrHistogram")
10548 (synopsis "High dynamic range histogram")
10549 (description "Hdrhistogram creates histograms that support
10550recording and analyzing sampled data value counts across a configurable integer
10551value range with configurable value precision within the range. Value precision
10552is expressed as the number of significant digits in the value recording, and
10553provides control over value quantization behavior across the value range and
10554the subsequent value resolution at any given level.")
10555 (license license:public-domain)))
10556
10557(define-public java-cofoja
10558 (package
10559 (name "java-cofoja")
10560 (version "1.3")
10561 (source (origin
10562 (method git-fetch)
10563 (uri (git-reference
10564 (url "https://github.com/nhatminhle/cofoja")
10565 (commit (string-append "v" version))))
10566 (file-name (string-append "java-cofoja-" version "-checkout"))
10567 (sha256
10568 (base32
10569 "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w"))))
10570 (build-system ant-build-system)
10571 (arguments
10572 `(#:build-target "dist"
10573 #:test-target "test"
10574 #:jdk ,icedtea-8
10575 #:make-flags
10576 (list "-Ddist.dir=dist")
10577 #:modules ((guix build ant-build-system)
10578 (guix build java-utils)
10579 (guix build utils)
10580 (srfi srfi-1)
10581 (ice-9 match))
10582 #:phases
10583 (modify-phases %standard-phases
10584 ;; The bulid system ignores the class path the ant-build-system sets
10585 ;; up and instead expects to find all dependencies in the "lib"
10586 ;; directory.
10587 (add-after 'unpack 'create-libdir
10588 (lambda* (#:key inputs #:allow-other-keys)
10589 (mkdir-p "lib")
10590 (for-each
10591 (lambda (file)
10592 (let ((target (string-append "lib/" (basename file))))
10593 (unless (file-exists? target)
10594 (symlink file target))))
10595 (append-map (match-lambda
10596 ((label . dir)
10597 (find-files dir "\\.jar$")))
10598 inputs))
10599 #t))
10600 (replace 'install (install-jars "dist")))))
10601 (inputs
10602 (list java-asm))
10603 (native-inputs
10604 (list java-junit))
10605 (home-page "https://github.com/nhatminhle/cofoja")
10606 (synopsis "Contracts for Java")
10607 (description "Contracts for Java, or Cofoja for short, is a contract
10608programming framework and test tool for Java, which uses annotation processing
10609and bytecode instrumentation to provide run-time checking. (In particular,
10610this is not a static analysis tool.)")
10611 (license license:lgpl3+)))
10612
10613(define-public java-aopalliance
10614 (package
10615 (name "java-aopalliance")
10616 (version "1.0")
10617 (source (origin
10618 (method git-fetch)
10619 ;; Note: this git repository is not official, but contains the
10620 ;; source code that is in the CVS repository. Downloading the
10621 ;; tarball from sourceforge is undeterministic, and the cvs download
10622 ;; fails.
10623 (uri (git-reference
10624 (url "https://github.com/hoverruan/aopalliance")
10625 (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0")))
10626 (file-name (string-append name "-" version))
10627 (sha256
10628 (base32
10629 "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr"))))
10630 (build-system ant-build-system)
10631 (arguments
10632 `(#:jar-name "java-aopalliance.jar"
10633 #:jdk ,icedtea-8
10634 #:tests? #f; no tests
10635 #:source-dir "aopalliance/src/main"
10636 #:phases
10637 (modify-phases %standard-phases
10638 (add-before 'install 'create-pom
10639 (generate-pom.xml "pom.xml" "aopalliance" "aopalliance" ,version))
10640 (replace 'install
10641 (install-from-pom "pom.xml")))))
10642 (home-page "https://aopalliance.sourceforge.net")
10643 (synopsis "Aspect-Oriented Programming")
10644 (description "The AOP Alliance project is a joint project between several
10645software engineering people who are interested in Aspect-Oriented Programming
10646(AOP) and Java.")
10647 (license license:public-domain)))
10648
10649(define-public java-javax-inject
10650 (package
10651 (name "java-javax-inject")
10652 (version "1")
10653 (source (origin
10654 (method git-fetch)
10655 (uri (git-reference
10656 (url "https://github.com/javax-inject/javax-inject")
10657 (commit version)))
10658 (file-name (git-file-name name version))
10659 (sha256
10660 (base32
10661 "1rspl0nkvk1jif6nccikw93xic6ljj2b6kpy2mffwi2mnvc13j7x"))))
10662 (build-system ant-build-system)
10663 (arguments
10664 `(#:jar-name "java-javax-inject.jar"
10665 #:tests? #f; no tests
10666 #:phases
10667 (modify-phases %standard-phases
10668 (replace 'install
10669 (install-from-pom "pom.xml")))))
10670 (home-page "https://github.com/javax-inject/javax-inject")
10671 (synopsis "JSR-330: Dependency Injection for Java")
10672 (description "This package specifies a means for obtaining objects in such
10673a way as to maximize reusability, testability and maintainability compared to
10674traditional approaches such as constructors, factories, and service locators
10675(e.g., JNDI). This process, known as dependency injection, is beneficial to
10676most nontrivial applications.
10677
10678Many types depend on other types. For example, a @var{Stopwatch} might depend
10679on a @var{TimeSource}. The types on which a type depends are known as its
10680dependencies. The process of finding an instance of a dependency to use at run
10681time is known as resolving the dependency. If no such instance can be found,
10682the dependency is said to be unsatisfied, and the application is broken.")
10683 (license license:asl2.0)))
10684
10685(define-public java-guice
10686 (package
10687 (name "java-guice")
10688 (version "4.1")
10689 (source (origin
10690 (method git-fetch)
10691 (uri (git-reference
10692 (url "https://github.com/google/guice")
10693 (commit version)))
10694 (file-name (git-file-name name version))
10695 (modules '((guix build utils)))
10696 (snippet
10697 `(begin
10698 (for-each delete-file (find-files "." ".*.jar")) #t))
10699 (sha256
10700 (base32
10701 "18im5hdfl4q1b9chww2s1ii60sn3ydyyar32a2sf2p2g8zlbdswq"))))
10702 (build-system ant-build-system)
10703 (arguments
10704 `(#:jar-name "java-guice.jar"
10705 #:jdk ,icedtea-8
10706 #:tests? #f; FIXME: tests are not in a java sub directory
10707 #:source-dir "core/src"
10708 #:phases
10709 (modify-phases %standard-phases
10710 (add-after 'unpack 'make-files-writable
10711 (lambda _
10712 (for-each make-file-writable (find-files "."))
10713 #t))
10714 (replace 'install
10715 (install-from-pom "core/pom.xml")))))
10716 (propagated-inputs
10717 (list java-aopalliance
10718 java-cglib
10719 java-guava
10720 java-javax-inject
10721 java-guice-parent-pom))
10722 (home-page "https://github.com/google/guice")
10723 (synopsis "Lightweight dependency injection framework")
10724 (description "Guice is a lightweight dependency injection framework for
10725Java 6 and above.")
10726 (license license:asl2.0)))
10727
10728(define-public java-guice-servlet
10729 (package
10730 (inherit java-guice)
10731 (name "java-guice-servlet")
10732 (arguments
10733 `(#:jar-name "guice-servlet.jar"
10734 #:source-dir "extensions/servlet/src/"
10735 #:jdk ,icedtea-8
10736 #:tests? #f ; FIXME: not in a java subdir
10737 #:phases
10738 (modify-phases %standard-phases
10739 (add-after 'unpack 'make-files-writable
10740 (lambda _
10741 (for-each make-file-writable (find-files "."))
10742 #t)))))
10743 (inputs
10744 `(("guice" ,java-guice)
10745 ("servlet" ,java-classpathx-servletapi)
10746 ,@(package-inputs java-guice)))))
10747
10748(define java-guice-parent-pom
10749 (package
10750 (inherit java-guice)
10751 (name "java-guice-parent-pom")
10752 (arguments
10753 `(#:tests? #f
10754 #:phases
10755 (modify-phases %standard-phases
10756 (delete 'configure)
10757 (delete 'build)
10758 (add-after 'install 'install-extensions
10759 (install-pom-file "extensions/pom.xml"))
10760 (replace 'install
10761 (install-pom-file "pom.xml")))))
10762 (propagated-inputs
10763 `(("java-google-parent-pom" ,java-google-parent-pom-5)))))
10764
10765(define java-google-parent-pom-5
10766 (package
10767 (name "java-google-parent-pom")
10768 (version "5")
10769 (source (origin
10770 (method git-fetch)
10771 (uri (git-reference
10772 (url "https://github.com/google/google-maven-parents")
10773 (commit (string-append "google-" version))))
10774 (file-name (git-file-name name version))
10775 (sha256
10776 (base32
10777 "0zb7hx24p8k8rfdvix2vsbfqn73jhrycdndvhf8j5gbii9wbqibv"))))
10778 (build-system ant-build-system)
10779 (arguments
10780 `(#:tests? #f
10781 #:phases
10782 (modify-phases %standard-phases
10783 (delete 'configure)
10784 (delete 'build)
10785 (replace 'install
10786 (install-pom-file "pom.xml")))))
10787 (home-page "https://github.com/google/google-maven-parents")
10788 (synopsis "Google parent pom")
10789 (description "This package contains the Maven parent POM for other Google
10790Java projects.")
10791 (license license:asl2.0)))
10792
10793(define-public java-assertj
10794 (package
10795 (name "java-assertj")
10796 (version "3.8.0")
10797 (source (origin
10798 (method git-fetch)
10799 (uri (git-reference
10800 (url "https://github.com/joel-costigliola/assertj-core")
10801 (commit (string-append "assertj-core-" version))))
10802 (file-name (git-file-name name version))
10803 (sha256
10804 (base32
10805 "1k35cg2in7pzk4pbdjryr0pll5lgk1r6ngrn0j8cdlgi7w8zh2d1"))))
10806 (build-system ant-build-system)
10807 (arguments
10808 `(#:jar-name "java-assertj.jar"
10809 #:jdk ,icedtea-8
10810 #:source-dir "src/main/java"
10811 #:tests? #f)); depends on tng-junit which depends on assertj
10812 (inputs
10813 `(("cglib" ,java-cglib)
10814 ("junit" ,java-junit)
10815 ("hamcrest" ,java-hamcrest-core)))
10816 (native-inputs
10817 `(("mockito" ,java-mockito-1)))
10818 (home-page "https://joel-costigliola.github.io/assertj/index.html")
10819 (synopsis "Fluent assertions for java")
10820 (description "AssertJ core is a Java library that provides a fluent
10821interface for writing assertions. Its main goal is to improve test code
10822readability and make maintenance of tests easier.")
10823 (license license:asl2.0)))
10824
10825(define-public java-jboss-javassist
10826 (package
10827 (name "java-jboss-javassist")
10828 (version "3.21.0")
10829 (source (origin
10830 (method git-fetch)
10831 (uri (git-reference
10832 (url "https://github.com/jboss-javassist/javassist")
10833 (commit
10834 (string-append "rel_"
10835 (string-map
10836 (lambda (x) (if (eq? x #\.) #\_ x)) version)
10837 "_ga"))))
10838 (file-name (git-file-name name version))
10839 (sha256
10840 (base32
10841 "0h3zlcyqiaq01fspm69h7vki67raw305w89p4ha8vlhpzw02qifm"))
10842 (modules '((guix build utils)))
10843 (snippet
10844 '(begin
10845 (delete-file "javassist.jar")))))
10846 (build-system ant-build-system)
10847 (arguments
10848 `(#:jar-name "java-jboss-javassist.jar"
10849 #:jdk ,icedtea-8
10850 #:source-dir "src/main"
10851 #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3
10852 #:phases
10853 (modify-phases %standard-phases
10854 (add-after 'unpack 'make-files-writable
10855 (lambda _
10856 (for-each make-file-writable (find-files "."))
10857 #t)))))
10858 (native-inputs
10859 `(("junit" ,java-junit)))
10860 (home-page "https://github.com/jboss-javassist/javassist")
10861 (synopsis "Java bytecode engineering toolkit")
10862 (description "Javassist (JAVA programming ASSISTant) makes Java bytecode
10863manipulation simple. It is a class library for editing bytecodes in Java; it
10864enables Java programs to define a new class at runtime and to modify a class
10865file when the JVM loads it.")
10866 (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl.
10867
10868(define-public java-jcommander
10869 (package
10870 (name "java-jcommander")
10871 (version "1.71")
10872 (source (origin
10873 (method git-fetch)
10874 (uri (git-reference
10875 (url "https://github.com/cbeust/jcommander")
10876 (commit version)))
10877 (file-name (git-file-name name version))
10878 (sha256
10879 (base32
10880 "12vcpc19sd7jhvjgp7xz1qjanfix162xb3x2q5zah93rjklj1h57"))))
10881 (build-system ant-build-system)
10882 (arguments
10883 `(#:jar-name "java-jcommander.jar"
10884 #:jdk ,icedtea-8
10885 #:tests? #f; requires testng which depends on jcommander
10886 #:source-dir "src/main/java"))
10887 (home-page "https://jcommander.org")
10888 (synopsis "Command line parameters parser")
10889 (description "JCommander is a very small Java framework that makes it
10890trivial to parse command line parameters. Parameters are declared with
10891annotations.")
10892 (license license:asl2.0)))
10893
10894(define-public java-bsh
10895 (package
10896 (name "java-bsh")
10897 (version "2.1.1")
10898 (source (origin
10899 (method git-fetch)
10900 (uri (git-reference
10901 (url "https://github.com/beanshell/beanshell")
10902 (commit version)))
10903 (file-name (git-file-name name version))
10904 (sha256
10905 (base32
10906 "1a6y46yz2ba4mnlfv4bpd5pmzhgxrzk3s10xp05jz377nbp2izwg"))
10907 (modules '((guix build utils)))
10908 (snippet
10909 '(begin
10910 ;; Delete bundled third-party jar archives.
10911 (for-each delete-file (find-files "." ".*.jar$"))
10912 (for-each (lambda (file) (chmod file #o644))
10913 (find-files "." "."))
10914 #t))))
10915 (build-system ant-build-system)
10916 (arguments
10917 `(#:build-target "jarall"
10918 #:test-target "junit-tests-all"
10919 #:make-flags (list "-DDATE" "(no date for reproducibility)")
10920 #:phases
10921 (modify-phases %standard-phases
10922 (add-before 'check 'fix-test
10923 (lambda _
10924 (substitute* "tests/junitTests/src/bsh/Issue_55_Test.java"
10925 ((" BshScriptEngineFactory") " bsh.engine.BshScriptEngineFactory"))))
10926 (replace 'install
10927 (install-from-pom "pom.xml")))))
10928 (inputs
10929 (list java-classpathx-servletapi java-commons-bsf))
10930 (native-inputs
10931 (list java-junit javacc-3))
10932 (home-page "http://beanshell.org/")
10933 (synopsis "Lightweight Scripting for Java")
10934 (description "BeanShell is a small, free, embeddable Java source
10935interpreter with object scripting language features, written in Java.
10936BeanShell dynamically executes standard Java syntax and extends it with common
10937scripting conveniences such as loose types, commands, and method closures like
10938those in Perl and JavaScript.")
10939 (license license:asl2.0)))
10940
10941(define-public java-fest-util
10942 (package
10943 (name "java-fest-util")
10944 (version "1.2.5")
10945 (source (origin
10946 (method git-fetch)
10947 (uri (git-reference
10948 (url "https://github.com/alexruiz/fest-util/")
10949 (commit (string-append "fest-util-" version))))
10950 (file-name (git-file-name name version))
10951 (sha256
10952 (base32
10953 "02kgal7v85snyyvcsxvn4qphid455f4smh2wri1il8d9asw0djbz"))))
10954 (build-system ant-build-system)
10955 (arguments
10956 `(#:jar-name "java-fest-util.jar"
10957 #:source-dir "src/main/java"))
10958 (native-inputs
10959 `(("junit" ,java-junit)
10960 ("hamcrest" ,java-hamcrest-core)))
10961 (home-page "https://github.com/alexruiz/fest-util")
10962 (synopsis "FEST common utilities")
10963 (description "Common utilities used in all FEST module.")
10964 (license license:asl2.0)))
10965
10966(define-public java-fest-test
10967 (package
10968 (name "java-fest-test")
10969 (version "2.1.0")
10970 (source (origin
10971 (method git-fetch)
10972 (uri (git-reference
10973 (url "https://github.com/alexruiz/fest-test/")
10974 (commit (string-append "fest-test-" version))))
10975 (file-name (git-file-name name version))
10976 (sha256
10977 (base32
10978 "0mg1d2jfh7kbx2c40dchbjr6d8pv59snsyb13mfxsr7xk5n69qbn"))))
10979 (build-system ant-build-system)
10980 (arguments
10981 `(#:jar-name "java-fest-test.jar"
10982 #:source-dir "src/main/java"
10983 #:tests? #f)); no tests
10984 (inputs
10985 `(("junit" ,java-junit)))
10986 (home-page "https://github.com/alexruiz/fest-test")
10987 (synopsis "Common FEST testing infrastructure")
10988 (description "Fest-test contains the common FEST testing infrastructure.")
10989 (license license:asl2.0)))
10990
10991(define-public java-fest-assert
10992 (package
10993 (name "java-fest-assert")
10994 (version "2.0M10")
10995 (source (origin
10996 (method git-fetch)
10997 (uri (git-reference
10998 (url "https://github.com/alexruiz/fest-assert-2.x/")
10999 (commit (string-append "fest-assert-core-" version))))
11000 (file-name (git-file-name name version))
11001 (sha256
11002 (base32
11003 "1cp8zzyag3s85fz2w68sda9zzaal1y5f9wl8g72wkm12an40w6by"))))
11004 (build-system ant-build-system)
11005 (arguments
11006 `(#:jar-name "java-fest-assert.jar"
11007 #:source-dir "src/main/java"
11008 #:test-exclude
11009 (list
11010 "**/Abstract*.java"
11011 "**/*BaseTest.java"
11012 ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses
11013 "**/MessageFormatter_format_Test.java"
11014 "**/internal/*/*_assert*_Test.java")))
11015 (inputs
11016 (list java-fest-util))
11017 (native-inputs
11018 (list java-junit
11019 java-fest-test
11020 java-hamcrest-core
11021 java-mockito-1
11022 java-cglib
11023 java-objenesis))
11024 (home-page "https://github.com/alexruiz/fest-assert-2.x")
11025 (synopsis "FEST fluent assertions")
11026 (description "FEST-Assert provides a fluent interface for assertions.")
11027 (license license:asl2.0)))
11028
11029(define-public java-testng
11030 (package
11031 (name "java-testng")
11032 (version "6.14.3")
11033 (source (origin
11034 (method git-fetch)
11035 (uri (git-reference
11036 (url "https://github.com/cbeust/testng")
11037 (commit version)))
11038 (file-name (string-append name "-" version "-checkout"))
11039 (sha256
11040 (base32
11041 "0y6vq30i5g276kw0v2bhbvci22ijg7ax49ap2611yqlhbs4d6dqv"))))
11042 (build-system ant-build-system)
11043 (arguments
11044 (list
11045 #:jdk icedtea-8; java.util.function
11046 #:jar-name "java-testng.jar"
11047 #:source-dir "src/main/java"
11048 #:phases
11049 '(modify-phases %standard-phases
11050 (add-after 'unpack 'delete-failing-tests
11051 (lambda _
11052 ;; FIXME: I don't know why these tests fail
11053 (substitute* "src/test/resources/testng.xml"
11054 ;; expected:<[0]> but was:<[3]>
11055 (("<class name=\"test.configuration.github1625.TestRunnerIssue1625\"/>") "")
11056 ;; expected [3] but found [2]
11057 (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") "")
11058 ;; This is a parallel test and we've observed that it fails
11059 ;; sometimes.
11060 (("<class name=\"test.dataprovider.DataProviderTest\"/>") ""))))
11061 ;; We don't have groovy
11062 (add-after 'unpack 'delete-groovy-tests
11063 (lambda _
11064 (delete-file-recursively "src/test/java/test/dependent/issue1648/")
11065 (substitute* "src/test/resources/testng.xml"
11066 (("<class name=\"test.dependent.issue1648.TestRunner\"/>") ""))))
11067 (add-before 'build 'copy-resources
11068 (lambda _
11069 (copy-recursively "src/main/resources" "build/classes")))
11070 (add-before 'check 'copy-test-resources
11071 (lambda _
11072 (copy-recursively "src/test/resources" "build/test-classes")))
11073 (replace 'check
11074 (lambda _
11075 (invoke "ant" "compile-tests")
11076 ;; we don't have groovy
11077 (substitute* "src/test/resources/testng.xml"
11078 (("<class name=\"test.groovy.GroovyTest\" />") ""))
11079 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
11080 ":build/classes"
11081 ":build/test-classes")
11082 "-Dtest.resources.dir=src/test/resources"
11083 "org.testng.TestNG" "src/test/resources/testng.xml"))))))
11084 (propagated-inputs
11085 (list java-junit
11086 java-jsr305
11087 java-bsh
11088 java-jcommander
11089 java-guice
11090 java-snakeyaml))
11091 (native-inputs
11092 (list java-guava
11093 java-javax-inject
11094 java-hamcrest-all
11095 java-assertj
11096 java-mockito-1
11097 java-cglib
11098 java-aopalliance))
11099 (home-page "https://testng.org")
11100 (synopsis "Testing framework")
11101 (description "TestNG is a testing framework inspired from JUnit and NUnit
11102but introducing some new functionalities that make it more powerful and easier
11103to use.")
11104 (license license:asl2.0)))
11105
11106(define-public java-jnacl
11107 (let ((commit "094e819afdd63ea81a499b3bcb42a271006bebd9")
11108 (revision "2"))
11109 (package
11110 (name "java-jnacl")
11111 (version (string-append "0.1.0-" revision "." (string-take commit 7)))
11112 (source (origin
11113 (method git-fetch)
11114 (uri (git-reference
11115 (url "https://github.com/neilalexander/jnacl")
11116 (commit commit)))
11117 (file-name (git-file-name name version))
11118 (sha256
11119 (base32
11120 "1d6g6xhn83byv5943n7935wwjsk0ibk0qdvqgr699qqgqqmwisbb"))))
11121 (build-system ant-build-system)
11122 (arguments
11123 `(#:jar-name "jnacl.jar"
11124 #:source-dir "src/main/java"
11125 #:jdk ,icedtea-8
11126 #:phases
11127 (modify-phases %standard-phases
11128 (add-before 'build 'fix-tests
11129 (lambda _
11130 (substitute* '("src/test/java/com/neilalexander/jnacl/NaClTest.java"
11131 "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java")
11132 (("assertions.Assertions") "assertions.api.Assertions"))
11133 #t))
11134 (replace 'check
11135 (lambda _
11136 (invoke "ant" "compile-tests")
11137 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
11138 ":build/classes"
11139 ":build/test-classes")
11140 "org.testng.TestNG" "-testclass"
11141 "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class")
11142 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
11143 ":build/classes"
11144 ":build/test-classes")
11145 "org.testng.TestNG" "-testclass"
11146 "build/test-classes/com/neilalexander/jnacl/NaClTest.class"))))))
11147 (native-inputs
11148 (list java-testng java-fest-util java-fest-assert))
11149 (home-page "https://github.com/neilalexander/jnacl")
11150 (synopsis "Java implementation of NaCl")
11151 (description "Pure Java implementation of the NaCl: Networking and
11152Cryptography library.")
11153 (license license:bsd-2))))
11154
11155(define-public java-mvel2
11156 (package
11157 (name "java-mvel2")
11158 (version "2.3.1")
11159 (source (origin
11160 (method url-fetch)
11161 (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-"
11162 version ".Final.tar.gz"))
11163 (sha256
11164 (base32
11165 "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z"))))
11166 (build-system ant-build-system)
11167 (arguments
11168 `(#:jar-name "mvel2.jar"
11169 #:source-dir "src/main/java"
11170 #:test-exclude
11171 (list "**/Abstract*.java"
11172 ;; Base class with no tests
11173 "**/MVELThreadTest.java")
11174 #:phases
11175 (modify-phases %standard-phases
11176 (add-after 'install 'install-bin
11177 (lambda* (#:key outputs #:allow-other-keys)
11178 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
11179 (mkdir-p bin)
11180 (with-output-to-file (string-append bin "/mvel2")
11181 (lambda _
11182 (display
11183 (string-append
11184 "#!" (which "bash") "\n"
11185 "if [ \"$#\" -ne \"2\" ]; then\n"
11186 "echo 'Usage: mvel2 <script> <out.dir>'\n"
11187 "exit\n"
11188 "fi\n"
11189 "java -Dout.dir=$2 -cp " (getenv "CLASSPATH")
11190 ":" (assoc-ref outputs "out") "/share/java/mvel2.jar"
11191 " org.mvel2.sh.Main $1"))))
11192 (chmod (string-append bin "/mvel2") #o755))
11193 #t)))))
11194 (native-inputs
11195 `(("junit" ,java-junit)
11196 ("hamcrest" ,java-hamcrest-core)))
11197 (home-page "https://github.com/mvel/mvel")
11198 (synopsis "MVFLEX Expression Language")
11199 (description "MVEL has largely been inspired by Java syntax, but has some
11200fundamental differences aimed at making it more efficient as an expression
11201language, such as operators that directly support collection, array and string
11202matching, as well as regular expressions. MVEL is used to evaluate expressions
11203written using Java syntax.
11204
11205In addition to the expression language, MVEL serves as a templating language for
11206configuration and string construction.")
11207 (license license:asl2.0)))
11208
11209(define-public java-commons-jexl-2
11210 (package
11211 (name "java-commons-jexl")
11212 (version "2.1.1")
11213 (source (origin
11214 (method url-fetch)
11215 (uri (string-append "mirror://apache/commons/jexl/source/"
11216 "commons-jexl-" version "-src.tar.gz"))
11217 (sha256
11218 (base32
11219 "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz"))))
11220 (build-system ant-build-system)
11221 (arguments
11222 `(#:jar-name "commons-jexl-2.jar"
11223 #:jdk ,icedtea-8
11224 #:source-dir "src/main/java"
11225 #:phases
11226 (modify-phases %standard-phases
11227 (add-before 'check 'disable-broken-tests
11228 (lambda* (#:key inputs #:allow-other-keys)
11229 (with-directory-excursion "src/test/java/org/apache/commons/jexl2/"
11230 (substitute* "ArithmeticTest.java"
11231 (("asserter.assertExpression\\(\"3 / 0\"") "//")
11232 (("asserter.assertExpression\\(\"imanull") "//"))
11233 ;; This test fails with "ambiguous method invocation"
11234 (delete-file "CacheTest.java")
11235 ;; This test doesn't have access to the temp directory
11236 (substitute* "ClassCreatorTest.java"
11237 (("java.io.tmpdir") "user.dir"))
11238 ;; This test fails in trying to detect whether it can run.
11239 (substitute* "ClassCreator.java"
11240 (("boolean canRun =.*") "boolean canRun = false;\n"))
11241 ;; ...and these tests depend on it.
11242 (delete-file "scripting/JexlScriptEngineOptionalTest.java")
11243 (delete-file "scripting/JexlScriptEngineTest.java"))
11244 #t))
11245 (add-before 'build 'run-javacc
11246 (lambda _
11247 (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/"
11248 (invoke "java" "jjtree" "Parser.jjt")
11249 (invoke "java" "javacc" "Parser.jj"))
11250 #t)))))
11251 (inputs
11252 (list java-commons-logging-minimal))
11253 (native-inputs
11254 (list java-junit java-hamcrest-core javacc-4))
11255 (home-page "https://commons.apache.org/proper/commons-jexl/")
11256 (synopsis "Java Expression Language")
11257 (description "JEXL is a library intended to facilitate the implementation
11258of dynamic and scripting features in applications and frameworks written in
11259Java. JEXL implements an Expression Language based on some extensions to the
11260JSTL Expression Language supporting most of the constructs seen in
11261shell-script or ECMAScript. Its goal is to expose scripting features usable
11262by technical operatives or consultants working with enterprise platforms.")
11263 (license license:asl2.0)))
11264
11265(define-public java-lz4
11266 (package
11267 (name "java-lz4")
11268 (version "1.4.0")
11269 (source (origin
11270 (method git-fetch)
11271 (uri (git-reference
11272 (url "https://github.com/lz4/lz4-java")
11273 (commit version)))
11274 (file-name (git-file-name name version))
11275 (sha256
11276 (base32
11277 "0ydjakhv3cz34mfvv14qrh2ksdxifgjwwagjy7r46qr3f68hnf6y"))))
11278 (build-system ant-build-system)
11279 (arguments
11280 `(#:jar-name "lz4.jar"
11281 #:jdk ,icedtea-8
11282 #:source-dir "src/java:src/java-unsafe"
11283 #:tests? #f; FIXME: requires more dependencies
11284 #:phases
11285 (modify-phases %standard-phases
11286 (add-after 'unpack 'make-files-writable
11287 (lambda _
11288 (for-each make-file-writable (find-files "."))
11289 #t))
11290 (add-before 'configure 'generate-source
11291 (lambda _
11292 (with-directory-excursion "src/build/source_templates"
11293 (invoke "mvel2" "../gen_sources.mvel" "../../java"))
11294 #t)))))
11295 (native-inputs
11296 `(("mvel" ,java-mvel2)))
11297 (home-page "https://jpountz.github.io/lz4-java")
11298 (synopsis "Compression algorithm")
11299 (description "LZ4 - Java is a Java port of the popular lz4 compression
11300algorithms and xxHash hashing algorithm.")
11301 (license license:asl2.0)))
11302
11303(define-public java-bouncycastle
11304 (package
11305 (name "java-bouncycastle")
11306 (version "1.67")
11307 (source (origin
11308 (method git-fetch)
11309 (uri (git-reference
11310 (url "http://git.bouncycastle.org/repositories/bc-java")
11311 ;(url "https://github.com/bcgit/bc-java")
11312 (commit (string-append "r1rv" (substring version 2 4)))))
11313 (file-name (git-file-name name version))
11314 (sha256
11315 (base32
11316 "1449q7fyh03s1q0bqljcrhgacwcyqmg2bbvb3z084avgapwsainz"))
11317 (modules '((guix build utils)))
11318 (snippet
11319 '(begin
11320 (for-each delete-file
11321 (find-files "." "\\.jar$"))
11322 #t))))
11323 (build-system ant-build-system)
11324 (arguments
11325 `(#:jdk ,icedtea-8
11326 #:tests? #f
11327 #:phases
11328 (modify-phases %standard-phases
11329 (replace 'build
11330 (lambda _
11331 (invoke "ant" "-f" "ant/jdk15+.xml" "build-provider")
11332 (invoke "ant" "-f" "ant/jdk15+.xml" "build")))
11333 ;; FIXME: the tests freeze.
11334 ;; (replace 'check
11335 ;; (lambda _
11336 ;; (invoke "ant" "-f" "ant/jdk15+.xml" "test")))
11337 (replace 'install
11338 (install-jars "build/artifacts/jdk1.5/jars")))))
11339 (inputs
11340 (list java-javax-mail))
11341 (native-inputs
11342 `(("unzip" ,unzip)
11343 ("junit" ,java-junit)
11344 ("java-native-access" ,java-native-access)
11345 ("java-native-access-platform" ,java-native-access-platform)))
11346 (home-page "https://www.bouncycastle.org")
11347 (synopsis "Cryptographic library")
11348 (description "Bouncy Castle is a cryptographic library for the Java
11349programming language.")
11350 (license license:expat)))
11351
11352(define-public java-lmax-disruptor
11353 (package
11354 (name "java-lmax-disruptor")
11355 (version "3.4.4")
11356 (source (origin
11357 (method git-fetch)
11358 (uri (git-reference
11359 (url "https://github.com/LMAX-Exchange/disruptor")
11360 (commit version)))
11361 (file-name (git-file-name name version))
11362 (sha256
11363 (base32
11364 "02c5kp3n8a73dq9ay7ar53s1k3x61z9yzc5ikqb03m6snr1wpfqn"))))
11365 (build-system ant-build-system)
11366 (arguments
11367 `(#:jar-name "java-lmax-disruptor.jar"
11368 #:jdk ,icedtea-8
11369 #:tests? #f)); tests hang
11370 (inputs
11371 `(("junit" ,java-junit)
11372 ("java-hdrhistogram" ,java-hdrhistogram)
11373 ("java-jmock" ,java-jmock)
11374 ("java-jmock-legacy" ,java-jmock-legacy)
11375 ("java-jmock-junit4" ,java-jmock-junit4)
11376 ("java-hamcrest-all" ,java-hamcrest-all)))
11377 (native-inputs
11378 `(("cglib" ,java-cglib)
11379 ("objenesis" ,java-objenesis)))
11380 (home-page "https://www.lmax.com/disruptor")
11381 (synopsis "High performance inter-thread communication")
11382 (description "LMAX Disruptor is a software pattern and software component
11383for high performance inter-thread communication that avoids the need for
11384message queues or resource locking.")
11385 (license license:asl2.0)))
11386
11387(define-public java-conversant-disruptor
11388 (package
11389 (name "java-conversant-disruptor")
11390 (version "1.2.19")
11391 (source (origin
11392 (method git-fetch)
11393 (uri (git-reference
11394 (url "https://github.com/conversant/disruptor")
11395 (commit version)))
11396 (file-name (git-file-name name version))
11397 (sha256
11398 (base32
11399 "0gx1dm7sfg7pa05cs4qby10gfcplai5b5lf1f7ik1a76dh3vhl0g"))))
11400 (build-system ant-build-system)
11401 (arguments
11402 `(#:jar-name "java-conversant-disruptor.jar"
11403 #:source-dir "src/main/java"
11404 #:phases
11405 (modify-phases %standard-phases
11406 (add-before 'build 'copy-resources
11407 (lambda _
11408 (copy-recursively "src/main/resources" "build/classes")))
11409 (add-before 'build 'remove-module
11410 (lambda _
11411 (delete-file "src/main/java/module-info.java"))))))
11412 (native-inputs
11413 (list java-junit))
11414 (home-page "https://github.com/conversant/disruptor")
11415 (synopsis "High performance intra-thread communication")
11416 (description "Conversant Disruptor is the highest performing intra-thread
11417transfer mechanism available in Java. Conversant Disruptor is an implementation
11418of this type of ring buffer that has almost no overhead and that exploits a
11419particularly simple design.")
11420 (license license:asl2.0)))
11421
11422(define-public java-jctools-core-1
11423 (package
11424 (name "java-jctools-core")
11425 (version "1.2.1")
11426 (source (origin
11427 (method git-fetch)
11428 (uri (git-reference
11429 (url "https://github.com/JCTools/JCTools")
11430 (commit (string-append "v" version))))
11431 (file-name (git-file-name name version))
11432 (sha256
11433 (base32
11434 "105my29nwd4djvdllmq8s3jdzbyplbkxzwmddxiiilb4yqr1pghb"))))
11435 (build-system ant-build-system)
11436 (arguments
11437 `(#:jar-name "java-jctools-core.jar"
11438 #:source-dir "jctools-core/src/main/java"
11439 #:test-dir "jctools-core/src/test"
11440 ;; The tests timeout on some architectures.
11441 #:tests? ,(not (or (target-aarch64?)
11442 (%current-target-system)))))
11443 (native-inputs
11444 (list java-junit java-hamcrest-all))
11445 (home-page "https://github.com/JCTools/JCTools")
11446 (synopsis "Concurrency tools for Java")
11447 (description "This library implements concurrent data structures that are
11448not natively available in Java.")
11449 (license license:asl2.0)))
11450
11451(define-public java-commons-bcel
11452 (package
11453 (name "java-commons-bcel")
11454 (version "6.1")
11455 (source (origin
11456 (method url-fetch)
11457 (uri (string-append "mirror://apache/commons/bcel/source/bcel-"
11458 version "-src.tar.gz"))
11459 (sha256
11460 (base32
11461 "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy"))))
11462 (build-system ant-build-system)
11463 (arguments
11464 `(#:jar-name "bcel.jar"
11465 #:jdk ,icedtea-8
11466 #:source-dir "src/main/java"
11467 #:test-dir "src/test/java"
11468 ;; FIXME: Tests require the unpackaged jna.
11469 #:tests? #f))
11470 (home-page "https://commons.apache.org/proper/commons-bcel/")
11471 (synopsis "Byte code engineering library")
11472 (description "The Byte Code Engineering Library (Apache Commons BCEL) is
11473intended to give users a convenient way to analyze, create, and
11474manipulate (binary) Java class files. Classes are represented by objects
11475which contain all the symbolic information of the given class: methods, fields
11476and byte code instructions, in particular.
11477
11478Such objects can be read from an existing file, be transformed by a
11479program (e.g. a class loader at run-time) and written to a file again. An
11480even more interesting application is the creation of classes from scratch at
11481run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful
11482if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format
11483of Java @code{.class} files.")
11484 (license license:asl2.0)))
11485
11486(define-public java-xerial-core
11487 (package
11488 (name "java-xerial-core")
11489 (version "2.1")
11490 (source (origin
11491 (method url-fetch)
11492 (uri (string-append "https://github.com/xerial/xerial-java/archive/"
11493 version ".tar.gz"))
11494 (file-name (string-append name "-" version ".tar.gz"))
11495 (sha256
11496 (base32
11497 "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d"))))
11498 (build-system ant-build-system)
11499 (arguments
11500 `(#:jar-name "xerial-core.jar"
11501 #:source-dir "xerial-core/src/main/java"
11502 #:test-dir "xerial-core/src/test"
11503 #:phases
11504 (modify-phases %standard-phases
11505 (add-before 'build 'copy-resources
11506 (lambda _
11507 (copy-recursively "xerial-core/src/main/resources"
11508 "build/classes")
11509 #t)))))
11510 (native-inputs
11511 `(("junit" ,java-junit)
11512 ("hamcrest" ,java-hamcrest-core)))
11513 (home-page "https://github.com/xerial/xerial-java")
11514 (synopsis "Data management libraries for Java")
11515 (description "Xerial is a set of data management libraries for the Java
11516programming language. The ultimate goal of the Xerial project is to manage
11517everything as database, including class objects, text format data, data
11518streams, etc.")
11519 (license license:asl2.0)))
11520
11521(define-public java-byte-buddy-dep
11522 (package
11523 (name "java-byte-buddy-dep")
11524 (version "1.14.0")
11525 (source (origin
11526 (method git-fetch)
11527 (uri (git-reference
11528 (url "https://github.com/raphw/byte-buddy")
11529 (commit (string-append "byte-buddy-" version))))
11530 (file-name (git-file-name name version))
11531 (sha256
11532 (base32
11533 "03jmsnkjb9d3z9brqs8fc512hhs5b5iab3a5wbax9zi03dskgvh2"))))
11534 (build-system ant-build-system)
11535 (arguments
11536 `(#:jar-name "byte-buddy-dep.jar"
11537 #:source-dir "byte-buddy-dep/src/main/java"
11538 #:test-dir "byte-buddy-dep/src/test"
11539 #:tests? #f; would build java files that are incompatible with current jdk
11540 #:phases
11541 (modify-phases %standard-phases
11542 (add-before 'build 'remove-annotations
11543 (lambda _
11544 (with-directory-excursion "byte-buddy-dep/src/main/java/net/bytebuddy"
11545 (substitute* (find-files "." ".*.java")
11546 (("@EqualsAndHashCode.*") "")
11547 (("import lombok.EqualsAndHashCode;") "")
11548 (("@SuppressFBWarnings.*") "")
11549 (("import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;") ""))
11550 (substitute* '("description/type/TypeDescription.java"
11551 "dynamic/loading/ClassInjector.java")
11552 (("^ *value = .*") "")
11553 (("^ *justification = .*") ""))))))))
11554 (inputs
11555 (list java-asm-9 java-asm-commons-9 java-jsr305 java-native-access))
11556 (home-page "http://bytebuddy.net/")
11557 (synopsis "Runtime code generation for the Java virtual machine")
11558 (description "Byte Buddy is a code generation and manipulation library for
11559creating and modifying Java classes during the runtime of a Java application
11560and without the help of a compiler.")
11561 (license license:asl2.0)))
11562
11563(define-public java-powermock-reflect
11564 (package
11565 (name "java-powermock-reflect")
11566 (version "2.0.9")
11567 (source (origin
11568 (method git-fetch)
11569 (uri (git-reference
11570 (url "https://github.com/powermock/powermock")
11571 (commit (string-append "powermock-" version))))
11572 (file-name (git-file-name name version))
11573 (sha256
11574 (base32
11575 "03y8szi9iwxnv431z2mn2ivc1ak30vcvfvkyrwmfq7wq93bj2c5v"))
11576 (patches
11577 (search-patches "java-powermock-fix-java-files.patch"))))
11578 (build-system ant-build-system)
11579 (arguments
11580 `(#:jar-name "java-powermock-reflect.jar"
11581 #:source-dir "powermock-reflect/src/main/java"
11582 #:test-dir "powermock-reflect/src/test"))
11583 (inputs
11584 (list java-asm-9 java-objenesis))
11585 (native-inputs
11586 (list java-assertj java-cglib java-hamcrest-core java-junit))
11587 (home-page "https://github.com/powermock/powermock")
11588 (synopsis "Mock library extension framework")
11589 (description "PowerMock is a framework that extends other mock libraries
11590such as EasyMock with more powerful capabilities. PowerMock uses a custom
11591classloader and bytecode manipulation to enable mocking of static methods,
11592constructors, final classes and methods, private methods, removal of static
11593initializers and more. By using a custom classloader no changes need to be
11594done to the IDE or continuous integration servers which simplifies adoption.")
11595 (license license:asl2.0)))
11596
11597(define-public java-powermock-core
11598 (package
11599 (inherit java-powermock-reflect)
11600 (name "java-powermock-core")
11601 (arguments
11602 `(#:jar-name "java-powermock-core.jar"
11603 #:source-dir "powermock-core/src/main/java"
11604 #:test-dir "powermock-core/src/test"
11605 #:tests? #f; requires powermock-api
11606 #:jdk ,icedtea-8
11607 #:phases
11608 (modify-phases %standard-phases
11609 (add-before 'build 'copy-resources
11610 (lambda _
11611 (copy-recursively "powermock-core/src/main/resources"
11612 "build/classes")
11613 #t)))))
11614 (inputs
11615 (list java-asm-9
11616 java-byte-buddy-dep
11617 java-jboss-javassist
11618 java-powermock-reflect))
11619 (native-inputs
11620 (list java-assertj java-mockito-1 java-junit))))
11621
11622(define-public java-powermock-api-support
11623 (package
11624 (inherit java-powermock-reflect)
11625 (name "java-powermock-api-support")
11626 (build-system ant-build-system)
11627 (arguments
11628 `(#:jar-name "java-powermock-api-support.jar"
11629 #:jdk ,icedtea-8
11630 #:source-dir "powermock-api/powermock-api-support/src/main/java"
11631 #:tests? #f)); no tests
11632 (inputs
11633 (list java-powermock-core java-powermock-reflect))))
11634
11635(define-public java-powermock-modules-junit4-common
11636 (package
11637 (inherit java-powermock-reflect)
11638 (name "java-powermock-modules-junit4-common")
11639 (build-system ant-build-system)
11640 (arguments
11641 `(#:jar-name "java-powermock-modules-junit4-common.jar"
11642 #:jdk ,icedtea-8
11643 #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java"
11644 #:test-dir "powermock-modules/powermock-module-junit4-common/src/test"))
11645 (inputs
11646 (list java-cglib
11647 java-easymock
11648 java-hamcrest-core
11649 java-powermock-core
11650 java-powermock-reflect))))
11651
11652(define-public java-powermock-modules-junit4
11653 (package
11654 (inherit java-powermock-reflect)
11655 (name "java-powermock-modules-junit4")
11656 (build-system ant-build-system)
11657 (arguments
11658 `(#:jar-name "java-powermock-modules-junit4.jar"
11659 #:tests? #f; require easymock 4, which introduces a loop with testng
11660 #:source-dir "powermock-modules/powermock-module-junit4/src/main/java"
11661 #:test-dir "powermock-modules/powermock-module-junit4/src/test"
11662 #:phases
11663 (modify-phases %standard-phases
11664 (add-before 'build 'fix-junit-detection
11665 (lambda _
11666 ;; Our junit version is 4.12-SNAPSHOT
11667 (substitute* (find-files "powermock-modules/powermock-module-junit4"
11668 "PowerMockJUnit4MethodValidator.java")
11669 (("4.12") "4.12-SNAPSHOT"))
11670 #t)))))
11671 (inputs
11672 (list java-cglib
11673 java-powermock-core
11674 java-powermock-reflect
11675 java-powermock-modules-junit4-common))
11676 (native-inputs
11677 (list java-easymock
11678 java-hamcrest-core
11679 java-junit
11680 java-objenesis))))
11681
11682(define-public java-powermock-api-easymock
11683 (package
11684 (inherit java-powermock-reflect)
11685 (name "java-powermock-api-easymock")
11686 (build-system ant-build-system)
11687 (arguments
11688 `(#:jar-name "java-powermock-api-easymock.jar"
11689 #:jdk ,icedtea-8
11690 #:source-dir "powermock-api/powermock-api-easymock/src/main/java"
11691 #:tests? #f; no tests
11692 #:phases
11693 (modify-phases %standard-phases
11694 (add-before 'build 'fix-file
11695 (lambda _
11696 ;; FIXME: This looks wrong, but it fixes a build error.
11697 (with-directory-excursion "powermock-api/powermock-api-easymock"
11698 (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java"
11699 (("classLoader instanceof MockClassLoader") "false")
11700 (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";")))
11701 #t)))))
11702 (inputs
11703 (list java-cglib
11704 java-easymock
11705 java-powermock-api-support
11706 java-powermock-core
11707 java-powermock-reflect))))
11708
11709(define-public java-jboss-jms-api-spec
11710 (package
11711 (name "java-jboss-jms-api-spec")
11712 (version "2.0")
11713 (source (origin
11714 (method url-fetch)
11715 (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/"
11716 "archive/jboss-jms-api_" version
11717 "_spec-1.0.1.Final.tar.gz"))
11718 (sha256
11719 (base32
11720 "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m"))))
11721 (build-system ant-build-system)
11722 (arguments
11723 `(#:jar-name "java-jboss-jms-api_spec.jar"
11724 #:jdk ,icedtea-8
11725 #:source-dir "."
11726 #:tests? #f)); no tests
11727 (home-page "https://github.com/jboss/jboss-jms-api_spec")
11728 (synopsis "Java Message Service API specification")
11729 (description "Java Message Service (JMS) API is used to send messages
11730messages between two or more clients. It is a messaging standard that allows
11731application components to create, send, receive, and read messages.")
11732 ; either gpl2 only with GPL Classpath Exception, or cddl.
11733 (license (list license:gpl2 license:cddl1.0))))
11734
11735(define-public java-mail
11736 (package
11737 (name "java-mail")
11738 (version "1.6.0")
11739 (source (origin
11740 (method url-fetch)
11741 (uri (string-append "https://github.com/javaee/javamail/archive/"
11742 "JAVAMAIL-1_6_0.tar.gz"))
11743 (sha256
11744 (base32
11745 "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92"))))
11746 (build-system ant-build-system)
11747 (arguments
11748 `(#:jar-name "java-mail.jar"
11749 #:jdk ,icedtea-8
11750 #:source-dir "mail/src/main/java"
11751 #:test-dir "mail/src/test"
11752 #:test-exclude
11753 (list "**/CollectorFormatterTest.java"
11754 "**/CompactFormatterTest.java"
11755 "**/DurationFilterTest.java"
11756 "**/MailHandlerTest.java"
11757 "**/GetLocalAddressTest.java"
11758 ;; SSLHandshakeException: No appropriate protocol
11759 "**/WriteTimeoutSocketTest.java"
11760 ;; FIXME: both end with:
11761 ;; java.lang.ClassNotFoundException:
11762 ;; javax.mail.internet.MimeMultipartParseTest
11763 "**/MimeMultipartParseTest.java"
11764 "**/SearchTermSerializationTest.java")
11765 #:phases
11766 (modify-phases %standard-phases
11767 (add-before 'configure 'move-version.java
11768 (lambda _
11769 (copy-file "mail/src/main/resources/javax/mail/Version.java"
11770 "mail/src/main/java/javax/mail/Version.java")))
11771 (add-before 'build 'copy-resources
11772 (lambda _
11773 (copy-recursively "mail/src/main/resources/META-INF"
11774 "build/classes/META-INF"))))))
11775 (native-inputs
11776 (list java-junit java-hamcrest-core))
11777 (home-page "https://javaee.github.io/javamail/")
11778 (synopsis "Mail-related functionality in Java")
11779 (description "The JavaMail API provides a platform-independent and
11780protocol-independent framework to build mail and messaging applications.")
11781 ;; General Public License Version 2 only ("GPL") or the Common Development
11782 ;; and Distribution License("CDDL")
11783 (license (list license:cddl1.1
11784 license:gpl2)))); with classpath exception
11785
11786(define-public java-mapdb
11787 (package
11788 (name "java-mapdb")
11789 (version "1.0.9")
11790 (source (origin
11791 (method git-fetch)
11792 (uri (git-reference
11793 (url "https://github.com/jankotek/mapdb")
11794 (commit (string-append "mapdb-" version))))
11795 (file-name (git-file-name name version))
11796 (sha256
11797 (base32
11798 "1slb4h282jqvk16896lcvgm65pj3v6crcp2wvjdvad7nx7d2f1kv"))))
11799 (build-system ant-build-system)
11800 (arguments
11801 (list #:jar-name "mapdb.jar"
11802 #:source-dir "src/main/java"
11803 #:test-dir "src/test"
11804 #:test-exclude (list "**/ClosedThrowsExceptionTest.java"
11805 "**/ConcurrentMapInterfaceTest.java"
11806 "**/EngineTest.java"
11807 "**/Issue664Test.java"
11808 "**/MapInterfaceTest.java")
11809 #:phases #~(modify-phases %standard-phases
11810 (replace 'install (install-from-pom "pom.xml")))))
11811 (native-inputs (list java-junit))
11812 (home-page "https://mapdb.org/")
11813 (synopsis "Concurrent data structures")
11814 (description "MapDB provides concurrent maps, sets and queues backed by
11815disk storage or off-heap memory.")
11816 (license license:bsd-3)))
11817
11818(define-public java-jeromq
11819 (package
11820 (name "java-jeromq")
11821 (version "0.4.3")
11822 (source (origin
11823 (method git-fetch)
11824 (uri (git-reference
11825 (url "https://github.com/zeromq/jeromq")
11826 (commit (string-append "v" version))))
11827 (file-name (string-append name "-" version "-checkout"))
11828 (sha256
11829 (base32
11830 "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj"))
11831 (patches (search-patches "java-jeromq-fix-tests.patch"))))
11832 (build-system ant-build-system)
11833 (arguments
11834 `(#:jar-name "java-jeromq.jar"
11835 #:source-dir "src/main/java"
11836 #:jdk ,icedtea-8
11837 #:test-exclude
11838 (list
11839 "**/Abstract*.java"
11840 ;; Requires network
11841 "**/ZBeaconTest.java"
11842 ;; Failures
11843 "**/DealerSpecTest.java"
11844 "**/CustomDecoderTest.java"
11845 "**/CustomEncoderTest.java"
11846 "**/ConnectRidTest.java"
11847 "**/ReqSpecTest.java"
11848 "**/PushPullSpecTest.java"
11849 "**/PubSubHwmTest.java"
11850 "**/RouterSpecTest.java"
11851 "**/ProxyTest.java")))
11852 (inputs
11853 (list java-jnacl))
11854 (native-inputs
11855 `(("java-hamcrest-core" ,java-hamcrest-core)
11856 ("junit" ,java-junit)))
11857 (home-page "https://zeromq.org/bindings:java")
11858 (synopsis "Java binding for 0MQ")
11859 (description "Jeromq provides the java bindings for 0MQ.")
11860 (license license:mpl2.0)))
11861
11862(define-public java-kafka-clients
11863 (package
11864 (name "java-kafka-clients")
11865 (version "1.1.1")
11866 (source (origin
11867 (method url-fetch)
11868 (uri (string-append "mirror://apache/kafka/" version "/kafka-"
11869 version "-src.tgz"))
11870 (sha256
11871 (base32
11872 "1jn62q7z383nwhzv4ippsddf98sa1gnkszjjncj4ii3r8rzgw566"))))
11873 (build-system ant-build-system)
11874 (arguments
11875 `(#:jar-name "java-kafka-clients.jar"
11876 #:jdk ,icedtea-8
11877 #:source-dir "clients/src/main/java"
11878 #:test-dir "clients/src/test"
11879 #:test-exclude
11880 (list
11881 ;; This file does not contain a class
11882 "**/IntegrationTest.java"
11883 ;; Requires network
11884 "**/ClientUtilsTest.java"
11885 ;; This test fails on i686
11886 "**/SerializationTest.java"
11887 ;; "protocol is disabled or cipher suites are inappropriate"
11888 "**/SslTransportLayerTest.java"
11889 ;; End with errors that seem related to our powermock
11890 "**/KafkaProducerTest.java"
11891 "**/BufferPoolTest.java"
11892 ;; Undeterministic failure, seems to affect mostly ci
11893 "**/GarbageCollectedMemoryPoolTest.java")))
11894 (inputs
11895 (list java-slf4j-api java-lz4))
11896 (native-inputs
11897 (list java-bouncycastle
11898 java-cglib
11899 java-easymock
11900 java-hamcrest-all
11901 java-jboss-javassist
11902 java-junit
11903 java-objenesis
11904 java-powermock-api-easymock
11905 java-powermock-api-support
11906 java-powermock-core
11907 java-powermock-modules-junit4
11908 java-powermock-modules-junit4-common
11909 java-snappy))
11910 (home-page "https://kafka.apache.org")
11911 (synopsis "Distributed streaming platform")
11912 (description "Kafka is a distributed streaming platform, which means:
11913@itemize
11914@item it can publish and subscribe to streams of records;
11915@item it can store streams of records in a fault-tolerant way;
11916@item it can process streams of records as they occur.
11917@end itemize")
11918 ;; Either cddl or gpl2 only.
11919 (license (list license:cddl1.1; actually cddl1.1
11920 license:gpl2)))); with classpath exception
11921
11922(define-public java-jdom
11923 (package
11924 (name "java-jdom")
11925 (version "1.1.3")
11926 (source (origin
11927 (method url-fetch)
11928 (uri (string-append "http://jdom.org/dist/binary/archive/jdom-"
11929 version ".tar.gz"))
11930 (sha256
11931 (base32
11932 "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl"))))
11933 (build-system ant-build-system)
11934 (arguments
11935 `(#:build-target "package"
11936 #:tests? #f; tests are run as part of the build process
11937 #:phases
11938 (modify-phases %standard-phases
11939 (replace 'install
11940 (install-jars "build")))))
11941 (home-page "http://jdom.org/")
11942 (synopsis "Access, manipulate, and output XML data")
11943 (description "Java-based solution for accessing, manipulating, and
11944outputting XML data from Java code.")
11945 (license license:bsd-4)))
11946
11947(define-public java-geronimo-xbean-reflect
11948 (package
11949 (name "java-geronimo-xbean-reflect")
11950 (version "4.5")
11951 (source (origin
11952 (method svn-fetch)
11953 (uri (svn-reference
11954 (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/")
11955 (revision 1807396)))
11956 (file-name (string-append name "-" version))
11957 (sha256
11958 (base32
11959 "0zjqmsad4xk0iar23hdyvx19nxczybd2bh0i35xrafli5cmh720k"))))
11960 (build-system ant-build-system)
11961 (arguments
11962 `(#:jar-name "geronimo-xbean-reflect.jar"
11963 #:source-dir "xbean-reflect/src/main/java"
11964 #:test-dir "xbean-reflect/src/test"
11965 #:jdk ,icedtea-8
11966 #:test-exclude
11967 (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java"
11968 "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java"
11969 "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java")
11970 #:phases
11971 (modify-phases %standard-phases
11972 (add-before 'build 'fix-source
11973 (lambda _
11974 (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/"))
11975 ;; org.apache.xbean.asm6 is actually repackaged java-asm
11976 (substitute* (string-append dir "XbeanAsmParameterNameLoader.java")
11977 (("org.apache.xbean.asm5") "org.objectweb.asm"))
11978 #t)))
11979 (replace 'install (install-from-pom "xbean-reflect/pom.xml")))))
11980 (inputs
11981 `(("asm" ,java-asm)
11982 ("log4j" ,java-log4j-api)
11983 ("log4j-1.2" ,java-log4j-1.2-api)
11984 ("log4j-core" ,java-log4j-core)
11985 ("logging" ,java-commons-logging-minimal)))
11986 (propagated-inputs
11987 (list java-geronimo-parent-pom))
11988 (native-inputs
11989 `(("junit" ,java-junit)))
11990 (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/")
11991 (synopsis "Dependency injection helper")
11992 (description "Xbean-reflect provides very flexible ways to create objects
11993and graphs of objects for dependency injection frameworks")
11994 (license license:asl2.0)))
11995
11996(define java-geronimo-genesis-2.1
11997 (package
11998 (name "java-geronimo-genesis")
11999 (version "2.1")
12000 (source (origin
12001 (method svn-fetch)
12002 (uri (svn-reference
12003 (url (string-append "https://svn.apache.org/repos/asf/"
12004 "geronimo/genesis/tags/genesis-"
12005 version))
12006 (revision 1807396)))
12007 (file-name (string-append name "-" version "-source"))
12008 (sha256
12009 (base32
12010 "1mky4zyl2xsqlgrkairaj5971byvhwk2z9bq8snsgvlr11ydc0zf"))))
12011 (build-system ant-build-system)
12012 (arguments
12013 `(#:tests? #f
12014 #:phases
12015 (modify-phases %standard-phases
12016 (delete 'configure)
12017 (delete 'build)
12018 (replace 'install
12019 (install-pom-file "pom.xml"))
12020 (add-after 'install 'install-enforcer-rules
12021 (install-pom-file "genesis-enforcer-rules/pom.xml"))
12022 (add-after 'install 'install-flava
12023 (install-pom-file "genesis-default-flava/pom.xml"))
12024 (add-after 'install 'install-packaging
12025 (install-pom-file "genesis-packaging/pom.xml"))
12026 (add-after 'install-flava 'install-flava-java4
12027 (install-pom-file "genesis-default-flava/genesis-java1.4-flava/pom.xml"))
12028 (add-after 'install-flava 'install-flava-java5
12029 (install-pom-file "genesis-default-flava/genesis-java5-flava/pom.xml"))
12030 (add-after 'install-flava 'install-flava-java6
12031 (install-pom-file "genesis-default-flava/genesis-java6-flava/pom.xml")))))
12032 (propagated-inputs
12033 `(("apache-parent-pom" ,apache-parent-pom-13)))
12034 (home-page "https://geronimo.apache.org")
12035 (synopsis "Collection of maven POM files for the Geronimo project")
12036 (description "Apache Geronimo is a server runtime. This package contains
12037only pom files used by other components in the Geronimo project.")
12038 (license license:asl2.0)))
12039
12040(define java-geronimo-parent-pom
12041 (package
12042 (inherit java-geronimo-xbean-reflect)
12043 (name "java-geronimo-parent-pom")
12044 (arguments
12045 `(#:tests? #f
12046 #:phases
12047 (modify-phases %standard-phases
12048 (delete 'configure)
12049 (delete 'build)
12050 (replace 'install
12051 (install-pom-file "pom.xml")))))
12052 (propagated-inputs
12053 `(("java-geronimo-genesis" ,java-geronimo-genesis-2.1)))))
12054
12055(define-public java-geronimo-xbean-bundleutils
12056 (package
12057 (inherit java-geronimo-xbean-reflect)
12058 (name "java-geronimo-xbean-bundleutils")
12059 (arguments
12060 `(#:jar-name "geronimo-xbean-bundleutils.jar"
12061 #:source-dir "xbean-bundleutils/src/main/java"
12062 #:test-dir "xbean-bundleutils/src/test"
12063 #:phases
12064 (modify-phases %standard-phases
12065 (add-before 'build 'fix-java
12066 (lambda _
12067 ;; We use a more recent version of osgi, so this file requires
12068 ;; more interface method implementations.
12069 (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java"
12070 (("import org.osgi.framework.ServiceRegistration;")
12071 "import org.osgi.framework.ServiceRegistration;
12072import org.osgi.framework.ServiceFactory;
12073import java.util.Collection;
12074import org.osgi.framework.ServiceObjects;")
12075 (("public Bundle getBundle\\(\\)")
12076 "@Override
12077public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) {
12078 throw new UnsupportedOperationException();
12079}
12080@Override
12081public <S> ServiceRegistration<S> registerService(Class<S> clazz,
12082 ServiceFactory<S> factory, Dictionary<String, ?> properties) {
12083 throw new UnsupportedOperationException();
12084}
12085public Bundle getBundle()"))
12086 #t)))))
12087 (inputs
12088 `(("java-slf4j" ,java-slf4j-api)
12089 ("java-asm" ,java-asm)
12090 ("java-osgi-framework" ,java-osgi-framework)
12091 ("java-eclipse-osgi" ,java-eclipse-osgi)
12092 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)))))
12093
12094(define-public java-geronimo-xbean-asm-util
12095 (package
12096 (inherit java-geronimo-xbean-reflect)
12097 (name "java-geronimo-xbean-asm-util")
12098 (arguments
12099 `(#:jar-name "geronimo-xbean-asm-util.jar"
12100 #:source-dir "xbean-asm-util/src/main/java"
12101 #:tests? #f)); no tests
12102 (inputs
12103 (list java-asm))
12104 (native-inputs '())))
12105
12106(define-public java-geronimo-xbean-finder
12107 (package
12108 (inherit java-geronimo-xbean-reflect)
12109 (name "java-geronimo-xbean-finder")
12110 (arguments
12111 `(#:jar-name "geronimo-xbean-finder.jar"
12112 #:source-dir "xbean-finder/src/main/java"
12113 #:test-dir "xbean-finder/src/test"))
12114 (inputs
12115 (list java-slf4j-api
12116 java-asm
12117 java-geronimo-xbean-bundleutils
12118 java-geronimo-xbean-asm-util
12119 java-osgi-service-packageadmin
12120 java-osgi-framework))
12121 (native-inputs
12122 (list java-junit java-hamcrest-core))))
12123
12124(define-public java-gson
12125 (package
12126 (name "java-gson")
12127 (version "2.8.2")
12128 (source (origin
12129 (method url-fetch)
12130 (uri (string-append "https://github.com/google/gson/archive/"
12131 "gson-parent-" version ".tar.gz"))
12132 (sha256
12133 (base32
12134 "1j4qnp7v046q0k48c4kyf69sxaasx2h949d3cqwsm3kzxms3x0f9"))))
12135 (build-system ant-build-system)
12136 (arguments
12137 `(#:jar-name "gson.jar"
12138 #:source-dir "gson/src/main/java"
12139 #:test-dir "gson/src/test"))
12140 (native-inputs
12141 (list java-junit java-hamcrest-core))
12142 (home-page "https://github.com/google/gson")
12143 (synopsis "Java serialization/deserialization library from/to JSON")
12144 (description "Gson is a Java library that can be used to convert Java
12145Objects into their JSON representation. It can also be used to convert a JSON
12146string to an equivalent Java object. Gson can work with arbitrary Java objects
12147including pre-existing objects that you do not have source-code of.")
12148 (license license:asl2.0)))
12149
12150;; This requires a different Java version than 2.8.2 above
12151(define-public java-gson-2.8.6
12152 (package
12153 (inherit java-gson)
12154 (name "java-gson")
12155 (version "2.8.6")
12156 (source (origin
12157 (method git-fetch)
12158 (uri (git-reference
12159 (url "https://github.com/google/gson")
12160 (commit (string-append "gson-parent-" version))))
12161 (file-name (git-file-name name version))
12162 (sha256
12163 (base32
12164 "0kk5p3vichdb0ph1lzknrcpbklgnmq455mngmjpxvvj29p3rgpk3"))))
12165 (arguments
12166 `(#:jar-name "gson.jar"
12167 #:jdk ,openjdk11
12168 #:source-dir "gson/src/main/java"
12169 #:test-dir "gson/src/test"
12170 #:phases
12171 (modify-phases %standard-phases
12172 ;; avoid Maven dependency
12173 (add-before 'build 'fill-template
12174 (lambda _
12175 (with-directory-excursion "gson/src/main"
12176 (copy-file "java-templates/com/google/gson/internal/GsonBuildConfig.java"
12177 "java/com/google/gson/internal/GsonBuildConfig.java")
12178 (substitute* "java/com/google/gson/internal/GsonBuildConfig.java"
12179 (("\\$\\{project.version\\}") ,version))))))))))
12180
12181(define-public java-hawtjni
12182 (package
12183 (name "java-hawtjni")
12184 (version "1.15")
12185 (source (origin
12186 (method url-fetch)
12187 (uri (string-append "https://github.com/fusesource/hawtjni/archive/"
12188 "hawtjni-project-" version ".tar.gz"))
12189 (sha256
12190 (base32
12191 "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g"))))
12192 (build-system ant-build-system)
12193 (arguments
12194 `(#:jar-name "hawtjni.jar"
12195 #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java"
12196 #:tests? #f; no tests
12197 #:phases
12198 (modify-phases %standard-phases
12199 (add-before 'build 'build-native
12200 (lambda* (#:key inputs #:allow-other-keys)
12201 (let ((include (string-append "-I" (assoc-ref inputs "jdk") "/include/linux")))
12202 (with-directory-excursion "hawtjni-generator/src/main/resources/"
12203 (invoke "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o"
12204 "-fPIC" "-O2" include)
12205 (invoke "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o"
12206 "-fPIC" "-O2" include)
12207 (invoke "gcc" "-o" "libhawtjni.so" "-shared"
12208 "hawtjni.o" "hawtjni-callback.o")))
12209 #t))
12210 (add-after 'install 'install-native
12211 (lambda* (#:key outputs #:allow-other-keys)
12212 (let* ((out (assoc-ref outputs "out"))
12213 (lib (string-append out "/lib"))
12214 (inc (string-append out "/include")))
12215 (with-directory-excursion "hawtjni-generator/src/main/resources/"
12216 (install-file "libhawtjni.so" lib)
12217 (install-file "hawtjni.h" inc)))
12218 #t))
12219 (add-before 'install 'install-parent
12220 (install-pom-file "pom.xml"))
12221 (replace 'install
12222 (install-from-pom "hawtjni-runtime/pom.xml")))))
12223 (inputs
12224 (list java-commons-cli java-asm java-geronimo-xbean-finder))
12225 (home-page "https://fusesource.github.io/hawtjni/")
12226 (synopsis "JNI code generator")
12227 (description "HawtJNI is a code generator that produces the JNI code needed
12228to implement Java native methods. It is based on the jnigen code generator
12229that is part of the SWT Tools project.")
12230 (license license:asl2.0)))
12231
12232(define-public java-jansi-native
12233 (package
12234 (name "java-jansi-native")
12235 (version "1.7")
12236 (source (origin
12237 (method url-fetch)
12238 (uri (string-append "https://github.com/fusesource/jansi-native/"
12239 "archive/jansi-native-" version ".tar.gz"))
12240 (sha256
12241 (base32
12242 "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf"))))
12243 (build-system ant-build-system)
12244 (arguments
12245 `(#:jar-name "jansi-native.jar"
12246 #:source-dir "src/main/java"
12247 #:tests? #f; no tests
12248 #:phases
12249 (modify-phases %standard-phases
12250 (add-before 'build 'build-native
12251 (lambda* (#:key inputs #:allow-other-keys)
12252 ;; there are more required files for windows in windows/
12253 (with-directory-excursion "src/main/native-package/src"
12254 (substitute* "jansi_ttyname.c"
12255 (("#include \"jansi_.*") ""))
12256 (invoke "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o"
12257 (string-append "-I" (assoc-ref inputs "java-hawtjni")
12258 "/include")
12259 (string-append "-I" (assoc-ref inputs "jdk")
12260 "/include/linux")
12261 "-fPIC" "-O2")
12262 (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o"))))
12263 (add-before 'build 'install-native
12264 (lambda _
12265 (let ((dir (string-append "build/classes/META-INF/native/"
12266 ,(match (%current-system)
12267 ((or "i686-linux" "armhf-linux")
12268 "linux32")
12269 ((or "x86_64-linux" "aarch64-linux"
12270 "mips64el-linux")
12271 "linux64")
12272 (_ "unknown-kernel")))))
12273 (install-file "src/main/native-package/src/libjansi.so" dir))
12274 #t))
12275 (add-after 'install 'install-native
12276 (lambda* (#:key outputs #:allow-other-keys)
12277 (install-file "src/main/native-package/src/jansi.h"
12278 (string-append (assoc-ref outputs "out") "/include"))
12279 #t))
12280 (add-before 'install 'fix-pom
12281 (lambda _
12282 ;; pom contains variables to complete name, but we don't support that
12283 (substitute* "pom.xml"
12284 (("\\$\\{platform\\}") "native"))
12285 #t))
12286 (replace 'install
12287 (install-from-pom "pom.xml")))))
12288 (propagated-inputs
12289 (list java-hawtjni))
12290 (home-page "https://fusesource.github.io/jansi/")
12291 (synopsis "Native library for jansi")
12292 (description "This package provides the native library for jansi, a small
12293Java library that allows you to use ANSI escape sequences to format your
12294console output.")
12295 (license license:asl2.0)))
12296
12297(define-public java-jansi
12298 (package
12299 (name "java-jansi")
12300 (version "2.4.0")
12301 (source (origin
12302 (method git-fetch)
12303 (uri (git-reference
12304 (url "https://github.com/fusesource/jansi")
12305 (commit (string-append "jansi-" version))))
12306 (file-name (git-file-name name version))
12307 (sha256
12308 (base32
12309 "1s6fva06990798b5fyxqzr30zwyj1byq5wrm54j2larcydaryggf"))
12310 (modules '((guix build utils)))
12311 (snippet
12312 ;; contains pre-compiled libraries
12313 '(delete-file-recursively
12314 "src/main/resources/org/fusesource/jansi/internal"))))
12315 (build-system ant-build-system)
12316 (arguments
12317 `(#:jar-name "jansi.jar"
12318 #:source-dir "src/main/java"
12319 #:test-dir "src/test"
12320 #:tests? #f; require junit 3
12321 #:phases
12322 (modify-phases %standard-phases
12323 (add-before 'build 'build-native
12324 (lambda* (#:key inputs #:allow-other-keys)
12325 (with-directory-excursion "src/main/native"
12326 (for-each
12327 (lambda (cfile)
12328 (let ((cfile (basename cfile))
12329 (ofile (string-append (basename cfile ".c") ".o")))
12330 (invoke ,(cc-for-target) "-c" cfile "-o" ofile
12331 (string-append "-I" (assoc-ref inputs "jdk")
12332 "/include/linux")
12333 "-fPIC" "-O2")))
12334 (find-files "." "\\.c$"))
12335 (apply invoke ,(cc-for-target) "-o" "libjansi.so" "-shared"
12336 (find-files "." "\\.o$")))))
12337 (add-before 'build 'install-native
12338 (lambda _
12339 (let ((dir (string-append "build/classes/org/fusesource/"
12340 "jansi/internal/native/"
12341 ,(match (or (%current-target-system) (%current-system))
12342 ("i686-linux" "Linux/x86")
12343 ("x86_64-linux" "Linux/x86_64")
12344 ("armhf-linux" "Linux/armv7")
12345 ("aarch64-linux" "Linux/arm64")
12346 ("mips64el-linux" "Linux/mips64")
12347 (_ "unknown-kernel")))))
12348 (install-file "src/main/native/libjansi.so" dir))))
12349 (add-before 'build 'copy-resources
12350 (lambda _
12351 (copy-recursively "src/main/resources" "build/classes")))
12352 (replace 'install
12353 (install-from-pom "pom.xml")))))
12354 (home-page "https://fusesource.github.io/jansi/")
12355 (synopsis "Portable ANSI escape sequences")
12356 (description "Jansi is a Java library that allows you to use ANSI escape
12357sequences to format your console output which works on every platform.")
12358 (license license:asl2.0)))
12359
12360(define-public java-jansi-1
12361 (package
12362 (inherit java-jansi)
12363 (version "1.16")
12364 (source (origin
12365 (method git-fetch)
12366 (uri (git-reference
12367 (url "https://github.com/fusesource/jansi")
12368 (commit (string-append "jansi-project-" version))))
12369 (file-name (git-file-name "jansi" version))
12370 (sha256
12371 (base32
12372 "0ikk0x352gh30b42qn1jd89xwsjj0mavrc5kms7fss15bd8vsayx"))))
12373 (arguments
12374 `(#:jar-name "jansi.jar"
12375 #:source-dir "jansi/src/main/java"
12376 #:test-dir "jansi/src/test"
12377 #:phases
12378 (modify-phases %standard-phases
12379 (add-after 'check 'clear-term
12380 (lambda _
12381 (invoke "echo" "-e" "\\e[0m")))
12382 (add-before 'install 'install-parent
12383 (install-pom-file "pom.xml"))
12384 (add-before 'install 'fix-pom
12385 (lambda _
12386 ;; pom adds jansi native versions for different platforms, but we
12387 ;; only need one, so use native instead
12388 (substitute* "jansi/pom.xml"
12389 (("windows32") "native")
12390 (("windows64") "native")
12391 (("osx") "native")
12392 (("linux32") "native")
12393 (("linux64") "native")
12394 (("freebsd32") "native")
12395 (("freebsd64") "native"))
12396 #t))
12397 (replace 'install
12398 (install-from-pom "jansi/pom.xml")))))
12399 (propagated-inputs
12400 (list java-jansi-native))
12401 (native-inputs
12402 (list java-junit java-hamcrest-core))))
12403
12404(define-public java-jboss-el-api-spec
12405 (package
12406 (name "java-jboss-el-api-spec")
12407 (version "3.0")
12408 (source (origin
12409 (method url-fetch)
12410 (uri (string-append "https://github.com/jboss/jboss-el-api_spec/"
12411 "archive/jboss-el-api_" version
12412 "_spec-1.0.7.Final.tar.gz"))
12413 (sha256
12414 (base32
12415 "1j45ljxalwlibxl7g7iv952sjxkw275m8vyxxij8l6wdd5pf0pdh"))))
12416 (build-system ant-build-system)
12417 (arguments
12418 `(#:jar-name "java-jboss-el-api_spec.jar"
12419 #:phases
12420 (modify-phases %standard-phases
12421 ;; the origin of javax.el:javax.el-api is unknown, so we use this package
12422 ;; instead, which implements the same thing. We override the pom file
12423 ;; to "rename" the package so it can be found by maven.
12424 (add-before 'install 'override-pom
12425 (generate-pom.xml "pom.xml" "javax.el" "javax.el-api" "3.0"
12426 #:name "el-api"))
12427 (replace 'install
12428 (install-from-pom "pom.xml")))))
12429 (inputs
12430 (list java-junit))
12431 (home-page "https://github.com/jboss/jboss-el-api_spec")
12432 (synopsis "JSR-341 expression language 3.0 API")
12433 (description "This package contains an implementation of the JSR-341
12434specification for the expression language 3.0. It implements an expression
12435language inspired by ECMAScript and XPath. This language is used with
12436JavaServer Pages (JSP).")
12437 ;; Either GPL2 only or CDDL.
12438 (license (list license:gpl2 license:cddl1.1))))
12439
12440(define-public java-jboss-interceptors-api-spec
12441 (package
12442 (name "java-jboss-interceptors-api-spec")
12443 (version "1.2")
12444 (source (origin
12445 (method url-fetch)
12446 (uri (string-append "https://github.com/jboss/jboss-interceptors-api_spec/"
12447 "archive/jboss-interceptors-api_" version
12448 "_spec-1.0.0.Final.tar.gz"))
12449 (sha256
12450 (base32
12451 "0wv8x0jp9a5qxlrgkhb5jdk2gr6vi87b4j4kjb8ryxiy9gn8g51z"))))
12452 (build-system ant-build-system)
12453 (arguments
12454 `(#:jar-name "java-jboss-interceptors-api_spec.jar"
12455 #:jdk ,icedtea-8
12456 #:source-dir "."
12457 #:tests? #f; no tests
12458 #:phases
12459 (modify-phases %standard-phases
12460 ;; the origin of javax.interceptor:javax.interceptor-api is unknown,
12461 ;; so we use this package instead, which implements the same thing.
12462 ;; We override the pom file to "rename" the package so it can be found
12463 ;; by maven.
12464 (add-before 'install 'override-pom
12465 (generate-pom.xml "pom.xml" "javax.interceptor" "javax.interceptor-api"
12466 "3.0" #:name "interceptor-api"))
12467 (replace 'install
12468 (install-from-pom "pom.xml")))))
12469 (home-page "https://github.com/jboss/jboss-interceptors-api_spec")
12470 (synopsis "Interceptors 1.2 API classes from JSR 318")
12471 (description "Java-jboss-interceptors-api-spec implements the Interceptors
12472API. Interceptors are used to interpose on business method invocations and
12473specific events.")
12474 ;; Either GPL2 only or CDDL.
12475 (license (list license:gpl2 license:cddl1.1))))
12476
12477(define-public java-cdi-api
12478 (package
12479 (name "java-cdi-api")
12480 (version "2.0")
12481 (source (origin
12482 (method url-fetch)
12483 (uri (string-append "https://github.com/cdi-spec/cdi/archive/"
12484 version ".tar.gz"))
12485 (file-name (string-append name "-" version ".tar.gz"))
12486 (sha256
12487 (base32
12488 "1iv8b8bp07c5kmqic14jsr868vycjv4qv02lf3pkgp9z21mnfg5y"))))
12489 (build-system ant-build-system)
12490 (arguments
12491 `(#:source-dir "api/src/main/java"
12492 #:jar-name "java-cdi-api.jar"
12493 #:test-dir "api/src/test"
12494 #:jdk ,icedtea-8
12495 #:tests? #f; Tests fail because we don't have a CDI provider yet
12496 #:phases
12497 (modify-phases %standard-phases
12498 (replace 'install
12499 (install-from-pom "api/pom.xml")))))
12500 (propagated-inputs
12501 (list java-javax-inject java-jboss-el-api-spec
12502 java-jboss-interceptors-api-spec java-weld-parent-pom))
12503 (native-inputs
12504 (list java-testng java-hamcrest-core))
12505 (home-page "https://cdi-spec.org/")
12506 (synopsis "Contexts and Dependency Injection APIs")
12507 (description "Java-cdi-api contains the required APIs for Contexts and
12508Dependency Injection (CDI).")
12509 (license license:asl2.0)))
12510
12511(define-public java-joda-convert
12512 (package
12513 (name "java-joda-convert")
12514 (version "1.9.2")
12515 (source (origin
12516 (method url-fetch)
12517 (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v"
12518 version ".tar.gz"))
12519 (file-name (string-append name "-" version ".tar.gz"))
12520 (sha256
12521 (base32
12522 "0vp346xz7dh9br4q7xazhc7hvzf76a6hf95fki9bg67q5jr0kjh7"))))
12523 (build-system ant-build-system)
12524 (arguments
12525 `(#:jar-name (string-append ,name "-" ,version ".jar")
12526 #:source-dir "src/main/java"
12527 #:test-include (list "**/Test*.java")
12528 ;; Contains only interfaces and base classes (no test)
12529 #:test-exclude (list "**/test*/**.java")))
12530 (inputs
12531 (list java-guava))
12532 (native-inputs
12533 (list java-junit java-hamcrest-core))
12534 (home-page "https://www.joda.org/joda-convert/")
12535 (synopsis "Conversion between Objects and Strings")
12536 (description "Joda-Convert provides a small set of classes to aid
12537conversion between Objects and Strings. It is not intended to tackle the
12538wider problem of Object to Object transformation.")
12539 (license license:asl2.0)))
12540
12541(define-public java-joda-time
12542 (package
12543 (name "java-joda-time")
12544 (version "2.9.9")
12545 (source (origin
12546 (method url-fetch)
12547 (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v"
12548 version ".tar.gz"))
12549 (file-name (string-append name "-" version ".tar.gz"))
12550 (sha256
12551 (base32
12552 "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1"))))
12553 (build-system ant-build-system)
12554 (arguments
12555 `(#:jar-name "java-joda-time.jar"
12556 #:source-dir "src/main/java"
12557 #:test-include (list "**/Test*.java")
12558 ;; There is no runnable test in these files
12559 #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java")
12560 #:phases
12561 (modify-phases %standard-phases
12562 (add-after 'build 'build-resources
12563 (lambda _
12564 (mkdir-p "build/classes/org/joda/time/tz/data")
12565 (mkdir-p "build/classes/org/joda/time/format")
12566 ;; This will produce the following exception:
12567 ;; java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap"
12568 ;; which is normal, because it doesn't exist yet. It still generates
12569 ;; the same file as in the binary one can find on maven.
12570 (invoke "java" "-cp"
12571 (string-append "build/classes:" (getenv "CLASSPATH"))
12572 "org.joda.time.tz.ZoneInfoCompiler"
12573 "-src" "src/main/java/org/joda/time/tz/src"
12574 "-dst" "build/classes/org/joda/time/tz/data"
12575 "africa" "antarctica" "asia" "australasia"
12576 "europe" "northamerica" "southamerica"
12577 "pacificnew" "etcetera" "backward" "systemv")
12578 (for-each (lambda (f)
12579 (copy-file f (string-append
12580 "build/classes/org/joda/time/format/"
12581 (basename f))))
12582 (find-files "src/main/java/org/joda/time/format" ".*.properties"))
12583 #t))
12584 (add-before 'install 'regenerate-jar
12585 (lambda _
12586 ;; We need to regenerate the jar file to add generated data.
12587 (delete-file "build/jar/java-joda-time.jar")
12588 (invoke "ant" "jar")))
12589 (add-before 'check 'copy-test-resources
12590 (lambda _
12591 (mkdir-p "build/test-classes/org/joda/time/tz/data")
12592 (copy-file "src/test/resources/tzdata/ZoneInfoMap"
12593 "build/test-classes/org/joda/time/tz/data/ZoneInfoMap")
12594 (copy-recursively "src/test/resources" "build/test-classes")
12595 #t)))))
12596 (inputs
12597 (list java-joda-convert))
12598 (native-inputs
12599 (list java-junit java-hamcrest-core tzdata))
12600 (home-page "https://www.joda.org/joda-time/")
12601 (synopsis "Replacement for the Java date and time classes")
12602 (description "Joda-Time is a replacement for the Java date and time
12603classes prior to Java SE 8.")
12604 (license license:asl2.0)))
12605
12606(define-public java-xerces
12607 (package
12608 (name "java-xerces")
12609 (version "2.12.2")
12610 (source
12611 (origin
12612 (method url-fetch)
12613 (uri (string-append "mirror://apache/xerces/j/source/"
12614 "Xerces-J-src." version ".tar.gz"))
12615 (sha256
12616 (base32 "1s2fnfx5flmhs3q30bxdsa6vs52m6vbnqd3m4cc5r4wfr3afplbd"))
12617 (patches (search-patches
12618 "java-xerces-xjavac_taskdef.patch"
12619 "java-xerces-build_dont_unzip.patch"
12620 "java-xerces-bootclasspath.patch"))))
12621 (build-system ant-build-system)
12622 (arguments
12623 `(#:tests? #f;; Test files are not present
12624 #:test-target "test"
12625 #:jdk ,icedtea-8
12626 #:phases
12627 (modify-phases %standard-phases
12628 (add-after 'unpack 'create-build.properties
12629 (lambda* (#:key inputs #:allow-other-keys)
12630 (let ((jaxp (assoc-ref inputs "java-jaxp"))
12631 (resolver (assoc-ref inputs "java-apache-xml-commons-resolver")))
12632 (with-output-to-file "build.properties"
12633 (lambda _
12634 (format #t
12635 "jar.jaxp = ~a/share/java/jaxp.jar~@
12636 jar.apis-ext = ~a/share/java/jaxp.jar~@
12637 jar.resolver = ~a/share/java/xml-resolver.jar~%"
12638 jaxp jaxp resolver)))
12639 ;; Make xerces use our version of jaxp in tests
12640 (substitute* "build.xml"
12641 (("xml-apis.jar")
12642 (string-append jaxp "/share/java/jaxp.jar"))
12643 (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}")
12644 "${jar.apis}")))
12645 #t))
12646 (replace 'install (install-jars "build")))))
12647 (inputs
12648 (list java-apache-xml-commons-resolver java-jaxp))
12649 (home-page "https://xerces.apache.org/xerces2-j/")
12650 (synopsis "Validating XML parser for Java with DOM level 3 support")
12651 (description "The Xerces2 Java parser is the reference implementation of
12652XNI, the Xerces Native Interface, and also a fully conforming XML Schema
12653processor.
12654
12655Xerces2-J supports the following standards and APIs:
12656
12657@itemize
12658@item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation
12659@item Namespaces in XML Recommendation
12660@item Document Object Model (DOM) Level 2 Core, Events, and Traversal and
12661 Range Recommendations
12662@item Simple API for XML (SAX) 2.0.1 Core and Extension
12663@item Java APIs for XML Processing (JAXP) 1.2.01
12664@item XML Schema 1.0 Structures and Datatypes Recommendations
12665@item Experimental implementation of the Document Object Model (DOM) Level 3
12666 Core and Load/Save Working Drafts
12667@item Provides a partial implementation of the XML Inclusions (XInclude) W3C
12668 Candidate Recommendation
12669@end itemize
12670
12671Xerces is now able to parse documents written according to the XML 1.1
12672Candidate Recommendation, except that it does not yet provide an option to
12673enable normalization checking as described in section 2.13 of this
12674specification. It also handles namespaces according to the XML Namespaces 1.1
12675Candidate Recommendation, and will correctly serialize XML 1.1 documents if
12676the DOM level 3 load/save API's are in use.")
12677 (license license:asl2.0)))
12678
12679(define-public java-jakarta-regexp
12680 (package
12681 (name "java-jakarta-regexp")
12682 (version "1.5")
12683 (source
12684 (origin
12685 (method url-fetch)
12686 (uri (string-append
12687 "https://archive.apache.org/dist/jakarta/regexp/jakarta-regexp-"
12688 version ".tar.gz"))
12689 (sha256
12690 (base32
12691 "0zg9rmyif48dck0cv6ynpxv23mmcsx265am1fnnxss7brgw0ms3r"))))
12692 (build-system ant-build-system)
12693 (arguments
12694 `(#:test-target "test"
12695 #:phases
12696 (modify-phases %standard-phases
12697 (replace 'install
12698 (lambda* (#:key outputs #:allow-other-keys)
12699 (let* ((out (assoc-ref outputs "out"))
12700 (out-share (string-append out "/share/java")))
12701 (mkdir-p out-share)
12702 (for-each (lambda (name)
12703 (install-file name out-share))
12704 (find-files "build" "^jakarta-regexp-.*\\.jar$"))
12705 #t))))))
12706 (home-page "https://attic.apache.org/projects/jakarta-regexp.html")
12707 (synopsis "Regular expression parser generator for Java")
12708 (description "@code{jakarta-regexp} is an old regular expression parser
12709generator for Java.")
12710 (license license:asl2.0)))
12711
12712(define-public java-jline
12713 (package
12714 (name "java-jline")
12715 (version "1.0")
12716 (source (origin
12717 (method url-fetch)
12718 (uri (string-append "https://github.com/jline/jline1/archive/jline-"
12719 version ".tar.gz"))
12720 (sha256
12721 (base32
12722 "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir"))))
12723 (build-system ant-build-system)
12724 (arguments
12725 `(#:jar-name "jline.jar"
12726 #:source-dir "src/main/java"
12727 #:test-dir "src/test"
12728 #:phases
12729 (modify-phases %standard-phases
12730 (add-before 'build 'copy-resources
12731 (lambda _
12732 (copy-recursively "src/main/resources" "build/classes")
12733 #t)))))
12734 (native-inputs
12735 (list java-junit))
12736 (home-page "https://jline.github.io")
12737 (synopsis "Console input handling library")
12738 (description "JLine is a Java library for handling console input. It is
12739similar in functionality to BSD editline and GNU readline but with additional
12740features that bring it on par with the Z shell line editor.")
12741 (license license:bsd-3)))
12742
12743(define-public java-jline-2
12744 (package
12745 (inherit java-jline)
12746 (version "2.14.5")
12747 (source (origin
12748 (method url-fetch)
12749 (uri (string-append "https://github.com/jline/jline2/archive/jline-"
12750 version ".tar.gz"))
12751 (sha256
12752 (base32
12753 "1c6qa26mf0viw8hg4jnv72s7i1qb1gh1l8rrzcdvqhqhx82rkdlf"))))
12754 (arguments
12755 `(#:jdk ,icedtea-8
12756 ,@(package-arguments java-jline)))
12757 (inputs
12758 (list java-jansi-1 java-jansi-native))
12759 (native-inputs
12760 (list java-powermock-modules-junit4
12761 java-powermock-modules-junit4-common
12762 java-powermock-api-easymock
12763 java-powermock-api-support
12764 java-powermock-core
12765 java-powermock-reflect
12766 java-easymock
12767 java-jboss-javassist
12768 java-objenesis
12769 java-hamcrest-core
12770 java-cglib
12771 java-junit
12772 java-hawtjni))))
12773
12774(define-public java-jline-terminal
12775 (package
12776 (name "java-jline-terminal")
12777 (version "3.14.1")
12778 (source (origin
12779 (method git-fetch)
12780 (uri (git-reference
12781 (url "https://github.com/jline/jline3")
12782 (commit (string-append "jline-parent-" version))))
12783 (file-name (git-file-name name version))
12784 (sha256
12785 (base32
12786 "0ilhk9ljp0pivl1rn0bb06syshc67p6imcjhrg6vr7kv15p3w4lr"))))
12787 (build-system ant-build-system)
12788 (arguments
12789 `(#:jar-name "jline-terminal.jar"
12790 #:jdk ,openjdk11
12791 #:tests? #f; TODO: tests fail on *.caps resource lookups
12792 #:source-dir "terminal/src/main/java"
12793 #:test-dir "terminal/src/test"
12794 #:phases
12795 (modify-phases %standard-phases
12796 (add-after 'unpack 'remove-build-file
12797 (lambda _
12798 ;; Conflicts with build directory generated by ant-build-system.
12799 (delete-file "build")))
12800 (add-after 'unpack 'patch-paths
12801 (lambda* (#:key inputs #:allow-other-keys)
12802 (substitute* "terminal/src/main/java/org/jline/utils/OSUtils.java"
12803 (("= \"infocmp\"")
12804 (string-append "= \"" (assoc-ref inputs "ncurses")
12805 "/bin/infocmp\""))
12806 (("= \"(s?tty)\"" _ cmd)
12807 (string-append "= \"" (assoc-ref inputs "coreutils")
12808 "/bin/" cmd "\"")))))
12809 ;; Resources are not added to the JAR by ant-build-system.
12810 (add-after 'build 'add-resources
12811 (lambda* (#:key jar-name source-dir #:allow-other-keys)
12812 (let ((build (string-append (getcwd) "/build")))
12813 (with-directory-excursion
12814 (string-append source-dir "/../resources")
12815 (apply invoke "jar" "-uvf"
12816 (string-append build "/jar/" jar-name)
12817 (find-files ".")))))))))
12818 (inputs
12819 (list ncurses)); infocmp
12820 (home-page "https://github.com/jline/jline3")
12821 (synopsis "Java JLine Terminal API and implementations")
12822 (description "JLine is a Java library for handling console input. It is
12823similar in functionality to BSD editline and GNU readline but with additional
12824features that bring it in par with ZSH line editor. People familiar with the
12825readline/editline capabilities for modern shells (such as bash and tcsh) will
12826find most of the command editing features of JLine to be familiar.
12827
12828This package includes the @var{Terminal} API and implementations.")
12829 (license license:bsd-3)))
12830
12831(define-public java-jline-reader
12832 (package
12833 (name "java-jline-reader")
12834 (version "3.14.1")
12835 (source (origin
12836 (method git-fetch)
12837 (uri (git-reference
12838 (url "https://github.com/jline/jline3")
12839 (commit (string-append "jline-parent-" version))))
12840 (file-name (git-file-name name version))
12841 (sha256
12842 (base32
12843 "0ilhk9ljp0pivl1rn0bb06syshc67p6imcjhrg6vr7kv15p3w4lr"))))
12844 (build-system ant-build-system)
12845 (arguments
12846 `(#:jar-name "jline-reader.jar"
12847 #:jdk ,openjdk11
12848 #:source-dir "reader/src/main/java"
12849 #:test-dir "reader/src/test"
12850 #:phases
12851 (modify-phases %standard-phases
12852 (add-before 'build 'remove-build-file
12853 (lambda _
12854 ;; conflicts with build directory generated by ant-build-system
12855 (delete-file "build"))))))
12856 (native-inputs
12857 (list java-junit java-easymock))
12858 (inputs
12859 (list java-jline-terminal))
12860 (home-page "https://github.com/jline/jline3")
12861 (synopsis "Java JLine line reader")
12862 (description "JLine is a Java library for handling console input. It is
12863similar in functionality to BSD editline and GNU readline but with additional
12864features that bring it in par with ZSH line editor. People familiar with the
12865readline/editline capabilities for modern shells (such as bash and tcsh) will
12866find most of the command editing features of JLine to be familiar.
12867
12868This package includes the line reader.")
12869 (license license:bsd-3)))
12870
12871(define-public java-xmlunit
12872 (package
12873 (name "java-xmlunit")
12874 (version "2.5.1")
12875 (source (origin
12876 (method url-fetch)
12877 (uri (string-append "https://github.com/xmlunit/xmlunit/archive/v"
12878 version ".tar.gz"))
12879 (file-name (string-append name "-" version ".tar.gz"))
12880 (sha256
12881 (base32
12882 "035rivlnmwhfqj0fzviciv0bkh1h95ps1iwnh2kjcvdbk5nccm4z"))))
12883 (build-system ant-build-system)
12884 (arguments
12885 `(#:jar-name "java-xmlunit.jar"
12886 #:source-dir "xmlunit-core/src/main/java"
12887 #:test-dir "xmlunit-core/src/test"
12888 #:phases
12889 (modify-phases %standard-phases
12890 (add-before 'check 'copy-test-resources
12891 (lambda* (#:key inputs #:allow-other-keys)
12892 (copy-recursively (assoc-ref inputs "resources") "../test-resources")
12893 #t)))))
12894 (native-inputs
12895 `(("java-junit" ,java-junit)
12896 ("java-mockito-1" ,java-mockito-1)
12897 ("java-hamcrest-all" ,java-hamcrest-all)
12898 ("java-objenesis" ,java-objenesis)
12899 ("java-cglib" ,java-cglib)
12900 ("resources"
12901 ,(origin
12902 (method git-fetch)
12903 (uri (git-reference
12904 (url "https://github.com/xmlunit/test-resources")
12905 (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec")))
12906 (file-name "java-xmlunit-test-resources")
12907 (sha256
12908 (base32
12909 "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr"))))))
12910 (home-page "https://www.xmlunit.org/")
12911 (synopsis "XML output testing")
12912 (description "XMLUnit provides you with the tools to verify the XML you
12913emit is the one you want to create. It provides helpers to validate against
12914an XML Schema, assert the values of XPath queries or compare XML documents
12915against expected outcomes.")
12916 (license license:asl2.0)))
12917
12918(define-public java-xmlunit-legacy
12919 (package
12920 (inherit java-xmlunit)
12921 (name "java-xmlunit-legacy")
12922 (arguments
12923 `(#:jar-name "java-xmlunit-legacy.jar"
12924 #:source-dir "xmlunit-legacy/src/main/java"
12925 #:test-dir "xmlunit-legacy/src/test"))
12926 (inputs
12927 (list java-xmlunit java-junit))
12928 (native-inputs
12929 `(("java-mockito-1" ,java-mockito-1)))))
12930
12931(define-public java-xmlunit-matchers
12932 (package
12933 (inherit java-xmlunit)
12934 (name "java-xmlunit-matchers")
12935 (arguments
12936 `(#:jar-name "java-xmlunit-matchers.jar"
12937 #:source-dir "xmlunit-matchers/src/main/java"
12938 #:test-dir "xmlunit-matchers/src/test"
12939 #:test-exclude
12940 ;; Cannot open xsd for http://www.xmlunit.org/test-support/Book.xsd
12941 (list "**/ValidationMatcherTest.java")
12942 #:phases
12943 (modify-phases %standard-phases
12944 (add-before 'build 'copy-test-class
12945 (lambda _
12946 (copy-file "xmlunit-core/src/test/java/org/xmlunit/TestResources.java"
12947 "xmlunit-matchers/src/test/java/org/xmlunit/TestResources.java")
12948 #t))
12949 (add-before 'build 'fix-test-resources-path
12950 (lambda _
12951 (substitute* (find-files "xmlunit-matchers/src/test" ".*.java")
12952 (("../test-resources") "test-resources"))
12953 #t))
12954 (add-before 'check 'copy-test-resources
12955 (lambda* (#:key inputs #:allow-other-keys)
12956 (copy-recursively (assoc-ref inputs "resources") "test-resources")
12957 #t)))))
12958 (inputs
12959 (list java-xmlunit java-junit))))
12960
12961(define-public java-openchart2
12962 (package
12963 (name "java-openchart2")
12964 (version "1.4.3")
12965 (source (origin
12966 (method url-fetch)
12967 (uri (string-append "http://download.approximatrix.com/openchart2/"
12968 "openchart2-" version ".source.zip"))
12969 (sha256
12970 (base32
12971 "1xq96zm5r02n1blja0072jmmsifmxc40lbyfbnmcnr6mw42frh4g"))))
12972 (build-system ant-build-system)
12973 (arguments
12974 `(#:test-target "test"
12975 #:phases
12976 (modify-phases %standard-phases
12977 (add-after 'unpack 'fix-junit-errors
12978 (lambda _
12979 (with-directory-excursion "unittest/src/com/approximatrix/charting/"
12980 (substitute* '("coordsystem/ticklocator/NumericXTickLocatorTest.java"
12981 "coordsystem/ticklocator/NumericYTickLocatorTest.java"
12982 "coordsystem/ticklocator/ObjectXTickLocatorTest.java"
12983 "model/DefaultChartDataModelConstraintsTest.java"
12984 "model/MultiScatterDataModelConstraintsTest.java"
12985 "model/threedimensional/DotPlotDataModelConstraintsTest.java")
12986 (("(assertEquals[^;]+);" before _)
12987 (string-append (string-drop-right before 2) ", 1E-6);"))))
12988 #t))
12989 (replace 'install (install-jars ".")))))
12990 (native-inputs
12991 (list unzip java-junit java-hamcrest-core))
12992 (home-page "https://approximatrix.com/products/openchart2/")
12993 (synopsis "Simple plotting for Java")
12994 (description "Openchart2 provides a simple, yet powerful, interface for
12995Java programmers to create two-dimensional charts and plots. The library
12996features an assortment of graph styles, including advanced scatter plots, bar
12997graphs, and pie charts.")
12998 (license license:lgpl2.1+)))
12999
13000(define-public java-commons-httpclient
13001 (package
13002 (name "java-commons-httpclient")
13003 (version "3.1")
13004 (source (origin
13005 (method url-fetch)
13006 (uri (string-append "mirror://apache/httpcomponents/"
13007 "commons-httpclient/source/commons-httpclient-"
13008 version "-src.tar.gz"))
13009 (sha256
13010 (base32
13011 "1wlpn3cfy3d4inxy6g7wxcsa8p7sshn6aldk9y4ia3lb879rd97r"))))
13012 (build-system ant-build-system)
13013 (arguments
13014 `(#:build-target "compile"
13015 #:test-target "test"
13016 #:tests? #f; requires junit-textui (junit 3)
13017 #:phases
13018 (modify-phases %standard-phases
13019 (add-before 'build 'fix-accent
13020 (lambda _
13021 (for-each (lambda (file)
13022 (with-fluids ((%default-port-encoding "ISO-8859-1"))
13023 (substitute* file
13024 (("\\* @author Ortwin .*") "* @author Ortwin Glueck\n"))))
13025 '("src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java"
13026 "src/examples/TrivialApp.java" "src/examples/ClientApp.java"
13027 "src/test/org/apache/commons/httpclient/TestHttps.java"
13028 "src/test/org/apache/commons/httpclient/TestURIUtil2.java"))
13029 #t))
13030 (replace 'install
13031 (lambda* (#:key outputs #:allow-other-keys)
13032 (invoke "ant" "dist"
13033 (string-append "-Ddist.home=" (assoc-ref outputs "out")
13034 "/share/java"))
13035 #t)))))
13036 (propagated-inputs
13037 `(("java-commons-logging" ,java-commons-logging-minimal)
13038 ("java-commons-codec" ,java-commons-codec)))
13039 (home-page "https://hc.apache.org")
13040 (synopsis "HTTP/1.1 compliant HTTP agent implementation")
13041 (description "This package contains an HTTP/1.1 compliant HTTP agent
13042implementation. It also provides reusable components for client-side
13043authentication, HTTP state management, and HTTP connection management.")
13044 (license license:asl2.0)))
13045
13046(define-public java-commons-vfs
13047 (package
13048 (name "java-commons-vfs")
13049 (version "2.2")
13050 (source (origin
13051 (method url-fetch)
13052 (uri (string-append "mirror://apache/commons/vfs/source/"
13053 "commons-vfs2-distribution-" version "-src.tar.gz"))
13054 (file-name (string-append name "-" version ".tar.gz"))
13055 (sha256
13056 (base32
13057 "1cnq1iaghbp4cslpnvwbp83i5v234x87irssqynhwpfgw7caf1s3"))
13058 (modules '((guix build utils)))
13059 (snippet
13060 '(begin
13061 (for-each delete-file
13062 (find-files "." "\\.jar$"))
13063 #t))))
13064 (build-system ant-build-system)
13065 (arguments
13066 `(#:jar-name "commons-vfs.jar"
13067 #:source-dir "commons-vfs2/src/main/java"
13068 #:test-dir "commons-vfs2/src/test"
13069 ; FIXME: tests depend on many things: apache sshd, hadoop, ftpserver, ...
13070 #:tests? #f
13071 #:phases
13072 (modify-phases %standard-phases
13073 (add-before 'build 'remove-hadoop-and-webdav
13074 ; Remove these files as they are not required and depend on difficult
13075 ; packages.
13076 (lambda _
13077 (for-each delete-file-recursively
13078 '("commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/webdav"
13079 "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs"))
13080 #t)))))
13081 (inputs
13082 (list java-commons-collections4
13083 java-commons-compress
13084 java-commons-httpclient
13085 java-commons-logging-minimal
13086 java-commons-net
13087 java-jsch))
13088 (home-page "https://commons.apache.org/proper/commons-vfs/")
13089 (synopsis "Java file system library")
13090 (description "Commons VFS provides a single API for accessing various
13091different file systems. It presents a uniform view of the files from various
13092different sources, such as the files on local disk, on an HTTP server, or
13093inside a Zip archive.")
13094 (license license:asl2.0)))
13095
13096(define-public java-jakarta-oro
13097 (package
13098 (name "java-jakarta-oro")
13099 (version "2.0.8")
13100 (source (origin
13101 (method url-fetch)
13102 (uri (string-append "mirror://apache/jakarta/oro/"
13103 "jakarta-oro-" version ".tar.gz"))
13104 (sha256
13105 (base32
13106 "0rpmnsskiwmsy8r0sckz5n5dbvh3vkxx8hpm177c754r8xy3qksc"))
13107 (modules '((guix build utils)))
13108 (snippet
13109 `(begin
13110 (delete-file (string-append "jakarta-oro-" ,version ".jar"))
13111 #t))))
13112 (build-system ant-build-system)
13113 (arguments
13114 `(#:build-target "package"
13115 #:make-flags (list "-DDATE" "(no recorded date for reproducibility)")
13116 #:tests? #f; tests are run as part of the build process
13117 #:phases
13118 (modify-phases %standard-phases
13119 (replace 'install
13120 (install-jars ,(string-append "jakarta-oro-" version))))))
13121 (home-page "https://jakarta.apache.org/oro/")
13122 (synopsis "Text-processing for Java")
13123 (description "The Jakarta-ORO Java classes are a set of text-processing
13124Java classes that provide Perl5 compatible regular expressions, AWK-like
13125regular expressions, glob expressions, and utility classes for performing
13126substitutions, splits, filtering filenames, etc. This library is the successor
13127of the OROMatcher, AwkTools, PerlTools, and TextTools libraries originally
13128from ORO, Inc.")
13129 (license license:asl1.1)))
13130
13131(define-public java-native-access
13132 (package
13133 (name "java-native-access")
13134 (version "4.5.1")
13135 (source (origin
13136 (method url-fetch)
13137 (uri (string-append "https://github.com/java-native-access/jna/"
13138 "archive/" version ".tar.gz"))
13139 (file-name (string-append name "-" version ".tar.gz"))
13140 (sha256
13141 (base32
13142 "0zrpzkib6b905i018a9pqlzkqinphywr6y4jwv6mwp63jjqvqkd9"))
13143 (modules '((guix build utils)))
13144 (snippet
13145 `(begin
13146 (for-each delete-file (find-files "." ".*.jar"))
13147 (delete-file-recursively "native/libffi")
13148 (delete-file-recursively "dist")
13149 #t))))
13150 (build-system ant-build-system)
13151 (arguments
13152 `(#:tests? #f; FIXME: tests require reflections.jar
13153 #:test-target "test"
13154 #:make-flags (list "-Ddynlink.native=true")
13155 #:phases
13156 (modify-phases %standard-phases
13157 (add-before 'build 'fix-build.xml
13158 (lambda* (#:key inputs #:allow-other-keys)
13159 (substitute* "build.xml"
13160 ;; Since we removed the bundled ant.jar, give the correct path
13161 (("lib/ant.jar") (search-input-file inputs "/lib/ant.jar"))
13162 ;; We removed generated native libraries. We can only rebuild one
13163 ;; so don't fail if we can't find a native library for another architecture.
13164 (("zipfileset") "zipfileset erroronmissingarchive=\"false\""))
13165 ;; Copy test dependencies
13166 (copy-file (car (find-files (assoc-ref inputs "java-junit") "jar$"))
13167 "lib/junit.jar")
13168 (copy-file (car (find-files (assoc-ref inputs "java-hamcrest-core")
13169 "jar$"))
13170 "lib/hamcrest-core.jar")
13171 ;; FIXME: once reflections.jar is built, copy it to lib/test.
13172 #t))
13173 (add-before 'build 'build-native
13174 (lambda _
13175 (invoke "ant" "-Ddynlink.native=true" "native")
13176 #t))
13177 (replace 'install
13178 (install-jars "build")))))
13179 (inputs
13180 (list libffi libx11 libxt))
13181 (native-inputs
13182 (list gcc-7 java-junit java-hamcrest-core))
13183 (home-page "https://github.com/java-native-access/jna")
13184 (synopsis "Access to native shared libraries from Java")
13185 (description "JNA provides Java programs easy access to native shared
13186libraries without writing anything but Java code - no JNI or native code is
13187required. JNA allows you to call directly into native functions using natural
13188Java method invocation.")
13189 ;; Java Native Access project (JNA) is dual-licensed under 2
13190 ;; alternative Free licenses: LGPL 2.1 or later and Apache License 2.0.
13191 (license (list
13192 license:asl2.0
13193 license:lgpl2.1+))))
13194
13195(define-public java-native-access-platform
13196 (package
13197 (inherit java-native-access)
13198 (name "java-native-access-platform")
13199 (arguments
13200 `(#:test-target "test"
13201 #:tests? #f; require jna-test.jar
13202 #:phases
13203 (modify-phases %standard-phases
13204 (add-before 'build 'chdir
13205 (lambda _
13206 (chdir "contrib/platform")
13207 #t))
13208 (add-after 'chdir 'fix-ant
13209 (lambda* (#:key inputs #:allow-other-keys)
13210 (substitute* "nbproject/project.properties"
13211 (("../../build/jna.jar")
13212 (search-input-file inputs "/share/java/jna.jar"))
13213 (("../../lib/hamcrest-core-.*.jar")
13214 (car (find-files (assoc-ref inputs "java-hamcrest-core")
13215 "jar$")))
13216 (("../../lib/junit.jar")
13217 (car (find-files (assoc-ref inputs "java-junit")
13218 "jar$"))))
13219 #t))
13220 (replace 'install
13221 (install-jars "dist")))))
13222 (inputs
13223 (list java-native-access))
13224 (synopsis "Cross-platform mappings for jna")
13225 (description "java-native-access-platform has cross-platform mappings
13226and mappings for a number of commonly used platform functions, including a
13227large number of Win32 mappings as well as a set of utility classes that
13228simplify native access.")))
13229
13230(define-public java-jsch-agentproxy-core
13231 (package
13232 (name "java-jsch-agentproxy-core")
13233 (version "0.0.8")
13234 (source (origin
13235 (method url-fetch)
13236 (uri (string-append "https://github.com/ymnk/jsch-agent-proxy/archive/"
13237 version ".tar.gz"))
13238 (file-name (string-append name "-" version ".tar.gz"))
13239 (sha256
13240 (base32
13241 "02iqg6jbc1kxvfzqcg6wy9ygqxfm82bw5rf6vnswqy4y572niz4q"))))
13242 (build-system ant-build-system)
13243 (arguments
13244 `(#:jar-name "jsch-agentproxy-core.jar"
13245 #:source-dir "jsch-agent-proxy-core/src/main/java"
13246 #:tests? #f)); no tests
13247 (home-page "https://github.com/ymnk/jsch-agent-proxy")
13248 (synopsis "Core component of the proxy to ssh-agent and Pageant in Java")
13249 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
13250and Pageant included Putty. It will be easily integrated into JSch, and users
13251will be allowed to use these programs for authentication.")
13252 (license license:bsd-3)))
13253
13254(define-public java-jsch-agentproxy-sshagent
13255 (package
13256 (inherit java-jsch-agentproxy-core)
13257 (name "java-jsch-agentproxy-sshagent")
13258 (arguments
13259 `(#:jar-name "jsch-agentproxy-sshagent.jar"
13260 #:source-dir "jsch-agent-proxy-sshagent/src/main/java"
13261 #:tests? #f)); no tests
13262 (inputs
13263 (list java-jsch-agentproxy-core))
13264 (synopsis "Proxy to ssh-agent")
13265 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
13266and Pageant included in Putty. This component contains the code for a proxy to
13267ssh-agent.")))
13268
13269(define-public java-jsch-agentproxy-usocket-jna
13270 (package
13271 (inherit java-jsch-agentproxy-core)
13272 (name "java-jsch-agentproxy-usocket-jna")
13273 (arguments
13274 `(#:jar-name "jsch-agentproxy-usocket-jna.jar"
13275 #:source-dir "jsch-agent-proxy-usocket-jna/src/main/java"
13276 #:tests? #f)); no tests
13277 (inputs
13278 (list java-jsch-agentproxy-core java-native-access))
13279 (synopsis "USocketFactory implementation using JNA")
13280 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
13281and Pageant included in Putty. This component contains an implementation of
13282USocketFactory using @dfn{JNA} (Java Native Access).")))
13283
13284(define-public java-jsch-agentproxy-pageant
13285 (package
13286 (inherit java-jsch-agentproxy-core)
13287 (name "java-jsch-agentproxy-pageant")
13288 (arguments
13289 `(#:jar-name "jsch-agentproxy-pageant.jar"
13290 #:source-dir "jsch-agent-proxy-pageant/src/main/java"
13291 #:tests? #f)); no tests
13292 (inputs
13293 (list java-jsch-agentproxy-core java-native-access
13294 java-native-access-platform))
13295 (synopsis "Proxy to pageant")
13296 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
13297and Pageant included in Putty. This component contains the code for a proxy to
13298pageant.")))
13299
13300(define-public java-jsch-agentproxy-usocket-nc
13301 (package
13302 (inherit java-jsch-agentproxy-core)
13303 (name "java-jsch-agentproxy-usocket-nc")
13304 (arguments
13305 `(#:jar-name "jsch-agentproxy-usocket-nc.jar"
13306 #:source-dir "jsch-agent-proxy-usocket-nc/src/main/java"
13307 #:tests? #f)); no tests
13308 (inputs
13309 (list java-jsch-agentproxy-core))
13310 (synopsis "USocketFactory implementation using netcat")
13311 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
13312and Pageant included in Putty. This component contains an implementation of
13313USocketFactory using netcat.")))
13314
13315(define-public java-jsch-agentproxy-connector-factory
13316 (package
13317 (inherit java-jsch-agentproxy-core)
13318 (name "java-jsch-agentproxy-connector-factory")
13319 (arguments
13320 `(#:jar-name "jsch-agentproxy-connector-factory.jar"
13321 #:source-dir "jsch-agent-proxy-connector-factory/src/main/java"
13322 #:tests? #f)); no tests
13323 (inputs
13324 (list java-jsch-agentproxy-core java-jsch-agentproxy-sshagent
13325 java-jsch-agentproxy-usocket-jna java-jsch-agentproxy-pageant
13326 java-jsch-agentproxy-usocket-nc))
13327 (synopsis "Connector factory for jsch agent proxy")
13328 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
13329and Pageant included in Putty. This component contains a connector factory.")))
13330
13331(define-public java-jsch-agentproxy-jsch
13332 (package
13333 (inherit java-jsch-agentproxy-core)
13334 (name "java-jsch-agentproxy-jsch")
13335 (arguments
13336 `(#:jar-name "jsch-agentproxy-jsch.jar"
13337 #:source-dir "jsch-agent-proxy-jsch/src/main/java"
13338 #:tests? #f)); no tests
13339 (inputs
13340 (list java-jsch java-jsch-agentproxy-core))
13341 (synopsis "JSch integration library for agentproxy")
13342 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
13343and Pageant included in Putty. This component contains a library to use
13344jsch-agent-proxy with JSch.")))
13345
13346(define-public java-apache-ivy
13347 (package
13348 (name "java-apache-ivy")
13349 (version "2.4.0")
13350 (source (origin
13351 (method url-fetch)
13352 (uri (string-append "mirror://apache//ant/ivy/" version
13353 "/apache-ivy-" version "-src.tar.gz"))
13354 (sha256
13355 (base32
13356 "1xkfn57g2m7l6y0xdq75x5rnrgk52m9jx2xah70g3ggl8750hbr0"))
13357 (patches
13358 (search-patches
13359 "java-apache-ivy-port-to-latest-bouncycastle.patch"))))
13360 (build-system ant-build-system)
13361 (arguments
13362 `(#:jar-name "ivy.jar"
13363 #:tests? #f
13364 #:phases
13365 (modify-phases %standard-phases
13366 (add-before 'build 'remove-example
13367 (lambda _
13368 (delete-file-recursively "src/example")
13369 #t))
13370 (add-before 'build 'copy-resources
13371 (lambda _
13372 (with-directory-excursion "src/java"
13373 (for-each (lambda (file)
13374 (install-file file (string-append "../../build/classes/" (dirname file))))
13375 (append
13376 (find-files "." ".*.css")
13377 (find-files "." ".*.ent")
13378 (find-files "." ".*.html")
13379 (find-files "." ".*.properties")
13380 (find-files "." ".*.xsd")
13381 (find-files "." ".*.xsl")
13382 (find-files "." ".*.xml"))))
13383 #t))
13384 (add-before 'build 'fix-vfs
13385 (lambda _
13386 (substitute*
13387 '("src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java"
13388 "src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java")
13389 (("import org.apache.commons.vfs") "import org.apache.commons.vfs2"))
13390 #t))
13391 (add-before 'install 'copy-manifest
13392 (lambda _
13393 (install-file "META-INF/MANIFEST.MF" "build/classes/META-INF")
13394 #t))
13395 (add-before 'install 'repack
13396 (lambda _
13397 (invoke "jar" "-cmf" "build/classes/META-INF/MANIFEST.MF" "build/jar/ivy.jar"
13398 "-C" "build/classes" ".")))
13399 (add-after 'install 'install-bin
13400 (lambda* (#:key outputs #:allow-other-keys)
13401 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
13402 (ivy (string-append bin "/ivy"))
13403 (jar (string-append (assoc-ref outputs "out") "/share/java/ivy.jar")))
13404 (mkdir-p bin)
13405 (with-output-to-file ivy
13406 (lambda _
13407 (display (string-append
13408 "#!" (which "sh") "\n"
13409 "if [[ -z $CLASSPATH ]]; then\n"
13410 " cp=\"" (getenv "CLASSPATH") ":" jar "\"\n"
13411 "else\n"
13412 " cp=\"" (getenv "CLASSPATH") ":" jar ":$CLASSPATH\"\n"
13413 "fi\n"
13414 (which "java") " -cp $cp org.apache.ivy.Main $@\n"))))
13415 (chmod ivy #o755)
13416 #t))))))
13417 (inputs
13418 (list java-bouncycastle
13419 java-commons-cli
13420 java-commons-collections
13421 java-commons-httpclient
13422 java-commons-lang
13423 java-commons-vfs
13424 java-jakarta-oro
13425 java-jsch
13426 java-jsch-agentproxy-core
13427 java-jsch-agentproxy-connector-factory
13428 java-jsch-agentproxy-jsch
13429 java-junit))
13430 (home-page "https://ant.apache.org/ivy")
13431 (synopsis "Dependency manager for the Java programming language")
13432 (description "Ivy is a tool for managing (recording, tracking, resolving
13433and reporting) project dependencies. It is characterized by the following:
13434
13435@itemize
13436@item flexibility and configurability - Ivy is essentially process agnostic
13437 and is not tied to any methodology or structure. Instead it provides the
13438 necessary flexibility and configurability to be adapted to a broad range
13439 of dependency management and build processes.
13440@item tight integration with Apache Ant - while available as a standalone tool,
13441 Ivy works particularly well with Apache Ant providing a number of
13442 powerful Ant tasks ranging from dependency resolution to dependency
13443 reporting and publication.
13444@end itemize")
13445 (license license:asl2.0)))
13446
13447(define-public java-eclipse-sisu-inject
13448 (package
13449 (name "java-eclipse-sisu-inject")
13450 (version "0.3.5")
13451 (source (origin
13452 (method git-fetch)
13453 (uri (git-reference
13454 (url "https://github.com/eclipse/sisu.inject/")
13455 (commit (string-append "releases/" version))))
13456 (file-name (git-file-name name version))
13457 (sha256
13458 (base32
13459 "1yh434b8pi8cwmpk825fbvbnkkk2cwd4gxxjaygg8i9j0q3l9zp3"))))
13460 (build-system ant-build-system)
13461 (arguments
13462 `(#:jar-name "eclipse-sisu-inject.jar"
13463 #:source-dir "org.eclipse.sisu.inject/src"
13464 #:tests? #f; no tests
13465 #:phases
13466 (modify-phases %standard-phases
13467 (replace 'install
13468 (install-from-pom "org.eclipse.sisu.inject/pom.xml")))))
13469 (propagated-inputs
13470 (list java-guice java-sisu-inject-parent-pom))
13471 (inputs
13472 (list java-guice-servlet
13473 java-javax-inject
13474 java-javaee-servletapi
13475 java-junit
13476 java-slf4j-api
13477 java-jsr305
13478 java-jsr250
13479 java-cdi-api
13480 java-osgi-framework
13481 java-osgi-util-tracker
13482 java-testng))
13483 (home-page "https://www.eclipse.org/sisu/")
13484 (synopsis "Classpath scanning, auto-binding, and dynamic auto-wiring")
13485 (description "Sisu is a modular JSR330-based container that supports
13486classpath scanning, auto-binding, and dynamic auto-wiring. Sisu uses
13487Google-Guice to perform dependency injection and provide the core JSR330
13488support, but removes the need to write explicit bindings in Guice modules.
13489Integration with other containers via the Eclipse Extension Registry and the
13490OSGi Service Registry is a goal of this project.")
13491 (license license:epl1.0)))
13492
13493(define java-sisu-inject-parent-pom
13494 (package
13495 (inherit java-eclipse-sisu-inject)
13496 (name "java-sisu-inject-parent-pom")
13497 (arguments
13498 `(#:tests? #f
13499 #:phases
13500 (modify-phases %standard-phases
13501 (delete 'configure)
13502 (delete 'build)
13503 (replace 'install
13504 (install-pom-file "pom.xml")))))
13505 (propagated-inputs '())))
13506
13507(define-public java-eclipse-sisu-plexus
13508 (package
13509 (name "java-eclipse-sisu-plexus")
13510 (version "0.3.5")
13511 (source (origin
13512 (method git-fetch)
13513 (uri (git-reference
13514 (url "https://github.com/eclipse/sisu.plexus")
13515 (commit (string-append "releases/" version))))
13516 (file-name (git-file-name name version))
13517 (sha256
13518 (base32
13519 "0lm5h0dmh41ffcwd32qnk3a87d360am36yq7168ikkyqa8jxkx28"))
13520 (modules '((guix build utils)))
13521 (snippet
13522 '(begin
13523 (for-each delete-file (find-files "." ".*.jar"))
13524 (rename-file "org.eclipse.sisu.plexus.tests/src"
13525 "org.eclipse.sisu.plexus.tests/java")
13526 #t))))
13527 (build-system ant-build-system)
13528 (arguments
13529 `(#:jar-name "eclipse-sisu-plexus.jar"
13530 #:source-dir "org.eclipse.sisu.plexus/src"
13531 #:test-dir "org.eclipse.sisu.plexus.tests"
13532 #:test-exclude
13533 (list
13534 ;; This test fails probably because we can't generate the necessary
13535 ;; meta-inf files.
13536 "**/PlexusLoggingTest.*"
13537 ;; FIXME: This test fails because of some injection error
13538 "**/PlexusRequirementTest.*")
13539 #:jdk ,icedtea-8
13540 #:phases
13541 (modify-phases %standard-phases
13542 (add-before 'build 'copy-resources
13543 (lambda _
13544 (install-file "org.eclipse.sisu.plexus/META-INF/plexus/components.xml"
13545 "build/classes/META-INF/plexus")
13546 #t))
13547 (add-before 'check 'build-test-jar
13548 (lambda _
13549 (with-directory-excursion "org.eclipse.sisu.plexus.tests/resources/component-jar/src/main/"
13550 (mkdir "build")
13551 (with-directory-excursion "java"
13552 (apply invoke "javac" "-cp"
13553 (string-append (getenv "CLASSPATH")
13554 ":../../../../../build/classes")
13555 (find-files "." ".*.java"))
13556 (for-each (lambda (file) (install-file file (string-append "../build/" file)))
13557 (find-files "." ".*.jar")))
13558 (mkdir-p "build/META-INF/plexus")
13559 (copy-file "resources/META-INF/plexus/components.xml"
13560 "build/META-INF/plexus/components.xml")
13561 (with-directory-excursion "build"
13562 (invoke "jar" "cf" "../../../component-jar-0.1.jar" ".")))
13563 (with-directory-excursion "org.eclipse.sisu.plexus.tests/"
13564 (copy-recursively "META-INF" "../build/test-classes/META-INF")
13565 (substitute* "java/org/eclipse/sisu/plexus/DefaultPlexusContainerTest.java"
13566 (("resources/component-jar")
13567 "org.eclipse.sisu.plexus.tests/resources/component-jar")))
13568 #t))
13569 (replace 'install
13570 (install-from-pom "org.eclipse.sisu.plexus/pom.xml")))))
13571 (propagated-inputs
13572 (list java-jsr250
13573 java-plexus-classworlds
13574 java-plexus-utils
13575 java-plexus-component-annotations
13576 java-cdi-api
13577 java-eclipse-sisu-inject
13578 java-sisu-plexus-parent-pom))
13579 (inputs
13580 (list java-osgi-framework
13581 java-slf4j-api
13582 java-javax-inject
13583 java-guice
13584 java-guava
13585 java-aopalliance
13586 java-cglib))
13587 (native-inputs
13588 (list java-junit))
13589 (home-page "https://www.eclipse.org/sisu/")
13590 (synopsis "Plexus support for the sisu container")
13591 (description "Sisu is a modular JSR330-based container that supports
13592classpath scanning, auto-binding, and dynamic auto-wiring. This package
13593adds Plexus support to the Sisu-Inject container.")
13594 (license license:epl1.0)))
13595
13596(define java-sisu-plexus-parent-pom
13597 (package
13598 (inherit java-eclipse-sisu-plexus)
13599 (name "java-sisu-plexus-parent-pom")
13600 (arguments
13601 `(#:tests? #f
13602 #:phases
13603 (modify-phases %standard-phases
13604 (delete 'configure)
13605 (delete 'build)
13606 (replace 'install
13607 (install-pom-file "pom.xml")))))
13608 (propagated-inputs
13609 `(("java-sonatype-oss-parent-pom-9" ,java-sonatype-oss-parent-pom-9)))))
13610
13611(define-public java-commons-compiler
13612 (package
13613 (name "java-commons-compiler")
13614 (version "3.0.8")
13615 (source (origin
13616 (method git-fetch)
13617 (uri (git-reference
13618 (url "https://github.com/janino-compiler/janino")
13619 (commit "91aa95686d1e4ca3b16a984a03a38686572331b2")))
13620 (file-name (string-append name "-" version))
13621 (sha256
13622 (base32
13623 "04hfdl59sgh20qkxzgnibvs8f9hy6n7znxwpk611y5d89977y62r"))
13624 (modules '((guix build utils)))
13625 (snippet
13626 '(begin
13627 (for-each delete-file
13628 (find-files "." "\\.jar$"))
13629 #t))))
13630 (build-system ant-build-system)
13631 (arguments
13632 `(#:jar-name "commons-compiler.jar"
13633 #:source-dir "commons-compiler/src/main"
13634 #:tests? #f)); no tests
13635 (home-page "https://github.com/janino-compiler/janino")
13636 (synopsis "Java compiler")
13637 (description "Commons-compiler contains an API for janino, including the
13638@code{IExpressionEvaluator}, @code{IScriptEvaluator}, @code{IClassBodyEvaluator}
13639and @code{ISimpleCompiler} interfaces.")
13640 (license license:bsd-3)))
13641
13642(define-public java-janino
13643 (package
13644 (inherit java-commons-compiler)
13645 (name "java-janino")
13646 (arguments
13647 `(#:jar-name "janino.jar"
13648 #:source-dir "src/main/java"
13649 #:phases
13650 (modify-phases %standard-phases
13651 (add-before 'configure 'chdir
13652 (lambda _
13653 (chdir "janino")
13654 #t)))))
13655 (inputs
13656 (list java-commons-compiler))
13657 (native-inputs
13658 (list java-junit java-hamcrest-core))
13659 (description "Janino is a Java compiler. Janino can compile a set of
13660source files to a set of class files like @code{javac}, but also compile a
13661Java expression, block, class body or source file in memory, load the bytecode
13662and execute it directly in the same JVM. @code{janino} can also be used for
13663static code analysis or code manipulation.")))
13664
13665(define-public java-logback-core
13666 (package
13667 (name "java-logback-core")
13668 (version "1.2.3")
13669 (source (origin
13670 (method git-fetch)
13671 (uri (git-reference
13672 (url "https://github.com/qos-ch/logback/")
13673 (commit (string-append "v_" version))))
13674 (file-name (git-file-name name version))
13675 (sha256
13676 (base32
13677 "055jbfpg3l5qw7pw2snkdag0gjkb4vcxfg9110cqqyc40k2nd17z"))
13678 (modules '((guix build utils)))
13679 (snippet
13680 '(delete-file-recursively "logback-access/lib"))))
13681 (build-system ant-build-system)
13682 (arguments
13683 `(#:jar-name "logback.jar"
13684 #:source-dir "src/main/java"
13685 #:test-dir "src/test"
13686 #:test-exclude
13687 ;; These tests fail with Unable to set MockitoNamingPolicy on cglib generator
13688 ;; which creates FastClasses
13689 (list "**/AllCoreTest.*"
13690 "**/AutoFlushingObjectWriterTest.*"
13691 "**/PackageTest.*"
13692 "**/ResilientOutputStreamTest.*"
13693 ;; And we still don't want to run abstract classes
13694 "**/Abstract*.*")
13695 #:phases
13696 (modify-phases %standard-phases
13697 (add-before 'configure 'chdir
13698 (lambda _ (chdir "logback-core"))))))
13699 (inputs
13700 (list java-javax-mail
13701 java-javaee-servletapi
13702 java-commons-compiler
13703 java-janino))
13704 (native-inputs
13705 (list java-junit
13706 java-hamcrest-core
13707 java-mockito-1
13708 java-cglib
13709 java-objenesis
13710 java-joda-time))
13711 (home-page "https://logback.qos.ch")
13712 (synopsis "Logging for java")
13713 (description "Logback is intended as a successor to the popular log4j project.
13714This module lays the groundwork for the other two modules.")
13715 ;; Either epl1.0 or lgpl2.1
13716 (license (list license:epl1.0
13717 license:lgpl2.1))))
13718
13719(define-public java-logback-classic
13720 (package
13721 (inherit java-logback-core)
13722 (name "java-logback-classic")
13723 (arguments
13724 `(#:jar-name "logback-classic.jar"
13725 #:source-dir "src/main/java"
13726 #:test-dir "src/test"
13727 #:tests? #f; tests require more packages: h2, greenmail, hsql, subethamail, slf4j, log4j, felix
13728 #:jdk ,icedtea-8
13729 #:phases
13730 (modify-phases %standard-phases
13731 (add-before 'configure 'chdir
13732 (lambda _
13733 (chdir "logback-classic")
13734 #t))
13735 (replace 'build
13736 (lambda* (#:key inputs #:allow-other-keys)
13737 (mkdir-p "build/classes")
13738 (setenv "CLASSPATH"
13739 (string-join
13740 (apply append (map (lambda (input)
13741 (find-files (assoc-ref inputs input)
13742 ".*.jar"))
13743 '("java-logback-core" "java-slf4j-api"
13744 "java-commons-compiler" "java-javaee-servletapi"
13745 "groovy")))
13746 ":"))
13747 (apply invoke "groovyc" "-d" "build/classes" "-j"
13748 (find-files "src/main/" ".*\\.(groovy|java)$"))
13749 (invoke "ant" "jar")
13750 #t)))))
13751 (inputs
13752 (modify-inputs (package-inputs java-logback-core)
13753 (prepend java-logback-core java-slf4j-api)))
13754 (native-inputs
13755 (list groovy))
13756 (description "Logback is intended as a successor to the popular log4j project.
13757This module can be assimilated to a significantly improved version of log4j.
13758Moreover, @code{logback-classic} natively implements the slf4j API so that you
13759can readily switch back and forth between logback and other logging frameworks
13760such as log4j or @code{java.util.logging} (JUL).")))
13761
13762(define-public java-jgit
13763 (package
13764 (name "java-jgit")
13765 (version "4.7.0.201704051617-r")
13766 (source (origin
13767 (method url-fetch)
13768 (uri (string-append "https://repo1.maven.org/maven2/"
13769 "org/eclipse/jgit/org.eclipse.jgit/"
13770 version "/org.eclipse.jgit-"
13771 version "-sources.jar"))
13772 (sha256
13773 (base32
13774 "13ii4jn02ynzq6i7gsyi21k2i94jpc85wf6bcm31q4cyvzv0mk4k"))))
13775 (build-system ant-build-system)
13776 (arguments
13777 `(#:tests? #f ; There are no tests to run.
13778 #:jar-name "jgit.jar"
13779 ;; JGit must be built with a JDK supporting Java 8.
13780 #:jdk ,icedtea-8
13781 ;; Target our older default JDK.
13782 #:make-flags (list "-Dtarget=1.7")
13783 #:phases
13784 (modify-phases %standard-phases
13785 ;; The jar file generated by the default build.xml does not include
13786 ;; the text properties files, so we need to add them.
13787 (add-after 'build 'add-properties
13788 (lambda* (#:key jar-name #:allow-other-keys)
13789 (with-directory-excursion "src"
13790 (apply invoke "jar" "-uf"
13791 (string-append "../build/jar/" jar-name)
13792 (find-files "." "\\.properties$")))
13793 #t)))))
13794 (inputs
13795 (list java-classpathx-servletapi java-javaewah java-jsch
13796 java-slf4j-api))
13797 (home-page "https://eclipse.org/jgit/")
13798 (synopsis "Java library implementing the Git version control system")
13799 (description "JGit is a lightweight, pure Java library implementing the
13800Git version control system, providing repository access routines, support for
13801network protocols, and core version control algorithms.")
13802 (license license:edl1.0)))
13803
13804;; For axoloti.
13805(define-public java-jgit-4.2
13806 (package (inherit java-jgit)
13807 (version "4.2.0.201601211800-r")
13808 (source (origin
13809 (method url-fetch)
13810 (uri (string-append "https://repo1.maven.org/maven2/"
13811 "org/eclipse/jgit/org.eclipse.jgit/"
13812 version "/org.eclipse.jgit-"
13813 version "-sources.jar"))
13814 (sha256
13815 (base32
13816 "15gm537iivhnzlkjym4x3wn5jqdjdragsw9pdpzqqg21nrc817mm"))))
13817 (build-system ant-build-system)
13818 (arguments
13819 (substitute-keyword-arguments (package-arguments java-jgit)
13820 ((#:phases phases)
13821 `(modify-phases ,phases
13822 (add-after 'unpack 'use-latest-javaewah-API
13823 (lambda _
13824 (substitute* "src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java"
13825 (("wordinbits") "WORD_IN_BITS"))))))))
13826 (inputs
13827 (list java-javaewah java-jsch java-slf4j-api))))
13828
13829(define-public abcl
13830 (package
13831 (name "abcl")
13832 (version "1.9.3")
13833 (source
13834 (origin
13835 (method url-fetch)
13836 (uri (string-append "https://abcl.org/releases/"
13837 version "/abcl-src-" version ".tar.gz"))
13838 (sha256
13839 (base32
13840 "1zxjpwv98bq2yd5qg08sbkajj17m7b8xmzqhw296161s7lia215v"))
13841 (patches
13842 (search-patches
13843 "abcl-fix-build-xml.patch"))))
13844 (build-system ant-build-system)
13845 (native-inputs
13846 (list java-junit))
13847 (arguments
13848 `(#:build-target "abcl.jar"
13849 #:test-target "abcl.test"
13850 #:phases
13851 (modify-phases %standard-phases
13852 (replace 'install
13853 (lambda* (#:key outputs #:allow-other-keys)
13854 (let ((share (string-append (assoc-ref outputs "out")
13855 "/share/java/"))
13856 (bin (string-append (assoc-ref outputs "out")
13857 "/bin/")))
13858 (mkdir-p share)
13859 (install-file "dist/abcl.jar" share)
13860 (install-file "dist/abcl-contrib.jar" share)
13861 (mkdir-p bin)
13862 (with-output-to-file (string-append bin "abcl")
13863 (lambda _
13864 (let ((classpath (string-append
13865 share "abcl.jar"
13866 ":"
13867 share "abcl-contrib.jar")))
13868 (display (string-append
13869 "#!" (which "bash") "\n"
13870 "if [[ -z $CLASSPATH ]]; then\n"
13871 " cp=\"" classpath "\"\n"
13872 "else\n"
13873 " cp=\"" classpath ":$CLASSPATH\"\n"
13874 "fi\n"
13875 "exec " (which "java")
13876 " -cp \"$cp\" org.armedbear.lisp.Main \"$@\"\n")))))
13877 (chmod (string-append bin "abcl") #o755)
13878 #t))))))
13879 (home-page "https://abcl.org/")
13880 (synopsis "Common Lisp Implementation on the JVM")
13881 (description
13882 "@dfn{Armed Bear Common Lisp} (ABCL) is a full implementation of the Common
13883Lisp language featuring both an interpreter and a compiler, running in the
13884JVM. It supports JSR-223 (Java scripting API): it can be a scripting engine
13885in any Java application. Additionally, it can be used to implement (parts of)
13886the application using Java to Lisp integration APIs.")
13887 (native-search-paths
13888 (list (search-path-specification
13889 (variable "XDG_DATA_DIRS")
13890 (files '("share")))))
13891 (license (list license:gpl2+
13892 ;; named-readtables is released under 3 clause BSD
13893 license:bsd-3
13894 ;; jfli is released under CPL 1.0
13895 license:cpl1.0))))
13896
13897(define-public java-jsonp-api
13898 (package
13899 (name "java-jsonp-api")
13900 (version "1.1.6")
13901 (source (origin
13902 (method git-fetch)
13903 (uri (git-reference
13904 (url "https://github.com/eclipse-ee4j/jsonp")
13905 (commit (string-append "1.1-" version "-RELEASE"))))
13906 (file-name (git-file-name name version))
13907 (sha256
13908 (base32
13909 "0zrj03hkr3jdmqlb4ipjr37cqpp2q2814qpmxi7srlwpdqs0ibgc"))))
13910 (build-system ant-build-system)
13911 (arguments
13912 `(#:jar-name "jsonp-api.jar"
13913 #:tests? #f
13914 #:source-dir "api/src/main/java"
13915 #:test-dir "api/src/test"))
13916 (home-page "https://eclipse-ee4j.github.io/jsonp/")
13917 (synopsis "JSON Processing in Java")
13918 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
13919parse, generate, transform and query) JSON messages. It produces and
13920consumes JSON text in a streaming fashion (similar to StAX API for XML)
13921and allows building a Java object model for JSON text using API classes
13922(similar to DOM API for XML).")
13923 ;; either gpl2 only with classpath exception, or epl2.0.
13924 (license (list license:gpl2
13925 license:epl2.0))))
13926
13927(define-public java-jsonp-impl
13928 (package
13929 (inherit java-jsonp-api)
13930 (name "java-jsonp-impl")
13931 (arguments
13932 `(#:jar-name "jsonp-impl.jar"
13933 #:tests? #f
13934 #:source-dir "impl/src/main/java"
13935 #:test-dir "impl/src/test"
13936 #:phases
13937 (modify-phases %standard-phases
13938 (add-before 'build 'copy-resources
13939 (lambda _
13940 (copy-recursively
13941 "impl/src/main/resources/"
13942 "build/classes")
13943 #t)))))
13944 (propagated-inputs
13945 (list java-jsonp-api))
13946 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
13947parse, generate, transform and query) JSON messages. This package contains
13948a reference implementation of that API.")))
13949
13950(define-public java-jakarta-json
13951 (package
13952 (name "java-jakarta-json")
13953 (version "2.1.3")
13954 (source (origin
13955 (method git-fetch)
13956 (uri (git-reference
13957 (url "https://github.com/jakartaee/jsonp-api")
13958 (commit (string-append version "-RELEASE"))))
13959 (file-name (git-file-name name version))
13960 (sha256
13961 (base32
13962 "1q600harqfhlf763l75j4fx7ai7ybp7ga06aiky2a2hg8mhz0s5f"))))
13963 (build-system ant-build-system)
13964 (arguments
13965 `(#:jar-name "jakarta-json.jar"
13966 #:source-dir "api/src/main/java"
13967 #:tests? #f; no tests
13968 #:jdk ,openjdk11))
13969 (home-page "https://github.com/jakartaee/jsonp-api")
13970 (synopsis "Portable API for JSON handling in Java")
13971 (description "This project contains API and Compatible Implementation of
13972Jakarta JSON Processing specification. Jakarta JSON Processing provides
13973portable APIs to parse, generate, transform, and query JSON documents.")
13974 ;; with classpath exception
13975 (license license:epl2.0)))
13976
13977(define-public java-parsson
13978 (package
13979 (name "java-parsson")
13980 (version "1.1.5")
13981 (source (origin
13982 (method git-fetch)
13983 (uri (git-reference
13984 (url "https://github.com/eclipse-ee4j/parsson")
13985 (commit version)))
13986 (file-name (git-file-name name version))
13987 (sha256
13988 (base32
13989 "06vvr6qv1ihnk212gdxg4x0sd61lgxk7wf062s7gym5k2h7fms0p"))))
13990 (build-system ant-build-system)
13991 (arguments
13992 `(#:jar-name "parsson.jar"
13993 #:source-dir "impl/src/main/java"
13994 #:test-dir "impl/src/test"
13995 #:use-java-modules? #t
13996 #:jdk ,openjdk11
13997 #:phases
13998 (modify-phases %standard-phases
13999 (add-after 'unpack 'copy-resources
14000 (lambda _
14001 (copy-recursively "impl/src/main/resources"
14002 "build/classes"))))))
14003 (inputs
14004 (list java-jakarta-json))
14005 (native-inputs
14006 (list java-junit))
14007 (home-page "https://github.com/eclipse-ee4j/parsson")
14008 (synopsis "Implementation of Jakarta JSON API")
14009 (description "Eclipse Parsson is an implementation of the Jakarta JSON
14010Processing specification.")
14011 ;; with classpath exception
14012 (license license:epl2.0)))
14013
14014(define-public java-jakarta-annotations-api
14015 (package
14016 (name "java-jakarta-annotations-api")
14017 (version "2.1.1")
14018 (source (origin
14019 (method git-fetch)
14020 (uri (git-reference
14021 (url "https://github.com/jakartaee/common-annotations-api")
14022 (commit version)))
14023 (file-name (git-file-name name version))
14024 (sha256
14025 (base32
14026 "0xq2n2pijal5p75vl9dz10i6hhdmaxw5q8j3aza717xkpxxby9p6"))))
14027 (build-system ant-build-system)
14028 (arguments
14029 `(#:jar-name "jakarta-annotations-api.jar"
14030 #:source-dir "api/src/main/java"
14031 #:tests? #f; no tests
14032 #:jdk ,openjdk11))
14033 (home-page "https://github.com/jakartaee/common-annotations-api")
14034 (synopsis "Collection of Java annotations")
14035 (description "Jakarta Annotations defines a collection of annotations
14036representing common semantic concepts that enable a declarative style of
14037programming that applies across a variety of Java technologies.")
14038 ;; with classpath exception
14039 (license (list license:epl2.0
14040 license:gpl2))))
14041
14042(define-public java-xmp
14043 (package
14044 (name "java-xmp")
14045 (version "5.1.3")
14046 (source (origin
14047 (method url-fetch)
14048 (uri (string-append "http://download.macromedia.com/pub/developer"
14049 "/xmp/sdk/XMPCoreJava-" version ".zip"))
14050 (sha256
14051 (base32
14052 "14nai2mmsg7l5ya2y5mx4w4lr1az3sk2fjz6hiy4zdrsavgvl1g7"))))
14053 (build-system ant-build-system)
14054 (arguments
14055 `(#:build-target "build"
14056 #:tests? #f; no tests
14057 #:phases
14058 (modify-phases %standard-phases
14059 (add-after 'unpack 'chdir
14060 (lambda _
14061 (chdir "XMPCore")
14062 #t))
14063 (add-before 'build 'fix-timestamp
14064 (lambda _
14065 (substitute* "build.xml"
14066 (("\\$\\{BuildDate\\}") "1970 Jan 01 00:00:00-GMT"))
14067 #t))
14068 (replace 'install
14069 (install-jars "."))
14070 (add-after 'install 'install-doc
14071 (lambda* (#:key outputs #:allow-other-keys)
14072 (copy-recursively
14073 "docs"
14074 (string-append (assoc-ref outputs "out") "/share/doc/java-xmp"))
14075 #t)))))
14076 (native-inputs
14077 (list unzip))
14078 (home-page "https://www.adobe.com/devnet/xmp.html")
14079 (synopsis "Extensible Metadat Platform (XMP) support in Java")
14080 (description "Adobe's Extensible Metadata Platform (XMP) is a labeling
14081technology that allows you to embed data about a file, known as metadata,
14082into the file itself. The XMP Toolkit for Java is based on the C++ XMPCore
14083library and the API is similar.")
14084 (license license:bsd-3)))
14085
14086(define-public java-args4j
14087 (package
14088 (name "java-args4j")
14089 (version "2.33")
14090 (source (origin
14091 (method git-fetch)
14092 (uri (git-reference
14093 (url "https://github.com/kohsuke/args4j")
14094 (commit (string-append "args4j-site-" version))))
14095 (file-name (git-file-name name version))
14096 (sha256
14097 (base32
14098 "0w061fg65qrsm1a0lz0vyprsyidj31krjb459qi2lw0y78xza26s"))))
14099 (build-system ant-build-system)
14100 (arguments
14101 `(#:jar-name "args4j.jar"
14102 #:source-dir "args4j/src"
14103 #:test-dir "args4j/test"
14104 #:test-exclude
14105 (list "**/ExampleTest.*"
14106 "**/ExternalConfiguredTest.*" ; fails to find a file
14107 ;; We still don't want to run abstract classes
14108 "**/Abstract*.*")
14109 #:phases
14110 (modify-phases %standard-phases
14111 (add-before 'check 'fix-test-dir
14112 (lambda _
14113 (substitute* "build.xml"
14114 (("/java\">") "\">"))
14115 #t))
14116 (add-before 'build 'copy-resources
14117 (lambda _
14118 (let ((from-prefix "args4j/src/org/kohsuke/args4j/")
14119 (to-prefix "build/classes/org/kohsuke/args4j/"))
14120 (for-each (lambda (f)
14121 (install-file
14122 (string-append from-prefix f)
14123 (string-append to-prefix (dirname f))))
14124 (list "Messages.properties"
14125 "Messages_de.properties"
14126 "Messages_en.properties"
14127 "Messages_ru.properties"
14128 "spi/Messages.properties"
14129 "spi/Messages_de.properties"
14130 "spi/Messages_en.properties"
14131 "spi/Messages_ru.properties")))
14132 #t)))))
14133 (native-inputs
14134 (list java-junit))
14135 (home-page "https://args4j.kohsuke.org/")
14136 (synopsis "Command line parser library")
14137 (description "Args4j is a small Java class library that makes it easy to
14138parse command line options/arguments in your CUI application.")
14139 (license license:expat)))
14140
14141(define-public java-argparse4j
14142 (package
14143 (name "java-argparse4j")
14144 (version "0.9.0")
14145 (source (origin
14146 (method git-fetch)
14147 (uri (git-reference
14148 (url "https://github.com/argparse4j/argparse4j")
14149 (commit (string-append "argparse4j-" version))))
14150 (file-name (git-file-name name version))
14151 (sha256
14152 (base32
14153 "1i0j3zs1ln48n0g8a90vqbv6528mcswhzys6252yp0c8w1ai64fb"))))
14154 (build-system ant-build-system)
14155 (arguments
14156 (list #:jar-name "java-argparse4j.jar"
14157 #:source-dir "main/src/main/"
14158 #:test-dir "main/src/test/"
14159 #:jdk openjdk11
14160 #:phases #~(modify-phases %standard-phases
14161 (add-after 'unpack 'copy-resources
14162 (lambda _
14163 (copy-recursively "main/src/test/resources"
14164 "target/test-classes")
14165 (copy-recursively "main/src/main/resources"
14166 "build/classes")))
14167 (replace 'install
14168 (install-from-pom "pom.xml")))))
14169 (inputs (list java-junit))
14170 (home-page "https://argparse4j.github.io/")
14171 (synopsis "Java command-line argument parser library")
14172 (description "Argparse4j is a command line argument parser library for
14173Java based on Python's @code{argparse} module.")
14174 (license license:expat)))
14175
14176(define-public java-metadata-extractor
14177 (package
14178 (name "java-metadata-extractor")
14179 (version "2.11.0")
14180 (source (origin
14181 (method git-fetch)
14182 (uri (git-reference
14183 (url "https://github.com/drewnoakes/metadata-extractor")
14184 (commit version)))
14185 (file-name (git-file-name name version))
14186 (sha256
14187 (base32
14188 "06yrq0swrl1r40yjbk5kqzjxr04jlkq9lfi711jvfgjf5kp2qinj"))))
14189 (build-system ant-build-system)
14190 (arguments
14191 `(#:jar-name "metadata-extractor.jar"
14192 #:source-dir "Source"
14193 #:test-dir "Tests"
14194 #:phases
14195 (modify-phases %standard-phases
14196 (add-before 'check 'fix-test-dir
14197 (lambda _
14198 (substitute* "build.xml"
14199 (("/java\">") "\">"))
14200 #t)))))
14201 (propagated-inputs
14202 (list java-xmp))
14203 (native-inputs
14204 (list java-hamcrest-core java-junit))
14205 (home-page "https://github.com/drewnoakes/metadata-extractor")
14206 (synopsis "Extract metadata from image and video files")
14207 (description "Metadata-extractor is a straightforward Java library for
14208reading metadata from image files. It is able to read metadata in Exif,
14209IPTC, XMP, ICC and more formats.")
14210 (license license:asl2.0)))
14211
14212(define-public java-svg-salamander
14213 (package
14214 (name "java-svg-salamander")
14215 (version "1.1.2")
14216 (source (origin
14217 (method git-fetch)
14218 (uri (git-reference
14219 (url "https://github.com/blackears/svgSalamander")
14220 (commit (string-append "v" version))))
14221 (file-name (git-file-name name version))
14222 (sha256
14223 (base32
14224 "1zv3kjdkf6iqf02x6ln76254y634j2ji448y706a65lsbfjmmicf"))
14225 (modules '((guix build utils)))
14226 (snippet
14227 '(begin
14228 (for-each delete-file (find-files "." ".*.jar"))
14229 #t))
14230 (patches
14231 (search-patches "java-svg-salamander-Fix-non-det.patch"))))
14232 (build-system ant-build-system)
14233 (arguments
14234 `(#:tests? #f; no tests
14235 #:phases
14236 (modify-phases %standard-phases
14237 (add-after 'unpack 'chdir
14238 (lambda _
14239 (chdir "svg-core")
14240 #t))
14241 (add-before 'build 'copy-jars
14242 (lambda* (#:key inputs #:allow-other-keys)
14243 (copy-file (car (find-files (assoc-ref inputs "javacc") "\\.jar$"))
14244 "../libraries/javacc.jar")
14245 (copy-file (car (find-files (assoc-ref inputs "ant") "ant\\.jar$"))
14246 "../libraries/ant.jar")
14247 #t))
14248 (replace 'install
14249 (install-jars "dist")))))
14250 (native-inputs
14251 (list javacc))
14252 (home-page "https://github.com/blackears/svgSalamander")
14253 (synopsis "SVG engine for Java")
14254 (description "SVG Salamander is an SVG engine for Java that's designed
14255to be small, fast, and allow programmers to use it with a minimum of fuss.
14256It's in particular targeted for making it easy to integrate SVG into Java
14257games and making it much easier for artists to design 2D game content - from
14258rich interactive menus to charts and graphcs to complex animations.")
14259 (license license:bsd-2)))
14260
14261(define-public java-jboss-transaction-api-spec
14262 (package
14263 (name "java-jboss-transaction-api-spec")
14264 (version "1.2+1.1.1")
14265 (source (origin
14266 (method git-fetch)
14267 (uri (git-reference
14268 (url "https://github.com/jboss/jboss-transaction-api_spec")
14269 (commit "jboss-transaction-api_1.2_spec-1.1.1.Final")))
14270 (file-name (git-file-name name version))
14271 (sha256
14272 (base32
14273 "1xbfq5hvb86izflydxrqqv3k26c1ba2m0ap6m97shqrsdi9by4wy"))))
14274 (build-system ant-build-system)
14275 (arguments
14276 `(#:jar-name "java-jboss-transaction-api_spec.jar"
14277 #:source-dir "src/main/java"
14278 #:tests? #f)); no tests
14279 (inputs
14280 (list java-cdi-api java-jboss-interceptors-api-spec))
14281 (home-page "https://github.com/jboss/jboss-transaction-api_spec")
14282 (synopsis "Generic transaction management API in Java")
14283 (description "Java-jboss-transaction-api-spec implements the Transactions
14284API. A transaction is a unit of work containing one or more operations
14285involving one or more shared resources having ACID (Atomicity, Consistency,
14286Isolation and Durability) properties.")
14287 ;; either gpl2 only with classpath exception or cddl.
14288 (license (list license:gpl2 license:cddl1.0))))
14289
14290(define-public java-picocli
14291 (package
14292 (name "java-picocli")
14293 (version "4.3.2")
14294 (source (origin
14295 (method git-fetch)
14296 (uri (git-reference
14297 (url "https://github.com/remkop/picocli")
14298 (commit (string-append "v" version))))
14299 (file-name (git-file-name name version))
14300 (sha256
14301 (base32
14302 "1sxp6rxjfgjd98ly14b3d15dvxkm5wg4g46w12jyhmr0kmkaca3c"))))
14303 (build-system ant-build-system)
14304 (arguments
14305 `(#:jar-name "picocli.jar"
14306 #:source-dir "src/main/java"
14307 ;; Tests require missing dependencies (junitparams, system-rules)
14308 #:tests? #f))
14309 (home-page "https://picocli.info")
14310 (synopsis "REPL for the JVM")
14311 (description "Picocli is a framework for building command line applications
14312for the JVM. It supports colors, autocompletion, subcommands, and more. Written
14313in Java, usable from Groovy, Kotlin, Scala, etc.")
14314 (license license:asl2.0)))
14315
14316(define-public java-pj
14317 (package
14318 (name "java-pj")
14319 (version "20150107")
14320 (source (origin
14321 (method url-fetch)
14322 (uri (string-append "https://www.cs.rit.edu/~ark/pjsrc"
14323 version ".jar"))
14324 (sha256
14325 (base32
14326 "078xwaivl2qqjc07r0vk6kzpqlcb1bcar80p8r5qigh34hpr86d3"))
14327 (modules '((guix build utils)))
14328 (snippet
14329 '(for-each delete-file
14330 (find-files "." "\\.class$")))))
14331 (build-system ant-build-system)
14332 (arguments
14333 (list
14334 #:tests? #false ;there are none
14335 #:phases
14336 #~(modify-phases %standard-phases
14337 (add-after 'unpack 'chdir
14338 (lambda _ (chdir "src/pj")))
14339 (add-after 'chdir 'patch-source-directory
14340 (lambda _
14341 (substitute* "compile"
14342 (("SRCDIR1=/home/ark/public_html/pj/lib")
14343 (string-append "SRCDIR1=" (getcwd) "/lib")))))
14344 (replace 'build
14345 (lambda _
14346 (invoke "bash" "./compile" "linux")
14347 (with-directory-excursion "lib"
14348 (apply invoke "jar" "cf" (string-append "pj" #$version ".jar")
14349 (find-files "." "\\.class$")))))
14350 (replace 'install (install-jars ".")))))
14351 (home-page "https://www.cs.rit.edu/~ark/pj.shtml")
14352 (synopsis "Parallel programming in Java")
14353 (description "Parallel Java (PJ) is an API and middleware for parallel
14354programming in 100% Java on shared memory multiprocessor (SMP) parallel
14355computers, cluster parallel computers, and hybrid SMP cluster parallel
14356computers.")
14357 (license license:gpl3+)))
14358
14359(define-public java-jetbrains-annotations
14360 (package
14361 (name "java-jetbrains-annotations")
14362 (version "19.0.0")
14363 (source (origin
14364 (method git-fetch)
14365 (uri (git-reference
14366 (url "https://github.com/JetBrains/java-annotations")
14367 (commit version)))
14368 (file-name (git-file-name name version))
14369 (sha256
14370 (base32
14371 "0z6i1xs60cd5ffz23c49sq68wn5mphhs3xpar1n93ppama2ng80v"))))
14372 (build-system ant-build-system)
14373 (arguments
14374 `(#:jar-name "jetbrains-annotations.jar"
14375 #:source-dir "common/src/main/java:java8/src/main/java"
14376 #:tests? #f)); no tests
14377 (home-page "https://github.com/JetBrains/java-annotations")
14378 (synopsis "Annotations for Java and other JVM languages")
14379 (description "This package contains a set of Java annotations which can be
14380used in JVM-based languages. They serve as an additional documentation and
14381can be interpreted by IDEs and static analysis tools to improve code analysis.")
14382 (license license:expat)))
14383
14384(define-public java-javaparser
14385 (package
14386 (name "java-javaparser")
14387 (version "3.16.1")
14388 (source (origin
14389 (method git-fetch)
14390 (uri (git-reference
14391 (url "https://github.com/javaparser/javaparser")
14392 (commit (string-append "javaparser-parent-" version))))
14393 (file-name (git-file-name name version))
14394 (sha256
14395 (base32
14396 "1a4jk12ffa31fa0y8vda0739vpfj1206p0nha842b7bixbvwamv9"))
14397 (modules '((guix build utils)))
14398 (snippet
14399 '(begin
14400 (for-each delete-file
14401 (find-files "." "\\.jar$"))
14402 #t))))
14403 (build-system ant-build-system)
14404 (arguments
14405 `(#:tests? #f; tests require jbehave and junit5
14406 #:phases
14407 (modify-phases %standard-phases
14408 (add-before 'build 'fill-template
14409 (lambda _
14410 (with-directory-excursion "javaparser-core/src/main"
14411 (copy-file "java-templates/com/github/javaparser/JavaParserBuild.java"
14412 "java/com/github/javaparser/JavaParserBuild.java")
14413 (substitute* "java/com/github/javaparser/JavaParserBuild.java"
14414 (("\\$\\{project.version\\}") ,version)
14415 (("\\$\\{project.name\\}") "javaparser")
14416 (("\\$\\{project.build.finalName\\}") "javaparser")
14417 (("\\$\\{maven.version\\}") "fake")
14418 (("\\$\\{maven.build.version\\}") "fake")
14419 (("\\$\\{build.timestamp\\}") "0")
14420 (("\\$\\{java.vendor\\}") "Guix")
14421 (("\\$\\{java.vendor.url\\}") "https://gnu.org/software/guix")
14422 (("\\$\\{java.version\\}") "1.8")
14423 (("\\$\\{os.arch\\}") "any")
14424 (("\\$\\{os.name\\}") "Guix")
14425 (("\\$\\{os.version\\}") "not available")))
14426 #t))
14427 (add-before 'build 'generate-javacc
14428 (lambda _
14429 (with-directory-excursion "javaparser-core/src/main/java"
14430 (invoke "java" "javacc" "../javacc/java.jj"))
14431 #t))
14432 (add-before 'build 'copy-javacc-support
14433 (lambda _
14434 (with-directory-excursion "javaparser-core/src/main"
14435 (copy-recursively "javacc-support" "java"))
14436 #t))
14437 (replace 'build
14438 (lambda _
14439 (define (build name)
14440 (format #t "Building ~a~%" name)
14441 (delete-file-recursively "build/classes")
14442 (mkdir-p "build/classes")
14443 (apply invoke "javac"
14444 "-cp" (string-append (getenv "CLASSPATH") ":"
14445 (string-join (find-files "build/jar" ".")
14446 ":"))
14447 "-d" "build/classes"
14448 (find-files (string-append name "/src/main/java")
14449 ".*.java"))
14450 (invoke "jar" "-cf" (string-append "build/jar/" name ".jar")
14451 "-C" "build/classes" "."))
14452 (mkdir-p "build/classes")
14453 (mkdir-p "build/test-classes")
14454 (mkdir-p "build/jar")
14455 (build "javaparser-core")
14456 (build "javaparser-core-serialization")
14457 (build "javaparser-core-generators")
14458 (build "javaparser-core-metamodel-generator")
14459 (build "javaparser-symbol-solver-core")
14460 #t))
14461 (replace 'install
14462 (install-jars "build/jar")))))
14463 (inputs
14464 (list java-guava java-jboss-javassist java-jsonp-api))
14465 (native-inputs
14466 (list javacc))
14467 (home-page "https://javaparser.org/")
14468 (synopsis "Parser for Java")
14469 (description
14470 "This project contains a set of libraries implementing a Java 1.0 - Java
1447111 Parser with advanced analysis functionalities.")
14472 (license (list
14473 ;; either lgpl or asl
14474 license:lgpl3+
14475 license:asl2.0))))
14476
14477(define-public tla2tools
14478 ;; This package was originally based on the "v1.8.0" tag, but that merely
14479 ;; points to the moving master branch. That might be because the ‘latest
14480 ;; release’ at GitHub is currently 1.7.1. We'll see! For now, rather than
14481 ;; downgrade to 1.7.1 proper, use the commit that we originally dubbed 1.8.0.
14482 (let* ((release "1.7.1")
14483 (revision "0")
14484 (commit "6932e19083fc6df42473464857fc1280cb5aaecc"))
14485 (package
14486 (name "tla2tools")
14487 (version (git-version release revision commit))
14488 (source (origin
14489 (method git-fetch)
14490 (uri (git-reference
14491 (url "https://github.com/tlaplus/tlaplus")
14492 (commit commit)))
14493 (file-name (git-file-name name version))
14494 (sha256
14495 (base32
14496 "1hhx8gmn81k8qrkx4p7ppinmygxga9fqffd626wkvhjgg2ky8lhs"))
14497 (patches
14498 (search-patches "tla2tools-build-xml.patch"))
14499 (modules '((guix build utils)))
14500 (snippet
14501 '(begin
14502 ;; Remove packaged libraries (see 'replace-libs below)
14503 (for-each delete-file (find-files "." ".*.jar$"))))))
14504 (build-system ant-build-system)
14505 (arguments
14506 (let* ((tlatools "tlatools/org.lamport.tlatools/")
14507 (build-xml (string-append tlatools "customBuild.xml")))
14508 `(#:jdk ,openjdk11
14509 #:modules ((guix build ant-build-system)
14510 (guix build utils)
14511 (ice-9 match)
14512 (srfi srfi-26))
14513 #:make-flags '("-f" ,build-xml)
14514 #:phases
14515 (modify-phases %standard-phases
14516 ;; Replace packed libs with references to jars in store
14517 (add-after 'unpack 'replace-libs
14518 (lambda* (#:key inputs #:allow-other-keys)
14519 (define (input-jar input)
14520 (car (find-files (assoc-ref inputs input) "\\.jar$")))
14521 (for-each
14522 (match-lambda
14523 ((file . input)
14524 (symlink (input-jar input)
14525 (string-append ,tlatools "/lib/" file))))
14526 '(("gson/gson-2.8.6.jar" . "java-gson")
14527 ("javax.mail/mailapi-1.6.3.jar" . "java-javax-mail")
14528 ("jline/jline-terminal-3.14.1.jar" . "java-jline-terminal")
14529 ("jline/jline-reader-3.14.1.jar" . "java-jline-reader")
14530 ("lsp/org.eclipse.lsp4j.debug-0.10.0.jar" .
14531 "java-eclipse-lsp4j-debug")
14532 ("lsp/org.eclipse.lsp4j.jsonrpc-0.10.0.jar" .
14533 "java-eclipse-lsp4j-jsonrpc")
14534 ("lsp/org.eclipse.lsp4j.jsonrpc.debug-0.10.0.jar" .
14535 "java-eclipse-lsp4j-jsonrpc-debug")
14536 ("junit-4.12.jar" . "java-junit")
14537 ("easymock-3.3.1.jar" . "java-easymock")))
14538 ;; Retain a tiny subset of the original X-Git-*
14539 ;; manifest values just to aid in debugging.
14540 (substitute* ,build-xml
14541 (("\\$\\{git.tag\\}") (string-append "v" ,release)))))
14542 (add-before 'check 'prepare-tests
14543 (lambda _
14544 ;; The pcal tests write to .cfg files.
14545 (for-each (cut chmod <> #o644)
14546 (find-files (string-append ,tlatools
14547 "/test-model/pcal")
14548 "\\.cfg$"))))
14549 (replace 'install
14550 (lambda* (#:key inputs outputs #:allow-other-keys)
14551 (let* ((share (string-append (assoc-ref outputs "out") "/share/java"))
14552 (jar-name "tla2tools.jar"); set in project.properties
14553 (jar (string-append ,tlatools
14554 "/dist/" jar-name))
14555 (java-cp (string-append share "/" jar-name))
14556 (bin (string-append (assoc-ref outputs "out") "/bin"))
14557 (java (search-input-file inputs "/bin/java")))
14558 (install-file jar share)
14559 (mkdir-p bin)
14560 ;; Generate wrapper scripts for bin/, which invoke common
14561 ;; commands within tla2tools.jar. Users can still invoke
14562 ;; tla2tools.jar for the rest.
14563 (for-each
14564 (match-lambda
14565 ((wrapper . class)
14566 (let ((file (string-append bin "/" wrapper)))
14567 (begin
14568 (with-output-to-file file
14569 (lambda _
14570 (display
14571 (string-append
14572 "#!/bin/sh\n"
14573 java " -XX:+UseParallelGC " " -cp " java-cp " " class " \"$@\""))))
14574 (chmod file #o755)))))
14575 ;; bin/wrapper . java-class
14576 '(("pcal" . "pcal.trans")
14577 ("tlatex" . "tla2tex.TLA")
14578 ("tla2sany" . "tla2sany.SANY")
14579 ("tlc2" . "tlc2.TLC")
14580 ("tlc2-repl" . "tlc2.REPL"))))))))))
14581 (native-inputs
14582 (list java-junit java-easymock))
14583 (inputs
14584 (list java-javax-mail
14585 java-gson-2.8.6
14586 java-jline-terminal
14587 java-jline-reader
14588 java-eclipse-lsp4j-jsonrpc
14589 java-eclipse-lsp4j-jsonrpc-debug
14590 java-eclipse-lsp4j-debug))
14591 (home-page "https://lamport.azurewebsites.net/tla/tools.html")
14592 (synopsis "TLA+ tools (analyzer, TLC, TLATeX, PlusCal translator)")
14593 (description "TLA+ is a high-level language for modeling programs and
14594systems---especially concurrent and distributed ones. It's based on the idea
14595that the best way to describe things precisely is with simple
14596mathematics. TLA+ and its tools are useful for eliminating fundamental design
14597errors, which are hard to find and expensive to correct in code.
14598
14599The following TLA+ tools are available in this distribution:
14600
14601@itemize
14602@item The Syntactic Analyzer: A parser and syntax checker for
14603 TLA+ specifications;
14604@item TLC: A model checker and simulator for a subclass of \"executable\" TLA+
14605 specifications;
14606@item TLATeX: A program for typesetting TLA+ specifications;
14607@item Beta test versions of 1-3 for the TLA+2 language; and
14608@item The PlusCal translator.
14609@end itemize")
14610 (license license:expat))))
14611
14612;;;
14613;;; Avoid adding new packages to the end of this file. To reduce the chances
14614;;; of a merge conflict, place them above by existing packages with similar
14615;;; functionality or similar names.
14616;;;