gnu: icedtea-8: Fix build on aarch64-linux.
[jackhill/guix/guix.git] / gnu / packages / java.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
3 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
4 ;;; Copyright © 2016, 2017 Roel Janssen <roel@gnu.org>
5 ;;; Copyright © 2017, 2019 Carlo Zancanaro <carlo@zancanaro.id.au>
6 ;;; Copyright © 2017-2020 Julien Lepiller <julien@lepiller.eu>
7 ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
8 ;;; Copyright © 2016, 2017, 2018 Alex Vong <alexvong1995@gmail.com>
9 ;;; Copyright © 2017, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
10 ;;; Copyright © 2018, 2019 Gábor Boskovits <boskovits@gmail.com>
11 ;;; Copyright © 2018 Chris Marusich <cmmarusich@gmail.com>
12 ;;; Copyright © 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
13 ;;; Copyright © 2019, 2020 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
14 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
15 ;;; Copyright © 2020 Raghav Gururajan <raghavgururajan@disroot.org>
16 ;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
17 ;;;
18 ;;; This file is part of GNU Guix.
19 ;;;
20 ;;; GNU Guix is free software; you can redistribute it and/or modify it
21 ;;; under the terms of the GNU General Public License as published by
22 ;;; the Free Software Foundation; either version 3 of the License, or (at
23 ;;; your option) any later version.
24 ;;;
25 ;;; GNU Guix is distributed in the hope that it will be useful, but
26 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
27 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 ;;; GNU General Public License for more details.
29 ;;;
30 ;;; You should have received a copy of the GNU General Public License
31 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
32
33 (define-module (gnu packages java)
34 #:use-module ((guix licenses) #:prefix license:)
35 #:use-module (guix packages)
36 #:use-module (guix download)
37 #:use-module (guix hg-download)
38 #:use-module (guix git-download)
39 #:use-module (guix svn-download)
40 #:use-module ((guix build utils) #:select (alist-replace))
41 #:use-module (guix utils)
42 #:use-module (guix build-system ant)
43 #:use-module (guix build-system gnu)
44 #:use-module (guix build-system trivial)
45 #:use-module (gnu packages)
46 #:use-module (gnu packages attr)
47 #:use-module (gnu packages autotools)
48 #:use-module (gnu packages base)
49 #:use-module (gnu packages bash)
50 #:use-module (gnu packages certs)
51 #:use-module (gnu packages cpio)
52 #:use-module (gnu packages cups)
53 #:use-module (gnu packages compression)
54 #:use-module (gnu packages elf)
55 #:use-module (gnu packages fontutils)
56 #:use-module (gnu packages gawk)
57 #:use-module (gnu packages gettext)
58 #:use-module (gnu packages gl)
59 #:use-module (gnu packages ghostscript) ;lcms
60 #:use-module (gnu packages gnome)
61 #:use-module (gnu packages groovy)
62 #:use-module (gnu packages gtk)
63 #:use-module (gnu packages guile)
64 #:use-module (gnu packages icu4c)
65 #:use-module (gnu packages image)
66 #:use-module (gnu packages java-compression)
67 #:use-module (gnu packages libffi)
68 #:use-module (gnu packages linux) ;alsa
69 #:use-module (gnu packages maths)
70 #:use-module (gnu packages maven)
71 #:use-module (gnu packages maven-parent-pom)
72 #:use-module (gnu packages nss)
73 #:use-module (gnu packages onc-rpc)
74 #:use-module (gnu packages web)
75 #:use-module (gnu packages wget)
76 #:use-module (gnu packages pkg-config)
77 #:use-module (gnu packages perl)
78 #:use-module (gnu packages popt)
79 #:use-module (gnu packages kerberos)
80 #:use-module (gnu packages xml)
81 #:use-module (gnu packages xorg)
82 #:use-module (gnu packages texinfo)
83 #:use-module ((srfi srfi-1) #:select (fold alist-delete))
84 #:use-module (srfi srfi-11)
85 #:use-module (ice-9 match))
86
87 \f
88 ;;;
89 ;;; Java bootstrap toolchain.
90 ;;;
91
92 ;; The Java bootstrap begins with Jikes, a Java compiler written in C++. We
93 ;; use it to build a simple version of GNU Classpath, the Java standard
94 ;; library. We chose version 0.93 because it is the last version that can be
95 ;; built with Jikes. With Jikes and this version of GNU Classpath we can
96 ;; build JamVM, a Java Virtual Machine. We build version 1.5.1 because it is
97 ;; the last version of JamVM that works with a version of GNU classpath that
98 ;; does not require ECJ. These three packages make up the bootstrap JDK.
99
100 ;; This is sufficient to build an older version of Ant, which is needed to
101 ;; build an older version of ECJ, an incremental Java compiler, both of which
102 ;; are written in Java.
103 ;;
104 ;; ECJ is needed to build the latest release (0.99) and the development
105 ;; version of GNU Classpath. The development version of GNU Classpath has
106 ;; much more support for Java 1.6 than the latest release, but we need to
107 ;; build 0.99 first to get a working version of javah. ECJ, the development
108 ;; version of GNU Classpath, and the latest version of JamVM make up the
109 ;; second stage JDK with which we can build the OpenJDK with the Icedtea 1.x
110 ;; build framework. We then build the more recent JDKs Icedtea 2.x and
111 ;; Icedtea 3.x.
112
113 (define-public libantlr3c
114 (package
115 (name "libantlr3c")
116 (version "3.4")
117 (source
118 (origin
119 (method url-fetch)
120 (uri
121 (string-append "https://www.antlr3.org/download/C/"
122 name "-" version ".tar.gz"))
123 (sha256
124 (base32 "0lpbnb4dq4azmsvlhp6khq1gy42kyqyjv8gww74g5lm2y6blm4fa"))))
125 (build-system gnu-build-system)
126 (arguments
127 `(#:configure-flags (list "--enable-debuginfo" "--disable-static")
128 #:phases (modify-phases %standard-phases
129 (replace 'configure
130 (lambda* (#:key build target native-inputs inputs outputs
131 (configure-flags '()) out-of-source? system
132 #:allow-other-keys)
133 (let ((configure (assoc-ref %standard-phases 'configure))
134 (enable-64bit? (member system '("aarch64-linux"
135 "x86_64-linux"
136 "mips64el-linux"))))
137 (configure #:build build #:target target
138 #:native-inputs native-inputs
139 #:inputs inputs #:outputs outputs
140 #:configure-flags `(,(if enable-64bit?
141 "--enable-64bit"
142 '())
143 ,@configure-flags)
144 #:out-of-source? out-of-source?)))))))
145 (synopsis "ANTLR C Library")
146 (description "LIBANTLR3C provides run-time C libraries for ANTLR3 (ANother
147 Tool for Language Recognition v3).")
148 (home-page "https://www.antlr3.org/")
149 (license license:bsd-3)))
150
151 (define jikes
152 (package
153 (name "jikes")
154 (version "1.22")
155 (source (origin
156 (method url-fetch)
157 (uri (string-append "mirror://sourceforge/jikes/Jikes/"
158 version "/jikes-" version ".tar.bz2"))
159 (sha256
160 (base32
161 "1qqldrp74pzpy5ly421srqn30qppmm9cvjiqdngk8hf47dv2rc0c"))))
162 (build-system gnu-build-system)
163 (home-page "http://jikes.sourceforge.net/")
164 (synopsis "Compiler for the Java language")
165 (description "Jikes is a compiler that translates Java source files as
166 defined in The Java Language Specification into the bytecoded instruction set
167 and binary format defined in The Java Virtual Machine Specification.")
168 (license license:ibmpl1.0)))
169
170 (define-public drip
171 ;; Last release is from 2014, with a few important commits afterwards.
172 (let ((commit "a4bd00df0199e78243847f06cc04ecaea31f8f08"))
173 (package
174 (name "drip")
175 (version (git-version "0.2.4" "1" commit))
176 (source (origin
177 (method git-fetch)
178 (uri (git-reference
179 (url "https://github.com/ninjudd/drip")
180 (commit commit)))
181 (file-name (git-file-name name version))
182 (sha256
183 (base32
184 "0wzmjwfyldr3jn49517xd8yn7dgdk8h88qkga3kjyg1zc375ylg2"))))
185 (build-system gnu-build-system)
186 (native-inputs
187 `(("jdk" ,icedtea "jdk")))
188 (arguments
189 `(#:tests? #f ; No tests.
190 #:phases
191 (modify-phases %standard-phases
192 (delete 'configure)
193 (add-before 'install 'fix-wrapper
194 (lambda* (#:key inputs #:allow-other-keys)
195 (let ((jps (string-append (assoc-ref inputs "jdk") "/bin/jps")))
196 (substitute* "bin/drip"
197 (("jps") jps)
198 (("brew update && brew upgrade drip") "guix pull && guix install drip")
199 ;; No need to make:
200 (("\\(cd -- \"\\$drip_dir\" && make -s\\) \\|\\| exit 1") "")
201 ;; No need to include source:
202 (("\\[\\[ -r \\$drip_dir/src/org/flatland/drip/Main\\.java \\]\\]")
203 "true"))
204 #t)))
205 (replace 'install
206 (lambda* (#:key outputs #:allow-other-keys)
207 (let* ((out (assoc-ref outputs "out"))
208 (bin (string-append out "/bin"))
209 (share (string-append out "/share/drip")))
210 (mkdir-p bin)
211 (for-each
212 (lambda (file)
213 (install-file (string-append "bin/" file) bin))
214 '("drip" "drip_daemon" "drip_proxy"))
215 (install-file "drip.jar" share)
216 (substitute* (string-append bin "/drip")
217 (("drip_dir=\\$bin_dir/..")
218 (string-append "drip_dir=" share)))
219 #t))))))
220 (home-page "https://github.com/ninjudd/drip")
221 (synopsis "Faster Java Virtual Machine launching")
222 (description "Drip is a launcher for the Java Virtual Machine that
223 provides much faster startup times than the @command{java} command. The @command{drip}
224 script is intended to be a drop-in replacement for the @command{java} command,
225 only faster.")
226 (license license:epl1.0))))
227
228 ;; This is the last version of GNU Classpath that can be built without ECJ.
229 (define classpath-bootstrap
230 (package
231 (name "classpath")
232 (version "0.93")
233 (source (origin
234 (method url-fetch)
235 (uri (string-append "mirror://gnu/classpath/classpath-"
236 version ".tar.gz"))
237 (sha256
238 (base32
239 "0i99wf9xd3hw1sj2sazychb9prx8nadxh2clgvk3zlmb28v0jbfz"))
240 (patches (search-patches "classpath-aarch64-support.patch"))))
241 (build-system gnu-build-system)
242 (arguments
243 `(#:configure-flags
244 (list (string-append "JAVAC="
245 (assoc-ref %build-inputs "jikes")
246 "/bin/jikes")
247 "--disable-Werror"
248 "--disable-gmp"
249 "--disable-gtk-peer"
250 "--disable-gconf-peer"
251 "--disable-plugin"
252 "--disable-dssi"
253 "--disable-alsa"
254 "--disable-gjdoc")
255 #:phases
256 (modify-phases %standard-phases
257 ;; XXX: This introduces a memory leak as we remove a call to free up
258 ;; memory for the file name string. This was necessary because of a
259 ;; runtime error that would have prevented us from building
260 ;; ant-bootstrap later. See https://issues.guix.gnu.org/issue/36685
261 ;; for the gnarly details.
262 (add-after 'unpack 'remove-call-to-free
263 (lambda _
264 (substitute* "native/jni/java-io/java_io_VMFile.c"
265 (("result = cpio_isFileExists.*" m)
266 (string-append m "\n//")))
267 #t))
268 (add-after 'install 'install-data
269 (lambda _ (invoke "make" "install-data"))))))
270 (native-inputs
271 `(("jikes" ,jikes)
272 ("fastjar" ,fastjar)
273 ("libltdl" ,libltdl)
274 ("pkg-config" ,pkg-config)))
275 (home-page "https://www.gnu.org/software/classpath/")
276 (synopsis "Essential libraries for Java")
277 (description "GNU Classpath is a project to create core class libraries
278 for use with runtimes, compilers and tools for the Java programming
279 language.")
280 ;; GPLv2 or later, with special linking exception.
281 (license license:gpl2+)))
282
283 ;; This is the last version of JamVM that works with a version of GNU
284 ;; classpath that does not require ECJ.
285 (define jamvm-1-bootstrap
286 (package
287 (name "jamvm")
288 (version "1.5.1")
289 (source (origin
290 (method url-fetch)
291 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
292 "JamVM%20" version "/jamvm-"
293 version ".tar.gz"))
294 (patches (search-patches "jamvm-1.5.1-aarch64-support.patch"
295 "jamvm-1.5.1-armv7-support.patch"))
296 (sha256
297 (base32
298 "06lhi03l3b0h48pc7x58bk9my2nrcf1flpmglvys3wyad6yraf36"))
299 (snippet
300 '(begin
301 ;; Remove precompiled software.
302 (delete-file "lib/classes.zip")
303 #t))))
304 (build-system gnu-build-system)
305 (arguments
306 `(#:configure-flags
307 (list (string-append "--with-classpath-install-dir="
308 (assoc-ref %build-inputs "classpath"))
309 "--disable-int-caching"
310 "--enable-runtime-reloc-checks"
311 "--enable-ffi")
312 #:phases
313 ,(if (string-prefix? "aarch64" (or (%current-system)
314 (%current-target-system)))
315 ;; Makefiles and the configure script need to be regenerated to
316 ;; incorporate support for AArch64.
317 '(modify-phases %standard-phases
318 (replace 'bootstrap
319 (lambda _ (invoke "autoreconf" "-vif"))))
320 '%standard-phases)))
321 (inputs
322 `(("classpath" ,classpath-bootstrap)
323 ("jikes" ,jikes)
324 ("libffi" ,libffi)
325 ("zip" ,zip)
326 ("zlib" ,zlib)))
327 (native-inputs
328 (if (string-prefix? "aarch64" (or (%current-system)
329 (%current-target-system)))
330 ;; Additional packages needed for autoreconf.
331 `(("autoconf" ,autoconf)
332 ("automake" ,automake)
333 ("libtool" ,libtool))
334 '()))
335 (home-page "http://jamvm.sourceforge.net/")
336 (synopsis "Small Java Virtual Machine")
337 (description "JamVM is a Java Virtual Machine conforming to the JVM
338 specification edition 2 (blue book). It is extremely small. However, unlike
339 other small VMs it supports the full spec, including object finalisation and
340 JNI.")
341 (license license:gpl2+)))
342
343 (define ant-bootstrap
344 (package
345 (name "ant-bootstrap")
346 ;; The 1.10.x series requires Java 8. 1.9.0 and later use generics, which
347 ;; are not supported. The 1.8.x series is the last to use only features
348 ;; supported by Jikes.
349 (version "1.8.4")
350 (source (origin
351 (method url-fetch)
352 (uri (string-append "mirror://apache/"
353 "ant/source/apache-ant-"
354 version "-src.tar.bz2"))
355 (sha256
356 (base32
357 "1cg0lga887qz5iizh6mlkxp01lciymrhmp7wzxpl6zpnldxmzrjx"))))
358 (build-system gnu-build-system)
359 (arguments
360 `(#:imported-modules ((guix build syscalls)
361 ,@%gnu-build-system-modules)
362 #:modules ((srfi srfi-1)
363 (guix build gnu-build-system)
364 (guix build utils)
365 (guix build syscalls))
366 #:tests? #f ; no "check" target
367 #:phases
368 (modify-phases %standard-phases
369 (delete 'bootstrap)
370 (delete 'configure)
371 (replace 'build
372 (lambda* (#:key inputs #:allow-other-keys)
373 (setenv "JAVA_HOME" (assoc-ref inputs "jamvm"))
374 (setenv "JAVACMD"
375 (string-append (assoc-ref inputs "jamvm")
376 "/bin/jamvm"))
377 (setenv "JAVAC"
378 (string-append (assoc-ref inputs "jikes")
379 "/bin/jikes"))
380 (setenv "CLASSPATH"
381 (string-append (assoc-ref inputs "jamvm")
382 "/lib/rt.jar"))
383
384 ;; Ant complains if this file doesn't exist.
385 (setenv "HOME" "/tmp")
386 (with-output-to-file "/tmp/.ant.properties"
387 (lambda _ (display "")))
388
389 ;; Use jikes instead of javac for <javac ...> tags in build.xml
390 (setenv "ANT_OPTS" "-Dbuild.compiler=jikes")
391
392 ;; jikes produces lots of warnings, but they are not very
393 ;; interesting, so we silence them.
394 (setenv "$BOOTJAVAC_OPTS" "-nowarn")
395
396 ;; Without these JamVM options the build may freeze.
397 (substitute* "bootstrap.sh"
398 (("^\"\\$\\{JAVACMD\\}\" " m)
399 ,@(if (string-prefix? "armhf" (or (%current-system)
400 (%current-target-system)))
401 `((string-append m "-Xnocompact "))
402 `((string-append m "-Xnocompact -Xnoinlining ")))))
403
404 ;; Disable tests because we are bootstrapping and thus don't have
405 ;; any of the dependencies required to build and run the tests.
406 (substitute* "build.xml"
407 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
408 (invoke "bash" "bootstrap.sh"
409 (string-append "-Ddist.dir="
410 (assoc-ref %outputs "out")))))
411 (add-after 'build 'strip-jar-timestamps ;based on ant-build-system
412 (lambda* (#:key outputs #:allow-other-keys)
413 (define (repack-archive jar)
414 (let* ((dir (mkdtemp! "jar-contents.XXXXXX"))
415 (manifest (string-append dir "/META-INF/MANIFESTS.MF")))
416 (with-directory-excursion dir
417 (invoke "unzip" jar))
418 (delete-file jar)
419 ;; XXX: copied from (gnu build install)
420 (for-each (lambda (file)
421 (let ((s (lstat file)))
422 (unless (eq? (stat:type s) 'symlink)
423 (utime file 0 0 0 0))))
424 (find-files dir #:directories? #t))
425 ;; It is important that the manifest appears first.
426 (with-directory-excursion dir
427 (let* ((files (find-files "." ".*" #:directories? #t))
428 ;; To ensure that the reference scanner can
429 ;; detect all store references in the jars
430 ;; we disable compression with the "-0" option.
431 (command (if (file-exists? manifest)
432 `("zip" "-0" "-X" ,jar ,manifest
433 ,@files)
434 `("zip" "-0" "-X" ,jar ,@files))))
435 (apply invoke command)))))
436 (for-each repack-archive
437 (find-files
438 (string-append (assoc-ref %outputs "out") "/lib")
439 "\\.jar$"))
440 #t))
441 (delete 'install))))
442 (native-inputs
443 `(("jikes" ,jikes)
444 ("jamvm" ,jamvm-1-bootstrap)
445 ("unzip" ,unzip)
446 ("zip" ,zip)))
447 (home-page "https://ant.apache.org")
448 (synopsis "Build tool for Java")
449 (description
450 "Ant is a platform-independent build tool for Java. It is similar to
451 make but is implemented using the Java language, requires the Java platform,
452 and is best suited to building Java projects. Ant uses XML to describe the
453 build process and its dependencies, whereas Make uses Makefile format.")
454 (license license:asl2.0)))
455
456 ;; Version 3.2.2 is the last version without a dependency on a full-fledged
457 ;; compiler for Java 1.5.
458 (define ecj-bootstrap
459 (package
460 (name "ecj-bootstrap")
461 (version "3.2.2")
462 (source (origin
463 (method url-fetch)
464 (uri (string-append "http://archive.eclipse.org/eclipse/"
465 "downloads/drops/R-" version
466 "-200702121330/ecjsrc.zip"))
467 (sha256
468 (base32
469 "05hj82kxd23qaglsjkaqcj944riisjha7acf7h3ljhrjyljx8307"))))
470 ;; It would be so much easier if we could use the ant-build-system, but we
471 ;; cannot as we don't have ant at this point. We use ecj for
472 ;; bootstrapping the JDK.
473 (build-system gnu-build-system)
474 (arguments
475 `(#:modules ((guix build gnu-build-system)
476 (guix build utils)
477 (srfi srfi-1))
478 #:tests? #f ; there are no tests
479 #:phases
480 (modify-phases %standard-phases
481 (replace 'configure
482 (lambda* (#:key inputs #:allow-other-keys)
483 (setenv "CLASSPATH"
484 (string-join
485 (cons (string-append (assoc-ref inputs "jamvm")
486 "/lib/rt.jar")
487 (find-files (string-append
488 (assoc-ref inputs "ant-bootstrap")
489 "/lib")
490 "\\.jar$"))
491 ":"))
492 #t))
493 (replace 'build
494 (lambda* (#:key inputs #:allow-other-keys)
495 ;; The unpack phase enters the "org" directory by mistake.
496 (chdir "..")
497
498 ;; Create a simple manifest to make ecj executable.
499 (with-output-to-file "manifest"
500 (lambda _
501 (display "Manifest-Version: 1.0
502 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n")))
503
504 ;; Compile it all!
505 (and (apply invoke "jikes"
506 (find-files "." "\\.java$"))
507 (invoke "fastjar" "cvfm"
508 "ecj-bootstrap.jar" "manifest" "."))))
509 (replace 'install
510 (lambda* (#:key outputs #:allow-other-keys)
511 (let ((share (string-append (assoc-ref outputs "out")
512 "/share/java/")))
513 (mkdir-p share)
514 (install-file "ecj-bootstrap.jar" share)
515 #t))))))
516 (native-inputs
517 `(("ant-bootstrap" ,ant-bootstrap)
518 ("unzip" ,unzip)
519 ("jikes" ,jikes)
520 ("jamvm" ,jamvm-1-bootstrap)
521 ("fastjar" ,fastjar)))
522 (home-page "https://eclipse.org")
523 (synopsis "Eclipse Java development tools core batch compiler")
524 (description "This package provides the Eclipse Java core batch compiler
525 for bootstrapping purposes. The @dfn{Eclipse compiler for Java} (ecj) is a
526 requirement for all GNU Classpath releases after version 0.93.")
527 (license license:epl1.0)))
528
529 (define ecj-javac-wrapper
530 (package (inherit ecj-bootstrap)
531 (name "ecj-javac-wrapper")
532 (source #f)
533 (build-system trivial-build-system)
534 (arguments
535 `(#:modules ((guix build utils))
536 #:builder
537 (begin
538 (use-modules (guix build utils))
539 (let* ((bin (string-append (assoc-ref %outputs "out") "/bin"))
540 (target (string-append bin "/javac"))
541 (guile (string-append (assoc-ref %build-inputs "guile")
542 "/bin/guile"))
543 (ecj (string-append (assoc-ref %build-inputs "ecj-bootstrap")
544 "/share/java/ecj-bootstrap.jar"))
545 (java (string-append (assoc-ref %build-inputs "jamvm")
546 "/bin/jamvm"))
547 (bootcp (let ((jvmlib (string-append (assoc-ref %build-inputs "classpath")
548 "/share/classpath")))
549 (string-append jvmlib "/glibj.zip:"
550 jvmlib "/tools.zip"))))
551 (mkdir-p bin)
552 (with-output-to-file target
553 (lambda _
554 (format #t "#!~a --no-auto-compile\n!#\n" guile)
555 (write
556 `(begin (use-modules (ice-9 match)
557 (ice-9 receive)
558 (ice-9 hash-table)
559 (srfi srfi-1)
560 (srfi srfi-26))
561 (define defaults
562 '(("-bootclasspath" ,bootcp)
563 ("-source" "1.5")
564 ("-target" "1.5")
565 ("-cp" ".")))
566 (define (main args)
567 (let ((classpath (getenv "CLASSPATH")))
568 (setenv "CLASSPATH"
569 (string-join (list ,ecj
570 ,(string-append (assoc-ref %build-inputs "jamvm")
571 "/lib/rt.jar")
572 (or classpath ""))
573 ":")))
574 (receive (vm-args other-args)
575 ;; Separate VM arguments from arguments to ECJ.
576 (partition (cut string-prefix? "-J" <>)
577 (fold (lambda (default acc)
578 (if (member (first default) acc)
579 acc (append default acc)))
580 args defaults))
581 (apply system* ,java
582 (append
583 ;; Remove "-J" prefix
584 (map (cut string-drop <> 2) vm-args)
585 '("org.eclipse.jdt.internal.compiler.batch.Main")
586 (cons "-nowarn" other-args)))))
587 ;; Entry point
588 (let ((args (cdr (command-line))))
589 (if (null? args)
590 (format (current-error-port) "javac: no arguments given!\n")
591 (main args)))))))
592 (chmod target #o755)
593 #t))))
594 (native-inputs
595 `(("guile" ,guile-2.2)
596 ("ecj-bootstrap" ,ecj-bootstrap)
597 ("jamvm" ,jamvm-1-bootstrap)
598 ("classpath" ,classpath-bootstrap)))
599 (description "This package provides a wrapper around the @dfn{Eclipse
600 compiler for Java} (ecj) with a command line interface that is compatible with
601 the standard javac executable.")))
602
603 ;; The classpath-bootstrap was built without a virtual machine, so it does not
604 ;; provide a wrapper for javah. We cannot build the development version of
605 ;; Classpath without javah.
606 (define classpath-0.99
607 (package (inherit classpath-bootstrap)
608 (version "0.99")
609 (source (origin
610 (method url-fetch)
611 (uri (string-append "mirror://gnu/classpath/classpath-"
612 version ".tar.gz"))
613 (sha256
614 (base32
615 "1j7cby4k66f1nvckm48xcmh352b1d1b33qk7l6hi7dp9i9zjjagr"))
616 (patches (search-patches "classpath-aarch64-support.patch"))))
617 (arguments
618 `(#:configure-flags
619 (list (string-append "--with-ecj-jar="
620 (assoc-ref %build-inputs "ecj-bootstrap")
621 "/share/java/ecj-bootstrap.jar")
622 (string-append "JAVAC="
623 (assoc-ref %build-inputs "ecj-javac-wrapper")
624 "/bin/javac")
625 (string-append "JAVA="
626 (assoc-ref %build-inputs "jamvm")
627 "/bin/jamvm")
628 "GCJ_JAVAC_TRUE=no"
629 "ac_cv_prog_java_works=yes" ; trust me
630 "--disable-Werror"
631 "--disable-gmp"
632 "--disable-gtk-peer"
633 "--disable-gconf-peer"
634 "--disable-plugin"
635 "--disable-dssi"
636 "--disable-alsa"
637 "--disable-gjdoc")
638 #:phases
639 (modify-phases %standard-phases
640 (add-after 'install 'install-data
641 (lambda _ (invoke "make" "install-data"))))))
642 (native-inputs
643 `(("ecj-bootstrap" ,ecj-bootstrap)
644 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
645 ("fastjar" ,fastjar)
646 ("jamvm" ,jamvm-1-bootstrap)
647 ("classpath" ,classpath-bootstrap)
648 ("libltdl" ,libltdl)
649 ("pkg-config" ,pkg-config)))))
650
651 ;; We need this because classpath-bootstrap does not provide all of the tools
652 ;; we need to build classpath-devel.
653 (define classpath-jamvm-wrappers
654 (package (inherit classpath-0.99)
655 (name "classpath-jamvm-wrappers")
656 (source #f)
657 (build-system trivial-build-system)
658 (arguments
659 `(#:modules ((guix build utils))
660 #:builder
661 (begin
662 (use-modules (guix build utils))
663 (let* ((bash (assoc-ref %build-inputs "bash"))
664 (jamvm (assoc-ref %build-inputs "jamvm"))
665 (classpath (assoc-ref %build-inputs "classpath"))
666 (bin (string-append (assoc-ref %outputs "out")
667 "/bin/")))
668 (mkdir-p bin)
669 (for-each (lambda (tool)
670 (with-output-to-file (string-append bin tool)
671 (lambda _
672 ,@(if (string-prefix? "armhf" (or (%current-system)
673 (%current-target-system)))
674 `((format #t "#!~a/bin/sh
675 ~a/bin/jamvm -Xnocompact -classpath ~a/share/classpath/tools.zip \
676 gnu.classpath.tools.~a.~a $@"
677 bash jamvm classpath tool
678 (if (string=? "native2ascii" tool)
679 "Native2ASCII" "Main")))
680 `((format #t "#!~a/bin/sh
681 ~a/bin/jamvm -Xnocompact -Xnoinlining -classpath ~a/share/classpath/tools.zip \
682 gnu.classpath.tools.~a.~a $@"
683 bash jamvm classpath tool
684 (if (string=? "native2ascii" tool)
685 "Native2ASCII" "Main"))))))
686 (chmod (string-append bin tool) #o755))
687 (list "javah"
688 "rmic"
689 "rmid"
690 "orbd"
691 "rmiregistry"
692 "native2ascii"))
693 #t))))
694 (native-inputs
695 `(("bash" ,bash)
696 ("jamvm" ,jamvm-1-bootstrap)
697 ("classpath" ,classpath-0.99)))
698 (inputs '())
699 (synopsis "Executables from GNU Classpath")
700 (description "This package provides wrappers around the tools provided by
701 the GNU Classpath library. They are executed by the JamVM virtual
702 machine.")))
703
704 ;; The last release of GNU Classpath is 0.99 and it happened in 2012. Since
705 ;; then Classpath has gained much more support for Java 1.6.
706 (define-public classpath-devel
707 (let ((commit "e7c13ee0cf2005206fbec0eca677f8cf66d5a103")
708 (revision "1"))
709 (package (inherit classpath-bootstrap)
710 (version (string-append "0.99-" revision "." (string-take commit 9)))
711 (source (origin
712 (method git-fetch)
713 (uri (git-reference
714 (url "https://git.savannah.gnu.org/git/classpath.git")
715 (commit commit)))
716 (file-name (string-append "classpath-" version "-checkout"))
717 (sha256
718 (base32
719 "1v2rww76ww322mpg3s12a1kkc6gkp31bm9gcxs532h0wq285fiw4"))
720 (patches (search-patches "classpath-aarch64-support.patch"))))
721 (arguments
722 `(#:make-flags
723 ;; Ensure that the initial heap size is smaller than the maximum
724 ;; size. By default only Xmx is set, which can lead to invalid
725 ;; memory settings on some machines with a lot of memory.
726 '("JAVAC_MEM_OPT=-J-Xms512M -J-Xmx768M")
727 #:configure-flags
728 (list (string-append "--with-ecj-jar="
729 (assoc-ref %build-inputs "ecj-bootstrap")
730 "/share/java/ecj-bootstrap.jar")
731 (string-append "--with-javac="
732 (assoc-ref %build-inputs "ecj-javac-wrapper")
733 "/bin/javac")
734 (string-append "JAVA="
735 (assoc-ref %build-inputs "jamvm")
736 "/bin/jamvm")
737 "GCJ_JAVAC_TRUE=no"
738 "ac_cv_prog_java_works=yes" ; trust me
739 "--disable-Werror"
740 "--disable-gmp"
741 "--disable-gtk-peer"
742 "--disable-gconf-peer"
743 "--disable-plugin"
744 "--disable-dssi"
745 "--disable-alsa"
746 "--disable-gjdoc")
747 #:phases
748 (modify-phases %standard-phases
749 ;; XXX The bootstrap phase executes autogen.sh, which fails after
750 ;; complaining about the lack of gettext.
751 (replace 'bootstrap
752 (lambda _ (invoke "autoreconf" "-vif")))
753 (add-after 'unpack 'remove-unsupported-annotations
754 (lambda _
755 (substitute* (find-files "java" "\\.java$")
756 (("@Override") ""))
757 #t))
758 (add-after 'install 'install-data
759 (lambda _ (invoke "make" "install-data"))))))
760 (native-inputs
761 `(("autoconf" ,autoconf)
762 ("automake" ,automake)
763 ("libtool" ,libtool)
764 ("gettext" ,gettext-minimal)
765 ("texinfo" ,texinfo)
766 ("classpath-jamvm-wrappers" ,classpath-jamvm-wrappers) ; for javah
767 ("ecj-bootstrap" ,ecj-bootstrap)
768 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
769 ("fastjar" ,fastjar)
770 ("jamvm" ,jamvm-1-bootstrap)
771 ("libltdl" ,libltdl)
772 ("pkg-config" ,pkg-config))))))
773
774 (define jamvm
775 (package (inherit jamvm-1-bootstrap)
776 (version "2.0.0")
777 (source (origin
778 (method url-fetch)
779 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
780 "JamVM%20" version "/jamvm-"
781 version ".tar.gz"))
782 (sha256
783 (base32
784 "1nl0zxz8y5x8gwsrm7n32bry4dx8x70p8z3s9jbdvs8avyb8whkn"))
785 (patches
786 (search-patches "jamvm-2.0.0-disable-branch-patching.patch"
787 "jamvm-2.0.0-opcode-guard.patch"
788 "jamvm-2.0.0-aarch64-support.patch"))
789 (snippet
790 '(begin
791 ;; Remove precompiled software.
792 (delete-file "src/classlib/gnuclasspath/lib/classes.zip")
793 #t))))
794 (build-system gnu-build-system)
795 (arguments
796 (substitute-keyword-arguments (package-arguments jamvm-1-bootstrap)
797 ((#:configure-flags _)
798 '(list (string-append "--with-classpath-install-dir="
799 (assoc-ref %build-inputs "classpath"))))))
800 (inputs
801 `(("classpath" ,classpath-devel)
802 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
803 ("zip" ,zip)
804 ("zlib" ,zlib)))))
805
806 (define ecj-javac-wrapper-final
807 (package (inherit ecj-javac-wrapper)
808 (native-inputs
809 `(("guile" ,guile-2.2)
810 ("ecj-bootstrap" ,ecj-bootstrap)
811 ("jamvm" ,jamvm)
812 ("classpath" ,classpath-devel)))))
813
814 ;; The bootstrap JDK consisting of jamvm, classpath-devel,
815 ;; ecj-javac-wrapper-final cannot build Icedtea 2.x directly, because it's
816 ;; written in Java 7. It can, however, build the unmaintained Icedtea 1.x,
817 ;; which uses Java 6 only.
818 (define-public icedtea-6
819 (package
820 (name "icedtea")
821 (version "1.13.13")
822 (source (origin
823 (method url-fetch)
824 (uri (string-append
825 "http://icedtea.wildebeest.org/download/source/icedtea6-"
826 version ".tar.xz"))
827 (sha256
828 (base32
829 "0bg9sb4f7qbq77c0zf9m17p47ga0kf0r9622g9p12ysg26jd1ksg"))
830 (patches (search-patches
831 "icedtea-6-extend-hotspot-aarch64-support.patch"))
832 (modules '((guix build utils)))
833 (snippet
834 '(begin
835 (substitute* "Makefile.in"
836 ;; do not leak information about the build host
837 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
838 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
839 #t))))
840 (build-system gnu-build-system)
841 (outputs '("out" ; Java Runtime Environment
842 "jdk" ; Java Development Kit
843 "doc")) ; all documentation
844 (arguments
845 `(;; There are many failing tests and many are known to fail upstream.
846 #:tests? #f
847
848 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
849 ;; gremlin) doesn't support it yet, so skip this phase.
850 #:validate-runpath? #f
851
852 #:modules ((guix build utils)
853 (guix build gnu-build-system)
854 (srfi srfi-19))
855
856 #:configure-flags
857 `("--enable-bootstrap"
858 "--enable-nss"
859 "--without-rhino"
860 ,(string-append "--with-parallel-jobs="
861 (number->string (parallel-job-count)))
862 "--disable-downloading"
863 "--disable-tests"
864 ,(string-append "--with-ecj="
865 (assoc-ref %build-inputs "ecj")
866 "/share/java/ecj-bootstrap.jar")
867 ,(string-append "--with-jar="
868 (assoc-ref %build-inputs "fastjar")
869 "/bin/fastjar")
870 ,(string-append "--with-jdk-home="
871 (assoc-ref %build-inputs "classpath"))
872 ,(string-append "--with-java="
873 (assoc-ref %build-inputs "jamvm")
874 "/bin/jamvm"))
875 #:phases
876 (modify-phases %standard-phases
877 (replace 'unpack
878 (lambda* (#:key source inputs #:allow-other-keys)
879 (invoke "tar" "xvf" source)
880 (chdir (string-append "icedtea6-" ,version))
881 (mkdir "openjdk")
882 (copy-recursively (assoc-ref inputs "openjdk-src") "openjdk")
883 ;; The convenient OpenJDK source bundle is no longer
884 ;; available for download, so we have to take the sources
885 ;; from the Mercurial repositories and change the Makefile
886 ;; to avoid tests for the OpenJDK zip archive.
887 (with-directory-excursion "openjdk"
888 (for-each (lambda (part)
889 (mkdir part)
890 (copy-recursively
891 (assoc-ref inputs
892 (string-append part "-src"))
893 part))
894 '("jdk" "hotspot" "corba"
895 "langtools" "jaxp" "jaxws")))
896 (substitute* "patches/freetypeversion.patch"
897 (("REQUIRED_FREETYPE_VERSION = 2.2.1")
898 "REQUIRED_FREETYPE_VERSION = 2.10.1"))
899 (substitute* "Makefile.in"
900 (("echo \"ERROR: No up-to-date OpenJDK zip available\"; exit -1;")
901 "echo \"trust me\";")
902 ;; The contents of the bootstrap directory must be
903 ;; writeable but when copying from the store they are
904 ;; not.
905 (("mkdir -p lib/rt" line)
906 (string-append line "; chmod -R u+w $(BOOT_DIR)")))
907 (invoke "chmod" "-R" "u+w" "openjdk")))
908 (add-after 'unpack 'use-classpath
909 (lambda* (#:key inputs #:allow-other-keys)
910 (let ((jvmlib (assoc-ref inputs "classpath"))
911 (jamvm (assoc-ref inputs "jamvm")))
912 ;; Classpath does not provide rt.jar.
913 (substitute* "Makefile.in"
914 (("\\$\\(SYSTEM_JDK_DIR\\)/jre/lib/rt.jar")
915 (string-append jvmlib "/share/classpath/glibj.zip")))
916 ;; Make sure we can find all classes.
917 (setenv "CLASSPATH"
918 (string-append jvmlib "/share/classpath/glibj.zip:"
919 jvmlib "/share/classpath/tools.zip:"
920 jamvm "/lib/rt.jar"))
921 (setenv "JAVACFLAGS"
922 (string-append "-cp "
923 jvmlib "/share/classpath/glibj.zip:"
924 jvmlib "/share/classpath/tools.zip")))
925 #t))
926 (add-after 'unpack 'patch-patches
927 (lambda _
928 ;; shebang in patches so that they apply cleanly
929 (substitute* '("patches/jtreg-jrunscript.patch"
930 "patches/hotspot/hs23/drop_unlicensed_test.patch")
931 (("#!/bin/sh") (string-append "#!" (which "sh"))))
932 #t))
933 (add-after 'unpack 'patch-paths
934 (lambda* (#:key inputs #:allow-other-keys)
935 ;; buildtree.make generates shell scripts, so we need to replace
936 ;; the generated shebang
937 (substitute* '("openjdk/hotspot/make/linux/makefiles/buildtree.make")
938 (("/bin/sh") (which "bash")))
939
940 (let ((corebin (string-append
941 (assoc-ref inputs "coreutils") "/bin/"))
942 (binbin (string-append
943 (assoc-ref inputs "binutils") "/bin/"))
944 (grepbin (string-append
945 (assoc-ref inputs "grep") "/bin/")))
946 (substitute* '("openjdk/jdk/make/common/shared/Defs-linux.gmk"
947 "openjdk/corba/make/common/shared/Defs-linux.gmk")
948 (("UNIXCOMMAND_PATH = /bin/")
949 (string-append "UNIXCOMMAND_PATH = " corebin))
950 (("USRBIN_PATH = /usr/bin/")
951 (string-append "USRBIN_PATH = " corebin))
952 (("DEVTOOLS_PATH *= */usr/bin/")
953 (string-append "DEVTOOLS_PATH = " corebin))
954 (("COMPILER_PATH *= */usr/bin/")
955 (string-append "COMPILER_PATH = "
956 (assoc-ref inputs "gcc") "/bin/"))
957 (("DEF_OBJCOPY *=.*objcopy")
958 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
959
960 ;; fix path to alsa header
961 (substitute* "openjdk/jdk/make/common/shared/Sanity.gmk"
962 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
963 (string-append "ALSA_INCLUDE="
964 (assoc-ref inputs "alsa-lib")
965 "/include/alsa/version.h")))
966
967 ;; fix hard-coded utility paths
968 (substitute* '("openjdk/jdk/make/common/shared/Defs-utils.gmk"
969 "openjdk/corba/make/common/shared/Defs-utils.gmk")
970 (("ECHO *=.*echo")
971 (string-append "ECHO = " (which "echo")))
972 (("^GREP *=.*grep")
973 (string-append "GREP = " (which "grep")))
974 (("EGREP *=.*egrep")
975 (string-append "EGREP = " (which "egrep")))
976 (("CPIO *=.*cpio")
977 (string-append "CPIO = " (which "cpio")))
978 (("READELF *=.*readelf")
979 (string-append "READELF = " (which "readelf")))
980 (("^ *AR *=.*ar")
981 (string-append "AR = " (which "ar")))
982 (("^ *TAR *=.*tar")
983 (string-append "TAR = " (which "tar")))
984 (("AS *=.*as")
985 (string-append "AS = " (which "as")))
986 (("LD *=.*ld")
987 (string-append "LD = " (which "ld")))
988 (("STRIP *=.*strip")
989 (string-append "STRIP = " (which "strip")))
990 (("NM *=.*nm")
991 (string-append "NM = " (which "nm")))
992 (("^SH *=.*sh")
993 (string-append "SH = " (which "bash")))
994 (("^FIND *=.*find")
995 (string-append "FIND = " (which "find")))
996 (("LDD *=.*ldd")
997 (string-append "LDD = " (which "ldd")))
998 (("NAWK *=.*(n|g)awk")
999 (string-append "NAWK = " (which "gawk")))
1000 (("XARGS *=.*xargs")
1001 (string-append "XARGS = " (which "xargs")))
1002 (("UNZIP *=.*unzip")
1003 (string-append "UNZIP = " (which "unzip")))
1004 (("ZIPEXE *=.*zip")
1005 (string-append "ZIPEXE = " (which "zip")))
1006 (("SED *=.*sed")
1007 (string-append "SED = " (which "sed"))))
1008
1009 ;; Some of these timestamps cause problems as they are more than
1010 ;; 10 years ago, failing the build process.
1011 (substitute*
1012 "openjdk/jdk/src/share/classes/java/util/CurrencyData.properties"
1013 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
1014 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
1015 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
1016 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY"))
1017 #t)))
1018 (add-before 'configure 'set-additional-paths
1019 (lambda* (#:key inputs #:allow-other-keys)
1020 (setenv "CPATH"
1021 (string-append (assoc-ref inputs "libxrender")
1022 "/include/X11/extensions" ":"
1023 (assoc-ref inputs "libxtst")
1024 "/include/X11/extensions" ":"
1025 (assoc-ref inputs "libxinerama")
1026 "/include/X11/extensions" ":"
1027 (or (getenv "CPATH") "")))
1028 (setenv "ALT_CUPS_HEADERS_PATH"
1029 (string-append (assoc-ref inputs "cups")
1030 "/include"))
1031 (setenv "ALT_FREETYPE_HEADERS_PATH"
1032 (string-append (assoc-ref inputs "freetype")
1033 "/include"))
1034 (setenv "ALT_FREETYPE_LIB_PATH"
1035 (string-append (assoc-ref inputs "freetype")
1036 "/lib"))
1037 #t))
1038 (add-before 'build 'disable-os-version-check
1039 ;; allow build on linux major version change
1040 (lambda _
1041 (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok")
1042 #t))
1043 (replace 'install
1044 (lambda* (#:key outputs #:allow-other-keys)
1045 (let ((doc (string-append (assoc-ref outputs "doc")
1046 "/share/doc/icedtea"))
1047 (jre (assoc-ref outputs "out"))
1048 (jdk (assoc-ref outputs "jdk")))
1049 (copy-recursively "openjdk.build/docs" doc)
1050 (copy-recursively "openjdk.build/j2re-image" jre)
1051 (copy-recursively "openjdk.build/j2sdk-image" jdk))
1052 #t)))))
1053 (native-inputs
1054 `(("ant" ,ant-bootstrap)
1055 ("alsa-lib" ,alsa-lib)
1056 ("attr" ,attr)
1057 ("classpath" ,classpath-devel)
1058 ("coreutils" ,coreutils)
1059 ("cpio" ,cpio)
1060 ("cups" ,cups)
1061 ("ecj" ,ecj-bootstrap)
1062 ("ecj-javac" ,ecj-javac-wrapper-final)
1063 ("fastjar" ,fastjar)
1064 ("fontconfig" ,fontconfig)
1065 ("freetype" ,freetype)
1066 ("gtk" ,gtk+-2)
1067 ("gawk" ,gawk)
1068 ("giflib" ,giflib)
1069 ("grep" ,grep)
1070 ("jamvm" ,jamvm)
1071 ("lcms" ,lcms)
1072 ("libjpeg" ,libjpeg-turbo)
1073 ("libnsl" ,libnsl)
1074 ("libpng" ,libpng)
1075 ("libtool" ,libtool)
1076 ("libx11" ,libx11)
1077 ("libxcomposite" ,libxcomposite)
1078 ("libxi" ,libxi)
1079 ("libxinerama" ,libxinerama)
1080 ("libxrender" ,libxrender)
1081 ("libxslt" ,libxslt) ;for xsltproc
1082 ("libxt" ,libxt)
1083 ("libxtst" ,libxtst)
1084 ("mit-krb5" ,mit-krb5)
1085 ("nss" ,nss)
1086 ("nss-certs" ,nss-certs)
1087 ("perl" ,perl)
1088 ("pkg-config" ,pkg-config)
1089 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
1090 ("unzip" ,unzip)
1091 ("wget" ,wget)
1092 ("which" ,which)
1093 ("zip" ,zip)
1094 ("zlib" ,zlib)
1095 ("openjdk-src"
1096 ,(origin
1097 (method hg-fetch)
1098 (uri (hg-reference
1099 (url "http://hg.openjdk.java.net/jdk6/jdk6/")
1100 (changeset "jdk6-b41")))
1101 (sha256
1102 (base32
1103 "14q47yfg586fs64w30g8mk92m5dkxsvr36zzh0ra99xk5x0x96mv"))))
1104 ("jdk-src"
1105 ,(origin
1106 (method hg-fetch)
1107 (uri (hg-reference
1108 (url "http://hg.openjdk.java.net/jdk6/jdk6/jdk/")
1109 (changeset "jdk6-b41")))
1110 (sha256
1111 (base32
1112 "165824nhg1k1dx6zs9dny0j49rmk35jw5b13dmz8c77jfajml4v9"))))
1113 ("hotspot-src"
1114 ,(origin
1115 (method hg-fetch)
1116 (uri (hg-reference
1117 (url "http://hg.openjdk.java.net/jdk6/jdk6/hotspot/")
1118 (changeset "jdk6-b41")))
1119 (sha256
1120 (base32
1121 "07lc1z4k5dj9nrc1wvwmpvxr3xgxrdkdh53xb95skk5ij49yagfd"))))
1122 ("corba-src"
1123 ,(origin
1124 (method hg-fetch)
1125 (uri (hg-reference
1126 (url "http://hg.openjdk.java.net/jdk6/jdk6/corba/")
1127 (changeset "jdk6-b41")))
1128 (sha256
1129 (base32
1130 "1p9g1r9dnax2iwp7yb59qx7m4nmshqhwmrb2b8jj8zgbd9dl2i3q"))))
1131 ("langtools-src"
1132 ,(origin
1133 (method hg-fetch)
1134 (uri (hg-reference
1135 (url "http://hg.openjdk.java.net/jdk6/jdk6/langtools/")
1136 (changeset "jdk6-b41")))
1137 (sha256
1138 (base32
1139 "1x52wd67fynbbd9ild6fb4wvba3f5hhwk03qdjfazd0a1qr37z3d"))))
1140 ("jaxp-src"
1141 ,(origin
1142 (method hg-fetch)
1143 (uri (hg-reference
1144 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxp/")
1145 (changeset "jdk6-b41")))
1146 (sha256
1147 (base32
1148 "0shlqrvzpr4nrkmv215lbxnby63s3yvbdh1yxcayznsyqwa4nlxm"))))
1149 ("jaxws-src"
1150 ,(origin
1151 (method hg-fetch)
1152 (uri (hg-reference
1153 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxws/")
1154 (changeset "jdk6-b41")))
1155 (sha256
1156 (base32
1157 "0835lkw8vib1xhp8lxnybhlvzdh699hbi4mclxanydjk63zbpxk0"))))))
1158 (home-page "http://icedtea.classpath.org")
1159 (synopsis "Java development kit")
1160 (description
1161 "This package provides the OpenJDK built with the IcedTea build harness.
1162 This version of the OpenJDK is no longer maintained and is only used for
1163 bootstrapping purposes.")
1164 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1165 ;; same license as both GNU Classpath and OpenJDK.
1166 (license license:gpl2+)))
1167
1168 (define-public icedtea-7
1169 (let* ((version "2.6.13")
1170 (drop (lambda (name hash)
1171 (origin
1172 (method url-fetch)
1173 (uri (string-append
1174 "http://icedtea.classpath.org/download/drops"
1175 "/icedtea7/" version "/" name ".tar.bz2"))
1176 (sha256 (base32 hash))))))
1177 (package
1178 (name "icedtea")
1179 (version version)
1180 (source (origin
1181 (method url-fetch)
1182 (uri (string-append
1183 "http://icedtea.wildebeest.org/download/source/icedtea-"
1184 version ".tar.xz"))
1185 (sha256
1186 (base32
1187 "1w331rdqx1dcx2xb0fmjmrkdc71xqn20fxsgw8by4xhiblh88khh"))
1188 (modules '((guix build utils)))
1189 (snippet
1190 '(begin
1191 (substitute* "Makefile.in"
1192 ;; do not leak information about the build host
1193 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
1194 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
1195 #t))))
1196 (build-system gnu-build-system)
1197 (outputs '("out" ; Java Runtime Environment
1198 "jdk" ; Java Development Kit
1199 "doc")) ; all documentation
1200 (arguments
1201 `(;; There are many test failures. Some are known to
1202 ;; fail upstream, others relate to not having an X
1203 ;; server running at test time, yet others are a
1204 ;; complete mystery to me.
1205
1206 ;; hotspot: passed: 241; failed: 45; error: 2
1207 ;; langtools: passed: 1,934; failed: 26
1208 ;; jdk: unknown
1209 #:tests? #f
1210
1211 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
1212 ;; gremlin) doesn't support it yet, so skip this phase.
1213 #:validate-runpath? #f
1214
1215 ;; Apparently, the C locale is needed for some of the tests.
1216 #:locale "C"
1217
1218 #:modules ((guix build utils)
1219 (guix build gnu-build-system)
1220 (ice-9 match)
1221 (ice-9 popen)
1222 (srfi srfi-19)
1223 (srfi srfi-26))
1224
1225 #:configure-flags
1226 ;; TODO: package pcsc and sctp, and add to inputs
1227 `("--disable-system-pcsc"
1228 "--disable-system-sctp"
1229 "--enable-bootstrap"
1230 "--enable-nss"
1231 "--without-rhino"
1232 ,(string-append "--with-parallel-jobs="
1233 (number->string (parallel-job-count)))
1234 "--disable-downloading"
1235 "--disable-tests" ;they are run in the check phase instead
1236 "--with-openjdk-src-dir=./openjdk.src"
1237 ,(string-append "--with-jdk-home="
1238 (assoc-ref %build-inputs "jdk")))
1239
1240 #:phases
1241 (modify-phases %standard-phases
1242 (replace 'unpack
1243 (lambda* (#:key source inputs #:allow-other-keys)
1244 (let ((target (string-append "icedtea-" ,version))
1245 (unpack (lambda* (name #:optional dir)
1246 (let ((dir (or dir
1247 (string-drop-right name 5))))
1248 (mkdir dir)
1249 (invoke "tar" "xvf"
1250 (assoc-ref inputs name)
1251 "-C" dir
1252 "--strip-components=1")))))
1253 (mkdir target)
1254 (invoke "tar" "xvf" source
1255 "-C" target "--strip-components=1")
1256 (chdir target)
1257 (unpack "openjdk-src" "openjdk.src")
1258 (with-directory-excursion "openjdk.src"
1259 (for-each unpack
1260 (filter (cut string-suffix? "-drop" <>)
1261 (map (match-lambda
1262 ((name . _) name))
1263 inputs))))
1264 #t)))
1265 (add-after 'unpack 'patch-bitrot
1266 (lambda _
1267 (substitute* '("patches/boot/revert-6973616.patch"
1268 "openjdk.src/jdk/make/common/shared/Defs-versions.gmk")
1269 (("REQUIRED_FREETYPE_VERSION = 2.2.1")
1270 "REQUIRED_FREETYPE_VERSION = 2.10.1"))
1271 ;; As of attr 2.4.48 this header is no longer
1272 ;; included. It is provided by the libc instead.
1273 (substitute* '("configure"
1274 "openjdk.src/jdk/src/solaris/native/sun/nio/fs/LinuxNativeDispatcher.c")
1275 (("attr/xattr.h") "sys/xattr.h"))
1276 #t))
1277 (add-after 'unpack 'fix-x11-extension-include-path
1278 (lambda* (#:key inputs #:allow-other-keys)
1279 (substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk"
1280 (((string-append "\\$\\(firstword \\$\\(wildcard "
1281 "\\$\\(OPENWIN_HOME\\)"
1282 "/include/X11/extensions\\).*$"))
1283 (string-append (assoc-ref inputs "libxrender")
1284 "/include/X11/extensions"
1285 " -I" (assoc-ref inputs "libxtst")
1286 "/include/X11/extensions"
1287 " -I" (assoc-ref inputs "libxinerama")
1288 "/include/X11/extensions"))
1289 (("\\$\\(wildcard /usr/include/X11/extensions\\)\\)") ""))
1290 #t))
1291 (add-after 'unpack 'patch-paths
1292 (lambda _
1293 ;; buildtree.make generates shell scripts, so we need to replace
1294 ;; the generated shebang
1295 (substitute* '("openjdk.src/hotspot/make/linux/makefiles/buildtree.make")
1296 (("/bin/sh") (which "bash")))
1297
1298 (let ((corebin (string-append
1299 (assoc-ref %build-inputs "coreutils") "/bin/"))
1300 (binbin (string-append
1301 (assoc-ref %build-inputs "binutils") "/bin/"))
1302 (grepbin (string-append
1303 (assoc-ref %build-inputs "grep") "/bin/")))
1304 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-linux.gmk"
1305 "openjdk.src/corba/make/common/shared/Defs-linux.gmk")
1306 (("UNIXCOMMAND_PATH = /bin/")
1307 (string-append "UNIXCOMMAND_PATH = " corebin))
1308 (("USRBIN_PATH = /usr/bin/")
1309 (string-append "USRBIN_PATH = " corebin))
1310 (("DEVTOOLS_PATH *= */usr/bin/")
1311 (string-append "DEVTOOLS_PATH = " corebin))
1312 (("COMPILER_PATH *= */usr/bin/")
1313 (string-append "COMPILER_PATH = "
1314 (assoc-ref %build-inputs "gcc") "/bin/"))
1315 (("DEF_OBJCOPY *=.*objcopy")
1316 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
1317
1318 ;; fix path to alsa header
1319 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1320 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1321 (string-append "ALSA_INCLUDE="
1322 (assoc-ref %build-inputs "alsa-lib")
1323 "/include/alsa/version.h")))
1324
1325 ;; fix hard-coded utility paths
1326 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-utils.gmk"
1327 "openjdk.src/corba/make/common/shared/Defs-utils.gmk")
1328 (("ECHO *=.*echo")
1329 (string-append "ECHO = " (which "echo")))
1330 (("^GREP *=.*grep")
1331 (string-append "GREP = " (which "grep")))
1332 (("EGREP *=.*egrep")
1333 (string-append "EGREP = " (which "egrep")))
1334 (("CPIO *=.*cpio")
1335 (string-append "CPIO = " (which "cpio")))
1336 (("READELF *=.*readelf")
1337 (string-append "READELF = " (which "readelf")))
1338 (("^ *AR *=.*ar")
1339 (string-append "AR = " (which "ar")))
1340 (("^ *TAR *=.*tar")
1341 (string-append "TAR = " (which "tar")))
1342 (("AS *=.*as")
1343 (string-append "AS = " (which "as")))
1344 (("LD *=.*ld")
1345 (string-append "LD = " (which "ld")))
1346 (("STRIP *=.*strip")
1347 (string-append "STRIP = " (which "strip")))
1348 (("NM *=.*nm")
1349 (string-append "NM = " (which "nm")))
1350 (("^SH *=.*sh")
1351 (string-append "SH = " (which "bash")))
1352 (("^FIND *=.*find")
1353 (string-append "FIND = " (which "find")))
1354 (("LDD *=.*ldd")
1355 (string-append "LDD = " (which "ldd")))
1356 (("NAWK *=.*(n|g)awk")
1357 (string-append "NAWK = " (which "gawk")))
1358 (("XARGS *=.*xargs")
1359 (string-append "XARGS = " (which "xargs")))
1360 (("UNZIP *=.*unzip")
1361 (string-append "UNZIP = " (which "unzip")))
1362 (("ZIPEXE *=.*zip")
1363 (string-append "ZIPEXE = " (which "zip")))
1364 (("SED *=.*sed")
1365 (string-append "SED = " (which "sed"))))
1366
1367 ;; Some of these timestamps cause problems as they are more than
1368 ;; 10 years ago, failing the build process.
1369 (substitute*
1370 "openjdk.src/jdk/src/share/classes/java/util/CurrencyData.properties"
1371 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
1372 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
1373 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
1374 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY")))
1375 #t))
1376 (add-before 'configure 'set-additional-paths
1377 (lambda* (#:key inputs #:allow-other-keys)
1378 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1379 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1380 (string-append "ALSA_INCLUDE="
1381 (assoc-ref inputs "alsa-lib")
1382 "/include/alsa/version.h")))
1383 (setenv "CC" "gcc")
1384 (setenv "CPATH"
1385 (string-append (assoc-ref inputs "libxcomposite")
1386 "/include/X11/extensions" ":"
1387 (assoc-ref inputs "libxrender")
1388 "/include/X11/extensions" ":"
1389 (assoc-ref inputs "libxtst")
1390 "/include/X11/extensions" ":"
1391 (assoc-ref inputs "libxinerama")
1392 "/include/X11/extensions" ":"
1393 (or (getenv "CPATH") "")))
1394 (setenv "ALT_OBJCOPY" (which "objcopy"))
1395 (setenv "ALT_CUPS_HEADERS_PATH"
1396 (string-append (assoc-ref inputs "cups")
1397 "/include"))
1398 (setenv "ALT_FREETYPE_HEADERS_PATH"
1399 (string-append (assoc-ref inputs "freetype")
1400 "/include"))
1401 (setenv "ALT_FREETYPE_LIB_PATH"
1402 (string-append (assoc-ref inputs "freetype")
1403 "/lib"))
1404 #t))
1405 (add-before 'build 'disable-os-version-check
1406 ;; allow build on linux major version change
1407 (lambda _
1408 (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok")
1409 #t))
1410 (add-before 'check 'fix-test-framework
1411 (lambda _
1412 ;; Fix PATH in test environment
1413 (substitute* "test/jtreg/com/sun/javatest/regtest/Main.java"
1414 (("PATH=/bin:/usr/bin")
1415 (string-append "PATH=" (getenv "PATH"))))
1416 (substitute* "test/jtreg/com/sun/javatest/util/SysEnv.java"
1417 (("/usr/bin/env") (which "env")))
1418 (substitute* "openjdk.src/hotspot/test/test_env.sh"
1419 (("/bin/rm") (which "rm"))
1420 (("/bin/cp") (which "cp"))
1421 (("/bin/mv") (which "mv")))
1422 #t))
1423 (add-before 'check 'fix-hotspot-tests
1424 (lambda _
1425 (with-directory-excursion "openjdk.src/hotspot/test/"
1426 (substitute* "jprt.config"
1427 (("PATH=\"\\$\\{path4sdk\\}\"")
1428 (string-append "PATH=" (getenv "PATH")))
1429 (("make=/usr/bin/make")
1430 (string-append "make=" (which "make"))))
1431 (substitute* '("runtime/6626217/Test6626217.sh"
1432 "runtime/7110720/Test7110720.sh")
1433 (("/bin/rm") (which "rm"))
1434 (("/bin/cp") (which "cp"))
1435 (("/bin/mv") (which "mv"))))
1436 #t))
1437 (add-before 'check 'fix-jdk-tests
1438 (lambda _
1439 (with-directory-excursion "openjdk.src/jdk/test/"
1440 (substitute* "com/sun/jdi/JdbReadTwiceTest.sh"
1441 (("/bin/pwd") (which "pwd")))
1442 (substitute* "com/sun/jdi/ShellScaffold.sh"
1443 (("/bin/kill") (which "kill")))
1444 (substitute* "start-Xvfb.sh"
1445 ;;(("/usr/bin/X11/Xvfb") (which "Xvfb"))
1446 (("/usr/bin/nohup") (which "nohup")))
1447 (substitute* "javax/security/auth/Subject/doAs/Test.sh"
1448 (("/bin/rm") (which "rm")))
1449 (substitute* "tools/launcher/MultipleJRE.sh"
1450 (("echo \"#!/bin/sh\"")
1451 (string-append "echo \"#!" (which "rm") "\""))
1452 (("/usr/bin/zip") (which "zip")))
1453 (substitute* "com/sun/jdi/OnThrowTest.java"
1454 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1455 (substitute* "java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java"
1456 (("/usr/bin/uptime") (which "uptime")))
1457 (substitute* "java/lang/ProcessBuilder/Basic.java"
1458 (("/usr/bin/env") (which "env"))
1459 (("/bin/false") (which "false"))
1460 (("/bin/true") (which "true"))
1461 (("/bin/cp") (which "cp"))
1462 (("/bin/sh") (which "sh")))
1463 (substitute* "java/lang/ProcessBuilder/FeelingLucky.java"
1464 (("/bin/sh") (which "sh")))
1465 (substitute* "java/lang/ProcessBuilder/Zombies.java"
1466 (("/usr/bin/perl") (which "perl"))
1467 (("/bin/ps") (which "ps"))
1468 (("/bin/true") (which "true")))
1469 (substitute* "java/lang/Runtime/exec/ConcurrentRead.java"
1470 (("/usr/bin/tee") (which "tee")))
1471 (substitute* "java/lang/Runtime/exec/ExecWithDir.java"
1472 (("/bin/true") (which "true")))
1473 (substitute* "java/lang/Runtime/exec/ExecWithInput.java"
1474 (("/bin/cat") (which "cat")))
1475 (substitute* "java/lang/Runtime/exec/ExitValue.java"
1476 (("/bin/sh") (which "sh"))
1477 (("/bin/true") (which "true"))
1478 (("/bin/kill") (which "kill")))
1479 (substitute* "java/lang/Runtime/exec/LotsOfDestroys.java"
1480 (("/usr/bin/echo") (which "echo")))
1481 (substitute* "java/lang/Runtime/exec/LotsOfOutput.java"
1482 (("/usr/bin/cat") (which "cat")))
1483 (substitute* "java/lang/Runtime/exec/SleepyCat.java"
1484 (("/bin/cat") (which "cat"))
1485 (("/bin/sleep") (which "sleep"))
1486 (("/bin/sh") (which "sh")))
1487 (substitute* "java/lang/Runtime/exec/StreamsSurviveDestroy.java"
1488 (("/bin/cat") (which "cat")))
1489 (substitute* "java/rmi/activation/CommandEnvironment/SetChildEnv.java"
1490 (("/bin/chmod") (which "chmod")))
1491 (substitute* "java/util/zip/ZipFile/Assortment.java"
1492 (("/bin/sh") (which "sh"))))
1493 #t))
1494 (replace 'check
1495 (lambda _
1496 ;; The "make check-*" targets always return zero, so we need to
1497 ;; check for errors in the associated log files to determine
1498 ;; whether any tests have failed.
1499 (use-modules (ice-9 rdelim))
1500 (let* ((error-pattern (make-regexp "^(Error|FAILED):.*"))
1501 (checker (lambda (port)
1502 (let loop ()
1503 (let ((line (read-line port)))
1504 (cond
1505 ((eof-object? line) #t)
1506 ((regexp-exec error-pattern line)
1507 (error "test failed"))
1508 (else (loop)))))))
1509 (run-test (lambda (test)
1510 (invoke "make" test)
1511 (call-with-input-file
1512 (string-append "test/" test ".log")
1513 checker))))
1514 (when #f ; skip tests
1515 (run-test "check-hotspot")
1516 (run-test "check-langtools")
1517 (run-test "check-jdk"))
1518 #t)))
1519 (replace 'install
1520 (lambda* (#:key outputs #:allow-other-keys)
1521 (let ((doc (string-append (assoc-ref outputs "doc")
1522 "/share/doc/icedtea"))
1523 (jre (assoc-ref outputs "out"))
1524 (jdk (assoc-ref outputs "jdk")))
1525 (copy-recursively "openjdk.build/docs" doc)
1526 (copy-recursively "openjdk.build/j2re-image" jre)
1527 (copy-recursively "openjdk.build/j2sdk-image" jdk))
1528 #t))
1529 ;; Some of the libraries in the lib/amd64 folder link to libjvm.so.
1530 ;; But that shared object is located in the server/ folder, so it
1531 ;; cannot be found. This phase creates a symbolic link in the
1532 ;; lib/amd64 folder so that the other libraries can find it.
1533 ;;
1534 ;; See:
1535 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1536 ;;
1537 ;; FIXME: Find the bug in the build system, so that this symlink is
1538 ;; not needed.
1539 (add-after 'install 'install-libjvm
1540 (lambda* (#:key inputs outputs #:allow-other-keys)
1541 (let* ((lib-path (string-append (assoc-ref outputs "out")
1542 ;; See 'INSTALL_ARCH_DIR' in
1543 ;; 'configure'.
1544 ,(match (%current-system)
1545 ("i686-linux"
1546 "/lib/i386")
1547 ("x86_64-linux"
1548 "/lib/amd64")
1549 ("armhf-linux"
1550 "/lib/arm")
1551 ("aarch64-linux"
1552 "/lib/aarch64")
1553 ;; We need a catch-all, dropping
1554 ;; '-linux' works in most cases.
1555 (_
1556 (string-append
1557 "/lib/"
1558 (string-drop-right
1559 (%current-system) 6)))))))
1560 (symlink (string-append lib-path "/server/libjvm.so")
1561 (string-append lib-path "/libjvm.so")))
1562 #t))
1563 ;; By default IcedTea only generates an empty keystore. In order to
1564 ;; be able to use certificates in Java programs we need to generate a
1565 ;; keystore from a set of certificates. For convenience we use the
1566 ;; certificates from the nss-certs package.
1567 (add-after 'install 'install-keystore
1568 (lambda* (#:key inputs outputs #:allow-other-keys)
1569 (let* ((keystore "cacerts")
1570 (certs-dir (string-append (assoc-ref inputs "nss-certs")
1571 "/etc/ssl/certs"))
1572 (keytool (string-append (assoc-ref outputs "jdk")
1573 "/bin/keytool")))
1574 (define (extract-cert file target)
1575 (call-with-input-file file
1576 (lambda (in)
1577 (call-with-output-file target
1578 (lambda (out)
1579 (let loop ((line (read-line in 'concat))
1580 (copying? #f))
1581 (cond
1582 ((eof-object? line) #t)
1583 ((string-prefix? "-----BEGIN" line)
1584 (display line out)
1585 (loop (read-line in 'concat) #t))
1586 ((string-prefix? "-----END" line)
1587 (display line out)
1588 #t)
1589 (else
1590 (when copying? (display line out))
1591 (loop (read-line in 'concat) copying?)))))))))
1592 (define (import-cert cert)
1593 (format #t "Importing certificate ~a\n" (basename cert))
1594 (let ((temp "tmpcert"))
1595 (extract-cert cert temp)
1596 (let ((port (open-pipe* OPEN_WRITE keytool
1597 "-import"
1598 "-alias" (basename cert)
1599 "-keystore" keystore
1600 "-storepass" "changeit"
1601 "-file" temp)))
1602 (display "yes\n" port)
1603 (when (not (zero? (status:exit-val (close-pipe port))))
1604 (format #t "failed to import ~a\n" cert)))
1605 (delete-file temp)))
1606
1607 ;; This is necessary because the certificate directory contains
1608 ;; files with non-ASCII characters in their names.
1609 (setlocale LC_ALL "en_US.utf8")
1610 (setenv "LC_ALL" "en_US.utf8")
1611
1612 (for-each import-cert (find-files certs-dir "\\.pem$"))
1613 (mkdir-p (string-append (assoc-ref outputs "out")
1614 "/lib/security"))
1615 (mkdir-p (string-append (assoc-ref outputs "jdk")
1616 "/jre/lib/security"))
1617
1618 ;; The cacerts files we are going to overwrite are chmod'ed as
1619 ;; read-only (444) in icedtea-8 (which derives from this
1620 ;; package). We have to change this so we can overwrite them.
1621 (chmod (string-append (assoc-ref outputs "out")
1622 "/lib/security/" keystore) #o644)
1623 (chmod (string-append (assoc-ref outputs "jdk")
1624 "/jre/lib/security/" keystore) #o644)
1625
1626 (install-file keystore
1627 (string-append (assoc-ref outputs "out")
1628 "/lib/security"))
1629 (install-file keystore
1630 (string-append (assoc-ref outputs "jdk")
1631 "/jre/lib/security"))
1632 #t))))))
1633 (native-inputs
1634 `(("openjdk-src"
1635 ,(drop "openjdk"
1636 "0l34ikyf62hbzlf9032alzkkqvf7bpmckz4gvirvph755w7gka8l"))
1637 ("corba-drop"
1638 ,(drop "corba"
1639 "050gv2jbg1pi6qkn8w18bwpbklfa5b0kymjvan9pncddbj8m84fz"))
1640 ("jaxp-drop"
1641 ,(drop "jaxp"
1642 "1k6yldwnxfzdg5926r1nlfv8d1r1j7rlp2nkz6gqh05vgyamnfhl"))
1643 ("jaxws-drop"
1644 ,(drop "jaxws"
1645 "110j7jlz47x2gg6f7653x12mssan5kvj9l9h1m1c8c92drfxbqyk"))
1646 ("jdk-drop"
1647 ,(drop "jdk"
1648 "0d1mca38ksxvdskp9im3pp7fdijhj1n3lwq9w13r9s4v3qyskgdd"))
1649 ("langtools-drop"
1650 ,(drop "langtools"
1651 "0nq5236fzxn3p6x8cgncl56mzcmsj07q9gymysnws4c8byc6n0qj"))
1652 ("hotspot-drop"
1653 ,(origin
1654 (method url-fetch)
1655 (uri (string-append
1656 "http://icedtea.classpath.org/downloads/drops"
1657 "/icedtea7/" version "/hotspot.tar.bz2"))
1658 (sha256
1659 (base32
1660 "17bdv39n4lh8l5737c96f3xgamx4y305m067p01cywgp7zaddqws"))
1661 (patches (search-patches
1662 "icedtea-7-hotspot-aarch64-use-c++98.patch"))))
1663 ("ant" ,ant-bootstrap)
1664 ("attr" ,attr)
1665 ("coreutils" ,coreutils)
1666 ("diffutils" ,diffutils) ;for tests
1667 ("gawk" ,gawk)
1668 ("grep" ,grep)
1669 ("libtool" ,libtool)
1670 ("pkg-config" ,pkg-config)
1671 ("wget" ,wget)
1672 ("which" ,which)
1673 ("cpio" ,cpio)
1674 ("zip" ,zip)
1675 ("unzip" ,unzip)
1676 ("fastjar" ,fastjar)
1677 ("libxslt" ,libxslt) ;for xsltproc
1678 ("nss-certs" ,nss-certs)
1679 ("perl" ,perl)
1680 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
1681 ("jdk" ,icedtea-6 "jdk")))
1682 (inputs
1683 `(("alsa-lib" ,alsa-lib)
1684 ("cups" ,cups)
1685 ("libx11" ,libx11)
1686 ("libxcomposite" ,libxcomposite)
1687 ("libxt" ,libxt)
1688 ("libxtst" ,libxtst)
1689 ("libxi" ,libxi)
1690 ("libxinerama" ,libxinerama)
1691 ("libxrender" ,libxrender)
1692 ("libjpeg" ,libjpeg-turbo)
1693 ("libpng" ,libpng)
1694 ("mit-krb5" ,mit-krb5)
1695 ("nss" ,nss)
1696 ("giflib" ,giflib)
1697 ("fontconfig" ,fontconfig)
1698 ("freetype" ,freetype)
1699 ("lcms" ,lcms)
1700 ("zlib" ,zlib)
1701 ("gtk" ,gtk+-2)))
1702 (home-page "http://icedtea.classpath.org")
1703 (synopsis "Java development kit")
1704 (description
1705 "This package provides the Java development kit OpenJDK built with the
1706 IcedTea build harness.")
1707
1708 ;; 'configure' lists "mips" and "mipsel", but not "mips64el'.
1709 (supported-systems (delete "mips64el-linux" %supported-systems))
1710
1711 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1712 ;; same license as both GNU Classpath and OpenJDK.
1713 (license license:gpl2+))))
1714
1715 (define-public icedtea-8
1716 (let* ((version "3.7.0")
1717 (drop (lambda (name hash)
1718 (origin
1719 (method url-fetch)
1720 (uri (string-append
1721 "http://icedtea.classpath.org/download/drops"
1722 "/icedtea8/" version "/" name ".tar.xz"))
1723 (sha256 (base32 hash))))))
1724 (package (inherit icedtea-7)
1725 (version "3.7.0")
1726 (source (origin
1727 (method url-fetch)
1728 (uri (string-append
1729 "http://icedtea.wildebeest.org/download/source/icedtea-"
1730 version ".tar.xz"))
1731 (sha256
1732 (base32
1733 "09yqzn8rpccs7cyv89hhy5zlznpgqw5x3jz0w1ccp0cz1vgs8l5w"))
1734 (modules '((guix build utils)))
1735 (snippet
1736 '(begin
1737 (substitute* '("configure"
1738 "acinclude.m4")
1739 ;; Do not embed build time
1740 (("(DIST_ID=\"Custom build).*$" _ prefix)
1741 (string-append prefix "\"\n"))
1742 ;; Do not leak information about the build host
1743 (("DIST_NAME=\"\\$build_os\"")
1744 "DIST_NAME=\"guix\""))
1745 #t))))
1746 (arguments
1747 `(#:imported-modules
1748 ((guix build ant-build-system)
1749 (guix build syscalls)
1750 ,@%gnu-build-system-modules)
1751 ,@(substitute-keyword-arguments (package-arguments icedtea-7)
1752 ((#:modules modules)
1753 `((guix build utils)
1754 (guix build gnu-build-system)
1755 ((guix build ant-build-system) #:prefix ant:)
1756 (ice-9 match)
1757 (ice-9 popen)
1758 (srfi srfi-19)
1759 (srfi srfi-26)))
1760 ((#:configure-flags flags)
1761 `(let ((jdk (assoc-ref %build-inputs "jdk")))
1762 `( ;;"--disable-bootstrap"
1763 "--enable-bootstrap"
1764 "--enable-nss"
1765 ,(string-append "--with-parallel-jobs="
1766 (number->string (parallel-job-count)))
1767 "--disable-downloading"
1768 "--disable-system-pcsc"
1769 "--disable-system-sctp"
1770 "--disable-tests" ;they are run in the check phase instead
1771 "--with-openjdk-src-dir=./openjdk.src"
1772 ,(string-append "--with-jdk-home=" jdk))))
1773 ((#:phases phases)
1774 `(modify-phases ,phases
1775 (delete 'fix-x11-extension-include-path)
1776 (delete 'patch-paths)
1777 (delete 'set-additional-paths)
1778 (delete 'patch-patches)
1779 (delete 'patch-bitrot)
1780 ;; Prevent the keytool from recording the current time when
1781 ;; adding certificates at build time.
1782 (add-after 'unpack 'patch-keystore
1783 (lambda _
1784 (substitute* "openjdk.src/jdk/src/share/classes/sun/security/provider/JavaKeyStore.java"
1785 (("date = new Date\\(\\);")
1786 "\
1787 date = (System.getenv(\"SOURCE_DATE_EPOCH\") != null) ?\
1788 new Date(Long.parseLong(System.getenv(\"SOURCE_DATE_EPOCH\"))) :\
1789 new Date();"))
1790 #t))
1791 (add-after 'unpack 'patch-jni-libs
1792 ;; Hardcode dynamically loaded libraries.
1793 (lambda _
1794 (let* ((library-path (search-path-as-string->list
1795 (getenv "LIBRARY_PATH")))
1796 (find-library (lambda (name)
1797 (search-path
1798 library-path
1799 (string-append "lib" name ".so")))))
1800 (for-each
1801 (lambda (file)
1802 (catch 'decoding-error
1803 (lambda ()
1804 (substitute* file
1805 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
1806 _ name version)
1807 (format #f "\"~a\"" (find-library name)))
1808 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
1809 (format #f "\"~a\"" (find-library name)))))
1810 (lambda _
1811 ;; Those are safe to skip.
1812 (format (current-error-port)
1813 "warning: failed to substitute: ~a~%"
1814 file))))
1815 (find-files "openjdk.src/jdk/src/solaris/native"
1816 "\\.c|\\.h"))
1817 #t)))
1818 (replace 'install
1819 (lambda* (#:key outputs #:allow-other-keys)
1820 (let ((doc (string-append (assoc-ref outputs "doc")
1821 "/share/doc/icedtea"))
1822 (jre (assoc-ref outputs "out"))
1823 (jdk (assoc-ref outputs "jdk")))
1824 (copy-recursively "openjdk.build/docs" doc)
1825 (copy-recursively "openjdk.build/images/j2re-image" jre)
1826 (copy-recursively "openjdk.build/images/j2sdk-image" jdk)
1827 ;; Install the nss.cfg file to JRE to enable SSL/TLS
1828 ;; support via NSS.
1829 (copy-file (string-append jdk "/jre/lib/security/nss.cfg")
1830 (string-append jre "/lib/security/nss.cfg"))
1831 #t)))
1832 (add-after 'install 'strip-jar-timestamps
1833 (assoc-ref ant:%standard-phases 'strip-jar-timestamps)))))))
1834 (native-inputs
1835 `(("jdk" ,icedtea-7 "jdk")
1836 ("openjdk-src"
1837 ,(drop "openjdk"
1838 "1mj6xgmw31i6qd30qi9dmv7160fbcfq5ikz1jwjihdg2793il19p"))
1839 ("aarch32-drop"
1840 ,(drop "aarch32"
1841 "1wb8k5zm40zld0986dvmlh5xh3gyixbg9h26sl662zy92amhmyyg"))
1842 ("corba-drop"
1843 ,(drop "corba"
1844 "11ma4zz0599cy70xd219v7a8vin7p96xrhhz3wsaw6cjhkzpagah"))
1845 ("jaxp-drop"
1846 ,(drop "jaxp"
1847 "14m1y0z0fbm5z5zjw3vnq85py8dma84bi3f9cw8rhdyc6skk8q4i"))
1848 ("jaxws-drop"
1849 ,(drop "jaxws"
1850 "09andnm6xaasnp963hgx42yiflifiljp9z7z85jrfyc5z8a5whmf"))
1851 ("jdk-drop"
1852 ,(drop "jdk"
1853 "0s6lcpc0zckz2fnq98aqf28nz9y3wbi41a3kyaqqa2abwbkm1zwl"))
1854 ("langtools-drop"
1855 ,(drop "langtools"
1856 "15wizy123vhk40chl1b4p552jf2pw2hdww0myf11qab425axz4nw"))
1857 ("hotspot-drop"
1858 ,(drop "hotspot"
1859 "1ciz1w9j0kz7s1dxdhyqq71nla9icyz6qvn0b9z2zgkklqa98qmm"))
1860 ("nashorn-drop"
1861 ,(drop "nashorn"
1862 "19pzl3ppaw8j6r5cnyp8qiw3hxijh3hdc46l39g5yfhdl4pr4hpa"))
1863 ("shenandoah-drop"
1864 ,(drop "shenandoah"
1865 "0k33anxdzw1icn072wynfmmdjhsv50hay0j1sfkfxny12rb3vgdy"))
1866 ,@(fold alist-delete (package-native-inputs icedtea-7)
1867 '("jdk" "openjdk-src" "corba-drop" "jaxp-drop" "jaxws-drop"
1868 "jdk-drop" "langtools-drop" "hotspot-drop")))))))
1869
1870 (define-public openjdk9
1871 (package
1872 (name "openjdk")
1873 (version "9.181")
1874 (source (origin
1875 (method url-fetch)
1876 (uri "https://hg.openjdk.java.net/jdk/jdk/archive/3cc80be736f2.tar.bz2")
1877 (file-name (string-append name "-" version ".tar.bz2"))
1878 (sha256
1879 (base32
1880 "01ihmyf7k5z17wbr7xig7y40l9f01d5zjgkcmawn1102hw5kchpq"))
1881 (modules '((guix build utils)))
1882 (snippet
1883 `(begin
1884 (for-each delete-file
1885 (find-files "." ".*.(bin|exe|jar)$"))
1886 #t))))
1887 (build-system gnu-build-system)
1888 (outputs '("out" "jdk" "doc"))
1889 (arguments
1890 `(#:tests? #f; require jtreg
1891 #:make-flags '("all")
1892 #:imported-modules
1893 ((guix build syscalls)
1894 ,@%gnu-build-system-modules)
1895 #:phases
1896 (modify-phases %standard-phases
1897 (add-after 'patch-source-shebangs 'fix-java-shebangs
1898 (lambda _
1899 ;; This file was "fixed" by patch-source-shebangs, but it requires
1900 ;; this exact first line.
1901 (substitute* "jdk/make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1902 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
1903 #t))
1904 (replace 'configure
1905 (lambda* (#:key inputs outputs #:allow-other-keys)
1906 ;; TODO: unbundle libpng and lcms
1907 (invoke "bash" "./configure"
1908 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
1909 "--disable-freetype-bundling"
1910 "--disable-warnings-as-errors"
1911 "--disable-hotspot-gtest"
1912 "--with-giflib=system"
1913 "--with-libjpeg=system"
1914 (string-append "--prefix=" (assoc-ref outputs "out")))
1915 #t))
1916 (add-before 'build 'write-source-revision-file
1917 (lambda _
1918 (with-output-to-file ".src-rev"
1919 (lambda _
1920 (display ,version)))
1921 #t))
1922 (replace 'build
1923 (lambda* (#:key make-flags parallel-build? #:allow-other-keys)
1924 (apply invoke "make"
1925 `(,@(if parallel-build?
1926 (list (string-append "JOBS="
1927 (number->string (parallel-job-count))))
1928 '())
1929 ,@make-flags))))
1930 ;; Some of the libraries in the lib/ folder link to libjvm.so.
1931 ;; But that shared object is located in the server/ folder, so it
1932 ;; cannot be found. This phase creates a symbolic link in the
1933 ;; lib/ folder so that the other libraries can find it.
1934 ;;
1935 ;; See:
1936 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1937 ;;
1938 ;; FIXME: Find the bug in the build system, so that this symlink is
1939 ;; not needed.
1940 (add-after 'install 'install-libjvm
1941 (lambda* (#:key inputs outputs #:allow-other-keys)
1942 (let* ((lib-out (string-append (assoc-ref outputs "out")
1943 "/lib"))
1944 (lib-jdk (string-append (assoc-ref outputs "jdk")
1945 "/lib")))
1946 (symlink (string-append lib-jdk "/server/libjvm.so")
1947 (string-append lib-jdk "/libjvm.so"))
1948 (symlink (string-append lib-out "/server/libjvm.so")
1949 (string-append lib-out "/libjvm.so")))
1950 #t))
1951 (replace 'install
1952 (lambda* (#:key outputs #:allow-other-keys)
1953 (let ((out (assoc-ref outputs "out"))
1954 (jdk (assoc-ref outputs "jdk"))
1955 (doc (assoc-ref outputs "doc"))
1956 (images (car (find-files "build" ".*-server-release"
1957 #:directories? #t))))
1958 (copy-recursively (string-append images "/images/jdk") jdk)
1959 (copy-recursively (string-append images "/images/jre") out)
1960 (copy-recursively (string-append images "/images/docs") doc))
1961 #t))
1962 (add-after 'install 'strip-zip-timestamps
1963 (lambda* (#:key outputs #:allow-other-keys)
1964 (use-modules (guix build syscalls))
1965 (for-each (lambda (zip)
1966 (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
1967 (with-directory-excursion dir
1968 (invoke "unzip" zip))
1969 (delete-file zip)
1970 (for-each (lambda (file)
1971 (let ((s (lstat file)))
1972 (unless (eq? (stat:type s) 'symlink)
1973 (format #t "reset ~a~%" file)
1974 (utime file 0 0 0 0))))
1975 (find-files dir #:directories? #t))
1976 (with-directory-excursion dir
1977 (let ((files (find-files "." ".*" #:directories? #t)))
1978 (apply invoke "zip" "-0" "-X" zip files)))))
1979 (find-files (assoc-ref outputs "doc") ".*.zip$"))
1980 #t)))))
1981 (inputs
1982 `(("alsa-lib" ,alsa-lib)
1983 ("cups" ,cups)
1984 ("fontconfig" ,fontconfig)
1985 ("freetype" ,freetype)
1986 ("giflib" ,giflib)
1987 ("lcms" ,lcms)
1988 ("libelf" ,libelf)
1989 ("libjpeg" ,libjpeg-turbo)
1990 ("libice" ,libice)
1991 ("libpng" ,libpng)
1992 ("libx11" ,libx11)
1993 ("libxcomposite" ,libxcomposite)
1994 ("libxi" ,libxi)
1995 ("libxinerama" ,libxinerama)
1996 ("libxrender" ,libxrender)
1997 ("libxt" ,libxt)
1998 ("libxtst" ,libxtst)))
1999 (native-inputs
2000 `(("icedtea-8" ,icedtea-8)
2001 ("icedtea-8:jdk" ,icedtea-8 "jdk")
2002 ;; XXX: The build system fails with newer versions of GNU Make.
2003 ("make@4.2" ,gnu-make-4.2)
2004 ("unzip" ,unzip)
2005 ("which" ,which)
2006 ("zip" ,zip)))
2007 (home-page "https://openjdk.java.net/projects/jdk9/")
2008 (synopsis "Java development kit")
2009 (description
2010 "This package provides the Java development kit OpenJDK.")
2011 (license license:gpl2+)))
2012
2013 (define-public openjdk10
2014 (package
2015 (inherit openjdk9)
2016 (name "openjdk")
2017 (version "10.46")
2018 (source (origin
2019 (method url-fetch)
2020 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/6fa770f9f8ab.tar.bz2")
2021 (file-name (string-append name "-" version ".tar.bz2"))
2022 (sha256
2023 (base32
2024 "0zywq2203b4hx4jms9vbwvjcj1d3k2v3qpx4s33729fkpmid97r4"))
2025 (patches (search-patches
2026 "openjdk-10-idlj-reproducibility.patch"))
2027 (modules '((guix build utils)))
2028 (snippet
2029 `(begin
2030 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2031 #t))))
2032 (arguments
2033 (substitute-keyword-arguments (package-arguments openjdk9)
2034 ((#:phases phases)
2035 `(modify-phases ,phases
2036 (replace 'fix-java-shebangs
2037 (lambda _
2038 ;; This file was "fixed" by patch-source-shebangs, but it requires
2039 ;; this exact first line.
2040 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
2041 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
2042 #t))
2043 (replace 'configure
2044 (lambda* (#:key inputs outputs #:allow-other-keys)
2045 (invoke "bash" "./configure"
2046 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
2047 "--disable-freetype-bundling"
2048 "--disable-warnings-as-errors"
2049 "--disable-hotspot-gtest"
2050 "--with-giflib=system"
2051 "--with-libjpeg=system"
2052 "--with-native-debug-symbols=zipped"
2053 (string-append "--prefix=" (assoc-ref outputs "out")))
2054 #t))))))
2055 (native-inputs
2056 `(("openjdk9" ,openjdk9)
2057 ("openjdk9:jdk" ,openjdk9 "jdk")
2058 ("make@4.2" ,gnu-make-4.2)
2059 ("unzip" ,unzip)
2060 ("which" ,which)
2061 ("zip" ,zip)))))
2062
2063 (define-public openjdk11
2064 (package
2065 (name "openjdk")
2066 (version "11.28")
2067 (source (origin
2068 (method url-fetch)
2069 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/76072a077ee1.tar.bz2")
2070 (file-name (string-append name "-" version ".tar.bz2"))
2071 (sha256
2072 (base32
2073 "0v705w1s9lrqalzahir78pk397rkk9gfvzq821yv8h3xha0bqi6w"))
2074 (modules '((guix build utils)))
2075 (snippet
2076 `(begin
2077 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2078 #t))))
2079 (build-system gnu-build-system)
2080 (outputs '("out" "jdk" "doc"))
2081 (arguments
2082 `(#:imported-modules
2083 ((guix build syscalls)
2084 (ice-9 binary-ports)
2085 (rnrs bytevectors)
2086 ,@%gnu-build-system-modules)
2087 #:tests? #f; requires jtreg
2088 ;; TODO package jtreg
2089 #:configure-flags
2090 `("--disable-option-checking" ; --enable-fast-install default flag errors otherwise
2091 "--disable-warnings-as-errors"
2092 ;; make validate-runpath pass, see: http://issues.guix.info/issue/32894
2093 "--with-native-debug-symbols=zipped"
2094 ;; do not use the bundled libraries
2095 "--with-giflib=system"
2096 "--with-lcms=system"
2097 "--with-libjpeg=system"
2098 "--with-libpng=system"
2099 "--with-version-pre="
2100 ;; allow the build system to locate the system freetype
2101 ,(string-append "--with-freetype-include="
2102 (assoc-ref %build-inputs "freetype") "/include")
2103 ,(string-append "--with-freetype-lib="
2104 (assoc-ref %build-inputs "freetype") "/lib"))
2105 #:phases
2106 (modify-phases %standard-phases
2107 (add-after 'patch-source-shebangs 'fix-java-shebangs
2108 (lambda _
2109 ;; This file was "fixed" by patch-source-shebangs, but it requires
2110 ;; this exact first line.
2111 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
2112 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
2113 #t))
2114 (add-before 'build 'write-source-revision-file
2115 (lambda _
2116 (with-output-to-file ".src-rev"
2117 (lambda _
2118 (display ,version)))
2119 #t))
2120 (replace 'build
2121 (lambda* (#:key parallel-build? make-flags #:allow-other-keys)
2122 (apply invoke "make" "all"
2123 `(,@(if parallel-build?
2124 (list (string-append "JOBS="
2125 (number->string (parallel-job-count))))
2126 '())
2127 ,@make-flags))))
2128 ;; jdk 11 does not build jre by default any more
2129 ;; building it anyways
2130 ;; for further information see:
2131 ;; https://github.com/AdoptOpenJDK/openjdk-build/issues/356
2132 (add-after 'build 'build-jre
2133 (lambda* (#:key parallel-build? make-flags #:allow-other-keys)
2134 (apply invoke "make" "legacy-jre-image"
2135 `(,@(if parallel-build?
2136 (list (string-append "JOBS="
2137 (number->string (parallel-job-count))))
2138 '())
2139 ,@make-flags))))
2140 (replace 'install
2141 (lambda* (#:key outputs #:allow-other-keys)
2142 (let ((out (assoc-ref outputs "out"))
2143 (jdk (assoc-ref outputs "jdk"))
2144 (doc (assoc-ref outputs "doc"))
2145 (images (car (find-files "build" ".*-server-release"
2146 #:directories? #t))))
2147 (copy-recursively (string-append images "/images/jdk") jdk)
2148 (copy-recursively (string-append images "/images/jre") out)
2149 (copy-recursively (string-append images "/images/docs") doc))
2150 #t))
2151 ;; Some of the libraries in the lib/ folder link to libjvm.so.
2152 ;; But that shared object is located in the server/ folder, so it
2153 ;; cannot be found. This phase creates a symbolic link in the
2154 ;; lib/ folder so that the other libraries can find it.
2155 ;;
2156 ;; See:
2157 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
2158 ;;
2159 ;; FIXME: Find the bug in the build system, so that this symlink is
2160 ;; not needed.
2161 (add-after 'install 'install-libjvm
2162 (lambda* (#:key inputs outputs #:allow-other-keys)
2163 (let* ((lib-out (string-append (assoc-ref outputs "out")
2164 "/lib"))
2165 (lib-jdk (string-append (assoc-ref outputs "jdk")
2166 "/lib")))
2167 (symlink (string-append lib-jdk "/server/libjvm.so")
2168 (string-append lib-jdk "/libjvm.so"))
2169 (symlink (string-append lib-out "/server/libjvm.so")
2170 (string-append lib-out "/libjvm.so")))
2171 #t))
2172 (add-after 'install 'strip-character-data-timestamps
2173 (lambda* (#:key outputs #:allow-other-keys)
2174 (use-modules (guix build syscalls))
2175 (let ((archive (string-append
2176 (assoc-ref outputs "jdk") "/lib/src.zip"))
2177 (dir (mkdtemp! "zip-contents.XXXXXX")))
2178 (with-directory-excursion dir
2179 (invoke "unzip" archive))
2180 (delete-file archive)
2181 (with-directory-excursion dir
2182 (let ((char-data-files (find-files "." "CharacterData.*")))
2183 (for-each (lambda (file)
2184 (substitute* file
2185 (((string-append "This file was generated "
2186 "AUTOMATICALLY from a template "
2187 "file.*"))
2188 (string-append "This file was generated "
2189 "AUTOMATICALLY from a template "
2190 "file"))))
2191 char-data-files)))
2192 (with-directory-excursion dir
2193 (let ((files (find-files "." ".*" #:directories? #t)))
2194 (apply invoke "zip" "-0" "-X" archive files))))))
2195 (add-after 'strip-character-data-timestamps 'strip-archive-timestamps
2196 (lambda* (#:key outputs #:allow-other-keys)
2197 (use-modules (guix build syscalls)
2198 (ice-9 binary-ports)
2199 (rnrs bytevectors))
2200 (letrec ((repack-archive
2201 (lambda (archive)
2202 (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
2203 (with-directory-excursion dir
2204 (invoke "unzip" archive))
2205 (delete-file archive)
2206 (for-each (compose repack-archive canonicalize-path)
2207 (find-files dir "(ct.sym|.*.jar)$"))
2208 (let ((reset-file-timestamp
2209 (lambda (file)
2210 (let ((s (lstat file)))
2211 (unless (eq? (stat:type s) 'symlink)
2212 (format #t "reset ~a~%" file)
2213 (utime file 0 0 0 0))))))
2214 (for-each reset-file-timestamp
2215 (find-files dir #:directories? #t)))
2216 (with-directory-excursion dir
2217 (let ((files (find-files "." ".*" #:directories? #t)))
2218 (apply invoke "zip" "-0" "-X" archive files)))))))
2219 (for-each repack-archive
2220 (find-files (assoc-ref outputs "doc") ".*.zip$"))
2221 (for-each repack-archive
2222 (find-files (assoc-ref outputs "jdk")
2223 ".*.(zip|jar|diz)$"))
2224 (repack-archive (string-append (assoc-ref outputs "jdk") "/lib/ct.sym"))
2225 (let ((repack-jmod
2226 (lambda (file-name)
2227 (call-with-input-file file-name
2228 (lambda (file)
2229 (let ((header #vu8(#x4a #x4d #x01 #x00)))
2230 (if (equal? (get-bytevector-n
2231 file (bytevector-length header))
2232 header)
2233 (let* ((header-length (bytevector-length header))
2234 (temp-file (mkstemp!
2235 (string-copy
2236 "temp-file.XXXXXX")))
2237 (temp-filename (port-filename temp-file))
2238 (content-length
2239 (- (stat:size (stat file))
2240 header-length)))
2241 (sendfile temp-file file content-length header-length)
2242 (delete-file file-name)
2243 (close-port temp-file)
2244 (repack-archive (canonicalize-path temp-filename))
2245 (call-with-output-file file-name
2246 (lambda (file)
2247 (put-bytevector file header)
2248 (call-with-input-file temp-filename
2249 (lambda (temp-file)
2250 (sendfile
2251 file temp-file
2252 (stat:size (stat temp-file)) 0)))))))))))))
2253 (for-each repack-jmod
2254 (find-files (assoc-ref outputs "jdk") ".*.jmod$")))
2255 #t)))
2256 (add-after 'install 'remove-timestamp-from-api-summary
2257 (lambda* (#:key outputs #:allow-other-keys)
2258 (substitute* (string-append (assoc-ref outputs "doc")
2259 "/api/overview-summary.html")
2260 (("Generated by javadoc \\(11-internal\\).*$")
2261 "Generated by javadoc (11-internal) -->\n"))
2262 #t)))))
2263 (inputs
2264 `(("alsa-lib" ,alsa-lib)
2265 ("cups" ,cups)
2266 ("fontconfig" ,fontconfig)
2267 ("freetype" ,freetype)
2268 ("giflib" ,giflib)
2269 ("lcms" ,lcms)
2270 ("libjpeg" ,libjpeg-turbo)
2271 ("libpng" ,libpng)
2272 ("libx11" ,libx11)
2273 ("libxext" ,libxext)
2274 ("libxrender" ,libxrender)
2275 ("libxt" ,libxt)
2276 ("libxtst" ,libxtst)))
2277 (native-inputs
2278 `(("autoconf" ,autoconf)
2279 ("openjdk10" ,openjdk10)
2280 ("openjdk10:jdk" ,openjdk10 "jdk")
2281 ("make" ,gnu-make-4.2)
2282 ("pkg-config" ,pkg-config)
2283 ("unzip" ,unzip)
2284 ("which" ,which)
2285 ("zip" ,zip)))
2286 (home-page "https://openjdk.java.net/projects/jdk/11/")
2287 (synopsis "Java development kit")
2288 (description
2289 "This package provides the Java development kit OpenJDK.")
2290 (license license:gpl2+)))
2291
2292 (define-public openjdk12
2293 (package
2294 (inherit openjdk11)
2295 (name "openjdk")
2296 (version "12.33")
2297 (source (origin
2298 (method url-fetch)
2299 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/0276cba45aac.tar.bz2")
2300 (file-name (string-append name "-" version ".tar.bz2"))
2301 (sha256
2302 (base32
2303 "0mbhdrk12b6878kby0flnbak7444dlpm0ihlmf92vk59y1c02bc2"))
2304 (modules '((guix build utils)))
2305 (snippet
2306 `(begin
2307 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2308 #t))))
2309 (inputs
2310 `(("alsa-lib" ,alsa-lib)
2311 ("cups" ,cups)
2312 ("fontconfig" ,fontconfig)
2313 ("freetype" ,freetype)
2314 ("giflib" ,giflib)
2315 ("lcms" ,lcms)
2316 ("libjpeg" ,libjpeg-turbo)
2317 ("libpng" ,libpng)
2318 ("libx11" ,libx11)
2319 ("libxext" ,libxext)
2320 ("libxrandr" ,libxrandr)
2321 ("libxrender" ,libxrender)
2322 ("libxt" ,libxt)
2323 ("libxtst" ,libxtst)))
2324 (native-inputs
2325 `(("autoconf" ,autoconf)
2326 ("openjdk11" ,openjdk11)
2327 ("openjdk11:jdk" ,openjdk11 "jdk")
2328 ("make@4.2" ,gnu-make-4.2)
2329 ("pkg-config" ,pkg-config)
2330 ("unzip" ,unzip)
2331 ("which" ,which)
2332 ("zip" ,zip)))
2333 (home-page "https://openjdk.java.net/projects/jdk/12")))
2334
2335 (define-public openjdk13
2336 (package
2337 (inherit openjdk12)
2338 (name "openjdk")
2339 (version "13.0")
2340 (source (origin
2341 (method url-fetch)
2342 (uri "http://hg.openjdk.java.net/jdk/jdk13/archive/9c250a7600e1.tar.bz2")
2343 (file-name (string-append name "-" version ".tar.bz2"))
2344 (sha256
2345 (base32
2346 "0v0ljvx5dyzp96dw4z4ksw3pvasil7783mgnmd1wk9gads5ab8iq"))
2347 (modules '((guix build utils)))
2348 (snippet
2349 `(begin
2350 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2351 #t))))
2352 (inputs
2353 `(("alsa-lib" ,alsa-lib)
2354 ("cups" ,cups)
2355 ("fontconfig" ,fontconfig)
2356 ("freetype" ,freetype)
2357 ("giflib" ,giflib)
2358 ("lcms" ,lcms)
2359 ("libjpeg" ,libjpeg-turbo)
2360 ("libpng" ,libpng)
2361 ("libx11" ,libx11)
2362 ("libxext" ,libxext)
2363 ("libxrandr" ,libxrandr)
2364 ("libxrender" ,libxrender)
2365 ("libxt" ,libxt)
2366 ("libxtst" ,libxtst)))
2367 (native-inputs
2368 `(("autoconf" ,autoconf)
2369 ("openjdk12:jdk" ,openjdk12 "jdk")
2370 ("make@4.2" ,gnu-make-4.2)
2371 ("pkg-config" ,pkg-config)
2372 ("unzip" ,unzip)
2373 ("which" ,which)
2374 ("zip" ,zip)))
2375 (home-page "https://openjdk.java.net/projects/jdk/13")))
2376
2377 (define-public openjdk14
2378 (package
2379 (inherit openjdk13)
2380 (name "openjdk")
2381 (version "14.0")
2382 (source (origin
2383 (method url-fetch)
2384 (uri "http://hg.openjdk.java.net/jdk/jdk14/archive/bc54620a3848.tar.bz2")
2385 (file-name (string-append name "-" version ".tar.bz2"))
2386 (sha256
2387 (base32
2388 "0z485pk7r1xpw8004g4nrwrzj17sabgx8yfdbxwfvzkjp8qyajch"))
2389 (modules '((guix build utils)))
2390 (snippet
2391 `(begin
2392 ;; The m4 macro uses 'help' to search for builtins, which is
2393 ;; not available in bash-minimal
2394 (substitute* "make/autoconf/basics.m4"
2395 (("if help") "if command -v"))
2396 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2397 #t))))
2398 (inputs
2399 `(("alsa-lib" ,alsa-lib)
2400 ("cups" ,cups)
2401 ("fontconfig" ,fontconfig)
2402 ("freetype" ,freetype)
2403 ("giflib" ,giflib)
2404 ("lcms" ,lcms)
2405 ("libjpeg" ,libjpeg-turbo)
2406 ("libpng" ,libpng)
2407 ("libx11" ,libx11)
2408 ("libxext" ,libxext)
2409 ("libxrandr" ,libxrandr)
2410 ("libxrender" ,libxrender)
2411 ("libxt" ,libxt)
2412 ("libxtst" ,libxtst)))
2413 (native-inputs
2414 `(("autoconf" ,autoconf)
2415 ("make@4.2" ,gnu-make-4.2)
2416 ("openjdk13:jdk" ,openjdk13 "jdk")
2417 ("pkg-config" ,pkg-config)
2418 ("unzip" ,unzip)
2419 ("which" ,which)
2420 ("zip" ,zip)))
2421 (home-page "https://openjdk.java.net/projects/jdk/14")))
2422
2423 (define-public icedtea icedtea-8)
2424
2425 \f
2426 (define-public ant/java8
2427 (package (inherit ant-bootstrap)
2428 (name "ant")
2429 (version "1.10.8")
2430 (source (origin
2431 (method url-fetch)
2432 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2433 version "-src.tar.gz"))
2434 (sha256
2435 (base32
2436 "066k2isig5xm70cihj9p73hkp5w7h5zbfqz5kxb6cwr9cb86xl2k"))
2437 (modules '((guix build utils)))
2438 (snippet
2439 '(begin
2440 (for-each delete-file
2441 (find-files "lib/optional" "\\.jar$"))
2442 #t))))
2443 (arguments
2444 (substitute-keyword-arguments (package-arguments ant-bootstrap)
2445 ((#:phases phases)
2446 `(modify-phases ,phases
2447 (add-after 'unpack 'remove-scripts
2448 ;; Remove bat / cmd scripts for DOS as well as the antRun and runant
2449 ;; wrappers.
2450 (lambda _
2451 (for-each delete-file
2452 (find-files "src/script"
2453 "(.*\\.(bat|cmd)|runant.*|antRun.*)"))
2454 #t))
2455 (replace 'build
2456 (lambda* (#:key inputs outputs #:allow-other-keys)
2457 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
2458
2459 ;; Disable tests to avoid dependency on hamcrest-core, which needs
2460 ;; Ant to build. This is necessary in addition to disabling the
2461 ;; "check" phase, because the dependency on "test-jar" would always
2462 ;; result in the tests to be run.
2463 (substitute* "build.xml"
2464 (("depends=\"jars,test-jar") "depends=\"jars"))
2465 (invoke "bash" "bootstrap.sh"
2466 (string-append "-Ddist.dir="
2467 (assoc-ref outputs "out")))))))))
2468 (native-inputs
2469 `(("jdk" ,icedtea-8 "jdk")
2470 ("zip" ,zip)
2471 ("unzip" ,unzip)))))
2472
2473 ;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x series
2474 ;; requires Java 8.
2475 (define-public ant
2476 (package (inherit ant/java8)
2477 (version "1.9.15")
2478 (source (origin
2479 (method url-fetch)
2480 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2481 version "-src.tar.gz"))
2482 (sha256
2483 (base32
2484 "1xy30f1w5gaqk6g3f0vw7ygix4rb6032qkcw42y4z8wd9jihgygd"))))
2485 (native-inputs
2486 `(("jdk" ,icedtea-7 "jdk")
2487 ("zip" ,zip)
2488 ("unzip" ,unzip)))))
2489
2490 (define-public ant-apache-bcel
2491 (package
2492 (inherit ant/java8)
2493 (name "ant-apache-bcel")
2494 (arguments
2495 (substitute-keyword-arguments (package-arguments ant/java8)
2496 ((#:phases phases)
2497 `(modify-phases ,phases
2498 (add-after 'unpack 'link-bcel
2499 (lambda* (#:key inputs #:allow-other-keys)
2500 (for-each (lambda (file)
2501 (symlink file
2502 (string-append "lib/optional/"
2503 (basename file))))
2504 (find-files (assoc-ref inputs "java-commons-bcel")
2505 "\\.jar$"))
2506 #t))
2507 (add-after 'build 'install
2508 (lambda* (#:key outputs #:allow-other-keys)
2509 (let* ((out (assoc-ref outputs "out"))
2510 (share (string-append out "/share/java"))
2511 (bin (string-append out "/bin"))
2512 (lib (string-append out "/lib")))
2513 (mkdir-p share)
2514 (install-file (string-append lib "/ant-apache-bcel.jar") share)
2515 (delete-file-recursively bin)
2516 (delete-file-recursively lib)
2517 #t)))))))
2518 (inputs
2519 `(("java-commons-bcel" ,java-commons-bcel)
2520 ,@(package-inputs ant/java8)))))
2521
2522 (define-public ant-junit
2523 (package
2524 (inherit ant/java8)
2525 (name "ant-junit")
2526 (arguments
2527 (substitute-keyword-arguments (package-arguments ant/java8)
2528 ((#:phases phases)
2529 `(modify-phases ,phases
2530 (add-after 'unpack 'link-junit
2531 (lambda* (#:key inputs #:allow-other-keys)
2532 (for-each (lambda (file)
2533 (symlink file
2534 (string-append "lib/optional/"
2535 (basename file))))
2536 (find-files (assoc-ref inputs "java-junit")
2537 "\\.jar$"))
2538 #t))
2539 (add-after 'build 'install
2540 (lambda* (#:key outputs #:allow-other-keys)
2541 (let* ((out (assoc-ref outputs "out"))
2542 (share (string-append out "/share/java"))
2543 (bin (string-append out "/bin"))
2544 (lib (string-append out "/lib")))
2545 (mkdir-p share)
2546 (install-file (string-append lib "/ant-junit.jar") share)
2547 (delete-file-recursively bin)
2548 (delete-file-recursively lib)
2549 #t)))))))
2550 (inputs
2551 `(("java-junit" ,java-junit)
2552 ,@(package-inputs ant/java8)))))
2553
2554 (define-public java-openjfx-build
2555 (package
2556 (name "java-openjfx-build")
2557 ;; This is a java-8 version
2558 (version "8.202")
2559 (source (origin
2560 (method hg-fetch)
2561 (uri (hg-reference
2562 (url "http://hg.openjdk.java.net/openjfx/8u-dev/rt")
2563 (changeset (string-append
2564 (string-join (string-split version #\.) "u")
2565 "-ga"))))
2566 (file-name (string-append name "-" version "-checkout"))
2567 (modules '((guix build utils)))
2568 (snippet
2569 '(begin
2570 ;; Delete included gradle jar
2571 (delete-file-recursively "gradle/wrapper")
2572 #t))
2573 (sha256
2574 (base32
2575 "0yg38mwpivswccv9n96k06x3iv82i4px1a9xg9l8dswzwmfj259f"))
2576 (patches (search-patches "java-openjfx-build-jdk_version.patch"))))
2577 (build-system ant-build-system)
2578 (arguments
2579 `(#:jar-name "java-openjfx.jar"
2580 #:source-dir "buildSrc/src/main/java"
2581 #:test-dir "buildSrc/src/test"
2582 #:phases
2583 (modify-phases %standard-phases
2584 (add-before 'configure 'generate-jsl-parser
2585 (lambda _
2586 (invoke "antlr3" "-o"
2587 "buildSrc/src/main/java/com/sun/scenario/effect/compiler"
2588 "buildSrc/src/main/antlr/JSL.g"))))))
2589 (inputs
2590 `(("antlr3" ,antlr3)
2591 ("java-stringtemplate" ,java-stringtemplate)))
2592 (native-inputs
2593 `(("java-junit" ,java-junit)
2594 ("java-hamcrest-core" ,java-hamcrest-core)))
2595 (home-page "https://openjfx.io")
2596 (synopsis "Graphical application toolkit in Java")
2597 (description "OpenJFX is a client application platform for desktop,
2598 mobile and embedded systems built on Java. Its goal is to produce a
2599 modern, efficient, and fully featured toolkit for developing rich client
2600 applications. This package contains base classes for the OpenJFX
2601 distribution and helper classes for building other parts of the
2602 distribution.")
2603 (license license:gpl2))) ;gpl2 only, with classpath exception
2604
2605 (define-public java-openjfx-base
2606 (package (inherit java-openjfx-build)
2607 (name "java-openjfx-base")
2608 (arguments
2609 `(#:jar-name "java-openjfx-base.jar"
2610 #:source-dir "modules/base/src/main/java:modules/base/src/main/java8:modules/base/src/main/version-info"
2611 #:test-dir "modules/base/src/test"
2612 #:phases
2613 (modify-phases %standard-phases
2614 (add-before 'check 'remove-empty-file
2615 (lambda _
2616 (with-directory-excursion "modules/base/src/test/java"
2617 ;; These files are completely commented, but junit expects them to
2618 ;; contain a class, so tests fail.
2619 (delete-file
2620 "com/sun/javafx/property/adapter/PropertyDescriptorTest.java")
2621 (delete-file
2622 "com/sun/javafx/property/adapter/ReadOnlyPropertyDescriptorTest.java")
2623 (delete-file "javafx/beans/property/PropertiesTest.java")
2624 (delete-file
2625 "javafx/beans/property/adapter/ReadOnlyJavaBeanPropertyBuilder_General_Test.java")
2626 ;; This one fails
2627 (delete-file "com/sun/javafx/runtime/VersionInfoTest.java"))
2628 #t)))))
2629 (propagated-inputs
2630 `(("java-openjfx-build" ,java-openjfx-build)))
2631 (description "OpenJFX is a client application platform for desktop,
2632 mobile and embedded systems built on Java. Its goal is to produce a
2633 modern, efficient, and fully featured toolkit for developing rich client
2634 applications. This package contains base classes for the OpenJFX
2635 distribution.")))
2636
2637 (define-public java-openjfx-graphics
2638 (package (inherit java-openjfx-build)
2639 (name "java-openjfx-graphics")
2640 (arguments
2641 `(#:jar-name "java-openjfx-graphics.jar"
2642 #:source-dir "modules/graphics/src/main/java"
2643 #:tests? #f; require X
2644 #:test-dir "modules/graphics/src/test"))
2645 (propagated-inputs
2646 `(("java-openjfx-base" ,java-openjfx-base)
2647 ("java-swt" ,java-swt)))
2648 (description "OpenJFX is a client application platform for desktop,
2649 mobile and embedded systems built on Java. Its goal is to produce a
2650 modern, efficient, and fully featured toolkit for developing rich client
2651 applications. This package contains graphics-related classes for the
2652 OpenJFX distribution.")))
2653
2654 (define-public java-openjfx-media
2655 (package (inherit java-openjfx-build)
2656 (name "java-openjfx-media")
2657 (propagated-inputs
2658 `(("java-openjxf-graphics" ,java-openjfx-graphics)))
2659 (arguments
2660 `(#:jar-name "java-openjfx-media.jar"
2661 #:source-dir "modules/media/src/main/java"
2662 #:tests? #f)); no tests
2663 (description "OpenJFX is a client application platform for desktop,
2664 mobile and embedded systems built on Java. Its goal is to produce a
2665 modern, efficient, and fully featured toolkit for developing rich client
2666 applications. This package contains media-related classes for the
2667 OpenJFX distribution.")))
2668
2669 (define-public javacc-4
2670 (package
2671 (name "javacc")
2672 (version "4.1")
2673 (source (origin
2674 (method git-fetch)
2675 (uri (git-reference
2676 (url "https://github.com/javacc/javacc")
2677 (commit "release_41")))
2678 (file-name (string-append "javacc-" version "-checkout"))
2679 (sha256
2680 (base32
2681 "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0"))
2682 (modules '((guix build utils)))
2683 ;; delete bundled jars
2684 (snippet '(begin (delete-file-recursively "lib") #t))))
2685 (build-system ant-build-system)
2686 ;; Tests fail with
2687 ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60:
2688 ;; JAVACODE failed
2689 (arguments
2690 `(#:tests? #f
2691 #:phases
2692 (modify-phases %standard-phases
2693 ;; Delete tests to avoid build failure (we don't run them anyway).
2694 (add-after 'unpack 'delete-tests
2695 (lambda _
2696 (for-each delete-file
2697 '("src/org/javacc/JavaCCTestCase.java"
2698 "src/org/javacc/parser/ExpansionTest.java"
2699 "src/org/javacc/parser/OptionsTest.java"
2700 "src/org/javacc/jjtree/JJTreeOptionsTest.java"))
2701 (for-each delete-file-recursively
2702 '("src/org/javacc/parser/test"
2703 "src/org/javacc/jjdoc/test"))
2704 #t))
2705 (replace 'install (install-jars "bin/lib")))))
2706 (home-page "https://javacc.org/")
2707 (synopsis "Java parser generator")
2708 (description "Java Compiler Compiler (JavaCC) is the most popular parser
2709 generator for use with Java applications. A parser generator is a tool that
2710 reads a grammar specification and converts it to a Java program that can
2711 recognize matches to the grammar. In addition to the parser generator itself,
2712 JavaCC provides other standard capabilities related to parser generation such
2713 as tree building (via a tool called JJTree included with JavaCC), actions,
2714 debugging, etc.")
2715 (license license:bsd-3)))
2716
2717 ;; javacc-3, as javacc-4 is not properly bootstrapped: is contains a javacc.jar
2718 ;; in the bootstrap/ directory.
2719 (define-public javacc-3
2720 (package
2721 (inherit javacc-4)
2722 (version "3.2")
2723 (source (origin
2724 (method git-fetch)
2725 (uri (git-reference
2726 (url "https://github.com/javacc/javacc.git")
2727 (commit "release_32")))
2728 (file-name (string-append "javacc-" version "-checkout"))
2729 (sha256
2730 (base32
2731 "1pyf1xyh8gk83nxqn2v2mdws32l68ydznha41cxa4l2kkbq1v1g3"))))
2732 (arguments
2733 `(#:tests? #f
2734 #:phases
2735 (modify-phases %standard-phases
2736 (add-before 'build 'set-java-version
2737 (lambda _
2738 (for-each
2739 (lambda (file)
2740 (substitute* file
2741 (("debug=") "source=\"1.4\" debug=")))
2742 (find-files "." "build.xml"))
2743 #t))
2744 (replace 'install (install-jars "bin/lib")))))))
2745
2746 (define-public javacc
2747 (package
2748 (inherit javacc-4)
2749 (version "7.0.4")
2750 (source
2751 (origin
2752 (method git-fetch)
2753 (uri (git-reference
2754 (url "https://github.com/javacc/javacc")
2755 (commit version)))
2756 (file-name (git-file-name "javacc" version))
2757 (sha256
2758 (base32 "18kkak3gda93gr25jrgy6q00g0jr8i24ri2wk4kybz1v234fxx9i"))
2759 (modules '((guix build utils)))
2760 ;; Delete bundled jars.
2761 (snippet '(begin (for-each delete-file-recursively
2762 '("bootstrap" "lib"))
2763 #t))))
2764 (arguments
2765 `(#:make-flags ; bootstrap from javacc-4
2766 (list (string-append "-Dbootstrap-jar="
2767 (assoc-ref %build-inputs "javacc")
2768 "/share/java/javacc.jar"))
2769 #:test-target "test"
2770 #:phases
2771 (modify-phases %standard-phases
2772 (replace 'install (install-jars "target"))
2773 (add-after 'install 'install-bin
2774 (lambda* (#:key outputs inputs #:allow-other-keys)
2775 (let* ((out (assoc-ref outputs "out"))
2776 (dir (string-append out "/share/java"))
2777 (bin (string-append out "/bin"))
2778 (javacc (string-append bin "/javacc")))
2779 (mkdir-p bin)
2780 (with-output-to-file javacc
2781 (lambda _
2782 (display
2783 (string-append "#!/bin/sh\n"
2784 (assoc-ref inputs "jdk") "/bin/java"
2785 " -cp " dir "/javacc.jar" " `basename $0`" " $*"))))
2786 (chmod javacc #o755)
2787 ;; symlink to different names to affect the first argument and
2788 ;; change the behavior of the jar file.
2789 (symlink javacc (string-append bin "/jjdoc"))
2790 (symlink javacc (string-append bin "/jjtree"))
2791 #t))))))
2792
2793 (native-inputs
2794 `(("javacc" ,javacc-4)))))
2795
2796 ;; This is the last 3.x release of ECJ
2797 (define-public java-ecj-3
2798 (package
2799 (name "java-ecj")
2800 (version "3.8.2")
2801 (source (origin
2802 (method url-fetch)
2803 (uri (string-append "http://archive.eclipse.org/eclipse/"
2804 "downloads/drops/R-" version
2805 "-201301310800/ecjsrc-" version ".jar"))
2806 (sha256
2807 (base32
2808 "01mdj14jw11g1jfnki4fi8229p0c6zzckd38zqy2w4m3cjcvsx04"))))
2809 (build-system ant-build-system)
2810 (arguments
2811 `(#:tests? #f ; none included
2812 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2813 #:make-flags (list "-f" "src/build.xml")
2814 #:build-target "build"
2815 #:phases
2816 (modify-phases %standard-phases
2817 (add-after 'unpack 'fix-manifest
2818 (lambda _
2819 ;; Record the main class to make ecj executable.
2820 (with-atomic-file-replacement "src/META-INF/MANIFEST.MF"
2821 (lambda (in out)
2822 (display "Manifest-Version: 1.0
2823 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2824 out)))
2825 #t))
2826 (replace 'install (install-jars ".")))))
2827 (home-page "https://eclipse.org")
2828 (synopsis "Eclipse Java development tools core batch compiler")
2829 (description "This package provides the Eclipse Java core batch compiler.")
2830 (license license:epl1.0)))
2831
2832 ;; This is needed for java-cisd-args4j
2833 (define-public java-ecj-3.5
2834 (package (inherit java-ecj-3)
2835 (version "3.5.1")
2836 (source (origin
2837 (method url-fetch/zipbomb)
2838 (uri (string-append "http://archive.eclipse.org/eclipse/"
2839 "downloads/drops/R-" version
2840 "-200909170800/ecjsrc-" version ".zip"))
2841 (sha256
2842 (base32
2843 "1vnl2mavisc567bip736xzsvvbjif5279wc4a7pbdik5wlir8qr7"))))
2844 (build-system ant-build-system)
2845 (arguments
2846 `(#:tests? #f ; none included
2847 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2848 #:build-target "build"
2849 #:phases
2850 (modify-phases %standard-phases
2851 (add-after 'unpack 'fix-manifest
2852 (lambda _
2853 ;; Record the main class to make ecj executable.
2854 (with-atomic-file-replacement "META-INF/MANIFEST.MF"
2855 (lambda (in out)
2856 (dump-port in out)
2857 (display "Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2858 out)))
2859 #t))
2860 (replace 'install (install-jars ".")))))
2861 (native-inputs
2862 `(("unzip" ,unzip)))))
2863
2864 (define-public java-ecj
2865 (package (inherit java-ecj-3)
2866 (version "4.6.3")
2867 (source
2868 (origin
2869 (method url-fetch)
2870 (uri (string-append
2871 "http://archive.eclipse.org/eclipse/downloads/drops4/R-"
2872 version
2873 "-201703010400/ecjsrc-"
2874 version
2875 ".jar"))
2876 (sha256
2877 (base32
2878 "11cfgsdgznja1pvlxkjbqykxd7pcd5655vkm7s44xmahmap15gpl"))))
2879 (arguments
2880 `(#:tests? #f ; none included
2881 #:build-target "build"
2882 #:phases
2883 (modify-phases %standard-phases
2884 (add-after 'unpack 'fix-build.xml
2885 (lambda _
2886 (substitute* "src/build.xml"
2887 (("^.*MANIFEST.*$")
2888 ""))
2889 #t))
2890 (add-after 'unpack 'fix-prop
2891 (lambda _
2892 (substitute* "src/build.xml"
2893 (("^.*properties.*$")
2894 "<include name=\"**/*.properties\"/>
2895 <include name=\"**/*.props\"/>"))
2896 #t))
2897 (add-before 'build 'chdir
2898 (lambda _
2899 (chdir "src")
2900 #t))
2901 (replace 'install (install-jars ".")))))))
2902
2903 (define-public java-cisd-base
2904 (let ((revision 38938)
2905 (base-version "14.12.0"))
2906 (package
2907 (name "java-cisd-base")
2908 (version (string-append base-version "-" (number->string revision)))
2909 (source (origin
2910 (method svn-fetch)
2911 (uri (svn-reference
2912 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2913 "base/tags/release/"
2914 (version-major+minor base-version)
2915 ".x/" base-version "/base/"))
2916 (revision revision)))
2917 (file-name (string-append "java-cisd-base-" version "-checkout"))
2918 (sha256
2919 (base32
2920 "1i5adyf7nzclb0wydgwa1az04qliid8035vpahaandmkmigbnxiy"))
2921 (modules '((guix build utils)))
2922 (snippet
2923 '(begin
2924 ;; Delete included gradle jar
2925 (delete-file-recursively "gradle/wrapper")
2926 ;; Delete pre-built native libraries
2927 (delete-file-recursively "libs")
2928 #t))))
2929 (build-system ant-build-system)
2930 (arguments
2931 `(#:make-flags '("-file" "build/build.xml")
2932 #:test-target "jar-test"
2933 #:jdk ,icedtea-8
2934 #:phases
2935 (modify-phases %standard-phases
2936 (add-after 'unpack 'unpack-build-resources
2937 (lambda* (#:key inputs #:allow-other-keys)
2938 (copy-recursively (assoc-ref inputs "build-resources")
2939 "../build_resources")
2940 #t))
2941 (add-after 'unpack-build-resources 'fix-dependencies
2942 (lambda* (#:key inputs #:allow-other-keys)
2943 (substitute* "build/build.xml"
2944 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2945 (string-append (assoc-ref inputs "java-testng")
2946 "/share/java/java-testng.jar"))
2947 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2948 (string-append (assoc-ref inputs "java-commons-lang")
2949 "/share/java/commons-lang-"
2950 ,(package-version java-commons-lang) ".jar"))
2951 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2952 (string-append (assoc-ref inputs "java-commons-io")
2953 "/lib/m2/commons-io/commons-io/"
2954 ,(package-version java-commons-io)
2955 "/commons-io-"
2956 ,(package-version java-commons-io)
2957 ".jar"))
2958 ;; Remove dependency on svn
2959 (("<build-info.*") "")
2960 (("\\$\\{revision.number\\}")
2961 ,(number->string revision))
2962 (("\\$\\{version.number\\}") ,base-version))
2963 ;; Remove dependency on classycle
2964 (substitute* "../build_resources/ant/build-common.xml"
2965 (("<taskdef name=\"dependency-checker.*") "")
2966 (("classname=\"classycle.*") "")
2967 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2968 #t))
2969 ;; A few tests fail because of the lack of a proper /etc/groups and
2970 ;; /etc/passwd file in the build container.
2971 (add-after 'unpack 'disable-broken-tests
2972 (lambda _
2973 (substitute* "sourceTest/java/ch/systemsx/cisd/base/AllTests.java"
2974 (("Unix.isOperational\\(\\)") "false"))
2975 #t))
2976 ;; These decorators are almost useless and pull in an unpackaged
2977 ;; dependency.
2978 (add-after 'unpack 'remove-useless-decorators
2979 (lambda _
2980 (substitute* "source/java/ch/systemsx/cisd/base/unix/Unix.java"
2981 (("@Private") "")
2982 (("import ch.rinn.restrictions.Private;") ""))
2983 (substitute* "sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java"
2984 (("@Friend.*") "")
2985 (("import ch.rinn.restrictions.Friend;") ""))
2986 #t))
2987 (add-before 'configure 'build-native-code
2988 (lambda* (#:key inputs #:allow-other-keys)
2989 (let ((jdk (assoc-ref inputs "jdk"))
2990 (dir ,(match (%current-system)
2991 ("i686-linux"
2992 "i386-Linux")
2993 ((or "armhf-linux" "aarch64-linux")
2994 "arm-Linux")
2995 ((or "x86_64-linux")
2996 "amd64-Linux")
2997 (_ "unknown-Linux"))))
2998 (with-directory-excursion "source/c"
2999 (invoke "gcc" "-shared" "-O3" "-fPIC" "unix.c"
3000 (string-append "-I" jdk "/include")
3001 (string-append "-I" jdk "/include/linux")
3002 "-o" "libunix.so")
3003 (invoke "gcc" "-shared" "-O3" "-fPIC"
3004 "-DMACHINE_BYTE_ORDER=1"
3005 "copyCommon.c"
3006 "copyByteChar.c"
3007 "copyByteDouble.c"
3008 "copyByteFloat.c"
3009 "copyByteInt.c"
3010 "copyByteLong.c"
3011 "copyByteShort.c"
3012 (string-append "-I" jdk "/include")
3013 (string-append "-I" jdk "/include/linux")
3014 "-o" "libnativedata.so"))
3015 (install-file "source/c/libunix.so"
3016 (string-append "libs/native/unix/" dir))
3017 (install-file "source/c/libnativedata.so"
3018 (string-append "libs/native/nativedata/" dir))
3019 #t)))
3020 ;; In the "check" phase we only build the test executable.
3021 (add-after 'check 'run-tests
3022 (lambda _
3023 (invoke "java" "-jar" "targets/dist/sis-base-test.jar")
3024 (delete-file "targets/dist/sis-base-test.jar")
3025 #t))
3026 (replace 'install (install-jars "targets/dist")))))
3027 (native-inputs
3028 `(("jdk" ,icedtea-8)
3029 ("java-commons-lang" ,java-commons-lang)
3030 ("java-commons-io" ,java-commons-io)
3031 ("java-testng" ,java-testng)
3032 ("build-resources"
3033 ,(origin
3034 (method svn-fetch)
3035 (uri (svn-reference
3036 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3037 "base/tags/release/"
3038 (version-major+minor base-version)
3039 ".x/" base-version
3040 "/build_resources/"))
3041 (revision revision)))
3042 (sha256
3043 (base32
3044 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
3045 (home-page "http://svnsis.ethz.ch")
3046 (synopsis "Utility classes for libraries from ETH Zurich")
3047 (description "This library supplies some utility classes needed for
3048 libraries from the SIS division at ETH Zurich like jHDF5.")
3049 ;; The C sources are under a non-copyleft license, which looks like a
3050 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
3051 (license (list license:asl2.0
3052 (license:non-copyleft "file://source/c/COPYING"))))))
3053
3054 (define-public java-cisd-args4j
3055 (let ((revision 39162)
3056 (base-version "9.11.2"))
3057 (package
3058 (name "java-cisd-args4j")
3059 (version (string-append base-version "-" (number->string revision)))
3060 (source (origin
3061 (method svn-fetch)
3062 (uri (svn-reference
3063 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3064 "args4j/tags/release/"
3065 (version-major+minor base-version)
3066 ".x/" base-version "/args4j/"))
3067 (revision revision)))
3068 (file-name (string-append "java-cisd-args4j-" version "-checkout"))
3069 (sha256
3070 (base32
3071 "0hhqznjaivq7ips7mkwas78z42s6djsm20rrs7g1zd59rcsakxn2"))))
3072 (build-system ant-build-system)
3073 (arguments
3074 `(#:make-flags '("-file" "build/build.xml")
3075 #:tests? #f ; there are no tests
3076 ;; There are weird build failures with JDK8, such as: "The type
3077 ;; java.io.ObjectInputStream cannot be resolved. It is indirectly
3078 ;; referenced from required .class files"
3079 #:jdk ,icedtea-7
3080 #:modules ((guix build ant-build-system)
3081 (guix build utils)
3082 (guix build java-utils)
3083 (sxml simple)
3084 (sxml transform)
3085 (sxml xpath))
3086 #:phases
3087 (modify-phases %standard-phases
3088 (add-after 'unpack 'unpack-build-resources
3089 (lambda* (#:key inputs #:allow-other-keys)
3090 (mkdir-p "../build_resources")
3091 (invoke "tar" "xf" (assoc-ref inputs "build-resources")
3092 "-C" "../build_resources"
3093 "--strip-components=1")
3094 (mkdir-p "../build_resources/lib")
3095 #t))
3096 (add-after 'unpack-build-resources 'fix-dependencies
3097 (lambda* (#:key inputs #:allow-other-keys)
3098 ;; FIXME: There should be a more convenient abstraction for
3099 ;; editing XML files.
3100 (with-directory-excursion "../build_resources/ant/"
3101 (chmod "build-common.xml" #o664)
3102 (call-with-output-file "build-common.xml.new"
3103 (lambda (port)
3104 (sxml->xml
3105 (pre-post-order
3106 (with-input-from-file "build-common.xml"
3107 (lambda _ (xml->sxml #:trim-whitespace? #t)))
3108 `(;; Remove dependency on classycle and custom ant tasks
3109 (taskdef . ,(lambda (tag . kids)
3110 (let ((name ((sxpath '(name *text*)) kids)))
3111 (if (or (member "build-info" name)
3112 (member "dependency-checker" name)
3113 (member "build-java-subprojects" name)
3114 (member "project-classpath" name))
3115 '() ; skip
3116 `(,tag ,@kids)))))
3117 (typedef . ,(lambda (tag . kids)
3118 (let ((name ((sxpath '(name *text*)) kids)))
3119 (if (member "recursive-jar" name)
3120 '() ; skip
3121 `(,tag ,@kids)))))
3122 (build-java-subprojects . ,(lambda _ '()))
3123 ;; Ignore everything else
3124 (*default* . ,(lambda (tag . kids) `(,tag ,@kids)))
3125 (*text* . ,(lambda (_ txt) txt))))
3126 port)))
3127 (rename-file "build-common.xml.new" "build-common.xml"))
3128 (substitute* "build/build.xml"
3129 (("\\$\\{lib\\}/cisd-base/cisd-base.jar")
3130 (string-append (assoc-ref inputs "java-cisd-base")
3131 "/share/java/sis-base.jar"))
3132 ;; Remove dependency on svn
3133 (("<build-info.*") "")
3134 (("\\$\\{revision.number\\}")
3135 ,(number->string revision))
3136 (("\\$\\{version.number\\}") ,base-version)
3137 ;; Don't use custom ant tasks.
3138 (("recursive-jar") "jar")
3139 (("<project-classpath.*") ""))
3140 #t))
3141 (replace 'install (install-jars "targets/dist")))))
3142 (inputs
3143 `(("java-cisd-base" ,java-cisd-base)))
3144 (native-inputs
3145 `(("ecj" ,java-ecj-3.5)
3146 ("build-resources"
3147 ,(origin
3148 (method svn-fetch)
3149 (uri (svn-reference
3150 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3151 "args4j/tags/release/"
3152 (version-major+minor base-version)
3153 ".x/" base-version
3154 "/build_resources/"))
3155 (revision revision)))
3156 (sha256
3157 (base32
3158 "056cam4k8pll7ass31sy6gwn8g8719njc41yf4l02b0342nilkyf"))
3159 (modules '((guix build utils)))
3160 ;; Delete bundled pre-built jars.
3161 (snippet
3162 '(begin (delete-file-recursively "lib/") #t))))))
3163 (home-page "http://svnsis.ethz.ch")
3164 (synopsis "Command line parser library")
3165 (description "This package provides a parser for command line arguments.")
3166 (license license:asl2.0))))
3167
3168 (define-public java-cisd-jhdf5
3169 (let ((revision 39162)
3170 (base-version "14.12.6"))
3171 (package
3172 (name "java-cisd-jhdf5")
3173 (version (string-append base-version "-" (number->string revision)))
3174 (source (origin
3175 (method svn-fetch)
3176 (uri (svn-reference
3177 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3178 "jhdf5/tags/release/"
3179 (version-major+minor base-version)
3180 ".x/" base-version "/jhdf5/"))
3181 (revision revision)))
3182 (file-name (string-append "java-cisd-jhdf5-" version "-checkout"))
3183 (sha256
3184 (base32
3185 "13i17s2hn0q9drdqvp8csy7770p3hdbh9rp30ihln2ldkfawdmz0"))
3186 (modules '((guix build utils)))
3187 (snippet
3188 '(begin
3189 ;; Delete included gradle jar
3190 (delete-file-recursively "gradle/wrapper")
3191 ;; Delete pre-built native libraries
3192 (delete-file-recursively "libs")
3193 #t))))
3194 (build-system ant-build-system)
3195 (arguments
3196 `(#:make-flags '("-file" "build/build.xml")
3197 #:build-target "jar-all"
3198 #:test-target "jar-test"
3199 #:jdk ,icedtea-8
3200 #:phases
3201 (modify-phases %standard-phases
3202 ;; FIXME: this build phase fails.
3203 (delete 'generate-jar-indices)
3204 ;; Don't erase results from the build phase when building tests.
3205 (add-after 'unpack 'separate-test-target-from-clean
3206 (lambda _
3207 (substitute* "build/build.xml"
3208 (("\"jar-test\" depends=\"clean, ")
3209 "\"jar-test\" depends=\""))
3210 #t))
3211 (add-after 'unpack 'unpack-build-resources
3212 (lambda* (#:key inputs #:allow-other-keys)
3213 (copy-recursively (assoc-ref inputs "build-resources")
3214 "../build_resources")
3215 (delete-file-recursively "../build_resources/lib/")
3216 (mkdir-p "../build_resources/lib")
3217 ;; Remove dependency on classycle
3218 (substitute* "../build_resources/ant/build-common.xml"
3219 (("<taskdef name=\"dependency-checker.*") "")
3220 (("classname=\"classycle.*") "")
3221 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
3222 ;; Remove dependency on svn
3223 (substitute* "build/build.xml"
3224 (("<build-info.*") "")
3225 (("\\$\\{revision.number\\}")
3226 ,(number->string revision))
3227 (("\\$\\{version.number\\}") ,base-version))
3228 #t))
3229 (add-after 'unpack-build-resources 'fix-dependencies
3230 (lambda* (#:key inputs #:allow-other-keys)
3231 (substitute* "../build_resources/ant/build-common.xml"
3232 (("../libraries/testng/testng-jdk15.jar")
3233 (string-append (assoc-ref inputs "java-testng")
3234 "/share/java/java-testng.jar")))
3235 (substitute* "build/build.xml"
3236 (("\\$\\{lib\\}/sis-base/sis-base.jar")
3237 (string-append (assoc-ref inputs "java-cisd-base")
3238 "/share/java/sis-base.jar"))
3239 (("\\$\\{lib\\}/cisd-args4j/cisd-args4j.jar")
3240 (string-append (assoc-ref inputs "java-cisd-args4j")
3241 "/share/java/cisd-args4j.jar"))
3242 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
3243 (string-append (assoc-ref inputs "java-commons-lang")
3244 "/share/java/commons-lang-"
3245 ,(package-version java-commons-lang) ".jar"))
3246 (("\\$\\{lib\\}/commons-io/commons-io.jar")
3247 (string-append (assoc-ref inputs "java-commons-io")
3248 "/lib/m2/commons-io/commons-io/"
3249 ,(package-version java-commons-io)
3250 "/commons-io-"
3251 ,(package-version java-commons-io)
3252 ".jar"))
3253 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
3254 (string-append (assoc-ref inputs "java-testng")
3255 "/share/java/java-testng.jar"))
3256 (("\\$\\{lib\\}/junit4/junit.jar")
3257 (car (find-files (assoc-ref inputs "java-junit") "jar$")))
3258 (("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar")
3259 (car (find-files (assoc-ref inputs "java-hamcrest-core")
3260 "jar$"))))
3261 ;; Remove dependency on ch.rinn.restrictions
3262 (with-directory-excursion "source/java/ch/systemsx/cisd/hdf5/"
3263 (substitute* '("BitSetConversionUtils.java"
3264 "HDF5Utils.java")
3265 (("import ch.rinn.restrictions.Private;") "")
3266 (("@Private") "")))
3267 (with-directory-excursion "sourceTest/java/ch/systemsx/cisd/hdf5/"
3268 (substitute* '("BitSetConversionTest.java"
3269 "h5ar/HDF5ArchiverTest.java")
3270 (("import ch.rinn.restrictions.Friend;") "")
3271 (("@Friend.*") ""))
3272 ;; Remove leftovers from removing @Friend
3273 (substitute* "h5ar/HDF5ArchiverTest.java"
3274 (("\\{ HDF5Archiver.class, IdCache.class, LinkRecord.class \\}\\)")
3275 "")))
3276 #t))
3277 (add-before 'configure 'build-native-library
3278 (lambda* (#:key inputs #:allow-other-keys)
3279 (let ((jdk (assoc-ref inputs "jdk"))
3280 (hdf5 (assoc-ref inputs "hdf5"))
3281 (dir ,(match (%current-system)
3282 ("i686-linux"
3283 "i386-Linux")
3284 ((or "armhf-linux" "aarch64-linux")
3285 "arm-Linux")
3286 ((or "x86_64-linux")
3287 "amd64-Linux")
3288 (_ "unknown-Linux"))))
3289 (with-directory-excursion "source/c"
3290 (apply invoke `("gcc" "-shared" "-O3"
3291 "-fPIC"
3292 "-Wl,--exclude-libs,ALL"
3293 ,@(find-files "jhdf5" "\\.c$")
3294 ,@(find-files "hdf-java" "\\.c$")
3295 ,(string-append "-I" hdf5 "/include")
3296 ,(string-append "-I" jdk "/include")
3297 ,(string-append "-I" jdk "/include/linux")
3298 ,(string-append hdf5 "/lib/libhdf5.a")
3299 "-o" "libjhdf5.so" "-lz")))
3300 (install-file "source/c/libjhdf5.so"
3301 (string-append "libs/native/jhdf5/" dir))
3302 #t)))
3303 ;; In the "check" phase we only build the test executable.
3304 (add-after 'check 'run-tests
3305 (lambda _
3306 (invoke "java" "-jar" "targets/dist/sis-jhdf5-test.jar")
3307 (delete-file "targets/dist/sis-jhdf5-test.jar")
3308 #t))
3309 (replace 'install
3310 (install-jars "targets/dist")))))
3311 (inputs
3312 `(("java-cisd-base" ,java-cisd-base)
3313 ("java-cisd-args4j" ,java-cisd-args4j)
3314 ("java-commons-lang" ,java-commons-lang)
3315 ("java-commons-io" ,java-commons-io)
3316 ("hdf5" ,hdf5)
3317 ("zlib" ,zlib)))
3318 (native-inputs
3319 `(("jdk" ,icedtea-8)
3320 ("java-testng" ,java-testng)
3321 ("java-junit" ,java-junit)
3322 ("java-jmock" ,java-jmock)
3323 ("java-hamcrest-core" ,java-hamcrest-core)
3324 ("build-resources"
3325 ,(origin
3326 (method svn-fetch)
3327 (uri (svn-reference
3328 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3329 "jhdf5/tags/release/"
3330 (version-major+minor base-version)
3331 ".x/" base-version
3332 "/build_resources/"))
3333 (revision revision)))
3334 (sha256
3335 (base32
3336 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
3337 (home-page "https://wiki-bsse.ethz.ch/display/JHDF5/")
3338 (synopsis "Java binding for HDF5")
3339 (description "JHDF5 is a high-level API in Java for reading and writing
3340 HDF5 files, building on the libraries provided by the HDF Group.")
3341 ;; The C sources are under a non-copyleft license, which looks like a
3342 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
3343 (license (list license:asl2.0
3344 (license:non-copyleft "file://source/c/COPYING"))))))
3345
3346 (define-public java-classpathx-servletapi
3347 (package
3348 (name "java-classpathx-servletapi")
3349 (version "3.0.1")
3350 (source (origin
3351 (method url-fetch)
3352 (uri (string-append "mirror://gnu/classpathx/servletapi/"
3353 "servletapi-" version ".tar.gz"))
3354 (sha256
3355 (base32
3356 "07d8h051siga2f33fra72hk12sbq1bxa4jifjg0qj0vfazjjff0x"))))
3357 (build-system ant-build-system)
3358 (arguments
3359 `(#:tests? #f ; there is no test target
3360 #:build-target "compile"
3361 #:make-flags
3362 (list "-Dbuild.compiler=javac1.8"
3363 (string-append "-Ddist=" (assoc-ref %outputs "out")))
3364 #:phases
3365 (modify-phases %standard-phases
3366 (replace 'install
3367 (lambda* (#:key make-flags #:allow-other-keys)
3368 (apply invoke `("ant" "dist" ,@make-flags)))))))
3369 (home-page "https://www.gnu.org/software/classpathx/")
3370 (synopsis "Java servlet API implementation")
3371 (description "This is the GNU servlet API distribution, part of the
3372 ClasspathX project. It provides implementations of version 3.0 of the servlet
3373 API and version 2.1 of the Java ServerPages API.")
3374 (license license:gpl3+)))
3375
3376 (define-public java-javaee-servletapi
3377 (package
3378 (name "java-javaee-servletapi")
3379 (version "3.1.0")
3380 (source (origin
3381 (method git-fetch)
3382 (uri (git-reference
3383 (url "https://github.com/javaee/servlet-spec")
3384 (commit version)))
3385 (file-name (git-file-name name version))
3386 (sha256
3387 (base32
3388 "0s03lj8w5an70lkqbjycgfrfk0kc07vbfav91jzk87gh3awf9ksl"))))
3389 (build-system ant-build-system)
3390 (arguments
3391 `(#:jar-name "javax-servletapi.jar"
3392 ;; no tests
3393 #:tests? #f
3394 #:source-dir "src/main/java"
3395 #:phases
3396 (modify-phases %standard-phases
3397 (add-before 'build 'copy-resources
3398 (lambda _
3399 (mkdir-p "build/classes/javax/servlet/http")
3400 (let ((from-prefix "src/main/java/javax/servlet/")
3401 (to-prefix "build/classes/javax/servlet/"))
3402 (for-each (lambda (f)
3403 (copy-file (string-append from-prefix f)
3404 (string-append to-prefix f)))
3405 (list "LocalStrings_ja.properties"
3406 "LocalStrings.properties"
3407 "LocalStrings_fr.properties"
3408 "http/LocalStrings_es.properties"
3409 "http/LocalStrings_ja.properties"
3410 "http/LocalStrings.properties"
3411 "http/LocalStrings_fr.properties")))
3412 #t)))))
3413 (native-inputs
3414 `(("unzip" ,unzip)))
3415 (home-page "https://javaee.github.io/servlet-spec/")
3416 (synopsis "Java servlet API")
3417 (description "Java Servlet is the foundation web specification in the
3418 Java Enterprise Platform. Developers can build web applications using the
3419 Servlet API to interact with the request/response workflow. This project
3420 provides information on the continued development of the Java Servlet
3421 specification.")
3422 ;; Main code is dual-licensed by Oracle under either GLP2 or CDDL 1.1.
3423 ;; Some files are licensed under ASL 2.0.
3424 (license (list license:asl2.0 license:gpl2 license:cddl1.1))))
3425
3426 (define-public java-swt
3427 (package
3428 (name "java-swt")
3429 (version "4.7.1a")
3430 (source
3431 ;; The types of many variables and procedures differ in the sources
3432 ;; dependent on whether the target architecture is a 32-bit system or a
3433 ;; 64-bit system. Instead of patching the sources on demand in a build
3434 ;; phase we download either the 32-bit archive (which mostly uses "int"
3435 ;; types) or the 64-bit archive (which mostly uses "long" types).
3436 (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9")
3437 (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q")
3438 (file32 "x86")
3439 (file64 "x86_64"))
3440 (let-values (((hash file)
3441 (match (or (%current-target-system) (%current-system))
3442 ("x86_64-linux" (values hash64 file64))
3443 (_ (values hash32 file32)))))
3444 (origin
3445 (method url-fetch)
3446 (uri (string-append
3447 "http://download.eclipse.org/eclipse/downloads/drops4/"
3448 "R-" version "-201710090410/swt-" version
3449 "-gtk-linux-" file ".zip"))
3450 (sha256 (base32 hash))))))
3451 (build-system ant-build-system)
3452 (arguments
3453 `(#:jar-name "swt.jar"
3454 #:jdk ,icedtea-8
3455 #:tests? #f ; no "check" target
3456 #:phases
3457 (modify-phases %standard-phases
3458 (replace 'unpack
3459 (lambda* (#:key source #:allow-other-keys)
3460 (mkdir "swt")
3461 (invoke "unzip" source "-d" "swt")
3462 (chdir "swt")
3463 (mkdir "src")
3464 (invoke "unzip" "src.zip" "-d" "src")))
3465 ;; The classpath contains invalid icecat jars. Since we don't need
3466 ;; anything other than the JDK on the classpath, we can simply unset
3467 ;; it.
3468 (add-after 'configure 'unset-classpath
3469 (lambda _ (unsetenv "CLASSPATH") #t))
3470 (add-before 'build 'build-native
3471 (lambda* (#:key inputs outputs #:allow-other-keys)
3472 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3473 ;; Build shared libraries. Users of SWT have to set the system
3474 ;; property swt.library.path to the "lib" directory of this
3475 ;; package output.
3476 (mkdir-p lib)
3477 (setenv "OUTPUT_DIR" lib)
3478 (with-directory-excursion "src"
3479 (invoke "bash" "build.sh")))))
3480 (add-after 'install 'install-native
3481 (lambda* (#:key outputs #:allow-other-keys)
3482 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3483 (for-each (lambda (file)
3484 (install-file file lib))
3485 (find-files "." "\\.so$"))
3486 #t))))))
3487 (inputs
3488 `(("gtk" ,gtk+-2)
3489 ("libxtst" ,libxtst)
3490 ("libxt" ,libxt)
3491 ("mesa" ,mesa)
3492 ("glu" ,glu)))
3493 (native-inputs
3494 `(("pkg-config" ,pkg-config)
3495 ("unzip" ,unzip)))
3496 (home-page "https://www.eclipse.org/swt/")
3497 (synopsis "Widget toolkit for Java")
3498 (description
3499 "SWT is a widget toolkit for Java designed to provide efficient, portable
3500 access to the user-interface facilities of the operating systems on which it
3501 is implemented.")
3502 ;; SWT code is licensed under EPL1.0
3503 ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1
3504 ;; Cairo bindings contain code under MPL1.1
3505 ;; XULRunner 1.9 bindings contain code under MPL2.0
3506 (license (list
3507 license:epl1.0
3508 license:mpl1.1
3509 license:mpl2.0
3510 license:lgpl2.1+))))
3511
3512 ;; java-hamcrest-core uses qdox version 1.12. We package this version instead
3513 ;; of the latest release.
3514 (define-public java-qdox-1.12
3515 (package
3516 (name "java-qdox")
3517 (version "1.12.1")
3518 (source (origin
3519 (method url-fetch)
3520 (uri (string-append "https://repo1.maven.org/maven2/"
3521 "com/thoughtworks/qdox/qdox/" version
3522 "/qdox-" version "-sources.jar"))
3523 (sha256
3524 (base32
3525 "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl"))))
3526 (build-system ant-build-system)
3527 (arguments
3528 `(;; Tests require junit
3529 #:tests? #f
3530 #:jar-name "qdox.jar"
3531 #:phases
3532 (modify-phases %standard-phases
3533 (replace 'unpack
3534 (lambda* (#:key source #:allow-other-keys)
3535 (mkdir "src")
3536 (with-directory-excursion "src"
3537 (invoke "jar" "-xf" source))))
3538 ;; At this point we don't have junit, so we must remove the API
3539 ;; tests.
3540 (add-after 'unpack 'delete-tests
3541 (lambda _
3542 (delete-file-recursively "src/com/thoughtworks/qdox/junit")
3543 #t)))))
3544 (home-page "https://github.com/codehaus/qdox")
3545 (synopsis "Parse definitions from Java source files")
3546 (description
3547 "QDox is a high speed, small footprint parser for extracting
3548 class/interface/method definitions from source files complete with JavaDoc
3549 @code{@@tags}. It is designed to be used by active code generators or
3550 documentation tools.")
3551 (license license:asl2.0)))
3552
3553 (define-public java-qdox
3554 (package
3555 (name "java-qdox")
3556 ; Newer version exists, but this version is required by java-plexus-component-metadata
3557 (version "2.0-M2")
3558 (source (origin
3559 (method url-fetch)
3560 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
3561 ;; Older releases at https://github.com/codehaus/qdox/
3562 ;; Note: The release at maven is pre-generated. The release at
3563 ;; github requires jflex.
3564 (uri (string-append "https://repo1.maven.org/maven2/"
3565 "com/thoughtworks/qdox/qdox/" version
3566 "/qdox-" version "-sources.jar"))
3567 (sha256
3568 (base32
3569 "10xxrcaicq6axszcr2jpygisa4ch4sinyx5q7kqqxv4lknrmxp5x"))))
3570 (build-system ant-build-system)
3571 (arguments
3572 `(#:jar-name "qdox.jar"
3573 #:tests? #f; no tests
3574 #:modules
3575 ((guix build ant-build-system)
3576 (guix build java-utils)
3577 (guix build utils)
3578 (sxml simple))
3579 #:phases
3580 (modify-phases %standard-phases
3581 (add-before 'install 'create-pom
3582 (lambda _
3583 (with-output-to-file "pom.xml"
3584 (lambda _
3585 (sxml->xml
3586 `((project
3587 (modelVersion "4.0.0")
3588 (name "QDox")
3589 (groupId "com.thoughtworks.qdox")
3590 (artifactId "qdox")
3591 (version ,,version))))))
3592 #t))
3593 (replace 'install
3594 (install-from-pom "pom.xml")))))
3595 (home-page "https://github.com/codehaus/qdox")
3596 (synopsis "Parse definitions from Java source files")
3597 (description "QDox is a high speed, small footprint parser for extracting
3598 class/interface/method definitions from source files complete with JavaDoc
3599 @code{@@tags}. It is designed to be used by active code generators or
3600 documentation tools.")
3601 (license license:asl2.0)))
3602
3603 (define-public java-qdox-2-M9
3604 (package
3605 (inherit java-qdox)
3606 (version "2.0-M9"); required by plexus-java
3607 (source (origin
3608 (method url-fetch)
3609 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
3610 ;; Older releases at https://github.com/codehaus/qdox/
3611 ;; Note: The release at maven is pre-generated. The release at
3612 ;; github requires jflex.
3613 (uri (string-append "https://repo1.maven.org/maven2/"
3614 "com/thoughtworks/qdox/qdox/" version
3615 "/qdox-" version "-sources.jar"))
3616 (sha256
3617 (base32
3618 "1s2jnmx2dkwnaha12lcj26aynywgwa8sslc47z82wx8xai13y4fg"))))))
3619
3620 (define-public java-jarjar
3621 (package
3622 (name "java-jarjar")
3623 (version "1.4")
3624 (source (origin
3625 (method url-fetch)
3626 (uri (string-append
3627 "https://storage.googleapis.com/google-code-archive-downloads/v2/"
3628 "code.google.com/jarjar/jarjar-src-" version ".zip"))
3629 (sha256
3630 (base32
3631 "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl"))
3632 (modules '((guix build utils)))
3633 (snippet
3634 '(begin
3635 ;; Delete bundled thirds-party jar archives.
3636 (delete-file-recursively "lib")
3637 (delete-file "src/test/enumtest.jar")
3638 ;; the CLASSPATH needs this directory, create an empty one
3639 (mkdir-p "lib")
3640 #t))))
3641 (build-system ant-build-system)
3642 (arguments
3643 `(;; Tests require junit, which ultimately depends on this package.
3644 #:tests? #f
3645 #:build-target "jar"
3646 #:phases
3647 (modify-phases %standard-phases
3648 (add-before 'build 'do-not-use-bundled-asm
3649 (lambda* (#:key inputs #:allow-other-keys)
3650 (substitute* "build.xml"
3651 (("<path id=\"path.build\">")
3652 (string-append "<path id=\"path.build\"><fileset dir=\""
3653 (assoc-ref inputs "java-asm-bootstrap")
3654 "/lib/m2\" includes=\"**/*.jar\"/>"))
3655 (("<zipfileset src=\"lib/asm-4.0.jar\"/>") "")
3656 (("lib/asm-commons-4.0.jar")
3657 (car (find-files (assoc-ref inputs "java-asm-bootstrap")
3658 "asm-6.0.jar")))
3659 (("<include name=\"org/objectweb/asm/commons/Remap\\*\\.class\"/>")
3660 (string-append "<include name=\"org/objectweb/asm/"
3661 "commons/Remap*.class\"/>"
3662 "<include name=\"org/objectweb/asm/*.class\"/>"
3663 "<include name=\"org/objectweb/asm/"
3664 "signature/*.class\"/>"
3665 "<include name=\"org/objectweb/asm/"
3666 "commons/SignatureRemapper.class\"/>")))
3667 #t))
3668 (add-before 'build 'remove-maven-dependency
3669 (lambda _
3670 ;; We do not need to build jarjar as a maven plugin just yet, so
3671 ;; remove this file. Maven requires jarjar (but not that plugin),
3672 ;; so removing it improves the bootstrap.
3673 (delete-file "src/main/com/tonicsystems/jarjar/JarJarMojo.java")
3674 #t))
3675 (replace 'install
3676 (lambda* (#:key outputs #:allow-other-keys)
3677 (let ((target (string-append (assoc-ref outputs "out")
3678 "/share/java")))
3679 (install-file (string-append "dist/jarjar-" ,version ".jar")
3680 target))
3681 #t)))))
3682 (inputs
3683 `(("java-asm-bootstrap" ,java-asm-bootstrap)))
3684 (native-inputs
3685 `(("unzip" ,unzip)))
3686 (home-page "https://code.google.com/archive/p/jarjar/")
3687 (synopsis "Repackage Java libraries")
3688 (description
3689 "Jar Jar Links is a utility that makes it easy to repackage Java
3690 libraries and embed them into your own distribution. Jar Jar Links includes
3691 an Ant task that extends the built-in @code{jar} task.")
3692 (license license:asl2.0)))
3693
3694 (define-public java-hamcrest-core
3695 (package
3696 (name "java-hamcrest-core")
3697 (version "1.3")
3698 (source (origin
3699 (method git-fetch)
3700 (uri (git-reference
3701 (url "https://github.com/hamcrest/JavaHamcrest/")
3702 (commit (string-append "hamcrest-java-" version))))
3703 (file-name (git-file-name name version))
3704 (sha256
3705 (base32
3706 "16fxxkrd31ahqvcaby30jgh3z1i0zxh51m24hxgz0z2agxj6bc63"))
3707 (modules '((guix build utils)))
3708 (snippet
3709 '(begin
3710 ;; Delete bundled thirds-party jar archives.
3711 (delete-file-recursively "lib")
3712 #t))))
3713 (build-system ant-build-system)
3714 (arguments
3715 `(#:tests? #f ; Tests require junit
3716 #:modules ((guix build ant-build-system)
3717 (guix build java-utils)
3718 (guix build utils)
3719 (srfi srfi-1))
3720 #:make-flags (list (string-append "-Dversion=" ,version))
3721 #:test-target "unit-test"
3722 #:build-target "core"
3723 #:phases
3724 (modify-phases %standard-phases
3725 ;; Disable unit tests, because they require junit, which requires
3726 ;; hamcrest-core. We also give a fixed value to the "Built-Date"
3727 ;; attribute from the manifest for reproducibility.
3728 (add-before 'configure 'patch-build.xml
3729 (lambda _
3730 (substitute* "build.xml"
3731 (("unit-test, ") "")
3732 (("\\$\\{build.timestamp\\}") "guix"))
3733 #t))
3734 ;; Java's "getMethods()" returns methods in an unpredictable order.
3735 ;; To make the output of the generated code deterministic we must
3736 ;; sort the array of methods.
3737 (add-after 'unpack 'make-method-order-deterministic
3738 (lambda _
3739 (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java"
3740 (("import java\\.util\\.Iterator;" line)
3741 (string-append line "\n"
3742 "import java.util.Arrays; import java.util.Comparator;"))
3743 (("allMethods = cls\\.getMethods\\(\\);" line)
3744 (string-append "_" line
3745 "
3746 private Method[] getSortedMethods() {
3747 Arrays.sort(_allMethods, new Comparator<Method>() {
3748 @Override
3749 public int compare(Method a, Method b) {
3750 return a.toString().compareTo(b.toString());
3751 }
3752 });
3753 return _allMethods;
3754 }
3755
3756 private Method[] allMethods = getSortedMethods();")))
3757 #t))
3758 (add-before 'build 'do-not-use-bundled-qdox
3759 (lambda* (#:key inputs #:allow-other-keys)
3760 (substitute* "build.xml"
3761 (("lib/generator/qdox-1.12.jar")
3762 (string-append (assoc-ref inputs "java-qdox-1.12")
3763 "/share/java/qdox.jar")))
3764 #t))
3765 ;; build.xml searches for .jar files in this directoy, which
3766 ;; we remove from the source archive.
3767 (add-before 'build 'create-dummy-directories
3768 (lambda _
3769 (mkdir-p "lib/integration")
3770 #t))
3771 (add-before 'build 'create-pom
3772 (lambda _
3773 (substitute* "pom/hamcrest-core.pom"
3774 (("@VERSION@") ,version))
3775 #t))
3776 (replace 'install
3777 (install-from-pom "pom/hamcrest-core.pom")))))
3778 (native-inputs
3779 `(("java-qdox-1.12" ,java-qdox-1.12)
3780 ("java-jarjar" ,java-jarjar)))
3781 (propagated-inputs
3782 `(("java-hamcrest-parent-pom" ,java-hamcrest-parent-pom)))
3783 (home-page "http://hamcrest.org/")
3784 (synopsis "Library of matchers for building test expressions")
3785 (description
3786 "This package provides a library of matcher objects (also known as
3787 constraints or predicates) allowing @code{match} rules to be defined
3788 declaratively, to be used in other frameworks. Typical scenarios include
3789 testing frameworks, mocking libraries and UI validation rules.")
3790 (license license:bsd-2)))
3791
3792 (define java-hamcrest-parent-pom
3793 (package
3794 (inherit java-hamcrest-core)
3795 (name "java-hamcrest-parent-pom")
3796 (propagated-inputs '())
3797 (native-inputs '())
3798 (arguments
3799 `(#:tests? #f
3800 #:phases
3801 (modify-phases %standard-phases
3802 (delete 'configure)
3803 (replace 'build
3804 (lambda _
3805 (substitute* "pom/hamcrest-parent.pom"
3806 (("@VERSION@") ,(package-version java-hamcrest-core)))
3807 #t))
3808 (replace 'install
3809 (install-pom-file "pom/hamcrest-parent.pom")))))))
3810
3811 (define-public java-hamcrest-library
3812 (package
3813 (inherit java-hamcrest-core)
3814 (name "java-hamcrest-library")
3815 (arguments
3816 (substitute-keyword-arguments (package-arguments java-hamcrest-core)
3817 ((#:build-target _) "library")
3818 ((#:phases phases)
3819 `(modify-phases ,phases
3820 (add-after 'unpack 'patch-classpath-for-integration
3821 (lambda* (#:key inputs #:allow-other-keys)
3822 (substitute* "build.xml"
3823 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
3824 (car (find-files (assoc-ref inputs "java-hamcrest-core")
3825 "jar$"))))
3826 #t))
3827 (replace 'create-pom
3828 (lambda _
3829 (substitute* "pom/hamcrest-library.pom"
3830 (("@VERSION@") ,(package-version java-hamcrest-core)))
3831 #t))
3832 (replace 'install
3833 (install-from-pom "pom/hamcrest-library.pom"))))))
3834 (propagated-inputs
3835 `(("java-hamcrest-core" ,java-hamcrest-core)
3836 ("java-hamcrest-parent-pom" ,java-hamcrest-parent-pom)))))
3837
3838 (define-public java-junit
3839 (package
3840 (name "java-junit")
3841 (version "4.12")
3842 (source (origin
3843 (method git-fetch)
3844 (uri (git-reference
3845 (url "https://github.com/junit-team/junit/")
3846 (commit (string-append "r" version))))
3847 (file-name (git-file-name name version))
3848 (sha256
3849 (base32
3850 "1j8avi91px1z8rjc89cfikwrvfifdmmsarwiyrcnr59ynvpz0v8h"))
3851 (modules '((guix build utils)))
3852 (snippet
3853 '(begin
3854 ;; Delete bundled jar archives.
3855 (delete-file-recursively "lib")
3856 #t))))
3857 (build-system ant-build-system)
3858 (arguments
3859 `(#:jar-name "junit.jar"
3860 #:source-dir "src/main/java"
3861 #:test-dir "src/test"
3862 #:test-exclude (list "**/SimpleTest.java" "**/StackTracesTest.java"
3863 "**/RuleChainTest.java" "**/TestWatchmanTest.java")
3864 #:phases
3865 (modify-phases %standard-phases
3866 (add-before 'check 'copy-test-resources
3867 (lambda _
3868 (copy-recursively "src/test/resources" "build/test-classes")
3869 #t))
3870 (replace 'install
3871 (install-from-pom "pom.xml")))))
3872 (propagated-inputs
3873 `(("java-hamcrest-core" ,java-hamcrest-core)))
3874 (native-inputs
3875 `(("java-hamcrest-library" ,java-hamcrest-library)))
3876 (home-page "https://junit.org/junit4/")
3877 (synopsis "Test framework for Java")
3878 (description
3879 "JUnit is a simple framework to write repeatable tests for Java projects.
3880 JUnit provides assertions for testing expected results, test fixtures for
3881 sharing common test data, and test runners for running tests.")
3882 (license license:epl1.0)))
3883
3884 (define-public java-junitparams
3885 (package
3886 (name "java-junitparams")
3887 (version "1.1.1")
3888 (source (origin
3889 (method git-fetch)
3890 (uri (git-reference
3891 (url "https://github.com/Pragmatists/JUnitParams")
3892 (commit (string-append "JUnitParams-" version))))
3893 (file-name (git-file-name name version))
3894 (sha256
3895 (base32
3896 "0rb52xdfp99invyjrras3w0bf0a81cz30yd47rkkiyqcqj0y1q9b"))))
3897 (build-system ant-build-system)
3898 (arguments
3899 `(#:jar-name "junitparams.jar"
3900 #:source-dir "src/main/java"
3901 #:test-dir "src/test"
3902 #:test-exclude (list "**/SuperclassTest.java")))
3903 (inputs
3904 `(("java-junit" ,java-junit)))
3905 (native-inputs
3906 `(("java-junit" ,java-junit)
3907 ("java-hamcrest-core" ,java-hamcrest-core)
3908 ("java-assertj" ,java-assertj)))
3909 (home-page "https://github.com/Pragmatists/JUnitParams")
3910 (synopsis "Parameterised test support for JUnit")
3911 (description "The JUnitParams project adds a new runner to JUnit and
3912 provides much easier and readable parametrised tests for JUnit.")
3913 (license license:asl2.0)))
3914
3915 (define-public java-plexus-utils
3916 (package
3917 (name "java-plexus-utils")
3918 ;; sisu-build-api needs this version, later versions don't work
3919 (version "3.2.1")
3920 (source (origin
3921 (method git-fetch)
3922 (uri (git-reference
3923 (url "https://github.com/codehaus-plexus/plexus-utils")
3924 (commit (string-append "plexus-utils-" version))))
3925 (file-name (git-file-name name version))
3926 (sha256
3927 (base32
3928 "1w169glixyk94jbczj8jzg897lsab46jihiaa3dhw0p06g35va8b"))))
3929 (build-system ant-build-system)
3930 ;; FIXME: The default build.xml does not include a target to install
3931 ;; javadoc files.
3932 (arguments
3933 `(#:jar-name "plexus-utils.jar"
3934 #:source-dir "src/main"
3935 #:phases
3936 (modify-phases %standard-phases
3937 (add-after 'unpack 'fix-reference-to-/bin-and-/usr
3938 (lambda _
3939 (substitute* "src/main/java/org/codehaus/plexus/util/\
3940 cli/shell/BourneShell.java"
3941 (("/bin/sh") (which "sh"))
3942 (("/usr/") (getcwd)))
3943 #t))
3944 (add-after 'unpack 'fix-or-disable-broken-tests
3945 (lambda _
3946 (with-directory-excursion "src/test/java/org/codehaus/plexus/util"
3947 (substitute* '("cli/CommandlineTest.java"
3948 "cli/shell/BourneShellTest.java")
3949 (("/bin/sh") (which "sh"))
3950 (("/bin/echo") (which "echo")))
3951
3952 ;; This test depends on MavenProjectStub, but we don't have
3953 ;; a package for Maven.
3954 (delete-file "introspection/ReflectionValueExtractorTest.java")
3955
3956 ;; FIXME: The command line tests fail, maybe because they use
3957 ;; absolute paths.
3958 (delete-file "cli/CommandlineTest.java")
3959
3960 ;; These tests require openjdk jmh, which is not packaged yet
3961 (for-each delete-file (find-files "." "PerfTest.java$")))
3962 #t))
3963 (add-before 'build 'copy-resources
3964 (lambda _
3965 (copy-recursively "src/main/resources" "build/classes")
3966 #t))
3967 (replace 'install (install-from-pom "pom.xml")))))
3968 (native-inputs
3969 `(("java-hamcrest-core" ,java-hamcrest-core)
3970 ("java-junit" ,java-junit)))
3971 (propagated-inputs
3972 `(("plexus-parent-pom" ,plexus-parent-pom-5.1)))
3973 (home-page "https://codehaus-plexus.github.io/plexus-utils/")
3974 (synopsis "Common utilities for the Plexus framework")
3975 (description "This package provides various Java utility classes for the
3976 Plexus framework to ease working with strings, files, command lines, XML and
3977 more.")
3978 (license license:asl2.0)))
3979
3980 (define-public java-plexus-utils-3.3.0
3981 (package
3982 (inherit java-plexus-utils)
3983 (version "3.3.0")
3984 (source (origin
3985 (method git-fetch)
3986 (uri (git-reference
3987 (url "https://github.com/codehaus-plexus/plexus-utils")
3988 (commit (string-append "plexus-utils-" version))))
3989 (file-name (git-file-name "java-plexus-utils" version))
3990 (sha256
3991 (base32
3992 "0d0fq21rzjy0j55kcp8w9k1rbq9rwr0r7cc8239p9jbz54vihp0g"))))))
3993
3994 (define-public java-plexus-interpolation
3995 (package
3996 (name "java-plexus-interpolation")
3997 (version "1.26")
3998 (source (origin
3999 (method git-fetch)
4000 (uri (git-reference
4001 (url "https://github.com/codehaus-plexus/plexus-interpolation")
4002 (commit (string-append "plexus-interpolation-" version))))
4003 (file-name (git-file-name name version))
4004 (sha256
4005 (base32
4006 "1rahjmhywf6d5m32qzlc9izawyvcd71abfm9k03f13rs2xmfxzlh"))))
4007 (build-system ant-build-system)
4008 (arguments
4009 `(#:jar-name "plexus-interpolation.jar"
4010 #:source-dir "src/main"
4011 #:phases
4012 (modify-phases %standard-phases
4013 (replace 'install (install-from-pom "pom.xml")))))
4014 (propagated-inputs
4015 `(("plexus-parent-pom-5.1" ,plexus-parent-pom-5.1)))
4016 (native-inputs
4017 `(("java-junit" ,java-junit)
4018 ("java-hamcrest-core" ,java-hamcrest-core)))
4019 (home-page "https://codehaus-plexus.github.io/plexus-interpolation/")
4020 (synopsis "Java components for interpolating ${} strings and the like")
4021 (description "Plexus interpolator is a modular, flexible interpolation
4022 framework for the expression language style commonly seen in Maven, Plexus,
4023 and other related projects.
4024
4025 It has its foundation in the @code{org.codehaus.plexus.utils.interpolation}
4026 package within @code{plexus-utils}, but has been separated in order to allow
4027 these two libraries to vary independently of one another.")
4028 (license license:asl2.0)))
4029
4030 (define-public java-plexus-classworlds
4031 (package
4032 (name "java-plexus-classworlds")
4033 (version "2.6.0")
4034 (source (origin
4035 (method git-fetch)
4036 (uri (git-reference
4037 (url "https://github.com/codehaus-plexus/plexus-classworlds")
4038 (commit (string-append "plexus-classworlds-" version))))
4039 (file-name (git-file-name name version))
4040 (sha256
4041 (base32
4042 "034k2hgvj1saalwbnzrbg4n0zgzwcpz1lhlb8q4kgglsp9pmm03s"))))
4043 (build-system ant-build-system)
4044 (arguments
4045 `(#:jar-name "plexus-classworlds.jar"
4046 #:source-dir "src/main"
4047 #:tests? #f;; FIXME: we need to generate some resources as in pom.xml
4048 #:phases
4049 (modify-phases %standard-phases
4050 (replace 'install (install-from-pom "pom.xml")))))
4051 (propagated-inputs
4052 `(("plexus-parent-pom-5.1" ,plexus-parent-pom-5.1)))
4053 (native-inputs
4054 `(("java-junit" ,java-junit)))
4055 (home-page "https://codehaus-plexus.github.io/plexus-classworlds/")
4056 (synopsis "Java class loader framework")
4057 (description "Plexus classworlds replaces the native @code{ClassLoader}
4058 mechanism of Java. It is especially useful for dynamic loading of application
4059 components.")
4060 (license license:asl2.0)))
4061
4062 (define java-plexus-container-default-bootstrap
4063 (package
4064 (name "java-plexus-container-default-bootstrap")
4065 (version "1.7.1")
4066 (source (origin
4067 (method git-fetch)
4068 (uri (git-reference
4069 (url "https://github.com/codehaus-plexus/plexus-containers")
4070 (commit (string-append "plexus-containers-" version))))
4071 (file-name (git-file-name name version))
4072 (sha256
4073 (base32
4074 "1316hrp5vqfv0aw7miq2fp0wwy833h66h502h29vnh5sxj27x228"))))
4075 (build-system ant-build-system)
4076 (arguments
4077 `(#:jar-name "container-default.jar"
4078 #:source-dir "plexus-container-default/src/main/java"
4079 #:test-dir "plexus-container-default/src/test"
4080 #:tests? #f; requires plexus-archiver, which depends on this package
4081 #:phases
4082 (modify-phases %standard-phases
4083 (add-before 'build 'fix-google-collections
4084 (lambda _
4085 ;; Google collections are now replaced with guava
4086 (substitute* "plexus-container-default/pom.xml"
4087 (("google-collections") "guava")
4088 (("com.google.collections") "com.google.guava"))
4089 #t))
4090 (add-before 'build 'copy-resources
4091 (lambda _
4092 (copy-recursively
4093 "plexus-container-default/src/main/resources/"
4094 "build/classes")
4095 #t))
4096 (replace 'install
4097 (install-from-pom "plexus-container-default/pom.xml")))))
4098 (propagated-inputs
4099 `(("java-plexus-worldclass" ,java-plexus-classworlds)
4100 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4101 ("java-plexus-utils" ,java-plexus-utils)
4102 ("java-junit" ,java-junit)
4103 ("java-guava" ,java-guava)
4104 ("java-plexus-containers-parent-pom" ,java-plexus-containers-parent-pom)))
4105 (home-page "https://github.com/codehaus-plexus/plexus-containers")
4106 (synopsis "Inversion-of-control container")
4107 (description "Plexus-default-container is Plexus' inversion-of-control
4108 (@dfn{IoC}) container. It is composed of its public API and its default
4109 implementation.")
4110 (license license:asl2.0)))
4111
4112 (define java-plexus-containers-parent-pom
4113 (package
4114 (inherit java-plexus-container-default-bootstrap)
4115 (name "java-plexus-containers-parent-pom")
4116 (arguments
4117 `(#:tests? #f
4118 #:phases
4119 (modify-phases %standard-phases
4120 (delete 'configure)
4121 (delete 'build)
4122 (replace 'install
4123 (install-pom-file "pom.xml")))))
4124 (propagated-inputs
4125 `(("plexus-parent-pom" ,plexus-parent-pom-4.0)))))
4126
4127 (define-public java-plexus-io
4128 (package
4129 (name "java-plexus-io")
4130 (version "3.2.0")
4131 (source (origin
4132 (method git-fetch)
4133 (uri (git-reference
4134 (url "https://github.com/codehaus-plexus/plexus-io")
4135 (commit (string-append "plexus-io-" version))))
4136 (file-name (git-file-name name version))
4137 (sha256
4138 (base32
4139 "1r3wqfpbxq8vp4p914i8p88r0994rmcjw02hz14n11cfb6gsyvlr"))))
4140 (build-system ant-build-system)
4141 (arguments
4142 `(#:jar-name "plexus-io.jar"
4143 #:source-dir "src/main/java"
4144 #:test-dir "src/test"
4145 #:phases
4146 (modify-phases %standard-phases
4147 (add-before 'build 'copy-resources
4148 (lambda _
4149 (mkdir-p "build/classes")
4150 (copy-recursively "src/main/resources" "build/classes")
4151 (mkdir-p "build/test-classes")
4152 (copy-recursively "src/test/resources" "build/test-classes")
4153 #t))
4154 (replace 'install (install-from-pom "pom.xml")))))
4155 (propagated-inputs
4156 `(("java-plexus-utils" ,java-plexus-utils-3.3.0)
4157 ("java-commons-io" ,java-commons-io)
4158 ("plexus-parent-pom" ,plexus-parent-pom-5.1)))
4159 (inputs
4160 `(("java-jsr305" ,java-jsr305)))
4161 (native-inputs
4162 `(("junit" ,java-junit)
4163 ("hamcrest" ,java-hamcrest-core)
4164 ("guava" ,java-guava)
4165 ("classworlds" ,java-plexus-classworlds)
4166 ("xbean" ,java-geronimo-xbean-reflect)
4167 ("container-default" ,java-plexus-container-default-bootstrap)))
4168 (home-page "https://github.com/codehaus-plexus/plexus-io")
4169 (synopsis "I/O plexus components")
4170 (description "Plexus IO is a set of plexus components, which are designed
4171 for use in I/O operations. This implementation using plexus components allows
4172 reusing it in maven.")
4173 (license license:asl2.0)))
4174
4175 (define-public java-plexus-archiver
4176 (package
4177 (name "java-plexus-archiver")
4178 (version "4.2.2")
4179 (source (origin
4180 (method url-fetch)
4181 (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver"
4182 "/archive/plexus-archiver-" version ".tar.gz"))
4183 (sha256
4184 (base32
4185 "144n971r3lfrx3l12nf2scm80x4xdvgbkk4bjpa4vcvvdrll6qys"))))
4186 (build-system ant-build-system)
4187 (arguments
4188 `(#:jar-name "plexus-archiver.jar"
4189 #:source-dir "src/main/java"
4190 #:test-dir "src/test"
4191 #:test-exclude (list "**/Abstract*.java" "**/Base*.java")
4192 #:phases
4193 (modify-phases %standard-phases
4194 (add-before 'check 'remove-failing
4195 (lambda _
4196 ;; Requires an older version of plexus container
4197 (delete-file
4198 "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java")
4199 #t))
4200 (add-before 'check 'fix-test-building
4201 (lambda _
4202 (substitute* "build.xml"
4203 (("srcdir=\"src/test\"") "srcdir=\"src/test/java\""))
4204 #t))
4205 (add-before 'build 'copy-resources
4206 (lambda _
4207 (mkdir-p "build/classes")
4208 (copy-recursively "src/main/resources" "build/classes")
4209 (mkdir-p "build/test-classes")
4210 (copy-recursively "src/test/resources" "build/test-classes")
4211 #t))
4212 (replace 'install (install-from-pom "pom.xml")))))
4213 (propagated-inputs
4214 `(("java-plexus-utils" ,java-plexus-utils-3.3.0)
4215 ("java-plexus-io" ,java-plexus-io)
4216 ("java-iq80-snappy" ,java-iq80-snappy)
4217 ("java-commons-compress" ,java-commons-compress)
4218 ("plexus-parent-pom" ,plexus-parent-pom-6.1)))
4219 (inputs
4220 `(("java-jsr305" ,java-jsr305)
4221 ("java-plexus-container-default"
4222 ,java-plexus-container-default-bootstrap)))
4223 (native-inputs
4224 `(("java-hamcrest-core" ,java-hamcrest-core)
4225 ("junit" ,java-junit)
4226 ("classworld" ,java-plexus-classworlds)
4227 ("xbean" ,java-geronimo-xbean-reflect)
4228 ("xz" ,java-xz)
4229 ("guava" ,java-guava)))
4230 (home-page "https://github.com/codehaus-plexus/plexus-archiver")
4231 (synopsis "Archiver component of the Plexus project")
4232 (description "Plexus-archiver contains a component to deal with project
4233 archives (jar).")
4234 (license license:asl2.0)))
4235
4236 (define-public java-plexus-container-default
4237 (package
4238 (inherit java-plexus-container-default-bootstrap)
4239 (name "java-plexus-container-default")
4240 (arguments
4241 `(#:jar-name "container-default.jar"
4242 #:source-dir "plexus-container-default/src/main/java"
4243 #:test-dir "plexus-container-default/src/test"
4244 #:test-exclude (list ;"**/*Test.java"
4245 "**/Abstract*.java"
4246 ;; Requires plexus-hierarchy
4247 "**/PlexusHierarchyTest.java"
4248 ;; Failures
4249 "**/ComponentRealmCompositionTest.java"
4250 "**/PlexusContainerTest.java")
4251 #:phases
4252 (modify-phases %standard-phases
4253 (add-before 'build 'fix-google-collections
4254 (lambda _
4255 ;; Google collections are now replaced with guava
4256 (substitute* "plexus-container-default/pom.xml"
4257 (("google-collections") "guava")
4258 (("com.google.collections") "com.google.guava"))
4259 #t))
4260 (add-before 'build 'copy-resources
4261 (lambda _
4262 (copy-recursively
4263 "plexus-container-default/src/main/resources/"
4264 "build/classes")
4265 #t))
4266 (add-before 'check 'fix-paths
4267 (lambda _
4268 (let ((dir "plexus-container-default/src/test/java/org/codehaus"))
4269 (substitute*
4270 (string-append
4271 dir "/plexus/component/composition/"
4272 "ComponentRealmCompositionTest.java")
4273 (("src/test") "plexus-container-default/src/test"))
4274 #t)))
4275 (replace 'install
4276 (install-from-pom "plexus-container-default/pom.xml")))))
4277 (inputs
4278 `(("worldclass" ,java-plexus-classworlds)
4279 ("xbean" ,java-geronimo-xbean-reflect)
4280 ("utils" ,java-plexus-utils)
4281 ("junit" ,java-junit)
4282 ("guava" ,java-guava)))
4283 (native-inputs
4284 `(("archiver" ,java-plexus-archiver)
4285 ("hamcrest" ,java-hamcrest-core)))))
4286
4287 (define-public java-plexus-component-annotations
4288 (package
4289 (inherit java-plexus-container-default)
4290 (name "java-plexus-component-annotations")
4291 (arguments
4292 `(#:jar-name "plexus-component-annotations.jar"
4293 #:source-dir "plexus-component-annotations/src/main/java"
4294 #:tests? #f; no tests
4295 #:phases
4296 (modify-phases %standard-phases
4297 (replace 'install
4298 (install-from-pom "plexus-component-annotations/pom.xml")))))
4299 (propagated-inputs
4300 `(("java-plexus-containers-parent-pom" ,java-plexus-containers-parent-pom)))
4301 (inputs '())
4302 (native-inputs '())
4303 (synopsis "Plexus descriptors generator")
4304 (description "This package is a Maven plugin to generate Plexus descriptors
4305 from source tags and class annotations.")))
4306
4307 (define-public java-plexus-component-metadata
4308 (package
4309 (inherit java-plexus-container-default)
4310 (name "java-plexus-component-metadata")
4311 (arguments
4312 `(#:jar-name "plexus-component-metadata.jar"
4313 #:source-dir "src/main/java"
4314 #:test-dir "src/test"
4315 #:jdk ,icedtea-8
4316 #:phases
4317 (modify-phases %standard-phases
4318 (add-before 'configure 'chdir
4319 (lambda _
4320 (chdir "plexus-component-metadata")
4321 #t))
4322 (add-before 'build 'copy-resources
4323 (lambda _
4324 (copy-recursively "src/main/resources"
4325 "build/classes/")
4326 #t)))))
4327 (propagated-inputs
4328 `(("java-plexus-container-default" ,java-plexus-container-default)
4329 ("java-plexu-component-annotations" ,java-plexus-component-annotations)
4330 ("java-plexus-utils" ,java-plexus-utils)
4331 ("java-plexus-cli" ,java-plexus-cli)
4332 ("java-plexus-classworlds" ,java-plexus-classworlds)
4333 ("maven-plugin-api" ,maven-plugin-api)
4334 ("maven-plugin-annotations" ,maven-plugin-annotations)
4335 ("maven-core-bootstrap" ,maven-core-bootstrap)
4336 ("maven-model" ,maven-model)
4337 ("java-commons-cli" ,java-commons-cli)
4338 ("java-qdox" ,java-qdox)
4339 ("java-jdom2" ,java-jdom2)
4340 ("java-asm" ,java-asm)))
4341 (native-inputs
4342 `(("java-junit" ,java-junit)
4343 ("java-guava" ,java-guava)
4344 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)))
4345 (synopsis "Inversion-of-control container for Maven")
4346 (description "The Plexus project provides a full software stack for creating
4347 and executing software projects. Based on the Plexus container, the
4348 applications can utilise component-oriented programming to build modular,
4349 reusable components that can easily be assembled and reused. This package
4350 provides the Maven plugin generating the component metadata.")))
4351
4352 (define-public java-plexus-cipher
4353 (package
4354 (name "java-plexus-cipher")
4355 (version "1.7")
4356 (source (origin
4357 (method git-fetch)
4358 (uri (git-reference
4359 (url "https://github.com/codehaus-plexus/plexus-cipher")
4360 (commit (string-append "plexus-cipher-" version))))
4361 (file-name (git-file-name name version))
4362 (sha256
4363 (base32
4364 "0m638nzlxbmnbcj5cwdpgs326ab584yv0k803zlx37r6iqwvf6b0"))))
4365 (build-system ant-build-system)
4366 (arguments
4367 `(#:jar-name "plexus-cipher.jar"
4368 #:source-dir "src/main/java"
4369 #:tests? #f; FIXME: requires sisu-inject-bean
4370 #:phases
4371 (modify-phases %standard-phases
4372 (add-before 'build 'copy-resources
4373 (lambda _
4374 (copy-recursively "src/main/resources" "build/classes")
4375 (mkdir-p "build/classes/META-INF/sisu")
4376 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
4377 (lambda _
4378 (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
4379 #t))
4380 (add-before 'install 'fix-test-dependency
4381 (lambda _
4382 ;; sisu-inject-bean is only used for tests, but its scope is "provided".
4383 (substitute* "pom.xml"
4384 (("provided") "test"))
4385 #t))
4386 (replace 'install (install-from-pom "pom.xml")))))
4387 (inputs
4388 `(("java-cdi-api" ,java-cdi-api)
4389 ("java-javax-inject" ,java-javax-inject)))
4390 (propagated-inputs
4391 `(("java-sonatype-spice-parent-pom" ,java-sonatype-spice-parent-pom-15)))
4392 (native-inputs
4393 `(("java-junit" ,java-junit)))
4394 (home-page "https://github.com/sonatype/plexus-cipher")
4395 (synopsis "Encryption/decryption Component")
4396 (description "Plexus-cipher contains a component to deal with encryption
4397 and decryption.")
4398 (license license:asl2.0)))
4399
4400 (define-public java-plexus-java
4401 (package
4402 (name "java-plexus-java")
4403 (version "0.9.10")
4404 (source (origin
4405 (method git-fetch)
4406 (uri (git-reference
4407 (url "https://github.com/codehaus-plexus/plexus-languages")
4408 (commit (string-append "plexus-languages-" version))))
4409 (file-name (git-file-name name version))
4410 (sha256
4411 (base32
4412 "0vmvgq5hfxs90yyxgssfpwq78l7vwx1ljwpkk594mrdr8sm668b5"))
4413 (modules '((guix build utils)))
4414 (snippet
4415 `(begin
4416 (for-each delete-file (find-files "." ".*.jar$"))
4417 #t))))
4418 (build-system ant-build-system)
4419 (arguments
4420 `(#:jar-name "plexus-java.java"
4421 #:source-dir "plexus-java/src/main/java"
4422 #:test-dir "plexus-java/src/test"
4423 #:tests? #f; require mockito 2
4424 #:phases
4425 (modify-phases %standard-phases
4426 (add-after 'build 'generate-metadata
4427 (lambda _
4428 (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes")
4429 "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli"
4430 "--source" "plexus-java/src/main/java"
4431 "--output" "build/classes/META-INF/plexus/components.xml"
4432 "--classes" "build/classes"
4433 "--descriptors" "build/classes/META-INF")
4434 (invoke "ant" "jar")
4435 #t))
4436 (add-before 'install 'install-parent
4437 (install-pom-file "pom.xml"))
4438 (replace 'install
4439 (install-from-pom "plexus-java/pom.xml")))))
4440 (propagated-inputs
4441 `(("java-asm" ,java-asm)
4442 ("java-qdox" ,java-qdox-2-M9)
4443 ("java-javax-inject" ,java-javax-inject)
4444 ("plexus-parent-pom" ,plexus-parent-pom-4.0)))
4445 (inputs
4446 `(("java-plexus-component-annotations" ,java-plexus-component-annotations)))
4447 (native-inputs
4448 `(("java-plexus-component-metadata" ,java-plexus-component-metadata)
4449 ("java-junit" ,java-junit)))
4450 (home-page "https://codehaus-plexus.github.io/plexus-languages/plexus-java")
4451 (synopsis "Shared language features for Java")
4452 (description "This package contains shared language features of the Java
4453 language, for the plexus project.")
4454 (license license:asl2.0)))
4455
4456 (define-public java-plexus-compiler-api
4457 (package
4458 (name "java-plexus-compiler-api")
4459 (version "2.8.4")
4460 (source (origin
4461 (method git-fetch)
4462 (uri (git-reference
4463 (url "https://github.com/codehaus-plexus/plexus-compiler")
4464 (commit (string-append "plexus-compiler-" version))))
4465 (file-name (git-file-name name version))
4466 (sha256
4467 (base32
4468 "1nq1gnn3s6z1j29gmi1hqbklsmm8b1lmnafb0191914f95mn18gk"))))
4469 (build-system ant-build-system)
4470 (arguments
4471 `(#:jar-name "plexus-compiler-api.jar"
4472 #:source-dir "plexus-compiler-api/src/main/java"
4473 #:test-dir "plexus-compiler-api/src/test"
4474 #:phases
4475 (modify-phases %standard-phases
4476 (replace 'install
4477 (install-from-pom "plexus-compiler-api/pom.xml")))))
4478 (propagated-inputs
4479 `(("java-plexus-container-default" ,java-plexus-container-default)
4480 ("java-plexus-compiler-pom" ,java-plexus-compiler-pom)
4481 ("java-plexus-util" ,java-plexus-utils)))
4482 (native-inputs
4483 `(("java-junit" ,java-junit)))
4484 (home-page "https://github.com/codehaus-plexus/plexus-compiler")
4485 (synopsis "Plexus Compilers component's API to manipulate compilers")
4486 (description "This package contains the API used by components to manipulate
4487 compilers.")
4488 (license (list license:asl2.0
4489 license:expat))))
4490
4491 (define java-plexus-compiler-pom
4492 (package
4493 (inherit java-plexus-compiler-api)
4494 (name "java-plexus-compiler-pom")
4495 (arguments
4496 `(#:tests? #f
4497 #:phases
4498 (modify-phases %standard-phases
4499 (delete 'configure)
4500 (delete 'build)
4501 (replace 'install
4502 (install-pom-file "pom.xml"))
4503 (add-after 'install 'install-compilers
4504 (install-pom-file "plexus-compilers/pom.xml")))))
4505 (propagated-inputs
4506 `(("plexus-components-parent-pom-4.0" ,plexus-components-parent-pom-4.0)))))
4507
4508 (define plexus-components-parent-pom-4.0
4509 (package
4510 (name "plexus-components-parent-pom")
4511 (version "4.0")
4512 (source (origin
4513 (method git-fetch)
4514 (uri (git-reference
4515 (url "https://github.com/codehaus-plexus/plexus-components")
4516 (commit (string-append "plexus-components-" version))))
4517 (file-name (git-file-name name version))
4518 (sha256
4519 (base32
4520 "041bm8yv0m2i17mqg8zljib4ykpha7ijls2qfdwvkma4d39lhysi"))))
4521 (build-system ant-build-system)
4522 (arguments
4523 `(#:tests? #f
4524 #:phases
4525 (modify-phases %standard-phases
4526 (delete 'configure)
4527 (delete 'build)
4528 (replace 'install
4529 (install-pom-file "pom.xml")))))
4530 (propagated-inputs
4531 `(("plexus-parent-pom-4.0" ,plexus-parent-pom-4.0)))
4532 (home-page "https://codehaus-plexus.github.io/plexus-components")
4533 (synopsis "Plexus parent pom")
4534 (description "This package contains the Plexus components parent POM.")
4535 (license license:asl2.0)))
4536
4537 (define-public java-plexus-compiler-manager
4538 (package
4539 (inherit java-plexus-compiler-api)
4540 (name "java-plexus-compiler-manager")
4541 (arguments
4542 `(#:jar-name "compiler-compiler-manager.java"
4543 #:source-dir "plexus-compiler-manager/src/main/java"
4544 #:test-dir "plexus-compiler-manager/src/test"
4545 #:tests? #f
4546 #:phases
4547 (modify-phases %standard-phases
4548 (add-after 'build 'generate-metadata
4549 (lambda _
4550 (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes")
4551 "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli"
4552 "--source" "plexus-compiler-manager/src/main/java"
4553 "--output" "build/classes/META-INF/plexus/components.xml"
4554 "--classes" "build/classes"
4555 "--descriptors" "build/classes/META-INF")
4556 (invoke "ant" "jar")
4557 #t))
4558 (add-after 'generate-metadata 'rebuild
4559 (lambda _
4560 (invoke "ant" "jar")
4561 #t))
4562 (replace 'install
4563 (install-from-pom "plexus-compiler-manager/pom.xml")))))
4564 (propagated-inputs
4565 `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
4566 ("java-plexus-compiler-pom" ,java-plexus-compiler-pom)
4567 ("java-plexus-container-default" ,java-plexus-container-default)))
4568 (native-inputs
4569 `(("unzip" ,unzip)
4570 ("java-plexus-component-metadata" ,java-plexus-component-metadata)))
4571 (synopsis "Compiler management for Plexus Compiler component")
4572 (description "Plexus Compiler is a Plexus component to use different
4573 compilers through a uniform API. This component chooses the compiler
4574 implementation to use in a project.")))
4575
4576 (define-public java-plexus-compiler-javac
4577 (package
4578 (inherit java-plexus-compiler-api)
4579 (name "java-plexus-compiler-javac")
4580 (arguments
4581 `(#:jar-name "plexus-compiler-javac.jar"
4582 #:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java"
4583 #:jdk ,icedtea-8
4584 #:tests? #f; depends on compiler-test -> maven-core -> ... -> this package.
4585 #:test-dir "plexus-compilers/plexus-compiler-javac/src/test"
4586 #:modules ((guix build ant-build-system)
4587 (guix build utils)
4588 (guix build java-utils)
4589 (sxml simple))
4590 #:phases
4591 (modify-phases %standard-phases
4592 ;; We cannot use java-plexus-component-metadata to generate the metadata
4593 ;; because it ultimately depends on this package.
4594 ;; Create it manually instead
4595 (add-before 'build 'create-metadata
4596 (lambda _
4597 (let* ((dir "build/classes/META-INF/plexus")
4598 (file (string-append dir "/components.xml")))
4599 (mkdir-p dir)
4600 (with-output-to-file file
4601 (lambda _
4602 (sxml->xml
4603 `(component-set
4604 (components
4605 (component
4606 (role "org.codehaus.plexus.compiler.Compiler")
4607 (role-hint "javac")
4608 (implementation "org.codehaus.plexus.compiler.javac.JavacCompiler")
4609 (isolated-realm "false"))))))))
4610 #t))
4611 (replace 'install
4612 (install-from-pom "plexus-compilers/plexus-compiler-javac/pom.xml")))))
4613 (propagated-inputs
4614 `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
4615 ("java-plexus-utils" ,java-plexus-utils)
4616 ("java-plexus-container-default" ,java-plexus-container-default)))
4617 (synopsis "Javac Compiler support for Plexus Compiler component")
4618 (description "This package contains the Javac Compiler support for Plexus
4619 Compiler component.")))
4620
4621 (define plexus-components-pom-1.1.20
4622 (package
4623 (name "plexus-components-pom-1.1.20")
4624 (version "1.1.20")
4625 (source (origin
4626 (method git-fetch)
4627 (uri (git-reference
4628 (url "https://github.com/codehaus-plexus/plexus-components")
4629 (commit (string-append "plexus-components-" version))))
4630 (file-name (git-file-name name version))
4631 (sha256
4632 (base32
4633 "1q254k95m9icyfsvaw8c226midg8v6v436wvivhv7im825mnp5yb"))))
4634 (build-system ant-build-system)
4635 (arguments
4636 `(#:tests? #f
4637 #:phases
4638 (modify-phases %standard-phases
4639 (delete 'configure)
4640 (delete 'build)
4641 (replace 'install
4642 (install-pom-file "pom.xml")))))
4643 (propagated-inputs
4644 `(("plexus-parent-pom" ,plexus-parent-pom-3.1)))
4645 (home-page "https://github.com/codehaus-plexus/plexus-components")
4646 (synopsis "Maven parent pom for plexus packages")
4647 (description "This package contains the parent pom for plexus component
4648 packages.")
4649 (license license:asl2.0)))
4650
4651 (define-public java-plexus-digest
4652 (package
4653 (name "java-plexus-digest")
4654 (version "1.2")
4655 (source (origin
4656 (method git-fetch)
4657 (uri (git-reference
4658 (url "https://github.com/codehaus-plexus/plexus-digest")
4659 (commit "2a52ad1bda8297fa0e287163d2fa37245ec6a430")))
4660 (file-name (git-file-name name version))
4661 (sha256
4662 (base32
4663 "19w5wxsliz8r42niry68qa665kvjsb8081dazg9vgd3pca72w07x"))))
4664 (build-system ant-build-system)
4665 (arguments
4666 `(#:jar-name "plexus-digest.jar"
4667 #:source-dir "src/main/java"
4668 #:tests? #f
4669 #:phases
4670 (modify-phases %standard-phases
4671 (replace 'install
4672 (install-from-pom "pom.xml")))))
4673 (propagated-inputs
4674 `(("java-plexus-utils" ,java-plexus-utils)
4675 ("plexus-components-pom-1.1.20" ,plexus-components-pom-1.1.20)))
4676 (native-inputs
4677 `(("java-junit" ,java-junit)))
4678 (home-page "https://github.com/codehaus-plexus/plexus-digest")
4679 (synopsis "Hash function utilities for Java")
4680 (description "This package is a plexus component that contains hash
4681 function utilities.")
4682 (license license:asl2.0)))
4683
4684 (define-public java-plexus-sec-dispatcher
4685 (package
4686 (name "java-plexus-sec-dispatcher")
4687 (version "1.4") ;; Newest release listed at the Maven Central Repository.
4688 (source (origin
4689 ;; This project doesn't tag releases or publish tarballs, so we take
4690 ;; the "prepare release plexus-sec-dispatcher-1.4" git commit.
4691 (method git-fetch)
4692 (uri (git-reference
4693 (url "https://github.com/sonatype/plexus-sec-dispatcher/")
4694 (commit "7db8f880486e192a1c5ea9544e01e756c3d49d0f")))
4695 (sha256
4696 (base32
4697 "1ng4yliy4cqpjr4fxxjbpwyk1wkch5f8vblm1kvwf328s4gibszs"))
4698 (file-name (git-file-name name version))))
4699 (arguments
4700 `(#:jar-name "plexus-sec-dispatcher.jar"
4701 #:source-dir "src/main/java"
4702 #:phases
4703 (modify-phases %standard-phases
4704 (add-before 'build 'generate-models
4705 (lambda* (#:key inputs #:allow-other-keys)
4706 (define (modello-single-mode file version mode)
4707 (invoke "java"
4708 "org.codehaus.modello.ModelloCli"
4709 file mode "src/main/java" version
4710 "false" "true"))
4711 (let ((file "src/main/mdo/settings-security.mdo"))
4712 (modello-single-mode file "1.0.0" "java")
4713 (modello-single-mode file "1.0.0" "xpp3-reader")
4714 (modello-single-mode file "1.0.0" "xpp3-writer"))
4715 #t))
4716 (add-before 'build 'generate-components.xml
4717 (lambda _
4718 (mkdir-p "build/classes/META-INF/plexus")
4719 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
4720 (lambda _
4721 (display
4722 "<component-set>\n
4723 <components>\n
4724 <component>\n
4725 <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n
4726 <role-hint>default</role-hint>\n
4727 <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n
4728 <description></description>\n
4729 <requirements>\n
4730 <requirement>\n
4731 <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n
4732 <field-name>_cipher</field-name>\n
4733 </requirement>\n
4734 <requirement>\n
4735 <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n
4736 <field-name>_decryptors</field-name>\n
4737 </requirement>\n
4738 </requirements>\n
4739 <configuration>\n
4740 <_configuration-file>~/.settings-security.xml</_configuration-file>\n
4741 </configuration>\n
4742 </component>\n
4743 </components>\n
4744 </component-set>\n")))
4745 #t))
4746 (add-before 'check 'fix-paths
4747 (lambda _
4748 (copy-recursively "src/test/resources" "target")
4749 #t))
4750 (replace 'install (install-from-pom "pom.xml")))))
4751 (propagated-inputs
4752 `(("java-plexus-utils" ,java-plexus-utils)
4753 ("java-plexus-cipher" ,java-plexus-cipher)
4754 ("java-sonatype-spice-parent-pom" ,java-sonatype-spice-parent-pom-12)))
4755 (native-inputs
4756 `(("java-modello-core" ,java-modello-core)
4757 ;; for modello:
4758 ("java-plexus-container-default" ,java-plexus-container-default)
4759 ("java-plexus-classworlds" ,java-plexus-classworlds)
4760 ("java-plexus-utils" ,java-plexus-utils)
4761 ("java-guava" ,java-guava)
4762 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4763 ("java-sisu-build-api" ,java-sisu-build-api)
4764 ;; modello plugins:
4765 ("java-modellop-plugins-java" ,java-modello-plugins-java)
4766 ("java-modellop-plugins-xml" ,java-modello-plugins-xml)
4767 ("java-modellop-plugins-xpp3" ,java-modello-plugins-xpp3)
4768 ;; for tests
4769 ("java-junit" ,java-junit)))
4770 (build-system ant-build-system)
4771 (home-page "https://github.com/sonatype/plexus-sec-dispatcher")
4772 (synopsis "Plexus Security Dispatcher Component")
4773 (description "This package is the Plexus Security Dispatcher Component.
4774 This component decrypts a string passed to it.")
4775 (license license:asl2.0)))
4776
4777 (define-public java-plexus-cli
4778 (package
4779 (name "java-plexus-cli")
4780 (version "1.7")
4781 (source (origin
4782 (method git-fetch)
4783 (uri (git-reference
4784 (url "https://github.com/sonatype/plexus-cli")
4785 (commit "a776afa6bca84e5107bedb69440329cdb24ed645")))
4786 (file-name (string-append name "-" version))
4787 (sha256
4788 (base32
4789 "0xjrlay605rypv3zd7y24vlwf0039bil3n2cqw54r1ddpysq46vx"))))
4790 (build-system ant-build-system)
4791 (arguments
4792 `(#:jar-name "plexus-cli.jar"
4793 #:source-dir "src/main/java"
4794 #:jdk ,icedtea-8
4795 #:test-dir "src/test"))
4796 (inputs
4797 `(("java-commons-cli" ,java-commons-cli)
4798 ("java-plexus-container-default" ,java-plexus-container-default)
4799 ("java-plexus-classworlds" ,java-plexus-classworlds)))
4800 (native-inputs
4801 `(("java-plexus-utils" ,java-plexus-utils)
4802 ("java-junit" ,java-junit)
4803 ("java-guava" ,java-guava)))
4804 (home-page "https://codehaus-plexus.github.io/plexus-cli")
4805 (synopsis "CLI building library for plexus")
4806 (description "This package is a library to help creating CLI around
4807 Plexus components.")
4808 (license license:asl2.0)))
4809
4810 (define-public java-sisu-build-api
4811 (package
4812 (name "java-sisu-build-api")
4813 (version "0.0.7")
4814 (source (origin
4815 (method git-fetch)
4816 (uri (git-reference
4817 (url "https://github.com/sonatype/sisu-build-api")
4818 (commit (string-append "plexus-build-api-" version))))
4819 (file-name (git-file-name name version))
4820 (sha256
4821 (base32
4822 "1d5w6c58gkx30d51v7qwv1xrhc0ly76848gihmgshj19yf6yhca0"))))
4823 (build-system ant-build-system)
4824 (arguments
4825 `(#:jar-name "sisu-build-api.jar"
4826 #:source-dir "src/main/java"
4827 #:jdk ,icedtea-8
4828 #:tests? #f; FIXME: how to run the tests?
4829 #:phases
4830 (modify-phases %standard-phases
4831 (add-before 'build 'copy-resources
4832 (lambda _
4833 (copy-recursively "src/main/resources" "build/classes")
4834 (substitute* (find-files "build/classes")
4835 (("\\$\\{project.version\\}") ,version))
4836 #t))
4837 (add-before 'build 'generate-plexus-compontent
4838 (lambda _
4839 (mkdir-p "build/classes/META-INF/plexus")
4840 ;; This file is required for plexus to inject this package.
4841 ;; FIXME: how is it generated?
4842 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
4843 (lambda _
4844 (display
4845 "<component-set>\n
4846 <components>\n
4847 <component>\n
4848 <role>org.sonatype.plexus.build.incremental.BuildContext</role>\n
4849 <role-hint>default</role-hint>\n
4850 <implementation>org.sonatype.plexus.build.incremental.DefaultBuildContext</implementation>\n
4851 <description>Filesystem based non-incremental build context implementation\n
4852 which behaves as if all files were just created.</description>\n
4853 </component>\n
4854 </components>\n
4855 </component-set>\n")))
4856 #t))
4857 (replace 'install
4858 (install-from-pom "pom.xml")))))
4859 (inputs
4860 `(("java-plexus-utils" ,java-plexus-utils)
4861 ("java-plexus-container-default" ,java-plexus-container-default)))
4862 (home-page "https://github.com/sonatype/sisu-build-api/")
4863 (synopsis "Base build API for maven")
4864 (description "This package contains the base build API for maven and
4865 a default implementation of it. This API is about scanning files in a
4866 project and determining what files need to be rebuilt.")
4867 (license license:asl2.0)))
4868
4869 (define-public java-modello-core
4870 (package
4871 (name "java-modello-core")
4872 (version "1.9.1")
4873 (source (origin
4874 (method git-fetch)
4875 (uri (git-reference
4876 (url "https://github.com/codehaus-plexus/modello")
4877 (commit (string-append "modello-" version))))
4878 (file-name (git-file-name name version))
4879 (sha256
4880 (base32
4881 "1di6ni42aqllpdvkpyfcw70352vr2i8wf6hd5nhd9kmqjb5dj5j4"))))
4882 (build-system ant-build-system)
4883 (arguments
4884 `(#:jar-name "modello-core.jar"
4885 #:source-dir "modello-core/src/main/java"
4886 #:test-dir "modello-core/src/test"
4887 #:main-class "org.codehaus.modello.ModelloCli"
4888 #:jdk ,icedtea-8
4889 #:phases
4890 (modify-phases %standard-phases
4891 (add-before 'build 'copy-resources
4892 (lambda _
4893 (mkdir-p "build/classes/META-INF/plexus")
4894 (copy-file "modello-core/src/main/resources/META-INF/plexus/components.xml"
4895 "build/classes/META-INF/plexus/components.xml")
4896 #t))
4897 (add-before 'check 'fix-tests
4898 (lambda _
4899 (with-directory-excursion "modello-core/src/test/java/org/codehaus"
4900 (substitute* '("modello/core/DefaultModelloCoreTest.java"
4901 "modello/core/io/ModelReaderTest.java")
4902 (("src/test") "modello-core/src/test")))
4903 #t)))))
4904 (propagated-inputs
4905 `(("java-plexus-utils" ,java-plexus-utils)
4906 ("java-plexus-container-default" ,java-plexus-container-default)
4907 ("java-sisu-build-api" ,java-sisu-build-api)))
4908 (native-inputs
4909 `(("java-junit" ,java-junit)
4910 ("java-plexus-classworlds" ,java-plexus-classworlds)
4911 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4912 ("java-guava" ,java-guava)))
4913 (home-page "https://codehaus-plexus.github.io/modello/")
4914 (synopsis "Framework for code generation from a simple model")
4915 (description "Modello is a framework for code generation from a simple model.
4916
4917 Modello generates code from a simple model format: based on a plugin
4918 architecture, various types of code and descriptors can be generated from the
4919 single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers,
4920 XSD and documentation.")
4921 (license (list
4922 license:expat
4923 ;; Although this package uses only files licensed under expat,
4924 ;; other parts of the source are licensed under different
4925 ;; licenses. We include them to be inherited by other packages.
4926 license:asl2.0
4927 ;; Some files in modello-plugin-java are licensed under a
4928 ;; 5-clause BSD license.
4929 (license:non-copyleft
4930 (string-append "file:///modello-plugins/modello-plugin-java/"
4931 "src/main/java/org/codehaus/modello/plugin/"
4932 "java/javasource/JNaming.java"))))))
4933
4934 (define-public java-modello-plugins-java
4935 (package
4936 (inherit java-modello-core)
4937 (name "java-modello-plugins-java")
4938 (arguments
4939 `(#:jar-name "modello-plugins-java.jar"
4940 #:source-dir "modello-plugins/modello-plugin-java/src/main/java"
4941 #:test-dir "modello-plugins/modello-plugin-java/src/test"
4942 #:jdk ,icedtea-8
4943 #:tests? #f; requires maven-model, which depends on this package
4944 #:phases
4945 (modify-phases %standard-phases
4946 (add-before 'build 'copy-resources
4947 (lambda _
4948 (mkdir-p "build/classes")
4949 (copy-recursively "modello-plugins/modello-plugin-java/src/main/resources"
4950 "build/classes")
4951 #t)))))
4952 (inputs
4953 `(("java-modello-core" ,java-modello-core)))
4954 (synopsis "Modello Java Plugin")
4955 (description "Modello Java Plugin generates Java objects for the model.")))
4956
4957 (define-public java-modello-plugins-xml
4958 (package
4959 (inherit java-modello-core)
4960 (name "java-modello-plugins-xml")
4961 (arguments
4962 `(#:jar-name "modello-plugins-xml.jar"
4963 #:source-dir "modello-plugins/modello-plugin-xml/src/main/java"
4964 #:test-dir "modello-plugins/modello-plugin-xml/src/test"
4965 #:jdk ,icedtea-8
4966 #:phases
4967 (modify-phases %standard-phases
4968 (add-before 'build 'copy-resources
4969 (lambda _
4970 (mkdir-p "build/classes")
4971 (copy-recursively
4972 "modello-plugins/modello-plugin-xml/src/main/resources"
4973 "build/classes")
4974 #t))
4975 (add-before 'check 'fix-paths
4976 (lambda _
4977 (with-directory-excursion "modello-plugins/modello-plugin-xml/src/test"
4978 (substitute*
4979 "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java"
4980 (("src/test") "modello-plugins/modello-plugin-xml/src/test")))
4981 #t)))))
4982 (propagated-inputs
4983 `(("java-modello-core" ,java-modello-core)
4984 ("java-modello-plugins-java" ,java-modello-plugins-java)))
4985 (synopsis "Modello XML Plugin")
4986 (description "Modello XML Plugin contains shared code for every plugins
4987 working on XML representation of the model.")))
4988
4989 (define-public java-modello-test
4990 (package
4991 (inherit java-modello-core)
4992 (name "java-modello-test")
4993 (arguments
4994 `(#:jar-name "modello-test.jar"
4995 #:source-dir "modello-test/src/main/java"
4996 #:tests? #f; no tests
4997 #:jdk ,icedtea-8))
4998 (inputs
4999 `(("java-plexus-utils" ,java-plexus-utils)
5000 ("java-plexus-compiler-api" ,java-plexus-compiler-api)
5001 ("java-plexus-compiler-javac" ,java-plexus-compiler-javac)
5002 ("java-plexus-container-default" ,java-plexus-container-default)))
5003 (synopsis "Modello test package")
5004 (description "The modello test package contains the basis to create
5005 Modello generator unit-tests, including sample models and xml files to test
5006 every feature for every plugin.")))
5007
5008 (define-public java-modello-plugins-xpp3
5009 (package
5010 (inherit java-modello-core)
5011 (name "java-modello-plugins-xpp3")
5012 (arguments
5013 `(#:jar-name "modello-plugins-xpp3.jar"
5014 #:source-dir "modello-plugins/modello-plugin-xpp3/src/main/java"
5015 #:test-dir "modello-plugins/modello-plugin-xpp3/src/test"
5016 ;; One of the test dependencies is maven-model which depends on this package.
5017 #:tests? #f
5018 #:jdk ,icedtea-8
5019 #:phases
5020 (modify-phases %standard-phases
5021 (add-before 'build 'copy-resources
5022 (lambda _
5023 (mkdir-p "build/classes")
5024 (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources"
5025 "build/classes")
5026 #t)))))
5027 (propagated-inputs
5028 `(("java-modello-core" ,java-modello-core)
5029 ("java-modello-plugins-java" ,java-modello-plugins-java)
5030 ("java-modello-plugins-xml" ,java-modello-plugins-xml)))
5031 (native-inputs
5032 `(("java-xmlunit" ,java-xmlunit)
5033 ("java-modello-test" ,java-modello-test)
5034 ,@(package-native-inputs java-modello-core)))
5035 (synopsis "Modello XPP3 Plugin")
5036 (description "The modello XPP3 plugin generates XML readers and writers based
5037 on the XPP3 API (XML Pull Parser).")))
5038
5039 (define-public java-asm
5040 (package
5041 (name "java-asm")
5042 (version "6.0")
5043 (source (origin
5044 (method url-fetch)
5045 (uri (string-append "https://download.forge.ow2.org/asm/"
5046 "asm-" version ".tar.gz"))
5047 (sha256
5048 (base32
5049 "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00"))))
5050 (build-system ant-build-system)
5051 (arguments
5052 `(#:build-target "compile"
5053 ;; The tests require an old version of Janino, which no longer compiles
5054 ;; with the JDK7.
5055 #:tests? #f
5056 #:make-flags
5057 (list
5058 ;; We don't need these extra ant tasks, but the build system asks us to
5059 ;; provide a path anyway.
5060 "-Dobjectweb.ant.tasks.path=dummy-path"
5061 ;; The java-aqute.bndlib JAR file will be put onto the classpath and
5062 ;; used during the build automatically by ant-build-system, but
5063 ;; java-asm's build.xml fails unless we provide something here.
5064 "-Dbiz.aQute.bnd.path=dummy-path")
5065 #:phases
5066 (modify-phases %standard-phases
5067 (add-before 'build 'remove-bnd-dependency
5068 (lambda _
5069 ;; This file is the only one to require bnd, and is not needed
5070 ;; because we don't build a bundle.
5071 (delete-file "src/org/objectweb/asm/tools/ModuleInfoBndPlugin.java")
5072 #t))
5073 (add-before 'install 'build-jars
5074 (lambda* (#:key make-flags #:allow-other-keys)
5075 ;; We cannot use the "jar" target because it depends on a couple
5076 ;; of unpackaged, complicated tools.
5077 (mkdir "dist")
5078 (invoke "jar"
5079 "-cf" (string-append "dist/asm-" ,version ".jar")
5080 "-C" "output/build/tmp" ".")))
5081 (add-before 'install 'fix-pom
5082 (lambda _
5083 (substitute* (find-files "archive" "\\.pom$")
5084 (("@product.artifact@") ,version))
5085 #t))
5086 (add-before 'install 'install-parent
5087 (install-pom-file "archive/asm-parent.pom"))
5088 (replace 'install
5089 (install-from-pom "archive/asm.pom")))))
5090 (native-inputs
5091 `(("java-junit" ,java-junit)))
5092 (propagated-inputs
5093 `(("java-org-ow2-parent-pom" ,java-org-ow2-parent-pom-1.3)))
5094 (home-page "https://asm.ow2.io/")
5095 (synopsis "Very small and fast Java bytecode manipulation framework")
5096 (description "ASM is an all purpose Java bytecode manipulation and
5097 analysis framework. It can be used to modify existing classes or dynamically
5098 generate classes, directly in binary form. The provided common
5099 transformations and analysis algorithms allow easily assembling custom
5100 complex transformations and code analysis tools.")
5101 (license license:bsd-3)))
5102
5103 (define java-org-ow2-parent-pom-1.3
5104 (package
5105 (name "java-org-ow2-parent-pom")
5106 (version "1.3")
5107 (source (origin
5108 (method url-fetch)
5109 (uri "https://repo1.maven.org/maven2/org/ow2/ow2/1.3/ow2-1.3.pom")
5110 (sha256
5111 (base32
5112 "1yr8hfx8gffpppa4ii6cvrsq029a6x8hzy7nsavxhs60s9kmq8ai"))))
5113 (build-system ant-build-system)
5114 (arguments
5115 `(#:tests? #f
5116 #:phases
5117 (modify-phases %standard-phases
5118 (delete 'unpack)
5119 (delete 'build)
5120 (delete 'configure)
5121 (replace 'install
5122 (install-pom-file (assoc-ref %build-inputs "source"))))))
5123 (home-page "https://ow2.org")
5124 (synopsis "Ow2.org parent pom")
5125 (description "This package contains the parent pom for projects from ow2.org,
5126 including java-asm.")
5127 (license license:lgpl2.1+)))
5128
5129 (define java-asm-bootstrap
5130 (package
5131 (inherit java-asm)
5132 (name "java-asm-bootstrap")
5133 (arguments
5134 (substitute-keyword-arguments (package-arguments java-asm)
5135 ((#:tests? _) #f)))
5136 (native-inputs `())))
5137
5138 (define-public java-asm-8
5139 (package
5140 (inherit java-asm)
5141 (version "8.0.1")
5142 (source (origin
5143 (method git-fetch)
5144 (uri (git-reference
5145 (url "https://gitlab.ow2.org/asm/asm")
5146 (commit (string-append
5147 "ASM_" (string-join (string-split version #\.)
5148 "_")))))
5149 (file-name (git-file-name "java-asm" version))
5150 (sha256
5151 (base32
5152 "1s6j27zc1i76gh891w2g48b1c3abp9w8zp5j54yb1vm5h8djkd69"))))
5153 (arguments
5154 `(#:jar-name "asm8.jar"
5155 #:source-dir "asm/src/main/java"
5156 #:test-dir "asm/src/test"
5157 ;; tests depend on junit5
5158 #:tests? #f))
5159 (propagated-inputs '())
5160 (native-inputs '())))
5161
5162 (define-public java-asm-tree-8
5163 (package
5164 (inherit java-asm-8)
5165 (name "java-asm-tree")
5166 (arguments
5167 `(#:jar-name "asm-tree.jar"
5168 #:source-dir "asm-tree/src/main/java"
5169 #:test-dir "asm-tree/src/test"
5170 ;; tests depend on junit5
5171 #:tests? #f))
5172 (inputs
5173 `(("java-asm" ,java-asm-8)))))
5174
5175 (define-public java-asm-analysis-8
5176 (package
5177 (inherit java-asm-8)
5178 (name "java-asm-analysis")
5179 (arguments
5180 `(#:jar-name "asm-analysis.jar"
5181 #:source-dir "asm-analysis/src/main/java"
5182 #:test-dir "asm-analysis/src/test"
5183 ;; tests depend on junit5
5184 #:tests? #f))
5185 (inputs
5186 `(("java-asm" ,java-asm-8)
5187 ("java-asm-tree" ,java-asm-tree-8)))))
5188
5189 (define-public java-asm-util-8
5190 (package
5191 (inherit java-asm-8)
5192 (name "java-asm-util")
5193 (arguments
5194 `(#:jar-name "asm-util8.jar"
5195 #:source-dir "asm-util/src/main/java"
5196 #:test-dir "asm-util/src/test"
5197 ;; tests depend on junit5
5198 #:tests? #f))
5199 (inputs
5200 `(("java-asm" ,java-asm-8)
5201 ("java-asm-analysis" ,java-asm-analysis-8)
5202 ("java-asm-tree" ,java-asm-tree-8)))))
5203
5204 (define-public java-cglib
5205 (package
5206 (name "java-cglib")
5207 (version "3.2.4")
5208 (source
5209 (origin
5210 (method git-fetch)
5211 (uri (git-reference
5212 (url "https://github.com/cglib/cglib")
5213 (commit (string-append
5214 "RELEASE_"
5215 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
5216 version)))))
5217 (file-name (git-file-name name version))
5218 (sha256
5219 (base32 "186451jms2zfp47yd8kxd77az2cqal1my2br7klgyp8fpl4qfg8v"))))
5220 (build-system ant-build-system)
5221 (arguments
5222 `(;; FIXME: tests fail because junit runs
5223 ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem
5224 ;; to describe a test at all.
5225 #:tests? #f
5226 #:jar-name "cglib.jar"
5227 #:phases
5228 (modify-phases %standard-phases
5229 (add-after 'unpack 'chdir
5230 (lambda _ (chdir "cglib") #t)))))
5231 (inputs
5232 `(("java-asm" ,java-asm)
5233 ("java-junit" ,java-junit)))
5234 (home-page "https://github.com/cglib/cglib/")
5235 (synopsis "Java byte code generation library")
5236 (description "The byte code generation library CGLIB is a high level API
5237 to generate and transform Java byte code.")
5238 (license license:asl2.0)))
5239
5240 (define-public java-objenesis
5241 (package
5242 (name "java-objenesis")
5243 (version "2.5.1")
5244 (source (origin
5245 (method git-fetch)
5246 (uri (git-reference
5247 (url "https://github.com/easymock/objenesis")
5248 (commit version)))
5249 (file-name (git-file-name name version))
5250 (sha256
5251 (base32
5252 "054yi200wj00x6dp1sxfrwgndwywadsbn8d8ij1j0v45j9g2vdya"))))
5253 (build-system ant-build-system)
5254 (arguments
5255 `(#:jar-name "objenesis.jar"
5256 #:source-dir "main/src/"
5257 #:test-dir "main/src/test/"))
5258 (native-inputs
5259 `(("java-junit" ,java-junit)
5260 ("java-hamcrest-core" ,java-hamcrest-core)))
5261 (home-page "http://objenesis.org/")
5262 (synopsis "Bypass the constructor when creating an object")
5263 (description "Objenesis is a small Java library that serves one purpose:
5264 to instantiate a new object of a particular class. It is common to see
5265 restrictions in libraries stating that classes must require a default
5266 constructor. Objenesis aims to overcome these restrictions by bypassing the
5267 constructor on object instantiation.")
5268 (license license:asl2.0)))
5269
5270 (define-public java-easymock
5271 (package
5272 (name "java-easymock")
5273 (version "3.4")
5274 (source (origin
5275 (method git-fetch)
5276 (uri (git-reference
5277 (url "https://github.com/easymock/easymock/")
5278 (commit (string-append "easymock-" version))))
5279 (file-name (git-file-name name version))
5280 (sha256
5281 (base32
5282 "02vybm8hc0i0n9sp2f2iiqn54zwqhq835f76wc6b2m7819z5a8dq"))))
5283 (build-system ant-build-system)
5284 (arguments
5285 `(#:jar-name "easymock.jar"
5286 #:source-dir "core/src/main"
5287 #:test-dir "core/src/test"
5288 #:phases
5289 (modify-phases %standard-phases
5290 ;; FIXME: Android support requires the following packages to be
5291 ;; available: com.google.dexmaker.stock.ProxyBuilder
5292 (add-after 'unpack 'delete-android-support
5293 (lambda _
5294 (with-directory-excursion "core/src/main/java/org/easymock/internal"
5295 (substitute* "MocksControl.java"
5296 (("AndroidSupport.isAndroid\\(\\)") "false")
5297 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
5298 (delete-file "AndroidClassProxyFactory.java"))
5299 #t))
5300 (add-after 'unpack 'delete-broken-tests
5301 (lambda _
5302 (with-directory-excursion "core/src/test/java/org/easymock"
5303 ;; This test depends on dexmaker.
5304 (delete-file "tests2/ClassExtensionHelperTest.java")
5305
5306 ;; This is not a test.
5307 (delete-file "tests/BaseEasyMockRunnerTest.java")
5308
5309 ;; This test should be executed with a different runner...
5310 (delete-file "tests2/EasyMockAnnotationsTest.java")
5311 ;; ...but deleting it means that we also have to delete these
5312 ;; dependent files.
5313 (delete-file "tests2/EasyMockRunnerTest.java")
5314 (delete-file "tests2/EasyMockRuleTest.java")
5315
5316 ;; This test fails because the file "easymock.properties" does
5317 ;; not exist.
5318 (delete-file "tests2/EasyMockPropertiesTest.java"))
5319 #t)))))
5320 (inputs
5321 `(("java-asm" ,java-asm)
5322 ("java-cglib" ,java-cglib)
5323 ("java-objenesis" ,java-objenesis)))
5324 (native-inputs
5325 `(("java-junit" ,java-junit)
5326 ("java-hamcrest-core" ,java-hamcrest-core)))
5327 (home-page "https://easymock.org/")
5328 (synopsis "Java library providing mock objects for unit tests")
5329 (description "EasyMock is a Java library that provides an easy way to use
5330 mock objects in unit testing.")
5331 (license license:asl2.0)))
5332
5333 (define-public java-jmock-1
5334 (package
5335 (name "java-jmock")
5336 (version "1.2.0")
5337 (source (origin
5338 (method git-fetch)
5339 (uri (git-reference
5340 (url "https://github.com/jmock-developers/jmock-library")
5341 (commit version)))
5342 (file-name (git-file-name name version))
5343 (sha256
5344 (base32
5345 "0lkga995xd9b9mmzxmcd301hlw83p1h78nibh7djlx7wydscr85z"))))
5346 (build-system ant-build-system)
5347 (arguments
5348 `(#:build-target "jars"
5349 #:test-target "run.tests"
5350 #:phases
5351 (modify-phases %standard-phases
5352 (replace 'install (install-jars "build")))))
5353 (home-page "http://jmock.org/")
5354 (synopsis "Mock object library for test-driven development")
5355 (description "JMock is a library that supports test-driven development of
5356 Java code with mock objects. Mock objects help you design and test the
5357 interactions between the objects in your programs.
5358
5359 The jMock library
5360
5361 @itemize
5362 @item makes it quick and easy to define mock objects
5363 @item lets you precisely specify the interactions between
5364 your objects, reducing the brittleness of your tests
5365 @item plugs into your favourite test framework
5366 @item is easy to extend.
5367 @end itemize\n")
5368 (license license:bsd-3)))
5369
5370 (define-public java-jmock
5371 (package
5372 (inherit java-jmock-1)
5373 (name "java-jmock")
5374 (version "2.8.2")
5375 (source (origin
5376 (method git-fetch)
5377 (uri (git-reference
5378 (url "https://github.com/jmock-developers/jmock-library")
5379 (commit version)))
5380 (file-name (git-file-name name version))
5381 (sha256
5382 (base32
5383 "12b7l22g3nrjvf2dzcw3z03fpd2chrgp0d8xkvn8w55rwb57pax6"))))
5384 (inputs
5385 `(("java-hamcrest-all" ,java-hamcrest-all)
5386 ("java-asm" ,java-asm)
5387 ("java-bsh" ,java-bsh)
5388 ("java-junit" ,java-junit)))
5389 (native-inputs
5390 `(("cglib" ,java-cglib)))
5391 (arguments
5392 `(#:jar-name "java-jmock.jar"
5393 #:source-dir "jmock/src/main/java"
5394 #:test-dir "jmock/src/test"))))
5395
5396 (define-public java-jmock-junit4
5397 (package
5398 (inherit java-jmock)
5399 (name "java-jmock-junit4")
5400 (arguments
5401 `(#:jar-name "java-jmock-junit4.jar"
5402 #:source-dir "jmock-junit4/src/main/java"
5403 #:test-dir "jmock-junit4/src/test"))
5404 (inputs
5405 `(("java-hamcrest-all" ,java-hamcrest-all)
5406 ("java-asm" ,java-asm)
5407 ("java-bsh" ,java-bsh)
5408 ("java-jmock" ,java-jmock)
5409 ("java-jumit" ,java-junit)))))
5410
5411 (define-public java-jmock-legacy
5412 (package
5413 (inherit java-jmock)
5414 (name "java-jmock-legacy")
5415 (arguments
5416 `(#:jar-name "java-jmock-legacy.jar"
5417 #:source-dir "jmock-legacy/src/main/java"
5418 #:test-dir "jmock-legacy/src/test"
5419 #:phases
5420 (modify-phases %standard-phases
5421 (add-before 'check 'copy-tests
5422 (lambda _
5423 ;; This file is a dependancy of some tests
5424 (let ((file "org/jmock/test/acceptance/PackageProtectedType.java"))
5425 (copy-file (string-append "jmock/src/test/java/" file)
5426 (string-append "jmock-legacy/src/test/java/" file))
5427 #t))))))
5428 (inputs
5429 `(("java-hamcrest-all" ,java-hamcrest-all)
5430 ("java-objenesis" ,java-objenesis)
5431 ("java-cglib" ,java-cglib)
5432 ("java-jmock" ,java-jmock)
5433 ("java-asm" ,java-asm)
5434 ("java-bsh" ,java-bsh)
5435 ("java-junit" ,java-junit)))
5436 (native-inputs
5437 `(("java-jmock-junit4" ,java-jmock-junit4)))))
5438
5439 (define-public java-hamcrest-all
5440 (package (inherit java-hamcrest-core)
5441 (name "java-hamcrest-all")
5442 (arguments
5443 `(#:jdk ,icedtea-8
5444 ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core)
5445 ((#:build-target _) "bigjar")
5446 ((#:phases phases)
5447 `(modify-phases ,phases
5448 ;; Some build targets override the classpath, so we need to patch
5449 ;; the build.xml to ensure that required dependencies are on the
5450 ;; classpath.
5451 (add-after 'unpack 'patch-classpath-for-integration
5452 (lambda* (#:key inputs #:allow-other-keys)
5453 (substitute* "build.xml"
5454 ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
5455 (string-join
5456 (cons line
5457 (append
5458 (find-files (assoc-ref inputs "java-junit") "\\.jar$")
5459 (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
5460 (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
5461 ";"))
5462 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
5463 (car (find-files (assoc-ref inputs "java-hamcrest-core")
5464 "jar$"))))
5465 #t))
5466 (replace 'install
5467 (lambda* (#:key outputs #:allow-other-keys)
5468 (let* ((target (string-append (assoc-ref outputs "out")
5469 "/share/java/"))
5470 (version-suffix
5471 ,(string-append
5472 "-" (package-version java-hamcrest-core) ".jar"))
5473 (install-without-version-suffix
5474 (lambda (jar)
5475 (copy-file jar
5476 (string-append target
5477 (basename jar version-suffix)
5478 ".jar")))))
5479 (mkdir-p target)
5480 (for-each
5481 install-without-version-suffix
5482 (find-files "build"
5483 (lambda (name _)
5484 (and (string-suffix? ".jar" name)
5485 (not (string-suffix? "-sources.jar" name)))))))
5486 #t)))))))
5487 (inputs
5488 `(("java-junit" ,java-junit)
5489 ("java-jmock" ,java-jmock-1)
5490 ;; This is necessary because of what seems to be a race condition.
5491 ;; This package would sometimes fail to build because hamcrest-core.jar
5492 ;; could not be found, even though it is built as part of this package.
5493 ;; Adding java-hamcrest-core appears to fix this problem. See
5494 ;; https://debbugs.gnu.org/31390 for more information.
5495 ("java-hamcrest-core" ,java-hamcrest-core)
5496 ("java-easymock" ,java-easymock)
5497 ,@(package-inputs java-hamcrest-core)))))
5498
5499 (define-public java-jopt-simple
5500 (package
5501 (name "java-jopt-simple")
5502 (version "5.0.3")
5503 (source (origin
5504 (method url-fetch)
5505 (uri (string-append "http://repo1.maven.org/maven2/"
5506 "net/sf/jopt-simple/jopt-simple/"
5507 version "/jopt-simple-"
5508 version "-sources.jar"))
5509 (sha256
5510 (base32
5511 "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa"))))
5512 (build-system ant-build-system)
5513 (arguments
5514 `(#:tests? #f ; there are no tests
5515 #:jar-name "jopt-simple.jar"))
5516 (home-page "https://pholser.github.io/jopt-simple/")
5517 (synopsis "Java library for parsing command line options")
5518 (description "JOpt Simple is a Java library for parsing command line
5519 options, such as those you might pass to an invocation of @code{javac}. In
5520 the interest of striving for simplicity, as closely as possible JOpt Simple
5521 attempts to honor the command line option syntaxes of POSIX @code{getopt} and
5522 GNU @code{getopt_long}. It also aims to make option parser configuration and
5523 retrieval of options and their arguments simple and expressive, without being
5524 overly clever.")
5525 (license license:expat)))
5526
5527 (define-public java-commons-math3
5528 (package
5529 (name "java-commons-math3")
5530 (version "3.6.1")
5531 (source (origin
5532 (method url-fetch)
5533 (uri (string-append "mirror://apache/commons/math/source/"
5534 "commons-math3-" version "-src.tar.gz"))
5535 (sha256
5536 (base32
5537 "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6"))))
5538 (build-system ant-build-system)
5539 (arguments
5540 `(#:build-target "jar"
5541 #:test-target "test"
5542 #:make-flags
5543 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
5544 (junit (assoc-ref %build-inputs "java-junit")))
5545 (list (string-append "-Djunit.jar="
5546 (car (find-files junit "jar$")))
5547 (string-append "-Dhamcrest.jar="
5548 (car (find-files hamcrest ".*.jar$")))))
5549 #:phases
5550 (modify-phases %standard-phases
5551 ;; We want to build the jar in the build phase and run the tests
5552 ;; later in a separate phase.
5553 (add-after 'unpack 'untangle-targets
5554 (lambda _
5555 (substitute* "build.xml"
5556 (("name=\"jar\" depends=\"test\"")
5557 "name=\"jar\" depends=\"compile\""))
5558 #t))
5559 ;; There is no install target.
5560 (replace 'install
5561 (install-jars "target")))))
5562 (native-inputs
5563 `(("java-junit" ,java-junit)
5564 ("java-hamcrest-core" ,java-hamcrest-core)))
5565 (home-page "https://commons.apache.org/math/")
5566 (synopsis "Apache Commons mathematics library")
5567 (description "Commons Math is a library of lightweight, self-contained
5568 mathematics and statistics components addressing the most common problems not
5569 available in the Java programming language or Commons Lang.")
5570 (license license:asl2.0)))
5571
5572 (define-public java-jmh
5573 (package
5574 (name "java-jmh")
5575 (version "1.17.5")
5576 (source (origin
5577 (method hg-fetch)
5578 (uri (hg-reference
5579 (url "http://hg.openjdk.java.net/code-tools/jmh/")
5580 (changeset version)))
5581 (file-name (string-append name "-" version "-checkout"))
5582 (sha256
5583 (base32
5584 "1fxyxhg9famwcg1prc4cgwb5wzyxqavn3cjm5vz8605xz7x5k084"))))
5585 (build-system ant-build-system)
5586 (arguments
5587 `(#:jar-name "jmh-core.jar"
5588 #:source-dir "jmh-core/src/main"
5589 #:test-dir "jmh-core/src/test"
5590 #:phases
5591 (modify-phases %standard-phases
5592 ;; This seems to be a bug in the JDK. It may not be necessary in
5593 ;; future versions of the JDK.
5594 (add-after 'unpack 'fix-bug
5595 (lambda _
5596 (with-directory-excursion
5597 "jmh-core/src/main/java/org/openjdk/jmh/runner/options"
5598 (substitute* '("IntegerValueConverter.java"
5599 "ThreadsValueConverter.java")
5600 (("public Class<Integer> valueType")
5601 "public Class<? extends Integer> valueType")))
5602 #t)))))
5603 (inputs
5604 `(("java-jopt-simple" ,java-jopt-simple)
5605 ("java-commons-math3" ,java-commons-math3)))
5606 (native-inputs
5607 `(("java-junit" ,java-junit)
5608 ("java-hamcrest-core" ,java-hamcrest-core)))
5609 (home-page "https://openjdk.java.net/projects/code-tools/jmh/")
5610 (synopsis "Benchmark harness for the JVM")
5611 (description "JMH is a Java harness for building, running, and analysing
5612 nano/micro/milli/macro benchmarks written in Java and other languages
5613 targeting the JVM.")
5614 ;; GPLv2 only
5615 (license license:gpl2)))
5616
5617 (define-public java-commons-collections4
5618 (package
5619 (name "java-commons-collections4")
5620 (version "4.1")
5621 (source (origin
5622 (method url-fetch)
5623 (uri (string-append "mirror://apache/commons/collections/source/"
5624 "commons-collections4-" version "-src.tar.gz"))
5625 (sha256
5626 (base32
5627 "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl"))))
5628 (build-system ant-build-system)
5629 (arguments
5630 `(#:test-target "test"
5631 #:make-flags
5632 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
5633 (junit (assoc-ref %build-inputs "java-junit"))
5634 (easymock (assoc-ref %build-inputs "java-easymock")))
5635 (list (string-append "-Djunit.jar="
5636 (car (find-files junit "jar$")))
5637 (string-append "-Dhamcrest.jar="
5638 (car (find-files hamcrest "jar$")))
5639 (string-append "-Deasymock.jar=" easymock
5640 "/share/java/easymock.jar")))
5641 #:phases
5642 (modify-phases %standard-phases
5643 (replace 'install
5644 (install-jars "target")))))
5645 (native-inputs
5646 `(("java-junit" ,java-junit)
5647 ("java-hamcrest-core" ,java-hamcrest-core)
5648 ("java-easymock" ,java-easymock)))
5649 (home-page "https://commons.apache.org/collections/")
5650 (synopsis "Collections framework")
5651 (description "The Java Collections Framework is the recognised standard
5652 for collection handling in Java. Commons-Collections seek to build upon the
5653 JDK classes by providing new interfaces, implementations and utilities. There
5654 are many features, including:
5655
5656 @itemize
5657 @item @code{Bag} interface for collections that have a number of copies of
5658 each object
5659 @item @code{BidiMap} interface for maps that can be looked up from value to
5660 key as well and key to value
5661 @item @code{MapIterator} interface to provide simple and quick iteration over
5662 maps
5663 @item Transforming decorators that alter each object as it is added to the
5664 collection
5665 @item Composite collections that make multiple collections look like one
5666 @item Ordered maps and sets that retain the order elements are added in,
5667 including an LRU based map
5668 @item Reference map that allows keys and/or values to be garbage collected
5669 under close control
5670 @item Many comparator implementations
5671 @item Many iterator implementations
5672 @item Adapter classes from array and enumerations to collections
5673 @item Utilities to test or create typical set-theory properties of collections
5674 such as union, intersection, and closure.
5675 @end itemize\n")
5676 (license license:asl2.0)))
5677
5678 (define-public java-commons-collections
5679 (package
5680 (inherit java-commons-collections4)
5681 (name "java-commons-collections")
5682 (version "3.2.2")
5683 (source (origin
5684 (method url-fetch)
5685 (uri (string-append "mirror://apache/commons/collections/source/"
5686 "commons-collections-" version "-src.tar.gz"))
5687 (sha256
5688 (base32
5689 "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387"))
5690 (patches
5691 (search-patches "java-commons-collections-fix-java8.patch"))))
5692 (arguments
5693 (substitute-keyword-arguments (package-arguments java-commons-collections4)
5694 ((#:phases phases)
5695 `(modify-phases ,phases
5696 ;; The manifest is required by the build procedure
5697 (add-before 'build 'add-manifest
5698 (lambda _
5699 (mkdir-p "build/conf")
5700 (call-with-output-file "build/conf/MANIFEST.MF"
5701 (lambda (file)
5702 (format file "Manifest-Version: 1.0\n")))
5703 #t))
5704 (replace 'install
5705 (install-jars "build"))))))))
5706
5707 (define java-commons-collections-test-classes
5708 (package
5709 (inherit java-commons-collections)
5710 (arguments
5711 `(#:jar-name "commons-collections-test-classes.jar"
5712 #:source-dir "src/test"
5713 #:tests? #f))
5714 (inputs
5715 `(("collection" ,java-commons-collections)))))
5716
5717 (define-public java-commons-beanutils
5718 (package
5719 (name "java-commons-beanutils")
5720 (version "1.9.3")
5721 (source (origin
5722 (method url-fetch)
5723 (uri (string-append "mirror://apache/commons/beanutils/source/"
5724 "commons-beanutils-" version "-src.tar.gz"))
5725 (sha256
5726 (base32
5727 "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk"))))
5728 (build-system ant-build-system)
5729 (arguments
5730 `(#:test-target "test"
5731 #:tests? #f
5732 #:phases
5733 (modify-phases %standard-phases
5734 (replace 'install
5735 (lambda* (#:key outputs #:allow-other-keys)
5736 (rename-file (string-append "dist/commons-beanutils-" ,version
5737 "-SNAPSHOT.jar")
5738 "commons-beanutils.jar")
5739 (install-file "commons-beanutils.jar"
5740 (string-append (assoc-ref outputs "out") "/share/java/"))
5741 #t)))))
5742 (inputs
5743 `(("logging" ,java-commons-logging-minimal)
5744 ("collections" ,java-commons-collections)))
5745 (native-inputs
5746 `(("junit" ,java-junit)
5747 ("collections-test" ,java-commons-collections-test-classes)))
5748 (home-page "https://commons.apache.org/beanutils/")
5749 (synopsis "Dynamically set or get properties in Java")
5750 (description "BeanUtils provides a simplified interface to reflection and
5751 introspection to set or get dynamically determined properties through their
5752 setter and getter method.")
5753 (license license:asl2.0)))
5754
5755 (define-public java-commons-io
5756 (package
5757 (name "java-commons-io")
5758 (version "2.5")
5759 (source
5760 (origin
5761 (method url-fetch)
5762 (uri (string-append "mirror://apache/commons/io/source/"
5763 "commons-io-" version "-src.tar.gz"))
5764 (sha256
5765 (base32
5766 "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3"))))
5767 (build-system ant-build-system)
5768 (outputs '("out" "doc"))
5769 (arguments
5770 `(#:test-target "test"
5771 #:make-flags
5772 (list (string-append "-Djunit.jar="
5773 (car (find-files (assoc-ref %build-inputs "java-junit")
5774 "jar$"))))
5775 #:phases
5776 (modify-phases %standard-phases
5777 (add-after 'build 'build-javadoc ant-build-javadoc)
5778 (replace 'install (install-from-pom "pom.xml"))
5779 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
5780 (native-inputs
5781 `(("java-junit" ,java-junit)
5782 ("java-hamcrest-core" ,java-hamcrest-core)))
5783 (propagated-inputs
5784 `(("apache-commons-parent-pom" ,apache-commons-parent-pom-39)))
5785 (home-page "https://commons.apache.org/io/")
5786 (synopsis "Common useful IO related classes")
5787 (description "Commons-IO contains utility classes, stream implementations,
5788 file filters and endian classes.")
5789 (license license:asl2.0)))
5790
5791 (define-public java-commons-exec-1.1
5792 (package
5793 (name "java-commons-exec")
5794 (version "1.1")
5795 (source
5796 (origin
5797 (method url-fetch)
5798 (uri (string-append "mirror://apache/commons/exec/source/"
5799 "commons-exec-" version "-src.tar.gz"))
5800 (sha256
5801 (base32
5802 "025dk8xgj10lxwwwqp0hng2rn7fr4vcirxzydqzx9k4dim667alk"))))
5803 (build-system ant-build-system)
5804 (arguments
5805 `(#:test-target "test"
5806 #:make-flags
5807 (list (string-append "-Dmaven.junit.jar="
5808 (car (find-files (assoc-ref %build-inputs "java-junit")
5809 "jar$"))))
5810 #:phases
5811 (modify-phases %standard-phases
5812 (add-before 'build 'delete-network-tests
5813 (lambda _
5814 (delete-file "src/test/java/org/apache/commons/exec/DefaultExecutorTest.java")
5815 (substitute* "src/test/java/org/apache/commons/exec/TestRunner.java"
5816 (("suite\\.addTestSuite\\(DefaultExecutorTest\\.class\\);") ""))
5817 #t))
5818 ;; The "build" phase automatically tests.
5819 (delete 'check)
5820 (replace 'install (install-jars "target")))))
5821 (native-inputs
5822 `(("java-junit" ,java-junit)))
5823 (home-page "https://commons.apache.org/proper/commons-exec/")
5824 (synopsis "Common program execution related classes")
5825 (description "Commons-Exec simplifies executing external processes.")
5826 (license license:asl2.0)))
5827
5828 (define-public java-commons-exec
5829 (package
5830 (inherit java-commons-exec-1.1)
5831 (version "1.3")
5832 (source
5833 (origin
5834 (method url-fetch)
5835 (uri (string-append "mirror://apache/commons/exec/source/"
5836 "commons-exec-" version "-src.tar.gz"))
5837 (sha256
5838 (base32
5839 "17yb4h6f8l49c5iyyvda4z2nmw0bxrx857nrwmsr7mmpb7x441yv"))))
5840 (arguments
5841 `(#:test-target "test"
5842 #:make-flags
5843 (list (string-append "-Dmaven.junit.jar="
5844 (car (find-files (assoc-ref %build-inputs "java-junit")
5845 "jar$")))
5846 "-Dmaven.compiler.source=1.7"
5847 "-Dmaven.compiler.target=1.7")
5848 #:phases
5849 (modify-phases %standard-phases
5850 (add-before 'build 'delete-network-tests
5851 (lambda* (#:key inputs #:allow-other-keys)
5852 ;; This test hangs indefinitely.
5853 (delete-file "src/test/java/org/apache/commons/exec/issues/Exec60Test.java")
5854 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec41Test.java"
5855 (("ping -c 10 127.0.0.1") "sleep 10"))
5856 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec49Test.java"
5857 (("/bin/ls") "ls"))
5858 (call-with-output-file "src/test/scripts/ping.sh"
5859 (lambda (port)
5860 (format port "#!~a/bin/sh\nsleep $1\n"
5861 (assoc-ref inputs "bash"))))
5862 #t))
5863 ;; The "build" phase automatically tests.
5864 (delete 'check)
5865 (replace 'install (install-jars "target")))))
5866 (native-inputs
5867 `(("java-junit" ,java-junit)
5868 ("java-hamcrest-core" ,java-hamcrest-core)))))
5869
5870 (define-public java-commons-lang
5871 (package
5872 (name "java-commons-lang")
5873 (version "2.6")
5874 (source
5875 (origin
5876 (method url-fetch)
5877 (uri (string-append "mirror://apache/commons/lang/source/"
5878 "commons-lang-" version "-src.tar.gz"))
5879 (sha256
5880 (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5"))))
5881 (build-system ant-build-system)
5882 (outputs '("out" "doc"))
5883 (arguments
5884 `(#:test-target "test"
5885 #:test-exclude (list "**/Abstract*.java" "**/Random*.java")
5886 #:phases
5887 (modify-phases %standard-phases
5888 (add-after 'build 'build-javadoc ant-build-javadoc)
5889 (add-before 'check 'disable-failing-test
5890 (lambda _
5891 ;; Disable a failing test
5892 (substitute* "src/test/java/org/apache/commons/lang/\
5893 time/FastDateFormatTest.java"
5894 (("public void testFormat\\(\\)")
5895 "public void disabled_testFormat()"))
5896 #t))
5897 (replace 'install (install-jars "target"))
5898 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
5899 (native-inputs
5900 `(("java-junit" ,java-junit)))
5901 (home-page "https://commons.apache.org/lang/")
5902 (synopsis "Extension of the java.lang package")
5903 (description "The Commons Lang components contains a set of Java classes
5904 that provide helper methods for standard Java classes, especially those found
5905 in the @code{java.lang} package in the Sun JDK. The following classes are
5906 included:
5907
5908 @itemize
5909 @item StringUtils - Helper for @code{java.lang.String}.
5910 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets
5911 of characters such as @code{[a-z]} and @code{[abcdez]}.
5912 @item RandomStringUtils - Helper for creating randomised strings.
5913 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
5914 @item NumberRange - A range of numbers with an upper and lower bound.
5915 @item ObjectUtils - Helper for @code{java.lang.Object}.
5916 @item SerializationUtils - Helper for serializing objects.
5917 @item SystemUtils - Utility class defining the Java system properties.
5918 @item NestedException package - A sub-package for the creation of nested
5919 exceptions.
5920 @item Enum package - A sub-package for the creation of enumerated types.
5921 @item Builder package - A sub-package for the creation of @code{equals},
5922 @code{hashCode}, @code{compareTo} and @code{toString} methods.
5923 @end itemize\n")
5924 (license license:asl2.0)))
5925
5926 (define-public java-commons-lang3
5927 (package
5928 (name "java-commons-lang3")
5929 (version "3.9")
5930 (source
5931 (origin
5932 (method url-fetch)
5933 (uri (string-append "mirror://apache/commons/lang/source/"
5934 "commons-lang3-" version "-src.tar.gz"))
5935 (sha256
5936 (base32 "0s4ffbvsyl16c90l45ximsg4dwd8hmz7wsza3p308fw43h6mwhb6"))))
5937 (build-system ant-build-system)
5938 (arguments
5939 `(#:jar-name "commons-lang3.jar"
5940 #:source-dir "src/main/java"
5941 #:tests? #f; require junit5
5942 #:phases
5943 (modify-phases %standard-phases
5944 (replace 'install (install-from-pom "pom.xml")))))
5945 (propagated-inputs
5946 `(("apache-commons-parent-pom" ,apache-commons-parent-pom-48)))
5947 (home-page "https://commons.apache.org/lang/")
5948 (synopsis "Extension of the java.lang package")
5949 (description "The Commons Lang components contains a set of Java classes
5950 that provide helper methods for standard Java classes, especially those found
5951 in the @code{java.lang} package. The following classes are included:
5952
5953 @itemize
5954 @item StringUtils - Helper for @code{java.lang.String}.
5955 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of
5956 characters such as @code{[a-z]} and @code{[abcdez]}.
5957 @item RandomStringUtils - Helper for creating randomised strings.
5958 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
5959 @item NumberRange - A range of numbers with an upper and lower bound.
5960 @item ObjectUtils - Helper for @code{java.lang.Object}.
5961 @item SerializationUtils - Helper for serializing objects.
5962 @item SystemUtils - Utility class defining the Java system properties.
5963 @item NestedException package - A sub-package for the creation of nested
5964 exceptions.
5965 @item Enum package - A sub-package for the creation of enumerated types.
5966 @item Builder package - A sub-package for the creation of @code{equals},
5967 @code{hashCode}, @code{compareTo} and @code{toString} methods.
5968 @end itemize\n")
5969 (license license:asl2.0)))
5970
5971 (define-public java-commons-bsf
5972 (package
5973 (name "java-commons-bsf")
5974 (version "2.4.0")
5975 (source (origin
5976 (method url-fetch)
5977 (uri (string-append "mirror://apache/commons/bsf/source/bsf-src-"
5978 version ".tar.gz"))
5979 (sha256
5980 (base32
5981 "1sbamr8jl32p1jgf59nw0b2w9qivyg145954hm6ly54cfgsqrdas"))
5982 (modules '((guix build utils)))
5983 (snippet
5984 '(begin
5985 (for-each delete-file
5986 (find-files "." "\\.jar$"))
5987 #t))))
5988 (build-system ant-build-system)
5989 (arguments
5990 `(#:build-target "jar"
5991 #:tests? #f; No test file
5992 #:modules ((guix build ant-build-system)
5993 (guix build utils)
5994 (guix build java-utils)
5995 (sxml simple))
5996 #:phases
5997 (modify-phases %standard-phases
5998 (add-before 'build 'create-properties
5999 (lambda _
6000 ;; This file is missing from the distribution
6001 (call-with-output-file "build-properties.xml"
6002 (lambda (port)
6003 (sxml->xml
6004 `(project (@ (basedir ".") (name "build-properties") (default ""))
6005 (property (@ (name "project.name") (value "bsf")))
6006 (property (@ (name "source.level") (value "1.5")))
6007 (property (@ (name "build.lib") (value "build/jar")))
6008 (property (@ (name "src.dir") (value "src")))
6009 (property (@ (name "tests.dir") (value "src/org/apache/bsf/test")))
6010 (property (@ (name "build.tests") (value "build/test-classes")))
6011 (property (@ (name "build.dest") (value "build/classes"))))
6012 port)))
6013 #t))
6014 (replace 'install (install-jars "build")))))
6015 (native-inputs
6016 `(("java-junit" ,java-junit)))
6017 (inputs
6018 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
6019 (home-page "https://commons.apache.org/proper/commons-bsf")
6020 (synopsis "Bean Scripting Framework")
6021 (description "The Bean Scripting Framework (BSF) is a set of Java classes
6022 which provides scripting language support within Java applications, and access
6023 to Java objects and methods from scripting languages. BSF allows one to write
6024 JSPs in languages other than Java while providing access to the Java class
6025 library. In addition, BSF permits any Java application to be implemented in
6026 part (or dynamically extended) by a language that is embedded within it. This
6027 is achieved by providing an API that permits calling scripting language engines
6028 from within Java, as well as an object registry that exposes Java objects to
6029 these scripting language engines.")
6030 (license license:asl2.0)))
6031
6032 (define-public java-commons-jxpath
6033 (package
6034 (name "java-commons-jxpath")
6035 (version "1.3")
6036 (source (origin
6037 (method url-fetch)
6038 (uri (string-append "mirror://apache/commons/jxpath/source/"
6039 "commons-jxpath-" version "-src.tar.gz"))
6040 (sha256
6041 (base32
6042 "1rpgg31ayn9fwr4bfi2i1ij0npcg79ad2fv0w9hacvawsyc42cfs"))))
6043 (build-system ant-build-system)
6044 (arguments
6045 `(#:jar-name "commons-jxpath.jar"
6046 ;; tests require more dependencies, including mockrunner which depends on old software
6047 #:tests? #f
6048 #:source-dir "src/java"))
6049 (inputs
6050 `(("servlet" ,java-classpathx-servletapi)
6051 ("java-jdom" ,java-jdom)
6052 ("java-commons-beanutils" ,java-commons-beanutils)))
6053 (native-inputs
6054 `(("java-junit" ,java-junit)))
6055 (home-page "https://commons.apache.org/jxpath/")
6056 (synopsis "Simple interpreter of an expression language called XPath.")
6057 (description "The org.apache.commons.jxpath package defines a simple
6058 interpreter of an expression language called XPath. JXPath applies XPath
6059 expressions to graphs of objects of all kinds: JavaBeans, Maps, Servlet
6060 contexts, DOM etc, including mixtures thereof.")
6061 (license license:asl2.0)))
6062
6063 (define-public java-commons-pool
6064 (package
6065 (name "java-commons-pool")
6066 (version "2.6.2")
6067 (source (origin
6068 (method url-fetch)
6069 (uri (string-append "mirror://apache/commons/pool/source/"
6070 "commons-pool2-" version "-src.tar.gz"))
6071 (sha256
6072 (base32
6073 "1fi1hgqmq01bs6azbj3sfswxzadp2r8sjjfiq6ryilz1m50kvrv6"))))
6074 (arguments
6075 `(#:jar-name "common-pool.jar"
6076 #:source-dir "src/main/java"
6077 #:test-exclude
6078 (list "**/PerformanceTest.java")))
6079 (build-system ant-build-system)
6080 (inputs
6081 `(("java-cglib" ,java-cglib)))
6082 (native-inputs
6083 `(("java-junit" ,java-junit)
6084 ("java-hamcrest-core" ,java-hamcrest-core)
6085 ("java-asm" ,java-asm)
6086 ("java-objenesis" ,java-objenesis)))
6087 (home-page "https://commons.apache.org/proper/commons-pool/")
6088 (synopsis "Object-pooling API in Java")
6089 (description "The commons-pool package provides an object-pooling API
6090 and a number of object pool implementations. This package defines a
6091 handful of pooling interfaces and some base classes that may be useful when
6092 creating new pool implementations.")
6093 (license license:asl2.0)))
6094
6095 (define-public java-commons-dbcp
6096 (package
6097 (name "java-commons-dbcp")
6098 (version "2.6.0")
6099 (source (origin
6100 (method url-fetch)
6101 (uri (string-append "mirror://apache/commons/dbcp/source/"
6102 "commons-dbcp2-" version "-src.tar.gz"))
6103 (sha256
6104 (base32
6105 "0axbvcbnf2l70fc3ybrlp3siw2w4ka9mia2pnx4py8gz54cpw3rc"))))
6106 (arguments
6107 `(#:source-dir "src/main/java"
6108 #:jar-name "java-commons-dbcp.jar"
6109 #:tests? #f)); requires apache-geronimo
6110 (inputs
6111 `(("java-commons-pool" ,java-commons-pool)
6112 ("java-commons-logging" ,java-commons-logging-minimal)
6113 ("java-jboss-transaction-api-spec" ,java-jboss-transaction-api-spec)))
6114 (native-inputs
6115 `(("java-junit" ,java-junit)))
6116 (build-system ant-build-system)
6117 (home-page "https://commons.apache.org/proper/commons-dbcp/")
6118 (synopsis "Database Connection Pool for Java")
6119 (description "Commons-dbcp allows you to share a pool of database
6120 connections between users. Creating a new connection for each user can be
6121 time consuming and even unfeasible when the number of simultaneous users is
6122 very large. This package provides a way to share a poole of connections to
6123 reduce that load.")
6124 (license license:asl2.0)))
6125
6126 (define-public java-commons-jcs
6127 (package
6128 (name "java-commons-jcs")
6129 (version "2.2.1")
6130 (source (origin
6131 (method url-fetch)
6132 (uri (string-append "mirror://apache/commons/jcs/source/"
6133 "commons-jcs-dist-" version "-src.tar.gz"))
6134 (sha256
6135 (base32
6136 "0syhq2npjbrl0azqfjm0gvash1qd5qjy4qmysxcrqjsk0nf9fa1q"))))
6137 (build-system ant-build-system)
6138 (arguments
6139 `(#:jar-name "commons-jcs.jar"
6140 #:source-dir "commons-jcs-core/src/main/java"
6141 #:test-dir "commons-jcs-core/src/test"
6142 #:tests? #f; requires hsqldb
6143 #:phases
6144 (modify-phases %standard-phases
6145 (add-before 'build 'prepare
6146 (lambda _
6147 (with-directory-excursion
6148 "commons-jcs-core/src/main/java/org/apache/commons/jcs"
6149 (substitute*
6150 "auxiliary/disk/jdbc/dsfactory/SharedPoolDataSourceFactory.java"
6151 (("commons.dbcp") "commons.dbcp2")
6152 ((".*\\.setMaxActive.*") ""))
6153 ;;; Remove dependency on velocity-tools
6154 (delete-file "admin/servlet/JCSAdminServlet.java"))
6155 #t)))))
6156 (propagated-inputs
6157 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
6158 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
6159 ("java-commons-httpclient" ,java-commons-httpclient)
6160 ("java-commons-dbcp" ,java-commons-dbcp)))
6161 (native-inputs
6162 `(("java-junit" ,java-junit)))
6163 (home-page "https://commons.apache.org/proper/commons-jcs/")
6164 (synopsis "Distributed caching system in Java")
6165 (description "JCS is a distributed caching system written in Java. It
6166 is intended to speed up applications by providing a means to manage cached
6167 data of various dynamic natures. Like any caching system, JCS is most useful
6168 for high read, low put applications. Latency times drop sharply and
6169 bottlenecks move away from the database in an effectively cached system.")
6170 (license license:asl2.0)))
6171
6172 (define-public java-jsr250
6173 (package
6174 (name "java-jsr250")
6175 (version "1.3")
6176 (source (origin
6177 (method url-fetch)
6178 (uri (string-append "https://repo1.maven.org/maven2/"
6179 "javax/annotation/javax.annotation-api/"
6180 version "/javax.annotation-api-"
6181 version "-sources.jar"))
6182 (sha256
6183 (base32
6184 "08clh8n4n9wfglf75qsqfjs6yf79f7x6hqx38cn856pksszv50kz"))))
6185 (build-system ant-build-system)
6186 (arguments
6187 `(#:tests? #f ; no tests included
6188 #:jdk ,icedtea-8
6189 #:jar-name "jsr250.jar"
6190 #:modules ((guix build ant-build-system)
6191 (guix build utils)
6192 (guix build maven pom)
6193 (guix build java-utils)
6194 (sxml simple))
6195 #:phases
6196 (modify-phases %standard-phases
6197 (add-before 'install 'create-pom
6198 (lambda _
6199 (with-output-to-file "pom.xml"
6200 (lambda _
6201 (sxml->xml
6202 `((project
6203 (modelVersion "4.0.0")
6204 (name "jsr250")
6205 (groupId "javax.annotation")
6206 (artifactId "jsr250-api")
6207 (version ,,version))))))
6208 #t))
6209 (replace 'install
6210 (install-from-pom "pom.xml")))))
6211 (home-page "https://jcp.org/en/jsr/detail?id=250")
6212 (synopsis "Security-related annotations")
6213 (description "This package provides annotations for security. It provides
6214 packages in the @code{javax.annotation} and @code{javax.annotation.security}
6215 namespaces.")
6216 ;; either cddl or gpl2 only, with classpath exception
6217 (license (list license:cddl1.0
6218 license:gpl2))))
6219
6220 (define-public java-jsr305
6221 (package
6222 (name "java-jsr305")
6223 (version "3.0.1")
6224 (source (origin
6225 (method url-fetch)
6226 (uri (string-append "https://repo1.maven.org/maven2/"
6227 "com/google/code/findbugs/"
6228 "jsr305/" version "/jsr305-"
6229 version "-sources.jar"))
6230 (sha256
6231 (base32
6232 "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n"))))
6233 (build-system ant-build-system)
6234 (arguments
6235 `(#:tests? #f ; no tests included
6236 #:jar-name "jsr305.jar"
6237 #:modules ((guix build ant-build-system)
6238 (guix build java-utils)
6239 (guix build maven pom)
6240 (guix build utils)
6241 (sxml simple))
6242 #:phases
6243 (modify-phases %standard-phases
6244 (add-before 'install 'create-pom
6245 (lambda _
6246 (with-output-to-file "pom.xml"
6247 (lambda _
6248 (sxml->xml
6249 `((project
6250 (modelVersion "4.0.0")
6251 (name "jsr305")
6252 (groupId "com.google.code.findbugs")
6253 (artifactId "jsr305")
6254 (version ,,version))))))
6255 #t))
6256 (replace 'install
6257 (install-from-pom "pom.xml")))))
6258 (home-page "http://findbugs.sourceforge.net/")
6259 (synopsis "Annotations for the static analyzer called findbugs")
6260 (description "This package provides annotations for the findbugs package.
6261 It provides packages in the @code{javax.annotations} namespace.")
6262 (license license:asl2.0)))
6263
6264 (define-public java-guava
6265 (package
6266 (name "java-guava")
6267 ;; This is the last release of Guava that can be built with Java 7.
6268 (version "20.0")
6269 (source (origin
6270 (method git-fetch)
6271 (uri (git-reference
6272 (url "https://github.com/google/guava/")
6273 (commit (string-append "v" version))))
6274 (file-name (git-file-name name version))
6275 (sha256
6276 (base32
6277 "00h5cawdjic1vind3yivzh1f58flvm1yfmhsyqwyvmbvj1vakysp"))))
6278 (build-system ant-build-system)
6279 (arguments
6280 `(#:tests? #f ; no tests included
6281 #:jar-name "guava.jar"
6282 #:source-dir "guava/src"
6283 #:phases
6284 (modify-phases %standard-phases
6285 (add-after 'unpack 'trim-sources
6286 (lambda _
6287 (with-directory-excursion "guava/src/com/google/common"
6288 ;; Remove annotations to avoid extra dependencies:
6289 ;; * "j2objc" annotations are used when converting Java to
6290 ;; Objective C;
6291 ;; * "errorprone" annotations catch common Java mistakes at
6292 ;; compile time;
6293 ;; * "IgnoreJRERequirement" is used for Android.
6294 (substitute* (find-files "." "\\.java$")
6295 (("import com.google.j2objc.*") "")
6296 (("import com.google.errorprone.annotation.*") "")
6297 (("import org.codehaus.mojo.animal_sniffer.*") "")
6298 (("@CanIgnoreReturnValue") "")
6299 (("@LazyInit") "")
6300 (("@WeakOuter") "")
6301 (("@RetainedWith") "")
6302 (("@Weak") "")
6303 (("@ForOverride") "")
6304 (("@J2ObjCIncompatible") "")
6305 (("@IgnoreJRERequirement") "")))
6306 #t))
6307 (replace 'install (install-from-pom "guava/pom.xml")))))
6308 (inputs
6309 `(("java-jsr305" ,java-jsr305)))
6310 (propagated-inputs
6311 `(("java-guava-parent-pom" ,java-guava-parent-pom)))
6312 (home-page "https://github.com/google/guava")
6313 (synopsis "Google core libraries for Java")
6314 (description "Guava is a set of core libraries that includes new
6315 collection types (such as multimap and multiset), immutable collections, a
6316 graph library, functional types, an in-memory cache, and APIs/utilities for
6317 concurrency, I/O, hashing, primitives, reflection, string processing, and much
6318 more!")
6319 (license license:asl2.0)))
6320
6321 (define java-guava-parent-pom
6322 (package
6323 (inherit java-guava)
6324 (name "java-guava-parent-pom")
6325 (arguments
6326 `(#:tests? #f
6327 #:phases
6328 (modify-phases %standard-phases
6329 (delete 'configure)
6330 (delete 'build)
6331 (replace 'install
6332 (install-pom-file "pom.xml")))))
6333 (propagated-inputs
6334 `(("java-sonatype-oss-parent-pom" ,java-sonatype-oss-parent-pom-7)))))
6335
6336 ;; The java-commons-logging package provides adapters to many different
6337 ;; logging frameworks. To avoid an excessive dependency graph we try to build
6338 ;; it with only a minimal set of adapters.
6339 (define-public java-commons-logging-minimal
6340 (package
6341 (name "java-commons-logging-minimal")
6342 (version "1.2")
6343 (source (origin
6344 (method url-fetch)
6345 (uri (string-append "mirror://apache/commons/logging/source/"
6346 "commons-logging-" version "-src.tar.gz"))
6347 (sha256
6348 (base32
6349 "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9"))))
6350 (build-system ant-build-system)
6351 (arguments
6352 `(#:tests? #f ; avoid dependency on logging frameworks
6353 #:jar-name "commons-logging-minimal.jar"
6354 #:phases
6355 (modify-phases %standard-phases
6356 (add-after 'unpack 'delete-adapters-and-tests
6357 (lambda _
6358 ;; Delete all adapters except for NoOpLog, SimpleLog, and
6359 ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl
6360 ;; is used by applications; SimpleLog is the only actually usable
6361 ;; implementation that does not depend on another logging
6362 ;; framework.
6363 (for-each
6364 (lambda (file)
6365 (delete-file (string-append
6366 "src/main/java/org/apache/commons/logging/impl/" file)))
6367 (list "Jdk13LumberjackLogger.java"
6368 "WeakHashtable.java"
6369 "Log4JLogger.java"
6370 "ServletContextCleaner.java"
6371 "Jdk14Logger.java"
6372 "AvalonLogger.java"
6373 "LogKitLogger.java"))
6374 (delete-file-recursively "src/test")
6375 #t)))))
6376 (home-page "https://commons.apache.org/logging/")
6377 (synopsis "Common API for logging implementations")
6378 (description "The Logging package is a thin bridge between different
6379 logging implementations. A library that uses the commons-logging API can be
6380 used with any logging implementation at runtime.")
6381 (license license:asl2.0)))
6382
6383 ;; This is the last release of the 1.x series.
6384 (define-public java-mockito-1
6385 (package
6386 (name "java-mockito")
6387 (version "1.10.19")
6388 (source (origin
6389 (method url-fetch)
6390 (uri (string-append "http://repo1.maven.org/maven2/"
6391 "org/mockito/mockito-core/" version
6392 "/mockito-core-" version "-sources.jar"))
6393 (sha256
6394 (base32
6395 "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc"))))
6396 (build-system ant-build-system)
6397 (arguments
6398 `(#:jar-name "mockito.jar"
6399 #:tests? #f ; no tests included
6400 ;; FIXME: patch-and-repack does not support jars, so we have to apply
6401 ;; patches in build phases.
6402 #:phases
6403 (modify-phases %standard-phases
6404 ;; Mockito was developed against a different version of hamcrest,
6405 ;; which does not require matcher implementations to provide an
6406 ;; implementation of the "describeMismatch" method. We add this
6407 ;; simple definition to pass the build with our version of hamcrest.
6408 (add-after 'unpack 'fix-hamcrest-build-error
6409 (lambda _
6410 (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java"
6411 (("public Matcher getActualMatcher\\(\\) .*" line)
6412 (string-append "
6413 public void describeMismatch(Object item, Description description) {
6414 actualMatcher.describeMismatch(item, description);
6415 }"
6416 line)))
6417 #t))
6418 ;; Mockito bundles cglib. We have a cglib package, so let's use
6419 ;; that instead.
6420 (add-after 'unpack 'use-system-libraries
6421 (lambda _
6422 (with-directory-excursion "src/org/mockito/internal/creation/cglib"
6423 (substitute* '("CGLIBHacker.java"
6424 "CglibMockMaker.java"
6425 "ClassImposterizer.java"
6426 "DelegatingMockitoMethodProxy.java"
6427 "MethodInterceptorFilter.java"
6428 "MockitoNamingPolicy.java"
6429 "SerializableMockitoMethodProxy.java"
6430 "SerializableNoOp.java")
6431 (("import org.mockito.cglib") "import net.sf.cglib")))
6432 #t)))))
6433 (inputs
6434 `(("java-junit" ,java-junit)
6435 ("java-objenesis" ,java-objenesis)
6436 ("java-cglib" ,java-cglib)
6437 ("java-hamcrest-core" ,java-hamcrest-core)))
6438 (home-page "http://mockito.org")
6439 (synopsis "Mockito is a mock library for Java")
6440 (description "Mockito is a mocking library for Java which lets you write
6441 tests with a clean and simple API. It generates mocks using reflection, and
6442 it records all mock invocations, including methods arguments.")
6443 (license license:asl2.0)))
6444
6445 (define-public java-httpcomponents-httpcore
6446 (package
6447 (name "java-httpcomponents-httpcore")
6448 (version "4.4.6")
6449 (source (origin
6450 (method url-fetch)
6451 (uri (string-append "mirror://apache//httpcomponents/httpcore/"
6452 "source/httpcomponents-core-"
6453 version "-src.tar.gz"))
6454 (sha256
6455 (base32
6456 "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy"))))
6457 (build-system ant-build-system)
6458 (arguments
6459 `(#:jar-name "httpcomponents-httpcore.jar"
6460 #:phases
6461 (modify-phases %standard-phases
6462 (add-after 'unpack 'chdir
6463 (lambda _ (chdir "httpcore") #t)))))
6464 (inputs
6465 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
6466 ("java-commons-lang3" ,java-commons-lang3)))
6467 (native-inputs
6468 `(("java-junit" ,java-junit)
6469 ("java-mockito" ,java-mockito-1)))
6470 (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html")
6471 (synopsis "Low level HTTP transport components")
6472 (description "HttpCore is a set of low level HTTP transport components
6473 that can be used to build custom client and server side HTTP services with a
6474 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
6475 on the classic Java I/O and non-blocking, event driven I/O model based on Java
6476 NIO.
6477
6478 This package provides the blocking I/O model library.")
6479 (license license:asl2.0)))
6480
6481 (define-public java-httpcomponents-httpcore-nio
6482 (package (inherit java-httpcomponents-httpcore)
6483 (name "java-httpcomponents-httpcore-nio")
6484 (arguments
6485 `(#:jar-name "httpcomponents-httpcore-nio.jar"
6486 #:phases
6487 (modify-phases %standard-phases
6488 (add-after 'unpack 'chdir
6489 (lambda _ (chdir "httpcore-nio") #t)))))
6490 (inputs
6491 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
6492 ("java-hamcrest-core" ,java-hamcrest-core)
6493 ,@(package-inputs java-httpcomponents-httpcore)))
6494 (description "HttpCore is a set of low level HTTP transport components
6495 that can be used to build custom client and server side HTTP services with a
6496 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
6497 on the classic Java I/O and non-blocking, event driven I/O model based on Java
6498 NIO.
6499
6500 This package provides the non-blocking I/O model library based on Java
6501 NIO.")))
6502
6503 (define-public java-httpcomponents-httpcore-ab
6504 (package (inherit java-httpcomponents-httpcore)
6505 (name "java-httpcomponents-httpcore-ab")
6506 (arguments
6507 `(#:jar-name "httpcomponents-httpcore-ab.jar"
6508 #:phases
6509 (modify-phases %standard-phases
6510 (add-after 'unpack 'chdir
6511 (lambda _ (chdir "httpcore-ab") #t)))))
6512 (inputs
6513 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
6514 ("java-commons-cli" ,java-commons-cli)
6515 ("java-hamcrest-core" ,java-hamcrest-core)
6516 ,@(package-inputs java-httpcomponents-httpcore)))
6517 (synopsis "Apache HttpCore benchmarking tool")
6518 (description "This package provides the HttpCore benchmarking tool. It is
6519 an Apache AB clone based on HttpCore.")))
6520
6521 (define-public java-httpcomponents-httpclient
6522 (package
6523 (name "java-httpcomponents-httpclient")
6524 (version "4.5.12")
6525 (source (origin
6526 (method url-fetch)
6527 (uri (string-append "mirror://apache/httpcomponents/httpclient/"
6528 "source/httpcomponents-client-"
6529 version "-src.tar.gz"))
6530 (sha256
6531 (base32
6532 "1va99m2zc2liv0v9vn72p5ja8yz4s5wq7zpahaai5nr966kvxzkb"))))
6533 (build-system ant-build-system)
6534 (arguments
6535 `(#:jar-name "httpcomponents-httpclient.jar"
6536 #:phases
6537 (modify-phases %standard-phases
6538 (add-after 'unpack 'chdir
6539 (lambda _ (chdir "httpclient") #t)))))
6540 (inputs
6541 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
6542 ("java-commons-codec" ,java-commons-codec)
6543 ("java-hamcrest-core" ,java-hamcrest-core)
6544 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
6545 ("java-mockito" ,java-mockito-1)
6546 ("java-junit" ,java-junit)))
6547 (home-page "https://hc.apache.org/httpcomponents-client-ga/")
6548 (synopsis "HTTP client library for Java")
6549 (description "Although the @code{java.net} package provides basic
6550 functionality for accessing resources via HTTP, it doesn't provide the full
6551 flexibility or functionality needed by many applications. @code{HttpClient}
6552 seeks to fill this void by providing an efficient, up-to-date, and
6553 feature-rich package implementing the client side of the most recent HTTP
6554 standards and recommendations.")
6555 (license license:asl2.0)))
6556
6557 (define-public java-httpcomponents-httpmime
6558 (package (inherit java-httpcomponents-httpclient)
6559 (name "java-httpcomponents-httpmime")
6560 (arguments
6561 `(#:jar-name "httpcomponents-httpmime.jar"
6562 #:phases
6563 (modify-phases %standard-phases
6564 (add-after 'unpack 'chdir
6565 (lambda _ (chdir "httpmime") #t)))))
6566 (inputs
6567 `(("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient)
6568 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
6569 ("java-junit" ,java-junit)
6570 ("java-hamcrest-core" ,java-hamcrest-core)))))
6571
6572 (define-public java-commons-net
6573 (package
6574 (name "java-commons-net")
6575 (version "3.6")
6576 (source (origin
6577 (method url-fetch)
6578 (uri (string-append "mirror://apache/commons/net/source/"
6579 "commons-net-" version "-src.tar.gz"))
6580 (sha256
6581 (base32
6582 "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr"))))
6583 (build-system ant-build-system)
6584 (arguments
6585 `(;; FIXME: MainTest.java tries to read "examples.properties" (which
6586 ;; should be "resources/examples/examples.properties"), but gets "null"
6587 ;; instead.
6588 #:tests? #f
6589 #:jar-name "commons-net.jar"))
6590 (native-inputs
6591 `(("java-junit" ,java-junit)
6592 ("java-hamcrest-core" ,java-hamcrest-core)))
6593 (home-page "https://commons.apache.org/net/")
6594 (synopsis "Client library for many basic Internet protocols")
6595 (description "The Apache Commons Net library implements the client side of
6596 many basic Internet protocols. The purpose of the library is to provide
6597 fundamental protocol access, not higher-level abstractions.")
6598 (license license:asl2.0)))
6599
6600 (define-public java-jsch
6601 (package
6602 (name "java-jsch")
6603 (version "0.1.55")
6604 (source (origin
6605 (method url-fetch)
6606 (uri (string-append "mirror://sourceforge/jsch/jsch/"
6607 version "/jsch-" version ".zip"))
6608 (sha256
6609 (base32
6610 "1lxyjwvmwa723wcf3bqn816hkvc03vz4xhbsi7bvfhrz2rpgcfq6"))))
6611 (build-system ant-build-system)
6612 (arguments
6613 `(#:build-target "dist"
6614 #:tests? #f ; no tests included
6615 #:phases
6616 (modify-phases %standard-phases
6617 (replace 'install (install-jars "dist")))))
6618 (native-inputs
6619 `(("unzip" ,unzip)))
6620 (home-page "http://www.jcraft.com/jsch/")
6621 (synopsis "Pure Java implementation of SSH2")
6622 (description "JSch is a pure Java implementation of SSH2. JSch allows you
6623 to connect to an SSH server and use port forwarding, X11 forwarding, file
6624 transfer, etc., and you can integrate its functionality into your own Java
6625 programs.")
6626 (license license:bsd-3)))
6627
6628 (define-public java-commons-compress
6629 (package
6630 (name "java-commons-compress")
6631 (version "1.13")
6632 (source (origin
6633 (method url-fetch)
6634 (uri (string-append "mirror://apache/commons/compress/source/"
6635 "commons-compress-" version "-src.tar.gz"))
6636 (sha256
6637 (base32
6638 "1vjqvavrn0babffn1kciz6v52ibwq2vwhzlb95hazis3lgllnxc8"))))
6639 (build-system ant-build-system)
6640 (arguments
6641 `(#:jar-name "commons-compress.jar"
6642 #:phases
6643 (modify-phases %standard-phases
6644 (add-after 'unpack 'delete-bad-tests
6645 (lambda _
6646 (with-directory-excursion "src/test/java/org/apache/commons/compress/"
6647 ;; FIXME: These tests really should not fail. Maybe they are
6648 ;; indicative of problems with our Java packaging work.
6649
6650 ;; This test fails with a null pointer exception.
6651 (delete-file "archivers/sevenz/SevenZOutputFileTest.java")
6652 ;; This test fails to open test resources.
6653 (delete-file "archivers/zip/ExplodeSupportTest.java")
6654
6655 ;; FIXME: This test adds a dependency on powermock, which is hard to
6656 ;; package at this point.
6657 ;; https://github.com/powermock/powermock
6658 (delete-file "archivers/sevenz/SevenZNativeHeapTest.java"))
6659 #t))
6660 (replace 'install (install-from-pom "pom.xml")))))
6661 (propagated-inputs
6662 `(("java-xz" ,java-xz)
6663 ("apache-commons-parent-pom" ,apache-commons-parent-pom-41)))
6664 (native-inputs
6665 `(("java-junit" ,java-junit)
6666 ("java-mockito" ,java-mockito-1)))
6667 (home-page "https://commons.apache.org/proper/commons-compress/")
6668 (synopsis "Java library for working with compressed files")
6669 (description "The Apache Commons Compress library defines an API for
6670 working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ,
6671 Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.")
6672 (license license:asl2.0)))
6673
6674 (define-public java-commons-csv
6675 (package
6676 (name "java-commons-csv")
6677 (version "1.4")
6678 (source (origin
6679 (method url-fetch)
6680 (uri (string-append "mirror://apache/commons/csv/source/"
6681 "commons-csv-" version "-src.tar.gz"))
6682 (sha256
6683 (base32
6684 "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij"))))
6685 (build-system ant-build-system)
6686 (arguments
6687 `(#:jar-name "commons-csv.jar"
6688 #:source-dir "src/main/java"
6689 #:tests? #f)); FIXME: requires java-h2
6690 (inputs
6691 `(("java-hamcrest-core" ,java-hamcrest-core)
6692 ("java-commons-io" ,java-commons-io)
6693 ("java-commons-lang3" ,java-commons-lang3)
6694 ("junit" ,java-junit)))
6695 (home-page "https://commons.apache.org/proper/commons-csv/")
6696 (synopsis "Read and write CSV documents")
6697 (description "Commons CSV reads and writes files in variations of the Comma
6698 Separated Value (CSV) format. The most common CSV formats are predefined in the
6699 CSVFormat class:
6700
6701 @itemize
6702 @item Microsoft Excel
6703 @item Informix UNLOAD
6704 @item Informix UNLOAD CSV
6705 @item MySQL
6706 @item RFC 4180
6707 @item TDF
6708 @end itemize
6709
6710 Custom formats can be created using a fluent style API.")
6711 (license license:asl2.0)))
6712
6713 (define-public java-osgi-annotation
6714 (package
6715 (name "java-osgi-annotation")
6716 (version "6.0.0")
6717 (source (origin
6718 (method url-fetch)
6719 (uri (string-append "https://repo1.maven.org/maven2/"
6720 "org/osgi/org.osgi.annotation/" version "/"
6721 "org.osgi.annotation-" version "-sources.jar"))
6722 (sha256
6723 (base32
6724 "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w"))))
6725 (build-system ant-build-system)
6726 (arguments
6727 `(#:tests? #f ; no tests
6728 #:jar-name "osgi-annotation.jar"))
6729 (home-page "https://www.osgi.org")
6730 (synopsis "Annotation module of OSGi framework")
6731 (description
6732 "OSGi, for Open Services Gateway initiative framework, is a module system
6733 and service platform for the Java programming language. This package contains
6734 the OSGi annotation module, providing additional services to help dynamic
6735 components.")
6736 (license license:asl2.0)))
6737
6738 (define-public java-osgi-core
6739 (package
6740 (name "java-osgi-core")
6741 (version "6.0.0")
6742 (source (origin
6743 (method url-fetch)
6744 (uri (string-append "https://repo1.maven.org/maven2/"
6745 "org/osgi/org.osgi.core/" version "/"
6746 "org.osgi.core-" version "-sources.jar"))
6747 (sha256
6748 (base32
6749 "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv"))))
6750 (build-system ant-build-system)
6751 (arguments
6752 `(#:tests? #f ; no tests
6753 #:jar-name "osgi-core.jar"))
6754 (inputs
6755 `(("java-osgi-annotation" ,java-osgi-annotation)))
6756 (home-page "https://www.osgi.org")
6757 (synopsis "Core module of OSGi framework")
6758 (description
6759 "OSGi, for Open Services Gateway initiative framework, is a module system
6760 and service platform for the Java programming language. This package contains
6761 the OSGi Core module.")
6762 (license license:asl2.0)))
6763
6764 (define-public java-osgi-service-event
6765 (package
6766 (name "java-osgi-service-event")
6767 (version "1.3.1")
6768 (source (origin
6769 (method url-fetch)
6770 (uri (string-append "https://repo1.maven.org/maven2/"
6771 "org/osgi/org.osgi.service.event/"
6772 version "/org.osgi.service.event-"
6773 version "-sources.jar"))
6774 (sha256
6775 (base32
6776 "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm"))))
6777 (build-system ant-build-system)
6778 (arguments
6779 `(#:tests? #f ; no tests
6780 #:jar-name "osgi-service-event.jar"))
6781 (inputs
6782 `(("java-osgi-annotation" ,java-osgi-annotation)
6783 ("java-osgi-core" ,java-osgi-core)))
6784 (home-page "https://www.osgi.org")
6785 (synopsis "OSGi service event module")
6786 (description
6787 "OSGi, for Open Services Gateway initiative framework, is a module system
6788 and service platform for the Java programming language. This package contains
6789 the OSGi @code{org.osgi.service.event} module.")
6790 (license license:asl2.0)))
6791
6792 (define-public java-eclipse-osgi
6793 (package
6794 (name "java-eclipse-osgi")
6795 (version "3.11.3")
6796 (source (origin
6797 (method url-fetch)
6798 (uri (string-append "https://repo1.maven.org/maven2/"
6799 "org/eclipse/platform/org.eclipse.osgi/"
6800 version "/org.eclipse.osgi-"
6801 version "-sources.jar"))
6802 (sha256
6803 (base32
6804 "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b"))))
6805 (build-system ant-build-system)
6806 (arguments
6807 `(#:tests? #f ; no tests included
6808 #:jar-name "eclipse-equinox-osgi.jar"))
6809 (inputs
6810 `(("java-osgi-annotation" ,java-osgi-annotation)))
6811 (home-page "http://www.eclipse.org/equinox/")
6812 (synopsis "Eclipse Equinox OSGi framework")
6813 (description "This package provides an implementation of the OSGi Core
6814 specification.")
6815 (license license:epl1.0)))
6816
6817 (define-public java-eclipse-equinox-common
6818 (package
6819 (name "java-eclipse-equinox-common")
6820 (version "3.10.200")
6821 (source (origin
6822 (method url-fetch)
6823 (uri (string-append "https://repo1.maven.org/maven2/"
6824 "org/eclipse/platform/org.eclipse.equinox.common/"
6825 version "/org.eclipse.equinox.common-"
6826 version "-sources.jar"))
6827 (sha256
6828 (base32
6829 "1yn8ij6xsljlf35sr2l7wvyvc0ss4n1rv0ry5zkgb49dj4hyrqrj"))))
6830 (build-system ant-build-system)
6831 (arguments
6832 `(#:tests? #f ; no tests included
6833 #:jar-name "eclipse-equinox-common.jar"))
6834 (inputs
6835 `(("java-eclipse-osgi" ,java-eclipse-osgi)))
6836 (home-page "http://www.eclipse.org/equinox/")
6837 (synopsis "Common Eclipse runtime")
6838 (description "This package provides the common Eclipse runtime.")
6839 (license license:epl1.0)))
6840
6841 (define-public java-eclipse-core-jobs
6842 (package
6843 (name "java-eclipse-core-jobs")
6844 (version "3.8.0")
6845 (source (origin
6846 (method url-fetch)
6847 (uri (string-append "https://repo1.maven.org/maven2/"
6848 "org/eclipse/platform/org.eclipse.core.jobs/"
6849 version "/org.eclipse.core.jobs-"
6850 version "-sources.jar"))
6851 (sha256
6852 (base32
6853 "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b"))))
6854 (build-system ant-build-system)
6855 (arguments
6856 `(#:tests? #f ; no tests included
6857 #:jar-name "eclipse-core-jobs.jar"))
6858 (inputs
6859 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6860 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6861 (home-page "http://www.eclipse.org/equinox/")
6862 (synopsis "Eclipse jobs mechanism")
6863 (description "This package provides the Eclipse jobs mechanism.")
6864 (license license:epl1.0)))
6865
6866 (define-public java-eclipse-equinox-registry
6867 (package
6868 (name "java-eclipse-equinox-registry")
6869 (version "3.6.100")
6870 (source (origin
6871 (method url-fetch)
6872 (uri (string-append "https://repo1.maven.org/maven2/"
6873 "org/eclipse/platform/org.eclipse.equinox.registry/"
6874 version "/org.eclipse.equinox.registry-"
6875 version "-sources.jar"))
6876 (sha256
6877 (base32
6878 "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k"))))
6879 (build-system ant-build-system)
6880 (arguments
6881 `(#:tests? #f ; no tests included
6882 #:jar-name "eclipse-equinox-registry.jar"))
6883 (inputs
6884 `(("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6885 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6886 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6887 (home-page "http://www.eclipse.org/equinox/")
6888 (synopsis "Eclipse extension registry support")
6889 (description "This package provides support for the Eclipse extension
6890 registry.")
6891 (license license:epl1.0)))
6892
6893 (define-public java-eclipse-equinox-app
6894 (package
6895 (name "java-eclipse-equinox-app")
6896 (version "1.3.400")
6897 (source (origin
6898 (method url-fetch)
6899 (uri (string-append "https://repo1.maven.org/maven2/"
6900 "org/eclipse/platform/org.eclipse.equinox.app/"
6901 version "/org.eclipse.equinox.app-"
6902 version "-sources.jar"))
6903 (sha256
6904 (base32
6905 "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab"))))
6906 (build-system ant-build-system)
6907 (arguments
6908 `(#:tests? #f ; no tests included
6909 #:jar-name "eclipse-equinox-app.jar"))
6910 (inputs
6911 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6912 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6913 ("java-eclipse-osgi" ,java-eclipse-osgi)
6914 ("java-osgi-service-event" ,java-osgi-service-event)))
6915 (home-page "http://www.eclipse.org/equinox/")
6916 (synopsis "Equinox application container")
6917 (description "This package provides the Equinox application container for
6918 Eclipse.")
6919 (license license:epl1.0)))
6920
6921 (define-public java-eclipse-equinox-preferences
6922 (package
6923 (name "java-eclipse-equinox-preferences")
6924 (version "3.6.1")
6925 (source (origin
6926 (method url-fetch)
6927 (uri (string-append "https://repo1.maven.org/maven2/"
6928 "org/eclipse/platform/org.eclipse.equinox.preferences/"
6929 version "/org.eclipse.equinox.preferences-"
6930 version "-sources.jar"))
6931 (sha256
6932 (base32
6933 "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2"))))
6934 (build-system ant-build-system)
6935 (arguments
6936 `(#:tests? #f ; no tests included
6937 #:jar-name "eclipse-equinox-preferences.jar"))
6938 (inputs
6939 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6940 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6941 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6942 (home-page "http://www.eclipse.org/equinox/")
6943 (synopsis "Eclipse preferences mechanism")
6944 (description "This package provides the Eclipse preferences mechanism with
6945 the module @code{org.eclipse.equinox.preferences}.")
6946 (license license:epl1.0)))
6947
6948 (define-public java-eclipse-core-contenttype
6949 (package
6950 (name "java-eclipse-core-contenttype")
6951 (version "3.5.100")
6952 (source (origin
6953 (method url-fetch)
6954 (uri (string-append "https://repo1.maven.org/maven2/"
6955 "org/eclipse/platform/org.eclipse.core.contenttype/"
6956 version "/org.eclipse.core.contenttype-"
6957 version "-sources.jar"))
6958 (sha256
6959 (base32
6960 "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi"))))
6961 (build-system ant-build-system)
6962 (arguments
6963 `(#:tests? #f ; no tests included
6964 #:jar-name "eclipse-core-contenttype.jar"))
6965 (inputs
6966 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6967 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6968 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6969 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6970 (home-page "http://www.eclipse.org/")
6971 (synopsis "Eclipse content mechanism")
6972 (description "This package provides the Eclipse content mechanism in the
6973 @code{org.eclipse.core.contenttype} module.")
6974 (license license:epl1.0)))
6975
6976 (define-public java-eclipse-core-runtime
6977 (package
6978 (name "java-eclipse-core-runtime")
6979 (version "3.15.100")
6980 (source (origin
6981 (method url-fetch)
6982 (uri (string-append "https://repo1.maven.org/maven2/"
6983 "org/eclipse/platform/org.eclipse.core.runtime/"
6984 version "/org.eclipse.core.runtime-"
6985 version "-sources.jar"))
6986 (sha256
6987 (base32
6988 "0l8xayacsbjvz5hypx2fv47vpw2n4dspamcfb3hx30x9hj8vmg7r"))))
6989 (build-system ant-build-system)
6990 (arguments
6991 `(#:tests? #f ; no tests included
6992 #:jar-name "eclipse-core-runtime.jar"))
6993 (inputs
6994 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6995 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6996 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
6997 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6998 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6999 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7000 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7001 (home-page "https://www.eclipse.org/")
7002 (synopsis "Eclipse core runtime")
7003 (description "This package provides the Eclipse core runtime with the
7004 module @code{org.eclipse.core.runtime}.")
7005 (license license:epl1.0)))
7006
7007 (define-public java-eclipse-core-filesystem
7008 (package
7009 (name "java-eclipse-core-filesystem")
7010 (version "1.6.1")
7011 (source (origin
7012 (method url-fetch)
7013 (uri (string-append "https://repo1.maven.org/maven2/"
7014 "org/eclipse/platform/org.eclipse.core.filesystem/"
7015 version "/org.eclipse.core.filesystem-"
7016 version "-sources.jar"))
7017 (sha256
7018 (base32
7019 "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj"))))
7020 (build-system ant-build-system)
7021 (arguments
7022 `(#:tests? #f ; no tests included
7023 #:jar-name "eclipse-core-filesystem.jar"))
7024 (inputs
7025 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7026 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7027 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7028 (home-page "https://www.eclipse.org/")
7029 (synopsis "Eclipse core file system")
7030 (description "This package provides the Eclipse core file system with the
7031 module @code{org.eclipse.core.filesystem}.")
7032 (license license:epl1.0)))
7033
7034 (define-public java-eclipse-core-expressions
7035 (package
7036 (name "java-eclipse-core-expressions")
7037 (version "3.5.100")
7038 (source (origin
7039 (method url-fetch)
7040 (uri (string-append "https://repo1.maven.org/maven2/"
7041 "org/eclipse/platform/org.eclipse.core.expressions/"
7042 version "/org.eclipse.core.expressions-"
7043 version "-sources.jar"))
7044 (sha256
7045 (base32
7046 "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f"))))
7047 (build-system ant-build-system)
7048 (arguments
7049 `(#:tests? #f ; no tests included
7050 #:jar-name "eclipse-core-expressions.jar"))
7051 (inputs
7052 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7053 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7054 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7055 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7056 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7057 (home-page "https://www.eclipse.org/")
7058 (synopsis "Eclipse core expression language")
7059 (description "This package provides the Eclipse core expression language
7060 with the @code{org.eclipse.core.expressions} module.")
7061 (license license:epl1.0)))
7062
7063 (define-public java-eclipse-core-variables
7064 (package
7065 (name "java-eclipse-core-variables")
7066 (version "3.3.0")
7067 (source (origin
7068 (method url-fetch)
7069 (uri (string-append "https://repo1.maven.org/maven2/"
7070 "org/eclipse/platform/org.eclipse.core.variables/"
7071 version "/org.eclipse.core.variables-"
7072 version "-sources.jar"))
7073 (sha256
7074 (base32
7075 "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy"))))
7076 (build-system ant-build-system)
7077 (arguments
7078 `(#:tests? #f ; no tests included
7079 #:jar-name "eclipse-core-variables.jar"))
7080 (inputs
7081 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7082 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7083 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7084 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7085 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7086 (home-page "https://www.eclipse.org/platform")
7087 (synopsis "Eclipse core variables")
7088 (description "This package provides the Eclipse core variables module
7089 @code{org.eclipse.core.variables}.")
7090 (license license:epl1.0)))
7091
7092 (define-public java-eclipse-ant-core
7093 (package
7094 (name "java-eclipse-ant-core")
7095 (version "3.4.100")
7096 (source (origin
7097 (method url-fetch)
7098 (uri (string-append "https://repo1.maven.org/maven2/"
7099 "org/eclipse/platform/org.eclipse.ant.core/"
7100 version "/org.eclipse.ant.core-"
7101 version "-sources.jar"))
7102 (sha256
7103 (base32
7104 "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7"))))
7105 (build-system ant-build-system)
7106 (arguments
7107 `(#:tests? #f ; no tests included
7108 #:jar-name "eclipse-ant-core.jar"))
7109 (inputs
7110 `(("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
7111 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7112 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7113 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7114 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
7115 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7116 ("java-eclipse-core-variables" ,java-eclipse-core-variables)
7117 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7118 (home-page "https://www.eclipse.org/platform")
7119 (synopsis "Ant build tool core libraries")
7120 (description "This package provides the ant build tool core libraries with
7121 the module @code{org.eclipse.ant.core}.")
7122 (license license:epl1.0)))
7123
7124 (define-public java-eclipse-core-resources
7125 (package
7126 (name "java-eclipse-core-resources")
7127 (version "3.13.200")
7128 (source (origin
7129 (method url-fetch)
7130 (uri (string-append "https://repo1.maven.org/maven2/"
7131 "org/eclipse/platform/org.eclipse.core.resources/"
7132 version "/org.eclipse.core.resources-"
7133 version "-sources.jar"))
7134 (sha256
7135 (base32
7136 "1sn3b6ky72hkvxcgf9b2jkpbdh3y8lbhi9xxwv1dsiddpkkq91hs"))))
7137 (build-system ant-build-system)
7138 (arguments
7139 `(#:tests? #f ; no tests included
7140 #:jar-name "eclipse-core-resources.jar"))
7141 (inputs
7142 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7143 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7144 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7145 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
7146 ("java-eclipse-core-expressions" ,java-eclipse-core-expressions)
7147 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
7148 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
7149 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7150 ("java-eclipse-ant-core" ,java-eclipse-ant-core)
7151 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7152 (home-page "https://www.eclipse.org/")
7153 (synopsis "Eclipse core resource management")
7154 (description "This package provides the Eclipse core resource management
7155 module @code{org.eclipse.core.resources}.")
7156 (license license:epl1.0)))
7157
7158 (define-public java-eclipse-compare-core
7159 (package
7160 (name "java-eclipse-compare-core")
7161 (version "3.6.0")
7162 (source (origin
7163 (method url-fetch)
7164 (uri (string-append "https://repo1.maven.org/maven2/"
7165 "org/eclipse/platform/org.eclipse.compare.core/"
7166 version "/org.eclipse.compare.core-"
7167 version "-sources.jar"))
7168 (sha256
7169 (base32
7170 "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg"))))
7171 (build-system ant-build-system)
7172 (arguments
7173 `(#:tests? #f ; no tests included
7174 #:jar-name "eclipse-compare-core.jar"))
7175 (inputs
7176 `(("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7177 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7178 ("java-eclipse-osgi" ,java-eclipse-osgi)
7179 ("java-icu4j" ,java-icu4j)))
7180 (home-page "https://www.eclipse.org/")
7181 (synopsis "Eclipse core compare support")
7182 (description "This package provides the Eclipse core compare support
7183 module @code{org.eclipse.compare.core}.")
7184 (license license:epl1.0)))
7185
7186 (define-public java-eclipse-team-core
7187 (package
7188 (name "java-eclipse-team-core")
7189 (version "3.8.0")
7190 (source (origin
7191 (method url-fetch)
7192 (uri (string-append "https://repo1.maven.org/maven2/"
7193 "org/eclipse/platform/org.eclipse.team.core/"
7194 version "/org.eclipse.team.core-"
7195 version "-sources.jar"))
7196 (sha256
7197 (base32
7198 "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7"))))
7199 (build-system ant-build-system)
7200 (arguments
7201 `(#:tests? #f ; no tests included
7202 #:jar-name "eclipse-team-core.jar"))
7203 (inputs
7204 `(("java-eclipse-compare-core" ,java-eclipse-compare-core)
7205 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
7206 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
7207 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
7208 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
7209 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7210 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7211 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7212 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7213 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7214 (home-page "https://www.eclipse.org/platform")
7215 (synopsis "Eclipse team support core")
7216 (description "This package provides the Eclipse team support core module
7217 @code{org.eclipse.team.core}.")
7218 (license license:epl1.0)))
7219
7220 (define-public java-eclipse-core-commands
7221 (package
7222 (name "java-eclipse-core-commands")
7223 (version "3.8.1")
7224 (source (origin
7225 (method url-fetch)
7226 (uri (string-append "https://repo1.maven.org/maven2/"
7227 "org/eclipse/platform/org.eclipse.core.commands/"
7228 version "/org.eclipse.core.commands-"
7229 version "-sources.jar"))
7230 (sha256
7231 (base32
7232 "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9"))))
7233 (build-system ant-build-system)
7234 (arguments
7235 `(#:tests? #f ; no tests included
7236 #:jar-name "eclipse-core-commands.jar"))
7237 (inputs
7238 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)))
7239 (home-page "https://www.eclipse.org/platform")
7240 (synopsis "Eclipse core commands")
7241 (description "This package provides Eclipse core commands in the module
7242 @code{org.eclipse.core.commands}.")
7243 (license license:epl1.0)))
7244
7245 (define-public java-eclipse-text
7246 (package
7247 (name "java-eclipse-text")
7248 (version "3.6.0")
7249 (source (origin
7250 (method url-fetch)
7251 (uri (string-append "https://repo1.maven.org/maven2/"
7252 "org/eclipse/platform/org.eclipse.text/"
7253 version "/org.eclipse.text-"
7254 version "-sources.jar"))
7255 (sha256
7256 (base32
7257 "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1"))))
7258 (build-system ant-build-system)
7259 (arguments
7260 `(#:tests? #f ; no tests included
7261 #:jar-name "eclipse-text.jar"
7262 #:phases
7263 (modify-phases %standard-phases
7264 ;; When creating a new category we must make sure that the new list
7265 ;; matches List<Position>. By default it seems to be too generic
7266 ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>.
7267 ;; Without this we get this error:
7268 ;;
7269 ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376:
7270 ;; error: method put in interface Map<K,V> cannot be applied to given types;
7271 ;; [javac] fPositions.put(category, new ArrayList<>());
7272 ;; [javac] ^
7273 ;; [javac] required: String,List<Position>
7274 ;; [javac] found: String,ArrayList<Object>
7275 ;; [javac] reason: actual argument ArrayList<Object> cannot be converted
7276 ;; to List<Position> by method invocation conversion
7277 ;; [javac] where K,V are type-variables:
7278 ;; [javac] K extends Object declared in interface Map
7279 ;; [javac] V extends Object declared in interface Map
7280 ;;
7281 ;; I don't know if this is a good fix. I suspect it is not, but it
7282 ;; seems to work.
7283 (add-after 'unpack 'fix-compilation-error
7284 (lambda _
7285 (substitute* "src/org/eclipse/jface/text/AbstractDocument.java"
7286 (("Positions.put\\(category, new ArrayList<>\\(\\)\\);")
7287 "Positions.put(category, new ArrayList<Position>());"))
7288 #t)))))
7289 (inputs
7290 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7291 ("java-eclipse-core-commands" ,java-eclipse-core-commands)
7292 ("java-icu4j" ,java-icu4j)))
7293 (home-page "http://www.eclipse.org/platform")
7294 (synopsis "Eclipse text library")
7295 (description "Platform Text is part of the Platform UI project and
7296 provides the basic building blocks for text and text editors within Eclipse
7297 and contributes the Eclipse default text editor.")
7298 (license license:epl1.0)))
7299
7300 (define-public java-eclipse-jdt-core
7301 (package
7302 (name "java-eclipse-jdt-core")
7303 (version "3.16.0")
7304 (source (origin
7305 (method url-fetch)
7306 (uri (string-append "https://repo1.maven.org/maven2/"
7307 "org/eclipse/jdt/org.eclipse.jdt.core/"
7308 version "/org.eclipse.jdt.core-"
7309 version "-sources.jar"))
7310 (sha256
7311 (base32
7312 "1g560yr9v2kzv34gc2m3ifpgnj7krcdd6h4gd4z83pwqacwkfz0k"))))
7313 (build-system ant-build-system)
7314 (arguments
7315 `(#:tests? #f ; no tests included
7316 #:jar-name "eclipse-jdt-core.jar"
7317 #:phases
7318 (modify-phases %standard-phases
7319 (add-after 'unpack 'move-sources
7320 (lambda _
7321 (with-directory-excursion "src/jdtCompilerAdaptersrc/"
7322 (for-each (lambda (file)
7323 (install-file file (string-append "../" (dirname file))))
7324 (find-files "." ".*")))
7325 (delete-file-recursively "src/jdtCompilerAdaptersrc/")
7326 #t))
7327 (add-before 'build 'copy-resources
7328 (lambda _
7329 (with-directory-excursion "src"
7330 (for-each (lambda (file)
7331 (install-file file (string-append "../build/classes/" (dirname file))))
7332 (find-files "." ".*.(props|properties|rsc)")))
7333 #t)))))
7334 (inputs
7335 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
7336 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
7337 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
7338 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
7339 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7340 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
7341 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7342 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7343 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7344 ("java-eclipse-osgi" ,java-eclipse-osgi)
7345 ("java-eclipse-text" ,java-eclipse-text)))
7346 (home-page "https://www.eclipse.org/jdt")
7347 (synopsis "Java development tools core libraries")
7348 (description "This package provides the core libraries of the Eclipse Java
7349 development tools.")
7350 (license license:epl1.0)))
7351
7352 (define-public java-eclipse-jdt-compiler-apt
7353 (package
7354 (name "java-eclipse-jdt-compiler-apt")
7355 (version "1.3.400")
7356 (source (origin
7357 (method url-fetch)
7358 (uri (string-append "https://repo1.maven.org/maven2/"
7359 "org/eclipse/jdt/org.eclipse.jdt.compiler.apt/"
7360 version "/org.eclipse.jdt.compiler.apt-"
7361 version "-sources.jar"))
7362 (sha256
7363 (base32
7364 "1s285k9p2ixdqrknb40jbbvw682n9a7l5lqpn583a8pvlzg2l6r8"))))
7365 (build-system ant-build-system)
7366 (arguments
7367 `(#:tests? #f ; no tests included
7368 #:jar-name "eclipse-jdt-compiler-apt.jar"
7369 #:jdk ,openjdk11))
7370 (inputs
7371 `(("java-eclipse-jdt-core" ,java-eclipse-jdt-core)))
7372 (home-page "https://www.eclipse.org/jdt/apt/")
7373 (synopsis "Annotation processing tool")
7374 (description "APT stands for Annotation Processing Tool. APT provides a
7375 means for generating files and compiling new Java classes based on annotations
7376 found in your source code.")
7377 (license license:epl2.0)))
7378
7379 (define-public java-javax-mail
7380 (package
7381 (name "java-javax-mail")
7382 (version "1.5.6")
7383 (source (origin
7384 (method url-fetch)
7385 (uri (string-append "https://repo1.maven.org/maven2/"
7386 "com/sun/mail/javax.mail/"
7387 version "/javax.mail-"
7388 version "-sources.jar"))
7389 (sha256
7390 (base32
7391 "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9"))))
7392 (build-system ant-build-system)
7393 (arguments
7394 `(#:tests? #f ; no tests
7395 #:jar-name "javax-mail.jar"))
7396 (home-page "https://javamail.java.net")
7397 (synopsis "Reference implementation of the JavaMail API")
7398 (description
7399 "This package provides versions of the JavaMail API implementation, IMAP,
7400 SMTP, and POP3 service providers, some examples, and documentation for the
7401 JavaMail API.")
7402 ;; GPLv2 only with "classpath exception".
7403 (license license:gpl2)))
7404
7405 (define-public java-log4j-api
7406 (package
7407 (name "java-log4j-api")
7408 (version "2.4.1")
7409 (source (origin
7410 (method url-fetch)
7411 (uri (string-append "mirror://apache/logging/log4j/" version
7412 "/apache-log4j-" version "-src.tar.gz"))
7413 (sha256
7414 (base32
7415 "0j5p9gik0jysh37nlrckqbky12isy95cpwg2gv5fas1rcdqbraxd"))))
7416 (build-system ant-build-system)
7417 (arguments
7418 `(#:tests? #f ; tests require unpackaged software
7419 #:jar-name "log4j-api.jar"
7420 #:make-flags
7421 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
7422 "/share/java"))
7423 #:phases
7424 (modify-phases %standard-phases
7425 (add-after 'unpack 'enter-dir
7426 (lambda _ (chdir "log4j-api") #t))
7427 ;; FIXME: The tests require additional software that has not been
7428 ;; packaged yet, such as
7429 ;; * org.apache.maven
7430 ;; * org.apache.felix
7431 (add-after 'enter-dir 'delete-tests
7432 (lambda _ (delete-file-recursively "src/test") #t)))))
7433 (inputs
7434 `(("java-osgi-core" ,java-osgi-core)
7435 ("java-hamcrest-core" ,java-hamcrest-core)
7436 ("java-junit" ,java-junit)))
7437 (home-page "https://logging.apache.org/log4j/2.x/")
7438 (synopsis "API module of the Log4j logging framework for Java")
7439 (description
7440 "This package provides the API module of the Log4j logging framework for
7441 Java.")
7442 (license license:asl2.0)))
7443
7444 (define-public java-log4j-core
7445 (package
7446 (inherit java-log4j-api)
7447 (name "java-log4j-core")
7448 (inputs
7449 `(("java-osgi-core" ,java-osgi-core)
7450 ("java-hamcrest-core" ,java-hamcrest-core)
7451 ("java-log4j-api" ,java-log4j-api)
7452 ("java-mail" ,java-mail)
7453 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
7454 ("java-lmax-disruptor" ,java-lmax-disruptor)
7455 ("java-kafka" ,java-kafka-clients)
7456 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
7457 ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7458 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
7459 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
7460 ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml)
7461 ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml)
7462 ("java-commons-compress" ,java-commons-compress)
7463 ("java-commons-csv" ,java-commons-csv)
7464 ("java-jeromq" ,java-jeromq)
7465 ("java-junit" ,java-junit)))
7466 (native-inputs
7467 `(("hamcrest" ,java-hamcrest-all)
7468 ("java-commons-io" ,java-commons-io)
7469 ("java-commons-lang3" ,java-commons-lang3)
7470 ("slf4j" ,java-slf4j-api)))
7471 (arguments
7472 `(#:tests? #f ; tests require more dependencies
7473 #:test-dir "src/test"
7474 #:source-dir "src/main/java"
7475 #:jar-name "log4j-core.jar"
7476 #:jdk ,icedtea-8
7477 #:make-flags
7478 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
7479 "/share/java"))
7480 #:phases
7481 (modify-phases %standard-phases
7482 (add-after 'unpack 'enter-dir
7483 (lambda _ (chdir "log4j-core") #t)))))
7484 (synopsis "Core component of the Log4j framework")
7485 (description "This package provides the core component of the Log4j
7486 logging framework for Java.")))
7487
7488 (define-public java-log4j-1.2-api
7489 (package
7490 (inherit java-log4j-api)
7491 (name "java-log4j-1.2-api")
7492 (arguments
7493 `(#:jar-name "java-log4j-1.2-api.jar"
7494 #:source-dir "log4j-1.2-api/src/main/java"
7495 #:jdk ,icedtea-8
7496 ;; Tests require maven-model (and other maven subprojects), which is a
7497 ;; cyclic dependency.
7498 #:tests? #f))
7499 (inputs
7500 `(("log4j-api" ,java-log4j-api)
7501 ("log4j-core" ,java-log4j-core)
7502 ("osgi-core" ,java-osgi-core)
7503 ("eclipse-osgi" ,java-eclipse-osgi)
7504 ("java-lmax-disruptor" ,java-lmax-disruptor)))))
7505
7506 (define-public java-commons-cli
7507 (package
7508 (name "java-commons-cli")
7509 (version "1.4")
7510 (source (origin
7511 (method url-fetch)
7512 (uri (string-append "mirror://apache/commons/cli/source/"
7513 "commons-cli-" version "-src.tar.gz"))
7514 (sha256
7515 (base32
7516 "05hgi2z01fqz374y719gl1dxzqvzci5af071zm7vxrjg9vczipm1"))))
7517 (build-system ant-build-system)
7518 ;; TODO: javadoc
7519 (arguments
7520 `(#:jar-name "commons-cli.jar"
7521 #:phases
7522 (modify-phases %standard-phases
7523 (replace 'install
7524 (install-from-pom "pom.xml")))))
7525 (native-inputs
7526 `(("java-junit" ,java-junit)
7527 ("java-hamcrest-core" ,java-hamcrest-core)))
7528 (home-page "https://commons.apache.org/cli/")
7529 (synopsis "Command line arguments and options parsing library")
7530 (description "The Apache Commons CLI library provides an API for parsing
7531 command line options passed to programs. It is also able to print help
7532 messages detailing the options available for a command line tool.
7533
7534 Commons CLI supports different types of options:
7535
7536 @itemize
7537 @item POSIX like options (ie. tar -zxvf foo.tar.gz)
7538 @item GNU like long options (ie. du --human-readable --max-depth=1)
7539 @item Java like properties (ie. java -Djava.awt.headless=true Foo)
7540 @item Short options with value attached (ie. gcc -O2 foo.c)
7541 @item long options with single hyphen (ie. ant -projecthelp)
7542 @end itemize
7543
7544 This is a part of the Apache Commons Project.")
7545 (license license:asl2.0)))
7546
7547 (define-public java-commons-codec
7548 (package
7549 (name "java-commons-codec")
7550 (version "1.14")
7551 (source (origin
7552 (method url-fetch)
7553 (uri (string-append "mirror://apache/commons/codec/source/"
7554 "commons-codec-" version "-src.tar.gz"))
7555 (sha256
7556 (base32
7557 "11xr0agckkhm91pb5akf2mbk84yd54gyr178wj57gsm97fi7nkh9"))))
7558 (build-system ant-build-system)
7559 (arguments
7560 `(#:jar-name "java-commons-codec.jar"
7561 #:source-dir "src/main/java"
7562 #:test-dir "src/test"
7563 #:test-exclude (list "**/*AbstractTest.java")
7564 #:phases
7565 (modify-phases %standard-phases
7566 (add-before 'build 'copy-resources
7567 (lambda _
7568 (copy-recursively "src/main/resources"
7569 "build/classes")
7570 #t))
7571 (add-before 'check 'copy-test-resources
7572 (lambda _
7573 (copy-recursively "src/test/resources"
7574 "build/test-classes")
7575 #t))
7576 (replace 'install (install-from-pom "pom.xml")))))
7577 (native-inputs
7578 `(("java-commons-lang3" ,java-commons-lang3)
7579 ("java-junit" ,java-junit)))
7580 (propagated-inputs
7581 `(("apache-commons-parent-pom" ,apache-commons-parent-pom-50)))
7582 (home-page "https://commons.apache.org/codec/")
7583 (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs")
7584 (description "The codec package contains simple encoder and decoders for
7585 various formats such as Base64 and Hexadecimal. In addition to these widely
7586 used encoders and decoders, the codec package also maintains a collection of
7587 phonetic encoding utilities.
7588
7589 This is a part of the Apache Commons Project.")
7590 (license license:asl2.0)))
7591
7592 (define-public java-commons-daemon
7593 (package
7594 (name "java-commons-daemon")
7595 (version "1.1.0")
7596 (source (origin
7597 (method url-fetch)
7598 (uri (string-append "mirror://apache/commons/daemon/source/"
7599 "commons-daemon-" version "-src.tar.gz"))
7600 (sha256
7601 (base32
7602 "141gkhfzv5v3pdhic6y4ardq2dhsa3v36j8wmmhy6f8mac48fp7n"))))
7603 (build-system ant-build-system)
7604 (arguments
7605 `(#:test-target "test"
7606 #:phases
7607 (modify-phases %standard-phases
7608 (add-after 'build 'build-javadoc ant-build-javadoc)
7609 (replace 'install (install-jars "dist"))
7610 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
7611 (native-inputs
7612 `(("java-junit" ,java-junit)))
7613 (home-page "https://commons.apache.org/daemon/")
7614 (synopsis "Library to launch Java applications as daemons")
7615 (description "The Daemon package from Apache Commons can be used to
7616 implement Java applications which can be launched as daemons. For example the
7617 program will be notified about a shutdown so that it can perform cleanup tasks
7618 before its process of execution is destroyed by the operation system.
7619
7620 This package contains the Java library. You will also need the actual binary
7621 for your architecture which is provided by the jsvc package.
7622
7623 This is a part of the Apache Commons Project.")
7624 (license license:asl2.0)))
7625
7626 (define-public java-javaewah
7627 (package
7628 (name "java-javaewah")
7629 (version "1.1.6")
7630 (source (origin
7631 (method git-fetch)
7632 (uri (git-reference
7633 (url "https://github.com/lemire/javaewah/")
7634 (commit (string-append "JavaEWAH-" version))))
7635 (file-name (git-file-name name version))
7636 (sha256
7637 (base32
7638 "1m8qcb1py76v7avbjjrkvyy6fhr5dk2ywy73gbsxqry04gkm2nhw"))))
7639 (build-system ant-build-system)
7640 (arguments `(#:jar-name "javaewah.jar"))
7641 (inputs
7642 `(("java-junit" ,java-junit)
7643 ("java-hamcrest-core" ,java-hamcrest-core)))
7644 (home-page "https://github.com/lemire/javaewah")
7645 (synopsis "Compressed alternative to the Java @code{BitSet} class")
7646 (description "This is a word-aligned compressed variant of the Java
7647 @code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like
7648 compression scheme. It can be used to implement bitmap indexes.
7649
7650 The goal of word-aligned compression is not to achieve the best compression,
7651 but rather to improve query processing time. Hence, JavaEWAH tries to save CPU
7652 cycles, maybe at the expense of storage. However, the EWAH scheme is always
7653 more efficient storage-wise than an uncompressed bitmap (as implemented in the
7654 @code{BitSet} class by Sun).")
7655 ;; GPL2.0 derivates are explicitly allowed.
7656 (license license:asl2.0)))
7657
7658 (define-public java-slf4j-api
7659 (package
7660 (name "java-slf4j-api")
7661 (version "1.7.25")
7662 (source (origin
7663 (method url-fetch)
7664 (uri (string-append "https://www.slf4j.org/dist/slf4j-"
7665 version ".tar.gz"))
7666 (sha256
7667 (base32
7668 "13j51sgzmhhdrfa74gkal5zpip7r1440dh7zsi2c8bpb2zs1v8kb"))
7669 (modules '((guix build utils)))
7670 ;; Delete bundled jars.
7671 (snippet
7672 '(begin
7673 (for-each delete-file (find-files "." "\\.jar$"))
7674 #t))))
7675 (build-system ant-build-system)
7676 (arguments
7677 `(#:jar-name "slf4j-api.jar"
7678 #:source-dir "slf4j-api/src/main"
7679 #:test-dir "slf4j-api/src/test"
7680 #:phases
7681 (modify-phases %standard-phases
7682 (add-after 'build 'regenerate-jar
7683 (lambda _
7684 ;; pom.xml ignores these files in the jar creation process. If we don't,
7685 ;; we get the error "This code should have never made it into slf4j-api.jar"
7686 (delete-file-recursively "build/classes/org/slf4j/impl")
7687 (invoke "jar" "-cf" "build/jar/slf4j-api.jar" "-C"
7688 "build/classes" ".")))
7689 (add-before 'check 'dont-test-abstract-classes
7690 (lambda _
7691 ;; abstract classes are not meant to be run with junit
7692 (substitute* "build.xml"
7693 (("<include name=\"\\*\\*/\\*Test.java\" />")
7694 (string-append "<include name=\"**/*Test.java\" />"
7695 "<exclude name=\"**/MultithreadedInitializationTest"
7696 ".java\" />")))
7697 #t))
7698 (replace 'install
7699 (install-from-pom "slf4j-api/pom.xml")))))
7700 (propagated-inputs
7701 `(("java-slf4j-parent" ,java-slf4j-parent)))
7702 (native-inputs
7703 `(("java-junit" ,java-junit)
7704 ("java-hamcrest-core" ,java-hamcrest-core)))
7705 (home-page "https://www.slf4j.org/")
7706 (synopsis "Simple logging facade for Java")
7707 (description "The Simple Logging Facade for Java (SLF4J) serves as a
7708 simple facade or abstraction for various logging
7709 frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j})
7710 allowing the end user to plug in the desired logging framework at deployment
7711 time.")
7712 (license license:expat)))
7713
7714 (define java-slf4j-parent
7715 (package
7716 (inherit java-slf4j-api)
7717 (name "java-slf4j-parent")
7718 (native-inputs `())
7719 (propagated-inputs '())
7720 (arguments
7721 `(#:tests? #f
7722 #:phases
7723 (modify-phases %standard-phases
7724 (delete 'build)
7725 (delete 'configure)
7726 (replace 'install
7727 (install-pom-file "pom.xml")))))))
7728
7729 (define-public java-slf4j-simple
7730 (package
7731 (name "java-slf4j-simple")
7732 (version "1.7.25")
7733 (source (package-source java-slf4j-api))
7734 (build-system ant-build-system)
7735 (arguments
7736 `(#:jar-name "slf4j-simple.jar"
7737 #:source-dir "slf4j-simple/src/main"
7738 #:test-dir "slf4j-simple/src/test"
7739 #:phases
7740 (modify-phases %standard-phases
7741 ;; The tests need some test classes from slf4j-api
7742 (add-before 'check 'build-slf4j-api-test-helpers
7743 (lambda _
7744 ;; Add current dir to CLASSPATH ...
7745 (setenv "CLASSPATH"
7746 (string-append (getcwd) ":" (getenv "CLASSPATH")))
7747 ;; ... and build test helper classes here:
7748 (apply invoke
7749 `("javac" "-d" "."
7750 ,@(find-files "slf4j-api/src/test" ".*\\.java")))))
7751 (replace 'install
7752 (install-from-pom "slf4j-simple/pom.xml")))))
7753 (propagated-inputs
7754 `(("java-slf4j-api" ,java-slf4j-api)))
7755 (native-inputs
7756 `(("java-junit" ,java-junit)
7757 ("java-hamcrest-core" ,java-hamcrest-core)))
7758 (home-page "https://www.slf4j.org/")
7759 (synopsis "Simple implementation of simple logging facade for Java")
7760 (description "SLF4J binding for the Simple implementation, which outputs
7761 all events to System.err. Only messages of level INFO and higher are
7762 printed.")
7763 (license license:expat)))
7764
7765 (define-public antlr2
7766 (package
7767 (name "antlr2")
7768 (version "2.7.7")
7769 (source (origin
7770 (method url-fetch)
7771 (uri (string-append "https://www.antlr2.org/download/antlr-"
7772 version ".tar.gz"))
7773 (sha256
7774 (base32
7775 "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5"))
7776 (modules '((guix build utils)))
7777 (snippet
7778 '(begin
7779 (delete-file "antlr.jar")
7780 (substitute* "lib/cpp/antlr/CharScanner.hpp"
7781 (("#include <map>")
7782 (string-append
7783 "#include <map>\n"
7784 "#define EOF (-1)\n"
7785 "#include <strings.h>")))
7786 (substitute* "configure"
7787 (("/bin/sh") "sh"))
7788 #t))))
7789 (build-system gnu-build-system)
7790 (arguments
7791 `(#:tests? #f ; no test target
7792 #:imported-modules ((guix build ant-build-system)
7793 (guix build syscalls)
7794 ,@%gnu-build-system-modules)
7795 #:modules (((guix build ant-build-system) #:prefix ant:)
7796 (guix build gnu-build-system)
7797 (guix build utils))
7798 #:phases
7799 (modify-phases %standard-phases
7800 (add-after 'install 'strip-jar-timestamps
7801 (assoc-ref ant:%standard-phases 'strip-jar-timestamps))
7802 (add-before 'configure 'fix-timestamp
7803 (lambda _
7804 (substitute* "configure"
7805 (("^TIMESTAMP.*") "TIMESTAMP=19700101\n"))
7806 #t))
7807 (add-after 'configure 'fix-bin-ls
7808 (lambda _
7809 (substitute* (find-files "." "Makefile")
7810 (("/bin/ls") "ls"))
7811 #t)))))
7812 (native-inputs
7813 `(("which" ,which)
7814 ("zip" ,zip)
7815 ("java" ,icedtea "jdk")))
7816 (inputs
7817 `(("java" ,icedtea)))
7818 (home-page "https://www.antlr2.org")
7819 (synopsis "Framework for constructing recognizers, compilers, and translators")
7820 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
7821 is a language tool that provides a framework for constructing recognizers,
7822 compilers, and translators from grammatical descriptions containing Java, C#,
7823 C++, or Python actions. ANTLR provides excellent support for tree construction,
7824 tree walking, and translation.")
7825 (license license:public-domain)))
7826
7827 (define-public java-stringtemplate-3
7828 (package
7829 (name "java-stringtemplate")
7830 (version "3.2.1")
7831 (source (origin
7832 (method url-fetch)
7833 (uri (string-append "https://github.com/antlr/website-st4/raw/"
7834 "gh-pages/download/stringtemplate-"
7835 version ".tar.gz"))
7836 (sha256
7837 (base32
7838 "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is"))))
7839 (build-system ant-build-system)
7840 (arguments
7841 `(#:jar-name (string-append ,name "-" ,version ".jar")
7842 #:test-dir "test"
7843 #:modules ((guix build ant-build-system)
7844 (guix build utils)
7845 (srfi srfi-1))
7846 #:phases
7847 (modify-phases %standard-phases
7848 (add-before 'check 'fix-tests
7849 (lambda _
7850 (substitute* "build.xml"
7851 (("\\$\\{test.home\\}/java")
7852 "${test.home}/org"))
7853 #t))
7854 (add-before 'build 'generate-grammar
7855 (lambda _
7856 (with-directory-excursion "src/org/antlr/stringtemplate/language/"
7857 (for-each (lambda (file)
7858 (format #t "~a\n" file)
7859 (invoke "antlr" file))
7860 '("template.g" "angle.bracket.template.g" "action.g"
7861 "eval.g" "group.g" "interface.g")))
7862 #t)))))
7863 (native-inputs
7864 `(("antlr" ,antlr2)
7865 ("java-junit" ,java-junit)))
7866 (home-page "https://www.stringtemplate.org")
7867 (synopsis "Template engine to generate formatted text output")
7868 (description "StringTemplate is a java template engine (with ports for C#,
7869 Objective-C, JavaScript, Scala) for generating source code, web pages, emails,
7870 or any other formatted text output. StringTemplate is particularly good at
7871 code generators, multiple site skins, and internationalization / localization.
7872 StringTemplate also powers ANTLR.")
7873 (license license:bsd-3)))
7874
7875 ;; antlr3 is partially written using antlr3 grammar files. It also depends on
7876 ;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar
7877 ;; files and uses antlr3 at runtime. The latest version requires a recent version
7878 ;; of antlr3 at runtime.
7879 ;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3.
7880 ;; This version of ST4 is sufficient for the latest antlr3.
7881 ;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build
7882 ;; the latest ST4 with it. Then we build our final antlr3 that will be linked
7883 ;; against the latest ST4.
7884 ;; antlr3.3 still depends on antlr3 to generate some files, so we use an
7885 ;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses
7886 ;; only grammar files with the antlr2 syntax.
7887 ;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3.
7888
7889 (define-public java-stringtemplate
7890 (package (inherit java-stringtemplate-3)
7891 (name "java-stringtemplate")
7892 (version "4.0.8")
7893 (source (origin
7894 (method url-fetch)
7895 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/"
7896 version ".tar.gz"))
7897 (file-name (string-append name "-" version ".tar.gz"))
7898 (sha256
7899 (base32
7900 "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087"))))
7901 (build-system ant-build-system)
7902 (arguments
7903 `(#:jar-name (string-append ,name "-" ,version ".jar")
7904 #:tests? #f ; FIXME: tests fail for unknown reasons
7905 #:test-dir "test"
7906 #:modules ((guix build ant-build-system)
7907 (guix build utils)
7908 (srfi srfi-1))
7909 #:phases
7910 (modify-phases %standard-phases
7911 (add-before 'check 'fix-test-target
7912 (lambda _
7913 (substitute* "build.xml"
7914 (("\\$\\{test.home\\}/java") "${test.home}/")
7915 (("\\*Test.java") "Test*.java"))
7916 #t))
7917 (add-before 'build 'generate-grammar
7918 (lambda _
7919 (with-directory-excursion "src/org/stringtemplate/v4/compiler/"
7920 (for-each (lambda (file)
7921 (format #t "~a\n" file)
7922 (invoke "antlr3" file))
7923 '("STParser.g" "Group.g" "CodeGenerator.g")))
7924 #t)))))
7925 (inputs
7926 `(("antlr3" ,antlr3-bootstrap)
7927 ("antlr2" ,antlr2)
7928 ("java-stringtemplate" ,java-stringtemplate-3)
7929 ("java-junit" ,java-junit)))))
7930
7931 (define java-stringtemplate-4.0.6
7932 (package (inherit java-stringtemplate)
7933 (name "java-stringtemplate")
7934 (version "4.0.6")
7935 (source (origin
7936 (method url-fetch)
7937 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-"
7938 version ".tar.gz"))
7939 (file-name (string-append name "-" version ".tar.gz"))
7940 (sha256
7941 (base32
7942 "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp"))))
7943 (inputs
7944 `(("antlr3" ,antlr3-3.3)
7945 ("antlr2" ,antlr2)
7946 ("java-stringtemplate" ,java-stringtemplate-3)))))
7947
7948 (define-public antlr3
7949 (package
7950 (name "antlr3")
7951 (version "3.5.2")
7952 (source (origin
7953 (method git-fetch)
7954 (uri (git-reference
7955 (url "https://github.com/antlr/antlr3")
7956 (commit version)))
7957 (file-name (git-file-name name version))
7958 (sha256
7959 (base32
7960 "0cafavrjmzqhklghrk8c2jqxkdwxgzskm20pbrfd3r41cn00dpnf"))))
7961 (build-system ant-build-system)
7962 (arguments
7963 `(#:jar-name (string-append ,name "-" ,version ".jar")
7964 #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3"
7965 #:tests? #f
7966 #:phases
7967 (modify-phases %standard-phases
7968 (add-after 'install 'bin-install
7969 (lambda* (#:key inputs outputs #:allow-other-keys)
7970 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
7971 (bin (string-append (assoc-ref outputs "out") "/bin")))
7972 (mkdir-p bin)
7973 (with-output-to-file (string-append bin "/antlr3")
7974 (lambda _
7975 (display
7976 (string-append "#!" (which "sh") "\n"
7977 "java -cp " jar "/" ,name "-" ,version ".jar:"
7978 (string-concatenate
7979 (find-files (assoc-ref inputs "stringtemplate")
7980 ".*\\.jar"))
7981 ":"
7982 (string-concatenate
7983 (find-files (assoc-ref inputs "stringtemplate4")
7984 ".*\\.jar"))
7985 ":"
7986 (string-concatenate
7987 (find-files (string-append
7988 (assoc-ref inputs "antlr")
7989 "/lib")
7990 ".*\\.jar"))
7991 " org.antlr.Tool $*"))))
7992 (chmod (string-append bin "/antlr3") #o755))
7993 #t))
7994 (add-before 'build 'generate-grammar
7995 (lambda _
7996 (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/")
7997 (for-each (lambda (file)
7998 (display file)
7999 (newline)
8000 (invoke "antlr3" file))
8001 '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g"
8002 "AssignTokenTypesWalker.g"
8003 "ActionTranslator.g" "TreeToNFAConverter.g"
8004 "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g"
8005 "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g"))
8006 (substitute* "ANTLRParser.java"
8007 (("public Object getTree") "public GrammarAST getTree"))
8008 (substitute* "ANTLRv3Parser.java"
8009 (("public Object getTree") "public CommonTree getTree"))
8010 (chdir "../../../../../java")
8011 (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java"
8012 (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*;
8013 import org.antlr.grammar.v3.ANTLRTreePrinter;"))
8014 (substitute* "org/antlr/tool/ErrorManager.java"
8015 (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") ""))
8016 (chdir "../../../..")
8017 #t))
8018 (add-before 'build 'fix-build-xml
8019 (lambda _
8020 (substitute* "build.xml"
8021 (("target name=\"compile\">")
8022 "target name=\"compile\">
8023 <copy todir=\"${classes.dir}\">
8024 <fileset dir=\"tool/src/main/resources\">
8025 <include name=\"**/*.stg\"/>
8026 <include name=\"**/*.st\"/>
8027 <include name=\"**/*.sti\"/>
8028 <include name=\"**/STLexer.tokens\"/>
8029 </fileset>
8030 </copy>"))
8031 #t)))))
8032 (native-inputs
8033 `(("antlr" ,antlr2)
8034 ("antlr3" ,antlr3-bootstrap)))
8035 (inputs
8036 `(("junit" ,java-junit)
8037 ("stringtemplate" ,java-stringtemplate-3)
8038 ("stringtemplate4" ,java-stringtemplate)))
8039 (propagated-inputs
8040 `(("stringtemplate" ,java-stringtemplate-3)
8041 ("antlr" ,antlr2)
8042 ("stringtemplate4" ,java-stringtemplate-4.0.6)))
8043 (home-page "https://www.antlr3.org")
8044 (synopsis "Framework for constructing recognizers, compilers, and translators")
8045 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
8046 is a language tool that provides a framework for constructing recognizers,
8047 compilers, and translators from grammatical descriptions containing Java, C#,
8048 C++, or Python actions. ANTLR provides excellent support for tree construction,
8049 tree walking, and translation.")
8050 (license license:bsd-3)))
8051
8052 (define antlr3-bootstrap
8053 (package
8054 (inherit antlr3)
8055 (name "antlr3-bootstrap")
8056 (native-inputs
8057 `(("antlr" ,antlr2)
8058 ("antlr3" ,antlr3-3.3)))
8059 (inputs
8060 `(("junit" ,java-junit)))))
8061
8062 (define-public antlr3-3.3
8063 (package
8064 (inherit antlr3)
8065 (name "antlr3")
8066 (version "3.3")
8067 (source (origin
8068 (method url-fetch)
8069 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
8070 "gh-pages/download/antlr-"
8071 version ".tar.gz"))
8072 (sha256
8073 (base32
8074 "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m"))
8075 (patches
8076 (search-patches "antlr3-3_3-fix-java8-compilation.patch"))))
8077 (arguments
8078 `(#:jar-name (string-append ,name "-" ,version ".jar")
8079 #:source-dir (string-join '("tool/src/main/java"
8080 "runtime/Java/src/main/java"
8081 "tool/src/main/antlr2"
8082 "tool/src/main/antlr3")
8083 ":")
8084 #:tests? #f ; FIXME: tests seem to require maven plugin
8085 #:modules ((guix build ant-build-system)
8086 (guix build utils)
8087 (srfi srfi-1))
8088 #:phases
8089 (modify-phases %standard-phases
8090 (add-after 'install 'bin-install
8091 (lambda* (#:key inputs outputs #:allow-other-keys)
8092 (let* ((out (assoc-ref outputs "out"))
8093 (jar (string-append out "/share/java"))
8094 (bin (string-append out "/bin")))
8095 (mkdir-p bin)
8096 (with-output-to-file (string-append bin "/antlr3")
8097 (lambda _
8098 (display
8099 (string-append
8100 "#!" (which "sh") "\n"
8101 "java -cp " jar "/antlr3-3.3.jar:"
8102 (string-join
8103 (append (find-files (assoc-ref inputs "java-stringtemplate")
8104 ".*\\.jar$")
8105 (find-files (string-append (assoc-ref inputs "antlr")
8106 "/lib")
8107 ".*\\.jar$"))
8108 ":")
8109 " org.antlr.Tool $*"))))
8110 (chmod (string-append bin "/antlr3") #o755)
8111 #t)))
8112 (add-before 'build 'generate-grammar
8113 (lambda _
8114 (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java"
8115 (("import org.antlr.grammar.v2.\\*;")
8116 "import org.antlr.grammar.v2.*;\n
8117 import org.antlr.grammar.v2.TreeToNFAConverter;\n
8118 import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n
8119 import org.antlr.grammar.v2.ANTLRTreePrinter;"))
8120 (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/"
8121 (for-each (lambda (file)
8122 (format #t "~a\n" file)
8123 (invoke "antlr" file))
8124 '("antlr.g" "antlr.print.g" "assign.types.g"
8125 "buildnfa.g" "codegen.g" "define.g")))
8126 (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/"
8127 (for-each (lambda (file)
8128 (format #t "~a\n" file)
8129 (invoke "antlr3" file))
8130 '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g"
8131 "ANTLRv3Tree.g")))
8132 #t))
8133 (add-before 'build 'fix-build-xml
8134 (lambda _
8135 (substitute* "build.xml"
8136 (("target name=\"compile\">")
8137 "target name=\"compile\">
8138 <copy todir=\"${classes.dir}\">
8139 <fileset dir=\"tool/src/main/resources\">
8140 <include name=\"**/*.stg\"/>
8141 <include name=\"**/*.st\"/>
8142 <include name=\"**/*.sti\"/>
8143 <include name=\"**/STLexer.tokens\"/>
8144 </fileset>
8145 </copy>"))
8146 #t)))))
8147 (native-inputs
8148 `(("antlr" ,antlr2)
8149 ("antlr3" ,antlr3-3.1)))
8150 (inputs
8151 `(("junit" ,java-junit)))
8152 (propagated-inputs
8153 `(("java-stringtemplate" ,java-stringtemplate-3)
8154 ("antlr" ,antlr2)))))
8155
8156 (define-public antlr3-3.1
8157 (package
8158 (inherit antlr3)
8159 (version "3.1")
8160 (source (origin
8161 (method url-fetch)
8162 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
8163 "gh-pages/download/antlr-"
8164 version ".tar.gz"))
8165 (sha256
8166 (base32
8167 "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z"))
8168 (patches
8169 (search-patches "antlr3-3_1-fix-java8-compilation.patch"))))
8170 (arguments
8171 `(#:jar-name (string-append "antlr3-" ,version ".jar")
8172 #:source-dir "src:runtime/Java/src"
8173 #:tests? #f
8174 #:phases
8175 (modify-phases %standard-phases
8176 (add-after 'install 'bin-install
8177 (lambda* (#:key inputs outputs #:allow-other-keys)
8178 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
8179 (bin (string-append (assoc-ref outputs "out") "/bin")))
8180 (mkdir-p bin)
8181 (with-output-to-file (string-append bin "/antlr3")
8182 (lambda _
8183 (display
8184 (string-append "#!" (which "sh") "\n"
8185 "java -cp " jar "/antlr3-3.1.jar:"
8186 (string-concatenate
8187 (find-files (assoc-ref inputs "stringtemplate")
8188 ".*\\.jar"))
8189 ":"
8190 (string-concatenate
8191 (find-files (string-append
8192 (assoc-ref inputs "antlr")
8193 "/lib")
8194 ".*\\.jar"))
8195 " org.antlr.Tool $*"))))
8196 (chmod (string-append bin "/antlr3") #o755))
8197 #t))
8198 (add-before 'build 'generate-grammar
8199 (lambda _
8200 (let ((dir "src/org/antlr/tool/"))
8201 (for-each (lambda (file)
8202 (display file)
8203 (newline)
8204 (invoke "antlr" "-o" dir (string-append dir file)))
8205 '("antlr.g" "antlr.print.g" "assign.types.g"
8206 "buildnfa.g" "define.g")))
8207 (format #t "codegen.g\n")
8208 (invoke "antlr" "-o" "src/org/antlr/codegen"
8209 "src/org/antlr/codegen/codegen.g")
8210 #t))
8211 (add-before 'build 'fix-build-xml
8212 (lambda _
8213 (substitute* "build.xml"
8214 (("target name=\"compile\">")
8215 "target name=\"compile\">
8216 <copy todir=\"${classes.dir}\">
8217 <fileset dir=\"src\">
8218 <include name=\"**/*.stg\"/>
8219 <include name=\"**/*.st\"/>
8220 <include name=\"**/*.sti\"/>
8221 <include name=\"**/STLexer.tokens\"/>
8222 </fileset>
8223 </copy>"))
8224 #t)))))
8225 (native-inputs
8226 `(("antlr" ,antlr2)))
8227 (inputs
8228 `(("junit" ,java-junit)))
8229 (propagated-inputs
8230 `(("stringtemplate" ,java-stringtemplate-3)))))
8231
8232 (define-public java-treelayout
8233 (package
8234 (name "java-treelayout")
8235 (version "1.0.3")
8236 (source (origin
8237 (method git-fetch)
8238 (uri (git-reference
8239 (url "https://github.com/abego/treelayout")
8240 (commit (string-append "v" version))))
8241 (file-name (git-file-name name version))
8242 (sha256
8243 (base32
8244 "18my8ql9b1y0n0zrvkih7xfhf3dpgfhyfifvkcfhmwcvw3divxak"))))
8245 (build-system ant-build-system)
8246 (arguments
8247 `(#:jar-name (string-append ,name "-" ,version ".jar")
8248 #:source-dir "org.abego.treelayout/src/main/java"
8249 #:test-dir "org.abego.treelayout/src/test"))
8250 (inputs
8251 `(("java-junit" ,java-junit)))
8252 (native-inputs
8253 `(("java-hamcrest-core" ,java-hamcrest-core)))
8254 (home-page "http://treelayout.sourceforge.net")
8255 (synopsis "Tree Layout Algorithm in Java")
8256 (description "TreeLayout creates tree layouts for arbitrary trees. It is
8257 not restricted to a specific output or format, but can be used for any kind of
8258 two dimensional diagram. Examples are Swing based components, SVG files, etc.
8259 This is possible because TreeLayout separates the layout of a tree from the
8260 actual rendering.")
8261 (license license:bsd-3)))
8262
8263 (define-public java-antlr4-runtime
8264 (package
8265 (name "java-antlr4-runtime")
8266 (version "4.8")
8267 (source (origin
8268 (method git-fetch)
8269 (uri (git-reference
8270 (url "https://github.com/antlr/antlr4")
8271 (commit version)))
8272 (file-name (git-file-name name version))
8273 (sha256
8274 (base32
8275 "1qal3add26qxskm85nk7r758arladn5rcyjinmhlhznmpbbv9j8m"))
8276 (patches
8277 (search-patches "java-antlr4-Add-standalone-generator.patch"
8278 "java-antlr4-fix-code-too-large.java"))))
8279 (build-system ant-build-system)
8280 (arguments
8281 `(#:jar-name "java-antlr4-runtime.jar"
8282 #:source-dir "runtime/Java/src/org"
8283 #:tests? #f; tests depend on java-antlr4 itself
8284 #:phases
8285 (modify-phases %standard-phases
8286 (add-before 'build 'copy-resources
8287 (lambda _
8288 (copy-recursively "runtime/Java/src/main/dot"
8289 "build/classes")
8290 #t)))))
8291 (home-page "https://antlr.org")
8292 (synopsis "ANTLR runtime library")
8293 (description "This package contains the runtime library used with generated
8294 sources by ANTLR.")
8295 (license license:bsd-3)))
8296
8297 (define-public antlr4
8298 (package
8299 (inherit java-antlr4-runtime)
8300 (name "antlr4")
8301 (arguments
8302 `(#:jar-name "antlr4.jar"
8303 #:source-dir "tool/src"
8304 #:test-dir "tool-testsuite/test:runtime-testsuite/test:runtime-testsuite/annotations/src"
8305 #:test-include (list "**/Test*.java")
8306 #:test-exclude (list
8307 ;; no runnable method
8308 "**/TestOutputReading.java"
8309 ;; no @Test methods
8310 "**/TestParserErrors.java"
8311 "**/TestSemPredEvalParser.java"
8312 "**/TestSets.java"
8313 "**/TestListeners.java"
8314 "**/TestParseTrees.java"
8315 "**/TestParserExec.java"
8316 "**/TestLexerErrors.java"
8317 "**/TestPerformance.java"
8318 "**/TestCompositeParsers.java"
8319 "**/TestLexerExec.java"
8320 "**/TestSemPredEvalLexer.java"
8321 "**/TestLeftRecursion.java"
8322 "**/TestFullContextParsing.java"
8323 "**/TestCompositeLexers.java"
8324 ;; Null pointer exception
8325 "**/TestCompositeGrammars.java"
8326 ;; Wrong assumption on emoji
8327 "**/TestUnicodeData.java")
8328 #:phases
8329 (modify-phases %standard-phases
8330 (add-before 'build 'fix-build.xml
8331 (lambda _
8332 ;; tests are not in a java subdirectory
8333 (substitute* "build.xml"
8334 (("\\$\\{test.home\\}/java") "${test.home}"))
8335 #t))
8336 ;; tests require to have a working antlr4 binary
8337 (delete 'check)
8338 (add-after 'bin-install 'check
8339 (lambda _
8340 (invoke "ant" "compile-tests")
8341 (invoke "ant" "check" "-Dtest.home=runtime-testsuite/annotations/src")
8342 (invoke "ant" "check" "-Dtest.home=runtime-testsuite/test")
8343 (invoke "ant" "check" "-Dtest.home=tool-testsuite/test")
8344 #t))
8345 (add-before 'check 'remove-unrelated-languages
8346 (lambda _
8347 ;; There are tests for other languages that ANTLR can generate, but
8348 ;; we don't have the infrastructure for that yet. Let's test Java
8349 ;; generation only.
8350 (for-each
8351 (lambda (language)
8352 (delete-file-recursively
8353 (string-append "runtime-testsuite/test/org/antlr/v4/test/runtime/"
8354 language)))
8355 '("cpp" "csharp" "go" "javascript" "php" "python" "python2"
8356 "python3" "swift"))
8357 #t))
8358 (add-before 'check 'generate-test-parsers
8359 (lambda* (#:key outputs #:allow-other-keys)
8360 (define (run-antlr dir filename package)
8361 (invoke "antlr4" "-lib" dir "-visitor" "-no-listener"
8362 "-package" package (string-append dir "/" filename)
8363 "-Xlog"))
8364 (setenv "PATH" (string-append (getenv "PATH") ":"
8365 (assoc-ref outputs "out") "/bin"))
8366 (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api"
8367 "Java.g4" "org.antlr.v4.test.runtime.java.api")
8368 (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api"
8369 "VisitorBasic.g4" "org.antlr.v4.test.runtime.java.api")
8370 (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api"
8371 "VisitorCalc.g4" "org.antlr.v4.test.runtime.java.api")
8372 #t))
8373 (add-before 'check 'remove-graphemes
8374 (lambda _
8375 ;; When running antlr on grahemes.g4, we get a runtime exception:
8376 ;; set is empty. So delete the file that depends on it.
8377 (delete-file
8378 "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api/perf/TimeLexerSpeed.java")
8379 #t))
8380 (add-after 'install 'bin-install
8381 (lambda* (#:key inputs outputs #:allow-other-keys)
8382 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
8383 (bin (string-append (assoc-ref outputs "out") "/bin")))
8384 (mkdir-p bin)
8385 (with-output-to-file (string-append bin "/antlr4")
8386 (lambda _
8387 (display
8388 (string-append "#!" (which "sh") "\n"
8389 "java -cp " jar "/antlr4.jar:"
8390 (string-join
8391 (apply
8392 append
8393 (map
8394 (lambda (input)
8395 (find-files (assoc-ref inputs input)
8396 ".*\\.jar"))
8397 '("antlr3" "java-stringtemplate"
8398 "java-antlr4-runtime" "java-treelayout"
8399 "java-jsonp-api" "java-icu4j")))
8400 ":")
8401 " org.antlr.v4.Tool $*"))))
8402 (chmod (string-append bin "/antlr4") #o755)
8403 #t)))
8404 (add-before 'build 'copy-resources
8405 (lambda _
8406 (copy-recursively "tool/resources/" "build/classes")
8407 #t))
8408 (add-before 'build 'generate-unicode
8409 (lambda _
8410 ;; First: build the generator
8411 (invoke "javac" "-cp" (getenv "CLASSPATH")
8412 "tool/src/org/antlr/v4/unicode/UnicodeRenderer.java"
8413 "tool/src/org/antlr/v4/unicode/UnicodeDataTemplateController.java")
8414 ;; Then use it
8415 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8416 ":tool/src:runtime/Java")
8417 "org.antlr.v4.unicode.UnicodeRenderer"
8418 "tool/resources/org/antlr/v4/tool/templates"
8419 "unicodedata"
8420 "tool/src/org/antlr/v4/unicode/UnicodeData.java")
8421 ;; It seems there is a bug with our ST4
8422 (substitute* "tool/src/org/antlr/v4/unicode/UnicodeData.java"
8423 (("\\\\>") ">"))
8424 ;; Remove the additional file
8425 (delete-file "tool/src/org/antlr/v4/unicode/UnicodeRenderer.java")
8426 #t))
8427 (add-before 'build 'generate-grammar
8428 (lambda* (#:key inputs #:allow-other-keys)
8429 (with-directory-excursion "tool/src/org/antlr/v4/parse"
8430 (for-each (lambda (file)
8431 (display file)
8432 (newline)
8433 (invoke "antlr3" file))
8434 '("ANTLRLexer.g" "ANTLRParser.g" "BlockSetTransformer.g"
8435 "GrammarTreeVisitor.g" "ATNBuilder.g"
8436 "ActionSplitter.g" "LeftRecursiveRuleWalker.g")))
8437 (with-directory-excursion "tool/src/org/antlr/v4/codegen"
8438 (install-file "../parse/ANTLRParser.tokens" ".")
8439 (display "SourceGenTriggers.g\n")
8440 (invoke "antlr3" "SourceGenTriggers.g"))
8441 #t)))))
8442 (inputs
8443 `(("antlr3" ,antlr3)
8444 ("java-antlr4-runtime" ,java-antlr4-runtime)
8445 ("java-icu4j" ,java-icu4j)
8446 ("java-jsonp-api" ,java-jsonp-api)
8447 ("java-stringtemplate" ,java-stringtemplate)
8448 ("java-treelayout" ,java-treelayout)))
8449 (native-inputs
8450 `(("java-junit" ,java-junit)))
8451 (synopsis "Parser and lexer generator in Java")
8452 (description "ANTLR (ANother Tool for Language Recognition) is a powerful
8453 parser generator for reading, processing, executing, or translating structured
8454 text or binary files. It's widely used to build languages, tools, and
8455 frameworks. From a grammar, ANTLR generates a parser that can build and walk
8456 parse trees.")))
8457
8458 (define-public java-antlr4-runtime-4.1
8459 (package
8460 (inherit java-antlr4-runtime)
8461 (version "4.1")
8462 (source (origin
8463 (method git-fetch)
8464 (uri (git-reference
8465 (url "https://github.com/antlr/antlr4")
8466 (commit version)))
8467 (file-name (git-file-name "antlr4" version))
8468 (sha256
8469 (base32
8470 "1i8hmx5an58cjyvhji0xgpvd6lq00z1k1mjys025q2wqc25wv4c1"))))
8471 (arguments
8472 (substitute-keyword-arguments (package-arguments java-antlr4-runtime)
8473 ((#:phases phases)
8474 `(modify-phases ,phases
8475 (add-before 'configure 'chmod
8476 (lambda _
8477 (chmod "build.xml" #o644)
8478 #t))))))
8479 (inputs
8480 `(("java-treelayout" ,java-treelayout)))))
8481
8482 (define-public antlr4-4.1
8483 (package
8484 (inherit antlr4)
8485 (version (package-version java-antlr4-runtime-4.1))
8486 (source (package-source java-antlr4-runtime-4.1))
8487 (arguments
8488 (substitute-keyword-arguments (package-arguments antlr4)
8489 ((#:test-dir _)
8490 "tool/test")
8491 ((#:test-exclude excludes)
8492 `(list "**/TestParseErrors.java"
8493 "**/TestTopologicalSort.java"
8494 ,@excludes))
8495 ((#:phases phases)
8496 `(modify-phases ,phases
8497 (delete 'generate-unicode)
8498 (replace 'check
8499 (lambda _
8500 (invoke "ant" "check")
8501 #t))
8502 (add-before 'configure 'chmod
8503 (lambda _
8504 (chmod "build.xml" #o644)
8505 #t))
8506 (delete 'remove-graphemes)
8507 (delete 'remove-unrelated-languages)
8508 (delete 'generate-test-parsers)))))
8509 (inputs
8510 (alist-replace
8511 "java-antlr4-runtime" (list java-antlr4-runtime-4.1)
8512 (package-inputs antlr4)))))
8513
8514 (define-public java-tunnelvisionlabs-antlr4-runtime-annotations
8515 (package
8516 (inherit java-antlr4-runtime)
8517 (name "java-tunnelvisionlabs-antlr4-runtime-annotations")
8518 (version "4.7.4")
8519 (source (origin
8520 (method git-fetch)
8521 (uri (git-reference
8522 (url "https://github.com/tunnelvisionlabs/antlr4")
8523 (commit (string-append version "-opt"))))
8524 (file-name (git-file-name "java-tunnelvisionlabs-antlr4" version))
8525 (sha256
8526 (base32
8527 "1mf2lvvsszpialsk23ma83pwp50nd32lrbjpa847zlm5gmranbr8"))
8528 (patches
8529 (search-patches "java-antlr4-Add-standalone-generator.patch"
8530 "java-tunnelvisionlabs-antlr-code-too-large.patch"))))
8531 (arguments
8532 `(#:jar-name "java-antlr4-runtime-annotations.jar"
8533 #:source-dir "runtime/JavaAnnotations/src"
8534 #:tests? #f; no tests
8535 #:phases
8536 (modify-phases %standard-phases
8537 (add-after 'build 'copy-resources
8538 (lambda _
8539 (copy-recursively "runtime/JavaAnnotations/resources"
8540 "build/classes")
8541 #t))
8542 (add-after 'copy-resources 'rebuild-jar
8543 (lambda _
8544 (invoke "ant" "jar")
8545 #t)))))
8546 (inputs '())
8547 (native-inputs '())
8548 (synopsis "Annotations for ANTLR's runtime library")
8549 (description "This package contains annotations used during the build of
8550 the runtime library of ANTLR.")))
8551
8552 ;; the runtime of this library requires a lexer that is generated by antlr4.
8553 ;; However, antlr4 itself requires this library at build and run-time. We
8554 ;; use antlr4@4.1, the closest version of antlr that doesn't need this
8555 ;; bootstrap process, to generate the lexer. The generated lexer is built
8556 ;; for the 4.1 runtime, which is slightly different from this runtime.
8557 ;; So, we build the runtime with antlr 4.1, with a broken xml lexer, that we
8558 ;; use to build antlr4. We then re-use this antlr4 to build the runtime, and
8559 ;; the proper, working, runtime to build antlr4 again.
8560 (define java-tunnelvisionlabs-antlr4-runtime-bootstrap
8561 (package
8562 (inherit java-antlr4-runtime)
8563 (name "java-tunnelvisionlabs-antlr4-runtime")
8564 (version (package-version java-tunnelvisionlabs-antlr4-runtime-annotations))
8565 (source (package-source java-tunnelvisionlabs-antlr4-runtime-annotations))
8566 (arguments
8567 `(#:jar-name "java-antlr4-runtime.jar"
8568 #:source-dir "runtime/Java/src"
8569 #:tests? #f; tests require antlr4, but antlr4 depends on this package
8570 #:phases
8571 (modify-phases %standard-phases
8572 (add-before 'build 'generate-xpath-lexer
8573 (lambda _
8574 (invoke "antlr4" "-lib" "runtime/Java/src/org/antlr/v4/runtime/tree/xpath"
8575 "-visitor" "-no-listener"
8576 "-package" "org.antlr.v4.runtime.tree.xpath"
8577 "runtime/Java/src/org/antlr/v4/runtime/tree/xpath/XPathLexer.g4")
8578 ;; Generated code is for an incompatible version of the runtime
8579 (substitute* "runtime/Java/src/org/antlr/v4/runtime/tree/xpath/XPathLexer.java"
8580 (("LexerATNSimulator\\(this,_ATN,_decisionToDFA,_sharedContextCache\\)")
8581 "LexerATNSimulator(this,_ATN)"))
8582 #t))
8583 (add-before 'build 'copy-resources
8584 (lambda _
8585 (copy-recursively "runtime/Java/src/main/dot"
8586 "build/classes")
8587 #t)))))
8588 (native-inputs
8589 `(("antlr4" ,antlr4-4.1)
8590 ("java-tunnelvisionlabs-antlr4-runtime-annotations"
8591 ,java-tunnelvisionlabs-antlr4-runtime-annotations)))))
8592
8593 (define java-tunnelvisionlabs-antlr4-bootstrap
8594 (package
8595 (inherit antlr4)
8596 (name "java-tunnelvisionlabs-antlr4")
8597 (version (package-version java-tunnelvisionlabs-antlr4-runtime-annotations))
8598 (source (package-source java-tunnelvisionlabs-antlr4-runtime-annotations))
8599 (arguments
8600 (substitute-keyword-arguments (package-arguments antlr4)
8601 ((#:test-dir _)
8602 "tool/test:runtime-testsuite/src")
8603 ((#:phases phases)
8604 `(modify-phases ,phases
8605 (delete 'remove-unrelated-languages)
8606 (delete 'remove-graphemes)
8607 (delete 'generate-test-parsers)
8608 (delete 'check)))))
8609 (native-inputs '())
8610 (inputs
8611 `(("antlr3" ,antlr3)
8612 ("java-antlr4-runtime" ,java-tunnelvisionlabs-antlr4-runtime-bootstrap)
8613 ("java-tunnelvisionlabs-antlr4-runtime-annotations"
8614 ,java-tunnelvisionlabs-antlr4-runtime-annotations)
8615 ("java-icu4j" ,java-icu4j)
8616 ("java-jsonp-api" ,java-jsonp-api)
8617 ("java-stringtemplate" ,java-stringtemplate)
8618 ("java-treelayout" ,java-treelayout)))))
8619
8620 (define-public java-tunnelvisionlabs-antlr4-runtime
8621 (package
8622 (inherit java-tunnelvisionlabs-antlr4-runtime-bootstrap)
8623 (native-inputs
8624 (alist-replace
8625 "antlr4" (list java-tunnelvisionlabs-antlr4-bootstrap)
8626 (package-native-inputs java-tunnelvisionlabs-antlr4-runtime-bootstrap)))))
8627
8628 (define-public java-tunnelvisionlabs-antlr4
8629 (package
8630 (inherit java-tunnelvisionlabs-antlr4-bootstrap)
8631 (inputs
8632 (alist-replace
8633 "java-antlr4-runtime" (list java-tunnelvisionlabs-antlr4-runtime)
8634 (package-inputs java-tunnelvisionlabs-antlr4-bootstrap)))))
8635
8636 (define-public java-commons-cli-1.2
8637 ;; This is a bootstrap dependency for Maven2.
8638 (package
8639 (inherit java-commons-cli)
8640 (version "1.2")
8641 (source (origin
8642 (method url-fetch)
8643 (uri (string-append "mirror://apache/commons/cli/source/"
8644 "commons-cli-" version "-src.tar.gz"))
8645 (sha256
8646 (base32
8647 "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm"))))
8648 (arguments
8649 `(#:jar-name "commons-cli.jar"
8650 #:phases
8651 (modify-phases %standard-phases
8652 (add-before 'check 'fix-build-xml
8653 (lambda* (#:key inputs #:allow-other-keys)
8654 (substitute* "build.xml"
8655 (("dir=\"\\$\\{test.home\\}/java\"")
8656 "dir=\"${test.home}\""))
8657 #t)))))
8658 (native-inputs
8659 `(("java-junit" ,java-junit)))))
8660
8661 (define-public java-microemulator-cldc
8662 (package
8663 (name "java-microemulator-cldc")
8664 (version "2.0.4")
8665 (source (origin
8666 (method url-fetch)
8667 (uri (string-append "https://github.com/barteo/microemu/archive/"
8668 "microemulator_"
8669 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
8670 version)
8671 ".tar.gz"))
8672 (file-name (string-append name "-" version ".tar.gz"))
8673 (sha256
8674 (base32
8675 "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll"))))
8676 (build-system ant-build-system)
8677 (arguments
8678 `(#:jar-name "microemulator-cldc.jar"
8679 #:source-dir "microemu-cldc/src/main/java"
8680 #:tests? #f)); Requires even older software
8681 (home-page "https://github.com/barteo/microemu")
8682 (synopsis "J2ME CLDC emulator")
8683 (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP
8684 Emulator. It demonstrates MIDlet based applications in web browser
8685 applet and can be run as a standalone java application.")
8686 (license (list license:asl2.0
8687 ;; or altenatively:
8688 license:lgpl2.1+))))
8689
8690 (define-public java-datanucleus-javax-persistence
8691 (package
8692 (name "java-datanucleus-javax-persistence")
8693 (version "2.2.0")
8694 (source (origin
8695 (method url-fetch)
8696 (uri (string-append "https://github.com/datanucleus/"
8697 "javax.persistence/archive/javax.persistence-"
8698 version "-release.tar.gz"))
8699 (sha256
8700 (base32
8701 "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx"))))
8702 (build-system ant-build-system)
8703 (arguments
8704 `(#:jar-name "java-datanucleus-javax-persistence.jar"
8705 #:jdk ,icedtea-8
8706 #:source-dir "src/main/java"
8707 #:tests? #f)); no tests
8708 (home-page "https://github.com/datanucleus/javax.persistence")
8709 (synopsis "JPA API")
8710 (description "This package contains a clean definition of JPA API intended
8711 for use with DataNucleus JPA since the JCP haven't provided an official JPA API
8712 jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification
8713 used to generate this API.")
8714 (license (list license:edl1.0 license:epl1.0))))
8715
8716 (define-public java-osgi-cmpn
8717 (package
8718 (name "java-osgi-cmpn")
8719 (version "6.0.0")
8720 (source (origin
8721 (method url-fetch)
8722 (uri (string-append "https://repo1.maven.org/maven2/"
8723 "org/osgi/osgi.cmpn/" version "/osgi.cmpn-"
8724 version "-sources.jar"))
8725 (sha256
8726 (base32
8727 "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys"))))
8728 (build-system ant-build-system)
8729 (arguments
8730 `(#:jar-name "osgi-cmpn.jar"
8731 #:tests? #f)); no tests
8732 (inputs
8733 `(("annotation" ,java-osgi-annotation)
8734 ("core" ,java-osgi-core)
8735 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
8736 ("microemulator" ,java-microemulator-cldc)
8737 ("servlet" ,java-classpathx-servletapi)))
8738 (home-page "https://www.osgi.org")
8739 (synopsis "Compendium specification module of OSGi framework")
8740 (description
8741 "OSGi, for Open Services Gateway initiative framework, is a module system
8742 and service platform for the Java programming language. This package contains
8743 the compendium specification module, providing interfaces and classes for use
8744 in compiling bundles.")
8745 (license license:asl2.0)))
8746
8747 (define-public java-osgi-service-component-annotations
8748 (package
8749 (name "java-osgi-service-component-annotations")
8750 (version "1.3.0")
8751 (source (origin
8752 (method url-fetch)
8753 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8754 "org.osgi.service.component.annotations/"
8755 version "/org.osgi.service.component.annotations-"
8756 version "-sources.jar"))
8757 (sha256
8758 (base32
8759 "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0"))))
8760 (build-system ant-build-system)
8761 (arguments
8762 `(#:jar-name "osgi-service-component-annotations.jar"
8763 #:tests? #f)); no tests
8764 (inputs
8765 `(("annotation" ,java-osgi-annotation)))
8766 (home-page "https://www.osgi.org")
8767 (synopsis "Support annotations for osgi-service-component")
8768 (description
8769 "OSGi, for Open Services Gateway initiative framework, is a module system
8770 and service platform for the Java programming language. This package contains
8771 the support annotations for osgi-service-component.")
8772 (license license:asl2.0)))
8773
8774 (define-public java-osgi-dto
8775 (package
8776 (name "java-osgi-dto")
8777 (version "1.0.0")
8778 (source (origin
8779 (method url-fetch)
8780 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8781 "org.osgi.dto/" version "/org.osgi.dto-"
8782 version "-sources.jar"))
8783 (sha256
8784 (base32
8785 "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr"))))
8786 (build-system ant-build-system)
8787 (arguments
8788 `(#:jar-name "osgi-dto.jar"
8789 #:tests? #f)); no tests
8790 (inputs
8791 `(("annotation" ,java-osgi-annotation)))
8792 (home-page "https://www.osgi.org")
8793 (synopsis "Data Transfer Objects")
8794 (description
8795 "OSGi, for Open Services Gateway initiative framework, is a module system
8796 and service platform for the Java programming language. This package contains
8797 the Data Transfer Objects. It is easily serializable having only public fields
8798 of primitive types and their wrapper classes, Strings, and DTOs. List, Set,
8799 Map and array aggregates may also be used. The aggregates must only hold
8800 objects of the listed types or aggregates.")
8801 (license license:asl2.0)))
8802
8803 (define-public java-osgi-resource
8804 (package
8805 (name "java-osgi-resource")
8806 (version "1.0.0")
8807 (source (origin
8808 (method url-fetch)
8809 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8810 "org.osgi.resource/"
8811 version "/org.osgi.resource-"
8812 version "-sources.jar"))
8813 (sha256
8814 (base32
8815 "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d"))))
8816 (build-system ant-build-system)
8817 (arguments
8818 `(#:jar-name "osgi-resource.jar"
8819 #:tests? #f)); no tests
8820 (inputs
8821 `(("annotation" ,java-osgi-annotation)
8822 ("dto" ,java-osgi-dto)))
8823 (home-page "https://www.osgi.org")
8824 (synopsis "OSGI Resource")
8825 (description
8826 "OSGi, for Open Services Gateway initiative framework, is a module system
8827 and service platform for the Java programming language. This package contains
8828 the definition of common types in osgi packages.")
8829 (license license:asl2.0)))
8830
8831 (define-public java-osgi-namespace-contract
8832 (package
8833 (name "java-osgi-namespace-contract")
8834 (version "1.0.0")
8835 (source (origin
8836 (method url-fetch)
8837 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8838 "org.osgi.namespace.contract/"
8839 version "/org.osgi.namespace.contract-"
8840 version "-sources.jar"))
8841 (sha256
8842 (base32
8843 "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36"))))
8844 (build-system ant-build-system)
8845 (inputs
8846 `(("resource" ,java-osgi-resource)
8847 ("annotation" ,java-osgi-annotation)))
8848 (arguments
8849 `(#:jar-name "osgi-namespace-contract.jar"
8850 #:tests? #f)); no tests
8851 (home-page "https://www.osgi.org")
8852 (synopsis "Contract Capability and Requirement Namespace")
8853 (description
8854 "OSGi, for Open Services Gateway initiative framework, is a module system
8855 and service platform for the Java programming language. This package contains
8856 the names for the attributes and directives for a namespace with contracts.")
8857 (license license:asl2.0)))
8858
8859 (define-public java-osgi-namespace-extender
8860 (package
8861 (name "java-osgi-namespace-extender")
8862 (version "1.0.1")
8863 (source (origin
8864 (method url-fetch)
8865 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8866 "org.osgi.namespace.extender/"
8867 version "/org.osgi.namespace.extender-"
8868 version "-sources.jar"))
8869 (sha256
8870 (base32
8871 "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz"))))
8872 (build-system ant-build-system)
8873 (inputs
8874 `(("resource" ,java-osgi-resource)
8875 ("annotation" ,java-osgi-annotation)))
8876 (arguments
8877 `(#:jar-name "osgi-namespace-extendent.jar"
8878 #:tests? #f)); no tests
8879 (home-page "https://www.osgi.org")
8880 (synopsis "Extender Capability and Requirement Namespace")
8881 (description
8882 "OSGi, for Open Services Gateway initiative framework, is a module system
8883 and service platform for the Java programming language. This package contains
8884 the names for the attributes and directives for an extender namespace.")
8885 (license license:asl2.0)))
8886
8887 (define-public java-osgi-namespace-service
8888 (package
8889 (name "java-osgi-namespace-service")
8890 (version "1.0.0")
8891 (source (origin
8892 (method url-fetch)
8893 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8894 "org.osgi.namespace.service/"
8895 version "/org.osgi.namespace.service-"
8896 version "-sources.jar"))
8897 (sha256
8898 (base32
8899 "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8"))))
8900 (build-system ant-build-system)
8901 (inputs
8902 `(("resource" ,java-osgi-resource)
8903 ("annotation" ,java-osgi-annotation)))
8904 (arguments
8905 `(#:jar-name "osgi-namespace-service.jar"
8906 #:tests? #f)); no tests
8907 (home-page "https://www.osgi.org")
8908 (synopsis "Service Capability and Requirement Namespace")
8909 (description
8910 "OSGi, for Open Services Gateway initiative framework, is a module system
8911 and service platform for the Java programming language. This package contains
8912 the names for the attributes and directives for a service namespace.")
8913 (license license:asl2.0)))
8914
8915 (define-public java-osgi-util-function
8916 (package
8917 (name "java-osgi-util-function")
8918 (version "1.0.0")
8919 (source (origin
8920 (method url-fetch)
8921 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8922 "org.osgi.util.function/"
8923 version "/org.osgi.util.function-"
8924 version "-sources.jar"))
8925 (sha256
8926 (base32
8927 "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x"))))
8928 (build-system ant-build-system)
8929 (arguments
8930 `(#:jar-name "osgi-util-function.jar"
8931 #:tests? #f)); no tests
8932 (inputs
8933 `(("annotation" ,java-osgi-annotation)))
8934 (home-page "https://www.osgi.org")
8935 (synopsis "OSGI Util Function")
8936 (description
8937 "OSGi, for Open Services Gateway initiative framework, is a module system
8938 and service platform for the Java programming language. This package contains
8939 an interface for a function that accepts a single argument and produces a result.")
8940 (license license:asl2.0)))
8941
8942 (define-public java-osgi-util-promise
8943 (package
8944 (name "java-osgi-util-promise")
8945 (version "1.0.0")
8946 (source (origin
8947 (method url-fetch)
8948 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8949 "org.osgi.util.promise/"
8950 version "/org.osgi.util.promise-"
8951 version "-sources.jar"))
8952 (sha256
8953 (base32
8954 "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c"))))
8955 (build-system ant-build-system)
8956 (arguments
8957 `(#:jar-name "osgi-util-promise.jar"
8958 #:tests? #f)); no tests
8959 (inputs
8960 `(("annotation" ,java-osgi-annotation)
8961 ("function" ,java-osgi-util-function)))
8962 (home-page "https://www.osgi.org")
8963 (synopsis "Promise of a value")
8964 (description
8965 "OSGi, for Open Services Gateway initiative framework, is a module system
8966 and service platform for the Java programming language. This package contains
8967 an interface and utilitary classes for promises. A Promise represents a future
8968 value. It handles the interactions for asynchronous processing.")
8969 (license license:asl2.0)))
8970
8971 (define-public java-osgi-service-metatype-annotations
8972 (package
8973 (name "java-osgi-service-metatype-annotations")
8974 (version "1.3.0")
8975 (source (origin
8976 (method url-fetch)
8977 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8978 "org.osgi.service.metatype.annotations/"
8979 version "/org.osgi.service.metatype.annotations-"
8980 version "-sources.jar"))
8981 (sha256
8982 (base32
8983 "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6"))))
8984 (build-system ant-build-system)
8985 (arguments
8986 `(#:jar-name "osgi-service-metatype-annotations.jar"
8987 #:tests? #f)); no tests
8988 (inputs
8989 `(("annotation" ,java-osgi-annotation)))
8990 (home-page "https://www.osgi.org")
8991 (synopsis "Support annotations for metatype")
8992 (description
8993 "OSGi, for Open Services Gateway initiative framework, is a module system
8994 and service platform for the Java programming language. This package contains
8995 the support annotations for metatype.")
8996 (license license:asl2.0)))
8997
8998 (define-public java-osgi-service-repository
8999 (package
9000 (name "java-osgi-service-repository")
9001 (version "1.1.0")
9002 (source (origin
9003 (method url-fetch)
9004 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9005 "org.osgi.service.repository/"
9006 version "/org.osgi.service.repository-"
9007 version "-sources.jar"))
9008 (sha256
9009 (base32
9010 "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n"))))
9011 (build-system ant-build-system)
9012 (arguments
9013 `(#:jar-name "osgi-service-repository.jar"
9014 #:tests? #f)); no tests
9015 (inputs
9016 `(("annotation" ,java-osgi-annotation)
9017 ("promise" ,java-osgi-util-promise)
9018 ("resource" ,java-osgi-resource)))
9019 (home-page "https://www.osgi.org")
9020 (synopsis "OSGI service repository")
9021 (description
9022 "OSGi, for Open Services Gateway initiative framework, is a module system
9023 and service platform for the Java programming language. This package contains
9024 a repository service that contains resources.")
9025 (license license:asl2.0)))
9026
9027 (define-public java-osgi-framework
9028 (package
9029 (name "java-osgi-framework")
9030 (version "1.8.0")
9031 (source (origin
9032 (method url-fetch)
9033 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9034 "org.osgi.framework/" version "/org.osgi.framework-"
9035 version "-sources.jar"))
9036 (sha256
9037 (base32
9038 "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s"))))
9039 (build-system ant-build-system)
9040 (arguments
9041 `(#:jar-name "osgi-framework.jar"
9042 #:tests? #f)); no tests
9043 (inputs
9044 `(("annotation" ,java-osgi-annotation)
9045 ("resource" ,java-osgi-resource)
9046 ("dto" ,java-osgi-dto)))
9047 (home-page "https://www.osgi.org")
9048 (synopsis "OSGi framework")
9049 (description
9050 "OSGi, for Open Services Gateway initiative framework, is a module system
9051 and service platform for the Java programming language.")
9052 (license license:asl2.0)))
9053
9054 (define-public java-osgi-service-log
9055 (package
9056 (name "java-osgi-service-log")
9057 (version "1.3.0")
9058 (source (origin
9059 (method url-fetch)
9060 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9061 "org.osgi.service.log/"
9062 version "/org.osgi.service.log-"
9063 version "-sources.jar"))
9064 (sha256
9065 (base32
9066 "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0"))))
9067 (build-system ant-build-system)
9068 (arguments
9069 `(#:jar-name "osgi-service-log.jar"
9070 #:tests? #f)); no tests
9071 (inputs
9072 `(("java-osgi-framework" ,java-osgi-framework)))
9073 (home-page "https://www.osgi.org")
9074 (synopsis "Provides methods for bundles to write messages to the log")
9075 (description
9076 "OSGi, for Open Services Gateway initiative framework, is a module system
9077 and service platform for the Java programming language. This package contains
9078 the log service.")
9079 (license license:asl2.0)))
9080
9081 (define-public java-osgi-service-jdbc
9082 (package
9083 (name "java-osgi-service-jdbc")
9084 (version "1.0.0")
9085 (source (origin
9086 (method url-fetch)
9087 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9088 "org.osgi.service.jdbc/"
9089 version "/org.osgi.service.jdbc-"
9090 version "-sources.jar"))
9091 (sha256
9092 (base32
9093 "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz"))))
9094 (build-system ant-build-system)
9095 (arguments
9096 `(#:jar-name "osgi-service-jdbc.jar"
9097 #:tests? #f)); no tests
9098 (home-page "https://www.osgi.org")
9099 (synopsis "Factory for JDBC connection factories")
9100 (description
9101 "OSGi, for Open Services Gateway initiative framework, is a module system
9102 and service platform for the Java programming language. This package contains
9103 a factory for JDBC connection factories. There are 3 preferred connection
9104 factories for getting JDBC connections:
9105
9106 @itemize
9107 @item @code{javax.sql.DataSource};
9108 @item @code{javax.sql.ConnectionPoolDataSource};
9109 @item @code{javax.sql.XADataSource}.
9110 @end itemize")
9111 (license license:asl2.0)))
9112
9113 (define-public java-osgi-service-resolver
9114 (package
9115 (name "java-osgi-service-resolver")
9116 (version "1.0.1")
9117 (source (origin
9118 (method url-fetch)
9119 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9120 "org.osgi.service.resolver/"
9121 version "/org.osgi.service.resolver-"
9122 version "-sources.jar"))
9123 (sha256
9124 (base32
9125 "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd"))))
9126 (build-system ant-build-system)
9127 (arguments
9128 `(#:jar-name "osgi-service-resolver.jar"
9129 #:tests? #f)); no tests
9130 (inputs
9131 `(("annotation" ,java-osgi-annotation)
9132 ("resource" ,java-osgi-resource)))
9133 (home-page "https://www.osgi.org")
9134 (synopsis "OSGI Resolver service")
9135 (description
9136 "OSGi, for Open Services Gateway initiative framework, is a module system
9137 and service platform for the Java programming language. This package contains
9138 a resolver service that resolves the specified resources in the context supplied
9139 by the caller.")
9140 (license license:asl2.0)))
9141
9142 (define-public java-osgi-util-tracker
9143 (package
9144 (name "java-osgi-util-tracker")
9145 (version "1.5.1")
9146 (source (origin
9147 (method url-fetch)
9148 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9149 "org.osgi.util.tracker/"
9150 version "/org.osgi.util.tracker-"
9151 version "-sources.jar"))
9152 (sha256
9153 (base32
9154 "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz"))))
9155 (build-system ant-build-system)
9156 (arguments
9157 `(#:jar-name "osgi-util-tracker.jar"
9158 #:tests? #f)); no tests
9159 (inputs
9160 `(("framework" ,java-osgi-framework)
9161 ("annotation" ,java-osgi-annotation)))
9162 (home-page "https://www.osgi.org")
9163 (synopsis "Bundle tracking")
9164 (description
9165 "OSGi, for Open Services Gateway initiative framework, is a module system
9166 and service platform for the Java programming language. This package contains
9167 bundle tracking utility classes.")
9168 (license license:asl2.0)))
9169
9170 (define-public java-osgi-service-cm
9171 (package
9172 (name "java-osgi-service-cm")
9173 (version "1.5.0")
9174 (source (origin
9175 (method url-fetch)
9176 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9177 "org.osgi.service.cm/"
9178 version "/org.osgi.service.cm-"
9179 version "-sources.jar"))
9180 (sha256
9181 (base32
9182 "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6"))))
9183 (build-system ant-build-system)
9184 (arguments
9185 `(#:jar-name "osgi-service-cm.jar"
9186 #:tests? #f)); no tests
9187 (inputs
9188 `(("framework" ,java-osgi-framework)
9189 ("annotation" ,java-osgi-annotation)))
9190 (home-page "https://www.osgi.org")
9191 (synopsis "OSGI Configuration Management")
9192 (description
9193 "OSGi, for Open Services Gateway initiative framework, is a module system
9194 and service platform for the Java programming language. This package contains
9195 utility classes for the configuration of services.")
9196 (license license:asl2.0)))
9197
9198 (define-public java-osgi-service-packageadmin
9199 (package
9200 (name "java-osgi-service-packageadmin")
9201 (version "1.2.0")
9202 (source (origin
9203 (method url-fetch)
9204 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9205 "org.osgi.service.packageadmin/"
9206 version "/org.osgi.service.packageadmin-"
9207 version "-sources.jar"))
9208 (sha256
9209 (base32
9210 "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52"))))
9211 (build-system ant-build-system)
9212 (arguments
9213 `(#:jar-name "osgi-service-packageadmin.jar"
9214 #:tests? #f)); no tests
9215 (inputs
9216 `(("framework" ,java-osgi-framework)))
9217 (home-page "https://www.osgi.org")
9218 (synopsis "OSGI Package Administration")
9219 (description
9220 "OSGi, for Open Services Gateway initiative framework, is a module system
9221 and service platform for the Java programming language. This package contains
9222 the packageadmin service.")
9223 (license license:asl2.0)))
9224
9225 (define-public java-ops4j-base-lang
9226 (package
9227 (name "java-ops4j-base-lang")
9228 (version "1.5.0")
9229 (source (origin
9230 (method url-fetch)
9231 (uri (string-append "https://github.com/ops4j/org.ops4j.base/"
9232 "archive/base-" version ".tar.gz"))
9233 (sha256
9234 (base32
9235 "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw"))))
9236 (build-system ant-build-system)
9237 (arguments
9238 `(#:jar-name "java-ops4j-base-lang.jar"
9239 #:source-dir "ops4j-base-lang/src/main/java"
9240 #:tests? #f; no tests
9241 #:phases
9242 (modify-phases %standard-phases
9243 (add-before 'build 'add-test-file
9244 (lambda _
9245 ;; That file is required by a test in ops4j-pax-exam-core-spi
9246 (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang")
9247 (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties"
9248 (lambda _
9249 (display
9250 (string-append
9251 "version=" ,version "\n"
9252 "groupId=org.ops4j.base"
9253 "artifactId=ops4j-base-lang\n"))))
9254 #t)))))
9255 (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview")
9256 (synopsis "Utility classes and extensions to be used in OPS4J projects")
9257 (description "OPS4J stands for Open Participation Software for Java. This
9258 package contains utilities and extensions related to @code{java.lang}.")
9259 (license license:asl2.0)))
9260
9261 (define-public java-ops4j-base-monitors
9262 (package
9263 (inherit java-ops4j-base-lang)
9264 (name "java-ops4j-base-monitors")
9265 (arguments
9266 `(#:jar-name "java-ops4j-base-monitors.jar"
9267 #:source-dir "ops4j-base-monitors/src/main/java"
9268 #:tests? #f)); no tests
9269 (inputs
9270 `(("lang" ,java-ops4j-base-lang)))
9271 (description "OPS4J stands for Open Participation Software for Java. This
9272 package contains utilities and extensions related to monitoring.")))
9273
9274 (define-public java-ops4j-base-io
9275 (package
9276 (inherit java-ops4j-base-lang)
9277 (name "java-ops4j-base-io")
9278 (arguments
9279 `(#:jar-name "java-ops4j-base-io.jar"
9280 #:source-dir "ops4j-base-io/src/main/java"
9281 #:test-dir "ops4j-base-io/src/test"
9282 #:test-exclude
9283 (list "**/ListerTest.java")))
9284 (inputs
9285 `(("lang" ,java-ops4j-base-monitors)
9286 ("lang" ,java-ops4j-base-lang)))
9287 (native-inputs
9288 `(("junit" ,java-junit)
9289 ("hamcrest" ,java-hamcrest-core)))
9290 (description "OPS4J stands for Open Participation Software for Java. This
9291 package contains utilities and extensions related to handling streams and files.")))
9292
9293 (define-public java-ops4j-base-util
9294 (package
9295 (inherit java-ops4j-base-lang)
9296 (name "java-ops4j-base-util")
9297 (arguments
9298 `(#:jar-name "java-ops4j-base-util.jar"
9299 #:source-dir "ops4j-base-util/src/main/java"
9300 #:test-dir "ops4j-base-util/src/test"))
9301 (inputs
9302 `(("lang" ,java-ops4j-base-lang)))
9303 (native-inputs
9304 `(("junit" ,java-junit)))
9305 (description "OPS4J stands for Open Participation Software for Java. This
9306 package contains utilities and extensions related to environment, i18n and
9307 mime types.")))
9308
9309 (define-public java-ops4j-base-util-property
9310 (package
9311 (inherit java-ops4j-base-lang)
9312 (name "java-ops4j-base-util-property")
9313 (arguments
9314 `(#:jar-name "java-ops4j-base-util-property.jar"
9315 #:source-dir "ops4j-base-util-property/src/main/java"
9316 #:tests? #f)); no tests
9317 (inputs
9318 `(("lang" ,java-ops4j-base-lang)
9319 ("util" ,java-ops4j-base-util)))
9320 (description "OPS4J stands for Open Participation Software for Java. This
9321 package contains utilities and extensions related to resolving properties from
9322 different sources.")))
9323
9324 (define-public java-ops4j-base-store
9325 (package
9326 (inherit java-ops4j-base-lang)
9327 (name "java-ops4j-base-store")
9328 (arguments
9329 `(#:jar-name "java-ops4j-base-store.jar"
9330 #:source-dir "ops4j-base-store/src/main/java"
9331 #:tests? #f)); no tests
9332 (inputs
9333 `(("lang" ,java-ops4j-base-lang)
9334 ("slf4j" ,java-slf4j-api)
9335 ("io" ,java-ops4j-base-io)))
9336 (description "OPS4J stands for Open Participation Software for Java. This
9337 package contains utilities for storing and retrieving data from an
9338 @code{InputStream}.")))
9339
9340 (define-public java-ops4j-base-spi
9341 (package
9342 (inherit java-ops4j-base-lang)
9343 (name "java-ops4j-base-spi")
9344 (arguments
9345 `(#:jar-name "java-ops4j-base-spi.jar"
9346 #:source-dir "ops4j-base-spi/src/main/java"
9347 #:test-dir "ops4j-base-spi/src/test"))
9348 (native-inputs
9349 `(("junit" ,java-junit)
9350 ("hamcrest" ,java-hamcrest-core)))
9351 (description "OPS4J stands for Open Participation Software for Java. This
9352 package contains utilities for obtaining services via the Java SE 6
9353 @code{ServiceLoader}.")))
9354
9355 (define-public java-aqute-bnd-annotation
9356 (package
9357 (name "java-aqute-bnd-annotation")
9358 (version "3.5.0")
9359 (source (origin
9360 (method url-fetch)
9361 (uri (string-append "https://github.com/bndtools/bnd/archive/"
9362 version ".REL.tar.gz"))
9363 (file-name (string-append name "-" version ".tar.gz"))
9364 (sha256
9365 (base32
9366 "1ggyiq0as0f6cz333a0dh98j72kmvv5pf2s47v9554yh905lfqdl"))))
9367 (build-system ant-build-system)
9368 (arguments
9369 `(#:jar-name "java-aqute-bnd-annotation.jar"
9370 #:source-dir "biz.aQute.bnd.annotation/src"
9371 #:tests? #f)); empty test dir
9372 (home-page "https://bnd.bndtools.org/")
9373 (synopsis "Tools for OSGi")
9374 (description "Bnd is a swiss army knife for OSGi, it creates manifest
9375 headers based on analyzing the class code, it verifies the project settings,
9376 it manages project dependencies, gives diffs jars, and much more.")
9377 (license license:asl2.0)))
9378
9379 (define-public java-aqute-libg
9380 (package
9381 (inherit java-aqute-bnd-annotation)
9382 (name "java-aqute-libg")
9383 (arguments
9384 `(#:jar-name "java-aqute-libg.jar"
9385 ;; The build fails when source/target more recent than 1.7. This
9386 ;; is a known issue. See: https://github.com/bndtools/bnd/issues/1327
9387 ;;
9388 ;; It is closed as won't fix. There is no way to change the source
9389 ;; so that it works on 1.8, and still works on 1.6, the upstream
9390 ;; target. It work fine on 1.7, so we use 1.7.
9391 #:make-flags (list "-Dant.build.javac.source=1.7"
9392 "-Dant.build.javac.target=1.7")
9393 #:phases
9394 (modify-phases %standard-phases
9395 (add-before 'configure 'chdir
9396 ;; Change to aQute.libg directory, so that the relative
9397 ;; paths in the tests aren't broken.
9398 (lambda _
9399 (chdir "aQute.libg")
9400 #t))
9401 (add-before 'check 'create-test-directory
9402 ;; Copy the test directory to test/java, since that's where
9403 ;; ant-build-system's default project in build.xml expects to find
9404 ;; the test classes. Leave a copy in the original place to not
9405 ;; break paths in tests.
9406 (lambda _
9407 (mkdir "src/test")
9408 (copy-recursively "test" "src/test/java")
9409 #t)))))
9410 (inputs
9411 `(("slf4j" ,java-slf4j-api)
9412 ("osgi-annot" ,java-osgi-annotation)
9413 ("java-osgi-cmpn" ,java-osgi-cmpn)
9414 ("osgi" ,java-osgi-core)))
9415 (native-inputs
9416 `(("hamcrest" ,java-hamcrest-core)
9417 ("java-junit" ,java-junit)))))
9418
9419 (define-public java-aqute-bndlib
9420 (package
9421 (inherit java-aqute-bnd-annotation)
9422 (name "java-aqute-bndlib")
9423 (arguments
9424 `(#:jar-name "java-bndlib.jar"
9425 #:source-dir "biz.aQute.bndlib/src"
9426 #:tests? #f)); no tests
9427 (inputs
9428 `(("slf4j" ,java-slf4j-api)
9429 ("osgi-annot" ,java-osgi-annotation)
9430 ("java-aqute-libg" ,java-aqute-libg)
9431 ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation)
9432 ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations)
9433 ("java-osgi-service-repository" ,java-osgi-service-repository)
9434 ("java-osgi-service-log" ,java-osgi-service-log)
9435 ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations)
9436 ("java-osgi-namespace-contract" ,java-osgi-namespace-contract)
9437 ("java-osgi-namespace-extender" ,java-osgi-namespace-extender)
9438 ("java-osgi-namespace-service" ,java-osgi-namespace-service)
9439 ("promise" ,java-osgi-util-promise)
9440 ("osgi" ,java-osgi-core)))))
9441
9442 (define-public java-ops4j-pax-tinybundles
9443 (package
9444 (name "java-ops4j-pax-tinybundles")
9445 (version "2.1.1")
9446 (source (origin
9447 (method url-fetch)
9448 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/"
9449 "archive/tinybundles-" version ".tar.gz"))
9450 (sha256
9451 (base32
9452 "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871"))))
9453 (arguments
9454 `(#:jar-name "java-ops4j-pax-tinybundles.jar"
9455 #:source-dir "src/main/java"
9456 #:test-exclude
9457 ;; Abstract base classes for other tests
9458 (list "**/BndTest.java" "**/CoreTest.java")
9459 #:phases
9460 (modify-phases %standard-phases
9461 (add-before 'check 'fix-version
9462 (lambda _
9463 ;; This test has a reference to an old version of bndlib we are not
9464 ;; packaging. It uses the version referenced in pom.xml. We replace
9465 ;; it with our own version.
9466 (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
9467 (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*")
9468 ,(package-version java-aqute-bndlib)))
9469 #t)))))
9470 (inputs
9471 `(("lang" ,java-ops4j-base-lang)
9472 ("io" ,java-ops4j-base-io)
9473 ("store" ,java-ops4j-base-store)
9474 ("slf4j" ,java-slf4j-api)
9475 ("libg" ,java-aqute-libg)
9476 ("bndlib" ,java-aqute-bndlib)))
9477 (native-inputs
9478 `(("junit" ,java-junit)
9479 ("hamcrest" ,java-hamcrest-core)
9480 ("log4j" ,java-log4j-api)
9481 ("bndannotation" ,java-aqute-bnd-annotation)
9482 ("framework" ,java-osgi-framework)))
9483 (build-system ant-build-system)
9484 (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles")
9485 (synopsis "Java APIs to create OSGi related artifacts")
9486 (description "Tinybundles is all about creating OSGi related artifacts like
9487 Bundles, Fragments and Deployment Packages with Java Api. It is very convenient
9488 to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the
9489 other hand, this library can be a foundation of real end user tools that need
9490 to create those artifacts.")
9491 (license license:asl2.0)))
9492
9493 (define-public java-ops4j-pax-exam-core
9494 (package
9495 (name "java-ops4j-pax-exam-core")
9496 (version "4.11.0")
9497 (source (origin
9498 (method url-fetch)
9499 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/"
9500 "archive/exam-reactor-" version ".tar.gz"))
9501 (sha256
9502 (base32
9503 "08mzw8nkah3rj3vznlplnawspxhp61zgvb44ifqa1rni1cvbms2g"))))
9504 (arguments
9505 `(#:jar-name "java-ops4j-pax-exam-core.jar"
9506 #:source-dir "core/pax-exam/src/main/java"
9507 #:test-dir "core/pax-exam/src/test"))
9508 (inputs
9509 `(("slf4j" ,java-slf4j-api)
9510 ("lang" ,java-ops4j-base-lang)
9511 ("io" ,java-ops4j-base-io)
9512 ("util-property" ,java-ops4j-base-util-property)
9513 ("util-store" ,java-ops4j-base-store)
9514 ("java-osgi-core" ,java-osgi-core)))
9515 (native-inputs
9516 `(("junit" ,java-junit)
9517 ("hamcrest" ,java-hamcrest-core)))
9518 (build-system ant-build-system)
9519 (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview")
9520 (synopsis "In-Container Testing for OSGi, Java EE and CDI")
9521 (description "Pax Exam creates OSGi bundles for testing purposes. It lets
9522 the user take control of the OSGi framework, the test framework (e.g. JUnit) and
9523 the system under test at the same time.")
9524 (license license:asl2.0)))
9525
9526 (define-public java-ops4j-pax-exam-core-spi
9527 (package
9528 (inherit java-ops4j-pax-exam-core)
9529 (name "java-ops4j-pax-exam-core-spi")
9530 (arguments
9531 `(#:jar-name "java-ops4j-pax-exam-spi.jar"
9532 #:source-dir "src/main/java"
9533 #:test-exclude
9534 (list
9535 ;; Abstract base class, not a test
9536 "**/BaseStagedReactorTest.java"
9537 ;; Depends on org.mortbay.jetty.testwars:test-war-dump
9538 "**/WarBuilderTest.java")
9539 #:phases
9540 (modify-phases %standard-phases
9541 (add-before 'configure 'chdir
9542 (lambda _
9543 ;; Tests assume we are in this directory
9544 (chdir "core/pax-exam-spi")
9545 #t))
9546 (add-before 'check 'fix-tests
9547 (lambda _
9548 ;; One test checks that this file is present.
9549 (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi")
9550 (with-output-to-file
9551 "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties"
9552 (lambda _
9553 (display
9554 (string-append "artifactId = pax-exam-spi\n"
9555 "version = " ,(package-version java-ops4j-pax-exam-core-spi)))))
9556 ;; Maven puts compilation results in the target directory, while we
9557 ;; put them in the build directory.
9558 (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java"
9559 "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java"
9560 "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java")
9561 (("target") "build"))
9562 ;; One test is expected to fail, but it doesn't throw the expected exception
9563 (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java"
9564 (("AssertionError") "IllegalArgumentException"))
9565 #t)))))
9566 (inputs
9567 `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core)
9568 ("lang" ,java-ops4j-base-lang)
9569 ("monitors" ,java-ops4j-base-monitors)
9570 ("store" ,java-ops4j-base-store)
9571 ("io" ,java-ops4j-base-io)
9572 ("spi" ,java-ops4j-base-spi)
9573 ("osgi" ,java-osgi-core)
9574 ("slf4j" ,java-slf4j-api)
9575 ("tinybundles" ,java-ops4j-pax-tinybundles)))
9576 (native-inputs
9577 `(("mockito" ,java-mockito-1)
9578 ("junit" ,java-junit)
9579 ("hamcrest" ,java-hamcrest-core)
9580 ("cglib" ,java-cglib)
9581 ("objenesis" ,java-objenesis)
9582 ("asm" ,java-asm)))))
9583
9584 (define-public java-ops4j-pax-exam-core-junit
9585 (package
9586 (inherit java-ops4j-pax-exam-core)
9587 (name "java-ops4j-pax-exam-core-junit")
9588 (arguments
9589 `(#:jar-name "ops4j-pax-exam-core-junit.jar"
9590 #:source-dir "drivers/pax-exam-junit4/src/main/java"
9591 #:tests? #f)); no tests
9592 (inputs
9593 `(("junit" ,java-junit)
9594 ("slf4j" ,java-slf4j-api)
9595 ("core" ,java-ops4j-pax-exam-core)
9596 ("spi" ,java-ops4j-pax-exam-core-spi)))
9597 (native-inputs '())))
9598
9599 (define-public java-fasterxml-jackson-annotations
9600 (package
9601 (name "java-fasterxml-jackson-annotations")
9602 (version "2.9.4")
9603 (source (origin
9604 (method url-fetch)
9605 (uri (string-append "https://github.com/FasterXML/"
9606 "jackson-annotations/archive/"
9607 "jackson-annotations-" version ".tar.gz"))
9608 (sha256
9609 (base32
9610 "0mr95xd0da6a4g95zvrl1ryk5n5zv2rc696w3xnsr5hxk2gicfc4"))))
9611 (build-system ant-build-system)
9612 (arguments
9613 `(#:jar-name "jackson-annotations.jar"
9614 #:source-dir "src/main/java"
9615 #:test-dir "src/test"))
9616 (native-inputs
9617 `(("junit" ,java-junit)))
9618 (home-page "https://github.com/FasterXML/jackson-annotations")
9619 (synopsis "General purpose annotations for the Jackson Data Processor")
9620 (description "This package contains general purpose annotations for the
9621 Jackson Data Processor, used on value and handler types. The only annotations
9622 not included are ones that require dependency to the Databind package.")
9623 (license license:asl2.0)))
9624
9625 (define-public java-fasterxml-jackson-core
9626 (package
9627 (name "java-fasterxml-jackson-core")
9628 (version "2.9.4")
9629 (source (origin
9630 (method url-fetch)
9631 (uri (string-append "https://github.com/FasterXML/"
9632 "jackson-core/archive/"
9633 "jackson-core-" version ".tar.gz"))
9634 (sha256
9635 (base32
9636 "159hsnk17jr1gyzkf01cxvsn45srnk37g949r7364qlsr527gjgd"))))
9637 (build-system ant-build-system)
9638 (arguments
9639 `(#:jar-name "jackson-core.jar"
9640 #:source-dir "src/main/java"
9641 #:test-dir "src/test"
9642 #:test-exclude
9643 (list
9644 ;; Expected failure. pom.xml excludes these
9645 "**/failing/**"
9646 ;; Base classes that have no constructor for junit
9647 "**/BaseTest.java"
9648 "**/ConcurrencyReadTest.java"
9649 "**/ManualCharAccessTest.java"
9650 "**/ManualCharAccessTest.java"
9651 "**/TrailingCommasTest.java"
9652 "**/AsyncMissingValuesInObjectTest.java"
9653 "**/AsyncMissingValuesInArrayTest.java")
9654 #:phases
9655 (modify-phases %standard-phases
9656 (add-before 'configure 'generate-PackageVersion.java
9657 (lambda _
9658 (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java")
9659 (in (string-append out ".in")))
9660 (copy-file in out)
9661 (substitute* out
9662 (("@package@") "com.fasterxml.jackson.core.json")
9663 (("@projectversion@") ,version)
9664 (("@projectgroupid@") "com.fasterxml.jackson.core")
9665 (("@projectartifactid@") "jackson-core")))
9666 #t))
9667 (add-before 'build 'copy-resources
9668 (lambda _
9669 (copy-recursively "src/main/resources"
9670 "build/classes")
9671 #t))
9672 (add-before 'check 'copy-test-resources
9673 (lambda _
9674 (copy-recursively "src/test/resources"
9675 "build/test-classes")
9676 #t)))))
9677 (native-inputs
9678 `(("junit" ,java-junit)
9679 ("hamcrest" ,java-hamcrest-core)))
9680 (home-page "https://github.com/FasterXML/jackson-core")
9681 (synopsis "")
9682 (description "")
9683 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9684
9685 (define-public java-fasterxml-jackson-databind
9686 (package
9687 (name "java-fasterxml-jackson-databind")
9688 (version "2.9.4")
9689 (source (origin
9690 (method url-fetch)
9691 (uri (string-append "https://github.com/FasterXML/"
9692 "jackson-databind/archive/"
9693 "jackson-databind-" version ".tar.gz"))
9694 (sha256
9695 (base32
9696 "1zd2cw4z6kdkbx8za96xh9pyicv2a2l7y0rkcx2fqd8hv6d47s08"))))
9697 (build-system ant-build-system)
9698 (arguments
9699 `(#:jar-name "jackson-databind.jar"
9700 #:source-dir "src/main/java"
9701 #:tests? #f; requires javax.measures for which I can't find a free implementation
9702 #:phases
9703 (modify-phases %standard-phases
9704 (add-before 'configure 'generate-PackageVersion.java
9705 (lambda _
9706 (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java")
9707 (in (string-append out ".in")))
9708 (copy-file in out)
9709 (substitute* out
9710 (("@package@") "com.fasterxml.jackson.databind.cfg")
9711 (("@projectversion@") ,version)
9712 (("@projectgroupid@") "com.fasterxml.jackson.databind")
9713 (("@projectartifactid@") "jackson-databind")))
9714 #t))
9715 (add-before 'build 'copy-resources
9716 (lambda _
9717 (copy-recursively "src/main/resources" "build/classes")
9718 #t)))))
9719 (inputs
9720 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
9721 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)))
9722 (home-page "https://github.com/FasterXML/jackson-databind")
9723 (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor")
9724 (description "This package contains the general-purpose data-binding
9725 functionality and tree-model for Jackson Data Processor. It builds on core
9726 streaming parser/generator package, and uses Jackson Annotations for
9727 configuration.")
9728 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9729
9730 (define-public java-fasterxml-jackson-modules-base-jaxb
9731 (package
9732 (name "java-fasterxml-jackson-modules-base-jaxb")
9733 (version "2.9.4")
9734 (source (origin
9735 (method url-fetch)
9736 (uri (string-append "https://github.com/FasterXML/"
9737 "jackson-modules-base/archive/"
9738 "jackson-modules-base-" version ".tar.gz"))
9739 (sha256
9740 (base32
9741 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
9742 (build-system ant-build-system)
9743 (arguments
9744 `(#:jar-name "jackson-modules-base-jaxb.jar"
9745 #:source-dir "jaxb/src/main/java"
9746 #:test-dir "jaxb/src/test"
9747 #:test-exclude
9748 ;; Base class for tests
9749 (list "**/BaseJaxbTest.java")
9750 #:phases
9751 (modify-phases %standard-phases
9752 (add-before 'configure 'generate-PackageVersion.java
9753 (lambda _
9754 (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/"
9755 "jackson/module/jaxb/PackageVersion.java"))
9756 (in (string-append out ".in")))
9757 (copy-file in out)
9758 (substitute* out
9759 (("@package@") "com.fasterxml.jackson.module.jaxb")
9760 (("@projectversion@") ,version)
9761 (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb")
9762 (("@projectartifactid@") "jackson-module-jaxb")))
9763 #t))
9764 (add-before 'build 'copy-resources
9765 (lambda _
9766 (copy-recursively "jaxb/src/main/resources" "build/classes")
9767 #t)))))
9768 (inputs
9769 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
9770 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
9771 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
9772 (native-inputs
9773 `(("java-junit" ,java-junit)))
9774 (home-page "https://github.com/FasterXML/jackson-modules-base")
9775 (synopsis "Jaxb annotations jackson module")
9776 (description "This package is the jaxb annotations module for jackson.")
9777 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9778
9779 (define-public java-fasterxml-jackson-modules-base-mrbean
9780 (package
9781 (name "java-fasterxml-jackson-modules-base-mrbean")
9782 (version "2.9.4")
9783 (source (origin
9784 (method url-fetch)
9785 (uri (string-append "https://github.com/FasterXML/"
9786 "jackson-modules-base/archive/"
9787 "jackson-modules-base-" version ".tar.gz"))
9788 (sha256
9789 (base32
9790 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
9791 (build-system ant-build-system)
9792 (arguments
9793 `(#:jar-name "jackson-modules-base-mrbean.jar"
9794 #:source-dir "mrbean/src/main/java"
9795 #:test-dir "mrbean/src/test"
9796 #:test-exclude
9797 ;; Base class for tests
9798 (list "**/BaseTest.java")
9799 #:phases
9800 (modify-phases %standard-phases
9801 (add-before 'configure 'generate-PackageVersion.java
9802 (lambda _
9803 (let* ((out (string-append "mrbean/src/main/java/com/fasterxml/"
9804 "jackson/module/mrbean/PackageVersion.java"))
9805 (in (string-append out ".in")))
9806 (copy-file in out)
9807 (substitute* out
9808 (("@package@") "com.fasterxml.jackson.module.mrbean")
9809 (("@projectversion@") ,version)
9810 (("@projectgroupid@") "com.fasterxml.jackson.module.mrbean")
9811 (("@projectartifactid@") "jackson-module-mrbean")))
9812 #t)))))
9813 (inputs
9814 `(("java-asm" ,java-asm)
9815 ("java-fasterxml-jackson-annotations"
9816 ,java-fasterxml-jackson-annotations)
9817 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
9818 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
9819 (native-inputs
9820 `(("java-junit" ,java-junit)))
9821 (home-page "https://github.com/FasterXML/jackson-modules-base")
9822 (synopsis "POJO type materialization for Java")
9823 (description "This package implements POJO type materialization.
9824 Databinders can construct implementation classes for Java interfaces as part
9825 of deserialization.")
9826 (license license:asl2.0)))
9827
9828 (define-public java-snakeyaml
9829 (package
9830 (name "java-snakeyaml")
9831 (version "1.18")
9832 (source (origin
9833 (method url-fetch)
9834 (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
9835 version ".tar.gz"))
9836 (file-name (string-append name "-" version ".tar.gz"))
9837 (sha256
9838 (base32
9839 "0474cqcv46zgv9bhms2vgawakq1vyj0hp3h3f1bfys46msia90bh"))))
9840 (build-system ant-build-system)
9841 (arguments
9842 `(#:jar-name "java-snakeyaml.jar"
9843 #:source-dir "src/main/java"
9844 ;; Tests require velocity, a cyclic dependency, and
9845 ;; java-spring-framework-context which is not packaged.
9846 #:tests? #f))
9847 (home-page "https://bitbucket.org/asomov/snakeyaml")
9848 (synopsis "YAML processor")
9849 (description "SnakeYAML is a YAML processor for the Java Virtual Machine.")
9850 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9851
9852 (define-public java-fasterxml-jackson-dataformat-yaml
9853 (package
9854 (name "java-fasterxml-jackson-dataformat-yaml")
9855 (version "2.9.4")
9856 (source (origin
9857 (method url-fetch)
9858 (uri (string-append "https://github.com/FasterXML/"
9859 "jackson-dataformats-text/archive/"
9860 "jackson-dataformats-text-" version ".tar.gz"))
9861 (sha256
9862 (base32
9863 "1hikl06khaxbg439avf442qifcadap8w0lx13f0nnhp2vh3dkbz7"))))
9864 (build-system ant-build-system)
9865 (arguments
9866 `(#:jar-name "jackson-dataformat-yaml.jar"
9867 #:source-dir "yaml/src/main/java"
9868 #:test-dir "yaml/src/test"
9869 #:test-exclude (list "**/failing/**.java")
9870 #:phases
9871 (modify-phases %standard-phases
9872 (add-before 'configure 'generate-PackageVersion.java
9873 (lambda _
9874 (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java")
9875 (in (string-append out ".in")))
9876 (copy-file in out)
9877 (substitute* out
9878 (("@package@") "com.fasterxml.jackson.dataformat.yaml")
9879 (("@projectversion@") ,version)
9880 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml")
9881 (("@projectartifactid@") "jackson-dataformat-yaml")))
9882 #t)))))
9883 (inputs
9884 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
9885 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
9886 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
9887 ("java-snakeyaml" ,java-snakeyaml)))
9888 (native-inputs
9889 `(("junit" ,java-junit)
9890 ("hamcrest" ,java-hamcrest-core)
9891 ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi)
9892 ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit)
9893 ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core)))
9894 (home-page "https://github.com/FasterXML/jackson-dataformats-text")
9895 (synopsis "Yaml backend for Jackson")
9896 (description "Dataformat backends are used to support format alternatives
9897 to JSON, supported by default. This is done by sub-classing Jackson core
9898 abstractions.")
9899 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9900
9901 (define-public java-stax2-api
9902 (package
9903 (name "java-stax2-api")
9904 (version "4.0.0")
9905 (source (origin
9906 (method url-fetch)
9907 (uri (string-append "https://github.com/FasterXML/stax2-api/archive/"
9908 "stax2-api-" version ".tar.gz"))
9909 (sha256
9910 (base32
9911 "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq"))))
9912 (build-system ant-build-system)
9913 (arguments
9914 `(#:jar-name "java-stax2-api.jar"
9915 #:source-dir "src/main/java"
9916 #:tests? #f)); no tests
9917 (home-page "https://github.com/FasterXML/stax2-api")
9918 (synopsis "Stax2 API")
9919 (description "Stax2 API is an extension to basic Stax 1.0 API that adds
9920 significant new functionalities, such as full-featured bi-direction validation
9921 interface and high-performance Typed Access API.")
9922 (license license:bsd-2)))
9923
9924 (define-public java-woodstox-core
9925 (package
9926 (name "java-woodstox-core")
9927 (version "5.0.3")
9928 (source (origin
9929 (method url-fetch)
9930 (uri (string-append "https://github.com/FasterXML/woodstox/archive/"
9931 "woodstox-core-" version ".tar.gz"))
9932 (sha256
9933 (base32
9934 "1i7pdgb8jbw6gdy5kmm0l6rz109n2ns92pqalpyp24vb8vlvdfd4"))))
9935 (build-system ant-build-system)
9936 (arguments
9937 `(#:jar-name "woodstox.jar"
9938 #:test-exclude
9939 (list "**/Base*.java" "failing/**")
9940 #:phases
9941 (modify-phases %standard-phases
9942 (add-before 'build 'remove-msv-dep
9943 (lambda _
9944 ;; we don't need osgi, and it depends on msv
9945 (delete-file-recursively "src/main/java/com/ctc/wstx/osgi")
9946 ;; msv's latest release is from 2011 and we don't need it
9947 (delete-file-recursively "src/main/java/com/ctc/wstx/msv")
9948 (delete-file-recursively "src/test/java/wstxtest/osgi")
9949 (delete-file-recursively "src/test/java/wstxtest/msv")
9950 #t))
9951 (add-before 'build 'copy-resources
9952 (lambda _
9953 (copy-recursively "src/main/resources" "build/classes")
9954 #t)))))
9955 (inputs
9956 `(("stax2" ,java-stax2-api)))
9957 (native-inputs
9958 `(("junit" ,java-junit)))
9959 (home-page "https://github.com/FasterXML/woodstox")
9960 (synopsis "Stax XML API implementation")
9961 (description "Woodstox is a stax XML API implementation.")
9962 (license license:asl2.0)))
9963
9964 (define-public java-fasterxml-jackson-dataformat-xml
9965 (package
9966 (name "java-fasterxml-jackson-dataformat-xml")
9967 (version "2.9.4")
9968 (source (origin
9969 (method url-fetch)
9970 (uri (string-append "https://github.com/FasterXML/"
9971 "jackson-dataformat-xml/archive/"
9972 "jackson-dataformat-xml-" version ".tar.gz"))
9973 (sha256
9974 (base32
9975 "111fkkl90w31jbf30kgj82qdcxlw4sxppki7i198liw0ck1jcavq"))))
9976 (build-system ant-build-system)
9977 (arguments
9978 `(#:jar-name "jackson-dataformat-xml.jar"
9979 #:source-dir "src/main/java"
9980 #:test-exclude
9981 (list "**/failing/**")
9982 #:phases
9983 (modify-phases %standard-phases
9984 (add-before 'configure 'generate-PackageVersion.java
9985 (lambda _
9986 (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java")
9987 (in (string-append out ".in")))
9988 (copy-file in out)
9989 (newline)
9990 (substitute* out
9991 (("@package@") "com.fasterxml.jackson.dataformat.xml")
9992 (("@projectversion@") ,version)
9993 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml")
9994 (("@projectartifactid@") "jackson-dataformat-xml")))
9995 #t))
9996 (add-before 'build 'copy-resources
9997 (lambda _
9998 (copy-recursively "src/main/resources" "build/classes")
9999 #t)))))
10000 (inputs
10001 `(("jackson-annotations" ,java-fasterxml-jackson-annotations)
10002 ("jackson-core" ,java-fasterxml-jackson-core)
10003 ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb)
10004 ("jackson-databind" ,java-fasterxml-jackson-databind)
10005 ("stax2-api" ,java-stax2-api)
10006 ("woodstox" ,java-woodstox-core)))
10007 (native-inputs
10008 `(("junit" ,java-junit)
10009 ("hamcrest" ,java-hamcrest-core)))
10010 (home-page "https://github.com/FasterXML/jackson-dataformat-xml")
10011 (synopsis "Read and write XML")
10012 (description "This package contains Jackson extension component for reading
10013 and writing XML encoded data.
10014
10015 Further, the goal is to emulate how JAXB data-binding works with \"Code-first\"
10016 approach (that is, no support is added for \"Schema-first\" approach). Support
10017 for JAXB annotations is provided by JAXB annotation module; this module
10018 provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator},
10019 @code{JsonFactory}) as well as small number of higher level overrides needed to
10020 make data-binding work.")
10021 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
10022
10023 (define-public java-hdrhistogram
10024 (package
10025 (name "java-hdrhistogram")
10026 (version "2.1.9")
10027 (source (origin
10028 (method git-fetch)
10029 (uri (git-reference
10030 (url "https://github.com/HdrHistogram/HdrHistogram")
10031 (commit (string-append "HdrHistogram-" version))))
10032 (file-name (git-file-name name version))
10033 (sha256
10034 (base32
10035 "1cw8aa1vk258k42xs6wpy72m4gbai540jq032qsa7c5586iawx2d"))))
10036 (build-system ant-build-system)
10037 (arguments
10038 `(#:jar-name "java-hdrhistogram.jar"
10039 #:source-dir "src/main/java"
10040 #:phases
10041 (modify-phases %standard-phases
10042 (add-after 'unpack 'make-files-writable
10043 (lambda _
10044 (for-each make-file-writable (find-files "."))
10045 #t))
10046 (add-before 'configure 'set-version
10047 (lambda _
10048 (let* ((version-java "src/main/java/org/HdrHistogram/Version.java")
10049 (template (string-append version-java ".template")))
10050 (copy-file template version-java)
10051 (substitute* version-java
10052 (("\\$VERSION\\$") ,version)
10053 (("\\$BUILD_TIME\\$") "0"))
10054 #t))))))
10055 (native-inputs
10056 `(("junit" ,java-junit)
10057 ("hamcrest" ,java-hamcrest-core)))
10058 (home-page "https://hdrhistogram.github.io/HdrHistogram")
10059 (synopsis "High dynamic range histogram")
10060 (description "Hdrhistogram creates histograms that support
10061 recording and analyzing sampled data value counts across a configurable integer
10062 value range with configurable value precision within the range. Value precision
10063 is expressed as the number of significant digits in the value recording, and
10064 provides control over value quantization behavior across the value range and
10065 the subsequent value resolution at any given level.")
10066 (license license:public-domain)))
10067
10068 (define-public java-cofoja
10069 (package
10070 (name "java-cofoja")
10071 (version "1.3")
10072 (source (origin
10073 (method git-fetch)
10074 (uri (git-reference
10075 (url "https://github.com/nhatminhle/cofoja")
10076 (commit (string-append "v" version))))
10077 (file-name (string-append "java-cofoja-" version "-checkout"))
10078 (sha256
10079 (base32
10080 "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w"))))
10081 (build-system ant-build-system)
10082 (arguments
10083 `(#:build-target "dist"
10084 #:test-target "test"
10085 #:jdk ,icedtea-8
10086 #:make-flags
10087 (list "-Ddist.dir=dist")
10088 #:modules ((guix build ant-build-system)
10089 (guix build java-utils)
10090 (guix build utils)
10091 (srfi srfi-1)
10092 (ice-9 match))
10093 #:phases
10094 (modify-phases %standard-phases
10095 ;; The bulid system ignores the class path the ant-build-system sets
10096 ;; up and instead expects to find all dependencies in the "lib"
10097 ;; directory.
10098 (add-after 'unpack 'create-libdir
10099 (lambda* (#:key inputs #:allow-other-keys)
10100 (mkdir-p "lib")
10101 (for-each
10102 (lambda (file)
10103 (let ((target (string-append "lib/" (basename file))))
10104 (unless (file-exists? target)
10105 (symlink file target))))
10106 (append-map (match-lambda
10107 ((label . dir)
10108 (find-files dir "\\.jar$")))
10109 inputs))
10110 #t))
10111 (replace 'install (install-jars "dist")))))
10112 (inputs
10113 `(("java-asm" ,java-asm)))
10114 (native-inputs
10115 `(("java-junit" ,java-junit)))
10116 (home-page "https://github.com/nhatminhle/cofoja")
10117 (synopsis "Contracts for Java")
10118 (description "Contracts for Java, or Cofoja for short, is a contract
10119 programming framework and test tool for Java, which uses annotation processing
10120 and bytecode instrumentation to provide run-time checking. (In particular,
10121 this is not a static analysis tool.)")
10122 (license license:lgpl3+)))
10123
10124 (define-public java-aopalliance
10125 (package
10126 (name "java-aopalliance")
10127 (version "1.0")
10128 (source (origin
10129 (method git-fetch)
10130 ;; Note: this git repository is not official, but contains the
10131 ;; source code that is in the CVS repository. Downloading the
10132 ;; tarball from sourceforge is undeterministic, and the cvs download
10133 ;; fails.
10134 (uri (git-reference
10135 (url "https://github.com/hoverruan/aopalliance")
10136 (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0")))
10137 (file-name (string-append name "-" version))
10138 (sha256
10139 (base32
10140 "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr"))))
10141 (build-system ant-build-system)
10142 (arguments
10143 `(#:jar-name "java-aopalliance.jar"
10144 #:jdk ,icedtea-8
10145 #:tests? #f; no tests
10146 #:source-dir "aopalliance/src/main"
10147 #:modules ((guix build ant-build-system)
10148 (guix build utils)
10149 (guix build maven pom)
10150 (guix build java-utils)
10151 (sxml simple))
10152 #:phases
10153 (modify-phases %standard-phases
10154 (add-before 'install 'create-pom
10155 (lambda _
10156 (with-output-to-file "pom.xml"
10157 (lambda _
10158 (sxml->xml
10159 `((project
10160 (modelVersion "4.0.0")
10161 (name "aopalliance")
10162 (groupId "aopalliance")
10163 (artifactId "aopalliance")
10164 (version "1.0"))))))
10165 #t))
10166 (replace 'install
10167 (install-from-pom "pom.xml")))))
10168 (home-page "http://aopalliance.sourceforge.net")
10169 (synopsis "Aspect-Oriented Programming")
10170 (description "The AOP Alliance project is a joint project between several
10171 software engineering people who are interested in Aspect-Oriented Programming
10172 (AOP) and Java.")
10173 (license license:public-domain)))
10174
10175 (define-public java-javax-inject
10176 (package
10177 (name "java-javax-inject")
10178 (version "1")
10179 (source (origin
10180 (method git-fetch)
10181 (uri (git-reference
10182 (url "https://github.com/javax-inject/javax-inject")
10183 (commit version)))
10184 (file-name (git-file-name name version))
10185 (sha256
10186 (base32
10187 "1rspl0nkvk1jif6nccikw93xic6ljj2b6kpy2mffwi2mnvc13j7x"))))
10188 (build-system ant-build-system)
10189 (arguments
10190 `(#:jar-name "java-javax-inject.jar"
10191 #:tests? #f; no tests
10192 #:phases
10193 (modify-phases %standard-phases
10194 (replace 'install
10195 (install-from-pom "pom.xml")))))
10196 (home-page "https://github.com/javax-inject/javax-inject")
10197 (synopsis "JSR-330: Dependency Injection for Java")
10198 (description "This package specifies a means for obtaining objects in such
10199 a way as to maximize reusability, testability and maintainability compared to
10200 traditional approaches such as constructors, factories, and service locators
10201 (e.g., JNDI). This process, known as dependency injection, is beneficial to
10202 most nontrivial applications.
10203
10204 Many types depend on other types. For example, a @var{Stopwatch} might depend
10205 on a @var{TimeSource}. The types on which a type depends are known as its
10206 dependencies. The process of finding an instance of a dependency to use at run
10207 time is known as resolving the dependency. If no such instance can be found,
10208 the dependency is said to be unsatisfied, and the application is broken.")
10209 (license license:asl2.0)))
10210
10211 (define-public java-guice
10212 (package
10213 (name "java-guice")
10214 (version "4.1")
10215 (source (origin
10216 (method git-fetch)
10217 (uri (git-reference
10218 (url "https://github.com/google/guice")
10219 (commit version)))
10220 (file-name (git-file-name name version))
10221 (modules '((guix build utils)))
10222 (snippet
10223 `(begin
10224 (for-each delete-file (find-files "." ".*.jar")) #t))
10225 (sha256
10226 (base32
10227 "18im5hdfl4q1b9chww2s1ii60sn3ydyyar32a2sf2p2g8zlbdswq"))))
10228 (build-system ant-build-system)
10229 (arguments
10230 `(#:jar-name "java-guice.jar"
10231 #:jdk ,icedtea-8
10232 #:tests? #f; FIXME: tests are not in a java sub directory
10233 #:source-dir "core/src"
10234 #:phases
10235 (modify-phases %standard-phases
10236 (add-after 'unpack 'make-files-writable
10237 (lambda _
10238 (for-each make-file-writable (find-files "."))
10239 #t))
10240 (replace 'install
10241 (install-from-pom "core/pom.xml")))))
10242 (propagated-inputs
10243 `(("java-aopalliance" ,java-aopalliance)
10244 ("java-asm" ,java-asm)
10245 ("java-cglib" ,java-cglib)
10246 ("java-guava" ,java-guava)
10247 ("java-javax-inject" ,java-javax-inject)
10248 ("java-guice-parent-pom" ,java-guice-parent-pom)))
10249 (home-page "https://github.com/google/guice")
10250 (synopsis "Lightweight dependency injection framework")
10251 (description "Guice is a lightweight dependency injection framework for
10252 Java 6 and above.")
10253 (license license:asl2.0)))
10254
10255 (define-public java-guice-servlet
10256 (package
10257 (inherit java-guice)
10258 (name "java-guice-servlet")
10259 (arguments
10260 `(#:jar-name "guice-servlet.jar"
10261 #:source-dir "extensions/servlet/src/"
10262 #:jdk ,icedtea-8
10263 #:tests? #f ; FIXME: not in a java subdir
10264 #:phases
10265 (modify-phases %standard-phases
10266 (add-after 'unpack 'make-files-writable
10267 (lambda _
10268 (for-each make-file-writable (find-files "."))
10269 #t)))))
10270 (inputs
10271 `(("guice" ,java-guice)
10272 ("servlet" ,java-classpathx-servletapi)
10273 ,@(package-inputs java-guice)))))
10274
10275 (define java-guice-parent-pom
10276 (package
10277 (inherit java-guice)
10278 (name "java-guice-parent-pom")
10279 (arguments
10280 `(#:tests? #f
10281 #:phases
10282 (modify-phases %standard-phases
10283 (delete 'configure)
10284 (delete 'build)
10285 (add-after 'install 'install-extensions
10286 (install-pom-file "extensions/pom.xml"))
10287 (replace 'install
10288 (install-pom-file "pom.xml")))))
10289 (propagated-inputs
10290 `(("java-google-parent-pom" ,java-google-parent-pom-5)))))
10291
10292 (define java-google-parent-pom-5
10293 (package
10294 (name "java-google-parent-pom")
10295 (version "5")
10296 (source (origin
10297 (method git-fetch)
10298 (uri (git-reference
10299 (url "https://github.com/google/google-maven-parents")
10300 (commit (string-append "google-" version))))
10301 (file-name (git-file-name name version))
10302 (sha256
10303 (base32
10304 "0zb7hx24p8k8rfdvix2vsbfqn73jhrycdndvhf8j5gbii9wbqibv"))))
10305 (build-system ant-build-system)
10306 (arguments
10307 `(#:tests? #f
10308 #:phases
10309 (modify-phases %standard-phases
10310 (delete 'configure)
10311 (delete 'build)
10312 (replace 'install
10313 (install-pom-file "pom.xml")))))
10314 (home-page "https://github.com/google/google-maven-parents")
10315 (synopsis "Google parent pom")
10316 (description "This package contains the Maven parent POM for other Google
10317 Java projects.")
10318 (license license:asl2.0)))
10319
10320 (define-public java-assertj
10321 (package
10322 (name "java-assertj")
10323 (version "3.8.0")
10324 (source (origin
10325 (method git-fetch)
10326 (uri (git-reference
10327 (url "https://github.com/joel-costigliola/assertj-core")
10328 (commit (string-append "assertj-core-" version))))
10329 (file-name (git-file-name name version))
10330 (sha256
10331 (base32
10332 "1k35cg2in7pzk4pbdjryr0pll5lgk1r6ngrn0j8cdlgi7w8zh2d1"))))
10333 (build-system ant-build-system)
10334 (arguments
10335 `(#:jar-name "java-assertj.jar"
10336 #:jdk ,icedtea-8
10337 #:source-dir "src/main/java"
10338 #:tests? #f)); depends on tng-junit which depends on assertj
10339 (inputs
10340 `(("cglib" ,java-cglib)
10341 ("junit" ,java-junit)
10342 ("hamcrest" ,java-hamcrest-core)))
10343 (native-inputs
10344 `(("mockito" ,java-mockito-1)))
10345 (home-page "https://joel-costigliola.github.io/assertj/index.html")
10346 (synopsis "Fluent assertions for java")
10347 (description "AssertJ core is a Java library that provides a fluent
10348 interface for writing assertions. Its main goal is to improve test code
10349 readability and make maintenance of tests easier.")
10350 (license license:asl2.0)))
10351
10352 (define-public java-jboss-javassist
10353 (package
10354 (name "java-jboss-javassist")
10355 (version "3.21.0")
10356 (source (origin
10357 (method git-fetch)
10358 (uri (git-reference
10359 (url "https://github.com/jboss-javassist/javassist")
10360 (commit
10361 (string-append "rel_"
10362 (string-map
10363 (lambda (x) (if (eq? x #\.) #\_ x)) version)
10364 "_ga"))))
10365 (file-name (git-file-name name version))
10366 (sha256
10367 (base32
10368 "0h3zlcyqiaq01fspm69h7vki67raw305w89p4ha8vlhpzw02qifm"))
10369 (modules '((guix build utils)))
10370 (snippet
10371 '(begin
10372 (delete-file "javassist.jar")))))
10373 (build-system ant-build-system)
10374 (arguments
10375 `(#:jar-name "java-jboss-javassist.jar"
10376 #:jdk ,icedtea-8
10377 #:source-dir "src/main"
10378 #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3
10379 #:phases
10380 (modify-phases %standard-phases
10381 (add-after 'unpack 'make-files-writable
10382 (lambda _
10383 (for-each make-file-writable (find-files "."))
10384 #t)))))
10385 (native-inputs
10386 `(("junit" ,java-junit)))
10387 (home-page "https://github.com/jboss-javassist/javassist")
10388 (synopsis "Java bytecode engineering toolkit")
10389 (description "Javassist (JAVA programming ASSISTant) makes Java bytecode
10390 manipulation simple. It is a class library for editing bytecodes in Java; it
10391 enables Java programs to define a new class at runtime and to modify a class
10392 file when the JVM loads it.")
10393 (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl.
10394
10395 (define-public java-jcommander
10396 (package
10397 (name "java-jcommander")
10398 (version "1.71")
10399 (source (origin
10400 (method git-fetch)
10401 (uri (git-reference
10402 (url "https://github.com/cbeust/jcommander")
10403 (commit version)))
10404 (file-name (git-file-name name version))
10405 (sha256
10406 (base32
10407 "12vcpc19sd7jhvjgp7xz1qjanfix162xb3x2q5zah93rjklj1h57"))))
10408 (build-system ant-build-system)
10409 (arguments
10410 `(#:jar-name "java-jcommander.jar"
10411 #:jdk ,icedtea-8
10412 #:tests? #f; requires testng which depends on jcommander
10413 #:source-dir "src/main/java"))
10414 (home-page "https://jcommander.org")
10415 (synopsis "Command line parameters parser")
10416 (description "JCommander is a very small Java framework that makes it
10417 trivial to parse command line parameters. Parameters are declared with
10418 annotations.")
10419 (license license:asl2.0)))
10420
10421 (define-public java-bsh
10422 (package
10423 (name "java-bsh")
10424 (version "2.0b6")
10425 (source (origin
10426 (method git-fetch)
10427 (uri (git-reference
10428 (url "https://github.com/beanshell/beanshell")
10429 (commit version)))
10430 (file-name (git-file-name name version))
10431 (sha256
10432 (base32
10433 "0kz3f0xjack6c9syssi4qjw1rbd3q5963sk5pmr143hiibxa9csw"))
10434 (modules '((guix build utils)))
10435 (snippet
10436 '(begin
10437 ;; Delete bundled third-party jar archives.
10438 (for-each delete-file (find-files "." ".*.jar$"))
10439 (for-each (lambda (file) (chmod file #o644))
10440 (find-files "." "."))
10441 #t))))
10442 (build-system ant-build-system)
10443 (arguments
10444 `(#:build-target "jarall"
10445 #:test-target "junit-tests-all"
10446 #:make-flags (list "-DDATE" "(no date for reproducibility)")
10447 #:phases
10448 (modify-phases %standard-phases
10449 (add-before 'install 'fix-pom
10450 (lambda _
10451 (substitute* "pom.xml"
10452 (("org.apache-extras.beanshell") "org.beanshell"))
10453 #t))
10454 (replace 'install
10455 (install-from-pom "pom.xml")))))
10456 (inputs
10457 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
10458 ("java-commons-bsf" ,java-commons-bsf)))
10459 (native-inputs
10460 `(("java-junit" ,java-junit)
10461 ("javacc" ,javacc-3)))
10462 (home-page "http://beanshell.org/")
10463 (synopsis "Lightweight Scripting for Java")
10464 (description "BeanShell is a small, free, embeddable Java source
10465 interpreter with object scripting language features, written in Java.
10466 BeanShell dynamically executes standard Java syntax and extends it with common
10467 scripting conveniences such as loose types, commands, and method closures like
10468 those in Perl and JavaScript.")
10469 (license license:asl2.0)))
10470
10471 (define-public java-fest-util
10472 (package
10473 (name "java-fest-util")
10474 (version "1.2.5")
10475 (source (origin
10476 (method git-fetch)
10477 (uri (git-reference
10478 (url "https://github.com/alexruiz/fest-util/")
10479 (commit (string-append "fest-util-" version))))
10480 (file-name (git-file-name name version))
10481 (sha256
10482 (base32
10483 "02kgal7v85snyyvcsxvn4qphid455f4smh2wri1il8d9asw0djbz"))))
10484 (build-system ant-build-system)
10485 (arguments
10486 `(#:jar-name "java-fest-util.jar"
10487 #:source-dir "src/main/java"))
10488 (native-inputs
10489 `(("junit" ,java-junit)
10490 ("hamcrest" ,java-hamcrest-core)))
10491 (home-page "https://github.com/alexruiz/fest-util")
10492 (synopsis "FEST common utilities")
10493 (description "Common utilities used in all FEST module.")
10494 (license license:asl2.0)))
10495
10496 (define-public java-fest-test
10497 (package
10498 (name "java-fest-test")
10499 (version "2.1.0")
10500 (source (origin
10501 (method git-fetch)
10502 (uri (git-reference
10503 (url "https://github.com/alexruiz/fest-test/")
10504 (commit (string-append "fest-test-" version))))
10505 (file-name (git-file-name name version))
10506 (sha256
10507 (base32
10508 "0mg1d2jfh7kbx2c40dchbjr6d8pv59snsyb13mfxsr7xk5n69qbn"))))
10509 (build-system ant-build-system)
10510 (arguments
10511 `(#:jar-name "java-fest-test.jar"
10512 #:source-dir "src/main/java"
10513 #:tests? #f)); no tests
10514 (inputs
10515 `(("junit" ,java-junit)))
10516 (home-page "https://github.com/alexruiz/fest-test")
10517 (synopsis "Common FEST testing infrastructure")
10518 (description "Fest-test contains the common FEST testing infrastructure.")
10519 (license license:asl2.0)))
10520
10521 (define-public java-fest-assert
10522 (package
10523 (name "java-fest-assert")
10524 (version "2.0M10")
10525 (source (origin
10526 (method git-fetch)
10527 (uri (git-reference
10528 (url "https://github.com/alexruiz/fest-assert-2.x/")
10529 (commit (string-append "fest-assert-core-" version))))
10530 (file-name (git-file-name name version))
10531 (sha256
10532 (base32
10533 "1cp8zzyag3s85fz2w68sda9zzaal1y5f9wl8g72wkm12an40w6by"))))
10534 (build-system ant-build-system)
10535 (arguments
10536 `(#:jar-name "java-fest-assert.jar"
10537 #:source-dir "src/main/java"
10538 #:test-exclude
10539 (list
10540 "**/Abstract*.java"
10541 "**/*BaseTest.java"
10542 ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses
10543 "**/MessageFormatter_format_Test.java"
10544 "**/internal/*/*_assert*_Test.java")))
10545 (inputs
10546 `(("java-fest-util" ,java-fest-util)))
10547 (native-inputs
10548 `(("java-junit" ,java-junit)
10549 ("java-fest-test" ,java-fest-test)
10550 ("java-hamcrest-core" ,java-hamcrest-core)
10551 ("java-mockito" ,java-mockito-1)
10552 ("java-cglib" ,java-cglib)
10553 ("java-objenesis" ,java-objenesis)
10554 ("java-asm" ,java-asm)))
10555 (home-page "https://github.com/alexruiz/fest-assert-2.x")
10556 (synopsis "FEST fluent assertions")
10557 (description "FEST-Assert provides a fluent interface for assertions.")
10558 (license license:asl2.0)))
10559
10560 (define-public java-testng
10561 (package
10562 (name "java-testng")
10563 (version "6.14.3")
10564 (source (origin
10565 (method git-fetch)
10566 (uri (git-reference
10567 (url "https://github.com/cbeust/testng")
10568 (commit version)))
10569 (file-name (string-append name "-" version "-checkout"))
10570 (sha256
10571 (base32
10572 "0y6vq30i5g276kw0v2bhbvci22ijg7ax49ap2611yqlhbs4d6dqv"))))
10573 (build-system ant-build-system)
10574 (arguments
10575 `(#:jdk ,icedtea-8; java.util.function
10576 #:jar-name "java-testng.jar"
10577 #:source-dir "src/main/java"
10578 #:phases
10579 (modify-phases %standard-phases
10580 ;; FIXME: I don't know why these tests fail
10581 (add-after 'unpack 'delete-failing-tests
10582 (lambda _
10583 (substitute* "src/test/resources/testng.xml"
10584 (("<class name=\"test.configuration.github1625.TestRunnerIssue1625\"/>") "")
10585 (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") ""))
10586 #t))
10587 ;; We don't have groovy
10588 (add-after 'unpack 'delete-groovy-tests
10589 (lambda _
10590 (delete-file-recursively "src/test/java/test/dependent/issue1648/")
10591 (substitute* "src/test/resources/testng.xml"
10592 (("<class name=\"test.dependent.issue1648.TestRunner\"/>") ""))
10593 #t))
10594 (add-before 'build 'copy-resources
10595 (lambda _
10596 (copy-recursively "src/main/resources" "build/classes")
10597 #t))
10598 (add-before 'check 'copy-test-resources
10599 (lambda _
10600 (copy-recursively "src/test/resources" "build/test-classes")
10601 #t))
10602 (replace 'check
10603 (lambda _
10604 (invoke "ant" "compile-tests")
10605 ;; we don't have groovy
10606 (substitute* "src/test/resources/testng.xml"
10607 (("<class name=\"test.groovy.GroovyTest\" />") ""))
10608 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
10609 ":build/classes"
10610 ":build/test-classes")
10611 "-Dtest.resources.dir=src/test/resources"
10612 "org.testng.TestNG" "src/test/resources/testng.xml"))))))
10613 (propagated-inputs
10614 `(("junit" ,java-junit)
10615 ("java-jsr305" ,java-jsr305)
10616 ("java-bsh" ,java-bsh)
10617 ("java-jcommander" ,java-jcommander)
10618 ("java-guice" ,java-guice)
10619 ("snakeyaml" ,java-snakeyaml)))
10620 (native-inputs
10621 `(("guava" ,java-guava)
10622 ("java-javax-inject" ,java-javax-inject)
10623 ("java-hamcrest" ,java-hamcrest-all)
10624 ("java-assertj" ,java-assertj)
10625 ("java-mockito" ,java-mockito-1)
10626 ("cglib" ,java-cglib)
10627 ("asm" ,java-asm)
10628 ("aopalliance" ,java-aopalliance)))
10629 (home-page "https://testng.org")
10630 (synopsis "Testing framework")
10631 (description "TestNG is a testing framework inspired from JUnit and NUnit
10632 but introducing some new functionalities that make it more powerful and easier
10633 to use.")
10634 (license license:asl2.0)))
10635
10636 (define-public java-jnacl
10637 (let ((commit "094e819afdd63ea81a499b3bcb42a271006bebd9")
10638 (revision "2"))
10639 (package
10640 (name "java-jnacl")
10641 (version (string-append "0.1.0-" revision "." (string-take commit 7)))
10642 (source (origin
10643 (method git-fetch)
10644 (uri (git-reference
10645 (url "https://github.com/neilalexander/jnacl")
10646 (commit commit)))
10647 (file-name (git-file-name name version))
10648 (sha256
10649 (base32
10650 "1d6g6xhn83byv5943n7935wwjsk0ibk0qdvqgr699qqgqqmwisbb"))))
10651 (build-system ant-build-system)
10652 (arguments
10653 `(#:jar-name "jnacl.jar"
10654 #:source-dir "src/main/java"
10655 #:jdk ,icedtea-8
10656 #:phases
10657 (modify-phases %standard-phases
10658 (add-before 'build 'fix-tests
10659 (lambda _
10660 (substitute* '("src/test/java/com/neilalexander/jnacl/NaClTest.java"
10661 "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java")
10662 (("assertions.Assertions") "assertions.api.Assertions"))
10663 #t))
10664 (replace 'check
10665 (lambda _
10666 (invoke "ant" "compile-tests")
10667 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
10668 ":build/classes"
10669 ":build/test-classes")
10670 "org.testng.TestNG" "-testclass"
10671 "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class")
10672 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
10673 ":build/classes"
10674 ":build/test-classes")
10675 "org.testng.TestNG" "-testclass"
10676 "build/test-classes/com/neilalexander/jnacl/NaClTest.class"))))))
10677 (native-inputs
10678 `(("java-testng" ,java-testng)
10679 ("java-fest-util" ,java-fest-util)
10680 ("java-fest-assert" ,java-fest-assert)))
10681 (home-page "https://github.com/neilalexander/jnacl")
10682 (synopsis "Java implementation of NaCl")
10683 (description "Pure Java implementation of the NaCl: Networking and
10684 Cryptography library.")
10685 (license license:bsd-2))))
10686
10687 (define-public java-mvel2
10688 (package
10689 (name "java-mvel2")
10690 (version "2.3.1")
10691 (source (origin
10692 (method url-fetch)
10693 (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-"
10694 version ".Final.tar.gz"))
10695 (sha256
10696 (base32
10697 "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z"))))
10698 (build-system ant-build-system)
10699 (arguments
10700 `(#:jar-name "mvel2.jar"
10701 #:source-dir "src/main/java"
10702 #:test-exclude
10703 (list "**/Abstract*.java"
10704 ;; Base class with no tests
10705 "**/MVELThreadTest.java")
10706 #:phases
10707 (modify-phases %standard-phases
10708 (add-after 'install 'install-bin
10709 (lambda* (#:key outputs #:allow-other-keys)
10710 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
10711 (mkdir-p bin)
10712 (with-output-to-file (string-append bin "/mvel2")
10713 (lambda _
10714 (display
10715 (string-append
10716 "#!" (which "bash") "\n"
10717 "if [ \"$#\" -ne \"2\" ]; then\n"
10718 "echo 'Usage: mvel2 <script> <out.dir>'\n"
10719 "exit\n"
10720 "fi\n"
10721 "java -Dout.dir=$2 -cp " (getenv "CLASSPATH")
10722 ":" (assoc-ref outputs "out") "/share/java/mvel2.jar"
10723 " org.mvel2.sh.Main $1"))))
10724 (chmod (string-append bin "/mvel2") #o755))
10725 #t)))))
10726 (native-inputs
10727 `(("junit" ,java-junit)
10728 ("hamcrest" ,java-hamcrest-core)))
10729 (home-page "https://github.com/mvel/mvel")
10730 (synopsis "MVFLEX Expression Language")
10731 (description "MVEL has largely been inspired by Java syntax, but has some
10732 fundamental differences aimed at making it more efficient as an expression
10733 language, such as operators that directly support collection, array and string
10734 matching, as well as regular expressions. MVEL is used to evaluate expressions
10735 written using Java syntax.
10736
10737 In addition to the expression language, MVEL serves as a templating language for
10738 configuration and string construction.")
10739 (license license:asl2.0)))
10740
10741 (define-public java-commons-jexl-2
10742 (package
10743 (name "java-commons-jexl")
10744 (version "2.1.1")
10745 (source (origin
10746 (method url-fetch)
10747 (uri (string-append "mirror://apache/commons/jexl/source/"
10748 "commons-jexl-" version "-src.tar.gz"))
10749 (sha256
10750 (base32
10751 "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz"))))
10752 (build-system ant-build-system)
10753 (arguments
10754 `(#:jar-name "commons-jexl-2.jar"
10755 #:jdk ,icedtea-8
10756 #:source-dir "src/main/java"
10757 #:phases
10758 (modify-phases %standard-phases
10759 (add-before 'check 'disable-broken-tests
10760 (lambda* (#:key inputs #:allow-other-keys)
10761 (with-directory-excursion "src/test/java/org/apache/commons/jexl2/"
10762 (substitute* "ArithmeticTest.java"
10763 (("asserter.assertExpression\\(\"3 / 0\"") "//")
10764 (("asserter.assertExpression\\(\"imanull") "//"))
10765 ;; This test fails with "ambiguous method invocation"
10766 (delete-file "CacheTest.java")
10767 ;; This test doesn't have access to the temp directory
10768 (substitute* "ClassCreatorTest.java"
10769 (("java.io.tmpdir") "user.dir"))
10770 ;; This test fails in trying to detect whether it can run.
10771 (substitute* "ClassCreator.java"
10772 (("boolean canRun =.*") "boolean canRun = false;\n"))
10773 ;; ...and these tests depend on it.
10774 (delete-file "scripting/JexlScriptEngineOptionalTest.java")
10775 (delete-file "scripting/JexlScriptEngineTest.java"))
10776 #t))
10777 (add-before 'build 'run-javacc
10778 (lambda _
10779 (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/"
10780 (invoke "java" "jjtree" "Parser.jjt")
10781 (invoke "java" "javacc" "Parser.jj"))
10782 #t)))))
10783 (inputs
10784 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
10785 (native-inputs
10786 `(("java-junit" ,java-junit)
10787 ("java-hamcrest-core" ,java-hamcrest-core)
10788 ("javacc" ,javacc-4)))
10789 (home-page "https://commons.apache.org/proper/commons-jexl/")
10790 (synopsis "Java Expression Language ")
10791 (description "JEXL is a library intended to facilitate the implementation
10792 of dynamic and scripting features in applications and frameworks written in
10793 Java. JEXL implements an Expression Language based on some extensions to the
10794 JSTL Expression Language supporting most of the constructs seen in
10795 shell-script or ECMAScript. Its goal is to expose scripting features usable
10796 by technical operatives or consultants working with enterprise platforms.")
10797 (license license:asl2.0)))
10798
10799 (define-public java-lz4
10800 (package
10801 (name "java-lz4")
10802 (version "1.4.0")
10803 (source (origin
10804 (method git-fetch)
10805 (uri (git-reference
10806 (url "https://github.com/lz4/lz4-java")
10807 (commit version)))
10808 (file-name (git-file-name name version))
10809 (sha256
10810 (base32
10811 "0ydjakhv3cz34mfvv14qrh2ksdxifgjwwagjy7r46qr3f68hnf6y"))))
10812 (build-system ant-build-system)
10813 (arguments
10814 `(#:jar-name "lz4.jar"
10815 #:jdk ,icedtea-8
10816 #:source-dir "src/java:src/java-unsafe"
10817 #:tests? #f; FIXME: requires more dependencies
10818 #:phases
10819 (modify-phases %standard-phases
10820 (add-after 'unpack 'make-files-writable
10821 (lambda _
10822 (for-each make-file-writable (find-files "."))
10823 #t))
10824 (add-before 'configure 'generate-source
10825 (lambda _
10826 (with-directory-excursion "src/build/source_templates"
10827 (invoke "mvel2" "../gen_sources.mvel" "../../java"))
10828 #t)))))
10829 (native-inputs
10830 `(("mvel" ,java-mvel2)))
10831 (home-page "https://jpountz.github.io/lz4-java")
10832 (synopsis "Compression algorithm")
10833 (description "LZ4 - Java is a Java port of the popular lz4 compression
10834 algorithms and xxHash hashing algorithm.")
10835 (license license:asl2.0)))
10836
10837 (define-public java-bouncycastle
10838 (package
10839 (name "java-bouncycastle")
10840 (version "1.60")
10841 (source (origin
10842 (method git-fetch)
10843 (uri (git-reference
10844 (url "http://git.bouncycastle.org/repositories/bc-java")
10845 ;(url "https://github.com/bcgit/bc-java")
10846 (commit (string-append "r1rv" (substring version 2 4)))))
10847 (file-name (git-file-name name version))
10848 (sha256
10849 (base32
10850 "1m921a1ac2dl797ffzg3d4j97ch308f25spb4jgsj3npfmmys5gb"))
10851 (modules '((guix build utils)))
10852 (snippet
10853 '(begin
10854 (for-each delete-file
10855 (find-files "." "\\.jar$"))
10856 #t))))
10857 (build-system ant-build-system)
10858 (arguments
10859 `(#:jdk ,icedtea-8
10860 #:tests? #f
10861 #:phases
10862 (modify-phases %standard-phases
10863 (replace 'build
10864 (lambda _
10865 (invoke "ant" "-f" "ant/jdk15+.xml" "build-provider")
10866 (invoke "ant" "-f" "ant/jdk15+.xml" "build")))
10867 ;; FIXME: the tests freeze.
10868 ;; (replace 'check
10869 ;; (lambda _
10870 ;; (invoke "ant" "-f" "ant/jdk15+.xml" "test")))
10871 (replace 'install
10872 (install-jars "build/artifacts/jdk1.5/jars")))))
10873 (inputs
10874 `(("java-javax-mail" ,java-javax-mail)))
10875 (native-inputs
10876 `(("unzip" ,unzip)
10877 ("junit" ,java-junit)
10878 ("java-native-access" ,java-native-access)
10879 ("java-native-access-platform" ,java-native-access-platform)))
10880 (home-page "https://www.bouncycastle.org")
10881 (synopsis "Cryptographic library")
10882 (description "Bouncy Castle is a cryptographic library for the Java
10883 programming language.")
10884 (license license:expat)))
10885
10886 (define-public java-lmax-disruptor
10887 (package
10888 (name "java-lmax-disruptor")
10889 (version "3.3.7")
10890 (source (origin
10891 (method url-fetch)
10892 (uri (string-append "https://github.com/LMAX-Exchange/disruptor/"
10893 "archive/" version ".tar.gz"))
10894 (file-name (string-append name "-" version ".tar.gz"))
10895 (sha256
10896 (base32
10897 "17da2gwj5abnlsfgn2xqjk5lgzbg4vkb0hdv2dvc8r2fx4bi7w3g"))))
10898 (build-system ant-build-system)
10899 (arguments
10900 `(#:jar-name "java-lmax-disruptor.jar"
10901 #:jdk ,icedtea-8
10902 #:tests? #f)); tests hang
10903 (inputs
10904 `(("junit" ,java-junit)
10905 ("java-hdrhistogram" ,java-hdrhistogram)
10906 ("java-jmock" ,java-jmock)
10907 ("java-jmock-legacy" ,java-jmock-legacy)
10908 ("java-jmock-junit4" ,java-jmock-junit4)
10909 ("java-hamcrest-all" ,java-hamcrest-all)))
10910 (native-inputs
10911 `(("cglib" ,java-cglib)
10912 ("objenesis" ,java-objenesis)
10913 ("asm" ,java-asm)))
10914 (home-page "https://www.lmax.com/disruptor")
10915 (synopsis "High performance inter-thread communication")
10916 (description "LMAX Disruptor is a software pattern and software component
10917 for high performance inter-thread communication that avoids the need for
10918 message queues or resource locking.")
10919 (license license:asl2.0)))
10920
10921 (define-public java-commons-bcel
10922 (package
10923 (name "java-commons-bcel")
10924 (version "6.1")
10925 (source (origin
10926 (method url-fetch)
10927 (uri (string-append "mirror://apache/commons/bcel/source/bcel-"
10928 version "-src.tar.gz"))
10929 (sha256
10930 (base32
10931 "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy"))))
10932 (build-system ant-build-system)
10933 (arguments
10934 `(#:jar-name "bcel.jar"
10935 #:jdk ,icedtea-8
10936 #:source-dir "src/main/java"
10937 #:test-dir "src/test/java"
10938 ;; FIXME: Tests require the unpackaged jna.
10939 #:tests? #f))
10940 (home-page "https://commons.apache.org/proper/commons-bcel/")
10941 (synopsis "Byte code engineering library")
10942 (description "The Byte Code Engineering Library (Apache Commons BCEL) is
10943 intended to give users a convenient way to analyze, create, and
10944 manipulate (binary) Java class files. Classes are represented by objects
10945 which contain all the symbolic information of the given class: methods, fields
10946 and byte code instructions, in particular.
10947
10948 Such objects can be read from an existing file, be transformed by a
10949 program (e.g. a class loader at run-time) and written to a file again. An
10950 even more interesting application is the creation of classes from scratch at
10951 run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful
10952 if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format
10953 of Java @code{.class} files.")
10954 (license license:asl2.0)))
10955
10956 (define-public java-xerial-core
10957 (package
10958 (name "java-xerial-core")
10959 (version "2.1")
10960 (source (origin
10961 (method url-fetch)
10962 (uri (string-append "https://github.com/xerial/xerial-java/archive/"
10963 version ".tar.gz"))
10964 (file-name (string-append name "-" version ".tar.gz"))
10965 (sha256
10966 (base32
10967 "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d"))))
10968 (build-system ant-build-system)
10969 (arguments
10970 `(#:jar-name "xerial-core.jar"
10971 #:source-dir "xerial-core/src/main/java"
10972 #:test-dir "xerial-core/src/test"
10973 #:phases
10974 (modify-phases %standard-phases
10975 (add-before 'build 'copy-resources
10976 (lambda _
10977 (copy-recursively "xerial-core/src/main/resources"
10978 "build/classes")
10979 #t)))))
10980 (native-inputs
10981 `(("junit" ,java-junit)
10982 ("hamcrest" ,java-hamcrest-core)))
10983 (home-page "https://github.com/xerial/xerial-java")
10984 (synopsis "Data management libraries for Java")
10985 (description "Xerial is a set of data management libraries for the Java
10986 programming language. The ultimate goal of the Xerial project is to manage
10987 everything as database, including class objects, text format data, data
10988 streams, etc.")
10989 (license license:asl2.0)))
10990
10991 (define-public java-powermock-reflect
10992 (package
10993 (name "java-powermock-reflect")
10994 (version "1.7.3")
10995 (source (origin
10996 (method url-fetch)
10997 (uri (string-append "https://github.com/powermock/powermock/"
10998 "archive/powermock-" version ".tar.gz"))
10999 (file-name (string-append name "-" version ".tar.gz"))
11000 (sha256
11001 (base32
11002 "0sbgi5vqq7k72wzcdjb20s370vyd4hsbnx71pzb8ishml3gy7fwy"))
11003 (patches
11004 (search-patches "java-powermock-fix-java-files.patch"))))
11005 (build-system ant-build-system)
11006 (arguments
11007 `(#:jar-name "java-powermock-reflect.jar"
11008 #:jdk ,icedtea-8
11009 #:source-dir "powermock-reflect/src/main/java"
11010 #:test-dir "powermock-reflect/src/test"))
11011 (inputs
11012 `(("java-objenesis" ,java-objenesis)))
11013 (native-inputs
11014 `(("junit" ,java-junit)
11015 ("cglib" ,java-cglib)
11016 ("asm" ,java-asm)
11017 ("hamcrest" ,java-hamcrest-core)
11018 ("assertj" ,java-assertj)))
11019 (home-page "https://github.com/powermock/powermock")
11020 (synopsis "Mock library extension framework")
11021 (description "PowerMock is a framework that extends other mock libraries
11022 such as EasyMock with more powerful capabilities. PowerMock uses a custom
11023 classloader and bytecode manipulation to enable mocking of static methods,
11024 constructors, final classes and methods, private methods, removal of static
11025 initializers and more. By using a custom classloader no changes need to be
11026 done to the IDE or continuous integration servers which simplifies adoption.")
11027 (license license:asl2.0)))
11028
11029 (define-public java-powermock-core
11030 (package
11031 (inherit java-powermock-reflect)
11032 (name "java-powermock-core")
11033 (arguments
11034 `(#:jar-name "java-powermock-core.jar"
11035 #:source-dir "powermock-core/src/main/java"
11036 #:test-dir "powermock-core/src/test"
11037 #:tests? #f; requires powermock-api
11038 #:jdk ,icedtea-8
11039 #:phases
11040 (modify-phases %standard-phases
11041 (add-before 'build 'copy-resources
11042 (lambda _
11043 (copy-recursively "powermock-core/src/main/resources"
11044 "build/classes")
11045 #t)))))
11046 (inputs
11047 `(("reflect" ,java-powermock-reflect)
11048 ("javassist" ,java-jboss-javassist)))
11049 (native-inputs
11050 `(("junit" ,java-junit)
11051 ("assertj" ,java-assertj)
11052 ("mockito" ,java-mockito-1)))))
11053
11054 (define-public java-powermock-api-support
11055 (package
11056 (inherit java-powermock-reflect)
11057 (name "java-powermock-api-support")
11058 (build-system ant-build-system)
11059 (arguments
11060 `(#:jar-name "java-powermock-api-support.jar"
11061 #:jdk ,icedtea-8
11062 #:source-dir "powermock-api/powermock-api-support/src/main/java"
11063 #:tests? #f)); no tests
11064 (inputs
11065 `(("core" ,java-powermock-core)
11066 ("reflect" ,java-powermock-reflect)))))
11067
11068 (define-public java-powermock-modules-junit4-common
11069 (package
11070 (inherit java-powermock-reflect)
11071 (name "java-powermock-modules-junit4-common")
11072 (build-system ant-build-system)
11073 (arguments
11074 `(#:jar-name "java-powermock-modules-junit4-common.jar"
11075 #:jdk ,icedtea-8
11076 #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java"
11077 #:test-dir "powermock-modules/powermock-module-junit4-common/src/test"))
11078 (inputs
11079 `(("core" ,java-powermock-core)
11080 ("easymock" ,java-easymock)
11081 ("reflect" ,java-powermock-reflect)
11082 ("hamcrest" ,java-hamcrest-core)
11083 ("cglib" ,java-cglib)))))
11084
11085 (define-public java-powermock-modules-junit4
11086 (package
11087 (inherit java-powermock-reflect)
11088 (name "java-powermock-modules-junit4")
11089 (build-system ant-build-system)
11090 (arguments
11091 `(#:jar-name "java-powermock-modules-junit4.jar"
11092 #:jdk ,icedtea-8
11093 #:source-dir "powermock-modules/powermock-module-junit4/src/main/java"
11094 #:test-dir "powermock-modules/powermock-module-junit4/src/test"
11095 #:phases
11096 (modify-phases %standard-phases
11097 (add-before 'build 'fix-junit-detection
11098 (lambda _
11099 ;; Our junit version is 4.12-SNAPSHOT
11100 (substitute* (find-files "powermock-modules/powermock-module-junit4"
11101 "PowerMockJUnit4MethodValidator.java")
11102 (("4.12") "4.12-SNAPSHOT"))
11103 #t)))))
11104 (inputs
11105 `(("core" ,java-powermock-core)
11106 ("reflect" ,java-powermock-reflect)
11107 ("common" ,java-powermock-modules-junit4-common)
11108 ("cglib" ,java-cglib)))
11109 (native-inputs
11110 `(("easymock" ,java-easymock)
11111 ("hamcrest" ,java-hamcrest-core)
11112 ("objenesis" ,java-objenesis)
11113 ("asm" ,java-asm)
11114 ("junit" ,java-junit)))))
11115
11116 (define-public java-powermock-api-easymock
11117 (package
11118 (inherit java-powermock-reflect)
11119 (name "java-powermock-api-easymock")
11120 (build-system ant-build-system)
11121 (arguments
11122 `(#:jar-name "java-powermock-api-easymock.jar"
11123 #:jdk ,icedtea-8
11124 #:source-dir "powermock-api/powermock-api-easymock/src/main/java"
11125 #:tests? #f; no tests
11126 #:phases
11127 (modify-phases %standard-phases
11128 (add-before 'build 'fix-file
11129 (lambda _
11130 ;; FIXME: This looks wrong, but it fixes a build error.
11131 (with-directory-excursion "powermock-api/powermock-api-easymock"
11132 (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java"
11133 (("classLoader instanceof MockClassLoader") "false")
11134 (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";")))
11135 #t)))))
11136 (inputs
11137 `(("core" ,java-powermock-core)
11138 ("easymock" ,java-easymock)
11139 ("reflect" ,java-powermock-reflect)
11140 ("support" ,java-powermock-api-support)
11141 ("cglib" ,java-cglib)))))
11142
11143 (define-public java-jboss-jms-api-spec
11144 (package
11145 (name "java-jboss-jms-api-spec")
11146 (version "2.0")
11147 (source (origin
11148 (method url-fetch)
11149 (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/"
11150 "archive/jboss-jms-api_" version
11151 "_spec-1.0.1.Final.tar.gz"))
11152 (sha256
11153 (base32
11154 "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m"))))
11155 (build-system ant-build-system)
11156 (arguments
11157 `(#:jar-name "java-jboss-jms-api_spec.jar"
11158 #:jdk ,icedtea-8
11159 #:source-dir "."
11160 #:tests? #f)); no tests
11161 (home-page "https://github.com/jboss/jboss-jms-api_spec")
11162 (synopsis "Java Message Service API specification")
11163 (description "Java Message Service (JMS) API is used to send messages
11164 messages between two or more clients. It is a messaging standard that allows
11165 application components to create, send, receive, and read messages.")
11166 ; either gpl2 only with GPL Classpath Exception, or cddl.
11167 (license (list license:gpl2 license:cddl1.0))))
11168
11169 (define-public java-mail
11170 (package
11171 (name "java-mail")
11172 (version "1.6.0")
11173 (source (origin
11174 (method url-fetch)
11175 (uri (string-append "https://github.com/javaee/javamail/archive/"
11176 "JAVAMAIL-1_6_0.tar.gz"))
11177 (sha256
11178 (base32
11179 "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92"))))
11180 (build-system ant-build-system)
11181 (arguments
11182 `(#:jar-name "java-mail.jar"
11183 #:jdk ,icedtea-8
11184 #:source-dir "mail/src/main/java"
11185 #:test-dir "mail/src/test"
11186 #:test-exclude
11187 (list "**/CollectorFormatterTest.java"
11188 "**/CompactFormatterTest.java"
11189 "**/DurationFilterTest.java"
11190 "**/MailHandlerTest.java"
11191 "**/GetLocalAddressTest.java"
11192 ;; FIXME: both end with:
11193 ;; java.lang.ClassNotFoundException:
11194 ;; javax.mail.internet.MimeMultipartParseTest
11195 "**/MimeMultipartParseTest.java"
11196 "**/SearchTermSerializationTest.java")
11197 #:phases
11198 (modify-phases %standard-phases
11199 (add-before 'configure 'move-version.java
11200 (lambda _
11201 (copy-file "mail/src/main/resources/javax/mail/Version.java"
11202 "mail/src/main/java/javax/mail/Version.java")
11203 #t))
11204 (add-before 'build 'copy-resources
11205 (lambda _
11206 (copy-recursively "mail/src/main/resources/META-INF"
11207 "build/classes/META-INF")
11208 #t)))))
11209 (native-inputs
11210 `(("junit" ,java-junit)
11211 ("hamcrest" ,java-hamcrest-core)))
11212 (home-page "https://javaee.github.io/javamail/")
11213 (synopsis "Mail-related functionality in Java")
11214 (description "The JavaMail API provides a platform-independent and
11215 protocol-independent framework to build mail and messaging applications.")
11216 ;; General Public License Version 2 only ("GPL") or the Common Development
11217 ;; and Distribution License("CDDL")
11218 (license (list license:cddl1.1
11219 license:gpl2)))); with classpath exception
11220
11221 (define-public java-jeromq
11222 (package
11223 (name "java-jeromq")
11224 (version "0.4.3")
11225 (source (origin
11226 (method git-fetch)
11227 (uri (git-reference
11228 (url "https://github.com/zeromq/jeromq")
11229 (commit (string-append "v" version))))
11230 (file-name (string-append name "-" version "-checkout"))
11231 (sha256
11232 (base32
11233 "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj"))
11234 (patches (search-patches "java-jeromq-fix-tests.patch"))))
11235 (build-system ant-build-system)
11236 (arguments
11237 `(#:jar-name "java-jeromq.jar"
11238 #:source-dir "src/main/java"
11239 #:jdk ,icedtea-8
11240 #:test-exclude
11241 (list
11242 "**/Abstract*.java"
11243 ;; Requires network
11244 "**/ZBeaconTest.java"
11245 ;; Failures
11246 "**/DealerSpecTest.java"
11247 "**/CustomDecoderTest.java"
11248 "**/CustomEncoderTest.java"
11249 "**/ConnectRidTest.java"
11250 "**/ReqSpecTest.java"
11251 "**/PushPullSpecTest.java"
11252 "**/PubSubHwmTest.java"
11253 "**/RouterSpecTest.java"
11254 "**/ProxyTest.java")))
11255 (inputs
11256 `(("java-jnacl" ,java-jnacl)))
11257 (native-inputs
11258 `(("java-hamcrest-core" ,java-hamcrest-core)
11259 ("junit" ,java-junit)))
11260 (home-page "http://zeromq.org/bindings:java")
11261 (synopsis "Java binding for 0MQ")
11262 (description "Jeromq provides the java bindings for 0MQ.")
11263 (license license:mpl2.0)))
11264
11265 (define-public java-kafka-clients
11266 (package
11267 (name "java-kafka-clients")
11268 (version "1.0.0")
11269 (source (origin
11270 (method url-fetch)
11271 (uri (string-append "mirror://apache/kafka/" version "/kafka-"
11272 version "-src.tgz"))
11273 (sha256
11274 (base32
11275 "1yxmnsmliwm7671q5yy9bl4jdqyyn00n26cggz9brwczx80w1vfq"))))
11276 (build-system ant-build-system)
11277 (arguments
11278 `(#:jar-name "java-kafka-clients.jar"
11279 #:jdk ,icedtea-8
11280 #:source-dir "clients/src/main/java"
11281 #:test-dir "clients/src/test"
11282 #:test-exclude
11283 (list
11284 ;; This file does not contain a class
11285 "**/IntegrationTest.java"
11286 ;; Requires network
11287 "**/ClientUtilsTest.java"
11288 ;; End with errors that seem related to our powermock
11289 "**/KafkaProducerTest.java"
11290 "**/BufferPoolTest.java")))
11291 (inputs
11292 `(("java-slf4j-api" ,java-slf4j-api)
11293 ("java-lz4" ,java-lz4)))
11294 (native-inputs
11295 `(("junit" ,java-junit)
11296 ("hamcrest" ,java-hamcrest-all)
11297 ("objenesis" ,java-objenesis)
11298 ("asm" ,java-asm)
11299 ("cglib" ,java-cglib)
11300 ("javassist" ,java-jboss-javassist)
11301 ("snappy" ,java-snappy)
11302 ("easymock" ,java-easymock)
11303 ("powermock" ,java-powermock-core)
11304 ("powermock-easymock" ,java-powermock-api-easymock)
11305 ("powermock-junit4-common" ,java-powermock-modules-junit4-common)
11306 ("powermock-junit4" ,java-powermock-modules-junit4)
11307 ("powermock-support" ,java-powermock-api-support)
11308 ("java-bouncycastle" ,java-bouncycastle)))
11309 (home-page "https://kafka.apache.org")
11310 (synopsis "Distributed streaming platform")
11311 (description "Kafka is a distributed streaming platform, which means:
11312 @itemize
11313 @item it can publish and subscribe to streams of records;
11314 @item it can store streams of records in a fault-tolerant way;
11315 @item it can process streams of records as they occur.
11316 @end itemize")
11317 ;; Either cddl or gpl2 only.
11318 (license (list license:cddl1.1; actually cddl1.1
11319 license:gpl2)))); with classpath exception
11320
11321 (define-public java-jdom
11322 (package
11323 (name "java-jdom")
11324 (version "1.1.3")
11325 (source (origin
11326 (method url-fetch)
11327 (uri (string-append "http://jdom.org/dist/binary/archive/jdom-"
11328 version ".tar.gz"))
11329 (sha256
11330 (base32
11331 "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl"))))
11332 (build-system ant-build-system)
11333 (arguments
11334 `(#:build-target "package"
11335 #:tests? #f; tests are run as part of the build process
11336 #:phases
11337 (modify-phases %standard-phases
11338 (replace 'install
11339 (install-jars "build")))))
11340 (home-page "http://jdom.org/")
11341 (synopsis "Access, manipulate, and output XML data")
11342 (description "Java-based solution for accessing, manipulating, and
11343 outputting XML data from Java code.")
11344 (license license:bsd-4)))
11345
11346 (define-public java-geronimo-xbean-reflect
11347 (package
11348 (name "java-geronimo-xbean-reflect")
11349 (version "4.5")
11350 (source (origin
11351 (method svn-fetch)
11352 (uri (svn-reference
11353 (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/")
11354 (revision 1807396)))
11355 (file-name (string-append name "-" version))
11356 (sha256
11357 (base32
11358 "18q3i6jgm6rkw8aysfgihgywrdc5nvijrwnslmi3ww497jvri6ja"))))
11359 (build-system ant-build-system)
11360 (arguments
11361 `(#:jar-name "geronimo-xbean-reflect.jar"
11362 #:source-dir "xbean-reflect/src/main/java"
11363 #:test-dir "xbean-reflect/src/test"
11364 #:jdk ,icedtea-8
11365 #:test-exclude
11366 (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java"
11367 "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java"
11368 "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java")
11369 #:phases
11370 (modify-phases %standard-phases
11371 (add-before 'build 'fix-source
11372 (lambda _
11373 (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/"))
11374 ;; org.apache.xbean.asm6 is actually repackaged java-asm
11375 (substitute* (string-append dir "XbeanAsmParameterNameLoader.java")
11376 (("org.apache.xbean.asm5") "org.objectweb.asm"))
11377 #t)))
11378 (replace 'install (install-from-pom "xbean-reflect/pom.xml")))))
11379 (inputs
11380 `(("asm" ,java-asm)
11381 ("log4j" ,java-log4j-api)
11382 ("log4j-1.2" ,java-log4j-1.2-api)
11383 ("log4j-core" ,java-log4j-core)
11384 ("logging" ,java-commons-logging-minimal)))
11385 (propagated-inputs
11386 `(("java-geronimo-parent-pom" ,java-geronimo-parent-pom)))
11387 (native-inputs
11388 `(("junit" ,java-junit)))
11389 (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/")
11390 (synopsis "Dependency injection helper")
11391 (description "Xbean-reflect provides very flexible ways to create objects
11392 and graphs of objects for dependency injection frameworks")
11393 (license license:asl2.0)))
11394
11395 (define java-geronimo-genesis-2.1
11396 (package
11397 (name "java-geronimo-genesis")
11398 (version "2.1")
11399 (source (origin
11400 (method svn-fetch)
11401 (uri (svn-reference
11402 (url (string-append "https://svn.apache.org/repos/asf/"
11403 "geronimo/genesis/tags/genesis-"
11404 version))
11405 (revision 1807396)))
11406 (file-name (string-append name "-" version "-source"))
11407 (sha256
11408 (base32
11409 "119yn795jvnjf52si84q192s8wag1k013iabg78b7wnadssnnh31"))))
11410 (build-system ant-build-system)
11411 (arguments
11412 `(#:tests? #f
11413 #:phases
11414 (modify-phases %standard-phases
11415 (delete 'configure)
11416 (delete 'build)
11417 (replace 'install
11418 (install-pom-file "pom.xml"))
11419 (add-after 'install 'install-enforcer-rules
11420 (install-pom-file "genesis-enforcer-rules/pom.xml"))
11421 (add-after 'install 'install-flava
11422 (install-pom-file "genesis-default-flava/pom.xml"))
11423 (add-after 'install 'install-packaging
11424 (install-pom-file "genesis-packaging/pom.xml"))
11425 (add-after 'install-flava 'install-flava-java4
11426 (install-pom-file "genesis-default-flava/genesis-java1.4-flava/pom.xml"))
11427 (add-after 'install-flava 'install-flava-java5
11428 (install-pom-file "genesis-default-flava/genesis-java5-flava/pom.xml"))
11429 (add-after 'install-flava 'install-flava-java6
11430 (install-pom-file "genesis-default-flava/genesis-java6-flava/pom.xml")))))
11431 (propagated-inputs
11432 `(("apache-parent-pom" ,apache-parent-pom-13)))
11433 (home-page "https://geronimo.apache.org")
11434 (synopsis "Collection of maven POM files for the Geronimo project")
11435 (description "Apache Geronimo is a server runtime. This package contains
11436 only pom files used by other components in the Geronimo project.")
11437 (license license:asl2.0)))
11438
11439 (define java-geronimo-parent-pom
11440 (package
11441 (inherit java-geronimo-xbean-reflect)
11442 (name "java-geronimo-parent-pom")
11443 (arguments
11444 `(#:tests? #f
11445 #:phases
11446 (modify-phases %standard-phases
11447 (delete 'configure)
11448 (delete 'build)
11449 (replace 'install
11450 (install-pom-file "pom.xml")))))
11451 (propagated-inputs
11452 `(("java-geronimo-genesis" ,java-geronimo-genesis-2.1)))))
11453
11454 (define-public java-geronimo-xbean-bundleutils
11455 (package
11456 (inherit java-geronimo-xbean-reflect)
11457 (name "java-geronimo-xbean-bundleutils")
11458 (arguments
11459 `(#:jar-name "geronimo-xbean-bundleutils.jar"
11460 #:source-dir "xbean-bundleutils/src/main/java"
11461 #:test-dir "xbean-bundleutils/src/test"
11462 #:phases
11463 (modify-phases %standard-phases
11464 (add-before 'build 'fix-java
11465 (lambda _
11466 ;; We use a more recent version of osgi, so this file requires
11467 ;; more interface method implementations.
11468 (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java"
11469 (("import org.osgi.framework.ServiceRegistration;")
11470 "import org.osgi.framework.ServiceRegistration;
11471 import org.osgi.framework.ServiceFactory;
11472 import java.util.Collection;
11473 import org.osgi.framework.ServiceObjects;")
11474 (("public Bundle getBundle\\(\\)")
11475 "@Override
11476 public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) {
11477 throw new UnsupportedOperationException();
11478 }
11479 @Override
11480 public <S> ServiceRegistration<S> registerService(Class<S> clazz,
11481 ServiceFactory<S> factory, Dictionary<String, ?> properties) {
11482 throw new UnsupportedOperationException();
11483 }
11484 public Bundle getBundle()"))
11485 #t)))))
11486 (inputs
11487 `(("java-slf4j" ,java-slf4j-api)
11488 ("java-asm" ,java-asm)
11489 ("java-osgi-framework" ,java-osgi-framework)
11490 ("java-eclipse-osgi" ,java-eclipse-osgi)
11491 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)))))
11492
11493 (define-public java-geronimo-xbean-asm-util
11494 (package
11495 (inherit java-geronimo-xbean-reflect)
11496 (name "java-geronimo-xbean-asm-util")
11497 (arguments
11498 `(#:jar-name "geronimo-xbean-asm-util.jar"
11499 #:source-dir "xbean-asm-util/src/main/java"
11500 #:tests? #f)); no tests
11501 (inputs
11502 `(("java-asm" ,java-asm)))
11503 (native-inputs '())))
11504
11505 (define-public java-geronimo-xbean-finder
11506 (package
11507 (inherit java-geronimo-xbean-reflect)
11508 (name "java-geronimo-xbean-finder")
11509 (arguments
11510 `(#:jar-name "geronimo-xbean-finder.jar"
11511 #:source-dir "xbean-finder/src/main/java"
11512 #:test-dir "xbean-finder/src/test"))
11513 (inputs
11514 `(("java-slf4j-api" ,java-slf4j-api)
11515 ("java-asm" ,java-asm)
11516 ("java-geronimo-xbean-bundleutils" ,java-geronimo-xbean-bundleutils)
11517 ("java-geronimo-xbean-asm-util" ,java-geronimo-xbean-asm-util)
11518 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)
11519 ("java-osgi-framework" ,java-osgi-framework)))
11520 (native-inputs
11521 `(("java-junit" ,java-junit)
11522 ("java-hamcrest-core" ,java-hamcrest-core)))))
11523
11524 (define-public java-gson
11525 (package
11526 (name "java-gson")
11527 (version "2.8.2")
11528 (source (origin
11529 (method url-fetch)
11530 (uri (string-append "https://github.com/google/gson/archive/"
11531 "gson-parent-" version ".tar.gz"))
11532 (sha256
11533 (base32
11534 "1j4qnp7v046q0k48c4kyf69sxaasx2h949d3cqwsm3kzxms3x0f9"))))
11535 (build-system ant-build-system)
11536 (arguments
11537 `(#:jar-name "gson.jar"
11538 #:source-dir "gson/src/main/java"
11539 #:test-dir "gson/src/test"))
11540 (native-inputs
11541 `(("java-junit" ,java-junit)
11542 ("java-hamcrest-core" ,java-hamcrest-core)))
11543 (home-page "https://github.com/google/gson")
11544 (synopsis "Java serialization/deserialization library from/to JSON")
11545 (description "Gson is a Java library that can be used to convert Java
11546 Objects into their JSON representation. It can also be used to convert a JSON
11547 string to an equivalent Java object. Gson can work with arbitrary Java objects
11548 including pre-existing objects that you do not have source-code of.")
11549 (license license:asl2.0)))
11550
11551 (define-public java-hawtjni
11552 (package
11553 (name "java-hawtjni")
11554 (version "1.15")
11555 (source (origin
11556 (method url-fetch)
11557 (uri (string-append "https://github.com/fusesource/hawtjni/archive/"
11558 "hawtjni-project-" version ".tar.gz"))
11559 (sha256
11560 (base32
11561 "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g"))))
11562 (build-system ant-build-system)
11563 (arguments
11564 `(#:jar-name "hawtjni.jar"
11565 #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java"
11566 #:tests? #f; no tests
11567 #:phases
11568 (modify-phases %standard-phases
11569 (add-before 'build 'build-native
11570 (lambda* (#:key inputs #:allow-other-keys)
11571 (let ((include (string-append "-I" (assoc-ref inputs "jdk") "/include/linux")))
11572 (with-directory-excursion "hawtjni-generator/src/main/resources/"
11573 (invoke "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o"
11574 "-fPIC" "-O2" include)
11575 (invoke "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o"
11576 "-fPIC" "-O2" include)
11577 (invoke "gcc" "-o" "libhawtjni.so" "-shared"
11578 "hawtjni.o" "hawtjni-callback.o")))
11579 #t))
11580 (add-after 'install 'install-native
11581 (lambda* (#:key outputs #:allow-other-keys)
11582 (let* ((out (assoc-ref outputs "out"))
11583 (lib (string-append out "/lib"))
11584 (inc (string-append out "/include")))
11585 (with-directory-excursion "hawtjni-generator/src/main/resources/"
11586 (install-file "libhawtjni.so" lib)
11587 (install-file "hawtjni.h" inc)))
11588 #t))
11589 (add-before 'install 'install-parent
11590 (install-pom-file "pom.xml"))
11591 (replace 'install
11592 (install-from-pom "hawtjni-runtime/pom.xml")))))
11593 (inputs
11594 `(("java-commons-cli" ,java-commons-cli)
11595 ("java-asm" ,java-asm)
11596 ("java-geronimo-xbean-finder" ,java-geronimo-xbean-finder)))
11597 (home-page "https://fusesource.github.io/hawtjni/")
11598 (synopsis "JNI code generator")
11599 (description "HawtJNI is a code generator that produces the JNI code needed
11600 to implement Java native methods. It is based on the jnigen code generator
11601 that is part of the SWT Tools project.")
11602 (license license:asl2.0)))
11603
11604 (define-public java-jansi-native
11605 (package
11606 (name "java-jansi-native")
11607 (version "1.7")
11608 (source (origin
11609 (method url-fetch)
11610 (uri (string-append "https://github.com/fusesource/jansi-native/"
11611 "archive/jansi-native-" version ".tar.gz"))
11612 (sha256
11613 (base32
11614 "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf"))))
11615 (build-system ant-build-system)
11616 (arguments
11617 `(#:jar-name "jansi-native.jar"
11618 #:source-dir "src/main/java"
11619 #:tests? #f; no tests
11620 #:phases
11621 (modify-phases %standard-phases
11622 (add-before 'build 'build-native
11623 (lambda* (#:key inputs #:allow-other-keys)
11624 ;; there are more required files for windows in windows/
11625 (with-directory-excursion "src/main/native-package/src"
11626 (substitute* "jansi_ttyname.c"
11627 (("#include \"jansi_.*") ""))
11628 (invoke "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o"
11629 (string-append "-I" (assoc-ref inputs "java-hawtjni")
11630 "/include")
11631 (string-append "-I" (assoc-ref inputs "jdk")
11632 "/include/linux")
11633 "-fPIC" "-O2")
11634 (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o"))))
11635 (add-before 'build 'install-native
11636 (lambda _
11637 (let ((dir (string-append "build/classes/META-INF/native/"
11638 ,(match (%current-system)
11639 ((or "i686-linux" "armhf-linux")
11640 "linux32")
11641 ((or "x86_64-linux" "aarch64-linux"
11642 "mips64el-linux")
11643 "linux64")
11644 (_ "unknown-kernel")))))
11645 (install-file "src/main/native-package/src/libjansi.so" dir))
11646 #t))
11647 (add-after 'install 'install-native
11648 (lambda* (#:key outputs #:allow-other-keys)
11649 (install-file "src/main/native-package/src/jansi.h"
11650 (string-append (assoc-ref outputs "out") "/include"))
11651 #t))
11652 (add-before 'install 'fix-pom
11653 (lambda _
11654 ;; pom contains variables to complete name, but we don't support that
11655 (substitute* "pom.xml"
11656 (("\\$\\{platform\\}") "native"))
11657 #t))
11658 (replace 'install
11659 (install-from-pom "pom.xml")))))
11660 (propagated-inputs
11661 `(("java-hawtjni" ,java-hawtjni)))
11662 (home-page "https://fusesource.github.io/jansi/")
11663 (synopsis "Native library for jansi")
11664 (description "This package provides the native library for jansi, a small
11665 Java library that allows you to use ANSI escape sequences to format your
11666 console output.")
11667 (license license:asl2.0)))
11668
11669 (define-public java-jansi
11670 (package
11671 (name "java-jansi")
11672 (version "1.16")
11673 (source (origin
11674 (method url-fetch)
11675 (uri (string-append "https://github.com/fusesource/jansi/archive/"
11676 "jansi-project-" version ".tar.gz"))
11677 (sha256
11678 (base32
11679 "11kh3144i3fzp21dpy8zg52mjmsr214k7km9p8ly0rqk2px0qq2z"))))
11680 (build-system ant-build-system)
11681 (arguments
11682 `(#:jar-name "jansi.jar"
11683 #:source-dir "jansi/src/main/java"
11684 #:test-dir "jansi/src/test"
11685 #:phases
11686 (modify-phases %standard-phases
11687 (add-after 'check 'clear-term
11688 (lambda _
11689 (invoke "echo" "-e" "\\e[0m")))
11690 (add-before 'install 'install-parent
11691 (install-pom-file "pom.xml"))
11692 (add-before 'install 'fix-pom
11693 (lambda _
11694 ;; pom adds jansi native versions for different platforms, but we
11695 ;; only need one, so use native instead
11696 (substitute* "jansi/pom.xml"
11697 (("windows32") "native")
11698 (("windows64") "native")
11699 (("osx") "native")
11700 (("linux32") "native")
11701 (("linux64") "native")
11702 (("freebsd32") "native")
11703 (("freebsd64") "native"))
11704 #t))
11705 (replace 'install
11706 (install-from-pom "jansi/pom.xml")))))
11707 (propagated-inputs
11708 `(("java-jansi-native" ,java-jansi-native)))
11709 (native-inputs
11710 `(("java-junit" ,java-junit)
11711 ("java-hamcrest-core" ,java-hamcrest-core)))
11712 (home-page "https://fusesource.github.io/jansi/")
11713 (synopsis "Portable ANSI escape sequences")
11714 (description "Jansi is a Java library that allows you to use ANSI escape
11715 sequences to format your console output which works on every platform.")
11716 (license license:asl2.0)))
11717
11718 (define-public java-jboss-el-api-spec
11719 (package
11720 (name "java-jboss-el-api-spec")
11721 (version "3.0")
11722 (source (origin
11723 (method url-fetch)
11724 (uri (string-append "https://github.com/jboss/jboss-el-api_spec/"
11725 "archive/jboss-el-api_" version
11726 "_spec-1.0.7.Final.tar.gz"))
11727 (sha256
11728 (base32
11729 "1j45ljxalwlibxl7g7iv952sjxkw275m8vyxxij8l6wdd5pf0pdh"))))
11730 (build-system ant-build-system)
11731 (arguments
11732 `(#:jar-name "java-jboss-el-api_spec.jar"
11733 #:modules ((guix build ant-build-system)
11734 (guix build utils)
11735 (guix build maven pom)
11736 (guix build java-utils)
11737 (sxml simple))
11738 #:phases
11739 (modify-phases %standard-phases
11740 ;; the origin of javax.el:javax.el-api is unknown, so we use this package
11741 ;; instead, which implements the same thing. We override the pom file
11742 ;; to "rename" the package so it can be found by maven.
11743 (add-before 'install 'override-pom
11744 (lambda _
11745 (delete-file "pom.xml")
11746 (with-output-to-file "pom.xml"
11747 (lambda _
11748 (sxml->xml
11749 `(project
11750 (modelVersion "4.0.0")
11751 (name "el-api")
11752 (groupId "javax.el")
11753 (artifactId "javax.el-api")
11754 (version "3.0")))))
11755 #t))
11756 (replace 'install
11757 (install-from-pom "pom.xml")))))
11758 (inputs
11759 `(("java-junit" ,java-junit)))
11760 (home-page "https://github.com/jboss/jboss-el-api_spec")
11761 (synopsis "JSR-341 expression language 3.0 API")
11762 (description "This package contains an implementation of the JSR-341
11763 specification for the expression language 3.0. It implements an expression
11764 language inspired by ECMAScript and XPath. This language is used with
11765 JavaServer Pages (JSP).")
11766 ;; Either GPL2 only or CDDL.
11767 (license (list license:gpl2 license:cddl1.1))))
11768
11769 (define-public java-jboss-interceptors-api-spec
11770 (package
11771 (name "java-jboss-interceptors-api-spec")
11772 (version "1.2")
11773 (source (origin
11774 (method url-fetch)
11775 (uri (string-append "https://github.com/jboss/jboss-interceptors-api_spec/"
11776 "archive/jboss-interceptors-api_" version
11777 "_spec-1.0.0.Final.tar.gz"))
11778 (sha256
11779 (base32
11780 "0wv8x0jp9a5qxlrgkhb5jdk2gr6vi87b4j4kjb8ryxiy9gn8g51z"))))
11781 (build-system ant-build-system)
11782 (arguments
11783 `(#:jar-name "java-jboss-interceptors-api_spec.jar"
11784 #:jdk ,icedtea-8
11785 #:source-dir "."
11786 #:tests? #f; no tests
11787 #:modules ((guix build ant-build-system)
11788 (guix build utils)
11789 (guix build maven pom)
11790 (guix build java-utils)
11791 (sxml simple))
11792 #:phases
11793 (modify-phases %standard-phases
11794 ;; the origin of javax.interceptor:javax.interceptor-api is unknown,
11795 ;; so we use this package instead, which implements the same thing.
11796 ;; We override the pom file to "rename" the package so it can be found
11797 ;; by maven.
11798 (add-before 'install 'override-pom
11799 (lambda _
11800 (delete-file "pom.xml")
11801 (with-output-to-file "pom.xml"
11802 (lambda _
11803 (sxml->xml
11804 `(project
11805 (modelVersion "4.0.0")
11806 (name "interceptor-api")
11807 (groupId "javax.interceptor")
11808 (artifactId "javax.interceptor-api")
11809 (version "3.0")))))
11810 #t))
11811 (replace 'install
11812 (install-from-pom "pom.xml")))))
11813 (home-page "https://github.com/jboss/jboss-interceptors-api_spec")
11814 (synopsis "Interceptors 1.2 API classes from JSR 318")
11815 (description "Java-jboss-interceptors-api-spec implements the Interceptors
11816 API. Interceptors are used to interpose on business method invocations and
11817 specific events.")
11818 ;; Either GPL2 only or CDDL.
11819 (license (list license:gpl2 license:cddl1.1))))
11820
11821 (define-public java-cdi-api
11822 (package
11823 (name "java-cdi-api")
11824 (version "2.0")
11825 (source (origin
11826 (method url-fetch)
11827 (uri (string-append "https://github.com/cdi-spec/cdi/archive/"
11828 version ".tar.gz"))
11829 (file-name (string-append name "-" version ".tar.gz"))
11830 (sha256
11831 (base32
11832 "1iv8b8bp07c5kmqic14jsr868vycjv4qv02lf3pkgp9z21mnfg5y"))))
11833 (build-system ant-build-system)
11834 (arguments
11835 `(#:source-dir "api/src/main/java"
11836 #:jar-name "java-cdi-api.jar"
11837 #:test-dir "api/src/test"
11838 #:jdk ,icedtea-8
11839 #:tests? #f; Tests fail because we don't have a CDI provider yet
11840 #:phases
11841 (modify-phases %standard-phases
11842 (replace 'install
11843 (install-from-pom "api/pom.xml")))))
11844 (propagated-inputs
11845 `(("java-javax-inject" ,java-javax-inject)
11846 ("java-jboss-el-api-spec" ,java-jboss-el-api-spec)
11847 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)
11848 ("java-weld-parent-pom" ,java-weld-parent-pom)))
11849 (native-inputs
11850 `(("java-testng" ,java-testng)
11851 ("java-hamcrest-core" ,java-hamcrest-core)))
11852 (home-page "http://cdi-spec.org/")
11853 (synopsis "Contexts and Dependency Injection APIs")
11854 (description "Java-cdi-api contains the required APIs for Contexts and
11855 Dependency Injection (CDI).")
11856 (license license:asl2.0)))
11857
11858 (define-public java-joda-convert
11859 (package
11860 (name "java-joda-convert")
11861 (version "1.9.2")
11862 (source (origin
11863 (method url-fetch)
11864 (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v"
11865 version ".tar.gz"))
11866 (file-name (string-append name "-" version ".tar.gz"))
11867 (sha256
11868 (base32
11869 "0vp346xz7dh9br4q7xazhc7hvzf76a6hf95fki9bg67q5jr0kjh7"))))
11870 (build-system ant-build-system)
11871 (arguments
11872 `(#:jar-name (string-append ,name "-" ,version ".jar")
11873 #:source-dir "src/main/java"
11874 #:test-include (list "**/Test*.java")
11875 ;; Contains only interfaces and base classes (no test)
11876 #:test-exclude (list "**/test*/**.java")))
11877 (inputs
11878 `(("java-guava" ,java-guava)))
11879 (native-inputs
11880 `(("java-junit" ,java-junit)
11881 ("java-hamcrest-core" ,java-hamcrest-core)))
11882 (home-page "https://www.joda.org/joda-convert/")
11883 (synopsis "Conversion between Objects and Strings")
11884 (description "Joda-Convert provides a small set of classes to aid
11885 conversion between Objects and Strings. It is not intended to tackle the
11886 wider problem of Object to Object transformation.")
11887 (license license:asl2.0)))
11888
11889 (define-public java-joda-time
11890 (package
11891 (name "java-joda-time")
11892 (version "2.9.9")
11893 (source (origin
11894 (method url-fetch)
11895 (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v"
11896 version ".tar.gz"))
11897 (file-name (string-append name "-" version ".tar.gz"))
11898 (sha256
11899 (base32
11900 "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1"))))
11901 (build-system ant-build-system)
11902 (arguments
11903 `(#:jar-name "java-joda-time.jar"
11904 #:source-dir "src/main/java"
11905 #:test-include (list "**/Test*.java")
11906 ;; There is no runnable test in these files
11907 #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java")
11908 #:phases
11909 (modify-phases %standard-phases
11910 (add-after 'build 'build-resources
11911 (lambda _
11912 (mkdir-p "build/classes/org/joda/time/tz/data")
11913 (mkdir-p "build/classes/org/joda/time/format")
11914 ;; This will produce the following exception:
11915 ;; java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap"
11916 ;; which is normal, because it doesn't exist yet. It still generates
11917 ;; the same file as in the binary one can find on maven.
11918 (invoke "java" "-cp"
11919 (string-append "build/classes:" (getenv "CLASSPATH"))
11920 "org.joda.time.tz.ZoneInfoCompiler"
11921 "-src" "src/main/java/org/joda/time/tz/src"
11922 "-dst" "build/classes/org/joda/time/tz/data"
11923 "africa" "antarctica" "asia" "australasia"
11924 "europe" "northamerica" "southamerica"
11925 "pacificnew" "etcetera" "backward" "systemv")
11926 (for-each (lambda (f)
11927 (copy-file f (string-append
11928 "build/classes/org/joda/time/format/"
11929 (basename f))))
11930 (find-files "src/main/java/org/joda/time/format" ".*.properties"))
11931 #t))
11932 (add-before 'install 'regenerate-jar
11933 (lambda _
11934 ;; We need to regenerate the jar file to add generated data.
11935 (delete-file "build/jar/java-joda-time.jar")
11936 (invoke "ant" "jar")))
11937 (add-before 'check 'copy-test-resources
11938 (lambda _
11939 (mkdir-p "build/test-classes/org/joda/time/tz/data")
11940 (copy-file "src/test/resources/tzdata/ZoneInfoMap"
11941 "build/test-classes/org/joda/time/tz/data/ZoneInfoMap")
11942 (copy-recursively "src/test/resources" "build/test-classes")
11943 #t)))))
11944 (inputs
11945 `(("java-joda-convert" ,java-joda-convert)))
11946 (native-inputs
11947 `(("java-junit" ,java-junit)
11948 ("java-hamcrest-core" ,java-hamcrest-core)
11949 ("tzdata" ,tzdata)))
11950 (home-page "https://www.joda.org/joda-time/")
11951 (synopsis "Replacement for the Java date and time classes")
11952 (description "Joda-Time is a replacement for the Java date and time
11953 classes prior to Java SE 8.")
11954 (license license:asl2.0)))
11955
11956 (define-public java-xerces
11957 (package
11958 (name "java-xerces")
11959 (version "2.12.1")
11960 (source
11961 (origin
11962 (method url-fetch)
11963 (uri (string-append "mirror://apache/xerces/j/source/"
11964 "Xerces-J-src." version ".tar.gz"))
11965 (sha256
11966 (base32 "0494kq36gw3nah19ifb720vwxbpg4ww0k6m3zq6wyanw6a083p6s"))
11967 (patches (search-patches
11968 "java-xerces-xjavac_taskdef.patch"
11969 "java-xerces-build_dont_unzip.patch"
11970 "java-xerces-bootclasspath.patch"))))
11971 (build-system ant-build-system)
11972 (arguments
11973 `(#:tests? #f;; Test files are not present
11974 #:test-target "test"
11975 #:jdk ,icedtea-8
11976 #:phases
11977 (modify-phases %standard-phases
11978 (add-after 'unpack 'create-build.properties
11979 (lambda* (#:key inputs #:allow-other-keys)
11980 (let ((jaxp (assoc-ref inputs "java-jaxp"))
11981 (resolver (assoc-ref inputs "java-apache-xml-commons-resolver")))
11982 (with-output-to-file "build.properties"
11983 (lambda _
11984 (format #t
11985 "jar.jaxp = ~a/share/java/jaxp.jar~@
11986 jar.apis-ext = ~a/share/java/jaxp.jar~@
11987 jar.resolver = ~a/share/java/xml-resolver.jar~%"
11988 jaxp jaxp resolver)))
11989 ;; Make xerces use our version of jaxp in tests
11990 (substitute* "build.xml"
11991 (("xml-apis.jar")
11992 (string-append jaxp "/share/java/jaxp.jar"))
11993 (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}")
11994 "${jar.apis}")))
11995 #t))
11996 (replace 'install (install-jars "build")))))
11997 (inputs
11998 `(("java-apache-xml-commons-resolver" ,java-apache-xml-commons-resolver)
11999 ("java-jaxp" ,java-jaxp)))
12000 (home-page "https://xerces.apache.org/xerces2-j/")
12001 (synopsis "Validating XML parser for Java with DOM level 3 support")
12002 (description "The Xerces2 Java parser is the reference implementation of
12003 XNI, the Xerces Native Interface, and also a fully conforming XML Schema
12004 processor.
12005
12006 Xerces2-J supports the following standards and APIs:
12007
12008 @itemize
12009 @item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation
12010 @item Namespaces in XML Recommendation
12011 @item Document Object Model (DOM) Level 2 Core, Events, and Traversal and
12012 Range Recommendations
12013 @item Simple API for XML (SAX) 2.0.1 Core and Extension
12014 @item Java APIs for XML Processing (JAXP) 1.2.01
12015 @item XML Schema 1.0 Structures and Datatypes Recommendations
12016 @item Experimental implementation of the Document Object Model (DOM) Level 3
12017 Core and Load/Save Working Drafts
12018 @item Provides a partial implementation of the XML Inclusions (XInclude) W3C
12019 Candidate Recommendation
12020 @end itemize
12021
12022 Xerces is now able to parse documents written according to the XML 1.1
12023 Candidate Recommendation, except that it does not yet provide an option to
12024 enable normalization checking as described in section 2.13 of this
12025 specification. It also handles namespaces according to the XML Namespaces 1.1
12026 Candidate Recommendation, and will correctly serialize XML 1.1 documents if
12027 the DOM level 3 load/save API's are in use.")
12028 (license license:asl2.0)))
12029
12030 (define-public java-jakarta-regexp
12031 (package
12032 (name "java-jakarta-regexp")
12033 (version "1.5")
12034 (source
12035 (origin
12036 (method url-fetch)
12037 (uri (string-append
12038 "https://archive.apache.org/dist/jakarta/regexp/jakarta-regexp-"
12039 version ".tar.gz"))
12040 (sha256
12041 (base32
12042 "0zg9rmyif48dck0cv6ynpxv23mmcsx265am1fnnxss7brgw0ms3r"))))
12043 (build-system ant-build-system)
12044 (arguments
12045 `(#:test-target "test"
12046 #:phases
12047 (modify-phases %standard-phases
12048 (replace 'install
12049 (lambda* (#:key outputs #:allow-other-keys)
12050 (let* ((out (assoc-ref outputs "out"))
12051 (out-share (string-append out "/share/java")))
12052 (mkdir-p out-share)
12053 (for-each (lambda (name)
12054 (install-file name out-share))
12055 (find-files "build" "^jakarta-regexp-.*\\.jar$"))
12056 #t))))))
12057 (home-page "https://attic.apache.org/projects/jakarta-regexp.html")
12058 (synopsis "Regular expression parser generator for Java.")
12059 (description "@code{jakarta-regexp} is an old regular expression parser
12060 generator for Java.")
12061 (license license:asl2.0)))
12062
12063 (define-public java-jline
12064 (package
12065 (name "java-jline")
12066 (version "1.0")
12067 (source (origin
12068 (method url-fetch)
12069 (uri (string-append "https://github.com/jline/jline1/archive/jline-"
12070 version ".tar.gz"))
12071 (sha256
12072 (base32
12073 "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir"))))
12074 (build-system ant-build-system)
12075 (arguments
12076 `(#:jar-name "jline.jar"
12077 #:source-dir "src/main/java"
12078 #:test-dir "src/test"
12079 #:phases
12080 (modify-phases %standard-phases
12081 (add-before 'build 'copy-resources
12082 (lambda _
12083 (copy-recursively "src/main/resources" "build/classes")
12084 #t)))))
12085 (native-inputs
12086 `(("java-junit" ,java-junit)))
12087 (home-page "https://jline.github.io")
12088 (synopsis "Console input handling library")
12089 (description "JLine is a Java library for handling console input. It is
12090 similar in functionality to BSD editline and GNU readline but with additional
12091 features that bring it on par with the Z shell line editor.")
12092 (license license:bsd-3)))
12093
12094 (define-public java-jline-2
12095 (package
12096 (inherit java-jline)
12097 (version "2.14.5")
12098 (source (origin
12099 (method url-fetch)
12100 (uri (string-append "https://github.com/jline/jline2/archive/jline-"
12101 version ".tar.gz"))
12102 (sha256
12103 (base32
12104 "1c6qa26mf0viw8hg4jnv72s7i1qb1gh1l8rrzcdvqhqhx82rkdlf"))))
12105 (arguments
12106 `(#:jdk ,icedtea-8
12107 ,@(package-arguments java-jline)))
12108 (inputs
12109 `(("java-jansi" ,java-jansi)
12110 ("java-jansi-native" ,java-jansi-native)))
12111 (native-inputs
12112 `(("java-powermock-modules-junit4" ,java-powermock-modules-junit4)
12113 ("java-powermock-modules-junit4-common" ,java-powermock-modules-junit4-common)
12114 ("java-powermock-api-easymock" ,java-powermock-api-easymock)
12115 ("java-powermock-api-support" ,java-powermock-api-support)
12116 ("java-powermock-core" ,java-powermock-core)
12117 ("java-powermock-reflect" ,java-powermock-reflect)
12118 ("java-easymock" ,java-easymock)
12119 ("java-jboss-javassist" ,java-jboss-javassist)
12120 ("java-objenesis" ,java-objenesis)
12121 ("java-asm" ,java-asm)
12122 ("java-hamcrest-core" ,java-hamcrest-core)
12123 ("java-cglib" ,java-cglib)
12124 ("java-junit" ,java-junit)
12125 ("java-hawtjni" ,java-hawtjni)))))
12126
12127 (define-public java-xmlunit
12128 (package
12129 (name "java-xmlunit")
12130 (version "2.5.1")
12131 (source (origin
12132 (method url-fetch)
12133 (uri (string-append "https://github.com/xmlunit/xmlunit/archive/v"
12134 version ".tar.gz"))
12135 (file-name (string-append name "-" version ".tar.gz"))
12136 (sha256
12137 (base32
12138 "035rivlnmwhfqj0fzviciv0bkh1h95ps1iwnh2kjcvdbk5nccm4z"))))
12139 (build-system ant-build-system)
12140 (arguments
12141 `(#:jar-name "java-xmlunit.jar"
12142 #:source-dir "xmlunit-core/src/main/java"
12143 #:test-dir "xmlunit-core/src/test"
12144 #:phases
12145 (modify-phases %standard-phases
12146 (add-before 'check 'copy-test-resources
12147 (lambda* (#:key inputs #:allow-other-keys)
12148 (copy-recursively (assoc-ref inputs "resources") "../test-resources")
12149 #t)))))
12150 (native-inputs
12151 `(("java-junit" ,java-junit)
12152 ("java-mockito-1" ,java-mockito-1)
12153 ("java-hamcrest-all" ,java-hamcrest-all)
12154 ("java-objenesis" ,java-objenesis)
12155 ("java-asm" ,java-asm)
12156 ("java-cglib" ,java-cglib)
12157 ("resources"
12158 ,(origin
12159 (method git-fetch)
12160 (uri (git-reference
12161 (url "https://github.com/xmlunit/test-resources")
12162 (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec")))
12163 (file-name "java-xmlunit-test-resources")
12164 (sha256
12165 (base32
12166 "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr"))))))
12167 (home-page "https://www.xmlunit.org/")
12168 (synopsis "XML output testing")
12169 (description "XMLUnit provides you with the tools to verify the XML you
12170 emit is the one you want to create. It provides helpers to validate against
12171 an XML Schema, assert the values of XPath queries or compare XML documents
12172 against expected outcomes.")
12173 (license license:asl2.0)))
12174
12175 (define-public java-xmlunit-legacy
12176 (package
12177 (inherit java-xmlunit)
12178 (name "java-xmlunit-legacy")
12179 (arguments
12180 `(#:jar-name "java-xmlunit-legacy.jar"
12181 #:source-dir "xmlunit-legacy/src/main/java"
12182 #:test-dir "xmlunit-legacy/src/test"))
12183 (inputs
12184 `(("java-xmlunit" ,java-xmlunit)
12185 ("java-junit" ,java-junit)))
12186 (native-inputs
12187 `(("java-mockito-1" ,java-mockito-1)))))
12188
12189 (define-public java-xmlunit-matchers
12190 (package
12191 (inherit java-xmlunit)
12192 (name "java-xmlunit-matchers")
12193 (arguments
12194 `(#:jar-name "java-xmlunit-matchers.jar"
12195 #:source-dir "xmlunit-matchers/src/main/java"
12196 #:test-dir "xmlunit-matchers/src/test"
12197 #:test-exclude
12198 ;; Cannot open xsd for http://www.xmlunit.org/test-support/Book.xsd
12199 (list "**/ValidationMatcherTest.java")
12200 #:phases
12201 (modify-phases %standard-phases
12202 (add-before 'build 'copy-test-class
12203 (lambda _
12204 (copy-file "xmlunit-core/src/test/java/org/xmlunit/TestResources.java"
12205 "xmlunit-matchers/src/test/java/org/xmlunit/TestResources.java")
12206 #t))
12207 (add-before 'build 'fix-test-resources-path
12208 (lambda _
12209 (substitute* (find-files "xmlunit-matchers/src/test" ".*.java")
12210 (("../test-resources") "test-resources"))
12211 #t))
12212 (add-before 'check 'copy-test-resources
12213 (lambda* (#:key inputs #:allow-other-keys)
12214 (copy-recursively (assoc-ref inputs "resources") "test-resources")
12215 #t)))))
12216 (inputs
12217 `(("java-xmlunit" ,java-xmlunit)
12218 ("java-junit" ,java-junit)))))
12219
12220 (define-public java-openchart2
12221 (package
12222 (name "java-openchart2")
12223 (version "1.4.3")
12224 (source (origin
12225 (method url-fetch)
12226 (uri (string-append "http://download.approximatrix.com/openchart2/"
12227 "openchart2-" version ".source.zip"))
12228 (sha256
12229 (base32
12230 "1xq96zm5r02n1blja0072jmmsifmxc40lbyfbnmcnr6mw42frh4g"))))
12231 (build-system ant-build-system)
12232 (arguments
12233 `(#:test-target "test"
12234 #:phases
12235 (modify-phases %standard-phases
12236 (add-after 'unpack 'fix-junit-errors
12237 (lambda _
12238 (with-directory-excursion "unittest/src/com/approximatrix/charting/"
12239 (substitute* '("coordsystem/ticklocator/NumericXTickLocatorTest.java"
12240 "coordsystem/ticklocator/NumericYTickLocatorTest.java"
12241 "coordsystem/ticklocator/ObjectXTickLocatorTest.java"
12242 "model/DefaultChartDataModelConstraintsTest.java"
12243 "model/MultiScatterDataModelConstraintsTest.java"
12244 "model/threedimensional/DotPlotDataModelConstraintsTest.java")
12245 (("(assertEquals[^;]+);" before _)
12246 (string-append (string-drop-right before 2) ", 1E-6);"))))
12247 #t))
12248 (replace 'install (install-jars ".")))))
12249 (native-inputs
12250 `(("unzip" ,unzip)
12251 ("java-junit" ,java-junit)
12252 ("java-hamcrest-core" ,java-hamcrest-core)))
12253 (home-page "https://approximatrix.com/products/openchart2/")
12254 (synopsis "Simple plotting for Java")
12255 (description "Openchart2 provides a simple, yet powerful, interface for
12256 Java programmers to create two-dimensional charts and plots. The library
12257 features an assortment of graph styles, including advanced scatter plots, bar
12258 graphs, and pie charts.")
12259 (license license:lgpl2.1+)))
12260
12261 (define-public java-commons-httpclient
12262 (package
12263 (name "java-commons-httpclient")
12264 (version "3.1")
12265 (source (origin
12266 (method url-fetch)
12267 (uri (string-append "mirror://apache/httpcomponents/"
12268 "commons-httpclient/source/commons-httpclient-"
12269 version "-src.tar.gz"))
12270 (sha256
12271 (base32
12272 "1wlpn3cfy3d4inxy6g7wxcsa8p7sshn6aldk9y4ia3lb879rd97r"))))
12273 (build-system ant-build-system)
12274 (arguments
12275 `(#:build-target "compile"
12276 #:test-target "test"
12277 #:tests? #f; requires junit-textui (junit 3)
12278 #:phases
12279 (modify-phases %standard-phases
12280 (add-before 'build 'fix-accent
12281 (lambda _
12282 (for-each (lambda (file)
12283 (with-fluids ((%default-port-encoding "ISO-8859-1"))
12284 (substitute* file
12285 (("\\* @author Ortwin .*") "* @author Ortwin Glueck\n"))))
12286 '("src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java"
12287 "src/examples/TrivialApp.java" "src/examples/ClientApp.java"
12288 "src/test/org/apache/commons/httpclient/TestHttps.java"
12289 "src/test/org/apache/commons/httpclient/TestURIUtil2.java"))
12290 #t))
12291 (replace 'install
12292 (lambda* (#:key outputs #:allow-other-keys)
12293 (invoke "ant" "dist"
12294 (string-append "-Ddist.home=" (assoc-ref outputs "out")
12295 "/share/java"))
12296 #t)))))
12297 (propagated-inputs
12298 `(("java-commons-logging" ,java-commons-logging-minimal)
12299 ("java-commons-codec" ,java-commons-codec)))
12300 (home-page "https://hc.apache.org")
12301 (synopsis "HTTP/1.1 compliant HTTP agent implementation")
12302 (description "This package contains an HTTP/1.1 compliant HTTP agent
12303 implementation. It also provides reusable components for client-side
12304 authentication, HTTP state management, and HTTP connection management.")
12305 (license license:asl2.0)))
12306
12307 (define-public java-commons-vfs
12308 (package
12309 (name "java-commons-vfs")
12310 (version "2.2")
12311 (source (origin
12312 (method url-fetch)
12313 (uri (string-append "mirror://apache/commons/vfs/source/"
12314 "commons-vfs2-distribution-" version "-src.tar.gz"))
12315 (file-name (string-append name "-" version ".tar.gz"))
12316 (sha256
12317 (base32
12318 "1cnq1iaghbp4cslpnvwbp83i5v234x87irssqynhwpfgw7caf1s3"))
12319 (modules '((guix build utils)))
12320 (snippet
12321 '(begin
12322 (for-each delete-file
12323 (find-files "." "\\.jar$"))
12324 #t))))
12325 (build-system ant-build-system)
12326 (arguments
12327 `(#:jar-name "commons-vfs.jar"
12328 #:source-dir "commons-vfs2/src/main/java"
12329 #:test-dir "commons-vfs2/src/test"
12330 ; FIXME: tests depend on many things: apache sshd, hadoop, ftpserver, ...
12331 #:tests? #f
12332 #:phases
12333 (modify-phases %standard-phases
12334 (add-before 'build 'remove-hadoop-and-webdav
12335 ; Remove these files as they are not required and depend on difficult
12336 ; packages.
12337 (lambda _
12338 (for-each delete-file-recursively
12339 '("commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/webdav"
12340 "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs"))
12341 #t)))))
12342 (inputs
12343 `(("java-commons-collections4" ,java-commons-collections4)
12344 ("java-commons-compress" ,java-commons-compress)
12345 ("java-commons-httpclient" ,java-commons-httpclient)
12346 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
12347 ("java-commons-net" ,java-commons-net)
12348 ("java-jsch" ,java-jsch)))
12349 (home-page "https://commons.apache.org/proper/commons-vfs/")
12350 (synopsis "Java file system library")
12351 (description "Commons VFS provides a single API for accessing various
12352 different file systems. It presents a uniform view of the files from various
12353 different sources, such as the files on local disk, on an HTTP server, or
12354 inside a Zip archive.")
12355 (license license:asl2.0)))
12356
12357 (define-public java-jakarta-oro
12358 (package
12359 (name "java-jakarta-oro")
12360 (version "2.0.8")
12361 (source (origin
12362 (method url-fetch)
12363 (uri (string-append "mirror://apache/jakarta/oro/"
12364 "jakarta-oro-" version ".tar.gz"))
12365 (sha256
12366 (base32
12367 "0rpmnsskiwmsy8r0sckz5n5dbvh3vkxx8hpm177c754r8xy3qksc"))
12368 (modules '((guix build utils)))
12369 (snippet
12370 `(begin
12371 (delete-file (string-append "jakarta-oro-" ,version ".jar"))
12372 #t))))
12373 (build-system ant-build-system)
12374 (arguments
12375 `(#:build-target "package"
12376 #:make-flags (list "-DDATE" "(no recorded date for reproducibility)")
12377 #:tests? #f; tests are run as part of the build process
12378 #:phases
12379 (modify-phases %standard-phases
12380 (replace 'install
12381 (install-jars ,(string-append "jakarta-oro-" version))))))
12382 (home-page "https://jakarta.apache.org/oro/")
12383 (synopsis "Text-processing for Java")
12384 (description "The Jakarta-ORO Java classes are a set of text-processing
12385 Java classes that provide Perl5 compatible regular expressions, AWK-like
12386 regular expressions, glob expressions, and utility classes for performing
12387 substitutions, splits, filtering filenames, etc. This library is the successor
12388 of the OROMatcher, AwkTools, PerlTools, and TextTools libraries originally
12389 from ORO, Inc.")
12390 (license license:asl1.1)))
12391
12392 (define-public java-native-access
12393 (package
12394 (name "java-native-access")
12395 (version "4.5.1")
12396 (source (origin
12397 (method url-fetch)
12398 (uri (string-append "https://github.com/java-native-access/jna/"
12399 "archive/" version ".tar.gz"))
12400 (file-name (string-append name "-" version ".tar.gz"))
12401 (sha256
12402 (base32
12403 "0zrpzkib6b905i018a9pqlzkqinphywr6y4jwv6mwp63jjqvqkd9"))
12404 (modules '((guix build utils)))
12405 (snippet
12406 `(begin
12407 (for-each delete-file (find-files "." ".*.jar"))
12408 (delete-file-recursively "native/libffi")
12409 (delete-file-recursively "dist")
12410 #t))))
12411 (build-system ant-build-system)
12412 (arguments
12413 `(#:tests? #f; FIXME: tests require reflections.jar
12414 #:test-target "test"
12415 #:make-flags (list "-Ddynlink.native=true")
12416 #:phases
12417 (modify-phases %standard-phases
12418 (add-before 'build 'fix-build.xml
12419 (lambda* (#:key inputs #:allow-other-keys)
12420 (substitute* "build.xml"
12421 ;; Since we removed the bundled ant.jar, give the correct path
12422 (("lib/ant.jar") (string-append (assoc-ref inputs "ant") "/lib/ant.jar"))
12423 ;; We removed generated native libraries. We can only rebuild one
12424 ;; so don't fail if we can't find a native library for another architecture.
12425 (("zipfileset") "zipfileset erroronmissingarchive=\"false\""))
12426 ;; Copy test dependencies
12427 (copy-file (car (find-files (assoc-ref inputs "java-junit") "jar$"))
12428 "lib/junit.jar")
12429 (copy-file (car (find-files (assoc-ref inputs "java-hamcrest-core")
12430 "jar$"))
12431 "lib/hamcrest-core.jar")
12432 ;; FIXME: once reflections.jar is built, copy it to lib/test.
12433 #t))
12434 (add-before 'build 'build-native
12435 (lambda _
12436 (invoke "ant" "-Ddynlink.native=true" "native")
12437 #t))
12438 (replace 'install
12439 (install-jars "build")))))
12440 (inputs
12441 `(("libffi" ,libffi)
12442 ("libx11" ,libx11)
12443 ("libxt" ,libxt)))
12444 (native-inputs
12445 `(("java-junit" ,java-junit)
12446 ("java-hamcrest-core" ,java-hamcrest-core)))
12447 (home-page "https://github.com/java-native-access/jna")
12448 (synopsis "Access to native shared libraries from Java")
12449 (description "JNA provides Java programs easy access to native shared
12450 libraries without writing anything but Java code - no JNI or native code is
12451 required. JNA allows you to call directly into native functions using natural
12452 Java method invocation.")
12453 ;; Java Native Access project (JNA) is dual-licensed under 2
12454 ;; alternative Free licenses: LGPL 2.1 or later and Apache License 2.0.
12455 (license (list
12456 license:asl2.0
12457 license:lgpl2.1+))))
12458
12459 (define-public java-native-access-platform
12460 (package
12461 (inherit java-native-access)
12462 (name "java-native-access-platform")
12463 (arguments
12464 `(#:test-target "test"
12465 #:tests? #f; require jna-test.jar
12466 #:phases
12467 (modify-phases %standard-phases
12468 (add-before 'build 'chdir
12469 (lambda _
12470 (chdir "contrib/platform")
12471 #t))
12472 (add-after 'chdir 'fix-ant
12473 (lambda* (#:key inputs #:allow-other-keys)
12474 (substitute* "nbproject/project.properties"
12475 (("../../build/jna.jar")
12476 (string-append (assoc-ref inputs "java-native-access")
12477 "/share/java/jna.jar"))
12478 (("../../lib/hamcrest-core-.*.jar")
12479 (car (find-files (assoc-ref inputs "java-hamcrest-core")
12480 "jar$")))
12481 (("../../lib/junit.jar")
12482 (car (find-files (assoc-ref inputs "java-junit")
12483 "jar$"))))
12484 #t))
12485 (replace 'install
12486 (install-jars "dist")))))
12487 (inputs
12488 `(("java-native-access" ,java-native-access)))
12489 (synopsis "Cross-platform mappings for jna")
12490 (description "java-native-access-platform has cross-platform mappings
12491 and mappings for a number of commonly used platform functions, including a
12492 large number of Win32 mappings as well as a set of utility classes that
12493 simplify native access.")))
12494
12495 (define-public java-jsch-agentproxy-core
12496 (package
12497 (name "java-jsch-agentproxy-core")
12498 (version "0.0.8")
12499 (source (origin
12500 (method url-fetch)
12501 (uri (string-append "https://github.com/ymnk/jsch-agent-proxy/archive/"
12502 version ".tar.gz"))
12503 (file-name (string-append name "-" version ".tar.gz"))
12504 (sha256
12505 (base32
12506 "02iqg6jbc1kxvfzqcg6wy9ygqxfm82bw5rf6vnswqy4y572niz4q"))))
12507 (build-system ant-build-system)
12508 (arguments
12509 `(#:jar-name "jsch-agentproxy-core.jar"
12510 #:source-dir "jsch-agent-proxy-core/src/main/java"
12511 #:tests? #f)); no tests
12512 (home-page "https://github.com/ymnk/jsch-agent-proxy")
12513 (synopsis "Core component of the proxy to ssh-agent and Pageant in Java")
12514 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12515 and Pageant included Putty. It will be easily integrated into JSch, and users
12516 will be allowed to use these programs for authentication.")
12517 (license license:bsd-3)))
12518
12519 (define-public java-jsch-agentproxy-sshagent
12520 (package
12521 (inherit java-jsch-agentproxy-core)
12522 (name "java-jsch-agentproxy-sshagent")
12523 (arguments
12524 `(#:jar-name "jsch-agentproxy-sshagent.jar"
12525 #:source-dir "jsch-agent-proxy-sshagent/src/main/java"
12526 #:tests? #f)); no tests
12527 (inputs
12528 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
12529 (synopsis "Proxy to ssh-agent")
12530 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12531 and Pageant included in Putty. This component contains the code for a proxy to
12532 ssh-agent.")))
12533
12534 (define-public java-jsch-agentproxy-usocket-jna
12535 (package
12536 (inherit java-jsch-agentproxy-core)
12537 (name "java-jsch-agentproxy-usocket-jna")
12538 (arguments
12539 `(#:jar-name "jsch-agentproxy-usocket-jna.jar"
12540 #:source-dir "jsch-agent-proxy-usocket-jna/src/main/java"
12541 #:tests? #f)); no tests
12542 (inputs
12543 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
12544 ("java-native-access" ,java-native-access)))
12545 (synopsis "USocketFactory implementation using JNA")
12546 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12547 and Pageant included in Putty. This component contains an implementation of
12548 USocketFactory using @dfn{JNA} (Java Native Access).")))
12549
12550 (define-public java-jsch-agentproxy-pageant
12551 (package
12552 (inherit java-jsch-agentproxy-core)
12553 (name "java-jsch-agentproxy-pageant")
12554 (arguments
12555 `(#:jar-name "jsch-agentproxy-pageant.jar"
12556 #:source-dir "jsch-agent-proxy-pageant/src/main/java"
12557 #:tests? #f)); no tests
12558 (inputs
12559 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
12560 ("java-native-access" ,java-native-access)
12561 ("java-native-access-platform" ,java-native-access-platform)))
12562 (synopsis "Proxy to pageant")
12563 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12564 and Pageant included in Putty. This component contains the code for a proxy to
12565 pageant.")))
12566
12567 (define-public java-jsch-agentproxy-usocket-nc
12568 (package
12569 (inherit java-jsch-agentproxy-core)
12570 (name "java-jsch-agentproxy-usocket-nc")
12571 (arguments
12572 `(#:jar-name "jsch-agentproxy-usocket-nc.jar"
12573 #:source-dir "jsch-agent-proxy-usocket-nc/src/main/java"
12574 #:tests? #f)); no tests
12575 (inputs
12576 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
12577 (synopsis "USocketFactory implementation using netcat")
12578 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12579 and Pageant included in Putty. This component contains an implementation of
12580 USocketFactory using netcat.")))
12581
12582 (define-public java-jsch-agentproxy-connector-factory
12583 (package
12584 (inherit java-jsch-agentproxy-core)
12585 (name "java-jsch-agentproxy-connector-factory")
12586 (arguments
12587 `(#:jar-name "jsch-agentproxy-connector-factory.jar"
12588 #:source-dir "jsch-agent-proxy-connector-factory/src/main/java"
12589 #:tests? #f)); no tests
12590 (inputs
12591 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
12592 ("java-jsch-agentproxy-sshagent" ,java-jsch-agentproxy-sshagent)
12593 ("java-jsch-agentproxy-usocket-jna" ,java-jsch-agentproxy-usocket-jna)
12594 ("java-jsch-agentproxy-pageant" ,java-jsch-agentproxy-pageant)
12595 ("java-jsch-agentproxy-usocket-nc" ,java-jsch-agentproxy-usocket-nc)))
12596 (synopsis "Connector factory for jsch agent proxy")
12597 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12598 and Pageant included in Putty. This component contains a connector factory.")))
12599
12600 (define-public java-jsch-agentproxy-jsch
12601 (package
12602 (inherit java-jsch-agentproxy-core)
12603 (name "java-jsch-agentproxy-jsch")
12604 (arguments
12605 `(#:jar-name "jsch-agentproxy-jsch.jar"
12606 #:source-dir "jsch-agent-proxy-jsch/src/main/java"
12607 #:tests? #f)); no tests
12608 (inputs
12609 `(("java-jsch" ,java-jsch)
12610 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
12611 (synopsis "JSch integration library for agentproxy")
12612 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12613 and Pageant included in Putty. This component contains a library to use
12614 jsch-agent-proxy with JSch.")))
12615
12616 (define-public java-apache-ivy
12617 (package
12618 (name "java-apache-ivy")
12619 (version "2.4.0")
12620 (source (origin
12621 (method url-fetch)
12622 (uri (string-append "mirror://apache//ant/ivy/" version
12623 "/apache-ivy-" version "-src.tar.gz"))
12624 (sha256
12625 (base32
12626 "1xkfn57g2m7l6y0xdq75x5rnrgk52m9jx2xah70g3ggl8750hbr0"))
12627 (patches
12628 (search-patches
12629 "java-apache-ivy-port-to-latest-bouncycastle.patch"))))
12630 (build-system ant-build-system)
12631 (arguments
12632 `(#:jar-name "ivy.jar"
12633 #:tests? #f
12634 #:phases
12635 (modify-phases %standard-phases
12636 (add-before 'build 'remove-example
12637 (lambda _
12638 (delete-file-recursively "src/example")
12639 #t))
12640 (add-before 'build 'copy-resources
12641 (lambda _
12642 (with-directory-excursion "src/java"
12643 (for-each (lambda (file)
12644 (install-file file (string-append "../../build/classes/" (dirname file))))
12645 (append
12646 (find-files "." ".*.css")
12647 (find-files "." ".*.ent")
12648 (find-files "." ".*.html")
12649 (find-files "." ".*.properties")
12650 (find-files "." ".*.xsd")
12651 (find-files "." ".*.xsl")
12652 (find-files "." ".*.xml"))))
12653 #t))
12654 (add-before 'build 'fix-vfs
12655 (lambda _
12656 (substitute*
12657 '("src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java"
12658 "src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java")
12659 (("import org.apache.commons.vfs") "import org.apache.commons.vfs2"))
12660 #t))
12661 (add-before 'install 'copy-manifest
12662 (lambda _
12663 (install-file "META-INF/MANIFEST.MF" "build/classes/META-INF")
12664 #t))
12665 (add-before 'install 'repack
12666 (lambda _
12667 (invoke "jar" "-cmf" "build/classes/META-INF/MANIFEST.MF" "build/jar/ivy.jar"
12668 "-C" "build/classes" ".")))
12669 (add-after 'install 'install-bin
12670 (lambda* (#:key outputs #:allow-other-keys)
12671 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
12672 (ivy (string-append bin "/ivy"))
12673 (jar (string-append (assoc-ref outputs "out") "/share/java/ivy.jar")))
12674 (mkdir-p bin)
12675 (with-output-to-file ivy
12676 (lambda _
12677 (display (string-append
12678 "#!" (which "sh") "\n"
12679 "if [[ -z $CLASSPATH ]]; then\n"
12680 " cp=\"" (getenv "CLASSPATH") ":" jar "\"\n"
12681 "else\n"
12682 " cp=\"" (getenv "CLASSPATH") ":" jar ":$CLASSPATH\"\n"
12683 "fi\n"
12684 (which "java") " -cp $cp org.apache.ivy.Main $@\n"))))
12685 (chmod ivy #o755)
12686 #t))))))
12687 (inputs
12688 `(("java-bouncycastle" ,java-bouncycastle)
12689 ("java-commons-cli" ,java-commons-cli)
12690 ("java-commons-collections" ,java-commons-collections)
12691 ("java-commons-httpclient" ,java-commons-httpclient)
12692 ("java-commons-lang" ,java-commons-lang)
12693 ("java-commons-vfs" ,java-commons-vfs)
12694 ("java-jakarta-oro" ,java-jakarta-oro)
12695 ("java-jsch" ,java-jsch)
12696 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
12697 ("java-jsch-agentproxy-connector-factory" ,java-jsch-agentproxy-connector-factory)
12698 ("java-jsch-agentproxy-jsch" ,java-jsch-agentproxy-jsch)
12699 ("java-junit" ,java-junit)))
12700 (home-page "https://ant.apache.org/ivy")
12701 (synopsis "Dependency manager for the Java programming language")
12702 (description "Ivy is a tool for managing (recording, tracking, resolving
12703 and reporting) project dependencies. It is characterized by the following:
12704
12705 @itemize
12706 @item flexibility and configurability - Ivy is essentially process agnostic
12707 and is not tied to any methodology or structure. Instead it provides the
12708 necessary flexibility and configurability to be adapted to a broad range
12709 of dependency management and build processes.
12710 @item tight integration with Apache Ant - while available as a standalone tool,
12711 Ivy works particularly well with Apache Ant providing a number of
12712 powerful Ant tasks ranging from dependency resolution to dependency
12713 reporting and publication.
12714 @end itemize")
12715 (license license:asl2.0)))
12716
12717 (define-public java-eclipse-sisu-inject
12718 (package
12719 (name "java-eclipse-sisu-inject")
12720 (version "0.3.4")
12721 (source (origin
12722 (method git-fetch)
12723 (uri (git-reference
12724 (url "https://github.com/eclipse/sisu.inject/")
12725 (commit (string-append "releases/" version))))
12726 (file-name (git-file-name name version))
12727 (sha256
12728 (base32
12729 "16044sizdb0rjbhlfbmcnpds5y7by7dyn9b0c11606aikqi8k3x6"))))
12730 (build-system ant-build-system)
12731 (arguments
12732 `(#:jar-name "eclipse-sisu-inject.jar"
12733 #:source-dir "org.eclipse.sisu.inject/src"
12734 #:tests? #f; no tests
12735 #:phases
12736 (modify-phases %standard-phases
12737 (replace 'install
12738 (install-from-pom "org.eclipse.sisu.inject/pom.xml")))))
12739 (propagated-inputs
12740 `(("java-guice" ,java-guice)
12741 ("java-sisu-inject-parent-pom" ,java-sisu-inject-parent-pom)))
12742 (inputs
12743 `(("java-guice-servlet" ,java-guice-servlet)
12744 ("java-javax-inject" ,java-javax-inject)
12745 ("java-javaee-servletapi" ,java-javaee-servletapi)
12746 ("java-junit" ,java-junit)
12747 ("java-slf4j-api" ,java-slf4j-api)
12748 ("java-jsr305" ,java-jsr305)
12749 ("java-jsr250" ,java-jsr250)
12750 ("java-cdi-api" ,java-cdi-api)
12751 ("java-osgi-framework" ,java-osgi-framework)
12752 ("java-osgi-util-tracker" ,java-osgi-util-tracker)
12753 ("java-testng" ,java-testng)))
12754 (home-page "https://www.eclipse.org/sisu/")
12755 (synopsis "Classpath scanning, auto-binding, and dynamic auto-wiring")
12756 (description "Sisu is a modular JSR330-based container that supports
12757 classpath scanning, auto-binding, and dynamic auto-wiring. Sisu uses
12758 Google-Guice to perform dependency injection and provide the core JSR330
12759 support, but removes the need to write explicit bindings in Guice modules.
12760 Integration with other containers via the Eclipse Extension Registry and the
12761 OSGi Service Registry is a goal of this project.")
12762 (license license:epl1.0)))
12763
12764 (define java-sisu-inject-parent-pom
12765 (package
12766 (inherit java-eclipse-sisu-inject)
12767 (name "java-sisu-inject-parent-pom")
12768 (arguments
12769 `(#:tests? #f
12770 #:phases
12771 (modify-phases %standard-phases
12772 (delete 'configure)
12773 (delete 'build)
12774 (replace 'install
12775 (install-pom-file "pom.xml")))))
12776 (propagated-inputs '())))
12777
12778 (define-public java-eclipse-sisu-plexus
12779 (package
12780 (name "java-eclipse-sisu-plexus")
12781 (version "0.3.4")
12782 (source (origin
12783 (method git-fetch)
12784 (uri (git-reference
12785 (url "https://github.com/eclipse/sisu.plexus")
12786 (commit (string-append "releases/" version))))
12787 (file-name (git-file-name name version))
12788 (sha256
12789 (base32
12790 "17mjlajnsqnk07cc58h1qpxrif85yb2m2y0pyba48yjjgikk8r9f"))
12791 (modules '((guix build utils)))
12792 (snippet
12793 '(begin
12794 (for-each delete-file (find-files "." ".*.jar"))
12795 (rename-file "org.eclipse.sisu.plexus.tests/src"
12796 "org.eclipse.sisu.plexus.tests/java")
12797 #t))))
12798 (build-system ant-build-system)
12799 (arguments
12800 `(#:jar-name "eclipse-sisu-plexus.jar"
12801 #:source-dir "org.eclipse.sisu.plexus/src"
12802 #:test-dir "org.eclipse.sisu.plexus.tests"
12803 #:test-exclude
12804 (list
12805 ;; This test fails probably because we can't generate the necessary
12806 ;; meta-inf files.
12807 "**/PlexusLoggingTest.*"
12808 ;; FIXME: This test fails because of some injection error
12809 "**/PlexusRequirementTest.*")
12810 #:jdk ,icedtea-8
12811 #:phases
12812 (modify-phases %standard-phases
12813 (add-before 'build 'copy-resources
12814 (lambda _
12815 (install-file "org.eclipse.sisu.plexus/META-INF/plexus/components.xml"
12816 "build/classes/META-INF/plexus")
12817 #t))
12818 (add-before 'check 'build-test-jar
12819 (lambda _
12820 (with-directory-excursion "org.eclipse.sisu.plexus.tests/resources/component-jar/src/main/"
12821 (mkdir "build")
12822 (with-directory-excursion "java"
12823 (apply invoke "javac" "-cp"
12824 (string-append (getenv "CLASSPATH")
12825 ":../../../../../build/classes")
12826 (find-files "." ".*.java"))
12827 (for-each (lambda (file) (install-file file (string-append "../build/" file)))
12828 (find-files "." ".*.jar")))
12829 (mkdir-p "build/META-INF/plexus")
12830 (copy-file "resources/META-INF/plexus/components.xml"
12831 "build/META-INF/plexus/components.xml")
12832 (with-directory-excursion "build"
12833 (invoke "jar" "cf" "../../../component-jar-0.1.jar" ".")))
12834 (with-directory-excursion "org.eclipse.sisu.plexus.tests/"
12835 (copy-recursively "META-INF" "../build/test-classes/META-INF")
12836 (substitute* "java/org/eclipse/sisu/plexus/DefaultPlexusContainerTest.java"
12837 (("resources/component-jar")
12838 "org.eclipse.sisu.plexus.tests/resources/component-jar")))
12839 #t))
12840 (replace 'install
12841 (install-from-pom "org.eclipse.sisu.plexus/pom.xml")))))
12842 (propagated-inputs
12843 `(("java-plexus-classworlds" ,java-plexus-classworlds)
12844 ("java-plexus-utils" ,java-plexus-utils)
12845 ("java-plexus-component-annotations" ,java-plexus-component-annotations)
12846 ("java-cdi-api" ,java-cdi-api)
12847 ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)
12848 ("java-sisu-plexus-parent-pom" ,java-sisu-plexus-parent-pom)))
12849 (inputs
12850 `(("java-osgi-framework" ,java-osgi-framework)
12851 ("java-slf4j-api" ,java-slf4j-api)
12852 ("java-javax-inject" ,java-javax-inject)
12853 ("java-guice" ,java-guice)
12854 ("java-guava" ,java-guava)
12855 ("java-aopalliance" ,java-aopalliance)
12856 ("java-asm" ,java-asm)
12857 ("java-cglib" ,java-cglib)))
12858 (native-inputs
12859 `(("java-junit" ,java-junit)))
12860 (home-page "https://www.eclipse.org/sisu/")
12861 (synopsis "Plexus support for the sisu container")
12862 (description "Sisu is a modular JSR330-based container that supports
12863 classpath scanning, auto-binding, and dynamic auto-wiring. This package
12864 adds Plexus support to the Sisu-Inject container.")
12865 (license license:epl1.0)))
12866
12867 (define java-sisu-plexus-parent-pom
12868 (package
12869 (inherit java-eclipse-sisu-plexus)
12870 (name "java-sisu-plexus-parent-pom")
12871 (arguments
12872 `(#:tests? #f
12873 #:phases
12874 (modify-phases %standard-phases
12875 (delete 'configure)
12876 (delete 'build)
12877 (replace 'install
12878 (install-pom-file "pom.xml")))))
12879 (propagated-inputs
12880 `(("java-sonatype-oss-parent-pom-9" ,java-sonatype-oss-parent-pom-9)))))
12881
12882 (define-public java-commons-compiler
12883 (package
12884 (name "java-commons-compiler")
12885 (version "3.0.8")
12886 (source (origin
12887 (method git-fetch)
12888 (uri (git-reference
12889 (url "https://github.com/janino-compiler/janino")
12890 (commit "91aa95686d1e4ca3b16a984a03a38686572331b2")))
12891 (file-name (string-append name "-" version))
12892 (sha256
12893 (base32
12894 "04hfdl59sgh20qkxzgnibvs8f9hy6n7znxwpk611y5d89977y62r"))
12895 (modules '((guix build utils)))
12896 (snippet
12897 '(begin
12898 (for-each delete-file
12899 (find-files "." "\\.jar$"))
12900 #t))))
12901 (build-system ant-build-system)
12902 (arguments
12903 `(#:jar-name "commons-compiler.jar"
12904 #:source-dir "commons-compiler/src/main"
12905 #:tests? #f)); no tests
12906 (home-page "https://github.com/janino-compiler/janino")
12907 (synopsis "Java compiler")
12908 (description "Commons-compiler contains an API for janino, including the
12909 @code{IExpressionEvaluator}, @code{IScriptEvaluator}, @code{IClassBodyEvaluator}
12910 and @code{ISimpleCompiler} interfaces.")
12911 (license license:bsd-3)))
12912
12913 (define-public java-janino
12914 (package
12915 (inherit java-commons-compiler)
12916 (name "java-janino")
12917 (arguments
12918 `(#:jar-name "janino.jar"
12919 #:source-dir "src/main/java"
12920 #:phases
12921 (modify-phases %standard-phases
12922 (add-before 'configure 'chdir
12923 (lambda _
12924 (chdir "janino")
12925 #t)))))
12926 (inputs
12927 `(("java-commons-compiler" ,java-commons-compiler)))
12928 (native-inputs
12929 `(("java-junit" ,java-junit)
12930 ("java-hamcrest-core" ,java-hamcrest-core)))
12931 (description "Janino is a Java compiler. Janino can compile a set of
12932 source files to a set of class files like @code{javac}, but also compile a
12933 Java expression, block, class body or source file in memory, load the bytecode
12934 and execute it directly in the same JVM. @code{janino} can also be used for
12935 static code analysis or code manipulation.")))
12936
12937 (define-public java-logback-core
12938 (package
12939 (name "java-logback-core")
12940 (version "1.2.3")
12941 (source (origin
12942 (method url-fetch)
12943 (uri (string-append "https://github.com/qos-ch/logback/archive/v_"
12944 version ".tar.gz"))
12945 (file-name (string-append name "-" version ".tar.gz"))
12946 (sha256
12947 (base32
12948 "1x6ga74yfgm94cfx98gybakbrlilx8i2gn6dx13l40kasmys06mi"))
12949 (modules '((guix build utils)))
12950 (snippet
12951 '(begin
12952 (delete-file-recursively "logback-access/lib")
12953 #t))))
12954 (build-system ant-build-system)
12955 (arguments
12956 `(#:jar-name "logback.jar"
12957 #:source-dir "src/main/java"
12958 #:test-dir "src/test"
12959 #:test-exclude
12960 ;; These tests fail with Unable to set MockitoNamingPolicy on cglib generator
12961 ;; which creates FastClasses
12962 (list "**/AllCoreTest.*"
12963 "**/AutoFlushingObjectWriterTest.*"
12964 "**/PackageTest.*"
12965 "**/ResilientOutputStreamTest.*"
12966 ;; And we still don't want to run abstract classes
12967 "**/Abstract*.*")
12968 #:phases
12969 (modify-phases %standard-phases
12970 (add-before 'configure 'chdir
12971 (lambda _
12972 (chdir "logback-core")
12973 #t)))))
12974 (inputs
12975 `(("java-javax-mail" ,java-javax-mail)
12976 ("servlet" ,java-javaee-servletapi)
12977 ("java-commons-compiler" ,java-commons-compiler)
12978 ("java-janino" ,java-janino)))
12979 (native-inputs
12980 `(("java-junit" ,java-junit)
12981 ("java-hamcrest-core" ,java-hamcrest-core)
12982 ("java-mockito-1" ,java-mockito-1)
12983 ("java-cglib" ,java-cglib)
12984 ("java-asm" ,java-asm)
12985 ("java-objenesis" ,java-objenesis)
12986 ("java-joda-time" ,java-joda-time)))
12987 (home-page "https://logback.qos.ch")
12988 (synopsis "Logging for java")
12989 (description "Logback is intended as a successor to the popular log4j project.
12990 This module lays the groundwork for the other two modules.")
12991 ;; Either epl1.0 or lgpl2.1
12992 (license (list license:epl1.0
12993 license:lgpl2.1))))
12994
12995 (define-public java-logback-classic
12996 (package
12997 (inherit java-logback-core)
12998 (name "java-logback-classic")
12999 (arguments
13000 `(#:jar-name "logback-classic.jar"
13001 #:source-dir "src/main/java"
13002 #:test-dir "src/test"
13003 #:tests? #f; tests require more packages: h2, greenmail, hsql, subethamail, slf4j, log4j, felix
13004 #:jdk ,icedtea-8
13005 #:phases
13006 (modify-phases %standard-phases
13007 (add-before 'configure 'chdir
13008 (lambda _
13009 (chdir "logback-classic")
13010 #t))
13011 (replace 'build
13012 (lambda* (#:key inputs #:allow-other-keys)
13013 (mkdir-p "build/classes")
13014 (setenv "CLASSPATH"
13015 (string-join
13016 (apply append (map (lambda (input)
13017 (find-files (assoc-ref inputs input)
13018 ".*.jar"))
13019 '("java-logback-core" "java-slf4j-api"
13020 "java-commons-compiler" "servlet"
13021 "groovy")))
13022 ":"))
13023 (apply invoke "groovyc" "-d" "build/classes" "-j"
13024 (find-files "src/main/" ".*\\.(groovy|java)$"))
13025 (invoke "ant" "jar")
13026 #t)))))
13027 (inputs
13028 `(("java-logback-core" ,java-logback-core)
13029 ("java-slf4j-api" ,java-slf4j-api)
13030 ,@(package-inputs java-logback-core)))
13031 (native-inputs
13032 `(("groovy" ,groovy)))
13033 (description "Logback is intended as a successor to the popular log4j project.
13034 This module can be assimilated to a significantly improved version of log4j.
13035 Moreover, @code{logback-classic} natively implements the slf4j API so that you
13036 can readily switch back and forth between logback and other logging frameworks
13037 such as log4j or @code{java.util.logging} (JUL).")))
13038
13039 (define-public java-jgit
13040 (package
13041 (name "java-jgit")
13042 (version "4.7.0.201704051617-r")
13043 (source (origin
13044 (method url-fetch)
13045 (uri (string-append "https://repo1.maven.org/maven2/"
13046 "org/eclipse/jgit/org.eclipse.jgit/"
13047 version "/org.eclipse.jgit-"
13048 version "-sources.jar"))
13049 (sha256
13050 (base32
13051 "13ii4jn02ynzq6i7gsyi21k2i94jpc85wf6bcm31q4cyvzv0mk4k"))))
13052 (build-system ant-build-system)
13053 (arguments
13054 `(#:tests? #f ; There are no tests to run.
13055 #:jar-name "jgit.jar"
13056 ;; JGit must be built with a JDK supporting Java 8.
13057 #:jdk ,icedtea-8
13058 ;; Target our older default JDK.
13059 #:make-flags (list "-Dtarget=1.7")
13060 #:phases
13061 (modify-phases %standard-phases
13062 ;; The jar file generated by the default build.xml does not include
13063 ;; the text properties files, so we need to add them.
13064 (add-after 'build 'add-properties
13065 (lambda* (#:key jar-name #:allow-other-keys)
13066 (with-directory-excursion "src"
13067 (apply invoke "jar" "-uf"
13068 (string-append "../build/jar/" jar-name)
13069 (find-files "." "\\.properties$")))
13070 #t)))))
13071 (inputs
13072 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
13073 ("java-javaewah" ,java-javaewah)
13074 ("java-jsch" ,java-jsch)
13075 ("java-slf4j-api" ,java-slf4j-api)))
13076 (home-page "https://eclipse.org/jgit/")
13077 (synopsis "Java library implementing the Git version control system")
13078 (description "JGit is a lightweight, pure Java library implementing the
13079 Git version control system, providing repository access routines, support for
13080 network protocols, and core version control algorithms.")
13081 (license license:edl1.0)))
13082
13083 ;; For axoloti. This package can still be built with icedtea-7, which is
13084 ;; currently used as the default JDK.
13085 (define-public java-jgit-4.2
13086 (package (inherit java-jgit)
13087 (version "4.2.0.201601211800-r")
13088 (source (origin
13089 (method url-fetch)
13090 (uri (string-append "https://repo1.maven.org/maven2/"
13091 "org/eclipse/jgit/org.eclipse.jgit/"
13092 version "/org.eclipse.jgit-"
13093 version "-sources.jar"))
13094 (sha256
13095 (base32
13096 "15gm537iivhnzlkjym4x3wn5jqdjdragsw9pdpzqqg21nrc817mm"))))
13097 (build-system ant-build-system)
13098 (arguments
13099 (substitute-keyword-arguments (package-arguments java-jgit)
13100 ;; Build for default JDK.
13101 ((#:jdk _) icedtea-7)
13102 ((#:phases phases)
13103 `(modify-phases ,phases
13104 (add-after 'unpack 'use-latest-javaewah-API
13105 (lambda _
13106 (substitute* "src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java"
13107 (("wordinbits") "WORD_IN_BITS"))
13108 #t))))))
13109 (inputs
13110 `(("java-javaewah" ,java-javaewah)
13111 ("java-jsch" ,java-jsch)
13112 ("java-slf4j-api" ,java-slf4j-api)))))
13113
13114 (define-public abcl
13115 (package
13116 (name "abcl")
13117 (version "1.6.0")
13118 (source
13119 (origin
13120 (method url-fetch)
13121 (uri (string-append "https://abcl.org/releases/"
13122 version "/abcl-src-" version ".tar.gz"))
13123 (sha256
13124 (base32
13125 "0hvbcsffr8n2xwdixc8wyw1bfl9fxn2gyy0c4nma7j9zbn0wwgw9"))
13126 (patches
13127 (search-patches
13128 "abcl-fix-build-xml.patch"))))
13129 (build-system ant-build-system)
13130 (native-inputs
13131 `(("java-junit" ,java-junit)))
13132 (arguments
13133 `(#:build-target "abcl.jar"
13134 #:test-target "abcl.test"
13135 #:phases
13136 (modify-phases %standard-phases
13137 (replace 'install
13138 (lambda* (#:key outputs #:allow-other-keys)
13139 (let ((share (string-append (assoc-ref outputs "out")
13140 "/share/java/"))
13141 (bin (string-append (assoc-ref outputs "out")
13142 "/bin/")))
13143 (mkdir-p share)
13144 (install-file "dist/abcl.jar" share)
13145 (install-file "dist/abcl-contrib.jar" share)
13146 (mkdir-p bin)
13147 (with-output-to-file (string-append bin "abcl")
13148 (lambda _
13149 (let ((classpath (string-append
13150 share "abcl.jar"
13151 ":"
13152 share "abcl-contrib.jar")))
13153 (display (string-append
13154 "#!" (which "sh") "\n"
13155 "if [[ -z $CLASSPATH ]]; then\n"
13156 " cp=\"" classpath "\"\n"
13157 "else\n"
13158 " cp=\"" classpath ":$CLASSPATH\"\n"
13159 "fi\n"
13160 "exec " (which "java")
13161 " -cp $cp org.armedbear.lisp.Main $@\n")))))
13162 (chmod (string-append bin "abcl") #o755)
13163 #t))))))
13164 (home-page "https://abcl.org/")
13165 (synopsis "Common Lisp Implementation on the JVM")
13166 (description
13167 "@dfn{Armed Bear Common Lisp} (ABCL) is a full implementation of the Common
13168 Lisp language featuring both an interpreter and a compiler, running in the
13169 JVM. It supports JSR-223 (Java scripting API): it can be a scripting engine
13170 in any Java application. Additionally, it can be used to implement (parts of)
13171 the application using Java to Lisp integration APIs.")
13172 (license (list license:gpl2+
13173 ;; named-readtables is released under 3 clause BSD
13174 license:bsd-3
13175 ;; jfli is released under CPL 1.0
13176 license:cpl1.0))))
13177
13178 (define-public java-jsonp-api
13179 (package
13180 (name "java-jsonp-api")
13181 (version "1.1.6")
13182 (source (origin
13183 (method git-fetch)
13184 (uri (git-reference
13185 (url "https://github.com/eclipse-ee4j/jsonp")
13186 (commit (string-append "1.1-" version "-RELEASE"))))
13187 (file-name (git-file-name name version))
13188 (sha256
13189 (base32
13190 "0zrj03hkr3jdmqlb4ipjr37cqpp2q2814qpmxi7srlwpdqs0ibgc"))))
13191 (build-system ant-build-system)
13192 (arguments
13193 `(#:jar-name "jsonp-api.jar"
13194 #:tests? #f
13195 #:source-dir "api/src/main/java"
13196 #:test-dir "api/src/test"))
13197 (home-page "https://eclipse-ee4j.github.io/jsonp/")
13198 (synopsis "JSON Processing in Java")
13199 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
13200 parse, generate, transform and query) JSON messages. It produces and
13201 consumes JSON text in a streaming fashion (similar to StAX API for XML)
13202 and allows building a Java object model for JSON text using API classes
13203 (similar to DOM API for XML).")
13204 ;; either gpl2 only with classpath exception, or epl2.0.
13205 (license (list license:gpl2
13206 license:epl2.0))))
13207
13208 (define-public java-jsonp-impl
13209 (package
13210 (inherit java-jsonp-api)
13211 (name "java-jsonp-impl")
13212 (arguments
13213 `(#:jar-name "jsonp-impl.jar"
13214 #:tests? #f
13215 #:source-dir "impl/src/main/java"
13216 #:test-dir "impl/src/test"
13217 #:phases
13218 (modify-phases %standard-phases
13219 (add-before 'build 'copy-resources
13220 (lambda _
13221 (copy-recursively
13222 "impl/src/main/resources/"
13223 "build/classes")
13224 #t)))))
13225 (propagated-inputs
13226 `(("java-jsonp-api" ,java-jsonp-api)))
13227 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
13228 parse, generate, transform and query) JSON messages. This package contains
13229 a reference implementation of that API.")))
13230
13231 (define-public java-xmp
13232 (package
13233 (name "java-xmp")
13234 (version "5.1.3")
13235 (source (origin
13236 (method url-fetch)
13237 (uri (string-append "http://download.macromedia.com/pub/developer"
13238 "/xmp/sdk/XMPCoreJava-" version ".zip"))
13239 (sha256
13240 (base32
13241 "14nai2mmsg7l5ya2y5mx4w4lr1az3sk2fjz6hiy4zdrsavgvl1g7"))))
13242 (build-system ant-build-system)
13243 (arguments
13244 `(#:build-target "build"
13245 #:tests? #f; no tests
13246 #:phases
13247 (modify-phases %standard-phases
13248 (add-after 'unpack 'chdir
13249 (lambda _
13250 (chdir "XMPCore")
13251 #t))
13252 (add-before 'build 'fix-timestamp
13253 (lambda _
13254 (substitute* "build.xml"
13255 (("\\$\\{BuildDate\\}") "1970 Jan 01 00:00:00-GMT"))
13256 #t))
13257 (replace 'install
13258 (install-jars "."))
13259 (add-after 'install 'install-doc
13260 (lambda* (#:key outputs #:allow-other-keys)
13261 (copy-recursively
13262 "docs"
13263 (string-append (assoc-ref outputs "out") "/share/doc/java-xmp"))
13264 #t)))))
13265 (native-inputs
13266 `(("unzip" ,unzip)))
13267 (home-page "https://www.adobe.com/devnet/xmp.html")
13268 (synopsis "Extensible Metadat Platform (XMP) support in Java")
13269 (description "Adobe's Extensible Metadata Platform (XMP) is a labeling
13270 technology that allows you to embed data about a file, known as metadata,
13271 into the file itself. The XMP Toolkit for Java is based on the C++ XMPCore
13272 library and the API is similar.")
13273 (license license:bsd-3)))
13274
13275 (define-public java-metadata-extractor
13276 (package
13277 (name "java-metadata-extractor")
13278 (version "2.11.0")
13279 (source (origin
13280 (method git-fetch)
13281 (uri (git-reference
13282 (url "https://github.com/drewnoakes/metadata-extractor")
13283 (commit version)))
13284 (file-name (git-file-name name version))
13285 (sha256
13286 (base32
13287 "06yrq0swrl1r40yjbk5kqzjxr04jlkq9lfi711jvfgjf5kp2qinj"))))
13288 (build-system ant-build-system)
13289 (arguments
13290 `(#:jar-name "metadata-extractor.jar"
13291 #:source-dir "Source"
13292 #:test-dir "Tests"
13293 #:phases
13294 (modify-phases %standard-phases
13295 (add-before 'check 'fix-test-dir
13296 (lambda _
13297 (substitute* "build.xml"
13298 (("/java\">") "\">"))
13299 #t)))))
13300 (propagated-inputs
13301 `(("java-xmp" ,java-xmp)))
13302 (native-inputs
13303 `(("java-hamcrest-core" ,java-hamcrest-core)
13304 ("java-junit" ,java-junit)))
13305 (home-page "https://github.com/drewnoakes/metadata-extractor")
13306 (synopsis "Extract metadata from image and video files")
13307 (description "Metadata-extractor is a straightforward Java library for
13308 reading metadata from image files. It is able to read metadata in Exif,
13309 IPTC, XMP, ICC and more formats.")
13310 (license license:asl2.0)))
13311
13312 (define-public java-svg-salamander
13313 (package
13314 (name "java-svg-salamander")
13315 (version "1.1.2")
13316 (source (origin
13317 (method git-fetch)
13318 (uri (git-reference
13319 (url "https://github.com/blackears/svgSalamander")
13320 (commit (string-append "v" version))))
13321 (file-name (git-file-name name version))
13322 (sha256
13323 (base32
13324 "1zv3kjdkf6iqf02x6ln76254y634j2ji448y706a65lsbfjmmicf"))
13325 (modules '((guix build utils)))
13326 (snippet
13327 '(begin
13328 (for-each delete-file (find-files "." ".*.jar"))
13329 #t))
13330 (patches
13331 (search-patches "java-svg-salamander-Fix-non-det.patch"))))
13332 (build-system ant-build-system)
13333 (arguments
13334 `(#:tests? #f; no tests
13335 #:phases
13336 (modify-phases %standard-phases
13337 (add-after 'unpack 'chdir
13338 (lambda _
13339 (chdir "svg-core")
13340 #t))
13341 (add-before 'build 'copy-jars
13342 (lambda* (#:key inputs #:allow-other-keys)
13343 (copy-file (car (find-files (assoc-ref inputs "javacc") "\\.jar$"))
13344 "../libraries/javacc.jar")
13345 (copy-file (car (find-files (assoc-ref inputs "ant") "ant\\.jar$"))
13346 "../libraries/ant.jar")
13347 #t))
13348 (replace 'install
13349 (install-jars "dist")))))
13350 (native-inputs
13351 `(("javacc" ,javacc)))
13352 (home-page "https://github.com/blackears/svgSalamander")
13353 (synopsis "SVG engine for Java")
13354 (description "SVG Salamander is an SVG engine for Java that's designed
13355 to be small, fast, and allow programmers to use it with a minimum of fuss.
13356 It's in particular targeted for making it easy to integrate SVG into Java
13357 games and making it much easier for artists to design 2D game content - from
13358 rich interactive menus to charts and graphcs to complex animations.")
13359 (license license:bsd-2)))
13360
13361 (define-public java-jboss-transaction-api-spec
13362 (package
13363 (name "java-jboss-transaction-api-spec")
13364 (version "1.2+1.1.1")
13365 (source (origin
13366 (method git-fetch)
13367 (uri (git-reference
13368 (url "https://github.com/jboss/jboss-transaction-api_spec")
13369 (commit "jboss-transaction-api_1.2_spec-1.1.1.Final")))
13370 (file-name (git-file-name name version))
13371 (sha256
13372 (base32
13373 "1xbfq5hvb86izflydxrqqv3k26c1ba2m0ap6m97shqrsdi9by4wy"))))
13374 (build-system ant-build-system)
13375 (arguments
13376 `(#:jar-name "java-jboss-transaction-api_spec.jar"
13377 #:source-dir "src/main/java"
13378 #:tests? #f)); no tests
13379 (inputs
13380 `(("java-cdi-api" ,java-cdi-api)
13381 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)))
13382 (home-page "https://github.com/jboss/jboss-transaction-api_spec")
13383 (synopsis "Generic transaction management API in Java")
13384 (description "Java-jboss-transaction-api-spec implements the Transactions
13385 API. A transaction is a unit of work containing one or more operations
13386 involving one or more shared resources having ACID (Atomicity, Consistency,
13387 Isolation and Durability) properties.")
13388 ;; either gpl2 only with classpath exception or cddl.
13389 (license (list license:gpl2 license:cddl1.0))))
13390
13391 (define-public java-picocli
13392 (package
13393 (name "java-picocli")
13394 (version "4.3.2")
13395 (source (origin
13396 (method git-fetch)
13397 (uri (git-reference
13398 (url "https://github.com/remkop/picocli")
13399 (commit (string-append "v" version))))
13400 (file-name (git-file-name name version))
13401 (sha256
13402 (base32
13403 "1sxp6rxjfgjd98ly14b3d15dvxkm5wg4g46w12jyhmr0kmkaca3c"))))
13404 (build-system ant-build-system)
13405 (arguments
13406 `(#:jar-name "picocli.jar"
13407 #:source-dir "src/main/java"
13408 ;; Tests require missing dependencies (junitparams, system-rules)
13409 #:tests? #f))
13410 (home-page "https://picocli.info")
13411 (synopsis "REPL for the JVM")
13412 (description "Picocli is a framework for building command line applications
13413 for the JVM. It supports colors, autocompletion, subcommands, and more. Written
13414 in Java, usable from Groovy, Kotlin, Scala, etc.")
13415 (license license:asl2.0)))
13416
13417 (define-public java-jetbrains-annotations
13418 (package
13419 (name "java-jetbrains-annotations")
13420 (version "19.0.0")
13421 (source (origin
13422 (method git-fetch)
13423 (uri (git-reference
13424 (url "https://github.com/JetBrains/java-annotations")
13425 (commit version)))
13426 (file-name (git-file-name name version))
13427 (sha256
13428 (base32
13429 "0z6i1xs60cd5ffz23c49sq68wn5mphhs3xpar1n93ppama2ng80v"))))
13430 (build-system ant-build-system)
13431 (arguments
13432 `(#:jar-name "jetbrains-annotations.jar"
13433 #:source-dir "common/src/main/java:java8/src/main/java"
13434 #:tests? #f)); no tests
13435 (home-page "https://github.com/JetBrains/java-annotations")
13436 (synopsis "Annotations for Java and other JVM languages")
13437 (description "This package contains a set of Java annotations which can be
13438 used in JVM-based languages. They serve as an additional documentation and
13439 can be interpreted by IDEs and static analysis tools to improve code analysis.")
13440 (license license:expat)))
13441
13442 (define-public java-javaparser
13443 (package
13444 (name "java-javaparser")
13445 (version "3.16.1")
13446 (source (origin
13447 (method git-fetch)
13448 (uri (git-reference
13449 (url "https://github.com/javaparser/javaparser")
13450 (commit (string-append "javaparser-parent-" version))))
13451 (file-name (git-file-name name version))
13452 (sha256
13453 (base32
13454 "1a4jk12ffa31fa0y8vda0739vpfj1206p0nha842b7bixbvwamv9"))
13455 (modules '((guix build utils)))
13456 (snippet
13457 '(begin
13458 (for-each delete-file
13459 (find-files "." "\\.jar$"))
13460 #t))))
13461 (build-system ant-build-system)
13462 (arguments
13463 `(#:tests? #f; tests require jbehave and junit5
13464 #:phases
13465 (modify-phases %standard-phases
13466 (add-before 'build 'fill-template
13467 (lambda _
13468 (with-directory-excursion "javaparser-core/src/main"
13469 (copy-file "java-templates/com/github/javaparser/JavaParserBuild.java"
13470 "java/com/github/javaparser/JavaParserBuild.java")
13471 (substitute* "java/com/github/javaparser/JavaParserBuild.java"
13472 (("\\$\\{project.version\\}") ,version)
13473 (("\\$\\{project.name\\}") "javaparser")
13474 (("\\$\\{project.build.finalName\\}") "javaparser")
13475 (("\\$\\{maven.version\\}") "fake")
13476 (("\\$\\{maven.build.version\\}") "fake")
13477 (("\\$\\{build.timestamp\\}") "0")
13478 (("\\$\\{java.vendor\\}") "Guix")
13479 (("\\$\\{java.vendor.url\\}") "https://gnu.org/software/guix")
13480 (("\\$\\{java.version\\}") "1.8")
13481 (("\\$\\{os.arch\\}") "any")
13482 (("\\$\\{os.name\\}") "GuixSD")
13483 (("\\$\\{os.version\\}") "not available")))
13484 #t))
13485 (add-before 'build 'generate-javacc
13486 (lambda _
13487 (with-directory-excursion "javaparser-core/src/main/java"
13488 (invoke "java" "javacc" "../javacc/java.jj"))
13489 #t))
13490 (add-before 'build 'copy-javacc-support
13491 (lambda _
13492 (with-directory-excursion "javaparser-core/src/main"
13493 (copy-recursively "javacc-support" "java"))
13494 #t))
13495 (replace 'build
13496 (lambda _
13497 (define (build name)
13498 (format #t "Building ~a~%" name)
13499 (delete-file-recursively "build/classes")
13500 (mkdir-p "build/classes")
13501 (apply invoke "javac"
13502 "-cp" (string-append (getenv "CLASSPATH") ":"
13503 (string-join (find-files "build/jar" ".")
13504 ":"))
13505 "-d" "build/classes"
13506 (find-files (string-append name "/src/main/java")
13507 ".*.java"))
13508 (invoke "jar" "-cf" (string-append "build/jar/" name ".jar")
13509 "-C" "build/classes" "."))
13510 (mkdir-p "build/classes")
13511 (mkdir-p "build/test-classes")
13512 (mkdir-p "build/jar")
13513 (build "javaparser-core")
13514 (build "javaparser-core-serialization")
13515 (build "javaparser-core-generators")
13516 (build "javaparser-core-metamodel-generator")
13517 (build "javaparser-symbol-solver-core")
13518 #t))
13519 (replace 'install
13520 (install-jars "build/jar")))))
13521 (inputs
13522 `(("java-guava" ,java-guava)
13523 ("java-jboss-javassist" ,java-jboss-javassist)
13524 ("java-jsonp-api" ,java-jsonp-api)))
13525 (native-inputs
13526 `(("javacc" ,javacc)))
13527 (home-page "http://javaparser.org/")
13528 (synopsis "Parser for Java")
13529 (description
13530 "This project contains a set of libraries implementing a Java 1.0 - Java
13531 11 Parser with advanced analysis functionalities.")
13532 (license (list
13533 ;; either lgpl or asl
13534 license:lgpl3+
13535 license:asl2.0))))