projects/guix·blob wip-postfix · refs

14061 lines · 583.7 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2023 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, 2019, 2020, 2021, 2022 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 Artyom V. Poptsov <[email protected]>
22;;;
23;;; This file is part of GNU Guix.
24;;;
25;;; GNU Guix is free software; you can redistribute it and/or modify it
26;;; under the terms of the GNU General Public License as published by
27;;; the Free Software Foundation; either version 3 of the License, or (at
28;;; your option) any later version.
29;;;
30;;; GNU Guix is distributed in the hope that it will be useful, but
31;;; WITHOUT ANY WARRANTY; without even the implied warranty of
32;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
33;;; GNU General Public License for more details.
34;;;
35;;; You should have received a copy of the GNU General Public License
36;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
37
38(define-module (gnu packages java)
39 #:use-module ((guix licenses) #:prefix license:)
40 #:use-module (guix packages)
41 #:use-module (guix download)
42 #:use-module (guix hg-download)
43 #:use-module (guix git-download)
44 #:use-module (guix svn-download)
45 #:use-module ((guix build utils) #:select (alist-replace))
46 #:use-module (guix utils)
47 #:use-module (guix gexp)
48 #:use-module (guix build-system ant)
49 #:use-module (guix build-system cmake)
50 #:use-module (guix build-system gnu)
51 #:use-module (guix build-system maven)
52 #:use-module (guix build-system python)
53 #:use-module (gnu packages)
54 #:use-module (gnu packages attr)
55 #:use-module (gnu packages autotools)
56 #:use-module (gnu packages base)
57 #:use-module (gnu packages bash)
58 #:use-module (gnu packages certs)
59 #:use-module (gnu packages cpio)
60 #:use-module (gnu packages cups)
61 #:use-module (gnu packages compression)
62 #:use-module (gnu packages elf)
63 #:use-module (gnu packages fontutils)
64 #:use-module (gnu packages gawk)
65 #:use-module (gnu packages gcc)
66 #:use-module (gnu packages gettext)
67 #:use-module (gnu packages gl)
68 #:use-module (gnu packages ghostscript) ;lcms
69 #:use-module (gnu packages gnome)
70 #:use-module (gnu packages groovy)
71 #:use-module (gnu packages gtk)
72 #:use-module (gnu packages guile)
73 #:use-module (gnu packages icu4c)
74 #:use-module (gnu packages image)
75 #:use-module (gnu packages java-bootstrap)
76 #:use-module (gnu packages java-compression)
77 #:use-module (gnu packages java-xml)
78 #:use-module (gnu packages libffi)
79 #:use-module (gnu packages linux) ;alsa
80 #:use-module (gnu packages maths)
81 #:use-module (gnu packages maven)
82 #:use-module (gnu packages maven-parent-pom)
83 #:use-module (gnu packages ncurses)
84 #:use-module (gnu packages nss)
85 #:use-module (gnu packages onc-rpc)
86 #:use-module (gnu packages web)
87 #:use-module (gnu packages wget)
88 #:use-module (gnu packages pkg-config)
89 #:use-module (gnu packages perl)
90 #:use-module (gnu packages popt)
91 #:use-module (gnu packages kerberos)
92 #:use-module (gnu packages security-token)
93 #:use-module (gnu packages xml)
94 #:use-module (gnu packages xorg)
95 #:use-module (gnu packages texinfo)
96 #:use-module ((srfi srfi-1) #:select (fold alist-delete))
97 #:use-module (srfi srfi-11)
98 #:use-module (ice-9 match))
99
100(define-public icedtea-7
101 (let* ((version "2.6.13")
102 (drop (lambda (name hash)
103 (origin
104 (method url-fetch)
105 (uri (string-append
106 "http://icedtea.classpath.org/download/drops"
107 "/icedtea7/" version "/" name ".tar.bz2"))
108 (sha256 (base32 hash))))))
109 (package
110 (name "icedtea")
111 (version version)
112 (source (origin
113 (method url-fetch)
114 (uri (string-append
115 "http://icedtea.wildebeest.org/download/source/icedtea-"
116 version ".tar.xz"))
117 (sha256
118 (base32
119 "1w331rdqx1dcx2xb0fmjmrkdc71xqn20fxsgw8by4xhiblh88khh"))
120 (modules '((guix build utils)))
121 (snippet
122 '(begin
123 (substitute* "Makefile.in"
124 ;; do not leak information about the build host
125 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
126 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
127 #t))))
128 (build-system gnu-build-system)
129 (outputs '("out" ; Java Runtime Environment
130 "jdk" ; Java Development Kit
131 "doc")) ; all documentation
132 (arguments
133 `(;; There are many test failures. Some are known to
134 ;; fail upstream, others relate to not having an X
135 ;; server running at test time, yet others are a
136 ;; complete mystery to me.
137
138 ;; hotspot: passed: 241; failed: 45; error: 2
139 ;; langtools: passed: 1,934; failed: 26
140 ;; jdk: unknown
141 #:tests? #f
142
143 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
144 ;; gremlin) doesn't support it yet, so skip this phase.
145 #:validate-runpath? #f
146
147 #:modules ((guix build utils)
148 (guix build gnu-build-system)
149 (ice-9 match)
150 (ice-9 popen)
151 (srfi srfi-19)
152 (srfi srfi-26))
153
154 #:configure-flags
155 ;; TODO: package sctp and add to inputs
156 `("--disable-system-sctp"
157 "--enable-system-pcsc"
158 "--enable-system-lcms"
159 "--enable-bootstrap"
160 "--enable-nss"
161 "--without-rhino"
162 ,(string-append "--with-parallel-jobs="
163 (number->string (parallel-job-count)))
164 "--disable-downloading"
165 "--disable-tests" ;they are run in the check phase instead
166 "--with-openjdk-src-dir=./openjdk.src"
167 ,(string-append "--with-ecj="
168 (assoc-ref %build-inputs "ecj4-javac-wrapper")
169 "/bin/javac")
170 ,(string-append "--with-jdk-home="
171 (assoc-ref %build-inputs "classpath"))
172 ,(string-append "--with-java="
173 (assoc-ref %build-inputs "jamvm")
174 "/bin/jamvm")
175 ,(string-append "--with-jar="
176 (assoc-ref %build-inputs "classpath")
177 "/bin/gjar"))
178 #:phases
179 (modify-phases %standard-phases
180 (replace 'unpack
181 (lambda* (#:key source inputs #:allow-other-keys)
182 (let ((target (string-append "icedtea-" ,version))
183 (unpack (lambda* (name #:optional dir)
184 (let ((dir (or dir
185 (string-drop-right name 5))))
186 (mkdir dir)
187 (invoke "tar" "xvf"
188 (assoc-ref inputs name)
189 "-C" dir
190 "--strip-components=1")))))
191 (mkdir target)
192 (invoke "tar" "xvf" source
193 "-C" target "--strip-components=1")
194 (chdir target)
195 (unpack "openjdk-src" "openjdk.src")
196 (with-directory-excursion "openjdk.src"
197 (for-each unpack
198 (filter (cut string-suffix? "-drop" <>)
199 (map (match-lambda
200 ((name . _) name))
201 inputs)))))))
202 (add-after 'unpack 'use-classpath
203 (lambda* (#:key inputs #:allow-other-keys)
204 (let ((tools (search-input-file inputs "/share/classpath/tools.zip"))
205 (rt.jar (search-input-file inputs "/lib/rt.jar")))
206 ;; GNU Classpath does not provide rt.jar, but jamvm provides
207 ;; Classpath's glibj.zip as rt.jar, so we just use that.
208 (substitute* "Makefile.in"
209 (("\\$\\(SYSTEM_JDK_DIR\\)/jre/lib/rt.jar") rt.jar))
210 ;; Make sure we can find all classes.
211 (setenv "CLASSPATH"
212 (string-append rt.jar ":" tools))
213 (setenv "JAVACFLAGS"
214 (string-append "-cp " rt.jar ":" tools)))))
215 (add-after 'unpack 'patch-bitrot
216 (lambda _
217 (substitute* '("patches/boot/revert-6973616.patch"
218 "openjdk.src/jdk/make/common/shared/Defs-versions.gmk")
219 (("REQUIRED_FREETYPE_VERSION = 2.2.1")
220 "REQUIRED_FREETYPE_VERSION = 2.10.1"))
221 ;; As of attr 2.4.48 this header is no longer
222 ;; included. It is provided by the libc instead.
223 (substitute* '("configure"
224 "openjdk.src/jdk/src/solaris/native/sun/nio/fs/LinuxNativeDispatcher.c")
225 (("attr/xattr.h") "sys/xattr.h"))))
226 (add-after 'unpack 'fix-openjdk
227 (lambda _
228 (substitute* "openjdk.src/jdk/make/common/Defs-linux.gmk"
229 (("CFLAGS_COMMON = -fno-strict-aliasing" all)
230 (string-append all " -fcommon")))
231 (substitute*
232 '("openjdk.src/jdk/src/solaris/native/java/net/PlainSocketImpl.c"
233 "openjdk.src/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c")
234 (("#include <sys/sysctl.h>")
235 "#include <linux/sysctl.h>"))
236
237 ;; XXX 'ldd' in glibc 2.35 segfaults upon reading
238 ;; openjdk.build-boot/lib/amd64/libnio.so (!).
239 ;; It is only used as a verification step, so ignore it;
240 ;; try removing this substitution for newer versions of glibc.
241 (substitute* "openjdk.src/jdk/make/common/shared/Defs-linux.gmk"
242 (("\\$\\(LDD\\) \\$1 &&")
243 ""))
244
245 ;; It looks like the "h = 31 * h + c" line of the jsum()
246 ;; function gets miscompiled. After a few iterations of the loop
247 ;; the result of "31 * h" is always 0x8000000000000000.
248 ;; Disable optimizations of dump.cpp as a workaround.
249 (substitute* "openjdk.src/hotspot/make/linux/makefiles/gcc.make"
250 (("OPT_CFLAGS/NOOPT.*" all)
251 (string-append all "\n"
252 "OPT_CFLAGS/dump.o += -O0")))))
253 (add-after 'unpack 'fix-x11-extension-include-path
254 (lambda* (#:key inputs #:allow-other-keys)
255 (substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk"
256 (((string-append "\\$\\(firstword \\$\\(wildcard "
257 "\\$\\(OPENWIN_HOME\\)"
258 "/include/X11/extensions\\).*$"))
259 (string-append (assoc-ref inputs "libxrender")
260 "/include/X11/extensions"
261 " -I" (assoc-ref inputs "libxtst")
262 "/include/X11/extensions"
263 " -I" (assoc-ref inputs "libxinerama")
264 "/include/X11/extensions"))
265 (("\\$\\(wildcard /usr/include/X11/extensions\\)\\)") ""))))
266 (add-after 'unpack 'patch-paths
267 (lambda* (#:key inputs #:allow-other-keys)
268 ;; buildtree.make generates shell scripts, so we need to replace
269 ;; the generated shebang
270 (substitute* '("openjdk.src/hotspot/make/linux/makefiles/buildtree.make")
271 (("/bin/sh") (which "bash")))
272
273 (let ((corebin (string-append
274 (assoc-ref inputs "coreutils") "/bin/"))
275 (binbin (string-append
276 (assoc-ref inputs "binutils") "/bin/"))
277 (grepbin (string-append
278 (assoc-ref inputs "grep") "/bin/")))
279 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-linux.gmk"
280 "openjdk.src/corba/make/common/shared/Defs-linux.gmk")
281 (("UNIXCOMMAND_PATH = /bin/")
282 (string-append "UNIXCOMMAND_PATH = " corebin))
283 (("USRBIN_PATH = /usr/bin/")
284 (string-append "USRBIN_PATH = " corebin))
285 (("DEVTOOLS_PATH *= */usr/bin/")
286 (string-append "DEVTOOLS_PATH = " corebin))
287 (("COMPILER_PATH *= */usr/bin/")
288 (string-append "COMPILER_PATH = "
289 (assoc-ref inputs "gcc") "/bin/"))
290 (("DEF_OBJCOPY *=.*objcopy")
291 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
292
293 ;; fix path to alsa header
294 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
295 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
296 (string-append "ALSA_INCLUDE="
297 (assoc-ref inputs "alsa-lib")
298 "/include/alsa/version.h")))
299
300 ;; fix hard-coded utility paths
301 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-utils.gmk"
302 "openjdk.src/corba/make/common/shared/Defs-utils.gmk")
303 (("ECHO *=.*echo")
304 (string-append "ECHO = " (which "echo")))
305 (("^GREP *=.*grep")
306 (string-append "GREP = " (which "grep")))
307 (("EGREP *=.*egrep")
308 (string-append "EGREP = " (which "egrep")))
309 (("CPIO *=.*cpio")
310 (string-append "CPIO = " (which "cpio")))
311 (("READELF *=.*readelf")
312 (string-append "READELF = " (which "readelf")))
313 (("^ *AR *=.*ar")
314 (string-append "AR = " (which "ar")))
315 (("^ *TAR *=.*tar")
316 (string-append "TAR = " (which "tar")))
317 (("AS *=.*as")
318 (string-append "AS = " (which "as")))
319 (("LD *=.*ld")
320 (string-append "LD = " (which "ld")))
321 (("STRIP *=.*strip")
322 (string-append "STRIP = " (which "strip")))
323 (("NM *=.*nm")
324 (string-append "NM = " (which "nm")))
325 (("^SH *=.*sh")
326 (string-append "SH = " (which "bash")))
327 (("^FIND *=.*find")
328 (string-append "FIND = " (which "find")))
329 (("LDD *=.*ldd")
330 (string-append "LDD = " (which "ldd")))
331 (("NAWK *=.*(n|g)awk")
332 (string-append "NAWK = " (which "gawk")))
333 (("XARGS *=.*xargs")
334 (string-append "XARGS = " (which "xargs")))
335 (("UNZIP *=.*unzip")
336 (string-append "UNZIP = " (which "unzip")))
337 (("ZIPEXE *=.*zip")
338 (string-append "ZIPEXE = " (which "zip")))
339 (("SED *=.*sed")
340 (string-append "SED = " (which "sed"))))
341
342 ;; Some of these timestamps cause problems as they are more than
343 ;; 10 years ago, failing the build process.
344 (substitute*
345 "openjdk.src/jdk/src/share/classes/java/util/CurrencyData.properties"
346 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
347 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
348 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
349 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY")))))
350 (add-before 'configure 'set-additional-paths
351 (lambda* (#:key inputs #:allow-other-keys)
352 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
353 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
354 (string-append "ALSA_INCLUDE="
355 (assoc-ref inputs "alsa-lib")
356 "/include/alsa/version.h")))
357 (setenv "CC" "gcc")
358 (setenv "CPATH"
359 (string-append (assoc-ref inputs "libxcomposite")
360 "/include/X11/extensions" ":"
361 (assoc-ref inputs "libxrender")
362 "/include/X11/extensions" ":"
363 (assoc-ref inputs "libxtst")
364 "/include/X11/extensions" ":"
365 (assoc-ref inputs "libxinerama")
366 "/include/X11/extensions" ":"
367 (or (getenv "CPATH") "")))
368 (setenv "ALT_OBJCOPY" (which "objcopy"))
369 (setenv "ALT_CUPS_HEADERS_PATH"
370 (string-append (assoc-ref inputs "cups")
371 "/include"))
372 (setenv "ALT_FREETYPE_HEADERS_PATH"
373 (string-append (assoc-ref inputs "freetype")
374 "/include"))
375 (setenv "ALT_FREETYPE_LIB_PATH"
376 (string-append (assoc-ref inputs "freetype")
377 "/lib"))))
378 (add-before 'build 'disable-os-version-check
379 ;; allow build on linux major version change
380 (lambda _
381 (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok")))
382 (add-before 'check 'fix-test-framework
383 (lambda _
384 ;; Fix PATH in test environment
385 (substitute* "test/jtreg/com/sun/javatest/regtest/Main.java"
386 (("PATH=/bin:/usr/bin")
387 (string-append "PATH=" (getenv "PATH"))))
388 (substitute* "test/jtreg/com/sun/javatest/util/SysEnv.java"
389 (("/usr/bin/env") (which "env")))
390 (substitute* "openjdk.src/hotspot/test/test_env.sh"
391 (("/bin/rm") (which "rm"))
392 (("/bin/cp") (which "cp"))
393 (("/bin/mv") (which "mv")))))
394 (add-before 'check 'fix-hotspot-tests
395 (lambda _
396 (with-directory-excursion "openjdk.src/hotspot/test/"
397 (substitute* "jprt.config"
398 (("PATH=\"\\$\\{path4sdk\\}\"")
399 (string-append "PATH=" (getenv "PATH")))
400 (("make=/usr/bin/make")
401 (string-append "make=" (which "make"))))
402 (substitute* '("runtime/6626217/Test6626217.sh"
403 "runtime/7110720/Test7110720.sh")
404 (("/bin/rm") (which "rm"))
405 (("/bin/cp") (which "cp"))
406 (("/bin/mv") (which "mv"))))))
407 (add-before 'check 'fix-jdk-tests
408 (lambda _
409 (with-directory-excursion "openjdk.src/jdk/test/"
410 (substitute* "com/sun/jdi/JdbReadTwiceTest.sh"
411 (("/bin/pwd") (which "pwd")))
412 (substitute* "com/sun/jdi/ShellScaffold.sh"
413 (("/bin/kill") (which "kill")))
414 (substitute* "start-Xvfb.sh"
415 ;;(("/usr/bin/X11/Xvfb") (which "Xvfb"))
416 (("/usr/bin/nohup") (which "nohup")))
417 (substitute* "javax/security/auth/Subject/doAs/Test.sh"
418 (("/bin/rm") (which "rm")))
419 (substitute* "tools/launcher/MultipleJRE.sh"
420 (("echo \"#!/bin/sh\"")
421 (string-append "echo \"#!" (which "rm") "\""))
422 (("/usr/bin/zip") (which "zip")))
423 (substitute* "com/sun/jdi/OnThrowTest.java"
424 (("#!/bin/sh") (string-append "#!" (which "sh"))))
425 (substitute* "java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java"
426 (("/usr/bin/uptime") (which "uptime")))
427 (substitute* "java/lang/ProcessBuilder/Basic.java"
428 (("/usr/bin/env") (which "env"))
429 (("/bin/false") (which "false"))
430 (("/bin/true") (which "true"))
431 (("/bin/cp") (which "cp"))
432 (("/bin/sh") (which "sh")))
433 (substitute* "java/lang/ProcessBuilder/FeelingLucky.java"
434 (("/bin/sh") (which "sh")))
435 (substitute* "java/lang/ProcessBuilder/Zombies.java"
436 (("/usr/bin/perl") (which "perl"))
437 (("/bin/ps") (which "ps"))
438 (("/bin/true") (which "true")))
439 (substitute* "java/lang/Runtime/exec/ConcurrentRead.java"
440 (("/usr/bin/tee") (which "tee")))
441 (substitute* "java/lang/Runtime/exec/ExecWithDir.java"
442 (("/bin/true") (which "true")))
443 (substitute* "java/lang/Runtime/exec/ExecWithInput.java"
444 (("/bin/cat") (which "cat")))
445 (substitute* "java/lang/Runtime/exec/ExitValue.java"
446 (("/bin/sh") (which "sh"))
447 (("/bin/true") (which "true"))
448 (("/bin/kill") (which "kill")))
449 (substitute* "java/lang/Runtime/exec/LotsOfDestroys.java"
450 (("/usr/bin/echo") (which "echo")))
451 (substitute* "java/lang/Runtime/exec/LotsOfOutput.java"
452 (("/usr/bin/cat") (which "cat")))
453 (substitute* "java/lang/Runtime/exec/SleepyCat.java"
454 (("/bin/cat") (which "cat"))
455 (("/bin/sleep") (which "sleep"))
456 (("/bin/sh") (which "sh")))
457 (substitute* "java/lang/Runtime/exec/StreamsSurviveDestroy.java"
458 (("/bin/cat") (which "cat")))
459 (substitute* "java/rmi/activation/CommandEnvironment/SetChildEnv.java"
460 (("/bin/chmod") (which "chmod")))
461 (substitute* "java/util/zip/ZipFile/Assortment.java"
462 (("/bin/sh") (which "sh"))))))
463 (replace 'check
464 (lambda* (#:key tests? #:allow-other-keys)
465 ;; The "make check-*" targets always return zero, so we need to
466 ;; check for errors in the associated log files to determine
467 ;; whether any tests have failed.
468 (when tests?
469 (use-modules (ice-9 rdelim))
470 (let* ((error-pattern (make-regexp "^(Error|FAILED):.*"))
471 (checker (lambda (port)
472 (let loop ()
473 (let ((line (read-line port)))
474 (cond
475 ((eof-object? line) #t)
476 ((regexp-exec error-pattern line)
477 (error "test failed"))
478 (else (loop)))))))
479 (run-test (lambda (test)
480 (invoke "make" test)
481 (call-with-input-file
482 (string-append "test/" test ".log")
483 checker))))
484 (run-test "check-hotspot")
485 (run-test "check-langtools")
486 (run-test "check-jdk")))))
487 (replace 'install
488 (lambda* (#:key outputs #:allow-other-keys)
489 (let ((doc (string-append (assoc-ref outputs "doc")
490 "/share/doc/icedtea"))
491 (jre (assoc-ref outputs "out"))
492 (jdk (assoc-ref outputs "jdk")))
493 (copy-recursively "openjdk.build/docs" doc)
494 (copy-recursively "openjdk.build/j2re-image" jre)
495 (copy-recursively "openjdk.build/j2sdk-image" jdk))))
496 ;; Some of the libraries in the lib/amd64 folder link to libjvm.so.
497 ;; But that shared object is located in the server/ folder, so it
498 ;; cannot be found. This phase creates a symbolic link in the
499 ;; lib/amd64 folder so that the other libraries can find it.
500 ;;
501 ;; See:
502 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
503 ;;
504 ;; FIXME: Find the bug in the build system, so that this symlink is
505 ;; not needed.
506 (add-after 'install 'install-libjvm
507 (lambda* (#:key inputs outputs #:allow-other-keys)
508 (let* ((lib-path (string-append (assoc-ref outputs "out")
509 ;; See 'INSTALL_ARCH_DIR' in
510 ;; 'configure'.
511 ,(match (%current-system)
512 ("i686-linux"
513 "/lib/i386")
514 ("x86_64-linux"
515 "/lib/amd64")
516 ("armhf-linux"
517 "/lib/arm")
518 ("aarch64-linux"
519 "/lib/aarch64")
520 ;; We need a catch-all, dropping
521 ;; '-linux' works in most cases.
522 (_
523 (string-append
524 "/lib/"
525 (string-drop-right
526 (%current-system) 6)))))))
527 (symlink (string-append lib-path "/server/libjvm.so")
528 (string-append lib-path "/libjvm.so")))))
529 ;; By default IcedTea only generates an empty keystore. In order to
530 ;; be able to use certificates in Java programs we need to generate a
531 ;; keystore from a set of certificates. For convenience we use the
532 ;; certificates from the nss-certs package.
533 (add-after 'install 'install-keystore
534 (lambda* (#:key inputs outputs #:allow-other-keys)
535 (use-modules (ice-9 rdelim))
536 (let* ((keystore "cacerts")
537 (certs-dir (search-input-directory inputs
538 "etc/ssl/certs"))
539 (keytool (string-append (assoc-ref outputs "jdk")
540 "/bin/keytool")))
541 (define (extract-cert file target)
542 (call-with-input-file file
543 (lambda (in)
544 (call-with-output-file target
545 (lambda (out)
546 (let loop ((line (read-line in 'concat))
547 (copying? #f))
548 (cond
549 ((eof-object? line) #t)
550 ((string-prefix? "-----BEGIN" line)
551 (display line out)
552 (loop (read-line in 'concat) #t))
553 ((string-prefix? "-----END" line)
554 (display line out)
555 #t)
556 (else
557 (when copying? (display line out))
558 (loop (read-line in 'concat) copying?)))))))))
559 (define (import-cert cert)
560 (format #t "Importing certificate ~a\n" (basename cert))
561 (let ((temp "tmpcert"))
562 (extract-cert cert temp)
563 (let ((port (open-pipe* OPEN_WRITE keytool
564 "-import"
565 "-alias" (basename cert)
566 "-keystore" keystore
567 "-storepass" "changeit"
568 "-file" temp)))
569 (display "yes\n" port)
570 (when (not (zero? (status:exit-val (close-pipe port))))
571 (format #t "failed to import ~a\n" cert)))
572 (delete-file temp)))
573
574 ;; This is necessary because the certificate directory contains
575 ;; files with non-ASCII characters in their names.
576 (setlocale LC_ALL "en_US.utf8")
577 (setenv "LC_ALL" "en_US.utf8")
578
579 (for-each import-cert (find-files certs-dir "\\.pem$"))
580 (mkdir-p (string-append (assoc-ref outputs "out")
581 "/lib/security"))
582 (mkdir-p (string-append (assoc-ref outputs "jdk")
583 "/jre/lib/security"))
584
585 ;; The cacerts files we are going to overwrite are chmod'ed as
586 ;; read-only (444) in icedtea-8 (which derives from this
587 ;; package). We have to change this so we can overwrite them.
588 (chmod (string-append (assoc-ref outputs "out")
589 "/lib/security/" keystore) #o644)
590 (chmod (string-append (assoc-ref outputs "jdk")
591 "/jre/lib/security/" keystore) #o644)
592
593 (install-file keystore
594 (string-append (assoc-ref outputs "out")
595 "/lib/security"))
596 (install-file keystore
597 (string-append (assoc-ref outputs "jdk")
598 "/jre/lib/security"))))))))
599 (native-inputs
600 `(("openjdk-src"
601 ,(drop "openjdk"
602 "0l34ikyf62hbzlf9032alzkkqvf7bpmckz4gvirvph755w7gka8l"))
603 ("corba-drop"
604 ,(drop "corba"
605 "050gv2jbg1pi6qkn8w18bwpbklfa5b0kymjvan9pncddbj8m84fz"))
606 ("jaxp-drop"
607 ,(drop "jaxp"
608 "1k6yldwnxfzdg5926r1nlfv8d1r1j7rlp2nkz6gqh05vgyamnfhl"))
609 ("jaxws-drop"
610 ,(drop "jaxws"
611 "110j7jlz47x2gg6f7653x12mssan5kvj9l9h1m1c8c92drfxbqyk"))
612 ("jdk-drop"
613 ,(drop "jdk"
614 "0d1mca38ksxvdskp9im3pp7fdijhj1n3lwq9w13r9s4v3qyskgdd"))
615 ("langtools-drop"
616 ,(drop "langtools"
617 "0nq5236fzxn3p6x8cgncl56mzcmsj07q9gymysnws4c8byc6n0qj"))
618 ("hotspot-drop"
619 ,(origin
620 (method url-fetch)
621 (uri (string-append
622 "http://icedtea.classpath.org/downloads/drops"
623 "/icedtea7/" version "/hotspot.tar.bz2"))
624 (sha256
625 (base32
626 "17bdv39n4lh8l5737c96f3xgamx4y305m067p01cywgp7zaddqws"))
627 (patches (search-patches
628 "icedtea-7-hotspot-aarch64-use-c++98.patch"
629 "icedtea-7-hotspot-pointer-comparison.patch"))))
630 ("ant" ,ant-bootstrap)
631 ("attr" ,attr)
632 ("classpath" ,classpath-devel)
633 ("coreutils" ,coreutils)
634 ("diffutils" ,diffutils) ;for tests
635 ("ecj4-javac-wrapper" ,ecj4-javac-wrapper)
636 ("fastjar" ,fastjar) ;only for the configure phase; we actually use gjar
637 ("gawk" ,gawk)
638 ("grep" ,grep)
639 ("jamvm" ,jamvm-with-ecj4)
640 ("libtool" ,libtool)
641 ("pkg-config" ,pkg-config)
642 ("wget" ,wget)
643 ("which" ,which)
644 ("cpio" ,cpio)
645 ("zip" ,zip)
646 ("unzip" ,unzip)
647 ("libxslt" ,libxslt) ;for xsltproc
648 ("nss-certs" ,nss-certs)
649 ("perl" ,perl)
650 ("procps" ,procps))) ;for "free", even though I'm not sure we should use it
651 (inputs
652 (list alsa-lib
653 cups
654 fontconfig
655 freetype
656 giflib
657 gtk+-2
658 lcms
659 libjpeg-turbo
660 libpng
661 libx11
662 libxcomposite
663 libxi
664 libxinerama
665 libxrender
666 libxt
667 libxtst
668 mit-krb5
669 nss
670 pcsc-lite
671 zlib))
672 (home-page "https://icedtea.classpath.org")
673 (synopsis "Java development kit")
674 (description
675 "This package provides the Java development kit OpenJDK built with the
676IcedTea build harness.")
677
678 ;; 'configure' lists "mips" and "mipsel", but not "mips64el'.
679 (supported-systems (delete "mips64el-linux" %supported-systems))
680
681 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
682 ;; same license as both GNU Classpath and OpenJDK.
683 (license license:gpl2+))))
684
685(define-public icedtea-8
686 (let* ((version "3.19.0")
687 (drop (lambda (name hash)
688 (origin
689 (method url-fetch)
690 (uri (string-append
691 "http://icedtea.classpath.org/download/drops"
692 "/icedtea8/" version "/" name ".tar.xz"))
693 (sha256 (base32 hash))))))
694 (package (inherit icedtea-7)
695 (version "3.19.0")
696 (source (origin
697 (method url-fetch)
698 (uri (string-append
699 "http://icedtea.wildebeest.org/download/source/icedtea-"
700 version ".tar.xz"))
701 (sha256
702 (base32
703 "1cmms7cb2sav3ywc36ynqmybzx73sl279rm6j8i5nqrmp98ixmpf"))
704 (modules '((guix build utils)))
705 (snippet
706 '(substitute* '("configure"
707 "acinclude.m4")
708 ;; Do not embed build time
709 (("(DIST_ID=\"Custom build).*$" _ prefix)
710 (string-append prefix "\"\n"))
711 ;; Do not leak information about the build host
712 (("DIST_NAME=\"\\$build_os\"")
713 "DIST_NAME=\"guix\"")))))
714 (arguments
715 `(#:imported-modules
716 ((guix build ant-build-system)
717 ,@%gnu-build-system-modules)
718
719 #:disallowed-references ,(list (gexp-input icedtea-7 "jdk"))
720
721 ,@(substitute-keyword-arguments (package-arguments icedtea-7)
722 ((#:modules modules)
723 `((guix build utils)
724 (guix build gnu-build-system)
725 ((guix build ant-build-system) #:prefix ant:)
726 (ice-9 match)
727 (ice-9 popen)
728 (srfi srfi-19)
729 (srfi srfi-26)))
730 ((#:configure-flags flags)
731 `(let ((jdk (assoc-ref %build-inputs "jdk")))
732 `("CFLAGS=-fcommon"
733 "CXXFLAGS=-fcommon"
734 "--enable-bootstrap"
735 "--enable-nss"
736 ,(string-append "--with-parallel-jobs="
737 (number->string (parallel-job-count)))
738 "--disable-downloading"
739 "--disable-system-pcsc"
740 "--disable-system-sctp"
741 "--disable-tests" ;they are run in the check phase instead
742 "--with-openjdk-src-dir=./openjdk.src"
743 ,(string-append "--with-jdk-home=" jdk))))
744 ((#:phases phases)
745 `(modify-phases ,phases
746 (delete 'fix-x11-extension-include-path)
747 (delete 'patch-paths)
748 (delete 'set-additional-paths)
749 (delete 'patch-patches)
750 (delete 'patch-bitrot)
751 (delete 'use-classpath)
752 ;; Prevent the keytool from recording the current time when
753 ;; adding certificates at build time.
754 (add-after 'unpack 'patch-keystore
755 (lambda _
756 (substitute* "openjdk.src/jdk/src/share/classes/sun/security/provider/JavaKeyStore.java"
757 (("date = new Date\\(\\);")
758 "\
759date = (System.getenv(\"SOURCE_DATE_EPOCH\") != null) ?\
760new Date(Long.parseLong(System.getenv(\"SOURCE_DATE_EPOCH\"))) :\
761new Date();"))
762 #t))
763 (add-after 'unpack 'patch-jni-libs
764 ;; Hardcode dynamically loaded libraries.
765 (lambda _
766 (define remove
767 (@ (srfi srfi-1) remove))
768
769 (define (icedtea-or-openjdk? path)
770 (or (string-contains path "openjdk")
771 (string-contains path "icedtea")))
772
773 (let* ((library-path (remove icedtea-or-openjdk?
774 (search-path-as-string->list
775 (getenv "LIBRARY_PATH"))))
776 (find-library (lambda (name)
777 (or (search-path
778 library-path
779 (string-append "lib" name ".so"))
780 (string-append "lib" name ".so")))))
781 (for-each
782 (lambda (file)
783 (catch 'decoding-error
784 (lambda ()
785 (substitute* file
786 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
787 _ name version)
788 (string-append "\"" (find-library name) "\""))
789 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
790 (string-append "\"" (find-library name) "\""))))
791 (lambda _
792 ;; Those are safe to skip.
793 (format (current-error-port)
794 "warning: failed to substitute: ~a~%"
795 file))))
796 (find-files "openjdk.src/jdk/src/solaris/native"
797 "\\.c|\\.h")))))
798 (replace 'fix-openjdk
799 (lambda _
800 (substitute*
801 '("openjdk.src/jdk/src/solaris/native/java/net/PlainSocketImpl.c"
802 "openjdk.src/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c")
803 (("#include <sys/sysctl.h>")
804 "#include <linux/sysctl.h>"))))
805 (replace 'install
806 (lambda* (#:key outputs #:allow-other-keys)
807 (let ((doc (string-append (assoc-ref outputs "doc")
808 "/share/doc/icedtea"))
809 (jre (assoc-ref outputs "out"))
810 (jdk (assoc-ref outputs "jdk")))
811 (copy-recursively "openjdk.build/docs" doc)
812 (copy-recursively "openjdk.build/images/j2re-image" jre)
813 (copy-recursively "openjdk.build/images/j2sdk-image" jdk)
814 ;; Install the nss.cfg file to JRE to enable SSL/TLS
815 ;; support via NSS.
816 (copy-file (string-append jdk "/jre/lib/security/nss.cfg")
817 (string-append jre "/lib/security/nss.cfg")))))
818 (add-after 'install 'strip-jar-timestamps
819 (assoc-ref ant:%standard-phases 'strip-jar-timestamps)))))))
820 (native-inputs
821 `(("jdk" ,icedtea-7 "jdk")
822 ("openjdk-src"
823 ,(drop "openjdk"
824 "1l3bzmd3s38scxpwamfhnwbv7vndgjq6hz3bl58437fgl9kgbl69"))
825 ("aarch32-drop"
826 ,(drop "aarch32"
827 "0k4dwpi3x3lj41rj32xyxbn76r7cb2g2whh44r1z4iwhw1xd2lpq"))
828 ("corba-drop"
829 ,(drop "corba"
830 "0xhh6gf5gh5c6vf1607xcy49wnp5prch2rim13x14wvsn817xf0r"))
831 ("jaxp-drop"
832 ,(drop "jaxp"
833 "043g335rgi5ipl8dp3q2cc3gcfhxk77ipxs43sv344z71bn8xmxr"))
834 ("jaxws-drop"
835 ,(drop "jaxws"
836 "1pc0pv4v2mn2mjc0vp19d94v2150xigyhxsmckqasy647zcm6w0r"))
837 ("jdk-drop"
838 ,(drop "jdk"
839 "1742lcm55l8zhi522x83v65ccr0rd6511q9rj7crw44x3ymdrhrv"))
840 ("langtools-drop"
841 ,(drop "langtools"
842 "08iz7p2xcddlphipf6gahyabr5cawlnydap12p1n4f0md069b50b"))
843 ("hotspot-drop"
844 ,(drop "hotspot"
845 "1ffaxfnb3yn1i7crivqigc1r1q0z6cp044i6nfring4z6c8pfhd2"))
846 ("nashorn-drop"
847 ,(drop "nashorn"
848 "15fn7cpm2i1npa88h57njxg0f8qkrqhrc30pb54d3hxlx5zyjl94"))
849 ("shenandoah-drop"
850 ,(drop "shenandoah"
851 "1jjzjjx1ykyhbc4llh8249dlr8j5g1ki6r7g9baj2mxyb9whc5nq"))
852 ,@(fold alist-delete (package-native-inputs icedtea-7)
853 '("openjdk-src" "corba-drop" "jaxp-drop" "jaxws-drop"
854 "jdk-drop" "langtools-drop" "hotspot-drop"
855 "classpath" "ecj4-javac-wrapper" "jamvm" "fastjar")))))))
856
857(define-public icedtea icedtea-8)
858
859(define-public openjdk9
860 (package
861 (name "openjdk")
862 (version "9.181")
863 (source (origin
864 (method hg-fetch)
865 (uri (hg-reference (url "https://hg.openjdk.org/jdk/jdk")
866 (changeset "jdk-9+181")))
867 (file-name (hg-file-name name version))
868 (modules '((guix build utils)))
869 (snippet `(begin
870 (for-each delete-file
871 (find-files "." ".*.(bin|exe|jar)$"))))
872 (sha256
873 (base32
874 "1v92nzdqx07c35x945awzir4yk0fk22vky6fpp8mq9js930sxsz0"))
875 (patches (search-patches "openjdk-9-pointer-comparison.patch"
876 "openjdk-9-setsignalhandler.patch"))))
877 (build-system gnu-build-system)
878 (outputs '("out" "jdk" "doc"))
879 (arguments
880 `(#:tests? #f; require jtreg
881 #:make-flags '("all")
882 #:disallowed-references ,(list (gexp-input icedtea-8)
883 (gexp-input icedtea-8 "jdk"))
884
885 #:phases
886 (modify-phases %standard-phases
887 ,@(if (target-aarch64?)
888 `((add-after 'unpack 'patch-for-aarch64
889 (lambda _
890 (substitute* "hotspot/src/cpu/aarch64/vm/interp_masm_aarch64.hpp"
891 ;; This line is duplicated, so remove both occurrences,
892 ;; then add back one occurrence by substituting a
893 ;; comment that occurs once.
894 (("using MacroAssembler::call_VM_leaf_base;") "")
895 (("Interpreter specific version of call_VM_base")
896 "Interpreter specific version of call_VM_base
897 using MacroAssembler::call_VM_leaf_base;")))))
898 '())
899 (add-after 'patch-source-shebangs 'fix-java-shebangs
900 (lambda _
901 ;; This file was "fixed" by patch-source-shebangs, but it requires
902 ;; this exact first line.
903 (substitute* "jdk/make/data/blacklistedcertsconverter/blacklisted.certs.pem"
904 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
905 #t))
906 (replace 'configure
907 (lambda* (#:key inputs outputs #:allow-other-keys)
908 ;; TODO: unbundle libpng and lcms
909 (invoke "bash" "./configure"
910 ;; Add flags for compilation with gcc >= 10
911 ,(string-append "--with-extra-cflags=-fcommon"
912 " -fno-delete-null-pointer-checks"
913 " -fno-lifetime-dse")
914 (string-append "--with-freetype="
915 (assoc-ref inputs "freetype"))
916 "--disable-freetype-bundling"
917 "--disable-warnings-as-errors"
918 "--disable-hotspot-gtest"
919 "--with-giflib=system"
920 "--with-libjpeg=system"
921 (string-append "--prefix=" (assoc-ref outputs "out")))
922 #t))
923 (add-before 'build 'write-source-revision-file
924 (lambda _
925 (with-output-to-file ".src-rev"
926 (lambda _
927 (display ,version)))
928 #t))
929 (replace 'build
930 (lambda* (#:key make-flags parallel-build? #:allow-other-keys)
931 (apply invoke "make"
932 `(,@(if parallel-build?
933 (list (string-append "JOBS="
934 (number->string (parallel-job-count))))
935 '())
936 ,@make-flags))))
937 (add-after 'unpack 'patch-jni-libs
938 ;; Hardcode dynamically loaded libraries.
939 (lambda _
940 (define remove
941 (@ (srfi srfi-1) remove))
942
943 (define (icedtea-or-openjdk? path)
944 (or (string-contains path "openjdk")
945 (string-contains path "icedtea")))
946
947 (let* ((library-path (remove icedtea-or-openjdk?
948 (search-path-as-string->list
949 (getenv "LIBRARY_PATH"))))
950 (find-library (lambda (name)
951 (or (search-path
952 library-path
953 (string-append "lib" name ".so"))
954 (string-append "lib" name ".so")))))
955 (for-each
956 (lambda (file)
957 (catch 'decoding-error
958 (lambda ()
959 (substitute* file
960 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
961 _ name version)
962 (string-append "\"" (find-library name) "\""))
963 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
964 (string-append "\"" (find-library name) "\""))))
965 (lambda _
966 ;; Those are safe to skip.
967 (format (current-error-port)
968 "warning: failed to substitute: ~a~%"
969 file))))
970 (find-files "."
971 "\\.c$|\\.h$"))
972 #t)))
973 ;; Some of the libraries in the lib/ folder link to libjvm.so.
974 ;; But that shared object is located in the server/ folder, so it
975 ;; cannot be found. This phase creates a symbolic link in the
976 ;; lib/ folder so that the other libraries can find it.
977 ;;
978 ;; See:
979 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
980 ;;
981 ;; FIXME: Find the bug in the build system, so that this symlink is
982 ;; not needed.
983 (add-after 'install 'install-libjvm
984 (lambda* (#:key inputs outputs #:allow-other-keys)
985 (let* ((lib-out (string-append (assoc-ref outputs "out")
986 "/lib"))
987 (lib-jdk (string-append (assoc-ref outputs "jdk")
988 "/lib")))
989 (symlink (string-append lib-jdk "/server/libjvm.so")
990 (string-append lib-jdk "/libjvm.so"))
991 (symlink (string-append lib-out "/server/libjvm.so")
992 (string-append lib-out "/libjvm.so")))
993 #t))
994 (replace 'install
995 (lambda* (#:key outputs #:allow-other-keys)
996 (let ((out (assoc-ref outputs "out"))
997 (jdk (assoc-ref outputs "jdk"))
998 (doc (assoc-ref outputs "doc"))
999 (images (car (find-files "build" ".*-server-release"
1000 #:directories? #t))))
1001 (copy-recursively (string-append images "/images/jdk") jdk)
1002 (copy-recursively (string-append images "/images/jre") out)
1003 (copy-recursively (string-append images "/images/docs") doc))
1004 #t))
1005 (add-after 'install 'strip-zip-timestamps
1006 (lambda* (#:key outputs #:allow-other-keys)
1007 (for-each (lambda (zip)
1008 (let ((dir (mkdtemp "zip-contents.XXXXXX")))
1009 (with-directory-excursion dir
1010 (invoke "unzip" zip))
1011 (delete-file zip)
1012 (for-each (lambda (file)
1013 (let ((s (lstat file)))
1014 (unless (eq? (stat:type s) 'symlink)
1015 (format #t "reset ~a~%" file)
1016 (utime file 0 0 0 0))))
1017 (find-files dir #:directories? #t))
1018 (with-directory-excursion dir
1019 (let ((files (find-files "." ".*" #:directories? #t)))
1020 (apply invoke "zip" "-0" "-X" zip files)))))
1021 (find-files (assoc-ref outputs "doc") ".*.zip$"))
1022 #t)))))
1023 (inputs
1024 `(("alsa-lib" ,alsa-lib)
1025 ("cups" ,cups)
1026 ("fontconfig" ,fontconfig)
1027 ("freetype" ,freetype)
1028 ("giflib" ,giflib)
1029 ("lcms" ,lcms)
1030 ("libelf" ,libelf)
1031 ("libjpeg" ,libjpeg-turbo)
1032 ("libice" ,libice)
1033 ("libpng" ,libpng)
1034 ("libx11" ,libx11)
1035 ("libxcomposite" ,libxcomposite)
1036 ("libxi" ,libxi)
1037 ("libxinerama" ,libxinerama)
1038 ("libxrender" ,libxrender)
1039 ("libxt" ,libxt)
1040 ("libxtst" ,libxtst)))
1041 (native-inputs
1042 `(("icedtea-8" ,icedtea-8)
1043 ("icedtea-8:jdk" ,icedtea-8 "jdk")
1044 ;; XXX: The build system fails with newer versions of GNU Make.
1045 ("[email protected]" ,gnu-make-4.2)
1046 ("unzip" ,unzip)
1047 ("which" ,which)
1048 ("zip" ,zip)))
1049 (home-page "https://openjdk.org/projects/jdk9/")
1050 (synopsis "Java development kit")
1051 (description
1052 "This package provides the Java development kit OpenJDK.")
1053 (license license:gpl2+)))
1054
1055(define-public openjdk10
1056 (package
1057 (inherit openjdk9)
1058 (name "openjdk")
1059 (version "10.46")
1060 (source (origin
1061 (method hg-fetch)
1062 (uri (hg-reference (url "https://hg.openjdk.org/jdk/jdk")
1063 (changeset "jdk-10+46")))
1064 (file-name (hg-file-name name version))
1065 (modules '((guix build utils)))
1066 (snippet `(begin
1067 (for-each delete-file
1068 (find-files "." ".*.(bin|exe|jar)$"))))
1069 (sha256
1070 (base32
1071 "0i47ar8lxzjrkkiwbzybfxs473390h4jq9ahm3xqdvy5zpchxy3y"))
1072 (patches (search-patches
1073 "openjdk-10-idlj-reproducibility.patch"
1074 "openjdk-10-pointer-comparison.patch"
1075 "openjdk-10-setsignalhandler.patch"))))
1076 (arguments
1077 (substitute-keyword-arguments (package-arguments openjdk9)
1078 ((#:phases phases)
1079 `(modify-phases ,phases
1080 (replace 'fix-java-shebangs
1081 (lambda _
1082 ;; This file was "fixed" by patch-source-shebangs, but it requires
1083 ;; this exact first line.
1084 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1085 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
1086 #t))
1087 (replace 'configure
1088 (lambda* (#:key inputs outputs #:allow-other-keys)
1089 (invoke "bash" "./configure"
1090 ;; Add flags for compilation with gcc >= 10
1091 ,(string-append "--with-extra-cflags=-fcommon"
1092 " -fno-delete-null-pointer-checks"
1093 " -fno-lifetime-dse")
1094 (string-append "--with-freetype="
1095 (assoc-ref inputs "freetype"))
1096 "--disable-freetype-bundling"
1097 "--disable-warnings-as-errors"
1098 "--disable-hotspot-gtest"
1099 "--with-giflib=system"
1100 "--with-libjpeg=system"
1101 "--with-native-debug-symbols=zipped"
1102 (string-append "--prefix=" (assoc-ref outputs "out")))))
1103 (add-after 'unpack 'disable-warnings-as-errors
1104 (lambda _
1105 ;; It looks like the "--disable-warnings-as-errors" option of
1106 ;; the 'configure' phase is not working.
1107 (substitute* "make/autoconf/generated-configure.sh"
1108 (("-Werror") ""))))))
1109 ((#:disallowed-references _ '())
1110 `(,(gexp-input openjdk9)
1111 ,(gexp-input openjdk9 "jdk")))))
1112 (native-inputs
1113 `(("openjdk9" ,openjdk9)
1114 ("openjdk9:jdk" ,openjdk9 "jdk")
1115 ("[email protected]" ,gnu-make-4.2)
1116 ("unzip" ,unzip)
1117 ("which" ,which)
1118 ("zip" ,zip)))))
1119
1120(define-public openjdk11
1121 (package
1122 (name "openjdk")
1123 (version "11.0.17")
1124 (source (origin
1125 (method url-fetch)
1126 (uri (string-append "https://openjdk-sources.osci.io/openjdk11/openjdk-"
1127 version "-ga.tar.xz"))
1128 (file-name (string-append name "-" version ".tar.xz"))
1129 (sha256
1130 (base32
1131 "1prvqy0ysz0999wrhsrbz6vrknpqfihl9l74l16ph93g89dqi5ia"))
1132 (modules '((guix build utils)))
1133 (snippet
1134 '(for-each delete-file (find-files "." "\\.(bin|exe|jar)$")))))
1135 (build-system gnu-build-system)
1136 (outputs '("out" "jdk" "doc"))
1137 (arguments
1138 (list
1139 #:modules `((guix build gnu-build-system)
1140 (guix build utils)
1141 (ice-9 match)
1142 (srfi srfi-1)
1143 (srfi srfi-26))
1144 #:disallowed-references (list (gexp-input openjdk10)
1145 (gexp-input openjdk10 "jdk"))
1146
1147 #:tests? #f ; requires jtreg
1148 ;; TODO package jtreg
1149 #:configure-flags
1150 #~(list
1151 ;; Add flags for compilation with gcc >= 10.
1152 #$(string-append "--with-extra-cflags=-fcommon"
1153 " -fno-delete-null-pointer-checks"
1154 " -fno-lifetime-dse")
1155 ;; Otherwise, the '--enable-fast-install' causes an error.
1156 "--disable-option-checking"
1157 "--disable-warnings-as-errors"
1158 ;; Make validate-runpath pass (see:
1159 ;; http://issues.guix.info/issue/32894).
1160 "--with-native-debug-symbols=zipped"
1161 ;; Do not use the bundled libraries.
1162 "--with-giflib=system"
1163 "--with-lcms=system"
1164 "--with-libjpeg=system"
1165 "--with-libpng=system"
1166 "--with-version-pre="
1167 ;; Allow the build system to locate the system freetype.
1168 (string-append "--with-freetype-include="
1169 #$(this-package-input "freetype") "/include")
1170 (string-append "--with-freetype-lib="
1171 #$(this-package-input "freetype") "/lib"))
1172 #:phases
1173 #~(modify-phases %standard-phases
1174 (add-after 'patch-source-shebangs 'fix-java-shebangs
1175 (lambda _
1176 ;; This file was "fixed" by patch-source-shebangs, but it requires
1177 ;; this exact first line.
1178 (substitute* "make/data/blockedcertsconverter/blocked.certs.pem"
1179 (("^#!.*") "#! java BlockedCertsConverter SHA-256\n"))))
1180 (add-after 'unpack 'patch-jni-libs
1181 ;; Hardcode dynamically loaded libraries.
1182 (lambda _
1183 (define remove
1184 (@ (srfi srfi-1) remove))
1185
1186 (define (icedtea-or-openjdk? path)
1187 (or (string-contains path "openjdk")
1188 (string-contains path "icedtea")))
1189
1190 (let* ((library-path (remove icedtea-or-openjdk?
1191 (search-path-as-string->list
1192 (getenv "LIBRARY_PATH"))))
1193 (find-library (lambda (name)
1194 (or (search-path
1195 library-path
1196 (string-append "lib" name ".so"))
1197 (string-append "lib" name ".so")))))
1198 (for-each
1199 (lambda (file)
1200 (catch 'decoding-error
1201 (lambda ()
1202 (substitute* file
1203 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
1204 _ name version)
1205 (string-append "\"" (find-library name) "\""))
1206 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
1207 (string-append "\"" (find-library name) "\""))))
1208 (lambda _
1209 ;; Those are safe to skip.
1210 (format (current-error-port)
1211 "warning: failed to substitute: ~a~%"
1212 file))))
1213 (find-files "." "\\.c$|\\.h$")))))
1214 (add-before 'build 'write-source-revision-file
1215 (lambda _
1216 (with-output-to-file ".src-rev"
1217 (lambda _
1218 (display #$version)))))
1219 (replace 'build
1220 (lambda* (#:key parallel-build? make-flags #:allow-other-keys)
1221 (apply invoke "make" "all"
1222 `(,@(if parallel-build?
1223 (list (string-append "JOBS="
1224 (number->string (parallel-job-count))))
1225 '())
1226 ,@make-flags))))
1227 ;; jdk 11 does not build jre by default any more; so explicitly build
1228 ;; it (see:
1229 ;; https://github.com/AdoptOpenJDK/openjdk-build/issues/356).
1230 (add-after 'build 'build-jre
1231 (lambda* (#:key parallel-build? make-flags #:allow-other-keys)
1232 (apply invoke "make" "legacy-jre-image"
1233 `(,@(if parallel-build?
1234 (list (string-append "JOBS="
1235 (number->string (parallel-job-count))))
1236 '())
1237 ,@make-flags))))
1238 (replace 'install
1239 (lambda _
1240 (let ((images (car (find-files "build" "-server-release"
1241 #:directories? #t))))
1242 (copy-recursively (string-append images "/images/jdk")
1243 #$output:jdk)
1244 (copy-recursively (string-append images "/images/jre")
1245 #$output)
1246 (copy-recursively (string-append images "/images/docs")
1247 #$output:doc))))
1248 ;; Some of the libraries in the lib/ folder link to libjvm.so.
1249 ;; But that shared object is located in the server/ folder, so it
1250 ;; cannot be found. This phase creates a symbolic link in the
1251 ;; lib/ folder so that the other libraries can find it.
1252 ;;
1253 ;; See:
1254 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1255 ;;
1256 ;; FIXME: Find the bug in the build system, so that this symlink is
1257 ;; not needed.
1258 (add-after 'install 'install-libjvm
1259 (lambda _
1260 (let ((lib-out (string-append #$output "/lib"))
1261 (lib-jdk (string-append #$output:jdk "/lib")))
1262 (symlink (string-append lib-jdk "/server/libjvm.so")
1263 (string-append lib-jdk "/libjvm.so"))
1264 (symlink (string-append lib-out "/server/libjvm.so")
1265 (string-append lib-out "/libjvm.so")))))
1266 (add-after 'install 'strip-character-data-timestamps
1267 (lambda _
1268 (let ((archive (string-append #$output:jdk "/lib/src.zip"))
1269 (dir (mkdtemp "zip-contents.XXXXXX")))
1270 (with-directory-excursion dir
1271 (invoke "unzip" archive))
1272 (delete-file archive)
1273 (with-directory-excursion dir
1274 (let ((char-data-files (find-files "." "CharacterData")))
1275 (for-each (lambda (file)
1276 (substitute* file
1277 (((string-append "This file was generated "
1278 "AUTOMATICALLY from a template "
1279 "file.*"))
1280 (string-append "This file was generated "
1281 "AUTOMATICALLY from a template "
1282 "file"))))
1283 char-data-files)))
1284 (with-directory-excursion dir
1285 (let ((files (find-files "." #:directories? #t)))
1286 (apply invoke "zip" "-0" "-X" archive files))))))
1287 (add-after 'strip-character-data-timestamps 'remove-extraneous-files
1288 (lambda* (#:key outputs #:allow-other-keys)
1289 ;; Remove the *.diz and src.zip files for space considerations.
1290 ;; The former are compressed debuginfo files not typically
1291 ;; shipped with Java distributions, while the later corresponds
1292 ;; to Java core API source files.
1293 (for-each delete-file
1294 (append-map (cut find-files <> "(^src\\.zip|\\.diz)$")
1295 (map (match-lambda
1296 ((name . dir)
1297 dir))
1298 outputs)))))
1299 (add-after 'remove-diz-file 'strip-archive-timestamps
1300 (lambda _
1301 (use-modules (ice-9 binary-ports)
1302 (rnrs bytevectors))
1303 (letrec ((repack-archive
1304 (lambda (archive)
1305 (let ((dir (mkdtemp "zip-contents.XXXXXX")))
1306 (with-directory-excursion dir
1307 (invoke "unzip" archive))
1308 (delete-file archive)
1309 (for-each (compose repack-archive canonicalize-path)
1310 (find-files dir "(ct\\.sym|\\.jar)$"))
1311 (let ((reset-file-timestamp
1312 (lambda (file)
1313 (let ((s (lstat file)))
1314 (unless (eq? (stat:type s) 'symlink)
1315 (format #t "reset ~a~%" file)
1316 (utime file 0 0 0 0))))))
1317 (for-each reset-file-timestamp
1318 (find-files dir #:directories? #t)))
1319 (with-directory-excursion dir
1320 (let ((files (find-files "." #:directories? #t)))
1321 (apply invoke "zip" "-0" "-X" archive files)))))))
1322 (for-each repack-archive
1323 (find-files #$output:doc "\\.zip$"))
1324 (for-each repack-archive
1325 (find-files #$output:jdk "\\.(zip|jar)$"))
1326 (repack-archive (string-append #$output:jdk "/lib/ct.sym"))
1327 (let ((repack-jmod
1328 (lambda (file-name)
1329 (call-with-input-file file-name
1330 (lambda (file)
1331 (let ((header #vu8(#x4a #x4d #x01 #x00)))
1332 (if (equal? (get-bytevector-n
1333 file (bytevector-length header))
1334 header)
1335 (let* ((header-length (bytevector-length header))
1336 (temp-file (mkstemp!
1337 (string-copy
1338 "temp-file.XXXXXX")))
1339 (temp-filename (port-filename temp-file))
1340 (content-length
1341 (- (stat:size (stat file))
1342 header-length)))
1343 (sendfile temp-file file content-length header-length)
1344 (delete-file file-name)
1345 (close-port temp-file)
1346 (repack-archive (canonicalize-path temp-filename))
1347 (call-with-output-file file-name
1348 (lambda (file)
1349 (put-bytevector file header)
1350 (call-with-input-file temp-filename
1351 (lambda (temp-file)
1352 (sendfile
1353 file temp-file
1354 (stat:size (stat temp-file)) 0)))))))))))))
1355 (for-each repack-jmod
1356 (find-files #$output:jdk "\\.jmod$"))))))
1357 (add-after 'install 'remove-timestamp-from-api-summary
1358 (lambda _
1359 (substitute* (string-append #$output:doc
1360 "/api/overview-summary.html")
1361 (("Generated by javadoc \\(11-internal\\).*$")
1362 "Generated by javadoc (11-internal) -->\n")))))))
1363 (inputs
1364 (list alsa-lib
1365 cups
1366 fontconfig
1367 freetype
1368 giflib
1369 lcms
1370 libjpeg-turbo
1371 libpng
1372 libx11
1373 libxext
1374 libxrandr
1375 libxrender
1376 libxt
1377 libxtst))
1378 (native-inputs
1379 (list autoconf
1380 bash ; not bash-minimal, needs ulimit
1381 openjdk10
1382 `(,openjdk10 "jdk")
1383 gnu-make-4.2
1384 pkg-config
1385 unzip
1386 which
1387 zip))
1388 (home-page "https://openjdk.java.net/projects/jdk/11/")
1389 (synopsis "Java development kit")
1390 (description
1391 "This package provides the Java development kit OpenJDK.")
1392 (license license:gpl2+)))
1393
1394(define-syntax make-openjdk
1395 ;; Return an OpenJDK package at VERSION with checksum HASH, using BOOTSTRAP,
1396 ;; the bootstrap package. One or more FIELD can be provided to further
1397 ;; refine the package definition; for convenience, the BASE, NAME and
1398 ;; VERSION are defined in their scope.
1399 (lambda (x)
1400 (syntax-case x ()
1401 ((_ bootstrap version* hash field ...)
1402 (with-syntax ((base (datum->syntax x 'base))
1403 (name (datum->syntax x 'name))
1404 (version (datum->syntax x 'version)))
1405 #'(let ((base (package
1406 (inherit bootstrap)
1407 (name "openjdk")
1408 (version version*)
1409 (source
1410 (origin
1411 (inherit (package-source bootstrap))
1412 (method git-fetch)
1413 (uri (git-reference
1414 (url (format
1415 #f "https://github.com/openjdk/jdk~au"
1416 (version-major version*)))
1417 (commit (string-append "jdk-" version*
1418 "-ga"))))
1419 (file-name (git-file-name name version))
1420 (sha256 (base32 hash))))
1421 (native-inputs
1422 (modify-inputs (package-native-inputs bootstrap)
1423 (replace "openjdk" bootstrap)))
1424 (home-page (string-append
1425 "https://openjdk.java.net/projects/jdk/"
1426 (version-major version)))))
1427 (name "openjdk")
1428 (version version*))
1429 (package
1430 (inherit base)
1431 field
1432 ...)))))))
1433
1434(define-public openjdk12
1435 (make-openjdk
1436 openjdk11 "12.33" "0mbhdrk12b6878kby0flnbak7444dlpm0ihlmf92vk59y1c02bc2"
1437 (source
1438 (origin
1439 (method url-fetch)
1440 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/0276cba45aac.tar.bz2")
1441 (file-name (string-append name "-" version ".tar.bz2"))
1442 (sha256
1443 (base32
1444 "0mbhdrk12b6878kby0flnbak7444dlpm0ihlmf92vk59y1c02bc2"))
1445 (modules '((guix build utils)))
1446 (snippet
1447 '(for-each delete-file (find-files "." "\\.(bin|exe|jar)$")))
1448 (patches (search-patches "openjdk-10-setsignalhandler.patch"))))
1449 (arguments
1450 (substitute-keyword-arguments (package-arguments openjdk11)
1451 ((#:phases phases)
1452 #~(modify-phases #$phases
1453 (replace 'fix-java-shebangs
1454 (lambda _
1455 ;; 'blocked' was renamed to 'blacklisted' in this version for
1456 ;; some reason.
1457 (substitute* "make/data/blacklistedcertsconverter/\
1458blacklisted.certs.pem"
1459 (("^#!.*")
1460 "#! java BlacklistedCertsConverter SHA-256\n"))))))))))
1461
1462(define-public openjdk13
1463 (make-openjdk openjdk12 "13.0.13"
1464 "0pxf4dlig61k0pg7amg4mi919hzam7nzwckry01avgq1wj8ambji"
1465 (source (origin
1466 (inherit (package-source base))
1467 (patches '())))))
1468
1469(define-public openjdk14
1470 (make-openjdk
1471 openjdk13 "14.0.2"
1472 "07k9bsbxwyf2z2n50z96nvhsdai916mxdxcr5lm44jz7f6xrwfq6"
1473 (source (origin
1474 (inherit (package-source base))
1475 (snippet ;override snippet
1476 '(begin
1477 ;; The m4 macro uses 'help' to search for builtins, which is
1478 ;; not available in bash-minimal
1479 (substitute* "make/autoconf/basics.m4"
1480 (("if help") "if command -v"))
1481 (for-each delete-file (find-files "." "\\.(bin|exe|jar)$"))))
1482 (patches (search-patches "openjdk-10-setsignalhandler.patch"))))))
1483
1484(define-public openjdk15
1485 (make-openjdk
1486 openjdk14 "15.0.9"
1487 "1k3x06fv89l84ysjsyw8s89q8blghq85m6xjzv373x6297ln8n7a"
1488 (source (origin
1489 (inherit (package-source base))
1490 (modules '())
1491 (snippet #f)
1492 (patches
1493 (search-patches "openjdk-15-xcursor-no-dynamic.patch"))))
1494 (inputs
1495 (modify-inputs (package-inputs base)
1496 (append libxcursor))) ;for our patch to work
1497 (native-inputs
1498 (modify-inputs (package-native-inputs base)
1499 (delete "make" ;remove old gnu-make-4.2
1500 "openjdk") ;to remove non-jdk output
1501 (append `(,openjdk14 "jdk"))))))
1502
1503(define-public openjdk16
1504 (make-openjdk openjdk15 "16.0.2"
1505 "0587px2qbz07g3xi4a3ya6m630p72dvkxcn0bj1813pxnwvcgigz"
1506 (source (origin
1507 (inherit (package-source base))
1508 (patches (search-patches "openjdk-15-xcursor-no-dynamic.patch"
1509 "openjdk-10-setsignalhandler.patch"))))))
1510
1511(define-public openjdk17
1512 (make-openjdk
1513 openjdk16 "17.0.5"
1514 "1asnysg6kxdkrmb88y6qihdr12ljsyxv0mg6hlcs7cwxgsdlqkfs"
1515 (source (origin
1516 (inherit (package-source base))
1517 (patches (search-patches "openjdk-15-xcursor-no-dynamic.patch"))))
1518 (arguments
1519 (substitute-keyword-arguments (package-arguments openjdk16)
1520 ((#:phases phases)
1521 #~(modify-phases #$phases
1522 (replace 'fix-java-shebangs
1523 (lambda _
1524 ;; 'blacklisted' was renamed back to 'blocked'.
1525 (substitute* "make/data/blockedcertsconverter/blocked.certs.pem"
1526 (("^#!.*") "#! java BlockedCertsConverter SHA-256\n"))))))))))
1527
1528(define-public openjdk18
1529 (make-openjdk openjdk17 "18.0.2"
1530 "1yimfdkwpinhg5cf1mcrzk9xvjwnray3cx762kypb9jcwbranjwx"))
1531
1532(define-public openjdk19
1533 (make-openjdk openjdk18 "19.0.2"
1534 "08kvx7n8qhhfl25pig966881j5h4x7y0pf4brq16x0283fc0f4d4"
1535 (arguments
1536 (substitute-keyword-arguments (package-arguments openjdk18)
1537 ((#:phases phases)
1538 #~(modify-phases #$phases
1539 (replace 'fix-java-shebangs
1540 (lambda _
1541 ;; Update file path.
1542 (substitute* "src/java.base/share/data/blockedcertsconverter/blocked.certs.pem"
1543 (("^#!.*") "#! java BlockedCertsConverter SHA-256\n"))))
1544 (add-before 'configure 'define-java-environment-variables
1545 (lambda* (#:key inputs #:allow-other-keys)
1546 ;; Fix for "valid range 1980-01-01T00:00:02Z to 2099-12-31T23:59:59Z".
1547 (setenv "SOURCE_DATE_EPOCH" "1234567890")))))))))
1548
1549;;; Convenience alias to point to the latest version of OpenJDK.
1550(define-public openjdk openjdk19)
1551
1552
1553;; This version of JBR is here in order to be able to build custom
1554;; IntelliJ plugins. Those usually need both jbr11 and jbr17 for
1555;; tests.
1556(define-public jbr11
1557 (package
1558 (inherit openjdk11)
1559 (name "jbr")
1560 (version "11_0_16-b2248")
1561 (source (origin
1562 (method git-fetch)
1563 (uri (git-reference
1564 (url "https://github.com/JetBrains/JetBrainsRuntime.git")
1565 (commit (string-append "jb" version))))
1566 (file-name (string-append name "-" version "-checkout"))
1567 (sha256
1568 (base32
1569 "1fnrdx0wb21ghm6jczjzk7b9fz9hbdzd62512xhwpzvca57v2z09"))))
1570 (arguments
1571 (substitute-keyword-arguments (package-arguments openjdk11)
1572 ((#:configure-flags configure-flags)
1573 #~(append #$configure-flags
1574 (list "--with-jvm-features=shenandoahgc"
1575 "--enable-cds=yes"
1576 "--with-vendor-name=JetBrains s.r.o"
1577 "--with-vendor-url=https://www.jetbrains.com/"
1578 "--with-vendor-bug-url=https://youtrack.jetbrains.com/issues/JBR")))))
1579 (synopsis "JetBrains Java Runtime")
1580 (description "This package provides a Java runtime environment for
1581and Java development kit. It supports enhanced class redefinition (DCEVM),
1582includes a number of improvements in font rendering, keyboards support,
1583windowing/focus subsystems, HiDPI, accessibility, and performance,
1584provides better desktop integration and bugfixes not yet present in
1585OpenJDK.")
1586 (home-page "https://www.jetbrains.com/")
1587 (license license:gpl2+)))
1588
1589(define-public jbr17
1590 (package
1591 (inherit openjdk17)
1592 (name "jbr")
1593 (version "17.0.7-b1020")
1594 (source (origin
1595 (method git-fetch)
1596 (uri (git-reference
1597 (url "https://github.com/JetBrains/JetBrainsRuntime.git")
1598 (commit (string-append "jb" version))))
1599 (file-name (string-append name "-" version "-checkout"))
1600 (sha256
1601 (base32
1602 "0wh9xhqgcjk0jgvpvlvf78dy3r8m0vgqd0f54whpx0qqbmyavgdw"))
1603 (patches (search-patches "jbr-17-xcursor-no-dynamic.patch"))))
1604 (arguments
1605 (substitute-keyword-arguments (package-arguments openjdk17)
1606 ((#:configure-flags configure-flags)
1607 #~(append #$configure-flags
1608 (list "--with-jvm-features=shenandoahgc"
1609 "--enable-cds=yes"
1610 "--with-vendor-name=JetBrains s.r.o"
1611 "--with-vendor-url=https://www.jetbrains.com/"
1612 "--with-vendor-bug-url=https://youtrack.jetbrains.com/issues/JBR")))))
1613 (synopsis "JetBrains Java Runtime")
1614 (description "This package provides a Java runtime environment for
1615and Java development kit. It supports enhanced class redefinition (DCEVM),
1616includes a number of improvements in font rendering, keyboards support,
1617windowing/focus subsystems, HiDPI, accessibility, and performance,
1618provides better desktop integration and bugfixes not yet present in
1619OpenJDK.")
1620 (home-page "https://www.jetbrains.com/")
1621 (license license:gpl2+)))
1622
1623
1624(define-public ant/java8
1625 (package
1626 (name "ant")
1627 (version "1.10.13")
1628 (source (origin
1629 (method url-fetch)
1630 (uri (string-append "mirror://apache/ant/source/apache-ant-"
1631 version "-src.tar.gz"))
1632 (sha256
1633 (base32
1634 "01l4g9b1xnnq450ljvhrlvcf8wzzmr45wmhkybrx0hcdi166y06s"))
1635 (modules '((guix build utils)))
1636 (snippet
1637 '(begin
1638 (for-each delete-file
1639 (find-files "lib/optional" "\\.jar$"))
1640 #t))))
1641 (build-system gnu-build-system)
1642 (arguments
1643 (list
1644 #:modules '((srfi srfi-1)
1645 (guix build gnu-build-system)
1646 (guix build utils))
1647 #:tests? #f ;no "check" target
1648 #:phases
1649 #~(modify-phases %standard-phases
1650 (add-after 'unpack 'remove-scripts
1651 ;; Remove bat / cmd scripts for DOS as well as the antRun and runant
1652 ;; wrappers.
1653 (lambda _
1654 (for-each delete-file
1655 (find-files "src/script"
1656 "(.*\\.(bat|cmd)|runant.*|antRun.*)"))))
1657 (delete 'bootstrap)
1658 (delete 'configure)
1659 (replace 'build
1660 (lambda* (#:key inputs #:allow-other-keys)
1661 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
1662
1663 ;; Disable tests to avoid dependency on hamcrest-core, which needs
1664 ;; Ant to build. This is necessary in addition to disabling the
1665 ;; "check" phase, because the dependency on "test-jar" would always
1666 ;; result in the tests to be run.
1667 (substitute* "build.xml"
1668 (("depends=\"jars,test-jar") "depends=\"jars"))
1669 (invoke "bash" "bootstrap.sh"
1670 (string-append "-Ddist.dir=" #$output))))
1671 (add-after 'build 'strip-jar-timestamps ;based on ant-build-system
1672 (lambda _
1673 (define (repack-archive jar)
1674 (let* ((dir (mkdtemp "jar-contents.XXXXXX"))
1675 (manifest (string-append dir "/META-INF/MANIFESTS.MF")))
1676 (with-directory-excursion dir
1677 (invoke "unzip" jar))
1678 (delete-file jar)
1679 ;; XXX: copied from (gnu build install)
1680 (for-each (lambda (file)
1681 (let ((s (lstat file)))
1682 (unless (eq? (stat:type s) 'symlink)
1683 (utime file 0 0 0 0))))
1684 (find-files dir #:directories? #t))
1685 ;; It is important that the manifest appears first.
1686 (with-directory-excursion dir
1687 (let* ((files (find-files "." ".*" #:directories? #t))
1688 ;; To ensure that the reference scanner can
1689 ;; detect all store references in the jars
1690 ;; we disable compression with the "-0" option.
1691 (command (if (file-exists? manifest)
1692 `("zip" "-0" "-X" ,jar ,manifest
1693 ,@files)
1694 `("zip" "-0" "-X" ,jar ,@files))))
1695 (apply invoke command)))))
1696 (for-each repack-archive
1697 (find-files
1698 (string-append #$output "/lib")
1699 "\\.jar$"))))
1700 (delete 'install))))
1701 (native-inputs
1702 `(("jdk" ,icedtea-8 "jdk")
1703 ("zip" ,zip)
1704 ("unzip" ,unzip)))
1705 (home-page "https://ant.apache.org")
1706 (synopsis "Build tool for Java")
1707 (description
1708 "Ant is a platform-independent build tool for Java. It is similar to
1709make but is implemented using the Java language, requires the Java platform,
1710and is best suited to building Java projects. Ant uses XML to describe the
1711build process and its dependencies, whereas Make uses Makefile format.")
1712 (license license:asl2.0)))
1713
1714;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x series
1715;; requires Java 8.
1716(define-public ant
1717 (package (inherit ant/java8)
1718 (version "1.9.15")
1719 (source (origin
1720 (method url-fetch)
1721 (uri (string-append "mirror://apache/ant/source/apache-ant-"
1722 version "-src.tar.gz"))
1723 (sha256
1724 (base32
1725 "1xy30f1w5gaqk6g3f0vw7ygix4rb6032qkcw42y4z8wd9jihgygd"))))
1726 ;; XXX: we do this to avoid a rebuild. This mess will be cleaned up
1727 ;; later.
1728 (arguments
1729 (substitute-keyword-arguments
1730 `(#:modules ((srfi srfi-1)
1731 (guix build gnu-build-system)
1732 (guix build utils))
1733 #:tests? #f ; no "check" target
1734 #:phases
1735 (modify-phases %standard-phases
1736 (delete 'bootstrap)
1737 (delete 'configure)
1738 (add-before 'build 'define-java-environment-variables
1739 (lambda* (#:key inputs #:allow-other-keys)
1740 ;; First, set environment variables (eases debugging on -K).
1741 (setenv "JAVA_HOME" (assoc-ref inputs "jamvm"))
1742 (setenv "JAVACMD" (search-input-file inputs "/bin/jamvm"))
1743 (setenv "JAVAC" (search-input-file inputs "/bin/jikes"))
1744 (setenv "CLASSPATH" (search-input-file inputs "/lib/rt.jar"))))
1745 (replace 'build
1746 (lambda* (#:key inputs outputs #:allow-other-keys)
1747 ;; Ant complains if this file doesn't exist.
1748 (setenv "HOME" "/tmp")
1749 (with-output-to-file "/tmp/.ant.properties"
1750 (lambda _ (display "")))
1751
1752 ;; Use jikes instead of javac for <javac ...> tags in build.xml
1753 (setenv "ANT_OPTS" "-Dbuild.compiler=jikes")
1754
1755 ;; jikes produces lots of warnings, but they are not very
1756 ;; interesting, so we silence them.
1757 (setenv "$BOOTJAVAC_OPTS" "-nowarn")
1758
1759 ;; Without these JamVM options the build may freeze.
1760 (substitute* "bootstrap.sh"
1761 (("^\"\\$\\{JAVACMD\\}\" " m)
1762 ,@(if (string-prefix? "armhf" (or (%current-system)
1763 (%current-target-system)))
1764 `((string-append m "-Xnocompact "))
1765 `((string-append m "-Xnocompact -Xnoinlining ")))))
1766
1767 ;; Disable tests because we are bootstrapping and thus don't have
1768 ;; any of the dependencies required to build and run the tests.
1769 (substitute* "build.xml"
1770 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
1771 (invoke "bash" "bootstrap.sh"
1772 (string-append "-Ddist.dir="
1773 (assoc-ref outputs "out")))))
1774 (add-after 'build 'strip-jar-timestamps ;based on ant-build-system
1775 (lambda* (#:key outputs #:allow-other-keys)
1776 (define (repack-archive jar)
1777 (let* ((dir (mkdtemp "jar-contents.XXXXXX"))
1778 (manifest (string-append dir "/META-INF/MANIFESTS.MF")))
1779 (with-directory-excursion dir
1780 (invoke "unzip" jar))
1781 (delete-file jar)
1782 ;; XXX: copied from (gnu build install)
1783 (for-each (lambda (file)
1784 (let ((s (lstat file)))
1785 (unless (eq? (stat:type s) 'symlink)
1786 (utime file 0 0 0 0))))
1787 (find-files dir #:directories? #t))
1788 ;; It is important that the manifest appears first.
1789 (with-directory-excursion dir
1790 (let* ((files (find-files "." ".*" #:directories? #t))
1791 ;; To ensure that the reference scanner can
1792 ;; detect all store references in the jars
1793 ;; we disable compression with the "-0" option.
1794 (command (if (file-exists? manifest)
1795 `("zip" "-0" "-X" ,jar ,manifest
1796 ,@files)
1797 `("zip" "-0" "-X" ,jar ,@files))))
1798 (apply invoke command)))))
1799 (for-each repack-archive
1800 (find-files
1801 (string-append (assoc-ref %outputs "out") "/lib")
1802 "\\.jar$"))))
1803 (delete 'install)))
1804 ((#:phases phases)
1805 `(modify-phases ,phases
1806 (delete 'define-java-environment-variables)
1807 (add-after 'unpack 'remove-scripts
1808 ;; Remove bat / cmd scripts for DOS as well as the antRun and runant
1809 ;; wrappers.
1810 (lambda _
1811 (for-each delete-file
1812 (find-files "src/script"
1813 "(.*\\.(bat|cmd)|runant.*|antRun.*)"))
1814 #t))
1815 (replace 'build
1816 (lambda* (#:key inputs outputs #:allow-other-keys)
1817 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
1818
1819 ;; Disable tests to avoid dependency on hamcrest-core, which needs
1820 ;; Ant to build. This is necessary in addition to disabling the
1821 ;; "check" phase, because the dependency on "test-jar" would always
1822 ;; result in the tests to be run.
1823 (substitute* "build.xml"
1824 (("depends=\"jars,test-jar") "depends=\"jars"))
1825 (invoke "bash" "bootstrap.sh"
1826 (string-append "-Ddist.dir="
1827 (assoc-ref outputs "out")))))))))
1828 (native-inputs
1829 `(("jdk" ,icedtea-7 "jdk")
1830 ("zip" ,zip)
1831 ("unzip" ,unzip)))))
1832
1833(define-public ant-apache-bcel
1834 (package
1835 (inherit ant/java8)
1836 (name "ant-apache-bcel")
1837 (arguments
1838 (substitute-keyword-arguments (package-arguments ant/java8)
1839 ((#:phases phases)
1840 #~(modify-phases #$phases
1841 (add-after 'unpack 'link-bcel
1842 (lambda* (#:key inputs #:allow-other-keys)
1843 (for-each (lambda (file)
1844 (symlink file
1845 (string-append "lib/optional/"
1846 (basename file))))
1847 (find-files (assoc-ref inputs "java-commons-bcel")
1848 "\\.jar$"))))
1849 (add-after 'build 'install
1850 (lambda _
1851 (let ((share (string-append #$output "/share/java"))
1852 (bin (string-append #$output "/bin"))
1853 (lib (string-append #$output "/lib")))
1854 (mkdir-p share)
1855 (install-file (string-append lib "/ant-apache-bcel.jar") share)
1856 (delete-file-recursively bin)
1857 (delete-file-recursively lib))))))))
1858 (inputs
1859 (modify-inputs (package-inputs ant/java8)
1860 (prepend java-commons-bcel)))))
1861
1862(define-public ant-junit
1863 (package
1864 (inherit ant/java8)
1865 (name "ant-junit")
1866 (arguments
1867 (substitute-keyword-arguments (package-arguments ant/java8)
1868 ((#:phases phases)
1869 #~(modify-phases #$phases
1870 (add-after 'unpack 'link-junit
1871 (lambda* (#:key inputs #:allow-other-keys)
1872 (for-each (lambda (file)
1873 (symlink file
1874 (string-append "lib/optional/"
1875 (basename file))))
1876 (find-files (assoc-ref inputs "java-junit")
1877 "\\.jar$"))))
1878 (add-after 'build 'install
1879 (lambda _
1880 (let ((share (string-append #$output "/share/java"))
1881 (bin (string-append #$output "/bin"))
1882 (lib (string-append #$output "/lib")))
1883 (mkdir-p share)
1884 (install-file (string-append lib "/ant-junit.jar") share)
1885 (delete-file-recursively bin)
1886 (delete-file-recursively lib))))))))
1887 (inputs
1888 (modify-inputs (package-inputs ant/java8)
1889 (prepend java-junit)))))
1890
1891(define-public libantlr3c
1892 (package
1893 (name "libantlr3c")
1894 (version "3.4")
1895 (source
1896 (origin
1897 (method url-fetch)
1898 (uri
1899 (string-append "https://www.antlr3.org/download/C/"
1900 name "-" version ".tar.gz"))
1901 (sha256
1902 (base32 "0lpbnb4dq4azmsvlhp6khq1gy42kyqyjv8gww74g5lm2y6blm4fa"))))
1903 (build-system gnu-build-system)
1904 (arguments
1905 `(#:configure-flags (list "--enable-debuginfo"
1906 "--disable-static"
1907 ,@(if (target-64bit?)
1908 `("--enable-64bit")
1909 '()))))
1910 (synopsis "ANTLR C Library")
1911 (description "LIBANTLR3C provides run-time C libraries for ANTLR3 (ANother
1912Tool for Language Recognition v3).")
1913 (home-page "https://www.antlr3.org/")
1914 (license license:bsd-3)))
1915
1916(define-public drip
1917 ;; Last release is from 2014, with a few important commits afterwards.
1918 (let ((commit "a4bd00df0199e78243847f06cc04ecaea31f8f08"))
1919 (package
1920 (name "drip")
1921 (version (git-version "0.2.4" "1" commit))
1922 (source (origin
1923 (method git-fetch)
1924 (uri (git-reference
1925 (url "https://github.com/ninjudd/drip")
1926 (commit commit)))
1927 (file-name (git-file-name name version))
1928 (sha256
1929 (base32
1930 "0wzmjwfyldr3jn49517xd8yn7dgdk8h88qkga3kjyg1zc375ylg2"))))
1931 (build-system gnu-build-system)
1932 (native-inputs
1933 `(("jdk" ,icedtea "jdk")))
1934 (arguments
1935 `(#:tests? #f ; No tests.
1936 #:phases
1937 (modify-phases %standard-phases
1938 (delete 'configure)
1939 (add-before 'install 'fix-wrapper
1940 (lambda* (#:key inputs #:allow-other-keys)
1941 (let ((jps (search-input-file inputs "/bin/jps")))
1942 (substitute* "bin/drip"
1943 (("jps") jps)
1944 (("brew update && brew upgrade drip") "guix pull && guix install drip")
1945 ;; No need to make:
1946 (("\\(cd -- \"\\$drip_dir\" && make -s\\) \\|\\| exit 1") "")
1947 ;; No need to include source:
1948 (("\\[\\[ -r \\$drip_dir/src/org/flatland/drip/Main\\.java \\]\\]")
1949 "true"))
1950 #t)))
1951 (replace 'install
1952 (lambda* (#:key outputs #:allow-other-keys)
1953 (let* ((out (assoc-ref outputs "out"))
1954 (bin (string-append out "/bin"))
1955 (share (string-append out "/share/drip")))
1956 (mkdir-p bin)
1957 (for-each
1958 (lambda (file)
1959 (install-file (string-append "bin/" file) bin))
1960 '("drip" "drip_daemon" "drip_proxy"))
1961 (install-file "drip.jar" share)
1962 (substitute* (string-append bin "/drip")
1963 (("drip_dir=\\$bin_dir/..")
1964 (string-append "drip_dir=" share)))
1965 #t))))))
1966 (home-page "https://github.com/ninjudd/drip")
1967 (synopsis "Faster Java Virtual Machine launching")
1968 (description "Drip is a launcher for the Java Virtual Machine that
1969provides much faster startup times than the @command{java} command. The @command{drip}
1970script is intended to be a drop-in replacement for the @command{java} command,
1971only faster.")
1972 (license license:epl1.0))))
1973
1974(define-public java-openjfx-build
1975 (package
1976 (name "java-openjfx-build")
1977 ;; This is a java-8 version
1978 (version "8.202")
1979 (source (origin
1980 (method hg-fetch)
1981 (uri (hg-reference
1982 (url "http://hg.openjdk.java.net/openjfx/8u-dev/rt")
1983 (changeset (string-append
1984 (string-join (string-split version #\.) "u")
1985 "-ga"))))
1986 (file-name (string-append name "-" version "-checkout"))
1987 (modules '((guix build utils)))
1988 (snippet
1989 '(begin
1990 ;; Delete included gradle jar
1991 (delete-file-recursively "gradle/wrapper")
1992 #t))
1993 (sha256
1994 (base32
1995 "0yg38mwpivswccv9n96k06x3iv82i4px1a9xg9l8dswzwmfj259f"))
1996 (patches (search-patches "java-openjfx-build-jdk_version.patch"))))
1997 (build-system ant-build-system)
1998 (arguments
1999 `(#:jar-name "java-openjfx.jar"
2000 #:source-dir "buildSrc/src/main/java"
2001 #:test-dir "buildSrc/src/test"
2002 #:phases
2003 (modify-phases %standard-phases
2004 (add-before 'configure 'generate-jsl-parser
2005 (lambda _
2006 (invoke "antlr3" "-o"
2007 "buildSrc/src/main/java/com/sun/scenario/effect/compiler"
2008 "buildSrc/src/main/antlr/JSL.g"))))))
2009 (inputs
2010 (list antlr3 java-stringtemplate))
2011 (native-inputs
2012 (list java-junit java-hamcrest-core))
2013 (home-page "https://openjfx.io")
2014 (synopsis "Graphical application toolkit in Java")
2015 (description "OpenJFX is a client application platform for desktop,
2016mobile and embedded systems built on Java. Its goal is to produce a
2017modern, efficient, and fully featured toolkit for developing rich client
2018applications. This package contains base classes for the OpenJFX
2019distribution and helper classes for building other parts of the
2020distribution.")
2021 (license license:gpl2))) ;gpl2 only, with classpath exception
2022
2023(define-public java-openjfx-base
2024 (package (inherit java-openjfx-build)
2025 (name "java-openjfx-base")
2026 (arguments
2027 `(#:jar-name "java-openjfx-base.jar"
2028 #:source-dir "modules/base/src/main/java:modules/base/src/main/java8:modules/base/src/main/version-info"
2029 #:test-dir "modules/base/src/test"
2030 #:phases
2031 (modify-phases %standard-phases
2032 (add-before 'check 'remove-empty-file
2033 (lambda _
2034 (with-directory-excursion "modules/base/src/test/java"
2035 ;; These files are completely commented, but junit expects them to
2036 ;; contain a class, so tests fail.
2037 (delete-file
2038 "com/sun/javafx/property/adapter/PropertyDescriptorTest.java")
2039 (delete-file
2040 "com/sun/javafx/property/adapter/ReadOnlyPropertyDescriptorTest.java")
2041 (delete-file "javafx/beans/property/PropertiesTest.java")
2042 (delete-file
2043 "javafx/beans/property/adapter/ReadOnlyJavaBeanPropertyBuilder_General_Test.java")
2044 ;; This one fails
2045 (delete-file "com/sun/javafx/runtime/VersionInfoTest.java"))
2046 #t)))))
2047 (propagated-inputs
2048 (list java-openjfx-build))
2049 (description "OpenJFX is a client application platform for desktop,
2050mobile and embedded systems built on Java. Its goal is to produce a
2051modern, efficient, and fully featured toolkit for developing rich client
2052applications. This package contains base classes for the OpenJFX
2053distribution.")))
2054
2055(define-public java-openjfx-graphics
2056 (package (inherit java-openjfx-build)
2057 (name "java-openjfx-graphics")
2058 (arguments
2059 `(#:jar-name "java-openjfx-graphics.jar"
2060 #:source-dir "modules/graphics/src/main/java"
2061 #:tests? #f; require X
2062 #:test-dir "modules/graphics/src/test"
2063 #:phases
2064 (modify-phases %standard-phases
2065 (add-after 'unpack 'copy-missing-file
2066 (lambda* (#:key inputs #:allow-other-keys)
2067 (let ((target "modules/graphics/src/main/native-prism-sw/JNativeSurface.c"))
2068 (copy-file (assoc-ref inputs "JNativeSurface.c") target)
2069 ;; XXX: looks like the missing file we found isn't *quite*
2070 ;; compatible...
2071 (substitute* target
2072 (("case TYPE_INT_ARGB:") "")))))
2073 (add-after 'build 'build-native
2074 (lambda* (#:key inputs outputs #:allow-other-keys)
2075 (let ((jdk (assoc-ref inputs "jdk"))
2076 (class-file->class-name
2077 (lambda (class-file)
2078 (string-map (lambda (c)
2079 (if (char=? c #\/) #\. c))
2080 (string-drop-right class-file
2081 (string-length ".class"))))))
2082 (setenv "CPPFLAGS"
2083 (string-append "-DINLINE=inline "
2084 "-DLINUX "
2085 "-I" jdk "/include "
2086 "-I" jdk "/include/linux "
2087 "-I " (getcwd) "/build/classes/include "
2088 "-I " (getcwd) "/modules/graphics/src/main/native-prism-sw"))
2089
2090 ;; Instructions have been adapted from buildSrc/linux.gradle
2091 (with-directory-excursion "build/classes"
2092 ;; Build prism
2093 (mkdir-p "include")
2094
2095 ;; Generate headers for prism
2096 (apply invoke "javah" "-d" "include" "-cp" "."
2097 (map class-file->class-name
2098 (append (find-files "com/sun/prism/impl" "\\.class$")
2099 (find-files "com/sun/prism" "PresentableState.*\\.class$"))))
2100
2101 ;; ...then for prism_sw
2102 (apply invoke "javah" "-d" "include" "-cp" "."
2103 (map class-file->class-name
2104 (find-files "com/sun/pisces" "\\.class$")))
2105
2106 ;; ...and for prism_es2
2107 (apply invoke "javah" "-d" "include" "-cp" "."
2108 (map class-file->class-name
2109 (find-files "com/sun/prism/es2" "\\.class$")))))
2110
2111 (with-directory-excursion "netbeans/native-prism"
2112 (invoke "make" "CONF=Release"))
2113 (with-directory-excursion "netbeans/native-prism-sw"
2114 (invoke "make" "CONF=Release"))
2115 ;; TODO: This fails due to unknown EGL procedure names
2116 #;
2117 (with-directory-excursion "netbeans/native-prism-es2"
2118 (invoke "make" "CONF=Release"))
2119
2120 (let* ((out (assoc-ref outputs "out"))
2121 (dir ,(match (%current-system)
2122 ("i686-linux"
2123 "i386")
2124 ((or "armhf-linux" "aarch64-linux")
2125 "arm")
2126 ((or "x86_64-linux")
2127 "amd64")
2128 (_ "unknown")))
2129 (target (string-append out "/share/" dir "/")))
2130 (mkdir-p target)
2131 (for-each (lambda (file)
2132 (let ((new-name
2133 (string-append "lib"
2134 (string-map
2135 (lambda (c)
2136 (if (char=? c #\-) #\_ c))
2137 (string-drop (basename file)
2138 (string-length "libnative-"))))))
2139 (copy-file file
2140 (string-append target new-name))))
2141 (find-files "netbeans" "\\.so$"))))))))
2142 (propagated-inputs
2143 (list java-openjfx-base java-swt))
2144 ;; XXX: for unknown reasons
2145 ;; modules/graphics/src/main/native-prism-sw/JNativeSurface.c is missing
2146 ;; in this revision.
2147 (native-inputs
2148 `(("JNativeSurface.c"
2149 ,(origin
2150 (method url-fetch)
2151 (uri "https://raw.githubusercontent.com/openjdk/jfx/8u20-b02\
2152/modules/graphics/src/main/native-prism-sw/JNativeSurface.c")
2153 (sha256
2154 (base32
2155 "1kp15wbnd6rn0nciczp5ibq0ikby2yysvx1gnz5fa05vl2mm8mbm"))))))
2156 (description "OpenJFX is a client application platform for desktop,
2157mobile and embedded systems built on Java. Its goal is to produce a
2158modern, efficient, and fully featured toolkit for developing rich client
2159applications. This package contains graphics-related classes for the
2160OpenJFX distribution.")))
2161
2162(define-public java-openjfx-media
2163 (package (inherit java-openjfx-build)
2164 (name "java-openjfx-media")
2165 (propagated-inputs
2166 `(("java-openjxf-graphics" ,java-openjfx-graphics)))
2167 (arguments
2168 `(#:jar-name "java-openjfx-media.jar"
2169 #:source-dir "modules/media/src/main/java"
2170 #:tests? #f)); no tests
2171 (description "OpenJFX is a client application platform for desktop,
2172mobile and embedded systems built on Java. Its goal is to produce a
2173modern, efficient, and fully featured toolkit for developing rich client
2174applications. This package contains media-related classes for the
2175OpenJFX distribution.")))
2176
2177(define-public java-openjfx-controls
2178 (package (inherit java-openjfx-build)
2179 (name "java-openjfx-controls")
2180 (propagated-inputs
2181 `(("java-openjxf-graphics" ,java-openjfx-graphics)))
2182 (arguments
2183 `(#:jar-name "java-openjfx-controls.jar"
2184 #:source-dir "modules/controls/src/main/java"
2185 #:test-dir "modules/controls/src/test"
2186 ;; TODO: tests require com.sun.javafx.pgstub,
2187 ;; javafx.collections.MockSetObserver, and
2188 ;; com.sun.javafx.binding.ExpressionHelperUtility
2189 #:tests? #false
2190 #:phases
2191 (modify-phases %standard-phases
2192 (add-after 'unpack 'copy-resources
2193 (lambda _
2194 (copy-recursively "modules/controls/src/test/resources"
2195 "build/test-classes")
2196 (copy-recursively "modules/controls/src/main/resources"
2197 "build/classes"))))))
2198 (description "OpenJFX is a client application platform for desktop,
2199mobile and embedded systems built on Java. Its goal is to produce a
2200modern, efficient, and fully featured toolkit for developing rich client
2201applications. This package contains UI control classes for the
2202OpenJFX distribution.")))
2203
2204(define-public javacc-4
2205 (package
2206 (name "javacc")
2207 (version "4.1")
2208 (source (origin
2209 (method git-fetch)
2210 (uri (git-reference
2211 (url "https://github.com/javacc/javacc")
2212 (commit "release_41")))
2213 (file-name (string-append "javacc-" version "-checkout"))
2214 (sha256
2215 (base32
2216 "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0"))
2217 (modules '((guix build utils)))
2218 ;; delete bundled jars
2219 (snippet '(begin (delete-file-recursively "lib") #t))))
2220 (build-system ant-build-system)
2221 ;; Tests fail with
2222 ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60:
2223 ;; JAVACODE failed
2224 (arguments
2225 `(#:tests? #f
2226 #:phases
2227 (modify-phases %standard-phases
2228 ;; Delete tests to avoid build failure (we don't run them anyway).
2229 (add-after 'unpack 'delete-tests
2230 (lambda _
2231 (for-each delete-file
2232 '("src/org/javacc/JavaCCTestCase.java"
2233 "src/org/javacc/parser/ExpansionTest.java"
2234 "src/org/javacc/parser/OptionsTest.java"
2235 "src/org/javacc/jjtree/JJTreeOptionsTest.java"))
2236 (for-each delete-file-recursively
2237 '("src/org/javacc/parser/test"
2238 "src/org/javacc/jjdoc/test"))
2239 #t))
2240 (replace 'install (install-jars "bin/lib")))))
2241 (home-page "https://javacc.org/")
2242 (synopsis "Java parser generator")
2243 (description "Java Compiler Compiler (JavaCC) is the most popular parser
2244generator for use with Java applications. A parser generator is a tool that
2245reads a grammar specification and converts it to a Java program that can
2246recognize matches to the grammar. In addition to the parser generator itself,
2247JavaCC provides other standard capabilities related to parser generation such
2248as tree building (via a tool called JJTree included with JavaCC), actions,
2249debugging, etc.")
2250 (license license:bsd-3)))
2251
2252;; javacc-3, as javacc-4 is not properly bootstrapped: is contains a javacc.jar
2253;; in the bootstrap/ directory.
2254(define-public javacc-3
2255 (package
2256 (inherit javacc-4)
2257 (version "3.2")
2258 (source (origin
2259 (method git-fetch)
2260 (uri (git-reference
2261 (url "https://github.com/javacc/javacc")
2262 (commit "release_32")))
2263 (file-name (string-append "javacc-" version "-checkout"))
2264 (sha256
2265 (base32
2266 "1pyf1xyh8gk83nxqn2v2mdws32l68ydznha41cxa4l2kkbq1v1g3"))))
2267 (arguments
2268 `(#:tests? #f
2269 #:phases
2270 (modify-phases %standard-phases
2271 (add-before 'build 'set-java-version
2272 (lambda _
2273 (for-each
2274 (lambda (file)
2275 (substitute* file
2276 (("debug=") "source=\"1.4\" debug=")))
2277 (find-files "." "build.xml"))
2278 #t))
2279 (replace 'install (install-jars "bin/lib")))))))
2280
2281(define-public javacc
2282 (package
2283 (inherit javacc-4)
2284 (version "7.0.4")
2285 (source
2286 (origin
2287 (method git-fetch)
2288 (uri (git-reference
2289 (url "https://github.com/javacc/javacc")
2290 (commit version)))
2291 (file-name (git-file-name "javacc" version))
2292 (sha256
2293 (base32 "18kkak3gda93gr25jrgy6q00g0jr8i24ri2wk4kybz1v234fxx9i"))
2294 (modules '((guix build utils)))
2295 ;; Delete bundled jars.
2296 (snippet '(begin (for-each delete-file-recursively
2297 '("bootstrap" "lib"))
2298 #t))))
2299 (arguments
2300 `(#:make-flags ; bootstrap from javacc-4
2301 ,#~(list (string-append "-Dbootstrap-jar="
2302 #$(this-package-native-input "javacc")
2303 "/share/java/javacc.jar"))
2304 #:test-target "test"
2305 #:phases
2306 (modify-phases %standard-phases
2307 (replace 'install (install-jars "target"))
2308 (add-after 'install 'install-bin
2309 (lambda* (#:key outputs inputs #:allow-other-keys)
2310 (let* ((out (assoc-ref outputs "out"))
2311 (dir (string-append out "/share/java"))
2312 (bin (string-append out "/bin"))
2313 (javacc (string-append bin "/javacc")))
2314 (mkdir-p bin)
2315 (with-output-to-file javacc
2316 (lambda _
2317 (display
2318 (string-append "#!/bin/sh\n"
2319 (assoc-ref inputs "jdk") "/bin/java"
2320 " -cp " dir "/javacc.jar" " `basename $0`" " $*"))))
2321 (chmod javacc #o755)
2322 ;; symlink to different names to affect the first argument and
2323 ;; change the behavior of the jar file.
2324 (symlink javacc (string-append bin "/jjdoc"))
2325 (symlink javacc (string-append bin "/jjtree"))
2326 #t))))))
2327
2328 (native-inputs
2329 (list javacc-4))))
2330
2331(define-public java-ecj
2332 (package
2333 (name "java-ecj")
2334 (version "4.6.3")
2335 (source
2336 (origin
2337 (method url-fetch)
2338 (uri (string-append "http://archive.eclipse.org/eclipse/"
2339 "downloads/drops4/R-" version "-201703010400/"
2340 "ecjsrc-" version ".jar"))
2341 (sha256
2342 (base32
2343 "11cfgsdgznja1pvlxkjbqykxd7pcd5655vkm7s44xmahmap15gpl"))))
2344 (build-system ant-build-system)
2345 (arguments
2346 `(#:tests? #f ; none included
2347 #:build-target "build"
2348 #:phases
2349 (modify-phases %standard-phases
2350 (add-after 'unpack 'fix-build.xml
2351 (lambda _
2352 (substitute* "src/build.xml"
2353 (("^.*MANIFEST.*$")
2354 "")
2355 (("^.*properties.*$")
2356 "<include name=\"**/*.properties\"/>
2357 <include name=\"**/*.props\"/>"))))
2358 (add-before 'build 'chdir
2359 (lambda _ (chdir "src")))
2360 (replace 'install (install-jars ".")))))
2361 (home-page "https://eclipse.org")
2362 (synopsis "Eclipse Java development tools core batch compiler")
2363 (description "This package provides the Eclipse Java core batch compiler.")
2364 (license license:epl1.0)))
2365
2366(define-public java-cisd-base
2367 (let ((revision 38938)
2368 (base-version "14.12.0"))
2369 (package
2370 (name "java-cisd-base")
2371 (version (string-append base-version "-" (number->string revision)))
2372 (source (origin
2373 (method svn-fetch)
2374 (uri (svn-reference
2375 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2376 "base/tags/release/"
2377 (version-major+minor base-version)
2378 ".x/" base-version "/base/"))
2379 (revision revision)))
2380 (file-name (string-append "java-cisd-base-" version "-checkout"))
2381 (sha256
2382 (base32
2383 "1i5adyf7nzclb0wydgwa1az04qliid8035vpahaandmkmigbnxiy"))
2384 (modules '((guix build utils)))
2385 (snippet
2386 '(begin
2387 ;; Delete included gradle jar
2388 (delete-file-recursively "gradle/wrapper")
2389 ;; Delete pre-built native libraries
2390 (delete-file-recursively "libs")
2391 #t))))
2392 (build-system ant-build-system)
2393 (arguments
2394 `(#:make-flags '("-file" "build/build.xml")
2395 #:test-target "jar-test"
2396 #:jdk ,icedtea-8
2397 #:phases
2398 (modify-phases %standard-phases
2399 (add-after 'unpack 'unpack-build-resources
2400 (lambda* (#:key inputs #:allow-other-keys)
2401 (copy-recursively (assoc-ref inputs "build-resources")
2402 "../build_resources")
2403 #t))
2404 (add-after 'unpack-build-resources 'fix-dependencies
2405 (lambda* (#:key inputs #:allow-other-keys)
2406 (substitute* "build/build.xml"
2407 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2408 (search-input-file inputs
2409 "/share/java/java-testng.jar"))
2410 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2411 (search-input-file inputs
2412 (string-append
2413 "/share/java/commons-lang-"
2414 ,(package-version java-commons-lang)
2415 ".jar")))
2416 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2417 (search-input-file inputs
2418 (string-append
2419 "/lib/m2/commons-io/commons-io/"
2420 ,(package-version java-commons-io)
2421 "/commons-io-"
2422 ,(package-version java-commons-io)
2423 ".jar")))
2424 ;; Remove dependency on svn
2425 (("<build-info.*") "")
2426 (("\\$\\{revision.number\\}")
2427 ,(number->string revision))
2428 (("\\$\\{version.number\\}") ,base-version))
2429 ;; Remove dependency on classycle
2430 (substitute* "../build_resources/ant/build-common.xml"
2431 (("<taskdef name=\"dependency-checker.*") "")
2432 (("classname=\"classycle.*") "")
2433 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2434 #t))
2435 ;; A few tests fail because of the lack of a proper /etc/groups and
2436 ;; /etc/passwd file in the build container.
2437 (add-after 'unpack 'disable-broken-tests
2438 (lambda _
2439 (substitute* "sourceTest/java/ch/systemsx/cisd/base/AllTests.java"
2440 (("Unix.isOperational\\(\\)") "false"))
2441 #t))
2442 ;; These decorators are almost useless and pull in an unpackaged
2443 ;; dependency.
2444 (add-after 'unpack 'remove-useless-decorators
2445 (lambda _
2446 (substitute* "source/java/ch/systemsx/cisd/base/unix/Unix.java"
2447 (("@Private") "")
2448 (("import ch.rinn.restrictions.Private;") ""))
2449 (substitute* "sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java"
2450 (("@Friend.*") "")
2451 (("import ch.rinn.restrictions.Friend;") ""))
2452 #t))
2453 (add-before 'configure 'build-native-code
2454 (lambda* (#:key inputs #:allow-other-keys)
2455 (let ((jdk (assoc-ref inputs "jdk"))
2456 (dir ,(match (%current-system)
2457 ("i686-linux"
2458 "i386-Linux")
2459 ((or "armhf-linux" "aarch64-linux")
2460 "arm-Linux")
2461 ((or "x86_64-linux")
2462 "amd64-Linux")
2463 (_ "unknown-Linux"))))
2464 (with-directory-excursion "source/c"
2465 (invoke "gcc" "-shared" "-O3" "-fPIC" "unix.c"
2466 (string-append "-I" jdk "/include")
2467 (string-append "-I" jdk "/include/linux")
2468 "-o" "libunix.so")
2469 (invoke "gcc" "-shared" "-O3" "-fPIC"
2470 "-DMACHINE_BYTE_ORDER=1"
2471 "copyCommon.c"
2472 "copyByteChar.c"
2473 "copyByteDouble.c"
2474 "copyByteFloat.c"
2475 "copyByteInt.c"
2476 "copyByteLong.c"
2477 "copyByteShort.c"
2478 (string-append "-I" jdk "/include")
2479 (string-append "-I" jdk "/include/linux")
2480 "-o" "libnativedata.so"))
2481 (install-file "source/c/libunix.so"
2482 (string-append "libs/native/unix/" dir))
2483 (install-file "source/c/libnativedata.so"
2484 (string-append "libs/native/nativedata/" dir))
2485 #t)))
2486 ;; In the "check" phase we only build the test executable.
2487 (add-after 'check 'run-tests
2488 (lambda _
2489 (invoke "java" "-jar" "targets/dist/sis-base-test.jar")
2490 (delete-file "targets/dist/sis-base-test.jar")
2491 #t))
2492 (replace 'install (install-jars "targets/dist")))))
2493 (native-inputs
2494 `(("jdk" ,icedtea-8)
2495 ("java-commons-lang" ,java-commons-lang)
2496 ("java-commons-io" ,java-commons-io)
2497 ("java-testng" ,java-testng)
2498 ("build-resources"
2499 ,(origin
2500 (method svn-fetch)
2501 (uri (svn-reference
2502 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2503 "base/tags/release/"
2504 (version-major+minor base-version)
2505 ".x/" base-version
2506 "/build_resources/"))
2507 (revision revision)))
2508 (sha256
2509 (base32
2510 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
2511 (home-page "https://svnsis.ethz.ch")
2512 (synopsis "Utility classes for libraries from ETH Zurich")
2513 (description "This library supplies some utility classes needed for
2514libraries from the SIS division at ETH Zurich like jHDF5.")
2515 ;; The C sources are under a non-copyleft license, which looks like a
2516 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
2517 (license (list license:asl2.0
2518 (license:non-copyleft "file://source/c/COPYING"))))))
2519
2520(define-public java-cisd-args4j
2521 (let ((revision 39162)
2522 (base-version "9.11.2"))
2523 (package
2524 (name "java-cisd-args4j")
2525 (version (string-append base-version "-" (number->string revision)))
2526 (source (origin
2527 (method svn-fetch)
2528 (uri (svn-reference
2529 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2530 "args4j/tags/release/"
2531 (version-major+minor base-version)
2532 ".x/" base-version "/args4j/"))
2533 (revision revision)))
2534 (file-name (string-append "java-cisd-args4j-" version "-checkout"))
2535 (sha256
2536 (base32
2537 "0hhqznjaivq7ips7mkwas78z42s6djsm20rrs7g1zd59rcsakxn2"))))
2538 (build-system ant-build-system)
2539 (arguments
2540 `(#:make-flags '("-file" "build/build.xml")
2541 #:tests? #f ; there are no tests
2542 #:modules ((guix build ant-build-system)
2543 (guix build utils)
2544 (guix build java-utils)
2545 (sxml simple)
2546 (sxml transform)
2547 (sxml xpath))
2548 #:phases
2549 (modify-phases %standard-phases
2550 (add-after 'unpack 'unpack-build-resources
2551 (lambda* (#:key inputs #:allow-other-keys)
2552 (mkdir-p "../build_resources")
2553 (copy-recursively (assoc-ref inputs "build-resources")
2554 "../build_resources")
2555 (mkdir-p "../build_resources/lib")))
2556 (add-after 'unpack-build-resources 'fix-dependencies
2557 (lambda* (#:key inputs #:allow-other-keys)
2558 ;; FIXME: There should be a more convenient abstraction for
2559 ;; editing XML files.
2560 (with-directory-excursion "../build_resources/ant/"
2561 (chmod "build-common.xml" #o664)
2562 (call-with-output-file "build-common.xml.new"
2563 (lambda (port)
2564 (sxml->xml
2565 (pre-post-order
2566 (with-input-from-file "build-common.xml"
2567 (lambda _ (xml->sxml #:trim-whitespace? #t)))
2568 `(;; Remove dependency on classycle and custom ant tasks
2569 (taskdef . ,(lambda (tag . kids)
2570 (let ((name ((sxpath '(name *text*)) kids)))
2571 (if (or (member "build-info" name)
2572 (member "dependency-checker" name)
2573 (member "build-java-subprojects" name)
2574 (member "project-classpath" name))
2575 '() ; skip
2576 `(,tag ,@kids)))))
2577 (typedef . ,(lambda (tag . kids)
2578 (let ((name ((sxpath '(name *text*)) kids)))
2579 (if (member "recursive-jar" name)
2580 '() ; skip
2581 `(,tag ,@kids)))))
2582 (build-java-subprojects . ,(lambda _ '()))
2583 ;; Ignore everything else
2584 (*default* . ,(lambda (tag . kids) `(,tag ,@kids)))
2585 (*text* . ,(lambda (_ txt) txt))))
2586 port)))
2587 (rename-file "build-common.xml.new" "build-common.xml"))
2588 (substitute* "build/build.xml"
2589 (("\\$\\{lib\\}/cisd-base/cisd-base.jar")
2590 (search-input-file inputs "/share/java/sis-base.jar"))
2591 ;; Remove dependency on svn
2592 (("<build-info.*") "")
2593 (("\\$\\{revision.number\\}")
2594 ,(number->string revision))
2595 (("\\$\\{version.number\\}") ,base-version)
2596 ;; Don't use custom ant tasks.
2597 (("recursive-jar") "jar")
2598 (("<project-classpath.*") ""))))
2599 (replace 'install (install-jars "targets/dist")))))
2600 (inputs
2601 (list java-cisd-base))
2602 (native-inputs
2603 `(("ecj" ,java-ecj)
2604 ("build-resources"
2605 ,(origin
2606 (method svn-fetch)
2607 (uri (svn-reference
2608 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2609 "args4j/tags/release/"
2610 (version-major+minor base-version)
2611 ".x/" base-version
2612 "/build_resources/"))
2613 (revision revision)))
2614 (sha256
2615 (base32
2616 "056cam4k8pll7ass31sy6gwn8g8719njc41yf4l02b0342nilkyf"))
2617 (modules '((guix build utils)))
2618 ;; Delete bundled pre-built jars.
2619 (snippet
2620 '(begin (delete-file-recursively "lib/") #t))))))
2621 (home-page "https://svnsis.ethz.ch")
2622 (synopsis "Command line parser library")
2623 (description "This package provides a parser for command line arguments.")
2624 (license license:asl2.0))))
2625
2626(define-public java-cisd-jhdf5
2627 (let ((revision 39162)
2628 (base-version "14.12.6"))
2629 (package
2630 (name "java-cisd-jhdf5")
2631 (version (string-append base-version "-" (number->string revision)))
2632 (source (origin
2633 (method svn-fetch)
2634 (uri (svn-reference
2635 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2636 "jhdf5/tags/release/"
2637 (version-major+minor base-version)
2638 ".x/" base-version "/jhdf5/"))
2639 (revision revision)))
2640 (file-name (string-append "java-cisd-jhdf5-" version "-checkout"))
2641 (sha256
2642 (base32
2643 "13i17s2hn0q9drdqvp8csy7770p3hdbh9rp30ihln2ldkfawdmz0"))
2644 (modules '((guix build utils)))
2645 (snippet
2646 '(begin
2647 ;; Delete included gradle jar
2648 (delete-file-recursively "gradle/wrapper")
2649 ;; Delete pre-built native libraries
2650 (delete-file-recursively "libs")))))
2651 (build-system ant-build-system)
2652 (arguments
2653 `(#:make-flags '("-file" "build/build.xml")
2654 #:build-target "jar-all"
2655 #:test-target "jar-test"
2656 #:phases
2657 (modify-phases %standard-phases
2658 ;; FIXME: this build phase fails.
2659 (delete 'generate-jar-indices)
2660 ;; Don't erase results from the build phase when building tests.
2661 (add-after 'unpack 'separate-test-target-from-clean
2662 (lambda _
2663 (substitute* "build/build.xml"
2664 (("\"jar-test\" depends=\"clean, ")
2665 "\"jar-test\" depends=\""))))
2666 (add-after 'unpack 'unpack-build-resources
2667 (lambda* (#:key inputs #:allow-other-keys)
2668 (copy-recursively (assoc-ref inputs "build-resources")
2669 "../build_resources")
2670 (delete-file-recursively "../build_resources/lib/")
2671 (mkdir-p "../build_resources/lib")
2672 ;; Remove dependency on classycle
2673 (substitute* "../build_resources/ant/build-common.xml"
2674 (("<taskdef name=\"dependency-checker.*") "")
2675 (("classname=\"classycle.*") "")
2676 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2677 ;; Remove dependency on svn
2678 (substitute* "build/build.xml"
2679 (("<build-info.*") "")
2680 (("\\$\\{revision.number\\}")
2681 ,(number->string revision))
2682 (("\\$\\{version.number\\}") ,base-version))))
2683 (add-after 'unpack-build-resources 'fix-dependencies
2684 (lambda* (#:key inputs #:allow-other-keys)
2685 (substitute* "../build_resources/ant/build-common.xml"
2686 (("../libraries/testng/testng-jdk15.jar")
2687 (search-input-file inputs
2688 "/share/java/java-testng.jar")))
2689 (substitute* "build/build.xml"
2690 (("\\$\\{lib\\}/sis-base/sis-base.jar")
2691 (search-input-file inputs
2692 "/share/java/sis-base.jar"))
2693 (("\\$\\{lib\\}/cisd-args4j/cisd-args4j.jar")
2694 (search-input-file inputs
2695 "/share/java/cisd-args4j.jar"))
2696 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2697 (search-input-file inputs
2698 (string-append
2699 "/share/java/commons-lang-"
2700 ,(package-version java-commons-lang)
2701 ".jar")))
2702 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2703 (search-input-file inputs
2704 (string-append
2705 "/lib/m2/commons-io/commons-io/"
2706 ,(package-version java-commons-io)
2707 "/commons-io-"
2708 ,(package-version java-commons-io)
2709 ".jar")))
2710 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2711 (search-input-file inputs
2712 "/share/java/java-testng.jar"))
2713 (("\\$\\{lib\\}/junit4/junit.jar")
2714 (car (find-files (assoc-ref inputs "java-junit") "jar$")))
2715 (("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar")
2716 (car (find-files (assoc-ref inputs "java-hamcrest-core")
2717 "jar$"))))
2718 ;; Remove dependency on ch.rinn.restrictions
2719 (with-directory-excursion "source/java/ch/systemsx/cisd/hdf5/"
2720 (substitute* '("BitSetConversionUtils.java"
2721 "HDF5Utils.java")
2722 (("import ch.rinn.restrictions.Private;") "")
2723 (("@Private") "")))
2724 (with-directory-excursion "sourceTest/java/ch/systemsx/cisd/hdf5/"
2725 (substitute* '("BitSetConversionTest.java"
2726 "h5ar/HDF5ArchiverTest.java")
2727 (("import ch.rinn.restrictions.Friend;") "")
2728 (("@Friend.*") ""))
2729 ;; Remove leftovers from removing @Friend
2730 (substitute* "h5ar/HDF5ArchiverTest.java"
2731 (("\\{ HDF5Archiver.class, IdCache.class, LinkRecord.class \\}\\)")
2732 "")))))
2733 (add-before 'configure 'build-native-library
2734 (lambda* (#:key inputs #:allow-other-keys)
2735 (let ((jdk (assoc-ref inputs "jdk"))
2736 (hdf5 (assoc-ref inputs "hdf5"))
2737 (dir ,(match (%current-system)
2738 ("i686-linux"
2739 "i386-Linux")
2740 ((or "armhf-linux" "aarch64-linux")
2741 "arm-Linux")
2742 ((or "x86_64-linux")
2743 "amd64-Linux")
2744 (_ "unknown-Linux"))))
2745 (with-directory-excursion "source/c"
2746 (apply invoke `("gcc" "-shared" "-O3"
2747 "-fPIC"
2748 "-Wl,--exclude-libs,ALL"
2749 ,@(find-files "jhdf5" "\\.c$")
2750 ,@(find-files "hdf-java" "\\.c$")
2751 ,(string-append "-I" hdf5 "/include")
2752 ,(string-append "-I" jdk "/include")
2753 ,(string-append "-I" jdk "/include/linux")
2754 ,(string-append hdf5 "/lib/libhdf5.a")
2755 "-o" "libjhdf5.so" "-lz")))
2756 (install-file "source/c/libjhdf5.so"
2757 (string-append "libs/native/jhdf5/" dir)))))
2758 ;; In the "check" phase we only build the test executable.
2759 (add-after 'check 'run-tests
2760 (lambda _
2761 (invoke "java" "-jar" "targets/dist/sis-jhdf5-test.jar")
2762 (delete-file "targets/dist/sis-jhdf5-test.jar")))
2763 (replace 'install
2764 (install-jars "targets/dist")))))
2765 (inputs
2766 (list java-cisd-base
2767 java-cisd-args4j
2768 java-commons-lang
2769 java-commons-io
2770 hdf5-1.8
2771 zlib))
2772 (native-inputs
2773 `(("jdk" ,icedtea-8)
2774 ("java-testng" ,java-testng)
2775 ("java-junit" ,java-junit)
2776 ("java-jmock" ,java-jmock)
2777 ("java-hamcrest-core" ,java-hamcrest-core)
2778 ("build-resources"
2779 ,(origin
2780 (method svn-fetch)
2781 (uri (svn-reference
2782 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2783 "jhdf5/tags/release/"
2784 (version-major+minor base-version)
2785 ".x/" base-version
2786 "/build_resources/"))
2787 (revision revision)))
2788 (sha256
2789 (base32
2790 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
2791 (home-page "https://wiki-bsse.ethz.ch/display/JHDF5/")
2792 (synopsis "Java binding for HDF5")
2793 (description "JHDF5 is a high-level API in Java for reading and writing
2794HDF5 files, building on the libraries provided by the HDF Group.")
2795 ;; The C sources are under a non-copyleft license, which looks like a
2796 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
2797 (license (list license:asl2.0
2798 (license:non-copyleft "file://source/c/COPYING"))))))
2799
2800(define-public java-classpathx-servletapi
2801 (package
2802 (name "java-classpathx-servletapi")
2803 (version "3.0.1")
2804 (source (origin
2805 (method url-fetch)
2806 (uri (string-append "mirror://gnu/classpathx/servletapi/"
2807 "servletapi-" version ".tar.gz"))
2808 (sha256
2809 (base32
2810 "07d8h051siga2f33fra72hk12sbq1bxa4jifjg0qj0vfazjjff0x"))))
2811 (build-system ant-build-system)
2812 (arguments
2813 `(#:tests? #f ; there is no test target
2814 #:build-target "compile"
2815 #:make-flags
2816 ,#~(list "-Dbuild.compiler=javac1.8"
2817 (string-append "-Ddist=" #$output))
2818 #:phases
2819 (modify-phases %standard-phases
2820 (replace 'install
2821 (lambda* (#:key make-flags #:allow-other-keys)
2822 (apply invoke `("ant" "dist" ,@make-flags)))))))
2823 (home-page "https://www.gnu.org/software/classpathx/")
2824 (synopsis "Java servlet API implementation")
2825 (description "This is the GNU servlet API distribution, part of the
2826ClasspathX project. It provides implementations of version 3.0 of the servlet
2827API and version 2.1 of the Java ServerPages API.")
2828 (license license:gpl3+)))
2829
2830(define-public java-javaee-servletapi
2831 (package
2832 (name "java-javaee-servletapi")
2833 (version "3.1.0")
2834 (source (origin
2835 (method git-fetch)
2836 (uri (git-reference
2837 (url "https://github.com/javaee/servlet-spec")
2838 (commit version)))
2839 (file-name (git-file-name name version))
2840 (sha256
2841 (base32
2842 "0s03lj8w5an70lkqbjycgfrfk0kc07vbfav91jzk87gh3awf9ksl"))))
2843 (build-system ant-build-system)
2844 (arguments
2845 `(#:jar-name "javax-servletapi.jar"
2846 ;; no tests
2847 #:tests? #f
2848 #:source-dir "src/main/java"
2849 #:phases
2850 (modify-phases %standard-phases
2851 (add-before 'build 'copy-resources
2852 (lambda _
2853 (mkdir-p "build/classes/javax/servlet/http")
2854 (let ((from-prefix "src/main/java/javax/servlet/")
2855 (to-prefix "build/classes/javax/servlet/"))
2856 (for-each (lambda (f)
2857 (copy-file (string-append from-prefix f)
2858 (string-append to-prefix f)))
2859 (list "LocalStrings_ja.properties"
2860 "LocalStrings.properties"
2861 "LocalStrings_fr.properties"
2862 "http/LocalStrings_es.properties"
2863 "http/LocalStrings_ja.properties"
2864 "http/LocalStrings.properties"
2865 "http/LocalStrings_fr.properties")))
2866 #t)))))
2867 (native-inputs
2868 (list unzip))
2869 (home-page "https://javaee.github.io/servlet-spec/")
2870 (synopsis "Java servlet API")
2871 (description "Java Servlet is the foundation web specification in the
2872Java Enterprise Platform. Developers can build web applications using the
2873Servlet API to interact with the request/response workflow. This project
2874provides information on the continued development of the Java Servlet
2875specification.")
2876 ;; Main code is dual-licensed by Oracle under either GLP2 or CDDL 1.1.
2877 ;; Some files are licensed under ASL 2.0.
2878 (license (list license:asl2.0 license:gpl2 license:cddl1.1))))
2879
2880(define-public java-swt
2881 (package
2882 (name "java-swt")
2883 (version "4.7.1a")
2884 (source
2885 ;; The types of many variables and procedures differ in the sources
2886 ;; dependent on whether the target architecture is a 32-bit system or a
2887 ;; 64-bit system. Instead of patching the sources on demand in a build
2888 ;; phase we download either the 32-bit archive (which mostly uses "int"
2889 ;; types) or the 64-bit archive (which mostly uses "long" types).
2890 (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9")
2891 (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q")
2892 (file32 "x86")
2893 (file64 "x86_64"))
2894 (let-values (((hash file)
2895 (match (or (%current-target-system) (%current-system))
2896 ("x86_64-linux" (values hash64 file64))
2897 (_ (values hash32 file32)))))
2898 (origin
2899 (method url-fetch)
2900 (uri (string-append
2901 "http://download.eclipse.org/eclipse/downloads/drops4/"
2902 "R-" version "-201710090410/swt-" version
2903 "-gtk-linux-" file ".zip"))
2904 (sha256 (base32 hash))))))
2905 (build-system ant-build-system)
2906 (arguments
2907 `(#:jar-name "swt.jar"
2908 #:jdk ,icedtea-8
2909 #:tests? #f ; no "check" target
2910 #:phases
2911 (modify-phases %standard-phases
2912 (replace 'unpack
2913 (lambda* (#:key source #:allow-other-keys)
2914 (mkdir "swt")
2915 (invoke "unzip" source "-d" "swt")
2916 (chdir "swt")
2917 (mkdir "src")
2918 (invoke "unzip" "src.zip" "-d" "src")))
2919 ;; The classpath contains invalid icecat jars. Since we don't need
2920 ;; anything other than the JDK on the classpath, we can simply unset
2921 ;; it.
2922 (add-after 'configure 'unset-classpath
2923 (lambda _ (unsetenv "CLASSPATH") #t))
2924 (add-before 'build 'build-native
2925 (lambda* (#:key inputs outputs #:allow-other-keys)
2926 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
2927 ;; Build shared libraries. Users of SWT have to set the system
2928 ;; property swt.library.path to the "lib" directory of this
2929 ;; package output.
2930 (mkdir-p lib)
2931 (setenv "OUTPUT_DIR" lib)
2932 (with-directory-excursion "src"
2933 (invoke "bash" "build.sh")))))
2934 (add-after 'install 'install-native
2935 (lambda* (#:key outputs #:allow-other-keys)
2936 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
2937 (for-each (lambda (file)
2938 (install-file file lib))
2939 (find-files "." "\\.so$"))
2940 #t))))))
2941 (inputs
2942 `(("gtk" ,gtk+-2)
2943 ("libxtst" ,libxtst)
2944 ("libxt" ,libxt)
2945 ("mesa" ,mesa)
2946 ("glu" ,glu)))
2947 (native-inputs
2948 (list pkg-config unzip))
2949 (home-page "https://www.eclipse.org/swt/")
2950 (synopsis "Widget toolkit for Java")
2951 (description
2952 "SWT is a widget toolkit for Java designed to provide efficient, portable
2953access to the user-interface facilities of the operating systems on which it
2954is implemented.")
2955 ;; SWT code is licensed under EPL1.0
2956 ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1
2957 ;; Cairo bindings contain code under MPL1.1
2958 ;; XULRunner 1.9 bindings contain code under MPL2.0
2959 (license (list
2960 license:epl1.0
2961 license:mpl1.1
2962 license:mpl2.0
2963 license:lgpl2.1+))))
2964
2965;; java-hamcrest-core uses qdox version 1.12. We package this version instead
2966;; of the latest release.
2967(define-public java-qdox-1.12
2968 (package
2969 (name "java-qdox")
2970 (version "1.12.1")
2971 (source (origin
2972 (method url-fetch)
2973 (uri (string-append "https://repo1.maven.org/maven2/"
2974 "com/thoughtworks/qdox/qdox/" version
2975 "/qdox-" version "-sources.jar"))
2976 (sha256
2977 (base32
2978 "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl"))))
2979 (build-system ant-build-system)
2980 (arguments
2981 `(;; Tests require junit
2982 #:tests? #f
2983 #:jar-name "qdox.jar"
2984 #:phases
2985 (modify-phases %standard-phases
2986 (replace 'unpack
2987 (lambda* (#:key source #:allow-other-keys)
2988 (mkdir "src")
2989 (with-directory-excursion "src"
2990 (invoke "jar" "-xf" source))))
2991 ;; At this point we don't have junit, so we must remove the API
2992 ;; tests.
2993 (add-after 'unpack 'delete-tests
2994 (lambda _
2995 (delete-file-recursively "src/com/thoughtworks/qdox/junit")
2996 #t)))))
2997 (home-page "https://github.com/codehaus/qdox")
2998 (synopsis "Parse definitions from Java source files")
2999 (description
3000 "QDox is a high speed, small footprint parser for extracting
3001class/interface/method definitions from source files complete with JavaDoc
3002@code{@@tags}. It is designed to be used by active code generators or
3003documentation tools.")
3004 (license license:asl2.0)))
3005
3006(define-public java-qdox
3007 (package
3008 (name "java-qdox")
3009 ; Newer version exists, but this version is required by java-plexus-component-metadata
3010 (version "2.0-M2")
3011 (source (origin
3012 (method url-fetch)
3013 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
3014 ;; Older releases at https://github.com/codehaus/qdox/
3015 ;; Note: The release at maven is pre-generated. The release at
3016 ;; github requires jflex.
3017 (uri (string-append "https://repo1.maven.org/maven2/"
3018 "com/thoughtworks/qdox/qdox/" version
3019 "/qdox-" version "-sources.jar"))
3020 (sha256
3021 (base32
3022 "10xxrcaicq6axszcr2jpygisa4ch4sinyx5q7kqqxv4lknrmxp5x"))))
3023 (build-system ant-build-system)
3024 (arguments
3025 `(#:jar-name "qdox.jar"
3026 #:tests? #f; no tests
3027 #:phases
3028 (modify-phases %standard-phases
3029 (add-before 'install 'create-pom
3030 (generate-pom.xml "pom.xml" "com.thoughtworks.qdox" "qdox" ,version
3031 #:name "QDox"))
3032 (replace 'install
3033 (install-from-pom "pom.xml")))))
3034 (home-page "https://github.com/codehaus/qdox")
3035 (synopsis "Parse definitions from Java source files")
3036 (description "QDox is a high speed, small footprint parser for extracting
3037class/interface/method definitions from source files complete with JavaDoc
3038@code{@@tags}. It is designed to be used by active code generators or
3039documentation tools.")
3040 (license license:asl2.0)))
3041
3042(define-public java-qdox-2-M9
3043 (package
3044 (inherit java-qdox)
3045 (version "2.0-M9"); required by plexus-java
3046 (source (origin
3047 (method url-fetch)
3048 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
3049 ;; Older releases at https://github.com/codehaus/qdox/
3050 ;; Note: The release at maven is pre-generated. The release at
3051 ;; github requires jflex.
3052 (uri (string-append "https://repo1.maven.org/maven2/"
3053 "com/thoughtworks/qdox/qdox/" version
3054 "/qdox-" version "-sources.jar"))
3055 (sha256
3056 (base32
3057 "1s2jnmx2dkwnaha12lcj26aynywgwa8sslc47z82wx8xai13y4fg"))))
3058 (arguments
3059 (substitute-keyword-arguments (package-arguments java-qdox)
3060 ((#:phases phases)
3061 `(modify-phases ,phases
3062 (replace 'create-pom
3063 (generate-pom.xml "pom.xml" "com.thoughtworks.qdox" "qdox" ,version
3064 #:name "QDox"))))))))
3065
3066(define-public java-jarjar
3067 (package
3068 (name "java-jarjar")
3069 (version "1.4")
3070 (source (origin
3071 (method url-fetch)
3072 (uri (string-append
3073 "https://storage.googleapis.com/google-code-archive-downloads/v2/"
3074 "code.google.com/jarjar/jarjar-src-" version ".zip"))
3075 (sha256
3076 (base32
3077 "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl"))
3078 (modules '((guix build utils)))
3079 (snippet
3080 '(begin
3081 ;; Delete bundled thirds-party jar archives.
3082 (delete-file-recursively "lib")
3083 (delete-file "src/test/enumtest.jar")
3084 ;; the CLASSPATH needs this directory, create an empty one
3085 (mkdir-p "lib")
3086 #t))))
3087 (build-system ant-build-system)
3088 (arguments
3089 `(;; Tests require junit, which ultimately depends on this package.
3090 #:tests? #f
3091 #:build-target "jar"
3092 #:phases
3093 (modify-phases %standard-phases
3094 (add-before 'build 'do-not-use-bundled-asm
3095 (lambda* (#:key inputs #:allow-other-keys)
3096 (substitute* "build.xml"
3097 (("<path id=\"path.build\">")
3098 (string-append "<path id=\"path.build\"><fileset dir=\""
3099 (assoc-ref inputs "java-asm-bootstrap")
3100 "/lib/m2\" includes=\"**/*.jar\"/>"))
3101 (("<zipfileset src=\"lib/asm-4.0.jar\"/>") "")
3102 (("lib/asm-commons-4.0.jar")
3103 (car (find-files (assoc-ref inputs "java-asm-bootstrap")
3104 "asm-6.0.jar")))
3105 (("<include name=\"org/objectweb/asm/commons/Remap\\*\\.class\"/>")
3106 (string-append "<include name=\"org/objectweb/asm/"
3107 "commons/Remap*.class\"/>"
3108 "<include name=\"org/objectweb/asm/*.class\"/>"
3109 "<include name=\"org/objectweb/asm/"
3110 "signature/*.class\"/>"
3111 "<include name=\"org/objectweb/asm/"
3112 "commons/SignatureRemapper.class\"/>")))
3113 #t))
3114 (add-before 'build 'remove-maven-dependency
3115 (lambda _
3116 ;; We do not need to build jarjar as a maven plugin just yet, so
3117 ;; remove this file. Maven requires jarjar (but not that plugin),
3118 ;; so removing it improves the bootstrap.
3119 (delete-file "src/main/com/tonicsystems/jarjar/JarJarMojo.java")
3120 #t))
3121 (replace 'install
3122 (lambda* (#:key outputs #:allow-other-keys)
3123 (let ((target (string-append (assoc-ref outputs "out")
3124 "/share/java")))
3125 (install-file (string-append "dist/jarjar-" ,version ".jar")
3126 target))
3127 #t)))))
3128 (inputs
3129 (list java-asm-bootstrap))
3130 (native-inputs
3131 (list unzip))
3132 (home-page "https://code.google.com/archive/p/jarjar/")
3133 (synopsis "Repackage Java libraries")
3134 (description
3135 "Jar Jar Links is a utility that makes it easy to repackage Java
3136libraries and embed them into your own distribution. Jar Jar Links includes
3137an Ant task that extends the built-in @code{jar} task.")
3138 (license license:asl2.0)))
3139
3140(define-public java-hamcrest-core
3141 (package
3142 (name "java-hamcrest-core")
3143 (version "1.3")
3144 (source (origin
3145 (method git-fetch)
3146 (uri (git-reference
3147 (url "https://github.com/hamcrest/JavaHamcrest/")
3148 (commit (string-append "hamcrest-java-" version))))
3149 (file-name (git-file-name name version))
3150 (sha256
3151 (base32
3152 "16fxxkrd31ahqvcaby30jgh3z1i0zxh51m24hxgz0z2agxj6bc63"))
3153 (modules '((guix build utils)))
3154 (snippet
3155 '(begin
3156 ;; Delete bundled thirds-party jar archives.
3157 (delete-file-recursively "lib")
3158 #t))))
3159 (build-system ant-build-system)
3160 (arguments
3161 `(#:tests? #f ; Tests require junit
3162 #:modules ((guix build ant-build-system)
3163 (guix build java-utils)
3164 (guix build utils)
3165 (srfi srfi-1))
3166 #:make-flags (list (string-append "-Dversion=" ,version))
3167 #:test-target "unit-test"
3168 #:build-target "core"
3169 #:phases
3170 (modify-phases %standard-phases
3171 ;; Disable unit tests, because they require junit, which requires
3172 ;; hamcrest-core. We also give a fixed value to the "Built-Date"
3173 ;; attribute from the manifest for reproducibility.
3174 (add-before 'configure 'patch-build.xml
3175 (lambda _
3176 (substitute* "build.xml"
3177 (("unit-test, ") "")
3178 (("\\$\\{build.timestamp\\}") "guix"))
3179 #t))
3180 ;; Java's "getMethods()" returns methods in an unpredictable order.
3181 ;; To make the output of the generated code deterministic we must
3182 ;; sort the array of methods.
3183 (add-after 'unpack 'make-method-order-deterministic
3184 (lambda _
3185 (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java"
3186 (("import java\\.util\\.Iterator;" line)
3187 (string-append line "\n"
3188 "import java.util.Arrays; import java.util.Comparator;"))
3189 (("allMethods = cls\\.getMethods\\(\\);" line)
3190 (string-append "_" line
3191 "
3192private Method[] getSortedMethods() {
3193 Arrays.sort(_allMethods, new Comparator<Method>() {
3194 @Override
3195 public int compare(Method a, Method b) {
3196 return a.toString().compareTo(b.toString());
3197 }
3198 });
3199 return _allMethods;
3200}
3201
3202private Method[] allMethods = getSortedMethods();")))
3203 #t))
3204 (add-before 'build 'do-not-use-bundled-qdox
3205 (lambda* (#:key inputs #:allow-other-keys)
3206 (substitute* "build.xml"
3207 (("lib/generator/qdox-1.12.jar")
3208 (string-append (assoc-ref inputs "java-qdox-1.12")
3209 "/share/java/qdox.jar")))
3210 #t))
3211 ;; build.xml searches for .jar files in this directoy, which
3212 ;; we remove from the source archive.
3213 (add-before 'build 'create-dummy-directories
3214 (lambda _
3215 (mkdir-p "lib/integration")
3216 #t))
3217 (add-before 'build 'create-pom
3218 (lambda _
3219 (substitute* "pom/hamcrest-core.pom"
3220 (("@VERSION@") ,version))
3221 #t))
3222 (replace 'install
3223 (install-from-pom "pom/hamcrest-core.pom")))))
3224 (native-inputs
3225 `(("java-qdox-1.12" ,java-qdox-1.12)
3226 ("java-jarjar" ,java-jarjar)))
3227 (propagated-inputs
3228 (list java-hamcrest-parent-pom))
3229 (home-page "https://hamcrest.org/")
3230 (synopsis "Library of matchers for building test expressions")
3231 (description
3232 "This package provides a library of matcher objects (also known as
3233constraints or predicates) allowing @code{match} rules to be defined
3234declaratively, to be used in other frameworks. Typical scenarios include
3235testing frameworks, mocking libraries and UI validation rules.")
3236 (license license:bsd-2)))
3237
3238(define java-hamcrest-parent-pom
3239 (package
3240 (inherit java-hamcrest-core)
3241 (name "java-hamcrest-parent-pom")
3242 (propagated-inputs '())
3243 (native-inputs '())
3244 (arguments
3245 `(#:tests? #f
3246 #:phases
3247 (modify-phases %standard-phases
3248 (delete 'configure)
3249 (replace 'build
3250 (lambda _
3251 (substitute* "pom/hamcrest-parent.pom"
3252 (("@VERSION@") ,(package-version java-hamcrest-core)))
3253 #t))
3254 (replace 'install
3255 (install-pom-file "pom/hamcrest-parent.pom")))))))
3256
3257(define-public java-hamcrest-library
3258 (package
3259 (inherit java-hamcrest-core)
3260 (name "java-hamcrest-library")
3261 (arguments
3262 (substitute-keyword-arguments (package-arguments java-hamcrest-core)
3263 ((#:build-target _) "library")
3264 ((#:phases phases)
3265 `(modify-phases ,phases
3266 (add-after 'unpack 'patch-classpath-for-integration
3267 (lambda* (#:key inputs #:allow-other-keys)
3268 (substitute* "build.xml"
3269 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
3270 (car (find-files (assoc-ref inputs "java-hamcrest-core")
3271 "jar$"))))
3272 #t))
3273 (replace 'create-pom
3274 (lambda _
3275 (substitute* "pom/hamcrest-library.pom"
3276 (("@VERSION@") ,(package-version java-hamcrest-core)))
3277 #t))
3278 (replace 'install
3279 (install-from-pom "pom/hamcrest-library.pom"))))))
3280 (propagated-inputs
3281 (list java-hamcrest-core java-hamcrest-parent-pom))))
3282
3283(define-public java-junit
3284 (package
3285 (name "java-junit")
3286 (version "4.12")
3287 (source (origin
3288 (method git-fetch)
3289 (uri (git-reference
3290 (url "https://github.com/junit-team/junit/")
3291 (commit (string-append "r" version))))
3292 (file-name (git-file-name name version))
3293 (sha256
3294 (base32
3295 "1j8avi91px1z8rjc89cfikwrvfifdmmsarwiyrcnr59ynvpz0v8h"))
3296 (modules '((guix build utils)))
3297 (snippet
3298 '(begin
3299 ;; Delete bundled jar archives.
3300 (delete-file-recursively "lib")
3301 #t))))
3302 (build-system ant-build-system)
3303 (arguments
3304 `(#:jar-name "junit.jar"
3305 #:source-dir "src/main/java"
3306 #:test-dir "src/test"
3307 #:test-exclude (list "**/SimpleTest.java" "**/StackTracesTest.java"
3308 "**/RuleChainTest.java" "**/TestWatchmanTest.java")
3309 #:phases
3310 (modify-phases %standard-phases
3311 (add-before 'check 'copy-test-resources
3312 (lambda _
3313 (copy-recursively "src/test/resources" "build/test-classes")
3314 #t))
3315 (replace 'install
3316 (install-from-pom "pom.xml")))))
3317 (propagated-inputs
3318 (list java-hamcrest-core))
3319 (native-inputs
3320 (list java-hamcrest-library))
3321 (home-page "https://junit.org/junit4/")
3322 (synopsis "Test framework for Java")
3323 (description
3324 "JUnit is a simple framework to write repeatable tests for Java projects.
3325JUnit provides assertions for testing expected results, test fixtures for
3326sharing common test data, and test runners for running tests.")
3327 (license license:epl1.0)))
3328
3329(define-public java-junitparams
3330 (package
3331 (name "java-junitparams")
3332 (version "1.1.1")
3333 (source (origin
3334 (method git-fetch)
3335 (uri (git-reference
3336 (url "https://github.com/Pragmatists/JUnitParams")
3337 (commit (string-append "JUnitParams-" version))))
3338 (file-name (git-file-name name version))
3339 (sha256
3340 (base32
3341 "0rb52xdfp99invyjrras3w0bf0a81cz30yd47rkkiyqcqj0y1q9b"))))
3342 (build-system ant-build-system)
3343 (arguments
3344 `(#:jar-name "junitparams.jar"
3345 #:source-dir "src/main/java"
3346 #:test-dir "src/test"
3347 #:test-exclude (list "**/SuperclassTest.java")))
3348 (inputs
3349 (list java-junit))
3350 (native-inputs
3351 (list java-junit java-hamcrest-core java-assertj))
3352 (home-page "https://github.com/Pragmatists/JUnitParams")
3353 (synopsis "Parameterised test support for JUnit")
3354 (description "The JUnitParams project adds a new runner to JUnit and
3355provides much easier and readable parametrised tests for JUnit.")
3356 (license license:asl2.0)))
3357
3358(define-public java-plexus-utils
3359 (package
3360 (name "java-plexus-utils")
3361 (version "3.3.0")
3362 (source (origin
3363 (method git-fetch)
3364 (uri (git-reference
3365 (url "https://github.com/codehaus-plexus/plexus-utils")
3366 (commit (string-append "plexus-utils-" version))))
3367 (file-name (git-file-name name version))
3368 (sha256
3369 (base32
3370 "0d0fq21rzjy0j55kcp8w9k1rbq9rwr0r7cc8239p9jbz54vihp0g"))))
3371 (build-system ant-build-system)
3372 ;; FIXME: The default build.xml does not include a target to install
3373 ;; javadoc files.
3374 (arguments
3375 `(#:jar-name "plexus-utils.jar"
3376 #:source-dir "src/main"
3377 #:phases
3378 (modify-phases %standard-phases
3379 (add-after 'unpack 'fix-reference-to-/bin-and-/usr
3380 (lambda _
3381 (substitute* "src/main/java/org/codehaus/plexus/util/\
3382cli/shell/BourneShell.java"
3383 (("/bin/sh") (which "sh"))
3384 (("/usr/") (getcwd)))
3385 #t))
3386 (add-after 'unpack 'fix-or-disable-broken-tests
3387 (lambda _
3388 (with-directory-excursion "src/test/java/org/codehaus/plexus/util"
3389 (substitute* '("cli/CommandlineTest.java"
3390 "cli/shell/BourneShellTest.java")
3391 (("/bin/sh") (which "sh"))
3392 (("/bin/echo") (which "echo")))
3393
3394 ;; This test depends on MavenProjectStub, but we don't have
3395 ;; a package for Maven.
3396 (delete-file "introspection/ReflectionValueExtractorTest.java")
3397
3398 ;; FIXME: The command line tests fail, maybe because they use
3399 ;; absolute paths.
3400 (delete-file "cli/CommandlineTest.java")
3401
3402 ;; These tests require openjdk jmh, which is not packaged yet
3403 (for-each delete-file (find-files "." "PerfTest.java$")))
3404 #t))
3405 (add-before 'build 'copy-resources
3406 (lambda _
3407 (copy-recursively "src/main/resources" "build/classes")
3408 #t))
3409 (replace 'install (install-from-pom "pom.xml")))))
3410 (native-inputs
3411 (list java-hamcrest-core java-junit))
3412 (propagated-inputs
3413 (list plexus-parent-pom-5.1))
3414 (home-page "https://codehaus-plexus.github.io/plexus-utils/")
3415 (synopsis "Common utilities for the Plexus framework")
3416 (description "This package provides various Java utility classes for the
3417Plexus framework to ease working with strings, files, command lines, XML and
3418more.")
3419 (license license:asl2.0)))
3420
3421(define-public java-plexus-utils-3.2.1
3422 (package
3423 (inherit java-plexus-utils)
3424 ;; plexus-build-api needs this version, later versions don't work
3425 (version "3.2.1")
3426 (source (origin
3427 (method git-fetch)
3428 (uri (git-reference
3429 (url "https://github.com/codehaus-plexus/plexus-utils")
3430 (commit (string-append "plexus-utils-" version))))
3431 (file-name (git-file-name "java-plexus-utils" version))
3432 (sha256
3433 (base32
3434 "1w169glixyk94jbczj8jzg897lsab46jihiaa3dhw0p06g35va8b"))))))
3435
3436(define-public java-plexus-interpolation
3437 (package
3438 (name "java-plexus-interpolation")
3439 (version "1.26")
3440 (source (origin
3441 (method git-fetch)
3442 (uri (git-reference
3443 (url "https://github.com/codehaus-plexus/plexus-interpolation")
3444 (commit (string-append "plexus-interpolation-" version))))
3445 (file-name (git-file-name name version))
3446 (sha256
3447 (base32
3448 "1rahjmhywf6d5m32qzlc9izawyvcd71abfm9k03f13rs2xmfxzlh"))))
3449 (build-system ant-build-system)
3450 (arguments
3451 `(#:jar-name "plexus-interpolation.jar"
3452 #:source-dir "src/main"
3453 #:phases
3454 (modify-phases %standard-phases
3455 (replace 'install (install-from-pom "pom.xml")))))
3456 (propagated-inputs
3457 `(("plexus-parent-pom-5.1" ,plexus-parent-pom-5.1)))
3458 (native-inputs
3459 (list java-junit java-hamcrest-core))
3460 (home-page "https://codehaus-plexus.github.io/plexus-interpolation/")
3461 (synopsis "Java components for interpolating ${} strings and the like")
3462 (description "Plexus interpolator is a modular, flexible interpolation
3463framework for the expression language style commonly seen in Maven, Plexus,
3464and other related projects.
3465
3466It has its foundation in the @code{org.codehaus.plexus.utils.interpolation}
3467package within @code{plexus-utils}, but has been separated in order to allow
3468these two libraries to vary independently of one another.")
3469 (license license:asl2.0)))
3470
3471(define-public java-plexus-classworlds
3472 (package
3473 (name "java-plexus-classworlds")
3474 (version "2.6.0")
3475 (source (origin
3476 (method git-fetch)
3477 (uri (git-reference
3478 (url "https://github.com/codehaus-plexus/plexus-classworlds")
3479 (commit (string-append "plexus-classworlds-" version))))
3480 (file-name (git-file-name name version))
3481 (sha256
3482 (base32
3483 "034k2hgvj1saalwbnzrbg4n0zgzwcpz1lhlb8q4kgglsp9pmm03s"))))
3484 (build-system ant-build-system)
3485 (arguments
3486 `(#:jar-name "plexus-classworlds.jar"
3487 #:source-dir "src/main"
3488 #:tests? #f;; FIXME: we need to generate some resources as in pom.xml
3489 #:phases
3490 (modify-phases %standard-phases
3491 (replace 'install (install-from-pom "pom.xml")))))
3492 (propagated-inputs
3493 `(("plexus-parent-pom-5.1" ,plexus-parent-pom-5.1)))
3494 (native-inputs
3495 (list java-junit))
3496 (home-page "https://codehaus-plexus.github.io/plexus-classworlds/")
3497 (synopsis "Java class loader framework")
3498 (description "Plexus classworlds replaces the native @code{ClassLoader}
3499mechanism of Java. It is especially useful for dynamic loading of application
3500components.")
3501 (license license:asl2.0)))
3502
3503(define java-plexus-container-default-bootstrap
3504 (package
3505 (name "java-plexus-container-default-bootstrap")
3506 (version "2.1.0")
3507 (source (origin
3508 (method git-fetch)
3509 (uri (git-reference
3510 (url "https://github.com/codehaus-plexus/plexus-containers")
3511 (commit (string-append "plexus-containers-" version))))
3512 (file-name (git-file-name name version))
3513 (sha256
3514 (base32
3515 "0r9yq67c1hvi1pz5wmx6x6hk5fmavp8a7yal3j5hkaad757firn1"))))
3516 (build-system ant-build-system)
3517 (arguments
3518 `(#:jar-name "container-default.jar"
3519 #:source-dir "plexus-container-default/src/main/java"
3520 #:test-dir "plexus-container-default/src/test"
3521 #:tests? #f; requires plexus-archiver, which depends on this package
3522 #:phases
3523 (modify-phases %standard-phases
3524 (add-before 'build 'fix-google-collections
3525 (lambda _
3526 ;; Google collections are now replaced with guava
3527 (substitute* "plexus-container-default/pom.xml"
3528 (("google-collections") "guava")
3529 (("com.google.collections") "com.google.guava"))
3530 #t))
3531 (add-before 'build 'copy-resources
3532 (lambda _
3533 (copy-recursively
3534 "plexus-container-default/src/main/resources/"
3535 "build/classes")
3536 #t))
3537 (replace 'install
3538 (install-from-pom "plexus-container-default/pom.xml")))))
3539 (propagated-inputs
3540 `(("java-plexus-worldclass" ,java-plexus-classworlds)
3541 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
3542 ("java-plexus-utils" ,java-plexus-utils)
3543 ("java-junit" ,java-junit)
3544 ("java-guava" ,java-guava)
3545 ("java-plexus-containers-parent-pom" ,java-plexus-containers-parent-pom)))
3546 (home-page "https://github.com/codehaus-plexus/plexus-containers")
3547 (synopsis "Inversion-of-control container")
3548 (description "Plexus-default-container is Plexus' inversion-of-control
3549(@dfn{IoC}) container. It is composed of its public API and its default
3550implementation.")
3551 (license license:asl2.0)))
3552
3553(define java-plexus-containers-parent-pom
3554 (package
3555 (inherit java-plexus-container-default-bootstrap)
3556 (name "java-plexus-containers-parent-pom")
3557 (arguments
3558 `(#:tests? #f
3559 #:phases
3560 (modify-phases %standard-phases
3561 (delete 'configure)
3562 (delete 'build)
3563 (replace 'install
3564 (install-pom-file "pom.xml")))))
3565 (propagated-inputs
3566 `(("plexus-parent-pom" ,plexus-parent-pom-4.0)))))
3567
3568(define-public java-plexus-io
3569 (package
3570 (name "java-plexus-io")
3571 (version "3.2.0")
3572 (source (origin
3573 (method git-fetch)
3574 (uri (git-reference
3575 (url "https://github.com/codehaus-plexus/plexus-io")
3576 (commit (string-append "plexus-io-" version))))
3577 (file-name (git-file-name name version))
3578 (sha256
3579 (base32
3580 "1r3wqfpbxq8vp4p914i8p88r0994rmcjw02hz14n11cfb6gsyvlr"))))
3581 (build-system ant-build-system)
3582 (arguments
3583 `(#:jar-name "plexus-io.jar"
3584 #:source-dir "src/main/java"
3585 #:test-dir "src/test"
3586 #:phases
3587 (modify-phases %standard-phases
3588 (add-before 'build 'copy-resources
3589 (lambda _
3590 (mkdir-p "build/classes")
3591 (copy-recursively "src/main/resources" "build/classes")
3592 (mkdir-p "build/test-classes")
3593 (copy-recursively "src/test/resources" "build/test-classes")
3594 #t))
3595 (replace 'install (install-from-pom "pom.xml")))))
3596 (propagated-inputs
3597 (list java-plexus-utils java-commons-io plexus-parent-pom-5.1))
3598 (inputs
3599 (list java-jsr305))
3600 (native-inputs
3601 `(("junit" ,java-junit)
3602 ("hamcrest" ,java-hamcrest-core)
3603 ("guava" ,java-guava)
3604 ("classworlds" ,java-plexus-classworlds)
3605 ("xbean" ,java-geronimo-xbean-reflect)
3606 ("container-default" ,java-plexus-container-default-bootstrap)))
3607 (home-page "https://github.com/codehaus-plexus/plexus-io")
3608 (synopsis "I/O plexus components")
3609 (description "Plexus IO is a set of plexus components, which are designed
3610for use in I/O operations. This implementation using plexus components allows
3611reusing it in maven.")
3612 (license license:asl2.0)))
3613
3614(define-public java-plexus-archiver
3615 (package
3616 (name "java-plexus-archiver")
3617 (version "4.2.2")
3618 (source (origin
3619 (method url-fetch)
3620 (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver"
3621 "/archive/plexus-archiver-" version ".tar.gz"))
3622 (sha256
3623 (base32
3624 "144n971r3lfrx3l12nf2scm80x4xdvgbkk4bjpa4vcvvdrll6qys"))))
3625 (build-system ant-build-system)
3626 (arguments
3627 `(#:jar-name "plexus-archiver.jar"
3628 #:source-dir "src/main/java"
3629 #:test-dir "src/test"
3630 #:test-exclude (list "**/Abstract*.java" "**/Base*.java")
3631 #:phases
3632 (modify-phases %standard-phases
3633 (add-before 'check 'remove-failing
3634 (lambda _
3635 ;; Requires an older version of plexus container
3636 (delete-file
3637 "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java")
3638 #t))
3639 (add-before 'check 'fix-test-building
3640 (lambda _
3641 (substitute* "build.xml"
3642 (("srcdir=\"src/test\"") "srcdir=\"src/test/java\""))
3643 #t))
3644 (add-before 'build 'copy-resources
3645 (lambda _
3646 (mkdir-p "build/classes")
3647 (copy-recursively "src/main/resources" "build/classes")
3648 (mkdir-p "build/test-classes")
3649 (copy-recursively "src/test/resources" "build/test-classes")
3650 #t))
3651 (replace 'install (install-from-pom "pom.xml")))))
3652 (propagated-inputs
3653 (list java-plexus-utils java-plexus-io java-iq80-snappy
3654 java-commons-compress plexus-parent-pom-6.1))
3655 (inputs
3656 `(("java-jsr305" ,java-jsr305)
3657 ("java-plexus-container-default"
3658 ,java-plexus-container-default-bootstrap)))
3659 (native-inputs
3660 `(("java-hamcrest-core" ,java-hamcrest-core)
3661 ("junit" ,java-junit)
3662 ("classworld" ,java-plexus-classworlds)
3663 ("xbean" ,java-geronimo-xbean-reflect)
3664 ("xz" ,java-xz)
3665 ("guava" ,java-guava)))
3666 (home-page "https://github.com/codehaus-plexus/plexus-archiver")
3667 (synopsis "Archiver component of the Plexus project")
3668 (description "Plexus-archiver contains a component to deal with project
3669archives (jar).")
3670 (license license:asl2.0)))
3671
3672(define-public java-plexus-container-default
3673 (package
3674 (inherit java-plexus-container-default-bootstrap)
3675 (name "java-plexus-container-default")
3676 (arguments
3677 `(#:jar-name "container-default.jar"
3678 #:source-dir "plexus-container-default/src/main/java"
3679 #:test-dir "plexus-container-default/src/test"
3680 #:test-exclude (list ;"**/*Test.java"
3681 "**/Abstract*.java"
3682 ;; Requires plexus-hierarchy
3683 "**/PlexusHierarchyTest.java"
3684 ;; Failures
3685 "**/ComponentRealmCompositionTest.java"
3686 "**/PlexusContainerTest.java")
3687 #:phases
3688 (modify-phases %standard-phases
3689 (add-before 'build 'fix-google-collections
3690 (lambda _
3691 ;; Google collections are now replaced with guava
3692 (substitute* "plexus-container-default/pom.xml"
3693 (("google-collections") "guava")
3694 (("com.google.collections") "com.google.guava"))
3695 #t))
3696 (add-before 'build 'copy-resources
3697 (lambda _
3698 (copy-recursively
3699 "plexus-container-default/src/main/resources/"
3700 "build/classes")
3701 #t))
3702 (add-before 'check 'fix-paths
3703 (lambda _
3704 (let ((dir "plexus-container-default/src/test/java/org/codehaus"))
3705 (substitute*
3706 (string-append
3707 dir "/plexus/component/composition/"
3708 "ComponentRealmCompositionTest.java")
3709 (("src/test") "plexus-container-default/src/test"))
3710 #t)))
3711 (replace 'install
3712 (install-from-pom "plexus-container-default/pom.xml")))))
3713 (inputs
3714 `(("worldclass" ,java-plexus-classworlds)
3715 ("xbean" ,java-geronimo-xbean-reflect)
3716 ("utils" ,java-plexus-utils)
3717 ("junit" ,java-junit)
3718 ("guava" ,java-guava)))
3719 (native-inputs
3720 `(("archiver" ,java-plexus-archiver)
3721 ("hamcrest" ,java-hamcrest-core)))))
3722
3723(define-public java-plexus-component-annotations
3724 (package
3725 (inherit java-plexus-container-default)
3726 (name "java-plexus-component-annotations")
3727 (arguments
3728 `(#:jar-name "plexus-component-annotations.jar"
3729 #:source-dir "plexus-component-annotations/src/main/java"
3730 #:tests? #f; no tests
3731 #:phases
3732 (modify-phases %standard-phases
3733 (replace 'install
3734 (install-from-pom "plexus-component-annotations/pom.xml")))))
3735 (propagated-inputs
3736 (list java-plexus-containers-parent-pom))
3737 (inputs '())
3738 (native-inputs '())
3739 (synopsis "Plexus descriptors generator")
3740 (description "This package is a Maven plugin to generate Plexus descriptors
3741from source tags and class annotations.")))
3742
3743(define-public java-plexus-component-metadata
3744 (package
3745 (inherit java-plexus-container-default)
3746 (name "java-plexus-component-metadata")
3747 (arguments
3748 `(#:jar-name "plexus-component-metadata.jar"
3749 #:source-dir "src/main/java"
3750 #:test-dir "src/test"
3751 #:jdk ,icedtea-8
3752 #:phases
3753 (modify-phases %standard-phases
3754 (add-before 'configure 'chdir
3755 (lambda _
3756 (chdir "plexus-component-metadata")
3757 #t))
3758 (add-before 'build 'copy-resources
3759 (lambda _
3760 (copy-recursively "src/main/resources"
3761 "build/classes/")
3762 #t))
3763 (add-before 'build 'fix-jdom
3764 (lambda _
3765 ;; The newer version of jdom now sets multiple features by default
3766 ;; that are not supported.
3767 ;; Skip these features
3768 (substitute* "src/main/java/org/codehaus/plexus/metadata/merge/MXParser.java"
3769 (("throw new XmlPullParserException\\(\"unsupporte feature \"\\+name\\);")
3770 "// skip"))))
3771 (add-before 'build 'reinstate-cli
3772 ;; The CLI was removed in 2.1.0, but we still need it to build some
3773 ;; maven dependencies, and some parts of maven itself. We can't use
3774 ;; the maven plugin for that yet.
3775 (lambda _
3776 (with-output-to-file "src/main/java/org/codehaus/plexus/metadata/PlexusMetadataGeneratorCli.java"
3777 (lambda _
3778 ;; Copied from a previous version of this package.
3779 (display "package org.codehaus.plexus.metadata;
3780
3781import java.io.File;
3782import java.util.Arrays;
3783import java.util.Collections;
3784
3785import org.apache.commons.cli.CommandLine;
3786import org.apache.commons.cli.OptionBuilder;
3787import org.apache.commons.cli.Options;
3788import org.codehaus.plexus.PlexusContainer;
3789import org.codehaus.plexus.tools.cli.AbstractCli;
3790
3791public class PlexusMetadataGeneratorCli
3792 extends AbstractCli
3793{
3794 public static final char SOURCE_DIRECTORY = 's';
3795 public static final char SOURCE_ENCODING = 'e';
3796 public static final char CLASSES_DIRECTORY = 'c';
3797 public static final char OUTPUT_FILE = 'o';
3798 public static final char DESCRIPTORS_DIRECTORY = 'm';
3799
3800 public static void main( String[] args )
3801 throws Exception
3802 {
3803 new PlexusMetadataGeneratorCli().execute( args );
3804 }
3805
3806 @Override
3807 public String getPomPropertiesPath()
3808 {
3809 return \"META-INF/maven/org.codehaus.plexus/plexus-metadata-generator/pom.properties\";
3810 }
3811
3812 @Override
3813 @SuppressWarnings(\"static-access\")
3814 public Options buildCliOptions( Options options )
3815 {
3816 options.addOption( OptionBuilder.withLongOpt( \"source\" ).hasArg().withDescription( \"Source directory.\" ).create( SOURCE_DIRECTORY ) );
3817 options.addOption( OptionBuilder.withLongOpt( \"encoding\" ).hasArg().withDescription( \"Source file encoding.\" ).create( SOURCE_ENCODING ) );
3818 options.addOption( OptionBuilder.withLongOpt( \"classes\" ).hasArg().withDescription( \"Classes directory.\" ).create( CLASSES_DIRECTORY ) );
3819 options.addOption( OptionBuilder.withLongOpt( \"output\" ).hasArg().withDescription( \"Output directory.\" ).create( OUTPUT_FILE ) );
3820 options.addOption( OptionBuilder.withLongOpt( \"descriptors\" ).hasArg().withDescription( \"Descriptors directory.\" ).create( DESCRIPTORS_DIRECTORY ) );
3821 return options;
3822 }
3823
3824 public void invokePlexusComponent( CommandLine cli, PlexusContainer plexus )
3825 throws Exception
3826 {
3827 MetadataGenerator metadataGenerator = plexus.lookup( MetadataGenerator.class );
3828
3829 MetadataGenerationRequest request = new MetadataGenerationRequest();
3830 request.classesDirectory = new File( cli.getOptionValue( CLASSES_DIRECTORY ) );
3831 request.classpath = Collections.emptyList();
3832 request.sourceDirectories = Arrays.asList( new String[]{ new File( cli.getOptionValue( SOURCE_DIRECTORY ) ).getAbsolutePath() } );
3833 request.sourceEncoding = cli.getOptionValue( SOURCE_ENCODING );
3834 request.useContextClassLoader = true;
3835 request.outputFile = new File( cli.getOptionValue( OUTPUT_FILE ) );
3836 request.componentDescriptorDirectory = new File( cli.getOptionValue( DESCRIPTORS_DIRECTORY ) );
3837
3838 metadataGenerator.generateDescriptor( request );
3839 }
3840}")))))
3841 (add-before 'check 'fix-test-location
3842 (lambda _
3843 (substitute* '("src/test/java/org/codehaus/plexus/metadata/DefaultComponentDescriptorWriterTest.java"
3844 "src/test/java/org/codehaus/plexus/metadata/merge/ComponentsXmlMergerTest.java")
3845 (("target") "build")))))))
3846 (propagated-inputs
3847 `(("java-plexus-container-default" ,java-plexus-container-default)
3848 ("java-plexu-component-annotations" ,java-plexus-component-annotations)
3849 ("java-plexus-utils" ,java-plexus-utils)
3850 ("java-plexus-cli" ,java-plexus-cli)
3851 ("java-plexus-classworlds" ,java-plexus-classworlds)
3852 ("maven-plugin-api" ,maven-plugin-api)
3853 ("maven-plugin-annotations" ,maven-plugin-annotations)
3854 ("maven-core-bootstrap" ,maven-core-bootstrap)
3855 ("maven-model" ,maven-model)
3856 ("java-commons-cli" ,java-commons-cli)
3857 ("java-qdox" ,java-qdox)
3858 ("java-jdom2" ,java-jdom2)
3859 ("java-asm-8" ,java-asm-8)))
3860 (native-inputs
3861 (list java-junit java-guava java-geronimo-xbean-reflect))
3862 (synopsis "Inversion-of-control container for Maven")
3863 (description "The Plexus project provides a full software stack for creating
3864and executing software projects. Based on the Plexus container, the
3865applications can utilise component-oriented programming to build modular,
3866reusable components that can easily be assembled and reused. This package
3867provides the Maven plugin generating the component metadata.")))
3868
3869(define-public java-plexus-container-default-1.7
3870 (package
3871 (inherit java-plexus-container-default)
3872 (version "1.7.1")
3873 (source (origin
3874 (method git-fetch)
3875 (uri (git-reference
3876 (url "https://github.com/codehaus-plexus/plexus-containers")
3877 (commit (string-append "plexus-containers-" version))))
3878 (file-name (git-file-name "java-plexus-container-default" version))
3879 (sha256
3880 (base32
3881 "1316hrp5vqfv0aw7miq2fp0wwy833h66h502h29vnh5sxj27x228"))))))
3882
3883(define java-plexus-containers-parent-pom-1.7
3884 (package
3885 (inherit java-plexus-container-default-1.7)
3886 (name "java-plexus-containers-parent-pom")
3887 (arguments
3888 `(#:tests? #f
3889 #:phases
3890 (modify-phases %standard-phases
3891 (delete 'configure)
3892 (delete 'build)
3893 (replace 'install
3894 (install-pom-file "pom.xml")))))
3895 (propagated-inputs
3896 `(("plexus-parent-pom" ,plexus-parent-pom-4.0)))))
3897
3898(define-public java-plexus-component-annotations-1.7
3899 (package
3900 (inherit java-plexus-container-default-1.7)
3901 (name "java-plexus-component-annotations")
3902 (arguments
3903 `(#:jar-name "plexus-component-annotations.jar"
3904 #:source-dir "plexus-component-annotations/src/main/java"
3905 #:tests? #f; no tests
3906 #:phases
3907 (modify-phases %standard-phases
3908 (replace 'install
3909 (install-from-pom "plexus-component-annotations/pom.xml")))))
3910 (propagated-inputs
3911 `(("java-plexus-containers-parent-pom-1.7" ,java-plexus-containers-parent-pom-1.7)))
3912 (inputs '())
3913 (native-inputs '())
3914 (synopsis "Plexus descriptors generator")
3915 (description "This package is a Maven plugin to generate Plexus descriptors
3916from source tags and class annotations.")))
3917
3918(define-public java-plexus-component-metadata-1.7
3919 (package
3920 (inherit java-plexus-container-default-1.7)
3921 (name "java-plexus-component-metadata")
3922 (arguments
3923 `(#:jar-name "plexus-component-metadata.jar"
3924 #:source-dir "src/main/java"
3925 #:test-dir "src/test"
3926 #:phases
3927 (modify-phases %standard-phases
3928 (add-before 'configure 'chdir
3929 (lambda _
3930 (chdir "plexus-component-metadata")
3931 #t))
3932 (add-before 'build 'copy-resources
3933 (lambda _
3934 (copy-recursively "src/main/resources"
3935 "build/classes/")
3936 #t))
3937 (add-before 'build 'fix-jdom
3938 (lambda _
3939 ;; The newer version of jdom now sets multiple features by default
3940 ;; that are not supported.
3941 ;; Skip these features
3942 (substitute* "src/main/java/org/codehaus/plexus/metadata/merge/MXParser.java"
3943 (("throw new XmlPullParserException\\(\"unsupporte feature \"\\+name\\);")
3944 "// skip"))))
3945 (add-before 'check 'fix-test-location
3946 (lambda _
3947 (substitute* '("src/test/java/org/codehaus/plexus/metadata/DefaultComponentDescriptorWriterTest.java"
3948 "src/test/java/org/codehaus/plexus/metadata/merge/ComponentsXmlMergerTest.java")
3949 (("target") "build")))))))
3950 (propagated-inputs
3951 (list java-plexus-container-default-1.7
3952 java-plexus-component-annotations-1.7
3953 java-plexus-utils
3954 java-plexus-cli
3955 java-plexus-cli
3956 java-plexus-classworlds
3957 maven-plugin-api
3958 maven-plugin-annotations
3959 maven-core-bootstrap
3960 maven-model
3961 java-commons-cli
3962 java-qdox
3963 java-jdom2
3964 java-asm))
3965 (native-inputs
3966 (list java-junit java-guava java-geronimo-xbean-reflect))
3967 (synopsis "Inversion-of-control container for Maven")
3968 (description "The Plexus project provides a full software stack for creating
3969and executing software projects. Based on the Plexus container, the
3970applications can utilise component-oriented programming to build modular,
3971reusable components that can easily be assembled and reused. This package
3972provides the Maven plugin generating the component metadata.")))
3973
3974(define-public java-plexus-cipher
3975 (package
3976 (name "java-plexus-cipher")
3977 (version "2.0")
3978 (source (origin
3979 (method git-fetch)
3980 (uri (git-reference
3981 (url "https://github.com/codehaus-plexus/plexus-cipher")
3982 (commit (string-append "plexus-cipher-" version))))
3983 (file-name (git-file-name name version))
3984 (sha256
3985 (base32
3986 "01fipdsm090n8j4207fl8kbxznkgkmkkgyazf53hm1nwn6na5aai"))))
3987 (build-system ant-build-system)
3988 (arguments
3989 `(#:jar-name "plexus-cipher.jar"
3990 #:source-dir "src/main/java"
3991 #:phases
3992 (modify-phases %standard-phases
3993 (add-before 'build 'generate-javax.inject.Named
3994 (lambda _
3995 (mkdir-p "build/classes/META-INF/sisu")
3996 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
3997 (lambda _
3998 (display
3999 "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
4000 #t))
4001 (replace 'install (install-from-pom "pom.xml")))))
4002 (inputs
4003 `(("java-cdi-api" ,java-cdi-api)
4004 ("java-javax-inject" ,java-javax-inject)))
4005 (propagated-inputs
4006 `(("java-sonatype-spice-parent-pom" ,java-sonatype-spice-parent-pom-15)
4007 ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)))
4008 (native-inputs
4009 `(("java-junit" ,java-junit)))
4010 (home-page "https://github.com/sonatype/plexus-cipher")
4011 (synopsis "Encryption/decryption Component")
4012 (description "Plexus-cipher contains a component to deal with encryption
4013and decryption.")
4014 (license license:asl2.0)))
4015
4016(define-public java-plexus-cipher-1.7
4017 (package
4018 (inherit java-plexus-cipher)
4019 (version "1.7")
4020 (source (origin
4021 (method git-fetch)
4022 (uri (git-reference
4023 (url "https://github.com/codehaus-plexus/plexus-cipher")
4024 (commit (string-append "plexus-cipher-" version))))
4025 (file-name (git-file-name "java-plexus-cipher" version))
4026 (sha256
4027 (base32
4028 "0m638nzlxbmnbcj5cwdpgs326ab584yv0k803zlx37r6iqwvf6b0"))))
4029 (arguments
4030 `(#:jar-name "plexus-cipher.jar"
4031 #:source-dir "src/main/java"
4032 #:tests? #f; FIXME: requires sisu-inject-bean
4033 #:phases
4034 (modify-phases %standard-phases
4035 (add-before 'build 'copy-resources
4036 (lambda _
4037 (copy-recursively "src/main/resources" "build/classes")
4038 (mkdir-p "build/classes/META-INF/sisu")
4039 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
4040 (lambda _
4041 (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
4042 #t))
4043 (add-before 'install 'fix-test-dependency
4044 (lambda _
4045 ;; sisu-inject-bean is only used for tests, but its scope is "provided".
4046 (substitute* "pom.xml"
4047 (("provided") "test"))
4048 #t))
4049 (replace 'install (install-from-pom "pom.xml")))))
4050 (propagated-inputs
4051 (list java-sonatype-spice-parent-pom-15))))
4052
4053(define-public java-plexus-java
4054 (package
4055 (name "java-plexus-java")
4056 (version "0.9.10")
4057 (source (origin
4058 (method git-fetch)
4059 (uri (git-reference
4060 (url "https://github.com/codehaus-plexus/plexus-languages")
4061 (commit (string-append "plexus-languages-" version))))
4062 (file-name (git-file-name name version))
4063 (sha256
4064 (base32
4065 "0vmvgq5hfxs90yyxgssfpwq78l7vwx1ljwpkk594mrdr8sm668b5"))
4066 (modules '((guix build utils)))
4067 (snippet
4068 `(begin
4069 (for-each delete-file (find-files "." ".*.jar$"))
4070 #t))))
4071 (build-system ant-build-system)
4072 (arguments
4073 `(#:jar-name "plexus-java.java"
4074 #:source-dir "plexus-java/src/main/java"
4075 #:test-dir "plexus-java/src/test"
4076 #:tests? #f; require mockito 2
4077 #:phases
4078 (modify-phases %standard-phases
4079 (add-after 'build 'generate-metadata
4080 (lambda _
4081 (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes")
4082 "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli"
4083 "--source" "plexus-java/src/main/java"
4084 "--output" "build/classes/META-INF/plexus/components.xml"
4085 "--classes" "build/classes"
4086 "--descriptors" "build/classes/META-INF")
4087 (invoke "ant" "jar")
4088 #t))
4089 (add-before 'install 'install-parent
4090 (install-pom-file "pom.xml"))
4091 (replace 'install
4092 (install-from-pom "plexus-java/pom.xml")))))
4093 (propagated-inputs
4094 (list java-asm java-qdox-2-M9 java-javax-inject
4095 plexus-parent-pom-4.0))
4096 (inputs
4097 (list java-plexus-component-annotations-1.7))
4098 (native-inputs
4099 (list java-plexus-component-metadata-1.7 java-junit))
4100 (home-page "https://codehaus-plexus.github.io/plexus-languages/plexus-java")
4101 (synopsis "Shared language features for Java")
4102 (description "This package contains shared language features of the Java
4103language, for the plexus project.")
4104 (license license:asl2.0)))
4105
4106(define-public java-plexus-compiler-api
4107 (package
4108 (name "java-plexus-compiler-api")
4109 (version "2.8.4")
4110 (source (origin
4111 (method git-fetch)
4112 (uri (git-reference
4113 (url "https://github.com/codehaus-plexus/plexus-compiler")
4114 (commit (string-append "plexus-compiler-" version))))
4115 (file-name (git-file-name name version))
4116 (sha256
4117 (base32
4118 "1nq1gnn3s6z1j29gmi1hqbklsmm8b1lmnafb0191914f95mn18gk"))))
4119 (build-system ant-build-system)
4120 (arguments
4121 `(#:jar-name "plexus-compiler-api.jar"
4122 #:source-dir "plexus-compiler-api/src/main/java"
4123 #:test-dir "plexus-compiler-api/src/test"
4124 #:phases
4125 (modify-phases %standard-phases
4126 (replace 'install
4127 (install-from-pom "plexus-compiler-api/pom.xml")))))
4128 (propagated-inputs
4129 `(("java-plexus-container-default" ,java-plexus-container-default)
4130 ("java-plexus-compiler-pom" ,java-plexus-compiler-pom)
4131 ("java-plexus-util" ,java-plexus-utils)))
4132 (native-inputs
4133 (list java-junit))
4134 (home-page "https://github.com/codehaus-plexus/plexus-compiler")
4135 (synopsis "Plexus Compilers component's API to manipulate compilers")
4136 (description "This package contains the API used by components to manipulate
4137compilers.")
4138 (license (list license:asl2.0
4139 license:expat))))
4140
4141(define java-plexus-compiler-pom
4142 (package
4143 (inherit java-plexus-compiler-api)
4144 (name "java-plexus-compiler-pom")
4145 (arguments
4146 `(#:tests? #f
4147 #:phases
4148 (modify-phases %standard-phases
4149 (delete 'configure)
4150 (delete 'build)
4151 (replace 'install
4152 (install-pom-file "pom.xml"))
4153 (add-after 'install 'install-compilers
4154 (install-pom-file "plexus-compilers/pom.xml")))))
4155 (propagated-inputs
4156 `(("plexus-components-parent-pom-4.0" ,plexus-components-parent-pom-4.0)))))
4157
4158(define plexus-components-parent-pom-4.0
4159 (package
4160 (name "plexus-components-parent-pom")
4161 (version "4.0")
4162 (source (origin
4163 (method git-fetch)
4164 (uri (git-reference
4165 (url "https://github.com/codehaus-plexus/plexus-components")
4166 (commit (string-append "plexus-components-" version))))
4167 (file-name (git-file-name name version))
4168 (sha256
4169 (base32
4170 "041bm8yv0m2i17mqg8zljib4ykpha7ijls2qfdwvkma4d39lhysi"))))
4171 (build-system ant-build-system)
4172 (arguments
4173 `(#:tests? #f
4174 #:phases
4175 (modify-phases %standard-phases
4176 (delete 'configure)
4177 (delete 'build)
4178 (replace 'install
4179 (install-pom-file "pom.xml")))))
4180 (propagated-inputs
4181 `(("plexus-parent-pom-4.0" ,plexus-parent-pom-4.0)))
4182 (home-page "https://codehaus-plexus.github.io/plexus-components")
4183 (synopsis "Plexus parent pom")
4184 (description "This package contains the Plexus components parent POM.")
4185 (license license:asl2.0)))
4186
4187(define-public java-plexus-compiler-manager
4188 (package
4189 (inherit java-plexus-compiler-api)
4190 (name "java-plexus-compiler-manager")
4191 (arguments
4192 `(#:jar-name "compiler-compiler-manager.java"
4193 #:source-dir "plexus-compiler-manager/src/main/java"
4194 #:test-dir "plexus-compiler-manager/src/test"
4195 #:tests? #f
4196 #:phases
4197 (modify-phases %standard-phases
4198 (add-after 'build 'generate-metadata
4199 (lambda _
4200 (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes")
4201 "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli"
4202 "--source" "plexus-compiler-manager/src/main/java"
4203 "--output" "build/classes/META-INF/plexus/components.xml"
4204 "--classes" "build/classes"
4205 "--descriptors" "build/classes/META-INF")
4206 (invoke "ant" "jar")
4207 #t))
4208 (add-after 'generate-metadata 'rebuild
4209 (lambda _
4210 (invoke "ant" "jar")
4211 #t))
4212 (replace 'install
4213 (install-from-pom "plexus-compiler-manager/pom.xml")))))
4214 (propagated-inputs
4215 (list java-plexus-compiler-api java-plexus-compiler-pom
4216 java-plexus-container-default-1.7))
4217 (native-inputs
4218 (list unzip java-plexus-component-metadata-1.7))
4219 (synopsis "Compiler management for Plexus Compiler component")
4220 (description "Plexus Compiler is a Plexus component to use different
4221compilers through a uniform API. This component chooses the compiler
4222implementation to use in a project.")))
4223
4224(define-public java-plexus-compiler-javac
4225 (package
4226 (inherit java-plexus-compiler-api)
4227 (name "java-plexus-compiler-javac")
4228 (arguments
4229 `(#:jar-name "plexus-compiler-javac.jar"
4230 #:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java"
4231 #:jdk ,icedtea-8
4232 #:tests? #f; depends on compiler-test -> maven-core -> ... -> this package.
4233 #:test-dir "plexus-compilers/plexus-compiler-javac/src/test"
4234 #:modules ((guix build ant-build-system)
4235 (guix build utils)
4236 (guix build java-utils)
4237 (sxml simple))
4238 #:phases
4239 (modify-phases %standard-phases
4240 ;; We cannot use java-plexus-component-metadata to generate the metadata
4241 ;; because it ultimately depends on this package.
4242 ;; Create it manually instead
4243 (add-before 'build 'create-metadata
4244 (lambda _
4245 (let* ((dir "build/classes/META-INF/plexus")
4246 (file (string-append dir "/components.xml")))
4247 (mkdir-p dir)
4248 (with-output-to-file file
4249 (lambda _
4250 (sxml->xml
4251 `(component-set
4252 (components
4253 (component
4254 (role "org.codehaus.plexus.compiler.Compiler")
4255 (role-hint "javac")
4256 (implementation "org.codehaus.plexus.compiler.javac.JavacCompiler")
4257 (isolated-realm "false"))))))))
4258 #t))
4259 (replace 'install
4260 (install-from-pom "plexus-compilers/plexus-compiler-javac/pom.xml")))))
4261 (propagated-inputs
4262 (list java-plexus-compiler-api java-plexus-utils
4263 java-plexus-container-default))
4264 (synopsis "Javac Compiler support for Plexus Compiler component")
4265 (description "This package contains the Javac Compiler support for Plexus
4266Compiler component.")))
4267
4268(define plexus-components-pom-1.1.20
4269 (package
4270 (name "plexus-components-pom-1.1.20")
4271 (version "1.1.20")
4272 (source (origin
4273 (method git-fetch)
4274 (uri (git-reference
4275 (url "https://github.com/codehaus-plexus/plexus-components")
4276 (commit (string-append "plexus-components-" version))))
4277 (file-name (git-file-name name version))
4278 (sha256
4279 (base32
4280 "1q254k95m9icyfsvaw8c226midg8v6v436wvivhv7im825mnp5yb"))))
4281 (build-system ant-build-system)
4282 (arguments
4283 `(#:tests? #f
4284 #:phases
4285 (modify-phases %standard-phases
4286 (delete 'configure)
4287 (delete 'build)
4288 (replace 'install
4289 (install-pom-file "pom.xml")))))
4290 (propagated-inputs
4291 `(("plexus-parent-pom" ,plexus-parent-pom-3.1)))
4292 (home-page "https://github.com/codehaus-plexus/plexus-components")
4293 (synopsis "Maven parent pom for plexus packages")
4294 (description "This package contains the parent pom for plexus component
4295packages.")
4296 (license license:asl2.0)))
4297
4298(define-public java-plexus-digest
4299 (package
4300 (name "java-plexus-digest")
4301 (version "1.2")
4302 (source (origin
4303 (method git-fetch)
4304 (uri (git-reference
4305 (url "https://github.com/codehaus-plexus/plexus-digest")
4306 (commit "2a52ad1bda8297fa0e287163d2fa37245ec6a430")))
4307 (file-name (git-file-name name version))
4308 (sha256
4309 (base32
4310 "19w5wxsliz8r42niry68qa665kvjsb8081dazg9vgd3pca72w07x"))))
4311 (build-system ant-build-system)
4312 (arguments
4313 `(#:jar-name "plexus-digest.jar"
4314 #:source-dir "src/main/java"
4315 #:tests? #f
4316 #:phases
4317 (modify-phases %standard-phases
4318 (replace 'install
4319 (install-from-pom "pom.xml")))))
4320 (propagated-inputs
4321 (list java-plexus-utils plexus-components-pom-1.1.20))
4322 (native-inputs
4323 (list java-junit))
4324 (home-page "https://github.com/codehaus-plexus/plexus-digest")
4325 (synopsis "Hash function utilities for Java")
4326 (description "This package is a plexus component that contains hash
4327function utilities.")
4328 (license license:asl2.0)))
4329
4330(define-public java-plexus-sec-dispatcher
4331 (package
4332 (name "java-plexus-sec-dispatcher")
4333 (version "2.0")
4334 (source (origin
4335 (method git-fetch)
4336 (uri (git-reference
4337 (url "https://github.com/codehaus-plexus/plexus-sec-dispatcher")
4338 (commit (string-append "plexus-sec-dispatcher-" version))))
4339 (sha256
4340 (base32
4341 "0665zcyxkv2knydxgv2dn64zvy1dx9j9af12ds9s64qmzd1rk6pk"))
4342 (file-name (git-file-name name version))))
4343 (arguments
4344 `(#:jar-name "plexus-sec-dispatcher.jar"
4345 #:source-dir "src/main/java"
4346 #:phases
4347 (modify-phases %standard-phases
4348 (add-before 'build 'generate-models
4349 (lambda* (#:key inputs #:allow-other-keys)
4350 (define (modello-single-mode file version mode)
4351 (invoke "java"
4352 "org.codehaus.modello.ModelloCli"
4353 file mode "src/main/java" version
4354 "false" "true"))
4355 (let ((file "src/main/mdo/settings-security.mdo"))
4356 (modello-single-mode file "1.0.0" "java")
4357 (modello-single-mode file "1.0.0" "xpp3-reader")
4358 (modello-single-mode file "1.0.0" "xpp3-writer"))
4359 #t))
4360 (add-before 'build 'generate-javax.inject.Named
4361 (lambda _
4362 (mkdir-p "build/classes/META-INF/sisu")
4363 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
4364 (lambda _
4365 (display
4366 "org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher\n")))
4367 #t))
4368 (add-before 'check 'fix-paths
4369 (lambda _
4370 (copy-recursively "src/test/resources" "target")
4371 #t))
4372 (replace 'install (install-from-pom "pom.xml")))))
4373 (propagated-inputs
4374 (list java-plexus-utils java-plexus-cipher plexus-parent-pom-8))
4375 (native-inputs
4376 (list java-javax-inject
4377 java-modello-core
4378 ;; for modello
4379 java-plexus-container-default
4380 java-plexus-classworlds
4381 java-plexus-utils
4382 java-guava
4383 java-geronimo-xbean-reflect
4384 ;; modello plugins
4385 java-modello-plugins-java
4386 java-modello-plugins-xml
4387 java-modello-plugins-xpp3
4388 ;; for tests
4389 java-junit))
4390 (build-system ant-build-system)
4391 (home-page "https://github.com/sonatype/plexus-sec-dispatcher")
4392 (synopsis "Plexus Security Dispatcher Component")
4393 (description "This package is the Plexus Security Dispatcher Component.
4394This component decrypts a string passed to it.")
4395 (license license:asl2.0)))
4396
4397(define-public java-plexus-sec-dispatcher-1.4
4398 (package
4399 (inherit java-plexus-sec-dispatcher)
4400 (version "1.4")
4401 (source (origin
4402 (method git-fetch)
4403 (uri (git-reference
4404 (url "https://github.com/codehaus-plexus/plexus-sec-dispatcher")
4405 (commit (string-append "sec-dispatcher-" version))))
4406 (sha256
4407 (base32
4408 "1ng4yliy4cqpjr4fxxjbpwyk1wkch5f8vblm1kvwf328s4gibszs"))
4409 (file-name (git-file-name "java-plexus-sec-dispatcher" version))))
4410 (arguments
4411 (substitute-keyword-arguments (package-arguments java-plexus-sec-dispatcher)
4412 ((#:phases phases)
4413 `(modify-phases ,phases
4414 (delete 'generate-javax.inject.Named)
4415 (add-before 'build 'generate-components.xml
4416 (lambda _
4417 (mkdir-p "build/classes/META-INF/plexus")
4418 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
4419 (lambda _
4420 (display
4421 "<component-set>\n
4422 <components>\n
4423 <component>\n
4424 <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n
4425 <role-hint>default</role-hint>\n
4426 <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n
4427 <description></description>\n
4428 <requirements>\n
4429 <requirement>\n
4430 <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n
4431 <field-name>_cipher</field-name>\n
4432 </requirement>\n
4433 <requirement>\n
4434 <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n
4435 <field-name>_decryptors</field-name>\n
4436 </requirement>\n
4437 </requirements>\n
4438 <configuration>\n
4439 <_configuration-file>~/.settings-security.xml</_configuration-file>\n
4440 </configuration>\n
4441 </component>\n
4442 </components>\n
4443</component-set>\n")))))))))
4444 (propagated-inputs
4445 (list java-plexus-utils java-plexus-cipher-1.7
4446 java-sonatype-spice-parent-pom-12))))
4447
4448(define-public java-plexus-cli
4449 (package
4450 (name "java-plexus-cli")
4451 (version "1.7")
4452 (source (origin
4453 (method git-fetch)
4454 (uri (git-reference
4455 (url "https://github.com/sonatype/plexus-cli")
4456 (commit "a776afa6bca84e5107bedb69440329cdb24ed645")))
4457 (file-name (string-append name "-" version))
4458 (sha256
4459 (base32
4460 "0xjrlay605rypv3zd7y24vlwf0039bil3n2cqw54r1ddpysq46vx"))))
4461 (build-system ant-build-system)
4462 (arguments
4463 `(#:jar-name "plexus-cli.jar"
4464 #:source-dir "src/main/java"
4465 #:jdk ,icedtea-8
4466 #:test-dir "src/test"))
4467 (inputs
4468 (list java-commons-cli java-plexus-container-default
4469 java-plexus-classworlds))
4470 (native-inputs
4471 (list java-plexus-utils java-junit java-guava))
4472 (home-page "https://codehaus-plexus.github.io/plexus-cli")
4473 (synopsis "CLI building library for plexus")
4474 (description "This package is a library to help creating CLI around
4475Plexus components.")
4476 (license license:asl2.0)))
4477
4478(define-public java-plexus-build-api
4479 (package
4480 (name "java-plexus-build-api")
4481 (version "0.0.7")
4482 (source (origin
4483 (method git-fetch)
4484 (uri (git-reference
4485 (url "https://github.com/codehaus-plexus/plexus-build-api")
4486 (commit (string-append "plexus-build-api-" version))))
4487 (file-name (git-file-name name version))
4488 (sha256
4489 (base32
4490 "1d5w6c58gkx30d51v7qwv1xrhc0ly76848gihmgshj19yf6yhca0"))))
4491 (build-system ant-build-system)
4492 (arguments
4493 `(#:jar-name "plexus-build-api.jar"
4494 #:source-dir "src/main/java"
4495 #:jdk ,icedtea-8
4496 #:tests? #f; FIXME: how to run the tests?
4497 #:phases
4498 (modify-phases %standard-phases
4499 (add-before 'build 'copy-resources
4500 (lambda _
4501 (copy-recursively "src/main/resources" "build/classes")
4502 (substitute* (find-files "build/classes")
4503 (("\\$\\{project.version\\}") ,version))
4504 #t))
4505 (add-before 'build 'generate-plexus-compontent
4506 (lambda _
4507 (mkdir-p "build/classes/META-INF/plexus")
4508 ;; This file is required for plexus to inject this package.
4509 ;; FIXME: how is it generated?
4510 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
4511 (lambda _
4512 (display
4513 "<component-set>\n
4514 <components>\n
4515 <component>\n
4516 <role>org.sonatype.plexus.build.incremental.BuildContext</role>\n
4517 <role-hint>default</role-hint>\n
4518 <implementation>org.sonatype.plexus.build.incremental.DefaultBuildContext</implementation>\n
4519 <description>Filesystem based non-incremental build context implementation\n
4520which behaves as if all files were just created.</description>\n
4521 </component>\n
4522 </components>\n
4523</component-set>\n")))
4524 #t))
4525 (replace 'install
4526 (install-from-pom "pom.xml")))))
4527 (inputs
4528 (list java-plexus-utils-3.2.1 java-plexus-container-default))
4529 (home-page "https://github.com/codehaus-plexus/plexus-build-api/")
4530 (synopsis "Base build API for maven")
4531 (description "This package contains the base build API for maven and
4532a default implementation of it. This API is about scanning files in a
4533project and determining what files need to be rebuilt.")
4534 (license license:asl2.0)))
4535
4536(define-public java-modello-core
4537 (package
4538 (name "java-modello-core")
4539 (version "1.11")
4540 (source (origin
4541 (method git-fetch)
4542 (uri (git-reference
4543 (url "https://github.com/codehaus-plexus/modello")
4544 (commit (string-append "modello-" version))))
4545 (file-name (git-file-name name version))
4546 (sha256
4547 (base32
4548 "18885sim7z9j3wy19i9083y9kc8l9xxl2px823a96q4rnqj5z8s2"))))
4549 (build-system ant-build-system)
4550 (arguments
4551 `(#:jar-name "modello-core.jar"
4552 #:source-dir "modello-core/src/main/java"
4553 #:test-dir "modello-core/src/test"
4554 #:main-class "org.codehaus.modello.ModelloCli"
4555 #:jdk ,icedtea-8
4556 #:phases
4557 (modify-phases %standard-phases
4558 (add-before 'build 'copy-resources
4559 (lambda _
4560 (mkdir-p "build/classes/META-INF/plexus")
4561 (copy-file "modello-core/src/main/resources/META-INF/plexus/components.xml"
4562 "build/classes/META-INF/plexus/components.xml")
4563 #t))
4564 (add-before 'check 'fix-tests
4565 (lambda _
4566 (with-directory-excursion "modello-core/src/test/java/org/codehaus"
4567 (substitute* '("modello/core/DefaultModelloCoreTest.java"
4568 "modello/core/io/ModelReaderTest.java")
4569 (("src/test") "modello-core/src/test")))
4570 #t)))))
4571 (propagated-inputs
4572 (list java-plexus-utils java-plexus-container-default
4573 java-plexus-build-api))
4574 (native-inputs
4575 (list java-junit java-plexus-classworlds java-geronimo-xbean-reflect
4576 java-guava))
4577 (home-page "https://codehaus-plexus.github.io/modello/")
4578 (synopsis "Framework for code generation from a simple model")
4579 (description "Modello is a framework for code generation from a simple model.
4580
4581Modello generates code from a simple model format: based on a plugin
4582architecture, various types of code and descriptors can be generated from the
4583single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers,
4584XSD and documentation.")
4585 (license (list
4586 license:expat
4587 ;; Although this package uses only files licensed under expat,
4588 ;; other parts of the source are licensed under different
4589 ;; licenses. We include them to be inherited by other packages.
4590 license:asl2.0
4591 ;; Some files in modello-plugin-java are licensed under a
4592 ;; 5-clause BSD license.
4593 (license:non-copyleft
4594 (string-append "file:///modello-plugins/modello-plugin-java/"
4595 "src/main/java/org/codehaus/modello/plugin/"
4596 "java/javasource/JNaming.java"))))))
4597
4598(define-public java-modello-plugins-java
4599 (package
4600 (inherit java-modello-core)
4601 (name "java-modello-plugins-java")
4602 (arguments
4603 `(#:jar-name "modello-plugins-java.jar"
4604 #:source-dir "modello-plugins/modello-plugin-java/src/main/java"
4605 #:test-dir "modello-plugins/modello-plugin-java/src/test"
4606 #:jdk ,icedtea-8
4607 #:tests? #f; requires maven-model, which depends on this package
4608 #:phases
4609 (modify-phases %standard-phases
4610 (add-before 'build 'copy-resources
4611 (lambda _
4612 (mkdir-p "build/classes")
4613 (copy-recursively "modello-plugins/modello-plugin-java/src/main/resources"
4614 "build/classes")
4615 #t)))))
4616 (inputs
4617 (list java-modello-core))
4618 (synopsis "Modello Java Plugin")
4619 (description "Modello Java Plugin generates Java objects for the model.")))
4620
4621(define-public java-modello-plugins-xml
4622 (package
4623 (inherit java-modello-core)
4624 (name "java-modello-plugins-xml")
4625 (arguments
4626 `(#:jar-name "modello-plugins-xml.jar"
4627 #:source-dir "modello-plugins/modello-plugin-xml/src/main/java"
4628 #:test-dir "modello-plugins/modello-plugin-xml/src/test"
4629 #:jdk ,icedtea-8
4630 #:phases
4631 (modify-phases %standard-phases
4632 (add-before 'build 'copy-resources
4633 (lambda _
4634 (mkdir-p "build/classes")
4635 (copy-recursively
4636 "modello-plugins/modello-plugin-xml/src/main/resources"
4637 "build/classes")
4638 #t))
4639 (add-before 'check 'fix-paths
4640 (lambda _
4641 (with-directory-excursion "modello-plugins/modello-plugin-xml/src/test"
4642 (substitute*
4643 "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java"
4644 (("src/test") "modello-plugins/modello-plugin-xml/src/test")))
4645 #t)))))
4646 (propagated-inputs
4647 (list java-modello-core java-modello-plugins-java))
4648 (synopsis "Modello XML Plugin")
4649 (description "Modello XML Plugin contains shared code for every plugins
4650working on XML representation of the model.")))
4651
4652(define-public java-modello-test
4653 (package
4654 (inherit java-modello-core)
4655 (name "java-modello-test")
4656 (arguments
4657 `(#:jar-name "modello-test.jar"
4658 #:source-dir "modello-test/src/main/java"
4659 #:tests? #f; no tests
4660 #:jdk ,icedtea-8))
4661 (inputs
4662 (list java-plexus-utils java-plexus-compiler-api
4663 java-plexus-compiler-javac java-plexus-container-default))
4664 (synopsis "Modello test package")
4665 (description "The modello test package contains the basis to create
4666Modello generator unit-tests, including sample models and xml files to test
4667every feature for every plugin.")))
4668
4669(define-public java-modello-plugins-xpp3
4670 (package
4671 (inherit java-modello-core)
4672 (name "java-modello-plugins-xpp3")
4673 (arguments
4674 `(#:jar-name "modello-plugins-xpp3.jar"
4675 #:source-dir "modello-plugins/modello-plugin-xpp3/src/main/java"
4676 #:test-dir "modello-plugins/modello-plugin-xpp3/src/test"
4677 ;; One of the test dependencies is maven-model which depends on this package.
4678 #:tests? #f
4679 #:jdk ,icedtea-8
4680 #:phases
4681 (modify-phases %standard-phases
4682 (add-before 'build 'copy-resources
4683 (lambda _
4684 (mkdir-p "build/classes")
4685 (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources"
4686 "build/classes")
4687 #t)))))
4688 (propagated-inputs
4689 (list java-modello-core java-modello-plugins-java
4690 java-modello-plugins-xml))
4691 (native-inputs
4692 (modify-inputs (package-native-inputs java-modello-core)
4693 (prepend java-xmlunit java-modello-test)))
4694 (synopsis "Modello XPP3 Plugin")
4695 (description "The modello XPP3 plugin generates XML readers and writers based
4696on the XPP3 API (XML Pull Parser).")))
4697
4698(define-public java-ow-util-ant-tasks
4699 (package
4700 (name "java-ow-util-ant-tasks")
4701 (version "1.3.2")
4702 (source (origin
4703 (method url-fetch)
4704 (uri (string-append
4705 "mirror://debian/pool/main/o/ow-util-ant-tasks/"
4706 "ow-util-ant-tasks_" version ".orig.tar.gz"))
4707 (sha256
4708 (base32
4709 "1y5ln1g36aligwcadqksdj18i5ghqnxn523wjbzy2zyd7w58fgy5"))))
4710 (build-system ant-build-system)
4711 (arguments
4712 `(#:jar-name "ow-util-ant-tasks.jar"
4713 #:tests? #f; no tests
4714 #:phases
4715 (modify-phases %standard-phases
4716 (add-before 'build 'delete-cyclic-dependency
4717 (lambda _
4718 ;; This file depends on asm-3, which depends on this package
4719 (delete-file "src/org/objectweb/util/ant/DependencyAnalyzer.java")
4720 ;; This file depends on xalan
4721 (delete-file "src/org/objectweb/util/ant/Xalan2Liaison.java")))
4722 (add-before 'build 'fix-new-ant
4723 (lambda _
4724 (substitute* "src/org/objectweb/util/ant/MultipleCopy.java"
4725 ((", destFile.getAbsolutePath\\(\\)")
4726 ", new String[] { destFile.getAbsolutePath() }")))))))
4727 (home-page "https://packages.debian.org/source/stretch/ow-util-ant-tasks")
4728 (synopsis "Replacement for base ant tasks")
4729 (description "This library is used in the legacy build process of several
4730key frameworks developed by ObjectWeb, among them legacy versions of the
4731ObjectWeb ASM bytecode manipulation framework.")
4732 (license license:lgpl2.0+)))
4733
4734(define-public java-asm
4735 (package
4736 (name "java-asm")
4737 (version "6.0")
4738 (source (origin
4739 (method url-fetch)
4740 (uri (string-append "https://download.forge.ow2.org/asm/"
4741 "asm-" version ".tar.gz"))
4742 (sha256
4743 (base32
4744 "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00"))))
4745 (build-system ant-build-system)
4746 (arguments
4747 `(#:build-target "compile"
4748 ;; The tests require an old version of Janino, which no longer compiles
4749 ;; with the JDK7.
4750 #:tests? #f
4751 #:make-flags
4752 (list
4753 ;; We don't need these extra ant tasks, but the build system asks us to
4754 ;; provide a path anyway.
4755 "-Dobjectweb.ant.tasks.path=dummy-path"
4756 ;; The java-aqute.bndlib JAR file will be put onto the classpath and
4757 ;; used during the build automatically by ant-build-system, but
4758 ;; java-asm's build.xml fails unless we provide something here.
4759 "-Dbiz.aQute.bnd.path=dummy-path")
4760 #:phases
4761 (modify-phases %standard-phases
4762 (add-before 'build 'remove-bnd-dependency
4763 (lambda _
4764 ;; This file is the only one to require bnd, and is not needed
4765 ;; because we don't build a bundle.
4766 (delete-file "src/org/objectweb/asm/tools/ModuleInfoBndPlugin.java")
4767 #t))
4768 (add-before 'install 'build-jars
4769 (lambda* (#:key make-flags #:allow-other-keys)
4770 ;; We cannot use the "jar" target because it depends on a couple
4771 ;; of unpackaged, complicated tools.
4772 (mkdir "dist")
4773 (invoke "jar"
4774 "-cf" (string-append "dist/asm-" ,version ".jar")
4775 "-C" "output/build/tmp" ".")))
4776 (add-before 'install 'fix-pom
4777 (lambda _
4778 (substitute* (find-files "archive" "\\.pom$")
4779 (("@product.artifact@") ,version))
4780 #t))
4781 (add-before 'install 'install-parent
4782 (install-pom-file "archive/asm-parent.pom"))
4783 (replace 'install
4784 (install-from-pom "archive/asm.pom")))))
4785 (native-inputs
4786 (list java-junit))
4787 (propagated-inputs
4788 (list java-org-ow2-parent-pom-1.3))
4789 (home-page "https://asm.ow2.io/")
4790 (synopsis "Very small and fast Java bytecode manipulation framework")
4791 (description "ASM is an all purpose Java bytecode manipulation and
4792analysis framework. It can be used to modify existing classes or dynamically
4793generate classes, directly in binary form. The provided common
4794transformations and analysis algorithms allow easily assembling custom
4795complex transformations and code analysis tools.")
4796 (license license:bsd-3)))
4797
4798(define java-org-ow2-parent-pom-1.3
4799 (package
4800 (name "java-org-ow2-parent-pom")
4801 (version "1.3")
4802 (source (origin
4803 (method url-fetch)
4804 (uri "https://repo1.maven.org/maven2/org/ow2/ow2/1.3/ow2-1.3.pom")
4805 (sha256
4806 (base32
4807 "1yr8hfx8gffpppa4ii6cvrsq029a6x8hzy7nsavxhs60s9kmq8ai"))))
4808 (build-system ant-build-system)
4809 (arguments
4810 `(#:tests? #f
4811 #:phases
4812 (modify-phases %standard-phases
4813 (delete 'unpack)
4814 (delete 'build)
4815 (delete 'configure)
4816 (replace 'install
4817 ,#~(install-pom-file #$source)))))
4818 (home-page "https://ow2.org")
4819 (synopsis "Ow2.org parent pom")
4820 (description "This package contains the parent pom for projects from ow2.org,
4821including java-asm.")
4822 (license license:lgpl2.1+)))
4823
4824(define java-asm-bootstrap
4825 (package
4826 (inherit java-asm)
4827 (name "java-asm-bootstrap")
4828 (arguments
4829 (substitute-keyword-arguments (package-arguments java-asm)
4830 ((#:tests? _) #f)))
4831 (native-inputs `())))
4832
4833(define-public java-asm-3
4834 (package
4835 (inherit java-asm)
4836 (version "3.1")
4837 (source (origin
4838 (method git-fetch)
4839 (uri (git-reference
4840 (url "https://gitlab.ow2.org/asm/asm")
4841 (commit "ASM_3_1")))
4842 (file-name (git-file-name "java-asm" version))
4843 (sha256
4844 (base32
4845 "0xbyf2sl8j6mrvfpg2da0vjdp906rac62l66gkk82x5cn3vc30h4"))
4846 (modules '((guix build utils)))
4847 (snippet `(for-each delete-file (find-files "." "\\.jar$")))))
4848 (arguments
4849 `(#:build-target "jar"
4850 #:test-target "test"
4851 #:tests? #f; require legacy test software
4852 #:phases
4853 (modify-phases %standard-phases
4854 (replace 'install (install-jars "output/dist"))
4855 (delete 'generate-jar-indices))))
4856 (native-inputs (list java-ow-util-ant-tasks))))
4857
4858(define-public java-asm-8
4859 (package
4860 (inherit java-asm)
4861 (version "8.0.1")
4862 (source (origin
4863 (method git-fetch)
4864 (uri (git-reference
4865 (url "https://gitlab.ow2.org/asm/asm")
4866 (commit (string-append
4867 "ASM_" (string-join (string-split version #\.)
4868 "_")))))
4869 (file-name (git-file-name "java-asm" version))
4870 (sha256
4871 (base32
4872 "1s6j27zc1i76gh891w2g48b1c3abp9w8zp5j54yb1vm5h8djkd69"))))
4873 (arguments
4874 `(#:jar-name "asm8.jar"
4875 #:source-dir "asm/src/main/java"
4876 #:test-dir "asm/src/test"
4877 ;; tests depend on junit5
4878 #:tests? #f))
4879 (propagated-inputs '())
4880 (native-inputs '())))
4881
4882(define-public java-asm-tree-8
4883 (package
4884 (inherit java-asm-8)
4885 (name "java-asm-tree")
4886 (arguments
4887 `(#:jar-name "asm-tree.jar"
4888 #:source-dir "asm-tree/src/main/java"
4889 #:test-dir "asm-tree/src/test"
4890 ;; tests depend on junit5
4891 #:tests? #f))
4892 (inputs
4893 (list java-asm-8))))
4894
4895(define-public java-asm-analysis-8
4896 (package
4897 (inherit java-asm-8)
4898 (name "java-asm-analysis")
4899 (arguments
4900 `(#:jar-name "asm-analysis.jar"
4901 #:source-dir "asm-analysis/src/main/java"
4902 #:test-dir "asm-analysis/src/test"
4903 ;; tests depend on junit5
4904 #:tests? #f))
4905 (inputs
4906 (list java-asm-8 java-asm-tree-8))))
4907
4908(define-public java-asm-util-8
4909 (package
4910 (inherit java-asm-8)
4911 (name "java-asm-util")
4912 (arguments
4913 `(#:jar-name "asm-util8.jar"
4914 #:source-dir "asm-util/src/main/java"
4915 #:test-dir "asm-util/src/test"
4916 ;; tests depend on junit5
4917 #:tests? #f))
4918 (inputs
4919 (list java-asm-8 java-asm-analysis-8 java-asm-tree-8))))
4920
4921(define-public java-asm-commons-8
4922 (package
4923 (inherit java-asm-8)
4924 (name "java-asm-commons")
4925 (arguments
4926 (list #:jar-name "asm-commons8.jar"
4927 #:source-dir "asm-commons/src/main/java"
4928 #:test-dir "asm-commons/src/test"
4929 ;; tests depend on junit5
4930 #:tests? #f))
4931 (inputs (list java-asm-8 java-asm-analysis-8 java-asm-tree-8))))
4932
4933(define-public java-cglib
4934 (package
4935 (name "java-cglib")
4936 (version "3.2.4")
4937 (source
4938 (origin
4939 (method git-fetch)
4940 (uri (git-reference
4941 (url "https://github.com/cglib/cglib")
4942 (commit (string-append
4943 "RELEASE_"
4944 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
4945 version)))))
4946 (file-name (git-file-name name version))
4947 (sha256
4948 (base32 "186451jms2zfp47yd8kxd77az2cqal1my2br7klgyp8fpl4qfg8v"))))
4949 (build-system ant-build-system)
4950 (arguments
4951 `(;; FIXME: tests fail because junit runs
4952 ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem
4953 ;; to describe a test at all.
4954 #:tests? #f
4955 #:jar-name "cglib.jar"
4956 #:phases
4957 (modify-phases %standard-phases
4958 (add-after 'unpack 'chdir
4959 (lambda _ (chdir "cglib") #t)))))
4960 (inputs
4961 (list java-asm java-junit))
4962 (home-page "https://github.com/cglib/cglib/")
4963 (synopsis "Java byte code generation library")
4964 (description "The byte code generation library CGLIB is a high level API
4965to generate and transform Java byte code.")
4966 (license license:asl2.0)))
4967
4968(define-public java-objenesis
4969 (package
4970 (name "java-objenesis")
4971 (version "2.5.1")
4972 (source (origin
4973 (method git-fetch)
4974 (uri (git-reference
4975 (url "https://github.com/easymock/objenesis")
4976 (commit version)))
4977 (file-name (git-file-name name version))
4978 (sha256
4979 (base32
4980 "054yi200wj00x6dp1sxfrwgndwywadsbn8d8ij1j0v45j9g2vdya"))))
4981 (build-system ant-build-system)
4982 (arguments
4983 `(#:jar-name "objenesis.jar"
4984 #:source-dir "main/src/"
4985 #:test-dir "main/src/test/"))
4986 (native-inputs
4987 (list java-junit java-hamcrest-core))
4988 (home-page "http://objenesis.org/")
4989 (synopsis "Bypass the constructor when creating an object")
4990 (description "Objenesis is a small Java library that serves one purpose:
4991to instantiate a new object of a particular class. It is common to see
4992restrictions in libraries stating that classes must require a default
4993constructor. Objenesis aims to overcome these restrictions by bypassing the
4994constructor on object instantiation.")
4995 (license license:asl2.0)))
4996
4997(define-public java-easymock
4998 (package
4999 (name "java-easymock")
5000 (version "3.4")
5001 (source (origin
5002 (method git-fetch)
5003 (uri (git-reference
5004 (url "https://github.com/easymock/easymock/")
5005 (commit (string-append "easymock-" version))))
5006 (file-name (git-file-name name version))
5007 (sha256
5008 (base32
5009 "02vybm8hc0i0n9sp2f2iiqn54zwqhq835f76wc6b2m7819z5a8dq"))))
5010 (build-system ant-build-system)
5011 (arguments
5012 `(#:jar-name "easymock.jar"
5013 #:source-dir "core/src/main"
5014 #:test-dir "core/src/test"
5015 #:phases
5016 (modify-phases %standard-phases
5017 ;; FIXME: Android support requires the following packages to be
5018 ;; available: com.google.dexmaker.stock.ProxyBuilder
5019 (add-after 'unpack 'delete-android-support
5020 (lambda _
5021 (with-directory-excursion "core/src/main/java/org/easymock/internal"
5022 (substitute* "MocksControl.java"
5023 (("AndroidSupport.isAndroid\\(\\)") "false")
5024 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
5025 (delete-file "AndroidClassProxyFactory.java"))
5026 #t))
5027 (add-after 'unpack 'delete-broken-tests
5028 (lambda _
5029 (with-directory-excursion "core/src/test/java/org/easymock"
5030 ;; This test depends on dexmaker.
5031 (delete-file "tests2/ClassExtensionHelperTest.java")
5032
5033 ;; This is not a test.
5034 (delete-file "tests/BaseEasyMockRunnerTest.java")
5035
5036 ;; This test should be executed with a different runner...
5037 (delete-file "tests2/EasyMockAnnotationsTest.java")
5038 ;; ...but deleting it means that we also have to delete these
5039 ;; dependent files.
5040 (delete-file "tests2/EasyMockRunnerTest.java")
5041 (delete-file "tests2/EasyMockRuleTest.java")
5042
5043 ;; This test fails because the file "easymock.properties" does
5044 ;; not exist.
5045 (delete-file "tests2/EasyMockPropertiesTest.java"))
5046 #t)))))
5047 (inputs
5048 (list java-asm java-cglib java-objenesis))
5049 (native-inputs
5050 (list java-junit java-hamcrest-core))
5051 (home-page "https://easymock.org/")
5052 (synopsis "Java library providing mock objects for unit tests")
5053 (description "EasyMock is a Java library that provides an easy way to use
5054mock objects in unit testing.")
5055 (license license:asl2.0)))
5056
5057(define-public java-easymock-3.2
5058 (package
5059 (inherit java-easymock)
5060 (name "java-easymock")
5061 (version "3.2")
5062 (source (origin
5063 (method git-fetch)
5064 (uri (git-reference
5065 (url "https://github.com/easymock/easymock/")
5066 (commit (string-append "easymock-" version))))
5067 (file-name (git-file-name name version))
5068 (sha256
5069 (base32
5070 "0cn6qqa261mhk9mwxrsz39lkkknfv2h7iprr5zw7wpz9p96dwgv4"))))
5071 (arguments
5072 (list #:jar-name "easymock.jar"
5073 #:source-dir "easymock/src/main"
5074 #:test-dir "easymock/src/test"
5075 #:phases
5076 #~(modify-phases %standard-phases
5077 (add-after 'unpack 'delete-android-support
5078 (lambda _
5079 (with-directory-excursion "easymock/src/main/java/org/easymock/internal"
5080 (substitute* "MocksControl.java"
5081 (("AndroidSupport.isAndroid\\(\\)") "false")
5082 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
5083 (delete-file "AndroidClassProxyFactory.java"))))
5084 (add-after 'unpack 'delete-broken-tests
5085 (lambda _
5086 (with-directory-excursion "easymock/src/test/java/org/easymock"
5087 ;; This test depends on dexmaker.
5088 (delete-file "tests2/ClassExtensionHelperTest.java")
5089 ;; This is not a test.
5090 (delete-file "tests/BaseEasyMockRunnerTest.java")
5091 ;; ...but deleting it means that we also have to delete these
5092 ;; dependent files.
5093 (delete-file "tests2/EasyMockRunnerTest.java")
5094 ;; This test fails because the file "easymock.properties" does
5095 ;; not exist.
5096 (delete-file "tests2/EasyMockPropertiesTest.java")))))))))
5097
5098(define-public java-easymock-class-extension
5099 (package
5100 (inherit java-easymock-3.2)
5101 (name "java-easymock-class-extension")
5102 (build-system ant-build-system)
5103 (arguments
5104 (list #:jar-name "easymock-class-extensions.jar"
5105 #:source-dir "easymock-classextension/src/main/java"
5106 #:test-dir "easymock-classextension/src/test"))
5107 (inputs (list java-asm
5108 java-easymock-3.2
5109 java-cglib
5110 java-objenesis))
5111 (native-inputs
5112 (list java-junit java-hamcrest-core))
5113 (home-page "https://easymock.org/")
5114 (synopsis "Easymock extension to mock classes")
5115 (description "This package provides an extension to earlier versions of
5116easymock that allows mocking classes.")
5117 (license license:asl2.0)))
5118
5119(define-public java-jmock-1
5120 (package
5121 (name "java-jmock")
5122 (version "1.2.0")
5123 (source (origin
5124 (method git-fetch)
5125 (uri (git-reference
5126 (url "https://github.com/jmock-developers/jmock-library")
5127 (commit version)))
5128 (file-name (git-file-name name version))
5129 (sha256
5130 (base32
5131 "0lkga995xd9b9mmzxmcd301hlw83p1h78nibh7djlx7wydscr85z"))))
5132 (build-system ant-build-system)
5133 (arguments
5134 `(#:build-target "jars"
5135 #:test-target "run.tests"
5136 #:phases
5137 (modify-phases %standard-phases
5138 (replace 'install (install-jars "build")))))
5139 (home-page "http://jmock.org/")
5140 (synopsis "Mock object library for test-driven development")
5141 (description "JMock is a library that supports test-driven development of
5142Java code with mock objects. Mock objects help you design and test the
5143interactions between the objects in your programs.
5144
5145The jMock library
5146
5147@itemize
5148@item makes it quick and easy to define mock objects
5149@item lets you precisely specify the interactions between
5150 your objects, reducing the brittleness of your tests
5151@item plugs into your favourite test framework
5152@item is easy to extend.
5153@end itemize\n")
5154 (license license:bsd-3)))
5155
5156(define-public java-jmock
5157 (package
5158 (inherit java-jmock-1)
5159 (name "java-jmock")
5160 (version "2.8.2")
5161 (source (origin
5162 (method git-fetch)
5163 (uri (git-reference
5164 (url "https://github.com/jmock-developers/jmock-library")
5165 (commit version)))
5166 (file-name (git-file-name name version))
5167 (sha256
5168 (base32
5169 "12b7l22g3nrjvf2dzcw3z03fpd2chrgp0d8xkvn8w55rwb57pax6"))))
5170 (inputs
5171 (list java-hamcrest-all java-asm java-bsh java-junit))
5172 (native-inputs
5173 `(("cglib" ,java-cglib)))
5174 (arguments
5175 `(#:jar-name "java-jmock.jar"
5176 #:source-dir "jmock/src/main/java"
5177 #:test-dir "jmock/src/test"))))
5178
5179(define-public java-jmock-junit4
5180 (package
5181 (inherit java-jmock)
5182 (name "java-jmock-junit4")
5183 (arguments
5184 `(#:jar-name "java-jmock-junit4.jar"
5185 #:source-dir "jmock-junit4/src/main/java"
5186 #:test-dir "jmock-junit4/src/test"))
5187 (inputs
5188 `(("java-hamcrest-all" ,java-hamcrest-all)
5189 ("java-asm" ,java-asm)
5190 ("java-bsh" ,java-bsh)
5191 ("java-jmock" ,java-jmock)
5192 ("java-jumit" ,java-junit)))))
5193
5194(define-public java-jmock-legacy
5195 (package
5196 (inherit java-jmock)
5197 (name "java-jmock-legacy")
5198 (arguments
5199 `(#:jar-name "java-jmock-legacy.jar"
5200 #:source-dir "jmock-legacy/src/main/java"
5201 #:test-dir "jmock-legacy/src/test"
5202 #:phases
5203 (modify-phases %standard-phases
5204 (add-before 'check 'copy-tests
5205 (lambda _
5206 ;; This file is a dependancy of some tests
5207 (let ((file "org/jmock/test/acceptance/PackageProtectedType.java"))
5208 (copy-file (string-append "jmock/src/test/java/" file)
5209 (string-append "jmock-legacy/src/test/java/" file))
5210 #t))))))
5211 (inputs
5212 (list java-hamcrest-all
5213 java-objenesis
5214 java-cglib
5215 java-jmock
5216 java-asm
5217 java-bsh
5218 java-junit))
5219 (native-inputs
5220 (list java-jmock-junit4))))
5221
5222(define-public java-hamcrest-all
5223 (package (inherit java-hamcrest-core)
5224 (name "java-hamcrest-all")
5225 (arguments
5226 `(#:jdk ,icedtea-8
5227 ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core)
5228 ((#:build-target _) "bigjar")
5229 ((#:phases phases)
5230 `(modify-phases ,phases
5231 ;; Some build targets override the classpath, so we need to patch
5232 ;; the build.xml to ensure that required dependencies are on the
5233 ;; classpath.
5234 (add-after 'unpack 'patch-classpath-for-integration
5235 (lambda* (#:key inputs #:allow-other-keys)
5236 (substitute* "build.xml"
5237 ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
5238 (string-join
5239 (cons line
5240 (append
5241 (find-files (assoc-ref inputs "java-junit") "\\.jar$")
5242 (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
5243 (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
5244 ";"))
5245 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
5246 (car (find-files (assoc-ref inputs "java-hamcrest-core")
5247 "jar$"))))
5248 #t))
5249 (replace 'install
5250 (lambda* (#:key outputs #:allow-other-keys)
5251 (let* ((target (string-append (assoc-ref outputs "out")
5252 "/share/java/"))
5253 (version-suffix
5254 ,(string-append
5255 "-" (package-version java-hamcrest-core) ".jar"))
5256 (install-without-version-suffix
5257 (lambda (jar)
5258 (copy-file jar
5259 (string-append target
5260 (basename jar version-suffix)
5261 ".jar")))))
5262 (mkdir-p target)
5263 (for-each
5264 install-without-version-suffix
5265 (find-files "build"
5266 (lambda (name _)
5267 (and (string-suffix? ".jar" name)
5268 (not (string-suffix? "-sources.jar" name)))))))
5269 #t)))))))
5270 (inputs
5271 (modify-inputs (package-inputs java-hamcrest-core)
5272 (prepend java-junit
5273 java-jmock-1
5274 ;; This is necessary because of what seems to be a race condition.
5275 ;; This package would sometimes fail to build because hamcrest-core.jar
5276 ;; could not be found, even though it is built as part of this package.
5277 ;; Adding java-hamcrest-core appears to fix this problem. See
5278 ;; https://debbugs.gnu.org/31390 for more information.
5279 java-hamcrest-core
5280 java-easymock)))))
5281
5282(define-public java-jopt-simple
5283 (package
5284 (name "java-jopt-simple")
5285 (version "5.0.3")
5286 (source (origin
5287 (method url-fetch)
5288 (uri (string-append "http://repo1.maven.org/maven2/"
5289 "net/sf/jopt-simple/jopt-simple/"
5290 version "/jopt-simple-"
5291 version "-sources.jar"))
5292 (sha256
5293 (base32
5294 "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa"))))
5295 (build-system ant-build-system)
5296 (arguments
5297 `(#:tests? #f ; there are no tests
5298 #:jar-name "jopt-simple.jar"
5299 #:phases
5300 (modify-phases %standard-phases
5301 (add-before 'install 'create-pom
5302 (generate-pom.xml "pom.xml" "net.sf.jopt-simple" "jopt-simple" ,version))
5303 (replace 'install
5304 (install-from-pom "pom.xml")))))
5305 (home-page "https://pholser.github.io/jopt-simple/")
5306 (synopsis "Java library for parsing command line options")
5307 (description "JOpt Simple is a Java library for parsing command line
5308options, such as those you might pass to an invocation of @code{javac}. In
5309the interest of striving for simplicity, as closely as possible JOpt Simple
5310attempts to honor the command line option syntaxes of POSIX @code{getopt} and
5311GNU @code{getopt_long}. It also aims to make option parser configuration and
5312retrieval of options and their arguments simple and expressive, without being
5313overly clever.")
5314 (license license:expat)))
5315
5316;; Required by jmh
5317(define-public java-jopt-simple-4
5318 (package
5319 (inherit java-jopt-simple)
5320 (version "4.6")
5321 (source (origin
5322 (method url-fetch)
5323 (uri (string-append "https://repo1.maven.org/maven2/"
5324 "net/sf/jopt-simple/jopt-simple/"
5325 version "/jopt-simple-"
5326 version "-sources.jar"))
5327 (sha256
5328 (base32
5329 "0ny82zczxkn201ld0b7rps0ifzjhfs8m1ncdmy1f50145ciszkpd"))))
5330 (arguments
5331 (substitute-keyword-arguments (package-arguments java-jopt-simple)
5332 ((#:phases phases)
5333 `(modify-phases ,phases
5334 (replace 'create-pom
5335 (generate-pom.xml "pom.xml" "net.sf.jopt-simple" "jopt-simple"
5336 ,version))))))))
5337
5338(define-public java-commons-math3
5339 (package
5340 (name "java-commons-math3")
5341 (version "3.6.1")
5342 (source (origin
5343 (method url-fetch)
5344 (uri (string-append "mirror://apache/commons/math/source/"
5345 "commons-math3-" version "-src.tar.gz"))
5346 (sha256
5347 (base32
5348 "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6"))))
5349 (build-system ant-build-system)
5350 (arguments
5351 `(#:build-target "jar"
5352 #:test-target "test"
5353 #:make-flags
5354 ,#~(let ((hamcrest #$(this-package-native-input "java-hamcrest-core"))
5355 (junit #$(this-package-native-input "java-junit")))
5356 (list (string-append "-Djunit.jar="
5357 (car (find-files junit "jar$")))
5358 (string-append "-Dhamcrest.jar="
5359 (car (find-files hamcrest ".*.jar$")))))
5360 #:phases
5361 (modify-phases %standard-phases
5362 ;; We want to build the jar in the build phase and run the tests
5363 ;; later in a separate phase.
5364 (add-after 'unpack 'untangle-targets
5365 (lambda _
5366 (substitute* "build.xml"
5367 (("name=\"jar\" depends=\"test\"")
5368 "name=\"jar\" depends=\"compile\""))))
5369 ;; There is no install target.
5370 (replace 'install
5371 (install-from-pom "pom.xml")))))
5372 (native-inputs
5373 (list java-junit java-hamcrest-core))
5374 (home-page "https://commons.apache.org/math/")
5375 (synopsis "Apache Commons mathematics library")
5376 (description "Commons Math is a library of lightweight, self-contained
5377mathematics and statistics components addressing the most common problems not
5378available in the Java programming language or Commons Lang.")
5379 (license license:asl2.0)))
5380
5381(define-public java-jmh
5382 (package
5383 (name "java-jmh")
5384 (version "1.32")
5385 (source (origin
5386 (method git-fetch)
5387 (uri (git-reference
5388 (url "https://github.com/openjdk/jmh")
5389 (commit version)))
5390 (file-name (git-file-name name version))
5391 (sha256
5392 (base32
5393 "0i7fa7l3gdqkkgz5ddayp6m46dgbj9rqlz35xffrcbyiz3gpljy0"))))
5394 (build-system maven-build-system)
5395 (arguments
5396 `(#:exclude
5397 (("org.apache.maven.plugins" .
5398 ("maven-source-plugin" "maven-archetype-plugin" "maven-shade-plugin"
5399 "maven-site-plugin" "maven-javadoc-plugin" "maven-eclipse-plugin"))
5400 ("com.mycila.maven-license-plugin" . ("maven-license-plugin"))
5401 ("org.apache.maven.wagon" . ("wagon-ssh")))
5402 #:maven-plugins
5403 (("maven-enforcer-plugin" ,maven-enforcer-plugin)
5404 ,@(default-maven-plugins))
5405 #:phases
5406 (modify-phases %standard-phases
5407 (add-after 'unpack 'remove-unnecessary
5408 (lambda _
5409 ;; requires org.apache.maven.archetype:archetype-packaging.
5410 ;; Its subprojects also require groovy, kotlin and scala,
5411 ;; respectively.
5412 (delete-file-recursively "jmh-archetypes"))))))
5413 (propagated-inputs
5414 (list java-jopt-simple-4 java-commons-math3))
5415 (native-inputs
5416 (list java-junit java-hamcrest-core))
5417 (home-page "https://openjdk.java.net/projects/code-tools/jmh/")
5418 (synopsis "Benchmark harness for the JVM")
5419 (description "JMH is a Java harness for building, running, and analysing
5420nano/micro/milli/macro benchmarks written in Java and other languages
5421targeting the JVM.")
5422 ;; GPLv2 only
5423 (license license:gpl2)))
5424
5425(define-public java-commons-collections4
5426 (package
5427 (name "java-commons-collections4")
5428 (version "4.1")
5429 (source (origin
5430 (method url-fetch)
5431 (uri (string-append "mirror://apache/commons/collections/source/"
5432 "commons-collections4-" version "-src.tar.gz"))
5433 (sha256
5434 (base32
5435 "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl"))))
5436 (build-system ant-build-system)
5437 (arguments
5438 `(#:test-target "test"
5439 #:make-flags
5440 ,#~(let ((hamcrest #$(this-package-native-input "java-hamcrest-core"))
5441 (junit #$(this-package-native-input "java-junit"))
5442 (easymock #$(this-package-native-input "java-easymock")))
5443 (list (string-append "-Djunit.jar="
5444 (car (find-files junit "jar$")))
5445 (string-append "-Dhamcrest.jar="
5446 (car (find-files hamcrest "jar$")))
5447 (string-append "-Deasymock.jar=" easymock
5448 "/share/java/easymock.jar")))
5449 #:phases
5450 (modify-phases %standard-phases
5451 (replace 'install
5452 (install-jars "target")))))
5453 (native-inputs
5454 (list java-junit java-hamcrest-core java-easymock))
5455 (home-page "https://commons.apache.org/collections/")
5456 (synopsis "Collections framework")
5457 (description "The Java Collections Framework is the recognised standard
5458for collection handling in Java. Commons-Collections seek to build upon the
5459JDK classes by providing new interfaces, implementations and utilities. There
5460are many features, including:
5461
5462@itemize
5463@item @code{Bag} interface for collections that have a number of copies of
5464 each object
5465@item @code{BidiMap} interface for maps that can be looked up from value to
5466 key as well and key to value
5467@item @code{MapIterator} interface to provide simple and quick iteration over
5468 maps
5469@item Transforming decorators that alter each object as it is added to the
5470 collection
5471@item Composite collections that make multiple collections look like one
5472@item Ordered maps and sets that retain the order elements are added in,
5473 including an LRU based map
5474@item Reference map that allows keys and/or values to be garbage collected
5475 under close control
5476@item Many comparator implementations
5477@item Many iterator implementations
5478@item Adapter classes from array and enumerations to collections
5479@item Utilities to test or create typical set-theory properties of collections
5480 such as union, intersection, and closure.
5481@end itemize\n")
5482 (license license:asl2.0)))
5483
5484(define-public java-commons-collections
5485 (package
5486 (inherit java-commons-collections4)
5487 (name "java-commons-collections")
5488 (version "3.2.2")
5489 (source (origin
5490 (method url-fetch)
5491 (uri (string-append "mirror://apache/commons/collections/source/"
5492 "commons-collections-" version "-src.tar.gz"))
5493 (sha256
5494 (base32
5495 "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387"))
5496 (patches
5497 (search-patches "java-commons-collections-fix-java8.patch"))))
5498 (arguments
5499 (substitute-keyword-arguments (package-arguments java-commons-collections4)
5500 ((#:phases phases)
5501 `(modify-phases ,phases
5502 ;; The manifest is required by the build procedure
5503 (add-before 'build 'add-manifest
5504 (lambda _
5505 (mkdir-p "build/conf")
5506 (call-with-output-file "build/conf/MANIFEST.MF"
5507 (lambda (file)
5508 (format file "Manifest-Version: 1.0\n")))
5509 #t))
5510 (replace 'install
5511 (install-jars "build"))))))))
5512
5513(define java-commons-collections-test-classes
5514 (package
5515 (inherit java-commons-collections)
5516 (arguments
5517 `(#:jar-name "commons-collections-test-classes.jar"
5518 #:source-dir "src/test"
5519 #:tests? #f))
5520 (inputs
5521 `(("collection" ,java-commons-collections)))))
5522
5523(define-public java-commons-beanutils
5524 (package
5525 (name "java-commons-beanutils")
5526 (version "1.9.3")
5527 (source (origin
5528 (method url-fetch)
5529 (uri (string-append "mirror://apache/commons/beanutils/source/"
5530 "commons-beanutils-" version "-src.tar.gz"))
5531 (sha256
5532 (base32
5533 "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk"))))
5534 (build-system ant-build-system)
5535 (arguments
5536 `(#:test-target "test"
5537 #:tests? #f
5538 #:phases
5539 (modify-phases %standard-phases
5540 (replace 'install
5541 (lambda* (#:key outputs #:allow-other-keys)
5542 (rename-file (string-append "dist/commons-beanutils-" ,version
5543 "-SNAPSHOT.jar")
5544 "commons-beanutils.jar")
5545 (install-file "commons-beanutils.jar"
5546 (string-append (assoc-ref outputs "out") "/share/java/"))
5547 #t)))))
5548 (inputs
5549 `(("logging" ,java-commons-logging-minimal)
5550 ("collections" ,java-commons-collections)))
5551 (native-inputs
5552 `(("junit" ,java-junit)
5553 ("collections-test" ,java-commons-collections-test-classes)))
5554 (home-page "https://commons.apache.org/beanutils/")
5555 (synopsis "Dynamically set or get properties in Java")
5556 (description "BeanUtils provides a simplified interface to reflection and
5557introspection to set or get dynamically determined properties through their
5558setter and getter method.")
5559 (license license:asl2.0)))
5560
5561(define-public java-commons-io
5562 (package
5563 (name "java-commons-io")
5564 (version "2.5")
5565 (source
5566 (origin
5567 (method url-fetch)
5568 (uri (string-append "mirror://apache/commons/io/source/"
5569 "commons-io-" version "-src.tar.gz"))
5570 (sha256
5571 (base32
5572 "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3"))))
5573 (build-system ant-build-system)
5574 (outputs '("out" "doc"))
5575 (arguments
5576 `(#:test-target "test"
5577 #:make-flags
5578 ,#~(list (string-append "-Djunit.jar="
5579 (car (find-files #$(this-package-native-input "java-junit")
5580 "jar$"))))
5581 #:phases
5582 (modify-phases %standard-phases
5583 (add-after 'build 'build-javadoc ant-build-javadoc)
5584 (replace 'install (install-from-pom "pom.xml"))
5585 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
5586 (native-inputs
5587 (list java-junit java-hamcrest-core))
5588 (propagated-inputs
5589 (list apache-commons-parent-pom-39))
5590 (home-page "https://commons.apache.org/io/")
5591 (synopsis "Common useful IO related classes")
5592 (description "Commons-IO contains utility classes, stream implementations,
5593file filters and endian classes.")
5594 (license license:asl2.0)))
5595
5596(define-public java-commons-exec-1.1
5597 (package
5598 (name "java-commons-exec")
5599 (version "1.1")
5600 (source
5601 (origin
5602 (method url-fetch)
5603 (uri (string-append "mirror://apache/commons/exec/source/"
5604 "commons-exec-" version "-src.tar.gz"))
5605 (sha256
5606 (base32
5607 "025dk8xgj10lxwwwqp0hng2rn7fr4vcirxzydqzx9k4dim667alk"))))
5608 (build-system ant-build-system)
5609 (arguments
5610 `(#:test-target "test"
5611 #:make-flags
5612 ,#~(list (string-append "-Dmaven.junit.jar="
5613 (car (find-files #$(this-package-native-input "java-junit")
5614 "jar$"))))
5615 #:phases
5616 (modify-phases %standard-phases
5617 (add-before 'build 'delete-network-tests
5618 (lambda _
5619 (delete-file "src/test/java/org/apache/commons/exec/DefaultExecutorTest.java")
5620 (substitute* "src/test/java/org/apache/commons/exec/TestRunner.java"
5621 (("suite\\.addTestSuite\\(DefaultExecutorTest\\.class\\);") ""))
5622 #t))
5623 ;; The "build" phase automatically tests.
5624 (delete 'check)
5625 (replace 'install (install-jars "target")))))
5626 (native-inputs
5627 (list java-junit))
5628 (home-page "https://commons.apache.org/proper/commons-exec/")
5629 (synopsis "Common program execution related classes")
5630 (description "Commons-Exec simplifies executing external processes.")
5631 (license license:asl2.0)))
5632
5633(define-public java-commons-exec
5634 (package
5635 (inherit java-commons-exec-1.1)
5636 (version "1.3")
5637 (source
5638 (origin
5639 (method url-fetch)
5640 (uri (string-append "mirror://apache/commons/exec/source/"
5641 "commons-exec-" version "-src.tar.gz"))
5642 (sha256
5643 (base32
5644 "17yb4h6f8l49c5iyyvda4z2nmw0bxrx857nrwmsr7mmpb7x441yv"))))
5645 (arguments
5646 `(#:test-target "test"
5647 #:make-flags
5648 ,#~(list (string-append "-Dmaven.junit.jar="
5649 (car (find-files #$(this-package-native-input "java-junit")
5650 "jar$")))
5651 "-Dmaven.compiler.source=1.7"
5652 "-Dmaven.compiler.target=1.7")
5653 #:phases
5654 (modify-phases %standard-phases
5655 (add-before 'build 'delete-network-tests
5656 (lambda* (#:key inputs #:allow-other-keys)
5657 ;; This test hangs indefinitely.
5658 (delete-file "src/test/java/org/apache/commons/exec/issues/Exec60Test.java")
5659 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec41Test.java"
5660 (("ping -c 10 127.0.0.1") "sleep 10"))
5661 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec49Test.java"
5662 (("/bin/ls") "ls"))
5663 (call-with-output-file "src/test/scripts/ping.sh"
5664 (lambda (port)
5665 (format port "#!~a/bin/sh\nsleep $1\n"
5666 (assoc-ref inputs "bash"))))
5667 #t))
5668 ;; The "build" phase automatically tests.
5669 (delete 'check)
5670 (replace 'install (install-jars "target")))))
5671 (native-inputs
5672 (list java-junit java-hamcrest-core))))
5673
5674(define-public java-commons-lang
5675 (package
5676 (name "java-commons-lang")
5677 (version "2.6")
5678 (source
5679 (origin
5680 (method url-fetch)
5681 (uri (string-append "mirror://apache/commons/lang/source/"
5682 "commons-lang-" version "-src.tar.gz"))
5683 (sha256
5684 (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5"))))
5685 (build-system ant-build-system)
5686 (outputs '("out" "doc"))
5687 (arguments
5688 `(#:test-target "test"
5689 #:test-exclude (list "**/Abstract*.java" "**/Random*.java")
5690 #:phases
5691 (modify-phases %standard-phases
5692 (add-after 'build 'build-javadoc ant-build-javadoc)
5693 (add-before 'check 'disable-failing-test
5694 (lambda _
5695 ;; Disable a failing test
5696 (substitute* "src/test/java/org/apache/commons/lang/\
5697time/FastDateFormatTest.java"
5698 (("public void testFormat\\(\\)")
5699 "public void disabled_testFormat()"))
5700 #t))
5701 (replace 'install (install-jars "target"))
5702 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
5703 (native-inputs
5704 (list java-junit))
5705 (home-page "https://commons.apache.org/lang/")
5706 (synopsis "Extension of the java.lang package")
5707 (description "The Commons Lang components contains a set of Java classes
5708that provide helper methods for standard Java classes, especially those found
5709in the @code{java.lang} package in the Sun JDK. The following classes are
5710included:
5711
5712@itemize
5713@item StringUtils - Helper for @code{java.lang.String}.
5714@item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets
5715 of characters such as @code{[a-z]} and @code{[abcdez]}.
5716@item RandomStringUtils - Helper for creating randomised strings.
5717@item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
5718@item NumberRange - A range of numbers with an upper and lower bound.
5719@item ObjectUtils - Helper for @code{java.lang.Object}.
5720@item SerializationUtils - Helper for serializing objects.
5721@item SystemUtils - Utility class defining the Java system properties.
5722@item NestedException package - A sub-package for the creation of nested
5723 exceptions.
5724@item Enum package - A sub-package for the creation of enumerated types.
5725@item Builder package - A sub-package for the creation of @code{equals},
5726 @code{hashCode}, @code{compareTo} and @code{toString} methods.
5727@end itemize\n")
5728 (license license:asl2.0)))
5729
5730(define-public java-commons-lang3
5731 (package
5732 (name "java-commons-lang3")
5733 (version "3.12.0")
5734 (source
5735 (origin
5736 (method url-fetch)
5737 (uri (string-append "mirror://apache/commons/lang/source/"
5738 "commons-lang3-" version "-src.tar.gz"))
5739 (sha256
5740 (base32 "09dcv1pkdx3hpf06py8p9511f1wkin6jpacdll0c8vxpbi3yfwzv"))
5741 (patches
5742 (search-patches "java-commons-lang-fix-dependency.patch"))))
5743 (build-system ant-build-system)
5744 (arguments
5745 `(#:jar-name "commons-lang3.jar"
5746 #:source-dir "src/main/java"
5747 #:tests? #f; require junit5
5748 #:phases
5749 (modify-phases %standard-phases
5750 (replace 'install (install-from-pom "pom.xml")))))
5751 (propagated-inputs
5752 (list apache-commons-parent-pom-48))
5753 (home-page "https://commons.apache.org/lang/")
5754 (synopsis "Extension of the java.lang package")
5755 (description "The Commons Lang components contains a set of Java classes
5756that provide helper methods for standard Java classes, especially those found
5757in the @code{java.lang} package. The following classes are included:
5758
5759@itemize
5760@item StringUtils - Helper for @code{java.lang.String}.
5761@item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of
5762 characters such as @code{[a-z]} and @code{[abcdez]}.
5763@item RandomStringUtils - Helper for creating randomised strings.
5764@item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
5765@item NumberRange - A range of numbers with an upper and lower bound.
5766@item ObjectUtils - Helper for @code{java.lang.Object}.
5767@item SerializationUtils - Helper for serializing objects.
5768@item SystemUtils - Utility class defining the Java system properties.
5769@item NestedException package - A sub-package for the creation of nested
5770 exceptions.
5771@item Enum package - A sub-package for the creation of enumerated types.
5772@item Builder package - A sub-package for the creation of @code{equals},
5773 @code{hashCode}, @code{compareTo} and @code{toString} methods.
5774@end itemize\n")
5775 (license license:asl2.0)))
5776
5777(define-public java-commons-bsf
5778 (package
5779 (name "java-commons-bsf")
5780 (version "2.4.0")
5781 (source (origin
5782 (method url-fetch)
5783 (uri (string-append "mirror://apache/commons/bsf/source/bsf-src-"
5784 version ".tar.gz"))
5785 (sha256
5786 (base32
5787 "1sbamr8jl32p1jgf59nw0b2w9qivyg145954hm6ly54cfgsqrdas"))
5788 (modules '((guix build utils)))
5789 (snippet
5790 '(begin
5791 (for-each delete-file
5792 (find-files "." "\\.jar$"))
5793 #t))))
5794 (build-system ant-build-system)
5795 (arguments
5796 `(#:build-target "jar"
5797 #:tests? #f; No test file
5798 #:modules ((guix build ant-build-system)
5799 (guix build utils)
5800 (guix build java-utils)
5801 (sxml simple))
5802 #:phases
5803 (modify-phases %standard-phases
5804 (add-before 'build 'create-properties
5805 (lambda _
5806 ;; This file is missing from the distribution
5807 (call-with-output-file "build-properties.xml"
5808 (lambda (port)
5809 (sxml->xml
5810 `(project (@ (basedir ".") (name "build-properties") (default ""))
5811 (property (@ (name "project.name") (value "bsf")))
5812 (property (@ (name "source.level") (value "1.5")))
5813 (property (@ (name "build.lib") (value "build/jar")))
5814 (property (@ (name "src.dir") (value "src")))
5815 (property (@ (name "tests.dir") (value "src/org/apache/bsf/test")))
5816 (property (@ (name "build.tests") (value "build/test-classes")))
5817 (property (@ (name "build.dest") (value "build/classes"))))
5818 port)))
5819 #t))
5820 (replace 'install (install-jars "build")))))
5821 (native-inputs
5822 (list java-junit))
5823 (inputs
5824 (list java-commons-logging-minimal))
5825 (home-page "https://commons.apache.org/proper/commons-bsf")
5826 (synopsis "Bean Scripting Framework")
5827 (description "The Bean Scripting Framework (BSF) is a set of Java classes
5828which provides scripting language support within Java applications, and access
5829to Java objects and methods from scripting languages. BSF allows one to write
5830JSPs in languages other than Java while providing access to the Java class
5831library. In addition, BSF permits any Java application to be implemented in
5832part (or dynamically extended) by a language that is embedded within it. This
5833is achieved by providing an API that permits calling scripting language engines
5834from within Java, as well as an object registry that exposes Java objects to
5835these scripting language engines.")
5836 (license license:asl2.0)))
5837
5838(define-public java-commons-jxpath
5839 (package
5840 (name "java-commons-jxpath")
5841 (version "1.3")
5842 (source (origin
5843 (method url-fetch)
5844 (uri (string-append "mirror://apache/commons/jxpath/source/"
5845 "commons-jxpath-" version "-src.tar.gz"))
5846 (sha256
5847 (base32
5848 "1rpgg31ayn9fwr4bfi2i1ij0npcg79ad2fv0w9hacvawsyc42cfs"))))
5849 (build-system ant-build-system)
5850 (arguments
5851 `(#:jar-name "commons-jxpath.jar"
5852 ;; tests require more dependencies, including mockrunner which depends on old software
5853 #:tests? #f
5854 #:source-dir "src/java"))
5855 (inputs
5856 `(("servlet" ,java-classpathx-servletapi)
5857 ("java-jdom" ,java-jdom)
5858 ("java-commons-beanutils" ,java-commons-beanutils)))
5859 (native-inputs
5860 (list java-junit))
5861 (home-page "https://commons.apache.org/jxpath/")
5862 (synopsis "Simple interpreter of an expression language called XPath")
5863 (description "The org.apache.commons.jxpath package defines a simple
5864interpreter of an expression language called XPath. JXPath applies XPath
5865expressions to graphs of objects of all kinds: JavaBeans, Maps, Servlet
5866contexts, DOM etc, including mixtures thereof.")
5867 (license license:asl2.0)))
5868
5869(define-public java-commons-pool
5870 (package
5871 (name "java-commons-pool")
5872 (version "2.6.2")
5873 (source (origin
5874 (method url-fetch)
5875 (uri (string-append "mirror://apache/commons/pool/source/"
5876 "commons-pool2-" version "-src.tar.gz"))
5877 (sha256
5878 (base32
5879 "1fi1hgqmq01bs6azbj3sfswxzadp2r8sjjfiq6ryilz1m50kvrv6"))))
5880 (arguments
5881 `(#:jar-name "common-pool.jar"
5882 #:source-dir "src/main/java"
5883 #:test-exclude
5884 (list "**/PerformanceTest.java")))
5885 (build-system ant-build-system)
5886 (inputs
5887 (list java-cglib))
5888 (native-inputs
5889 (list java-junit java-hamcrest-core java-asm java-objenesis))
5890 (home-page "https://commons.apache.org/proper/commons-pool/")
5891 (synopsis "Object-pooling API in Java")
5892 (description "The commons-pool package provides an object-pooling API
5893and a number of object pool implementations. This package defines a
5894handful of pooling interfaces and some base classes that may be useful when
5895creating new pool implementations.")
5896 (license license:asl2.0)))
5897
5898(define-public java-commons-dbcp
5899 (package
5900 (name "java-commons-dbcp")
5901 (version "2.6.0")
5902 (source (origin
5903 (method url-fetch)
5904 (uri (string-append "mirror://apache/commons/dbcp/source/"
5905 "commons-dbcp2-" version "-src.tar.gz"))
5906 (sha256
5907 (base32
5908 "0axbvcbnf2l70fc3ybrlp3siw2w4ka9mia2pnx4py8gz54cpw3rc"))))
5909 (arguments
5910 `(#:source-dir "src/main/java"
5911 #:jar-name "java-commons-dbcp.jar"
5912 #:tests? #f)); requires apache-geronimo
5913 (inputs
5914 `(("java-commons-pool" ,java-commons-pool)
5915 ("java-commons-logging" ,java-commons-logging-minimal)
5916 ("java-jboss-transaction-api-spec" ,java-jboss-transaction-api-spec)))
5917 (native-inputs
5918 (list java-junit))
5919 (build-system ant-build-system)
5920 (home-page "https://commons.apache.org/proper/commons-dbcp/")
5921 (synopsis "Database Connection Pool for Java")
5922 (description "Commons-dbcp allows you to share a pool of database
5923connections between users. Creating a new connection for each user can be
5924time consuming and even unfeasible when the number of simultaneous users is
5925very large. This package provides a way to share a poole of connections to
5926reduce that load.")
5927 (license license:asl2.0)))
5928
5929(define-public java-commons-jcs
5930 (package
5931 (name "java-commons-jcs")
5932 (version "3.1")
5933 (source (origin
5934 (method url-fetch)
5935 (uri (string-append "mirror://apache/commons/jcs/source/"
5936 "commons-jcs3-dist-" version "-src.tar.gz"))
5937 (sha256
5938 (base32
5939 "0y1lm1xnsj99bf7y9mkvbzqfy8dr7ac8zcbkpsjgzb9vhabfsbac"))))
5940 (build-system ant-build-system)
5941 (arguments
5942 `(#:jar-name "commons-jcs.jar"
5943 #:source-dir "commons-jcs-core/src/main/java"
5944 #:test-dir "commons-jcs-core/src/test"
5945 #:tests? #f; requires hsqldb
5946 #:phases
5947 (modify-phases %standard-phases
5948 (add-before 'build 'copy-resources
5949 (lambda _
5950 (copy-recursively "commons-jcs-core/src/main/resources"
5951 "build/classes"))))))
5952 (propagated-inputs
5953 (list java-classpathx-servletapi
5954 java-commons-dbcp
5955 java-httpcomponents-httpclient
5956 java-httpcomponents-httpcore
5957 java-log4j-api))
5958 (native-inputs
5959 (list java-junit))
5960 (home-page "https://commons.apache.org/proper/commons-jcs/")
5961 (synopsis "Distributed caching system in Java")
5962 (description "JCS is a distributed caching system written in Java. It
5963is intended to speed up applications by providing a means to manage cached
5964data of various dynamic natures. Like any caching system, JCS is most useful
5965for high read, low put applications. Latency times drop sharply and
5966bottlenecks move away from the database in an effectively cached system.")
5967 (license license:asl2.0)))
5968
5969(define-public java-jsr250
5970 (package
5971 (name "java-jsr250")
5972 (version "1.3")
5973 (source (origin
5974 (method git-fetch)
5975 (uri (git-reference
5976 (url "https://github.com/javaee/javax.annotation")
5977 (commit version)))
5978 (file-name (git-file-name name version))
5979 (sha256
5980 (base32
5981 "1g22a9d75g01s9yxgdig0ss7i30j4ysnnp08gn4krn0wly4lpqq0"))))
5982 (build-system ant-build-system)
5983 (arguments
5984 `(#:tests? #f ; no tests included
5985 #:jdk ,icedtea-8
5986 #:jar-name "jsr250.jar"
5987 #:phases
5988 (modify-phases %standard-phases
5989 (replace 'install
5990 (install-from-pom "pom.xml")))))
5991 (propagated-inputs (list java-jvnet-parent-pom-3))
5992 (home-page "https://jcp.org/en/jsr/detail?id=250")
5993 (synopsis "Security-related annotations")
5994 (description "This package provides annotations for security. It provides
5995packages in the @code{javax.annotation} and @code{javax.annotation.security}
5996namespaces.")
5997 ;; either cddl or gpl2 only, with classpath exception
5998 (license (list license:cddl1.0
5999 license:gpl2))))
6000
6001(define-public java-jsr305
6002 (package
6003 (name "java-jsr305")
6004 (version "3.0.1")
6005 (source (origin
6006 (method url-fetch)
6007 (uri (string-append "https://repo1.maven.org/maven2/"
6008 "com/google/code/findbugs/"
6009 "jsr305/" version "/jsr305-"
6010 version "-sources.jar"))
6011 (sha256
6012 (base32
6013 "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n"))))
6014 (build-system ant-build-system)
6015 (arguments
6016 `(#:tests? #f ; no tests included
6017 #:jar-name "jsr305.jar"
6018 #:phases
6019 (modify-phases %standard-phases
6020 (add-before 'install 'create-pom
6021 (generate-pom.xml "pom.xml" "com.google.code.findbugs" "jsr305" ,version))
6022 (replace 'install
6023 (install-from-pom "pom.xml")))))
6024 (home-page "https://findbugs.sourceforge.net/")
6025 (synopsis "Annotations for the static analyzer called findbugs")
6026 (description "This package provides annotations for the findbugs package.
6027It provides packages in the @code{javax.annotations} namespace.")
6028 (license license:asl2.0)))
6029
6030(define-public java-guava
6031 (package
6032 (name "java-guava")
6033 ;; This is the last release of Guava that can be built with Java 7.
6034 (version "20.0")
6035 (source (origin
6036 (method git-fetch)
6037 (uri (git-reference
6038 (url "https://github.com/google/guava/")
6039 (commit (string-append "v" version))))
6040 (file-name (git-file-name name version))
6041 (sha256
6042 (base32
6043 "00h5cawdjic1vind3yivzh1f58flvm1yfmhsyqwyvmbvj1vakysp"))))
6044 (build-system ant-build-system)
6045 (arguments
6046 `(#:tests? #f ; no tests included
6047 #:jar-name "guava.jar"
6048 #:source-dir "guava/src"
6049 #:phases
6050 (modify-phases %standard-phases
6051 (add-after 'unpack 'trim-sources
6052 (lambda _
6053 (with-directory-excursion "guava/src/com/google/common"
6054 ;; Remove annotations to avoid extra dependencies:
6055 ;; * "j2objc" annotations are used when converting Java to
6056 ;; Objective C;
6057 ;; * "errorprone" annotations catch common Java mistakes at
6058 ;; compile time;
6059 ;; * "IgnoreJRERequirement" is used for Android.
6060 (substitute* (find-files "." "\\.java$")
6061 (("import com.google.j2objc.*") "")
6062 (("import com.google.errorprone.annotation.*") "")
6063 (("import org.codehaus.mojo.animal_sniffer.*") "")
6064 (("@CanIgnoreReturnValue") "")
6065 (("@LazyInit") "")
6066 (("@WeakOuter") "")
6067 (("@RetainedWith") "")
6068 (("@Weak") "")
6069 (("@ForOverride") "")
6070 (("@J2ObjCIncompatible") "")
6071 (("@IgnoreJRERequirement") "")))
6072 #t))
6073 (replace 'install (install-from-pom "guava/pom.xml")))))
6074 (inputs
6075 (list java-jsr305))
6076 (propagated-inputs
6077 (list java-guava-parent-pom))
6078 (home-page "https://github.com/google/guava")
6079 (synopsis "Google core libraries for Java")
6080 (description "Guava is a set of core libraries that includes new
6081collection types (such as multimap and multiset), immutable collections, a
6082graph library, functional types, an in-memory cache, and APIs/utilities for
6083concurrency, I/O, hashing, primitives, reflection, string processing, and much
6084more!")
6085 (license license:asl2.0)))
6086
6087(define java-guava-parent-pom
6088 (package
6089 (inherit java-guava)
6090 (name "java-guava-parent-pom")
6091 (arguments
6092 `(#:tests? #f
6093 #:phases
6094 (modify-phases %standard-phases
6095 (delete 'configure)
6096 (delete 'build)
6097 (replace 'install
6098 (install-pom-file "pom.xml")))))
6099 (propagated-inputs
6100 `(("java-sonatype-oss-parent-pom" ,java-sonatype-oss-parent-pom-7)))))
6101
6102;; The java-commons-logging package provides adapters to many different
6103;; logging frameworks. To avoid an excessive dependency graph we try to build
6104;; it with only a minimal set of adapters.
6105(define-public java-commons-logging-minimal
6106 (package
6107 (name "java-commons-logging-minimal")
6108 (version "1.2")
6109 (source (origin
6110 (method url-fetch)
6111 (uri (string-append "mirror://apache/commons/logging/source/"
6112 "commons-logging-" version "-src.tar.gz"))
6113 (sha256
6114 (base32
6115 "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9"))))
6116 (build-system ant-build-system)
6117 (arguments
6118 `(#:tests? #f ; avoid dependency on logging frameworks
6119 #:jar-name "commons-logging-minimal.jar"
6120 #:phases
6121 (modify-phases %standard-phases
6122 (add-after 'unpack 'delete-adapters-and-tests
6123 (lambda _
6124 ;; Delete all adapters except for NoOpLog, SimpleLog, and
6125 ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl
6126 ;; is used by applications; SimpleLog is the only actually usable
6127 ;; implementation that does not depend on another logging
6128 ;; framework.
6129 (for-each
6130 (lambda (file)
6131 (delete-file (string-append
6132 "src/main/java/org/apache/commons/logging/impl/" file)))
6133 (list "Jdk13LumberjackLogger.java"
6134 "WeakHashtable.java"
6135 "Log4JLogger.java"
6136 "ServletContextCleaner.java"
6137 "Jdk14Logger.java"
6138 "AvalonLogger.java"
6139 "LogKitLogger.java"))
6140 (delete-file-recursively "src/test")
6141 #t)))))
6142 (home-page "https://commons.apache.org/logging/")
6143 (synopsis "Common API for logging implementations")
6144 (description "The Logging package is a thin bridge between different
6145logging implementations. A library that uses the commons-logging API can be
6146used with any logging implementation at runtime.")
6147 (license license:asl2.0)))
6148
6149;; This is the last release of the 1.x series.
6150(define-public java-mockito-1
6151 (package
6152 (name "java-mockito")
6153 (version "1.10.19")
6154 (source (origin
6155 (method url-fetch)
6156 (uri (string-append "http://repo1.maven.org/maven2/"
6157 "org/mockito/mockito-core/" version
6158 "/mockito-core-" version "-sources.jar"))
6159 (sha256
6160 (base32
6161 "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc"))))
6162 (build-system ant-build-system)
6163 (arguments
6164 `(#:jar-name "mockito.jar"
6165 #:tests? #f ; no tests included
6166 ;; FIXME: patch-and-repack does not support jars, so we have to apply
6167 ;; patches in build phases.
6168 #:phases
6169 (modify-phases %standard-phases
6170 ;; Mockito was developed against a different version of hamcrest,
6171 ;; which does not require matcher implementations to provide an
6172 ;; implementation of the "describeMismatch" method. We add this
6173 ;; simple definition to pass the build with our version of hamcrest.
6174 (add-after 'unpack 'fix-hamcrest-build-error
6175 (lambda _
6176 (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java"
6177 (("public Matcher getActualMatcher\\(\\) .*" line)
6178 (string-append "
6179 public void describeMismatch(Object item, Description description) {
6180 actualMatcher.describeMismatch(item, description);
6181 }"
6182 line)))
6183 #t))
6184 ;; Mockito bundles cglib. We have a cglib package, so let's use
6185 ;; that instead.
6186 (add-after 'unpack 'use-system-libraries
6187 (lambda _
6188 (with-directory-excursion "src/org/mockito/internal/creation/cglib"
6189 (substitute* '("CGLIBHacker.java"
6190 "CglibMockMaker.java"
6191 "ClassImposterizer.java"
6192 "DelegatingMockitoMethodProxy.java"
6193 "MethodInterceptorFilter.java"
6194 "MockitoNamingPolicy.java"
6195 "SerializableMockitoMethodProxy.java"
6196 "SerializableNoOp.java")
6197 (("import org.mockito.cglib") "import net.sf.cglib")))
6198 #t)))))
6199 (inputs
6200 (list java-junit java-objenesis java-cglib java-hamcrest-core))
6201 (home-page "http://mockito.org")
6202 (synopsis "Mockito is a mock library for Java")
6203 (description "Mockito is a mocking library for Java which lets you write
6204tests with a clean and simple API. It generates mocks using reflection, and
6205it records all mock invocations, including methods arguments.")
6206 (license license:asl2.0)))
6207
6208(define-public java-httpcomponents-httpcore
6209 (package
6210 (name "java-httpcomponents-httpcore")
6211 (version "4.4.6")
6212 (source (origin
6213 (method url-fetch)
6214 (uri (string-append "mirror://apache//httpcomponents/httpcore/"
6215 "source/httpcomponents-core-"
6216 version "-src.tar.gz"))
6217 (sha256
6218 (base32
6219 "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy"))))
6220 (build-system ant-build-system)
6221 (arguments
6222 `(#:jar-name "httpcomponents-httpcore.jar"
6223 #:phases
6224 (modify-phases %standard-phases
6225 (add-after 'unpack 'chdir
6226 (lambda _ (chdir "httpcore") #t)))))
6227 (inputs
6228 (list java-commons-logging-minimal java-commons-lang3))
6229 (native-inputs
6230 (list java-junit java-mockito-1))
6231 (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html")
6232 (synopsis "Low level HTTP transport components")
6233 (description "HttpCore is a set of low level HTTP transport components
6234that can be used to build custom client and server side HTTP services with a
6235minimal footprint. HttpCore supports two I/O models: blocking I/O model based
6236on the classic Java I/O and non-blocking, event driven I/O model based on Java
6237NIO.
6238
6239This package provides the blocking I/O model library.")
6240 (license license:asl2.0)))
6241
6242(define-public java-httpcomponents-httpcore-nio
6243 (package (inherit java-httpcomponents-httpcore)
6244 (name "java-httpcomponents-httpcore-nio")
6245 (arguments
6246 `(#:jar-name "httpcomponents-httpcore-nio.jar"
6247 #:phases
6248 (modify-phases %standard-phases
6249 (add-after 'unpack 'chdir
6250 (lambda _ (chdir "httpcore-nio") #t)))))
6251 (inputs
6252 (modify-inputs (package-inputs java-httpcomponents-httpcore)
6253 (prepend java-httpcomponents-httpcore java-hamcrest-core)))
6254 (description "HttpCore is a set of low level HTTP transport components
6255that can be used to build custom client and server side HTTP services with a
6256minimal footprint. HttpCore supports two I/O models: blocking I/O model based
6257on the classic Java I/O and non-blocking, event driven I/O model based on Java
6258NIO.
6259
6260This package provides the non-blocking I/O model library based on Java
6261NIO.")))
6262
6263(define-public java-httpcomponents-httpcore-ab
6264 (package (inherit java-httpcomponents-httpcore)
6265 (name "java-httpcomponents-httpcore-ab")
6266 (arguments
6267 `(#:jar-name "httpcomponents-httpcore-ab.jar"
6268 #:phases
6269 (modify-phases %standard-phases
6270 (add-after 'unpack 'chdir
6271 (lambda _ (chdir "httpcore-ab") #t)))))
6272 (inputs
6273 (modify-inputs (package-inputs java-httpcomponents-httpcore)
6274 (prepend java-httpcomponents-httpcore java-commons-cli
6275 java-hamcrest-core)))
6276 (synopsis "Apache HttpCore benchmarking tool")
6277 (description "This package provides the HttpCore benchmarking tool. It is
6278an Apache AB clone based on HttpCore.")))
6279
6280(define-public java-httpcomponents-httpcore-osgi
6281 (package (inherit java-httpcomponents-httpcore)
6282 (name "java-httpcomponents-httpcore-osgi")
6283 (arguments
6284 `(#:jar-name "httpcomponents-httpcore-osgi.jar"
6285 #:phases
6286 (modify-phases %standard-phases
6287 (add-after 'unpack 'chdir
6288 (lambda _ (chdir "httpcore-osgi"))))))
6289 (inputs
6290 (modify-inputs (package-inputs java-httpcomponents-httpcore)
6291 (prepend java-httpcomponents-httpcore
6292 java-httpcomponents-httpcore-nio
6293 java-hamcrest-core)))
6294 (native-inputs (list java-ops4j-pax-exam-core
6295 java-ops4j-pax-exam-core-junit
6296 java-ops4j-pax-exam-core-spi
6297 java-junit))
6298 (description "HttpCore is a set of low level HTTP transport components
6299that can be used to build custom client and server side HTTP services with a
6300minimal footprint. HttpCore supports two I/O models: blocking I/O model based
6301on the classic Java I/O and non-blocking, event driven I/O model based on Java
6302NIO.
6303
6304This package provides... some tests.")))
6305
6306(define-public java-httpcomponents-httpclient
6307 (package
6308 (name "java-httpcomponents-httpclient")
6309 (version "4.5.12")
6310 (source (origin
6311 (method url-fetch)
6312 (uri (string-append "mirror://apache/httpcomponents/httpclient/"
6313 "source/httpcomponents-client-"
6314 version "-src.tar.gz"))
6315 (sha256
6316 (base32
6317 "1va99m2zc2liv0v9vn72p5ja8yz4s5wq7zpahaai5nr966kvxzkb"))))
6318 (build-system ant-build-system)
6319 (arguments
6320 `(#:jar-name "httpcomponents-httpclient.jar"
6321 #:phases
6322 (modify-phases %standard-phases
6323 (add-after 'unpack 'chdir
6324 (lambda _ (chdir "httpclient") #t)))))
6325 (inputs
6326 (list java-commons-logging-minimal
6327 java-commons-codec
6328 java-hamcrest-core
6329 java-httpcomponents-httpcore
6330 java-mockito-1
6331 java-junit))
6332 (home-page "https://hc.apache.org/httpcomponents-client-ga/")
6333 (synopsis "HTTP client library for Java")
6334 (description "Although the @code{java.net} package provides basic
6335functionality for accessing resources via HTTP, it doesn't provide the full
6336flexibility or functionality needed by many applications. @code{HttpClient}
6337seeks to fill this void by providing an efficient, up-to-date, and
6338feature-rich package implementing the client side of the most recent HTTP
6339standards and recommendations.")
6340 (license license:asl2.0)))
6341
6342(define-public java-httpcomponents-httpclient-cache
6343 (package (inherit java-httpcomponents-httpclient)
6344 (name "java-httpcomponents-httpclient-cache")
6345 (arguments
6346 `(#:jar-name "httpcomponents-httpclient-cache.jar"
6347 #:source-dir "src/main/java"
6348 #:test-dir "src/test"
6349 #:phases
6350 (modify-phases %standard-phases
6351 (add-after 'unpack 'delete-unused-impls
6352 (lambda _
6353 (for-each
6354 delete-file-recursively
6355 '("src/main/java/org/apache/http/impl/client/cache/ehcache/"
6356 "src/main/java/org/apache/http/impl/client/cache/memcached/"
6357 "src/test/java/org/apache/http/impl/client/cache/ehcache/"
6358 "src/test/java/org/apache/http/impl/client/cache/memcached/"))))
6359 (add-after 'unpack 'chdir
6360 (lambda _ (chdir "httpclient-cache"))))))
6361 (inputs
6362 (modify-inputs (package-inputs java-httpcomponents-httpclient)
6363 (prepend java-httpcomponents-httpclient
6364 java-httpcomponents-httpmime
6365 java-hamcrest-core)))
6366 (native-inputs (list java-easymock-3.2 java-easymock-class-extension))
6367 (description "This package provides an API for caching accessed HTTP
6368resources.")))
6369
6370(define-public java-httpcomponents-httpclient-osgi
6371 (package (inherit java-httpcomponents-httpclient)
6372 (name "java-httpcomponents-httpclient-osgi")
6373 (arguments
6374 `(#:jar-name "httpcomponents-httpclient-osgi.jar"
6375 #:phases
6376 (modify-phases %standard-phases
6377 (add-after 'unpack 'chdir
6378 (lambda _ (chdir "httpclient-osgi") #t)))))
6379 (inputs
6380 (modify-inputs (package-inputs java-httpcomponents-httpclient)
6381 (prepend java-httpcomponents-httpclient
6382 java-httpcomponents-httpclient-cache
6383 java-osgi-framework
6384 java-osgi-service-cm
6385 java-hamcrest-core)))))
6386
6387(define-public java-httpcomponents-httpmime
6388 (package (inherit java-httpcomponents-httpclient)
6389 (name "java-httpcomponents-httpmime")
6390 (arguments
6391 `(#:jar-name "httpcomponents-httpmime.jar"
6392 #:phases
6393 (modify-phases %standard-phases
6394 (add-after 'unpack 'chdir
6395 (lambda _ (chdir "httpmime") #t)))))
6396 (inputs
6397 (list java-httpcomponents-httpclient java-httpcomponents-httpcore
6398 java-junit java-hamcrest-core))))
6399
6400(define-public java-commons-net
6401 (package
6402 (name "java-commons-net")
6403 (version "3.6")
6404 (source (origin
6405 (method url-fetch)
6406 (uri (string-append "mirror://apache/commons/net/source/"
6407 "commons-net-" version "-src.tar.gz"))
6408 (sha256
6409 (base32
6410 "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr"))))
6411 (build-system ant-build-system)
6412 (arguments
6413 `(;; FIXME: MainTest.java tries to read "examples.properties" (which
6414 ;; should be "resources/examples/examples.properties"), but gets "null"
6415 ;; instead.
6416 #:tests? #f
6417 #:jar-name "commons-net.jar"))
6418 (native-inputs
6419 (list java-junit java-hamcrest-core))
6420 (home-page "https://commons.apache.org/net/")
6421 (synopsis "Client library for many basic Internet protocols")
6422 (description "The Apache Commons Net library implements the client side of
6423many basic Internet protocols. The purpose of the library is to provide
6424fundamental protocol access, not higher-level abstractions.")
6425 (license license:asl2.0)))
6426
6427(define-public java-jsch
6428 (package
6429 (name "java-jsch")
6430 (version "0.1.55")
6431 (source (origin
6432 (method url-fetch)
6433 (uri (string-append "mirror://sourceforge/jsch/jsch/"
6434 version "/jsch-" version ".zip"))
6435 (sha256
6436 (base32
6437 "1lxyjwvmwa723wcf3bqn816hkvc03vz4xhbsi7bvfhrz2rpgcfq6"))))
6438 (build-system ant-build-system)
6439 (arguments
6440 `(#:build-target "dist"
6441 #:tests? #f ; no tests included
6442 #:phases
6443 (modify-phases %standard-phases
6444 (replace 'install (install-jars "dist")))))
6445 (native-inputs
6446 (list unzip))
6447 (home-page "http://www.jcraft.com/jsch/")
6448 (synopsis "Pure Java implementation of SSH2")
6449 (description "JSch is a pure Java implementation of SSH2. JSch allows you
6450to connect to an SSH server and use port forwarding, X11 forwarding, file
6451transfer, etc., and you can integrate its functionality into your own Java
6452programs.")
6453 (license license:bsd-3)))
6454
6455(define-public java-commons-compress
6456 (package
6457 (name "java-commons-compress")
6458 (version "1.21")
6459 (source (origin
6460 (method url-fetch)
6461 (uri (string-append "mirror://apache/commons/compress/source/"
6462 "commons-compress-" version "-src.tar.gz"))
6463 (sha256
6464 (base32
6465 "1rkpb6xcyly1wnbx4q6iq6p5hrr0h1d0ppb5r07psc75cbmizjry"))))
6466 (build-system ant-build-system)
6467 (arguments
6468 `(#:jar-name "commons-compress.jar"
6469 #:source-dir "src/main/java"
6470 #:tests? #f; requires java-mockito-3
6471 #:phases
6472 (modify-phases %standard-phases
6473 (replace 'install (install-from-pom "pom.xml")))))
6474 (propagated-inputs
6475 (list java-asm-3
6476 java-brotli
6477 java-osgi-core
6478 java-xz
6479 java-zstd
6480 apache-commons-parent-pom-52))
6481 (home-page "https://commons.apache.org/proper/commons-compress/")
6482 (synopsis "Java library for working with compressed files")
6483 (description "The Apache Commons Compress library defines an API for
6484working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ,
6485Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.")
6486 (license license:asl2.0)))
6487
6488(define-public java-commons-csv
6489 (package
6490 (name "java-commons-csv")
6491 (version "1.4")
6492 (source (origin
6493 (method url-fetch)
6494 (uri (string-append "mirror://apache/commons/csv/source/"
6495 "commons-csv-" version "-src.tar.gz"))
6496 (sha256
6497 (base32
6498 "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij"))))
6499 (build-system ant-build-system)
6500 (arguments
6501 `(#:jar-name "commons-csv.jar"
6502 #:source-dir "src/main/java"
6503 #:tests? #f)); FIXME: requires java-h2
6504 (inputs
6505 `(("java-hamcrest-core" ,java-hamcrest-core)
6506 ("java-commons-io" ,java-commons-io)
6507 ("java-commons-lang3" ,java-commons-lang3)
6508 ("junit" ,java-junit)))
6509 (home-page "https://commons.apache.org/proper/commons-csv/")
6510 (synopsis "Read and write CSV documents")
6511 (description "Commons CSV reads and writes files in variations of the Comma
6512Separated Value (CSV) format. The most common CSV formats are predefined in the
6513CSVFormat class:
6514
6515@itemize
6516@item Microsoft Excel
6517@item Informix UNLOAD
6518@item Informix UNLOAD CSV
6519@item MySQL
6520@item RFC 4180
6521@item TDF
6522@end itemize
6523
6524Custom formats can be created using a fluent style API.")
6525 (license license:asl2.0)))
6526
6527(define-public java-osgi-annotation
6528 (package
6529 (name "java-osgi-annotation")
6530 (version "6.0.0")
6531 (source (origin
6532 (method url-fetch)
6533 (uri (string-append "https://repo1.maven.org/maven2/"
6534 "org/osgi/org.osgi.annotation/" version "/"
6535 "org.osgi.annotation-" version "-sources.jar"))
6536 (sha256
6537 (base32
6538 "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w"))))
6539 (build-system ant-build-system)
6540 (arguments
6541 `(#:tests? #f ; no tests
6542 #:jar-name "osgi-annotation.jar"
6543 #:phases
6544 (modify-phases %standard-phases
6545 (add-before 'install 'create-pom
6546 (generate-pom.xml "pom.xml" "osgi" "osgi-annotation" ,version))
6547 (replace 'install (install-from-pom "pom.xml")))))
6548 (home-page "https://www.osgi.org")
6549 (synopsis "Annotation module of OSGi framework")
6550 (description
6551 "OSGi, for Open Services Gateway initiative framework, is a module system
6552and service platform for the Java programming language. This package contains
6553the OSGi annotation module, providing additional services to help dynamic
6554components.")
6555 (license license:asl2.0)))
6556
6557(define-public java-osgi-core
6558 (package
6559 (name "java-osgi-core")
6560 (version "6.0.0")
6561 (source (origin
6562 (method url-fetch)
6563 (uri (string-append "https://repo1.maven.org/maven2/"
6564 "org/osgi/org.osgi.core/" version "/"
6565 "org.osgi.core-" version "-sources.jar"))
6566 (sha256
6567 (base32
6568 "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv"))))
6569 (build-system ant-build-system)
6570 (arguments
6571 `(#:tests? #f ; no tests
6572 #:jar-name "osgi-core.jar"
6573 #:phases
6574 (modify-phases %standard-phases
6575 (add-before 'install 'create-pom
6576 (generate-pom.xml "pom.xml" "org.osgi" "org.osgi.core" ,version))
6577 (replace 'install (install-from-pom "pom.xml")))))
6578 (inputs
6579 (list java-osgi-annotation))
6580 (home-page "https://www.osgi.org")
6581 (synopsis "Core module of OSGi framework")
6582 (description
6583 "OSGi, for Open Services Gateway initiative framework, is a module system
6584and service platform for the Java programming language. This package contains
6585the OSGi Core module.")
6586 (license license:asl2.0)))
6587
6588(define-public java-osgi-service-event
6589 (package
6590 (name "java-osgi-service-event")
6591 (version "1.3.1")
6592 (source (origin
6593 (method url-fetch)
6594 (uri (string-append "https://repo1.maven.org/maven2/"
6595 "org/osgi/org.osgi.service.event/"
6596 version "/org.osgi.service.event-"
6597 version "-sources.jar"))
6598 (sha256
6599 (base32
6600 "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm"))))
6601 (build-system ant-build-system)
6602 (arguments
6603 `(#:tests? #f ; no tests
6604 #:jar-name "osgi-service-event.jar"))
6605 (inputs
6606 (list java-osgi-annotation java-osgi-core))
6607 (home-page "https://www.osgi.org")
6608 (synopsis "OSGi service event module")
6609 (description
6610 "OSGi, for Open Services Gateway initiative framework, is a module system
6611and service platform for the Java programming language. This package contains
6612the OSGi @code{org.osgi.service.event} module.")
6613 (license license:asl2.0)))
6614
6615(define-public java-eclipse-osgi
6616 (package
6617 (name "java-eclipse-osgi")
6618 (version "3.11.3")
6619 (source (origin
6620 (method url-fetch)
6621 (uri (string-append "https://repo1.maven.org/maven2/"
6622 "org/eclipse/platform/org.eclipse.osgi/"
6623 version "/org.eclipse.osgi-"
6624 version "-sources.jar"))
6625 (sha256
6626 (base32
6627 "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b"))))
6628 (build-system ant-build-system)
6629 (arguments
6630 `(#:tests? #f ; no tests included
6631 #:jar-name "eclipse-equinox-osgi.jar"))
6632 (inputs
6633 (list java-osgi-annotation))
6634 (home-page "https://www.eclipse.org/equinox/")
6635 (synopsis "Eclipse Equinox OSGi framework")
6636 (description "This package provides an implementation of the OSGi Core
6637specification.")
6638 (license license:epl1.0)))
6639
6640(define-public java-eclipse-equinox-common
6641 (package
6642 (name "java-eclipse-equinox-common")
6643 (version "3.10.200")
6644 (source (origin
6645 (method url-fetch)
6646 (uri (string-append "https://repo1.maven.org/maven2/"
6647 "org/eclipse/platform/org.eclipse.equinox.common/"
6648 version "/org.eclipse.equinox.common-"
6649 version "-sources.jar"))
6650 (sha256
6651 (base32
6652 "1yn8ij6xsljlf35sr2l7wvyvc0ss4n1rv0ry5zkgb49dj4hyrqrj"))))
6653 (build-system ant-build-system)
6654 (arguments
6655 `(#:tests? #f ; no tests included
6656 #:jar-name "eclipse-equinox-common.jar"))
6657 (inputs
6658 (list java-eclipse-osgi))
6659 (home-page "https://www.eclipse.org/equinox/")
6660 (synopsis "Common Eclipse runtime")
6661 (description "This package provides the common Eclipse runtime.")
6662 (license license:epl1.0)))
6663
6664(define-public java-eclipse-core-jobs
6665 (package
6666 (name "java-eclipse-core-jobs")
6667 (version "3.8.0")
6668 (source (origin
6669 (method url-fetch)
6670 (uri (string-append "https://repo1.maven.org/maven2/"
6671 "org/eclipse/platform/org.eclipse.core.jobs/"
6672 version "/org.eclipse.core.jobs-"
6673 version "-sources.jar"))
6674 (sha256
6675 (base32
6676 "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b"))))
6677 (build-system ant-build-system)
6678 (arguments
6679 `(#:tests? #f ; no tests included
6680 #:jar-name "eclipse-core-jobs.jar"))
6681 (inputs
6682 (list java-eclipse-equinox-common java-eclipse-osgi))
6683 (home-page "https://www.eclipse.org/equinox/")
6684 (synopsis "Eclipse jobs mechanism")
6685 (description "This package provides the Eclipse jobs mechanism.")
6686 (license license:epl1.0)))
6687
6688(define-public java-eclipse-equinox-registry
6689 (package
6690 (name "java-eclipse-equinox-registry")
6691 (version "3.6.100")
6692 (source (origin
6693 (method url-fetch)
6694 (uri (string-append "https://repo1.maven.org/maven2/"
6695 "org/eclipse/platform/org.eclipse.equinox.registry/"
6696 version "/org.eclipse.equinox.registry-"
6697 version "-sources.jar"))
6698 (sha256
6699 (base32
6700 "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k"))))
6701 (build-system ant-build-system)
6702 (arguments
6703 `(#:tests? #f ; no tests included
6704 #:jar-name "eclipse-equinox-registry.jar"))
6705 (inputs
6706 (list java-eclipse-core-jobs java-eclipse-equinox-common
6707 java-eclipse-osgi))
6708 (home-page "https://www.eclipse.org/equinox/")
6709 (synopsis "Eclipse extension registry support")
6710 (description "This package provides support for the Eclipse extension
6711registry.")
6712 (license license:epl1.0)))
6713
6714(define-public java-eclipse-equinox-app
6715 (package
6716 (name "java-eclipse-equinox-app")
6717 (version "1.3.400")
6718 (source (origin
6719 (method url-fetch)
6720 (uri (string-append "https://repo1.maven.org/maven2/"
6721 "org/eclipse/platform/org.eclipse.equinox.app/"
6722 version "/org.eclipse.equinox.app-"
6723 version "-sources.jar"))
6724 (sha256
6725 (base32
6726 "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab"))))
6727 (build-system ant-build-system)
6728 (arguments
6729 `(#:tests? #f ; no tests included
6730 #:jar-name "eclipse-equinox-app.jar"))
6731 (inputs
6732 (list java-eclipse-equinox-common java-eclipse-equinox-registry
6733 java-eclipse-osgi java-osgi-service-event))
6734 (home-page "https://www.eclipse.org/equinox/")
6735 (synopsis "Equinox application container")
6736 (description "This package provides the Equinox application container for
6737Eclipse.")
6738 (license license:epl1.0)))
6739
6740(define-public java-eclipse-equinox-preferences
6741 (package
6742 (name "java-eclipse-equinox-preferences")
6743 (version "3.6.1")
6744 (source (origin
6745 (method url-fetch)
6746 (uri (string-append "https://repo1.maven.org/maven2/"
6747 "org/eclipse/platform/org.eclipse.equinox.preferences/"
6748 version "/org.eclipse.equinox.preferences-"
6749 version "-sources.jar"))
6750 (sha256
6751 (base32
6752 "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2"))))
6753 (build-system ant-build-system)
6754 (arguments
6755 `(#:tests? #f ; no tests included
6756 #:jar-name "eclipse-equinox-preferences.jar"))
6757 (inputs
6758 (list java-eclipse-equinox-common java-eclipse-equinox-registry
6759 java-eclipse-osgi))
6760 (home-page "https://www.eclipse.org/equinox/")
6761 (synopsis "Eclipse preferences mechanism")
6762 (description "This package provides the Eclipse preferences mechanism with
6763the module @code{org.eclipse.equinox.preferences}.")
6764 (license license:epl1.0)))
6765
6766(define-public java-eclipse-core-contenttype
6767 (package
6768 (name "java-eclipse-core-contenttype")
6769 (version "3.5.100")
6770 (source (origin
6771 (method url-fetch)
6772 (uri (string-append "https://repo1.maven.org/maven2/"
6773 "org/eclipse/platform/org.eclipse.core.contenttype/"
6774 version "/org.eclipse.core.contenttype-"
6775 version "-sources.jar"))
6776 (sha256
6777 (base32
6778 "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi"))))
6779 (build-system ant-build-system)
6780 (arguments
6781 `(#:tests? #f ; no tests included
6782 #:jar-name "eclipse-core-contenttype.jar"))
6783 (inputs
6784 (list java-eclipse-equinox-common java-eclipse-equinox-preferences
6785 java-eclipse-equinox-registry java-eclipse-osgi))
6786 (home-page "https://www.eclipse.org/")
6787 (synopsis "Eclipse content mechanism")
6788 (description "This package provides the Eclipse content mechanism in the
6789@code{org.eclipse.core.contenttype} module.")
6790 (license license:epl1.0)))
6791
6792(define-public java-eclipse-core-runtime
6793 (package
6794 (name "java-eclipse-core-runtime")
6795 (version "3.15.100")
6796 (source (origin
6797 (method url-fetch)
6798 (uri (string-append "https://repo1.maven.org/maven2/"
6799 "org/eclipse/platform/org.eclipse.core.runtime/"
6800 version "/org.eclipse.core.runtime-"
6801 version "-sources.jar"))
6802 (sha256
6803 (base32
6804 "0l8xayacsbjvz5hypx2fv47vpw2n4dspamcfb3hx30x9hj8vmg7r"))))
6805 (build-system ant-build-system)
6806 (arguments
6807 `(#:tests? #f ; no tests included
6808 #:jar-name "eclipse-core-runtime.jar"))
6809 (inputs
6810 (list java-eclipse-core-contenttype
6811 java-eclipse-core-jobs
6812 java-eclipse-equinox-app
6813 java-eclipse-equinox-common
6814 java-eclipse-equinox-registry
6815 java-eclipse-equinox-preferences
6816 java-eclipse-osgi))
6817 (home-page "https://www.eclipse.org/")
6818 (synopsis "Eclipse core runtime")
6819 (description "This package provides the Eclipse core runtime with the
6820module @code{org.eclipse.core.runtime}.")
6821 (license license:epl1.0)))
6822
6823(define-public java-eclipse-core-filesystem
6824 (package
6825 (name "java-eclipse-core-filesystem")
6826 (version "1.6.1")
6827 (source (origin
6828 (method url-fetch)
6829 (uri (string-append "https://repo1.maven.org/maven2/"
6830 "org/eclipse/platform/org.eclipse.core.filesystem/"
6831 version "/org.eclipse.core.filesystem-"
6832 version "-sources.jar"))
6833 (sha256
6834 (base32
6835 "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj"))))
6836 (build-system ant-build-system)
6837 (arguments
6838 `(#:tests? #f ; no tests included
6839 #:jar-name "eclipse-core-filesystem.jar"))
6840 (inputs
6841 (list java-eclipse-equinox-common java-eclipse-equinox-registry
6842 java-eclipse-osgi))
6843 (home-page "https://www.eclipse.org/")
6844 (synopsis "Eclipse core file system")
6845 (description "This package provides the Eclipse core file system with the
6846module @code{org.eclipse.core.filesystem}.")
6847 (license license:epl1.0)))
6848
6849(define-public java-eclipse-core-expressions
6850 (package
6851 (name "java-eclipse-core-expressions")
6852 (version "3.5.100")
6853 (source (origin
6854 (method url-fetch)
6855 (uri (string-append "https://repo1.maven.org/maven2/"
6856 "org/eclipse/platform/org.eclipse.core.expressions/"
6857 version "/org.eclipse.core.expressions-"
6858 version "-sources.jar"))
6859 (sha256
6860 (base32
6861 "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f"))))
6862 (build-system ant-build-system)
6863 (arguments
6864 `(#:tests? #f ; no tests included
6865 #:jar-name "eclipse-core-expressions.jar"))
6866 (inputs
6867 (list java-eclipse-equinox-common java-eclipse-equinox-registry
6868 java-eclipse-equinox-preferences java-eclipse-core-runtime
6869 java-eclipse-osgi))
6870 (home-page "https://www.eclipse.org/")
6871 (synopsis "Eclipse core expression language")
6872 (description "This package provides the Eclipse core expression language
6873with the @code{org.eclipse.core.expressions} module.")
6874 (license license:epl1.0)))
6875
6876(define-public java-eclipse-core-variables
6877 (package
6878 (name "java-eclipse-core-variables")
6879 (version "3.3.0")
6880 (source (origin
6881 (method url-fetch)
6882 (uri (string-append "https://repo1.maven.org/maven2/"
6883 "org/eclipse/platform/org.eclipse.core.variables/"
6884 version "/org.eclipse.core.variables-"
6885 version "-sources.jar"))
6886 (sha256
6887 (base32
6888 "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy"))))
6889 (build-system ant-build-system)
6890 (arguments
6891 `(#:tests? #f ; no tests included
6892 #:jar-name "eclipse-core-variables.jar"))
6893 (inputs
6894 (list java-eclipse-equinox-common java-eclipse-equinox-registry
6895 java-eclipse-equinox-preferences java-eclipse-core-runtime
6896 java-eclipse-osgi))
6897 (home-page "https://www.eclipse.org/platform")
6898 (synopsis "Eclipse core variables")
6899 (description "This package provides the Eclipse core variables module
6900@code{org.eclipse.core.variables}.")
6901 (license license:epl1.0)))
6902
6903(define-public java-eclipse-ant-core
6904 (package
6905 (name "java-eclipse-ant-core")
6906 (version "3.4.100")
6907 (source (origin
6908 (method url-fetch)
6909 (uri (string-append "https://repo1.maven.org/maven2/"
6910 "org/eclipse/platform/org.eclipse.ant.core/"
6911 version "/org.eclipse.ant.core-"
6912 version "-sources.jar"))
6913 (sha256
6914 (base32
6915 "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7"))))
6916 (build-system ant-build-system)
6917 (arguments
6918 `(#:tests? #f ; no tests included
6919 #:jar-name "eclipse-ant-core.jar"))
6920 (inputs
6921 (list java-eclipse-equinox-app
6922 java-eclipse-equinox-common
6923 java-eclipse-equinox-registry
6924 java-eclipse-equinox-preferences
6925 java-eclipse-core-contenttype
6926 java-eclipse-core-runtime
6927 java-eclipse-core-variables
6928 java-eclipse-osgi))
6929 (home-page "https://www.eclipse.org/platform")
6930 (synopsis "Ant build tool core libraries")
6931 (description "This package provides the ant build tool core libraries with
6932the module @code{org.eclipse.ant.core}.")
6933 (license license:epl1.0)))
6934
6935(define-public java-eclipse-core-resources
6936 (package
6937 (name "java-eclipse-core-resources")
6938 (version "3.13.200")
6939 (source (origin
6940 (method url-fetch)
6941 (uri (string-append "https://repo1.maven.org/maven2/"
6942 "org/eclipse/platform/org.eclipse.core.resources/"
6943 version "/org.eclipse.core.resources-"
6944 version "-sources.jar"))
6945 (sha256
6946 (base32
6947 "1sn3b6ky72hkvxcgf9b2jkpbdh3y8lbhi9xxwv1dsiddpkkq91hs"))))
6948 (build-system ant-build-system)
6949 (arguments
6950 `(#:tests? #f ; no tests included
6951 #:jar-name "eclipse-core-resources.jar"))
6952 (inputs
6953 (list java-eclipse-equinox-common
6954 java-eclipse-equinox-preferences
6955 java-eclipse-equinox-registry
6956 java-eclipse-core-contenttype
6957 java-eclipse-core-expressions
6958 java-eclipse-core-filesystem
6959 java-eclipse-core-jobs
6960 java-eclipse-core-runtime
6961 java-eclipse-ant-core
6962 java-eclipse-osgi))
6963 (home-page "https://www.eclipse.org/")
6964 (synopsis "Eclipse core resource management")
6965 (description "This package provides the Eclipse core resource management
6966module @code{org.eclipse.core.resources}.")
6967 (license license:epl1.0)))
6968
6969(define-public java-eclipse-compare-core
6970 (package
6971 (name "java-eclipse-compare-core")
6972 (version "3.6.0")
6973 (source (origin
6974 (method url-fetch)
6975 (uri (string-append "https://repo1.maven.org/maven2/"
6976 "org/eclipse/platform/org.eclipse.compare.core/"
6977 version "/org.eclipse.compare.core-"
6978 version "-sources.jar"))
6979 (sha256
6980 (base32
6981 "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg"))))
6982 (build-system ant-build-system)
6983 (arguments
6984 `(#:tests? #f ; no tests included
6985 #:jar-name "eclipse-compare-core.jar"))
6986 (inputs
6987 (list java-eclipse-core-runtime java-eclipse-equinox-common
6988 java-eclipse-osgi java-icu4j))
6989 (home-page "https://www.eclipse.org/")
6990 (synopsis "Eclipse core compare support")
6991 (description "This package provides the Eclipse core compare support
6992module @code{org.eclipse.compare.core}.")
6993 (license license:epl1.0)))
6994
6995(define-public java-eclipse-team-core
6996 (package
6997 (name "java-eclipse-team-core")
6998 (version "3.8.0")
6999 (source (origin
7000 (method url-fetch)
7001 (uri (string-append "https://repo1.maven.org/maven2/"
7002 "org/eclipse/platform/org.eclipse.team.core/"
7003 version "/org.eclipse.team.core-"
7004 version "-sources.jar"))
7005 (sha256
7006 (base32
7007 "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7"))))
7008 (build-system ant-build-system)
7009 (arguments
7010 `(#:tests? #f ; no tests included
7011 #:jar-name "eclipse-team-core.jar"))
7012 (inputs
7013 (list java-eclipse-compare-core
7014 java-eclipse-core-contenttype
7015 java-eclipse-core-filesystem
7016 java-eclipse-core-jobs
7017 java-eclipse-core-resources
7018 java-eclipse-core-runtime
7019 java-eclipse-equinox-common
7020 java-eclipse-equinox-registry
7021 java-eclipse-equinox-preferences
7022 java-eclipse-osgi))
7023 (home-page "https://www.eclipse.org/platform")
7024 (synopsis "Eclipse team support core")
7025 (description "This package provides the Eclipse team support core module
7026@code{org.eclipse.team.core}.")
7027 (license license:epl1.0)))
7028
7029(define-public java-eclipse-core-commands
7030 (package
7031 (name "java-eclipse-core-commands")
7032 (version "3.8.1")
7033 (source (origin
7034 (method url-fetch)
7035 (uri (string-append "https://repo1.maven.org/maven2/"
7036 "org/eclipse/platform/org.eclipse.core.commands/"
7037 version "/org.eclipse.core.commands-"
7038 version "-sources.jar"))
7039 (sha256
7040 (base32
7041 "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9"))))
7042 (build-system ant-build-system)
7043 (arguments
7044 `(#:tests? #f ; no tests included
7045 #:jar-name "eclipse-core-commands.jar"))
7046 (inputs
7047 (list java-eclipse-equinox-common))
7048 (home-page "https://www.eclipse.org/platform")
7049 (synopsis "Eclipse core commands")
7050 (description "This package provides Eclipse core commands in the module
7051@code{org.eclipse.core.commands}.")
7052 (license license:epl1.0)))
7053
7054(define-public java-eclipse-text
7055 (package
7056 (name "java-eclipse-text")
7057 (version "3.6.0")
7058 (source (origin
7059 (method url-fetch)
7060 (uri (string-append "https://repo1.maven.org/maven2/"
7061 "org/eclipse/platform/org.eclipse.text/"
7062 version "/org.eclipse.text-"
7063 version "-sources.jar"))
7064 (sha256
7065 (base32
7066 "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1"))))
7067 (build-system ant-build-system)
7068 (arguments
7069 `(#:tests? #f ; no tests included
7070 #:jar-name "eclipse-text.jar"
7071 #:phases
7072 (modify-phases %standard-phases
7073 ;; When creating a new category we must make sure that the new list
7074 ;; matches List<Position>. By default it seems to be too generic
7075 ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>.
7076 ;; Without this we get this error:
7077 ;;
7078 ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376:
7079 ;; error: method put in interface Map<K,V> cannot be applied to given types;
7080 ;; [javac] fPositions.put(category, new ArrayList<>());
7081 ;; [javac] ^
7082 ;; [javac] required: String,List<Position>
7083 ;; [javac] found: String,ArrayList<Object>
7084 ;; [javac] reason: actual argument ArrayList<Object> cannot be converted
7085 ;; to List<Position> by method invocation conversion
7086 ;; [javac] where K,V are type-variables:
7087 ;; [javac] K extends Object declared in interface Map
7088 ;; [javac] V extends Object declared in interface Map
7089 ;;
7090 ;; I don't know if this is a good fix. I suspect it is not, but it
7091 ;; seems to work.
7092 (add-after 'unpack 'fix-compilation-error
7093 (lambda _
7094 (substitute* "src/org/eclipse/jface/text/AbstractDocument.java"
7095 (("Positions.put\\(category, new ArrayList<>\\(\\)\\);")
7096 "Positions.put(category, new ArrayList<Position>());"))
7097 #t)))))
7098 (inputs
7099 (list java-eclipse-equinox-common java-eclipse-core-commands
7100 java-icu4j))
7101 (home-page "https://www.eclipse.org/platform")
7102 (synopsis "Eclipse text library")
7103 (description "Platform Text is part of the Platform UI project and
7104provides the basic building blocks for text and text editors within Eclipse
7105and contributes the Eclipse default text editor.")
7106 (license license:epl1.0)))
7107
7108(define-public java-eclipse-jdt-core
7109 (package
7110 (name "java-eclipse-jdt-core")
7111 (version "3.16.0")
7112 (source (origin
7113 (method url-fetch)
7114 (uri (string-append "https://repo1.maven.org/maven2/"
7115 "org/eclipse/jdt/org.eclipse.jdt.core/"
7116 version "/org.eclipse.jdt.core-"
7117 version "-sources.jar"))
7118 (sha256
7119 (base32
7120 "1g560yr9v2kzv34gc2m3ifpgnj7krcdd6h4gd4z83pwqacwkfz0k"))))
7121 (build-system ant-build-system)
7122 (arguments
7123 `(#:tests? #f ; no tests included
7124 #:jar-name "eclipse-jdt-core.jar"
7125 #:phases
7126 (modify-phases %standard-phases
7127 (add-after 'unpack 'move-sources
7128 (lambda _
7129 (with-directory-excursion "src/jdtCompilerAdaptersrc/"
7130 (for-each (lambda (file)
7131 (install-file file (string-append "../" (dirname file))))
7132 (find-files "." ".*")))
7133 (delete-file-recursively "src/jdtCompilerAdaptersrc/")
7134 #t))
7135 (add-before 'build 'copy-resources
7136 (lambda _
7137 (with-directory-excursion "src"
7138 (for-each (lambda (file)
7139 (install-file file (string-append "../build/classes/" (dirname file))))
7140 (find-files "." ".*.(props|properties|rsc)")))
7141 #t)))))
7142 (inputs
7143 (list java-eclipse-core-contenttype
7144 java-eclipse-core-filesystem
7145 java-eclipse-core-jobs
7146 java-eclipse-core-resources
7147 java-eclipse-core-runtime
7148 java-eclipse-equinox-app
7149 java-eclipse-equinox-common
7150 java-eclipse-equinox-preferences
7151 java-eclipse-equinox-registry
7152 java-eclipse-osgi
7153 java-eclipse-text))
7154 (home-page "https://www.eclipse.org/jdt")
7155 (synopsis "Java development tools core libraries")
7156 (description "This package provides the core libraries of the Eclipse Java
7157development tools.")
7158 (license license:epl1.0)))
7159
7160(define-public java-eclipse-jdt-compiler-apt
7161 (package
7162 (name "java-eclipse-jdt-compiler-apt")
7163 (version "1.3.400")
7164 (source (origin
7165 (method url-fetch)
7166 (uri (string-append "https://repo1.maven.org/maven2/"
7167 "org/eclipse/jdt/org.eclipse.jdt.compiler.apt/"
7168 version "/org.eclipse.jdt.compiler.apt-"
7169 version "-sources.jar"))
7170 (sha256
7171 (base32
7172 "1s285k9p2ixdqrknb40jbbvw682n9a7l5lqpn583a8pvlzg2l6r8"))))
7173 (build-system ant-build-system)
7174 (arguments
7175 `(#:tests? #f ; no tests included
7176 #:jar-name "eclipse-jdt-compiler-apt.jar"
7177 #:jdk ,openjdk11))
7178 (inputs
7179 (list java-eclipse-jdt-core))
7180 (home-page "https://www.eclipse.org/jdt/apt/")
7181 (synopsis "Annotation processing tool")
7182 (description "APT stands for Annotation Processing Tool. APT provides a
7183means for generating files and compiling new Java classes based on annotations
7184found in your source code.")
7185 (license license:epl2.0)))
7186
7187(define-public java-eclipse-lsp4j-common
7188 (package
7189 (name "java-eclipse-lsp4j-common")
7190 (version "0.10.0")
7191 (source (origin
7192 (method git-fetch)
7193 (uri (git-reference
7194 (url "https://github.com/eclipse/lsp4j")
7195 (commit (string-append "v" version))))
7196 (file-name (git-file-name name version))
7197 (sha256
7198 (base32
7199 "17srrac0pkpybwwc21rzdvn762zzl9m80rlqihc9b4l55hkqpk98"))))
7200 (build-system ant-build-system)
7201 (home-page "https://eclipse.org/lsp4j/")
7202 (synopsis "LSP4J common package")
7203 (description "Eclipse LSP4J provides Java bindings for the Language
7204Server Protocol and the Debug Adapter Protocol. This package is a common
7205definition intended to be inherited by other packages.")
7206 (license license:epl2.0)))
7207
7208(define-public java-eclipse-lsp4j-debug
7209 (package
7210 (inherit java-eclipse-lsp4j-common)
7211 (name "java-eclipse-lsp4j-debug")
7212 (arguments
7213 `(#:jar-name "eclipse-lsp4j-debug.jar"
7214 #:jdk ,openjdk11
7215 #:tests? #f; tests fail with reflection errors
7216 #:source-dir "org.eclipse.lsp4j.debug/src/main/java"
7217 #:test-dir "org.eclipse.lsp4j.debug/src/test"
7218 #:phases
7219 (modify-phases %standard-phases
7220 (add-before 'build 'copy-xtend
7221 (lambda _
7222 (copy-recursively "org.eclipse.lsp4j.debug/src/main/xtend-gen"
7223 "org.eclipse.lsp4j.debug/src/main/java"))))))
7224 (native-inputs
7225 (list java-junit))
7226 (inputs
7227 `(("java-gson" ,java-gson-2.8.6)
7228 ("java-eclipse-lsp4j-generaor" ,java-eclipse-lsp4j-generator)
7229 ("java-eclipse-lsp4j-jsonrpc" ,java-eclipse-lsp4j-jsonrpc)
7230 ("java-eclipse-lsp4j-jsonrpc-debug" ,java-eclipse-lsp4j-jsonrpc-debug)
7231 ("java-eclipse-xtext-xbase-lib" ,java-eclipse-xtext-xbase-lib)))
7232 (synopsis "Eclipse LSP4J Java bindings for the Debug Server Protocol")
7233 (description "Eclipse LSP4J provides Java bindings for the Language
7234Server Protocol and the Debug Adapter Protocol. This package contains its
7235LSP4J Java bindings for the Debug Server Protocol.")))
7236
7237(define-public java-eclipse-lsp4j-generator
7238 (package
7239 (inherit java-eclipse-lsp4j-common)
7240 (name "java-eclipse-lsp4j-generator")
7241 (arguments
7242 `(#:jar-name "eclipse-lsp4j-generator.jar"
7243 #:jdk ,openjdk11
7244 #:tests? #f; no tests
7245 #:source-dir "org.eclipse.lsp4j.generator/src/main/java"))
7246 (inputs
7247 (list java-eclipse-lsp4j-jsonrpc))
7248 (synopsis "Eclipse LSP4J Generator")
7249 (description "Eclipse LSP4J provides Java bindings for the Language
7250Server Protocol and the Debug Adapter Protocol. This package contains its
7251LSP4J code generator for Language Server Protocol classes.")))
7252
7253(define-public java-eclipse-lsp4j-jsonrpc
7254 (package
7255 (inherit java-eclipse-lsp4j-common)
7256 (name "java-eclipse-lsp4j-jsonrpc")
7257 (arguments
7258 `(#:jar-name "eclipse-lsp4j-jsonrpc.jar"
7259 #:jdk ,openjdk11
7260 #:source-dir "org.eclipse.lsp4j.jsonrpc/src/main/java"
7261 #:test-dir "org.eclipse.lsp4j.jsonrpc/src/test"))
7262 (native-inputs
7263 (list java-junit))
7264 (inputs
7265 (list java-gson-2.8.6))
7266 (synopsis "Java JSON-RPC implementation")
7267 (description "Eclipse LSP4J provides Java bindings for the Language
7268Server Protocol and the Debug Adapter Protocol. This package contains its
7269JSON-RPC implementation.")))
7270
7271(define-public java-eclipse-lsp4j-jsonrpc-debug
7272 (package
7273 (inherit java-eclipse-lsp4j-common)
7274 (name "java-eclipse-lsp4j-jsonrpc-debug")
7275 (arguments
7276 `(#:jar-name "eclipse-lsp4j-jsonrpc-debug.jar"
7277 #:jdk ,openjdk11
7278 #:source-dir "org.eclipse.lsp4j.jsonrpc.debug/src/main/java"
7279 #:test-dir "org.eclipse.lsp4j.jsonrpc.debug/src/test"))
7280 (native-inputs
7281 (list java-junit))
7282 (inputs
7283 (list java-eclipse-lsp4j-jsonrpc java-gson-2.8.6))
7284 (synopsis "Java JSON-RPC implementation (debug protocol)")
7285 (description "Eclipse LSP4J provides Java bindings for the Language
7286Server Protocol and the Debug Adapter Protocol. This package contains its
7287JSON-RPC implementation's debug protocol.")))
7288
7289(define-public java-eclipse-xtext-xbase-lib
7290 (package
7291 (name "java-eclipse-xtext-xbase-lib")
7292 (version "2.25.0")
7293 (source (origin
7294 (method git-fetch)
7295 (uri (git-reference
7296 (url "https://github.com/eclipse/xtext-lib")
7297 (commit (string-append "v" version))))
7298 (file-name (git-file-name name version))
7299 (sha256
7300 (base32
7301 "13b9lf6lnsprkik665m1qcyyc8cs16k33xm7as4rjcfcpn4pln71"))))
7302 (build-system ant-build-system)
7303 (arguments
7304 `(#:jar-name "eclipse-xtext-xbase-lib.jar"
7305 #:jdk ,openjdk11
7306 #:tests? #f; TODO (maybe needs newer guava version?)
7307 #:source-dir "org.eclipse.xtext.xbase.lib/src"
7308 #:test-dir "org.eclipse.xtext.xbase.lib.tests/src"))
7309 (native-inputs
7310 (list java-junit))
7311 (inputs
7312 (list java-guava))
7313 (home-page "https://www.eclipse.org/Xtext/")
7314 (synopsis "Eclipse Xbase Runtime Library")
7315 (description "This package contains runtime libraries for Xbase languages
7316such as Xtend.")
7317 (license license:epl2.0)))
7318
7319(define-public java-javax-mail
7320 (package
7321 (name "java-javax-mail")
7322 (version "1.5.6")
7323 (source (origin
7324 (method url-fetch)
7325 (uri (string-append "https://repo1.maven.org/maven2/"
7326 "com/sun/mail/javax.mail/"
7327 version "/javax.mail-"
7328 version "-sources.jar"))
7329 (sha256
7330 (base32
7331 "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9"))))
7332 (build-system ant-build-system)
7333 (arguments
7334 `(#:tests? #f ; no tests
7335 #:jar-name "javax-mail.jar"))
7336 (home-page "https://javamail.java.net")
7337 (synopsis "Reference implementation of the JavaMail API")
7338 (description
7339 "This package provides versions of the JavaMail API implementation, IMAP,
7340SMTP, and POP3 service providers, some examples, and documentation for the
7341JavaMail API.")
7342 ;; GPLv2 only with "classpath exception".
7343 (license license:gpl2)))
7344
7345(define-public java-log4j-api
7346 (package
7347 (name "java-log4j-api")
7348 (version "2.17.1")
7349 (source (origin
7350 (method url-fetch)
7351 (uri (string-append "mirror://apache/logging/log4j/" version
7352 "/apache-log4j-" version "-src.tar.gz"))
7353 (sha256
7354 (base32
7355 "05xssljdgxfv8ql42db8ydjfsvvbdqmsgip75phybm259ydzbsd6"))))
7356 (build-system ant-build-system)
7357 (arguments
7358 `(#:tests? #f ; tests require unpackaged software
7359 #:jar-name "log4j-api.jar"
7360 #:make-flags
7361 ,#~(list (string-append "-Ddist.dir=" #$output "/share/java"))
7362 #:phases
7363 (modify-phases %standard-phases
7364 (add-after 'unpack 'enter-dir
7365 (lambda _ (chdir "log4j-api") #t))
7366 ;; FIXME: The tests require additional software that has not been
7367 ;; packaged yet, such as
7368 ;; * org.apache.maven
7369 ;; * org.apache.felix
7370 (add-after 'enter-dir 'delete-tests
7371 (lambda _ (delete-file-recursively "src/test") #t)))))
7372 (inputs
7373 (list java-osgi-core java-hamcrest-core java-junit))
7374 (properties '((cpe-name . "log4j")))
7375 (home-page "https://logging.apache.org/log4j/2.x/")
7376 (synopsis "API module of the Log4j logging framework for Java")
7377 (description
7378 "This package provides the API module of the Log4j logging framework for
7379Java.")
7380 (license license:asl2.0)))
7381
7382(define-public java-log4j-core
7383 (package
7384 (inherit java-log4j-api)
7385 (name "java-log4j-core")
7386 (inputs
7387 `(("java-osgi-core" ,java-osgi-core)
7388 ("java-hamcrest-core" ,java-hamcrest-core)
7389 ("java-log4j-api" ,java-log4j-api)
7390 ("java-mail" ,java-mail)
7391 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
7392 ("java-conversant-disruptor" ,java-conversant-disruptor)
7393 ("java-lmax-disruptor" ,java-lmax-disruptor)
7394 ("java-jctools-core" ,java-jctools-core-1)
7395 ("java-stax2-api" ,java-stax2-api)
7396 ("java-jansi" ,java-jansi)
7397 ("java-kafka" ,java-kafka-clients)
7398 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
7399 ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7400 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
7401 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
7402 ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml)
7403 ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml)
7404 ("java-commons-compress" ,java-commons-compress)
7405 ("java-commons-csv" ,java-commons-csv)
7406 ("java-jeromq" ,java-jeromq)
7407 ("java-junit" ,java-junit)))
7408 (native-inputs
7409 `(("hamcrest" ,java-hamcrest-all)
7410 ("java-commons-io" ,java-commons-io)
7411 ("java-commons-lang3" ,java-commons-lang3)
7412 ("slf4j" ,java-slf4j-api)))
7413 (arguments
7414 `(#:tests? #f ; tests require more dependencies
7415 #:test-dir "src/test"
7416 #:source-dir "src/main/java"
7417 #:jar-name "log4j-core.jar"
7418 #:jdk ,icedtea-8
7419 #:make-flags
7420 ,#~(list (string-append "-Ddist.dir=" #$output "/share/java"))
7421 #:phases
7422 (modify-phases %standard-phases
7423 (add-after 'unpack 'enter-dir
7424 (lambda _ (chdir "log4j-core") #t)))))
7425 (synopsis "Core component of the Log4j framework")
7426 (description "This package provides the core component of the Log4j
7427logging framework for Java.")))
7428
7429(define-public java-log4j-1.2-api
7430 (package
7431 (inherit java-log4j-api)
7432 (name "java-log4j-1.2-api")
7433 (arguments
7434 `(#:jar-name "java-log4j-1.2-api.jar"
7435 #:source-dir "log4j-1.2-api/src/main/java"
7436 #:jdk ,icedtea-8
7437 ;; Tests require maven-model (and other maven subprojects), which is a
7438 ;; cyclic dependency.
7439 #:tests? #f))
7440 (inputs
7441 `(("log4j-api" ,java-log4j-api)
7442 ("log4j-core" ,java-log4j-core)
7443 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
7444 ("osgi-core" ,java-osgi-core)
7445 ("eclipse-osgi" ,java-eclipse-osgi)
7446 ("java-lmax-disruptor" ,java-lmax-disruptor)))))
7447
7448(define-public java-commons-cli
7449 (package
7450 (name "java-commons-cli")
7451 (version "1.4")
7452 (source (origin
7453 (method url-fetch)
7454 (uri (string-append "mirror://apache/commons/cli/source/"
7455 "commons-cli-" version "-src.tar.gz"))
7456 (sha256
7457 (base32
7458 "05hgi2z01fqz374y719gl1dxzqvzci5af071zm7vxrjg9vczipm1"))))
7459 (build-system ant-build-system)
7460 ;; TODO: javadoc
7461 (arguments
7462 `(#:jar-name "commons-cli.jar"
7463 #:phases
7464 (modify-phases %standard-phases
7465 (replace 'install
7466 (install-from-pom "pom.xml")))))
7467 (native-inputs
7468 (list java-junit java-hamcrest-core))
7469 (home-page "https://commons.apache.org/cli/")
7470 (synopsis "Command line arguments and options parsing library")
7471 (description "The Apache Commons CLI library provides an API for parsing
7472command line options passed to programs. It is also able to print help
7473messages detailing the options available for a command line tool.
7474
7475Commons CLI supports different types of options:
7476
7477@itemize
7478@item POSIX like options (ie. tar -zxvf foo.tar.gz)
7479@item GNU like long options (ie. du --human-readable --max-depth=1)
7480@item Java like properties (ie. java -Djava.awt.headless=true Foo)
7481@item Short options with value attached (ie. gcc -O2 foo.c)
7482@item long options with single hyphen (ie. ant -projecthelp)
7483@end itemize
7484
7485This is a part of the Apache Commons Project.")
7486 (license license:asl2.0)))
7487
7488(define-public java-commons-text
7489 (package
7490 (name "java-commons-text")
7491 (version "1.9")
7492 (source (origin
7493 (method url-fetch)
7494 (uri (string-append "mirror://apache/commons/text/source/"
7495 "commons-text-" version "-src.tar.gz"))
7496 (sha256
7497 (base32
7498 "1k99ib2dxlqxb5y94kpzf4ix8xgxz1j3n9kq3ddssqqcccsp5ik2"))))
7499 (build-system ant-build-system)
7500 (arguments
7501 (list #:jar-name "java-commons-text.jar"
7502 #:source-dir "src/main/java"
7503 #:test-dir "src/test"
7504 #:tests? #f ; Tests require JUnit5.
7505 #:phases
7506 #~(modify-phases %standard-phases
7507 (replace 'install
7508 (install-from-pom "pom.xml")))))
7509 (inputs
7510 (list java-commons-io))
7511 (propagated-inputs
7512 (list java-commons-lang3
7513 apache-commons-parent-pom-51))
7514 (home-page "https://commons.apache.org/text/")
7515 (synopsis "Library focused on algorithms working on strings")
7516 (description "Apache Commons Text is a library focused on algorithms
7517working on strings.
7518
7519This is a part of the Apache Commons Project.")
7520 (license license:asl2.0)))
7521
7522(define-public java-commons-codec
7523 (package
7524 (name "java-commons-codec")
7525 (version "1.15")
7526 (source (origin
7527 (method url-fetch)
7528 (uri (string-append "mirror://apache/commons/codec/source/"
7529 "commons-codec-" version "-src.tar.gz"))
7530 (sha256
7531 (base32
7532 "01z9qmg8fd8d7p7xxipwj1vi9bmvpgqyi29kldjz2x6vzwm171jj"))))
7533 (build-system ant-build-system)
7534 (arguments
7535 `(#:jar-name "java-commons-codec.jar"
7536 #:source-dir "src/main/java"
7537 #:test-dir "src/test"
7538 #:test-exclude (list "**/*AbstractTest.java")
7539 #:phases
7540 (modify-phases %standard-phases
7541 (add-before 'build 'copy-resources
7542 (lambda _
7543 (copy-recursively "src/main/resources"
7544 "build/classes")))
7545 (add-before 'check 'copy-test-resources
7546 (lambda _
7547 (copy-recursively "src/test/resources"
7548 "build/test-classes")))
7549 (add-before 'check 'skip-ravenous-test
7550 (lambda _
7551 ;; This test admits to being "memory hungry", but reliably fails
7552 ;; even on a machine that should have plenty (12 GiB). Skip it.
7553 (substitute*
7554 "src/test/java/org/apache/commons/codec/binary/BaseNCodecTest.java"
7555 (("\\bassertEnsureBufferSizeExpandsToMaxBufferSize.*;")
7556 "return;"))))
7557 (replace 'install (install-from-pom "pom.xml")))))
7558 (native-inputs
7559 (list java-commons-lang3 java-junit))
7560 (propagated-inputs
7561 (list apache-commons-parent-pom-52))
7562 (home-page "https://commons.apache.org/codec/")
7563 (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs")
7564 (description "The codec package contains simple encoder and decoders for
7565various formats such as Base64 and Hexadecimal. In addition to these widely
7566used encoders and decoders, the codec package also maintains a collection of
7567phonetic encoding utilities.
7568
7569This is a part of the Apache Commons Project.")
7570 (license license:asl2.0)))
7571
7572(define-public java-commons-daemon
7573 (package
7574 (name "java-commons-daemon")
7575 (version "1.1.0")
7576 (source (origin
7577 (method url-fetch)
7578 (uri (string-append "mirror://apache/commons/daemon/source/"
7579 "commons-daemon-" version "-src.tar.gz"))
7580 (sha256
7581 (base32
7582 "141gkhfzv5v3pdhic6y4ardq2dhsa3v36j8wmmhy6f8mac48fp7n"))))
7583 (build-system ant-build-system)
7584 (arguments
7585 `(#:test-target "test"
7586 #:phases
7587 (modify-phases %standard-phases
7588 (add-after 'build 'build-javadoc ant-build-javadoc)
7589 (replace 'install (install-jars "dist"))
7590 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
7591 (native-inputs
7592 (list java-junit))
7593 (home-page "https://commons.apache.org/daemon/")
7594 (synopsis "Library to launch Java applications as daemons")
7595 (description "The Daemon package from Apache Commons can be used to
7596implement Java applications which can be launched as daemons. For example the
7597program will be notified about a shutdown so that it can perform cleanup tasks
7598before its process of execution is destroyed by the operation system.
7599
7600This package contains the Java library. You will also need the actual binary
7601for your architecture which is provided by the jsvc package.
7602
7603This is a part of the Apache Commons Project.")
7604 (license license:asl2.0)))
7605
7606(define-public java-javaewah
7607 (package
7608 (name "java-javaewah")
7609 (version "1.1.6")
7610 (source (origin
7611 (method git-fetch)
7612 (uri (git-reference
7613 (url "https://github.com/lemire/javaewah/")
7614 (commit (string-append "JavaEWAH-" version))))
7615 (file-name (git-file-name name version))
7616 (sha256
7617 (base32
7618 "1m8qcb1py76v7avbjjrkvyy6fhr5dk2ywy73gbsxqry04gkm2nhw"))))
7619 (build-system ant-build-system)
7620 (arguments `(#:jar-name "javaewah.jar"))
7621 (inputs
7622 (list java-junit java-hamcrest-core))
7623 (home-page "https://github.com/lemire/javaewah")
7624 (synopsis "Compressed alternative to the Java @code{BitSet} class")
7625 (description "This is a word-aligned compressed variant of the Java
7626@code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like
7627compression scheme. It can be used to implement bitmap indexes.
7628
7629The goal of word-aligned compression is not to achieve the best compression,
7630but rather to improve query processing time. Hence, JavaEWAH tries to save CPU
7631cycles, maybe at the expense of storage. However, the EWAH scheme is always
7632more efficient storage-wise than an uncompressed bitmap (as implemented in the
7633@code{BitSet} class by Sun).")
7634 ;; GPL2.0 derivates are explicitly allowed.
7635 (license license:asl2.0)))
7636
7637(define-public java-slf4j-api
7638 (package
7639 (name "java-slf4j-api")
7640 (version "1.7.25")
7641 (source (origin
7642 (method git-fetch)
7643 (uri (git-reference
7644 (url "https://github.com/qos-ch/slf4j")
7645 (commit (string-append "v_" version))))
7646 (file-name (git-file-name name version))
7647 (sha256
7648 (base32
7649 "15n42zq3k1iyn752nwdcbs44hxns2rmxhglwjfr4np7lxx56apjl"))
7650 (modules '((guix build utils)))
7651 ;; Delete bundled jars.
7652 (snippet
7653 '(begin
7654 (for-each delete-file (find-files "." "\\.jar$"))
7655 #t))))
7656 (build-system ant-build-system)
7657 (arguments
7658 `(#:jar-name "slf4j-api.jar"
7659 #:source-dir "slf4j-api/src/main"
7660 #:test-dir "slf4j-api/src/test"
7661 #:phases
7662 (modify-phases %standard-phases
7663 (add-after 'build 'regenerate-jar
7664 (lambda _
7665 ;; pom.xml ignores these files in the jar creation process. If we don't,
7666 ;; we get the error "This code should have never made it into slf4j-api.jar"
7667 (delete-file-recursively "build/classes/org/slf4j/impl")
7668 (invoke "jar" "-cf" "build/jar/slf4j-api.jar" "-C"
7669 "build/classes" ".")))
7670 (add-before 'check 'dont-test-abstract-classes
7671 (lambda _
7672 ;; abstract classes are not meant to be run with junit
7673 (substitute* "build.xml"
7674 (("<include name=\"\\*\\*/\\*Test.java\" />")
7675 (string-append "<include name=\"**/*Test.java\" />"
7676 "<exclude name=\"**/MultithreadedInitializationTest"
7677 ".java\" />")))
7678 #t))
7679 (replace 'install
7680 (install-from-pom "slf4j-api/pom.xml")))))
7681 (propagated-inputs
7682 (list java-slf4j-parent))
7683 (native-inputs
7684 (list java-junit java-hamcrest-core))
7685 (home-page "https://www.slf4j.org/")
7686 (synopsis "Simple logging facade for Java")
7687 (description "The Simple Logging Facade for Java (SLF4J) serves as a
7688simple facade or abstraction for various logging
7689frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j})
7690allowing the end user to plug in the desired logging framework at deployment
7691time.")
7692 (license license:expat)))
7693
7694(define java-slf4j-parent
7695 (package
7696 (inherit java-slf4j-api)
7697 (name "java-slf4j-parent")
7698 (native-inputs `())
7699 (propagated-inputs '())
7700 (arguments
7701 `(#:tests? #f
7702 #:phases
7703 (modify-phases %standard-phases
7704 (delete 'build)
7705 (delete 'configure)
7706 (replace 'install
7707 (install-pom-file "pom.xml")))))))
7708
7709(define-public java-slf4j-simple
7710 (package
7711 (name "java-slf4j-simple")
7712 (version "1.7.25")
7713 (source (package-source java-slf4j-api))
7714 (build-system ant-build-system)
7715 (arguments
7716 `(#:jar-name "slf4j-simple.jar"
7717 #:source-dir "slf4j-simple/src/main"
7718 #:test-dir "slf4j-simple/src/test"
7719 #:test-exclude (list "**/*SimpleLoggerMultithreadedInitializationTest.java")
7720 #:phases
7721 (modify-phases %standard-phases
7722 ;; The tests need some test classes from slf4j-api
7723 (add-before 'check 'build-slf4j-api-test-helpers
7724 (lambda _
7725 ;; Add current dir to CLASSPATH ...
7726 (setenv "CLASSPATH"
7727 (string-append (getcwd) ":" (getenv "CLASSPATH")))
7728 ;; ... and build test helper classes here:
7729 (apply invoke
7730 `("javac" "-d" "."
7731 ,@(find-files "slf4j-api/src/test" ".*\\.java")))))
7732 (replace 'install
7733 (install-from-pom "slf4j-simple/pom.xml")))))
7734 (propagated-inputs
7735 (list java-slf4j-api))
7736 (native-inputs
7737 (list java-junit java-hamcrest-core))
7738 (home-page "https://www.slf4j.org/")
7739 (synopsis "Simple implementation of simple logging facade for Java")
7740 (description "SLF4J binding for the Simple implementation, which outputs
7741all events to System.err. Only messages of level INFO and higher are
7742printed.")
7743 (license license:expat)))
7744
7745(define-public java-slf4j-nop
7746 (package
7747 (name "java-slf4j-nop")
7748 (version "1.7.25")
7749 (source (package-source java-slf4j-api))
7750 (build-system ant-build-system)
7751 (arguments
7752 `(#:jar-name "slf4j-nop.jar"
7753 #:source-dir "slf4j-nop/src/main"
7754 #:test-dir "slf4j-nop/src/test"
7755 #:phases (modify-phases %standard-phases
7756 ;; The tests need some test classes from slf4j-api
7757 (add-before 'check 'build-slf4j-api-test-helpers
7758 (lambda _
7759 ;; Add current dir to CLASSPATH ...
7760 (setenv "CLASSPATH"
7761 (string-append (getcwd) ":"
7762 (getenv "CLASSPATH")))
7763 ;; ... and build test helper classes here:
7764 (apply invoke
7765 `("javac" "-d" "."
7766 ,@(find-files "slf4j-api/src/test" ".*\\.java")))))
7767 (replace 'install
7768 (install-from-pom "slf4j-nop/pom.xml")))))
7769 (propagated-inputs (list java-slf4j-api))
7770 (native-inputs (list java-junit java-hamcrest-core))
7771 (home-page "https://www.slf4j.org/")
7772 (synopsis "SLF4J binding that silently discards all logging messages")
7773 (description "Binding/provider for NOP, an implementation that silently
7774discards all logging messages.")
7775 (license license:expat)))
7776
7777(define-public antlr2
7778 (package
7779 (name "antlr2")
7780 (version "2.7.7")
7781 (source (origin
7782 (method url-fetch)
7783 (uri (string-append "https://www.antlr2.org/download/antlr-"
7784 version ".tar.gz"))
7785 (sha256
7786 (base32
7787 "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5"))
7788 (modules '((guix build utils)))
7789 (snippet
7790 '(begin
7791 (delete-file "antlr.jar")
7792 (substitute* "lib/cpp/antlr/CharScanner.hpp"
7793 (("#include <map>")
7794 (string-append
7795 "#include <map>\n"
7796 "#define EOF (-1)\n"
7797 "#include <strings.h>")))
7798 (substitute* "configure"
7799 (("/bin/sh") "sh"))
7800 #t))))
7801 (build-system gnu-build-system)
7802 (arguments
7803 `(#:tests? #f ; no test target
7804 #:imported-modules ((guix build ant-build-system)
7805 ,@%gnu-build-system-modules)
7806 #:modules (((guix build ant-build-system) #:prefix ant:)
7807 (guix build gnu-build-system)
7808 (guix build utils))
7809 #:phases
7810 (modify-phases %standard-phases
7811 (add-after 'install 'strip-jar-timestamps
7812 (assoc-ref ant:%standard-phases 'strip-jar-timestamps))
7813 (add-before 'configure 'fix-timestamp
7814 (lambda _
7815 (substitute* "configure"
7816 (("^TIMESTAMP.*") "TIMESTAMP=19700101\n"))
7817 #t))
7818 (add-after 'configure 'fix-bin-ls
7819 (lambda _
7820 (substitute* (find-files "." "Makefile")
7821 (("/bin/ls") "ls"))
7822 #t)))))
7823 (native-inputs
7824 `(("which" ,which)
7825 ("zip" ,zip)
7826 ("java" ,icedtea "jdk")))
7827 (inputs
7828 `(("java" ,icedtea)))
7829 (home-page "https://www.antlr2.org")
7830 (synopsis "Framework for constructing recognizers, compilers, and translators")
7831 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
7832is a language tool that provides a framework for constructing recognizers,
7833compilers, and translators from grammatical descriptions containing Java, C#,
7834C++, or Python actions. ANTLR provides excellent support for tree construction,
7835tree walking, and translation.")
7836 (license license:public-domain)))
7837
7838(define-public java-stringtemplate-3
7839 (package
7840 (name "java-stringtemplate")
7841 (version "3.2.1")
7842 (source (origin
7843 (method url-fetch)
7844 (uri (string-append "https://github.com/antlr/website-st4/raw/"
7845 "gh-pages/download/stringtemplate-"
7846 version ".tar.gz"))
7847 (sha256
7848 (base32
7849 "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is"))))
7850 (build-system ant-build-system)
7851 (arguments
7852 `(#:jar-name (string-append ,name "-" ,version ".jar")
7853 #:test-dir "test"
7854 #:modules ((guix build ant-build-system)
7855 (guix build utils)
7856 (srfi srfi-1))
7857 #:phases
7858 (modify-phases %standard-phases
7859 (add-before 'check 'fix-tests
7860 (lambda _
7861 (substitute* "build.xml"
7862 (("\\$\\{test.home\\}/java")
7863 "${test.home}/org"))
7864 #t))
7865 (add-before 'build 'generate-grammar
7866 (lambda _
7867 (with-directory-excursion "src/org/antlr/stringtemplate/language/"
7868 (for-each (lambda (file)
7869 (format #t "~a\n" file)
7870 (invoke "antlr" file))
7871 '("template.g" "angle.bracket.template.g" "action.g"
7872 "eval.g" "group.g" "interface.g")))
7873 #t)))))
7874 (native-inputs
7875 `(("antlr" ,antlr2)
7876 ("java-junit" ,java-junit)))
7877 (home-page "https://www.stringtemplate.org")
7878 (synopsis "Template engine to generate formatted text output")
7879 (description "StringTemplate is a java template engine (with ports for C#,
7880Objective-C, JavaScript, Scala) for generating source code, web pages, emails,
7881or any other formatted text output. StringTemplate is particularly good at
7882code generators, multiple site skins, and internationalization / localization.
7883StringTemplate also powers ANTLR.")
7884 (license license:bsd-3)))
7885
7886;; antlr3 is partially written using antlr3 grammar files. It also depends on
7887;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar
7888;; files and uses antlr3 at runtime. The latest version requires a recent version
7889;; of antlr3 at runtime.
7890;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3.
7891;; This version of ST4 is sufficient for the latest antlr3.
7892;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build
7893;; the latest ST4 with it. Then we build our final antlr3 that will be linked
7894;; against the latest ST4.
7895;; antlr3.3 still depends on antlr3 to generate some files, so we use an
7896;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses
7897;; only grammar files with the antlr2 syntax.
7898;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3.
7899
7900(define-public java-stringtemplate
7901 (package (inherit java-stringtemplate-3)
7902 (name "java-stringtemplate")
7903 (version "4.0.8")
7904 (source (origin
7905 (method url-fetch)
7906 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/"
7907 version ".tar.gz"))
7908 (file-name (string-append name "-" version ".tar.gz"))
7909 (sha256
7910 (base32
7911 "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087"))))
7912 (build-system ant-build-system)
7913 (arguments
7914 `(#:jar-name (string-append ,name "-" ,version ".jar")
7915 #:tests? #f ; FIXME: tests fail for unknown reasons
7916 #:test-dir "test"
7917 #:modules ((guix build ant-build-system)
7918 (guix build utils)
7919 (srfi srfi-1))
7920 #:phases
7921 (modify-phases %standard-phases
7922 (add-before 'check 'fix-test-target
7923 (lambda _
7924 (substitute* "build.xml"
7925 (("\\$\\{test.home\\}/java") "${test.home}/")
7926 (("\\*Test.java") "Test*.java"))
7927 #t))
7928 (add-before 'build 'generate-grammar
7929 (lambda _
7930 (with-directory-excursion "src/org/stringtemplate/v4/compiler/"
7931 (for-each (lambda (file)
7932 (format #t "~a\n" file)
7933 (invoke "antlr3" file))
7934 '("STParser.g" "Group.g" "CodeGenerator.g")))
7935 #t)))))
7936 (inputs
7937 `(("antlr3" ,antlr3-bootstrap)
7938 ("antlr2" ,antlr2)
7939 ("java-stringtemplate" ,java-stringtemplate-3)
7940 ("java-junit" ,java-junit)))))
7941
7942(define java-stringtemplate-4.0.6
7943 (package (inherit java-stringtemplate)
7944 (name "java-stringtemplate")
7945 (version "4.0.6")
7946 (source (origin
7947 (method url-fetch)
7948 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-"
7949 version ".tar.gz"))
7950 (file-name (string-append name "-" version ".tar.gz"))
7951 (sha256
7952 (base32
7953 "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp"))))
7954 (inputs
7955 `(("antlr3" ,antlr3-3.3)
7956 ("antlr2" ,antlr2)
7957 ("java-stringtemplate" ,java-stringtemplate-3)))))
7958
7959(define-public antlr3
7960 (package
7961 (name "antlr3")
7962 (version "3.5.2")
7963 (source (origin
7964 (method git-fetch)
7965 (uri (git-reference
7966 (url "https://github.com/antlr/antlr3")
7967 (commit version)))
7968 (file-name (git-file-name name version))
7969 (sha256
7970 (base32
7971 "0cafavrjmzqhklghrk8c2jqxkdwxgzskm20pbrfd3r41cn00dpnf"))))
7972 (build-system ant-build-system)
7973 (arguments
7974 `(#:jar-name (string-append ,name "-" ,version ".jar")
7975 #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3"
7976 #:tests? #f
7977 #:phases
7978 (modify-phases %standard-phases
7979 (add-after 'install 'bin-install
7980 (lambda* (#:key inputs outputs #:allow-other-keys)
7981 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
7982 (bin (string-append (assoc-ref outputs "out") "/bin")))
7983 (mkdir-p bin)
7984 (with-output-to-file (string-append bin "/antlr3")
7985 (lambda _
7986 (display
7987 (string-append "#!" (which "sh") "\n"
7988 "java -cp " jar "/" ,name "-" ,version ".jar:"
7989 (string-concatenate
7990 (find-files (assoc-ref inputs "stringtemplate")
7991 ".*\\.jar"))
7992 ":"
7993 (string-concatenate
7994 (find-files (assoc-ref inputs "stringtemplate4")
7995 ".*\\.jar"))
7996 ":"
7997 (string-concatenate
7998 (find-files (string-append
7999 (assoc-ref inputs "antlr")
8000 "/lib")
8001 ".*\\.jar"))
8002 " org.antlr.Tool $*"))))
8003 (chmod (string-append bin "/antlr3") #o755))
8004 #t))
8005 (add-before 'build 'generate-grammar
8006 (lambda _
8007 (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/")
8008 (for-each (lambda (file)
8009 (display file)
8010 (newline)
8011 (invoke "antlr3" file))
8012 '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g"
8013 "AssignTokenTypesWalker.g"
8014 "ActionTranslator.g" "TreeToNFAConverter.g"
8015 "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g"
8016 "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g"))
8017 (substitute* "ANTLRParser.java"
8018 (("public Object getTree") "public GrammarAST getTree"))
8019 (substitute* "ANTLRv3Parser.java"
8020 (("public Object getTree") "public CommonTree getTree"))
8021 (chdir "../../../../../java")
8022 (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java"
8023 (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*;
8024import org.antlr.grammar.v3.ANTLRTreePrinter;"))
8025 (substitute* "org/antlr/tool/ErrorManager.java"
8026 (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") ""))
8027 (chdir "../../../..")
8028 #t))
8029 (add-before 'build 'fix-build-xml
8030 (lambda _
8031 (substitute* "build.xml"
8032 (("target name=\"compile\">")
8033 "target name=\"compile\">
8034<copy todir=\"${classes.dir}\">
8035<fileset dir=\"tool/src/main/resources\">
8036<include name=\"**/*.stg\"/>
8037<include name=\"**/*.st\"/>
8038<include name=\"**/*.sti\"/>
8039<include name=\"**/STLexer.tokens\"/>
8040</fileset>
8041</copy>"))
8042 #t)))))
8043 (native-inputs
8044 `(("antlr" ,antlr2)
8045 ("antlr3" ,antlr3-bootstrap)))
8046 (inputs
8047 `(("junit" ,java-junit)
8048 ("stringtemplate" ,java-stringtemplate-3)
8049 ("stringtemplate4" ,java-stringtemplate)))
8050 (propagated-inputs
8051 `(("stringtemplate" ,java-stringtemplate-3)
8052 ("antlr" ,antlr2)
8053 ("stringtemplate4" ,java-stringtemplate-4.0.6)))
8054 (home-page "https://www.antlr3.org")
8055 (synopsis "Framework for constructing recognizers, compilers, and translators")
8056 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
8057is a language tool that provides a framework for constructing recognizers,
8058compilers, and translators from grammatical descriptions containing Java, C#,
8059C++, or Python actions. ANTLR provides excellent support for tree construction,
8060tree walking, and translation.")
8061 (license license:bsd-3)))
8062
8063(define antlr3-bootstrap
8064 (package
8065 (inherit antlr3)
8066 (name "antlr3-bootstrap")
8067 (native-inputs
8068 `(("antlr" ,antlr2)
8069 ("antlr3" ,antlr3-3.3)))
8070 (inputs
8071 `(("junit" ,java-junit)))))
8072
8073(define-public antlr3-3.3
8074 (package
8075 (inherit antlr3)
8076 (name "antlr3")
8077 (version "3.3")
8078 (source (origin
8079 (method url-fetch)
8080 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
8081 "gh-pages/download/antlr-"
8082 version ".tar.gz"))
8083 (sha256
8084 (base32
8085 "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m"))
8086 (patches
8087 (search-patches "antlr3-3_3-fix-java8-compilation.patch"))))
8088 (arguments
8089 `(#:jar-name (string-append ,name "-" ,version ".jar")
8090 #:source-dir (string-join '("tool/src/main/java"
8091 "runtime/Java/src/main/java"
8092 "tool/src/main/antlr2"
8093 "tool/src/main/antlr3")
8094 ":")
8095 #:tests? #f ; FIXME: tests seem to require maven plugin
8096 #:modules ((guix build ant-build-system)
8097 (guix build utils)
8098 (srfi srfi-1))
8099 #:phases
8100 (modify-phases %standard-phases
8101 (add-after 'install 'bin-install
8102 (lambda* (#:key inputs outputs #:allow-other-keys)
8103 (let* ((out (assoc-ref outputs "out"))
8104 (jar (string-append out "/share/java"))
8105 (bin (string-append out "/bin")))
8106 (mkdir-p bin)
8107 (with-output-to-file (string-append bin "/antlr3")
8108 (lambda _
8109 (display
8110 (string-append
8111 "#!" (which "sh") "\n"
8112 "java -cp " jar "/antlr3-3.3.jar:"
8113 (string-join
8114 (append (find-files (assoc-ref inputs "java-stringtemplate")
8115 ".*\\.jar$")
8116 (find-files (string-append (assoc-ref inputs "antlr")
8117 "/lib")
8118 ".*\\.jar$"))
8119 ":")
8120 " org.antlr.Tool $*"))))
8121 (chmod (string-append bin "/antlr3") #o755)
8122 #t)))
8123 (add-before 'build 'generate-grammar
8124 (lambda _
8125 (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java"
8126 (("import org.antlr.grammar.v2.\\*;")
8127 "import org.antlr.grammar.v2.*;\n
8128import org.antlr.grammar.v2.TreeToNFAConverter;\n
8129import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n
8130import org.antlr.grammar.v2.ANTLRTreePrinter;"))
8131 (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/"
8132 (for-each (lambda (file)
8133 (format #t "~a\n" file)
8134 (invoke "antlr" file))
8135 '("antlr.g" "antlr.print.g" "assign.types.g"
8136 "buildnfa.g" "codegen.g" "define.g")))
8137 (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/"
8138 (for-each (lambda (file)
8139 (format #t "~a\n" file)
8140 (invoke "antlr3" file))
8141 '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g"
8142 "ANTLRv3Tree.g")))
8143 #t))
8144 (add-before 'build 'fix-build-xml
8145 (lambda _
8146 (substitute* "build.xml"
8147 (("target name=\"compile\">")
8148 "target name=\"compile\">
8149<copy todir=\"${classes.dir}\">
8150<fileset dir=\"tool/src/main/resources\">
8151<include name=\"**/*.stg\"/>
8152<include name=\"**/*.st\"/>
8153<include name=\"**/*.sti\"/>
8154<include name=\"**/STLexer.tokens\"/>
8155</fileset>
8156</copy>"))
8157 #t)))))
8158 (native-inputs
8159 `(("antlr" ,antlr2)
8160 ("antlr3" ,antlr3-3.1)))
8161 (inputs
8162 `(("junit" ,java-junit)))
8163 (propagated-inputs
8164 `(("java-stringtemplate" ,java-stringtemplate-3)
8165 ("antlr" ,antlr2)))))
8166
8167(define-public antlr3-3.1
8168 (package
8169 (inherit antlr3)
8170 (version "3.1")
8171 (source (origin
8172 (method url-fetch)
8173 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
8174 "gh-pages/download/antlr-"
8175 version ".tar.gz"))
8176 (sha256
8177 (base32
8178 "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z"))
8179 (patches
8180 (search-patches "antlr3-3_1-fix-java8-compilation.patch"))))
8181 (arguments
8182 `(#:jar-name (string-append "antlr3-" ,version ".jar")
8183 #:source-dir "src:runtime/Java/src"
8184 #:tests? #f
8185 #:phases
8186 (modify-phases %standard-phases
8187 (add-after 'install 'bin-install
8188 (lambda* (#:key inputs outputs #:allow-other-keys)
8189 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
8190 (bin (string-append (assoc-ref outputs "out") "/bin")))
8191 (mkdir-p bin)
8192 (with-output-to-file (string-append bin "/antlr3")
8193 (lambda _
8194 (display
8195 (string-append "#!" (which "sh") "\n"
8196 "java -cp " jar "/antlr3-3.1.jar:"
8197 (string-concatenate
8198 (find-files (assoc-ref inputs "stringtemplate")
8199 ".*\\.jar"))
8200 ":"
8201 (string-concatenate
8202 (find-files (string-append
8203 (assoc-ref inputs "antlr")
8204 "/lib")
8205 ".*\\.jar"))
8206 " org.antlr.Tool $*"))))
8207 (chmod (string-append bin "/antlr3") #o755))
8208 #t))
8209 (add-before 'build 'generate-grammar
8210 (lambda _
8211 (let ((dir "src/org/antlr/tool/"))
8212 (for-each (lambda (file)
8213 (display file)
8214 (newline)
8215 (invoke "antlr" "-o" dir (string-append dir file)))
8216 '("antlr.g" "antlr.print.g" "assign.types.g"
8217 "buildnfa.g" "define.g")))
8218 (format #t "codegen.g\n")
8219 (invoke "antlr" "-o" "src/org/antlr/codegen"
8220 "src/org/antlr/codegen/codegen.g")
8221 #t))
8222 (add-before 'build 'fix-build-xml
8223 (lambda _
8224 (substitute* "build.xml"
8225 (("target name=\"compile\">")
8226 "target name=\"compile\">
8227<copy todir=\"${classes.dir}\">
8228<fileset dir=\"src\">
8229<include name=\"**/*.stg\"/>
8230<include name=\"**/*.st\"/>
8231<include name=\"**/*.sti\"/>
8232<include name=\"**/STLexer.tokens\"/>
8233</fileset>
8234</copy>"))
8235 #t)))))
8236 (native-inputs
8237 `(("antlr" ,antlr2)))
8238 (inputs
8239 `(("junit" ,java-junit)))
8240 (propagated-inputs
8241 `(("stringtemplate" ,java-stringtemplate-3)))))
8242
8243(define-public java-treelayout
8244 (package
8245 (name "java-treelayout")
8246 (version "1.0.3")
8247 (source (origin
8248 (method git-fetch)
8249 (uri (git-reference
8250 (url "https://github.com/abego/treelayout")
8251 (commit (string-append "v" version))))
8252 (file-name (git-file-name name version))
8253 (sha256
8254 (base32
8255 "18my8ql9b1y0n0zrvkih7xfhf3dpgfhyfifvkcfhmwcvw3divxak"))))
8256 (build-system ant-build-system)
8257 (arguments
8258 `(#:jar-name (string-append ,name "-" ,version ".jar")
8259 #:source-dir "org.abego.treelayout/src/main/java"
8260 #:test-dir "org.abego.treelayout/src/test"))
8261 (inputs
8262 (list java-junit))
8263 (native-inputs
8264 (list java-hamcrest-core))
8265 (home-page "https://treelayout.sourceforge.net")
8266 (synopsis "Tree Layout Algorithm in Java")
8267 (description "TreeLayout creates tree layouts for arbitrary trees. It is
8268not restricted to a specific output or format, but can be used for any kind of
8269two dimensional diagram. Examples are Swing based components, SVG files, etc.
8270This is possible because TreeLayout separates the layout of a tree from the
8271actual rendering.")
8272 (license license:bsd-3)))
8273
8274(define-public java-antlr4-runtime
8275 (package
8276 (name "java-antlr4-runtime")
8277 (version "4.10.1")
8278 (source (origin
8279 (method git-fetch)
8280 (uri (git-reference
8281 (url "https://github.com/antlr/antlr4")
8282 (commit version)))
8283 (file-name (git-file-name name version))
8284 (sha256
8285 (base32
8286 "0ldvd9jm4nrivaw7i7wh1q40q6xgzmzirsywiakbhg8sppagqlv7"))
8287 (patches
8288 (search-patches "java-antlr4-Add-standalone-generator.patch"))))
8289 (build-system ant-build-system)
8290 (arguments
8291 `(#:jar-name "java-antlr4-runtime.jar"
8292 #:source-dir "runtime/Java/src/org"
8293 #:tests? #f; tests depend on java-antlr4 itself
8294 #:phases
8295 (modify-phases %standard-phases
8296 (add-before 'build 'copy-resources
8297 (lambda _
8298 (copy-recursively "runtime/Java/src/main/dot"
8299 "build/classes")
8300 #t)))))
8301 (home-page "https://www.antlr.org")
8302 (synopsis "ANTLR runtime library")
8303 (description "This package contains the runtime library used with generated
8304sources by ANTLR.")
8305 (license license:bsd-3)))
8306
8307(define-public java-antlr4-runtime-cpp
8308 (package
8309 (inherit java-antlr4-runtime)
8310 (name "java-antlr4-runtime-cpp")
8311 (outputs '("out" "static"))
8312 (build-system cmake-build-system)
8313 (arguments
8314 (list
8315 ;; TODO: try to run the tests under
8316 ;; runtime-testsuite/test/org/antlr/v4/test/runtime/cpp with antlr4.
8317 #:tests? #f ;no CMake test target
8318 ;; TODO: Building the tests wants to download googletest.
8319 #:configure-flags #~'("-DANTLR_BUILD_CPP_TESTS=OFF")
8320 #:phases
8321 #~(modify-phases %standard-phases
8322 (add-after 'unpack 'chdir
8323 (lambda _
8324 (chdir "runtime/Cpp")))
8325 (add-after 'install 'move-static-library
8326 (lambda* (#:key outputs #:allow-other-keys)
8327 (let ((static (assoc-ref outputs "static"))
8328 (libantlr4-runtime.a (search-input-file
8329 outputs "lib/libantlr4-runtime.a")))
8330 (mkdir-p (string-append static "/lib"))
8331 (rename-file
8332 libantlr4-runtime.a
8333 (string-append static "/lib/"
8334 (basename libantlr4-runtime.a)))))))))
8335 (native-inputs (list pkg-config))
8336 (inputs (list `(,util-linux "lib"))) ;libuuid
8337 (synopsis "ANTL C++ runtime library")
8338 (description "This package contains the C++ runtime library used with C++
8339generated sources by ANTLR.")))
8340
8341(define-public java-antlr4-runtime-python
8342 (package
8343 (inherit java-antlr4-runtime)
8344 (name "java-antlr4-runtime-python")
8345 (outputs '("out"))
8346 (build-system python-build-system)
8347 (arguments
8348 (list
8349 #:tests? #f ; tests require antlr
8350 #:phases
8351 #~(modify-phases %standard-phases
8352 (add-after 'unpack 'chdir
8353 (lambda _
8354 (chdir "runtime/Python3"))))))
8355 (native-inputs (list pkg-config))
8356 (inputs (list `(,util-linux "lib"))) ; libuuid
8357 (synopsis "ANTLR Python runtime library")
8358 (description "This package contains the Python runtime library used with
8359Python generated sources by ANTLR.")))
8360
8361(define-public antlr4
8362 (package
8363 (inherit java-antlr4-runtime)
8364 (name "antlr4")
8365 (arguments
8366 `(#:jar-name "antlr4.jar"
8367 #:source-dir "tool/src"
8368 #:test-dir "tool-testsuite/test:runtime-testsuite/test"
8369 #:test-include (list "**/Test*.java")
8370 #:test-exclude (list
8371 ;; These have no runnable methods and fail because
8372 ;; test-include above is too broad.
8373 "**/TestContext.java"
8374 "**/TestOutputReading.java"
8375 ;; no @Test methods
8376 "**/TestParserErrors.java"
8377 "**/TestSemPredEvalParser.java"
8378 "**/TestSets.java"
8379 "**/TestListeners.java"
8380 "**/TestParseTrees.java"
8381 "**/TestParserExec.java"
8382 "**/TestLexerErrors.java"
8383 "**/TestPerformance.java"
8384 "**/TestCompositeParsers.java"
8385 "**/TestLexerExec.java"
8386 "**/TestSemPredEvalLexer.java"
8387 "**/TestLeftRecursion.java"
8388 "**/TestFullContextParsing.java"
8389 "**/TestCompositeLexers.java"
8390 ;; Null pointer exception
8391 "**/TestCompositeGrammars.java")
8392 #:phases
8393 (modify-phases %standard-phases
8394 (add-before 'build 'fix-build.xml
8395 (lambda _
8396 ;; tests are not in a java subdirectory
8397 (substitute* "build.xml"
8398 (("\\$\\{test.home\\}/java") "${test.home}"))
8399 #t))
8400 ;; tests require to have a working antlr4 binary
8401 (delete 'check)
8402 (add-after 'bin-install 'check
8403 (lambda _
8404 (invoke "ant" "compile-tests")
8405 (invoke "ant" "check" "-Dtest.home=runtime-testsuite/test")
8406 (invoke "ant" "check" "-Dtest.home=tool-testsuite/test")
8407 #t))
8408 (add-before 'check 'remove-unrelated-languages
8409 (lambda _
8410 ;; There are tests for other languages that ANTLR can generate, but
8411 ;; we don't have the infrastructure for that yet. Let's test Java
8412 ;; generation only.
8413 (for-each
8414 (lambda (language)
8415 (delete-file-recursively
8416 (string-append "runtime-testsuite/test/org/antlr/v4/test/runtime/"
8417 language)))
8418 '("cpp" "csharp" "go" "javascript" "php" "python" "python2"
8419 "python3" "swift"))
8420 #t))
8421 (add-before 'check 'generate-test-parsers
8422 (lambda* (#:key outputs #:allow-other-keys)
8423 (define (run-antlr dir filename package)
8424 (invoke "antlr4" "-lib" dir "-visitor" "-no-listener"
8425 "-package" package (string-append dir "/" filename)
8426 "-Xlog"))
8427 (setenv "PATH" (string-append (getenv "PATH") ":"
8428 (assoc-ref outputs "out") "/bin"))
8429 (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api"
8430 "Java.g4" "org.antlr.v4.test.runtime.java.api")
8431 (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api"
8432 "VisitorBasic.g4" "org.antlr.v4.test.runtime.java.api")
8433 (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api"
8434 "VisitorCalc.g4" "org.antlr.v4.test.runtime.java.api")
8435 #t))
8436 (add-before 'check 'remove-graphemes
8437 (lambda _
8438 ;; When running antlr on grahemes.g4, we get a runtime exception:
8439 ;; set is empty. So delete the file that depends on it.
8440 (delete-file
8441 "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api/perf/TimeLexerSpeed.java")
8442 #t))
8443 (add-after 'install 'bin-install
8444 (lambda* (#:key inputs outputs #:allow-other-keys)
8445 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
8446 (bin (string-append (assoc-ref outputs "out") "/bin")))
8447 (mkdir-p bin)
8448 (with-output-to-file (string-append bin "/antlr4")
8449 (lambda _
8450 (display
8451 (string-append "#!" (which "sh") "\n"
8452 "java -cp " jar "/antlr4.jar:"
8453 (string-join
8454 (apply
8455 append
8456 (map
8457 (lambda (input)
8458 (find-files (assoc-ref inputs input)
8459 ".*\\.jar"))
8460 '("antlr3" "java-stringtemplate"
8461 "java-antlr4-runtime" "java-treelayout"
8462 "java-jsonp-api" "java-icu4j")))
8463 ":")
8464 " org.antlr.v4.Tool $*"))))
8465 (chmod (string-append bin "/antlr4") #o755)
8466 #t)))
8467 (add-before 'build 'copy-resources
8468 (lambda _
8469 (copy-recursively "tool/resources/" "build/classes")
8470 #t))
8471 (add-before 'build 'generate-unicode
8472 (lambda _
8473 ;; First: build the generator
8474 (invoke "javac" "-cp" (getenv "CLASSPATH")
8475 "tool/src/org/antlr/v4/unicode/UnicodeRenderer.java"
8476 "tool/src/org/antlr/v4/unicode/UnicodeDataTemplateController.java")
8477 ;; Then use it
8478 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8479 ":tool/src:runtime/Java")
8480 "org.antlr.v4.unicode.UnicodeRenderer"
8481 "tool/resources/org/antlr/v4/tool/templates"
8482 "unicodedata"
8483 "tool/src/org/antlr/v4/unicode/UnicodeData.java")
8484 ;; It seems there is a bug with our ST4
8485 (substitute* "tool/src/org/antlr/v4/unicode/UnicodeData.java"
8486 (("\\\\>") ">"))
8487 ;; Remove the additional file
8488 (delete-file "tool/src/org/antlr/v4/unicode/UnicodeRenderer.java")
8489 #t))
8490 (add-before 'build 'generate-grammar
8491 (lambda* (#:key inputs #:allow-other-keys)
8492 (with-directory-excursion "tool/src/org/antlr/v4/parse"
8493 (for-each (lambda (file)
8494 (display file)
8495 (newline)
8496 (invoke "antlr3" file))
8497 '("ANTLRLexer.g" "ANTLRParser.g" "BlockSetTransformer.g"
8498 "GrammarTreeVisitor.g" "ATNBuilder.g"
8499 "ActionSplitter.g" "LeftRecursiveRuleWalker.g")))
8500 (with-directory-excursion "tool/src/org/antlr/v4/codegen"
8501 (install-file "../parse/ANTLRParser.tokens" ".")
8502 (display "SourceGenTriggers.g\n")
8503 (invoke "antlr3" "SourceGenTriggers.g"))
8504 #t)))))
8505 (inputs
8506 (list antlr3
8507 java-antlr4-runtime
8508 java-icu4j
8509 java-jsonp-api
8510 java-stringtemplate
8511 java-treelayout))
8512 (native-inputs
8513 (list java-junit))
8514 (synopsis "Parser and lexer generator in Java")
8515 (description "ANTLR (ANother Tool for Language Recognition) is a powerful
8516parser generator for reading, processing, executing, or translating structured
8517text or binary files. It's widely used to build languages, tools, and
8518frameworks. From a grammar, ANTLR generates a parser that can build and walk
8519parse trees.")))
8520
8521(define-public java-antlr4-runtime-4.1
8522 (package
8523 (inherit java-antlr4-runtime)
8524 (version "4.1")
8525 (source (origin
8526 (method git-fetch)
8527 (uri (git-reference
8528 (url "https://github.com/antlr/antlr4")
8529 (commit version)))
8530 (file-name (git-file-name "antlr4" version))
8531 (sha256
8532 (base32
8533 "1i8hmx5an58cjyvhji0xgpvd6lq00z1k1mjys025q2wqc25wv4c1"))))
8534 (arguments
8535 (substitute-keyword-arguments (package-arguments java-antlr4-runtime)
8536 ((#:phases phases)
8537 `(modify-phases ,phases
8538 (add-before 'configure 'chmod
8539 (lambda _
8540 (chmod "build.xml" #o644)
8541 #t))))))
8542 (inputs
8543 (list java-treelayout))))
8544
8545(define-public antlr4-4.1
8546 (package
8547 (inherit antlr4)
8548 (version (package-version java-antlr4-runtime-4.1))
8549 (source (package-source java-antlr4-runtime-4.1))
8550 (arguments
8551 (substitute-keyword-arguments (package-arguments antlr4)
8552 ((#:test-dir _)
8553 "tool/test")
8554 ((#:test-exclude excludes)
8555 `(list "**/TestParseErrors.java"
8556 "**/TestTopologicalSort.java"
8557 ,@excludes))
8558 ((#:phases phases)
8559 `(modify-phases ,phases
8560 (delete 'generate-unicode)
8561 (replace 'check
8562 (lambda _
8563 (invoke "ant" "check")
8564 #t))
8565 (add-before 'configure 'chmod
8566 (lambda _
8567 (chmod "build.xml" #o644)
8568 #t))
8569 (delete 'remove-graphemes)
8570 (delete 'remove-unrelated-languages)
8571 (delete 'generate-test-parsers)))))
8572 (inputs
8573 (alist-replace
8574 "java-antlr4-runtime" (list java-antlr4-runtime-4.1)
8575 (package-inputs antlr4)))))
8576
8577(define-public java-tunnelvisionlabs-antlr4-runtime-annotations
8578 (package
8579 (inherit java-antlr4-runtime)
8580 (name "java-tunnelvisionlabs-antlr4-runtime-annotations")
8581 (version "4.7.4")
8582 (source (origin
8583 (method git-fetch)
8584 (uri (git-reference
8585 (url "https://github.com/tunnelvisionlabs/antlr4")
8586 (commit (string-append version "-opt"))))
8587 (file-name (git-file-name "java-tunnelvisionlabs-antlr4" version))
8588 (sha256
8589 (base32
8590 "1mf2lvvsszpialsk23ma83pwp50nd32lrbjpa847zlm5gmranbr8"))
8591 (patches
8592 (search-patches "java-antlr4-Add-standalone-generator.patch"
8593 "java-tunnelvisionlabs-antlr-code-too-large.patch"))))
8594 (arguments
8595 `(#:jar-name "java-antlr4-runtime-annotations.jar"
8596 #:source-dir "runtime/JavaAnnotations/src"
8597 #:tests? #f; no tests
8598 #:phases
8599 (modify-phases %standard-phases
8600 (add-after 'build 'copy-resources
8601 (lambda _
8602 (copy-recursively "runtime/JavaAnnotations/resources"
8603 "build/classes")
8604 #t))
8605 (add-after 'copy-resources 'rebuild-jar
8606 (lambda _
8607 (invoke "ant" "jar")
8608 #t)))))
8609 (inputs '())
8610 (native-inputs '())
8611 (synopsis "Annotations for ANTLR's runtime library")
8612 (description "This package contains annotations used during the build of
8613the runtime library of ANTLR.")))
8614
8615;; the runtime of this library requires a lexer that is generated by antlr4.
8616;; However, antlr4 itself requires this library at build and run-time. We
8617;; use [email protected], the closest version of antlr that doesn't need this
8618;; bootstrap process, to generate the lexer. The generated lexer is built
8619;; for the 4.1 runtime, which is slightly different from this runtime.
8620;; So, we build the runtime with antlr 4.1, with a broken xml lexer, that we
8621;; use to build antlr4. We then re-use this antlr4 to build the runtime, and
8622;; the proper, working, runtime to build antlr4 again.
8623(define java-tunnelvisionlabs-antlr4-runtime-bootstrap
8624 (package
8625 (inherit java-antlr4-runtime)
8626 (name "java-tunnelvisionlabs-antlr4-runtime")
8627 (version (package-version java-tunnelvisionlabs-antlr4-runtime-annotations))
8628 (source (package-source java-tunnelvisionlabs-antlr4-runtime-annotations))
8629 (arguments
8630 `(#:jar-name "java-antlr4-runtime.jar"
8631 #:source-dir "runtime/Java/src"
8632 #:tests? #f; tests require antlr4, but antlr4 depends on this package
8633 #:phases
8634 (modify-phases %standard-phases
8635 (add-before 'build 'generate-xpath-lexer
8636 (lambda _
8637 (invoke "antlr4" "-lib" "runtime/Java/src/org/antlr/v4/runtime/tree/xpath"
8638 "-visitor" "-no-listener"
8639 "-package" "org.antlr.v4.runtime.tree.xpath"
8640 "runtime/Java/src/org/antlr/v4/runtime/tree/xpath/XPathLexer.g4")
8641 ;; Generated code is for an incompatible version of the runtime
8642 (substitute* "runtime/Java/src/org/antlr/v4/runtime/tree/xpath/XPathLexer.java"
8643 (("LexerATNSimulator\\(this,_ATN,_decisionToDFA,_sharedContextCache\\)")
8644 "LexerATNSimulator(this,_ATN)"))
8645 #t))
8646 (add-before 'build 'copy-resources
8647 (lambda _
8648 (copy-recursively "runtime/Java/src/main/dot"
8649 "build/classes")
8650 #t)))))
8651 (native-inputs
8652 `(("antlr4" ,antlr4-4.1)
8653 ("java-tunnelvisionlabs-antlr4-runtime-annotations"
8654 ,java-tunnelvisionlabs-antlr4-runtime-annotations)))))
8655
8656(define java-tunnelvisionlabs-antlr4-bootstrap
8657 (package
8658 (inherit antlr4)
8659 (name "java-tunnelvisionlabs-antlr4")
8660 (version (package-version java-tunnelvisionlabs-antlr4-runtime-annotations))
8661 (source (package-source java-tunnelvisionlabs-antlr4-runtime-annotations))
8662 (arguments
8663 (substitute-keyword-arguments (package-arguments antlr4)
8664 ((#:test-dir _)
8665 "tool/test:runtime-testsuite/src")
8666 ((#:phases phases)
8667 `(modify-phases ,phases
8668 (delete 'remove-unrelated-languages)
8669 (delete 'remove-graphemes)
8670 (delete 'generate-test-parsers)
8671 (delete 'check)))))
8672 (native-inputs '())
8673 (inputs
8674 `(("antlr3" ,antlr3)
8675 ("java-antlr4-runtime" ,java-tunnelvisionlabs-antlr4-runtime-bootstrap)
8676 ("java-tunnelvisionlabs-antlr4-runtime-annotations"
8677 ,java-tunnelvisionlabs-antlr4-runtime-annotations)
8678 ("java-icu4j" ,java-icu4j)
8679 ("java-jsonp-api" ,java-jsonp-api)
8680 ("java-stringtemplate" ,java-stringtemplate)
8681 ("java-treelayout" ,java-treelayout)))))
8682
8683(define-public java-tunnelvisionlabs-antlr4-runtime
8684 (package
8685 (inherit java-tunnelvisionlabs-antlr4-runtime-bootstrap)
8686 (native-inputs
8687 (alist-replace
8688 "antlr4" (list java-tunnelvisionlabs-antlr4-bootstrap)
8689 (package-native-inputs java-tunnelvisionlabs-antlr4-runtime-bootstrap)))))
8690
8691(define-public java-tunnelvisionlabs-antlr4
8692 (package
8693 (inherit java-tunnelvisionlabs-antlr4-bootstrap)
8694 (inputs
8695 (alist-replace
8696 "java-antlr4-runtime" (list java-tunnelvisionlabs-antlr4-runtime)
8697 (package-inputs java-tunnelvisionlabs-antlr4-bootstrap)))))
8698
8699(define-public java-commons-cli-1.2
8700 ;; This is a bootstrap dependency for Maven2.
8701 (package
8702 (inherit java-commons-cli)
8703 (version "1.2")
8704 (source (origin
8705 (method url-fetch)
8706 (uri (string-append "mirror://apache/commons/cli/source/"
8707 "commons-cli-" version "-src.tar.gz"))
8708 (sha256
8709 (base32
8710 "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm"))))
8711 (arguments
8712 `(#:jar-name "commons-cli.jar"
8713 #:phases
8714 (modify-phases %standard-phases
8715 (add-before 'check 'fix-build-xml
8716 (lambda* (#:key inputs #:allow-other-keys)
8717 (substitute* "build.xml"
8718 (("dir=\"\\$\\{test.home\\}/java\"")
8719 "dir=\"${test.home}\""))
8720 #t)))))
8721 (native-inputs
8722 (list java-junit))))
8723
8724(define-public java-microemulator-cldc
8725 (package
8726 (name "java-microemulator-cldc")
8727 (version "2.0.4")
8728 (source (origin
8729 (method url-fetch)
8730 (uri (string-append "https://github.com/barteo/microemu/archive/"
8731 "microemulator_"
8732 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
8733 version)
8734 ".tar.gz"))
8735 (file-name (string-append name "-" version ".tar.gz"))
8736 (sha256
8737 (base32
8738 "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll"))))
8739 (build-system ant-build-system)
8740 (arguments
8741 `(#:jar-name "microemulator-cldc.jar"
8742 #:source-dir "microemu-cldc/src/main/java"
8743 #:tests? #f)); Requires even older software
8744 (home-page "https://github.com/barteo/microemu")
8745 (synopsis "J2ME CLDC emulator")
8746 (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP
8747Emulator. It demonstrates MIDlet based applications in web browser
8748applet and can be run as a standalone java application.")
8749 (license (list license:asl2.0
8750 ;; or altenatively:
8751 license:lgpl2.1+))))
8752
8753(define-public java-datanucleus-javax-persistence
8754 (package
8755 (name "java-datanucleus-javax-persistence")
8756 (version "2.2.0")
8757 (source (origin
8758 (method url-fetch)
8759 (uri (string-append "https://github.com/datanucleus/"
8760 "javax.persistence/archive/javax.persistence-"
8761 version "-release.tar.gz"))
8762 (sha256
8763 (base32
8764 "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx"))))
8765 (build-system ant-build-system)
8766 (arguments
8767 `(#:jar-name "java-datanucleus-javax-persistence.jar"
8768 #:jdk ,icedtea-8
8769 #:source-dir "src/main/java"
8770 #:tests? #f)); no tests
8771 (home-page "https://github.com/datanucleus/javax.persistence")
8772 (synopsis "JPA API")
8773 (description "This package contains a clean definition of JPA API intended
8774for use with DataNucleus JPA since the JCP haven't provided an official JPA API
8775jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification
8776used to generate this API.")
8777 (license (list license:edl1.0 license:epl1.0))))
8778
8779(define-public java-osgi-cmpn
8780 (package
8781 (name "java-osgi-cmpn")
8782 (version "6.0.0")
8783 (source (origin
8784 (method url-fetch)
8785 (uri (string-append "https://repo1.maven.org/maven2/"
8786 "org/osgi/osgi.cmpn/" version "/osgi.cmpn-"
8787 version "-sources.jar"))
8788 (sha256
8789 (base32
8790 "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys"))))
8791 (build-system ant-build-system)
8792 (arguments
8793 `(#:jar-name "osgi-cmpn.jar"
8794 #:tests? #f)); no tests
8795 (inputs
8796 `(("annotation" ,java-osgi-annotation)
8797 ("core" ,java-osgi-core)
8798 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
8799 ("microemulator" ,java-microemulator-cldc)
8800 ("servlet" ,java-classpathx-servletapi)))
8801 (home-page "https://www.osgi.org")
8802 (synopsis "Compendium specification module of OSGi framework")
8803 (description
8804 "OSGi, for Open Services Gateway initiative framework, is a module system
8805and service platform for the Java programming language. This package contains
8806the compendium specification module, providing interfaces and classes for use
8807in compiling bundles.")
8808 (license license:asl2.0)))
8809
8810(define-public java-osgi-service-component-annotations
8811 (package
8812 (name "java-osgi-service-component-annotations")
8813 (version "1.3.0")
8814 (source (origin
8815 (method url-fetch)
8816 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8817 "org.osgi.service.component.annotations/"
8818 version "/org.osgi.service.component.annotations-"
8819 version "-sources.jar"))
8820 (sha256
8821 (base32
8822 "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0"))))
8823 (build-system ant-build-system)
8824 (arguments
8825 `(#:jar-name "osgi-service-component-annotations.jar"
8826 #:tests? #f)); no tests
8827 (inputs
8828 `(("annotation" ,java-osgi-annotation)))
8829 (home-page "https://www.osgi.org")
8830 (synopsis "Support annotations for osgi-service-component")
8831 (description
8832 "OSGi, for Open Services Gateway initiative framework, is a module system
8833and service platform for the Java programming language. This package contains
8834the support annotations for osgi-service-component.")
8835 (license license:asl2.0)))
8836
8837(define-public java-osgi-dto
8838 (package
8839 (name "java-osgi-dto")
8840 (version "1.0.0")
8841 (source (origin
8842 (method url-fetch)
8843 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8844 "org.osgi.dto/" version "/org.osgi.dto-"
8845 version "-sources.jar"))
8846 (sha256
8847 (base32
8848 "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr"))))
8849 (build-system ant-build-system)
8850 (arguments
8851 `(#:jar-name "osgi-dto.jar"
8852 #:tests? #f)); no tests
8853 (inputs
8854 `(("annotation" ,java-osgi-annotation)))
8855 (home-page "https://www.osgi.org")
8856 (synopsis "Data Transfer Objects")
8857 (description
8858 "OSGi, for Open Services Gateway initiative framework, is a module system
8859and service platform for the Java programming language. This package contains
8860the Data Transfer Objects. It is easily serializable having only public fields
8861of primitive types and their wrapper classes, Strings, and DTOs. List, Set,
8862Map and array aggregates may also be used. The aggregates must only hold
8863objects of the listed types or aggregates.")
8864 (license license:asl2.0)))
8865
8866(define-public java-osgi-resource
8867 (package
8868 (name "java-osgi-resource")
8869 (version "1.0.0")
8870 (source (origin
8871 (method url-fetch)
8872 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8873 "org.osgi.resource/"
8874 version "/org.osgi.resource-"
8875 version "-sources.jar"))
8876 (sha256
8877 (base32
8878 "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d"))))
8879 (build-system ant-build-system)
8880 (arguments
8881 `(#:jar-name "osgi-resource.jar"
8882 #:tests? #f)); no tests
8883 (inputs
8884 `(("annotation" ,java-osgi-annotation)
8885 ("dto" ,java-osgi-dto)))
8886 (home-page "https://www.osgi.org")
8887 (synopsis "OSGI Resource")
8888 (description
8889 "OSGi, for Open Services Gateway initiative framework, is a module system
8890and service platform for the Java programming language. This package contains
8891the definition of common types in osgi packages.")
8892 (license license:asl2.0)))
8893
8894(define-public java-osgi-namespace-contract
8895 (package
8896 (name "java-osgi-namespace-contract")
8897 (version "1.0.0")
8898 (source (origin
8899 (method url-fetch)
8900 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8901 "org.osgi.namespace.contract/"
8902 version "/org.osgi.namespace.contract-"
8903 version "-sources.jar"))
8904 (sha256
8905 (base32
8906 "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36"))))
8907 (build-system ant-build-system)
8908 (inputs
8909 `(("resource" ,java-osgi-resource)
8910 ("annotation" ,java-osgi-annotation)))
8911 (arguments
8912 `(#:jar-name "osgi-namespace-contract.jar"
8913 #:tests? #f)); no tests
8914 (home-page "https://www.osgi.org")
8915 (synopsis "Contract Capability and Requirement Namespace")
8916 (description
8917 "OSGi, for Open Services Gateway initiative framework, is a module system
8918and service platform for the Java programming language. This package contains
8919the names for the attributes and directives for a namespace with contracts.")
8920 (license license:asl2.0)))
8921
8922(define-public java-osgi-namespace-extender
8923 (package
8924 (name "java-osgi-namespace-extender")
8925 (version "1.0.1")
8926 (source (origin
8927 (method url-fetch)
8928 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8929 "org.osgi.namespace.extender/"
8930 version "/org.osgi.namespace.extender-"
8931 version "-sources.jar"))
8932 (sha256
8933 (base32
8934 "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz"))))
8935 (build-system ant-build-system)
8936 (inputs
8937 `(("resource" ,java-osgi-resource)
8938 ("annotation" ,java-osgi-annotation)))
8939 (arguments
8940 `(#:jar-name "osgi-namespace-extendent.jar"
8941 #:tests? #f)); no tests
8942 (home-page "https://www.osgi.org")
8943 (synopsis "Extender Capability and Requirement Namespace")
8944 (description
8945 "OSGi, for Open Services Gateway initiative framework, is a module system
8946and service platform for the Java programming language. This package contains
8947the names for the attributes and directives for an extender namespace.")
8948 (license license:asl2.0)))
8949
8950(define-public java-osgi-namespace-service
8951 (package
8952 (name "java-osgi-namespace-service")
8953 (version "1.0.0")
8954 (source (origin
8955 (method url-fetch)
8956 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8957 "org.osgi.namespace.service/"
8958 version "/org.osgi.namespace.service-"
8959 version "-sources.jar"))
8960 (sha256
8961 (base32
8962 "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8"))))
8963 (build-system ant-build-system)
8964 (inputs
8965 `(("resource" ,java-osgi-resource)
8966 ("annotation" ,java-osgi-annotation)))
8967 (arguments
8968 `(#:jar-name "osgi-namespace-service.jar"
8969 #:tests? #f)); no tests
8970 (home-page "https://www.osgi.org")
8971 (synopsis "Service Capability and Requirement Namespace")
8972 (description
8973 "OSGi, for Open Services Gateway initiative framework, is a module system
8974and service platform for the Java programming language. This package contains
8975the names for the attributes and directives for a service namespace.")
8976 (license license:asl2.0)))
8977
8978(define-public java-osgi-util-function
8979 (package
8980 (name "java-osgi-util-function")
8981 (version "1.0.0")
8982 (source (origin
8983 (method url-fetch)
8984 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8985 "org.osgi.util.function/"
8986 version "/org.osgi.util.function-"
8987 version "-sources.jar"))
8988 (sha256
8989 (base32
8990 "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x"))))
8991 (build-system ant-build-system)
8992 (arguments
8993 `(#:jar-name "osgi-util-function.jar"
8994 #:tests? #f)); no tests
8995 (inputs
8996 `(("annotation" ,java-osgi-annotation)))
8997 (home-page "https://www.osgi.org")
8998 (synopsis "OSGI Util Function")
8999 (description
9000 "OSGi, for Open Services Gateway initiative framework, is a module system
9001and service platform for the Java programming language. This package contains
9002an interface for a function that accepts a single argument and produces a result.")
9003 (license license:asl2.0)))
9004
9005(define-public java-osgi-util-promise
9006 (package
9007 (name "java-osgi-util-promise")
9008 (version "1.0.0")
9009 (source (origin
9010 (method url-fetch)
9011 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9012 "org.osgi.util.promise/"
9013 version "/org.osgi.util.promise-"
9014 version "-sources.jar"))
9015 (sha256
9016 (base32
9017 "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c"))))
9018 (build-system ant-build-system)
9019 (arguments
9020 `(#:jar-name "osgi-util-promise.jar"
9021 #:tests? #f)); no tests
9022 (inputs
9023 `(("annotation" ,java-osgi-annotation)
9024 ("function" ,java-osgi-util-function)))
9025 (home-page "https://www.osgi.org")
9026 (synopsis "Promise of a value")
9027 (description
9028 "OSGi, for Open Services Gateway initiative framework, is a module system
9029and service platform for the Java programming language. This package contains
9030an interface and utilitary classes for promises. A Promise represents a future
9031value. It handles the interactions for asynchronous processing.")
9032 (license license:asl2.0)))
9033
9034(define-public java-osgi-service-metatype-annotations
9035 (package
9036 (name "java-osgi-service-metatype-annotations")
9037 (version "1.3.0")
9038 (source (origin
9039 (method url-fetch)
9040 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9041 "org.osgi.service.metatype.annotations/"
9042 version "/org.osgi.service.metatype.annotations-"
9043 version "-sources.jar"))
9044 (sha256
9045 (base32
9046 "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6"))))
9047 (build-system ant-build-system)
9048 (arguments
9049 `(#:jar-name "osgi-service-metatype-annotations.jar"
9050 #:tests? #f)); no tests
9051 (inputs
9052 `(("annotation" ,java-osgi-annotation)))
9053 (home-page "https://www.osgi.org")
9054 (synopsis "Support annotations for metatype")
9055 (description
9056 "OSGi, for Open Services Gateway initiative framework, is a module system
9057and service platform for the Java programming language. This package contains
9058the support annotations for metatype.")
9059 (license license:asl2.0)))
9060
9061(define-public java-osgi-service-repository
9062 (package
9063 (name "java-osgi-service-repository")
9064 (version "1.1.0")
9065 (source (origin
9066 (method url-fetch)
9067 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9068 "org.osgi.service.repository/"
9069 version "/org.osgi.service.repository-"
9070 version "-sources.jar"))
9071 (sha256
9072 (base32
9073 "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n"))))
9074 (build-system ant-build-system)
9075 (arguments
9076 `(#:jar-name "osgi-service-repository.jar"
9077 #:tests? #f)); no tests
9078 (inputs
9079 `(("annotation" ,java-osgi-annotation)
9080 ("promise" ,java-osgi-util-promise)
9081 ("resource" ,java-osgi-resource)))
9082 (home-page "https://www.osgi.org")
9083 (synopsis "OSGI service repository")
9084 (description
9085 "OSGi, for Open Services Gateway initiative framework, is a module system
9086and service platform for the Java programming language. This package contains
9087a repository service that contains resources.")
9088 (license license:asl2.0)))
9089
9090(define-public java-osgi-framework
9091 (package
9092 (name "java-osgi-framework")
9093 (version "1.8.0")
9094 (source (origin
9095 (method url-fetch)
9096 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9097 "org.osgi.framework/" version "/org.osgi.framework-"
9098 version "-sources.jar"))
9099 (sha256
9100 (base32
9101 "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s"))))
9102 (build-system ant-build-system)
9103 (arguments
9104 `(#:jar-name "osgi-framework.jar"
9105 #:tests? #f)); no tests
9106 (inputs
9107 `(("annotation" ,java-osgi-annotation)
9108 ("resource" ,java-osgi-resource)
9109 ("dto" ,java-osgi-dto)))
9110 (home-page "https://www.osgi.org")
9111 (synopsis "OSGi framework")
9112 (description
9113 "OSGi, for Open Services Gateway initiative framework, is a module system
9114and service platform for the Java programming language.")
9115 (license license:asl2.0)))
9116
9117(define-public java-osgi-service-log
9118 (package
9119 (name "java-osgi-service-log")
9120 (version "1.3.0")
9121 (source (origin
9122 (method url-fetch)
9123 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9124 "org.osgi.service.log/"
9125 version "/org.osgi.service.log-"
9126 version "-sources.jar"))
9127 (sha256
9128 (base32
9129 "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0"))))
9130 (build-system ant-build-system)
9131 (arguments
9132 `(#:jar-name "osgi-service-log.jar"
9133 #:tests? #f)); no tests
9134 (inputs
9135 (list java-osgi-framework))
9136 (home-page "https://www.osgi.org")
9137 (synopsis "Provides methods for bundles to write messages to the log")
9138 (description
9139 "OSGi, for Open Services Gateway initiative framework, is a module system
9140and service platform for the Java programming language. This package contains
9141the log service.")
9142 (license license:asl2.0)))
9143
9144(define-public java-osgi-service-jdbc
9145 (package
9146 (name "java-osgi-service-jdbc")
9147 (version "1.0.0")
9148 (source (origin
9149 (method url-fetch)
9150 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9151 "org.osgi.service.jdbc/"
9152 version "/org.osgi.service.jdbc-"
9153 version "-sources.jar"))
9154 (sha256
9155 (base32
9156 "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz"))))
9157 (build-system ant-build-system)
9158 (arguments
9159 `(#:jar-name "osgi-service-jdbc.jar"
9160 #:tests? #f)); no tests
9161 (home-page "https://www.osgi.org")
9162 (synopsis "Factory for JDBC connection factories")
9163 (description
9164 "OSGi, for Open Services Gateway initiative framework, is a module system
9165and service platform for the Java programming language. This package contains
9166a factory for JDBC connection factories. There are 3 preferred connection
9167factories for getting JDBC connections:
9168
9169@itemize
9170@item @code{javax.sql.DataSource};
9171@item @code{javax.sql.ConnectionPoolDataSource};
9172@item @code{javax.sql.XADataSource}.
9173@end itemize")
9174 (license license:asl2.0)))
9175
9176(define-public java-osgi-service-resolver
9177 (package
9178 (name "java-osgi-service-resolver")
9179 (version "1.0.1")
9180 (source (origin
9181 (method url-fetch)
9182 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9183 "org.osgi.service.resolver/"
9184 version "/org.osgi.service.resolver-"
9185 version "-sources.jar"))
9186 (sha256
9187 (base32
9188 "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd"))))
9189 (build-system ant-build-system)
9190 (arguments
9191 `(#:jar-name "osgi-service-resolver.jar"
9192 #:tests? #f)); no tests
9193 (inputs
9194 `(("annotation" ,java-osgi-annotation)
9195 ("resource" ,java-osgi-resource)))
9196 (home-page "https://www.osgi.org")
9197 (synopsis "OSGI Resolver service")
9198 (description
9199 "OSGi, for Open Services Gateway initiative framework, is a module system
9200and service platform for the Java programming language. This package contains
9201a resolver service that resolves the specified resources in the context supplied
9202by the caller.")
9203 (license license:asl2.0)))
9204
9205(define-public java-osgi-util-tracker
9206 (package
9207 (name "java-osgi-util-tracker")
9208 (version "1.5.1")
9209 (source (origin
9210 (method url-fetch)
9211 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9212 "org.osgi.util.tracker/"
9213 version "/org.osgi.util.tracker-"
9214 version "-sources.jar"))
9215 (sha256
9216 (base32
9217 "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz"))))
9218 (build-system ant-build-system)
9219 (arguments
9220 `(#:jar-name "osgi-util-tracker.jar"
9221 #:tests? #f)); no tests
9222 (inputs
9223 `(("framework" ,java-osgi-framework)
9224 ("annotation" ,java-osgi-annotation)))
9225 (home-page "https://www.osgi.org")
9226 (synopsis "Bundle tracking")
9227 (description
9228 "OSGi, for Open Services Gateway initiative framework, is a module system
9229and service platform for the Java programming language. This package contains
9230bundle tracking utility classes.")
9231 (license license:asl2.0)))
9232
9233(define-public java-osgi-service-cm
9234 (package
9235 (name "java-osgi-service-cm")
9236 (version "1.5.0")
9237 (source (origin
9238 (method url-fetch)
9239 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9240 "org.osgi.service.cm/"
9241 version "/org.osgi.service.cm-"
9242 version "-sources.jar"))
9243 (sha256
9244 (base32
9245 "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6"))))
9246 (build-system ant-build-system)
9247 (arguments
9248 `(#:jar-name "osgi-service-cm.jar"
9249 #:tests? #f)); no tests
9250 (inputs
9251 `(("framework" ,java-osgi-framework)
9252 ("annotation" ,java-osgi-annotation)))
9253 (home-page "https://www.osgi.org")
9254 (synopsis "OSGI Configuration Management")
9255 (description
9256 "OSGi, for Open Services Gateway initiative framework, is a module system
9257and service platform for the Java programming language. This package contains
9258utility classes for the configuration of services.")
9259 (license license:asl2.0)))
9260
9261(define-public java-osgi-service-packageadmin
9262 (package
9263 (name "java-osgi-service-packageadmin")
9264 (version "1.2.0")
9265 (source (origin
9266 (method url-fetch)
9267 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9268 "org.osgi.service.packageadmin/"
9269 version "/org.osgi.service.packageadmin-"
9270 version "-sources.jar"))
9271 (sha256
9272 (base32
9273 "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52"))))
9274 (build-system ant-build-system)
9275 (arguments
9276 `(#:jar-name "osgi-service-packageadmin.jar"
9277 #:tests? #f)); no tests
9278 (inputs
9279 `(("framework" ,java-osgi-framework)))
9280 (home-page "https://www.osgi.org")
9281 (synopsis "OSGI Package Administration")
9282 (description
9283 "OSGi, for Open Services Gateway initiative framework, is a module system
9284and service platform for the Java programming language. This package contains
9285the packageadmin service.")
9286 (license license:asl2.0)))
9287
9288(define-public java-ops4j-base-lang
9289 (package
9290 (name "java-ops4j-base-lang")
9291 (version "1.5.0")
9292 (source (origin
9293 (method url-fetch)
9294 (uri (string-append "https://github.com/ops4j/org.ops4j.base/"
9295 "archive/base-" version ".tar.gz"))
9296 (sha256
9297 (base32
9298 "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw"))))
9299 (build-system ant-build-system)
9300 (arguments
9301 `(#:jar-name "java-ops4j-base-lang.jar"
9302 #:source-dir "ops4j-base-lang/src/main/java"
9303 #:tests? #f; no tests
9304 #:phases
9305 (modify-phases %standard-phases
9306 (add-before 'build 'add-test-file
9307 (lambda _
9308 ;; That file is required by a test in ops4j-pax-exam-core-spi
9309 (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang")
9310 (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties"
9311 (lambda _
9312 (display
9313 (string-append
9314 "version=" ,version "\n"
9315 "groupId=org.ops4j.base"
9316 "artifactId=ops4j-base-lang\n"))))
9317 #t)))))
9318 (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview")
9319 (synopsis "Utility classes and extensions to be used in OPS4J projects")
9320 (description "OPS4J stands for Open Participation Software for Java. This
9321package contains utilities and extensions related to @code{java.lang}.")
9322 (license license:asl2.0)))
9323
9324(define-public java-ops4j-base-monitors
9325 (package
9326 (inherit java-ops4j-base-lang)
9327 (name "java-ops4j-base-monitors")
9328 (arguments
9329 `(#:jar-name "java-ops4j-base-monitors.jar"
9330 #:source-dir "ops4j-base-monitors/src/main/java"
9331 #:tests? #f)); no tests
9332 (inputs
9333 `(("lang" ,java-ops4j-base-lang)))
9334 (description "OPS4J stands for Open Participation Software for Java. This
9335package contains utilities and extensions related to monitoring.")))
9336
9337(define-public java-ops4j-base-io
9338 (package
9339 (inherit java-ops4j-base-lang)
9340 (name "java-ops4j-base-io")
9341 (arguments
9342 `(#:jar-name "java-ops4j-base-io.jar"
9343 #:source-dir "ops4j-base-io/src/main/java"
9344 #:test-dir "ops4j-base-io/src/test"
9345 #:test-exclude
9346 (list "**/ListerTest.java")))
9347 (inputs
9348 `(("lang" ,java-ops4j-base-monitors)
9349 ("lang" ,java-ops4j-base-lang)))
9350 (native-inputs
9351 `(("junit" ,java-junit)
9352 ("hamcrest" ,java-hamcrest-core)))
9353 (description "OPS4J stands for Open Participation Software for Java. This
9354package contains utilities and extensions related to handling streams and files.")))
9355
9356(define-public java-ops4j-base-util
9357 (package
9358 (inherit java-ops4j-base-lang)
9359 (name "java-ops4j-base-util")
9360 (arguments
9361 `(#:jar-name "java-ops4j-base-util.jar"
9362 #:source-dir "ops4j-base-util/src/main/java"
9363 #:test-dir "ops4j-base-util/src/test"))
9364 (inputs
9365 `(("lang" ,java-ops4j-base-lang)))
9366 (native-inputs
9367 `(("junit" ,java-junit)))
9368 (description "OPS4J stands for Open Participation Software for Java. This
9369package contains utilities and extensions related to environment, i18n and
9370mime types.")))
9371
9372(define-public java-ops4j-base-util-property
9373 (package
9374 (inherit java-ops4j-base-lang)
9375 (name "java-ops4j-base-util-property")
9376 (arguments
9377 `(#:jar-name "java-ops4j-base-util-property.jar"
9378 #:source-dir "ops4j-base-util-property/src/main/java"
9379 #:tests? #f)); no tests
9380 (inputs
9381 `(("lang" ,java-ops4j-base-lang)
9382 ("util" ,java-ops4j-base-util)))
9383 (description "OPS4J stands for Open Participation Software for Java. This
9384package contains utilities and extensions related to resolving properties from
9385different sources.")))
9386
9387(define-public java-ops4j-base-store
9388 (package
9389 (inherit java-ops4j-base-lang)
9390 (name "java-ops4j-base-store")
9391 (arguments
9392 `(#:jar-name "java-ops4j-base-store.jar"
9393 #:source-dir "ops4j-base-store/src/main/java"
9394 #:tests? #f)); no tests
9395 (inputs
9396 `(("lang" ,java-ops4j-base-lang)
9397 ("slf4j" ,java-slf4j-api)
9398 ("io" ,java-ops4j-base-io)))
9399 (description "OPS4J stands for Open Participation Software for Java. This
9400package contains utilities for storing and retrieving data from an
9401@code{InputStream}.")))
9402
9403(define-public java-ops4j-base-spi
9404 (package
9405 (inherit java-ops4j-base-lang)
9406 (name "java-ops4j-base-spi")
9407 (arguments
9408 `(#:jar-name "java-ops4j-base-spi.jar"
9409 #:source-dir "ops4j-base-spi/src/main/java"
9410 #:test-dir "ops4j-base-spi/src/test"))
9411 (native-inputs
9412 `(("junit" ,java-junit)
9413 ("hamcrest" ,java-hamcrest-core)))
9414 (description "OPS4J stands for Open Participation Software for Java. This
9415package contains utilities for obtaining services via the Java SE 6
9416@code{ServiceLoader}.")))
9417
9418(define-public java-aqute-bnd-annotation
9419 (package
9420 (name "java-aqute-bnd-annotation")
9421 (version "3.5.0")
9422 (source (origin
9423 (method url-fetch)
9424 (uri (string-append "https://github.com/bndtools/bnd/archive/"
9425 version ".REL.tar.gz"))
9426 (file-name (string-append name "-" version ".tar.gz"))
9427 (sha256
9428 (base32
9429 "1ggyiq0as0f6cz333a0dh98j72kmvv5pf2s47v9554yh905lfqdl"))))
9430 (build-system ant-build-system)
9431 (arguments
9432 `(#:jar-name "java-aqute-bnd-annotation.jar"
9433 #:source-dir "biz.aQute.bnd.annotation/src"
9434 #:tests? #f)); empty test dir
9435 (home-page "https://bnd.bndtools.org/")
9436 (synopsis "Tools for OSGi")
9437 (description "Bnd is a swiss army knife for OSGi, it creates manifest
9438headers based on analyzing the class code, it verifies the project settings,
9439it manages project dependencies, gives diffs jars, and much more.")
9440 (license license:asl2.0)))
9441
9442(define-public java-aqute-libg
9443 (package
9444 (inherit java-aqute-bnd-annotation)
9445 (name "java-aqute-libg")
9446 (arguments
9447 `(#:jar-name "java-aqute-libg.jar"
9448 ;; The build fails when source/target more recent than 1.7. This
9449 ;; is a known issue. See: https://github.com/bndtools/bnd/issues/1327
9450 ;;
9451 ;; It is closed as won't fix. There is no way to change the source
9452 ;; so that it works on 1.8, and still works on 1.6, the upstream
9453 ;; target. It work fine on 1.7, so we use 1.7.
9454 #:make-flags (list "-Dant.build.javac.source=1.7"
9455 "-Dant.build.javac.target=1.7")
9456 #:phases
9457 (modify-phases %standard-phases
9458 (add-before 'configure 'chdir
9459 ;; Change to aQute.libg directory, so that the relative
9460 ;; paths in the tests aren't broken.
9461 (lambda _
9462 (chdir "aQute.libg")
9463 #t))
9464 (add-before 'check 'create-test-directory
9465 ;; Copy the test directory to test/java, since that's where
9466 ;; ant-build-system's default project in build.xml expects to find
9467 ;; the test classes. Leave a copy in the original place to not
9468 ;; break paths in tests.
9469 (lambda _
9470 (mkdir "src/test")
9471 (copy-recursively "test" "src/test/java")
9472 #t)))))
9473 (inputs
9474 `(("slf4j" ,java-slf4j-api)
9475 ("osgi-annot" ,java-osgi-annotation)
9476 ("java-osgi-cmpn" ,java-osgi-cmpn)
9477 ("osgi" ,java-osgi-core)))
9478 (native-inputs
9479 `(("hamcrest" ,java-hamcrest-core)
9480 ("java-junit" ,java-junit)))))
9481
9482(define-public java-aqute-bndlib
9483 (package
9484 (inherit java-aqute-bnd-annotation)
9485 (name "java-aqute-bndlib")
9486 (arguments
9487 `(#:jar-name "java-bndlib.jar"
9488 #:source-dir "biz.aQute.bndlib/src"
9489 #:tests? #f)); no tests
9490 (inputs
9491 `(("slf4j" ,java-slf4j-api)
9492 ("osgi-annot" ,java-osgi-annotation)
9493 ("java-aqute-libg" ,java-aqute-libg)
9494 ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation)
9495 ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations)
9496 ("java-osgi-service-repository" ,java-osgi-service-repository)
9497 ("java-osgi-service-log" ,java-osgi-service-log)
9498 ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations)
9499 ("java-osgi-namespace-contract" ,java-osgi-namespace-contract)
9500 ("java-osgi-namespace-extender" ,java-osgi-namespace-extender)
9501 ("java-osgi-namespace-service" ,java-osgi-namespace-service)
9502 ("promise" ,java-osgi-util-promise)
9503 ("osgi" ,java-osgi-core)))))
9504
9505(define-public java-ops4j-pax-tinybundles
9506 (package
9507 (name "java-ops4j-pax-tinybundles")
9508 (version "2.1.1")
9509 (source (origin
9510 (method url-fetch)
9511 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/"
9512 "archive/tinybundles-" version ".tar.gz"))
9513 (sha256
9514 (base32
9515 "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871"))))
9516 (arguments
9517 `(#:jar-name "java-ops4j-pax-tinybundles.jar"
9518 #:source-dir "src/main/java"
9519 #:test-exclude
9520 ;; Abstract base classes for other tests
9521 (list "**/BndTest.java" "**/CoreTest.java")
9522 #:phases
9523 (modify-phases %standard-phases
9524 (add-before 'check 'fix-version
9525 (lambda _
9526 ;; This test has a reference to an old version of bndlib we are not
9527 ;; packaging. It uses the version referenced in pom.xml. We replace
9528 ;; it with our own version.
9529 (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
9530 (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*")
9531 ,(package-version java-aqute-bndlib)))
9532 #t)))))
9533 (inputs
9534 `(("lang" ,java-ops4j-base-lang)
9535 ("io" ,java-ops4j-base-io)
9536 ("store" ,java-ops4j-base-store)
9537 ("slf4j" ,java-slf4j-api)
9538 ("libg" ,java-aqute-libg)
9539 ("bndlib" ,java-aqute-bndlib)))
9540 (native-inputs
9541 `(("junit" ,java-junit)
9542 ("hamcrest" ,java-hamcrest-core)
9543 ("log4j" ,java-log4j-api)
9544 ("bndannotation" ,java-aqute-bnd-annotation)
9545 ("framework" ,java-osgi-framework)))
9546 (build-system ant-build-system)
9547 (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles")
9548 (synopsis "Java APIs to create OSGi related artifacts")
9549 (description "Tinybundles is all about creating OSGi related artifacts like
9550Bundles, Fragments and Deployment Packages with Java Api. It is very convenient
9551to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the
9552other hand, this library can be a foundation of real end user tools that need
9553to create those artifacts.")
9554 (license license:asl2.0)))
9555
9556(define-public java-ops4j-pax-exam-core
9557 (package
9558 (name "java-ops4j-pax-exam-core")
9559 (version "4.11.0")
9560 (source (origin
9561 (method url-fetch)
9562 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/"
9563 "archive/exam-reactor-" version ".tar.gz"))
9564 (sha256
9565 (base32
9566 "08mzw8nkah3rj3vznlplnawspxhp61zgvb44ifqa1rni1cvbms2g"))))
9567 (arguments
9568 `(#:jar-name "java-ops4j-pax-exam-core.jar"
9569 #:source-dir "core/pax-exam/src/main/java"
9570 #:test-dir "core/pax-exam/src/test"))
9571 (inputs
9572 `(("slf4j" ,java-slf4j-api)
9573 ("lang" ,java-ops4j-base-lang)
9574 ("io" ,java-ops4j-base-io)
9575 ("util-property" ,java-ops4j-base-util-property)
9576 ("util-store" ,java-ops4j-base-store)
9577 ("java-osgi-core" ,java-osgi-core)))
9578 (native-inputs
9579 `(("junit" ,java-junit)
9580 ("hamcrest" ,java-hamcrest-core)))
9581 (build-system ant-build-system)
9582 (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview")
9583 (synopsis "In-Container Testing for OSGi, Java EE and CDI")
9584 (description "Pax Exam creates OSGi bundles for testing purposes. It lets
9585the user take control of the OSGi framework, the test framework (e.g. JUnit) and
9586the system under test at the same time.")
9587 (license license:asl2.0)))
9588
9589(define-public java-ops4j-pax-exam-core-spi
9590 (package
9591 (inherit java-ops4j-pax-exam-core)
9592 (name "java-ops4j-pax-exam-core-spi")
9593 (arguments
9594 `(#:jar-name "java-ops4j-pax-exam-spi.jar"
9595 #:source-dir "src/main/java"
9596 #:test-exclude
9597 (list
9598 ;; Abstract base class, not a test
9599 "**/BaseStagedReactorTest.java"
9600 ;; Depends on org.mortbay.jetty.testwars:test-war-dump
9601 "**/WarBuilderTest.java")
9602 #:phases
9603 (modify-phases %standard-phases
9604 (add-before 'configure 'chdir
9605 (lambda _
9606 ;; Tests assume we are in this directory
9607 (chdir "core/pax-exam-spi")
9608 #t))
9609 (add-before 'check 'fix-tests
9610 (lambda _
9611 ;; One test checks that this file is present.
9612 (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi")
9613 (with-output-to-file
9614 "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties"
9615 (lambda _
9616 (display
9617 (string-append "artifactId = pax-exam-spi\n"
9618 "version = " ,(package-version java-ops4j-pax-exam-core-spi)))))
9619 ;; Maven puts compilation results in the target directory, while we
9620 ;; put them in the build directory.
9621 (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java"
9622 "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java"
9623 "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java")
9624 (("target") "build"))
9625 ;; One test is expected to fail, but it doesn't throw the expected exception
9626 (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java"
9627 (("AssertionError") "IllegalArgumentException"))
9628 #t)))))
9629 (inputs
9630 `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core)
9631 ("lang" ,java-ops4j-base-lang)
9632 ("monitors" ,java-ops4j-base-monitors)
9633 ("store" ,java-ops4j-base-store)
9634 ("io" ,java-ops4j-base-io)
9635 ("spi" ,java-ops4j-base-spi)
9636 ("osgi" ,java-osgi-core)
9637 ("slf4j" ,java-slf4j-api)
9638 ("tinybundles" ,java-ops4j-pax-tinybundles)))
9639 (native-inputs
9640 `(("mockito" ,java-mockito-1)
9641 ("junit" ,java-junit)
9642 ("hamcrest" ,java-hamcrest-core)
9643 ("cglib" ,java-cglib)
9644 ("objenesis" ,java-objenesis)
9645 ("asm" ,java-asm)))))
9646
9647(define-public java-ops4j-pax-exam-core-junit
9648 (package
9649 (inherit java-ops4j-pax-exam-core)
9650 (name "java-ops4j-pax-exam-core-junit")
9651 (arguments
9652 `(#:jar-name "ops4j-pax-exam-core-junit.jar"
9653 #:source-dir "drivers/pax-exam-junit4/src/main/java"
9654 #:tests? #f)); no tests
9655 (inputs
9656 `(("junit" ,java-junit)
9657 ("slf4j" ,java-slf4j-api)
9658 ("core" ,java-ops4j-pax-exam-core)
9659 ("spi" ,java-ops4j-pax-exam-core-spi)))
9660 (native-inputs '())))
9661
9662(define-public java-fasterxml-jackson-annotations
9663 (package
9664 (name "java-fasterxml-jackson-annotations")
9665 (version "2.9.4")
9666 (source (origin
9667 (method url-fetch)
9668 (uri (string-append "https://github.com/FasterXML/"
9669 "jackson-annotations/archive/"
9670 "jackson-annotations-" version ".tar.gz"))
9671 (sha256
9672 (base32
9673 "0mr95xd0da6a4g95zvrl1ryk5n5zv2rc696w3xnsr5hxk2gicfc4"))))
9674 (build-system ant-build-system)
9675 (arguments
9676 `(#:jar-name "jackson-annotations.jar"
9677 #:source-dir "src/main/java"
9678 #:test-dir "src/test"))
9679 (native-inputs
9680 `(("junit" ,java-junit)))
9681 (home-page "https://github.com/FasterXML/jackson-annotations")
9682 (synopsis "General purpose annotations for the Jackson Data Processor")
9683 (description "This package contains general purpose annotations for the
9684Jackson Data Processor, used on value and handler types. The only annotations
9685not included are ones that require dependency to the Databind package.")
9686 (license license:asl2.0)))
9687
9688(define-public java-fasterxml-jackson-core
9689 (package
9690 (name "java-fasterxml-jackson-core")
9691 (version "2.9.4")
9692 (source (origin
9693 (method url-fetch)
9694 (uri (string-append "https://github.com/FasterXML/"
9695 "jackson-core/archive/"
9696 "jackson-core-" version ".tar.gz"))
9697 (sha256
9698 (base32
9699 "159hsnk17jr1gyzkf01cxvsn45srnk37g949r7364qlsr527gjgd"))))
9700 (build-system ant-build-system)
9701 (arguments
9702 `(#:jar-name "jackson-core.jar"
9703 #:source-dir "src/main/java"
9704 #:test-dir "src/test"
9705 #:test-exclude
9706 (list
9707 ;; Expected failure. pom.xml excludes these
9708 "**/failing/**"
9709 ;; Base classes that have no constructor for junit
9710 "**/BaseTest.java"
9711 "**/ConcurrencyReadTest.java"
9712 "**/ManualCharAccessTest.java"
9713 "**/ManualCharAccessTest.java"
9714 "**/TrailingCommasTest.java"
9715 "**/AsyncMissingValuesInObjectTest.java"
9716 "**/AsyncMissingValuesInArrayTest.java")
9717 #:phases
9718 (modify-phases %standard-phases
9719 (add-before 'configure 'generate-PackageVersion.java
9720 (lambda _
9721 (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java")
9722 (in (string-append out ".in")))
9723 (copy-file in out)
9724 (substitute* out
9725 (("@package@") "com.fasterxml.jackson.core.json")
9726 (("@projectversion@") ,version)
9727 (("@projectgroupid@") "com.fasterxml.jackson.core")
9728 (("@projectartifactid@") "jackson-core")))
9729 #t))
9730 (add-before 'build 'copy-resources
9731 (lambda _
9732 (copy-recursively "src/main/resources"
9733 "build/classes")
9734 #t))
9735 (add-before 'check 'copy-test-resources
9736 (lambda _
9737 (copy-recursively "src/test/resources"
9738 "build/test-classes")
9739 #t)))))
9740 (native-inputs
9741 `(("junit" ,java-junit)
9742 ("hamcrest" ,java-hamcrest-core)))
9743 (home-page "https://github.com/FasterXML/jackson-core")
9744 (synopsis "Low-level streaming parser and generator abstractions")
9745 (description "This package contains core low-level incremental
9746(streaming) parser and generator abstractions used by the Jackson Data
9747Processor. It also includes the default implementation of handler types
9748(parser, generator) that handle JSON format.")
9749 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9750
9751(define-public java-fasterxml-jackson-databind
9752 (package
9753 (name "java-fasterxml-jackson-databind")
9754 (version "2.9.4")
9755 (source (origin
9756 (method url-fetch)
9757 (uri (string-append "https://github.com/FasterXML/"
9758 "jackson-databind/archive/"
9759 "jackson-databind-" version ".tar.gz"))
9760 (sha256
9761 (base32
9762 "1zd2cw4z6kdkbx8za96xh9pyicv2a2l7y0rkcx2fqd8hv6d47s08"))))
9763 (build-system ant-build-system)
9764 (arguments
9765 `(#:jar-name "jackson-databind.jar"
9766 #:source-dir "src/main/java"
9767 #:tests? #f; requires javax.measures for which I can't find a free implementation
9768 #:phases
9769 (modify-phases %standard-phases
9770 (add-before 'configure 'generate-PackageVersion.java
9771 (lambda _
9772 (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java")
9773 (in (string-append out ".in")))
9774 (copy-file in out)
9775 (substitute* out
9776 (("@package@") "com.fasterxml.jackson.databind.cfg")
9777 (("@projectversion@") ,version)
9778 (("@projectgroupid@") "com.fasterxml.jackson.databind")
9779 (("@projectartifactid@") "jackson-databind")))
9780 #t))
9781 (add-before 'build 'copy-resources
9782 (lambda _
9783 (copy-recursively "src/main/resources" "build/classes")
9784 #t)))))
9785 (inputs
9786 (list java-fasterxml-jackson-annotations java-fasterxml-jackson-core))
9787 (home-page "https://github.com/FasterXML/jackson-databind")
9788 (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor")
9789 (description "This package contains the general-purpose data-binding
9790functionality and tree-model for Jackson Data Processor. It builds on core
9791streaming parser/generator package, and uses Jackson Annotations for
9792configuration.")
9793 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9794
9795(define-public java-fasterxml-jackson-modules-base-jaxb
9796 (package
9797 (name "java-fasterxml-jackson-modules-base-jaxb")
9798 (version "2.9.4")
9799 (source (origin
9800 (method url-fetch)
9801 (uri (string-append "https://github.com/FasterXML/"
9802 "jackson-modules-base/archive/"
9803 "jackson-modules-base-" version ".tar.gz"))
9804 (sha256
9805 (base32
9806 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
9807 (build-system ant-build-system)
9808 (arguments
9809 `(#:jar-name "jackson-modules-base-jaxb.jar"
9810 #:source-dir "jaxb/src/main/java"
9811 #:test-dir "jaxb/src/test"
9812 #:test-exclude
9813 ;; Base class for tests
9814 (list "**/BaseJaxbTest.java")
9815 #:phases
9816 (modify-phases %standard-phases
9817 (add-before 'configure 'generate-PackageVersion.java
9818 (lambda _
9819 (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/"
9820 "jackson/module/jaxb/PackageVersion.java"))
9821 (in (string-append out ".in")))
9822 (copy-file in out)
9823 (substitute* out
9824 (("@package@") "com.fasterxml.jackson.module.jaxb")
9825 (("@projectversion@") ,version)
9826 (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb")
9827 (("@projectartifactid@") "jackson-module-jaxb")))
9828 #t))
9829 (add-before 'build 'copy-resources
9830 (lambda _
9831 (copy-recursively "jaxb/src/main/resources" "build/classes")
9832 #t)))))
9833 (inputs
9834 (list java-fasterxml-jackson-annotations java-fasterxml-jackson-core
9835 java-fasterxml-jackson-databind))
9836 (native-inputs
9837 (list java-junit))
9838 (home-page "https://github.com/FasterXML/jackson-modules-base")
9839 (synopsis "Jaxb annotations jackson module")
9840 (description "This package is the jaxb annotations module for jackson.")
9841 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9842
9843(define-public java-fasterxml-jackson-modules-base-mrbean
9844 (package
9845 (name "java-fasterxml-jackson-modules-base-mrbean")
9846 (version "2.9.4")
9847 (source (origin
9848 (method url-fetch)
9849 (uri (string-append "https://github.com/FasterXML/"
9850 "jackson-modules-base/archive/"
9851 "jackson-modules-base-" version ".tar.gz"))
9852 (sha256
9853 (base32
9854 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
9855 (build-system ant-build-system)
9856 (arguments
9857 `(#:jar-name "jackson-modules-base-mrbean.jar"
9858 #:source-dir "mrbean/src/main/java"
9859 #:test-dir "mrbean/src/test"
9860 #:test-exclude
9861 ;; Base class for tests
9862 (list "**/BaseTest.java")
9863 #:phases
9864 (modify-phases %standard-phases
9865 (add-before 'configure 'generate-PackageVersion.java
9866 (lambda _
9867 (let* ((out (string-append "mrbean/src/main/java/com/fasterxml/"
9868 "jackson/module/mrbean/PackageVersion.java"))
9869 (in (string-append out ".in")))
9870 (copy-file in out)
9871 (substitute* out
9872 (("@package@") "com.fasterxml.jackson.module.mrbean")
9873 (("@projectversion@") ,version)
9874 (("@projectgroupid@") "com.fasterxml.jackson.module.mrbean")
9875 (("@projectartifactid@") "jackson-module-mrbean")))
9876 #t)))))
9877 (inputs
9878 (list java-asm java-fasterxml-jackson-annotations
9879 java-fasterxml-jackson-core java-fasterxml-jackson-databind))
9880 (native-inputs
9881 (list java-junit))
9882 (home-page "https://github.com/FasterXML/jackson-modules-base")
9883 (synopsis "POJO type materialization for Java")
9884 (description "This package implements POJO type materialization.
9885Databinders can construct implementation classes for Java interfaces as part
9886of deserialization.")
9887 (license license:asl2.0)))
9888
9889(define-public java-snakeyaml
9890 (package
9891 (name "java-snakeyaml")
9892 (version "1.18")
9893 (source (origin
9894 (method url-fetch)
9895 (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
9896 version ".tar.gz"))
9897 (file-name (string-append name "-" version ".tar.gz"))
9898 (sha256
9899 (base32
9900 "0474cqcv46zgv9bhms2vgawakq1vyj0hp3h3f1bfys46msia90bh"))))
9901 (build-system ant-build-system)
9902 (arguments
9903 `(#:jar-name "java-snakeyaml.jar"
9904 #:source-dir "src/main/java"
9905 ;; Tests require velocity, a cyclic dependency, and
9906 ;; java-spring-framework-context which is not packaged.
9907 #:tests? #f))
9908 (home-page "https://bitbucket.org/asomov/snakeyaml")
9909 (synopsis "YAML processor")
9910 (description "SnakeYAML is a YAML processor for the Java Virtual Machine.")
9911 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9912
9913(define-public java-fasterxml-jackson-dataformat-yaml
9914 (package
9915 (name "java-fasterxml-jackson-dataformat-yaml")
9916 (version "2.9.4")
9917 (source (origin
9918 (method url-fetch)
9919 (uri (string-append "https://github.com/FasterXML/"
9920 "jackson-dataformats-text/archive/"
9921 "jackson-dataformats-text-" version ".tar.gz"))
9922 (sha256
9923 (base32
9924 "1hikl06khaxbg439avf442qifcadap8w0lx13f0nnhp2vh3dkbz7"))))
9925 (build-system ant-build-system)
9926 (arguments
9927 `(#:jar-name "jackson-dataformat-yaml.jar"
9928 #:source-dir "yaml/src/main/java"
9929 #:test-dir "yaml/src/test"
9930 #:test-exclude (list "**/failing/**.java")
9931 #:phases
9932 (modify-phases %standard-phases
9933 (add-before 'configure 'generate-PackageVersion.java
9934 (lambda _
9935 (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java")
9936 (in (string-append out ".in")))
9937 (copy-file in out)
9938 (substitute* out
9939 (("@package@") "com.fasterxml.jackson.dataformat.yaml")
9940 (("@projectversion@") ,version)
9941 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml")
9942 (("@projectartifactid@") "jackson-dataformat-yaml")))
9943 #t)))))
9944 (inputs
9945 (list java-fasterxml-jackson-annotations java-fasterxml-jackson-core
9946 java-fasterxml-jackson-databind java-snakeyaml))
9947 (native-inputs
9948 `(("junit" ,java-junit)
9949 ("hamcrest" ,java-hamcrest-core)
9950 ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi)
9951 ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit)
9952 ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core)))
9953 (home-page "https://github.com/FasterXML/jackson-dataformats-text")
9954 (synopsis "Yaml backend for Jackson")
9955 (description "Dataformat backends are used to support format alternatives
9956to JSON, supported by default. This is done by sub-classing Jackson core
9957abstractions.")
9958 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9959
9960(define-public java-stax2-api
9961 (package
9962 (name "java-stax2-api")
9963 (version "4.0.0")
9964 (source (origin
9965 (method url-fetch)
9966 (uri (string-append "https://github.com/FasterXML/stax2-api/archive/"
9967 "stax2-api-" version ".tar.gz"))
9968 (sha256
9969 (base32
9970 "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq"))))
9971 (build-system ant-build-system)
9972 (arguments
9973 `(#:jar-name "java-stax2-api.jar"
9974 #:source-dir "src/main/java"
9975 #:tests? #f)); no tests
9976 (home-page "https://github.com/FasterXML/stax2-api")
9977 (synopsis "Stax2 API")
9978 (description "Stax2 API is an extension to basic Stax 1.0 API that adds
9979significant new functionalities, such as full-featured bi-direction validation
9980interface and high-performance Typed Access API.")
9981 (license license:bsd-2)))
9982
9983(define-public java-woodstox-core
9984 (package
9985 (name "java-woodstox-core")
9986 (version "5.0.3")
9987 (source (origin
9988 (method git-fetch)
9989 (uri (git-reference
9990 (url "https://github.com/FasterXML/woodstox")
9991 (commit (string-append "woodstox-core-" version))))
9992 (file-name (git-file-name name version))
9993 (sha256
9994 (base32
9995 "0bfylk24a967hwxprxqbg6cdvm6n4ldcarp54yg980viwvjiglyp"))))
9996 (build-system ant-build-system)
9997 (arguments
9998 `(#:jar-name "woodstox.jar"
9999 #:test-exclude
10000 (list "**/Base*.java" "failing/**")
10001 #:phases
10002 (modify-phases %standard-phases
10003 (add-before 'build 'remove-msv-dep
10004 (lambda _
10005 ;; we don't need osgi, and it depends on msv
10006 (delete-file-recursively "src/main/java/com/ctc/wstx/osgi")
10007 ;; msv's latest release is from 2011 and we don't need it
10008 (delete-file-recursively "src/main/java/com/ctc/wstx/msv")
10009 (delete-file-recursively "src/test/java/wstxtest/osgi")
10010 (delete-file-recursively "src/test/java/wstxtest/msv")
10011 #t))
10012 (add-before 'build 'copy-resources
10013 (lambda _
10014 (copy-recursively "src/main/resources" "build/classes")
10015 #t)))))
10016 (inputs
10017 `(("stax2" ,java-stax2-api)))
10018 (native-inputs
10019 `(("junit" ,java-junit)))
10020 (home-page "https://github.com/FasterXML/woodstox")
10021 (synopsis "Stax XML API implementation")
10022 (description "Woodstox is a stax XML API implementation.")
10023 (license license:asl2.0)))
10024
10025(define-public java-fasterxml-jackson-dataformat-xml
10026 (package
10027 (name "java-fasterxml-jackson-dataformat-xml")
10028 (version "2.9.4")
10029 (source (origin
10030 (method git-fetch)
10031 (uri (git-reference
10032 (url "https://github.com/FasterXML/jackson-dataformat-xml")
10033 (commit (string-append "jackson-dataformat-xml-" version))))
10034 (file-name (git-file-name name version))
10035 (sha256
10036 (base32
10037 "0s1wl65mbs57c2hz2v8rnh8i04y5lpyyvnjz562j5j6b83vwwpfx"))))
10038 (build-system ant-build-system)
10039 (arguments
10040 `(#:jar-name "jackson-dataformat-xml.jar"
10041 #:source-dir "src/main/java"
10042 #:test-exclude
10043 (list "**/failing/**")
10044 #:phases
10045 (modify-phases %standard-phases
10046 (add-before 'configure 'generate-PackageVersion.java
10047 (lambda _
10048 (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java")
10049 (in (string-append out ".in")))
10050 (copy-file in out)
10051 (newline)
10052 (substitute* out
10053 (("@package@") "com.fasterxml.jackson.dataformat.xml")
10054 (("@projectversion@") ,version)
10055 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml")
10056 (("@projectartifactid@") "jackson-dataformat-xml")))
10057 #t))
10058 (add-before 'build 'copy-resources
10059 (lambda _
10060 (copy-recursively "src/main/resources" "build/classes")
10061 #t)))))
10062 (inputs
10063 `(("jackson-annotations" ,java-fasterxml-jackson-annotations)
10064 ("jackson-core" ,java-fasterxml-jackson-core)
10065 ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb)
10066 ("jackson-databind" ,java-fasterxml-jackson-databind)
10067 ("stax2-api" ,java-stax2-api)
10068 ("woodstox" ,java-woodstox-core)))
10069 (native-inputs
10070 `(("junit" ,java-junit)
10071 ("hamcrest" ,java-hamcrest-core)))
10072 (home-page "https://github.com/FasterXML/jackson-dataformat-xml")
10073 (synopsis "Read and write XML")
10074 (description "This package contains Jackson extension component for reading
10075and writing XML encoded data.
10076
10077Further, the goal is to emulate how JAXB data-binding works with \"Code-first\"
10078approach (that is, no support is added for \"Schema-first\" approach). Support
10079for JAXB annotations is provided by JAXB annotation module; this module
10080provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator},
10081@code{JsonFactory}) as well as small number of higher level overrides needed to
10082make data-binding work.")
10083 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
10084
10085(define-public java-hdrhistogram
10086 (package
10087 (name "java-hdrhistogram")
10088 (version "2.1.9")
10089 (source (origin
10090 (method git-fetch)
10091 (uri (git-reference
10092 (url "https://github.com/HdrHistogram/HdrHistogram")
10093 (commit (string-append "HdrHistogram-" version))))
10094 (file-name (git-file-name name version))
10095 (sha256
10096 (base32
10097 "1cw8aa1vk258k42xs6wpy72m4gbai540jq032qsa7c5586iawx2d"))))
10098 (build-system ant-build-system)
10099 (arguments
10100 `(#:jar-name "java-hdrhistogram.jar"
10101 #:source-dir "src/main/java"
10102 #:phases
10103 (modify-phases %standard-phases
10104 (add-after 'unpack 'make-files-writable
10105 (lambda _
10106 (for-each make-file-writable (find-files "."))
10107 #t))
10108 (add-before 'configure 'set-version
10109 (lambda _
10110 (let* ((version-java "src/main/java/org/HdrHistogram/Version.java")
10111 (template (string-append version-java ".template")))
10112 (copy-file template version-java)
10113 (substitute* version-java
10114 (("\\$VERSION\\$") ,version)
10115 (("\\$BUILD_TIME\\$") "0"))
10116 #t))))))
10117 (native-inputs
10118 `(("junit" ,java-junit)
10119 ("hamcrest" ,java-hamcrest-core)))
10120 (home-page "https://hdrhistogram.github.io/HdrHistogram")
10121 (synopsis "High dynamic range histogram")
10122 (description "Hdrhistogram creates histograms that support
10123recording and analyzing sampled data value counts across a configurable integer
10124value range with configurable value precision within the range. Value precision
10125is expressed as the number of significant digits in the value recording, and
10126provides control over value quantization behavior across the value range and
10127the subsequent value resolution at any given level.")
10128 (license license:public-domain)))
10129
10130(define-public java-cofoja
10131 (package
10132 (name "java-cofoja")
10133 (version "1.3")
10134 (source (origin
10135 (method git-fetch)
10136 (uri (git-reference
10137 (url "https://github.com/nhatminhle/cofoja")
10138 (commit (string-append "v" version))))
10139 (file-name (string-append "java-cofoja-" version "-checkout"))
10140 (sha256
10141 (base32
10142 "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w"))))
10143 (build-system ant-build-system)
10144 (arguments
10145 `(#:build-target "dist"
10146 #:test-target "test"
10147 #:jdk ,icedtea-8
10148 #:make-flags
10149 (list "-Ddist.dir=dist")
10150 #:modules ((guix build ant-build-system)
10151 (guix build java-utils)
10152 (guix build utils)
10153 (srfi srfi-1)
10154 (ice-9 match))
10155 #:phases
10156 (modify-phases %standard-phases
10157 ;; The bulid system ignores the class path the ant-build-system sets
10158 ;; up and instead expects to find all dependencies in the "lib"
10159 ;; directory.
10160 (add-after 'unpack 'create-libdir
10161 (lambda* (#:key inputs #:allow-other-keys)
10162 (mkdir-p "lib")
10163 (for-each
10164 (lambda (file)
10165 (let ((target (string-append "lib/" (basename file))))
10166 (unless (file-exists? target)
10167 (symlink file target))))
10168 (append-map (match-lambda
10169 ((label . dir)
10170 (find-files dir "\\.jar$")))
10171 inputs))
10172 #t))
10173 (replace 'install (install-jars "dist")))))
10174 (inputs
10175 (list java-asm))
10176 (native-inputs
10177 (list java-junit))
10178 (home-page "https://github.com/nhatminhle/cofoja")
10179 (synopsis "Contracts for Java")
10180 (description "Contracts for Java, or Cofoja for short, is a contract
10181programming framework and test tool for Java, which uses annotation processing
10182and bytecode instrumentation to provide run-time checking. (In particular,
10183this is not a static analysis tool.)")
10184 (license license:lgpl3+)))
10185
10186(define-public java-aopalliance
10187 (package
10188 (name "java-aopalliance")
10189 (version "1.0")
10190 (source (origin
10191 (method git-fetch)
10192 ;; Note: this git repository is not official, but contains the
10193 ;; source code that is in the CVS repository. Downloading the
10194 ;; tarball from sourceforge is undeterministic, and the cvs download
10195 ;; fails.
10196 (uri (git-reference
10197 (url "https://github.com/hoverruan/aopalliance")
10198 (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0")))
10199 (file-name (string-append name "-" version))
10200 (sha256
10201 (base32
10202 "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr"))))
10203 (build-system ant-build-system)
10204 (arguments
10205 `(#:jar-name "java-aopalliance.jar"
10206 #:jdk ,icedtea-8
10207 #:tests? #f; no tests
10208 #:source-dir "aopalliance/src/main"
10209 #:phases
10210 (modify-phases %standard-phases
10211 (add-before 'install 'create-pom
10212 (generate-pom.xml "pom.xml" "aopalliance" "aopalliance" ,version))
10213 (replace 'install
10214 (install-from-pom "pom.xml")))))
10215 (home-page "https://aopalliance.sourceforge.net")
10216 (synopsis "Aspect-Oriented Programming")
10217 (description "The AOP Alliance project is a joint project between several
10218software engineering people who are interested in Aspect-Oriented Programming
10219(AOP) and Java.")
10220 (license license:public-domain)))
10221
10222(define-public java-javax-inject
10223 (package
10224 (name "java-javax-inject")
10225 (version "1")
10226 (source (origin
10227 (method git-fetch)
10228 (uri (git-reference
10229 (url "https://github.com/javax-inject/javax-inject")
10230 (commit version)))
10231 (file-name (git-file-name name version))
10232 (sha256
10233 (base32
10234 "1rspl0nkvk1jif6nccikw93xic6ljj2b6kpy2mffwi2mnvc13j7x"))))
10235 (build-system ant-build-system)
10236 (arguments
10237 `(#:jar-name "java-javax-inject.jar"
10238 #:tests? #f; no tests
10239 #:phases
10240 (modify-phases %standard-phases
10241 (replace 'install
10242 (install-from-pom "pom.xml")))))
10243 (home-page "https://github.com/javax-inject/javax-inject")
10244 (synopsis "JSR-330: Dependency Injection for Java")
10245 (description "This package specifies a means for obtaining objects in such
10246a way as to maximize reusability, testability and maintainability compared to
10247traditional approaches such as constructors, factories, and service locators
10248(e.g., JNDI). This process, known as dependency injection, is beneficial to
10249most nontrivial applications.
10250
10251Many types depend on other types. For example, a @var{Stopwatch} might depend
10252on a @var{TimeSource}. The types on which a type depends are known as its
10253dependencies. The process of finding an instance of a dependency to use at run
10254time is known as resolving the dependency. If no such instance can be found,
10255the dependency is said to be unsatisfied, and the application is broken.")
10256 (license license:asl2.0)))
10257
10258(define-public java-guice
10259 (package
10260 (name "java-guice")
10261 (version "4.1")
10262 (source (origin
10263 (method git-fetch)
10264 (uri (git-reference
10265 (url "https://github.com/google/guice")
10266 (commit version)))
10267 (file-name (git-file-name name version))
10268 (modules '((guix build utils)))
10269 (snippet
10270 `(begin
10271 (for-each delete-file (find-files "." ".*.jar")) #t))
10272 (sha256
10273 (base32
10274 "18im5hdfl4q1b9chww2s1ii60sn3ydyyar32a2sf2p2g8zlbdswq"))))
10275 (build-system ant-build-system)
10276 (arguments
10277 `(#:jar-name "java-guice.jar"
10278 #:jdk ,icedtea-8
10279 #:tests? #f; FIXME: tests are not in a java sub directory
10280 #:source-dir "core/src"
10281 #:phases
10282 (modify-phases %standard-phases
10283 (add-after 'unpack 'make-files-writable
10284 (lambda _
10285 (for-each make-file-writable (find-files "."))
10286 #t))
10287 (replace 'install
10288 (install-from-pom "core/pom.xml")))))
10289 (propagated-inputs
10290 (list java-aopalliance
10291 java-asm
10292 java-cglib
10293 java-guava
10294 java-javax-inject
10295 java-guice-parent-pom))
10296 (home-page "https://github.com/google/guice")
10297 (synopsis "Lightweight dependency injection framework")
10298 (description "Guice is a lightweight dependency injection framework for
10299Java 6 and above.")
10300 (license license:asl2.0)))
10301
10302(define-public java-guice-servlet
10303 (package
10304 (inherit java-guice)
10305 (name "java-guice-servlet")
10306 (arguments
10307 `(#:jar-name "guice-servlet.jar"
10308 #:source-dir "extensions/servlet/src/"
10309 #:jdk ,icedtea-8
10310 #:tests? #f ; FIXME: not in a java subdir
10311 #:phases
10312 (modify-phases %standard-phases
10313 (add-after 'unpack 'make-files-writable
10314 (lambda _
10315 (for-each make-file-writable (find-files "."))
10316 #t)))))
10317 (inputs
10318 `(("guice" ,java-guice)
10319 ("servlet" ,java-classpathx-servletapi)
10320 ,@(package-inputs java-guice)))))
10321
10322(define java-guice-parent-pom
10323 (package
10324 (inherit java-guice)
10325 (name "java-guice-parent-pom")
10326 (arguments
10327 `(#:tests? #f
10328 #:phases
10329 (modify-phases %standard-phases
10330 (delete 'configure)
10331 (delete 'build)
10332 (add-after 'install 'install-extensions
10333 (install-pom-file "extensions/pom.xml"))
10334 (replace 'install
10335 (install-pom-file "pom.xml")))))
10336 (propagated-inputs
10337 `(("java-google-parent-pom" ,java-google-parent-pom-5)))))
10338
10339(define java-google-parent-pom-5
10340 (package
10341 (name "java-google-parent-pom")
10342 (version "5")
10343 (source (origin
10344 (method git-fetch)
10345 (uri (git-reference
10346 (url "https://github.com/google/google-maven-parents")
10347 (commit (string-append "google-" version))))
10348 (file-name (git-file-name name version))
10349 (sha256
10350 (base32
10351 "0zb7hx24p8k8rfdvix2vsbfqn73jhrycdndvhf8j5gbii9wbqibv"))))
10352 (build-system ant-build-system)
10353 (arguments
10354 `(#:tests? #f
10355 #:phases
10356 (modify-phases %standard-phases
10357 (delete 'configure)
10358 (delete 'build)
10359 (replace 'install
10360 (install-pom-file "pom.xml")))))
10361 (home-page "https://github.com/google/google-maven-parents")
10362 (synopsis "Google parent pom")
10363 (description "This package contains the Maven parent POM for other Google
10364Java projects.")
10365 (license license:asl2.0)))
10366
10367(define-public java-assertj
10368 (package
10369 (name "java-assertj")
10370 (version "3.8.0")
10371 (source (origin
10372 (method git-fetch)
10373 (uri (git-reference
10374 (url "https://github.com/joel-costigliola/assertj-core")
10375 (commit (string-append "assertj-core-" version))))
10376 (file-name (git-file-name name version))
10377 (sha256
10378 (base32
10379 "1k35cg2in7pzk4pbdjryr0pll5lgk1r6ngrn0j8cdlgi7w8zh2d1"))))
10380 (build-system ant-build-system)
10381 (arguments
10382 `(#:jar-name "java-assertj.jar"
10383 #:jdk ,icedtea-8
10384 #:source-dir "src/main/java"
10385 #:tests? #f)); depends on tng-junit which depends on assertj
10386 (inputs
10387 `(("cglib" ,java-cglib)
10388 ("junit" ,java-junit)
10389 ("hamcrest" ,java-hamcrest-core)))
10390 (native-inputs
10391 `(("mockito" ,java-mockito-1)))
10392 (home-page "https://joel-costigliola.github.io/assertj/index.html")
10393 (synopsis "Fluent assertions for java")
10394 (description "AssertJ core is a Java library that provides a fluent
10395interface for writing assertions. Its main goal is to improve test code
10396readability and make maintenance of tests easier.")
10397 (license license:asl2.0)))
10398
10399(define-public java-jboss-javassist
10400 (package
10401 (name "java-jboss-javassist")
10402 (version "3.21.0")
10403 (source (origin
10404 (method git-fetch)
10405 (uri (git-reference
10406 (url "https://github.com/jboss-javassist/javassist")
10407 (commit
10408 (string-append "rel_"
10409 (string-map
10410 (lambda (x) (if (eq? x #\.) #\_ x)) version)
10411 "_ga"))))
10412 (file-name (git-file-name name version))
10413 (sha256
10414 (base32
10415 "0h3zlcyqiaq01fspm69h7vki67raw305w89p4ha8vlhpzw02qifm"))
10416 (modules '((guix build utils)))
10417 (snippet
10418 '(begin
10419 (delete-file "javassist.jar")))))
10420 (build-system ant-build-system)
10421 (arguments
10422 `(#:jar-name "java-jboss-javassist.jar"
10423 #:jdk ,icedtea-8
10424 #:source-dir "src/main"
10425 #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3
10426 #:phases
10427 (modify-phases %standard-phases
10428 (add-after 'unpack 'make-files-writable
10429 (lambda _
10430 (for-each make-file-writable (find-files "."))
10431 #t)))))
10432 (native-inputs
10433 `(("junit" ,java-junit)))
10434 (home-page "https://github.com/jboss-javassist/javassist")
10435 (synopsis "Java bytecode engineering toolkit")
10436 (description "Javassist (JAVA programming ASSISTant) makes Java bytecode
10437manipulation simple. It is a class library for editing bytecodes in Java; it
10438enables Java programs to define a new class at runtime and to modify a class
10439file when the JVM loads it.")
10440 (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl.
10441
10442(define-public java-jcommander
10443 (package
10444 (name "java-jcommander")
10445 (version "1.71")
10446 (source (origin
10447 (method git-fetch)
10448 (uri (git-reference
10449 (url "https://github.com/cbeust/jcommander")
10450 (commit version)))
10451 (file-name (git-file-name name version))
10452 (sha256
10453 (base32
10454 "12vcpc19sd7jhvjgp7xz1qjanfix162xb3x2q5zah93rjklj1h57"))))
10455 (build-system ant-build-system)
10456 (arguments
10457 `(#:jar-name "java-jcommander.jar"
10458 #:jdk ,icedtea-8
10459 #:tests? #f; requires testng which depends on jcommander
10460 #:source-dir "src/main/java"))
10461 (home-page "https://jcommander.org")
10462 (synopsis "Command line parameters parser")
10463 (description "JCommander is a very small Java framework that makes it
10464trivial to parse command line parameters. Parameters are declared with
10465annotations.")
10466 (license license:asl2.0)))
10467
10468(define-public java-bsh
10469 (package
10470 (name "java-bsh")
10471 (version "2.0b6")
10472 (source (origin
10473 (method git-fetch)
10474 (uri (git-reference
10475 (url "https://github.com/beanshell/beanshell")
10476 (commit version)))
10477 (file-name (git-file-name name version))
10478 (sha256
10479 (base32
10480 "0kz3f0xjack6c9syssi4qjw1rbd3q5963sk5pmr143hiibxa9csw"))
10481 (modules '((guix build utils)))
10482 (snippet
10483 '(begin
10484 ;; Delete bundled third-party jar archives.
10485 (for-each delete-file (find-files "." ".*.jar$"))
10486 (for-each (lambda (file) (chmod file #o644))
10487 (find-files "." "."))
10488 #t))))
10489 (build-system ant-build-system)
10490 (arguments
10491 `(#:build-target "jarall"
10492 #:test-target "junit-tests-all"
10493 #:make-flags (list "-DDATE" "(no date for reproducibility)")
10494 #:phases
10495 (modify-phases %standard-phases
10496 (replace 'install
10497 (install-from-pom "pom.xml")))))
10498 (inputs
10499 (list java-classpathx-servletapi java-commons-bsf))
10500 (native-inputs
10501 (list java-junit javacc-3))
10502 (home-page "http://beanshell.org/")
10503 (synopsis "Lightweight Scripting for Java")
10504 (description "BeanShell is a small, free, embeddable Java source
10505interpreter with object scripting language features, written in Java.
10506BeanShell dynamically executes standard Java syntax and extends it with common
10507scripting conveniences such as loose types, commands, and method closures like
10508those in Perl and JavaScript.")
10509 (license license:asl2.0)))
10510
10511(define-public java-fest-util
10512 (package
10513 (name "java-fest-util")
10514 (version "1.2.5")
10515 (source (origin
10516 (method git-fetch)
10517 (uri (git-reference
10518 (url "https://github.com/alexruiz/fest-util/")
10519 (commit (string-append "fest-util-" version))))
10520 (file-name (git-file-name name version))
10521 (sha256
10522 (base32
10523 "02kgal7v85snyyvcsxvn4qphid455f4smh2wri1il8d9asw0djbz"))))
10524 (build-system ant-build-system)
10525 (arguments
10526 `(#:jar-name "java-fest-util.jar"
10527 #:source-dir "src/main/java"))
10528 (native-inputs
10529 `(("junit" ,java-junit)
10530 ("hamcrest" ,java-hamcrest-core)))
10531 (home-page "https://github.com/alexruiz/fest-util")
10532 (synopsis "FEST common utilities")
10533 (description "Common utilities used in all FEST module.")
10534 (license license:asl2.0)))
10535
10536(define-public java-fest-test
10537 (package
10538 (name "java-fest-test")
10539 (version "2.1.0")
10540 (source (origin
10541 (method git-fetch)
10542 (uri (git-reference
10543 (url "https://github.com/alexruiz/fest-test/")
10544 (commit (string-append "fest-test-" version))))
10545 (file-name (git-file-name name version))
10546 (sha256
10547 (base32
10548 "0mg1d2jfh7kbx2c40dchbjr6d8pv59snsyb13mfxsr7xk5n69qbn"))))
10549 (build-system ant-build-system)
10550 (arguments
10551 `(#:jar-name "java-fest-test.jar"
10552 #:source-dir "src/main/java"
10553 #:tests? #f)); no tests
10554 (inputs
10555 `(("junit" ,java-junit)))
10556 (home-page "https://github.com/alexruiz/fest-test")
10557 (synopsis "Common FEST testing infrastructure")
10558 (description "Fest-test contains the common FEST testing infrastructure.")
10559 (license license:asl2.0)))
10560
10561(define-public java-fest-assert
10562 (package
10563 (name "java-fest-assert")
10564 (version "2.0M10")
10565 (source (origin
10566 (method git-fetch)
10567 (uri (git-reference
10568 (url "https://github.com/alexruiz/fest-assert-2.x/")
10569 (commit (string-append "fest-assert-core-" version))))
10570 (file-name (git-file-name name version))
10571 (sha256
10572 (base32
10573 "1cp8zzyag3s85fz2w68sda9zzaal1y5f9wl8g72wkm12an40w6by"))))
10574 (build-system ant-build-system)
10575 (arguments
10576 `(#:jar-name "java-fest-assert.jar"
10577 #:source-dir "src/main/java"
10578 #:test-exclude
10579 (list
10580 "**/Abstract*.java"
10581 "**/*BaseTest.java"
10582 ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses
10583 "**/MessageFormatter_format_Test.java"
10584 "**/internal/*/*_assert*_Test.java")))
10585 (inputs
10586 (list java-fest-util))
10587 (native-inputs
10588 (list java-junit
10589 java-fest-test
10590 java-hamcrest-core
10591 java-mockito-1
10592 java-cglib
10593 java-objenesis
10594 java-asm))
10595 (home-page "https://github.com/alexruiz/fest-assert-2.x")
10596 (synopsis "FEST fluent assertions")
10597 (description "FEST-Assert provides a fluent interface for assertions.")
10598 (license license:asl2.0)))
10599
10600(define-public java-testng
10601 (package
10602 (name "java-testng")
10603 (version "6.14.3")
10604 (source (origin
10605 (method git-fetch)
10606 (uri (git-reference
10607 (url "https://github.com/cbeust/testng")
10608 (commit version)))
10609 (file-name (string-append name "-" version "-checkout"))
10610 (sha256
10611 (base32
10612 "0y6vq30i5g276kw0v2bhbvci22ijg7ax49ap2611yqlhbs4d6dqv"))))
10613 (build-system ant-build-system)
10614 (arguments
10615 `(#:jdk ,icedtea-8; java.util.function
10616 #:jar-name "java-testng.jar"
10617 #:source-dir "src/main/java"
10618 #:phases
10619 (modify-phases %standard-phases
10620 ;; FIXME: I don't know why these tests fail
10621 (add-after 'unpack 'delete-failing-tests
10622 (lambda _
10623 (substitute* "src/test/resources/testng.xml"
10624 (("<class name=\"test.configuration.github1625.TestRunnerIssue1625\"/>") "")
10625 (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") ""))
10626 #t))
10627 ;; We don't have groovy
10628 (add-after 'unpack 'delete-groovy-tests
10629 (lambda _
10630 (delete-file-recursively "src/test/java/test/dependent/issue1648/")
10631 (substitute* "src/test/resources/testng.xml"
10632 (("<class name=\"test.dependent.issue1648.TestRunner\"/>") ""))
10633 #t))
10634 (add-before 'build 'copy-resources
10635 (lambda _
10636 (copy-recursively "src/main/resources" "build/classes")
10637 #t))
10638 (add-before 'check 'copy-test-resources
10639 (lambda _
10640 (copy-recursively "src/test/resources" "build/test-classes")
10641 #t))
10642 (replace 'check
10643 (lambda _
10644 (invoke "ant" "compile-tests")
10645 ;; we don't have groovy
10646 (substitute* "src/test/resources/testng.xml"
10647 (("<class name=\"test.groovy.GroovyTest\" />") ""))
10648 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
10649 ":build/classes"
10650 ":build/test-classes")
10651 "-Dtest.resources.dir=src/test/resources"
10652 "org.testng.TestNG" "src/test/resources/testng.xml"))))))
10653 (propagated-inputs
10654 `(("junit" ,java-junit)
10655 ("java-jsr305" ,java-jsr305)
10656 ("java-bsh" ,java-bsh)
10657 ("java-jcommander" ,java-jcommander)
10658 ("java-guice" ,java-guice)
10659 ("snakeyaml" ,java-snakeyaml)))
10660 (native-inputs
10661 `(("guava" ,java-guava)
10662 ("java-javax-inject" ,java-javax-inject)
10663 ("java-hamcrest" ,java-hamcrest-all)
10664 ("java-assertj" ,java-assertj)
10665 ("java-mockito" ,java-mockito-1)
10666 ("cglib" ,java-cglib)
10667 ("asm" ,java-asm)
10668 ("aopalliance" ,java-aopalliance)))
10669 (home-page "https://testng.org")
10670 (synopsis "Testing framework")
10671 (description "TestNG is a testing framework inspired from JUnit and NUnit
10672but introducing some new functionalities that make it more powerful and easier
10673to use.")
10674 (license license:asl2.0)))
10675
10676(define-public java-jnacl
10677 (let ((commit "094e819afdd63ea81a499b3bcb42a271006bebd9")
10678 (revision "2"))
10679 (package
10680 (name "java-jnacl")
10681 (version (string-append "0.1.0-" revision "." (string-take commit 7)))
10682 (source (origin
10683 (method git-fetch)
10684 (uri (git-reference
10685 (url "https://github.com/neilalexander/jnacl")
10686 (commit commit)))
10687 (file-name (git-file-name name version))
10688 (sha256
10689 (base32
10690 "1d6g6xhn83byv5943n7935wwjsk0ibk0qdvqgr699qqgqqmwisbb"))))
10691 (build-system ant-build-system)
10692 (arguments
10693 `(#:jar-name "jnacl.jar"
10694 #:source-dir "src/main/java"
10695 #:jdk ,icedtea-8
10696 #:phases
10697 (modify-phases %standard-phases
10698 (add-before 'build 'fix-tests
10699 (lambda _
10700 (substitute* '("src/test/java/com/neilalexander/jnacl/NaClTest.java"
10701 "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java")
10702 (("assertions.Assertions") "assertions.api.Assertions"))
10703 #t))
10704 (replace 'check
10705 (lambda _
10706 (invoke "ant" "compile-tests")
10707 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
10708 ":build/classes"
10709 ":build/test-classes")
10710 "org.testng.TestNG" "-testclass"
10711 "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class")
10712 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
10713 ":build/classes"
10714 ":build/test-classes")
10715 "org.testng.TestNG" "-testclass"
10716 "build/test-classes/com/neilalexander/jnacl/NaClTest.class"))))))
10717 (native-inputs
10718 (list java-testng java-fest-util java-fest-assert))
10719 (home-page "https://github.com/neilalexander/jnacl")
10720 (synopsis "Java implementation of NaCl")
10721 (description "Pure Java implementation of the NaCl: Networking and
10722Cryptography library.")
10723 (license license:bsd-2))))
10724
10725(define-public java-mvel2
10726 (package
10727 (name "java-mvel2")
10728 (version "2.3.1")
10729 (source (origin
10730 (method url-fetch)
10731 (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-"
10732 version ".Final.tar.gz"))
10733 (sha256
10734 (base32
10735 "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z"))))
10736 (build-system ant-build-system)
10737 (arguments
10738 `(#:jar-name "mvel2.jar"
10739 #:source-dir "src/main/java"
10740 #:test-exclude
10741 (list "**/Abstract*.java"
10742 ;; Base class with no tests
10743 "**/MVELThreadTest.java")
10744 #:phases
10745 (modify-phases %standard-phases
10746 (add-after 'install 'install-bin
10747 (lambda* (#:key outputs #:allow-other-keys)
10748 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
10749 (mkdir-p bin)
10750 (with-output-to-file (string-append bin "/mvel2")
10751 (lambda _
10752 (display
10753 (string-append
10754 "#!" (which "bash") "\n"
10755 "if [ \"$#\" -ne \"2\" ]; then\n"
10756 "echo 'Usage: mvel2 <script> <out.dir>'\n"
10757 "exit\n"
10758 "fi\n"
10759 "java -Dout.dir=$2 -cp " (getenv "CLASSPATH")
10760 ":" (assoc-ref outputs "out") "/share/java/mvel2.jar"
10761 " org.mvel2.sh.Main $1"))))
10762 (chmod (string-append bin "/mvel2") #o755))
10763 #t)))))
10764 (native-inputs
10765 `(("junit" ,java-junit)
10766 ("hamcrest" ,java-hamcrest-core)))
10767 (home-page "https://github.com/mvel/mvel")
10768 (synopsis "MVFLEX Expression Language")
10769 (description "MVEL has largely been inspired by Java syntax, but has some
10770fundamental differences aimed at making it more efficient as an expression
10771language, such as operators that directly support collection, array and string
10772matching, as well as regular expressions. MVEL is used to evaluate expressions
10773written using Java syntax.
10774
10775In addition to the expression language, MVEL serves as a templating language for
10776configuration and string construction.")
10777 (license license:asl2.0)))
10778
10779(define-public java-commons-jexl-2
10780 (package
10781 (name "java-commons-jexl")
10782 (version "2.1.1")
10783 (source (origin
10784 (method url-fetch)
10785 (uri (string-append "mirror://apache/commons/jexl/source/"
10786 "commons-jexl-" version "-src.tar.gz"))
10787 (sha256
10788 (base32
10789 "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz"))))
10790 (build-system ant-build-system)
10791 (arguments
10792 `(#:jar-name "commons-jexl-2.jar"
10793 #:jdk ,icedtea-8
10794 #:source-dir "src/main/java"
10795 #:phases
10796 (modify-phases %standard-phases
10797 (add-before 'check 'disable-broken-tests
10798 (lambda* (#:key inputs #:allow-other-keys)
10799 (with-directory-excursion "src/test/java/org/apache/commons/jexl2/"
10800 (substitute* "ArithmeticTest.java"
10801 (("asserter.assertExpression\\(\"3 / 0\"") "//")
10802 (("asserter.assertExpression\\(\"imanull") "//"))
10803 ;; This test fails with "ambiguous method invocation"
10804 (delete-file "CacheTest.java")
10805 ;; This test doesn't have access to the temp directory
10806 (substitute* "ClassCreatorTest.java"
10807 (("java.io.tmpdir") "user.dir"))
10808 ;; This test fails in trying to detect whether it can run.
10809 (substitute* "ClassCreator.java"
10810 (("boolean canRun =.*") "boolean canRun = false;\n"))
10811 ;; ...and these tests depend on it.
10812 (delete-file "scripting/JexlScriptEngineOptionalTest.java")
10813 (delete-file "scripting/JexlScriptEngineTest.java"))
10814 #t))
10815 (add-before 'build 'run-javacc
10816 (lambda _
10817 (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/"
10818 (invoke "java" "jjtree" "Parser.jjt")
10819 (invoke "java" "javacc" "Parser.jj"))
10820 #t)))))
10821 (inputs
10822 (list java-commons-logging-minimal))
10823 (native-inputs
10824 (list java-junit java-hamcrest-core javacc-4))
10825 (home-page "https://commons.apache.org/proper/commons-jexl/")
10826 (synopsis "Java Expression Language")
10827 (description "JEXL is a library intended to facilitate the implementation
10828of dynamic and scripting features in applications and frameworks written in
10829Java. JEXL implements an Expression Language based on some extensions to the
10830JSTL Expression Language supporting most of the constructs seen in
10831shell-script or ECMAScript. Its goal is to expose scripting features usable
10832by technical operatives or consultants working with enterprise platforms.")
10833 (license license:asl2.0)))
10834
10835(define-public java-lz4
10836 (package
10837 (name "java-lz4")
10838 (version "1.4.0")
10839 (source (origin
10840 (method git-fetch)
10841 (uri (git-reference
10842 (url "https://github.com/lz4/lz4-java")
10843 (commit version)))
10844 (file-name (git-file-name name version))
10845 (sha256
10846 (base32
10847 "0ydjakhv3cz34mfvv14qrh2ksdxifgjwwagjy7r46qr3f68hnf6y"))))
10848 (build-system ant-build-system)
10849 (arguments
10850 `(#:jar-name "lz4.jar"
10851 #:jdk ,icedtea-8
10852 #:source-dir "src/java:src/java-unsafe"
10853 #:tests? #f; FIXME: requires more dependencies
10854 #:phases
10855 (modify-phases %standard-phases
10856 (add-after 'unpack 'make-files-writable
10857 (lambda _
10858 (for-each make-file-writable (find-files "."))
10859 #t))
10860 (add-before 'configure 'generate-source
10861 (lambda _
10862 (with-directory-excursion "src/build/source_templates"
10863 (invoke "mvel2" "../gen_sources.mvel" "../../java"))
10864 #t)))))
10865 (native-inputs
10866 `(("mvel" ,java-mvel2)))
10867 (home-page "https://jpountz.github.io/lz4-java")
10868 (synopsis "Compression algorithm")
10869 (description "LZ4 - Java is a Java port of the popular lz4 compression
10870algorithms and xxHash hashing algorithm.")
10871 (license license:asl2.0)))
10872
10873(define-public java-bouncycastle
10874 (package
10875 (name "java-bouncycastle")
10876 (version "1.67")
10877 (source (origin
10878 (method git-fetch)
10879 (uri (git-reference
10880 (url "http://git.bouncycastle.org/repositories/bc-java")
10881 ;(url "https://github.com/bcgit/bc-java")
10882 (commit (string-append "r1rv" (substring version 2 4)))))
10883 (file-name (git-file-name name version))
10884 (sha256
10885 (base32
10886 "1449q7fyh03s1q0bqljcrhgacwcyqmg2bbvb3z084avgapwsainz"))
10887 (modules '((guix build utils)))
10888 (snippet
10889 '(begin
10890 (for-each delete-file
10891 (find-files "." "\\.jar$"))
10892 #t))))
10893 (build-system ant-build-system)
10894 (arguments
10895 `(#:jdk ,icedtea-8
10896 #:tests? #f
10897 #:phases
10898 (modify-phases %standard-phases
10899 (replace 'build
10900 (lambda _
10901 (invoke "ant" "-f" "ant/jdk15+.xml" "build-provider")
10902 (invoke "ant" "-f" "ant/jdk15+.xml" "build")))
10903 ;; FIXME: the tests freeze.
10904 ;; (replace 'check
10905 ;; (lambda _
10906 ;; (invoke "ant" "-f" "ant/jdk15+.xml" "test")))
10907 (replace 'install
10908 (install-jars "build/artifacts/jdk1.5/jars")))))
10909 (inputs
10910 (list java-javax-mail))
10911 (native-inputs
10912 `(("unzip" ,unzip)
10913 ("junit" ,java-junit)
10914 ("java-native-access" ,java-native-access)
10915 ("java-native-access-platform" ,java-native-access-platform)))
10916 (home-page "https://www.bouncycastle.org")
10917 (synopsis "Cryptographic library")
10918 (description "Bouncy Castle is a cryptographic library for the Java
10919programming language.")
10920 (license license:expat)))
10921
10922(define-public java-lmax-disruptor
10923 (package
10924 (name "java-lmax-disruptor")
10925 (version "3.4.4")
10926 (source (origin
10927 (method git-fetch)
10928 (uri (git-reference
10929 (url "https://github.com/LMAX-Exchange/disruptor")
10930 (commit version)))
10931 (file-name (git-file-name name version))
10932 (sha256
10933 (base32
10934 "02c5kp3n8a73dq9ay7ar53s1k3x61z9yzc5ikqb03m6snr1wpfqn"))))
10935 (build-system ant-build-system)
10936 (arguments
10937 `(#:jar-name "java-lmax-disruptor.jar"
10938 #:jdk ,icedtea-8
10939 #:tests? #f)); tests hang
10940 (inputs
10941 `(("junit" ,java-junit)
10942 ("java-hdrhistogram" ,java-hdrhistogram)
10943 ("java-jmock" ,java-jmock)
10944 ("java-jmock-legacy" ,java-jmock-legacy)
10945 ("java-jmock-junit4" ,java-jmock-junit4)
10946 ("java-hamcrest-all" ,java-hamcrest-all)))
10947 (native-inputs
10948 `(("cglib" ,java-cglib)
10949 ("objenesis" ,java-objenesis)
10950 ("asm" ,java-asm)))
10951 (home-page "https://www.lmax.com/disruptor")
10952 (synopsis "High performance inter-thread communication")
10953 (description "LMAX Disruptor is a software pattern and software component
10954for high performance inter-thread communication that avoids the need for
10955message queues or resource locking.")
10956 (license license:asl2.0)))
10957
10958(define-public java-conversant-disruptor
10959 (package
10960 (name "java-conversant-disruptor")
10961 (version "1.2.19")
10962 (source (origin
10963 (method git-fetch)
10964 (uri (git-reference
10965 (url "https://github.com/conversant/disruptor")
10966 (commit version)))
10967 (file-name (git-file-name name version))
10968 (sha256
10969 (base32
10970 "0gx1dm7sfg7pa05cs4qby10gfcplai5b5lf1f7ik1a76dh3vhl0g"))))
10971 (build-system ant-build-system)
10972 (arguments
10973 `(#:jar-name "java-conversant-disruptor.jar"
10974 #:source-dir "src/main/java"
10975 #:phases
10976 (modify-phases %standard-phases
10977 (add-before 'build 'copy-resources
10978 (lambda _
10979 (copy-recursively "src/main/resources" "build/classes")))
10980 (add-before 'build 'remove-module
10981 (lambda _
10982 (delete-file "src/main/java/module-info.java"))))))
10983 (native-inputs
10984 (list java-junit))
10985 (home-page "https://github.com/conversant/disruptor")
10986 (synopsis "High performance intra-thread communication")
10987 (description "Conversant Disruptor is the highest performing intra-thread
10988transfer mechanism available in Java. Conversant Disruptor is an implementation
10989of this type of ring buffer that has almost no overhead and that exploits a
10990particularly simple design.")
10991 (license license:asl2.0)))
10992
10993(define-public java-jctools-core-1
10994 (package
10995 (name "java-jctools-core")
10996 (version "1.2.1")
10997 (source (origin
10998 (method git-fetch)
10999 (uri (git-reference
11000 (url "https://github.com/JCTools/JCTools")
11001 (commit (string-append "v" version))))
11002 (file-name (git-file-name name version))
11003 (sha256
11004 (base32
11005 "105my29nwd4djvdllmq8s3jdzbyplbkxzwmddxiiilb4yqr1pghb"))))
11006 (build-system ant-build-system)
11007 (arguments
11008 `(#:jar-name "java-jctools-core.jar"
11009 #:source-dir "jctools-core/src/main/java"
11010 #:test-dir "jctools-core/src/test"))
11011 (native-inputs
11012 (list java-junit java-hamcrest-all))
11013 (home-page "https://github.com/JCTools/JCTools")
11014 (synopsis "Concurrency tools for Java")
11015 (description "This library implements concurrent data structures that are
11016not natively available in Java.")
11017 (license license:asl2.0)))
11018
11019(define-public java-commons-bcel
11020 (package
11021 (name "java-commons-bcel")
11022 (version "6.1")
11023 (source (origin
11024 (method url-fetch)
11025 (uri (string-append "mirror://apache/commons/bcel/source/bcel-"
11026 version "-src.tar.gz"))
11027 (sha256
11028 (base32
11029 "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy"))))
11030 (build-system ant-build-system)
11031 (arguments
11032 `(#:jar-name "bcel.jar"
11033 #:jdk ,icedtea-8
11034 #:source-dir "src/main/java"
11035 #:test-dir "src/test/java"
11036 ;; FIXME: Tests require the unpackaged jna.
11037 #:tests? #f))
11038 (home-page "https://commons.apache.org/proper/commons-bcel/")
11039 (synopsis "Byte code engineering library")
11040 (description "The Byte Code Engineering Library (Apache Commons BCEL) is
11041intended to give users a convenient way to analyze, create, and
11042manipulate (binary) Java class files. Classes are represented by objects
11043which contain all the symbolic information of the given class: methods, fields
11044and byte code instructions, in particular.
11045
11046Such objects can be read from an existing file, be transformed by a
11047program (e.g. a class loader at run-time) and written to a file again. An
11048even more interesting application is the creation of classes from scratch at
11049run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful
11050if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format
11051of Java @code{.class} files.")
11052 (license license:asl2.0)))
11053
11054(define-public java-xerial-core
11055 (package
11056 (name "java-xerial-core")
11057 (version "2.1")
11058 (source (origin
11059 (method url-fetch)
11060 (uri (string-append "https://github.com/xerial/xerial-java/archive/"
11061 version ".tar.gz"))
11062 (file-name (string-append name "-" version ".tar.gz"))
11063 (sha256
11064 (base32
11065 "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d"))))
11066 (build-system ant-build-system)
11067 (arguments
11068 `(#:jar-name "xerial-core.jar"
11069 #:source-dir "xerial-core/src/main/java"
11070 #:test-dir "xerial-core/src/test"
11071 #:phases
11072 (modify-phases %standard-phases
11073 (add-before 'build 'copy-resources
11074 (lambda _
11075 (copy-recursively "xerial-core/src/main/resources"
11076 "build/classes")
11077 #t)))))
11078 (native-inputs
11079 `(("junit" ,java-junit)
11080 ("hamcrest" ,java-hamcrest-core)))
11081 (home-page "https://github.com/xerial/xerial-java")
11082 (synopsis "Data management libraries for Java")
11083 (description "Xerial is a set of data management libraries for the Java
11084programming language. The ultimate goal of the Xerial project is to manage
11085everything as database, including class objects, text format data, data
11086streams, etc.")
11087 (license license:asl2.0)))
11088
11089(define-public java-powermock-reflect
11090 (package
11091 (name "java-powermock-reflect")
11092 (version "1.7.3")
11093 (source (origin
11094 (method url-fetch)
11095 (uri (string-append "https://github.com/powermock/powermock/"
11096 "archive/powermock-" version ".tar.gz"))
11097 (file-name (string-append name "-" version ".tar.gz"))
11098 (sha256
11099 (base32
11100 "0sbgi5vqq7k72wzcdjb20s370vyd4hsbnx71pzb8ishml3gy7fwy"))
11101 (patches
11102 (search-patches "java-powermock-fix-java-files.patch"))))
11103 (build-system ant-build-system)
11104 (arguments
11105 `(#:jar-name "java-powermock-reflect.jar"
11106 #:jdk ,icedtea-8
11107 #:source-dir "powermock-reflect/src/main/java"
11108 #:test-dir "powermock-reflect/src/test"))
11109 (inputs
11110 (list java-objenesis))
11111 (native-inputs
11112 `(("junit" ,java-junit)
11113 ("cglib" ,java-cglib)
11114 ("asm" ,java-asm)
11115 ("hamcrest" ,java-hamcrest-core)
11116 ("assertj" ,java-assertj)))
11117 (home-page "https://github.com/powermock/powermock")
11118 (synopsis "Mock library extension framework")
11119 (description "PowerMock is a framework that extends other mock libraries
11120such as EasyMock with more powerful capabilities. PowerMock uses a custom
11121classloader and bytecode manipulation to enable mocking of static methods,
11122constructors, final classes and methods, private methods, removal of static
11123initializers and more. By using a custom classloader no changes need to be
11124done to the IDE or continuous integration servers which simplifies adoption.")
11125 (license license:asl2.0)))
11126
11127(define-public java-powermock-core
11128 (package
11129 (inherit java-powermock-reflect)
11130 (name "java-powermock-core")
11131 (arguments
11132 `(#:jar-name "java-powermock-core.jar"
11133 #:source-dir "powermock-core/src/main/java"
11134 #:test-dir "powermock-core/src/test"
11135 #:tests? #f; requires powermock-api
11136 #:jdk ,icedtea-8
11137 #:phases
11138 (modify-phases %standard-phases
11139 (add-before 'build 'copy-resources
11140 (lambda _
11141 (copy-recursively "powermock-core/src/main/resources"
11142 "build/classes")
11143 #t)))))
11144 (inputs
11145 `(("reflect" ,java-powermock-reflect)
11146 ("javassist" ,java-jboss-javassist)))
11147 (native-inputs
11148 `(("junit" ,java-junit)
11149 ("assertj" ,java-assertj)
11150 ("mockito" ,java-mockito-1)))))
11151
11152(define-public java-powermock-api-support
11153 (package
11154 (inherit java-powermock-reflect)
11155 (name "java-powermock-api-support")
11156 (build-system ant-build-system)
11157 (arguments
11158 `(#:jar-name "java-powermock-api-support.jar"
11159 #:jdk ,icedtea-8
11160 #:source-dir "powermock-api/powermock-api-support/src/main/java"
11161 #:tests? #f)); no tests
11162 (inputs
11163 `(("core" ,java-powermock-core)
11164 ("reflect" ,java-powermock-reflect)))))
11165
11166(define-public java-powermock-modules-junit4-common
11167 (package
11168 (inherit java-powermock-reflect)
11169 (name "java-powermock-modules-junit4-common")
11170 (build-system ant-build-system)
11171 (arguments
11172 `(#:jar-name "java-powermock-modules-junit4-common.jar"
11173 #:jdk ,icedtea-8
11174 #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java"
11175 #:test-dir "powermock-modules/powermock-module-junit4-common/src/test"))
11176 (inputs
11177 `(("core" ,java-powermock-core)
11178 ("easymock" ,java-easymock)
11179 ("reflect" ,java-powermock-reflect)
11180 ("hamcrest" ,java-hamcrest-core)
11181 ("cglib" ,java-cglib)))))
11182
11183(define-public java-powermock-modules-junit4
11184 (package
11185 (inherit java-powermock-reflect)
11186 (name "java-powermock-modules-junit4")
11187 (build-system ant-build-system)
11188 (arguments
11189 `(#:jar-name "java-powermock-modules-junit4.jar"
11190 #:jdk ,icedtea-8
11191 #:source-dir "powermock-modules/powermock-module-junit4/src/main/java"
11192 #:test-dir "powermock-modules/powermock-module-junit4/src/test"
11193 #:phases
11194 (modify-phases %standard-phases
11195 (add-before 'build 'fix-junit-detection
11196 (lambda _
11197 ;; Our junit version is 4.12-SNAPSHOT
11198 (substitute* (find-files "powermock-modules/powermock-module-junit4"
11199 "PowerMockJUnit4MethodValidator.java")
11200 (("4.12") "4.12-SNAPSHOT"))
11201 #t)))))
11202 (inputs
11203 `(("core" ,java-powermock-core)
11204 ("reflect" ,java-powermock-reflect)
11205 ("common" ,java-powermock-modules-junit4-common)
11206 ("cglib" ,java-cglib)))
11207 (native-inputs
11208 `(("easymock" ,java-easymock)
11209 ("hamcrest" ,java-hamcrest-core)
11210 ("objenesis" ,java-objenesis)
11211 ("asm" ,java-asm)
11212 ("junit" ,java-junit)))))
11213
11214(define-public java-powermock-api-easymock
11215 (package
11216 (inherit java-powermock-reflect)
11217 (name "java-powermock-api-easymock")
11218 (build-system ant-build-system)
11219 (arguments
11220 `(#:jar-name "java-powermock-api-easymock.jar"
11221 #:jdk ,icedtea-8
11222 #:source-dir "powermock-api/powermock-api-easymock/src/main/java"
11223 #:tests? #f; no tests
11224 #:phases
11225 (modify-phases %standard-phases
11226 (add-before 'build 'fix-file
11227 (lambda _
11228 ;; FIXME: This looks wrong, but it fixes a build error.
11229 (with-directory-excursion "powermock-api/powermock-api-easymock"
11230 (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java"
11231 (("classLoader instanceof MockClassLoader") "false")
11232 (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";")))
11233 #t)))))
11234 (inputs
11235 `(("core" ,java-powermock-core)
11236 ("easymock" ,java-easymock)
11237 ("reflect" ,java-powermock-reflect)
11238 ("support" ,java-powermock-api-support)
11239 ("cglib" ,java-cglib)))))
11240
11241(define-public java-jboss-jms-api-spec
11242 (package
11243 (name "java-jboss-jms-api-spec")
11244 (version "2.0")
11245 (source (origin
11246 (method url-fetch)
11247 (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/"
11248 "archive/jboss-jms-api_" version
11249 "_spec-1.0.1.Final.tar.gz"))
11250 (sha256
11251 (base32
11252 "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m"))))
11253 (build-system ant-build-system)
11254 (arguments
11255 `(#:jar-name "java-jboss-jms-api_spec.jar"
11256 #:jdk ,icedtea-8
11257 #:source-dir "."
11258 #:tests? #f)); no tests
11259 (home-page "https://github.com/jboss/jboss-jms-api_spec")
11260 (synopsis "Java Message Service API specification")
11261 (description "Java Message Service (JMS) API is used to send messages
11262messages between two or more clients. It is a messaging standard that allows
11263application components to create, send, receive, and read messages.")
11264 ; either gpl2 only with GPL Classpath Exception, or cddl.
11265 (license (list license:gpl2 license:cddl1.0))))
11266
11267(define-public java-mail
11268 (package
11269 (name "java-mail")
11270 (version "1.6.0")
11271 (source (origin
11272 (method url-fetch)
11273 (uri (string-append "https://github.com/javaee/javamail/archive/"
11274 "JAVAMAIL-1_6_0.tar.gz"))
11275 (sha256
11276 (base32
11277 "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92"))))
11278 (build-system ant-build-system)
11279 (arguments
11280 `(#:jar-name "java-mail.jar"
11281 #:jdk ,icedtea-8
11282 #:source-dir "mail/src/main/java"
11283 #:test-dir "mail/src/test"
11284 #:test-exclude
11285 (list "**/CollectorFormatterTest.java"
11286 "**/CompactFormatterTest.java"
11287 "**/DurationFilterTest.java"
11288 "**/MailHandlerTest.java"
11289 "**/GetLocalAddressTest.java"
11290 ;; SSLHandshakeException: No appropriate protocol
11291 "**/WriteTimeoutSocketTest.java"
11292 ;; FIXME: both end with:
11293 ;; java.lang.ClassNotFoundException:
11294 ;; javax.mail.internet.MimeMultipartParseTest
11295 "**/MimeMultipartParseTest.java"
11296 "**/SearchTermSerializationTest.java")
11297 #:phases
11298 (modify-phases %standard-phases
11299 (add-before 'configure 'move-version.java
11300 (lambda _
11301 (copy-file "mail/src/main/resources/javax/mail/Version.java"
11302 "mail/src/main/java/javax/mail/Version.java")))
11303 (add-before 'build 'copy-resources
11304 (lambda _
11305 (copy-recursively "mail/src/main/resources/META-INF"
11306 "build/classes/META-INF"))))))
11307 (native-inputs
11308 (list java-junit java-hamcrest-core))
11309 (home-page "https://javaee.github.io/javamail/")
11310 (synopsis "Mail-related functionality in Java")
11311 (description "The JavaMail API provides a platform-independent and
11312protocol-independent framework to build mail and messaging applications.")
11313 ;; General Public License Version 2 only ("GPL") or the Common Development
11314 ;; and Distribution License("CDDL")
11315 (license (list license:cddl1.1
11316 license:gpl2)))); with classpath exception
11317
11318(define-public java-mapdb
11319 (package
11320 (name "java-mapdb")
11321 (version "1.0.9")
11322 (source (origin
11323 (method git-fetch)
11324 (uri (git-reference
11325 (url "https://github.com/jankotek/mapdb")
11326 (commit (string-append "mapdb-" version))))
11327 (file-name (git-file-name name version))
11328 (sha256
11329 (base32
11330 "1slb4h282jqvk16896lcvgm65pj3v6crcp2wvjdvad7nx7d2f1kv"))))
11331 (build-system ant-build-system)
11332 (arguments
11333 (list #:jar-name "mapdb.jar"
11334 #:source-dir "src/main/java"
11335 #:test-dir "src/test"
11336 #:test-exclude (list "**/ClosedThrowsExceptionTest.java"
11337 "**/ConcurrentMapInterfaceTest.java"
11338 "**/EngineTest.java"
11339 "**/Issue664Test.java"
11340 "**/MapInterfaceTest.java")
11341 #:phases #~(modify-phases %standard-phases
11342 (replace 'install (install-from-pom "pom.xml")))))
11343 (native-inputs (list java-junit))
11344 (home-page "https://mapdb.org/")
11345 (synopsis "Concurrent data structures")
11346 (description "MapDB provides concurrent maps, sets and queues backed by
11347disk storage or off-heap memory.")
11348 (license license:bsd-3)))
11349
11350(define-public java-jeromq
11351 (package
11352 (name "java-jeromq")
11353 (version "0.4.3")
11354 (source (origin
11355 (method git-fetch)
11356 (uri (git-reference
11357 (url "https://github.com/zeromq/jeromq")
11358 (commit (string-append "v" version))))
11359 (file-name (string-append name "-" version "-checkout"))
11360 (sha256
11361 (base32
11362 "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj"))
11363 (patches (search-patches "java-jeromq-fix-tests.patch"))))
11364 (build-system ant-build-system)
11365 (arguments
11366 `(#:jar-name "java-jeromq.jar"
11367 #:source-dir "src/main/java"
11368 #:jdk ,icedtea-8
11369 #:test-exclude
11370 (list
11371 "**/Abstract*.java"
11372 ;; Requires network
11373 "**/ZBeaconTest.java"
11374 ;; Failures
11375 "**/DealerSpecTest.java"
11376 "**/CustomDecoderTest.java"
11377 "**/CustomEncoderTest.java"
11378 "**/ConnectRidTest.java"
11379 "**/ReqSpecTest.java"
11380 "**/PushPullSpecTest.java"
11381 "**/PubSubHwmTest.java"
11382 "**/RouterSpecTest.java"
11383 "**/ProxyTest.java")))
11384 (inputs
11385 (list java-jnacl))
11386 (native-inputs
11387 `(("java-hamcrest-core" ,java-hamcrest-core)
11388 ("junit" ,java-junit)))
11389 (home-page "https://zeromq.org/bindings:java")
11390 (synopsis "Java binding for 0MQ")
11391 (description "Jeromq provides the java bindings for 0MQ.")
11392 (license license:mpl2.0)))
11393
11394(define-public java-kafka-clients
11395 (package
11396 (name "java-kafka-clients")
11397 (version "1.1.1")
11398 (source (origin
11399 (method url-fetch)
11400 (uri (string-append "mirror://apache/kafka/" version "/kafka-"
11401 version "-src.tgz"))
11402 (sha256
11403 (base32
11404 "1jn62q7z383nwhzv4ippsddf98sa1gnkszjjncj4ii3r8rzgw566"))))
11405 (build-system ant-build-system)
11406 (arguments
11407 `(#:jar-name "java-kafka-clients.jar"
11408 #:jdk ,icedtea-8
11409 #:source-dir "clients/src/main/java"
11410 #:test-dir "clients/src/test"
11411 #:test-exclude
11412 (list
11413 ;; This file does not contain a class
11414 "**/IntegrationTest.java"
11415 ;; Requires network
11416 "**/ClientUtilsTest.java"
11417 ;; This test fails on i686
11418 "**/SerializationTest.java"
11419 ;; "protocol is disabled or cipher suites are inappropriate"
11420 "**/SslTransportLayerTest.java"
11421 ;; End with errors that seem related to our powermock
11422 "**/KafkaProducerTest.java"
11423 "**/BufferPoolTest.java"
11424 ;; Undeterministic failure, seems to affect mostly ci
11425 "**/GarbageCollectedMemoryPoolTest.java")))
11426 (inputs
11427 (list java-slf4j-api java-lz4))
11428 (native-inputs
11429 (list java-asm
11430 java-bouncycastle
11431 java-cglib
11432 java-easymock
11433 java-hamcrest-all
11434 java-jboss-javassist
11435 java-junit
11436 java-objenesis
11437 java-powermock-api-easymock
11438 java-powermock-api-support
11439 java-powermock-core
11440 java-powermock-modules-junit4
11441 java-powermock-modules-junit4-common
11442 java-snappy))
11443 (home-page "https://kafka.apache.org")
11444 (synopsis "Distributed streaming platform")
11445 (description "Kafka is a distributed streaming platform, which means:
11446@itemize
11447@item it can publish and subscribe to streams of records;
11448@item it can store streams of records in a fault-tolerant way;
11449@item it can process streams of records as they occur.
11450@end itemize")
11451 ;; Either cddl or gpl2 only.
11452 (license (list license:cddl1.1; actually cddl1.1
11453 license:gpl2)))); with classpath exception
11454
11455(define-public java-jdom
11456 (package
11457 (name "java-jdom")
11458 (version "1.1.3")
11459 (source (origin
11460 (method url-fetch)
11461 (uri (string-append "http://jdom.org/dist/binary/archive/jdom-"
11462 version ".tar.gz"))
11463 (sha256
11464 (base32
11465 "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl"))))
11466 (build-system ant-build-system)
11467 (arguments
11468 `(#:build-target "package"
11469 #:tests? #f; tests are run as part of the build process
11470 #:phases
11471 (modify-phases %standard-phases
11472 (replace 'install
11473 (install-jars "build")))))
11474 (home-page "http://jdom.org/")
11475 (synopsis "Access, manipulate, and output XML data")
11476 (description "Java-based solution for accessing, manipulating, and
11477outputting XML data from Java code.")
11478 (license license:bsd-4)))
11479
11480(define-public java-geronimo-xbean-reflect
11481 (package
11482 (name "java-geronimo-xbean-reflect")
11483 (version "4.5")
11484 (source (origin
11485 (method svn-fetch)
11486 (uri (svn-reference
11487 (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/")
11488 (revision 1807396)))
11489 (file-name (string-append name "-" version))
11490 (sha256
11491 (base32
11492 "0zjqmsad4xk0iar23hdyvx19nxczybd2bh0i35xrafli5cmh720k"))))
11493 (build-system ant-build-system)
11494 (arguments
11495 `(#:jar-name "geronimo-xbean-reflect.jar"
11496 #:source-dir "xbean-reflect/src/main/java"
11497 #:test-dir "xbean-reflect/src/test"
11498 #:jdk ,icedtea-8
11499 #:test-exclude
11500 (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java"
11501 "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java"
11502 "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java")
11503 #:phases
11504 (modify-phases %standard-phases
11505 (add-before 'build 'fix-source
11506 (lambda _
11507 (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/"))
11508 ;; org.apache.xbean.asm6 is actually repackaged java-asm
11509 (substitute* (string-append dir "XbeanAsmParameterNameLoader.java")
11510 (("org.apache.xbean.asm5") "org.objectweb.asm"))
11511 #t)))
11512 (replace 'install (install-from-pom "xbean-reflect/pom.xml")))))
11513 (inputs
11514 `(("asm" ,java-asm)
11515 ("log4j" ,java-log4j-api)
11516 ("log4j-1.2" ,java-log4j-1.2-api)
11517 ("log4j-core" ,java-log4j-core)
11518 ("logging" ,java-commons-logging-minimal)))
11519 (propagated-inputs
11520 (list java-geronimo-parent-pom))
11521 (native-inputs
11522 `(("junit" ,java-junit)))
11523 (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/")
11524 (synopsis "Dependency injection helper")
11525 (description "Xbean-reflect provides very flexible ways to create objects
11526and graphs of objects for dependency injection frameworks")
11527 (license license:asl2.0)))
11528
11529(define java-geronimo-genesis-2.1
11530 (package
11531 (name "java-geronimo-genesis")
11532 (version "2.1")
11533 (source (origin
11534 (method svn-fetch)
11535 (uri (svn-reference
11536 (url (string-append "https://svn.apache.org/repos/asf/"
11537 "geronimo/genesis/tags/genesis-"
11538 version))
11539 (revision 1807396)))
11540 (file-name (string-append name "-" version "-source"))
11541 (sha256
11542 (base32
11543 "1mky4zyl2xsqlgrkairaj5971byvhwk2z9bq8snsgvlr11ydc0zf"))))
11544 (build-system ant-build-system)
11545 (arguments
11546 `(#:tests? #f
11547 #:phases
11548 (modify-phases %standard-phases
11549 (delete 'configure)
11550 (delete 'build)
11551 (replace 'install
11552 (install-pom-file "pom.xml"))
11553 (add-after 'install 'install-enforcer-rules
11554 (install-pom-file "genesis-enforcer-rules/pom.xml"))
11555 (add-after 'install 'install-flava
11556 (install-pom-file "genesis-default-flava/pom.xml"))
11557 (add-after 'install 'install-packaging
11558 (install-pom-file "genesis-packaging/pom.xml"))
11559 (add-after 'install-flava 'install-flava-java4
11560 (install-pom-file "genesis-default-flava/genesis-java1.4-flava/pom.xml"))
11561 (add-after 'install-flava 'install-flava-java5
11562 (install-pom-file "genesis-default-flava/genesis-java5-flava/pom.xml"))
11563 (add-after 'install-flava 'install-flava-java6
11564 (install-pom-file "genesis-default-flava/genesis-java6-flava/pom.xml")))))
11565 (propagated-inputs
11566 `(("apache-parent-pom" ,apache-parent-pom-13)))
11567 (home-page "https://geronimo.apache.org")
11568 (synopsis "Collection of maven POM files for the Geronimo project")
11569 (description "Apache Geronimo is a server runtime. This package contains
11570only pom files used by other components in the Geronimo project.")
11571 (license license:asl2.0)))
11572
11573(define java-geronimo-parent-pom
11574 (package
11575 (inherit java-geronimo-xbean-reflect)
11576 (name "java-geronimo-parent-pom")
11577 (arguments
11578 `(#:tests? #f
11579 #:phases
11580 (modify-phases %standard-phases
11581 (delete 'configure)
11582 (delete 'build)
11583 (replace 'install
11584 (install-pom-file "pom.xml")))))
11585 (propagated-inputs
11586 `(("java-geronimo-genesis" ,java-geronimo-genesis-2.1)))))
11587
11588(define-public java-geronimo-xbean-bundleutils
11589 (package
11590 (inherit java-geronimo-xbean-reflect)
11591 (name "java-geronimo-xbean-bundleutils")
11592 (arguments
11593 `(#:jar-name "geronimo-xbean-bundleutils.jar"
11594 #:source-dir "xbean-bundleutils/src/main/java"
11595 #:test-dir "xbean-bundleutils/src/test"
11596 #:phases
11597 (modify-phases %standard-phases
11598 (add-before 'build 'fix-java
11599 (lambda _
11600 ;; We use a more recent version of osgi, so this file requires
11601 ;; more interface method implementations.
11602 (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java"
11603 (("import org.osgi.framework.ServiceRegistration;")
11604 "import org.osgi.framework.ServiceRegistration;
11605import org.osgi.framework.ServiceFactory;
11606import java.util.Collection;
11607import org.osgi.framework.ServiceObjects;")
11608 (("public Bundle getBundle\\(\\)")
11609 "@Override
11610public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) {
11611 throw new UnsupportedOperationException();
11612}
11613@Override
11614public <S> ServiceRegistration<S> registerService(Class<S> clazz,
11615 ServiceFactory<S> factory, Dictionary<String, ?> properties) {
11616 throw new UnsupportedOperationException();
11617}
11618public Bundle getBundle()"))
11619 #t)))))
11620 (inputs
11621 `(("java-slf4j" ,java-slf4j-api)
11622 ("java-asm" ,java-asm)
11623 ("java-osgi-framework" ,java-osgi-framework)
11624 ("java-eclipse-osgi" ,java-eclipse-osgi)
11625 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)))))
11626
11627(define-public java-geronimo-xbean-asm-util
11628 (package
11629 (inherit java-geronimo-xbean-reflect)
11630 (name "java-geronimo-xbean-asm-util")
11631 (arguments
11632 `(#:jar-name "geronimo-xbean-asm-util.jar"
11633 #:source-dir "xbean-asm-util/src/main/java"
11634 #:tests? #f)); no tests
11635 (inputs
11636 (list java-asm))
11637 (native-inputs '())))
11638
11639(define-public java-geronimo-xbean-finder
11640 (package
11641 (inherit java-geronimo-xbean-reflect)
11642 (name "java-geronimo-xbean-finder")
11643 (arguments
11644 `(#:jar-name "geronimo-xbean-finder.jar"
11645 #:source-dir "xbean-finder/src/main/java"
11646 #:test-dir "xbean-finder/src/test"))
11647 (inputs
11648 (list java-slf4j-api
11649 java-asm
11650 java-geronimo-xbean-bundleutils
11651 java-geronimo-xbean-asm-util
11652 java-osgi-service-packageadmin
11653 java-osgi-framework))
11654 (native-inputs
11655 (list java-junit java-hamcrest-core))))
11656
11657(define-public java-gson
11658 (package
11659 (name "java-gson")
11660 (version "2.8.2")
11661 (source (origin
11662 (method url-fetch)
11663 (uri (string-append "https://github.com/google/gson/archive/"
11664 "gson-parent-" version ".tar.gz"))
11665 (sha256
11666 (base32
11667 "1j4qnp7v046q0k48c4kyf69sxaasx2h949d3cqwsm3kzxms3x0f9"))))
11668 (build-system ant-build-system)
11669 (arguments
11670 `(#:jar-name "gson.jar"
11671 #:source-dir "gson/src/main/java"
11672 #:test-dir "gson/src/test"))
11673 (native-inputs
11674 (list java-junit java-hamcrest-core))
11675 (home-page "https://github.com/google/gson")
11676 (synopsis "Java serialization/deserialization library from/to JSON")
11677 (description "Gson is a Java library that can be used to convert Java
11678Objects into their JSON representation. It can also be used to convert a JSON
11679string to an equivalent Java object. Gson can work with arbitrary Java objects
11680including pre-existing objects that you do not have source-code of.")
11681 (license license:asl2.0)))
11682
11683;; This requires a different Java version than 2.8.2 above
11684(define-public java-gson-2.8.6
11685 (package
11686 (inherit java-gson)
11687 (name "java-gson")
11688 (version "2.8.6")
11689 (source (origin
11690 (method git-fetch)
11691 (uri (git-reference
11692 (url "https://github.com/google/gson")
11693 (commit (string-append "gson-parent-" version))))
11694 (file-name (git-file-name name version))
11695 (sha256
11696 (base32
11697 "0kk5p3vichdb0ph1lzknrcpbklgnmq455mngmjpxvvj29p3rgpk3"))))
11698 (arguments
11699 `(#:jar-name "gson.jar"
11700 #:jdk ,openjdk11
11701 #:source-dir "gson/src/main/java"
11702 #:test-dir "gson/src/test"
11703 #:phases
11704 (modify-phases %standard-phases
11705 ;; avoid Maven dependency
11706 (add-before 'build 'fill-template
11707 (lambda _
11708 (with-directory-excursion "gson/src/main"
11709 (copy-file "java-templates/com/google/gson/internal/GsonBuildConfig.java"
11710 "java/com/google/gson/internal/GsonBuildConfig.java")
11711 (substitute* "java/com/google/gson/internal/GsonBuildConfig.java"
11712 (("\\$\\{project.version\\}") ,version))))))))))
11713
11714(define-public java-hawtjni
11715 (package
11716 (name "java-hawtjni")
11717 (version "1.15")
11718 (source (origin
11719 (method url-fetch)
11720 (uri (string-append "https://github.com/fusesource/hawtjni/archive/"
11721 "hawtjni-project-" version ".tar.gz"))
11722 (sha256
11723 (base32
11724 "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g"))))
11725 (build-system ant-build-system)
11726 (arguments
11727 `(#:jar-name "hawtjni.jar"
11728 #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java"
11729 #:tests? #f; no tests
11730 #:phases
11731 (modify-phases %standard-phases
11732 (add-before 'build 'build-native
11733 (lambda* (#:key inputs #:allow-other-keys)
11734 (let ((include (string-append "-I" (assoc-ref inputs "jdk") "/include/linux")))
11735 (with-directory-excursion "hawtjni-generator/src/main/resources/"
11736 (invoke "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o"
11737 "-fPIC" "-O2" include)
11738 (invoke "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o"
11739 "-fPIC" "-O2" include)
11740 (invoke "gcc" "-o" "libhawtjni.so" "-shared"
11741 "hawtjni.o" "hawtjni-callback.o")))
11742 #t))
11743 (add-after 'install 'install-native
11744 (lambda* (#:key outputs #:allow-other-keys)
11745 (let* ((out (assoc-ref outputs "out"))
11746 (lib (string-append out "/lib"))
11747 (inc (string-append out "/include")))
11748 (with-directory-excursion "hawtjni-generator/src/main/resources/"
11749 (install-file "libhawtjni.so" lib)
11750 (install-file "hawtjni.h" inc)))
11751 #t))
11752 (add-before 'install 'install-parent
11753 (install-pom-file "pom.xml"))
11754 (replace 'install
11755 (install-from-pom "hawtjni-runtime/pom.xml")))))
11756 (inputs
11757 (list java-commons-cli java-asm java-geronimo-xbean-finder))
11758 (home-page "https://fusesource.github.io/hawtjni/")
11759 (synopsis "JNI code generator")
11760 (description "HawtJNI is a code generator that produces the JNI code needed
11761to implement Java native methods. It is based on the jnigen code generator
11762that is part of the SWT Tools project.")
11763 (license license:asl2.0)))
11764
11765(define-public java-jansi-native
11766 (package
11767 (name "java-jansi-native")
11768 (version "1.7")
11769 (source (origin
11770 (method url-fetch)
11771 (uri (string-append "https://github.com/fusesource/jansi-native/"
11772 "archive/jansi-native-" version ".tar.gz"))
11773 (sha256
11774 (base32
11775 "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf"))))
11776 (build-system ant-build-system)
11777 (arguments
11778 `(#:jar-name "jansi-native.jar"
11779 #:source-dir "src/main/java"
11780 #:tests? #f; no tests
11781 #:phases
11782 (modify-phases %standard-phases
11783 (add-before 'build 'build-native
11784 (lambda* (#:key inputs #:allow-other-keys)
11785 ;; there are more required files for windows in windows/
11786 (with-directory-excursion "src/main/native-package/src"
11787 (substitute* "jansi_ttyname.c"
11788 (("#include \"jansi_.*") ""))
11789 (invoke "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o"
11790 (string-append "-I" (assoc-ref inputs "java-hawtjni")
11791 "/include")
11792 (string-append "-I" (assoc-ref inputs "jdk")
11793 "/include/linux")
11794 "-fPIC" "-O2")
11795 (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o"))))
11796 (add-before 'build 'install-native
11797 (lambda _
11798 (let ((dir (string-append "build/classes/META-INF/native/"
11799 ,(match (%current-system)
11800 ((or "i686-linux" "armhf-linux")
11801 "linux32")
11802 ((or "x86_64-linux" "aarch64-linux"
11803 "mips64el-linux")
11804 "linux64")
11805 (_ "unknown-kernel")))))
11806 (install-file "src/main/native-package/src/libjansi.so" dir))
11807 #t))
11808 (add-after 'install 'install-native
11809 (lambda* (#:key outputs #:allow-other-keys)
11810 (install-file "src/main/native-package/src/jansi.h"
11811 (string-append (assoc-ref outputs "out") "/include"))
11812 #t))
11813 (add-before 'install 'fix-pom
11814 (lambda _
11815 ;; pom contains variables to complete name, but we don't support that
11816 (substitute* "pom.xml"
11817 (("\\$\\{platform\\}") "native"))
11818 #t))
11819 (replace 'install
11820 (install-from-pom "pom.xml")))))
11821 (propagated-inputs
11822 (list java-hawtjni))
11823 (home-page "https://fusesource.github.io/jansi/")
11824 (synopsis "Native library for jansi")
11825 (description "This package provides the native library for jansi, a small
11826Java library that allows you to use ANSI escape sequences to format your
11827console output.")
11828 (license license:asl2.0)))
11829
11830(define-public java-jansi
11831 (package
11832 (name "java-jansi")
11833 (version "2.4.0")
11834 (source (origin
11835 (method git-fetch)
11836 (uri (git-reference
11837 (url "https://github.com/fusesource/jansi")
11838 (commit (string-append "jansi-" version))))
11839 (file-name (git-file-name name version))
11840 (sha256
11841 (base32
11842 "1s6fva06990798b5fyxqzr30zwyj1byq5wrm54j2larcydaryggf"))
11843 (modules '((guix build utils)))
11844 (snippet
11845 ;; contains pre-compiled libraries
11846 '(delete-file-recursively
11847 "src/main/resources/org/fusesource/jansi/internal"))))
11848 (build-system ant-build-system)
11849 (arguments
11850 `(#:jar-name "jansi.jar"
11851 #:source-dir "src/main/java"
11852 #:test-dir "src/test"
11853 #:tests? #f; require junit 3
11854 #:phases
11855 (modify-phases %standard-phases
11856 (add-before 'build 'build-native
11857 (lambda* (#:key inputs #:allow-other-keys)
11858 (with-directory-excursion "src/main/native"
11859 (for-each
11860 (lambda (cfile)
11861 (let ((cfile (basename cfile))
11862 (ofile (string-append (basename cfile ".c") ".o")))
11863 (invoke ,(cc-for-target) "-c" cfile "-o" ofile
11864 (string-append "-I" (assoc-ref inputs "jdk")
11865 "/include/linux")
11866 "-fPIC" "-O2")))
11867 (find-files "." "\\.c$"))
11868 (apply invoke ,(cc-for-target) "-o" "libjansi.so" "-shared"
11869 (find-files "." "\\.o$")))))
11870 (add-before 'build 'install-native
11871 (lambda _
11872 (let ((dir (string-append "build/classes/org/fusesource/"
11873 "jansi/internal/native/"
11874 ,(match (or (%current-target-system) (%current-system))
11875 ("i686-linux" "Linux/x86")
11876 ("x86_64-linux" "Linux/x86_64")
11877 ("armhf-linux" "Linux/armv7")
11878 ("aarch64-linux" "Linux/arm64")
11879 ("mips64el-linux" "Linux/mips64")
11880 (_ "unknown-kernel")))))
11881 (install-file "src/main/native/libjansi.so" dir))))
11882 (add-before 'build 'copy-resources
11883 (lambda _
11884 (copy-recursively "src/main/resources" "build/classes")))
11885 (replace 'install
11886 (install-from-pom "pom.xml")))))
11887 (home-page "https://fusesource.github.io/jansi/")
11888 (synopsis "Portable ANSI escape sequences")
11889 (description "Jansi is a Java library that allows you to use ANSI escape
11890sequences to format your console output which works on every platform.")
11891 (license license:asl2.0)))
11892
11893(define-public java-jansi-1
11894 (package
11895 (inherit java-jansi)
11896 (version "1.16")
11897 (source (origin
11898 (method git-fetch)
11899 (uri (git-reference
11900 (url "https://github.com/fusesource/jansi")
11901 (commit (string-append "jansi-project-" version))))
11902 (file-name (git-file-name "jansi" version))
11903 (sha256
11904 (base32
11905 "0ikk0x352gh30b42qn1jd89xwsjj0mavrc5kms7fss15bd8vsayx"))))
11906 (arguments
11907 `(#:jar-name "jansi.jar"
11908 #:source-dir "jansi/src/main/java"
11909 #:test-dir "jansi/src/test"
11910 #:phases
11911 (modify-phases %standard-phases
11912 (add-after 'check 'clear-term
11913 (lambda _
11914 (invoke "echo" "-e" "\\e[0m")))
11915 (add-before 'install 'install-parent
11916 (install-pom-file "pom.xml"))
11917 (add-before 'install 'fix-pom
11918 (lambda _
11919 ;; pom adds jansi native versions for different platforms, but we
11920 ;; only need one, so use native instead
11921 (substitute* "jansi/pom.xml"
11922 (("windows32") "native")
11923 (("windows64") "native")
11924 (("osx") "native")
11925 (("linux32") "native")
11926 (("linux64") "native")
11927 (("freebsd32") "native")
11928 (("freebsd64") "native"))
11929 #t))
11930 (replace 'install
11931 (install-from-pom "jansi/pom.xml")))))
11932 (propagated-inputs
11933 (list java-jansi-native))
11934 (native-inputs
11935 (list java-junit java-hamcrest-core))))
11936
11937(define-public java-jboss-el-api-spec
11938 (package
11939 (name "java-jboss-el-api-spec")
11940 (version "3.0")
11941 (source (origin
11942 (method url-fetch)
11943 (uri (string-append "https://github.com/jboss/jboss-el-api_spec/"
11944 "archive/jboss-el-api_" version
11945 "_spec-1.0.7.Final.tar.gz"))
11946 (sha256
11947 (base32
11948 "1j45ljxalwlibxl7g7iv952sjxkw275m8vyxxij8l6wdd5pf0pdh"))))
11949 (build-system ant-build-system)
11950 (arguments
11951 `(#:jar-name "java-jboss-el-api_spec.jar"
11952 #:phases
11953 (modify-phases %standard-phases
11954 ;; the origin of javax.el:javax.el-api is unknown, so we use this package
11955 ;; instead, which implements the same thing. We override the pom file
11956 ;; to "rename" the package so it can be found by maven.
11957 (add-before 'install 'override-pom
11958 (generate-pom.xml "pom.xml" "javax.el" "javax.el-api" "3.0"
11959 #:name "el-api"))
11960 (replace 'install
11961 (install-from-pom "pom.xml")))))
11962 (inputs
11963 (list java-junit))
11964 (home-page "https://github.com/jboss/jboss-el-api_spec")
11965 (synopsis "JSR-341 expression language 3.0 API")
11966 (description "This package contains an implementation of the JSR-341
11967specification for the expression language 3.0. It implements an expression
11968language inspired by ECMAScript and XPath. This language is used with
11969JavaServer Pages (JSP).")
11970 ;; Either GPL2 only or CDDL.
11971 (license (list license:gpl2 license:cddl1.1))))
11972
11973(define-public java-jboss-interceptors-api-spec
11974 (package
11975 (name "java-jboss-interceptors-api-spec")
11976 (version "1.2")
11977 (source (origin
11978 (method url-fetch)
11979 (uri (string-append "https://github.com/jboss/jboss-interceptors-api_spec/"
11980 "archive/jboss-interceptors-api_" version
11981 "_spec-1.0.0.Final.tar.gz"))
11982 (sha256
11983 (base32
11984 "0wv8x0jp9a5qxlrgkhb5jdk2gr6vi87b4j4kjb8ryxiy9gn8g51z"))))
11985 (build-system ant-build-system)
11986 (arguments
11987 `(#:jar-name "java-jboss-interceptors-api_spec.jar"
11988 #:jdk ,icedtea-8
11989 #:source-dir "."
11990 #:tests? #f; no tests
11991 #:phases
11992 (modify-phases %standard-phases
11993 ;; the origin of javax.interceptor:javax.interceptor-api is unknown,
11994 ;; so we use this package instead, which implements the same thing.
11995 ;; We override the pom file to "rename" the package so it can be found
11996 ;; by maven.
11997 (add-before 'install 'override-pom
11998 (generate-pom.xml "pom.xml" "javax.interceptor" "javax.interceptor-api"
11999 "3.0" #:name "interceptor-api"))
12000 (replace 'install
12001 (install-from-pom "pom.xml")))))
12002 (home-page "https://github.com/jboss/jboss-interceptors-api_spec")
12003 (synopsis "Interceptors 1.2 API classes from JSR 318")
12004 (description "Java-jboss-interceptors-api-spec implements the Interceptors
12005API. Interceptors are used to interpose on business method invocations and
12006specific events.")
12007 ;; Either GPL2 only or CDDL.
12008 (license (list license:gpl2 license:cddl1.1))))
12009
12010(define-public java-cdi-api
12011 (package
12012 (name "java-cdi-api")
12013 (version "2.0")
12014 (source (origin
12015 (method url-fetch)
12016 (uri (string-append "https://github.com/cdi-spec/cdi/archive/"
12017 version ".tar.gz"))
12018 (file-name (string-append name "-" version ".tar.gz"))
12019 (sha256
12020 (base32
12021 "1iv8b8bp07c5kmqic14jsr868vycjv4qv02lf3pkgp9z21mnfg5y"))))
12022 (build-system ant-build-system)
12023 (arguments
12024 `(#:source-dir "api/src/main/java"
12025 #:jar-name "java-cdi-api.jar"
12026 #:test-dir "api/src/test"
12027 #:jdk ,icedtea-8
12028 #:tests? #f; Tests fail because we don't have a CDI provider yet
12029 #:phases
12030 (modify-phases %standard-phases
12031 (replace 'install
12032 (install-from-pom "api/pom.xml")))))
12033 (propagated-inputs
12034 (list java-javax-inject java-jboss-el-api-spec
12035 java-jboss-interceptors-api-spec java-weld-parent-pom))
12036 (native-inputs
12037 (list java-testng java-hamcrest-core))
12038 (home-page "https://cdi-spec.org/")
12039 (synopsis "Contexts and Dependency Injection APIs")
12040 (description "Java-cdi-api contains the required APIs for Contexts and
12041Dependency Injection (CDI).")
12042 (license license:asl2.0)))
12043
12044(define-public java-joda-convert
12045 (package
12046 (name "java-joda-convert")
12047 (version "1.9.2")
12048 (source (origin
12049 (method url-fetch)
12050 (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v"
12051 version ".tar.gz"))
12052 (file-name (string-append name "-" version ".tar.gz"))
12053 (sha256
12054 (base32
12055 "0vp346xz7dh9br4q7xazhc7hvzf76a6hf95fki9bg67q5jr0kjh7"))))
12056 (build-system ant-build-system)
12057 (arguments
12058 `(#:jar-name (string-append ,name "-" ,version ".jar")
12059 #:source-dir "src/main/java"
12060 #:test-include (list "**/Test*.java")
12061 ;; Contains only interfaces and base classes (no test)
12062 #:test-exclude (list "**/test*/**.java")))
12063 (inputs
12064 (list java-guava))
12065 (native-inputs
12066 (list java-junit java-hamcrest-core))
12067 (home-page "https://www.joda.org/joda-convert/")
12068 (synopsis "Conversion between Objects and Strings")
12069 (description "Joda-Convert provides a small set of classes to aid
12070conversion between Objects and Strings. It is not intended to tackle the
12071wider problem of Object to Object transformation.")
12072 (license license:asl2.0)))
12073
12074(define-public java-joda-time
12075 (package
12076 (name "java-joda-time")
12077 (version "2.9.9")
12078 (source (origin
12079 (method url-fetch)
12080 (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v"
12081 version ".tar.gz"))
12082 (file-name (string-append name "-" version ".tar.gz"))
12083 (sha256
12084 (base32
12085 "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1"))))
12086 (build-system ant-build-system)
12087 (arguments
12088 `(#:jar-name "java-joda-time.jar"
12089 #:source-dir "src/main/java"
12090 #:test-include (list "**/Test*.java")
12091 ;; There is no runnable test in these files
12092 #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java")
12093 #:phases
12094 (modify-phases %standard-phases
12095 (add-after 'build 'build-resources
12096 (lambda _
12097 (mkdir-p "build/classes/org/joda/time/tz/data")
12098 (mkdir-p "build/classes/org/joda/time/format")
12099 ;; This will produce the following exception:
12100 ;; java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap"
12101 ;; which is normal, because it doesn't exist yet. It still generates
12102 ;; the same file as in the binary one can find on maven.
12103 (invoke "java" "-cp"
12104 (string-append "build/classes:" (getenv "CLASSPATH"))
12105 "org.joda.time.tz.ZoneInfoCompiler"
12106 "-src" "src/main/java/org/joda/time/tz/src"
12107 "-dst" "build/classes/org/joda/time/tz/data"
12108 "africa" "antarctica" "asia" "australasia"
12109 "europe" "northamerica" "southamerica"
12110 "pacificnew" "etcetera" "backward" "systemv")
12111 (for-each (lambda (f)
12112 (copy-file f (string-append
12113 "build/classes/org/joda/time/format/"
12114 (basename f))))
12115 (find-files "src/main/java/org/joda/time/format" ".*.properties"))
12116 #t))
12117 (add-before 'install 'regenerate-jar
12118 (lambda _
12119 ;; We need to regenerate the jar file to add generated data.
12120 (delete-file "build/jar/java-joda-time.jar")
12121 (invoke "ant" "jar")))
12122 (add-before 'check 'copy-test-resources
12123 (lambda _
12124 (mkdir-p "build/test-classes/org/joda/time/tz/data")
12125 (copy-file "src/test/resources/tzdata/ZoneInfoMap"
12126 "build/test-classes/org/joda/time/tz/data/ZoneInfoMap")
12127 (copy-recursively "src/test/resources" "build/test-classes")
12128 #t)))))
12129 (inputs
12130 (list java-joda-convert))
12131 (native-inputs
12132 (list java-junit java-hamcrest-core tzdata))
12133 (home-page "https://www.joda.org/joda-time/")
12134 (synopsis "Replacement for the Java date and time classes")
12135 (description "Joda-Time is a replacement for the Java date and time
12136classes prior to Java SE 8.")
12137 (license license:asl2.0)))
12138
12139(define-public java-xerces
12140 (package
12141 (name "java-xerces")
12142 (version "2.12.1")
12143 (source
12144 (origin
12145 (method url-fetch)
12146 (uri (string-append "mirror://apache/xerces/j/source/"
12147 "Xerces-J-src." version ".tar.gz"))
12148 (sha256
12149 (base32 "0494kq36gw3nah19ifb720vwxbpg4ww0k6m3zq6wyanw6a083p6s"))
12150 (patches (search-patches
12151 "java-xerces-xjavac_taskdef.patch"
12152 "java-xerces-build_dont_unzip.patch"
12153 "java-xerces-bootclasspath.patch"))))
12154 (build-system ant-build-system)
12155 (arguments
12156 `(#:tests? #f;; Test files are not present
12157 #:test-target "test"
12158 #:jdk ,icedtea-8
12159 #:phases
12160 (modify-phases %standard-phases
12161 (add-after 'unpack 'create-build.properties
12162 (lambda* (#:key inputs #:allow-other-keys)
12163 (let ((jaxp (assoc-ref inputs "java-jaxp"))
12164 (resolver (assoc-ref inputs "java-apache-xml-commons-resolver")))
12165 (with-output-to-file "build.properties"
12166 (lambda _
12167 (format #t
12168 "jar.jaxp = ~a/share/java/jaxp.jar~@
12169 jar.apis-ext = ~a/share/java/jaxp.jar~@
12170 jar.resolver = ~a/share/java/xml-resolver.jar~%"
12171 jaxp jaxp resolver)))
12172 ;; Make xerces use our version of jaxp in tests
12173 (substitute* "build.xml"
12174 (("xml-apis.jar")
12175 (string-append jaxp "/share/java/jaxp.jar"))
12176 (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}")
12177 "${jar.apis}")))
12178 #t))
12179 (replace 'install (install-jars "build")))))
12180 (inputs
12181 (list java-apache-xml-commons-resolver java-jaxp))
12182 (home-page "https://xerces.apache.org/xerces2-j/")
12183 (synopsis "Validating XML parser for Java with DOM level 3 support")
12184 (description "The Xerces2 Java parser is the reference implementation of
12185XNI, the Xerces Native Interface, and also a fully conforming XML Schema
12186processor.
12187
12188Xerces2-J supports the following standards and APIs:
12189
12190@itemize
12191@item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation
12192@item Namespaces in XML Recommendation
12193@item Document Object Model (DOM) Level 2 Core, Events, and Traversal and
12194 Range Recommendations
12195@item Simple API for XML (SAX) 2.0.1 Core and Extension
12196@item Java APIs for XML Processing (JAXP) 1.2.01
12197@item XML Schema 1.0 Structures and Datatypes Recommendations
12198@item Experimental implementation of the Document Object Model (DOM) Level 3
12199 Core and Load/Save Working Drafts
12200@item Provides a partial implementation of the XML Inclusions (XInclude) W3C
12201 Candidate Recommendation
12202@end itemize
12203
12204Xerces is now able to parse documents written according to the XML 1.1
12205Candidate Recommendation, except that it does not yet provide an option to
12206enable normalization checking as described in section 2.13 of this
12207specification. It also handles namespaces according to the XML Namespaces 1.1
12208Candidate Recommendation, and will correctly serialize XML 1.1 documents if
12209the DOM level 3 load/save API's are in use.")
12210 (license license:asl2.0)))
12211
12212(define-public java-jakarta-regexp
12213 (package
12214 (name "java-jakarta-regexp")
12215 (version "1.5")
12216 (source
12217 (origin
12218 (method url-fetch)
12219 (uri (string-append
12220 "https://archive.apache.org/dist/jakarta/regexp/jakarta-regexp-"
12221 version ".tar.gz"))
12222 (sha256
12223 (base32
12224 "0zg9rmyif48dck0cv6ynpxv23mmcsx265am1fnnxss7brgw0ms3r"))))
12225 (build-system ant-build-system)
12226 (arguments
12227 `(#:test-target "test"
12228 #:phases
12229 (modify-phases %standard-phases
12230 (replace 'install
12231 (lambda* (#:key outputs #:allow-other-keys)
12232 (let* ((out (assoc-ref outputs "out"))
12233 (out-share (string-append out "/share/java")))
12234 (mkdir-p out-share)
12235 (for-each (lambda (name)
12236 (install-file name out-share))
12237 (find-files "build" "^jakarta-regexp-.*\\.jar$"))
12238 #t))))))
12239 (home-page "https://attic.apache.org/projects/jakarta-regexp.html")
12240 (synopsis "Regular expression parser generator for Java")
12241 (description "@code{jakarta-regexp} is an old regular expression parser
12242generator for Java.")
12243 (license license:asl2.0)))
12244
12245(define-public java-jline
12246 (package
12247 (name "java-jline")
12248 (version "1.0")
12249 (source (origin
12250 (method url-fetch)
12251 (uri (string-append "https://github.com/jline/jline1/archive/jline-"
12252 version ".tar.gz"))
12253 (sha256
12254 (base32
12255 "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir"))))
12256 (build-system ant-build-system)
12257 (arguments
12258 `(#:jar-name "jline.jar"
12259 #:source-dir "src/main/java"
12260 #:test-dir "src/test"
12261 #:phases
12262 (modify-phases %standard-phases
12263 (add-before 'build 'copy-resources
12264 (lambda _
12265 (copy-recursively "src/main/resources" "build/classes")
12266 #t)))))
12267 (native-inputs
12268 (list java-junit))
12269 (home-page "https://jline.github.io")
12270 (synopsis "Console input handling library")
12271 (description "JLine is a Java library for handling console input. It is
12272similar in functionality to BSD editline and GNU readline but with additional
12273features that bring it on par with the Z shell line editor.")
12274 (license license:bsd-3)))
12275
12276(define-public java-jline-2
12277 (package
12278 (inherit java-jline)
12279 (version "2.14.5")
12280 (source (origin
12281 (method url-fetch)
12282 (uri (string-append "https://github.com/jline/jline2/archive/jline-"
12283 version ".tar.gz"))
12284 (sha256
12285 (base32
12286 "1c6qa26mf0viw8hg4jnv72s7i1qb1gh1l8rrzcdvqhqhx82rkdlf"))))
12287 (arguments
12288 `(#:jdk ,icedtea-8
12289 ,@(package-arguments java-jline)))
12290 (inputs
12291 (list java-jansi-1 java-jansi-native))
12292 (native-inputs
12293 (list java-powermock-modules-junit4
12294 java-powermock-modules-junit4-common
12295 java-powermock-api-easymock
12296 java-powermock-api-support
12297 java-powermock-core
12298 java-powermock-reflect
12299 java-easymock
12300 java-jboss-javassist
12301 java-objenesis
12302 java-asm
12303 java-hamcrest-core
12304 java-cglib
12305 java-junit
12306 java-hawtjni))))
12307
12308(define-public java-jline-terminal
12309 (package
12310 (name "java-jline-terminal")
12311 (version "3.14.1")
12312 (source (origin
12313 (method git-fetch)
12314 (uri (git-reference
12315 (url "https://github.com/jline/jline3")
12316 (commit (string-append "jline-parent-" version))))
12317 (file-name (git-file-name name version))
12318 (sha256
12319 (base32
12320 "0ilhk9ljp0pivl1rn0bb06syshc67p6imcjhrg6vr7kv15p3w4lr"))))
12321 (build-system ant-build-system)
12322 (arguments
12323 `(#:jar-name "jline-terminal.jar"
12324 #:jdk ,openjdk11
12325 #:tests? #f; TODO: tests fail on *.caps resource lookups
12326 #:source-dir "terminal/src/main/java"
12327 #:test-dir "terminal/src/test"
12328 #:phases
12329 (modify-phases %standard-phases
12330 (add-after 'unpack 'remove-build-file
12331 (lambda _
12332 ;; Conflicts with build directory generated by ant-build-system.
12333 (delete-file "build")))
12334 (add-after 'unpack 'patch-paths
12335 (lambda* (#:key inputs #:allow-other-keys)
12336 (substitute* "terminal/src/main/java/org/jline/utils/OSUtils.java"
12337 (("= \"infocmp\"")
12338 (string-append "= \"" (assoc-ref inputs "ncurses")
12339 "/bin/infocmp\""))
12340 (("= \"(s?tty)\"" _ cmd)
12341 (string-append "= \"" (assoc-ref inputs "coreutils")
12342 "/bin/" cmd "\"")))))
12343 ;; Resources are not added to the JAR by ant-build-system.
12344 (add-after 'build 'add-resources
12345 (lambda* (#:key jar-name source-dir #:allow-other-keys)
12346 (let ((build (string-append (getcwd) "/build")))
12347 (with-directory-excursion
12348 (string-append source-dir "/../resources")
12349 (apply invoke "jar" "-uvf"
12350 (string-append build "/jar/" jar-name)
12351 (find-files ".")))))))))
12352 (inputs
12353 (list ncurses)); infocmp
12354 (home-page "https://github.com/jline/jline3")
12355 (synopsis "Java JLine Terminal API and implementations")
12356 (description "JLine is a Java library for handling console input. It is
12357similar in functionality to BSD editline and GNU readline but with additional
12358features that bring it in par with ZSH line editor. People familiar with the
12359readline/editline capabilities for modern shells (such as bash and tcsh) will
12360find most of the command editing features of JLine to be familiar.
12361
12362This package includes the @var{Terminal} API and implementations.")
12363 (license license:bsd-3)))
12364
12365(define-public java-jline-reader
12366 (package
12367 (name "java-jline-reader")
12368 (version "3.14.1")
12369 (source (origin
12370 (method git-fetch)
12371 (uri (git-reference
12372 (url "https://github.com/jline/jline3")
12373 (commit (string-append "jline-parent-" version))))
12374 (file-name (git-file-name name version))
12375 (sha256
12376 (base32
12377 "0ilhk9ljp0pivl1rn0bb06syshc67p6imcjhrg6vr7kv15p3w4lr"))))
12378 (build-system ant-build-system)
12379 (arguments
12380 `(#:jar-name "jline-reader.jar"
12381 #:jdk ,openjdk11
12382 #:source-dir "reader/src/main/java"
12383 #:test-dir "reader/src/test"
12384 #:phases
12385 (modify-phases %standard-phases
12386 (add-before 'build 'remove-build-file
12387 (lambda _
12388 ;; conflicts with build directory generated by ant-build-system
12389 (delete-file "build"))))))
12390 (native-inputs
12391 (list java-junit java-easymock))
12392 (inputs
12393 (list java-jline-terminal))
12394 (home-page "https://github.com/jline/jline3")
12395 (synopsis "Java JLine line reader")
12396 (description "JLine is a Java library for handling console input. It is
12397similar in functionality to BSD editline and GNU readline but with additional
12398features that bring it in par with ZSH line editor. People familiar with the
12399readline/editline capabilities for modern shells (such as bash and tcsh) will
12400find most of the command editing features of JLine to be familiar.
12401
12402This package includes the line reader.")
12403 (license license:bsd-3)))
12404
12405(define-public java-xmlunit
12406 (package
12407 (name "java-xmlunit")
12408 (version "2.5.1")
12409 (source (origin
12410 (method url-fetch)
12411 (uri (string-append "https://github.com/xmlunit/xmlunit/archive/v"
12412 version ".tar.gz"))
12413 (file-name (string-append name "-" version ".tar.gz"))
12414 (sha256
12415 (base32
12416 "035rivlnmwhfqj0fzviciv0bkh1h95ps1iwnh2kjcvdbk5nccm4z"))))
12417 (build-system ant-build-system)
12418 (arguments
12419 `(#:jar-name "java-xmlunit.jar"
12420 #:source-dir "xmlunit-core/src/main/java"
12421 #:test-dir "xmlunit-core/src/test"
12422 #:phases
12423 (modify-phases %standard-phases
12424 (add-before 'check 'copy-test-resources
12425 (lambda* (#:key inputs #:allow-other-keys)
12426 (copy-recursively (assoc-ref inputs "resources") "../test-resources")
12427 #t)))))
12428 (native-inputs
12429 `(("java-junit" ,java-junit)
12430 ("java-mockito-1" ,java-mockito-1)
12431 ("java-hamcrest-all" ,java-hamcrest-all)
12432 ("java-objenesis" ,java-objenesis)
12433 ("java-asm" ,java-asm)
12434 ("java-cglib" ,java-cglib)
12435 ("resources"
12436 ,(origin
12437 (method git-fetch)
12438 (uri (git-reference
12439 (url "https://github.com/xmlunit/test-resources")
12440 (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec")))
12441 (file-name "java-xmlunit-test-resources")
12442 (sha256
12443 (base32
12444 "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr"))))))
12445 (home-page "https://www.xmlunit.org/")
12446 (synopsis "XML output testing")
12447 (description "XMLUnit provides you with the tools to verify the XML you
12448emit is the one you want to create. It provides helpers to validate against
12449an XML Schema, assert the values of XPath queries or compare XML documents
12450against expected outcomes.")
12451 (license license:asl2.0)))
12452
12453(define-public java-xmlunit-legacy
12454 (package
12455 (inherit java-xmlunit)
12456 (name "java-xmlunit-legacy")
12457 (arguments
12458 `(#:jar-name "java-xmlunit-legacy.jar"
12459 #:source-dir "xmlunit-legacy/src/main/java"
12460 #:test-dir "xmlunit-legacy/src/test"))
12461 (inputs
12462 (list java-xmlunit java-junit))
12463 (native-inputs
12464 `(("java-mockito-1" ,java-mockito-1)))))
12465
12466(define-public java-xmlunit-matchers
12467 (package
12468 (inherit java-xmlunit)
12469 (name "java-xmlunit-matchers")
12470 (arguments
12471 `(#:jar-name "java-xmlunit-matchers.jar"
12472 #:source-dir "xmlunit-matchers/src/main/java"
12473 #:test-dir "xmlunit-matchers/src/test"
12474 #:test-exclude
12475 ;; Cannot open xsd for http://www.xmlunit.org/test-support/Book.xsd
12476 (list "**/ValidationMatcherTest.java")
12477 #:phases
12478 (modify-phases %standard-phases
12479 (add-before 'build 'copy-test-class
12480 (lambda _
12481 (copy-file "xmlunit-core/src/test/java/org/xmlunit/TestResources.java"
12482 "xmlunit-matchers/src/test/java/org/xmlunit/TestResources.java")
12483 #t))
12484 (add-before 'build 'fix-test-resources-path
12485 (lambda _
12486 (substitute* (find-files "xmlunit-matchers/src/test" ".*.java")
12487 (("../test-resources") "test-resources"))
12488 #t))
12489 (add-before 'check 'copy-test-resources
12490 (lambda* (#:key inputs #:allow-other-keys)
12491 (copy-recursively (assoc-ref inputs "resources") "test-resources")
12492 #t)))))
12493 (inputs
12494 (list java-xmlunit java-junit))))
12495
12496(define-public java-openchart2
12497 (package
12498 (name "java-openchart2")
12499 (version "1.4.3")
12500 (source (origin
12501 (method url-fetch)
12502 (uri (string-append "http://download.approximatrix.com/openchart2/"
12503 "openchart2-" version ".source.zip"))
12504 (sha256
12505 (base32
12506 "1xq96zm5r02n1blja0072jmmsifmxc40lbyfbnmcnr6mw42frh4g"))))
12507 (build-system ant-build-system)
12508 (arguments
12509 `(#:test-target "test"
12510 #:phases
12511 (modify-phases %standard-phases
12512 (add-after 'unpack 'fix-junit-errors
12513 (lambda _
12514 (with-directory-excursion "unittest/src/com/approximatrix/charting/"
12515 (substitute* '("coordsystem/ticklocator/NumericXTickLocatorTest.java"
12516 "coordsystem/ticklocator/NumericYTickLocatorTest.java"
12517 "coordsystem/ticklocator/ObjectXTickLocatorTest.java"
12518 "model/DefaultChartDataModelConstraintsTest.java"
12519 "model/MultiScatterDataModelConstraintsTest.java"
12520 "model/threedimensional/DotPlotDataModelConstraintsTest.java")
12521 (("(assertEquals[^;]+);" before _)
12522 (string-append (string-drop-right before 2) ", 1E-6);"))))
12523 #t))
12524 (replace 'install (install-jars ".")))))
12525 (native-inputs
12526 (list unzip java-junit java-hamcrest-core))
12527 (home-page "https://approximatrix.com/products/openchart2/")
12528 (synopsis "Simple plotting for Java")
12529 (description "Openchart2 provides a simple, yet powerful, interface for
12530Java programmers to create two-dimensional charts and plots. The library
12531features an assortment of graph styles, including advanced scatter plots, bar
12532graphs, and pie charts.")
12533 (license license:lgpl2.1+)))
12534
12535(define-public java-commons-httpclient
12536 (package
12537 (name "java-commons-httpclient")
12538 (version "3.1")
12539 (source (origin
12540 (method url-fetch)
12541 (uri (string-append "mirror://apache/httpcomponents/"
12542 "commons-httpclient/source/commons-httpclient-"
12543 version "-src.tar.gz"))
12544 (sha256
12545 (base32
12546 "1wlpn3cfy3d4inxy6g7wxcsa8p7sshn6aldk9y4ia3lb879rd97r"))))
12547 (build-system ant-build-system)
12548 (arguments
12549 `(#:build-target "compile"
12550 #:test-target "test"
12551 #:tests? #f; requires junit-textui (junit 3)
12552 #:phases
12553 (modify-phases %standard-phases
12554 (add-before 'build 'fix-accent
12555 (lambda _
12556 (for-each (lambda (file)
12557 (with-fluids ((%default-port-encoding "ISO-8859-1"))
12558 (substitute* file
12559 (("\\* @author Ortwin .*") "* @author Ortwin Glueck\n"))))
12560 '("src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java"
12561 "src/examples/TrivialApp.java" "src/examples/ClientApp.java"
12562 "src/test/org/apache/commons/httpclient/TestHttps.java"
12563 "src/test/org/apache/commons/httpclient/TestURIUtil2.java"))
12564 #t))
12565 (replace 'install
12566 (lambda* (#:key outputs #:allow-other-keys)
12567 (invoke "ant" "dist"
12568 (string-append "-Ddist.home=" (assoc-ref outputs "out")
12569 "/share/java"))
12570 #t)))))
12571 (propagated-inputs
12572 `(("java-commons-logging" ,java-commons-logging-minimal)
12573 ("java-commons-codec" ,java-commons-codec)))
12574 (home-page "https://hc.apache.org")
12575 (synopsis "HTTP/1.1 compliant HTTP agent implementation")
12576 (description "This package contains an HTTP/1.1 compliant HTTP agent
12577implementation. It also provides reusable components for client-side
12578authentication, HTTP state management, and HTTP connection management.")
12579 (license license:asl2.0)))
12580
12581(define-public java-commons-vfs
12582 (package
12583 (name "java-commons-vfs")
12584 (version "2.2")
12585 (source (origin
12586 (method url-fetch)
12587 (uri (string-append "mirror://apache/commons/vfs/source/"
12588 "commons-vfs2-distribution-" version "-src.tar.gz"))
12589 (file-name (string-append name "-" version ".tar.gz"))
12590 (sha256
12591 (base32
12592 "1cnq1iaghbp4cslpnvwbp83i5v234x87irssqynhwpfgw7caf1s3"))
12593 (modules '((guix build utils)))
12594 (snippet
12595 '(begin
12596 (for-each delete-file
12597 (find-files "." "\\.jar$"))
12598 #t))))
12599 (build-system ant-build-system)
12600 (arguments
12601 `(#:jar-name "commons-vfs.jar"
12602 #:source-dir "commons-vfs2/src/main/java"
12603 #:test-dir "commons-vfs2/src/test"
12604 ; FIXME: tests depend on many things: apache sshd, hadoop, ftpserver, ...
12605 #:tests? #f
12606 #:phases
12607 (modify-phases %standard-phases
12608 (add-before 'build 'remove-hadoop-and-webdav
12609 ; Remove these files as they are not required and depend on difficult
12610 ; packages.
12611 (lambda _
12612 (for-each delete-file-recursively
12613 '("commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/webdav"
12614 "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs"))
12615 #t)))))
12616 (inputs
12617 (list java-commons-collections4
12618 java-commons-compress
12619 java-commons-httpclient
12620 java-commons-logging-minimal
12621 java-commons-net
12622 java-jsch))
12623 (home-page "https://commons.apache.org/proper/commons-vfs/")
12624 (synopsis "Java file system library")
12625 (description "Commons VFS provides a single API for accessing various
12626different file systems. It presents a uniform view of the files from various
12627different sources, such as the files on local disk, on an HTTP server, or
12628inside a Zip archive.")
12629 (license license:asl2.0)))
12630
12631(define-public java-jakarta-oro
12632 (package
12633 (name "java-jakarta-oro")
12634 (version "2.0.8")
12635 (source (origin
12636 (method url-fetch)
12637 (uri (string-append "mirror://apache/jakarta/oro/"
12638 "jakarta-oro-" version ".tar.gz"))
12639 (sha256
12640 (base32
12641 "0rpmnsskiwmsy8r0sckz5n5dbvh3vkxx8hpm177c754r8xy3qksc"))
12642 (modules '((guix build utils)))
12643 (snippet
12644 `(begin
12645 (delete-file (string-append "jakarta-oro-" ,version ".jar"))
12646 #t))))
12647 (build-system ant-build-system)
12648 (arguments
12649 `(#:build-target "package"
12650 #:make-flags (list "-DDATE" "(no recorded date for reproducibility)")
12651 #:tests? #f; tests are run as part of the build process
12652 #:phases
12653 (modify-phases %standard-phases
12654 (replace 'install
12655 (install-jars ,(string-append "jakarta-oro-" version))))))
12656 (home-page "https://jakarta.apache.org/oro/")
12657 (synopsis "Text-processing for Java")
12658 (description "The Jakarta-ORO Java classes are a set of text-processing
12659Java classes that provide Perl5 compatible regular expressions, AWK-like
12660regular expressions, glob expressions, and utility classes for performing
12661substitutions, splits, filtering filenames, etc. This library is the successor
12662of the OROMatcher, AwkTools, PerlTools, and TextTools libraries originally
12663from ORO, Inc.")
12664 (license license:asl1.1)))
12665
12666(define-public java-native-access
12667 (package
12668 (name "java-native-access")
12669 (version "4.5.1")
12670 (source (origin
12671 (method url-fetch)
12672 (uri (string-append "https://github.com/java-native-access/jna/"
12673 "archive/" version ".tar.gz"))
12674 (file-name (string-append name "-" version ".tar.gz"))
12675 (sha256
12676 (base32
12677 "0zrpzkib6b905i018a9pqlzkqinphywr6y4jwv6mwp63jjqvqkd9"))
12678 (modules '((guix build utils)))
12679 (snippet
12680 `(begin
12681 (for-each delete-file (find-files "." ".*.jar"))
12682 (delete-file-recursively "native/libffi")
12683 (delete-file-recursively "dist")
12684 #t))))
12685 (build-system ant-build-system)
12686 (arguments
12687 `(#:tests? #f; FIXME: tests require reflections.jar
12688 #:test-target "test"
12689 #:make-flags (list "-Ddynlink.native=true")
12690 #:phases
12691 (modify-phases %standard-phases
12692 (add-before 'build 'fix-build.xml
12693 (lambda* (#:key inputs #:allow-other-keys)
12694 (substitute* "build.xml"
12695 ;; Since we removed the bundled ant.jar, give the correct path
12696 (("lib/ant.jar") (search-input-file inputs "/lib/ant.jar"))
12697 ;; We removed generated native libraries. We can only rebuild one
12698 ;; so don't fail if we can't find a native library for another architecture.
12699 (("zipfileset") "zipfileset erroronmissingarchive=\"false\""))
12700 ;; Copy test dependencies
12701 (copy-file (car (find-files (assoc-ref inputs "java-junit") "jar$"))
12702 "lib/junit.jar")
12703 (copy-file (car (find-files (assoc-ref inputs "java-hamcrest-core")
12704 "jar$"))
12705 "lib/hamcrest-core.jar")
12706 ;; FIXME: once reflections.jar is built, copy it to lib/test.
12707 #t))
12708 (add-before 'build 'build-native
12709 (lambda _
12710 (invoke "ant" "-Ddynlink.native=true" "native")
12711 #t))
12712 (replace 'install
12713 (install-jars "build")))))
12714 (inputs
12715 (list libffi libx11 libxt))
12716 (native-inputs
12717 (list gcc-7 java-junit java-hamcrest-core))
12718 (home-page "https://github.com/java-native-access/jna")
12719 (synopsis "Access to native shared libraries from Java")
12720 (description "JNA provides Java programs easy access to native shared
12721libraries without writing anything but Java code - no JNI or native code is
12722required. JNA allows you to call directly into native functions using natural
12723Java method invocation.")
12724 ;; Java Native Access project (JNA) is dual-licensed under 2
12725 ;; alternative Free licenses: LGPL 2.1 or later and Apache License 2.0.
12726 (license (list
12727 license:asl2.0
12728 license:lgpl2.1+))))
12729
12730(define-public java-native-access-platform
12731 (package
12732 (inherit java-native-access)
12733 (name "java-native-access-platform")
12734 (arguments
12735 `(#:test-target "test"
12736 #:tests? #f; require jna-test.jar
12737 #:phases
12738 (modify-phases %standard-phases
12739 (add-before 'build 'chdir
12740 (lambda _
12741 (chdir "contrib/platform")
12742 #t))
12743 (add-after 'chdir 'fix-ant
12744 (lambda* (#:key inputs #:allow-other-keys)
12745 (substitute* "nbproject/project.properties"
12746 (("../../build/jna.jar")
12747 (search-input-file inputs "/share/java/jna.jar"))
12748 (("../../lib/hamcrest-core-.*.jar")
12749 (car (find-files (assoc-ref inputs "java-hamcrest-core")
12750 "jar$")))
12751 (("../../lib/junit.jar")
12752 (car (find-files (assoc-ref inputs "java-junit")
12753 "jar$"))))
12754 #t))
12755 (replace 'install
12756 (install-jars "dist")))))
12757 (inputs
12758 (list java-native-access))
12759 (synopsis "Cross-platform mappings for jna")
12760 (description "java-native-access-platform has cross-platform mappings
12761and mappings for a number of commonly used platform functions, including a
12762large number of Win32 mappings as well as a set of utility classes that
12763simplify native access.")))
12764
12765(define-public java-jsch-agentproxy-core
12766 (package
12767 (name "java-jsch-agentproxy-core")
12768 (version "0.0.8")
12769 (source (origin
12770 (method url-fetch)
12771 (uri (string-append "https://github.com/ymnk/jsch-agent-proxy/archive/"
12772 version ".tar.gz"))
12773 (file-name (string-append name "-" version ".tar.gz"))
12774 (sha256
12775 (base32
12776 "02iqg6jbc1kxvfzqcg6wy9ygqxfm82bw5rf6vnswqy4y572niz4q"))))
12777 (build-system ant-build-system)
12778 (arguments
12779 `(#:jar-name "jsch-agentproxy-core.jar"
12780 #:source-dir "jsch-agent-proxy-core/src/main/java"
12781 #:tests? #f)); no tests
12782 (home-page "https://github.com/ymnk/jsch-agent-proxy")
12783 (synopsis "Core component of the proxy to ssh-agent and Pageant in Java")
12784 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12785and Pageant included Putty. It will be easily integrated into JSch, and users
12786will be allowed to use these programs for authentication.")
12787 (license license:bsd-3)))
12788
12789(define-public java-jsch-agentproxy-sshagent
12790 (package
12791 (inherit java-jsch-agentproxy-core)
12792 (name "java-jsch-agentproxy-sshagent")
12793 (arguments
12794 `(#:jar-name "jsch-agentproxy-sshagent.jar"
12795 #:source-dir "jsch-agent-proxy-sshagent/src/main/java"
12796 #:tests? #f)); no tests
12797 (inputs
12798 (list java-jsch-agentproxy-core))
12799 (synopsis "Proxy to ssh-agent")
12800 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12801and Pageant included in Putty. This component contains the code for a proxy to
12802ssh-agent.")))
12803
12804(define-public java-jsch-agentproxy-usocket-jna
12805 (package
12806 (inherit java-jsch-agentproxy-core)
12807 (name "java-jsch-agentproxy-usocket-jna")
12808 (arguments
12809 `(#:jar-name "jsch-agentproxy-usocket-jna.jar"
12810 #:source-dir "jsch-agent-proxy-usocket-jna/src/main/java"
12811 #:tests? #f)); no tests
12812 (inputs
12813 (list java-jsch-agentproxy-core java-native-access))
12814 (synopsis "USocketFactory implementation using JNA")
12815 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12816and Pageant included in Putty. This component contains an implementation of
12817USocketFactory using @dfn{JNA} (Java Native Access).")))
12818
12819(define-public java-jsch-agentproxy-pageant
12820 (package
12821 (inherit java-jsch-agentproxy-core)
12822 (name "java-jsch-agentproxy-pageant")
12823 (arguments
12824 `(#:jar-name "jsch-agentproxy-pageant.jar"
12825 #:source-dir "jsch-agent-proxy-pageant/src/main/java"
12826 #:tests? #f)); no tests
12827 (inputs
12828 (list java-jsch-agentproxy-core java-native-access
12829 java-native-access-platform))
12830 (synopsis "Proxy to pageant")
12831 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12832and Pageant included in Putty. This component contains the code for a proxy to
12833pageant.")))
12834
12835(define-public java-jsch-agentproxy-usocket-nc
12836 (package
12837 (inherit java-jsch-agentproxy-core)
12838 (name "java-jsch-agentproxy-usocket-nc")
12839 (arguments
12840 `(#:jar-name "jsch-agentproxy-usocket-nc.jar"
12841 #:source-dir "jsch-agent-proxy-usocket-nc/src/main/java"
12842 #:tests? #f)); no tests
12843 (inputs
12844 (list java-jsch-agentproxy-core))
12845 (synopsis "USocketFactory implementation using netcat")
12846 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12847and Pageant included in Putty. This component contains an implementation of
12848USocketFactory using netcat.")))
12849
12850(define-public java-jsch-agentproxy-connector-factory
12851 (package
12852 (inherit java-jsch-agentproxy-core)
12853 (name "java-jsch-agentproxy-connector-factory")
12854 (arguments
12855 `(#:jar-name "jsch-agentproxy-connector-factory.jar"
12856 #:source-dir "jsch-agent-proxy-connector-factory/src/main/java"
12857 #:tests? #f)); no tests
12858 (inputs
12859 (list java-jsch-agentproxy-core java-jsch-agentproxy-sshagent
12860 java-jsch-agentproxy-usocket-jna java-jsch-agentproxy-pageant
12861 java-jsch-agentproxy-usocket-nc))
12862 (synopsis "Connector factory for jsch agent proxy")
12863 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12864and Pageant included in Putty. This component contains a connector factory.")))
12865
12866(define-public java-jsch-agentproxy-jsch
12867 (package
12868 (inherit java-jsch-agentproxy-core)
12869 (name "java-jsch-agentproxy-jsch")
12870 (arguments
12871 `(#:jar-name "jsch-agentproxy-jsch.jar"
12872 #:source-dir "jsch-agent-proxy-jsch/src/main/java"
12873 #:tests? #f)); no tests
12874 (inputs
12875 (list java-jsch java-jsch-agentproxy-core))
12876 (synopsis "JSch integration library for agentproxy")
12877 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12878and Pageant included in Putty. This component contains a library to use
12879jsch-agent-proxy with JSch.")))
12880
12881(define-public java-apache-ivy
12882 (package
12883 (name "java-apache-ivy")
12884 (version "2.4.0")
12885 (source (origin
12886 (method url-fetch)
12887 (uri (string-append "mirror://apache//ant/ivy/" version
12888 "/apache-ivy-" version "-src.tar.gz"))
12889 (sha256
12890 (base32
12891 "1xkfn57g2m7l6y0xdq75x5rnrgk52m9jx2xah70g3ggl8750hbr0"))
12892 (patches
12893 (search-patches
12894 "java-apache-ivy-port-to-latest-bouncycastle.patch"))))
12895 (build-system ant-build-system)
12896 (arguments
12897 `(#:jar-name "ivy.jar"
12898 #:tests? #f
12899 #:phases
12900 (modify-phases %standard-phases
12901 (add-before 'build 'remove-example
12902 (lambda _
12903 (delete-file-recursively "src/example")
12904 #t))
12905 (add-before 'build 'copy-resources
12906 (lambda _
12907 (with-directory-excursion "src/java"
12908 (for-each (lambda (file)
12909 (install-file file (string-append "../../build/classes/" (dirname file))))
12910 (append
12911 (find-files "." ".*.css")
12912 (find-files "." ".*.ent")
12913 (find-files "." ".*.html")
12914 (find-files "." ".*.properties")
12915 (find-files "." ".*.xsd")
12916 (find-files "." ".*.xsl")
12917 (find-files "." ".*.xml"))))
12918 #t))
12919 (add-before 'build 'fix-vfs
12920 (lambda _
12921 (substitute*
12922 '("src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java"
12923 "src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java")
12924 (("import org.apache.commons.vfs") "import org.apache.commons.vfs2"))
12925 #t))
12926 (add-before 'install 'copy-manifest
12927 (lambda _
12928 (install-file "META-INF/MANIFEST.MF" "build/classes/META-INF")
12929 #t))
12930 (add-before 'install 'repack
12931 (lambda _
12932 (invoke "jar" "-cmf" "build/classes/META-INF/MANIFEST.MF" "build/jar/ivy.jar"
12933 "-C" "build/classes" ".")))
12934 (add-after 'install 'install-bin
12935 (lambda* (#:key outputs #:allow-other-keys)
12936 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
12937 (ivy (string-append bin "/ivy"))
12938 (jar (string-append (assoc-ref outputs "out") "/share/java/ivy.jar")))
12939 (mkdir-p bin)
12940 (with-output-to-file ivy
12941 (lambda _
12942 (display (string-append
12943 "#!" (which "sh") "\n"
12944 "if [[ -z $CLASSPATH ]]; then\n"
12945 " cp=\"" (getenv "CLASSPATH") ":" jar "\"\n"
12946 "else\n"
12947 " cp=\"" (getenv "CLASSPATH") ":" jar ":$CLASSPATH\"\n"
12948 "fi\n"
12949 (which "java") " -cp $cp org.apache.ivy.Main $@\n"))))
12950 (chmod ivy #o755)
12951 #t))))))
12952 (inputs
12953 (list java-bouncycastle
12954 java-commons-cli
12955 java-commons-collections
12956 java-commons-httpclient
12957 java-commons-lang
12958 java-commons-vfs
12959 java-jakarta-oro
12960 java-jsch
12961 java-jsch-agentproxy-core
12962 java-jsch-agentproxy-connector-factory
12963 java-jsch-agentproxy-jsch
12964 java-junit))
12965 (home-page "https://ant.apache.org/ivy")
12966 (synopsis "Dependency manager for the Java programming language")
12967 (description "Ivy is a tool for managing (recording, tracking, resolving
12968and reporting) project dependencies. It is characterized by the following:
12969
12970@itemize
12971@item flexibility and configurability - Ivy is essentially process agnostic
12972 and is not tied to any methodology or structure. Instead it provides the
12973 necessary flexibility and configurability to be adapted to a broad range
12974 of dependency management and build processes.
12975@item tight integration with Apache Ant - while available as a standalone tool,
12976 Ivy works particularly well with Apache Ant providing a number of
12977 powerful Ant tasks ranging from dependency resolution to dependency
12978 reporting and publication.
12979@end itemize")
12980 (license license:asl2.0)))
12981
12982(define-public java-eclipse-sisu-inject
12983 (package
12984 (name "java-eclipse-sisu-inject")
12985 (version "0.3.5")
12986 (source (origin
12987 (method git-fetch)
12988 (uri (git-reference
12989 (url "https://github.com/eclipse/sisu.inject/")
12990 (commit (string-append "releases/" version))))
12991 (file-name (git-file-name name version))
12992 (sha256
12993 (base32
12994 "1yh434b8pi8cwmpk825fbvbnkkk2cwd4gxxjaygg8i9j0q3l9zp3"))))
12995 (build-system ant-build-system)
12996 (arguments
12997 `(#:jar-name "eclipse-sisu-inject.jar"
12998 #:source-dir "org.eclipse.sisu.inject/src"
12999 #:tests? #f; no tests
13000 #:phases
13001 (modify-phases %standard-phases
13002 (replace 'install
13003 (install-from-pom "org.eclipse.sisu.inject/pom.xml")))))
13004 (propagated-inputs
13005 (list java-guice java-sisu-inject-parent-pom))
13006 (inputs
13007 (list java-guice-servlet
13008 java-javax-inject
13009 java-javaee-servletapi
13010 java-junit
13011 java-slf4j-api
13012 java-jsr305
13013 java-jsr250
13014 java-cdi-api
13015 java-osgi-framework
13016 java-osgi-util-tracker
13017 java-testng))
13018 (home-page "https://www.eclipse.org/sisu/")
13019 (synopsis "Classpath scanning, auto-binding, and dynamic auto-wiring")
13020 (description "Sisu is a modular JSR330-based container that supports
13021classpath scanning, auto-binding, and dynamic auto-wiring. Sisu uses
13022Google-Guice to perform dependency injection and provide the core JSR330
13023support, but removes the need to write explicit bindings in Guice modules.
13024Integration with other containers via the Eclipse Extension Registry and the
13025OSGi Service Registry is a goal of this project.")
13026 (license license:epl1.0)))
13027
13028(define java-sisu-inject-parent-pom
13029 (package
13030 (inherit java-eclipse-sisu-inject)
13031 (name "java-sisu-inject-parent-pom")
13032 (arguments
13033 `(#:tests? #f
13034 #:phases
13035 (modify-phases %standard-phases
13036 (delete 'configure)
13037 (delete 'build)
13038 (replace 'install
13039 (install-pom-file "pom.xml")))))
13040 (propagated-inputs '())))
13041
13042(define-public java-eclipse-sisu-plexus
13043 (package
13044 (name "java-eclipse-sisu-plexus")
13045 (version "0.3.5")
13046 (source (origin
13047 (method git-fetch)
13048 (uri (git-reference
13049 (url "https://github.com/eclipse/sisu.plexus")
13050 (commit (string-append "releases/" version))))
13051 (file-name (git-file-name name version))
13052 (sha256
13053 (base32
13054 "0lm5h0dmh41ffcwd32qnk3a87d360am36yq7168ikkyqa8jxkx28"))
13055 (modules '((guix build utils)))
13056 (snippet
13057 '(begin
13058 (for-each delete-file (find-files "." ".*.jar"))
13059 (rename-file "org.eclipse.sisu.plexus.tests/src"
13060 "org.eclipse.sisu.plexus.tests/java")
13061 #t))))
13062 (build-system ant-build-system)
13063 (arguments
13064 `(#:jar-name "eclipse-sisu-plexus.jar"
13065 #:source-dir "org.eclipse.sisu.plexus/src"
13066 #:test-dir "org.eclipse.sisu.plexus.tests"
13067 #:test-exclude
13068 (list
13069 ;; This test fails probably because we can't generate the necessary
13070 ;; meta-inf files.
13071 "**/PlexusLoggingTest.*"
13072 ;; FIXME: This test fails because of some injection error
13073 "**/PlexusRequirementTest.*")
13074 #:jdk ,icedtea-8
13075 #:phases
13076 (modify-phases %standard-phases
13077 (add-before 'build 'copy-resources
13078 (lambda _
13079 (install-file "org.eclipse.sisu.plexus/META-INF/plexus/components.xml"
13080 "build/classes/META-INF/plexus")
13081 #t))
13082 (add-before 'check 'build-test-jar
13083 (lambda _
13084 (with-directory-excursion "org.eclipse.sisu.plexus.tests/resources/component-jar/src/main/"
13085 (mkdir "build")
13086 (with-directory-excursion "java"
13087 (apply invoke "javac" "-cp"
13088 (string-append (getenv "CLASSPATH")
13089 ":../../../../../build/classes")
13090 (find-files "." ".*.java"))
13091 (for-each (lambda (file) (install-file file (string-append "../build/" file)))
13092 (find-files "." ".*.jar")))
13093 (mkdir-p "build/META-INF/plexus")
13094 (copy-file "resources/META-INF/plexus/components.xml"
13095 "build/META-INF/plexus/components.xml")
13096 (with-directory-excursion "build"
13097 (invoke "jar" "cf" "../../../component-jar-0.1.jar" ".")))
13098 (with-directory-excursion "org.eclipse.sisu.plexus.tests/"
13099 (copy-recursively "META-INF" "../build/test-classes/META-INF")
13100 (substitute* "java/org/eclipse/sisu/plexus/DefaultPlexusContainerTest.java"
13101 (("resources/component-jar")
13102 "org.eclipse.sisu.plexus.tests/resources/component-jar")))
13103 #t))
13104 (replace 'install
13105 (install-from-pom "org.eclipse.sisu.plexus/pom.xml")))))
13106 (propagated-inputs
13107 (list java-jsr250
13108 java-plexus-classworlds
13109 java-plexus-utils
13110 java-plexus-component-annotations
13111 java-cdi-api
13112 java-eclipse-sisu-inject
13113 java-sisu-plexus-parent-pom))
13114 (inputs
13115 (list java-osgi-framework
13116 java-slf4j-api
13117 java-javax-inject
13118 java-guice
13119 java-guava
13120 java-aopalliance
13121 java-asm
13122 java-cglib))
13123 (native-inputs
13124 (list java-junit))
13125 (home-page "https://www.eclipse.org/sisu/")
13126 (synopsis "Plexus support for the sisu container")
13127 (description "Sisu is a modular JSR330-based container that supports
13128classpath scanning, auto-binding, and dynamic auto-wiring. This package
13129adds Plexus support to the Sisu-Inject container.")
13130 (license license:epl1.0)))
13131
13132(define java-sisu-plexus-parent-pom
13133 (package
13134 (inherit java-eclipse-sisu-plexus)
13135 (name "java-sisu-plexus-parent-pom")
13136 (arguments
13137 `(#:tests? #f
13138 #:phases
13139 (modify-phases %standard-phases
13140 (delete 'configure)
13141 (delete 'build)
13142 (replace 'install
13143 (install-pom-file "pom.xml")))))
13144 (propagated-inputs
13145 `(("java-sonatype-oss-parent-pom-9" ,java-sonatype-oss-parent-pom-9)))))
13146
13147(define-public java-commons-compiler
13148 (package
13149 (name "java-commons-compiler")
13150 (version "3.0.8")
13151 (source (origin
13152 (method git-fetch)
13153 (uri (git-reference
13154 (url "https://github.com/janino-compiler/janino")
13155 (commit "91aa95686d1e4ca3b16a984a03a38686572331b2")))
13156 (file-name (string-append name "-" version))
13157 (sha256
13158 (base32
13159 "04hfdl59sgh20qkxzgnibvs8f9hy6n7znxwpk611y5d89977y62r"))
13160 (modules '((guix build utils)))
13161 (snippet
13162 '(begin
13163 (for-each delete-file
13164 (find-files "." "\\.jar$"))
13165 #t))))
13166 (build-system ant-build-system)
13167 (arguments
13168 `(#:jar-name "commons-compiler.jar"
13169 #:source-dir "commons-compiler/src/main"
13170 #:tests? #f)); no tests
13171 (home-page "https://github.com/janino-compiler/janino")
13172 (synopsis "Java compiler")
13173 (description "Commons-compiler contains an API for janino, including the
13174@code{IExpressionEvaluator}, @code{IScriptEvaluator}, @code{IClassBodyEvaluator}
13175and @code{ISimpleCompiler} interfaces.")
13176 (license license:bsd-3)))
13177
13178(define-public java-janino
13179 (package
13180 (inherit java-commons-compiler)
13181 (name "java-janino")
13182 (arguments
13183 `(#:jar-name "janino.jar"
13184 #:source-dir "src/main/java"
13185 #:phases
13186 (modify-phases %standard-phases
13187 (add-before 'configure 'chdir
13188 (lambda _
13189 (chdir "janino")
13190 #t)))))
13191 (inputs
13192 (list java-commons-compiler))
13193 (native-inputs
13194 (list java-junit java-hamcrest-core))
13195 (description "Janino is a Java compiler. Janino can compile a set of
13196source files to a set of class files like @code{javac}, but also compile a
13197Java expression, block, class body or source file in memory, load the bytecode
13198and execute it directly in the same JVM. @code{janino} can also be used for
13199static code analysis or code manipulation.")))
13200
13201(define-public java-logback-core
13202 (package
13203 (name "java-logback-core")
13204 (version "1.2.3")
13205 (source (origin
13206 (method git-fetch)
13207 (uri (git-reference
13208 (url "https://github.com/qos-ch/logback/")
13209 (commit (string-append "v_" version))))
13210 (file-name (git-file-name name version))
13211 (sha256
13212 (base32
13213 "055jbfpg3l5qw7pw2snkdag0gjkb4vcxfg9110cqqyc40k2nd17z"))
13214 (modules '((guix build utils)))
13215 (snippet
13216 '(delete-file-recursively "logback-access/lib"))))
13217 (build-system ant-build-system)
13218 (arguments
13219 `(#:jar-name "logback.jar"
13220 #:source-dir "src/main/java"
13221 #:test-dir "src/test"
13222 #:test-exclude
13223 ;; These tests fail with Unable to set MockitoNamingPolicy on cglib generator
13224 ;; which creates FastClasses
13225 (list "**/AllCoreTest.*"
13226 "**/AutoFlushingObjectWriterTest.*"
13227 "**/PackageTest.*"
13228 "**/ResilientOutputStreamTest.*"
13229 ;; And we still don't want to run abstract classes
13230 "**/Abstract*.*")
13231 #:phases
13232 (modify-phases %standard-phases
13233 (add-before 'configure 'chdir
13234 (lambda _ (chdir "logback-core"))))))
13235 (inputs
13236 (list java-javax-mail
13237 java-javaee-servletapi
13238 java-commons-compiler
13239 java-janino))
13240 (native-inputs
13241 (list java-junit
13242 java-hamcrest-core
13243 java-mockito-1
13244 java-cglib
13245 java-asm
13246 java-objenesis
13247 java-joda-time))
13248 (home-page "https://logback.qos.ch")
13249 (synopsis "Logging for java")
13250 (description "Logback is intended as a successor to the popular log4j project.
13251This module lays the groundwork for the other two modules.")
13252 ;; Either epl1.0 or lgpl2.1
13253 (license (list license:epl1.0
13254 license:lgpl2.1))))
13255
13256(define-public java-logback-classic
13257 (package
13258 (inherit java-logback-core)
13259 (name "java-logback-classic")
13260 (arguments
13261 `(#:jar-name "logback-classic.jar"
13262 #:source-dir "src/main/java"
13263 #:test-dir "src/test"
13264 #:tests? #f; tests require more packages: h2, greenmail, hsql, subethamail, slf4j, log4j, felix
13265 #:jdk ,icedtea-8
13266 #:phases
13267 (modify-phases %standard-phases
13268 (add-before 'configure 'chdir
13269 (lambda _
13270 (chdir "logback-classic")
13271 #t))
13272 (replace 'build
13273 (lambda* (#:key inputs #:allow-other-keys)
13274 (mkdir-p "build/classes")
13275 (setenv "CLASSPATH"
13276 (string-join
13277 (apply append (map (lambda (input)
13278 (find-files (assoc-ref inputs input)
13279 ".*.jar"))
13280 '("java-logback-core" "java-slf4j-api"
13281 "java-commons-compiler" "java-javaee-servletapi"
13282 "groovy")))
13283 ":"))
13284 (apply invoke "groovyc" "-d" "build/classes" "-j"
13285 (find-files "src/main/" ".*\\.(groovy|java)$"))
13286 (invoke "ant" "jar")
13287 #t)))))
13288 (inputs
13289 (modify-inputs (package-inputs java-logback-core)
13290 (prepend java-logback-core java-slf4j-api)))
13291 (native-inputs
13292 (list groovy))
13293 (description "Logback is intended as a successor to the popular log4j project.
13294This module can be assimilated to a significantly improved version of log4j.
13295Moreover, @code{logback-classic} natively implements the slf4j API so that you
13296can readily switch back and forth between logback and other logging frameworks
13297such as log4j or @code{java.util.logging} (JUL).")))
13298
13299(define-public java-jgit
13300 (package
13301 (name "java-jgit")
13302 (version "4.7.0.201704051617-r")
13303 (source (origin
13304 (method url-fetch)
13305 (uri (string-append "https://repo1.maven.org/maven2/"
13306 "org/eclipse/jgit/org.eclipse.jgit/"
13307 version "/org.eclipse.jgit-"
13308 version "-sources.jar"))
13309 (sha256
13310 (base32
13311 "13ii4jn02ynzq6i7gsyi21k2i94jpc85wf6bcm31q4cyvzv0mk4k"))))
13312 (build-system ant-build-system)
13313 (arguments
13314 `(#:tests? #f ; There are no tests to run.
13315 #:jar-name "jgit.jar"
13316 ;; JGit must be built with a JDK supporting Java 8.
13317 #:jdk ,icedtea-8
13318 ;; Target our older default JDK.
13319 #:make-flags (list "-Dtarget=1.7")
13320 #:phases
13321 (modify-phases %standard-phases
13322 ;; The jar file generated by the default build.xml does not include
13323 ;; the text properties files, so we need to add them.
13324 (add-after 'build 'add-properties
13325 (lambda* (#:key jar-name #:allow-other-keys)
13326 (with-directory-excursion "src"
13327 (apply invoke "jar" "-uf"
13328 (string-append "../build/jar/" jar-name)
13329 (find-files "." "\\.properties$")))
13330 #t)))))
13331 (inputs
13332 (list java-classpathx-servletapi java-javaewah java-jsch
13333 java-slf4j-api))
13334 (home-page "https://eclipse.org/jgit/")
13335 (synopsis "Java library implementing the Git version control system")
13336 (description "JGit is a lightweight, pure Java library implementing the
13337Git version control system, providing repository access routines, support for
13338network protocols, and core version control algorithms.")
13339 (license license:edl1.0)))
13340
13341;; For axoloti.
13342(define-public java-jgit-4.2
13343 (package (inherit java-jgit)
13344 (version "4.2.0.201601211800-r")
13345 (source (origin
13346 (method url-fetch)
13347 (uri (string-append "https://repo1.maven.org/maven2/"
13348 "org/eclipse/jgit/org.eclipse.jgit/"
13349 version "/org.eclipse.jgit-"
13350 version "-sources.jar"))
13351 (sha256
13352 (base32
13353 "15gm537iivhnzlkjym4x3wn5jqdjdragsw9pdpzqqg21nrc817mm"))))
13354 (build-system ant-build-system)
13355 (arguments
13356 (substitute-keyword-arguments (package-arguments java-jgit)
13357 ((#:phases phases)
13358 `(modify-phases ,phases
13359 (add-after 'unpack 'use-latest-javaewah-API
13360 (lambda _
13361 (substitute* "src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java"
13362 (("wordinbits") "WORD_IN_BITS"))))))))
13363 (inputs
13364 (list java-javaewah java-jsch java-slf4j-api))))
13365
13366(define-public abcl
13367 (package
13368 (name "abcl")
13369 (version "1.9.0")
13370 (source
13371 (origin
13372 (method url-fetch)
13373 (uri (string-append "https://abcl.org/releases/"
13374 version "/abcl-src-" version ".tar.gz"))
13375 (sha256
13376 (base32
13377 "0scqq5c7201xhp0g6i4y3m2nrk6l5any1nisiscbsd48ya25qax1"))
13378 (patches
13379 (search-patches
13380 "abcl-fix-build-xml.patch"))))
13381 (build-system ant-build-system)
13382 (native-inputs
13383 (list java-junit))
13384 (arguments
13385 `(#:build-target "abcl.jar"
13386 #:test-target "abcl.test"
13387 #:phases
13388 (modify-phases %standard-phases
13389 (replace 'install
13390 (lambda* (#:key outputs #:allow-other-keys)
13391 (let ((share (string-append (assoc-ref outputs "out")
13392 "/share/java/"))
13393 (bin (string-append (assoc-ref outputs "out")
13394 "/bin/")))
13395 (mkdir-p share)
13396 (install-file "dist/abcl.jar" share)
13397 (install-file "dist/abcl-contrib.jar" share)
13398 (mkdir-p bin)
13399 (with-output-to-file (string-append bin "abcl")
13400 (lambda _
13401 (let ((classpath (string-append
13402 share "abcl.jar"
13403 ":"
13404 share "abcl-contrib.jar")))
13405 (display (string-append
13406 "#!" (which "sh") "\n"
13407 "if [[ -z $CLASSPATH ]]; then\n"
13408 " cp=\"" classpath "\"\n"
13409 "else\n"
13410 " cp=\"" classpath ":$CLASSPATH\"\n"
13411 "fi\n"
13412 "exec " (which "java")
13413 " -cp $cp org.armedbear.lisp.Main $@\n")))))
13414 (chmod (string-append bin "abcl") #o755)
13415 #t))))))
13416 (home-page "https://abcl.org/")
13417 (synopsis "Common Lisp Implementation on the JVM")
13418 (description
13419 "@dfn{Armed Bear Common Lisp} (ABCL) is a full implementation of the Common
13420Lisp language featuring both an interpreter and a compiler, running in the
13421JVM. It supports JSR-223 (Java scripting API): it can be a scripting engine
13422in any Java application. Additionally, it can be used to implement (parts of)
13423the application using Java to Lisp integration APIs.")
13424 (native-search-paths
13425 (list (search-path-specification
13426 (variable "XDG_DATA_DIRS")
13427 (files '("share")))))
13428 (license (list license:gpl2+
13429 ;; named-readtables is released under 3 clause BSD
13430 license:bsd-3
13431 ;; jfli is released under CPL 1.0
13432 license:cpl1.0))))
13433
13434(define-public java-jsonp-api
13435 (package
13436 (name "java-jsonp-api")
13437 (version "1.1.6")
13438 (source (origin
13439 (method git-fetch)
13440 (uri (git-reference
13441 (url "https://github.com/eclipse-ee4j/jsonp")
13442 (commit (string-append "1.1-" version "-RELEASE"))))
13443 (file-name (git-file-name name version))
13444 (sha256
13445 (base32
13446 "0zrj03hkr3jdmqlb4ipjr37cqpp2q2814qpmxi7srlwpdqs0ibgc"))))
13447 (build-system ant-build-system)
13448 (arguments
13449 `(#:jar-name "jsonp-api.jar"
13450 #:tests? #f
13451 #:source-dir "api/src/main/java"
13452 #:test-dir "api/src/test"))
13453 (home-page "https://eclipse-ee4j.github.io/jsonp/")
13454 (synopsis "JSON Processing in Java")
13455 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
13456parse, generate, transform and query) JSON messages. It produces and
13457consumes JSON text in a streaming fashion (similar to StAX API for XML)
13458and allows building a Java object model for JSON text using API classes
13459(similar to DOM API for XML).")
13460 ;; either gpl2 only with classpath exception, or epl2.0.
13461 (license (list license:gpl2
13462 license:epl2.0))))
13463
13464(define-public java-jsonp-impl
13465 (package
13466 (inherit java-jsonp-api)
13467 (name "java-jsonp-impl")
13468 (arguments
13469 `(#:jar-name "jsonp-impl.jar"
13470 #:tests? #f
13471 #:source-dir "impl/src/main/java"
13472 #:test-dir "impl/src/test"
13473 #:phases
13474 (modify-phases %standard-phases
13475 (add-before 'build 'copy-resources
13476 (lambda _
13477 (copy-recursively
13478 "impl/src/main/resources/"
13479 "build/classes")
13480 #t)))))
13481 (propagated-inputs
13482 (list java-jsonp-api))
13483 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
13484parse, generate, transform and query) JSON messages. This package contains
13485a reference implementation of that API.")))
13486
13487(define-public java-xmp
13488 (package
13489 (name "java-xmp")
13490 (version "5.1.3")
13491 (source (origin
13492 (method url-fetch)
13493 (uri (string-append "http://download.macromedia.com/pub/developer"
13494 "/xmp/sdk/XMPCoreJava-" version ".zip"))
13495 (sha256
13496 (base32
13497 "14nai2mmsg7l5ya2y5mx4w4lr1az3sk2fjz6hiy4zdrsavgvl1g7"))))
13498 (build-system ant-build-system)
13499 (arguments
13500 `(#:build-target "build"
13501 #:tests? #f; no tests
13502 #:phases
13503 (modify-phases %standard-phases
13504 (add-after 'unpack 'chdir
13505 (lambda _
13506 (chdir "XMPCore")
13507 #t))
13508 (add-before 'build 'fix-timestamp
13509 (lambda _
13510 (substitute* "build.xml"
13511 (("\\$\\{BuildDate\\}") "1970 Jan 01 00:00:00-GMT"))
13512 #t))
13513 (replace 'install
13514 (install-jars "."))
13515 (add-after 'install 'install-doc
13516 (lambda* (#:key outputs #:allow-other-keys)
13517 (copy-recursively
13518 "docs"
13519 (string-append (assoc-ref outputs "out") "/share/doc/java-xmp"))
13520 #t)))))
13521 (native-inputs
13522 (list unzip))
13523 (home-page "https://www.adobe.com/devnet/xmp.html")
13524 (synopsis "Extensible Metadat Platform (XMP) support in Java")
13525 (description "Adobe's Extensible Metadata Platform (XMP) is a labeling
13526technology that allows you to embed data about a file, known as metadata,
13527into the file itself. The XMP Toolkit for Java is based on the C++ XMPCore
13528library and the API is similar.")
13529 (license license:bsd-3)))
13530
13531(define-public java-args4j
13532 (package
13533 (name "java-args4j")
13534 (version "2.33")
13535 (source (origin
13536 (method git-fetch)
13537 (uri (git-reference
13538 (url "https://github.com/kohsuke/args4j")
13539 (commit (string-append "args4j-site-" version))))
13540 (file-name (git-file-name name version))
13541 (sha256
13542 (base32
13543 "0w061fg65qrsm1a0lz0vyprsyidj31krjb459qi2lw0y78xza26s"))))
13544 (build-system ant-build-system)
13545 (arguments
13546 `(#:jar-name "args4j.jar"
13547 #:source-dir "args4j/src"
13548 #:test-dir "args4j/test"
13549 #:test-exclude
13550 (list "**/ExampleTest.*"
13551 "**/ExternalConfiguredTest.*" ; fails to find a file
13552 ;; We still don't want to run abstract classes
13553 "**/Abstract*.*")
13554 #:phases
13555 (modify-phases %standard-phases
13556 (add-before 'check 'fix-test-dir
13557 (lambda _
13558 (substitute* "build.xml"
13559 (("/java\">") "\">"))
13560 #t))
13561 (add-before 'build 'copy-resources
13562 (lambda _
13563 (let ((from-prefix "args4j/src/org/kohsuke/args4j/")
13564 (to-prefix "build/classes/org/kohsuke/args4j/"))
13565 (for-each (lambda (f)
13566 (install-file
13567 (string-append from-prefix f)
13568 (string-append to-prefix (dirname f))))
13569 (list "Messages.properties"
13570 "Messages_de.properties"
13571 "Messages_en.properties"
13572 "Messages_ru.properties"
13573 "spi/Messages.properties"
13574 "spi/Messages_de.properties"
13575 "spi/Messages_en.properties"
13576 "spi/Messages_ru.properties")))
13577 #t)))))
13578 (native-inputs
13579 (list java-junit))
13580 (home-page "https://args4j.kohsuke.org/")
13581 (synopsis "Command line parser library")
13582 (description "Args4j is a small Java class library that makes it easy to
13583parse command line options/arguments in your CUI application.")
13584 (license license:expat)))
13585
13586(define-public java-argparse4j
13587 (package
13588 (name "java-argparse4j")
13589 (version "0.9.0")
13590 (source (origin
13591 (method git-fetch)
13592 (uri (git-reference
13593 (url "https://github.com/argparse4j/argparse4j")
13594 (commit (string-append "argparse4j-" version))))
13595 (file-name (git-file-name name version))
13596 (sha256
13597 (base32
13598 "1i0j3zs1ln48n0g8a90vqbv6528mcswhzys6252yp0c8w1ai64fb"))))
13599 (build-system ant-build-system)
13600 (arguments
13601 (list #:jar-name "java-argparse4j.jar"
13602 #:source-dir "main/src/main/"
13603 #:test-dir "main/src/test/"
13604 #:jdk openjdk11
13605 #:phases #~(modify-phases %standard-phases
13606 (add-after 'unpack 'copy-resources
13607 (lambda _
13608 (copy-recursively "main/src/test/resources"
13609 "target/test-classes")
13610 (copy-recursively "main/src/main/resources"
13611 "build/classes")))
13612 (replace 'install
13613 (install-from-pom "pom.xml")))))
13614 (inputs (list java-junit))
13615 (home-page "https://argparse4j.github.io/")
13616 (synopsis "Java command-line argument parser library")
13617 (description "Argparse4j is a command line argument parser library for
13618Java based on Python's @code{argparse} module.")
13619 (license license:expat)))
13620
13621(define-public java-metadata-extractor
13622 (package
13623 (name "java-metadata-extractor")
13624 (version "2.11.0")
13625 (source (origin
13626 (method git-fetch)
13627 (uri (git-reference
13628 (url "https://github.com/drewnoakes/metadata-extractor")
13629 (commit version)))
13630 (file-name (git-file-name name version))
13631 (sha256
13632 (base32
13633 "06yrq0swrl1r40yjbk5kqzjxr04jlkq9lfi711jvfgjf5kp2qinj"))))
13634 (build-system ant-build-system)
13635 (arguments
13636 `(#:jar-name "metadata-extractor.jar"
13637 #:source-dir "Source"
13638 #:test-dir "Tests"
13639 #:phases
13640 (modify-phases %standard-phases
13641 (add-before 'check 'fix-test-dir
13642 (lambda _
13643 (substitute* "build.xml"
13644 (("/java\">") "\">"))
13645 #t)))))
13646 (propagated-inputs
13647 (list java-xmp))
13648 (native-inputs
13649 (list java-hamcrest-core java-junit))
13650 (home-page "https://github.com/drewnoakes/metadata-extractor")
13651 (synopsis "Extract metadata from image and video files")
13652 (description "Metadata-extractor is a straightforward Java library for
13653reading metadata from image files. It is able to read metadata in Exif,
13654IPTC, XMP, ICC and more formats.")
13655 (license license:asl2.0)))
13656
13657(define-public java-svg-salamander
13658 (package
13659 (name "java-svg-salamander")
13660 (version "1.1.2")
13661 (source (origin
13662 (method git-fetch)
13663 (uri (git-reference
13664 (url "https://github.com/blackears/svgSalamander")
13665 (commit (string-append "v" version))))
13666 (file-name (git-file-name name version))
13667 (sha256
13668 (base32
13669 "1zv3kjdkf6iqf02x6ln76254y634j2ji448y706a65lsbfjmmicf"))
13670 (modules '((guix build utils)))
13671 (snippet
13672 '(begin
13673 (for-each delete-file (find-files "." ".*.jar"))
13674 #t))
13675 (patches
13676 (search-patches "java-svg-salamander-Fix-non-det.patch"))))
13677 (build-system ant-build-system)
13678 (arguments
13679 `(#:tests? #f; no tests
13680 #:phases
13681 (modify-phases %standard-phases
13682 (add-after 'unpack 'chdir
13683 (lambda _
13684 (chdir "svg-core")
13685 #t))
13686 (add-before 'build 'copy-jars
13687 (lambda* (#:key inputs #:allow-other-keys)
13688 (copy-file (car (find-files (assoc-ref inputs "javacc") "\\.jar$"))
13689 "../libraries/javacc.jar")
13690 (copy-file (car (find-files (assoc-ref inputs "ant") "ant\\.jar$"))
13691 "../libraries/ant.jar")
13692 #t))
13693 (replace 'install
13694 (install-jars "dist")))))
13695 (native-inputs
13696 (list javacc))
13697 (home-page "https://github.com/blackears/svgSalamander")
13698 (synopsis "SVG engine for Java")
13699 (description "SVG Salamander is an SVG engine for Java that's designed
13700to be small, fast, and allow programmers to use it with a minimum of fuss.
13701It's in particular targeted for making it easy to integrate SVG into Java
13702games and making it much easier for artists to design 2D game content - from
13703rich interactive menus to charts and graphcs to complex animations.")
13704 (license license:bsd-2)))
13705
13706(define-public java-jboss-transaction-api-spec
13707 (package
13708 (name "java-jboss-transaction-api-spec")
13709 (version "1.2+1.1.1")
13710 (source (origin
13711 (method git-fetch)
13712 (uri (git-reference
13713 (url "https://github.com/jboss/jboss-transaction-api_spec")
13714 (commit "jboss-transaction-api_1.2_spec-1.1.1.Final")))
13715 (file-name (git-file-name name version))
13716 (sha256
13717 (base32
13718 "1xbfq5hvb86izflydxrqqv3k26c1ba2m0ap6m97shqrsdi9by4wy"))))
13719 (build-system ant-build-system)
13720 (arguments
13721 `(#:jar-name "java-jboss-transaction-api_spec.jar"
13722 #:source-dir "src/main/java"
13723 #:tests? #f)); no tests
13724 (inputs
13725 (list java-cdi-api java-jboss-interceptors-api-spec))
13726 (home-page "https://github.com/jboss/jboss-transaction-api_spec")
13727 (synopsis "Generic transaction management API in Java")
13728 (description "Java-jboss-transaction-api-spec implements the Transactions
13729API. A transaction is a unit of work containing one or more operations
13730involving one or more shared resources having ACID (Atomicity, Consistency,
13731Isolation and Durability) properties.")
13732 ;; either gpl2 only with classpath exception or cddl.
13733 (license (list license:gpl2 license:cddl1.0))))
13734
13735(define-public java-picocli
13736 (package
13737 (name "java-picocli")
13738 (version "4.3.2")
13739 (source (origin
13740 (method git-fetch)
13741 (uri (git-reference
13742 (url "https://github.com/remkop/picocli")
13743 (commit (string-append "v" version))))
13744 (file-name (git-file-name name version))
13745 (sha256
13746 (base32
13747 "1sxp6rxjfgjd98ly14b3d15dvxkm5wg4g46w12jyhmr0kmkaca3c"))))
13748 (build-system ant-build-system)
13749 (arguments
13750 `(#:jar-name "picocli.jar"
13751 #:source-dir "src/main/java"
13752 ;; Tests require missing dependencies (junitparams, system-rules)
13753 #:tests? #f))
13754 (home-page "https://picocli.info")
13755 (synopsis "REPL for the JVM")
13756 (description "Picocli is a framework for building command line applications
13757for the JVM. It supports colors, autocompletion, subcommands, and more. Written
13758in Java, usable from Groovy, Kotlin, Scala, etc.")
13759 (license license:asl2.0)))
13760
13761(define-public java-pj
13762 (package
13763 (name "java-pj")
13764 (version "20150107")
13765 (source (origin
13766 (method url-fetch)
13767 (uri (string-append "https://www.cs.rit.edu/~ark/pjsrc"
13768 version ".jar"))
13769 (sha256
13770 (base32
13771 "078xwaivl2qqjc07r0vk6kzpqlcb1bcar80p8r5qigh34hpr86d3"))
13772 (modules '((guix build utils)))
13773 (snippet
13774 '(for-each delete-file
13775 (find-files "." "\\.class$")))))
13776 (build-system ant-build-system)
13777 (arguments
13778 (list
13779 #:tests? #false ;there are none
13780 #:phases
13781 #~(modify-phases %standard-phases
13782 (add-after 'unpack 'chdir
13783 (lambda _ (chdir "src/pj")))
13784 (add-after 'chdir 'patch-source-directory
13785 (lambda _
13786 (substitute* "compile"
13787 (("SRCDIR1=/home/ark/public_html/pj/lib")
13788 (string-append "SRCDIR1=" (getcwd) "/lib")))))
13789 (replace 'build
13790 (lambda _
13791 (invoke "bash" "./compile" "linux")
13792 (with-directory-excursion "lib"
13793 (apply invoke "jar" "cf" (string-append "pj" #$version ".jar")
13794 (find-files "." "\\.class$")))))
13795 (replace 'install (install-jars ".")))))
13796 (home-page "https://www.cs.rit.edu/~ark/pj.shtml")
13797 (synopsis "Parallel programming in Java")
13798 (description "Parallel Java (PJ) is an API and middleware for parallel
13799programming in 100% Java on shared memory multiprocessor (SMP) parallel
13800computers, cluster parallel computers, and hybrid SMP cluster parallel
13801computers.")
13802 (license license:gpl3+)))
13803
13804(define-public java-jetbrains-annotations
13805 (package
13806 (name "java-jetbrains-annotations")
13807 (version "19.0.0")
13808 (source (origin
13809 (method git-fetch)
13810 (uri (git-reference
13811 (url "https://github.com/JetBrains/java-annotations")
13812 (commit version)))
13813 (file-name (git-file-name name version))
13814 (sha256
13815 (base32
13816 "0z6i1xs60cd5ffz23c49sq68wn5mphhs3xpar1n93ppama2ng80v"))))
13817 (build-system ant-build-system)
13818 (arguments
13819 `(#:jar-name "jetbrains-annotations.jar"
13820 #:source-dir "common/src/main/java:java8/src/main/java"
13821 #:tests? #f)); no tests
13822 (home-page "https://github.com/JetBrains/java-annotations")
13823 (synopsis "Annotations for Java and other JVM languages")
13824 (description "This package contains a set of Java annotations which can be
13825used in JVM-based languages. They serve as an additional documentation and
13826can be interpreted by IDEs and static analysis tools to improve code analysis.")
13827 (license license:expat)))
13828
13829(define-public java-javaparser
13830 (package
13831 (name "java-javaparser")
13832 (version "3.16.1")
13833 (source (origin
13834 (method git-fetch)
13835 (uri (git-reference
13836 (url "https://github.com/javaparser/javaparser")
13837 (commit (string-append "javaparser-parent-" version))))
13838 (file-name (git-file-name name version))
13839 (sha256
13840 (base32
13841 "1a4jk12ffa31fa0y8vda0739vpfj1206p0nha842b7bixbvwamv9"))
13842 (modules '((guix build utils)))
13843 (snippet
13844 '(begin
13845 (for-each delete-file
13846 (find-files "." "\\.jar$"))
13847 #t))))
13848 (build-system ant-build-system)
13849 (arguments
13850 `(#:tests? #f; tests require jbehave and junit5
13851 #:phases
13852 (modify-phases %standard-phases
13853 (add-before 'build 'fill-template
13854 (lambda _
13855 (with-directory-excursion "javaparser-core/src/main"
13856 (copy-file "java-templates/com/github/javaparser/JavaParserBuild.java"
13857 "java/com/github/javaparser/JavaParserBuild.java")
13858 (substitute* "java/com/github/javaparser/JavaParserBuild.java"
13859 (("\\$\\{project.version\\}") ,version)
13860 (("\\$\\{project.name\\}") "javaparser")
13861 (("\\$\\{project.build.finalName\\}") "javaparser")
13862 (("\\$\\{maven.version\\}") "fake")
13863 (("\\$\\{maven.build.version\\}") "fake")
13864 (("\\$\\{build.timestamp\\}") "0")
13865 (("\\$\\{java.vendor\\}") "Guix")
13866 (("\\$\\{java.vendor.url\\}") "https://gnu.org/software/guix")
13867 (("\\$\\{java.version\\}") "1.8")
13868 (("\\$\\{os.arch\\}") "any")
13869 (("\\$\\{os.name\\}") "Guix")
13870 (("\\$\\{os.version\\}") "not available")))
13871 #t))
13872 (add-before 'build 'generate-javacc
13873 (lambda _
13874 (with-directory-excursion "javaparser-core/src/main/java"
13875 (invoke "java" "javacc" "../javacc/java.jj"))
13876 #t))
13877 (add-before 'build 'copy-javacc-support
13878 (lambda _
13879 (with-directory-excursion "javaparser-core/src/main"
13880 (copy-recursively "javacc-support" "java"))
13881 #t))
13882 (replace 'build
13883 (lambda _
13884 (define (build name)
13885 (format #t "Building ~a~%" name)
13886 (delete-file-recursively "build/classes")
13887 (mkdir-p "build/classes")
13888 (apply invoke "javac"
13889 "-cp" (string-append (getenv "CLASSPATH") ":"
13890 (string-join (find-files "build/jar" ".")
13891 ":"))
13892 "-d" "build/classes"
13893 (find-files (string-append name "/src/main/java")
13894 ".*.java"))
13895 (invoke "jar" "-cf" (string-append "build/jar/" name ".jar")
13896 "-C" "build/classes" "."))
13897 (mkdir-p "build/classes")
13898 (mkdir-p "build/test-classes")
13899 (mkdir-p "build/jar")
13900 (build "javaparser-core")
13901 (build "javaparser-core-serialization")
13902 (build "javaparser-core-generators")
13903 (build "javaparser-core-metamodel-generator")
13904 (build "javaparser-symbol-solver-core")
13905 #t))
13906 (replace 'install
13907 (install-jars "build/jar")))))
13908 (inputs
13909 (list java-guava java-jboss-javassist java-jsonp-api))
13910 (native-inputs
13911 (list javacc))
13912 (home-page "https://javaparser.org/")
13913 (synopsis "Parser for Java")
13914 (description
13915 "This project contains a set of libraries implementing a Java 1.0 - Java
1391611 Parser with advanced analysis functionalities.")
13917 (license (list
13918 ;; either lgpl or asl
13919 license:lgpl3+
13920 license:asl2.0))))
13921
13922(define-public tla2tools
13923 ;; This package was originally based on the "v1.8.0" tag, but that merely
13924 ;; points to the moving master branch. That might be because the ‘latest
13925 ;; release’ at GitHub is currently 1.7.1. We'll see! For now, rather than
13926 ;; downgrade to 1.7.1 proper, use the commit that we originally dubbed 1.8.0.
13927 (let* ((release "1.7.1")
13928 (revision "0")
13929 (commit "6932e19083fc6df42473464857fc1280cb5aaecc"))
13930 (package
13931 (name "tla2tools")
13932 (version (git-version release revision commit))
13933 (source (origin
13934 (method git-fetch)
13935 (uri (git-reference
13936 (url "https://github.com/tlaplus/tlaplus")
13937 (commit commit)))
13938 (file-name (git-file-name name version))
13939 (sha256
13940 (base32
13941 "1hhx8gmn81k8qrkx4p7ppinmygxga9fqffd626wkvhjgg2ky8lhs"))
13942 (patches
13943 (search-patches "tla2tools-build-xml.patch"))
13944 (modules '((guix build utils)))
13945 (snippet
13946 '(begin
13947 ;; Remove packaged libraries (see 'replace-libs below)
13948 (for-each delete-file (find-files "." ".*.jar$"))))))
13949 (build-system ant-build-system)
13950 (arguments
13951 (let* ((tlatools "tlatools/org.lamport.tlatools/")
13952 (build-xml (string-append tlatools "customBuild.xml")))
13953 `(#:jdk ,openjdk11
13954 #:modules ((guix build ant-build-system)
13955 (guix build utils)
13956 (ice-9 match)
13957 (srfi srfi-26))
13958 #:make-flags '("-f" ,build-xml)
13959 #:phases
13960 (modify-phases %standard-phases
13961 ;; Replace packed libs with references to jars in store
13962 (add-after 'unpack 'replace-libs
13963 (lambda* (#:key inputs #:allow-other-keys)
13964 (define (input-jar input)
13965 (car (find-files (assoc-ref inputs input) "\\.jar$")))
13966 (for-each
13967 (match-lambda
13968 ((file . input)
13969 (symlink (input-jar input)
13970 (string-append ,tlatools "/lib/" file))))
13971 '(("gson/gson-2.8.6.jar" . "java-gson")
13972 ("javax.mail/mailapi-1.6.3.jar" . "java-javax-mail")
13973 ("jline/jline-terminal-3.14.1.jar" . "java-jline-terminal")
13974 ("jline/jline-reader-3.14.1.jar" . "java-jline-reader")
13975 ("lsp/org.eclipse.lsp4j.debug-0.10.0.jar" .
13976 "java-eclipse-lsp4j-debug")
13977 ("lsp/org.eclipse.lsp4j.jsonrpc-0.10.0.jar" .
13978 "java-eclipse-lsp4j-jsonrpc")
13979 ("lsp/org.eclipse.lsp4j.jsonrpc.debug-0.10.0.jar" .
13980 "java-eclipse-lsp4j-jsonrpc-debug")
13981 ("junit-4.12.jar" . "java-junit")
13982 ("easymock-3.3.1.jar" . "java-easymock")))
13983 ;; Retain a tiny subset of the original X-Git-*
13984 ;; manifest values just to aid in debugging.
13985 (substitute* ,build-xml
13986 (("\\$\\{git.tag\\}") (string-append "v" ,release)))))
13987 (add-before 'check 'prepare-tests
13988 (lambda _
13989 ;; The pcal tests write to .cfg files.
13990 (for-each (cut chmod <> #o644)
13991 (find-files (string-append ,tlatools
13992 "/test-model/pcal")
13993 "\\.cfg$"))))
13994 (replace 'install
13995 (lambda* (#:key inputs outputs #:allow-other-keys)
13996 (let* ((share (string-append (assoc-ref outputs "out") "/share/java"))
13997 (jar-name "tla2tools.jar"); set in project.properties
13998 (jar (string-append ,tlatools
13999 "/dist/" jar-name))
14000 (java-cp (string-append share "/" jar-name))
14001 (bin (string-append (assoc-ref outputs "out") "/bin"))
14002 (java (search-input-file inputs "/bin/java")))
14003 (install-file jar share)
14004 (mkdir-p bin)
14005 ;; Generate wrapper scripts for bin/, which invoke common
14006 ;; commands within tla2tools.jar. Users can still invoke
14007 ;; tla2tools.jar for the rest.
14008 (for-each
14009 (match-lambda
14010 ((wrapper . class)
14011 (let ((file (string-append bin "/" wrapper)))
14012 (begin
14013 (with-output-to-file file
14014 (lambda _
14015 (display
14016 (string-append
14017 "#!/bin/sh\n"
14018 java " -cp " java-cp " " class " \"$@\""))))
14019 (chmod file #o755)))))
14020 ;; bin/wrapper . java-class
14021 '(("pcal" . "pcal.trans")
14022 ("tlatex" . "tla2tex.TLA")
14023 ("tla2sany" . "tla2sany.SANY")
14024 ("tlc2" . "tlc2.TLC")
14025 ("tlc2-repl" . "tlc2.REPL"))))))))))
14026 (native-inputs
14027 (list java-junit java-easymock))
14028 (inputs
14029 (list java-javax-mail
14030 java-gson-2.8.6
14031 java-jline-terminal
14032 java-jline-reader
14033 java-eclipse-lsp4j-jsonrpc
14034 java-eclipse-lsp4j-jsonrpc-debug
14035 java-eclipse-lsp4j-debug))
14036 (home-page "https://lamport.azurewebsites.net/tla/tools.html")
14037 (synopsis "TLA+ tools (analyzer, TLC, TLATeX, PlusCal translator)")
14038 (description "TLA+ is a high-level language for modeling programs and
14039systems---especially concurrent and distributed ones. It's based on the idea
14040that the best way to describe things precisely is with simple
14041mathematics. TLA+ and its tools are useful for eliminating fundamental design
14042errors, which are hard to find and expensive to correct in code.
14043
14044The following TLA+ tools are available in this distribution:
14045
14046@itemize
14047@item The Syntactic Analyzer: A parser and syntax checker for
14048 TLA+ specifications;
14049@item TLC: A model checker and simulator for a subclass of \"executable\" TLA+
14050 specifications;
14051@item TLATeX: A program for typesetting TLA+ specifications;
14052@item Beta test versions of 1-3 for the TLA+2 language; and
14053@item The PlusCal translator.
14054@end itemize")
14055 (license license:expat))))
14056
14057;;;
14058;;; Avoid adding new packages to the end of this file. To reduce the chances
14059;;; of a merge conflict, place them above by existing packages with similar
14060;;; functionality or similar names.
14061;;;