gnu: icedtea-8: Build in parallel using correct number of jobs.
[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 ,(origin
1859 (method url-fetch)
1860 (uri (string-append
1861 "http://icedtea.classpath.org/download/drops"
1862 "/icedtea8/" version "/hotspot.tar.xz"))
1863 (sha256
1864 (base32
1865 "1ciz1w9j0kz7s1dxdhyqq71nla9icyz6qvn0b9z2zgkklqa98qmm"))
1866 (patches (search-patches
1867 "icedtea-7-hotspot-gcc-segfault-workaround.patch"))))
1868 ("nashorn-drop"
1869 ,(drop "nashorn"
1870 "19pzl3ppaw8j6r5cnyp8qiw3hxijh3hdc46l39g5yfhdl4pr4hpa"))
1871 ("shenandoah-drop"
1872 ,(drop "shenandoah"
1873 "0k33anxdzw1icn072wynfmmdjhsv50hay0j1sfkfxny12rb3vgdy"))
1874 ,@(fold alist-delete (package-native-inputs icedtea-7)
1875 '("jdk" "openjdk-src" "corba-drop" "jaxp-drop" "jaxws-drop"
1876 "jdk-drop" "langtools-drop" "hotspot-drop")))))))
1877
1878 (define-public openjdk9
1879 (package
1880 (name "openjdk")
1881 (version "9.181")
1882 (source (origin
1883 (method url-fetch)
1884 (uri "https://hg.openjdk.java.net/jdk/jdk/archive/3cc80be736f2.tar.bz2")
1885 (file-name (string-append name "-" version ".tar.bz2"))
1886 (sha256
1887 (base32
1888 "01ihmyf7k5z17wbr7xig7y40l9f01d5zjgkcmawn1102hw5kchpq"))
1889 (modules '((guix build utils)))
1890 (snippet
1891 `(begin
1892 (for-each delete-file
1893 (find-files "." ".*.(bin|exe|jar)$"))
1894 #t))))
1895 (build-system gnu-build-system)
1896 (outputs '("out" "jdk" "doc"))
1897 (arguments
1898 `(#:tests? #f; require jtreg
1899 #:make-flags '("all")
1900 #:imported-modules
1901 ((guix build syscalls)
1902 ,@%gnu-build-system-modules)
1903 #:phases
1904 (modify-phases %standard-phases
1905 (add-after 'patch-source-shebangs 'fix-java-shebangs
1906 (lambda _
1907 ;; This file was "fixed" by patch-source-shebangs, but it requires
1908 ;; this exact first line.
1909 (substitute* "jdk/make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1910 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
1911 #t))
1912 (replace 'configure
1913 (lambda* (#:key inputs outputs #:allow-other-keys)
1914 ;; TODO: unbundle libpng and lcms
1915 (invoke "bash" "./configure"
1916 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
1917 "--disable-freetype-bundling"
1918 "--disable-warnings-as-errors"
1919 "--disable-hotspot-gtest"
1920 "--with-giflib=system"
1921 "--with-libjpeg=system"
1922 (string-append "--prefix=" (assoc-ref outputs "out")))
1923 #t))
1924 (add-before 'build 'write-source-revision-file
1925 (lambda _
1926 (with-output-to-file ".src-rev"
1927 (lambda _
1928 (display ,version)))
1929 #t))
1930 (replace 'build
1931 (lambda* (#:key make-flags parallel-build? #:allow-other-keys)
1932 (apply invoke "make"
1933 `(,@(if parallel-build?
1934 (list (string-append "JOBS="
1935 (number->string (parallel-job-count))))
1936 '())
1937 ,@make-flags))))
1938 ;; Some of the libraries in the lib/ folder link to libjvm.so.
1939 ;; But that shared object is located in the server/ folder, so it
1940 ;; cannot be found. This phase creates a symbolic link in the
1941 ;; lib/ folder so that the other libraries can find it.
1942 ;;
1943 ;; See:
1944 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1945 ;;
1946 ;; FIXME: Find the bug in the build system, so that this symlink is
1947 ;; not needed.
1948 (add-after 'install 'install-libjvm
1949 (lambda* (#:key inputs outputs #:allow-other-keys)
1950 (let* ((lib-out (string-append (assoc-ref outputs "out")
1951 "/lib"))
1952 (lib-jdk (string-append (assoc-ref outputs "jdk")
1953 "/lib")))
1954 (symlink (string-append lib-jdk "/server/libjvm.so")
1955 (string-append lib-jdk "/libjvm.so"))
1956 (symlink (string-append lib-out "/server/libjvm.so")
1957 (string-append lib-out "/libjvm.so")))
1958 #t))
1959 (replace 'install
1960 (lambda* (#:key outputs #:allow-other-keys)
1961 (let ((out (assoc-ref outputs "out"))
1962 (jdk (assoc-ref outputs "jdk"))
1963 (doc (assoc-ref outputs "doc"))
1964 (images (car (find-files "build" ".*-server-release"
1965 #:directories? #t))))
1966 (copy-recursively (string-append images "/images/jdk") jdk)
1967 (copy-recursively (string-append images "/images/jre") out)
1968 (copy-recursively (string-append images "/images/docs") doc))
1969 #t))
1970 (add-after 'install 'strip-zip-timestamps
1971 (lambda* (#:key outputs #:allow-other-keys)
1972 (use-modules (guix build syscalls))
1973 (for-each (lambda (zip)
1974 (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
1975 (with-directory-excursion dir
1976 (invoke "unzip" zip))
1977 (delete-file zip)
1978 (for-each (lambda (file)
1979 (let ((s (lstat file)))
1980 (unless (eq? (stat:type s) 'symlink)
1981 (format #t "reset ~a~%" file)
1982 (utime file 0 0 0 0))))
1983 (find-files dir #:directories? #t))
1984 (with-directory-excursion dir
1985 (let ((files (find-files "." ".*" #:directories? #t)))
1986 (apply invoke "zip" "-0" "-X" zip files)))))
1987 (find-files (assoc-ref outputs "doc") ".*.zip$"))
1988 #t)))))
1989 (inputs
1990 `(("alsa-lib" ,alsa-lib)
1991 ("cups" ,cups)
1992 ("fontconfig" ,fontconfig)
1993 ("freetype" ,freetype)
1994 ("giflib" ,giflib)
1995 ("lcms" ,lcms)
1996 ("libelf" ,libelf)
1997 ("libjpeg" ,libjpeg-turbo)
1998 ("libice" ,libice)
1999 ("libpng" ,libpng)
2000 ("libx11" ,libx11)
2001 ("libxcomposite" ,libxcomposite)
2002 ("libxi" ,libxi)
2003 ("libxinerama" ,libxinerama)
2004 ("libxrender" ,libxrender)
2005 ("libxt" ,libxt)
2006 ("libxtst" ,libxtst)))
2007 (native-inputs
2008 `(("icedtea-8" ,icedtea-8)
2009 ("icedtea-8:jdk" ,icedtea-8 "jdk")
2010 ;; XXX: The build system fails with newer versions of GNU Make.
2011 ("make@4.2" ,gnu-make-4.2)
2012 ("unzip" ,unzip)
2013 ("which" ,which)
2014 ("zip" ,zip)))
2015 (home-page "https://openjdk.java.net/projects/jdk9/")
2016 (synopsis "Java development kit")
2017 (description
2018 "This package provides the Java development kit OpenJDK.")
2019 (license license:gpl2+)))
2020
2021 (define-public openjdk10
2022 (package
2023 (inherit openjdk9)
2024 (name "openjdk")
2025 (version "10.46")
2026 (source (origin
2027 (method url-fetch)
2028 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/6fa770f9f8ab.tar.bz2")
2029 (file-name (string-append name "-" version ".tar.bz2"))
2030 (sha256
2031 (base32
2032 "0zywq2203b4hx4jms9vbwvjcj1d3k2v3qpx4s33729fkpmid97r4"))
2033 (patches (search-patches
2034 "openjdk-10-idlj-reproducibility.patch"))
2035 (modules '((guix build utils)))
2036 (snippet
2037 `(begin
2038 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2039 #t))))
2040 (arguments
2041 (substitute-keyword-arguments (package-arguments openjdk9)
2042 ((#:phases phases)
2043 `(modify-phases ,phases
2044 (replace 'fix-java-shebangs
2045 (lambda _
2046 ;; This file was "fixed" by patch-source-shebangs, but it requires
2047 ;; this exact first line.
2048 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
2049 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
2050 #t))
2051 (replace 'configure
2052 (lambda* (#:key inputs outputs #:allow-other-keys)
2053 (invoke "bash" "./configure"
2054 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
2055 "--disable-freetype-bundling"
2056 "--disable-warnings-as-errors"
2057 "--disable-hotspot-gtest"
2058 "--with-giflib=system"
2059 "--with-libjpeg=system"
2060 "--with-native-debug-symbols=zipped"
2061 (string-append "--prefix=" (assoc-ref outputs "out")))
2062 #t))))))
2063 (native-inputs
2064 `(("openjdk9" ,openjdk9)
2065 ("openjdk9:jdk" ,openjdk9 "jdk")
2066 ("make@4.2" ,gnu-make-4.2)
2067 ("unzip" ,unzip)
2068 ("which" ,which)
2069 ("zip" ,zip)))))
2070
2071 (define-public openjdk11
2072 (package
2073 (name "openjdk")
2074 (version "11.28")
2075 (source (origin
2076 (method url-fetch)
2077 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/76072a077ee1.tar.bz2")
2078 (file-name (string-append name "-" version ".tar.bz2"))
2079 (sha256
2080 (base32
2081 "0v705w1s9lrqalzahir78pk397rkk9gfvzq821yv8h3xha0bqi6w"))
2082 (modules '((guix build utils)))
2083 (snippet
2084 `(begin
2085 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2086 #t))))
2087 (build-system gnu-build-system)
2088 (outputs '("out" "jdk" "doc"))
2089 (arguments
2090 `(#:imported-modules
2091 ((guix build syscalls)
2092 (ice-9 binary-ports)
2093 (rnrs bytevectors)
2094 ,@%gnu-build-system-modules)
2095 #:tests? #f; requires jtreg
2096 ;; TODO package jtreg
2097 #:configure-flags
2098 `("--disable-option-checking" ; --enable-fast-install default flag errors otherwise
2099 "--disable-warnings-as-errors"
2100 ;; make validate-runpath pass, see: http://issues.guix.info/issue/32894
2101 "--with-native-debug-symbols=zipped"
2102 ;; do not use the bundled libraries
2103 "--with-giflib=system"
2104 "--with-lcms=system"
2105 "--with-libjpeg=system"
2106 "--with-libpng=system"
2107 "--with-version-pre="
2108 ;; allow the build system to locate the system freetype
2109 ,(string-append "--with-freetype-include="
2110 (assoc-ref %build-inputs "freetype") "/include")
2111 ,(string-append "--with-freetype-lib="
2112 (assoc-ref %build-inputs "freetype") "/lib"))
2113 #:phases
2114 (modify-phases %standard-phases
2115 (add-after 'patch-source-shebangs 'fix-java-shebangs
2116 (lambda _
2117 ;; This file was "fixed" by patch-source-shebangs, but it requires
2118 ;; this exact first line.
2119 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
2120 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
2121 #t))
2122 (add-before 'build 'write-source-revision-file
2123 (lambda _
2124 (with-output-to-file ".src-rev"
2125 (lambda _
2126 (display ,version)))
2127 #t))
2128 (replace 'build
2129 (lambda* (#:key parallel-build? make-flags #:allow-other-keys)
2130 (apply invoke "make" "all"
2131 `(,@(if parallel-build?
2132 (list (string-append "JOBS="
2133 (number->string (parallel-job-count))))
2134 '())
2135 ,@make-flags))))
2136 ;; jdk 11 does not build jre by default any more
2137 ;; building it anyways
2138 ;; for further information see:
2139 ;; https://github.com/AdoptOpenJDK/openjdk-build/issues/356
2140 (add-after 'build 'build-jre
2141 (lambda* (#:key parallel-build? make-flags #:allow-other-keys)
2142 (apply invoke "make" "legacy-jre-image"
2143 `(,@(if parallel-build?
2144 (list (string-append "JOBS="
2145 (number->string (parallel-job-count))))
2146 '())
2147 ,@make-flags))))
2148 (replace 'install
2149 (lambda* (#:key outputs #:allow-other-keys)
2150 (let ((out (assoc-ref outputs "out"))
2151 (jdk (assoc-ref outputs "jdk"))
2152 (doc (assoc-ref outputs "doc"))
2153 (images (car (find-files "build" ".*-server-release"
2154 #:directories? #t))))
2155 (copy-recursively (string-append images "/images/jdk") jdk)
2156 (copy-recursively (string-append images "/images/jre") out)
2157 (copy-recursively (string-append images "/images/docs") doc))
2158 #t))
2159 ;; Some of the libraries in the lib/ folder link to libjvm.so.
2160 ;; But that shared object is located in the server/ folder, so it
2161 ;; cannot be found. This phase creates a symbolic link in the
2162 ;; lib/ folder so that the other libraries can find it.
2163 ;;
2164 ;; See:
2165 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
2166 ;;
2167 ;; FIXME: Find the bug in the build system, so that this symlink is
2168 ;; not needed.
2169 (add-after 'install 'install-libjvm
2170 (lambda* (#:key inputs outputs #:allow-other-keys)
2171 (let* ((lib-out (string-append (assoc-ref outputs "out")
2172 "/lib"))
2173 (lib-jdk (string-append (assoc-ref outputs "jdk")
2174 "/lib")))
2175 (symlink (string-append lib-jdk "/server/libjvm.so")
2176 (string-append lib-jdk "/libjvm.so"))
2177 (symlink (string-append lib-out "/server/libjvm.so")
2178 (string-append lib-out "/libjvm.so")))
2179 #t))
2180 (add-after 'install 'strip-character-data-timestamps
2181 (lambda* (#:key outputs #:allow-other-keys)
2182 (use-modules (guix build syscalls))
2183 (let ((archive (string-append
2184 (assoc-ref outputs "jdk") "/lib/src.zip"))
2185 (dir (mkdtemp! "zip-contents.XXXXXX")))
2186 (with-directory-excursion dir
2187 (invoke "unzip" archive))
2188 (delete-file archive)
2189 (with-directory-excursion dir
2190 (let ((char-data-files (find-files "." "CharacterData.*")))
2191 (for-each (lambda (file)
2192 (substitute* file
2193 (((string-append "This file was generated "
2194 "AUTOMATICALLY from a template "
2195 "file.*"))
2196 (string-append "This file was generated "
2197 "AUTOMATICALLY from a template "
2198 "file"))))
2199 char-data-files)))
2200 (with-directory-excursion dir
2201 (let ((files (find-files "." ".*" #:directories? #t)))
2202 (apply invoke "zip" "-0" "-X" archive files))))))
2203 (add-after 'strip-character-data-timestamps 'strip-archive-timestamps
2204 (lambda* (#:key outputs #:allow-other-keys)
2205 (use-modules (guix build syscalls)
2206 (ice-9 binary-ports)
2207 (rnrs bytevectors))
2208 (letrec ((repack-archive
2209 (lambda (archive)
2210 (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
2211 (with-directory-excursion dir
2212 (invoke "unzip" archive))
2213 (delete-file archive)
2214 (for-each (compose repack-archive canonicalize-path)
2215 (find-files dir "(ct.sym|.*.jar)$"))
2216 (let ((reset-file-timestamp
2217 (lambda (file)
2218 (let ((s (lstat file)))
2219 (unless (eq? (stat:type s) 'symlink)
2220 (format #t "reset ~a~%" file)
2221 (utime file 0 0 0 0))))))
2222 (for-each reset-file-timestamp
2223 (find-files dir #:directories? #t)))
2224 (with-directory-excursion dir
2225 (let ((files (find-files "." ".*" #:directories? #t)))
2226 (apply invoke "zip" "-0" "-X" archive files)))))))
2227 (for-each repack-archive
2228 (find-files (assoc-ref outputs "doc") ".*.zip$"))
2229 (for-each repack-archive
2230 (find-files (assoc-ref outputs "jdk")
2231 ".*.(zip|jar|diz)$"))
2232 (repack-archive (string-append (assoc-ref outputs "jdk") "/lib/ct.sym"))
2233 (let ((repack-jmod
2234 (lambda (file-name)
2235 (call-with-input-file file-name
2236 (lambda (file)
2237 (let ((header #vu8(#x4a #x4d #x01 #x00)))
2238 (if (equal? (get-bytevector-n
2239 file (bytevector-length header))
2240 header)
2241 (let* ((header-length (bytevector-length header))
2242 (temp-file (mkstemp!
2243 (string-copy
2244 "temp-file.XXXXXX")))
2245 (temp-filename (port-filename temp-file))
2246 (content-length
2247 (- (stat:size (stat file))
2248 header-length)))
2249 (sendfile temp-file file content-length header-length)
2250 (delete-file file-name)
2251 (close-port temp-file)
2252 (repack-archive (canonicalize-path temp-filename))
2253 (call-with-output-file file-name
2254 (lambda (file)
2255 (put-bytevector file header)
2256 (call-with-input-file temp-filename
2257 (lambda (temp-file)
2258 (sendfile
2259 file temp-file
2260 (stat:size (stat temp-file)) 0)))))))))))))
2261 (for-each repack-jmod
2262 (find-files (assoc-ref outputs "jdk") ".*.jmod$")))
2263 #t)))
2264 (add-after 'install 'remove-timestamp-from-api-summary
2265 (lambda* (#:key outputs #:allow-other-keys)
2266 (substitute* (string-append (assoc-ref outputs "doc")
2267 "/api/overview-summary.html")
2268 (("Generated by javadoc \\(11-internal\\).*$")
2269 "Generated by javadoc (11-internal) -->\n"))
2270 #t)))))
2271 (inputs
2272 `(("alsa-lib" ,alsa-lib)
2273 ("cups" ,cups)
2274 ("fontconfig" ,fontconfig)
2275 ("freetype" ,freetype)
2276 ("giflib" ,giflib)
2277 ("lcms" ,lcms)
2278 ("libjpeg" ,libjpeg-turbo)
2279 ("libpng" ,libpng)
2280 ("libx11" ,libx11)
2281 ("libxext" ,libxext)
2282 ("libxrender" ,libxrender)
2283 ("libxt" ,libxt)
2284 ("libxtst" ,libxtst)))
2285 (native-inputs
2286 `(("autoconf" ,autoconf)
2287 ("openjdk10" ,openjdk10)
2288 ("openjdk10:jdk" ,openjdk10 "jdk")
2289 ("make" ,gnu-make-4.2)
2290 ("pkg-config" ,pkg-config)
2291 ("unzip" ,unzip)
2292 ("which" ,which)
2293 ("zip" ,zip)))
2294 (home-page "https://openjdk.java.net/projects/jdk/11/")
2295 (synopsis "Java development kit")
2296 (description
2297 "This package provides the Java development kit OpenJDK.")
2298 (license license:gpl2+)))
2299
2300 (define-public openjdk12
2301 (package
2302 (inherit openjdk11)
2303 (name "openjdk")
2304 (version "12.33")
2305 (source (origin
2306 (method url-fetch)
2307 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/0276cba45aac.tar.bz2")
2308 (file-name (string-append name "-" version ".tar.bz2"))
2309 (sha256
2310 (base32
2311 "0mbhdrk12b6878kby0flnbak7444dlpm0ihlmf92vk59y1c02bc2"))
2312 (modules '((guix build utils)))
2313 (snippet
2314 `(begin
2315 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2316 #t))))
2317 (inputs
2318 `(("alsa-lib" ,alsa-lib)
2319 ("cups" ,cups)
2320 ("fontconfig" ,fontconfig)
2321 ("freetype" ,freetype)
2322 ("giflib" ,giflib)
2323 ("lcms" ,lcms)
2324 ("libjpeg" ,libjpeg-turbo)
2325 ("libpng" ,libpng)
2326 ("libx11" ,libx11)
2327 ("libxext" ,libxext)
2328 ("libxrandr" ,libxrandr)
2329 ("libxrender" ,libxrender)
2330 ("libxt" ,libxt)
2331 ("libxtst" ,libxtst)))
2332 (native-inputs
2333 `(("autoconf" ,autoconf)
2334 ("openjdk11" ,openjdk11)
2335 ("openjdk11:jdk" ,openjdk11 "jdk")
2336 ("make@4.2" ,gnu-make-4.2)
2337 ("pkg-config" ,pkg-config)
2338 ("unzip" ,unzip)
2339 ("which" ,which)
2340 ("zip" ,zip)))
2341 (home-page "https://openjdk.java.net/projects/jdk/12")))
2342
2343 (define-public openjdk13
2344 (package
2345 (inherit openjdk12)
2346 (name "openjdk")
2347 (version "13.0")
2348 (source (origin
2349 (method url-fetch)
2350 (uri "http://hg.openjdk.java.net/jdk/jdk13/archive/9c250a7600e1.tar.bz2")
2351 (file-name (string-append name "-" version ".tar.bz2"))
2352 (sha256
2353 (base32
2354 "0v0ljvx5dyzp96dw4z4ksw3pvasil7783mgnmd1wk9gads5ab8iq"))
2355 (modules '((guix build utils)))
2356 (snippet
2357 `(begin
2358 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2359 #t))))
2360 (inputs
2361 `(("alsa-lib" ,alsa-lib)
2362 ("cups" ,cups)
2363 ("fontconfig" ,fontconfig)
2364 ("freetype" ,freetype)
2365 ("giflib" ,giflib)
2366 ("lcms" ,lcms)
2367 ("libjpeg" ,libjpeg-turbo)
2368 ("libpng" ,libpng)
2369 ("libx11" ,libx11)
2370 ("libxext" ,libxext)
2371 ("libxrandr" ,libxrandr)
2372 ("libxrender" ,libxrender)
2373 ("libxt" ,libxt)
2374 ("libxtst" ,libxtst)))
2375 (native-inputs
2376 `(("autoconf" ,autoconf)
2377 ("openjdk12:jdk" ,openjdk12 "jdk")
2378 ("make@4.2" ,gnu-make-4.2)
2379 ("pkg-config" ,pkg-config)
2380 ("unzip" ,unzip)
2381 ("which" ,which)
2382 ("zip" ,zip)))
2383 (home-page "https://openjdk.java.net/projects/jdk/13")))
2384
2385 (define-public openjdk14
2386 (package
2387 (inherit openjdk13)
2388 (name "openjdk")
2389 (version "14.0")
2390 (source (origin
2391 (method url-fetch)
2392 (uri "http://hg.openjdk.java.net/jdk/jdk14/archive/bc54620a3848.tar.bz2")
2393 (file-name (string-append name "-" version ".tar.bz2"))
2394 (sha256
2395 (base32
2396 "0z485pk7r1xpw8004g4nrwrzj17sabgx8yfdbxwfvzkjp8qyajch"))
2397 (modules '((guix build utils)))
2398 (snippet
2399 `(begin
2400 ;; The m4 macro uses 'help' to search for builtins, which is
2401 ;; not available in bash-minimal
2402 (substitute* "make/autoconf/basics.m4"
2403 (("if help") "if command -v"))
2404 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2405 #t))))
2406 (inputs
2407 `(("alsa-lib" ,alsa-lib)
2408 ("cups" ,cups)
2409 ("fontconfig" ,fontconfig)
2410 ("freetype" ,freetype)
2411 ("giflib" ,giflib)
2412 ("lcms" ,lcms)
2413 ("libjpeg" ,libjpeg-turbo)
2414 ("libpng" ,libpng)
2415 ("libx11" ,libx11)
2416 ("libxext" ,libxext)
2417 ("libxrandr" ,libxrandr)
2418 ("libxrender" ,libxrender)
2419 ("libxt" ,libxt)
2420 ("libxtst" ,libxtst)))
2421 (native-inputs
2422 `(("autoconf" ,autoconf)
2423 ("make@4.2" ,gnu-make-4.2)
2424 ("openjdk13:jdk" ,openjdk13 "jdk")
2425 ("pkg-config" ,pkg-config)
2426 ("unzip" ,unzip)
2427 ("which" ,which)
2428 ("zip" ,zip)))
2429 (home-page "https://openjdk.java.net/projects/jdk/14")))
2430
2431 (define-public icedtea icedtea-8)
2432
2433 \f
2434 (define-public ant/java8
2435 (package (inherit ant-bootstrap)
2436 (name "ant")
2437 (version "1.10.8")
2438 (source (origin
2439 (method url-fetch)
2440 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2441 version "-src.tar.gz"))
2442 (sha256
2443 (base32
2444 "066k2isig5xm70cihj9p73hkp5w7h5zbfqz5kxb6cwr9cb86xl2k"))
2445 (modules '((guix build utils)))
2446 (snippet
2447 '(begin
2448 (for-each delete-file
2449 (find-files "lib/optional" "\\.jar$"))
2450 #t))))
2451 (arguments
2452 (substitute-keyword-arguments (package-arguments ant-bootstrap)
2453 ((#:phases phases)
2454 `(modify-phases ,phases
2455 (add-after 'unpack 'remove-scripts
2456 ;; Remove bat / cmd scripts for DOS as well as the antRun and runant
2457 ;; wrappers.
2458 (lambda _
2459 (for-each delete-file
2460 (find-files "src/script"
2461 "(.*\\.(bat|cmd)|runant.*|antRun.*)"))
2462 #t))
2463 (replace 'build
2464 (lambda* (#:key inputs outputs #:allow-other-keys)
2465 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
2466
2467 ;; Disable tests to avoid dependency on hamcrest-core, which needs
2468 ;; Ant to build. This is necessary in addition to disabling the
2469 ;; "check" phase, because the dependency on "test-jar" would always
2470 ;; result in the tests to be run.
2471 (substitute* "build.xml"
2472 (("depends=\"jars,test-jar") "depends=\"jars"))
2473 (invoke "bash" "bootstrap.sh"
2474 (string-append "-Ddist.dir="
2475 (assoc-ref outputs "out")))))))))
2476 (native-inputs
2477 `(("jdk" ,icedtea-8 "jdk")
2478 ("zip" ,zip)
2479 ("unzip" ,unzip)))))
2480
2481 ;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x series
2482 ;; requires Java 8.
2483 (define-public ant
2484 (package (inherit ant/java8)
2485 (version "1.9.15")
2486 (source (origin
2487 (method url-fetch)
2488 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2489 version "-src.tar.gz"))
2490 (sha256
2491 (base32
2492 "1xy30f1w5gaqk6g3f0vw7ygix4rb6032qkcw42y4z8wd9jihgygd"))))
2493 (native-inputs
2494 `(("jdk" ,icedtea-7 "jdk")
2495 ("zip" ,zip)
2496 ("unzip" ,unzip)))))
2497
2498 (define-public ant-apache-bcel
2499 (package
2500 (inherit ant/java8)
2501 (name "ant-apache-bcel")
2502 (arguments
2503 (substitute-keyword-arguments (package-arguments ant/java8)
2504 ((#:phases phases)
2505 `(modify-phases ,phases
2506 (add-after 'unpack 'link-bcel
2507 (lambda* (#:key inputs #:allow-other-keys)
2508 (for-each (lambda (file)
2509 (symlink file
2510 (string-append "lib/optional/"
2511 (basename file))))
2512 (find-files (assoc-ref inputs "java-commons-bcel")
2513 "\\.jar$"))
2514 #t))
2515 (add-after 'build 'install
2516 (lambda* (#:key outputs #:allow-other-keys)
2517 (let* ((out (assoc-ref outputs "out"))
2518 (share (string-append out "/share/java"))
2519 (bin (string-append out "/bin"))
2520 (lib (string-append out "/lib")))
2521 (mkdir-p share)
2522 (install-file (string-append lib "/ant-apache-bcel.jar") share)
2523 (delete-file-recursively bin)
2524 (delete-file-recursively lib)
2525 #t)))))))
2526 (inputs
2527 `(("java-commons-bcel" ,java-commons-bcel)
2528 ,@(package-inputs ant/java8)))))
2529
2530 (define-public ant-junit
2531 (package
2532 (inherit ant/java8)
2533 (name "ant-junit")
2534 (arguments
2535 (substitute-keyword-arguments (package-arguments ant/java8)
2536 ((#:phases phases)
2537 `(modify-phases ,phases
2538 (add-after 'unpack 'link-junit
2539 (lambda* (#:key inputs #:allow-other-keys)
2540 (for-each (lambda (file)
2541 (symlink file
2542 (string-append "lib/optional/"
2543 (basename file))))
2544 (find-files (assoc-ref inputs "java-junit")
2545 "\\.jar$"))
2546 #t))
2547 (add-after 'build 'install
2548 (lambda* (#:key outputs #:allow-other-keys)
2549 (let* ((out (assoc-ref outputs "out"))
2550 (share (string-append out "/share/java"))
2551 (bin (string-append out "/bin"))
2552 (lib (string-append out "/lib")))
2553 (mkdir-p share)
2554 (install-file (string-append lib "/ant-junit.jar") share)
2555 (delete-file-recursively bin)
2556 (delete-file-recursively lib)
2557 #t)))))))
2558 (inputs
2559 `(("java-junit" ,java-junit)
2560 ,@(package-inputs ant/java8)))))
2561
2562 (define-public java-openjfx-build
2563 (package
2564 (name "java-openjfx-build")
2565 ;; This is a java-8 version
2566 (version "8.202")
2567 (source (origin
2568 (method hg-fetch)
2569 (uri (hg-reference
2570 (url "http://hg.openjdk.java.net/openjfx/8u-dev/rt")
2571 (changeset (string-append
2572 (string-join (string-split version #\.) "u")
2573 "-ga"))))
2574 (file-name (string-append name "-" version "-checkout"))
2575 (modules '((guix build utils)))
2576 (snippet
2577 '(begin
2578 ;; Delete included gradle jar
2579 (delete-file-recursively "gradle/wrapper")
2580 #t))
2581 (sha256
2582 (base32
2583 "0yg38mwpivswccv9n96k06x3iv82i4px1a9xg9l8dswzwmfj259f"))
2584 (patches (search-patches "java-openjfx-build-jdk_version.patch"))))
2585 (build-system ant-build-system)
2586 (arguments
2587 `(#:jar-name "java-openjfx.jar"
2588 #:source-dir "buildSrc/src/main/java"
2589 #:test-dir "buildSrc/src/test"
2590 #:phases
2591 (modify-phases %standard-phases
2592 (add-before 'configure 'generate-jsl-parser
2593 (lambda _
2594 (invoke "antlr3" "-o"
2595 "buildSrc/src/main/java/com/sun/scenario/effect/compiler"
2596 "buildSrc/src/main/antlr/JSL.g"))))))
2597 (inputs
2598 `(("antlr3" ,antlr3)
2599 ("java-stringtemplate" ,java-stringtemplate)))
2600 (native-inputs
2601 `(("java-junit" ,java-junit)
2602 ("java-hamcrest-core" ,java-hamcrest-core)))
2603 (home-page "https://openjfx.io")
2604 (synopsis "Graphical application toolkit in Java")
2605 (description "OpenJFX is a client application platform for desktop,
2606 mobile and embedded systems built on Java. Its goal is to produce a
2607 modern, efficient, and fully featured toolkit for developing rich client
2608 applications. This package contains base classes for the OpenJFX
2609 distribution and helper classes for building other parts of the
2610 distribution.")
2611 (license license:gpl2))) ;gpl2 only, with classpath exception
2612
2613 (define-public java-openjfx-base
2614 (package (inherit java-openjfx-build)
2615 (name "java-openjfx-base")
2616 (arguments
2617 `(#:jar-name "java-openjfx-base.jar"
2618 #:source-dir "modules/base/src/main/java:modules/base/src/main/java8:modules/base/src/main/version-info"
2619 #:test-dir "modules/base/src/test"
2620 #:phases
2621 (modify-phases %standard-phases
2622 (add-before 'check 'remove-empty-file
2623 (lambda _
2624 (with-directory-excursion "modules/base/src/test/java"
2625 ;; These files are completely commented, but junit expects them to
2626 ;; contain a class, so tests fail.
2627 (delete-file
2628 "com/sun/javafx/property/adapter/PropertyDescriptorTest.java")
2629 (delete-file
2630 "com/sun/javafx/property/adapter/ReadOnlyPropertyDescriptorTest.java")
2631 (delete-file "javafx/beans/property/PropertiesTest.java")
2632 (delete-file
2633 "javafx/beans/property/adapter/ReadOnlyJavaBeanPropertyBuilder_General_Test.java")
2634 ;; This one fails
2635 (delete-file "com/sun/javafx/runtime/VersionInfoTest.java"))
2636 #t)))))
2637 (propagated-inputs
2638 `(("java-openjfx-build" ,java-openjfx-build)))
2639 (description "OpenJFX is a client application platform for desktop,
2640 mobile and embedded systems built on Java. Its goal is to produce a
2641 modern, efficient, and fully featured toolkit for developing rich client
2642 applications. This package contains base classes for the OpenJFX
2643 distribution.")))
2644
2645 (define-public java-openjfx-graphics
2646 (package (inherit java-openjfx-build)
2647 (name "java-openjfx-graphics")
2648 (arguments
2649 `(#:jar-name "java-openjfx-graphics.jar"
2650 #:source-dir "modules/graphics/src/main/java"
2651 #:tests? #f; require X
2652 #:test-dir "modules/graphics/src/test"))
2653 (propagated-inputs
2654 `(("java-openjfx-base" ,java-openjfx-base)
2655 ("java-swt" ,java-swt)))
2656 (description "OpenJFX is a client application platform for desktop,
2657 mobile and embedded systems built on Java. Its goal is to produce a
2658 modern, efficient, and fully featured toolkit for developing rich client
2659 applications. This package contains graphics-related classes for the
2660 OpenJFX distribution.")))
2661
2662 (define-public java-openjfx-media
2663 (package (inherit java-openjfx-build)
2664 (name "java-openjfx-media")
2665 (propagated-inputs
2666 `(("java-openjxf-graphics" ,java-openjfx-graphics)))
2667 (arguments
2668 `(#:jar-name "java-openjfx-media.jar"
2669 #:source-dir "modules/media/src/main/java"
2670 #:tests? #f)); no tests
2671 (description "OpenJFX is a client application platform for desktop,
2672 mobile and embedded systems built on Java. Its goal is to produce a
2673 modern, efficient, and fully featured toolkit for developing rich client
2674 applications. This package contains media-related classes for the
2675 OpenJFX distribution.")))
2676
2677 (define-public javacc-4
2678 (package
2679 (name "javacc")
2680 (version "4.1")
2681 (source (origin
2682 (method git-fetch)
2683 (uri (git-reference
2684 (url "https://github.com/javacc/javacc")
2685 (commit "release_41")))
2686 (file-name (string-append "javacc-" version "-checkout"))
2687 (sha256
2688 (base32
2689 "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0"))
2690 (modules '((guix build utils)))
2691 ;; delete bundled jars
2692 (snippet '(begin (delete-file-recursively "lib") #t))))
2693 (build-system ant-build-system)
2694 ;; Tests fail with
2695 ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60:
2696 ;; JAVACODE failed
2697 (arguments
2698 `(#:tests? #f
2699 #:phases
2700 (modify-phases %standard-phases
2701 ;; Delete tests to avoid build failure (we don't run them anyway).
2702 (add-after 'unpack 'delete-tests
2703 (lambda _
2704 (for-each delete-file
2705 '("src/org/javacc/JavaCCTestCase.java"
2706 "src/org/javacc/parser/ExpansionTest.java"
2707 "src/org/javacc/parser/OptionsTest.java"
2708 "src/org/javacc/jjtree/JJTreeOptionsTest.java"))
2709 (for-each delete-file-recursively
2710 '("src/org/javacc/parser/test"
2711 "src/org/javacc/jjdoc/test"))
2712 #t))
2713 (replace 'install (install-jars "bin/lib")))))
2714 (home-page "https://javacc.org/")
2715 (synopsis "Java parser generator")
2716 (description "Java Compiler Compiler (JavaCC) is the most popular parser
2717 generator for use with Java applications. A parser generator is a tool that
2718 reads a grammar specification and converts it to a Java program that can
2719 recognize matches to the grammar. In addition to the parser generator itself,
2720 JavaCC provides other standard capabilities related to parser generation such
2721 as tree building (via a tool called JJTree included with JavaCC), actions,
2722 debugging, etc.")
2723 (license license:bsd-3)))
2724
2725 ;; javacc-3, as javacc-4 is not properly bootstrapped: is contains a javacc.jar
2726 ;; in the bootstrap/ directory.
2727 (define-public javacc-3
2728 (package
2729 (inherit javacc-4)
2730 (version "3.2")
2731 (source (origin
2732 (method git-fetch)
2733 (uri (git-reference
2734 (url "https://github.com/javacc/javacc.git")
2735 (commit "release_32")))
2736 (file-name (string-append "javacc-" version "-checkout"))
2737 (sha256
2738 (base32
2739 "1pyf1xyh8gk83nxqn2v2mdws32l68ydznha41cxa4l2kkbq1v1g3"))))
2740 (arguments
2741 `(#:tests? #f
2742 #:phases
2743 (modify-phases %standard-phases
2744 (add-before 'build 'set-java-version
2745 (lambda _
2746 (for-each
2747 (lambda (file)
2748 (substitute* file
2749 (("debug=") "source=\"1.4\" debug=")))
2750 (find-files "." "build.xml"))
2751 #t))
2752 (replace 'install (install-jars "bin/lib")))))))
2753
2754 (define-public javacc
2755 (package
2756 (inherit javacc-4)
2757 (version "7.0.4")
2758 (source
2759 (origin
2760 (method git-fetch)
2761 (uri (git-reference
2762 (url "https://github.com/javacc/javacc")
2763 (commit version)))
2764 (file-name (git-file-name "javacc" version))
2765 (sha256
2766 (base32 "18kkak3gda93gr25jrgy6q00g0jr8i24ri2wk4kybz1v234fxx9i"))
2767 (modules '((guix build utils)))
2768 ;; Delete bundled jars.
2769 (snippet '(begin (for-each delete-file-recursively
2770 '("bootstrap" "lib"))
2771 #t))))
2772 (arguments
2773 `(#:make-flags ; bootstrap from javacc-4
2774 (list (string-append "-Dbootstrap-jar="
2775 (assoc-ref %build-inputs "javacc")
2776 "/share/java/javacc.jar"))
2777 #:test-target "test"
2778 #:phases
2779 (modify-phases %standard-phases
2780 (replace 'install (install-jars "target"))
2781 (add-after 'install 'install-bin
2782 (lambda* (#:key outputs inputs #:allow-other-keys)
2783 (let* ((out (assoc-ref outputs "out"))
2784 (dir (string-append out "/share/java"))
2785 (bin (string-append out "/bin"))
2786 (javacc (string-append bin "/javacc")))
2787 (mkdir-p bin)
2788 (with-output-to-file javacc
2789 (lambda _
2790 (display
2791 (string-append "#!/bin/sh\n"
2792 (assoc-ref inputs "jdk") "/bin/java"
2793 " -cp " dir "/javacc.jar" " `basename $0`" " $*"))))
2794 (chmod javacc #o755)
2795 ;; symlink to different names to affect the first argument and
2796 ;; change the behavior of the jar file.
2797 (symlink javacc (string-append bin "/jjdoc"))
2798 (symlink javacc (string-append bin "/jjtree"))
2799 #t))))))
2800
2801 (native-inputs
2802 `(("javacc" ,javacc-4)))))
2803
2804 ;; This is the last 3.x release of ECJ
2805 (define-public java-ecj-3
2806 (package
2807 (name "java-ecj")
2808 (version "3.8.2")
2809 (source (origin
2810 (method url-fetch)
2811 (uri (string-append "http://archive.eclipse.org/eclipse/"
2812 "downloads/drops/R-" version
2813 "-201301310800/ecjsrc-" version ".jar"))
2814 (sha256
2815 (base32
2816 "01mdj14jw11g1jfnki4fi8229p0c6zzckd38zqy2w4m3cjcvsx04"))))
2817 (build-system ant-build-system)
2818 (arguments
2819 `(#:tests? #f ; none included
2820 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2821 #:make-flags (list "-f" "src/build.xml")
2822 #:build-target "build"
2823 #:phases
2824 (modify-phases %standard-phases
2825 (add-after 'unpack 'fix-manifest
2826 (lambda _
2827 ;; Record the main class to make ecj executable.
2828 (with-atomic-file-replacement "src/META-INF/MANIFEST.MF"
2829 (lambda (in out)
2830 (display "Manifest-Version: 1.0
2831 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2832 out)))
2833 #t))
2834 (replace 'install (install-jars ".")))))
2835 (home-page "https://eclipse.org")
2836 (synopsis "Eclipse Java development tools core batch compiler")
2837 (description "This package provides the Eclipse Java core batch compiler.")
2838 (license license:epl1.0)))
2839
2840 ;; This is needed for java-cisd-args4j
2841 (define-public java-ecj-3.5
2842 (package (inherit java-ecj-3)
2843 (version "3.5.1")
2844 (source (origin
2845 (method url-fetch/zipbomb)
2846 (uri (string-append "http://archive.eclipse.org/eclipse/"
2847 "downloads/drops/R-" version
2848 "-200909170800/ecjsrc-" version ".zip"))
2849 (sha256
2850 (base32
2851 "1vnl2mavisc567bip736xzsvvbjif5279wc4a7pbdik5wlir8qr7"))))
2852 (build-system ant-build-system)
2853 (arguments
2854 `(#:tests? #f ; none included
2855 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2856 #:build-target "build"
2857 #:phases
2858 (modify-phases %standard-phases
2859 (add-after 'unpack 'fix-manifest
2860 (lambda _
2861 ;; Record the main class to make ecj executable.
2862 (with-atomic-file-replacement "META-INF/MANIFEST.MF"
2863 (lambda (in out)
2864 (dump-port in out)
2865 (display "Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2866 out)))
2867 #t))
2868 (replace 'install (install-jars ".")))))
2869 (native-inputs
2870 `(("unzip" ,unzip)))))
2871
2872 (define-public java-ecj
2873 (package (inherit java-ecj-3)
2874 (version "4.6.3")
2875 (source
2876 (origin
2877 (method url-fetch)
2878 (uri (string-append
2879 "http://archive.eclipse.org/eclipse/downloads/drops4/R-"
2880 version
2881 "-201703010400/ecjsrc-"
2882 version
2883 ".jar"))
2884 (sha256
2885 (base32
2886 "11cfgsdgznja1pvlxkjbqykxd7pcd5655vkm7s44xmahmap15gpl"))))
2887 (arguments
2888 `(#:tests? #f ; none included
2889 #:build-target "build"
2890 #:phases
2891 (modify-phases %standard-phases
2892 (add-after 'unpack 'fix-build.xml
2893 (lambda _
2894 (substitute* "src/build.xml"
2895 (("^.*MANIFEST.*$")
2896 ""))
2897 #t))
2898 (add-after 'unpack 'fix-prop
2899 (lambda _
2900 (substitute* "src/build.xml"
2901 (("^.*properties.*$")
2902 "<include name=\"**/*.properties\"/>
2903 <include name=\"**/*.props\"/>"))
2904 #t))
2905 (add-before 'build 'chdir
2906 (lambda _
2907 (chdir "src")
2908 #t))
2909 (replace 'install (install-jars ".")))))))
2910
2911 (define-public java-cisd-base
2912 (let ((revision 38938)
2913 (base-version "14.12.0"))
2914 (package
2915 (name "java-cisd-base")
2916 (version (string-append base-version "-" (number->string revision)))
2917 (source (origin
2918 (method svn-fetch)
2919 (uri (svn-reference
2920 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2921 "base/tags/release/"
2922 (version-major+minor base-version)
2923 ".x/" base-version "/base/"))
2924 (revision revision)))
2925 (file-name (string-append "java-cisd-base-" version "-checkout"))
2926 (sha256
2927 (base32
2928 "1i5adyf7nzclb0wydgwa1az04qliid8035vpahaandmkmigbnxiy"))
2929 (modules '((guix build utils)))
2930 (snippet
2931 '(begin
2932 ;; Delete included gradle jar
2933 (delete-file-recursively "gradle/wrapper")
2934 ;; Delete pre-built native libraries
2935 (delete-file-recursively "libs")
2936 #t))))
2937 (build-system ant-build-system)
2938 (arguments
2939 `(#:make-flags '("-file" "build/build.xml")
2940 #:test-target "jar-test"
2941 #:jdk ,icedtea-8
2942 #:phases
2943 (modify-phases %standard-phases
2944 (add-after 'unpack 'unpack-build-resources
2945 (lambda* (#:key inputs #:allow-other-keys)
2946 (copy-recursively (assoc-ref inputs "build-resources")
2947 "../build_resources")
2948 #t))
2949 (add-after 'unpack-build-resources 'fix-dependencies
2950 (lambda* (#:key inputs #:allow-other-keys)
2951 (substitute* "build/build.xml"
2952 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2953 (string-append (assoc-ref inputs "java-testng")
2954 "/share/java/java-testng.jar"))
2955 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2956 (string-append (assoc-ref inputs "java-commons-lang")
2957 "/share/java/commons-lang-"
2958 ,(package-version java-commons-lang) ".jar"))
2959 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2960 (string-append (assoc-ref inputs "java-commons-io")
2961 "/lib/m2/commons-io/commons-io/"
2962 ,(package-version java-commons-io)
2963 "/commons-io-"
2964 ,(package-version java-commons-io)
2965 ".jar"))
2966 ;; Remove dependency on svn
2967 (("<build-info.*") "")
2968 (("\\$\\{revision.number\\}")
2969 ,(number->string revision))
2970 (("\\$\\{version.number\\}") ,base-version))
2971 ;; Remove dependency on classycle
2972 (substitute* "../build_resources/ant/build-common.xml"
2973 (("<taskdef name=\"dependency-checker.*") "")
2974 (("classname=\"classycle.*") "")
2975 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2976 #t))
2977 ;; A few tests fail because of the lack of a proper /etc/groups and
2978 ;; /etc/passwd file in the build container.
2979 (add-after 'unpack 'disable-broken-tests
2980 (lambda _
2981 (substitute* "sourceTest/java/ch/systemsx/cisd/base/AllTests.java"
2982 (("Unix.isOperational\\(\\)") "false"))
2983 #t))
2984 ;; These decorators are almost useless and pull in an unpackaged
2985 ;; dependency.
2986 (add-after 'unpack 'remove-useless-decorators
2987 (lambda _
2988 (substitute* "source/java/ch/systemsx/cisd/base/unix/Unix.java"
2989 (("@Private") "")
2990 (("import ch.rinn.restrictions.Private;") ""))
2991 (substitute* "sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java"
2992 (("@Friend.*") "")
2993 (("import ch.rinn.restrictions.Friend;") ""))
2994 #t))
2995 (add-before 'configure 'build-native-code
2996 (lambda* (#:key inputs #:allow-other-keys)
2997 (let ((jdk (assoc-ref inputs "jdk"))
2998 (dir ,(match (%current-system)
2999 ("i686-linux"
3000 "i386-Linux")
3001 ((or "armhf-linux" "aarch64-linux")
3002 "arm-Linux")
3003 ((or "x86_64-linux")
3004 "amd64-Linux")
3005 (_ "unknown-Linux"))))
3006 (with-directory-excursion "source/c"
3007 (invoke "gcc" "-shared" "-O3" "-fPIC" "unix.c"
3008 (string-append "-I" jdk "/include")
3009 (string-append "-I" jdk "/include/linux")
3010 "-o" "libunix.so")
3011 (invoke "gcc" "-shared" "-O3" "-fPIC"
3012 "-DMACHINE_BYTE_ORDER=1"
3013 "copyCommon.c"
3014 "copyByteChar.c"
3015 "copyByteDouble.c"
3016 "copyByteFloat.c"
3017 "copyByteInt.c"
3018 "copyByteLong.c"
3019 "copyByteShort.c"
3020 (string-append "-I" jdk "/include")
3021 (string-append "-I" jdk "/include/linux")
3022 "-o" "libnativedata.so"))
3023 (install-file "source/c/libunix.so"
3024 (string-append "libs/native/unix/" dir))
3025 (install-file "source/c/libnativedata.so"
3026 (string-append "libs/native/nativedata/" dir))
3027 #t)))
3028 ;; In the "check" phase we only build the test executable.
3029 (add-after 'check 'run-tests
3030 (lambda _
3031 (invoke "java" "-jar" "targets/dist/sis-base-test.jar")
3032 (delete-file "targets/dist/sis-base-test.jar")
3033 #t))
3034 (replace 'install (install-jars "targets/dist")))))
3035 (native-inputs
3036 `(("jdk" ,icedtea-8)
3037 ("java-commons-lang" ,java-commons-lang)
3038 ("java-commons-io" ,java-commons-io)
3039 ("java-testng" ,java-testng)
3040 ("build-resources"
3041 ,(origin
3042 (method svn-fetch)
3043 (uri (svn-reference
3044 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3045 "base/tags/release/"
3046 (version-major+minor base-version)
3047 ".x/" base-version
3048 "/build_resources/"))
3049 (revision revision)))
3050 (sha256
3051 (base32
3052 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
3053 (home-page "http://svnsis.ethz.ch")
3054 (synopsis "Utility classes for libraries from ETH Zurich")
3055 (description "This library supplies some utility classes needed for
3056 libraries from the SIS division at ETH Zurich like jHDF5.")
3057 ;; The C sources are under a non-copyleft license, which looks like a
3058 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
3059 (license (list license:asl2.0
3060 (license:non-copyleft "file://source/c/COPYING"))))))
3061
3062 (define-public java-cisd-args4j
3063 (let ((revision 39162)
3064 (base-version "9.11.2"))
3065 (package
3066 (name "java-cisd-args4j")
3067 (version (string-append base-version "-" (number->string revision)))
3068 (source (origin
3069 (method svn-fetch)
3070 (uri (svn-reference
3071 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3072 "args4j/tags/release/"
3073 (version-major+minor base-version)
3074 ".x/" base-version "/args4j/"))
3075 (revision revision)))
3076 (file-name (string-append "java-cisd-args4j-" version "-checkout"))
3077 (sha256
3078 (base32
3079 "0hhqznjaivq7ips7mkwas78z42s6djsm20rrs7g1zd59rcsakxn2"))))
3080 (build-system ant-build-system)
3081 (arguments
3082 `(#:make-flags '("-file" "build/build.xml")
3083 #:tests? #f ; there are no tests
3084 ;; There are weird build failures with JDK8, such as: "The type
3085 ;; java.io.ObjectInputStream cannot be resolved. It is indirectly
3086 ;; referenced from required .class files"
3087 #:jdk ,icedtea-7
3088 #:modules ((guix build ant-build-system)
3089 (guix build utils)
3090 (guix build java-utils)
3091 (sxml simple)
3092 (sxml transform)
3093 (sxml xpath))
3094 #:phases
3095 (modify-phases %standard-phases
3096 (add-after 'unpack 'unpack-build-resources
3097 (lambda* (#:key inputs #:allow-other-keys)
3098 (mkdir-p "../build_resources")
3099 (invoke "tar" "xf" (assoc-ref inputs "build-resources")
3100 "-C" "../build_resources"
3101 "--strip-components=1")
3102 (mkdir-p "../build_resources/lib")
3103 #t))
3104 (add-after 'unpack-build-resources 'fix-dependencies
3105 (lambda* (#:key inputs #:allow-other-keys)
3106 ;; FIXME: There should be a more convenient abstraction for
3107 ;; editing XML files.
3108 (with-directory-excursion "../build_resources/ant/"
3109 (chmod "build-common.xml" #o664)
3110 (call-with-output-file "build-common.xml.new"
3111 (lambda (port)
3112 (sxml->xml
3113 (pre-post-order
3114 (with-input-from-file "build-common.xml"
3115 (lambda _ (xml->sxml #:trim-whitespace? #t)))
3116 `(;; Remove dependency on classycle and custom ant tasks
3117 (taskdef . ,(lambda (tag . kids)
3118 (let ((name ((sxpath '(name *text*)) kids)))
3119 (if (or (member "build-info" name)
3120 (member "dependency-checker" name)
3121 (member "build-java-subprojects" name)
3122 (member "project-classpath" name))
3123 '() ; skip
3124 `(,tag ,@kids)))))
3125 (typedef . ,(lambda (tag . kids)
3126 (let ((name ((sxpath '(name *text*)) kids)))
3127 (if (member "recursive-jar" name)
3128 '() ; skip
3129 `(,tag ,@kids)))))
3130 (build-java-subprojects . ,(lambda _ '()))
3131 ;; Ignore everything else
3132 (*default* . ,(lambda (tag . kids) `(,tag ,@kids)))
3133 (*text* . ,(lambda (_ txt) txt))))
3134 port)))
3135 (rename-file "build-common.xml.new" "build-common.xml"))
3136 (substitute* "build/build.xml"
3137 (("\\$\\{lib\\}/cisd-base/cisd-base.jar")
3138 (string-append (assoc-ref inputs "java-cisd-base")
3139 "/share/java/sis-base.jar"))
3140 ;; Remove dependency on svn
3141 (("<build-info.*") "")
3142 (("\\$\\{revision.number\\}")
3143 ,(number->string revision))
3144 (("\\$\\{version.number\\}") ,base-version)
3145 ;; Don't use custom ant tasks.
3146 (("recursive-jar") "jar")
3147 (("<project-classpath.*") ""))
3148 #t))
3149 (replace 'install (install-jars "targets/dist")))))
3150 (inputs
3151 `(("java-cisd-base" ,java-cisd-base)))
3152 (native-inputs
3153 `(("ecj" ,java-ecj-3.5)
3154 ("build-resources"
3155 ,(origin
3156 (method svn-fetch)
3157 (uri (svn-reference
3158 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3159 "args4j/tags/release/"
3160 (version-major+minor base-version)
3161 ".x/" base-version
3162 "/build_resources/"))
3163 (revision revision)))
3164 (sha256
3165 (base32
3166 "056cam4k8pll7ass31sy6gwn8g8719njc41yf4l02b0342nilkyf"))
3167 (modules '((guix build utils)))
3168 ;; Delete bundled pre-built jars.
3169 (snippet
3170 '(begin (delete-file-recursively "lib/") #t))))))
3171 (home-page "http://svnsis.ethz.ch")
3172 (synopsis "Command line parser library")
3173 (description "This package provides a parser for command line arguments.")
3174 (license license:asl2.0))))
3175
3176 (define-public java-cisd-jhdf5
3177 (let ((revision 39162)
3178 (base-version "14.12.6"))
3179 (package
3180 (name "java-cisd-jhdf5")
3181 (version (string-append base-version "-" (number->string revision)))
3182 (source (origin
3183 (method svn-fetch)
3184 (uri (svn-reference
3185 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3186 "jhdf5/tags/release/"
3187 (version-major+minor base-version)
3188 ".x/" base-version "/jhdf5/"))
3189 (revision revision)))
3190 (file-name (string-append "java-cisd-jhdf5-" version "-checkout"))
3191 (sha256
3192 (base32
3193 "13i17s2hn0q9drdqvp8csy7770p3hdbh9rp30ihln2ldkfawdmz0"))
3194 (modules '((guix build utils)))
3195 (snippet
3196 '(begin
3197 ;; Delete included gradle jar
3198 (delete-file-recursively "gradle/wrapper")
3199 ;; Delete pre-built native libraries
3200 (delete-file-recursively "libs")
3201 #t))))
3202 (build-system ant-build-system)
3203 (arguments
3204 `(#:make-flags '("-file" "build/build.xml")
3205 #:build-target "jar-all"
3206 #:test-target "jar-test"
3207 #:jdk ,icedtea-8
3208 #:phases
3209 (modify-phases %standard-phases
3210 ;; FIXME: this build phase fails.
3211 (delete 'generate-jar-indices)
3212 ;; Don't erase results from the build phase when building tests.
3213 (add-after 'unpack 'separate-test-target-from-clean
3214 (lambda _
3215 (substitute* "build/build.xml"
3216 (("\"jar-test\" depends=\"clean, ")
3217 "\"jar-test\" depends=\""))
3218 #t))
3219 (add-after 'unpack 'unpack-build-resources
3220 (lambda* (#:key inputs #:allow-other-keys)
3221 (copy-recursively (assoc-ref inputs "build-resources")
3222 "../build_resources")
3223 (delete-file-recursively "../build_resources/lib/")
3224 (mkdir-p "../build_resources/lib")
3225 ;; Remove dependency on classycle
3226 (substitute* "../build_resources/ant/build-common.xml"
3227 (("<taskdef name=\"dependency-checker.*") "")
3228 (("classname=\"classycle.*") "")
3229 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
3230 ;; Remove dependency on svn
3231 (substitute* "build/build.xml"
3232 (("<build-info.*") "")
3233 (("\\$\\{revision.number\\}")
3234 ,(number->string revision))
3235 (("\\$\\{version.number\\}") ,base-version))
3236 #t))
3237 (add-after 'unpack-build-resources 'fix-dependencies
3238 (lambda* (#:key inputs #:allow-other-keys)
3239 (substitute* "../build_resources/ant/build-common.xml"
3240 (("../libraries/testng/testng-jdk15.jar")
3241 (string-append (assoc-ref inputs "java-testng")
3242 "/share/java/java-testng.jar")))
3243 (substitute* "build/build.xml"
3244 (("\\$\\{lib\\}/sis-base/sis-base.jar")
3245 (string-append (assoc-ref inputs "java-cisd-base")
3246 "/share/java/sis-base.jar"))
3247 (("\\$\\{lib\\}/cisd-args4j/cisd-args4j.jar")
3248 (string-append (assoc-ref inputs "java-cisd-args4j")
3249 "/share/java/cisd-args4j.jar"))
3250 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
3251 (string-append (assoc-ref inputs "java-commons-lang")
3252 "/share/java/commons-lang-"
3253 ,(package-version java-commons-lang) ".jar"))
3254 (("\\$\\{lib\\}/commons-io/commons-io.jar")
3255 (string-append (assoc-ref inputs "java-commons-io")
3256 "/lib/m2/commons-io/commons-io/"
3257 ,(package-version java-commons-io)
3258 "/commons-io-"
3259 ,(package-version java-commons-io)
3260 ".jar"))
3261 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
3262 (string-append (assoc-ref inputs "java-testng")
3263 "/share/java/java-testng.jar"))
3264 (("\\$\\{lib\\}/junit4/junit.jar")
3265 (car (find-files (assoc-ref inputs "java-junit") "jar$")))
3266 (("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar")
3267 (car (find-files (assoc-ref inputs "java-hamcrest-core")
3268 "jar$"))))
3269 ;; Remove dependency on ch.rinn.restrictions
3270 (with-directory-excursion "source/java/ch/systemsx/cisd/hdf5/"
3271 (substitute* '("BitSetConversionUtils.java"
3272 "HDF5Utils.java")
3273 (("import ch.rinn.restrictions.Private;") "")
3274 (("@Private") "")))
3275 (with-directory-excursion "sourceTest/java/ch/systemsx/cisd/hdf5/"
3276 (substitute* '("BitSetConversionTest.java"
3277 "h5ar/HDF5ArchiverTest.java")
3278 (("import ch.rinn.restrictions.Friend;") "")
3279 (("@Friend.*") ""))
3280 ;; Remove leftovers from removing @Friend
3281 (substitute* "h5ar/HDF5ArchiverTest.java"
3282 (("\\{ HDF5Archiver.class, IdCache.class, LinkRecord.class \\}\\)")
3283 "")))
3284 #t))
3285 (add-before 'configure 'build-native-library
3286 (lambda* (#:key inputs #:allow-other-keys)
3287 (let ((jdk (assoc-ref inputs "jdk"))
3288 (hdf5 (assoc-ref inputs "hdf5"))
3289 (dir ,(match (%current-system)
3290 ("i686-linux"
3291 "i386-Linux")
3292 ((or "armhf-linux" "aarch64-linux")
3293 "arm-Linux")
3294 ((or "x86_64-linux")
3295 "amd64-Linux")
3296 (_ "unknown-Linux"))))
3297 (with-directory-excursion "source/c"
3298 (apply invoke `("gcc" "-shared" "-O3"
3299 "-fPIC"
3300 "-Wl,--exclude-libs,ALL"
3301 ,@(find-files "jhdf5" "\\.c$")
3302 ,@(find-files "hdf-java" "\\.c$")
3303 ,(string-append "-I" hdf5 "/include")
3304 ,(string-append "-I" jdk "/include")
3305 ,(string-append "-I" jdk "/include/linux")
3306 ,(string-append hdf5 "/lib/libhdf5.a")
3307 "-o" "libjhdf5.so" "-lz")))
3308 (install-file "source/c/libjhdf5.so"
3309 (string-append "libs/native/jhdf5/" dir))
3310 #t)))
3311 ;; In the "check" phase we only build the test executable.
3312 (add-after 'check 'run-tests
3313 (lambda _
3314 (invoke "java" "-jar" "targets/dist/sis-jhdf5-test.jar")
3315 (delete-file "targets/dist/sis-jhdf5-test.jar")
3316 #t))
3317 (replace 'install
3318 (install-jars "targets/dist")))))
3319 (inputs
3320 `(("java-cisd-base" ,java-cisd-base)
3321 ("java-cisd-args4j" ,java-cisd-args4j)
3322 ("java-commons-lang" ,java-commons-lang)
3323 ("java-commons-io" ,java-commons-io)
3324 ("hdf5" ,hdf5)
3325 ("zlib" ,zlib)))
3326 (native-inputs
3327 `(("jdk" ,icedtea-8)
3328 ("java-testng" ,java-testng)
3329 ("java-junit" ,java-junit)
3330 ("java-jmock" ,java-jmock)
3331 ("java-hamcrest-core" ,java-hamcrest-core)
3332 ("build-resources"
3333 ,(origin
3334 (method svn-fetch)
3335 (uri (svn-reference
3336 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3337 "jhdf5/tags/release/"
3338 (version-major+minor base-version)
3339 ".x/" base-version
3340 "/build_resources/"))
3341 (revision revision)))
3342 (sha256
3343 (base32
3344 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
3345 (home-page "https://wiki-bsse.ethz.ch/display/JHDF5/")
3346 (synopsis "Java binding for HDF5")
3347 (description "JHDF5 is a high-level API in Java for reading and writing
3348 HDF5 files, building on the libraries provided by the HDF Group.")
3349 ;; The C sources are under a non-copyleft license, which looks like a
3350 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
3351 (license (list license:asl2.0
3352 (license:non-copyleft "file://source/c/COPYING"))))))
3353
3354 (define-public java-classpathx-servletapi
3355 (package
3356 (name "java-classpathx-servletapi")
3357 (version "3.0.1")
3358 (source (origin
3359 (method url-fetch)
3360 (uri (string-append "mirror://gnu/classpathx/servletapi/"
3361 "servletapi-" version ".tar.gz"))
3362 (sha256
3363 (base32
3364 "07d8h051siga2f33fra72hk12sbq1bxa4jifjg0qj0vfazjjff0x"))))
3365 (build-system ant-build-system)
3366 (arguments
3367 `(#:tests? #f ; there is no test target
3368 #:build-target "compile"
3369 #:make-flags
3370 (list "-Dbuild.compiler=javac1.8"
3371 (string-append "-Ddist=" (assoc-ref %outputs "out")))
3372 #:phases
3373 (modify-phases %standard-phases
3374 (replace 'install
3375 (lambda* (#:key make-flags #:allow-other-keys)
3376 (apply invoke `("ant" "dist" ,@make-flags)))))))
3377 (home-page "https://www.gnu.org/software/classpathx/")
3378 (synopsis "Java servlet API implementation")
3379 (description "This is the GNU servlet API distribution, part of the
3380 ClasspathX project. It provides implementations of version 3.0 of the servlet
3381 API and version 2.1 of the Java ServerPages API.")
3382 (license license:gpl3+)))
3383
3384 (define-public java-javaee-servletapi
3385 (package
3386 (name "java-javaee-servletapi")
3387 (version "3.1.0")
3388 (source (origin
3389 (method git-fetch)
3390 (uri (git-reference
3391 (url "https://github.com/javaee/servlet-spec")
3392 (commit version)))
3393 (file-name (git-file-name name version))
3394 (sha256
3395 (base32
3396 "0s03lj8w5an70lkqbjycgfrfk0kc07vbfav91jzk87gh3awf9ksl"))))
3397 (build-system ant-build-system)
3398 (arguments
3399 `(#:jar-name "javax-servletapi.jar"
3400 ;; no tests
3401 #:tests? #f
3402 #:source-dir "src/main/java"
3403 #:phases
3404 (modify-phases %standard-phases
3405 (add-before 'build 'copy-resources
3406 (lambda _
3407 (mkdir-p "build/classes/javax/servlet/http")
3408 (let ((from-prefix "src/main/java/javax/servlet/")
3409 (to-prefix "build/classes/javax/servlet/"))
3410 (for-each (lambda (f)
3411 (copy-file (string-append from-prefix f)
3412 (string-append to-prefix f)))
3413 (list "LocalStrings_ja.properties"
3414 "LocalStrings.properties"
3415 "LocalStrings_fr.properties"
3416 "http/LocalStrings_es.properties"
3417 "http/LocalStrings_ja.properties"
3418 "http/LocalStrings.properties"
3419 "http/LocalStrings_fr.properties")))
3420 #t)))))
3421 (native-inputs
3422 `(("unzip" ,unzip)))
3423 (home-page "https://javaee.github.io/servlet-spec/")
3424 (synopsis "Java servlet API")
3425 (description "Java Servlet is the foundation web specification in the
3426 Java Enterprise Platform. Developers can build web applications using the
3427 Servlet API to interact with the request/response workflow. This project
3428 provides information on the continued development of the Java Servlet
3429 specification.")
3430 ;; Main code is dual-licensed by Oracle under either GLP2 or CDDL 1.1.
3431 ;; Some files are licensed under ASL 2.0.
3432 (license (list license:asl2.0 license:gpl2 license:cddl1.1))))
3433
3434 (define-public java-swt
3435 (package
3436 (name "java-swt")
3437 (version "4.7.1a")
3438 (source
3439 ;; The types of many variables and procedures differ in the sources
3440 ;; dependent on whether the target architecture is a 32-bit system or a
3441 ;; 64-bit system. Instead of patching the sources on demand in a build
3442 ;; phase we download either the 32-bit archive (which mostly uses "int"
3443 ;; types) or the 64-bit archive (which mostly uses "long" types).
3444 (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9")
3445 (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q")
3446 (file32 "x86")
3447 (file64 "x86_64"))
3448 (let-values (((hash file)
3449 (match (or (%current-target-system) (%current-system))
3450 ("x86_64-linux" (values hash64 file64))
3451 (_ (values hash32 file32)))))
3452 (origin
3453 (method url-fetch)
3454 (uri (string-append
3455 "http://download.eclipse.org/eclipse/downloads/drops4/"
3456 "R-" version "-201710090410/swt-" version
3457 "-gtk-linux-" file ".zip"))
3458 (sha256 (base32 hash))))))
3459 (build-system ant-build-system)
3460 (arguments
3461 `(#:jar-name "swt.jar"
3462 #:jdk ,icedtea-8
3463 #:tests? #f ; no "check" target
3464 #:phases
3465 (modify-phases %standard-phases
3466 (replace 'unpack
3467 (lambda* (#:key source #:allow-other-keys)
3468 (mkdir "swt")
3469 (invoke "unzip" source "-d" "swt")
3470 (chdir "swt")
3471 (mkdir "src")
3472 (invoke "unzip" "src.zip" "-d" "src")))
3473 ;; The classpath contains invalid icecat jars. Since we don't need
3474 ;; anything other than the JDK on the classpath, we can simply unset
3475 ;; it.
3476 (add-after 'configure 'unset-classpath
3477 (lambda _ (unsetenv "CLASSPATH") #t))
3478 (add-before 'build 'build-native
3479 (lambda* (#:key inputs outputs #:allow-other-keys)
3480 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3481 ;; Build shared libraries. Users of SWT have to set the system
3482 ;; property swt.library.path to the "lib" directory of this
3483 ;; package output.
3484 (mkdir-p lib)
3485 (setenv "OUTPUT_DIR" lib)
3486 (with-directory-excursion "src"
3487 (invoke "bash" "build.sh")))))
3488 (add-after 'install 'install-native
3489 (lambda* (#:key outputs #:allow-other-keys)
3490 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3491 (for-each (lambda (file)
3492 (install-file file lib))
3493 (find-files "." "\\.so$"))
3494 #t))))))
3495 (inputs
3496 `(("gtk" ,gtk+-2)
3497 ("libxtst" ,libxtst)
3498 ("libxt" ,libxt)
3499 ("mesa" ,mesa)
3500 ("glu" ,glu)))
3501 (native-inputs
3502 `(("pkg-config" ,pkg-config)
3503 ("unzip" ,unzip)))
3504 (home-page "https://www.eclipse.org/swt/")
3505 (synopsis "Widget toolkit for Java")
3506 (description
3507 "SWT is a widget toolkit for Java designed to provide efficient, portable
3508 access to the user-interface facilities of the operating systems on which it
3509 is implemented.")
3510 ;; SWT code is licensed under EPL1.0
3511 ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1
3512 ;; Cairo bindings contain code under MPL1.1
3513 ;; XULRunner 1.9 bindings contain code under MPL2.0
3514 (license (list
3515 license:epl1.0
3516 license:mpl1.1
3517 license:mpl2.0
3518 license:lgpl2.1+))))
3519
3520 ;; java-hamcrest-core uses qdox version 1.12. We package this version instead
3521 ;; of the latest release.
3522 (define-public java-qdox-1.12
3523 (package
3524 (name "java-qdox")
3525 (version "1.12.1")
3526 (source (origin
3527 (method url-fetch)
3528 (uri (string-append "https://repo1.maven.org/maven2/"
3529 "com/thoughtworks/qdox/qdox/" version
3530 "/qdox-" version "-sources.jar"))
3531 (sha256
3532 (base32
3533 "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl"))))
3534 (build-system ant-build-system)
3535 (arguments
3536 `(;; Tests require junit
3537 #:tests? #f
3538 #:jar-name "qdox.jar"
3539 #:phases
3540 (modify-phases %standard-phases
3541 (replace 'unpack
3542 (lambda* (#:key source #:allow-other-keys)
3543 (mkdir "src")
3544 (with-directory-excursion "src"
3545 (invoke "jar" "-xf" source))))
3546 ;; At this point we don't have junit, so we must remove the API
3547 ;; tests.
3548 (add-after 'unpack 'delete-tests
3549 (lambda _
3550 (delete-file-recursively "src/com/thoughtworks/qdox/junit")
3551 #t)))))
3552 (home-page "https://github.com/codehaus/qdox")
3553 (synopsis "Parse definitions from Java source files")
3554 (description
3555 "QDox is a high speed, small footprint parser for extracting
3556 class/interface/method definitions from source files complete with JavaDoc
3557 @code{@@tags}. It is designed to be used by active code generators or
3558 documentation tools.")
3559 (license license:asl2.0)))
3560
3561 (define-public java-qdox
3562 (package
3563 (name "java-qdox")
3564 ; Newer version exists, but this version is required by java-plexus-component-metadata
3565 (version "2.0-M2")
3566 (source (origin
3567 (method url-fetch)
3568 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
3569 ;; Older releases at https://github.com/codehaus/qdox/
3570 ;; Note: The release at maven is pre-generated. The release at
3571 ;; github requires jflex.
3572 (uri (string-append "https://repo1.maven.org/maven2/"
3573 "com/thoughtworks/qdox/qdox/" version
3574 "/qdox-" version "-sources.jar"))
3575 (sha256
3576 (base32
3577 "10xxrcaicq6axszcr2jpygisa4ch4sinyx5q7kqqxv4lknrmxp5x"))))
3578 (build-system ant-build-system)
3579 (arguments
3580 `(#:jar-name "qdox.jar"
3581 #:tests? #f; no tests
3582 #:modules
3583 ((guix build ant-build-system)
3584 (guix build java-utils)
3585 (guix build utils)
3586 (sxml simple))
3587 #:phases
3588 (modify-phases %standard-phases
3589 (add-before 'install 'create-pom
3590 (lambda _
3591 (with-output-to-file "pom.xml"
3592 (lambda _
3593 (sxml->xml
3594 `((project
3595 (modelVersion "4.0.0")
3596 (name "QDox")
3597 (groupId "com.thoughtworks.qdox")
3598 (artifactId "qdox")
3599 (version ,,version))))))
3600 #t))
3601 (replace 'install
3602 (install-from-pom "pom.xml")))))
3603 (home-page "https://github.com/codehaus/qdox")
3604 (synopsis "Parse definitions from Java source files")
3605 (description "QDox is a high speed, small footprint parser for extracting
3606 class/interface/method definitions from source files complete with JavaDoc
3607 @code{@@tags}. It is designed to be used by active code generators or
3608 documentation tools.")
3609 (license license:asl2.0)))
3610
3611 (define-public java-qdox-2-M9
3612 (package
3613 (inherit java-qdox)
3614 (version "2.0-M9"); required by plexus-java
3615 (source (origin
3616 (method url-fetch)
3617 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
3618 ;; Older releases at https://github.com/codehaus/qdox/
3619 ;; Note: The release at maven is pre-generated. The release at
3620 ;; github requires jflex.
3621 (uri (string-append "https://repo1.maven.org/maven2/"
3622 "com/thoughtworks/qdox/qdox/" version
3623 "/qdox-" version "-sources.jar"))
3624 (sha256
3625 (base32
3626 "1s2jnmx2dkwnaha12lcj26aynywgwa8sslc47z82wx8xai13y4fg"))))))
3627
3628 (define-public java-jarjar
3629 (package
3630 (name "java-jarjar")
3631 (version "1.4")
3632 (source (origin
3633 (method url-fetch)
3634 (uri (string-append
3635 "https://storage.googleapis.com/google-code-archive-downloads/v2/"
3636 "code.google.com/jarjar/jarjar-src-" version ".zip"))
3637 (sha256
3638 (base32
3639 "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl"))
3640 (modules '((guix build utils)))
3641 (snippet
3642 '(begin
3643 ;; Delete bundled thirds-party jar archives.
3644 (delete-file-recursively "lib")
3645 (delete-file "src/test/enumtest.jar")
3646 ;; the CLASSPATH needs this directory, create an empty one
3647 (mkdir-p "lib")
3648 #t))))
3649 (build-system ant-build-system)
3650 (arguments
3651 `(;; Tests require junit, which ultimately depends on this package.
3652 #:tests? #f
3653 #:build-target "jar"
3654 #:phases
3655 (modify-phases %standard-phases
3656 (add-before 'build 'do-not-use-bundled-asm
3657 (lambda* (#:key inputs #:allow-other-keys)
3658 (substitute* "build.xml"
3659 (("<path id=\"path.build\">")
3660 (string-append "<path id=\"path.build\"><fileset dir=\""
3661 (assoc-ref inputs "java-asm-bootstrap")
3662 "/lib/m2\" includes=\"**/*.jar\"/>"))
3663 (("<zipfileset src=\"lib/asm-4.0.jar\"/>") "")
3664 (("lib/asm-commons-4.0.jar")
3665 (car (find-files (assoc-ref inputs "java-asm-bootstrap")
3666 "asm-6.0.jar")))
3667 (("<include name=\"org/objectweb/asm/commons/Remap\\*\\.class\"/>")
3668 (string-append "<include name=\"org/objectweb/asm/"
3669 "commons/Remap*.class\"/>"
3670 "<include name=\"org/objectweb/asm/*.class\"/>"
3671 "<include name=\"org/objectweb/asm/"
3672 "signature/*.class\"/>"
3673 "<include name=\"org/objectweb/asm/"
3674 "commons/SignatureRemapper.class\"/>")))
3675 #t))
3676 (add-before 'build 'remove-maven-dependency
3677 (lambda _
3678 ;; We do not need to build jarjar as a maven plugin just yet, so
3679 ;; remove this file. Maven requires jarjar (but not that plugin),
3680 ;; so removing it improves the bootstrap.
3681 (delete-file "src/main/com/tonicsystems/jarjar/JarJarMojo.java")
3682 #t))
3683 (replace 'install
3684 (lambda* (#:key outputs #:allow-other-keys)
3685 (let ((target (string-append (assoc-ref outputs "out")
3686 "/share/java")))
3687 (install-file (string-append "dist/jarjar-" ,version ".jar")
3688 target))
3689 #t)))))
3690 (inputs
3691 `(("java-asm-bootstrap" ,java-asm-bootstrap)))
3692 (native-inputs
3693 `(("unzip" ,unzip)))
3694 (home-page "https://code.google.com/archive/p/jarjar/")
3695 (synopsis "Repackage Java libraries")
3696 (description
3697 "Jar Jar Links is a utility that makes it easy to repackage Java
3698 libraries and embed them into your own distribution. Jar Jar Links includes
3699 an Ant task that extends the built-in @code{jar} task.")
3700 (license license:asl2.0)))
3701
3702 (define-public java-hamcrest-core
3703 (package
3704 (name "java-hamcrest-core")
3705 (version "1.3")
3706 (source (origin
3707 (method git-fetch)
3708 (uri (git-reference
3709 (url "https://github.com/hamcrest/JavaHamcrest/")
3710 (commit (string-append "hamcrest-java-" version))))
3711 (file-name (git-file-name name version))
3712 (sha256
3713 (base32
3714 "16fxxkrd31ahqvcaby30jgh3z1i0zxh51m24hxgz0z2agxj6bc63"))
3715 (modules '((guix build utils)))
3716 (snippet
3717 '(begin
3718 ;; Delete bundled thirds-party jar archives.
3719 (delete-file-recursively "lib")
3720 #t))))
3721 (build-system ant-build-system)
3722 (arguments
3723 `(#:tests? #f ; Tests require junit
3724 #:modules ((guix build ant-build-system)
3725 (guix build java-utils)
3726 (guix build utils)
3727 (srfi srfi-1))
3728 #:make-flags (list (string-append "-Dversion=" ,version))
3729 #:test-target "unit-test"
3730 #:build-target "core"
3731 #:phases
3732 (modify-phases %standard-phases
3733 ;; Disable unit tests, because they require junit, which requires
3734 ;; hamcrest-core. We also give a fixed value to the "Built-Date"
3735 ;; attribute from the manifest for reproducibility.
3736 (add-before 'configure 'patch-build.xml
3737 (lambda _
3738 (substitute* "build.xml"
3739 (("unit-test, ") "")
3740 (("\\$\\{build.timestamp\\}") "guix"))
3741 #t))
3742 ;; Java's "getMethods()" returns methods in an unpredictable order.
3743 ;; To make the output of the generated code deterministic we must
3744 ;; sort the array of methods.
3745 (add-after 'unpack 'make-method-order-deterministic
3746 (lambda _
3747 (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java"
3748 (("import java\\.util\\.Iterator;" line)
3749 (string-append line "\n"
3750 "import java.util.Arrays; import java.util.Comparator;"))
3751 (("allMethods = cls\\.getMethods\\(\\);" line)
3752 (string-append "_" line
3753 "
3754 private Method[] getSortedMethods() {
3755 Arrays.sort(_allMethods, new Comparator<Method>() {
3756 @Override
3757 public int compare(Method a, Method b) {
3758 return a.toString().compareTo(b.toString());
3759 }
3760 });
3761 return _allMethods;
3762 }
3763
3764 private Method[] allMethods = getSortedMethods();")))
3765 #t))
3766 (add-before 'build 'do-not-use-bundled-qdox
3767 (lambda* (#:key inputs #:allow-other-keys)
3768 (substitute* "build.xml"
3769 (("lib/generator/qdox-1.12.jar")
3770 (string-append (assoc-ref inputs "java-qdox-1.12")
3771 "/share/java/qdox.jar")))
3772 #t))
3773 ;; build.xml searches for .jar files in this directoy, which
3774 ;; we remove from the source archive.
3775 (add-before 'build 'create-dummy-directories
3776 (lambda _
3777 (mkdir-p "lib/integration")
3778 #t))
3779 (add-before 'build 'create-pom
3780 (lambda _
3781 (substitute* "pom/hamcrest-core.pom"
3782 (("@VERSION@") ,version))
3783 #t))
3784 (replace 'install
3785 (install-from-pom "pom/hamcrest-core.pom")))))
3786 (native-inputs
3787 `(("java-qdox-1.12" ,java-qdox-1.12)
3788 ("java-jarjar" ,java-jarjar)))
3789 (propagated-inputs
3790 `(("java-hamcrest-parent-pom" ,java-hamcrest-parent-pom)))
3791 (home-page "http://hamcrest.org/")
3792 (synopsis "Library of matchers for building test expressions")
3793 (description
3794 "This package provides a library of matcher objects (also known as
3795 constraints or predicates) allowing @code{match} rules to be defined
3796 declaratively, to be used in other frameworks. Typical scenarios include
3797 testing frameworks, mocking libraries and UI validation rules.")
3798 (license license:bsd-2)))
3799
3800 (define java-hamcrest-parent-pom
3801 (package
3802 (inherit java-hamcrest-core)
3803 (name "java-hamcrest-parent-pom")
3804 (propagated-inputs '())
3805 (native-inputs '())
3806 (arguments
3807 `(#:tests? #f
3808 #:phases
3809 (modify-phases %standard-phases
3810 (delete 'configure)
3811 (replace 'build
3812 (lambda _
3813 (substitute* "pom/hamcrest-parent.pom"
3814 (("@VERSION@") ,(package-version java-hamcrest-core)))
3815 #t))
3816 (replace 'install
3817 (install-pom-file "pom/hamcrest-parent.pom")))))))
3818
3819 (define-public java-hamcrest-library
3820 (package
3821 (inherit java-hamcrest-core)
3822 (name "java-hamcrest-library")
3823 (arguments
3824 (substitute-keyword-arguments (package-arguments java-hamcrest-core)
3825 ((#:build-target _) "library")
3826 ((#:phases phases)
3827 `(modify-phases ,phases
3828 (add-after 'unpack 'patch-classpath-for-integration
3829 (lambda* (#:key inputs #:allow-other-keys)
3830 (substitute* "build.xml"
3831 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
3832 (car (find-files (assoc-ref inputs "java-hamcrest-core")
3833 "jar$"))))
3834 #t))
3835 (replace 'create-pom
3836 (lambda _
3837 (substitute* "pom/hamcrest-library.pom"
3838 (("@VERSION@") ,(package-version java-hamcrest-core)))
3839 #t))
3840 (replace 'install
3841 (install-from-pom "pom/hamcrest-library.pom"))))))
3842 (propagated-inputs
3843 `(("java-hamcrest-core" ,java-hamcrest-core)
3844 ("java-hamcrest-parent-pom" ,java-hamcrest-parent-pom)))))
3845
3846 (define-public java-junit
3847 (package
3848 (name "java-junit")
3849 (version "4.12")
3850 (source (origin
3851 (method git-fetch)
3852 (uri (git-reference
3853 (url "https://github.com/junit-team/junit/")
3854 (commit (string-append "r" version))))
3855 (file-name (git-file-name name version))
3856 (sha256
3857 (base32
3858 "1j8avi91px1z8rjc89cfikwrvfifdmmsarwiyrcnr59ynvpz0v8h"))
3859 (modules '((guix build utils)))
3860 (snippet
3861 '(begin
3862 ;; Delete bundled jar archives.
3863 (delete-file-recursively "lib")
3864 #t))))
3865 (build-system ant-build-system)
3866 (arguments
3867 `(#:jar-name "junit.jar"
3868 #:source-dir "src/main/java"
3869 #:test-dir "src/test"
3870 #:test-exclude (list "**/SimpleTest.java" "**/StackTracesTest.java"
3871 "**/RuleChainTest.java" "**/TestWatchmanTest.java")
3872 #:phases
3873 (modify-phases %standard-phases
3874 (add-before 'check 'copy-test-resources
3875 (lambda _
3876 (copy-recursively "src/test/resources" "build/test-classes")
3877 #t))
3878 (replace 'install
3879 (install-from-pom "pom.xml")))))
3880 (propagated-inputs
3881 `(("java-hamcrest-core" ,java-hamcrest-core)))
3882 (native-inputs
3883 `(("java-hamcrest-library" ,java-hamcrest-library)))
3884 (home-page "https://junit.org/junit4/")
3885 (synopsis "Test framework for Java")
3886 (description
3887 "JUnit is a simple framework to write repeatable tests for Java projects.
3888 JUnit provides assertions for testing expected results, test fixtures for
3889 sharing common test data, and test runners for running tests.")
3890 (license license:epl1.0)))
3891
3892 (define-public java-junitparams
3893 (package
3894 (name "java-junitparams")
3895 (version "1.1.1")
3896 (source (origin
3897 (method git-fetch)
3898 (uri (git-reference
3899 (url "https://github.com/Pragmatists/JUnitParams")
3900 (commit (string-append "JUnitParams-" version))))
3901 (file-name (git-file-name name version))
3902 (sha256
3903 (base32
3904 "0rb52xdfp99invyjrras3w0bf0a81cz30yd47rkkiyqcqj0y1q9b"))))
3905 (build-system ant-build-system)
3906 (arguments
3907 `(#:jar-name "junitparams.jar"
3908 #:source-dir "src/main/java"
3909 #:test-dir "src/test"
3910 #:test-exclude (list "**/SuperclassTest.java")))
3911 (inputs
3912 `(("java-junit" ,java-junit)))
3913 (native-inputs
3914 `(("java-junit" ,java-junit)
3915 ("java-hamcrest-core" ,java-hamcrest-core)
3916 ("java-assertj" ,java-assertj)))
3917 (home-page "https://github.com/Pragmatists/JUnitParams")
3918 (synopsis "Parameterised test support for JUnit")
3919 (description "The JUnitParams project adds a new runner to JUnit and
3920 provides much easier and readable parametrised tests for JUnit.")
3921 (license license:asl2.0)))
3922
3923 (define-public java-plexus-utils
3924 (package
3925 (name "java-plexus-utils")
3926 ;; sisu-build-api needs this version, later versions don't work
3927 (version "3.2.1")
3928 (source (origin
3929 (method git-fetch)
3930 (uri (git-reference
3931 (url "https://github.com/codehaus-plexus/plexus-utils")
3932 (commit (string-append "plexus-utils-" version))))
3933 (file-name (git-file-name name version))
3934 (sha256
3935 (base32
3936 "1w169glixyk94jbczj8jzg897lsab46jihiaa3dhw0p06g35va8b"))))
3937 (build-system ant-build-system)
3938 ;; FIXME: The default build.xml does not include a target to install
3939 ;; javadoc files.
3940 (arguments
3941 `(#:jar-name "plexus-utils.jar"
3942 #:source-dir "src/main"
3943 #:phases
3944 (modify-phases %standard-phases
3945 (add-after 'unpack 'fix-reference-to-/bin-and-/usr
3946 (lambda _
3947 (substitute* "src/main/java/org/codehaus/plexus/util/\
3948 cli/shell/BourneShell.java"
3949 (("/bin/sh") (which "sh"))
3950 (("/usr/") (getcwd)))
3951 #t))
3952 (add-after 'unpack 'fix-or-disable-broken-tests
3953 (lambda _
3954 (with-directory-excursion "src/test/java/org/codehaus/plexus/util"
3955 (substitute* '("cli/CommandlineTest.java"
3956 "cli/shell/BourneShellTest.java")
3957 (("/bin/sh") (which "sh"))
3958 (("/bin/echo") (which "echo")))
3959
3960 ;; This test depends on MavenProjectStub, but we don't have
3961 ;; a package for Maven.
3962 (delete-file "introspection/ReflectionValueExtractorTest.java")
3963
3964 ;; FIXME: The command line tests fail, maybe because they use
3965 ;; absolute paths.
3966 (delete-file "cli/CommandlineTest.java")
3967
3968 ;; These tests require openjdk jmh, which is not packaged yet
3969 (for-each delete-file (find-files "." "PerfTest.java$")))
3970 #t))
3971 (add-before 'build 'copy-resources
3972 (lambda _
3973 (copy-recursively "src/main/resources" "build/classes")
3974 #t))
3975 (replace 'install (install-from-pom "pom.xml")))))
3976 (native-inputs
3977 `(("java-hamcrest-core" ,java-hamcrest-core)
3978 ("java-junit" ,java-junit)))
3979 (propagated-inputs
3980 `(("plexus-parent-pom" ,plexus-parent-pom-5.1)))
3981 (home-page "https://codehaus-plexus.github.io/plexus-utils/")
3982 (synopsis "Common utilities for the Plexus framework")
3983 (description "This package provides various Java utility classes for the
3984 Plexus framework to ease working with strings, files, command lines, XML and
3985 more.")
3986 (license license:asl2.0)))
3987
3988 (define-public java-plexus-utils-3.3.0
3989 (package
3990 (inherit java-plexus-utils)
3991 (version "3.3.0")
3992 (source (origin
3993 (method git-fetch)
3994 (uri (git-reference
3995 (url "https://github.com/codehaus-plexus/plexus-utils")
3996 (commit (string-append "plexus-utils-" version))))
3997 (file-name (git-file-name "java-plexus-utils" version))
3998 (sha256
3999 (base32
4000 "0d0fq21rzjy0j55kcp8w9k1rbq9rwr0r7cc8239p9jbz54vihp0g"))))))
4001
4002 (define-public java-plexus-interpolation
4003 (package
4004 (name "java-plexus-interpolation")
4005 (version "1.26")
4006 (source (origin
4007 (method git-fetch)
4008 (uri (git-reference
4009 (url "https://github.com/codehaus-plexus/plexus-interpolation")
4010 (commit (string-append "plexus-interpolation-" version))))
4011 (file-name (git-file-name name version))
4012 (sha256
4013 (base32
4014 "1rahjmhywf6d5m32qzlc9izawyvcd71abfm9k03f13rs2xmfxzlh"))))
4015 (build-system ant-build-system)
4016 (arguments
4017 `(#:jar-name "plexus-interpolation.jar"
4018 #:source-dir "src/main"
4019 #:phases
4020 (modify-phases %standard-phases
4021 (replace 'install (install-from-pom "pom.xml")))))
4022 (propagated-inputs
4023 `(("plexus-parent-pom-5.1" ,plexus-parent-pom-5.1)))
4024 (native-inputs
4025 `(("java-junit" ,java-junit)
4026 ("java-hamcrest-core" ,java-hamcrest-core)))
4027 (home-page "https://codehaus-plexus.github.io/plexus-interpolation/")
4028 (synopsis "Java components for interpolating ${} strings and the like")
4029 (description "Plexus interpolator is a modular, flexible interpolation
4030 framework for the expression language style commonly seen in Maven, Plexus,
4031 and other related projects.
4032
4033 It has its foundation in the @code{org.codehaus.plexus.utils.interpolation}
4034 package within @code{plexus-utils}, but has been separated in order to allow
4035 these two libraries to vary independently of one another.")
4036 (license license:asl2.0)))
4037
4038 (define-public java-plexus-classworlds
4039 (package
4040 (name "java-plexus-classworlds")
4041 (version "2.6.0")
4042 (source (origin
4043 (method git-fetch)
4044 (uri (git-reference
4045 (url "https://github.com/codehaus-plexus/plexus-classworlds")
4046 (commit (string-append "plexus-classworlds-" version))))
4047 (file-name (git-file-name name version))
4048 (sha256
4049 (base32
4050 "034k2hgvj1saalwbnzrbg4n0zgzwcpz1lhlb8q4kgglsp9pmm03s"))))
4051 (build-system ant-build-system)
4052 (arguments
4053 `(#:jar-name "plexus-classworlds.jar"
4054 #:source-dir "src/main"
4055 #:tests? #f;; FIXME: we need to generate some resources as in pom.xml
4056 #:phases
4057 (modify-phases %standard-phases
4058 (replace 'install (install-from-pom "pom.xml")))))
4059 (propagated-inputs
4060 `(("plexus-parent-pom-5.1" ,plexus-parent-pom-5.1)))
4061 (native-inputs
4062 `(("java-junit" ,java-junit)))
4063 (home-page "https://codehaus-plexus.github.io/plexus-classworlds/")
4064 (synopsis "Java class loader framework")
4065 (description "Plexus classworlds replaces the native @code{ClassLoader}
4066 mechanism of Java. It is especially useful for dynamic loading of application
4067 components.")
4068 (license license:asl2.0)))
4069
4070 (define java-plexus-container-default-bootstrap
4071 (package
4072 (name "java-plexus-container-default-bootstrap")
4073 (version "1.7.1")
4074 (source (origin
4075 (method git-fetch)
4076 (uri (git-reference
4077 (url "https://github.com/codehaus-plexus/plexus-containers")
4078 (commit (string-append "plexus-containers-" version))))
4079 (file-name (git-file-name name version))
4080 (sha256
4081 (base32
4082 "1316hrp5vqfv0aw7miq2fp0wwy833h66h502h29vnh5sxj27x228"))))
4083 (build-system ant-build-system)
4084 (arguments
4085 `(#:jar-name "container-default.jar"
4086 #:source-dir "plexus-container-default/src/main/java"
4087 #:test-dir "plexus-container-default/src/test"
4088 #:tests? #f; requires plexus-archiver, which depends on this package
4089 #:phases
4090 (modify-phases %standard-phases
4091 (add-before 'build 'fix-google-collections
4092 (lambda _
4093 ;; Google collections are now replaced with guava
4094 (substitute* "plexus-container-default/pom.xml"
4095 (("google-collections") "guava")
4096 (("com.google.collections") "com.google.guava"))
4097 #t))
4098 (add-before 'build 'copy-resources
4099 (lambda _
4100 (copy-recursively
4101 "plexus-container-default/src/main/resources/"
4102 "build/classes")
4103 #t))
4104 (replace 'install
4105 (install-from-pom "plexus-container-default/pom.xml")))))
4106 (propagated-inputs
4107 `(("java-plexus-worldclass" ,java-plexus-classworlds)
4108 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4109 ("java-plexus-utils" ,java-plexus-utils)
4110 ("java-junit" ,java-junit)
4111 ("java-guava" ,java-guava)
4112 ("java-plexus-containers-parent-pom" ,java-plexus-containers-parent-pom)))
4113 (home-page "https://github.com/codehaus-plexus/plexus-containers")
4114 (synopsis "Inversion-of-control container")
4115 (description "Plexus-default-container is Plexus' inversion-of-control
4116 (@dfn{IoC}) container. It is composed of its public API and its default
4117 implementation.")
4118 (license license:asl2.0)))
4119
4120 (define java-plexus-containers-parent-pom
4121 (package
4122 (inherit java-plexus-container-default-bootstrap)
4123 (name "java-plexus-containers-parent-pom")
4124 (arguments
4125 `(#:tests? #f
4126 #:phases
4127 (modify-phases %standard-phases
4128 (delete 'configure)
4129 (delete 'build)
4130 (replace 'install
4131 (install-pom-file "pom.xml")))))
4132 (propagated-inputs
4133 `(("plexus-parent-pom" ,plexus-parent-pom-4.0)))))
4134
4135 (define-public java-plexus-io
4136 (package
4137 (name "java-plexus-io")
4138 (version "3.2.0")
4139 (source (origin
4140 (method git-fetch)
4141 (uri (git-reference
4142 (url "https://github.com/codehaus-plexus/plexus-io")
4143 (commit (string-append "plexus-io-" version))))
4144 (file-name (git-file-name name version))
4145 (sha256
4146 (base32
4147 "1r3wqfpbxq8vp4p914i8p88r0994rmcjw02hz14n11cfb6gsyvlr"))))
4148 (build-system ant-build-system)
4149 (arguments
4150 `(#:jar-name "plexus-io.jar"
4151 #:source-dir "src/main/java"
4152 #:test-dir "src/test"
4153 #:phases
4154 (modify-phases %standard-phases
4155 (add-before 'build 'copy-resources
4156 (lambda _
4157 (mkdir-p "build/classes")
4158 (copy-recursively "src/main/resources" "build/classes")
4159 (mkdir-p "build/test-classes")
4160 (copy-recursively "src/test/resources" "build/test-classes")
4161 #t))
4162 (replace 'install (install-from-pom "pom.xml")))))
4163 (propagated-inputs
4164 `(("java-plexus-utils" ,java-plexus-utils-3.3.0)
4165 ("java-commons-io" ,java-commons-io)
4166 ("plexus-parent-pom" ,plexus-parent-pom-5.1)))
4167 (inputs
4168 `(("java-jsr305" ,java-jsr305)))
4169 (native-inputs
4170 `(("junit" ,java-junit)
4171 ("hamcrest" ,java-hamcrest-core)
4172 ("guava" ,java-guava)
4173 ("classworlds" ,java-plexus-classworlds)
4174 ("xbean" ,java-geronimo-xbean-reflect)
4175 ("container-default" ,java-plexus-container-default-bootstrap)))
4176 (home-page "https://github.com/codehaus-plexus/plexus-io")
4177 (synopsis "I/O plexus components")
4178 (description "Plexus IO is a set of plexus components, which are designed
4179 for use in I/O operations. This implementation using plexus components allows
4180 reusing it in maven.")
4181 (license license:asl2.0)))
4182
4183 (define-public java-plexus-archiver
4184 (package
4185 (name "java-plexus-archiver")
4186 (version "4.2.2")
4187 (source (origin
4188 (method url-fetch)
4189 (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver"
4190 "/archive/plexus-archiver-" version ".tar.gz"))
4191 (sha256
4192 (base32
4193 "144n971r3lfrx3l12nf2scm80x4xdvgbkk4bjpa4vcvvdrll6qys"))))
4194 (build-system ant-build-system)
4195 (arguments
4196 `(#:jar-name "plexus-archiver.jar"
4197 #:source-dir "src/main/java"
4198 #:test-dir "src/test"
4199 #:test-exclude (list "**/Abstract*.java" "**/Base*.java")
4200 #:phases
4201 (modify-phases %standard-phases
4202 (add-before 'check 'remove-failing
4203 (lambda _
4204 ;; Requires an older version of plexus container
4205 (delete-file
4206 "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java")
4207 #t))
4208 (add-before 'check 'fix-test-building
4209 (lambda _
4210 (substitute* "build.xml"
4211 (("srcdir=\"src/test\"") "srcdir=\"src/test/java\""))
4212 #t))
4213 (add-before 'build 'copy-resources
4214 (lambda _
4215 (mkdir-p "build/classes")
4216 (copy-recursively "src/main/resources" "build/classes")
4217 (mkdir-p "build/test-classes")
4218 (copy-recursively "src/test/resources" "build/test-classes")
4219 #t))
4220 (replace 'install (install-from-pom "pom.xml")))))
4221 (propagated-inputs
4222 `(("java-plexus-utils" ,java-plexus-utils-3.3.0)
4223 ("java-plexus-io" ,java-plexus-io)
4224 ("java-iq80-snappy" ,java-iq80-snappy)
4225 ("java-commons-compress" ,java-commons-compress)
4226 ("plexus-parent-pom" ,plexus-parent-pom-6.1)))
4227 (inputs
4228 `(("java-jsr305" ,java-jsr305)
4229 ("java-plexus-container-default"
4230 ,java-plexus-container-default-bootstrap)))
4231 (native-inputs
4232 `(("java-hamcrest-core" ,java-hamcrest-core)
4233 ("junit" ,java-junit)
4234 ("classworld" ,java-plexus-classworlds)
4235 ("xbean" ,java-geronimo-xbean-reflect)
4236 ("xz" ,java-xz)
4237 ("guava" ,java-guava)))
4238 (home-page "https://github.com/codehaus-plexus/plexus-archiver")
4239 (synopsis "Archiver component of the Plexus project")
4240 (description "Plexus-archiver contains a component to deal with project
4241 archives (jar).")
4242 (license license:asl2.0)))
4243
4244 (define-public java-plexus-container-default
4245 (package
4246 (inherit java-plexus-container-default-bootstrap)
4247 (name "java-plexus-container-default")
4248 (arguments
4249 `(#:jar-name "container-default.jar"
4250 #:source-dir "plexus-container-default/src/main/java"
4251 #:test-dir "plexus-container-default/src/test"
4252 #:test-exclude (list ;"**/*Test.java"
4253 "**/Abstract*.java"
4254 ;; Requires plexus-hierarchy
4255 "**/PlexusHierarchyTest.java"
4256 ;; Failures
4257 "**/ComponentRealmCompositionTest.java"
4258 "**/PlexusContainerTest.java")
4259 #:phases
4260 (modify-phases %standard-phases
4261 (add-before 'build 'fix-google-collections
4262 (lambda _
4263 ;; Google collections are now replaced with guava
4264 (substitute* "plexus-container-default/pom.xml"
4265 (("google-collections") "guava")
4266 (("com.google.collections") "com.google.guava"))
4267 #t))
4268 (add-before 'build 'copy-resources
4269 (lambda _
4270 (copy-recursively
4271 "plexus-container-default/src/main/resources/"
4272 "build/classes")
4273 #t))
4274 (add-before 'check 'fix-paths
4275 (lambda _
4276 (let ((dir "plexus-container-default/src/test/java/org/codehaus"))
4277 (substitute*
4278 (string-append
4279 dir "/plexus/component/composition/"
4280 "ComponentRealmCompositionTest.java")
4281 (("src/test") "plexus-container-default/src/test"))
4282 #t)))
4283 (replace 'install
4284 (install-from-pom "plexus-container-default/pom.xml")))))
4285 (inputs
4286 `(("worldclass" ,java-plexus-classworlds)
4287 ("xbean" ,java-geronimo-xbean-reflect)
4288 ("utils" ,java-plexus-utils)
4289 ("junit" ,java-junit)
4290 ("guava" ,java-guava)))
4291 (native-inputs
4292 `(("archiver" ,java-plexus-archiver)
4293 ("hamcrest" ,java-hamcrest-core)))))
4294
4295 (define-public java-plexus-component-annotations
4296 (package
4297 (inherit java-plexus-container-default)
4298 (name "java-plexus-component-annotations")
4299 (arguments
4300 `(#:jar-name "plexus-component-annotations.jar"
4301 #:source-dir "plexus-component-annotations/src/main/java"
4302 #:tests? #f; no tests
4303 #:phases
4304 (modify-phases %standard-phases
4305 (replace 'install
4306 (install-from-pom "plexus-component-annotations/pom.xml")))))
4307 (propagated-inputs
4308 `(("java-plexus-containers-parent-pom" ,java-plexus-containers-parent-pom)))
4309 (inputs '())
4310 (native-inputs '())
4311 (synopsis "Plexus descriptors generator")
4312 (description "This package is a Maven plugin to generate Plexus descriptors
4313 from source tags and class annotations.")))
4314
4315 (define-public java-plexus-component-metadata
4316 (package
4317 (inherit java-plexus-container-default)
4318 (name "java-plexus-component-metadata")
4319 (arguments
4320 `(#:jar-name "plexus-component-metadata.jar"
4321 #:source-dir "src/main/java"
4322 #:test-dir "src/test"
4323 #:jdk ,icedtea-8
4324 #:phases
4325 (modify-phases %standard-phases
4326 (add-before 'configure 'chdir
4327 (lambda _
4328 (chdir "plexus-component-metadata")
4329 #t))
4330 (add-before 'build 'copy-resources
4331 (lambda _
4332 (copy-recursively "src/main/resources"
4333 "build/classes/")
4334 #t)))))
4335 (propagated-inputs
4336 `(("java-plexus-container-default" ,java-plexus-container-default)
4337 ("java-plexu-component-annotations" ,java-plexus-component-annotations)
4338 ("java-plexus-utils" ,java-plexus-utils)
4339 ("java-plexus-cli" ,java-plexus-cli)
4340 ("java-plexus-classworlds" ,java-plexus-classworlds)
4341 ("maven-plugin-api" ,maven-plugin-api)
4342 ("maven-plugin-annotations" ,maven-plugin-annotations)
4343 ("maven-core-bootstrap" ,maven-core-bootstrap)
4344 ("maven-model" ,maven-model)
4345 ("java-commons-cli" ,java-commons-cli)
4346 ("java-qdox" ,java-qdox)
4347 ("java-jdom2" ,java-jdom2)
4348 ("java-asm" ,java-asm)))
4349 (native-inputs
4350 `(("java-junit" ,java-junit)
4351 ("java-guava" ,java-guava)
4352 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)))
4353 (synopsis "Inversion-of-control container for Maven")
4354 (description "The Plexus project provides a full software stack for creating
4355 and executing software projects. Based on the Plexus container, the
4356 applications can utilise component-oriented programming to build modular,
4357 reusable components that can easily be assembled and reused. This package
4358 provides the Maven plugin generating the component metadata.")))
4359
4360 (define-public java-plexus-cipher
4361 (package
4362 (name "java-plexus-cipher")
4363 (version "1.7")
4364 (source (origin
4365 (method git-fetch)
4366 (uri (git-reference
4367 (url "https://github.com/codehaus-plexus/plexus-cipher")
4368 (commit (string-append "plexus-cipher-" version))))
4369 (file-name (git-file-name name version))
4370 (sha256
4371 (base32
4372 "0m638nzlxbmnbcj5cwdpgs326ab584yv0k803zlx37r6iqwvf6b0"))))
4373 (build-system ant-build-system)
4374 (arguments
4375 `(#:jar-name "plexus-cipher.jar"
4376 #:source-dir "src/main/java"
4377 #:tests? #f; FIXME: requires sisu-inject-bean
4378 #:phases
4379 (modify-phases %standard-phases
4380 (add-before 'build 'copy-resources
4381 (lambda _
4382 (copy-recursively "src/main/resources" "build/classes")
4383 (mkdir-p "build/classes/META-INF/sisu")
4384 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
4385 (lambda _
4386 (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
4387 #t))
4388 (add-before 'install 'fix-test-dependency
4389 (lambda _
4390 ;; sisu-inject-bean is only used for tests, but its scope is "provided".
4391 (substitute* "pom.xml"
4392 (("provided") "test"))
4393 #t))
4394 (replace 'install (install-from-pom "pom.xml")))))
4395 (inputs
4396 `(("java-cdi-api" ,java-cdi-api)
4397 ("java-javax-inject" ,java-javax-inject)))
4398 (propagated-inputs
4399 `(("java-sonatype-spice-parent-pom" ,java-sonatype-spice-parent-pom-15)))
4400 (native-inputs
4401 `(("java-junit" ,java-junit)))
4402 (home-page "https://github.com/sonatype/plexus-cipher")
4403 (synopsis "Encryption/decryption Component")
4404 (description "Plexus-cipher contains a component to deal with encryption
4405 and decryption.")
4406 (license license:asl2.0)))
4407
4408 (define-public java-plexus-java
4409 (package
4410 (name "java-plexus-java")
4411 (version "0.9.10")
4412 (source (origin
4413 (method git-fetch)
4414 (uri (git-reference
4415 (url "https://github.com/codehaus-plexus/plexus-languages")
4416 (commit (string-append "plexus-languages-" version))))
4417 (file-name (git-file-name name version))
4418 (sha256
4419 (base32
4420 "0vmvgq5hfxs90yyxgssfpwq78l7vwx1ljwpkk594mrdr8sm668b5"))
4421 (modules '((guix build utils)))
4422 (snippet
4423 `(begin
4424 (for-each delete-file (find-files "." ".*.jar$"))
4425 #t))))
4426 (build-system ant-build-system)
4427 (arguments
4428 `(#:jar-name "plexus-java.java"
4429 #:source-dir "plexus-java/src/main/java"
4430 #:test-dir "plexus-java/src/test"
4431 #:tests? #f; require mockito 2
4432 #:phases
4433 (modify-phases %standard-phases
4434 (add-after 'build 'generate-metadata
4435 (lambda _
4436 (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes")
4437 "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli"
4438 "--source" "plexus-java/src/main/java"
4439 "--output" "build/classes/META-INF/plexus/components.xml"
4440 "--classes" "build/classes"
4441 "--descriptors" "build/classes/META-INF")
4442 (invoke "ant" "jar")
4443 #t))
4444 (add-before 'install 'install-parent
4445 (install-pom-file "pom.xml"))
4446 (replace 'install
4447 (install-from-pom "plexus-java/pom.xml")))))
4448 (propagated-inputs
4449 `(("java-asm" ,java-asm)
4450 ("java-qdox" ,java-qdox-2-M9)
4451 ("java-javax-inject" ,java-javax-inject)
4452 ("plexus-parent-pom" ,plexus-parent-pom-4.0)))
4453 (inputs
4454 `(("java-plexus-component-annotations" ,java-plexus-component-annotations)))
4455 (native-inputs
4456 `(("java-plexus-component-metadata" ,java-plexus-component-metadata)
4457 ("java-junit" ,java-junit)))
4458 (home-page "https://codehaus-plexus.github.io/plexus-languages/plexus-java")
4459 (synopsis "Shared language features for Java")
4460 (description "This package contains shared language features of the Java
4461 language, for the plexus project.")
4462 (license license:asl2.0)))
4463
4464 (define-public java-plexus-compiler-api
4465 (package
4466 (name "java-plexus-compiler-api")
4467 (version "2.8.4")
4468 (source (origin
4469 (method git-fetch)
4470 (uri (git-reference
4471 (url "https://github.com/codehaus-plexus/plexus-compiler")
4472 (commit (string-append "plexus-compiler-" version))))
4473 (file-name (git-file-name name version))
4474 (sha256
4475 (base32
4476 "1nq1gnn3s6z1j29gmi1hqbklsmm8b1lmnafb0191914f95mn18gk"))))
4477 (build-system ant-build-system)
4478 (arguments
4479 `(#:jar-name "plexus-compiler-api.jar"
4480 #:source-dir "plexus-compiler-api/src/main/java"
4481 #:test-dir "plexus-compiler-api/src/test"
4482 #:phases
4483 (modify-phases %standard-phases
4484 (replace 'install
4485 (install-from-pom "plexus-compiler-api/pom.xml")))))
4486 (propagated-inputs
4487 `(("java-plexus-container-default" ,java-plexus-container-default)
4488 ("java-plexus-compiler-pom" ,java-plexus-compiler-pom)
4489 ("java-plexus-util" ,java-plexus-utils)))
4490 (native-inputs
4491 `(("java-junit" ,java-junit)))
4492 (home-page "https://github.com/codehaus-plexus/plexus-compiler")
4493 (synopsis "Plexus Compilers component's API to manipulate compilers")
4494 (description "This package contains the API used by components to manipulate
4495 compilers.")
4496 (license (list license:asl2.0
4497 license:expat))))
4498
4499 (define java-plexus-compiler-pom
4500 (package
4501 (inherit java-plexus-compiler-api)
4502 (name "java-plexus-compiler-pom")
4503 (arguments
4504 `(#:tests? #f
4505 #:phases
4506 (modify-phases %standard-phases
4507 (delete 'configure)
4508 (delete 'build)
4509 (replace 'install
4510 (install-pom-file "pom.xml"))
4511 (add-after 'install 'install-compilers
4512 (install-pom-file "plexus-compilers/pom.xml")))))
4513 (propagated-inputs
4514 `(("plexus-components-parent-pom-4.0" ,plexus-components-parent-pom-4.0)))))
4515
4516 (define plexus-components-parent-pom-4.0
4517 (package
4518 (name "plexus-components-parent-pom")
4519 (version "4.0")
4520 (source (origin
4521 (method git-fetch)
4522 (uri (git-reference
4523 (url "https://github.com/codehaus-plexus/plexus-components")
4524 (commit (string-append "plexus-components-" version))))
4525 (file-name (git-file-name name version))
4526 (sha256
4527 (base32
4528 "041bm8yv0m2i17mqg8zljib4ykpha7ijls2qfdwvkma4d39lhysi"))))
4529 (build-system ant-build-system)
4530 (arguments
4531 `(#:tests? #f
4532 #:phases
4533 (modify-phases %standard-phases
4534 (delete 'configure)
4535 (delete 'build)
4536 (replace 'install
4537 (install-pom-file "pom.xml")))))
4538 (propagated-inputs
4539 `(("plexus-parent-pom-4.0" ,plexus-parent-pom-4.0)))
4540 (home-page "https://codehaus-plexus.github.io/plexus-components")
4541 (synopsis "Plexus parent pom")
4542 (description "This package contains the Plexus components parent POM.")
4543 (license license:asl2.0)))
4544
4545 (define-public java-plexus-compiler-manager
4546 (package
4547 (inherit java-plexus-compiler-api)
4548 (name "java-plexus-compiler-manager")
4549 (arguments
4550 `(#:jar-name "compiler-compiler-manager.java"
4551 #:source-dir "plexus-compiler-manager/src/main/java"
4552 #:test-dir "plexus-compiler-manager/src/test"
4553 #:tests? #f
4554 #:phases
4555 (modify-phases %standard-phases
4556 (add-after 'build 'generate-metadata
4557 (lambda _
4558 (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes")
4559 "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli"
4560 "--source" "plexus-compiler-manager/src/main/java"
4561 "--output" "build/classes/META-INF/plexus/components.xml"
4562 "--classes" "build/classes"
4563 "--descriptors" "build/classes/META-INF")
4564 (invoke "ant" "jar")
4565 #t))
4566 (add-after 'generate-metadata 'rebuild
4567 (lambda _
4568 (invoke "ant" "jar")
4569 #t))
4570 (replace 'install
4571 (install-from-pom "plexus-compiler-manager/pom.xml")))))
4572 (propagated-inputs
4573 `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
4574 ("java-plexus-compiler-pom" ,java-plexus-compiler-pom)
4575 ("java-plexus-container-default" ,java-plexus-container-default)))
4576 (native-inputs
4577 `(("unzip" ,unzip)
4578 ("java-plexus-component-metadata" ,java-plexus-component-metadata)))
4579 (synopsis "Compiler management for Plexus Compiler component")
4580 (description "Plexus Compiler is a Plexus component to use different
4581 compilers through a uniform API. This component chooses the compiler
4582 implementation to use in a project.")))
4583
4584 (define-public java-plexus-compiler-javac
4585 (package
4586 (inherit java-plexus-compiler-api)
4587 (name "java-plexus-compiler-javac")
4588 (arguments
4589 `(#:jar-name "plexus-compiler-javac.jar"
4590 #:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java"
4591 #:jdk ,icedtea-8
4592 #:tests? #f; depends on compiler-test -> maven-core -> ... -> this package.
4593 #:test-dir "plexus-compilers/plexus-compiler-javac/src/test"
4594 #:modules ((guix build ant-build-system)
4595 (guix build utils)
4596 (guix build java-utils)
4597 (sxml simple))
4598 #:phases
4599 (modify-phases %standard-phases
4600 ;; We cannot use java-plexus-component-metadata to generate the metadata
4601 ;; because it ultimately depends on this package.
4602 ;; Create it manually instead
4603 (add-before 'build 'create-metadata
4604 (lambda _
4605 (let* ((dir "build/classes/META-INF/plexus")
4606 (file (string-append dir "/components.xml")))
4607 (mkdir-p dir)
4608 (with-output-to-file file
4609 (lambda _
4610 (sxml->xml
4611 `(component-set
4612 (components
4613 (component
4614 (role "org.codehaus.plexus.compiler.Compiler")
4615 (role-hint "javac")
4616 (implementation "org.codehaus.plexus.compiler.javac.JavacCompiler")
4617 (isolated-realm "false"))))))))
4618 #t))
4619 (replace 'install
4620 (install-from-pom "plexus-compilers/plexus-compiler-javac/pom.xml")))))
4621 (propagated-inputs
4622 `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
4623 ("java-plexus-utils" ,java-plexus-utils)
4624 ("java-plexus-container-default" ,java-plexus-container-default)))
4625 (synopsis "Javac Compiler support for Plexus Compiler component")
4626 (description "This package contains the Javac Compiler support for Plexus
4627 Compiler component.")))
4628
4629 (define plexus-components-pom-1.1.20
4630 (package
4631 (name "plexus-components-pom-1.1.20")
4632 (version "1.1.20")
4633 (source (origin
4634 (method git-fetch)
4635 (uri (git-reference
4636 (url "https://github.com/codehaus-plexus/plexus-components")
4637 (commit (string-append "plexus-components-" version))))
4638 (file-name (git-file-name name version))
4639 (sha256
4640 (base32
4641 "1q254k95m9icyfsvaw8c226midg8v6v436wvivhv7im825mnp5yb"))))
4642 (build-system ant-build-system)
4643 (arguments
4644 `(#:tests? #f
4645 #:phases
4646 (modify-phases %standard-phases
4647 (delete 'configure)
4648 (delete 'build)
4649 (replace 'install
4650 (install-pom-file "pom.xml")))))
4651 (propagated-inputs
4652 `(("plexus-parent-pom" ,plexus-parent-pom-3.1)))
4653 (home-page "https://github.com/codehaus-plexus/plexus-components")
4654 (synopsis "Maven parent pom for plexus packages")
4655 (description "This package contains the parent pom for plexus component
4656 packages.")
4657 (license license:asl2.0)))
4658
4659 (define-public java-plexus-digest
4660 (package
4661 (name "java-plexus-digest")
4662 (version "1.2")
4663 (source (origin
4664 (method git-fetch)
4665 (uri (git-reference
4666 (url "https://github.com/codehaus-plexus/plexus-digest")
4667 (commit "2a52ad1bda8297fa0e287163d2fa37245ec6a430")))
4668 (file-name (git-file-name name version))
4669 (sha256
4670 (base32
4671 "19w5wxsliz8r42niry68qa665kvjsb8081dazg9vgd3pca72w07x"))))
4672 (build-system ant-build-system)
4673 (arguments
4674 `(#:jar-name "plexus-digest.jar"
4675 #:source-dir "src/main/java"
4676 #:tests? #f
4677 #:phases
4678 (modify-phases %standard-phases
4679 (replace 'install
4680 (install-from-pom "pom.xml")))))
4681 (propagated-inputs
4682 `(("java-plexus-utils" ,java-plexus-utils)
4683 ("plexus-components-pom-1.1.20" ,plexus-components-pom-1.1.20)))
4684 (native-inputs
4685 `(("java-junit" ,java-junit)))
4686 (home-page "https://github.com/codehaus-plexus/plexus-digest")
4687 (synopsis "Hash function utilities for Java")
4688 (description "This package is a plexus component that contains hash
4689 function utilities.")
4690 (license license:asl2.0)))
4691
4692 (define-public java-plexus-sec-dispatcher
4693 (package
4694 (name "java-plexus-sec-dispatcher")
4695 (version "1.4") ;; Newest release listed at the Maven Central Repository.
4696 (source (origin
4697 ;; This project doesn't tag releases or publish tarballs, so we take
4698 ;; the "prepare release plexus-sec-dispatcher-1.4" git commit.
4699 (method git-fetch)
4700 (uri (git-reference
4701 (url "https://github.com/sonatype/plexus-sec-dispatcher/")
4702 (commit "7db8f880486e192a1c5ea9544e01e756c3d49d0f")))
4703 (sha256
4704 (base32
4705 "1ng4yliy4cqpjr4fxxjbpwyk1wkch5f8vblm1kvwf328s4gibszs"))
4706 (file-name (git-file-name name version))))
4707 (arguments
4708 `(#:jar-name "plexus-sec-dispatcher.jar"
4709 #:source-dir "src/main/java"
4710 #:phases
4711 (modify-phases %standard-phases
4712 (add-before 'build 'generate-models
4713 (lambda* (#:key inputs #:allow-other-keys)
4714 (define (modello-single-mode file version mode)
4715 (invoke "java"
4716 "org.codehaus.modello.ModelloCli"
4717 file mode "src/main/java" version
4718 "false" "true"))
4719 (let ((file "src/main/mdo/settings-security.mdo"))
4720 (modello-single-mode file "1.0.0" "java")
4721 (modello-single-mode file "1.0.0" "xpp3-reader")
4722 (modello-single-mode file "1.0.0" "xpp3-writer"))
4723 #t))
4724 (add-before 'build 'generate-components.xml
4725 (lambda _
4726 (mkdir-p "build/classes/META-INF/plexus")
4727 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
4728 (lambda _
4729 (display
4730 "<component-set>\n
4731 <components>\n
4732 <component>\n
4733 <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n
4734 <role-hint>default</role-hint>\n
4735 <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n
4736 <description></description>\n
4737 <requirements>\n
4738 <requirement>\n
4739 <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n
4740 <field-name>_cipher</field-name>\n
4741 </requirement>\n
4742 <requirement>\n
4743 <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n
4744 <field-name>_decryptors</field-name>\n
4745 </requirement>\n
4746 </requirements>\n
4747 <configuration>\n
4748 <_configuration-file>~/.settings-security.xml</_configuration-file>\n
4749 </configuration>\n
4750 </component>\n
4751 </components>\n
4752 </component-set>\n")))
4753 #t))
4754 (add-before 'check 'fix-paths
4755 (lambda _
4756 (copy-recursively "src/test/resources" "target")
4757 #t))
4758 (replace 'install (install-from-pom "pom.xml")))))
4759 (propagated-inputs
4760 `(("java-plexus-utils" ,java-plexus-utils)
4761 ("java-plexus-cipher" ,java-plexus-cipher)
4762 ("java-sonatype-spice-parent-pom" ,java-sonatype-spice-parent-pom-12)))
4763 (native-inputs
4764 `(("java-modello-core" ,java-modello-core)
4765 ;; for modello:
4766 ("java-plexus-container-default" ,java-plexus-container-default)
4767 ("java-plexus-classworlds" ,java-plexus-classworlds)
4768 ("java-plexus-utils" ,java-plexus-utils)
4769 ("java-guava" ,java-guava)
4770 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4771 ("java-sisu-build-api" ,java-sisu-build-api)
4772 ;; modello plugins:
4773 ("java-modellop-plugins-java" ,java-modello-plugins-java)
4774 ("java-modellop-plugins-xml" ,java-modello-plugins-xml)
4775 ("java-modellop-plugins-xpp3" ,java-modello-plugins-xpp3)
4776 ;; for tests
4777 ("java-junit" ,java-junit)))
4778 (build-system ant-build-system)
4779 (home-page "https://github.com/sonatype/plexus-sec-dispatcher")
4780 (synopsis "Plexus Security Dispatcher Component")
4781 (description "This package is the Plexus Security Dispatcher Component.
4782 This component decrypts a string passed to it.")
4783 (license license:asl2.0)))
4784
4785 (define-public java-plexus-cli
4786 (package
4787 (name "java-plexus-cli")
4788 (version "1.7")
4789 (source (origin
4790 (method git-fetch)
4791 (uri (git-reference
4792 (url "https://github.com/sonatype/plexus-cli")
4793 (commit "a776afa6bca84e5107bedb69440329cdb24ed645")))
4794 (file-name (string-append name "-" version))
4795 (sha256
4796 (base32
4797 "0xjrlay605rypv3zd7y24vlwf0039bil3n2cqw54r1ddpysq46vx"))))
4798 (build-system ant-build-system)
4799 (arguments
4800 `(#:jar-name "plexus-cli.jar"
4801 #:source-dir "src/main/java"
4802 #:jdk ,icedtea-8
4803 #:test-dir "src/test"))
4804 (inputs
4805 `(("java-commons-cli" ,java-commons-cli)
4806 ("java-plexus-container-default" ,java-plexus-container-default)
4807 ("java-plexus-classworlds" ,java-plexus-classworlds)))
4808 (native-inputs
4809 `(("java-plexus-utils" ,java-plexus-utils)
4810 ("java-junit" ,java-junit)
4811 ("java-guava" ,java-guava)))
4812 (home-page "https://codehaus-plexus.github.io/plexus-cli")
4813 (synopsis "CLI building library for plexus")
4814 (description "This package is a library to help creating CLI around
4815 Plexus components.")
4816 (license license:asl2.0)))
4817
4818 (define-public java-sisu-build-api
4819 (package
4820 (name "java-sisu-build-api")
4821 (version "0.0.7")
4822 (source (origin
4823 (method git-fetch)
4824 (uri (git-reference
4825 (url "https://github.com/sonatype/sisu-build-api")
4826 (commit (string-append "plexus-build-api-" version))))
4827 (file-name (git-file-name name version))
4828 (sha256
4829 (base32
4830 "1d5w6c58gkx30d51v7qwv1xrhc0ly76848gihmgshj19yf6yhca0"))))
4831 (build-system ant-build-system)
4832 (arguments
4833 `(#:jar-name "sisu-build-api.jar"
4834 #:source-dir "src/main/java"
4835 #:jdk ,icedtea-8
4836 #:tests? #f; FIXME: how to run the tests?
4837 #:phases
4838 (modify-phases %standard-phases
4839 (add-before 'build 'copy-resources
4840 (lambda _
4841 (copy-recursively "src/main/resources" "build/classes")
4842 (substitute* (find-files "build/classes")
4843 (("\\$\\{project.version\\}") ,version))
4844 #t))
4845 (add-before 'build 'generate-plexus-compontent
4846 (lambda _
4847 (mkdir-p "build/classes/META-INF/plexus")
4848 ;; This file is required for plexus to inject this package.
4849 ;; FIXME: how is it generated?
4850 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
4851 (lambda _
4852 (display
4853 "<component-set>\n
4854 <components>\n
4855 <component>\n
4856 <role>org.sonatype.plexus.build.incremental.BuildContext</role>\n
4857 <role-hint>default</role-hint>\n
4858 <implementation>org.sonatype.plexus.build.incremental.DefaultBuildContext</implementation>\n
4859 <description>Filesystem based non-incremental build context implementation\n
4860 which behaves as if all files were just created.</description>\n
4861 </component>\n
4862 </components>\n
4863 </component-set>\n")))
4864 #t))
4865 (replace 'install
4866 (install-from-pom "pom.xml")))))
4867 (inputs
4868 `(("java-plexus-utils" ,java-plexus-utils)
4869 ("java-plexus-container-default" ,java-plexus-container-default)))
4870 (home-page "https://github.com/sonatype/sisu-build-api/")
4871 (synopsis "Base build API for maven")
4872 (description "This package contains the base build API for maven and
4873 a default implementation of it. This API is about scanning files in a
4874 project and determining what files need to be rebuilt.")
4875 (license license:asl2.0)))
4876
4877 (define-public java-modello-core
4878 (package
4879 (name "java-modello-core")
4880 (version "1.9.1")
4881 (source (origin
4882 (method git-fetch)
4883 (uri (git-reference
4884 (url "https://github.com/codehaus-plexus/modello")
4885 (commit (string-append "modello-" version))))
4886 (file-name (git-file-name name version))
4887 (sha256
4888 (base32
4889 "1di6ni42aqllpdvkpyfcw70352vr2i8wf6hd5nhd9kmqjb5dj5j4"))))
4890 (build-system ant-build-system)
4891 (arguments
4892 `(#:jar-name "modello-core.jar"
4893 #:source-dir "modello-core/src/main/java"
4894 #:test-dir "modello-core/src/test"
4895 #:main-class "org.codehaus.modello.ModelloCli"
4896 #:jdk ,icedtea-8
4897 #:phases
4898 (modify-phases %standard-phases
4899 (add-before 'build 'copy-resources
4900 (lambda _
4901 (mkdir-p "build/classes/META-INF/plexus")
4902 (copy-file "modello-core/src/main/resources/META-INF/plexus/components.xml"
4903 "build/classes/META-INF/plexus/components.xml")
4904 #t))
4905 (add-before 'check 'fix-tests
4906 (lambda _
4907 (with-directory-excursion "modello-core/src/test/java/org/codehaus"
4908 (substitute* '("modello/core/DefaultModelloCoreTest.java"
4909 "modello/core/io/ModelReaderTest.java")
4910 (("src/test") "modello-core/src/test")))
4911 #t)))))
4912 (propagated-inputs
4913 `(("java-plexus-utils" ,java-plexus-utils)
4914 ("java-plexus-container-default" ,java-plexus-container-default)
4915 ("java-sisu-build-api" ,java-sisu-build-api)))
4916 (native-inputs
4917 `(("java-junit" ,java-junit)
4918 ("java-plexus-classworlds" ,java-plexus-classworlds)
4919 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4920 ("java-guava" ,java-guava)))
4921 (home-page "https://codehaus-plexus.github.io/modello/")
4922 (synopsis "Framework for code generation from a simple model")
4923 (description "Modello is a framework for code generation from a simple model.
4924
4925 Modello generates code from a simple model format: based on a plugin
4926 architecture, various types of code and descriptors can be generated from the
4927 single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers,
4928 XSD and documentation.")
4929 (license (list
4930 license:expat
4931 ;; Although this package uses only files licensed under expat,
4932 ;; other parts of the source are licensed under different
4933 ;; licenses. We include them to be inherited by other packages.
4934 license:asl2.0
4935 ;; Some files in modello-plugin-java are licensed under a
4936 ;; 5-clause BSD license.
4937 (license:non-copyleft
4938 (string-append "file:///modello-plugins/modello-plugin-java/"
4939 "src/main/java/org/codehaus/modello/plugin/"
4940 "java/javasource/JNaming.java"))))))
4941
4942 (define-public java-modello-plugins-java
4943 (package
4944 (inherit java-modello-core)
4945 (name "java-modello-plugins-java")
4946 (arguments
4947 `(#:jar-name "modello-plugins-java.jar"
4948 #:source-dir "modello-plugins/modello-plugin-java/src/main/java"
4949 #:test-dir "modello-plugins/modello-plugin-java/src/test"
4950 #:jdk ,icedtea-8
4951 #:tests? #f; requires maven-model, which depends on this package
4952 #:phases
4953 (modify-phases %standard-phases
4954 (add-before 'build 'copy-resources
4955 (lambda _
4956 (mkdir-p "build/classes")
4957 (copy-recursively "modello-plugins/modello-plugin-java/src/main/resources"
4958 "build/classes")
4959 #t)))))
4960 (inputs
4961 `(("java-modello-core" ,java-modello-core)))
4962 (synopsis "Modello Java Plugin")
4963 (description "Modello Java Plugin generates Java objects for the model.")))
4964
4965 (define-public java-modello-plugins-xml
4966 (package
4967 (inherit java-modello-core)
4968 (name "java-modello-plugins-xml")
4969 (arguments
4970 `(#:jar-name "modello-plugins-xml.jar"
4971 #:source-dir "modello-plugins/modello-plugin-xml/src/main/java"
4972 #:test-dir "modello-plugins/modello-plugin-xml/src/test"
4973 #:jdk ,icedtea-8
4974 #:phases
4975 (modify-phases %standard-phases
4976 (add-before 'build 'copy-resources
4977 (lambda _
4978 (mkdir-p "build/classes")
4979 (copy-recursively
4980 "modello-plugins/modello-plugin-xml/src/main/resources"
4981 "build/classes")
4982 #t))
4983 (add-before 'check 'fix-paths
4984 (lambda _
4985 (with-directory-excursion "modello-plugins/modello-plugin-xml/src/test"
4986 (substitute*
4987 "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java"
4988 (("src/test") "modello-plugins/modello-plugin-xml/src/test")))
4989 #t)))))
4990 (propagated-inputs
4991 `(("java-modello-core" ,java-modello-core)
4992 ("java-modello-plugins-java" ,java-modello-plugins-java)))
4993 (synopsis "Modello XML Plugin")
4994 (description "Modello XML Plugin contains shared code for every plugins
4995 working on XML representation of the model.")))
4996
4997 (define-public java-modello-test
4998 (package
4999 (inherit java-modello-core)
5000 (name "java-modello-test")
5001 (arguments
5002 `(#:jar-name "modello-test.jar"
5003 #:source-dir "modello-test/src/main/java"
5004 #:tests? #f; no tests
5005 #:jdk ,icedtea-8))
5006 (inputs
5007 `(("java-plexus-utils" ,java-plexus-utils)
5008 ("java-plexus-compiler-api" ,java-plexus-compiler-api)
5009 ("java-plexus-compiler-javac" ,java-plexus-compiler-javac)
5010 ("java-plexus-container-default" ,java-plexus-container-default)))
5011 (synopsis "Modello test package")
5012 (description "The modello test package contains the basis to create
5013 Modello generator unit-tests, including sample models and xml files to test
5014 every feature for every plugin.")))
5015
5016 (define-public java-modello-plugins-xpp3
5017 (package
5018 (inherit java-modello-core)
5019 (name "java-modello-plugins-xpp3")
5020 (arguments
5021 `(#:jar-name "modello-plugins-xpp3.jar"
5022 #:source-dir "modello-plugins/modello-plugin-xpp3/src/main/java"
5023 #:test-dir "modello-plugins/modello-plugin-xpp3/src/test"
5024 ;; One of the test dependencies is maven-model which depends on this package.
5025 #:tests? #f
5026 #:jdk ,icedtea-8
5027 #:phases
5028 (modify-phases %standard-phases
5029 (add-before 'build 'copy-resources
5030 (lambda _
5031 (mkdir-p "build/classes")
5032 (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources"
5033 "build/classes")
5034 #t)))))
5035 (propagated-inputs
5036 `(("java-modello-core" ,java-modello-core)
5037 ("java-modello-plugins-java" ,java-modello-plugins-java)
5038 ("java-modello-plugins-xml" ,java-modello-plugins-xml)))
5039 (native-inputs
5040 `(("java-xmlunit" ,java-xmlunit)
5041 ("java-modello-test" ,java-modello-test)
5042 ,@(package-native-inputs java-modello-core)))
5043 (synopsis "Modello XPP3 Plugin")
5044 (description "The modello XPP3 plugin generates XML readers and writers based
5045 on the XPP3 API (XML Pull Parser).")))
5046
5047 (define-public java-asm
5048 (package
5049 (name "java-asm")
5050 (version "6.0")
5051 (source (origin
5052 (method url-fetch)
5053 (uri (string-append "https://download.forge.ow2.org/asm/"
5054 "asm-" version ".tar.gz"))
5055 (sha256
5056 (base32
5057 "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00"))))
5058 (build-system ant-build-system)
5059 (arguments
5060 `(#:build-target "compile"
5061 ;; The tests require an old version of Janino, which no longer compiles
5062 ;; with the JDK7.
5063 #:tests? #f
5064 #:make-flags
5065 (list
5066 ;; We don't need these extra ant tasks, but the build system asks us to
5067 ;; provide a path anyway.
5068 "-Dobjectweb.ant.tasks.path=dummy-path"
5069 ;; The java-aqute.bndlib JAR file will be put onto the classpath and
5070 ;; used during the build automatically by ant-build-system, but
5071 ;; java-asm's build.xml fails unless we provide something here.
5072 "-Dbiz.aQute.bnd.path=dummy-path")
5073 #:phases
5074 (modify-phases %standard-phases
5075 (add-before 'build 'remove-bnd-dependency
5076 (lambda _
5077 ;; This file is the only one to require bnd, and is not needed
5078 ;; because we don't build a bundle.
5079 (delete-file "src/org/objectweb/asm/tools/ModuleInfoBndPlugin.java")
5080 #t))
5081 (add-before 'install 'build-jars
5082 (lambda* (#:key make-flags #:allow-other-keys)
5083 ;; We cannot use the "jar" target because it depends on a couple
5084 ;; of unpackaged, complicated tools.
5085 (mkdir "dist")
5086 (invoke "jar"
5087 "-cf" (string-append "dist/asm-" ,version ".jar")
5088 "-C" "output/build/tmp" ".")))
5089 (add-before 'install 'fix-pom
5090 (lambda _
5091 (substitute* (find-files "archive" "\\.pom$")
5092 (("@product.artifact@") ,version))
5093 #t))
5094 (add-before 'install 'install-parent
5095 (install-pom-file "archive/asm-parent.pom"))
5096 (replace 'install
5097 (install-from-pom "archive/asm.pom")))))
5098 (native-inputs
5099 `(("java-junit" ,java-junit)))
5100 (propagated-inputs
5101 `(("java-org-ow2-parent-pom" ,java-org-ow2-parent-pom-1.3)))
5102 (home-page "https://asm.ow2.io/")
5103 (synopsis "Very small and fast Java bytecode manipulation framework")
5104 (description "ASM is an all purpose Java bytecode manipulation and
5105 analysis framework. It can be used to modify existing classes or dynamically
5106 generate classes, directly in binary form. The provided common
5107 transformations and analysis algorithms allow easily assembling custom
5108 complex transformations and code analysis tools.")
5109 (license license:bsd-3)))
5110
5111 (define java-org-ow2-parent-pom-1.3
5112 (package
5113 (name "java-org-ow2-parent-pom")
5114 (version "1.3")
5115 (source (origin
5116 (method url-fetch)
5117 (uri "https://repo1.maven.org/maven2/org/ow2/ow2/1.3/ow2-1.3.pom")
5118 (sha256
5119 (base32
5120 "1yr8hfx8gffpppa4ii6cvrsq029a6x8hzy7nsavxhs60s9kmq8ai"))))
5121 (build-system ant-build-system)
5122 (arguments
5123 `(#:tests? #f
5124 #:phases
5125 (modify-phases %standard-phases
5126 (delete 'unpack)
5127 (delete 'build)
5128 (delete 'configure)
5129 (replace 'install
5130 (install-pom-file (assoc-ref %build-inputs "source"))))))
5131 (home-page "https://ow2.org")
5132 (synopsis "Ow2.org parent pom")
5133 (description "This package contains the parent pom for projects from ow2.org,
5134 including java-asm.")
5135 (license license:lgpl2.1+)))
5136
5137 (define java-asm-bootstrap
5138 (package
5139 (inherit java-asm)
5140 (name "java-asm-bootstrap")
5141 (arguments
5142 (substitute-keyword-arguments (package-arguments java-asm)
5143 ((#:tests? _) #f)))
5144 (native-inputs `())))
5145
5146 (define-public java-asm-8
5147 (package
5148 (inherit java-asm)
5149 (version "8.0.1")
5150 (source (origin
5151 (method git-fetch)
5152 (uri (git-reference
5153 (url "https://gitlab.ow2.org/asm/asm")
5154 (commit (string-append
5155 "ASM_" (string-join (string-split version #\.)
5156 "_")))))
5157 (file-name (git-file-name "java-asm" version))
5158 (sha256
5159 (base32
5160 "1s6j27zc1i76gh891w2g48b1c3abp9w8zp5j54yb1vm5h8djkd69"))))
5161 (arguments
5162 `(#:jar-name "asm8.jar"
5163 #:source-dir "asm/src/main/java"
5164 #:test-dir "asm/src/test"
5165 ;; tests depend on junit5
5166 #:tests? #f))
5167 (propagated-inputs '())
5168 (native-inputs '())))
5169
5170 (define-public java-asm-tree-8
5171 (package
5172 (inherit java-asm-8)
5173 (name "java-asm-tree")
5174 (arguments
5175 `(#:jar-name "asm-tree.jar"
5176 #:source-dir "asm-tree/src/main/java"
5177 #:test-dir "asm-tree/src/test"
5178 ;; tests depend on junit5
5179 #:tests? #f))
5180 (inputs
5181 `(("java-asm" ,java-asm-8)))))
5182
5183 (define-public java-asm-analysis-8
5184 (package
5185 (inherit java-asm-8)
5186 (name "java-asm-analysis")
5187 (arguments
5188 `(#:jar-name "asm-analysis.jar"
5189 #:source-dir "asm-analysis/src/main/java"
5190 #:test-dir "asm-analysis/src/test"
5191 ;; tests depend on junit5
5192 #:tests? #f))
5193 (inputs
5194 `(("java-asm" ,java-asm-8)
5195 ("java-asm-tree" ,java-asm-tree-8)))))
5196
5197 (define-public java-asm-util-8
5198 (package
5199 (inherit java-asm-8)
5200 (name "java-asm-util")
5201 (arguments
5202 `(#:jar-name "asm-util8.jar"
5203 #:source-dir "asm-util/src/main/java"
5204 #:test-dir "asm-util/src/test"
5205 ;; tests depend on junit5
5206 #:tests? #f))
5207 (inputs
5208 `(("java-asm" ,java-asm-8)
5209 ("java-asm-analysis" ,java-asm-analysis-8)
5210 ("java-asm-tree" ,java-asm-tree-8)))))
5211
5212 (define-public java-cglib
5213 (package
5214 (name "java-cglib")
5215 (version "3.2.4")
5216 (source
5217 (origin
5218 (method git-fetch)
5219 (uri (git-reference
5220 (url "https://github.com/cglib/cglib")
5221 (commit (string-append
5222 "RELEASE_"
5223 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
5224 version)))))
5225 (file-name (git-file-name name version))
5226 (sha256
5227 (base32 "186451jms2zfp47yd8kxd77az2cqal1my2br7klgyp8fpl4qfg8v"))))
5228 (build-system ant-build-system)
5229 (arguments
5230 `(;; FIXME: tests fail because junit runs
5231 ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem
5232 ;; to describe a test at all.
5233 #:tests? #f
5234 #:jar-name "cglib.jar"
5235 #:phases
5236 (modify-phases %standard-phases
5237 (add-after 'unpack 'chdir
5238 (lambda _ (chdir "cglib") #t)))))
5239 (inputs
5240 `(("java-asm" ,java-asm)
5241 ("java-junit" ,java-junit)))
5242 (home-page "https://github.com/cglib/cglib/")
5243 (synopsis "Java byte code generation library")
5244 (description "The byte code generation library CGLIB is a high level API
5245 to generate and transform Java byte code.")
5246 (license license:asl2.0)))
5247
5248 (define-public java-objenesis
5249 (package
5250 (name "java-objenesis")
5251 (version "2.5.1")
5252 (source (origin
5253 (method git-fetch)
5254 (uri (git-reference
5255 (url "https://github.com/easymock/objenesis")
5256 (commit version)))
5257 (file-name (git-file-name name version))
5258 (sha256
5259 (base32
5260 "054yi200wj00x6dp1sxfrwgndwywadsbn8d8ij1j0v45j9g2vdya"))))
5261 (build-system ant-build-system)
5262 (arguments
5263 `(#:jar-name "objenesis.jar"
5264 #:source-dir "main/src/"
5265 #:test-dir "main/src/test/"))
5266 (native-inputs
5267 `(("java-junit" ,java-junit)
5268 ("java-hamcrest-core" ,java-hamcrest-core)))
5269 (home-page "http://objenesis.org/")
5270 (synopsis "Bypass the constructor when creating an object")
5271 (description "Objenesis is a small Java library that serves one purpose:
5272 to instantiate a new object of a particular class. It is common to see
5273 restrictions in libraries stating that classes must require a default
5274 constructor. Objenesis aims to overcome these restrictions by bypassing the
5275 constructor on object instantiation.")
5276 (license license:asl2.0)))
5277
5278 (define-public java-easymock
5279 (package
5280 (name "java-easymock")
5281 (version "3.4")
5282 (source (origin
5283 (method git-fetch)
5284 (uri (git-reference
5285 (url "https://github.com/easymock/easymock/")
5286 (commit (string-append "easymock-" version))))
5287 (file-name (git-file-name name version))
5288 (sha256
5289 (base32
5290 "02vybm8hc0i0n9sp2f2iiqn54zwqhq835f76wc6b2m7819z5a8dq"))))
5291 (build-system ant-build-system)
5292 (arguments
5293 `(#:jar-name "easymock.jar"
5294 #:source-dir "core/src/main"
5295 #:test-dir "core/src/test"
5296 #:phases
5297 (modify-phases %standard-phases
5298 ;; FIXME: Android support requires the following packages to be
5299 ;; available: com.google.dexmaker.stock.ProxyBuilder
5300 (add-after 'unpack 'delete-android-support
5301 (lambda _
5302 (with-directory-excursion "core/src/main/java/org/easymock/internal"
5303 (substitute* "MocksControl.java"
5304 (("AndroidSupport.isAndroid\\(\\)") "false")
5305 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
5306 (delete-file "AndroidClassProxyFactory.java"))
5307 #t))
5308 (add-after 'unpack 'delete-broken-tests
5309 (lambda _
5310 (with-directory-excursion "core/src/test/java/org/easymock"
5311 ;; This test depends on dexmaker.
5312 (delete-file "tests2/ClassExtensionHelperTest.java")
5313
5314 ;; This is not a test.
5315 (delete-file "tests/BaseEasyMockRunnerTest.java")
5316
5317 ;; This test should be executed with a different runner...
5318 (delete-file "tests2/EasyMockAnnotationsTest.java")
5319 ;; ...but deleting it means that we also have to delete these
5320 ;; dependent files.
5321 (delete-file "tests2/EasyMockRunnerTest.java")
5322 (delete-file "tests2/EasyMockRuleTest.java")
5323
5324 ;; This test fails because the file "easymock.properties" does
5325 ;; not exist.
5326 (delete-file "tests2/EasyMockPropertiesTest.java"))
5327 #t)))))
5328 (inputs
5329 `(("java-asm" ,java-asm)
5330 ("java-cglib" ,java-cglib)
5331 ("java-objenesis" ,java-objenesis)))
5332 (native-inputs
5333 `(("java-junit" ,java-junit)
5334 ("java-hamcrest-core" ,java-hamcrest-core)))
5335 (home-page "https://easymock.org/")
5336 (synopsis "Java library providing mock objects for unit tests")
5337 (description "EasyMock is a Java library that provides an easy way to use
5338 mock objects in unit testing.")
5339 (license license:asl2.0)))
5340
5341 (define-public java-jmock-1
5342 (package
5343 (name "java-jmock")
5344 (version "1.2.0")
5345 (source (origin
5346 (method git-fetch)
5347 (uri (git-reference
5348 (url "https://github.com/jmock-developers/jmock-library")
5349 (commit version)))
5350 (file-name (git-file-name name version))
5351 (sha256
5352 (base32
5353 "0lkga995xd9b9mmzxmcd301hlw83p1h78nibh7djlx7wydscr85z"))))
5354 (build-system ant-build-system)
5355 (arguments
5356 `(#:build-target "jars"
5357 #:test-target "run.tests"
5358 #:phases
5359 (modify-phases %standard-phases
5360 (replace 'install (install-jars "build")))))
5361 (home-page "http://jmock.org/")
5362 (synopsis "Mock object library for test-driven development")
5363 (description "JMock is a library that supports test-driven development of
5364 Java code with mock objects. Mock objects help you design and test the
5365 interactions between the objects in your programs.
5366
5367 The jMock library
5368
5369 @itemize
5370 @item makes it quick and easy to define mock objects
5371 @item lets you precisely specify the interactions between
5372 your objects, reducing the brittleness of your tests
5373 @item plugs into your favourite test framework
5374 @item is easy to extend.
5375 @end itemize\n")
5376 (license license:bsd-3)))
5377
5378 (define-public java-jmock
5379 (package
5380 (inherit java-jmock-1)
5381 (name "java-jmock")
5382 (version "2.8.2")
5383 (source (origin
5384 (method git-fetch)
5385 (uri (git-reference
5386 (url "https://github.com/jmock-developers/jmock-library")
5387 (commit version)))
5388 (file-name (git-file-name name version))
5389 (sha256
5390 (base32
5391 "12b7l22g3nrjvf2dzcw3z03fpd2chrgp0d8xkvn8w55rwb57pax6"))))
5392 (inputs
5393 `(("java-hamcrest-all" ,java-hamcrest-all)
5394 ("java-asm" ,java-asm)
5395 ("java-bsh" ,java-bsh)
5396 ("java-junit" ,java-junit)))
5397 (native-inputs
5398 `(("cglib" ,java-cglib)))
5399 (arguments
5400 `(#:jar-name "java-jmock.jar"
5401 #:source-dir "jmock/src/main/java"
5402 #:test-dir "jmock/src/test"))))
5403
5404 (define-public java-jmock-junit4
5405 (package
5406 (inherit java-jmock)
5407 (name "java-jmock-junit4")
5408 (arguments
5409 `(#:jar-name "java-jmock-junit4.jar"
5410 #:source-dir "jmock-junit4/src/main/java"
5411 #:test-dir "jmock-junit4/src/test"))
5412 (inputs
5413 `(("java-hamcrest-all" ,java-hamcrest-all)
5414 ("java-asm" ,java-asm)
5415 ("java-bsh" ,java-bsh)
5416 ("java-jmock" ,java-jmock)
5417 ("java-jumit" ,java-junit)))))
5418
5419 (define-public java-jmock-legacy
5420 (package
5421 (inherit java-jmock)
5422 (name "java-jmock-legacy")
5423 (arguments
5424 `(#:jar-name "java-jmock-legacy.jar"
5425 #:source-dir "jmock-legacy/src/main/java"
5426 #:test-dir "jmock-legacy/src/test"
5427 #:phases
5428 (modify-phases %standard-phases
5429 (add-before 'check 'copy-tests
5430 (lambda _
5431 ;; This file is a dependancy of some tests
5432 (let ((file "org/jmock/test/acceptance/PackageProtectedType.java"))
5433 (copy-file (string-append "jmock/src/test/java/" file)
5434 (string-append "jmock-legacy/src/test/java/" file))
5435 #t))))))
5436 (inputs
5437 `(("java-hamcrest-all" ,java-hamcrest-all)
5438 ("java-objenesis" ,java-objenesis)
5439 ("java-cglib" ,java-cglib)
5440 ("java-jmock" ,java-jmock)
5441 ("java-asm" ,java-asm)
5442 ("java-bsh" ,java-bsh)
5443 ("java-junit" ,java-junit)))
5444 (native-inputs
5445 `(("java-jmock-junit4" ,java-jmock-junit4)))))
5446
5447 (define-public java-hamcrest-all
5448 (package (inherit java-hamcrest-core)
5449 (name "java-hamcrest-all")
5450 (arguments
5451 `(#:jdk ,icedtea-8
5452 ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core)
5453 ((#:build-target _) "bigjar")
5454 ((#:phases phases)
5455 `(modify-phases ,phases
5456 ;; Some build targets override the classpath, so we need to patch
5457 ;; the build.xml to ensure that required dependencies are on the
5458 ;; classpath.
5459 (add-after 'unpack 'patch-classpath-for-integration
5460 (lambda* (#:key inputs #:allow-other-keys)
5461 (substitute* "build.xml"
5462 ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
5463 (string-join
5464 (cons line
5465 (append
5466 (find-files (assoc-ref inputs "java-junit") "\\.jar$")
5467 (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
5468 (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
5469 ";"))
5470 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
5471 (car (find-files (assoc-ref inputs "java-hamcrest-core")
5472 "jar$"))))
5473 #t))
5474 (replace 'install
5475 (lambda* (#:key outputs #:allow-other-keys)
5476 (let* ((target (string-append (assoc-ref outputs "out")
5477 "/share/java/"))
5478 (version-suffix
5479 ,(string-append
5480 "-" (package-version java-hamcrest-core) ".jar"))
5481 (install-without-version-suffix
5482 (lambda (jar)
5483 (copy-file jar
5484 (string-append target
5485 (basename jar version-suffix)
5486 ".jar")))))
5487 (mkdir-p target)
5488 (for-each
5489 install-without-version-suffix
5490 (find-files "build"
5491 (lambda (name _)
5492 (and (string-suffix? ".jar" name)
5493 (not (string-suffix? "-sources.jar" name)))))))
5494 #t)))))))
5495 (inputs
5496 `(("java-junit" ,java-junit)
5497 ("java-jmock" ,java-jmock-1)
5498 ;; This is necessary because of what seems to be a race condition.
5499 ;; This package would sometimes fail to build because hamcrest-core.jar
5500 ;; could not be found, even though it is built as part of this package.
5501 ;; Adding java-hamcrest-core appears to fix this problem. See
5502 ;; https://debbugs.gnu.org/31390 for more information.
5503 ("java-hamcrest-core" ,java-hamcrest-core)
5504 ("java-easymock" ,java-easymock)
5505 ,@(package-inputs java-hamcrest-core)))))
5506
5507 (define-public java-jopt-simple
5508 (package
5509 (name "java-jopt-simple")
5510 (version "5.0.3")
5511 (source (origin
5512 (method url-fetch)
5513 (uri (string-append "http://repo1.maven.org/maven2/"
5514 "net/sf/jopt-simple/jopt-simple/"
5515 version "/jopt-simple-"
5516 version "-sources.jar"))
5517 (sha256
5518 (base32
5519 "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa"))))
5520 (build-system ant-build-system)
5521 (arguments
5522 `(#:tests? #f ; there are no tests
5523 #:jar-name "jopt-simple.jar"))
5524 (home-page "https://pholser.github.io/jopt-simple/")
5525 (synopsis "Java library for parsing command line options")
5526 (description "JOpt Simple is a Java library for parsing command line
5527 options, such as those you might pass to an invocation of @code{javac}. In
5528 the interest of striving for simplicity, as closely as possible JOpt Simple
5529 attempts to honor the command line option syntaxes of POSIX @code{getopt} and
5530 GNU @code{getopt_long}. It also aims to make option parser configuration and
5531 retrieval of options and their arguments simple and expressive, without being
5532 overly clever.")
5533 (license license:expat)))
5534
5535 (define-public java-commons-math3
5536 (package
5537 (name "java-commons-math3")
5538 (version "3.6.1")
5539 (source (origin
5540 (method url-fetch)
5541 (uri (string-append "mirror://apache/commons/math/source/"
5542 "commons-math3-" version "-src.tar.gz"))
5543 (sha256
5544 (base32
5545 "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6"))))
5546 (build-system ant-build-system)
5547 (arguments
5548 `(#:build-target "jar"
5549 #:test-target "test"
5550 #:make-flags
5551 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
5552 (junit (assoc-ref %build-inputs "java-junit")))
5553 (list (string-append "-Djunit.jar="
5554 (car (find-files junit "jar$")))
5555 (string-append "-Dhamcrest.jar="
5556 (car (find-files hamcrest ".*.jar$")))))
5557 #:phases
5558 (modify-phases %standard-phases
5559 ;; We want to build the jar in the build phase and run the tests
5560 ;; later in a separate phase.
5561 (add-after 'unpack 'untangle-targets
5562 (lambda _
5563 (substitute* "build.xml"
5564 (("name=\"jar\" depends=\"test\"")
5565 "name=\"jar\" depends=\"compile\""))
5566 #t))
5567 ;; There is no install target.
5568 (replace 'install
5569 (install-jars "target")))))
5570 (native-inputs
5571 `(("java-junit" ,java-junit)
5572 ("java-hamcrest-core" ,java-hamcrest-core)))
5573 (home-page "https://commons.apache.org/math/")
5574 (synopsis "Apache Commons mathematics library")
5575 (description "Commons Math is a library of lightweight, self-contained
5576 mathematics and statistics components addressing the most common problems not
5577 available in the Java programming language or Commons Lang.")
5578 (license license:asl2.0)))
5579
5580 (define-public java-jmh
5581 (package
5582 (name "java-jmh")
5583 (version "1.17.5")
5584 (source (origin
5585 (method hg-fetch)
5586 (uri (hg-reference
5587 (url "http://hg.openjdk.java.net/code-tools/jmh/")
5588 (changeset version)))
5589 (file-name (string-append name "-" version "-checkout"))
5590 (sha256
5591 (base32
5592 "1fxyxhg9famwcg1prc4cgwb5wzyxqavn3cjm5vz8605xz7x5k084"))))
5593 (build-system ant-build-system)
5594 (arguments
5595 `(#:jar-name "jmh-core.jar"
5596 #:source-dir "jmh-core/src/main"
5597 #:test-dir "jmh-core/src/test"
5598 #:phases
5599 (modify-phases %standard-phases
5600 ;; This seems to be a bug in the JDK. It may not be necessary in
5601 ;; future versions of the JDK.
5602 (add-after 'unpack 'fix-bug
5603 (lambda _
5604 (with-directory-excursion
5605 "jmh-core/src/main/java/org/openjdk/jmh/runner/options"
5606 (substitute* '("IntegerValueConverter.java"
5607 "ThreadsValueConverter.java")
5608 (("public Class<Integer> valueType")
5609 "public Class<? extends Integer> valueType")))
5610 #t)))))
5611 (inputs
5612 `(("java-jopt-simple" ,java-jopt-simple)
5613 ("java-commons-math3" ,java-commons-math3)))
5614 (native-inputs
5615 `(("java-junit" ,java-junit)
5616 ("java-hamcrest-core" ,java-hamcrest-core)))
5617 (home-page "https://openjdk.java.net/projects/code-tools/jmh/")
5618 (synopsis "Benchmark harness for the JVM")
5619 (description "JMH is a Java harness for building, running, and analysing
5620 nano/micro/milli/macro benchmarks written in Java and other languages
5621 targeting the JVM.")
5622 ;; GPLv2 only
5623 (license license:gpl2)))
5624
5625 (define-public java-commons-collections4
5626 (package
5627 (name "java-commons-collections4")
5628 (version "4.1")
5629 (source (origin
5630 (method url-fetch)
5631 (uri (string-append "mirror://apache/commons/collections/source/"
5632 "commons-collections4-" version "-src.tar.gz"))
5633 (sha256
5634 (base32
5635 "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl"))))
5636 (build-system ant-build-system)
5637 (arguments
5638 `(#:test-target "test"
5639 #:make-flags
5640 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
5641 (junit (assoc-ref %build-inputs "java-junit"))
5642 (easymock (assoc-ref %build-inputs "java-easymock")))
5643 (list (string-append "-Djunit.jar="
5644 (car (find-files junit "jar$")))
5645 (string-append "-Dhamcrest.jar="
5646 (car (find-files hamcrest "jar$")))
5647 (string-append "-Deasymock.jar=" easymock
5648 "/share/java/easymock.jar")))
5649 #:phases
5650 (modify-phases %standard-phases
5651 (replace 'install
5652 (install-jars "target")))))
5653 (native-inputs
5654 `(("java-junit" ,java-junit)
5655 ("java-hamcrest-core" ,java-hamcrest-core)
5656 ("java-easymock" ,java-easymock)))
5657 (home-page "https://commons.apache.org/collections/")
5658 (synopsis "Collections framework")
5659 (description "The Java Collections Framework is the recognised standard
5660 for collection handling in Java. Commons-Collections seek to build upon the
5661 JDK classes by providing new interfaces, implementations and utilities. There
5662 are many features, including:
5663
5664 @itemize
5665 @item @code{Bag} interface for collections that have a number of copies of
5666 each object
5667 @item @code{BidiMap} interface for maps that can be looked up from value to
5668 key as well and key to value
5669 @item @code{MapIterator} interface to provide simple and quick iteration over
5670 maps
5671 @item Transforming decorators that alter each object as it is added to the
5672 collection
5673 @item Composite collections that make multiple collections look like one
5674 @item Ordered maps and sets that retain the order elements are added in,
5675 including an LRU based map
5676 @item Reference map that allows keys and/or values to be garbage collected
5677 under close control
5678 @item Many comparator implementations
5679 @item Many iterator implementations
5680 @item Adapter classes from array and enumerations to collections
5681 @item Utilities to test or create typical set-theory properties of collections
5682 such as union, intersection, and closure.
5683 @end itemize\n")
5684 (license license:asl2.0)))
5685
5686 (define-public java-commons-collections
5687 (package
5688 (inherit java-commons-collections4)
5689 (name "java-commons-collections")
5690 (version "3.2.2")
5691 (source (origin
5692 (method url-fetch)
5693 (uri (string-append "mirror://apache/commons/collections/source/"
5694 "commons-collections-" version "-src.tar.gz"))
5695 (sha256
5696 (base32
5697 "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387"))
5698 (patches
5699 (search-patches "java-commons-collections-fix-java8.patch"))))
5700 (arguments
5701 (substitute-keyword-arguments (package-arguments java-commons-collections4)
5702 ((#:phases phases)
5703 `(modify-phases ,phases
5704 ;; The manifest is required by the build procedure
5705 (add-before 'build 'add-manifest
5706 (lambda _
5707 (mkdir-p "build/conf")
5708 (call-with-output-file "build/conf/MANIFEST.MF"
5709 (lambda (file)
5710 (format file "Manifest-Version: 1.0\n")))
5711 #t))
5712 (replace 'install
5713 (install-jars "build"))))))))
5714
5715 (define java-commons-collections-test-classes
5716 (package
5717 (inherit java-commons-collections)
5718 (arguments
5719 `(#:jar-name "commons-collections-test-classes.jar"
5720 #:source-dir "src/test"
5721 #:tests? #f))
5722 (inputs
5723 `(("collection" ,java-commons-collections)))))
5724
5725 (define-public java-commons-beanutils
5726 (package
5727 (name "java-commons-beanutils")
5728 (version "1.9.3")
5729 (source (origin
5730 (method url-fetch)
5731 (uri (string-append "mirror://apache/commons/beanutils/source/"
5732 "commons-beanutils-" version "-src.tar.gz"))
5733 (sha256
5734 (base32
5735 "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk"))))
5736 (build-system ant-build-system)
5737 (arguments
5738 `(#:test-target "test"
5739 #:tests? #f
5740 #:phases
5741 (modify-phases %standard-phases
5742 (replace 'install
5743 (lambda* (#:key outputs #:allow-other-keys)
5744 (rename-file (string-append "dist/commons-beanutils-" ,version
5745 "-SNAPSHOT.jar")
5746 "commons-beanutils.jar")
5747 (install-file "commons-beanutils.jar"
5748 (string-append (assoc-ref outputs "out") "/share/java/"))
5749 #t)))))
5750 (inputs
5751 `(("logging" ,java-commons-logging-minimal)
5752 ("collections" ,java-commons-collections)))
5753 (native-inputs
5754 `(("junit" ,java-junit)
5755 ("collections-test" ,java-commons-collections-test-classes)))
5756 (home-page "https://commons.apache.org/beanutils/")
5757 (synopsis "Dynamically set or get properties in Java")
5758 (description "BeanUtils provides a simplified interface to reflection and
5759 introspection to set or get dynamically determined properties through their
5760 setter and getter method.")
5761 (license license:asl2.0)))
5762
5763 (define-public java-commons-io
5764 (package
5765 (name "java-commons-io")
5766 (version "2.5")
5767 (source
5768 (origin
5769 (method url-fetch)
5770 (uri (string-append "mirror://apache/commons/io/source/"
5771 "commons-io-" version "-src.tar.gz"))
5772 (sha256
5773 (base32
5774 "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3"))))
5775 (build-system ant-build-system)
5776 (outputs '("out" "doc"))
5777 (arguments
5778 `(#:test-target "test"
5779 #:make-flags
5780 (list (string-append "-Djunit.jar="
5781 (car (find-files (assoc-ref %build-inputs "java-junit")
5782 "jar$"))))
5783 #:phases
5784 (modify-phases %standard-phases
5785 (add-after 'build 'build-javadoc ant-build-javadoc)
5786 (replace 'install (install-from-pom "pom.xml"))
5787 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
5788 (native-inputs
5789 `(("java-junit" ,java-junit)
5790 ("java-hamcrest-core" ,java-hamcrest-core)))
5791 (propagated-inputs
5792 `(("apache-commons-parent-pom" ,apache-commons-parent-pom-39)))
5793 (home-page "https://commons.apache.org/io/")
5794 (synopsis "Common useful IO related classes")
5795 (description "Commons-IO contains utility classes, stream implementations,
5796 file filters and endian classes.")
5797 (license license:asl2.0)))
5798
5799 (define-public java-commons-exec-1.1
5800 (package
5801 (name "java-commons-exec")
5802 (version "1.1")
5803 (source
5804 (origin
5805 (method url-fetch)
5806 (uri (string-append "mirror://apache/commons/exec/source/"
5807 "commons-exec-" version "-src.tar.gz"))
5808 (sha256
5809 (base32
5810 "025dk8xgj10lxwwwqp0hng2rn7fr4vcirxzydqzx9k4dim667alk"))))
5811 (build-system ant-build-system)
5812 (arguments
5813 `(#:test-target "test"
5814 #:make-flags
5815 (list (string-append "-Dmaven.junit.jar="
5816 (car (find-files (assoc-ref %build-inputs "java-junit")
5817 "jar$"))))
5818 #:phases
5819 (modify-phases %standard-phases
5820 (add-before 'build 'delete-network-tests
5821 (lambda _
5822 (delete-file "src/test/java/org/apache/commons/exec/DefaultExecutorTest.java")
5823 (substitute* "src/test/java/org/apache/commons/exec/TestRunner.java"
5824 (("suite\\.addTestSuite\\(DefaultExecutorTest\\.class\\);") ""))
5825 #t))
5826 ;; The "build" phase automatically tests.
5827 (delete 'check)
5828 (replace 'install (install-jars "target")))))
5829 (native-inputs
5830 `(("java-junit" ,java-junit)))
5831 (home-page "https://commons.apache.org/proper/commons-exec/")
5832 (synopsis "Common program execution related classes")
5833 (description "Commons-Exec simplifies executing external processes.")
5834 (license license:asl2.0)))
5835
5836 (define-public java-commons-exec
5837 (package
5838 (inherit java-commons-exec-1.1)
5839 (version "1.3")
5840 (source
5841 (origin
5842 (method url-fetch)
5843 (uri (string-append "mirror://apache/commons/exec/source/"
5844 "commons-exec-" version "-src.tar.gz"))
5845 (sha256
5846 (base32
5847 "17yb4h6f8l49c5iyyvda4z2nmw0bxrx857nrwmsr7mmpb7x441yv"))))
5848 (arguments
5849 `(#:test-target "test"
5850 #:make-flags
5851 (list (string-append "-Dmaven.junit.jar="
5852 (car (find-files (assoc-ref %build-inputs "java-junit")
5853 "jar$")))
5854 "-Dmaven.compiler.source=1.7"
5855 "-Dmaven.compiler.target=1.7")
5856 #:phases
5857 (modify-phases %standard-phases
5858 (add-before 'build 'delete-network-tests
5859 (lambda* (#:key inputs #:allow-other-keys)
5860 ;; This test hangs indefinitely.
5861 (delete-file "src/test/java/org/apache/commons/exec/issues/Exec60Test.java")
5862 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec41Test.java"
5863 (("ping -c 10 127.0.0.1") "sleep 10"))
5864 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec49Test.java"
5865 (("/bin/ls") "ls"))
5866 (call-with-output-file "src/test/scripts/ping.sh"
5867 (lambda (port)
5868 (format port "#!~a/bin/sh\nsleep $1\n"
5869 (assoc-ref inputs "bash"))))
5870 #t))
5871 ;; The "build" phase automatically tests.
5872 (delete 'check)
5873 (replace 'install (install-jars "target")))))
5874 (native-inputs
5875 `(("java-junit" ,java-junit)
5876 ("java-hamcrest-core" ,java-hamcrest-core)))))
5877
5878 (define-public java-commons-lang
5879 (package
5880 (name "java-commons-lang")
5881 (version "2.6")
5882 (source
5883 (origin
5884 (method url-fetch)
5885 (uri (string-append "mirror://apache/commons/lang/source/"
5886 "commons-lang-" version "-src.tar.gz"))
5887 (sha256
5888 (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5"))))
5889 (build-system ant-build-system)
5890 (outputs '("out" "doc"))
5891 (arguments
5892 `(#:test-target "test"
5893 #:test-exclude (list "**/Abstract*.java" "**/Random*.java")
5894 #:phases
5895 (modify-phases %standard-phases
5896 (add-after 'build 'build-javadoc ant-build-javadoc)
5897 (add-before 'check 'disable-failing-test
5898 (lambda _
5899 ;; Disable a failing test
5900 (substitute* "src/test/java/org/apache/commons/lang/\
5901 time/FastDateFormatTest.java"
5902 (("public void testFormat\\(\\)")
5903 "public void disabled_testFormat()"))
5904 #t))
5905 (replace 'install (install-jars "target"))
5906 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
5907 (native-inputs
5908 `(("java-junit" ,java-junit)))
5909 (home-page "https://commons.apache.org/lang/")
5910 (synopsis "Extension of the java.lang package")
5911 (description "The Commons Lang components contains a set of Java classes
5912 that provide helper methods for standard Java classes, especially those found
5913 in the @code{java.lang} package in the Sun JDK. The following classes are
5914 included:
5915
5916 @itemize
5917 @item StringUtils - Helper for @code{java.lang.String}.
5918 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets
5919 of characters such as @code{[a-z]} and @code{[abcdez]}.
5920 @item RandomStringUtils - Helper for creating randomised strings.
5921 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
5922 @item NumberRange - A range of numbers with an upper and lower bound.
5923 @item ObjectUtils - Helper for @code{java.lang.Object}.
5924 @item SerializationUtils - Helper for serializing objects.
5925 @item SystemUtils - Utility class defining the Java system properties.
5926 @item NestedException package - A sub-package for the creation of nested
5927 exceptions.
5928 @item Enum package - A sub-package for the creation of enumerated types.
5929 @item Builder package - A sub-package for the creation of @code{equals},
5930 @code{hashCode}, @code{compareTo} and @code{toString} methods.
5931 @end itemize\n")
5932 (license license:asl2.0)))
5933
5934 (define-public java-commons-lang3
5935 (package
5936 (name "java-commons-lang3")
5937 (version "3.9")
5938 (source
5939 (origin
5940 (method url-fetch)
5941 (uri (string-append "mirror://apache/commons/lang/source/"
5942 "commons-lang3-" version "-src.tar.gz"))
5943 (sha256
5944 (base32 "0s4ffbvsyl16c90l45ximsg4dwd8hmz7wsza3p308fw43h6mwhb6"))))
5945 (build-system ant-build-system)
5946 (arguments
5947 `(#:jar-name "commons-lang3.jar"
5948 #:source-dir "src/main/java"
5949 #:tests? #f; require junit5
5950 #:phases
5951 (modify-phases %standard-phases
5952 (replace 'install (install-from-pom "pom.xml")))))
5953 (propagated-inputs
5954 `(("apache-commons-parent-pom" ,apache-commons-parent-pom-48)))
5955 (home-page "https://commons.apache.org/lang/")
5956 (synopsis "Extension of the java.lang package")
5957 (description "The Commons Lang components contains a set of Java classes
5958 that provide helper methods for standard Java classes, especially those found
5959 in the @code{java.lang} package. The following classes are included:
5960
5961 @itemize
5962 @item StringUtils - Helper for @code{java.lang.String}.
5963 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of
5964 characters such as @code{[a-z]} and @code{[abcdez]}.
5965 @item RandomStringUtils - Helper for creating randomised strings.
5966 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
5967 @item NumberRange - A range of numbers with an upper and lower bound.
5968 @item ObjectUtils - Helper for @code{java.lang.Object}.
5969 @item SerializationUtils - Helper for serializing objects.
5970 @item SystemUtils - Utility class defining the Java system properties.
5971 @item NestedException package - A sub-package for the creation of nested
5972 exceptions.
5973 @item Enum package - A sub-package for the creation of enumerated types.
5974 @item Builder package - A sub-package for the creation of @code{equals},
5975 @code{hashCode}, @code{compareTo} and @code{toString} methods.
5976 @end itemize\n")
5977 (license license:asl2.0)))
5978
5979 (define-public java-commons-bsf
5980 (package
5981 (name "java-commons-bsf")
5982 (version "2.4.0")
5983 (source (origin
5984 (method url-fetch)
5985 (uri (string-append "mirror://apache/commons/bsf/source/bsf-src-"
5986 version ".tar.gz"))
5987 (sha256
5988 (base32
5989 "1sbamr8jl32p1jgf59nw0b2w9qivyg145954hm6ly54cfgsqrdas"))
5990 (modules '((guix build utils)))
5991 (snippet
5992 '(begin
5993 (for-each delete-file
5994 (find-files "." "\\.jar$"))
5995 #t))))
5996 (build-system ant-build-system)
5997 (arguments
5998 `(#:build-target "jar"
5999 #:tests? #f; No test file
6000 #:modules ((guix build ant-build-system)
6001 (guix build utils)
6002 (guix build java-utils)
6003 (sxml simple))
6004 #:phases
6005 (modify-phases %standard-phases
6006 (add-before 'build 'create-properties
6007 (lambda _
6008 ;; This file is missing from the distribution
6009 (call-with-output-file "build-properties.xml"
6010 (lambda (port)
6011 (sxml->xml
6012 `(project (@ (basedir ".") (name "build-properties") (default ""))
6013 (property (@ (name "project.name") (value "bsf")))
6014 (property (@ (name "source.level") (value "1.5")))
6015 (property (@ (name "build.lib") (value "build/jar")))
6016 (property (@ (name "src.dir") (value "src")))
6017 (property (@ (name "tests.dir") (value "src/org/apache/bsf/test")))
6018 (property (@ (name "build.tests") (value "build/test-classes")))
6019 (property (@ (name "build.dest") (value "build/classes"))))
6020 port)))
6021 #t))
6022 (replace 'install (install-jars "build")))))
6023 (native-inputs
6024 `(("java-junit" ,java-junit)))
6025 (inputs
6026 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
6027 (home-page "https://commons.apache.org/proper/commons-bsf")
6028 (synopsis "Bean Scripting Framework")
6029 (description "The Bean Scripting Framework (BSF) is a set of Java classes
6030 which provides scripting language support within Java applications, and access
6031 to Java objects and methods from scripting languages. BSF allows one to write
6032 JSPs in languages other than Java while providing access to the Java class
6033 library. In addition, BSF permits any Java application to be implemented in
6034 part (or dynamically extended) by a language that is embedded within it. This
6035 is achieved by providing an API that permits calling scripting language engines
6036 from within Java, as well as an object registry that exposes Java objects to
6037 these scripting language engines.")
6038 (license license:asl2.0)))
6039
6040 (define-public java-commons-jxpath
6041 (package
6042 (name "java-commons-jxpath")
6043 (version "1.3")
6044 (source (origin
6045 (method url-fetch)
6046 (uri (string-append "mirror://apache/commons/jxpath/source/"
6047 "commons-jxpath-" version "-src.tar.gz"))
6048 (sha256
6049 (base32
6050 "1rpgg31ayn9fwr4bfi2i1ij0npcg79ad2fv0w9hacvawsyc42cfs"))))
6051 (build-system ant-build-system)
6052 (arguments
6053 `(#:jar-name "commons-jxpath.jar"
6054 ;; tests require more dependencies, including mockrunner which depends on old software
6055 #:tests? #f
6056 #:source-dir "src/java"))
6057 (inputs
6058 `(("servlet" ,java-classpathx-servletapi)
6059 ("java-jdom" ,java-jdom)
6060 ("java-commons-beanutils" ,java-commons-beanutils)))
6061 (native-inputs
6062 `(("java-junit" ,java-junit)))
6063 (home-page "https://commons.apache.org/jxpath/")
6064 (synopsis "Simple interpreter of an expression language called XPath.")
6065 (description "The org.apache.commons.jxpath package defines a simple
6066 interpreter of an expression language called XPath. JXPath applies XPath
6067 expressions to graphs of objects of all kinds: JavaBeans, Maps, Servlet
6068 contexts, DOM etc, including mixtures thereof.")
6069 (license license:asl2.0)))
6070
6071 (define-public java-commons-pool
6072 (package
6073 (name "java-commons-pool")
6074 (version "2.6.2")
6075 (source (origin
6076 (method url-fetch)
6077 (uri (string-append "mirror://apache/commons/pool/source/"
6078 "commons-pool2-" version "-src.tar.gz"))
6079 (sha256
6080 (base32
6081 "1fi1hgqmq01bs6azbj3sfswxzadp2r8sjjfiq6ryilz1m50kvrv6"))))
6082 (arguments
6083 `(#:jar-name "common-pool.jar"
6084 #:source-dir "src/main/java"
6085 #:test-exclude
6086 (list "**/PerformanceTest.java")))
6087 (build-system ant-build-system)
6088 (inputs
6089 `(("java-cglib" ,java-cglib)))
6090 (native-inputs
6091 `(("java-junit" ,java-junit)
6092 ("java-hamcrest-core" ,java-hamcrest-core)
6093 ("java-asm" ,java-asm)
6094 ("java-objenesis" ,java-objenesis)))
6095 (home-page "https://commons.apache.org/proper/commons-pool/")
6096 (synopsis "Object-pooling API in Java")
6097 (description "The commons-pool package provides an object-pooling API
6098 and a number of object pool implementations. This package defines a
6099 handful of pooling interfaces and some base classes that may be useful when
6100 creating new pool implementations.")
6101 (license license:asl2.0)))
6102
6103 (define-public java-commons-dbcp
6104 (package
6105 (name "java-commons-dbcp")
6106 (version "2.6.0")
6107 (source (origin
6108 (method url-fetch)
6109 (uri (string-append "mirror://apache/commons/dbcp/source/"
6110 "commons-dbcp2-" version "-src.tar.gz"))
6111 (sha256
6112 (base32
6113 "0axbvcbnf2l70fc3ybrlp3siw2w4ka9mia2pnx4py8gz54cpw3rc"))))
6114 (arguments
6115 `(#:source-dir "src/main/java"
6116 #:jar-name "java-commons-dbcp.jar"
6117 #:tests? #f)); requires apache-geronimo
6118 (inputs
6119 `(("java-commons-pool" ,java-commons-pool)
6120 ("java-commons-logging" ,java-commons-logging-minimal)
6121 ("java-jboss-transaction-api-spec" ,java-jboss-transaction-api-spec)))
6122 (native-inputs
6123 `(("java-junit" ,java-junit)))
6124 (build-system ant-build-system)
6125 (home-page "https://commons.apache.org/proper/commons-dbcp/")
6126 (synopsis "Database Connection Pool for Java")
6127 (description "Commons-dbcp allows you to share a pool of database
6128 connections between users. Creating a new connection for each user can be
6129 time consuming and even unfeasible when the number of simultaneous users is
6130 very large. This package provides a way to share a poole of connections to
6131 reduce that load.")
6132 (license license:asl2.0)))
6133
6134 (define-public java-commons-jcs
6135 (package
6136 (name "java-commons-jcs")
6137 (version "2.2.1")
6138 (source (origin
6139 (method url-fetch)
6140 (uri (string-append "mirror://apache/commons/jcs/source/"
6141 "commons-jcs-dist-" version "-src.tar.gz"))
6142 (sha256
6143 (base32
6144 "0syhq2npjbrl0azqfjm0gvash1qd5qjy4qmysxcrqjsk0nf9fa1q"))))
6145 (build-system ant-build-system)
6146 (arguments
6147 `(#:jar-name "commons-jcs.jar"
6148 #:source-dir "commons-jcs-core/src/main/java"
6149 #:test-dir "commons-jcs-core/src/test"
6150 #:tests? #f; requires hsqldb
6151 #:phases
6152 (modify-phases %standard-phases
6153 (add-before 'build 'prepare
6154 (lambda _
6155 (with-directory-excursion
6156 "commons-jcs-core/src/main/java/org/apache/commons/jcs"
6157 (substitute*
6158 "auxiliary/disk/jdbc/dsfactory/SharedPoolDataSourceFactory.java"
6159 (("commons.dbcp") "commons.dbcp2")
6160 ((".*\\.setMaxActive.*") ""))
6161 ;;; Remove dependency on velocity-tools
6162 (delete-file "admin/servlet/JCSAdminServlet.java"))
6163 #t)))))
6164 (propagated-inputs
6165 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
6166 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
6167 ("java-commons-httpclient" ,java-commons-httpclient)
6168 ("java-commons-dbcp" ,java-commons-dbcp)))
6169 (native-inputs
6170 `(("java-junit" ,java-junit)))
6171 (home-page "https://commons.apache.org/proper/commons-jcs/")
6172 (synopsis "Distributed caching system in Java")
6173 (description "JCS is a distributed caching system written in Java. It
6174 is intended to speed up applications by providing a means to manage cached
6175 data of various dynamic natures. Like any caching system, JCS is most useful
6176 for high read, low put applications. Latency times drop sharply and
6177 bottlenecks move away from the database in an effectively cached system.")
6178 (license license:asl2.0)))
6179
6180 (define-public java-jsr250
6181 (package
6182 (name "java-jsr250")
6183 (version "1.3")
6184 (source (origin
6185 (method url-fetch)
6186 (uri (string-append "https://repo1.maven.org/maven2/"
6187 "javax/annotation/javax.annotation-api/"
6188 version "/javax.annotation-api-"
6189 version "-sources.jar"))
6190 (sha256
6191 (base32
6192 "08clh8n4n9wfglf75qsqfjs6yf79f7x6hqx38cn856pksszv50kz"))))
6193 (build-system ant-build-system)
6194 (arguments
6195 `(#:tests? #f ; no tests included
6196 #:jdk ,icedtea-8
6197 #:jar-name "jsr250.jar"
6198 #:modules ((guix build ant-build-system)
6199 (guix build utils)
6200 (guix build maven pom)
6201 (guix build java-utils)
6202 (sxml simple))
6203 #:phases
6204 (modify-phases %standard-phases
6205 (add-before 'install 'create-pom
6206 (lambda _
6207 (with-output-to-file "pom.xml"
6208 (lambda _
6209 (sxml->xml
6210 `((project
6211 (modelVersion "4.0.0")
6212 (name "jsr250")
6213 (groupId "javax.annotation")
6214 (artifactId "jsr250-api")
6215 (version ,,version))))))
6216 #t))
6217 (replace 'install
6218 (install-from-pom "pom.xml")))))
6219 (home-page "https://jcp.org/en/jsr/detail?id=250")
6220 (synopsis "Security-related annotations")
6221 (description "This package provides annotations for security. It provides
6222 packages in the @code{javax.annotation} and @code{javax.annotation.security}
6223 namespaces.")
6224 ;; either cddl or gpl2 only, with classpath exception
6225 (license (list license:cddl1.0
6226 license:gpl2))))
6227
6228 (define-public java-jsr305
6229 (package
6230 (name "java-jsr305")
6231 (version "3.0.1")
6232 (source (origin
6233 (method url-fetch)
6234 (uri (string-append "https://repo1.maven.org/maven2/"
6235 "com/google/code/findbugs/"
6236 "jsr305/" version "/jsr305-"
6237 version "-sources.jar"))
6238 (sha256
6239 (base32
6240 "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n"))))
6241 (build-system ant-build-system)
6242 (arguments
6243 `(#:tests? #f ; no tests included
6244 #:jar-name "jsr305.jar"
6245 #:modules ((guix build ant-build-system)
6246 (guix build java-utils)
6247 (guix build maven pom)
6248 (guix build utils)
6249 (sxml simple))
6250 #:phases
6251 (modify-phases %standard-phases
6252 (add-before 'install 'create-pom
6253 (lambda _
6254 (with-output-to-file "pom.xml"
6255 (lambda _
6256 (sxml->xml
6257 `((project
6258 (modelVersion "4.0.0")
6259 (name "jsr305")
6260 (groupId "com.google.code.findbugs")
6261 (artifactId "jsr305")
6262 (version ,,version))))))
6263 #t))
6264 (replace 'install
6265 (install-from-pom "pom.xml")))))
6266 (home-page "http://findbugs.sourceforge.net/")
6267 (synopsis "Annotations for the static analyzer called findbugs")
6268 (description "This package provides annotations for the findbugs package.
6269 It provides packages in the @code{javax.annotations} namespace.")
6270 (license license:asl2.0)))
6271
6272 (define-public java-guava
6273 (package
6274 (name "java-guava")
6275 ;; This is the last release of Guava that can be built with Java 7.
6276 (version "20.0")
6277 (source (origin
6278 (method git-fetch)
6279 (uri (git-reference
6280 (url "https://github.com/google/guava/")
6281 (commit (string-append "v" version))))
6282 (file-name (git-file-name name version))
6283 (sha256
6284 (base32
6285 "00h5cawdjic1vind3yivzh1f58flvm1yfmhsyqwyvmbvj1vakysp"))))
6286 (build-system ant-build-system)
6287 (arguments
6288 `(#:tests? #f ; no tests included
6289 #:jar-name "guava.jar"
6290 #:source-dir "guava/src"
6291 #:phases
6292 (modify-phases %standard-phases
6293 (add-after 'unpack 'trim-sources
6294 (lambda _
6295 (with-directory-excursion "guava/src/com/google/common"
6296 ;; Remove annotations to avoid extra dependencies:
6297 ;; * "j2objc" annotations are used when converting Java to
6298 ;; Objective C;
6299 ;; * "errorprone" annotations catch common Java mistakes at
6300 ;; compile time;
6301 ;; * "IgnoreJRERequirement" is used for Android.
6302 (substitute* (find-files "." "\\.java$")
6303 (("import com.google.j2objc.*") "")
6304 (("import com.google.errorprone.annotation.*") "")
6305 (("import org.codehaus.mojo.animal_sniffer.*") "")
6306 (("@CanIgnoreReturnValue") "")
6307 (("@LazyInit") "")
6308 (("@WeakOuter") "")
6309 (("@RetainedWith") "")
6310 (("@Weak") "")
6311 (("@ForOverride") "")
6312 (("@J2ObjCIncompatible") "")
6313 (("@IgnoreJRERequirement") "")))
6314 #t))
6315 (replace 'install (install-from-pom "guava/pom.xml")))))
6316 (inputs
6317 `(("java-jsr305" ,java-jsr305)))
6318 (propagated-inputs
6319 `(("java-guava-parent-pom" ,java-guava-parent-pom)))
6320 (home-page "https://github.com/google/guava")
6321 (synopsis "Google core libraries for Java")
6322 (description "Guava is a set of core libraries that includes new
6323 collection types (such as multimap and multiset), immutable collections, a
6324 graph library, functional types, an in-memory cache, and APIs/utilities for
6325 concurrency, I/O, hashing, primitives, reflection, string processing, and much
6326 more!")
6327 (license license:asl2.0)))
6328
6329 (define java-guava-parent-pom
6330 (package
6331 (inherit java-guava)
6332 (name "java-guava-parent-pom")
6333 (arguments
6334 `(#:tests? #f
6335 #:phases
6336 (modify-phases %standard-phases
6337 (delete 'configure)
6338 (delete 'build)
6339 (replace 'install
6340 (install-pom-file "pom.xml")))))
6341 (propagated-inputs
6342 `(("java-sonatype-oss-parent-pom" ,java-sonatype-oss-parent-pom-7)))))
6343
6344 ;; The java-commons-logging package provides adapters to many different
6345 ;; logging frameworks. To avoid an excessive dependency graph we try to build
6346 ;; it with only a minimal set of adapters.
6347 (define-public java-commons-logging-minimal
6348 (package
6349 (name "java-commons-logging-minimal")
6350 (version "1.2")
6351 (source (origin
6352 (method url-fetch)
6353 (uri (string-append "mirror://apache/commons/logging/source/"
6354 "commons-logging-" version "-src.tar.gz"))
6355 (sha256
6356 (base32
6357 "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9"))))
6358 (build-system ant-build-system)
6359 (arguments
6360 `(#:tests? #f ; avoid dependency on logging frameworks
6361 #:jar-name "commons-logging-minimal.jar"
6362 #:phases
6363 (modify-phases %standard-phases
6364 (add-after 'unpack 'delete-adapters-and-tests
6365 (lambda _
6366 ;; Delete all adapters except for NoOpLog, SimpleLog, and
6367 ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl
6368 ;; is used by applications; SimpleLog is the only actually usable
6369 ;; implementation that does not depend on another logging
6370 ;; framework.
6371 (for-each
6372 (lambda (file)
6373 (delete-file (string-append
6374 "src/main/java/org/apache/commons/logging/impl/" file)))
6375 (list "Jdk13LumberjackLogger.java"
6376 "WeakHashtable.java"
6377 "Log4JLogger.java"
6378 "ServletContextCleaner.java"
6379 "Jdk14Logger.java"
6380 "AvalonLogger.java"
6381 "LogKitLogger.java"))
6382 (delete-file-recursively "src/test")
6383 #t)))))
6384 (home-page "https://commons.apache.org/logging/")
6385 (synopsis "Common API for logging implementations")
6386 (description "The Logging package is a thin bridge between different
6387 logging implementations. A library that uses the commons-logging API can be
6388 used with any logging implementation at runtime.")
6389 (license license:asl2.0)))
6390
6391 ;; This is the last release of the 1.x series.
6392 (define-public java-mockito-1
6393 (package
6394 (name "java-mockito")
6395 (version "1.10.19")
6396 (source (origin
6397 (method url-fetch)
6398 (uri (string-append "http://repo1.maven.org/maven2/"
6399 "org/mockito/mockito-core/" version
6400 "/mockito-core-" version "-sources.jar"))
6401 (sha256
6402 (base32
6403 "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc"))))
6404 (build-system ant-build-system)
6405 (arguments
6406 `(#:jar-name "mockito.jar"
6407 #:tests? #f ; no tests included
6408 ;; FIXME: patch-and-repack does not support jars, so we have to apply
6409 ;; patches in build phases.
6410 #:phases
6411 (modify-phases %standard-phases
6412 ;; Mockito was developed against a different version of hamcrest,
6413 ;; which does not require matcher implementations to provide an
6414 ;; implementation of the "describeMismatch" method. We add this
6415 ;; simple definition to pass the build with our version of hamcrest.
6416 (add-after 'unpack 'fix-hamcrest-build-error
6417 (lambda _
6418 (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java"
6419 (("public Matcher getActualMatcher\\(\\) .*" line)
6420 (string-append "
6421 public void describeMismatch(Object item, Description description) {
6422 actualMatcher.describeMismatch(item, description);
6423 }"
6424 line)))
6425 #t))
6426 ;; Mockito bundles cglib. We have a cglib package, so let's use
6427 ;; that instead.
6428 (add-after 'unpack 'use-system-libraries
6429 (lambda _
6430 (with-directory-excursion "src/org/mockito/internal/creation/cglib"
6431 (substitute* '("CGLIBHacker.java"
6432 "CglibMockMaker.java"
6433 "ClassImposterizer.java"
6434 "DelegatingMockitoMethodProxy.java"
6435 "MethodInterceptorFilter.java"
6436 "MockitoNamingPolicy.java"
6437 "SerializableMockitoMethodProxy.java"
6438 "SerializableNoOp.java")
6439 (("import org.mockito.cglib") "import net.sf.cglib")))
6440 #t)))))
6441 (inputs
6442 `(("java-junit" ,java-junit)
6443 ("java-objenesis" ,java-objenesis)
6444 ("java-cglib" ,java-cglib)
6445 ("java-hamcrest-core" ,java-hamcrest-core)))
6446 (home-page "http://mockito.org")
6447 (synopsis "Mockito is a mock library for Java")
6448 (description "Mockito is a mocking library for Java which lets you write
6449 tests with a clean and simple API. It generates mocks using reflection, and
6450 it records all mock invocations, including methods arguments.")
6451 (license license:asl2.0)))
6452
6453 (define-public java-httpcomponents-httpcore
6454 (package
6455 (name "java-httpcomponents-httpcore")
6456 (version "4.4.6")
6457 (source (origin
6458 (method url-fetch)
6459 (uri (string-append "mirror://apache//httpcomponents/httpcore/"
6460 "source/httpcomponents-core-"
6461 version "-src.tar.gz"))
6462 (sha256
6463 (base32
6464 "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy"))))
6465 (build-system ant-build-system)
6466 (arguments
6467 `(#:jar-name "httpcomponents-httpcore.jar"
6468 #:phases
6469 (modify-phases %standard-phases
6470 (add-after 'unpack 'chdir
6471 (lambda _ (chdir "httpcore") #t)))))
6472 (inputs
6473 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
6474 ("java-commons-lang3" ,java-commons-lang3)))
6475 (native-inputs
6476 `(("java-junit" ,java-junit)
6477 ("java-mockito" ,java-mockito-1)))
6478 (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html")
6479 (synopsis "Low level HTTP transport components")
6480 (description "HttpCore is a set of low level HTTP transport components
6481 that can be used to build custom client and server side HTTP services with a
6482 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
6483 on the classic Java I/O and non-blocking, event driven I/O model based on Java
6484 NIO.
6485
6486 This package provides the blocking I/O model library.")
6487 (license license:asl2.0)))
6488
6489 (define-public java-httpcomponents-httpcore-nio
6490 (package (inherit java-httpcomponents-httpcore)
6491 (name "java-httpcomponents-httpcore-nio")
6492 (arguments
6493 `(#:jar-name "httpcomponents-httpcore-nio.jar"
6494 #:phases
6495 (modify-phases %standard-phases
6496 (add-after 'unpack 'chdir
6497 (lambda _ (chdir "httpcore-nio") #t)))))
6498 (inputs
6499 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
6500 ("java-hamcrest-core" ,java-hamcrest-core)
6501 ,@(package-inputs java-httpcomponents-httpcore)))
6502 (description "HttpCore is a set of low level HTTP transport components
6503 that can be used to build custom client and server side HTTP services with a
6504 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
6505 on the classic Java I/O and non-blocking, event driven I/O model based on Java
6506 NIO.
6507
6508 This package provides the non-blocking I/O model library based on Java
6509 NIO.")))
6510
6511 (define-public java-httpcomponents-httpcore-ab
6512 (package (inherit java-httpcomponents-httpcore)
6513 (name "java-httpcomponents-httpcore-ab")
6514 (arguments
6515 `(#:jar-name "httpcomponents-httpcore-ab.jar"
6516 #:phases
6517 (modify-phases %standard-phases
6518 (add-after 'unpack 'chdir
6519 (lambda _ (chdir "httpcore-ab") #t)))))
6520 (inputs
6521 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
6522 ("java-commons-cli" ,java-commons-cli)
6523 ("java-hamcrest-core" ,java-hamcrest-core)
6524 ,@(package-inputs java-httpcomponents-httpcore)))
6525 (synopsis "Apache HttpCore benchmarking tool")
6526 (description "This package provides the HttpCore benchmarking tool. It is
6527 an Apache AB clone based on HttpCore.")))
6528
6529 (define-public java-httpcomponents-httpclient
6530 (package
6531 (name "java-httpcomponents-httpclient")
6532 (version "4.5.12")
6533 (source (origin
6534 (method url-fetch)
6535 (uri (string-append "mirror://apache/httpcomponents/httpclient/"
6536 "source/httpcomponents-client-"
6537 version "-src.tar.gz"))
6538 (sha256
6539 (base32
6540 "1va99m2zc2liv0v9vn72p5ja8yz4s5wq7zpahaai5nr966kvxzkb"))))
6541 (build-system ant-build-system)
6542 (arguments
6543 `(#:jar-name "httpcomponents-httpclient.jar"
6544 #:phases
6545 (modify-phases %standard-phases
6546 (add-after 'unpack 'chdir
6547 (lambda _ (chdir "httpclient") #t)))))
6548 (inputs
6549 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
6550 ("java-commons-codec" ,java-commons-codec)
6551 ("java-hamcrest-core" ,java-hamcrest-core)
6552 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
6553 ("java-mockito" ,java-mockito-1)
6554 ("java-junit" ,java-junit)))
6555 (home-page "https://hc.apache.org/httpcomponents-client-ga/")
6556 (synopsis "HTTP client library for Java")
6557 (description "Although the @code{java.net} package provides basic
6558 functionality for accessing resources via HTTP, it doesn't provide the full
6559 flexibility or functionality needed by many applications. @code{HttpClient}
6560 seeks to fill this void by providing an efficient, up-to-date, and
6561 feature-rich package implementing the client side of the most recent HTTP
6562 standards and recommendations.")
6563 (license license:asl2.0)))
6564
6565 (define-public java-httpcomponents-httpmime
6566 (package (inherit java-httpcomponents-httpclient)
6567 (name "java-httpcomponents-httpmime")
6568 (arguments
6569 `(#:jar-name "httpcomponents-httpmime.jar"
6570 #:phases
6571 (modify-phases %standard-phases
6572 (add-after 'unpack 'chdir
6573 (lambda _ (chdir "httpmime") #t)))))
6574 (inputs
6575 `(("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient)
6576 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
6577 ("java-junit" ,java-junit)
6578 ("java-hamcrest-core" ,java-hamcrest-core)))))
6579
6580 (define-public java-commons-net
6581 (package
6582 (name "java-commons-net")
6583 (version "3.6")
6584 (source (origin
6585 (method url-fetch)
6586 (uri (string-append "mirror://apache/commons/net/source/"
6587 "commons-net-" version "-src.tar.gz"))
6588 (sha256
6589 (base32
6590 "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr"))))
6591 (build-system ant-build-system)
6592 (arguments
6593 `(;; FIXME: MainTest.java tries to read "examples.properties" (which
6594 ;; should be "resources/examples/examples.properties"), but gets "null"
6595 ;; instead.
6596 #:tests? #f
6597 #:jar-name "commons-net.jar"))
6598 (native-inputs
6599 `(("java-junit" ,java-junit)
6600 ("java-hamcrest-core" ,java-hamcrest-core)))
6601 (home-page "https://commons.apache.org/net/")
6602 (synopsis "Client library for many basic Internet protocols")
6603 (description "The Apache Commons Net library implements the client side of
6604 many basic Internet protocols. The purpose of the library is to provide
6605 fundamental protocol access, not higher-level abstractions.")
6606 (license license:asl2.0)))
6607
6608 (define-public java-jsch
6609 (package
6610 (name "java-jsch")
6611 (version "0.1.55")
6612 (source (origin
6613 (method url-fetch)
6614 (uri (string-append "mirror://sourceforge/jsch/jsch/"
6615 version "/jsch-" version ".zip"))
6616 (sha256
6617 (base32
6618 "1lxyjwvmwa723wcf3bqn816hkvc03vz4xhbsi7bvfhrz2rpgcfq6"))))
6619 (build-system ant-build-system)
6620 (arguments
6621 `(#:build-target "dist"
6622 #:tests? #f ; no tests included
6623 #:phases
6624 (modify-phases %standard-phases
6625 (replace 'install (install-jars "dist")))))
6626 (native-inputs
6627 `(("unzip" ,unzip)))
6628 (home-page "http://www.jcraft.com/jsch/")
6629 (synopsis "Pure Java implementation of SSH2")
6630 (description "JSch is a pure Java implementation of SSH2. JSch allows you
6631 to connect to an SSH server and use port forwarding, X11 forwarding, file
6632 transfer, etc., and you can integrate its functionality into your own Java
6633 programs.")
6634 (license license:bsd-3)))
6635
6636 (define-public java-commons-compress
6637 (package
6638 (name "java-commons-compress")
6639 (version "1.13")
6640 (source (origin
6641 (method url-fetch)
6642 (uri (string-append "mirror://apache/commons/compress/source/"
6643 "commons-compress-" version "-src.tar.gz"))
6644 (sha256
6645 (base32
6646 "1vjqvavrn0babffn1kciz6v52ibwq2vwhzlb95hazis3lgllnxc8"))))
6647 (build-system ant-build-system)
6648 (arguments
6649 `(#:jar-name "commons-compress.jar"
6650 #:phases
6651 (modify-phases %standard-phases
6652 (add-after 'unpack 'delete-bad-tests
6653 (lambda _
6654 (with-directory-excursion "src/test/java/org/apache/commons/compress/"
6655 ;; FIXME: These tests really should not fail. Maybe they are
6656 ;; indicative of problems with our Java packaging work.
6657
6658 ;; This test fails with a null pointer exception.
6659 (delete-file "archivers/sevenz/SevenZOutputFileTest.java")
6660 ;; This test fails to open test resources.
6661 (delete-file "archivers/zip/ExplodeSupportTest.java")
6662
6663 ;; FIXME: This test adds a dependency on powermock, which is hard to
6664 ;; package at this point.
6665 ;; https://github.com/powermock/powermock
6666 (delete-file "archivers/sevenz/SevenZNativeHeapTest.java"))
6667 #t))
6668 (replace 'install (install-from-pom "pom.xml")))))
6669 (propagated-inputs
6670 `(("java-xz" ,java-xz)
6671 ("apache-commons-parent-pom" ,apache-commons-parent-pom-41)))
6672 (native-inputs
6673 `(("java-junit" ,java-junit)
6674 ("java-mockito" ,java-mockito-1)))
6675 (home-page "https://commons.apache.org/proper/commons-compress/")
6676 (synopsis "Java library for working with compressed files")
6677 (description "The Apache Commons Compress library defines an API for
6678 working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ,
6679 Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.")
6680 (license license:asl2.0)))
6681
6682 (define-public java-commons-csv
6683 (package
6684 (name "java-commons-csv")
6685 (version "1.4")
6686 (source (origin
6687 (method url-fetch)
6688 (uri (string-append "mirror://apache/commons/csv/source/"
6689 "commons-csv-" version "-src.tar.gz"))
6690 (sha256
6691 (base32
6692 "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij"))))
6693 (build-system ant-build-system)
6694 (arguments
6695 `(#:jar-name "commons-csv.jar"
6696 #:source-dir "src/main/java"
6697 #:tests? #f)); FIXME: requires java-h2
6698 (inputs
6699 `(("java-hamcrest-core" ,java-hamcrest-core)
6700 ("java-commons-io" ,java-commons-io)
6701 ("java-commons-lang3" ,java-commons-lang3)
6702 ("junit" ,java-junit)))
6703 (home-page "https://commons.apache.org/proper/commons-csv/")
6704 (synopsis "Read and write CSV documents")
6705 (description "Commons CSV reads and writes files in variations of the Comma
6706 Separated Value (CSV) format. The most common CSV formats are predefined in the
6707 CSVFormat class:
6708
6709 @itemize
6710 @item Microsoft Excel
6711 @item Informix UNLOAD
6712 @item Informix UNLOAD CSV
6713 @item MySQL
6714 @item RFC 4180
6715 @item TDF
6716 @end itemize
6717
6718 Custom formats can be created using a fluent style API.")
6719 (license license:asl2.0)))
6720
6721 (define-public java-osgi-annotation
6722 (package
6723 (name "java-osgi-annotation")
6724 (version "6.0.0")
6725 (source (origin
6726 (method url-fetch)
6727 (uri (string-append "https://repo1.maven.org/maven2/"
6728 "org/osgi/org.osgi.annotation/" version "/"
6729 "org.osgi.annotation-" version "-sources.jar"))
6730 (sha256
6731 (base32
6732 "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w"))))
6733 (build-system ant-build-system)
6734 (arguments
6735 `(#:tests? #f ; no tests
6736 #:jar-name "osgi-annotation.jar"))
6737 (home-page "https://www.osgi.org")
6738 (synopsis "Annotation module of OSGi framework")
6739 (description
6740 "OSGi, for Open Services Gateway initiative framework, is a module system
6741 and service platform for the Java programming language. This package contains
6742 the OSGi annotation module, providing additional services to help dynamic
6743 components.")
6744 (license license:asl2.0)))
6745
6746 (define-public java-osgi-core
6747 (package
6748 (name "java-osgi-core")
6749 (version "6.0.0")
6750 (source (origin
6751 (method url-fetch)
6752 (uri (string-append "https://repo1.maven.org/maven2/"
6753 "org/osgi/org.osgi.core/" version "/"
6754 "org.osgi.core-" version "-sources.jar"))
6755 (sha256
6756 (base32
6757 "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv"))))
6758 (build-system ant-build-system)
6759 (arguments
6760 `(#:tests? #f ; no tests
6761 #:jar-name "osgi-core.jar"))
6762 (inputs
6763 `(("java-osgi-annotation" ,java-osgi-annotation)))
6764 (home-page "https://www.osgi.org")
6765 (synopsis "Core module of OSGi framework")
6766 (description
6767 "OSGi, for Open Services Gateway initiative framework, is a module system
6768 and service platform for the Java programming language. This package contains
6769 the OSGi Core module.")
6770 (license license:asl2.0)))
6771
6772 (define-public java-osgi-service-event
6773 (package
6774 (name "java-osgi-service-event")
6775 (version "1.3.1")
6776 (source (origin
6777 (method url-fetch)
6778 (uri (string-append "https://repo1.maven.org/maven2/"
6779 "org/osgi/org.osgi.service.event/"
6780 version "/org.osgi.service.event-"
6781 version "-sources.jar"))
6782 (sha256
6783 (base32
6784 "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm"))))
6785 (build-system ant-build-system)
6786 (arguments
6787 `(#:tests? #f ; no tests
6788 #:jar-name "osgi-service-event.jar"))
6789 (inputs
6790 `(("java-osgi-annotation" ,java-osgi-annotation)
6791 ("java-osgi-core" ,java-osgi-core)))
6792 (home-page "https://www.osgi.org")
6793 (synopsis "OSGi service event module")
6794 (description
6795 "OSGi, for Open Services Gateway initiative framework, is a module system
6796 and service platform for the Java programming language. This package contains
6797 the OSGi @code{org.osgi.service.event} module.")
6798 (license license:asl2.0)))
6799
6800 (define-public java-eclipse-osgi
6801 (package
6802 (name "java-eclipse-osgi")
6803 (version "3.11.3")
6804 (source (origin
6805 (method url-fetch)
6806 (uri (string-append "https://repo1.maven.org/maven2/"
6807 "org/eclipse/platform/org.eclipse.osgi/"
6808 version "/org.eclipse.osgi-"
6809 version "-sources.jar"))
6810 (sha256
6811 (base32
6812 "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b"))))
6813 (build-system ant-build-system)
6814 (arguments
6815 `(#:tests? #f ; no tests included
6816 #:jar-name "eclipse-equinox-osgi.jar"))
6817 (inputs
6818 `(("java-osgi-annotation" ,java-osgi-annotation)))
6819 (home-page "http://www.eclipse.org/equinox/")
6820 (synopsis "Eclipse Equinox OSGi framework")
6821 (description "This package provides an implementation of the OSGi Core
6822 specification.")
6823 (license license:epl1.0)))
6824
6825 (define-public java-eclipse-equinox-common
6826 (package
6827 (name "java-eclipse-equinox-common")
6828 (version "3.10.200")
6829 (source (origin
6830 (method url-fetch)
6831 (uri (string-append "https://repo1.maven.org/maven2/"
6832 "org/eclipse/platform/org.eclipse.equinox.common/"
6833 version "/org.eclipse.equinox.common-"
6834 version "-sources.jar"))
6835 (sha256
6836 (base32
6837 "1yn8ij6xsljlf35sr2l7wvyvc0ss4n1rv0ry5zkgb49dj4hyrqrj"))))
6838 (build-system ant-build-system)
6839 (arguments
6840 `(#:tests? #f ; no tests included
6841 #:jar-name "eclipse-equinox-common.jar"))
6842 (inputs
6843 `(("java-eclipse-osgi" ,java-eclipse-osgi)))
6844 (home-page "http://www.eclipse.org/equinox/")
6845 (synopsis "Common Eclipse runtime")
6846 (description "This package provides the common Eclipse runtime.")
6847 (license license:epl1.0)))
6848
6849 (define-public java-eclipse-core-jobs
6850 (package
6851 (name "java-eclipse-core-jobs")
6852 (version "3.8.0")
6853 (source (origin
6854 (method url-fetch)
6855 (uri (string-append "https://repo1.maven.org/maven2/"
6856 "org/eclipse/platform/org.eclipse.core.jobs/"
6857 version "/org.eclipse.core.jobs-"
6858 version "-sources.jar"))
6859 (sha256
6860 (base32
6861 "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b"))))
6862 (build-system ant-build-system)
6863 (arguments
6864 `(#:tests? #f ; no tests included
6865 #:jar-name "eclipse-core-jobs.jar"))
6866 (inputs
6867 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6868 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6869 (home-page "http://www.eclipse.org/equinox/")
6870 (synopsis "Eclipse jobs mechanism")
6871 (description "This package provides the Eclipse jobs mechanism.")
6872 (license license:epl1.0)))
6873
6874 (define-public java-eclipse-equinox-registry
6875 (package
6876 (name "java-eclipse-equinox-registry")
6877 (version "3.6.100")
6878 (source (origin
6879 (method url-fetch)
6880 (uri (string-append "https://repo1.maven.org/maven2/"
6881 "org/eclipse/platform/org.eclipse.equinox.registry/"
6882 version "/org.eclipse.equinox.registry-"
6883 version "-sources.jar"))
6884 (sha256
6885 (base32
6886 "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k"))))
6887 (build-system ant-build-system)
6888 (arguments
6889 `(#:tests? #f ; no tests included
6890 #:jar-name "eclipse-equinox-registry.jar"))
6891 (inputs
6892 `(("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6893 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6894 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6895 (home-page "http://www.eclipse.org/equinox/")
6896 (synopsis "Eclipse extension registry support")
6897 (description "This package provides support for the Eclipse extension
6898 registry.")
6899 (license license:epl1.0)))
6900
6901 (define-public java-eclipse-equinox-app
6902 (package
6903 (name "java-eclipse-equinox-app")
6904 (version "1.3.400")
6905 (source (origin
6906 (method url-fetch)
6907 (uri (string-append "https://repo1.maven.org/maven2/"
6908 "org/eclipse/platform/org.eclipse.equinox.app/"
6909 version "/org.eclipse.equinox.app-"
6910 version "-sources.jar"))
6911 (sha256
6912 (base32
6913 "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab"))))
6914 (build-system ant-build-system)
6915 (arguments
6916 `(#:tests? #f ; no tests included
6917 #:jar-name "eclipse-equinox-app.jar"))
6918 (inputs
6919 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6920 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6921 ("java-eclipse-osgi" ,java-eclipse-osgi)
6922 ("java-osgi-service-event" ,java-osgi-service-event)))
6923 (home-page "http://www.eclipse.org/equinox/")
6924 (synopsis "Equinox application container")
6925 (description "This package provides the Equinox application container for
6926 Eclipse.")
6927 (license license:epl1.0)))
6928
6929 (define-public java-eclipse-equinox-preferences
6930 (package
6931 (name "java-eclipse-equinox-preferences")
6932 (version "3.6.1")
6933 (source (origin
6934 (method url-fetch)
6935 (uri (string-append "https://repo1.maven.org/maven2/"
6936 "org/eclipse/platform/org.eclipse.equinox.preferences/"
6937 version "/org.eclipse.equinox.preferences-"
6938 version "-sources.jar"))
6939 (sha256
6940 (base32
6941 "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2"))))
6942 (build-system ant-build-system)
6943 (arguments
6944 `(#:tests? #f ; no tests included
6945 #:jar-name "eclipse-equinox-preferences.jar"))
6946 (inputs
6947 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6948 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6949 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6950 (home-page "http://www.eclipse.org/equinox/")
6951 (synopsis "Eclipse preferences mechanism")
6952 (description "This package provides the Eclipse preferences mechanism with
6953 the module @code{org.eclipse.equinox.preferences}.")
6954 (license license:epl1.0)))
6955
6956 (define-public java-eclipse-core-contenttype
6957 (package
6958 (name "java-eclipse-core-contenttype")
6959 (version "3.5.100")
6960 (source (origin
6961 (method url-fetch)
6962 (uri (string-append "https://repo1.maven.org/maven2/"
6963 "org/eclipse/platform/org.eclipse.core.contenttype/"
6964 version "/org.eclipse.core.contenttype-"
6965 version "-sources.jar"))
6966 (sha256
6967 (base32
6968 "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi"))))
6969 (build-system ant-build-system)
6970 (arguments
6971 `(#:tests? #f ; no tests included
6972 #:jar-name "eclipse-core-contenttype.jar"))
6973 (inputs
6974 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6975 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6976 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6977 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6978 (home-page "http://www.eclipse.org/")
6979 (synopsis "Eclipse content mechanism")
6980 (description "This package provides the Eclipse content mechanism in the
6981 @code{org.eclipse.core.contenttype} module.")
6982 (license license:epl1.0)))
6983
6984 (define-public java-eclipse-core-runtime
6985 (package
6986 (name "java-eclipse-core-runtime")
6987 (version "3.15.100")
6988 (source (origin
6989 (method url-fetch)
6990 (uri (string-append "https://repo1.maven.org/maven2/"
6991 "org/eclipse/platform/org.eclipse.core.runtime/"
6992 version "/org.eclipse.core.runtime-"
6993 version "-sources.jar"))
6994 (sha256
6995 (base32
6996 "0l8xayacsbjvz5hypx2fv47vpw2n4dspamcfb3hx30x9hj8vmg7r"))))
6997 (build-system ant-build-system)
6998 (arguments
6999 `(#:tests? #f ; no tests included
7000 #:jar-name "eclipse-core-runtime.jar"))
7001 (inputs
7002 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
7003 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
7004 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
7005 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7006 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7007 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7008 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7009 (home-page "https://www.eclipse.org/")
7010 (synopsis "Eclipse core runtime")
7011 (description "This package provides the Eclipse core runtime with the
7012 module @code{org.eclipse.core.runtime}.")
7013 (license license:epl1.0)))
7014
7015 (define-public java-eclipse-core-filesystem
7016 (package
7017 (name "java-eclipse-core-filesystem")
7018 (version "1.6.1")
7019 (source (origin
7020 (method url-fetch)
7021 (uri (string-append "https://repo1.maven.org/maven2/"
7022 "org/eclipse/platform/org.eclipse.core.filesystem/"
7023 version "/org.eclipse.core.filesystem-"
7024 version "-sources.jar"))
7025 (sha256
7026 (base32
7027 "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj"))))
7028 (build-system ant-build-system)
7029 (arguments
7030 `(#:tests? #f ; no tests included
7031 #:jar-name "eclipse-core-filesystem.jar"))
7032 (inputs
7033 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7034 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7035 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7036 (home-page "https://www.eclipse.org/")
7037 (synopsis "Eclipse core file system")
7038 (description "This package provides the Eclipse core file system with the
7039 module @code{org.eclipse.core.filesystem}.")
7040 (license license:epl1.0)))
7041
7042 (define-public java-eclipse-core-expressions
7043 (package
7044 (name "java-eclipse-core-expressions")
7045 (version "3.5.100")
7046 (source (origin
7047 (method url-fetch)
7048 (uri (string-append "https://repo1.maven.org/maven2/"
7049 "org/eclipse/platform/org.eclipse.core.expressions/"
7050 version "/org.eclipse.core.expressions-"
7051 version "-sources.jar"))
7052 (sha256
7053 (base32
7054 "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f"))))
7055 (build-system ant-build-system)
7056 (arguments
7057 `(#:tests? #f ; no tests included
7058 #:jar-name "eclipse-core-expressions.jar"))
7059 (inputs
7060 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7061 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7062 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7063 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7064 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7065 (home-page "https://www.eclipse.org/")
7066 (synopsis "Eclipse core expression language")
7067 (description "This package provides the Eclipse core expression language
7068 with the @code{org.eclipse.core.expressions} module.")
7069 (license license:epl1.0)))
7070
7071 (define-public java-eclipse-core-variables
7072 (package
7073 (name "java-eclipse-core-variables")
7074 (version "3.3.0")
7075 (source (origin
7076 (method url-fetch)
7077 (uri (string-append "https://repo1.maven.org/maven2/"
7078 "org/eclipse/platform/org.eclipse.core.variables/"
7079 version "/org.eclipse.core.variables-"
7080 version "-sources.jar"))
7081 (sha256
7082 (base32
7083 "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy"))))
7084 (build-system ant-build-system)
7085 (arguments
7086 `(#:tests? #f ; no tests included
7087 #:jar-name "eclipse-core-variables.jar"))
7088 (inputs
7089 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7090 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7091 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7092 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7093 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7094 (home-page "https://www.eclipse.org/platform")
7095 (synopsis "Eclipse core variables")
7096 (description "This package provides the Eclipse core variables module
7097 @code{org.eclipse.core.variables}.")
7098 (license license:epl1.0)))
7099
7100 (define-public java-eclipse-ant-core
7101 (package
7102 (name "java-eclipse-ant-core")
7103 (version "3.4.100")
7104 (source (origin
7105 (method url-fetch)
7106 (uri (string-append "https://repo1.maven.org/maven2/"
7107 "org/eclipse/platform/org.eclipse.ant.core/"
7108 version "/org.eclipse.ant.core-"
7109 version "-sources.jar"))
7110 (sha256
7111 (base32
7112 "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7"))))
7113 (build-system ant-build-system)
7114 (arguments
7115 `(#:tests? #f ; no tests included
7116 #:jar-name "eclipse-ant-core.jar"))
7117 (inputs
7118 `(("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
7119 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7120 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7121 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7122 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
7123 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7124 ("java-eclipse-core-variables" ,java-eclipse-core-variables)
7125 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7126 (home-page "https://www.eclipse.org/platform")
7127 (synopsis "Ant build tool core libraries")
7128 (description "This package provides the ant build tool core libraries with
7129 the module @code{org.eclipse.ant.core}.")
7130 (license license:epl1.0)))
7131
7132 (define-public java-eclipse-core-resources
7133 (package
7134 (name "java-eclipse-core-resources")
7135 (version "3.13.200")
7136 (source (origin
7137 (method url-fetch)
7138 (uri (string-append "https://repo1.maven.org/maven2/"
7139 "org/eclipse/platform/org.eclipse.core.resources/"
7140 version "/org.eclipse.core.resources-"
7141 version "-sources.jar"))
7142 (sha256
7143 (base32
7144 "1sn3b6ky72hkvxcgf9b2jkpbdh3y8lbhi9xxwv1dsiddpkkq91hs"))))
7145 (build-system ant-build-system)
7146 (arguments
7147 `(#:tests? #f ; no tests included
7148 #:jar-name "eclipse-core-resources.jar"))
7149 (inputs
7150 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7151 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7152 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7153 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
7154 ("java-eclipse-core-expressions" ,java-eclipse-core-expressions)
7155 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
7156 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
7157 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7158 ("java-eclipse-ant-core" ,java-eclipse-ant-core)
7159 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7160 (home-page "https://www.eclipse.org/")
7161 (synopsis "Eclipse core resource management")
7162 (description "This package provides the Eclipse core resource management
7163 module @code{org.eclipse.core.resources}.")
7164 (license license:epl1.0)))
7165
7166 (define-public java-eclipse-compare-core
7167 (package
7168 (name "java-eclipse-compare-core")
7169 (version "3.6.0")
7170 (source (origin
7171 (method url-fetch)
7172 (uri (string-append "https://repo1.maven.org/maven2/"
7173 "org/eclipse/platform/org.eclipse.compare.core/"
7174 version "/org.eclipse.compare.core-"
7175 version "-sources.jar"))
7176 (sha256
7177 (base32
7178 "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg"))))
7179 (build-system ant-build-system)
7180 (arguments
7181 `(#:tests? #f ; no tests included
7182 #:jar-name "eclipse-compare-core.jar"))
7183 (inputs
7184 `(("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7185 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7186 ("java-eclipse-osgi" ,java-eclipse-osgi)
7187 ("java-icu4j" ,java-icu4j)))
7188 (home-page "https://www.eclipse.org/")
7189 (synopsis "Eclipse core compare support")
7190 (description "This package provides the Eclipse core compare support
7191 module @code{org.eclipse.compare.core}.")
7192 (license license:epl1.0)))
7193
7194 (define-public java-eclipse-team-core
7195 (package
7196 (name "java-eclipse-team-core")
7197 (version "3.8.0")
7198 (source (origin
7199 (method url-fetch)
7200 (uri (string-append "https://repo1.maven.org/maven2/"
7201 "org/eclipse/platform/org.eclipse.team.core/"
7202 version "/org.eclipse.team.core-"
7203 version "-sources.jar"))
7204 (sha256
7205 (base32
7206 "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7"))))
7207 (build-system ant-build-system)
7208 (arguments
7209 `(#:tests? #f ; no tests included
7210 #:jar-name "eclipse-team-core.jar"))
7211 (inputs
7212 `(("java-eclipse-compare-core" ,java-eclipse-compare-core)
7213 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
7214 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
7215 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
7216 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
7217 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7218 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7219 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7220 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7221 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7222 (home-page "https://www.eclipse.org/platform")
7223 (synopsis "Eclipse team support core")
7224 (description "This package provides the Eclipse team support core module
7225 @code{org.eclipse.team.core}.")
7226 (license license:epl1.0)))
7227
7228 (define-public java-eclipse-core-commands
7229 (package
7230 (name "java-eclipse-core-commands")
7231 (version "3.8.1")
7232 (source (origin
7233 (method url-fetch)
7234 (uri (string-append "https://repo1.maven.org/maven2/"
7235 "org/eclipse/platform/org.eclipse.core.commands/"
7236 version "/org.eclipse.core.commands-"
7237 version "-sources.jar"))
7238 (sha256
7239 (base32
7240 "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9"))))
7241 (build-system ant-build-system)
7242 (arguments
7243 `(#:tests? #f ; no tests included
7244 #:jar-name "eclipse-core-commands.jar"))
7245 (inputs
7246 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)))
7247 (home-page "https://www.eclipse.org/platform")
7248 (synopsis "Eclipse core commands")
7249 (description "This package provides Eclipse core commands in the module
7250 @code{org.eclipse.core.commands}.")
7251 (license license:epl1.0)))
7252
7253 (define-public java-eclipse-text
7254 (package
7255 (name "java-eclipse-text")
7256 (version "3.6.0")
7257 (source (origin
7258 (method url-fetch)
7259 (uri (string-append "https://repo1.maven.org/maven2/"
7260 "org/eclipse/platform/org.eclipse.text/"
7261 version "/org.eclipse.text-"
7262 version "-sources.jar"))
7263 (sha256
7264 (base32
7265 "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1"))))
7266 (build-system ant-build-system)
7267 (arguments
7268 `(#:tests? #f ; no tests included
7269 #:jar-name "eclipse-text.jar"
7270 #:phases
7271 (modify-phases %standard-phases
7272 ;; When creating a new category we must make sure that the new list
7273 ;; matches List<Position>. By default it seems to be too generic
7274 ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>.
7275 ;; Without this we get this error:
7276 ;;
7277 ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376:
7278 ;; error: method put in interface Map<K,V> cannot be applied to given types;
7279 ;; [javac] fPositions.put(category, new ArrayList<>());
7280 ;; [javac] ^
7281 ;; [javac] required: String,List<Position>
7282 ;; [javac] found: String,ArrayList<Object>
7283 ;; [javac] reason: actual argument ArrayList<Object> cannot be converted
7284 ;; to List<Position> by method invocation conversion
7285 ;; [javac] where K,V are type-variables:
7286 ;; [javac] K extends Object declared in interface Map
7287 ;; [javac] V extends Object declared in interface Map
7288 ;;
7289 ;; I don't know if this is a good fix. I suspect it is not, but it
7290 ;; seems to work.
7291 (add-after 'unpack 'fix-compilation-error
7292 (lambda _
7293 (substitute* "src/org/eclipse/jface/text/AbstractDocument.java"
7294 (("Positions.put\\(category, new ArrayList<>\\(\\)\\);")
7295 "Positions.put(category, new ArrayList<Position>());"))
7296 #t)))))
7297 (inputs
7298 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7299 ("java-eclipse-core-commands" ,java-eclipse-core-commands)
7300 ("java-icu4j" ,java-icu4j)))
7301 (home-page "http://www.eclipse.org/platform")
7302 (synopsis "Eclipse text library")
7303 (description "Platform Text is part of the Platform UI project and
7304 provides the basic building blocks for text and text editors within Eclipse
7305 and contributes the Eclipse default text editor.")
7306 (license license:epl1.0)))
7307
7308 (define-public java-eclipse-jdt-core
7309 (package
7310 (name "java-eclipse-jdt-core")
7311 (version "3.16.0")
7312 (source (origin
7313 (method url-fetch)
7314 (uri (string-append "https://repo1.maven.org/maven2/"
7315 "org/eclipse/jdt/org.eclipse.jdt.core/"
7316 version "/org.eclipse.jdt.core-"
7317 version "-sources.jar"))
7318 (sha256
7319 (base32
7320 "1g560yr9v2kzv34gc2m3ifpgnj7krcdd6h4gd4z83pwqacwkfz0k"))))
7321 (build-system ant-build-system)
7322 (arguments
7323 `(#:tests? #f ; no tests included
7324 #:jar-name "eclipse-jdt-core.jar"
7325 #:phases
7326 (modify-phases %standard-phases
7327 (add-after 'unpack 'move-sources
7328 (lambda _
7329 (with-directory-excursion "src/jdtCompilerAdaptersrc/"
7330 (for-each (lambda (file)
7331 (install-file file (string-append "../" (dirname file))))
7332 (find-files "." ".*")))
7333 (delete-file-recursively "src/jdtCompilerAdaptersrc/")
7334 #t))
7335 (add-before 'build 'copy-resources
7336 (lambda _
7337 (with-directory-excursion "src"
7338 (for-each (lambda (file)
7339 (install-file file (string-append "../build/classes/" (dirname file))))
7340 (find-files "." ".*.(props|properties|rsc)")))
7341 #t)))))
7342 (inputs
7343 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
7344 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
7345 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
7346 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
7347 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7348 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
7349 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7350 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7351 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7352 ("java-eclipse-osgi" ,java-eclipse-osgi)
7353 ("java-eclipse-text" ,java-eclipse-text)))
7354 (home-page "https://www.eclipse.org/jdt")
7355 (synopsis "Java development tools core libraries")
7356 (description "This package provides the core libraries of the Eclipse Java
7357 development tools.")
7358 (license license:epl1.0)))
7359
7360 (define-public java-eclipse-jdt-compiler-apt
7361 (package
7362 (name "java-eclipse-jdt-compiler-apt")
7363 (version "1.3.400")
7364 (source (origin
7365 (method url-fetch)
7366 (uri (string-append "https://repo1.maven.org/maven2/"
7367 "org/eclipse/jdt/org.eclipse.jdt.compiler.apt/"
7368 version "/org.eclipse.jdt.compiler.apt-"
7369 version "-sources.jar"))
7370 (sha256
7371 (base32
7372 "1s285k9p2ixdqrknb40jbbvw682n9a7l5lqpn583a8pvlzg2l6r8"))))
7373 (build-system ant-build-system)
7374 (arguments
7375 `(#:tests? #f ; no tests included
7376 #:jar-name "eclipse-jdt-compiler-apt.jar"
7377 #:jdk ,openjdk11))
7378 (inputs
7379 `(("java-eclipse-jdt-core" ,java-eclipse-jdt-core)))
7380 (home-page "https://www.eclipse.org/jdt/apt/")
7381 (synopsis "Annotation processing tool")
7382 (description "APT stands for Annotation Processing Tool. APT provides a
7383 means for generating files and compiling new Java classes based on annotations
7384 found in your source code.")
7385 (license license:epl2.0)))
7386
7387 (define-public java-javax-mail
7388 (package
7389 (name "java-javax-mail")
7390 (version "1.5.6")
7391 (source (origin
7392 (method url-fetch)
7393 (uri (string-append "https://repo1.maven.org/maven2/"
7394 "com/sun/mail/javax.mail/"
7395 version "/javax.mail-"
7396 version "-sources.jar"))
7397 (sha256
7398 (base32
7399 "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9"))))
7400 (build-system ant-build-system)
7401 (arguments
7402 `(#:tests? #f ; no tests
7403 #:jar-name "javax-mail.jar"))
7404 (home-page "https://javamail.java.net")
7405 (synopsis "Reference implementation of the JavaMail API")
7406 (description
7407 "This package provides versions of the JavaMail API implementation, IMAP,
7408 SMTP, and POP3 service providers, some examples, and documentation for the
7409 JavaMail API.")
7410 ;; GPLv2 only with "classpath exception".
7411 (license license:gpl2)))
7412
7413 (define-public java-log4j-api
7414 (package
7415 (name "java-log4j-api")
7416 (version "2.4.1")
7417 (source (origin
7418 (method url-fetch)
7419 (uri (string-append "mirror://apache/logging/log4j/" version
7420 "/apache-log4j-" version "-src.tar.gz"))
7421 (sha256
7422 (base32
7423 "0j5p9gik0jysh37nlrckqbky12isy95cpwg2gv5fas1rcdqbraxd"))))
7424 (build-system ant-build-system)
7425 (arguments
7426 `(#:tests? #f ; tests require unpackaged software
7427 #:jar-name "log4j-api.jar"
7428 #:make-flags
7429 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
7430 "/share/java"))
7431 #:phases
7432 (modify-phases %standard-phases
7433 (add-after 'unpack 'enter-dir
7434 (lambda _ (chdir "log4j-api") #t))
7435 ;; FIXME: The tests require additional software that has not been
7436 ;; packaged yet, such as
7437 ;; * org.apache.maven
7438 ;; * org.apache.felix
7439 (add-after 'enter-dir 'delete-tests
7440 (lambda _ (delete-file-recursively "src/test") #t)))))
7441 (inputs
7442 `(("java-osgi-core" ,java-osgi-core)
7443 ("java-hamcrest-core" ,java-hamcrest-core)
7444 ("java-junit" ,java-junit)))
7445 (home-page "https://logging.apache.org/log4j/2.x/")
7446 (synopsis "API module of the Log4j logging framework for Java")
7447 (description
7448 "This package provides the API module of the Log4j logging framework for
7449 Java.")
7450 (license license:asl2.0)))
7451
7452 (define-public java-log4j-core
7453 (package
7454 (inherit java-log4j-api)
7455 (name "java-log4j-core")
7456 (inputs
7457 `(("java-osgi-core" ,java-osgi-core)
7458 ("java-hamcrest-core" ,java-hamcrest-core)
7459 ("java-log4j-api" ,java-log4j-api)
7460 ("java-mail" ,java-mail)
7461 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
7462 ("java-lmax-disruptor" ,java-lmax-disruptor)
7463 ("java-kafka" ,java-kafka-clients)
7464 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
7465 ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7466 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
7467 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
7468 ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml)
7469 ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml)
7470 ("java-commons-compress" ,java-commons-compress)
7471 ("java-commons-csv" ,java-commons-csv)
7472 ("java-jeromq" ,java-jeromq)
7473 ("java-junit" ,java-junit)))
7474 (native-inputs
7475 `(("hamcrest" ,java-hamcrest-all)
7476 ("java-commons-io" ,java-commons-io)
7477 ("java-commons-lang3" ,java-commons-lang3)
7478 ("slf4j" ,java-slf4j-api)))
7479 (arguments
7480 `(#:tests? #f ; tests require more dependencies
7481 #:test-dir "src/test"
7482 #:source-dir "src/main/java"
7483 #:jar-name "log4j-core.jar"
7484 #:jdk ,icedtea-8
7485 #:make-flags
7486 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
7487 "/share/java"))
7488 #:phases
7489 (modify-phases %standard-phases
7490 (add-after 'unpack 'enter-dir
7491 (lambda _ (chdir "log4j-core") #t)))))
7492 (synopsis "Core component of the Log4j framework")
7493 (description "This package provides the core component of the Log4j
7494 logging framework for Java.")))
7495
7496 (define-public java-log4j-1.2-api
7497 (package
7498 (inherit java-log4j-api)
7499 (name "java-log4j-1.2-api")
7500 (arguments
7501 `(#:jar-name "java-log4j-1.2-api.jar"
7502 #:source-dir "log4j-1.2-api/src/main/java"
7503 #:jdk ,icedtea-8
7504 ;; Tests require maven-model (and other maven subprojects), which is a
7505 ;; cyclic dependency.
7506 #:tests? #f))
7507 (inputs
7508 `(("log4j-api" ,java-log4j-api)
7509 ("log4j-core" ,java-log4j-core)
7510 ("osgi-core" ,java-osgi-core)
7511 ("eclipse-osgi" ,java-eclipse-osgi)
7512 ("java-lmax-disruptor" ,java-lmax-disruptor)))))
7513
7514 (define-public java-commons-cli
7515 (package
7516 (name "java-commons-cli")
7517 (version "1.4")
7518 (source (origin
7519 (method url-fetch)
7520 (uri (string-append "mirror://apache/commons/cli/source/"
7521 "commons-cli-" version "-src.tar.gz"))
7522 (sha256
7523 (base32
7524 "05hgi2z01fqz374y719gl1dxzqvzci5af071zm7vxrjg9vczipm1"))))
7525 (build-system ant-build-system)
7526 ;; TODO: javadoc
7527 (arguments
7528 `(#:jar-name "commons-cli.jar"
7529 #:phases
7530 (modify-phases %standard-phases
7531 (replace 'install
7532 (install-from-pom "pom.xml")))))
7533 (native-inputs
7534 `(("java-junit" ,java-junit)
7535 ("java-hamcrest-core" ,java-hamcrest-core)))
7536 (home-page "https://commons.apache.org/cli/")
7537 (synopsis "Command line arguments and options parsing library")
7538 (description "The Apache Commons CLI library provides an API for parsing
7539 command line options passed to programs. It is also able to print help
7540 messages detailing the options available for a command line tool.
7541
7542 Commons CLI supports different types of options:
7543
7544 @itemize
7545 @item POSIX like options (ie. tar -zxvf foo.tar.gz)
7546 @item GNU like long options (ie. du --human-readable --max-depth=1)
7547 @item Java like properties (ie. java -Djava.awt.headless=true Foo)
7548 @item Short options with value attached (ie. gcc -O2 foo.c)
7549 @item long options with single hyphen (ie. ant -projecthelp)
7550 @end itemize
7551
7552 This is a part of the Apache Commons Project.")
7553 (license license:asl2.0)))
7554
7555 (define-public java-commons-codec
7556 (package
7557 (name "java-commons-codec")
7558 (version "1.14")
7559 (source (origin
7560 (method url-fetch)
7561 (uri (string-append "mirror://apache/commons/codec/source/"
7562 "commons-codec-" version "-src.tar.gz"))
7563 (sha256
7564 (base32
7565 "11xr0agckkhm91pb5akf2mbk84yd54gyr178wj57gsm97fi7nkh9"))))
7566 (build-system ant-build-system)
7567 (arguments
7568 `(#:jar-name "java-commons-codec.jar"
7569 #:source-dir "src/main/java"
7570 #:test-dir "src/test"
7571 #:test-exclude (list "**/*AbstractTest.java")
7572 #:phases
7573 (modify-phases %standard-phases
7574 (add-before 'build 'copy-resources
7575 (lambda _
7576 (copy-recursively "src/main/resources"
7577 "build/classes")
7578 #t))
7579 (add-before 'check 'copy-test-resources
7580 (lambda _
7581 (copy-recursively "src/test/resources"
7582 "build/test-classes")
7583 #t))
7584 (replace 'install (install-from-pom "pom.xml")))))
7585 (native-inputs
7586 `(("java-commons-lang3" ,java-commons-lang3)
7587 ("java-junit" ,java-junit)))
7588 (propagated-inputs
7589 `(("apache-commons-parent-pom" ,apache-commons-parent-pom-50)))
7590 (home-page "https://commons.apache.org/codec/")
7591 (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs")
7592 (description "The codec package contains simple encoder and decoders for
7593 various formats such as Base64 and Hexadecimal. In addition to these widely
7594 used encoders and decoders, the codec package also maintains a collection of
7595 phonetic encoding utilities.
7596
7597 This is a part of the Apache Commons Project.")
7598 (license license:asl2.0)))
7599
7600 (define-public java-commons-daemon
7601 (package
7602 (name "java-commons-daemon")
7603 (version "1.1.0")
7604 (source (origin
7605 (method url-fetch)
7606 (uri (string-append "mirror://apache/commons/daemon/source/"
7607 "commons-daemon-" version "-src.tar.gz"))
7608 (sha256
7609 (base32
7610 "141gkhfzv5v3pdhic6y4ardq2dhsa3v36j8wmmhy6f8mac48fp7n"))))
7611 (build-system ant-build-system)
7612 (arguments
7613 `(#:test-target "test"
7614 #:phases
7615 (modify-phases %standard-phases
7616 (add-after 'build 'build-javadoc ant-build-javadoc)
7617 (replace 'install (install-jars "dist"))
7618 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
7619 (native-inputs
7620 `(("java-junit" ,java-junit)))
7621 (home-page "https://commons.apache.org/daemon/")
7622 (synopsis "Library to launch Java applications as daemons")
7623 (description "The Daemon package from Apache Commons can be used to
7624 implement Java applications which can be launched as daemons. For example the
7625 program will be notified about a shutdown so that it can perform cleanup tasks
7626 before its process of execution is destroyed by the operation system.
7627
7628 This package contains the Java library. You will also need the actual binary
7629 for your architecture which is provided by the jsvc package.
7630
7631 This is a part of the Apache Commons Project.")
7632 (license license:asl2.0)))
7633
7634 (define-public java-javaewah
7635 (package
7636 (name "java-javaewah")
7637 (version "1.1.6")
7638 (source (origin
7639 (method git-fetch)
7640 (uri (git-reference
7641 (url "https://github.com/lemire/javaewah/")
7642 (commit (string-append "JavaEWAH-" version))))
7643 (file-name (git-file-name name version))
7644 (sha256
7645 (base32
7646 "1m8qcb1py76v7avbjjrkvyy6fhr5dk2ywy73gbsxqry04gkm2nhw"))))
7647 (build-system ant-build-system)
7648 (arguments `(#:jar-name "javaewah.jar"))
7649 (inputs
7650 `(("java-junit" ,java-junit)
7651 ("java-hamcrest-core" ,java-hamcrest-core)))
7652 (home-page "https://github.com/lemire/javaewah")
7653 (synopsis "Compressed alternative to the Java @code{BitSet} class")
7654 (description "This is a word-aligned compressed variant of the Java
7655 @code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like
7656 compression scheme. It can be used to implement bitmap indexes.
7657
7658 The goal of word-aligned compression is not to achieve the best compression,
7659 but rather to improve query processing time. Hence, JavaEWAH tries to save CPU
7660 cycles, maybe at the expense of storage. However, the EWAH scheme is always
7661 more efficient storage-wise than an uncompressed bitmap (as implemented in the
7662 @code{BitSet} class by Sun).")
7663 ;; GPL2.0 derivates are explicitly allowed.
7664 (license license:asl2.0)))
7665
7666 (define-public java-slf4j-api
7667 (package
7668 (name "java-slf4j-api")
7669 (version "1.7.25")
7670 (source (origin
7671 (method url-fetch)
7672 (uri (string-append "https://www.slf4j.org/dist/slf4j-"
7673 version ".tar.gz"))
7674 (sha256
7675 (base32
7676 "13j51sgzmhhdrfa74gkal5zpip7r1440dh7zsi2c8bpb2zs1v8kb"))
7677 (modules '((guix build utils)))
7678 ;; Delete bundled jars.
7679 (snippet
7680 '(begin
7681 (for-each delete-file (find-files "." "\\.jar$"))
7682 #t))))
7683 (build-system ant-build-system)
7684 (arguments
7685 `(#:jar-name "slf4j-api.jar"
7686 #:source-dir "slf4j-api/src/main"
7687 #:test-dir "slf4j-api/src/test"
7688 #:phases
7689 (modify-phases %standard-phases
7690 (add-after 'build 'regenerate-jar
7691 (lambda _
7692 ;; pom.xml ignores these files in the jar creation process. If we don't,
7693 ;; we get the error "This code should have never made it into slf4j-api.jar"
7694 (delete-file-recursively "build/classes/org/slf4j/impl")
7695 (invoke "jar" "-cf" "build/jar/slf4j-api.jar" "-C"
7696 "build/classes" ".")))
7697 (add-before 'check 'dont-test-abstract-classes
7698 (lambda _
7699 ;; abstract classes are not meant to be run with junit
7700 (substitute* "build.xml"
7701 (("<include name=\"\\*\\*/\\*Test.java\" />")
7702 (string-append "<include name=\"**/*Test.java\" />"
7703 "<exclude name=\"**/MultithreadedInitializationTest"
7704 ".java\" />")))
7705 #t))
7706 (replace 'install
7707 (install-from-pom "slf4j-api/pom.xml")))))
7708 (propagated-inputs
7709 `(("java-slf4j-parent" ,java-slf4j-parent)))
7710 (native-inputs
7711 `(("java-junit" ,java-junit)
7712 ("java-hamcrest-core" ,java-hamcrest-core)))
7713 (home-page "https://www.slf4j.org/")
7714 (synopsis "Simple logging facade for Java")
7715 (description "The Simple Logging Facade for Java (SLF4J) serves as a
7716 simple facade or abstraction for various logging
7717 frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j})
7718 allowing the end user to plug in the desired logging framework at deployment
7719 time.")
7720 (license license:expat)))
7721
7722 (define java-slf4j-parent
7723 (package
7724 (inherit java-slf4j-api)
7725 (name "java-slf4j-parent")
7726 (native-inputs `())
7727 (propagated-inputs '())
7728 (arguments
7729 `(#:tests? #f
7730 #:phases
7731 (modify-phases %standard-phases
7732 (delete 'build)
7733 (delete 'configure)
7734 (replace 'install
7735 (install-pom-file "pom.xml")))))))
7736
7737 (define-public java-slf4j-simple
7738 (package
7739 (name "java-slf4j-simple")
7740 (version "1.7.25")
7741 (source (package-source java-slf4j-api))
7742 (build-system ant-build-system)
7743 (arguments
7744 `(#:jar-name "slf4j-simple.jar"
7745 #:source-dir "slf4j-simple/src/main"
7746 #:test-dir "slf4j-simple/src/test"
7747 #:phases
7748 (modify-phases %standard-phases
7749 ;; The tests need some test classes from slf4j-api
7750 (add-before 'check 'build-slf4j-api-test-helpers
7751 (lambda _
7752 ;; Add current dir to CLASSPATH ...
7753 (setenv "CLASSPATH"
7754 (string-append (getcwd) ":" (getenv "CLASSPATH")))
7755 ;; ... and build test helper classes here:
7756 (apply invoke
7757 `("javac" "-d" "."
7758 ,@(find-files "slf4j-api/src/test" ".*\\.java")))))
7759 (replace 'install
7760 (install-from-pom "slf4j-simple/pom.xml")))))
7761 (propagated-inputs
7762 `(("java-slf4j-api" ,java-slf4j-api)))
7763 (native-inputs
7764 `(("java-junit" ,java-junit)
7765 ("java-hamcrest-core" ,java-hamcrest-core)))
7766 (home-page "https://www.slf4j.org/")
7767 (synopsis "Simple implementation of simple logging facade for Java")
7768 (description "SLF4J binding for the Simple implementation, which outputs
7769 all events to System.err. Only messages of level INFO and higher are
7770 printed.")
7771 (license license:expat)))
7772
7773 (define-public antlr2
7774 (package
7775 (name "antlr2")
7776 (version "2.7.7")
7777 (source (origin
7778 (method url-fetch)
7779 (uri (string-append "https://www.antlr2.org/download/antlr-"
7780 version ".tar.gz"))
7781 (sha256
7782 (base32
7783 "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5"))
7784 (modules '((guix build utils)))
7785 (snippet
7786 '(begin
7787 (delete-file "antlr.jar")
7788 (substitute* "lib/cpp/antlr/CharScanner.hpp"
7789 (("#include <map>")
7790 (string-append
7791 "#include <map>\n"
7792 "#define EOF (-1)\n"
7793 "#include <strings.h>")))
7794 (substitute* "configure"
7795 (("/bin/sh") "sh"))
7796 #t))))
7797 (build-system gnu-build-system)
7798 (arguments
7799 `(#:tests? #f ; no test target
7800 #:imported-modules ((guix build ant-build-system)
7801 (guix build syscalls)
7802 ,@%gnu-build-system-modules)
7803 #:modules (((guix build ant-build-system) #:prefix ant:)
7804 (guix build gnu-build-system)
7805 (guix build utils))
7806 #:phases
7807 (modify-phases %standard-phases
7808 (add-after 'install 'strip-jar-timestamps
7809 (assoc-ref ant:%standard-phases 'strip-jar-timestamps))
7810 (add-before 'configure 'fix-timestamp
7811 (lambda _
7812 (substitute* "configure"
7813 (("^TIMESTAMP.*") "TIMESTAMP=19700101\n"))
7814 #t))
7815 (add-after 'configure 'fix-bin-ls
7816 (lambda _
7817 (substitute* (find-files "." "Makefile")
7818 (("/bin/ls") "ls"))
7819 #t)))))
7820 (native-inputs
7821 `(("which" ,which)
7822 ("zip" ,zip)
7823 ("java" ,icedtea "jdk")))
7824 (inputs
7825 `(("java" ,icedtea)))
7826 (home-page "https://www.antlr2.org")
7827 (synopsis "Framework for constructing recognizers, compilers, and translators")
7828 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
7829 is a language tool that provides a framework for constructing recognizers,
7830 compilers, and translators from grammatical descriptions containing Java, C#,
7831 C++, or Python actions. ANTLR provides excellent support for tree construction,
7832 tree walking, and translation.")
7833 (license license:public-domain)))
7834
7835 (define-public java-stringtemplate-3
7836 (package
7837 (name "java-stringtemplate")
7838 (version "3.2.1")
7839 (source (origin
7840 (method url-fetch)
7841 (uri (string-append "https://github.com/antlr/website-st4/raw/"
7842 "gh-pages/download/stringtemplate-"
7843 version ".tar.gz"))
7844 (sha256
7845 (base32
7846 "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is"))))
7847 (build-system ant-build-system)
7848 (arguments
7849 `(#:jar-name (string-append ,name "-" ,version ".jar")
7850 #:test-dir "test"
7851 #:modules ((guix build ant-build-system)
7852 (guix build utils)
7853 (srfi srfi-1))
7854 #:phases
7855 (modify-phases %standard-phases
7856 (add-before 'check 'fix-tests
7857 (lambda _
7858 (substitute* "build.xml"
7859 (("\\$\\{test.home\\}/java")
7860 "${test.home}/org"))
7861 #t))
7862 (add-before 'build 'generate-grammar
7863 (lambda _
7864 (with-directory-excursion "src/org/antlr/stringtemplate/language/"
7865 (for-each (lambda (file)
7866 (format #t "~a\n" file)
7867 (invoke "antlr" file))
7868 '("template.g" "angle.bracket.template.g" "action.g"
7869 "eval.g" "group.g" "interface.g")))
7870 #t)))))
7871 (native-inputs
7872 `(("antlr" ,antlr2)
7873 ("java-junit" ,java-junit)))
7874 (home-page "https://www.stringtemplate.org")
7875 (synopsis "Template engine to generate formatted text output")
7876 (description "StringTemplate is a java template engine (with ports for C#,
7877 Objective-C, JavaScript, Scala) for generating source code, web pages, emails,
7878 or any other formatted text output. StringTemplate is particularly good at
7879 code generators, multiple site skins, and internationalization / localization.
7880 StringTemplate also powers ANTLR.")
7881 (license license:bsd-3)))
7882
7883 ;; antlr3 is partially written using antlr3 grammar files. It also depends on
7884 ;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar
7885 ;; files and uses antlr3 at runtime. The latest version requires a recent version
7886 ;; of antlr3 at runtime.
7887 ;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3.
7888 ;; This version of ST4 is sufficient for the latest antlr3.
7889 ;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build
7890 ;; the latest ST4 with it. Then we build our final antlr3 that will be linked
7891 ;; against the latest ST4.
7892 ;; antlr3.3 still depends on antlr3 to generate some files, so we use an
7893 ;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses
7894 ;; only grammar files with the antlr2 syntax.
7895 ;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3.
7896
7897 (define-public java-stringtemplate
7898 (package (inherit java-stringtemplate-3)
7899 (name "java-stringtemplate")
7900 (version "4.0.8")
7901 (source (origin
7902 (method url-fetch)
7903 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/"
7904 version ".tar.gz"))
7905 (file-name (string-append name "-" version ".tar.gz"))
7906 (sha256
7907 (base32
7908 "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087"))))
7909 (build-system ant-build-system)
7910 (arguments
7911 `(#:jar-name (string-append ,name "-" ,version ".jar")
7912 #:tests? #f ; FIXME: tests fail for unknown reasons
7913 #:test-dir "test"
7914 #:modules ((guix build ant-build-system)
7915 (guix build utils)
7916 (srfi srfi-1))
7917 #:phases
7918 (modify-phases %standard-phases
7919 (add-before 'check 'fix-test-target
7920 (lambda _
7921 (substitute* "build.xml"
7922 (("\\$\\{test.home\\}/java") "${test.home}/")
7923 (("\\*Test.java") "Test*.java"))
7924 #t))
7925 (add-before 'build 'generate-grammar
7926 (lambda _
7927 (with-directory-excursion "src/org/stringtemplate/v4/compiler/"
7928 (for-each (lambda (file)
7929 (format #t "~a\n" file)
7930 (invoke "antlr3" file))
7931 '("STParser.g" "Group.g" "CodeGenerator.g")))
7932 #t)))))
7933 (inputs
7934 `(("antlr3" ,antlr3-bootstrap)
7935 ("antlr2" ,antlr2)
7936 ("java-stringtemplate" ,java-stringtemplate-3)
7937 ("java-junit" ,java-junit)))))
7938
7939 (define java-stringtemplate-4.0.6
7940 (package (inherit java-stringtemplate)
7941 (name "java-stringtemplate")
7942 (version "4.0.6")
7943 (source (origin
7944 (method url-fetch)
7945 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-"
7946 version ".tar.gz"))
7947 (file-name (string-append name "-" version ".tar.gz"))
7948 (sha256
7949 (base32
7950 "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp"))))
7951 (inputs
7952 `(("antlr3" ,antlr3-3.3)
7953 ("antlr2" ,antlr2)
7954 ("java-stringtemplate" ,java-stringtemplate-3)))))
7955
7956 (define-public antlr3
7957 (package
7958 (name "antlr3")
7959 (version "3.5.2")
7960 (source (origin
7961 (method git-fetch)
7962 (uri (git-reference
7963 (url "https://github.com/antlr/antlr3")
7964 (commit version)))
7965 (file-name (git-file-name name version))
7966 (sha256
7967 (base32
7968 "0cafavrjmzqhklghrk8c2jqxkdwxgzskm20pbrfd3r41cn00dpnf"))))
7969 (build-system ant-build-system)
7970 (arguments
7971 `(#:jar-name (string-append ,name "-" ,version ".jar")
7972 #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3"
7973 #:tests? #f
7974 #:phases
7975 (modify-phases %standard-phases
7976 (add-after 'install 'bin-install
7977 (lambda* (#:key inputs outputs #:allow-other-keys)
7978 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
7979 (bin (string-append (assoc-ref outputs "out") "/bin")))
7980 (mkdir-p bin)
7981 (with-output-to-file (string-append bin "/antlr3")
7982 (lambda _
7983 (display
7984 (string-append "#!" (which "sh") "\n"
7985 "java -cp " jar "/" ,name "-" ,version ".jar:"
7986 (string-concatenate
7987 (find-files (assoc-ref inputs "stringtemplate")
7988 ".*\\.jar"))
7989 ":"
7990 (string-concatenate
7991 (find-files (assoc-ref inputs "stringtemplate4")
7992 ".*\\.jar"))
7993 ":"
7994 (string-concatenate
7995 (find-files (string-append
7996 (assoc-ref inputs "antlr")
7997 "/lib")
7998 ".*\\.jar"))
7999 " org.antlr.Tool $*"))))
8000 (chmod (string-append bin "/antlr3") #o755))
8001 #t))
8002 (add-before 'build 'generate-grammar
8003 (lambda _
8004 (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/")
8005 (for-each (lambda (file)
8006 (display file)
8007 (newline)
8008 (invoke "antlr3" file))
8009 '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g"
8010 "AssignTokenTypesWalker.g"
8011 "ActionTranslator.g" "TreeToNFAConverter.g"
8012 "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g"
8013 "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g"))
8014 (substitute* "ANTLRParser.java"
8015 (("public Object getTree") "public GrammarAST getTree"))
8016 (substitute* "ANTLRv3Parser.java"
8017 (("public Object getTree") "public CommonTree getTree"))
8018 (chdir "../../../../../java")
8019 (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java"
8020 (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*;
8021 import org.antlr.grammar.v3.ANTLRTreePrinter;"))
8022 (substitute* "org/antlr/tool/ErrorManager.java"
8023 (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") ""))
8024 (chdir "../../../..")
8025 #t))
8026 (add-before 'build 'fix-build-xml
8027 (lambda _
8028 (substitute* "build.xml"
8029 (("target name=\"compile\">")
8030 "target name=\"compile\">
8031 <copy todir=\"${classes.dir}\">
8032 <fileset dir=\"tool/src/main/resources\">
8033 <include name=\"**/*.stg\"/>
8034 <include name=\"**/*.st\"/>
8035 <include name=\"**/*.sti\"/>
8036 <include name=\"**/STLexer.tokens\"/>
8037 </fileset>
8038 </copy>"))
8039 #t)))))
8040 (native-inputs
8041 `(("antlr" ,antlr2)
8042 ("antlr3" ,antlr3-bootstrap)))
8043 (inputs
8044 `(("junit" ,java-junit)
8045 ("stringtemplate" ,java-stringtemplate-3)
8046 ("stringtemplate4" ,java-stringtemplate)))
8047 (propagated-inputs
8048 `(("stringtemplate" ,java-stringtemplate-3)
8049 ("antlr" ,antlr2)
8050 ("stringtemplate4" ,java-stringtemplate-4.0.6)))
8051 (home-page "https://www.antlr3.org")
8052 (synopsis "Framework for constructing recognizers, compilers, and translators")
8053 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
8054 is a language tool that provides a framework for constructing recognizers,
8055 compilers, and translators from grammatical descriptions containing Java, C#,
8056 C++, or Python actions. ANTLR provides excellent support for tree construction,
8057 tree walking, and translation.")
8058 (license license:bsd-3)))
8059
8060 (define antlr3-bootstrap
8061 (package
8062 (inherit antlr3)
8063 (name "antlr3-bootstrap")
8064 (native-inputs
8065 `(("antlr" ,antlr2)
8066 ("antlr3" ,antlr3-3.3)))
8067 (inputs
8068 `(("junit" ,java-junit)))))
8069
8070 (define-public antlr3-3.3
8071 (package
8072 (inherit antlr3)
8073 (name "antlr3")
8074 (version "3.3")
8075 (source (origin
8076 (method url-fetch)
8077 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
8078 "gh-pages/download/antlr-"
8079 version ".tar.gz"))
8080 (sha256
8081 (base32
8082 "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m"))
8083 (patches
8084 (search-patches "antlr3-3_3-fix-java8-compilation.patch"))))
8085 (arguments
8086 `(#:jar-name (string-append ,name "-" ,version ".jar")
8087 #:source-dir (string-join '("tool/src/main/java"
8088 "runtime/Java/src/main/java"
8089 "tool/src/main/antlr2"
8090 "tool/src/main/antlr3")
8091 ":")
8092 #:tests? #f ; FIXME: tests seem to require maven plugin
8093 #:modules ((guix build ant-build-system)
8094 (guix build utils)
8095 (srfi srfi-1))
8096 #:phases
8097 (modify-phases %standard-phases
8098 (add-after 'install 'bin-install
8099 (lambda* (#:key inputs outputs #:allow-other-keys)
8100 (let* ((out (assoc-ref outputs "out"))
8101 (jar (string-append out "/share/java"))
8102 (bin (string-append out "/bin")))
8103 (mkdir-p bin)
8104 (with-output-to-file (string-append bin "/antlr3")
8105 (lambda _
8106 (display
8107 (string-append
8108 "#!" (which "sh") "\n"
8109 "java -cp " jar "/antlr3-3.3.jar:"
8110 (string-join
8111 (append (find-files (assoc-ref inputs "java-stringtemplate")
8112 ".*\\.jar$")
8113 (find-files (string-append (assoc-ref inputs "antlr")
8114 "/lib")
8115 ".*\\.jar$"))
8116 ":")
8117 " org.antlr.Tool $*"))))
8118 (chmod (string-append bin "/antlr3") #o755)
8119 #t)))
8120 (add-before 'build 'generate-grammar
8121 (lambda _
8122 (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java"
8123 (("import org.antlr.grammar.v2.\\*;")
8124 "import org.antlr.grammar.v2.*;\n
8125 import org.antlr.grammar.v2.TreeToNFAConverter;\n
8126 import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n
8127 import org.antlr.grammar.v2.ANTLRTreePrinter;"))
8128 (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/"
8129 (for-each (lambda (file)
8130 (format #t "~a\n" file)
8131 (invoke "antlr" file))
8132 '("antlr.g" "antlr.print.g" "assign.types.g"
8133 "buildnfa.g" "codegen.g" "define.g")))
8134 (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/"
8135 (for-each (lambda (file)
8136 (format #t "~a\n" file)
8137 (invoke "antlr3" file))
8138 '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g"
8139 "ANTLRv3Tree.g")))
8140 #t))
8141 (add-before 'build 'fix-build-xml
8142 (lambda _
8143 (substitute* "build.xml"
8144 (("target name=\"compile\">")
8145 "target name=\"compile\">
8146 <copy todir=\"${classes.dir}\">
8147 <fileset dir=\"tool/src/main/resources\">
8148 <include name=\"**/*.stg\"/>
8149 <include name=\"**/*.st\"/>
8150 <include name=\"**/*.sti\"/>
8151 <include name=\"**/STLexer.tokens\"/>
8152 </fileset>
8153 </copy>"))
8154 #t)))))
8155 (native-inputs
8156 `(("antlr" ,antlr2)
8157 ("antlr3" ,antlr3-3.1)))
8158 (inputs
8159 `(("junit" ,java-junit)))
8160 (propagated-inputs
8161 `(("java-stringtemplate" ,java-stringtemplate-3)
8162 ("antlr" ,antlr2)))))
8163
8164 (define-public antlr3-3.1
8165 (package
8166 (inherit antlr3)
8167 (version "3.1")
8168 (source (origin
8169 (method url-fetch)
8170 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
8171 "gh-pages/download/antlr-"
8172 version ".tar.gz"))
8173 (sha256
8174 (base32
8175 "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z"))
8176 (patches
8177 (search-patches "antlr3-3_1-fix-java8-compilation.patch"))))
8178 (arguments
8179 `(#:jar-name (string-append "antlr3-" ,version ".jar")
8180 #:source-dir "src:runtime/Java/src"
8181 #:tests? #f
8182 #:phases
8183 (modify-phases %standard-phases
8184 (add-after 'install 'bin-install
8185 (lambda* (#:key inputs outputs #:allow-other-keys)
8186 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
8187 (bin (string-append (assoc-ref outputs "out") "/bin")))
8188 (mkdir-p bin)
8189 (with-output-to-file (string-append bin "/antlr3")
8190 (lambda _
8191 (display
8192 (string-append "#!" (which "sh") "\n"
8193 "java -cp " jar "/antlr3-3.1.jar:"
8194 (string-concatenate
8195 (find-files (assoc-ref inputs "stringtemplate")
8196 ".*\\.jar"))
8197 ":"
8198 (string-concatenate
8199 (find-files (string-append
8200 (assoc-ref inputs "antlr")
8201 "/lib")
8202 ".*\\.jar"))
8203 " org.antlr.Tool $*"))))
8204 (chmod (string-append bin "/antlr3") #o755))
8205 #t))
8206 (add-before 'build 'generate-grammar
8207 (lambda _
8208 (let ((dir "src/org/antlr/tool/"))
8209 (for-each (lambda (file)
8210 (display file)
8211 (newline)
8212 (invoke "antlr" "-o" dir (string-append dir file)))
8213 '("antlr.g" "antlr.print.g" "assign.types.g"
8214 "buildnfa.g" "define.g")))
8215 (format #t "codegen.g\n")
8216 (invoke "antlr" "-o" "src/org/antlr/codegen"
8217 "src/org/antlr/codegen/codegen.g")
8218 #t))
8219 (add-before 'build 'fix-build-xml
8220 (lambda _
8221 (substitute* "build.xml"
8222 (("target name=\"compile\">")
8223 "target name=\"compile\">
8224 <copy todir=\"${classes.dir}\">
8225 <fileset dir=\"src\">
8226 <include name=\"**/*.stg\"/>
8227 <include name=\"**/*.st\"/>
8228 <include name=\"**/*.sti\"/>
8229 <include name=\"**/STLexer.tokens\"/>
8230 </fileset>
8231 </copy>"))
8232 #t)))))
8233 (native-inputs
8234 `(("antlr" ,antlr2)))
8235 (inputs
8236 `(("junit" ,java-junit)))
8237 (propagated-inputs
8238 `(("stringtemplate" ,java-stringtemplate-3)))))
8239
8240 (define-public java-treelayout
8241 (package
8242 (name "java-treelayout")
8243 (version "1.0.3")
8244 (source (origin
8245 (method git-fetch)
8246 (uri (git-reference
8247 (url "https://github.com/abego/treelayout")
8248 (commit (string-append "v" version))))
8249 (file-name (git-file-name name version))
8250 (sha256
8251 (base32
8252 "18my8ql9b1y0n0zrvkih7xfhf3dpgfhyfifvkcfhmwcvw3divxak"))))
8253 (build-system ant-build-system)
8254 (arguments
8255 `(#:jar-name (string-append ,name "-" ,version ".jar")
8256 #:source-dir "org.abego.treelayout/src/main/java"
8257 #:test-dir "org.abego.treelayout/src/test"))
8258 (inputs
8259 `(("java-junit" ,java-junit)))
8260 (native-inputs
8261 `(("java-hamcrest-core" ,java-hamcrest-core)))
8262 (home-page "http://treelayout.sourceforge.net")
8263 (synopsis "Tree Layout Algorithm in Java")
8264 (description "TreeLayout creates tree layouts for arbitrary trees. It is
8265 not restricted to a specific output or format, but can be used for any kind of
8266 two dimensional diagram. Examples are Swing based components, SVG files, etc.
8267 This is possible because TreeLayout separates the layout of a tree from the
8268 actual rendering.")
8269 (license license:bsd-3)))
8270
8271 (define-public java-antlr4-runtime
8272 (package
8273 (name "java-antlr4-runtime")
8274 (version "4.8")
8275 (source (origin
8276 (method git-fetch)
8277 (uri (git-reference
8278 (url "https://github.com/antlr/antlr4")
8279 (commit version)))
8280 (file-name (git-file-name name version))
8281 (sha256
8282 (base32
8283 "1qal3add26qxskm85nk7r758arladn5rcyjinmhlhznmpbbv9j8m"))
8284 (patches
8285 (search-patches "java-antlr4-Add-standalone-generator.patch"
8286 "java-antlr4-fix-code-too-large.java"))))
8287 (build-system ant-build-system)
8288 (arguments
8289 `(#:jar-name "java-antlr4-runtime.jar"
8290 #:source-dir "runtime/Java/src/org"
8291 #:tests? #f; tests depend on java-antlr4 itself
8292 #:phases
8293 (modify-phases %standard-phases
8294 (add-before 'build 'copy-resources
8295 (lambda _
8296 (copy-recursively "runtime/Java/src/main/dot"
8297 "build/classes")
8298 #t)))))
8299 (home-page "https://antlr.org")
8300 (synopsis "ANTLR runtime library")
8301 (description "This package contains the runtime library used with generated
8302 sources by ANTLR.")
8303 (license license:bsd-3)))
8304
8305 (define-public antlr4
8306 (package
8307 (inherit java-antlr4-runtime)
8308 (name "antlr4")
8309 (arguments
8310 `(#:jar-name "antlr4.jar"
8311 #:source-dir "tool/src"
8312 #:test-dir "tool-testsuite/test:runtime-testsuite/test:runtime-testsuite/annotations/src"
8313 #:test-include (list "**/Test*.java")
8314 #:test-exclude (list
8315 ;; no runnable method
8316 "**/TestOutputReading.java"
8317 ;; no @Test methods
8318 "**/TestParserErrors.java"
8319 "**/TestSemPredEvalParser.java"
8320 "**/TestSets.java"
8321 "**/TestListeners.java"
8322 "**/TestParseTrees.java"
8323 "**/TestParserExec.java"
8324 "**/TestLexerErrors.java"
8325 "**/TestPerformance.java"
8326 "**/TestCompositeParsers.java"
8327 "**/TestLexerExec.java"
8328 "**/TestSemPredEvalLexer.java"
8329 "**/TestLeftRecursion.java"
8330 "**/TestFullContextParsing.java"
8331 "**/TestCompositeLexers.java"
8332 ;; Null pointer exception
8333 "**/TestCompositeGrammars.java"
8334 ;; Wrong assumption on emoji
8335 "**/TestUnicodeData.java")
8336 #:phases
8337 (modify-phases %standard-phases
8338 (add-before 'build 'fix-build.xml
8339 (lambda _
8340 ;; tests are not in a java subdirectory
8341 (substitute* "build.xml"
8342 (("\\$\\{test.home\\}/java") "${test.home}"))
8343 #t))
8344 ;; tests require to have a working antlr4 binary
8345 (delete 'check)
8346 (add-after 'bin-install 'check
8347 (lambda _
8348 (invoke "ant" "compile-tests")
8349 (invoke "ant" "check" "-Dtest.home=runtime-testsuite/annotations/src")
8350 (invoke "ant" "check" "-Dtest.home=runtime-testsuite/test")
8351 (invoke "ant" "check" "-Dtest.home=tool-testsuite/test")
8352 #t))
8353 (add-before 'check 'remove-unrelated-languages
8354 (lambda _
8355 ;; There are tests for other languages that ANTLR can generate, but
8356 ;; we don't have the infrastructure for that yet. Let's test Java
8357 ;; generation only.
8358 (for-each
8359 (lambda (language)
8360 (delete-file-recursively
8361 (string-append "runtime-testsuite/test/org/antlr/v4/test/runtime/"
8362 language)))
8363 '("cpp" "csharp" "go" "javascript" "php" "python" "python2"
8364 "python3" "swift"))
8365 #t))
8366 (add-before 'check 'generate-test-parsers
8367 (lambda* (#:key outputs #:allow-other-keys)
8368 (define (run-antlr dir filename package)
8369 (invoke "antlr4" "-lib" dir "-visitor" "-no-listener"
8370 "-package" package (string-append dir "/" filename)
8371 "-Xlog"))
8372 (setenv "PATH" (string-append (getenv "PATH") ":"
8373 (assoc-ref outputs "out") "/bin"))
8374 (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api"
8375 "Java.g4" "org.antlr.v4.test.runtime.java.api")
8376 (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api"
8377 "VisitorBasic.g4" "org.antlr.v4.test.runtime.java.api")
8378 (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api"
8379 "VisitorCalc.g4" "org.antlr.v4.test.runtime.java.api")
8380 #t))
8381 (add-before 'check 'remove-graphemes
8382 (lambda _
8383 ;; When running antlr on grahemes.g4, we get a runtime exception:
8384 ;; set is empty. So delete the file that depends on it.
8385 (delete-file
8386 "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api/perf/TimeLexerSpeed.java")
8387 #t))
8388 (add-after 'install 'bin-install
8389 (lambda* (#:key inputs outputs #:allow-other-keys)
8390 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
8391 (bin (string-append (assoc-ref outputs "out") "/bin")))
8392 (mkdir-p bin)
8393 (with-output-to-file (string-append bin "/antlr4")
8394 (lambda _
8395 (display
8396 (string-append "#!" (which "sh") "\n"
8397 "java -cp " jar "/antlr4.jar:"
8398 (string-join
8399 (apply
8400 append
8401 (map
8402 (lambda (input)
8403 (find-files (assoc-ref inputs input)
8404 ".*\\.jar"))
8405 '("antlr3" "java-stringtemplate"
8406 "java-antlr4-runtime" "java-treelayout"
8407 "java-jsonp-api" "java-icu4j")))
8408 ":")
8409 " org.antlr.v4.Tool $*"))))
8410 (chmod (string-append bin "/antlr4") #o755)
8411 #t)))
8412 (add-before 'build 'copy-resources
8413 (lambda _
8414 (copy-recursively "tool/resources/" "build/classes")
8415 #t))
8416 (add-before 'build 'generate-unicode
8417 (lambda _
8418 ;; First: build the generator
8419 (invoke "javac" "-cp" (getenv "CLASSPATH")
8420 "tool/src/org/antlr/v4/unicode/UnicodeRenderer.java"
8421 "tool/src/org/antlr/v4/unicode/UnicodeDataTemplateController.java")
8422 ;; Then use it
8423 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8424 ":tool/src:runtime/Java")
8425 "org.antlr.v4.unicode.UnicodeRenderer"
8426 "tool/resources/org/antlr/v4/tool/templates"
8427 "unicodedata"
8428 "tool/src/org/antlr/v4/unicode/UnicodeData.java")
8429 ;; It seems there is a bug with our ST4
8430 (substitute* "tool/src/org/antlr/v4/unicode/UnicodeData.java"
8431 (("\\\\>") ">"))
8432 ;; Remove the additional file
8433 (delete-file "tool/src/org/antlr/v4/unicode/UnicodeRenderer.java")
8434 #t))
8435 (add-before 'build 'generate-grammar
8436 (lambda* (#:key inputs #:allow-other-keys)
8437 (with-directory-excursion "tool/src/org/antlr/v4/parse"
8438 (for-each (lambda (file)
8439 (display file)
8440 (newline)
8441 (invoke "antlr3" file))
8442 '("ANTLRLexer.g" "ANTLRParser.g" "BlockSetTransformer.g"
8443 "GrammarTreeVisitor.g" "ATNBuilder.g"
8444 "ActionSplitter.g" "LeftRecursiveRuleWalker.g")))
8445 (with-directory-excursion "tool/src/org/antlr/v4/codegen"
8446 (install-file "../parse/ANTLRParser.tokens" ".")
8447 (display "SourceGenTriggers.g\n")
8448 (invoke "antlr3" "SourceGenTriggers.g"))
8449 #t)))))
8450 (inputs
8451 `(("antlr3" ,antlr3)
8452 ("java-antlr4-runtime" ,java-antlr4-runtime)
8453 ("java-icu4j" ,java-icu4j)
8454 ("java-jsonp-api" ,java-jsonp-api)
8455 ("java-stringtemplate" ,java-stringtemplate)
8456 ("java-treelayout" ,java-treelayout)))
8457 (native-inputs
8458 `(("java-junit" ,java-junit)))
8459 (synopsis "Parser and lexer generator in Java")
8460 (description "ANTLR (ANother Tool for Language Recognition) is a powerful
8461 parser generator for reading, processing, executing, or translating structured
8462 text or binary files. It's widely used to build languages, tools, and
8463 frameworks. From a grammar, ANTLR generates a parser that can build and walk
8464 parse trees.")))
8465
8466 (define-public java-antlr4-runtime-4.1
8467 (package
8468 (inherit java-antlr4-runtime)
8469 (version "4.1")
8470 (source (origin
8471 (method git-fetch)
8472 (uri (git-reference
8473 (url "https://github.com/antlr/antlr4")
8474 (commit version)))
8475 (file-name (git-file-name "antlr4" version))
8476 (sha256
8477 (base32
8478 "1i8hmx5an58cjyvhji0xgpvd6lq00z1k1mjys025q2wqc25wv4c1"))))
8479 (arguments
8480 (substitute-keyword-arguments (package-arguments java-antlr4-runtime)
8481 ((#:phases phases)
8482 `(modify-phases ,phases
8483 (add-before 'configure 'chmod
8484 (lambda _
8485 (chmod "build.xml" #o644)
8486 #t))))))
8487 (inputs
8488 `(("java-treelayout" ,java-treelayout)))))
8489
8490 (define-public antlr4-4.1
8491 (package
8492 (inherit antlr4)
8493 (version (package-version java-antlr4-runtime-4.1))
8494 (source (package-source java-antlr4-runtime-4.1))
8495 (arguments
8496 (substitute-keyword-arguments (package-arguments antlr4)
8497 ((#:test-dir _)
8498 "tool/test")
8499 ((#:test-exclude excludes)
8500 `(list "**/TestParseErrors.java"
8501 "**/TestTopologicalSort.java"
8502 ,@excludes))
8503 ((#:phases phases)
8504 `(modify-phases ,phases
8505 (delete 'generate-unicode)
8506 (replace 'check
8507 (lambda _
8508 (invoke "ant" "check")
8509 #t))
8510 (add-before 'configure 'chmod
8511 (lambda _
8512 (chmod "build.xml" #o644)
8513 #t))
8514 (delete 'remove-graphemes)
8515 (delete 'remove-unrelated-languages)
8516 (delete 'generate-test-parsers)))))
8517 (inputs
8518 (alist-replace
8519 "java-antlr4-runtime" (list java-antlr4-runtime-4.1)
8520 (package-inputs antlr4)))))
8521
8522 (define-public java-tunnelvisionlabs-antlr4-runtime-annotations
8523 (package
8524 (inherit java-antlr4-runtime)
8525 (name "java-tunnelvisionlabs-antlr4-runtime-annotations")
8526 (version "4.7.4")
8527 (source (origin
8528 (method git-fetch)
8529 (uri (git-reference
8530 (url "https://github.com/tunnelvisionlabs/antlr4")
8531 (commit (string-append version "-opt"))))
8532 (file-name (git-file-name "java-tunnelvisionlabs-antlr4" version))
8533 (sha256
8534 (base32
8535 "1mf2lvvsszpialsk23ma83pwp50nd32lrbjpa847zlm5gmranbr8"))
8536 (patches
8537 (search-patches "java-antlr4-Add-standalone-generator.patch"
8538 "java-tunnelvisionlabs-antlr-code-too-large.patch"))))
8539 (arguments
8540 `(#:jar-name "java-antlr4-runtime-annotations.jar"
8541 #:source-dir "runtime/JavaAnnotations/src"
8542 #:tests? #f; no tests
8543 #:phases
8544 (modify-phases %standard-phases
8545 (add-after 'build 'copy-resources
8546 (lambda _
8547 (copy-recursively "runtime/JavaAnnotations/resources"
8548 "build/classes")
8549 #t))
8550 (add-after 'copy-resources 'rebuild-jar
8551 (lambda _
8552 (invoke "ant" "jar")
8553 #t)))))
8554 (inputs '())
8555 (native-inputs '())
8556 (synopsis "Annotations for ANTLR's runtime library")
8557 (description "This package contains annotations used during the build of
8558 the runtime library of ANTLR.")))
8559
8560 ;; the runtime of this library requires a lexer that is generated by antlr4.
8561 ;; However, antlr4 itself requires this library at build and run-time. We
8562 ;; use antlr4@4.1, the closest version of antlr that doesn't need this
8563 ;; bootstrap process, to generate the lexer. The generated lexer is built
8564 ;; for the 4.1 runtime, which is slightly different from this runtime.
8565 ;; So, we build the runtime with antlr 4.1, with a broken xml lexer, that we
8566 ;; use to build antlr4. We then re-use this antlr4 to build the runtime, and
8567 ;; the proper, working, runtime to build antlr4 again.
8568 (define java-tunnelvisionlabs-antlr4-runtime-bootstrap
8569 (package
8570 (inherit java-antlr4-runtime)
8571 (name "java-tunnelvisionlabs-antlr4-runtime")
8572 (version (package-version java-tunnelvisionlabs-antlr4-runtime-annotations))
8573 (source (package-source java-tunnelvisionlabs-antlr4-runtime-annotations))
8574 (arguments
8575 `(#:jar-name "java-antlr4-runtime.jar"
8576 #:source-dir "runtime/Java/src"
8577 #:tests? #f; tests require antlr4, but antlr4 depends on this package
8578 #:phases
8579 (modify-phases %standard-phases
8580 (add-before 'build 'generate-xpath-lexer
8581 (lambda _
8582 (invoke "antlr4" "-lib" "runtime/Java/src/org/antlr/v4/runtime/tree/xpath"
8583 "-visitor" "-no-listener"
8584 "-package" "org.antlr.v4.runtime.tree.xpath"
8585 "runtime/Java/src/org/antlr/v4/runtime/tree/xpath/XPathLexer.g4")
8586 ;; Generated code is for an incompatible version of the runtime
8587 (substitute* "runtime/Java/src/org/antlr/v4/runtime/tree/xpath/XPathLexer.java"
8588 (("LexerATNSimulator\\(this,_ATN,_decisionToDFA,_sharedContextCache\\)")
8589 "LexerATNSimulator(this,_ATN)"))
8590 #t))
8591 (add-before 'build 'copy-resources
8592 (lambda _
8593 (copy-recursively "runtime/Java/src/main/dot"
8594 "build/classes")
8595 #t)))))
8596 (native-inputs
8597 `(("antlr4" ,antlr4-4.1)
8598 ("java-tunnelvisionlabs-antlr4-runtime-annotations"
8599 ,java-tunnelvisionlabs-antlr4-runtime-annotations)))))
8600
8601 (define java-tunnelvisionlabs-antlr4-bootstrap
8602 (package
8603 (inherit antlr4)
8604 (name "java-tunnelvisionlabs-antlr4")
8605 (version (package-version java-tunnelvisionlabs-antlr4-runtime-annotations))
8606 (source (package-source java-tunnelvisionlabs-antlr4-runtime-annotations))
8607 (arguments
8608 (substitute-keyword-arguments (package-arguments antlr4)
8609 ((#:test-dir _)
8610 "tool/test:runtime-testsuite/src")
8611 ((#:phases phases)
8612 `(modify-phases ,phases
8613 (delete 'remove-unrelated-languages)
8614 (delete 'remove-graphemes)
8615 (delete 'generate-test-parsers)
8616 (delete 'check)))))
8617 (native-inputs '())
8618 (inputs
8619 `(("antlr3" ,antlr3)
8620 ("java-antlr4-runtime" ,java-tunnelvisionlabs-antlr4-runtime-bootstrap)
8621 ("java-tunnelvisionlabs-antlr4-runtime-annotations"
8622 ,java-tunnelvisionlabs-antlr4-runtime-annotations)
8623 ("java-icu4j" ,java-icu4j)
8624 ("java-jsonp-api" ,java-jsonp-api)
8625 ("java-stringtemplate" ,java-stringtemplate)
8626 ("java-treelayout" ,java-treelayout)))))
8627
8628 (define-public java-tunnelvisionlabs-antlr4-runtime
8629 (package
8630 (inherit java-tunnelvisionlabs-antlr4-runtime-bootstrap)
8631 (native-inputs
8632 (alist-replace
8633 "antlr4" (list java-tunnelvisionlabs-antlr4-bootstrap)
8634 (package-native-inputs java-tunnelvisionlabs-antlr4-runtime-bootstrap)))))
8635
8636 (define-public java-tunnelvisionlabs-antlr4
8637 (package
8638 (inherit java-tunnelvisionlabs-antlr4-bootstrap)
8639 (inputs
8640 (alist-replace
8641 "java-antlr4-runtime" (list java-tunnelvisionlabs-antlr4-runtime)
8642 (package-inputs java-tunnelvisionlabs-antlr4-bootstrap)))))
8643
8644 (define-public java-commons-cli-1.2
8645 ;; This is a bootstrap dependency for Maven2.
8646 (package
8647 (inherit java-commons-cli)
8648 (version "1.2")
8649 (source (origin
8650 (method url-fetch)
8651 (uri (string-append "mirror://apache/commons/cli/source/"
8652 "commons-cli-" version "-src.tar.gz"))
8653 (sha256
8654 (base32
8655 "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm"))))
8656 (arguments
8657 `(#:jar-name "commons-cli.jar"
8658 #:phases
8659 (modify-phases %standard-phases
8660 (add-before 'check 'fix-build-xml
8661 (lambda* (#:key inputs #:allow-other-keys)
8662 (substitute* "build.xml"
8663 (("dir=\"\\$\\{test.home\\}/java\"")
8664 "dir=\"${test.home}\""))
8665 #t)))))
8666 (native-inputs
8667 `(("java-junit" ,java-junit)))))
8668
8669 (define-public java-microemulator-cldc
8670 (package
8671 (name "java-microemulator-cldc")
8672 (version "2.0.4")
8673 (source (origin
8674 (method url-fetch)
8675 (uri (string-append "https://github.com/barteo/microemu/archive/"
8676 "microemulator_"
8677 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
8678 version)
8679 ".tar.gz"))
8680 (file-name (string-append name "-" version ".tar.gz"))
8681 (sha256
8682 (base32
8683 "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll"))))
8684 (build-system ant-build-system)
8685 (arguments
8686 `(#:jar-name "microemulator-cldc.jar"
8687 #:source-dir "microemu-cldc/src/main/java"
8688 #:tests? #f)); Requires even older software
8689 (home-page "https://github.com/barteo/microemu")
8690 (synopsis "J2ME CLDC emulator")
8691 (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP
8692 Emulator. It demonstrates MIDlet based applications in web browser
8693 applet and can be run as a standalone java application.")
8694 (license (list license:asl2.0
8695 ;; or altenatively:
8696 license:lgpl2.1+))))
8697
8698 (define-public java-datanucleus-javax-persistence
8699 (package
8700 (name "java-datanucleus-javax-persistence")
8701 (version "2.2.0")
8702 (source (origin
8703 (method url-fetch)
8704 (uri (string-append "https://github.com/datanucleus/"
8705 "javax.persistence/archive/javax.persistence-"
8706 version "-release.tar.gz"))
8707 (sha256
8708 (base32
8709 "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx"))))
8710 (build-system ant-build-system)
8711 (arguments
8712 `(#:jar-name "java-datanucleus-javax-persistence.jar"
8713 #:jdk ,icedtea-8
8714 #:source-dir "src/main/java"
8715 #:tests? #f)); no tests
8716 (home-page "https://github.com/datanucleus/javax.persistence")
8717 (synopsis "JPA API")
8718 (description "This package contains a clean definition of JPA API intended
8719 for use with DataNucleus JPA since the JCP haven't provided an official JPA API
8720 jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification
8721 used to generate this API.")
8722 (license (list license:edl1.0 license:epl1.0))))
8723
8724 (define-public java-osgi-cmpn
8725 (package
8726 (name "java-osgi-cmpn")
8727 (version "6.0.0")
8728 (source (origin
8729 (method url-fetch)
8730 (uri (string-append "https://repo1.maven.org/maven2/"
8731 "org/osgi/osgi.cmpn/" version "/osgi.cmpn-"
8732 version "-sources.jar"))
8733 (sha256
8734 (base32
8735 "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys"))))
8736 (build-system ant-build-system)
8737 (arguments
8738 `(#:jar-name "osgi-cmpn.jar"
8739 #:tests? #f)); no tests
8740 (inputs
8741 `(("annotation" ,java-osgi-annotation)
8742 ("core" ,java-osgi-core)
8743 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
8744 ("microemulator" ,java-microemulator-cldc)
8745 ("servlet" ,java-classpathx-servletapi)))
8746 (home-page "https://www.osgi.org")
8747 (synopsis "Compendium specification module of OSGi framework")
8748 (description
8749 "OSGi, for Open Services Gateway initiative framework, is a module system
8750 and service platform for the Java programming language. This package contains
8751 the compendium specification module, providing interfaces and classes for use
8752 in compiling bundles.")
8753 (license license:asl2.0)))
8754
8755 (define-public java-osgi-service-component-annotations
8756 (package
8757 (name "java-osgi-service-component-annotations")
8758 (version "1.3.0")
8759 (source (origin
8760 (method url-fetch)
8761 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8762 "org.osgi.service.component.annotations/"
8763 version "/org.osgi.service.component.annotations-"
8764 version "-sources.jar"))
8765 (sha256
8766 (base32
8767 "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0"))))
8768 (build-system ant-build-system)
8769 (arguments
8770 `(#:jar-name "osgi-service-component-annotations.jar"
8771 #:tests? #f)); no tests
8772 (inputs
8773 `(("annotation" ,java-osgi-annotation)))
8774 (home-page "https://www.osgi.org")
8775 (synopsis "Support annotations for osgi-service-component")
8776 (description
8777 "OSGi, for Open Services Gateway initiative framework, is a module system
8778 and service platform for the Java programming language. This package contains
8779 the support annotations for osgi-service-component.")
8780 (license license:asl2.0)))
8781
8782 (define-public java-osgi-dto
8783 (package
8784 (name "java-osgi-dto")
8785 (version "1.0.0")
8786 (source (origin
8787 (method url-fetch)
8788 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8789 "org.osgi.dto/" version "/org.osgi.dto-"
8790 version "-sources.jar"))
8791 (sha256
8792 (base32
8793 "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr"))))
8794 (build-system ant-build-system)
8795 (arguments
8796 `(#:jar-name "osgi-dto.jar"
8797 #:tests? #f)); no tests
8798 (inputs
8799 `(("annotation" ,java-osgi-annotation)))
8800 (home-page "https://www.osgi.org")
8801 (synopsis "Data Transfer Objects")
8802 (description
8803 "OSGi, for Open Services Gateway initiative framework, is a module system
8804 and service platform for the Java programming language. This package contains
8805 the Data Transfer Objects. It is easily serializable having only public fields
8806 of primitive types and their wrapper classes, Strings, and DTOs. List, Set,
8807 Map and array aggregates may also be used. The aggregates must only hold
8808 objects of the listed types or aggregates.")
8809 (license license:asl2.0)))
8810
8811 (define-public java-osgi-resource
8812 (package
8813 (name "java-osgi-resource")
8814 (version "1.0.0")
8815 (source (origin
8816 (method url-fetch)
8817 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8818 "org.osgi.resource/"
8819 version "/org.osgi.resource-"
8820 version "-sources.jar"))
8821 (sha256
8822 (base32
8823 "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d"))))
8824 (build-system ant-build-system)
8825 (arguments
8826 `(#:jar-name "osgi-resource.jar"
8827 #:tests? #f)); no tests
8828 (inputs
8829 `(("annotation" ,java-osgi-annotation)
8830 ("dto" ,java-osgi-dto)))
8831 (home-page "https://www.osgi.org")
8832 (synopsis "OSGI Resource")
8833 (description
8834 "OSGi, for Open Services Gateway initiative framework, is a module system
8835 and service platform for the Java programming language. This package contains
8836 the definition of common types in osgi packages.")
8837 (license license:asl2.0)))
8838
8839 (define-public java-osgi-namespace-contract
8840 (package
8841 (name "java-osgi-namespace-contract")
8842 (version "1.0.0")
8843 (source (origin
8844 (method url-fetch)
8845 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8846 "org.osgi.namespace.contract/"
8847 version "/org.osgi.namespace.contract-"
8848 version "-sources.jar"))
8849 (sha256
8850 (base32
8851 "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36"))))
8852 (build-system ant-build-system)
8853 (inputs
8854 `(("resource" ,java-osgi-resource)
8855 ("annotation" ,java-osgi-annotation)))
8856 (arguments
8857 `(#:jar-name "osgi-namespace-contract.jar"
8858 #:tests? #f)); no tests
8859 (home-page "https://www.osgi.org")
8860 (synopsis "Contract Capability and Requirement Namespace")
8861 (description
8862 "OSGi, for Open Services Gateway initiative framework, is a module system
8863 and service platform for the Java programming language. This package contains
8864 the names for the attributes and directives for a namespace with contracts.")
8865 (license license:asl2.0)))
8866
8867 (define-public java-osgi-namespace-extender
8868 (package
8869 (name "java-osgi-namespace-extender")
8870 (version "1.0.1")
8871 (source (origin
8872 (method url-fetch)
8873 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8874 "org.osgi.namespace.extender/"
8875 version "/org.osgi.namespace.extender-"
8876 version "-sources.jar"))
8877 (sha256
8878 (base32
8879 "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz"))))
8880 (build-system ant-build-system)
8881 (inputs
8882 `(("resource" ,java-osgi-resource)
8883 ("annotation" ,java-osgi-annotation)))
8884 (arguments
8885 `(#:jar-name "osgi-namespace-extendent.jar"
8886 #:tests? #f)); no tests
8887 (home-page "https://www.osgi.org")
8888 (synopsis "Extender Capability and Requirement Namespace")
8889 (description
8890 "OSGi, for Open Services Gateway initiative framework, is a module system
8891 and service platform for the Java programming language. This package contains
8892 the names for the attributes and directives for an extender namespace.")
8893 (license license:asl2.0)))
8894
8895 (define-public java-osgi-namespace-service
8896 (package
8897 (name "java-osgi-namespace-service")
8898 (version "1.0.0")
8899 (source (origin
8900 (method url-fetch)
8901 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8902 "org.osgi.namespace.service/"
8903 version "/org.osgi.namespace.service-"
8904 version "-sources.jar"))
8905 (sha256
8906 (base32
8907 "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8"))))
8908 (build-system ant-build-system)
8909 (inputs
8910 `(("resource" ,java-osgi-resource)
8911 ("annotation" ,java-osgi-annotation)))
8912 (arguments
8913 `(#:jar-name "osgi-namespace-service.jar"
8914 #:tests? #f)); no tests
8915 (home-page "https://www.osgi.org")
8916 (synopsis "Service Capability and Requirement Namespace")
8917 (description
8918 "OSGi, for Open Services Gateway initiative framework, is a module system
8919 and service platform for the Java programming language. This package contains
8920 the names for the attributes and directives for a service namespace.")
8921 (license license:asl2.0)))
8922
8923 (define-public java-osgi-util-function
8924 (package
8925 (name "java-osgi-util-function")
8926 (version "1.0.0")
8927 (source (origin
8928 (method url-fetch)
8929 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8930 "org.osgi.util.function/"
8931 version "/org.osgi.util.function-"
8932 version "-sources.jar"))
8933 (sha256
8934 (base32
8935 "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x"))))
8936 (build-system ant-build-system)
8937 (arguments
8938 `(#:jar-name "osgi-util-function.jar"
8939 #:tests? #f)); no tests
8940 (inputs
8941 `(("annotation" ,java-osgi-annotation)))
8942 (home-page "https://www.osgi.org")
8943 (synopsis "OSGI Util Function")
8944 (description
8945 "OSGi, for Open Services Gateway initiative framework, is a module system
8946 and service platform for the Java programming language. This package contains
8947 an interface for a function that accepts a single argument and produces a result.")
8948 (license license:asl2.0)))
8949
8950 (define-public java-osgi-util-promise
8951 (package
8952 (name "java-osgi-util-promise")
8953 (version "1.0.0")
8954 (source (origin
8955 (method url-fetch)
8956 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8957 "org.osgi.util.promise/"
8958 version "/org.osgi.util.promise-"
8959 version "-sources.jar"))
8960 (sha256
8961 (base32
8962 "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c"))))
8963 (build-system ant-build-system)
8964 (arguments
8965 `(#:jar-name "osgi-util-promise.jar"
8966 #:tests? #f)); no tests
8967 (inputs
8968 `(("annotation" ,java-osgi-annotation)
8969 ("function" ,java-osgi-util-function)))
8970 (home-page "https://www.osgi.org")
8971 (synopsis "Promise of a value")
8972 (description
8973 "OSGi, for Open Services Gateway initiative framework, is a module system
8974 and service platform for the Java programming language. This package contains
8975 an interface and utilitary classes for promises. A Promise represents a future
8976 value. It handles the interactions for asynchronous processing.")
8977 (license license:asl2.0)))
8978
8979 (define-public java-osgi-service-metatype-annotations
8980 (package
8981 (name "java-osgi-service-metatype-annotations")
8982 (version "1.3.0")
8983 (source (origin
8984 (method url-fetch)
8985 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8986 "org.osgi.service.metatype.annotations/"
8987 version "/org.osgi.service.metatype.annotations-"
8988 version "-sources.jar"))
8989 (sha256
8990 (base32
8991 "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6"))))
8992 (build-system ant-build-system)
8993 (arguments
8994 `(#:jar-name "osgi-service-metatype-annotations.jar"
8995 #:tests? #f)); no tests
8996 (inputs
8997 `(("annotation" ,java-osgi-annotation)))
8998 (home-page "https://www.osgi.org")
8999 (synopsis "Support annotations for metatype")
9000 (description
9001 "OSGi, for Open Services Gateway initiative framework, is a module system
9002 and service platform for the Java programming language. This package contains
9003 the support annotations for metatype.")
9004 (license license:asl2.0)))
9005
9006 (define-public java-osgi-service-repository
9007 (package
9008 (name "java-osgi-service-repository")
9009 (version "1.1.0")
9010 (source (origin
9011 (method url-fetch)
9012 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9013 "org.osgi.service.repository/"
9014 version "/org.osgi.service.repository-"
9015 version "-sources.jar"))
9016 (sha256
9017 (base32
9018 "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n"))))
9019 (build-system ant-build-system)
9020 (arguments
9021 `(#:jar-name "osgi-service-repository.jar"
9022 #:tests? #f)); no tests
9023 (inputs
9024 `(("annotation" ,java-osgi-annotation)
9025 ("promise" ,java-osgi-util-promise)
9026 ("resource" ,java-osgi-resource)))
9027 (home-page "https://www.osgi.org")
9028 (synopsis "OSGI service repository")
9029 (description
9030 "OSGi, for Open Services Gateway initiative framework, is a module system
9031 and service platform for the Java programming language. This package contains
9032 a repository service that contains resources.")
9033 (license license:asl2.0)))
9034
9035 (define-public java-osgi-framework
9036 (package
9037 (name "java-osgi-framework")
9038 (version "1.8.0")
9039 (source (origin
9040 (method url-fetch)
9041 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9042 "org.osgi.framework/" version "/org.osgi.framework-"
9043 version "-sources.jar"))
9044 (sha256
9045 (base32
9046 "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s"))))
9047 (build-system ant-build-system)
9048 (arguments
9049 `(#:jar-name "osgi-framework.jar"
9050 #:tests? #f)); no tests
9051 (inputs
9052 `(("annotation" ,java-osgi-annotation)
9053 ("resource" ,java-osgi-resource)
9054 ("dto" ,java-osgi-dto)))
9055 (home-page "https://www.osgi.org")
9056 (synopsis "OSGi framework")
9057 (description
9058 "OSGi, for Open Services Gateway initiative framework, is a module system
9059 and service platform for the Java programming language.")
9060 (license license:asl2.0)))
9061
9062 (define-public java-osgi-service-log
9063 (package
9064 (name "java-osgi-service-log")
9065 (version "1.3.0")
9066 (source (origin
9067 (method url-fetch)
9068 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9069 "org.osgi.service.log/"
9070 version "/org.osgi.service.log-"
9071 version "-sources.jar"))
9072 (sha256
9073 (base32
9074 "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0"))))
9075 (build-system ant-build-system)
9076 (arguments
9077 `(#:jar-name "osgi-service-log.jar"
9078 #:tests? #f)); no tests
9079 (inputs
9080 `(("java-osgi-framework" ,java-osgi-framework)))
9081 (home-page "https://www.osgi.org")
9082 (synopsis "Provides methods for bundles to write messages to the log")
9083 (description
9084 "OSGi, for Open Services Gateway initiative framework, is a module system
9085 and service platform for the Java programming language. This package contains
9086 the log service.")
9087 (license license:asl2.0)))
9088
9089 (define-public java-osgi-service-jdbc
9090 (package
9091 (name "java-osgi-service-jdbc")
9092 (version "1.0.0")
9093 (source (origin
9094 (method url-fetch)
9095 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9096 "org.osgi.service.jdbc/"
9097 version "/org.osgi.service.jdbc-"
9098 version "-sources.jar"))
9099 (sha256
9100 (base32
9101 "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz"))))
9102 (build-system ant-build-system)
9103 (arguments
9104 `(#:jar-name "osgi-service-jdbc.jar"
9105 #:tests? #f)); no tests
9106 (home-page "https://www.osgi.org")
9107 (synopsis "Factory for JDBC connection factories")
9108 (description
9109 "OSGi, for Open Services Gateway initiative framework, is a module system
9110 and service platform for the Java programming language. This package contains
9111 a factory for JDBC connection factories. There are 3 preferred connection
9112 factories for getting JDBC connections:
9113
9114 @itemize
9115 @item @code{javax.sql.DataSource};
9116 @item @code{javax.sql.ConnectionPoolDataSource};
9117 @item @code{javax.sql.XADataSource}.
9118 @end itemize")
9119 (license license:asl2.0)))
9120
9121 (define-public java-osgi-service-resolver
9122 (package
9123 (name "java-osgi-service-resolver")
9124 (version "1.0.1")
9125 (source (origin
9126 (method url-fetch)
9127 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9128 "org.osgi.service.resolver/"
9129 version "/org.osgi.service.resolver-"
9130 version "-sources.jar"))
9131 (sha256
9132 (base32
9133 "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd"))))
9134 (build-system ant-build-system)
9135 (arguments
9136 `(#:jar-name "osgi-service-resolver.jar"
9137 #:tests? #f)); no tests
9138 (inputs
9139 `(("annotation" ,java-osgi-annotation)
9140 ("resource" ,java-osgi-resource)))
9141 (home-page "https://www.osgi.org")
9142 (synopsis "OSGI Resolver service")
9143 (description
9144 "OSGi, for Open Services Gateway initiative framework, is a module system
9145 and service platform for the Java programming language. This package contains
9146 a resolver service that resolves the specified resources in the context supplied
9147 by the caller.")
9148 (license license:asl2.0)))
9149
9150 (define-public java-osgi-util-tracker
9151 (package
9152 (name "java-osgi-util-tracker")
9153 (version "1.5.1")
9154 (source (origin
9155 (method url-fetch)
9156 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9157 "org.osgi.util.tracker/"
9158 version "/org.osgi.util.tracker-"
9159 version "-sources.jar"))
9160 (sha256
9161 (base32
9162 "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz"))))
9163 (build-system ant-build-system)
9164 (arguments
9165 `(#:jar-name "osgi-util-tracker.jar"
9166 #:tests? #f)); no tests
9167 (inputs
9168 `(("framework" ,java-osgi-framework)
9169 ("annotation" ,java-osgi-annotation)))
9170 (home-page "https://www.osgi.org")
9171 (synopsis "Bundle tracking")
9172 (description
9173 "OSGi, for Open Services Gateway initiative framework, is a module system
9174 and service platform for the Java programming language. This package contains
9175 bundle tracking utility classes.")
9176 (license license:asl2.0)))
9177
9178 (define-public java-osgi-service-cm
9179 (package
9180 (name "java-osgi-service-cm")
9181 (version "1.5.0")
9182 (source (origin
9183 (method url-fetch)
9184 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9185 "org.osgi.service.cm/"
9186 version "/org.osgi.service.cm-"
9187 version "-sources.jar"))
9188 (sha256
9189 (base32
9190 "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6"))))
9191 (build-system ant-build-system)
9192 (arguments
9193 `(#:jar-name "osgi-service-cm.jar"
9194 #:tests? #f)); no tests
9195 (inputs
9196 `(("framework" ,java-osgi-framework)
9197 ("annotation" ,java-osgi-annotation)))
9198 (home-page "https://www.osgi.org")
9199 (synopsis "OSGI Configuration Management")
9200 (description
9201 "OSGi, for Open Services Gateway initiative framework, is a module system
9202 and service platform for the Java programming language. This package contains
9203 utility classes for the configuration of services.")
9204 (license license:asl2.0)))
9205
9206 (define-public java-osgi-service-packageadmin
9207 (package
9208 (name "java-osgi-service-packageadmin")
9209 (version "1.2.0")
9210 (source (origin
9211 (method url-fetch)
9212 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9213 "org.osgi.service.packageadmin/"
9214 version "/org.osgi.service.packageadmin-"
9215 version "-sources.jar"))
9216 (sha256
9217 (base32
9218 "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52"))))
9219 (build-system ant-build-system)
9220 (arguments
9221 `(#:jar-name "osgi-service-packageadmin.jar"
9222 #:tests? #f)); no tests
9223 (inputs
9224 `(("framework" ,java-osgi-framework)))
9225 (home-page "https://www.osgi.org")
9226 (synopsis "OSGI Package Administration")
9227 (description
9228 "OSGi, for Open Services Gateway initiative framework, is a module system
9229 and service platform for the Java programming language. This package contains
9230 the packageadmin service.")
9231 (license license:asl2.0)))
9232
9233 (define-public java-ops4j-base-lang
9234 (package
9235 (name "java-ops4j-base-lang")
9236 (version "1.5.0")
9237 (source (origin
9238 (method url-fetch)
9239 (uri (string-append "https://github.com/ops4j/org.ops4j.base/"
9240 "archive/base-" version ".tar.gz"))
9241 (sha256
9242 (base32
9243 "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw"))))
9244 (build-system ant-build-system)
9245 (arguments
9246 `(#:jar-name "java-ops4j-base-lang.jar"
9247 #:source-dir "ops4j-base-lang/src/main/java"
9248 #:tests? #f; no tests
9249 #:phases
9250 (modify-phases %standard-phases
9251 (add-before 'build 'add-test-file
9252 (lambda _
9253 ;; That file is required by a test in ops4j-pax-exam-core-spi
9254 (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang")
9255 (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties"
9256 (lambda _
9257 (display
9258 (string-append
9259 "version=" ,version "\n"
9260 "groupId=org.ops4j.base"
9261 "artifactId=ops4j-base-lang\n"))))
9262 #t)))))
9263 (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview")
9264 (synopsis "Utility classes and extensions to be used in OPS4J projects")
9265 (description "OPS4J stands for Open Participation Software for Java. This
9266 package contains utilities and extensions related to @code{java.lang}.")
9267 (license license:asl2.0)))
9268
9269 (define-public java-ops4j-base-monitors
9270 (package
9271 (inherit java-ops4j-base-lang)
9272 (name "java-ops4j-base-monitors")
9273 (arguments
9274 `(#:jar-name "java-ops4j-base-monitors.jar"
9275 #:source-dir "ops4j-base-monitors/src/main/java"
9276 #:tests? #f)); no tests
9277 (inputs
9278 `(("lang" ,java-ops4j-base-lang)))
9279 (description "OPS4J stands for Open Participation Software for Java. This
9280 package contains utilities and extensions related to monitoring.")))
9281
9282 (define-public java-ops4j-base-io
9283 (package
9284 (inherit java-ops4j-base-lang)
9285 (name "java-ops4j-base-io")
9286 (arguments
9287 `(#:jar-name "java-ops4j-base-io.jar"
9288 #:source-dir "ops4j-base-io/src/main/java"
9289 #:test-dir "ops4j-base-io/src/test"
9290 #:test-exclude
9291 (list "**/ListerTest.java")))
9292 (inputs
9293 `(("lang" ,java-ops4j-base-monitors)
9294 ("lang" ,java-ops4j-base-lang)))
9295 (native-inputs
9296 `(("junit" ,java-junit)
9297 ("hamcrest" ,java-hamcrest-core)))
9298 (description "OPS4J stands for Open Participation Software for Java. This
9299 package contains utilities and extensions related to handling streams and files.")))
9300
9301 (define-public java-ops4j-base-util
9302 (package
9303 (inherit java-ops4j-base-lang)
9304 (name "java-ops4j-base-util")
9305 (arguments
9306 `(#:jar-name "java-ops4j-base-util.jar"
9307 #:source-dir "ops4j-base-util/src/main/java"
9308 #:test-dir "ops4j-base-util/src/test"))
9309 (inputs
9310 `(("lang" ,java-ops4j-base-lang)))
9311 (native-inputs
9312 `(("junit" ,java-junit)))
9313 (description "OPS4J stands for Open Participation Software for Java. This
9314 package contains utilities and extensions related to environment, i18n and
9315 mime types.")))
9316
9317 (define-public java-ops4j-base-util-property
9318 (package
9319 (inherit java-ops4j-base-lang)
9320 (name "java-ops4j-base-util-property")
9321 (arguments
9322 `(#:jar-name "java-ops4j-base-util-property.jar"
9323 #:source-dir "ops4j-base-util-property/src/main/java"
9324 #:tests? #f)); no tests
9325 (inputs
9326 `(("lang" ,java-ops4j-base-lang)
9327 ("util" ,java-ops4j-base-util)))
9328 (description "OPS4J stands for Open Participation Software for Java. This
9329 package contains utilities and extensions related to resolving properties from
9330 different sources.")))
9331
9332 (define-public java-ops4j-base-store
9333 (package
9334 (inherit java-ops4j-base-lang)
9335 (name "java-ops4j-base-store")
9336 (arguments
9337 `(#:jar-name "java-ops4j-base-store.jar"
9338 #:source-dir "ops4j-base-store/src/main/java"
9339 #:tests? #f)); no tests
9340 (inputs
9341 `(("lang" ,java-ops4j-base-lang)
9342 ("slf4j" ,java-slf4j-api)
9343 ("io" ,java-ops4j-base-io)))
9344 (description "OPS4J stands for Open Participation Software for Java. This
9345 package contains utilities for storing and retrieving data from an
9346 @code{InputStream}.")))
9347
9348 (define-public java-ops4j-base-spi
9349 (package
9350 (inherit java-ops4j-base-lang)
9351 (name "java-ops4j-base-spi")
9352 (arguments
9353 `(#:jar-name "java-ops4j-base-spi.jar"
9354 #:source-dir "ops4j-base-spi/src/main/java"
9355 #:test-dir "ops4j-base-spi/src/test"))
9356 (native-inputs
9357 `(("junit" ,java-junit)
9358 ("hamcrest" ,java-hamcrest-core)))
9359 (description "OPS4J stands for Open Participation Software for Java. This
9360 package contains utilities for obtaining services via the Java SE 6
9361 @code{ServiceLoader}.")))
9362
9363 (define-public java-aqute-bnd-annotation
9364 (package
9365 (name "java-aqute-bnd-annotation")
9366 (version "3.5.0")
9367 (source (origin
9368 (method url-fetch)
9369 (uri (string-append "https://github.com/bndtools/bnd/archive/"
9370 version ".REL.tar.gz"))
9371 (file-name (string-append name "-" version ".tar.gz"))
9372 (sha256
9373 (base32
9374 "1ggyiq0as0f6cz333a0dh98j72kmvv5pf2s47v9554yh905lfqdl"))))
9375 (build-system ant-build-system)
9376 (arguments
9377 `(#:jar-name "java-aqute-bnd-annotation.jar"
9378 #:source-dir "biz.aQute.bnd.annotation/src"
9379 #:tests? #f)); empty test dir
9380 (home-page "https://bnd.bndtools.org/")
9381 (synopsis "Tools for OSGi")
9382 (description "Bnd is a swiss army knife for OSGi, it creates manifest
9383 headers based on analyzing the class code, it verifies the project settings,
9384 it manages project dependencies, gives diffs jars, and much more.")
9385 (license license:asl2.0)))
9386
9387 (define-public java-aqute-libg
9388 (package
9389 (inherit java-aqute-bnd-annotation)
9390 (name "java-aqute-libg")
9391 (arguments
9392 `(#:jar-name "java-aqute-libg.jar"
9393 ;; The build fails when source/target more recent than 1.7. This
9394 ;; is a known issue. See: https://github.com/bndtools/bnd/issues/1327
9395 ;;
9396 ;; It is closed as won't fix. There is no way to change the source
9397 ;; so that it works on 1.8, and still works on 1.6, the upstream
9398 ;; target. It work fine on 1.7, so we use 1.7.
9399 #:make-flags (list "-Dant.build.javac.source=1.7"
9400 "-Dant.build.javac.target=1.7")
9401 #:phases
9402 (modify-phases %standard-phases
9403 (add-before 'configure 'chdir
9404 ;; Change to aQute.libg directory, so that the relative
9405 ;; paths in the tests aren't broken.
9406 (lambda _
9407 (chdir "aQute.libg")
9408 #t))
9409 (add-before 'check 'create-test-directory
9410 ;; Copy the test directory to test/java, since that's where
9411 ;; ant-build-system's default project in build.xml expects to find
9412 ;; the test classes. Leave a copy in the original place to not
9413 ;; break paths in tests.
9414 (lambda _
9415 (mkdir "src/test")
9416 (copy-recursively "test" "src/test/java")
9417 #t)))))
9418 (inputs
9419 `(("slf4j" ,java-slf4j-api)
9420 ("osgi-annot" ,java-osgi-annotation)
9421 ("java-osgi-cmpn" ,java-osgi-cmpn)
9422 ("osgi" ,java-osgi-core)))
9423 (native-inputs
9424 `(("hamcrest" ,java-hamcrest-core)
9425 ("java-junit" ,java-junit)))))
9426
9427 (define-public java-aqute-bndlib
9428 (package
9429 (inherit java-aqute-bnd-annotation)
9430 (name "java-aqute-bndlib")
9431 (arguments
9432 `(#:jar-name "java-bndlib.jar"
9433 #:source-dir "biz.aQute.bndlib/src"
9434 #:tests? #f)); no tests
9435 (inputs
9436 `(("slf4j" ,java-slf4j-api)
9437 ("osgi-annot" ,java-osgi-annotation)
9438 ("java-aqute-libg" ,java-aqute-libg)
9439 ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation)
9440 ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations)
9441 ("java-osgi-service-repository" ,java-osgi-service-repository)
9442 ("java-osgi-service-log" ,java-osgi-service-log)
9443 ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations)
9444 ("java-osgi-namespace-contract" ,java-osgi-namespace-contract)
9445 ("java-osgi-namespace-extender" ,java-osgi-namespace-extender)
9446 ("java-osgi-namespace-service" ,java-osgi-namespace-service)
9447 ("promise" ,java-osgi-util-promise)
9448 ("osgi" ,java-osgi-core)))))
9449
9450 (define-public java-ops4j-pax-tinybundles
9451 (package
9452 (name "java-ops4j-pax-tinybundles")
9453 (version "2.1.1")
9454 (source (origin
9455 (method url-fetch)
9456 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/"
9457 "archive/tinybundles-" version ".tar.gz"))
9458 (sha256
9459 (base32
9460 "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871"))))
9461 (arguments
9462 `(#:jar-name "java-ops4j-pax-tinybundles.jar"
9463 #:source-dir "src/main/java"
9464 #:test-exclude
9465 ;; Abstract base classes for other tests
9466 (list "**/BndTest.java" "**/CoreTest.java")
9467 #:phases
9468 (modify-phases %standard-phases
9469 (add-before 'check 'fix-version
9470 (lambda _
9471 ;; This test has a reference to an old version of bndlib we are not
9472 ;; packaging. It uses the version referenced in pom.xml. We replace
9473 ;; it with our own version.
9474 (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
9475 (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*")
9476 ,(package-version java-aqute-bndlib)))
9477 #t)))))
9478 (inputs
9479 `(("lang" ,java-ops4j-base-lang)
9480 ("io" ,java-ops4j-base-io)
9481 ("store" ,java-ops4j-base-store)
9482 ("slf4j" ,java-slf4j-api)
9483 ("libg" ,java-aqute-libg)
9484 ("bndlib" ,java-aqute-bndlib)))
9485 (native-inputs
9486 `(("junit" ,java-junit)
9487 ("hamcrest" ,java-hamcrest-core)
9488 ("log4j" ,java-log4j-api)
9489 ("bndannotation" ,java-aqute-bnd-annotation)
9490 ("framework" ,java-osgi-framework)))
9491 (build-system ant-build-system)
9492 (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles")
9493 (synopsis "Java APIs to create OSGi related artifacts")
9494 (description "Tinybundles is all about creating OSGi related artifacts like
9495 Bundles, Fragments and Deployment Packages with Java Api. It is very convenient
9496 to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the
9497 other hand, this library can be a foundation of real end user tools that need
9498 to create those artifacts.")
9499 (license license:asl2.0)))
9500
9501 (define-public java-ops4j-pax-exam-core
9502 (package
9503 (name "java-ops4j-pax-exam-core")
9504 (version "4.11.0")
9505 (source (origin
9506 (method url-fetch)
9507 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/"
9508 "archive/exam-reactor-" version ".tar.gz"))
9509 (sha256
9510 (base32
9511 "08mzw8nkah3rj3vznlplnawspxhp61zgvb44ifqa1rni1cvbms2g"))))
9512 (arguments
9513 `(#:jar-name "java-ops4j-pax-exam-core.jar"
9514 #:source-dir "core/pax-exam/src/main/java"
9515 #:test-dir "core/pax-exam/src/test"))
9516 (inputs
9517 `(("slf4j" ,java-slf4j-api)
9518 ("lang" ,java-ops4j-base-lang)
9519 ("io" ,java-ops4j-base-io)
9520 ("util-property" ,java-ops4j-base-util-property)
9521 ("util-store" ,java-ops4j-base-store)
9522 ("java-osgi-core" ,java-osgi-core)))
9523 (native-inputs
9524 `(("junit" ,java-junit)
9525 ("hamcrest" ,java-hamcrest-core)))
9526 (build-system ant-build-system)
9527 (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview")
9528 (synopsis "In-Container Testing for OSGi, Java EE and CDI")
9529 (description "Pax Exam creates OSGi bundles for testing purposes. It lets
9530 the user take control of the OSGi framework, the test framework (e.g. JUnit) and
9531 the system under test at the same time.")
9532 (license license:asl2.0)))
9533
9534 (define-public java-ops4j-pax-exam-core-spi
9535 (package
9536 (inherit java-ops4j-pax-exam-core)
9537 (name "java-ops4j-pax-exam-core-spi")
9538 (arguments
9539 `(#:jar-name "java-ops4j-pax-exam-spi.jar"
9540 #:source-dir "src/main/java"
9541 #:test-exclude
9542 (list
9543 ;; Abstract base class, not a test
9544 "**/BaseStagedReactorTest.java"
9545 ;; Depends on org.mortbay.jetty.testwars:test-war-dump
9546 "**/WarBuilderTest.java")
9547 #:phases
9548 (modify-phases %standard-phases
9549 (add-before 'configure 'chdir
9550 (lambda _
9551 ;; Tests assume we are in this directory
9552 (chdir "core/pax-exam-spi")
9553 #t))
9554 (add-before 'check 'fix-tests
9555 (lambda _
9556 ;; One test checks that this file is present.
9557 (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi")
9558 (with-output-to-file
9559 "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties"
9560 (lambda _
9561 (display
9562 (string-append "artifactId = pax-exam-spi\n"
9563 "version = " ,(package-version java-ops4j-pax-exam-core-spi)))))
9564 ;; Maven puts compilation results in the target directory, while we
9565 ;; put them in the build directory.
9566 (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java"
9567 "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java"
9568 "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java")
9569 (("target") "build"))
9570 ;; One test is expected to fail, but it doesn't throw the expected exception
9571 (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java"
9572 (("AssertionError") "IllegalArgumentException"))
9573 #t)))))
9574 (inputs
9575 `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core)
9576 ("lang" ,java-ops4j-base-lang)
9577 ("monitors" ,java-ops4j-base-monitors)
9578 ("store" ,java-ops4j-base-store)
9579 ("io" ,java-ops4j-base-io)
9580 ("spi" ,java-ops4j-base-spi)
9581 ("osgi" ,java-osgi-core)
9582 ("slf4j" ,java-slf4j-api)
9583 ("tinybundles" ,java-ops4j-pax-tinybundles)))
9584 (native-inputs
9585 `(("mockito" ,java-mockito-1)
9586 ("junit" ,java-junit)
9587 ("hamcrest" ,java-hamcrest-core)
9588 ("cglib" ,java-cglib)
9589 ("objenesis" ,java-objenesis)
9590 ("asm" ,java-asm)))))
9591
9592 (define-public java-ops4j-pax-exam-core-junit
9593 (package
9594 (inherit java-ops4j-pax-exam-core)
9595 (name "java-ops4j-pax-exam-core-junit")
9596 (arguments
9597 `(#:jar-name "ops4j-pax-exam-core-junit.jar"
9598 #:source-dir "drivers/pax-exam-junit4/src/main/java"
9599 #:tests? #f)); no tests
9600 (inputs
9601 `(("junit" ,java-junit)
9602 ("slf4j" ,java-slf4j-api)
9603 ("core" ,java-ops4j-pax-exam-core)
9604 ("spi" ,java-ops4j-pax-exam-core-spi)))
9605 (native-inputs '())))
9606
9607 (define-public java-fasterxml-jackson-annotations
9608 (package
9609 (name "java-fasterxml-jackson-annotations")
9610 (version "2.9.4")
9611 (source (origin
9612 (method url-fetch)
9613 (uri (string-append "https://github.com/FasterXML/"
9614 "jackson-annotations/archive/"
9615 "jackson-annotations-" version ".tar.gz"))
9616 (sha256
9617 (base32
9618 "0mr95xd0da6a4g95zvrl1ryk5n5zv2rc696w3xnsr5hxk2gicfc4"))))
9619 (build-system ant-build-system)
9620 (arguments
9621 `(#:jar-name "jackson-annotations.jar"
9622 #:source-dir "src/main/java"
9623 #:test-dir "src/test"))
9624 (native-inputs
9625 `(("junit" ,java-junit)))
9626 (home-page "https://github.com/FasterXML/jackson-annotations")
9627 (synopsis "General purpose annotations for the Jackson Data Processor")
9628 (description "This package contains general purpose annotations for the
9629 Jackson Data Processor, used on value and handler types. The only annotations
9630 not included are ones that require dependency to the Databind package.")
9631 (license license:asl2.0)))
9632
9633 (define-public java-fasterxml-jackson-core
9634 (package
9635 (name "java-fasterxml-jackson-core")
9636 (version "2.9.4")
9637 (source (origin
9638 (method url-fetch)
9639 (uri (string-append "https://github.com/FasterXML/"
9640 "jackson-core/archive/"
9641 "jackson-core-" version ".tar.gz"))
9642 (sha256
9643 (base32
9644 "159hsnk17jr1gyzkf01cxvsn45srnk37g949r7364qlsr527gjgd"))))
9645 (build-system ant-build-system)
9646 (arguments
9647 `(#:jar-name "jackson-core.jar"
9648 #:source-dir "src/main/java"
9649 #:test-dir "src/test"
9650 #:test-exclude
9651 (list
9652 ;; Expected failure. pom.xml excludes these
9653 "**/failing/**"
9654 ;; Base classes that have no constructor for junit
9655 "**/BaseTest.java"
9656 "**/ConcurrencyReadTest.java"
9657 "**/ManualCharAccessTest.java"
9658 "**/ManualCharAccessTest.java"
9659 "**/TrailingCommasTest.java"
9660 "**/AsyncMissingValuesInObjectTest.java"
9661 "**/AsyncMissingValuesInArrayTest.java")
9662 #:phases
9663 (modify-phases %standard-phases
9664 (add-before 'configure 'generate-PackageVersion.java
9665 (lambda _
9666 (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java")
9667 (in (string-append out ".in")))
9668 (copy-file in out)
9669 (substitute* out
9670 (("@package@") "com.fasterxml.jackson.core.json")
9671 (("@projectversion@") ,version)
9672 (("@projectgroupid@") "com.fasterxml.jackson.core")
9673 (("@projectartifactid@") "jackson-core")))
9674 #t))
9675 (add-before 'build 'copy-resources
9676 (lambda _
9677 (copy-recursively "src/main/resources"
9678 "build/classes")
9679 #t))
9680 (add-before 'check 'copy-test-resources
9681 (lambda _
9682 (copy-recursively "src/test/resources"
9683 "build/test-classes")
9684 #t)))))
9685 (native-inputs
9686 `(("junit" ,java-junit)
9687 ("hamcrest" ,java-hamcrest-core)))
9688 (home-page "https://github.com/FasterXML/jackson-core")
9689 (synopsis "")
9690 (description "")
9691 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9692
9693 (define-public java-fasterxml-jackson-databind
9694 (package
9695 (name "java-fasterxml-jackson-databind")
9696 (version "2.9.4")
9697 (source (origin
9698 (method url-fetch)
9699 (uri (string-append "https://github.com/FasterXML/"
9700 "jackson-databind/archive/"
9701 "jackson-databind-" version ".tar.gz"))
9702 (sha256
9703 (base32
9704 "1zd2cw4z6kdkbx8za96xh9pyicv2a2l7y0rkcx2fqd8hv6d47s08"))))
9705 (build-system ant-build-system)
9706 (arguments
9707 `(#:jar-name "jackson-databind.jar"
9708 #:source-dir "src/main/java"
9709 #:tests? #f; requires javax.measures for which I can't find a free implementation
9710 #:phases
9711 (modify-phases %standard-phases
9712 (add-before 'configure 'generate-PackageVersion.java
9713 (lambda _
9714 (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java")
9715 (in (string-append out ".in")))
9716 (copy-file in out)
9717 (substitute* out
9718 (("@package@") "com.fasterxml.jackson.databind.cfg")
9719 (("@projectversion@") ,version)
9720 (("@projectgroupid@") "com.fasterxml.jackson.databind")
9721 (("@projectartifactid@") "jackson-databind")))
9722 #t))
9723 (add-before 'build 'copy-resources
9724 (lambda _
9725 (copy-recursively "src/main/resources" "build/classes")
9726 #t)))))
9727 (inputs
9728 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
9729 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)))
9730 (home-page "https://github.com/FasterXML/jackson-databind")
9731 (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor")
9732 (description "This package contains the general-purpose data-binding
9733 functionality and tree-model for Jackson Data Processor. It builds on core
9734 streaming parser/generator package, and uses Jackson Annotations for
9735 configuration.")
9736 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9737
9738 (define-public java-fasterxml-jackson-modules-base-jaxb
9739 (package
9740 (name "java-fasterxml-jackson-modules-base-jaxb")
9741 (version "2.9.4")
9742 (source (origin
9743 (method url-fetch)
9744 (uri (string-append "https://github.com/FasterXML/"
9745 "jackson-modules-base/archive/"
9746 "jackson-modules-base-" version ".tar.gz"))
9747 (sha256
9748 (base32
9749 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
9750 (build-system ant-build-system)
9751 (arguments
9752 `(#:jar-name "jackson-modules-base-jaxb.jar"
9753 #:source-dir "jaxb/src/main/java"
9754 #:test-dir "jaxb/src/test"
9755 #:test-exclude
9756 ;; Base class for tests
9757 (list "**/BaseJaxbTest.java")
9758 #:phases
9759 (modify-phases %standard-phases
9760 (add-before 'configure 'generate-PackageVersion.java
9761 (lambda _
9762 (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/"
9763 "jackson/module/jaxb/PackageVersion.java"))
9764 (in (string-append out ".in")))
9765 (copy-file in out)
9766 (substitute* out
9767 (("@package@") "com.fasterxml.jackson.module.jaxb")
9768 (("@projectversion@") ,version)
9769 (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb")
9770 (("@projectartifactid@") "jackson-module-jaxb")))
9771 #t))
9772 (add-before 'build 'copy-resources
9773 (lambda _
9774 (copy-recursively "jaxb/src/main/resources" "build/classes")
9775 #t)))))
9776 (inputs
9777 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
9778 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
9779 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
9780 (native-inputs
9781 `(("java-junit" ,java-junit)))
9782 (home-page "https://github.com/FasterXML/jackson-modules-base")
9783 (synopsis "Jaxb annotations jackson module")
9784 (description "This package is the jaxb annotations module for jackson.")
9785 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9786
9787 (define-public java-fasterxml-jackson-modules-base-mrbean
9788 (package
9789 (name "java-fasterxml-jackson-modules-base-mrbean")
9790 (version "2.9.4")
9791 (source (origin
9792 (method url-fetch)
9793 (uri (string-append "https://github.com/FasterXML/"
9794 "jackson-modules-base/archive/"
9795 "jackson-modules-base-" version ".tar.gz"))
9796 (sha256
9797 (base32
9798 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
9799 (build-system ant-build-system)
9800 (arguments
9801 `(#:jar-name "jackson-modules-base-mrbean.jar"
9802 #:source-dir "mrbean/src/main/java"
9803 #:test-dir "mrbean/src/test"
9804 #:test-exclude
9805 ;; Base class for tests
9806 (list "**/BaseTest.java")
9807 #:phases
9808 (modify-phases %standard-phases
9809 (add-before 'configure 'generate-PackageVersion.java
9810 (lambda _
9811 (let* ((out (string-append "mrbean/src/main/java/com/fasterxml/"
9812 "jackson/module/mrbean/PackageVersion.java"))
9813 (in (string-append out ".in")))
9814 (copy-file in out)
9815 (substitute* out
9816 (("@package@") "com.fasterxml.jackson.module.mrbean")
9817 (("@projectversion@") ,version)
9818 (("@projectgroupid@") "com.fasterxml.jackson.module.mrbean")
9819 (("@projectartifactid@") "jackson-module-mrbean")))
9820 #t)))))
9821 (inputs
9822 `(("java-asm" ,java-asm)
9823 ("java-fasterxml-jackson-annotations"
9824 ,java-fasterxml-jackson-annotations)
9825 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
9826 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
9827 (native-inputs
9828 `(("java-junit" ,java-junit)))
9829 (home-page "https://github.com/FasterXML/jackson-modules-base")
9830 (synopsis "POJO type materialization for Java")
9831 (description "This package implements POJO type materialization.
9832 Databinders can construct implementation classes for Java interfaces as part
9833 of deserialization.")
9834 (license license:asl2.0)))
9835
9836 (define-public java-snakeyaml
9837 (package
9838 (name "java-snakeyaml")
9839 (version "1.18")
9840 (source (origin
9841 (method url-fetch)
9842 (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
9843 version ".tar.gz"))
9844 (file-name (string-append name "-" version ".tar.gz"))
9845 (sha256
9846 (base32
9847 "0474cqcv46zgv9bhms2vgawakq1vyj0hp3h3f1bfys46msia90bh"))))
9848 (build-system ant-build-system)
9849 (arguments
9850 `(#:jar-name "java-snakeyaml.jar"
9851 #:source-dir "src/main/java"
9852 ;; Tests require velocity, a cyclic dependency, and
9853 ;; java-spring-framework-context which is not packaged.
9854 #:tests? #f))
9855 (home-page "https://bitbucket.org/asomov/snakeyaml")
9856 (synopsis "YAML processor")
9857 (description "SnakeYAML is a YAML processor for the Java Virtual Machine.")
9858 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9859
9860 (define-public java-fasterxml-jackson-dataformat-yaml
9861 (package
9862 (name "java-fasterxml-jackson-dataformat-yaml")
9863 (version "2.9.4")
9864 (source (origin
9865 (method url-fetch)
9866 (uri (string-append "https://github.com/FasterXML/"
9867 "jackson-dataformats-text/archive/"
9868 "jackson-dataformats-text-" version ".tar.gz"))
9869 (sha256
9870 (base32
9871 "1hikl06khaxbg439avf442qifcadap8w0lx13f0nnhp2vh3dkbz7"))))
9872 (build-system ant-build-system)
9873 (arguments
9874 `(#:jar-name "jackson-dataformat-yaml.jar"
9875 #:source-dir "yaml/src/main/java"
9876 #:test-dir "yaml/src/test"
9877 #:test-exclude (list "**/failing/**.java")
9878 #:phases
9879 (modify-phases %standard-phases
9880 (add-before 'configure 'generate-PackageVersion.java
9881 (lambda _
9882 (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java")
9883 (in (string-append out ".in")))
9884 (copy-file in out)
9885 (substitute* out
9886 (("@package@") "com.fasterxml.jackson.dataformat.yaml")
9887 (("@projectversion@") ,version)
9888 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml")
9889 (("@projectartifactid@") "jackson-dataformat-yaml")))
9890 #t)))))
9891 (inputs
9892 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
9893 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
9894 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
9895 ("java-snakeyaml" ,java-snakeyaml)))
9896 (native-inputs
9897 `(("junit" ,java-junit)
9898 ("hamcrest" ,java-hamcrest-core)
9899 ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi)
9900 ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit)
9901 ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core)))
9902 (home-page "https://github.com/FasterXML/jackson-dataformats-text")
9903 (synopsis "Yaml backend for Jackson")
9904 (description "Dataformat backends are used to support format alternatives
9905 to JSON, supported by default. This is done by sub-classing Jackson core
9906 abstractions.")
9907 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9908
9909 (define-public java-stax2-api
9910 (package
9911 (name "java-stax2-api")
9912 (version "4.0.0")
9913 (source (origin
9914 (method url-fetch)
9915 (uri (string-append "https://github.com/FasterXML/stax2-api/archive/"
9916 "stax2-api-" version ".tar.gz"))
9917 (sha256
9918 (base32
9919 "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq"))))
9920 (build-system ant-build-system)
9921 (arguments
9922 `(#:jar-name "java-stax2-api.jar"
9923 #:source-dir "src/main/java"
9924 #:tests? #f)); no tests
9925 (home-page "https://github.com/FasterXML/stax2-api")
9926 (synopsis "Stax2 API")
9927 (description "Stax2 API is an extension to basic Stax 1.0 API that adds
9928 significant new functionalities, such as full-featured bi-direction validation
9929 interface and high-performance Typed Access API.")
9930 (license license:bsd-2)))
9931
9932 (define-public java-woodstox-core
9933 (package
9934 (name "java-woodstox-core")
9935 (version "5.0.3")
9936 (source (origin
9937 (method url-fetch)
9938 (uri (string-append "https://github.com/FasterXML/woodstox/archive/"
9939 "woodstox-core-" version ".tar.gz"))
9940 (sha256
9941 (base32
9942 "1i7pdgb8jbw6gdy5kmm0l6rz109n2ns92pqalpyp24vb8vlvdfd4"))))
9943 (build-system ant-build-system)
9944 (arguments
9945 `(#:jar-name "woodstox.jar"
9946 #:test-exclude
9947 (list "**/Base*.java" "failing/**")
9948 #:phases
9949 (modify-phases %standard-phases
9950 (add-before 'build 'remove-msv-dep
9951 (lambda _
9952 ;; we don't need osgi, and it depends on msv
9953 (delete-file-recursively "src/main/java/com/ctc/wstx/osgi")
9954 ;; msv's latest release is from 2011 and we don't need it
9955 (delete-file-recursively "src/main/java/com/ctc/wstx/msv")
9956 (delete-file-recursively "src/test/java/wstxtest/osgi")
9957 (delete-file-recursively "src/test/java/wstxtest/msv")
9958 #t))
9959 (add-before 'build 'copy-resources
9960 (lambda _
9961 (copy-recursively "src/main/resources" "build/classes")
9962 #t)))))
9963 (inputs
9964 `(("stax2" ,java-stax2-api)))
9965 (native-inputs
9966 `(("junit" ,java-junit)))
9967 (home-page "https://github.com/FasterXML/woodstox")
9968 (synopsis "Stax XML API implementation")
9969 (description "Woodstox is a stax XML API implementation.")
9970 (license license:asl2.0)))
9971
9972 (define-public java-fasterxml-jackson-dataformat-xml
9973 (package
9974 (name "java-fasterxml-jackson-dataformat-xml")
9975 (version "2.9.4")
9976 (source (origin
9977 (method url-fetch)
9978 (uri (string-append "https://github.com/FasterXML/"
9979 "jackson-dataformat-xml/archive/"
9980 "jackson-dataformat-xml-" version ".tar.gz"))
9981 (sha256
9982 (base32
9983 "111fkkl90w31jbf30kgj82qdcxlw4sxppki7i198liw0ck1jcavq"))))
9984 (build-system ant-build-system)
9985 (arguments
9986 `(#:jar-name "jackson-dataformat-xml.jar"
9987 #:source-dir "src/main/java"
9988 #:test-exclude
9989 (list "**/failing/**")
9990 #:phases
9991 (modify-phases %standard-phases
9992 (add-before 'configure 'generate-PackageVersion.java
9993 (lambda _
9994 (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java")
9995 (in (string-append out ".in")))
9996 (copy-file in out)
9997 (newline)
9998 (substitute* out
9999 (("@package@") "com.fasterxml.jackson.dataformat.xml")
10000 (("@projectversion@") ,version)
10001 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml")
10002 (("@projectartifactid@") "jackson-dataformat-xml")))
10003 #t))
10004 (add-before 'build 'copy-resources
10005 (lambda _
10006 (copy-recursively "src/main/resources" "build/classes")
10007 #t)))))
10008 (inputs
10009 `(("jackson-annotations" ,java-fasterxml-jackson-annotations)
10010 ("jackson-core" ,java-fasterxml-jackson-core)
10011 ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb)
10012 ("jackson-databind" ,java-fasterxml-jackson-databind)
10013 ("stax2-api" ,java-stax2-api)
10014 ("woodstox" ,java-woodstox-core)))
10015 (native-inputs
10016 `(("junit" ,java-junit)
10017 ("hamcrest" ,java-hamcrest-core)))
10018 (home-page "https://github.com/FasterXML/jackson-dataformat-xml")
10019 (synopsis "Read and write XML")
10020 (description "This package contains Jackson extension component for reading
10021 and writing XML encoded data.
10022
10023 Further, the goal is to emulate how JAXB data-binding works with \"Code-first\"
10024 approach (that is, no support is added for \"Schema-first\" approach). Support
10025 for JAXB annotations is provided by JAXB annotation module; this module
10026 provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator},
10027 @code{JsonFactory}) as well as small number of higher level overrides needed to
10028 make data-binding work.")
10029 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
10030
10031 (define-public java-hdrhistogram
10032 (package
10033 (name "java-hdrhistogram")
10034 (version "2.1.9")
10035 (source (origin
10036 (method git-fetch)
10037 (uri (git-reference
10038 (url "https://github.com/HdrHistogram/HdrHistogram")
10039 (commit (string-append "HdrHistogram-" version))))
10040 (file-name (git-file-name name version))
10041 (sha256
10042 (base32
10043 "1cw8aa1vk258k42xs6wpy72m4gbai540jq032qsa7c5586iawx2d"))))
10044 (build-system ant-build-system)
10045 (arguments
10046 `(#:jar-name "java-hdrhistogram.jar"
10047 #:source-dir "src/main/java"
10048 #:phases
10049 (modify-phases %standard-phases
10050 (add-after 'unpack 'make-files-writable
10051 (lambda _
10052 (for-each make-file-writable (find-files "."))
10053 #t))
10054 (add-before 'configure 'set-version
10055 (lambda _
10056 (let* ((version-java "src/main/java/org/HdrHistogram/Version.java")
10057 (template (string-append version-java ".template")))
10058 (copy-file template version-java)
10059 (substitute* version-java
10060 (("\\$VERSION\\$") ,version)
10061 (("\\$BUILD_TIME\\$") "0"))
10062 #t))))))
10063 (native-inputs
10064 `(("junit" ,java-junit)
10065 ("hamcrest" ,java-hamcrest-core)))
10066 (home-page "https://hdrhistogram.github.io/HdrHistogram")
10067 (synopsis "High dynamic range histogram")
10068 (description "Hdrhistogram creates histograms that support
10069 recording and analyzing sampled data value counts across a configurable integer
10070 value range with configurable value precision within the range. Value precision
10071 is expressed as the number of significant digits in the value recording, and
10072 provides control over value quantization behavior across the value range and
10073 the subsequent value resolution at any given level.")
10074 (license license:public-domain)))
10075
10076 (define-public java-cofoja
10077 (package
10078 (name "java-cofoja")
10079 (version "1.3")
10080 (source (origin
10081 (method git-fetch)
10082 (uri (git-reference
10083 (url "https://github.com/nhatminhle/cofoja")
10084 (commit (string-append "v" version))))
10085 (file-name (string-append "java-cofoja-" version "-checkout"))
10086 (sha256
10087 (base32
10088 "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w"))))
10089 (build-system ant-build-system)
10090 (arguments
10091 `(#:build-target "dist"
10092 #:test-target "test"
10093 #:jdk ,icedtea-8
10094 #:make-flags
10095 (list "-Ddist.dir=dist")
10096 #:modules ((guix build ant-build-system)
10097 (guix build java-utils)
10098 (guix build utils)
10099 (srfi srfi-1)
10100 (ice-9 match))
10101 #:phases
10102 (modify-phases %standard-phases
10103 ;; The bulid system ignores the class path the ant-build-system sets
10104 ;; up and instead expects to find all dependencies in the "lib"
10105 ;; directory.
10106 (add-after 'unpack 'create-libdir
10107 (lambda* (#:key inputs #:allow-other-keys)
10108 (mkdir-p "lib")
10109 (for-each
10110 (lambda (file)
10111 (let ((target (string-append "lib/" (basename file))))
10112 (unless (file-exists? target)
10113 (symlink file target))))
10114 (append-map (match-lambda
10115 ((label . dir)
10116 (find-files dir "\\.jar$")))
10117 inputs))
10118 #t))
10119 (replace 'install (install-jars "dist")))))
10120 (inputs
10121 `(("java-asm" ,java-asm)))
10122 (native-inputs
10123 `(("java-junit" ,java-junit)))
10124 (home-page "https://github.com/nhatminhle/cofoja")
10125 (synopsis "Contracts for Java")
10126 (description "Contracts for Java, or Cofoja for short, is a contract
10127 programming framework and test tool for Java, which uses annotation processing
10128 and bytecode instrumentation to provide run-time checking. (In particular,
10129 this is not a static analysis tool.)")
10130 (license license:lgpl3+)))
10131
10132 (define-public java-aopalliance
10133 (package
10134 (name "java-aopalliance")
10135 (version "1.0")
10136 (source (origin
10137 (method git-fetch)
10138 ;; Note: this git repository is not official, but contains the
10139 ;; source code that is in the CVS repository. Downloading the
10140 ;; tarball from sourceforge is undeterministic, and the cvs download
10141 ;; fails.
10142 (uri (git-reference
10143 (url "https://github.com/hoverruan/aopalliance")
10144 (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0")))
10145 (file-name (string-append name "-" version))
10146 (sha256
10147 (base32
10148 "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr"))))
10149 (build-system ant-build-system)
10150 (arguments
10151 `(#:jar-name "java-aopalliance.jar"
10152 #:jdk ,icedtea-8
10153 #:tests? #f; no tests
10154 #:source-dir "aopalliance/src/main"
10155 #:modules ((guix build ant-build-system)
10156 (guix build utils)
10157 (guix build maven pom)
10158 (guix build java-utils)
10159 (sxml simple))
10160 #:phases
10161 (modify-phases %standard-phases
10162 (add-before 'install 'create-pom
10163 (lambda _
10164 (with-output-to-file "pom.xml"
10165 (lambda _
10166 (sxml->xml
10167 `((project
10168 (modelVersion "4.0.0")
10169 (name "aopalliance")
10170 (groupId "aopalliance")
10171 (artifactId "aopalliance")
10172 (version "1.0"))))))
10173 #t))
10174 (replace 'install
10175 (install-from-pom "pom.xml")))))
10176 (home-page "http://aopalliance.sourceforge.net")
10177 (synopsis "Aspect-Oriented Programming")
10178 (description "The AOP Alliance project is a joint project between several
10179 software engineering people who are interested in Aspect-Oriented Programming
10180 (AOP) and Java.")
10181 (license license:public-domain)))
10182
10183 (define-public java-javax-inject
10184 (package
10185 (name "java-javax-inject")
10186 (version "1")
10187 (source (origin
10188 (method git-fetch)
10189 (uri (git-reference
10190 (url "https://github.com/javax-inject/javax-inject")
10191 (commit version)))
10192 (file-name (git-file-name name version))
10193 (sha256
10194 (base32
10195 "1rspl0nkvk1jif6nccikw93xic6ljj2b6kpy2mffwi2mnvc13j7x"))))
10196 (build-system ant-build-system)
10197 (arguments
10198 `(#:jar-name "java-javax-inject.jar"
10199 #:tests? #f; no tests
10200 #:phases
10201 (modify-phases %standard-phases
10202 (replace 'install
10203 (install-from-pom "pom.xml")))))
10204 (home-page "https://github.com/javax-inject/javax-inject")
10205 (synopsis "JSR-330: Dependency Injection for Java")
10206 (description "This package specifies a means for obtaining objects in such
10207 a way as to maximize reusability, testability and maintainability compared to
10208 traditional approaches such as constructors, factories, and service locators
10209 (e.g., JNDI). This process, known as dependency injection, is beneficial to
10210 most nontrivial applications.
10211
10212 Many types depend on other types. For example, a @var{Stopwatch} might depend
10213 on a @var{TimeSource}. The types on which a type depends are known as its
10214 dependencies. The process of finding an instance of a dependency to use at run
10215 time is known as resolving the dependency. If no such instance can be found,
10216 the dependency is said to be unsatisfied, and the application is broken.")
10217 (license license:asl2.0)))
10218
10219 (define-public java-guice
10220 (package
10221 (name "java-guice")
10222 (version "4.1")
10223 (source (origin
10224 (method git-fetch)
10225 (uri (git-reference
10226 (url "https://github.com/google/guice")
10227 (commit version)))
10228 (file-name (git-file-name name version))
10229 (modules '((guix build utils)))
10230 (snippet
10231 `(begin
10232 (for-each delete-file (find-files "." ".*.jar")) #t))
10233 (sha256
10234 (base32
10235 "18im5hdfl4q1b9chww2s1ii60sn3ydyyar32a2sf2p2g8zlbdswq"))))
10236 (build-system ant-build-system)
10237 (arguments
10238 `(#:jar-name "java-guice.jar"
10239 #:jdk ,icedtea-8
10240 #:tests? #f; FIXME: tests are not in a java sub directory
10241 #:source-dir "core/src"
10242 #:phases
10243 (modify-phases %standard-phases
10244 (add-after 'unpack 'make-files-writable
10245 (lambda _
10246 (for-each make-file-writable (find-files "."))
10247 #t))
10248 (replace 'install
10249 (install-from-pom "core/pom.xml")))))
10250 (propagated-inputs
10251 `(("java-aopalliance" ,java-aopalliance)
10252 ("java-asm" ,java-asm)
10253 ("java-cglib" ,java-cglib)
10254 ("java-guava" ,java-guava)
10255 ("java-javax-inject" ,java-javax-inject)
10256 ("java-guice-parent-pom" ,java-guice-parent-pom)))
10257 (home-page "https://github.com/google/guice")
10258 (synopsis "Lightweight dependency injection framework")
10259 (description "Guice is a lightweight dependency injection framework for
10260 Java 6 and above.")
10261 (license license:asl2.0)))
10262
10263 (define-public java-guice-servlet
10264 (package
10265 (inherit java-guice)
10266 (name "java-guice-servlet")
10267 (arguments
10268 `(#:jar-name "guice-servlet.jar"
10269 #:source-dir "extensions/servlet/src/"
10270 #:jdk ,icedtea-8
10271 #:tests? #f ; FIXME: not in a java subdir
10272 #:phases
10273 (modify-phases %standard-phases
10274 (add-after 'unpack 'make-files-writable
10275 (lambda _
10276 (for-each make-file-writable (find-files "."))
10277 #t)))))
10278 (inputs
10279 `(("guice" ,java-guice)
10280 ("servlet" ,java-classpathx-servletapi)
10281 ,@(package-inputs java-guice)))))
10282
10283 (define java-guice-parent-pom
10284 (package
10285 (inherit java-guice)
10286 (name "java-guice-parent-pom")
10287 (arguments
10288 `(#:tests? #f
10289 #:phases
10290 (modify-phases %standard-phases
10291 (delete 'configure)
10292 (delete 'build)
10293 (add-after 'install 'install-extensions
10294 (install-pom-file "extensions/pom.xml"))
10295 (replace 'install
10296 (install-pom-file "pom.xml")))))
10297 (propagated-inputs
10298 `(("java-google-parent-pom" ,java-google-parent-pom-5)))))
10299
10300 (define java-google-parent-pom-5
10301 (package
10302 (name "java-google-parent-pom")
10303 (version "5")
10304 (source (origin
10305 (method git-fetch)
10306 (uri (git-reference
10307 (url "https://github.com/google/google-maven-parents")
10308 (commit (string-append "google-" version))))
10309 (file-name (git-file-name name version))
10310 (sha256
10311 (base32
10312 "0zb7hx24p8k8rfdvix2vsbfqn73jhrycdndvhf8j5gbii9wbqibv"))))
10313 (build-system ant-build-system)
10314 (arguments
10315 `(#:tests? #f
10316 #:phases
10317 (modify-phases %standard-phases
10318 (delete 'configure)
10319 (delete 'build)
10320 (replace 'install
10321 (install-pom-file "pom.xml")))))
10322 (home-page "https://github.com/google/google-maven-parents")
10323 (synopsis "Google parent pom")
10324 (description "This package contains the Maven parent POM for other Google
10325 Java projects.")
10326 (license license:asl2.0)))
10327
10328 (define-public java-assertj
10329 (package
10330 (name "java-assertj")
10331 (version "3.8.0")
10332 (source (origin
10333 (method git-fetch)
10334 (uri (git-reference
10335 (url "https://github.com/joel-costigliola/assertj-core")
10336 (commit (string-append "assertj-core-" version))))
10337 (file-name (git-file-name name version))
10338 (sha256
10339 (base32
10340 "1k35cg2in7pzk4pbdjryr0pll5lgk1r6ngrn0j8cdlgi7w8zh2d1"))))
10341 (build-system ant-build-system)
10342 (arguments
10343 `(#:jar-name "java-assertj.jar"
10344 #:jdk ,icedtea-8
10345 #:source-dir "src/main/java"
10346 #:tests? #f)); depends on tng-junit which depends on assertj
10347 (inputs
10348 `(("cglib" ,java-cglib)
10349 ("junit" ,java-junit)
10350 ("hamcrest" ,java-hamcrest-core)))
10351 (native-inputs
10352 `(("mockito" ,java-mockito-1)))
10353 (home-page "https://joel-costigliola.github.io/assertj/index.html")
10354 (synopsis "Fluent assertions for java")
10355 (description "AssertJ core is a Java library that provides a fluent
10356 interface for writing assertions. Its main goal is to improve test code
10357 readability and make maintenance of tests easier.")
10358 (license license:asl2.0)))
10359
10360 (define-public java-jboss-javassist
10361 (package
10362 (name "java-jboss-javassist")
10363 (version "3.21.0")
10364 (source (origin
10365 (method git-fetch)
10366 (uri (git-reference
10367 (url "https://github.com/jboss-javassist/javassist")
10368 (commit
10369 (string-append "rel_"
10370 (string-map
10371 (lambda (x) (if (eq? x #\.) #\_ x)) version)
10372 "_ga"))))
10373 (file-name (git-file-name name version))
10374 (sha256
10375 (base32
10376 "0h3zlcyqiaq01fspm69h7vki67raw305w89p4ha8vlhpzw02qifm"))
10377 (modules '((guix build utils)))
10378 (snippet
10379 '(begin
10380 (delete-file "javassist.jar")))))
10381 (build-system ant-build-system)
10382 (arguments
10383 `(#:jar-name "java-jboss-javassist.jar"
10384 #:jdk ,icedtea-8
10385 #:source-dir "src/main"
10386 #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3
10387 #:phases
10388 (modify-phases %standard-phases
10389 (add-after 'unpack 'make-files-writable
10390 (lambda _
10391 (for-each make-file-writable (find-files "."))
10392 #t)))))
10393 (native-inputs
10394 `(("junit" ,java-junit)))
10395 (home-page "https://github.com/jboss-javassist/javassist")
10396 (synopsis "Java bytecode engineering toolkit")
10397 (description "Javassist (JAVA programming ASSISTant) makes Java bytecode
10398 manipulation simple. It is a class library for editing bytecodes in Java; it
10399 enables Java programs to define a new class at runtime and to modify a class
10400 file when the JVM loads it.")
10401 (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl.
10402
10403 (define-public java-jcommander
10404 (package
10405 (name "java-jcommander")
10406 (version "1.71")
10407 (source (origin
10408 (method git-fetch)
10409 (uri (git-reference
10410 (url "https://github.com/cbeust/jcommander")
10411 (commit version)))
10412 (file-name (git-file-name name version))
10413 (sha256
10414 (base32
10415 "12vcpc19sd7jhvjgp7xz1qjanfix162xb3x2q5zah93rjklj1h57"))))
10416 (build-system ant-build-system)
10417 (arguments
10418 `(#:jar-name "java-jcommander.jar"
10419 #:jdk ,icedtea-8
10420 #:tests? #f; requires testng which depends on jcommander
10421 #:source-dir "src/main/java"))
10422 (home-page "https://jcommander.org")
10423 (synopsis "Command line parameters parser")
10424 (description "JCommander is a very small Java framework that makes it
10425 trivial to parse command line parameters. Parameters are declared with
10426 annotations.")
10427 (license license:asl2.0)))
10428
10429 (define-public java-bsh
10430 (package
10431 (name "java-bsh")
10432 (version "2.0b6")
10433 (source (origin
10434 (method git-fetch)
10435 (uri (git-reference
10436 (url "https://github.com/beanshell/beanshell")
10437 (commit version)))
10438 (file-name (git-file-name name version))
10439 (sha256
10440 (base32
10441 "0kz3f0xjack6c9syssi4qjw1rbd3q5963sk5pmr143hiibxa9csw"))
10442 (modules '((guix build utils)))
10443 (snippet
10444 '(begin
10445 ;; Delete bundled third-party jar archives.
10446 (for-each delete-file (find-files "." ".*.jar$"))
10447 (for-each (lambda (file) (chmod file #o644))
10448 (find-files "." "."))
10449 #t))))
10450 (build-system ant-build-system)
10451 (arguments
10452 `(#:build-target "jarall"
10453 #:test-target "junit-tests-all"
10454 #:make-flags (list "-DDATE" "(no date for reproducibility)")
10455 #:phases
10456 (modify-phases %standard-phases
10457 (add-before 'install 'fix-pom
10458 (lambda _
10459 (substitute* "pom.xml"
10460 (("org.apache-extras.beanshell") "org.beanshell"))
10461 #t))
10462 (replace 'install
10463 (install-from-pom "pom.xml")))))
10464 (inputs
10465 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
10466 ("java-commons-bsf" ,java-commons-bsf)))
10467 (native-inputs
10468 `(("java-junit" ,java-junit)
10469 ("javacc" ,javacc-3)))
10470 (home-page "http://beanshell.org/")
10471 (synopsis "Lightweight Scripting for Java")
10472 (description "BeanShell is a small, free, embeddable Java source
10473 interpreter with object scripting language features, written in Java.
10474 BeanShell dynamically executes standard Java syntax and extends it with common
10475 scripting conveniences such as loose types, commands, and method closures like
10476 those in Perl and JavaScript.")
10477 (license license:asl2.0)))
10478
10479 (define-public java-fest-util
10480 (package
10481 (name "java-fest-util")
10482 (version "1.2.5")
10483 (source (origin
10484 (method git-fetch)
10485 (uri (git-reference
10486 (url "https://github.com/alexruiz/fest-util/")
10487 (commit (string-append "fest-util-" version))))
10488 (file-name (git-file-name name version))
10489 (sha256
10490 (base32
10491 "02kgal7v85snyyvcsxvn4qphid455f4smh2wri1il8d9asw0djbz"))))
10492 (build-system ant-build-system)
10493 (arguments
10494 `(#:jar-name "java-fest-util.jar"
10495 #:source-dir "src/main/java"))
10496 (native-inputs
10497 `(("junit" ,java-junit)
10498 ("hamcrest" ,java-hamcrest-core)))
10499 (home-page "https://github.com/alexruiz/fest-util")
10500 (synopsis "FEST common utilities")
10501 (description "Common utilities used in all FEST module.")
10502 (license license:asl2.0)))
10503
10504 (define-public java-fest-test
10505 (package
10506 (name "java-fest-test")
10507 (version "2.1.0")
10508 (source (origin
10509 (method git-fetch)
10510 (uri (git-reference
10511 (url "https://github.com/alexruiz/fest-test/")
10512 (commit (string-append "fest-test-" version))))
10513 (file-name (git-file-name name version))
10514 (sha256
10515 (base32
10516 "0mg1d2jfh7kbx2c40dchbjr6d8pv59snsyb13mfxsr7xk5n69qbn"))))
10517 (build-system ant-build-system)
10518 (arguments
10519 `(#:jar-name "java-fest-test.jar"
10520 #:source-dir "src/main/java"
10521 #:tests? #f)); no tests
10522 (inputs
10523 `(("junit" ,java-junit)))
10524 (home-page "https://github.com/alexruiz/fest-test")
10525 (synopsis "Common FEST testing infrastructure")
10526 (description "Fest-test contains the common FEST testing infrastructure.")
10527 (license license:asl2.0)))
10528
10529 (define-public java-fest-assert
10530 (package
10531 (name "java-fest-assert")
10532 (version "2.0M10")
10533 (source (origin
10534 (method git-fetch)
10535 (uri (git-reference
10536 (url "https://github.com/alexruiz/fest-assert-2.x/")
10537 (commit (string-append "fest-assert-core-" version))))
10538 (file-name (git-file-name name version))
10539 (sha256
10540 (base32
10541 "1cp8zzyag3s85fz2w68sda9zzaal1y5f9wl8g72wkm12an40w6by"))))
10542 (build-system ant-build-system)
10543 (arguments
10544 `(#:jar-name "java-fest-assert.jar"
10545 #:source-dir "src/main/java"
10546 #:test-exclude
10547 (list
10548 "**/Abstract*.java"
10549 "**/*BaseTest.java"
10550 ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses
10551 "**/MessageFormatter_format_Test.java"
10552 "**/internal/*/*_assert*_Test.java")))
10553 (inputs
10554 `(("java-fest-util" ,java-fest-util)))
10555 (native-inputs
10556 `(("java-junit" ,java-junit)
10557 ("java-fest-test" ,java-fest-test)
10558 ("java-hamcrest-core" ,java-hamcrest-core)
10559 ("java-mockito" ,java-mockito-1)
10560 ("java-cglib" ,java-cglib)
10561 ("java-objenesis" ,java-objenesis)
10562 ("java-asm" ,java-asm)))
10563 (home-page "https://github.com/alexruiz/fest-assert-2.x")
10564 (synopsis "FEST fluent assertions")
10565 (description "FEST-Assert provides a fluent interface for assertions.")
10566 (license license:asl2.0)))
10567
10568 (define-public java-testng
10569 (package
10570 (name "java-testng")
10571 (version "6.14.3")
10572 (source (origin
10573 (method git-fetch)
10574 (uri (git-reference
10575 (url "https://github.com/cbeust/testng")
10576 (commit version)))
10577 (file-name (string-append name "-" version "-checkout"))
10578 (sha256
10579 (base32
10580 "0y6vq30i5g276kw0v2bhbvci22ijg7ax49ap2611yqlhbs4d6dqv"))))
10581 (build-system ant-build-system)
10582 (arguments
10583 `(#:jdk ,icedtea-8; java.util.function
10584 #:jar-name "java-testng.jar"
10585 #:source-dir "src/main/java"
10586 #:phases
10587 (modify-phases %standard-phases
10588 ;; FIXME: I don't know why these tests fail
10589 (add-after 'unpack 'delete-failing-tests
10590 (lambda _
10591 (substitute* "src/test/resources/testng.xml"
10592 (("<class name=\"test.configuration.github1625.TestRunnerIssue1625\"/>") "")
10593 (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") ""))
10594 #t))
10595 ;; We don't have groovy
10596 (add-after 'unpack 'delete-groovy-tests
10597 (lambda _
10598 (delete-file-recursively "src/test/java/test/dependent/issue1648/")
10599 (substitute* "src/test/resources/testng.xml"
10600 (("<class name=\"test.dependent.issue1648.TestRunner\"/>") ""))
10601 #t))
10602 (add-before 'build 'copy-resources
10603 (lambda _
10604 (copy-recursively "src/main/resources" "build/classes")
10605 #t))
10606 (add-before 'check 'copy-test-resources
10607 (lambda _
10608 (copy-recursively "src/test/resources" "build/test-classes")
10609 #t))
10610 (replace 'check
10611 (lambda _
10612 (invoke "ant" "compile-tests")
10613 ;; we don't have groovy
10614 (substitute* "src/test/resources/testng.xml"
10615 (("<class name=\"test.groovy.GroovyTest\" />") ""))
10616 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
10617 ":build/classes"
10618 ":build/test-classes")
10619 "-Dtest.resources.dir=src/test/resources"
10620 "org.testng.TestNG" "src/test/resources/testng.xml"))))))
10621 (propagated-inputs
10622 `(("junit" ,java-junit)
10623 ("java-jsr305" ,java-jsr305)
10624 ("java-bsh" ,java-bsh)
10625 ("java-jcommander" ,java-jcommander)
10626 ("java-guice" ,java-guice)
10627 ("snakeyaml" ,java-snakeyaml)))
10628 (native-inputs
10629 `(("guava" ,java-guava)
10630 ("java-javax-inject" ,java-javax-inject)
10631 ("java-hamcrest" ,java-hamcrest-all)
10632 ("java-assertj" ,java-assertj)
10633 ("java-mockito" ,java-mockito-1)
10634 ("cglib" ,java-cglib)
10635 ("asm" ,java-asm)
10636 ("aopalliance" ,java-aopalliance)))
10637 (home-page "https://testng.org")
10638 (synopsis "Testing framework")
10639 (description "TestNG is a testing framework inspired from JUnit and NUnit
10640 but introducing some new functionalities that make it more powerful and easier
10641 to use.")
10642 (license license:asl2.0)))
10643
10644 (define-public java-jnacl
10645 (let ((commit "094e819afdd63ea81a499b3bcb42a271006bebd9")
10646 (revision "2"))
10647 (package
10648 (name "java-jnacl")
10649 (version (string-append "0.1.0-" revision "." (string-take commit 7)))
10650 (source (origin
10651 (method git-fetch)
10652 (uri (git-reference
10653 (url "https://github.com/neilalexander/jnacl")
10654 (commit commit)))
10655 (file-name (git-file-name name version))
10656 (sha256
10657 (base32
10658 "1d6g6xhn83byv5943n7935wwjsk0ibk0qdvqgr699qqgqqmwisbb"))))
10659 (build-system ant-build-system)
10660 (arguments
10661 `(#:jar-name "jnacl.jar"
10662 #:source-dir "src/main/java"
10663 #:jdk ,icedtea-8
10664 #:phases
10665 (modify-phases %standard-phases
10666 (add-before 'build 'fix-tests
10667 (lambda _
10668 (substitute* '("src/test/java/com/neilalexander/jnacl/NaClTest.java"
10669 "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java")
10670 (("assertions.Assertions") "assertions.api.Assertions"))
10671 #t))
10672 (replace 'check
10673 (lambda _
10674 (invoke "ant" "compile-tests")
10675 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
10676 ":build/classes"
10677 ":build/test-classes")
10678 "org.testng.TestNG" "-testclass"
10679 "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class")
10680 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
10681 ":build/classes"
10682 ":build/test-classes")
10683 "org.testng.TestNG" "-testclass"
10684 "build/test-classes/com/neilalexander/jnacl/NaClTest.class"))))))
10685 (native-inputs
10686 `(("java-testng" ,java-testng)
10687 ("java-fest-util" ,java-fest-util)
10688 ("java-fest-assert" ,java-fest-assert)))
10689 (home-page "https://github.com/neilalexander/jnacl")
10690 (synopsis "Java implementation of NaCl")
10691 (description "Pure Java implementation of the NaCl: Networking and
10692 Cryptography library.")
10693 (license license:bsd-2))))
10694
10695 (define-public java-mvel2
10696 (package
10697 (name "java-mvel2")
10698 (version "2.3.1")
10699 (source (origin
10700 (method url-fetch)
10701 (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-"
10702 version ".Final.tar.gz"))
10703 (sha256
10704 (base32
10705 "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z"))))
10706 (build-system ant-build-system)
10707 (arguments
10708 `(#:jar-name "mvel2.jar"
10709 #:source-dir "src/main/java"
10710 #:test-exclude
10711 (list "**/Abstract*.java"
10712 ;; Base class with no tests
10713 "**/MVELThreadTest.java")
10714 #:phases
10715 (modify-phases %standard-phases
10716 (add-after 'install 'install-bin
10717 (lambda* (#:key outputs #:allow-other-keys)
10718 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
10719 (mkdir-p bin)
10720 (with-output-to-file (string-append bin "/mvel2")
10721 (lambda _
10722 (display
10723 (string-append
10724 "#!" (which "bash") "\n"
10725 "if [ \"$#\" -ne \"2\" ]; then\n"
10726 "echo 'Usage: mvel2 <script> <out.dir>'\n"
10727 "exit\n"
10728 "fi\n"
10729 "java -Dout.dir=$2 -cp " (getenv "CLASSPATH")
10730 ":" (assoc-ref outputs "out") "/share/java/mvel2.jar"
10731 " org.mvel2.sh.Main $1"))))
10732 (chmod (string-append bin "/mvel2") #o755))
10733 #t)))))
10734 (native-inputs
10735 `(("junit" ,java-junit)
10736 ("hamcrest" ,java-hamcrest-core)))
10737 (home-page "https://github.com/mvel/mvel")
10738 (synopsis "MVFLEX Expression Language")
10739 (description "MVEL has largely been inspired by Java syntax, but has some
10740 fundamental differences aimed at making it more efficient as an expression
10741 language, such as operators that directly support collection, array and string
10742 matching, as well as regular expressions. MVEL is used to evaluate expressions
10743 written using Java syntax.
10744
10745 In addition to the expression language, MVEL serves as a templating language for
10746 configuration and string construction.")
10747 (license license:asl2.0)))
10748
10749 (define-public java-commons-jexl-2
10750 (package
10751 (name "java-commons-jexl")
10752 (version "2.1.1")
10753 (source (origin
10754 (method url-fetch)
10755 (uri (string-append "mirror://apache/commons/jexl/source/"
10756 "commons-jexl-" version "-src.tar.gz"))
10757 (sha256
10758 (base32
10759 "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz"))))
10760 (build-system ant-build-system)
10761 (arguments
10762 `(#:jar-name "commons-jexl-2.jar"
10763 #:jdk ,icedtea-8
10764 #:source-dir "src/main/java"
10765 #:phases
10766 (modify-phases %standard-phases
10767 (add-before 'check 'disable-broken-tests
10768 (lambda* (#:key inputs #:allow-other-keys)
10769 (with-directory-excursion "src/test/java/org/apache/commons/jexl2/"
10770 (substitute* "ArithmeticTest.java"
10771 (("asserter.assertExpression\\(\"3 / 0\"") "//")
10772 (("asserter.assertExpression\\(\"imanull") "//"))
10773 ;; This test fails with "ambiguous method invocation"
10774 (delete-file "CacheTest.java")
10775 ;; This test doesn't have access to the temp directory
10776 (substitute* "ClassCreatorTest.java"
10777 (("java.io.tmpdir") "user.dir"))
10778 ;; This test fails in trying to detect whether it can run.
10779 (substitute* "ClassCreator.java"
10780 (("boolean canRun =.*") "boolean canRun = false;\n"))
10781 ;; ...and these tests depend on it.
10782 (delete-file "scripting/JexlScriptEngineOptionalTest.java")
10783 (delete-file "scripting/JexlScriptEngineTest.java"))
10784 #t))
10785 (add-before 'build 'run-javacc
10786 (lambda _
10787 (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/"
10788 (invoke "java" "jjtree" "Parser.jjt")
10789 (invoke "java" "javacc" "Parser.jj"))
10790 #t)))))
10791 (inputs
10792 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
10793 (native-inputs
10794 `(("java-junit" ,java-junit)
10795 ("java-hamcrest-core" ,java-hamcrest-core)
10796 ("javacc" ,javacc-4)))
10797 (home-page "https://commons.apache.org/proper/commons-jexl/")
10798 (synopsis "Java Expression Language ")
10799 (description "JEXL is a library intended to facilitate the implementation
10800 of dynamic and scripting features in applications and frameworks written in
10801 Java. JEXL implements an Expression Language based on some extensions to the
10802 JSTL Expression Language supporting most of the constructs seen in
10803 shell-script or ECMAScript. Its goal is to expose scripting features usable
10804 by technical operatives or consultants working with enterprise platforms.")
10805 (license license:asl2.0)))
10806
10807 (define-public java-lz4
10808 (package
10809 (name "java-lz4")
10810 (version "1.4.0")
10811 (source (origin
10812 (method git-fetch)
10813 (uri (git-reference
10814 (url "https://github.com/lz4/lz4-java")
10815 (commit version)))
10816 (file-name (git-file-name name version))
10817 (sha256
10818 (base32
10819 "0ydjakhv3cz34mfvv14qrh2ksdxifgjwwagjy7r46qr3f68hnf6y"))))
10820 (build-system ant-build-system)
10821 (arguments
10822 `(#:jar-name "lz4.jar"
10823 #:jdk ,icedtea-8
10824 #:source-dir "src/java:src/java-unsafe"
10825 #:tests? #f; FIXME: requires more dependencies
10826 #:phases
10827 (modify-phases %standard-phases
10828 (add-after 'unpack 'make-files-writable
10829 (lambda _
10830 (for-each make-file-writable (find-files "."))
10831 #t))
10832 (add-before 'configure 'generate-source
10833 (lambda _
10834 (with-directory-excursion "src/build/source_templates"
10835 (invoke "mvel2" "../gen_sources.mvel" "../../java"))
10836 #t)))))
10837 (native-inputs
10838 `(("mvel" ,java-mvel2)))
10839 (home-page "https://jpountz.github.io/lz4-java")
10840 (synopsis "Compression algorithm")
10841 (description "LZ4 - Java is a Java port of the popular lz4 compression
10842 algorithms and xxHash hashing algorithm.")
10843 (license license:asl2.0)))
10844
10845 (define-public java-bouncycastle
10846 (package
10847 (name "java-bouncycastle")
10848 (version "1.60")
10849 (source (origin
10850 (method git-fetch)
10851 (uri (git-reference
10852 (url "http://git.bouncycastle.org/repositories/bc-java")
10853 ;(url "https://github.com/bcgit/bc-java")
10854 (commit (string-append "r1rv" (substring version 2 4)))))
10855 (file-name (git-file-name name version))
10856 (sha256
10857 (base32
10858 "1m921a1ac2dl797ffzg3d4j97ch308f25spb4jgsj3npfmmys5gb"))
10859 (modules '((guix build utils)))
10860 (snippet
10861 '(begin
10862 (for-each delete-file
10863 (find-files "." "\\.jar$"))
10864 #t))))
10865 (build-system ant-build-system)
10866 (arguments
10867 `(#:jdk ,icedtea-8
10868 #:tests? #f
10869 #:phases
10870 (modify-phases %standard-phases
10871 (replace 'build
10872 (lambda _
10873 (invoke "ant" "-f" "ant/jdk15+.xml" "build-provider")
10874 (invoke "ant" "-f" "ant/jdk15+.xml" "build")))
10875 ;; FIXME: the tests freeze.
10876 ;; (replace 'check
10877 ;; (lambda _
10878 ;; (invoke "ant" "-f" "ant/jdk15+.xml" "test")))
10879 (replace 'install
10880 (install-jars "build/artifacts/jdk1.5/jars")))))
10881 (inputs
10882 `(("java-javax-mail" ,java-javax-mail)))
10883 (native-inputs
10884 `(("unzip" ,unzip)
10885 ("junit" ,java-junit)
10886 ("java-native-access" ,java-native-access)
10887 ("java-native-access-platform" ,java-native-access-platform)))
10888 (home-page "https://www.bouncycastle.org")
10889 (synopsis "Cryptographic library")
10890 (description "Bouncy Castle is a cryptographic library for the Java
10891 programming language.")
10892 (license license:expat)))
10893
10894 (define-public java-lmax-disruptor
10895 (package
10896 (name "java-lmax-disruptor")
10897 (version "3.3.7")
10898 (source (origin
10899 (method url-fetch)
10900 (uri (string-append "https://github.com/LMAX-Exchange/disruptor/"
10901 "archive/" version ".tar.gz"))
10902 (file-name (string-append name "-" version ".tar.gz"))
10903 (sha256
10904 (base32
10905 "17da2gwj5abnlsfgn2xqjk5lgzbg4vkb0hdv2dvc8r2fx4bi7w3g"))))
10906 (build-system ant-build-system)
10907 (arguments
10908 `(#:jar-name "java-lmax-disruptor.jar"
10909 #:jdk ,icedtea-8
10910 #:tests? #f)); tests hang
10911 (inputs
10912 `(("junit" ,java-junit)
10913 ("java-hdrhistogram" ,java-hdrhistogram)
10914 ("java-jmock" ,java-jmock)
10915 ("java-jmock-legacy" ,java-jmock-legacy)
10916 ("java-jmock-junit4" ,java-jmock-junit4)
10917 ("java-hamcrest-all" ,java-hamcrest-all)))
10918 (native-inputs
10919 `(("cglib" ,java-cglib)
10920 ("objenesis" ,java-objenesis)
10921 ("asm" ,java-asm)))
10922 (home-page "https://www.lmax.com/disruptor")
10923 (synopsis "High performance inter-thread communication")
10924 (description "LMAX Disruptor is a software pattern and software component
10925 for high performance inter-thread communication that avoids the need for
10926 message queues or resource locking.")
10927 (license license:asl2.0)))
10928
10929 (define-public java-commons-bcel
10930 (package
10931 (name "java-commons-bcel")
10932 (version "6.1")
10933 (source (origin
10934 (method url-fetch)
10935 (uri (string-append "mirror://apache/commons/bcel/source/bcel-"
10936 version "-src.tar.gz"))
10937 (sha256
10938 (base32
10939 "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy"))))
10940 (build-system ant-build-system)
10941 (arguments
10942 `(#:jar-name "bcel.jar"
10943 #:jdk ,icedtea-8
10944 #:source-dir "src/main/java"
10945 #:test-dir "src/test/java"
10946 ;; FIXME: Tests require the unpackaged jna.
10947 #:tests? #f))
10948 (home-page "https://commons.apache.org/proper/commons-bcel/")
10949 (synopsis "Byte code engineering library")
10950 (description "The Byte Code Engineering Library (Apache Commons BCEL) is
10951 intended to give users a convenient way to analyze, create, and
10952 manipulate (binary) Java class files. Classes are represented by objects
10953 which contain all the symbolic information of the given class: methods, fields
10954 and byte code instructions, in particular.
10955
10956 Such objects can be read from an existing file, be transformed by a
10957 program (e.g. a class loader at run-time) and written to a file again. An
10958 even more interesting application is the creation of classes from scratch at
10959 run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful
10960 if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format
10961 of Java @code{.class} files.")
10962 (license license:asl2.0)))
10963
10964 (define-public java-xerial-core
10965 (package
10966 (name "java-xerial-core")
10967 (version "2.1")
10968 (source (origin
10969 (method url-fetch)
10970 (uri (string-append "https://github.com/xerial/xerial-java/archive/"
10971 version ".tar.gz"))
10972 (file-name (string-append name "-" version ".tar.gz"))
10973 (sha256
10974 (base32
10975 "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d"))))
10976 (build-system ant-build-system)
10977 (arguments
10978 `(#:jar-name "xerial-core.jar"
10979 #:source-dir "xerial-core/src/main/java"
10980 #:test-dir "xerial-core/src/test"
10981 #:phases
10982 (modify-phases %standard-phases
10983 (add-before 'build 'copy-resources
10984 (lambda _
10985 (copy-recursively "xerial-core/src/main/resources"
10986 "build/classes")
10987 #t)))))
10988 (native-inputs
10989 `(("junit" ,java-junit)
10990 ("hamcrest" ,java-hamcrest-core)))
10991 (home-page "https://github.com/xerial/xerial-java")
10992 (synopsis "Data management libraries for Java")
10993 (description "Xerial is a set of data management libraries for the Java
10994 programming language. The ultimate goal of the Xerial project is to manage
10995 everything as database, including class objects, text format data, data
10996 streams, etc.")
10997 (license license:asl2.0)))
10998
10999 (define-public java-powermock-reflect
11000 (package
11001 (name "java-powermock-reflect")
11002 (version "1.7.3")
11003 (source (origin
11004 (method url-fetch)
11005 (uri (string-append "https://github.com/powermock/powermock/"
11006 "archive/powermock-" version ".tar.gz"))
11007 (file-name (string-append name "-" version ".tar.gz"))
11008 (sha256
11009 (base32
11010 "0sbgi5vqq7k72wzcdjb20s370vyd4hsbnx71pzb8ishml3gy7fwy"))
11011 (patches
11012 (search-patches "java-powermock-fix-java-files.patch"))))
11013 (build-system ant-build-system)
11014 (arguments
11015 `(#:jar-name "java-powermock-reflect.jar"
11016 #:jdk ,icedtea-8
11017 #:source-dir "powermock-reflect/src/main/java"
11018 #:test-dir "powermock-reflect/src/test"))
11019 (inputs
11020 `(("java-objenesis" ,java-objenesis)))
11021 (native-inputs
11022 `(("junit" ,java-junit)
11023 ("cglib" ,java-cglib)
11024 ("asm" ,java-asm)
11025 ("hamcrest" ,java-hamcrest-core)
11026 ("assertj" ,java-assertj)))
11027 (home-page "https://github.com/powermock/powermock")
11028 (synopsis "Mock library extension framework")
11029 (description "PowerMock is a framework that extends other mock libraries
11030 such as EasyMock with more powerful capabilities. PowerMock uses a custom
11031 classloader and bytecode manipulation to enable mocking of static methods,
11032 constructors, final classes and methods, private methods, removal of static
11033 initializers and more. By using a custom classloader no changes need to be
11034 done to the IDE or continuous integration servers which simplifies adoption.")
11035 (license license:asl2.0)))
11036
11037 (define-public java-powermock-core
11038 (package
11039 (inherit java-powermock-reflect)
11040 (name "java-powermock-core")
11041 (arguments
11042 `(#:jar-name "java-powermock-core.jar"
11043 #:source-dir "powermock-core/src/main/java"
11044 #:test-dir "powermock-core/src/test"
11045 #:tests? #f; requires powermock-api
11046 #:jdk ,icedtea-8
11047 #:phases
11048 (modify-phases %standard-phases
11049 (add-before 'build 'copy-resources
11050 (lambda _
11051 (copy-recursively "powermock-core/src/main/resources"
11052 "build/classes")
11053 #t)))))
11054 (inputs
11055 `(("reflect" ,java-powermock-reflect)
11056 ("javassist" ,java-jboss-javassist)))
11057 (native-inputs
11058 `(("junit" ,java-junit)
11059 ("assertj" ,java-assertj)
11060 ("mockito" ,java-mockito-1)))))
11061
11062 (define-public java-powermock-api-support
11063 (package
11064 (inherit java-powermock-reflect)
11065 (name "java-powermock-api-support")
11066 (build-system ant-build-system)
11067 (arguments
11068 `(#:jar-name "java-powermock-api-support.jar"
11069 #:jdk ,icedtea-8
11070 #:source-dir "powermock-api/powermock-api-support/src/main/java"
11071 #:tests? #f)); no tests
11072 (inputs
11073 `(("core" ,java-powermock-core)
11074 ("reflect" ,java-powermock-reflect)))))
11075
11076 (define-public java-powermock-modules-junit4-common
11077 (package
11078 (inherit java-powermock-reflect)
11079 (name "java-powermock-modules-junit4-common")
11080 (build-system ant-build-system)
11081 (arguments
11082 `(#:jar-name "java-powermock-modules-junit4-common.jar"
11083 #:jdk ,icedtea-8
11084 #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java"
11085 #:test-dir "powermock-modules/powermock-module-junit4-common/src/test"))
11086 (inputs
11087 `(("core" ,java-powermock-core)
11088 ("easymock" ,java-easymock)
11089 ("reflect" ,java-powermock-reflect)
11090 ("hamcrest" ,java-hamcrest-core)
11091 ("cglib" ,java-cglib)))))
11092
11093 (define-public java-powermock-modules-junit4
11094 (package
11095 (inherit java-powermock-reflect)
11096 (name "java-powermock-modules-junit4")
11097 (build-system ant-build-system)
11098 (arguments
11099 `(#:jar-name "java-powermock-modules-junit4.jar"
11100 #:jdk ,icedtea-8
11101 #:source-dir "powermock-modules/powermock-module-junit4/src/main/java"
11102 #:test-dir "powermock-modules/powermock-module-junit4/src/test"
11103 #:phases
11104 (modify-phases %standard-phases
11105 (add-before 'build 'fix-junit-detection
11106 (lambda _
11107 ;; Our junit version is 4.12-SNAPSHOT
11108 (substitute* (find-files "powermock-modules/powermock-module-junit4"
11109 "PowerMockJUnit4MethodValidator.java")
11110 (("4.12") "4.12-SNAPSHOT"))
11111 #t)))))
11112 (inputs
11113 `(("core" ,java-powermock-core)
11114 ("reflect" ,java-powermock-reflect)
11115 ("common" ,java-powermock-modules-junit4-common)
11116 ("cglib" ,java-cglib)))
11117 (native-inputs
11118 `(("easymock" ,java-easymock)
11119 ("hamcrest" ,java-hamcrest-core)
11120 ("objenesis" ,java-objenesis)
11121 ("asm" ,java-asm)
11122 ("junit" ,java-junit)))))
11123
11124 (define-public java-powermock-api-easymock
11125 (package
11126 (inherit java-powermock-reflect)
11127 (name "java-powermock-api-easymock")
11128 (build-system ant-build-system)
11129 (arguments
11130 `(#:jar-name "java-powermock-api-easymock.jar"
11131 #:jdk ,icedtea-8
11132 #:source-dir "powermock-api/powermock-api-easymock/src/main/java"
11133 #:tests? #f; no tests
11134 #:phases
11135 (modify-phases %standard-phases
11136 (add-before 'build 'fix-file
11137 (lambda _
11138 ;; FIXME: This looks wrong, but it fixes a build error.
11139 (with-directory-excursion "powermock-api/powermock-api-easymock"
11140 (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java"
11141 (("classLoader instanceof MockClassLoader") "false")
11142 (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";")))
11143 #t)))))
11144 (inputs
11145 `(("core" ,java-powermock-core)
11146 ("easymock" ,java-easymock)
11147 ("reflect" ,java-powermock-reflect)
11148 ("support" ,java-powermock-api-support)
11149 ("cglib" ,java-cglib)))))
11150
11151 (define-public java-jboss-jms-api-spec
11152 (package
11153 (name "java-jboss-jms-api-spec")
11154 (version "2.0")
11155 (source (origin
11156 (method url-fetch)
11157 (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/"
11158 "archive/jboss-jms-api_" version
11159 "_spec-1.0.1.Final.tar.gz"))
11160 (sha256
11161 (base32
11162 "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m"))))
11163 (build-system ant-build-system)
11164 (arguments
11165 `(#:jar-name "java-jboss-jms-api_spec.jar"
11166 #:jdk ,icedtea-8
11167 #:source-dir "."
11168 #:tests? #f)); no tests
11169 (home-page "https://github.com/jboss/jboss-jms-api_spec")
11170 (synopsis "Java Message Service API specification")
11171 (description "Java Message Service (JMS) API is used to send messages
11172 messages between two or more clients. It is a messaging standard that allows
11173 application components to create, send, receive, and read messages.")
11174 ; either gpl2 only with GPL Classpath Exception, or cddl.
11175 (license (list license:gpl2 license:cddl1.0))))
11176
11177 (define-public java-mail
11178 (package
11179 (name "java-mail")
11180 (version "1.6.0")
11181 (source (origin
11182 (method url-fetch)
11183 (uri (string-append "https://github.com/javaee/javamail/archive/"
11184 "JAVAMAIL-1_6_0.tar.gz"))
11185 (sha256
11186 (base32
11187 "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92"))))
11188 (build-system ant-build-system)
11189 (arguments
11190 `(#:jar-name "java-mail.jar"
11191 #:jdk ,icedtea-8
11192 #:source-dir "mail/src/main/java"
11193 #:test-dir "mail/src/test"
11194 #:test-exclude
11195 (list "**/CollectorFormatterTest.java"
11196 "**/CompactFormatterTest.java"
11197 "**/DurationFilterTest.java"
11198 "**/MailHandlerTest.java"
11199 "**/GetLocalAddressTest.java"
11200 ;; FIXME: both end with:
11201 ;; java.lang.ClassNotFoundException:
11202 ;; javax.mail.internet.MimeMultipartParseTest
11203 "**/MimeMultipartParseTest.java"
11204 "**/SearchTermSerializationTest.java")
11205 #:phases
11206 (modify-phases %standard-phases
11207 (add-before 'configure 'move-version.java
11208 (lambda _
11209 (copy-file "mail/src/main/resources/javax/mail/Version.java"
11210 "mail/src/main/java/javax/mail/Version.java")
11211 #t))
11212 (add-before 'build 'copy-resources
11213 (lambda _
11214 (copy-recursively "mail/src/main/resources/META-INF"
11215 "build/classes/META-INF")
11216 #t)))))
11217 (native-inputs
11218 `(("junit" ,java-junit)
11219 ("hamcrest" ,java-hamcrest-core)))
11220 (home-page "https://javaee.github.io/javamail/")
11221 (synopsis "Mail-related functionality in Java")
11222 (description "The JavaMail API provides a platform-independent and
11223 protocol-independent framework to build mail and messaging applications.")
11224 ;; General Public License Version 2 only ("GPL") or the Common Development
11225 ;; and Distribution License("CDDL")
11226 (license (list license:cddl1.1
11227 license:gpl2)))); with classpath exception
11228
11229 (define-public java-jeromq
11230 (package
11231 (name "java-jeromq")
11232 (version "0.4.3")
11233 (source (origin
11234 (method git-fetch)
11235 (uri (git-reference
11236 (url "https://github.com/zeromq/jeromq")
11237 (commit (string-append "v" version))))
11238 (file-name (string-append name "-" version "-checkout"))
11239 (sha256
11240 (base32
11241 "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj"))
11242 (patches (search-patches "java-jeromq-fix-tests.patch"))))
11243 (build-system ant-build-system)
11244 (arguments
11245 `(#:jar-name "java-jeromq.jar"
11246 #:source-dir "src/main/java"
11247 #:jdk ,icedtea-8
11248 #:test-exclude
11249 (list
11250 "**/Abstract*.java"
11251 ;; Requires network
11252 "**/ZBeaconTest.java"
11253 ;; Failures
11254 "**/DealerSpecTest.java"
11255 "**/CustomDecoderTest.java"
11256 "**/CustomEncoderTest.java"
11257 "**/ConnectRidTest.java"
11258 "**/ReqSpecTest.java"
11259 "**/PushPullSpecTest.java"
11260 "**/PubSubHwmTest.java"
11261 "**/RouterSpecTest.java"
11262 "**/ProxyTest.java")))
11263 (inputs
11264 `(("java-jnacl" ,java-jnacl)))
11265 (native-inputs
11266 `(("java-hamcrest-core" ,java-hamcrest-core)
11267 ("junit" ,java-junit)))
11268 (home-page "http://zeromq.org/bindings:java")
11269 (synopsis "Java binding for 0MQ")
11270 (description "Jeromq provides the java bindings for 0MQ.")
11271 (license license:mpl2.0)))
11272
11273 (define-public java-kafka-clients
11274 (package
11275 (name "java-kafka-clients")
11276 (version "1.0.0")
11277 (source (origin
11278 (method url-fetch)
11279 (uri (string-append "mirror://apache/kafka/" version "/kafka-"
11280 version "-src.tgz"))
11281 (sha256
11282 (base32
11283 "1yxmnsmliwm7671q5yy9bl4jdqyyn00n26cggz9brwczx80w1vfq"))))
11284 (build-system ant-build-system)
11285 (arguments
11286 `(#:jar-name "java-kafka-clients.jar"
11287 #:jdk ,icedtea-8
11288 #:source-dir "clients/src/main/java"
11289 #:test-dir "clients/src/test"
11290 #:test-exclude
11291 (list
11292 ;; This file does not contain a class
11293 "**/IntegrationTest.java"
11294 ;; Requires network
11295 "**/ClientUtilsTest.java"
11296 ;; End with errors that seem related to our powermock
11297 "**/KafkaProducerTest.java"
11298 "**/BufferPoolTest.java")))
11299 (inputs
11300 `(("java-slf4j-api" ,java-slf4j-api)
11301 ("java-lz4" ,java-lz4)))
11302 (native-inputs
11303 `(("junit" ,java-junit)
11304 ("hamcrest" ,java-hamcrest-all)
11305 ("objenesis" ,java-objenesis)
11306 ("asm" ,java-asm)
11307 ("cglib" ,java-cglib)
11308 ("javassist" ,java-jboss-javassist)
11309 ("snappy" ,java-snappy)
11310 ("easymock" ,java-easymock)
11311 ("powermock" ,java-powermock-core)
11312 ("powermock-easymock" ,java-powermock-api-easymock)
11313 ("powermock-junit4-common" ,java-powermock-modules-junit4-common)
11314 ("powermock-junit4" ,java-powermock-modules-junit4)
11315 ("powermock-support" ,java-powermock-api-support)
11316 ("java-bouncycastle" ,java-bouncycastle)))
11317 (home-page "https://kafka.apache.org")
11318 (synopsis "Distributed streaming platform")
11319 (description "Kafka is a distributed streaming platform, which means:
11320 @itemize
11321 @item it can publish and subscribe to streams of records;
11322 @item it can store streams of records in a fault-tolerant way;
11323 @item it can process streams of records as they occur.
11324 @end itemize")
11325 ;; Either cddl or gpl2 only.
11326 (license (list license:cddl1.1; actually cddl1.1
11327 license:gpl2)))); with classpath exception
11328
11329 (define-public java-jdom
11330 (package
11331 (name "java-jdom")
11332 (version "1.1.3")
11333 (source (origin
11334 (method url-fetch)
11335 (uri (string-append "http://jdom.org/dist/binary/archive/jdom-"
11336 version ".tar.gz"))
11337 (sha256
11338 (base32
11339 "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl"))))
11340 (build-system ant-build-system)
11341 (arguments
11342 `(#:build-target "package"
11343 #:tests? #f; tests are run as part of the build process
11344 #:phases
11345 (modify-phases %standard-phases
11346 (replace 'install
11347 (install-jars "build")))))
11348 (home-page "http://jdom.org/")
11349 (synopsis "Access, manipulate, and output XML data")
11350 (description "Java-based solution for accessing, manipulating, and
11351 outputting XML data from Java code.")
11352 (license license:bsd-4)))
11353
11354 (define-public java-geronimo-xbean-reflect
11355 (package
11356 (name "java-geronimo-xbean-reflect")
11357 (version "4.5")
11358 (source (origin
11359 (method svn-fetch)
11360 (uri (svn-reference
11361 (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/")
11362 (revision 1807396)))
11363 (file-name (string-append name "-" version))
11364 (sha256
11365 (base32
11366 "18q3i6jgm6rkw8aysfgihgywrdc5nvijrwnslmi3ww497jvri6ja"))))
11367 (build-system ant-build-system)
11368 (arguments
11369 `(#:jar-name "geronimo-xbean-reflect.jar"
11370 #:source-dir "xbean-reflect/src/main/java"
11371 #:test-dir "xbean-reflect/src/test"
11372 #:jdk ,icedtea-8
11373 #:test-exclude
11374 (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java"
11375 "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java"
11376 "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java")
11377 #:phases
11378 (modify-phases %standard-phases
11379 (add-before 'build 'fix-source
11380 (lambda _
11381 (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/"))
11382 ;; org.apache.xbean.asm6 is actually repackaged java-asm
11383 (substitute* (string-append dir "XbeanAsmParameterNameLoader.java")
11384 (("org.apache.xbean.asm5") "org.objectweb.asm"))
11385 #t)))
11386 (replace 'install (install-from-pom "xbean-reflect/pom.xml")))))
11387 (inputs
11388 `(("asm" ,java-asm)
11389 ("log4j" ,java-log4j-api)
11390 ("log4j-1.2" ,java-log4j-1.2-api)
11391 ("log4j-core" ,java-log4j-core)
11392 ("logging" ,java-commons-logging-minimal)))
11393 (propagated-inputs
11394 `(("java-geronimo-parent-pom" ,java-geronimo-parent-pom)))
11395 (native-inputs
11396 `(("junit" ,java-junit)))
11397 (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/")
11398 (synopsis "Dependency injection helper")
11399 (description "Xbean-reflect provides very flexible ways to create objects
11400 and graphs of objects for dependency injection frameworks")
11401 (license license:asl2.0)))
11402
11403 (define java-geronimo-genesis-2.1
11404 (package
11405 (name "java-geronimo-genesis")
11406 (version "2.1")
11407 (source (origin
11408 (method svn-fetch)
11409 (uri (svn-reference
11410 (url (string-append "https://svn.apache.org/repos/asf/"
11411 "geronimo/genesis/tags/genesis-"
11412 version))
11413 (revision 1807396)))
11414 (file-name (string-append name "-" version "-source"))
11415 (sha256
11416 (base32
11417 "119yn795jvnjf52si84q192s8wag1k013iabg78b7wnadssnnh31"))))
11418 (build-system ant-build-system)
11419 (arguments
11420 `(#:tests? #f
11421 #:phases
11422 (modify-phases %standard-phases
11423 (delete 'configure)
11424 (delete 'build)
11425 (replace 'install
11426 (install-pom-file "pom.xml"))
11427 (add-after 'install 'install-enforcer-rules
11428 (install-pom-file "genesis-enforcer-rules/pom.xml"))
11429 (add-after 'install 'install-flava
11430 (install-pom-file "genesis-default-flava/pom.xml"))
11431 (add-after 'install 'install-packaging
11432 (install-pom-file "genesis-packaging/pom.xml"))
11433 (add-after 'install-flava 'install-flava-java4
11434 (install-pom-file "genesis-default-flava/genesis-java1.4-flava/pom.xml"))
11435 (add-after 'install-flava 'install-flava-java5
11436 (install-pom-file "genesis-default-flava/genesis-java5-flava/pom.xml"))
11437 (add-after 'install-flava 'install-flava-java6
11438 (install-pom-file "genesis-default-flava/genesis-java6-flava/pom.xml")))))
11439 (propagated-inputs
11440 `(("apache-parent-pom" ,apache-parent-pom-13)))
11441 (home-page "https://geronimo.apache.org")
11442 (synopsis "Collection of maven POM files for the Geronimo project")
11443 (description "Apache Geronimo is a server runtime. This package contains
11444 only pom files used by other components in the Geronimo project.")
11445 (license license:asl2.0)))
11446
11447 (define java-geronimo-parent-pom
11448 (package
11449 (inherit java-geronimo-xbean-reflect)
11450 (name "java-geronimo-parent-pom")
11451 (arguments
11452 `(#:tests? #f
11453 #:phases
11454 (modify-phases %standard-phases
11455 (delete 'configure)
11456 (delete 'build)
11457 (replace 'install
11458 (install-pom-file "pom.xml")))))
11459 (propagated-inputs
11460 `(("java-geronimo-genesis" ,java-geronimo-genesis-2.1)))))
11461
11462 (define-public java-geronimo-xbean-bundleutils
11463 (package
11464 (inherit java-geronimo-xbean-reflect)
11465 (name "java-geronimo-xbean-bundleutils")
11466 (arguments
11467 `(#:jar-name "geronimo-xbean-bundleutils.jar"
11468 #:source-dir "xbean-bundleutils/src/main/java"
11469 #:test-dir "xbean-bundleutils/src/test"
11470 #:phases
11471 (modify-phases %standard-phases
11472 (add-before 'build 'fix-java
11473 (lambda _
11474 ;; We use a more recent version of osgi, so this file requires
11475 ;; more interface method implementations.
11476 (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java"
11477 (("import org.osgi.framework.ServiceRegistration;")
11478 "import org.osgi.framework.ServiceRegistration;
11479 import org.osgi.framework.ServiceFactory;
11480 import java.util.Collection;
11481 import org.osgi.framework.ServiceObjects;")
11482 (("public Bundle getBundle\\(\\)")
11483 "@Override
11484 public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) {
11485 throw new UnsupportedOperationException();
11486 }
11487 @Override
11488 public <S> ServiceRegistration<S> registerService(Class<S> clazz,
11489 ServiceFactory<S> factory, Dictionary<String, ?> properties) {
11490 throw new UnsupportedOperationException();
11491 }
11492 public Bundle getBundle()"))
11493 #t)))))
11494 (inputs
11495 `(("java-slf4j" ,java-slf4j-api)
11496 ("java-asm" ,java-asm)
11497 ("java-osgi-framework" ,java-osgi-framework)
11498 ("java-eclipse-osgi" ,java-eclipse-osgi)
11499 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)))))
11500
11501 (define-public java-geronimo-xbean-asm-util
11502 (package
11503 (inherit java-geronimo-xbean-reflect)
11504 (name "java-geronimo-xbean-asm-util")
11505 (arguments
11506 `(#:jar-name "geronimo-xbean-asm-util.jar"
11507 #:source-dir "xbean-asm-util/src/main/java"
11508 #:tests? #f)); no tests
11509 (inputs
11510 `(("java-asm" ,java-asm)))
11511 (native-inputs '())))
11512
11513 (define-public java-geronimo-xbean-finder
11514 (package
11515 (inherit java-geronimo-xbean-reflect)
11516 (name "java-geronimo-xbean-finder")
11517 (arguments
11518 `(#:jar-name "geronimo-xbean-finder.jar"
11519 #:source-dir "xbean-finder/src/main/java"
11520 #:test-dir "xbean-finder/src/test"))
11521 (inputs
11522 `(("java-slf4j-api" ,java-slf4j-api)
11523 ("java-asm" ,java-asm)
11524 ("java-geronimo-xbean-bundleutils" ,java-geronimo-xbean-bundleutils)
11525 ("java-geronimo-xbean-asm-util" ,java-geronimo-xbean-asm-util)
11526 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)
11527 ("java-osgi-framework" ,java-osgi-framework)))
11528 (native-inputs
11529 `(("java-junit" ,java-junit)
11530 ("java-hamcrest-core" ,java-hamcrest-core)))))
11531
11532 (define-public java-gson
11533 (package
11534 (name "java-gson")
11535 (version "2.8.2")
11536 (source (origin
11537 (method url-fetch)
11538 (uri (string-append "https://github.com/google/gson/archive/"
11539 "gson-parent-" version ".tar.gz"))
11540 (sha256
11541 (base32
11542 "1j4qnp7v046q0k48c4kyf69sxaasx2h949d3cqwsm3kzxms3x0f9"))))
11543 (build-system ant-build-system)
11544 (arguments
11545 `(#:jar-name "gson.jar"
11546 #:source-dir "gson/src/main/java"
11547 #:test-dir "gson/src/test"))
11548 (native-inputs
11549 `(("java-junit" ,java-junit)
11550 ("java-hamcrest-core" ,java-hamcrest-core)))
11551 (home-page "https://github.com/google/gson")
11552 (synopsis "Java serialization/deserialization library from/to JSON")
11553 (description "Gson is a Java library that can be used to convert Java
11554 Objects into their JSON representation. It can also be used to convert a JSON
11555 string to an equivalent Java object. Gson can work with arbitrary Java objects
11556 including pre-existing objects that you do not have source-code of.")
11557 (license license:asl2.0)))
11558
11559 (define-public java-hawtjni
11560 (package
11561 (name "java-hawtjni")
11562 (version "1.15")
11563 (source (origin
11564 (method url-fetch)
11565 (uri (string-append "https://github.com/fusesource/hawtjni/archive/"
11566 "hawtjni-project-" version ".tar.gz"))
11567 (sha256
11568 (base32
11569 "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g"))))
11570 (build-system ant-build-system)
11571 (arguments
11572 `(#:jar-name "hawtjni.jar"
11573 #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java"
11574 #:tests? #f; no tests
11575 #:phases
11576 (modify-phases %standard-phases
11577 (add-before 'build 'build-native
11578 (lambda* (#:key inputs #:allow-other-keys)
11579 (let ((include (string-append "-I" (assoc-ref inputs "jdk") "/include/linux")))
11580 (with-directory-excursion "hawtjni-generator/src/main/resources/"
11581 (invoke "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o"
11582 "-fPIC" "-O2" include)
11583 (invoke "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o"
11584 "-fPIC" "-O2" include)
11585 (invoke "gcc" "-o" "libhawtjni.so" "-shared"
11586 "hawtjni.o" "hawtjni-callback.o")))
11587 #t))
11588 (add-after 'install 'install-native
11589 (lambda* (#:key outputs #:allow-other-keys)
11590 (let* ((out (assoc-ref outputs "out"))
11591 (lib (string-append out "/lib"))
11592 (inc (string-append out "/include")))
11593 (with-directory-excursion "hawtjni-generator/src/main/resources/"
11594 (install-file "libhawtjni.so" lib)
11595 (install-file "hawtjni.h" inc)))
11596 #t))
11597 (add-before 'install 'install-parent
11598 (install-pom-file "pom.xml"))
11599 (replace 'install
11600 (install-from-pom "hawtjni-runtime/pom.xml")))))
11601 (inputs
11602 `(("java-commons-cli" ,java-commons-cli)
11603 ("java-asm" ,java-asm)
11604 ("java-geronimo-xbean-finder" ,java-geronimo-xbean-finder)))
11605 (home-page "https://fusesource.github.io/hawtjni/")
11606 (synopsis "JNI code generator")
11607 (description "HawtJNI is a code generator that produces the JNI code needed
11608 to implement Java native methods. It is based on the jnigen code generator
11609 that is part of the SWT Tools project.")
11610 (license license:asl2.0)))
11611
11612 (define-public java-jansi-native
11613 (package
11614 (name "java-jansi-native")
11615 (version "1.7")
11616 (source (origin
11617 (method url-fetch)
11618 (uri (string-append "https://github.com/fusesource/jansi-native/"
11619 "archive/jansi-native-" version ".tar.gz"))
11620 (sha256
11621 (base32
11622 "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf"))))
11623 (build-system ant-build-system)
11624 (arguments
11625 `(#:jar-name "jansi-native.jar"
11626 #:source-dir "src/main/java"
11627 #:tests? #f; no tests
11628 #:phases
11629 (modify-phases %standard-phases
11630 (add-before 'build 'build-native
11631 (lambda* (#:key inputs #:allow-other-keys)
11632 ;; there are more required files for windows in windows/
11633 (with-directory-excursion "src/main/native-package/src"
11634 (substitute* "jansi_ttyname.c"
11635 (("#include \"jansi_.*") ""))
11636 (invoke "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o"
11637 (string-append "-I" (assoc-ref inputs "java-hawtjni")
11638 "/include")
11639 (string-append "-I" (assoc-ref inputs "jdk")
11640 "/include/linux")
11641 "-fPIC" "-O2")
11642 (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o"))))
11643 (add-before 'build 'install-native
11644 (lambda _
11645 (let ((dir (string-append "build/classes/META-INF/native/"
11646 ,(match (%current-system)
11647 ((or "i686-linux" "armhf-linux")
11648 "linux32")
11649 ((or "x86_64-linux" "aarch64-linux"
11650 "mips64el-linux")
11651 "linux64")
11652 (_ "unknown-kernel")))))
11653 (install-file "src/main/native-package/src/libjansi.so" dir))
11654 #t))
11655 (add-after 'install 'install-native
11656 (lambda* (#:key outputs #:allow-other-keys)
11657 (install-file "src/main/native-package/src/jansi.h"
11658 (string-append (assoc-ref outputs "out") "/include"))
11659 #t))
11660 (add-before 'install 'fix-pom
11661 (lambda _
11662 ;; pom contains variables to complete name, but we don't support that
11663 (substitute* "pom.xml"
11664 (("\\$\\{platform\\}") "native"))
11665 #t))
11666 (replace 'install
11667 (install-from-pom "pom.xml")))))
11668 (propagated-inputs
11669 `(("java-hawtjni" ,java-hawtjni)))
11670 (home-page "https://fusesource.github.io/jansi/")
11671 (synopsis "Native library for jansi")
11672 (description "This package provides the native library for jansi, a small
11673 Java library that allows you to use ANSI escape sequences to format your
11674 console output.")
11675 (license license:asl2.0)))
11676
11677 (define-public java-jansi
11678 (package
11679 (name "java-jansi")
11680 (version "1.16")
11681 (source (origin
11682 (method url-fetch)
11683 (uri (string-append "https://github.com/fusesource/jansi/archive/"
11684 "jansi-project-" version ".tar.gz"))
11685 (sha256
11686 (base32
11687 "11kh3144i3fzp21dpy8zg52mjmsr214k7km9p8ly0rqk2px0qq2z"))))
11688 (build-system ant-build-system)
11689 (arguments
11690 `(#:jar-name "jansi.jar"
11691 #:source-dir "jansi/src/main/java"
11692 #:test-dir "jansi/src/test"
11693 #:phases
11694 (modify-phases %standard-phases
11695 (add-after 'check 'clear-term
11696 (lambda _
11697 (invoke "echo" "-e" "\\e[0m")))
11698 (add-before 'install 'install-parent
11699 (install-pom-file "pom.xml"))
11700 (add-before 'install 'fix-pom
11701 (lambda _
11702 ;; pom adds jansi native versions for different platforms, but we
11703 ;; only need one, so use native instead
11704 (substitute* "jansi/pom.xml"
11705 (("windows32") "native")
11706 (("windows64") "native")
11707 (("osx") "native")
11708 (("linux32") "native")
11709 (("linux64") "native")
11710 (("freebsd32") "native")
11711 (("freebsd64") "native"))
11712 #t))
11713 (replace 'install
11714 (install-from-pom "jansi/pom.xml")))))
11715 (propagated-inputs
11716 `(("java-jansi-native" ,java-jansi-native)))
11717 (native-inputs
11718 `(("java-junit" ,java-junit)
11719 ("java-hamcrest-core" ,java-hamcrest-core)))
11720 (home-page "https://fusesource.github.io/jansi/")
11721 (synopsis "Portable ANSI escape sequences")
11722 (description "Jansi is a Java library that allows you to use ANSI escape
11723 sequences to format your console output which works on every platform.")
11724 (license license:asl2.0)))
11725
11726 (define-public java-jboss-el-api-spec
11727 (package
11728 (name "java-jboss-el-api-spec")
11729 (version "3.0")
11730 (source (origin
11731 (method url-fetch)
11732 (uri (string-append "https://github.com/jboss/jboss-el-api_spec/"
11733 "archive/jboss-el-api_" version
11734 "_spec-1.0.7.Final.tar.gz"))
11735 (sha256
11736 (base32
11737 "1j45ljxalwlibxl7g7iv952sjxkw275m8vyxxij8l6wdd5pf0pdh"))))
11738 (build-system ant-build-system)
11739 (arguments
11740 `(#:jar-name "java-jboss-el-api_spec.jar"
11741 #:modules ((guix build ant-build-system)
11742 (guix build utils)
11743 (guix build maven pom)
11744 (guix build java-utils)
11745 (sxml simple))
11746 #:phases
11747 (modify-phases %standard-phases
11748 ;; the origin of javax.el:javax.el-api is unknown, so we use this package
11749 ;; instead, which implements the same thing. We override the pom file
11750 ;; to "rename" the package so it can be found by maven.
11751 (add-before 'install 'override-pom
11752 (lambda _
11753 (delete-file "pom.xml")
11754 (with-output-to-file "pom.xml"
11755 (lambda _
11756 (sxml->xml
11757 `(project
11758 (modelVersion "4.0.0")
11759 (name "el-api")
11760 (groupId "javax.el")
11761 (artifactId "javax.el-api")
11762 (version "3.0")))))
11763 #t))
11764 (replace 'install
11765 (install-from-pom "pom.xml")))))
11766 (inputs
11767 `(("java-junit" ,java-junit)))
11768 (home-page "https://github.com/jboss/jboss-el-api_spec")
11769 (synopsis "JSR-341 expression language 3.0 API")
11770 (description "This package contains an implementation of the JSR-341
11771 specification for the expression language 3.0. It implements an expression
11772 language inspired by ECMAScript and XPath. This language is used with
11773 JavaServer Pages (JSP).")
11774 ;; Either GPL2 only or CDDL.
11775 (license (list license:gpl2 license:cddl1.1))))
11776
11777 (define-public java-jboss-interceptors-api-spec
11778 (package
11779 (name "java-jboss-interceptors-api-spec")
11780 (version "1.2")
11781 (source (origin
11782 (method url-fetch)
11783 (uri (string-append "https://github.com/jboss/jboss-interceptors-api_spec/"
11784 "archive/jboss-interceptors-api_" version
11785 "_spec-1.0.0.Final.tar.gz"))
11786 (sha256
11787 (base32
11788 "0wv8x0jp9a5qxlrgkhb5jdk2gr6vi87b4j4kjb8ryxiy9gn8g51z"))))
11789 (build-system ant-build-system)
11790 (arguments
11791 `(#:jar-name "java-jboss-interceptors-api_spec.jar"
11792 #:jdk ,icedtea-8
11793 #:source-dir "."
11794 #:tests? #f; no tests
11795 #:modules ((guix build ant-build-system)
11796 (guix build utils)
11797 (guix build maven pom)
11798 (guix build java-utils)
11799 (sxml simple))
11800 #:phases
11801 (modify-phases %standard-phases
11802 ;; the origin of javax.interceptor:javax.interceptor-api is unknown,
11803 ;; so we use this package instead, which implements the same thing.
11804 ;; We override the pom file to "rename" the package so it can be found
11805 ;; by maven.
11806 (add-before 'install 'override-pom
11807 (lambda _
11808 (delete-file "pom.xml")
11809 (with-output-to-file "pom.xml"
11810 (lambda _
11811 (sxml->xml
11812 `(project
11813 (modelVersion "4.0.0")
11814 (name "interceptor-api")
11815 (groupId "javax.interceptor")
11816 (artifactId "javax.interceptor-api")
11817 (version "3.0")))))
11818 #t))
11819 (replace 'install
11820 (install-from-pom "pom.xml")))))
11821 (home-page "https://github.com/jboss/jboss-interceptors-api_spec")
11822 (synopsis "Interceptors 1.2 API classes from JSR 318")
11823 (description "Java-jboss-interceptors-api-spec implements the Interceptors
11824 API. Interceptors are used to interpose on business method invocations and
11825 specific events.")
11826 ;; Either GPL2 only or CDDL.
11827 (license (list license:gpl2 license:cddl1.1))))
11828
11829 (define-public java-cdi-api
11830 (package
11831 (name "java-cdi-api")
11832 (version "2.0")
11833 (source (origin
11834 (method url-fetch)
11835 (uri (string-append "https://github.com/cdi-spec/cdi/archive/"
11836 version ".tar.gz"))
11837 (file-name (string-append name "-" version ".tar.gz"))
11838 (sha256
11839 (base32
11840 "1iv8b8bp07c5kmqic14jsr868vycjv4qv02lf3pkgp9z21mnfg5y"))))
11841 (build-system ant-build-system)
11842 (arguments
11843 `(#:source-dir "api/src/main/java"
11844 #:jar-name "java-cdi-api.jar"
11845 #:test-dir "api/src/test"
11846 #:jdk ,icedtea-8
11847 #:tests? #f; Tests fail because we don't have a CDI provider yet
11848 #:phases
11849 (modify-phases %standard-phases
11850 (replace 'install
11851 (install-from-pom "api/pom.xml")))))
11852 (propagated-inputs
11853 `(("java-javax-inject" ,java-javax-inject)
11854 ("java-jboss-el-api-spec" ,java-jboss-el-api-spec)
11855 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)
11856 ("java-weld-parent-pom" ,java-weld-parent-pom)))
11857 (native-inputs
11858 `(("java-testng" ,java-testng)
11859 ("java-hamcrest-core" ,java-hamcrest-core)))
11860 (home-page "http://cdi-spec.org/")
11861 (synopsis "Contexts and Dependency Injection APIs")
11862 (description "Java-cdi-api contains the required APIs for Contexts and
11863 Dependency Injection (CDI).")
11864 (license license:asl2.0)))
11865
11866 (define-public java-joda-convert
11867 (package
11868 (name "java-joda-convert")
11869 (version "1.9.2")
11870 (source (origin
11871 (method url-fetch)
11872 (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v"
11873 version ".tar.gz"))
11874 (file-name (string-append name "-" version ".tar.gz"))
11875 (sha256
11876 (base32
11877 "0vp346xz7dh9br4q7xazhc7hvzf76a6hf95fki9bg67q5jr0kjh7"))))
11878 (build-system ant-build-system)
11879 (arguments
11880 `(#:jar-name (string-append ,name "-" ,version ".jar")
11881 #:source-dir "src/main/java"
11882 #:test-include (list "**/Test*.java")
11883 ;; Contains only interfaces and base classes (no test)
11884 #:test-exclude (list "**/test*/**.java")))
11885 (inputs
11886 `(("java-guava" ,java-guava)))
11887 (native-inputs
11888 `(("java-junit" ,java-junit)
11889 ("java-hamcrest-core" ,java-hamcrest-core)))
11890 (home-page "https://www.joda.org/joda-convert/")
11891 (synopsis "Conversion between Objects and Strings")
11892 (description "Joda-Convert provides a small set of classes to aid
11893 conversion between Objects and Strings. It is not intended to tackle the
11894 wider problem of Object to Object transformation.")
11895 (license license:asl2.0)))
11896
11897 (define-public java-joda-time
11898 (package
11899 (name "java-joda-time")
11900 (version "2.9.9")
11901 (source (origin
11902 (method url-fetch)
11903 (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v"
11904 version ".tar.gz"))
11905 (file-name (string-append name "-" version ".tar.gz"))
11906 (sha256
11907 (base32
11908 "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1"))))
11909 (build-system ant-build-system)
11910 (arguments
11911 `(#:jar-name "java-joda-time.jar"
11912 #:source-dir "src/main/java"
11913 #:test-include (list "**/Test*.java")
11914 ;; There is no runnable test in these files
11915 #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java")
11916 #:phases
11917 (modify-phases %standard-phases
11918 (add-after 'build 'build-resources
11919 (lambda _
11920 (mkdir-p "build/classes/org/joda/time/tz/data")
11921 (mkdir-p "build/classes/org/joda/time/format")
11922 ;; This will produce the following exception:
11923 ;; java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap"
11924 ;; which is normal, because it doesn't exist yet. It still generates
11925 ;; the same file as in the binary one can find on maven.
11926 (invoke "java" "-cp"
11927 (string-append "build/classes:" (getenv "CLASSPATH"))
11928 "org.joda.time.tz.ZoneInfoCompiler"
11929 "-src" "src/main/java/org/joda/time/tz/src"
11930 "-dst" "build/classes/org/joda/time/tz/data"
11931 "africa" "antarctica" "asia" "australasia"
11932 "europe" "northamerica" "southamerica"
11933 "pacificnew" "etcetera" "backward" "systemv")
11934 (for-each (lambda (f)
11935 (copy-file f (string-append
11936 "build/classes/org/joda/time/format/"
11937 (basename f))))
11938 (find-files "src/main/java/org/joda/time/format" ".*.properties"))
11939 #t))
11940 (add-before 'install 'regenerate-jar
11941 (lambda _
11942 ;; We need to regenerate the jar file to add generated data.
11943 (delete-file "build/jar/java-joda-time.jar")
11944 (invoke "ant" "jar")))
11945 (add-before 'check 'copy-test-resources
11946 (lambda _
11947 (mkdir-p "build/test-classes/org/joda/time/tz/data")
11948 (copy-file "src/test/resources/tzdata/ZoneInfoMap"
11949 "build/test-classes/org/joda/time/tz/data/ZoneInfoMap")
11950 (copy-recursively "src/test/resources" "build/test-classes")
11951 #t)))))
11952 (inputs
11953 `(("java-joda-convert" ,java-joda-convert)))
11954 (native-inputs
11955 `(("java-junit" ,java-junit)
11956 ("java-hamcrest-core" ,java-hamcrest-core)
11957 ("tzdata" ,tzdata)))
11958 (home-page "https://www.joda.org/joda-time/")
11959 (synopsis "Replacement for the Java date and time classes")
11960 (description "Joda-Time is a replacement for the Java date and time
11961 classes prior to Java SE 8.")
11962 (license license:asl2.0)))
11963
11964 (define-public java-xerces
11965 (package
11966 (name "java-xerces")
11967 (version "2.12.1")
11968 (source
11969 (origin
11970 (method url-fetch)
11971 (uri (string-append "mirror://apache/xerces/j/source/"
11972 "Xerces-J-src." version ".tar.gz"))
11973 (sha256
11974 (base32 "0494kq36gw3nah19ifb720vwxbpg4ww0k6m3zq6wyanw6a083p6s"))
11975 (patches (search-patches
11976 "java-xerces-xjavac_taskdef.patch"
11977 "java-xerces-build_dont_unzip.patch"
11978 "java-xerces-bootclasspath.patch"))))
11979 (build-system ant-build-system)
11980 (arguments
11981 `(#:tests? #f;; Test files are not present
11982 #:test-target "test"
11983 #:jdk ,icedtea-8
11984 #:phases
11985 (modify-phases %standard-phases
11986 (add-after 'unpack 'create-build.properties
11987 (lambda* (#:key inputs #:allow-other-keys)
11988 (let ((jaxp (assoc-ref inputs "java-jaxp"))
11989 (resolver (assoc-ref inputs "java-apache-xml-commons-resolver")))
11990 (with-output-to-file "build.properties"
11991 (lambda _
11992 (format #t
11993 "jar.jaxp = ~a/share/java/jaxp.jar~@
11994 jar.apis-ext = ~a/share/java/jaxp.jar~@
11995 jar.resolver = ~a/share/java/xml-resolver.jar~%"
11996 jaxp jaxp resolver)))
11997 ;; Make xerces use our version of jaxp in tests
11998 (substitute* "build.xml"
11999 (("xml-apis.jar")
12000 (string-append jaxp "/share/java/jaxp.jar"))
12001 (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}")
12002 "${jar.apis}")))
12003 #t))
12004 (replace 'install (install-jars "build")))))
12005 (inputs
12006 `(("java-apache-xml-commons-resolver" ,java-apache-xml-commons-resolver)
12007 ("java-jaxp" ,java-jaxp)))
12008 (home-page "https://xerces.apache.org/xerces2-j/")
12009 (synopsis "Validating XML parser for Java with DOM level 3 support")
12010 (description "The Xerces2 Java parser is the reference implementation of
12011 XNI, the Xerces Native Interface, and also a fully conforming XML Schema
12012 processor.
12013
12014 Xerces2-J supports the following standards and APIs:
12015
12016 @itemize
12017 @item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation
12018 @item Namespaces in XML Recommendation
12019 @item Document Object Model (DOM) Level 2 Core, Events, and Traversal and
12020 Range Recommendations
12021 @item Simple API for XML (SAX) 2.0.1 Core and Extension
12022 @item Java APIs for XML Processing (JAXP) 1.2.01
12023 @item XML Schema 1.0 Structures and Datatypes Recommendations
12024 @item Experimental implementation of the Document Object Model (DOM) Level 3
12025 Core and Load/Save Working Drafts
12026 @item Provides a partial implementation of the XML Inclusions (XInclude) W3C
12027 Candidate Recommendation
12028 @end itemize
12029
12030 Xerces is now able to parse documents written according to the XML 1.1
12031 Candidate Recommendation, except that it does not yet provide an option to
12032 enable normalization checking as described in section 2.13 of this
12033 specification. It also handles namespaces according to the XML Namespaces 1.1
12034 Candidate Recommendation, and will correctly serialize XML 1.1 documents if
12035 the DOM level 3 load/save API's are in use.")
12036 (license license:asl2.0)))
12037
12038 (define-public java-jakarta-regexp
12039 (package
12040 (name "java-jakarta-regexp")
12041 (version "1.5")
12042 (source
12043 (origin
12044 (method url-fetch)
12045 (uri (string-append
12046 "https://archive.apache.org/dist/jakarta/regexp/jakarta-regexp-"
12047 version ".tar.gz"))
12048 (sha256
12049 (base32
12050 "0zg9rmyif48dck0cv6ynpxv23mmcsx265am1fnnxss7brgw0ms3r"))))
12051 (build-system ant-build-system)
12052 (arguments
12053 `(#:test-target "test"
12054 #:phases
12055 (modify-phases %standard-phases
12056 (replace 'install
12057 (lambda* (#:key outputs #:allow-other-keys)
12058 (let* ((out (assoc-ref outputs "out"))
12059 (out-share (string-append out "/share/java")))
12060 (mkdir-p out-share)
12061 (for-each (lambda (name)
12062 (install-file name out-share))
12063 (find-files "build" "^jakarta-regexp-.*\\.jar$"))
12064 #t))))))
12065 (home-page "https://attic.apache.org/projects/jakarta-regexp.html")
12066 (synopsis "Regular expression parser generator for Java.")
12067 (description "@code{jakarta-regexp} is an old regular expression parser
12068 generator for Java.")
12069 (license license:asl2.0)))
12070
12071 (define-public java-jline
12072 (package
12073 (name "java-jline")
12074 (version "1.0")
12075 (source (origin
12076 (method url-fetch)
12077 (uri (string-append "https://github.com/jline/jline1/archive/jline-"
12078 version ".tar.gz"))
12079 (sha256
12080 (base32
12081 "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir"))))
12082 (build-system ant-build-system)
12083 (arguments
12084 `(#:jar-name "jline.jar"
12085 #:source-dir "src/main/java"
12086 #:test-dir "src/test"
12087 #:phases
12088 (modify-phases %standard-phases
12089 (add-before 'build 'copy-resources
12090 (lambda _
12091 (copy-recursively "src/main/resources" "build/classes")
12092 #t)))))
12093 (native-inputs
12094 `(("java-junit" ,java-junit)))
12095 (home-page "https://jline.github.io")
12096 (synopsis "Console input handling library")
12097 (description "JLine is a Java library for handling console input. It is
12098 similar in functionality to BSD editline and GNU readline but with additional
12099 features that bring it on par with the Z shell line editor.")
12100 (license license:bsd-3)))
12101
12102 (define-public java-jline-2
12103 (package
12104 (inherit java-jline)
12105 (version "2.14.5")
12106 (source (origin
12107 (method url-fetch)
12108 (uri (string-append "https://github.com/jline/jline2/archive/jline-"
12109 version ".tar.gz"))
12110 (sha256
12111 (base32
12112 "1c6qa26mf0viw8hg4jnv72s7i1qb1gh1l8rrzcdvqhqhx82rkdlf"))))
12113 (arguments
12114 `(#:jdk ,icedtea-8
12115 ,@(package-arguments java-jline)))
12116 (inputs
12117 `(("java-jansi" ,java-jansi)
12118 ("java-jansi-native" ,java-jansi-native)))
12119 (native-inputs
12120 `(("java-powermock-modules-junit4" ,java-powermock-modules-junit4)
12121 ("java-powermock-modules-junit4-common" ,java-powermock-modules-junit4-common)
12122 ("java-powermock-api-easymock" ,java-powermock-api-easymock)
12123 ("java-powermock-api-support" ,java-powermock-api-support)
12124 ("java-powermock-core" ,java-powermock-core)
12125 ("java-powermock-reflect" ,java-powermock-reflect)
12126 ("java-easymock" ,java-easymock)
12127 ("java-jboss-javassist" ,java-jboss-javassist)
12128 ("java-objenesis" ,java-objenesis)
12129 ("java-asm" ,java-asm)
12130 ("java-hamcrest-core" ,java-hamcrest-core)
12131 ("java-cglib" ,java-cglib)
12132 ("java-junit" ,java-junit)
12133 ("java-hawtjni" ,java-hawtjni)))))
12134
12135 (define-public java-xmlunit
12136 (package
12137 (name "java-xmlunit")
12138 (version "2.5.1")
12139 (source (origin
12140 (method url-fetch)
12141 (uri (string-append "https://github.com/xmlunit/xmlunit/archive/v"
12142 version ".tar.gz"))
12143 (file-name (string-append name "-" version ".tar.gz"))
12144 (sha256
12145 (base32
12146 "035rivlnmwhfqj0fzviciv0bkh1h95ps1iwnh2kjcvdbk5nccm4z"))))
12147 (build-system ant-build-system)
12148 (arguments
12149 `(#:jar-name "java-xmlunit.jar"
12150 #:source-dir "xmlunit-core/src/main/java"
12151 #:test-dir "xmlunit-core/src/test"
12152 #:phases
12153 (modify-phases %standard-phases
12154 (add-before 'check 'copy-test-resources
12155 (lambda* (#:key inputs #:allow-other-keys)
12156 (copy-recursively (assoc-ref inputs "resources") "../test-resources")
12157 #t)))))
12158 (native-inputs
12159 `(("java-junit" ,java-junit)
12160 ("java-mockito-1" ,java-mockito-1)
12161 ("java-hamcrest-all" ,java-hamcrest-all)
12162 ("java-objenesis" ,java-objenesis)
12163 ("java-asm" ,java-asm)
12164 ("java-cglib" ,java-cglib)
12165 ("resources"
12166 ,(origin
12167 (method git-fetch)
12168 (uri (git-reference
12169 (url "https://github.com/xmlunit/test-resources")
12170 (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec")))
12171 (file-name "java-xmlunit-test-resources")
12172 (sha256
12173 (base32
12174 "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr"))))))
12175 (home-page "https://www.xmlunit.org/")
12176 (synopsis "XML output testing")
12177 (description "XMLUnit provides you with the tools to verify the XML you
12178 emit is the one you want to create. It provides helpers to validate against
12179 an XML Schema, assert the values of XPath queries or compare XML documents
12180 against expected outcomes.")
12181 (license license:asl2.0)))
12182
12183 (define-public java-xmlunit-legacy
12184 (package
12185 (inherit java-xmlunit)
12186 (name "java-xmlunit-legacy")
12187 (arguments
12188 `(#:jar-name "java-xmlunit-legacy.jar"
12189 #:source-dir "xmlunit-legacy/src/main/java"
12190 #:test-dir "xmlunit-legacy/src/test"))
12191 (inputs
12192 `(("java-xmlunit" ,java-xmlunit)
12193 ("java-junit" ,java-junit)))
12194 (native-inputs
12195 `(("java-mockito-1" ,java-mockito-1)))))
12196
12197 (define-public java-xmlunit-matchers
12198 (package
12199 (inherit java-xmlunit)
12200 (name "java-xmlunit-matchers")
12201 (arguments
12202 `(#:jar-name "java-xmlunit-matchers.jar"
12203 #:source-dir "xmlunit-matchers/src/main/java"
12204 #:test-dir "xmlunit-matchers/src/test"
12205 #:test-exclude
12206 ;; Cannot open xsd for http://www.xmlunit.org/test-support/Book.xsd
12207 (list "**/ValidationMatcherTest.java")
12208 #:phases
12209 (modify-phases %standard-phases
12210 (add-before 'build 'copy-test-class
12211 (lambda _
12212 (copy-file "xmlunit-core/src/test/java/org/xmlunit/TestResources.java"
12213 "xmlunit-matchers/src/test/java/org/xmlunit/TestResources.java")
12214 #t))
12215 (add-before 'build 'fix-test-resources-path
12216 (lambda _
12217 (substitute* (find-files "xmlunit-matchers/src/test" ".*.java")
12218 (("../test-resources") "test-resources"))
12219 #t))
12220 (add-before 'check 'copy-test-resources
12221 (lambda* (#:key inputs #:allow-other-keys)
12222 (copy-recursively (assoc-ref inputs "resources") "test-resources")
12223 #t)))))
12224 (inputs
12225 `(("java-xmlunit" ,java-xmlunit)
12226 ("java-junit" ,java-junit)))))
12227
12228 (define-public java-openchart2
12229 (package
12230 (name "java-openchart2")
12231 (version "1.4.3")
12232 (source (origin
12233 (method url-fetch)
12234 (uri (string-append "http://download.approximatrix.com/openchart2/"
12235 "openchart2-" version ".source.zip"))
12236 (sha256
12237 (base32
12238 "1xq96zm5r02n1blja0072jmmsifmxc40lbyfbnmcnr6mw42frh4g"))))
12239 (build-system ant-build-system)
12240 (arguments
12241 `(#:test-target "test"
12242 #:phases
12243 (modify-phases %standard-phases
12244 (add-after 'unpack 'fix-junit-errors
12245 (lambda _
12246 (with-directory-excursion "unittest/src/com/approximatrix/charting/"
12247 (substitute* '("coordsystem/ticklocator/NumericXTickLocatorTest.java"
12248 "coordsystem/ticklocator/NumericYTickLocatorTest.java"
12249 "coordsystem/ticklocator/ObjectXTickLocatorTest.java"
12250 "model/DefaultChartDataModelConstraintsTest.java"
12251 "model/MultiScatterDataModelConstraintsTest.java"
12252 "model/threedimensional/DotPlotDataModelConstraintsTest.java")
12253 (("(assertEquals[^;]+);" before _)
12254 (string-append (string-drop-right before 2) ", 1E-6);"))))
12255 #t))
12256 (replace 'install (install-jars ".")))))
12257 (native-inputs
12258 `(("unzip" ,unzip)
12259 ("java-junit" ,java-junit)
12260 ("java-hamcrest-core" ,java-hamcrest-core)))
12261 (home-page "https://approximatrix.com/products/openchart2/")
12262 (synopsis "Simple plotting for Java")
12263 (description "Openchart2 provides a simple, yet powerful, interface for
12264 Java programmers to create two-dimensional charts and plots. The library
12265 features an assortment of graph styles, including advanced scatter plots, bar
12266 graphs, and pie charts.")
12267 (license license:lgpl2.1+)))
12268
12269 (define-public java-commons-httpclient
12270 (package
12271 (name "java-commons-httpclient")
12272 (version "3.1")
12273 (source (origin
12274 (method url-fetch)
12275 (uri (string-append "mirror://apache/httpcomponents/"
12276 "commons-httpclient/source/commons-httpclient-"
12277 version "-src.tar.gz"))
12278 (sha256
12279 (base32
12280 "1wlpn3cfy3d4inxy6g7wxcsa8p7sshn6aldk9y4ia3lb879rd97r"))))
12281 (build-system ant-build-system)
12282 (arguments
12283 `(#:build-target "compile"
12284 #:test-target "test"
12285 #:tests? #f; requires junit-textui (junit 3)
12286 #:phases
12287 (modify-phases %standard-phases
12288 (add-before 'build 'fix-accent
12289 (lambda _
12290 (for-each (lambda (file)
12291 (with-fluids ((%default-port-encoding "ISO-8859-1"))
12292 (substitute* file
12293 (("\\* @author Ortwin .*") "* @author Ortwin Glueck\n"))))
12294 '("src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java"
12295 "src/examples/TrivialApp.java" "src/examples/ClientApp.java"
12296 "src/test/org/apache/commons/httpclient/TestHttps.java"
12297 "src/test/org/apache/commons/httpclient/TestURIUtil2.java"))
12298 #t))
12299 (replace 'install
12300 (lambda* (#:key outputs #:allow-other-keys)
12301 (invoke "ant" "dist"
12302 (string-append "-Ddist.home=" (assoc-ref outputs "out")
12303 "/share/java"))
12304 #t)))))
12305 (propagated-inputs
12306 `(("java-commons-logging" ,java-commons-logging-minimal)
12307 ("java-commons-codec" ,java-commons-codec)))
12308 (home-page "https://hc.apache.org")
12309 (synopsis "HTTP/1.1 compliant HTTP agent implementation")
12310 (description "This package contains an HTTP/1.1 compliant HTTP agent
12311 implementation. It also provides reusable components for client-side
12312 authentication, HTTP state management, and HTTP connection management.")
12313 (license license:asl2.0)))
12314
12315 (define-public java-commons-vfs
12316 (package
12317 (name "java-commons-vfs")
12318 (version "2.2")
12319 (source (origin
12320 (method url-fetch)
12321 (uri (string-append "mirror://apache/commons/vfs/source/"
12322 "commons-vfs2-distribution-" version "-src.tar.gz"))
12323 (file-name (string-append name "-" version ".tar.gz"))
12324 (sha256
12325 (base32
12326 "1cnq1iaghbp4cslpnvwbp83i5v234x87irssqynhwpfgw7caf1s3"))
12327 (modules '((guix build utils)))
12328 (snippet
12329 '(begin
12330 (for-each delete-file
12331 (find-files "." "\\.jar$"))
12332 #t))))
12333 (build-system ant-build-system)
12334 (arguments
12335 `(#:jar-name "commons-vfs.jar"
12336 #:source-dir "commons-vfs2/src/main/java"
12337 #:test-dir "commons-vfs2/src/test"
12338 ; FIXME: tests depend on many things: apache sshd, hadoop, ftpserver, ...
12339 #:tests? #f
12340 #:phases
12341 (modify-phases %standard-phases
12342 (add-before 'build 'remove-hadoop-and-webdav
12343 ; Remove these files as they are not required and depend on difficult
12344 ; packages.
12345 (lambda _
12346 (for-each delete-file-recursively
12347 '("commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/webdav"
12348 "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs"))
12349 #t)))))
12350 (inputs
12351 `(("java-commons-collections4" ,java-commons-collections4)
12352 ("java-commons-compress" ,java-commons-compress)
12353 ("java-commons-httpclient" ,java-commons-httpclient)
12354 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
12355 ("java-commons-net" ,java-commons-net)
12356 ("java-jsch" ,java-jsch)))
12357 (home-page "https://commons.apache.org/proper/commons-vfs/")
12358 (synopsis "Java file system library")
12359 (description "Commons VFS provides a single API for accessing various
12360 different file systems. It presents a uniform view of the files from various
12361 different sources, such as the files on local disk, on an HTTP server, or
12362 inside a Zip archive.")
12363 (license license:asl2.0)))
12364
12365 (define-public java-jakarta-oro
12366 (package
12367 (name "java-jakarta-oro")
12368 (version "2.0.8")
12369 (source (origin
12370 (method url-fetch)
12371 (uri (string-append "mirror://apache/jakarta/oro/"
12372 "jakarta-oro-" version ".tar.gz"))
12373 (sha256
12374 (base32
12375 "0rpmnsskiwmsy8r0sckz5n5dbvh3vkxx8hpm177c754r8xy3qksc"))
12376 (modules '((guix build utils)))
12377 (snippet
12378 `(begin
12379 (delete-file (string-append "jakarta-oro-" ,version ".jar"))
12380 #t))))
12381 (build-system ant-build-system)
12382 (arguments
12383 `(#:build-target "package"
12384 #:make-flags (list "-DDATE" "(no recorded date for reproducibility)")
12385 #:tests? #f; tests are run as part of the build process
12386 #:phases
12387 (modify-phases %standard-phases
12388 (replace 'install
12389 (install-jars ,(string-append "jakarta-oro-" version))))))
12390 (home-page "https://jakarta.apache.org/oro/")
12391 (synopsis "Text-processing for Java")
12392 (description "The Jakarta-ORO Java classes are a set of text-processing
12393 Java classes that provide Perl5 compatible regular expressions, AWK-like
12394 regular expressions, glob expressions, and utility classes for performing
12395 substitutions, splits, filtering filenames, etc. This library is the successor
12396 of the OROMatcher, AwkTools, PerlTools, and TextTools libraries originally
12397 from ORO, Inc.")
12398 (license license:asl1.1)))
12399
12400 (define-public java-native-access
12401 (package
12402 (name "java-native-access")
12403 (version "4.5.1")
12404 (source (origin
12405 (method url-fetch)
12406 (uri (string-append "https://github.com/java-native-access/jna/"
12407 "archive/" version ".tar.gz"))
12408 (file-name (string-append name "-" version ".tar.gz"))
12409 (sha256
12410 (base32
12411 "0zrpzkib6b905i018a9pqlzkqinphywr6y4jwv6mwp63jjqvqkd9"))
12412 (modules '((guix build utils)))
12413 (snippet
12414 `(begin
12415 (for-each delete-file (find-files "." ".*.jar"))
12416 (delete-file-recursively "native/libffi")
12417 (delete-file-recursively "dist")
12418 #t))))
12419 (build-system ant-build-system)
12420 (arguments
12421 `(#:tests? #f; FIXME: tests require reflections.jar
12422 #:test-target "test"
12423 #:make-flags (list "-Ddynlink.native=true")
12424 #:phases
12425 (modify-phases %standard-phases
12426 (add-before 'build 'fix-build.xml
12427 (lambda* (#:key inputs #:allow-other-keys)
12428 (substitute* "build.xml"
12429 ;; Since we removed the bundled ant.jar, give the correct path
12430 (("lib/ant.jar") (string-append (assoc-ref inputs "ant") "/lib/ant.jar"))
12431 ;; We removed generated native libraries. We can only rebuild one
12432 ;; so don't fail if we can't find a native library for another architecture.
12433 (("zipfileset") "zipfileset erroronmissingarchive=\"false\""))
12434 ;; Copy test dependencies
12435 (copy-file (car (find-files (assoc-ref inputs "java-junit") "jar$"))
12436 "lib/junit.jar")
12437 (copy-file (car (find-files (assoc-ref inputs "java-hamcrest-core")
12438 "jar$"))
12439 "lib/hamcrest-core.jar")
12440 ;; FIXME: once reflections.jar is built, copy it to lib/test.
12441 #t))
12442 (add-before 'build 'build-native
12443 (lambda _
12444 (invoke "ant" "-Ddynlink.native=true" "native")
12445 #t))
12446 (replace 'install
12447 (install-jars "build")))))
12448 (inputs
12449 `(("libffi" ,libffi)
12450 ("libx11" ,libx11)
12451 ("libxt" ,libxt)))
12452 (native-inputs
12453 `(("java-junit" ,java-junit)
12454 ("java-hamcrest-core" ,java-hamcrest-core)))
12455 (home-page "https://github.com/java-native-access/jna")
12456 (synopsis "Access to native shared libraries from Java")
12457 (description "JNA provides Java programs easy access to native shared
12458 libraries without writing anything but Java code - no JNI or native code is
12459 required. JNA allows you to call directly into native functions using natural
12460 Java method invocation.")
12461 ;; Java Native Access project (JNA) is dual-licensed under 2
12462 ;; alternative Free licenses: LGPL 2.1 or later and Apache License 2.0.
12463 (license (list
12464 license:asl2.0
12465 license:lgpl2.1+))))
12466
12467 (define-public java-native-access-platform
12468 (package
12469 (inherit java-native-access)
12470 (name "java-native-access-platform")
12471 (arguments
12472 `(#:test-target "test"
12473 #:tests? #f; require jna-test.jar
12474 #:phases
12475 (modify-phases %standard-phases
12476 (add-before 'build 'chdir
12477 (lambda _
12478 (chdir "contrib/platform")
12479 #t))
12480 (add-after 'chdir 'fix-ant
12481 (lambda* (#:key inputs #:allow-other-keys)
12482 (substitute* "nbproject/project.properties"
12483 (("../../build/jna.jar")
12484 (string-append (assoc-ref inputs "java-native-access")
12485 "/share/java/jna.jar"))
12486 (("../../lib/hamcrest-core-.*.jar")
12487 (car (find-files (assoc-ref inputs "java-hamcrest-core")
12488 "jar$")))
12489 (("../../lib/junit.jar")
12490 (car (find-files (assoc-ref inputs "java-junit")
12491 "jar$"))))
12492 #t))
12493 (replace 'install
12494 (install-jars "dist")))))
12495 (inputs
12496 `(("java-native-access" ,java-native-access)))
12497 (synopsis "Cross-platform mappings for jna")
12498 (description "java-native-access-platform has cross-platform mappings
12499 and mappings for a number of commonly used platform functions, including a
12500 large number of Win32 mappings as well as a set of utility classes that
12501 simplify native access.")))
12502
12503 (define-public java-jsch-agentproxy-core
12504 (package
12505 (name "java-jsch-agentproxy-core")
12506 (version "0.0.8")
12507 (source (origin
12508 (method url-fetch)
12509 (uri (string-append "https://github.com/ymnk/jsch-agent-proxy/archive/"
12510 version ".tar.gz"))
12511 (file-name (string-append name "-" version ".tar.gz"))
12512 (sha256
12513 (base32
12514 "02iqg6jbc1kxvfzqcg6wy9ygqxfm82bw5rf6vnswqy4y572niz4q"))))
12515 (build-system ant-build-system)
12516 (arguments
12517 `(#:jar-name "jsch-agentproxy-core.jar"
12518 #:source-dir "jsch-agent-proxy-core/src/main/java"
12519 #:tests? #f)); no tests
12520 (home-page "https://github.com/ymnk/jsch-agent-proxy")
12521 (synopsis "Core component of the proxy to ssh-agent and Pageant in Java")
12522 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12523 and Pageant included Putty. It will be easily integrated into JSch, and users
12524 will be allowed to use these programs for authentication.")
12525 (license license:bsd-3)))
12526
12527 (define-public java-jsch-agentproxy-sshagent
12528 (package
12529 (inherit java-jsch-agentproxy-core)
12530 (name "java-jsch-agentproxy-sshagent")
12531 (arguments
12532 `(#:jar-name "jsch-agentproxy-sshagent.jar"
12533 #:source-dir "jsch-agent-proxy-sshagent/src/main/java"
12534 #:tests? #f)); no tests
12535 (inputs
12536 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
12537 (synopsis "Proxy to ssh-agent")
12538 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12539 and Pageant included in Putty. This component contains the code for a proxy to
12540 ssh-agent.")))
12541
12542 (define-public java-jsch-agentproxy-usocket-jna
12543 (package
12544 (inherit java-jsch-agentproxy-core)
12545 (name "java-jsch-agentproxy-usocket-jna")
12546 (arguments
12547 `(#:jar-name "jsch-agentproxy-usocket-jna.jar"
12548 #:source-dir "jsch-agent-proxy-usocket-jna/src/main/java"
12549 #:tests? #f)); no tests
12550 (inputs
12551 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
12552 ("java-native-access" ,java-native-access)))
12553 (synopsis "USocketFactory implementation using JNA")
12554 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12555 and Pageant included in Putty. This component contains an implementation of
12556 USocketFactory using @dfn{JNA} (Java Native Access).")))
12557
12558 (define-public java-jsch-agentproxy-pageant
12559 (package
12560 (inherit java-jsch-agentproxy-core)
12561 (name "java-jsch-agentproxy-pageant")
12562 (arguments
12563 `(#:jar-name "jsch-agentproxy-pageant.jar"
12564 #:source-dir "jsch-agent-proxy-pageant/src/main/java"
12565 #:tests? #f)); no tests
12566 (inputs
12567 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
12568 ("java-native-access" ,java-native-access)
12569 ("java-native-access-platform" ,java-native-access-platform)))
12570 (synopsis "Proxy to pageant")
12571 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12572 and Pageant included in Putty. This component contains the code for a proxy to
12573 pageant.")))
12574
12575 (define-public java-jsch-agentproxy-usocket-nc
12576 (package
12577 (inherit java-jsch-agentproxy-core)
12578 (name "java-jsch-agentproxy-usocket-nc")
12579 (arguments
12580 `(#:jar-name "jsch-agentproxy-usocket-nc.jar"
12581 #:source-dir "jsch-agent-proxy-usocket-nc/src/main/java"
12582 #:tests? #f)); no tests
12583 (inputs
12584 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
12585 (synopsis "USocketFactory implementation using netcat")
12586 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12587 and Pageant included in Putty. This component contains an implementation of
12588 USocketFactory using netcat.")))
12589
12590 (define-public java-jsch-agentproxy-connector-factory
12591 (package
12592 (inherit java-jsch-agentproxy-core)
12593 (name "java-jsch-agentproxy-connector-factory")
12594 (arguments
12595 `(#:jar-name "jsch-agentproxy-connector-factory.jar"
12596 #:source-dir "jsch-agent-proxy-connector-factory/src/main/java"
12597 #:tests? #f)); no tests
12598 (inputs
12599 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
12600 ("java-jsch-agentproxy-sshagent" ,java-jsch-agentproxy-sshagent)
12601 ("java-jsch-agentproxy-usocket-jna" ,java-jsch-agentproxy-usocket-jna)
12602 ("java-jsch-agentproxy-pageant" ,java-jsch-agentproxy-pageant)
12603 ("java-jsch-agentproxy-usocket-nc" ,java-jsch-agentproxy-usocket-nc)))
12604 (synopsis "Connector factory for jsch agent proxy")
12605 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12606 and Pageant included in Putty. This component contains a connector factory.")))
12607
12608 (define-public java-jsch-agentproxy-jsch
12609 (package
12610 (inherit java-jsch-agentproxy-core)
12611 (name "java-jsch-agentproxy-jsch")
12612 (arguments
12613 `(#:jar-name "jsch-agentproxy-jsch.jar"
12614 #:source-dir "jsch-agent-proxy-jsch/src/main/java"
12615 #:tests? #f)); no tests
12616 (inputs
12617 `(("java-jsch" ,java-jsch)
12618 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
12619 (synopsis "JSch integration library for agentproxy")
12620 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12621 and Pageant included in Putty. This component contains a library to use
12622 jsch-agent-proxy with JSch.")))
12623
12624 (define-public java-apache-ivy
12625 (package
12626 (name "java-apache-ivy")
12627 (version "2.4.0")
12628 (source (origin
12629 (method url-fetch)
12630 (uri (string-append "mirror://apache//ant/ivy/" version
12631 "/apache-ivy-" version "-src.tar.gz"))
12632 (sha256
12633 (base32
12634 "1xkfn57g2m7l6y0xdq75x5rnrgk52m9jx2xah70g3ggl8750hbr0"))
12635 (patches
12636 (search-patches
12637 "java-apache-ivy-port-to-latest-bouncycastle.patch"))))
12638 (build-system ant-build-system)
12639 (arguments
12640 `(#:jar-name "ivy.jar"
12641 #:tests? #f
12642 #:phases
12643 (modify-phases %standard-phases
12644 (add-before 'build 'remove-example
12645 (lambda _
12646 (delete-file-recursively "src/example")
12647 #t))
12648 (add-before 'build 'copy-resources
12649 (lambda _
12650 (with-directory-excursion "src/java"
12651 (for-each (lambda (file)
12652 (install-file file (string-append "../../build/classes/" (dirname file))))
12653 (append
12654 (find-files "." ".*.css")
12655 (find-files "." ".*.ent")
12656 (find-files "." ".*.html")
12657 (find-files "." ".*.properties")
12658 (find-files "." ".*.xsd")
12659 (find-files "." ".*.xsl")
12660 (find-files "." ".*.xml"))))
12661 #t))
12662 (add-before 'build 'fix-vfs
12663 (lambda _
12664 (substitute*
12665 '("src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java"
12666 "src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java")
12667 (("import org.apache.commons.vfs") "import org.apache.commons.vfs2"))
12668 #t))
12669 (add-before 'install 'copy-manifest
12670 (lambda _
12671 (install-file "META-INF/MANIFEST.MF" "build/classes/META-INF")
12672 #t))
12673 (add-before 'install 'repack
12674 (lambda _
12675 (invoke "jar" "-cmf" "build/classes/META-INF/MANIFEST.MF" "build/jar/ivy.jar"
12676 "-C" "build/classes" ".")))
12677 (add-after 'install 'install-bin
12678 (lambda* (#:key outputs #:allow-other-keys)
12679 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
12680 (ivy (string-append bin "/ivy"))
12681 (jar (string-append (assoc-ref outputs "out") "/share/java/ivy.jar")))
12682 (mkdir-p bin)
12683 (with-output-to-file ivy
12684 (lambda _
12685 (display (string-append
12686 "#!" (which "sh") "\n"
12687 "if [[ -z $CLASSPATH ]]; then\n"
12688 " cp=\"" (getenv "CLASSPATH") ":" jar "\"\n"
12689 "else\n"
12690 " cp=\"" (getenv "CLASSPATH") ":" jar ":$CLASSPATH\"\n"
12691 "fi\n"
12692 (which "java") " -cp $cp org.apache.ivy.Main $@\n"))))
12693 (chmod ivy #o755)
12694 #t))))))
12695 (inputs
12696 `(("java-bouncycastle" ,java-bouncycastle)
12697 ("java-commons-cli" ,java-commons-cli)
12698 ("java-commons-collections" ,java-commons-collections)
12699 ("java-commons-httpclient" ,java-commons-httpclient)
12700 ("java-commons-lang" ,java-commons-lang)
12701 ("java-commons-vfs" ,java-commons-vfs)
12702 ("java-jakarta-oro" ,java-jakarta-oro)
12703 ("java-jsch" ,java-jsch)
12704 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
12705 ("java-jsch-agentproxy-connector-factory" ,java-jsch-agentproxy-connector-factory)
12706 ("java-jsch-agentproxy-jsch" ,java-jsch-agentproxy-jsch)
12707 ("java-junit" ,java-junit)))
12708 (home-page "https://ant.apache.org/ivy")
12709 (synopsis "Dependency manager for the Java programming language")
12710 (description "Ivy is a tool for managing (recording, tracking, resolving
12711 and reporting) project dependencies. It is characterized by the following:
12712
12713 @itemize
12714 @item flexibility and configurability - Ivy is essentially process agnostic
12715 and is not tied to any methodology or structure. Instead it provides the
12716 necessary flexibility and configurability to be adapted to a broad range
12717 of dependency management and build processes.
12718 @item tight integration with Apache Ant - while available as a standalone tool,
12719 Ivy works particularly well with Apache Ant providing a number of
12720 powerful Ant tasks ranging from dependency resolution to dependency
12721 reporting and publication.
12722 @end itemize")
12723 (license license:asl2.0)))
12724
12725 (define-public java-eclipse-sisu-inject
12726 (package
12727 (name "java-eclipse-sisu-inject")
12728 (version "0.3.4")
12729 (source (origin
12730 (method git-fetch)
12731 (uri (git-reference
12732 (url "https://github.com/eclipse/sisu.inject/")
12733 (commit (string-append "releases/" version))))
12734 (file-name (git-file-name name version))
12735 (sha256
12736 (base32
12737 "16044sizdb0rjbhlfbmcnpds5y7by7dyn9b0c11606aikqi8k3x6"))))
12738 (build-system ant-build-system)
12739 (arguments
12740 `(#:jar-name "eclipse-sisu-inject.jar"
12741 #:source-dir "org.eclipse.sisu.inject/src"
12742 #:tests? #f; no tests
12743 #:phases
12744 (modify-phases %standard-phases
12745 (replace 'install
12746 (install-from-pom "org.eclipse.sisu.inject/pom.xml")))))
12747 (propagated-inputs
12748 `(("java-guice" ,java-guice)
12749 ("java-sisu-inject-parent-pom" ,java-sisu-inject-parent-pom)))
12750 (inputs
12751 `(("java-guice-servlet" ,java-guice-servlet)
12752 ("java-javax-inject" ,java-javax-inject)
12753 ("java-javaee-servletapi" ,java-javaee-servletapi)
12754 ("java-junit" ,java-junit)
12755 ("java-slf4j-api" ,java-slf4j-api)
12756 ("java-jsr305" ,java-jsr305)
12757 ("java-jsr250" ,java-jsr250)
12758 ("java-cdi-api" ,java-cdi-api)
12759 ("java-osgi-framework" ,java-osgi-framework)
12760 ("java-osgi-util-tracker" ,java-osgi-util-tracker)
12761 ("java-testng" ,java-testng)))
12762 (home-page "https://www.eclipse.org/sisu/")
12763 (synopsis "Classpath scanning, auto-binding, and dynamic auto-wiring")
12764 (description "Sisu is a modular JSR330-based container that supports
12765 classpath scanning, auto-binding, and dynamic auto-wiring. Sisu uses
12766 Google-Guice to perform dependency injection and provide the core JSR330
12767 support, but removes the need to write explicit bindings in Guice modules.
12768 Integration with other containers via the Eclipse Extension Registry and the
12769 OSGi Service Registry is a goal of this project.")
12770 (license license:epl1.0)))
12771
12772 (define java-sisu-inject-parent-pom
12773 (package
12774 (inherit java-eclipse-sisu-inject)
12775 (name "java-sisu-inject-parent-pom")
12776 (arguments
12777 `(#:tests? #f
12778 #:phases
12779 (modify-phases %standard-phases
12780 (delete 'configure)
12781 (delete 'build)
12782 (replace 'install
12783 (install-pom-file "pom.xml")))))
12784 (propagated-inputs '())))
12785
12786 (define-public java-eclipse-sisu-plexus
12787 (package
12788 (name "java-eclipse-sisu-plexus")
12789 (version "0.3.4")
12790 (source (origin
12791 (method git-fetch)
12792 (uri (git-reference
12793 (url "https://github.com/eclipse/sisu.plexus")
12794 (commit (string-append "releases/" version))))
12795 (file-name (git-file-name name version))
12796 (sha256
12797 (base32
12798 "17mjlajnsqnk07cc58h1qpxrif85yb2m2y0pyba48yjjgikk8r9f"))
12799 (modules '((guix build utils)))
12800 (snippet
12801 '(begin
12802 (for-each delete-file (find-files "." ".*.jar"))
12803 (rename-file "org.eclipse.sisu.plexus.tests/src"
12804 "org.eclipse.sisu.plexus.tests/java")
12805 #t))))
12806 (build-system ant-build-system)
12807 (arguments
12808 `(#:jar-name "eclipse-sisu-plexus.jar"
12809 #:source-dir "org.eclipse.sisu.plexus/src"
12810 #:test-dir "org.eclipse.sisu.plexus.tests"
12811 #:test-exclude
12812 (list
12813 ;; This test fails probably because we can't generate the necessary
12814 ;; meta-inf files.
12815 "**/PlexusLoggingTest.*"
12816 ;; FIXME: This test fails because of some injection error
12817 "**/PlexusRequirementTest.*")
12818 #:jdk ,icedtea-8
12819 #:phases
12820 (modify-phases %standard-phases
12821 (add-before 'build 'copy-resources
12822 (lambda _
12823 (install-file "org.eclipse.sisu.plexus/META-INF/plexus/components.xml"
12824 "build/classes/META-INF/plexus")
12825 #t))
12826 (add-before 'check 'build-test-jar
12827 (lambda _
12828 (with-directory-excursion "org.eclipse.sisu.plexus.tests/resources/component-jar/src/main/"
12829 (mkdir "build")
12830 (with-directory-excursion "java"
12831 (apply invoke "javac" "-cp"
12832 (string-append (getenv "CLASSPATH")
12833 ":../../../../../build/classes")
12834 (find-files "." ".*.java"))
12835 (for-each (lambda (file) (install-file file (string-append "../build/" file)))
12836 (find-files "." ".*.jar")))
12837 (mkdir-p "build/META-INF/plexus")
12838 (copy-file "resources/META-INF/plexus/components.xml"
12839 "build/META-INF/plexus/components.xml")
12840 (with-directory-excursion "build"
12841 (invoke "jar" "cf" "../../../component-jar-0.1.jar" ".")))
12842 (with-directory-excursion "org.eclipse.sisu.plexus.tests/"
12843 (copy-recursively "META-INF" "../build/test-classes/META-INF")
12844 (substitute* "java/org/eclipse/sisu/plexus/DefaultPlexusContainerTest.java"
12845 (("resources/component-jar")
12846 "org.eclipse.sisu.plexus.tests/resources/component-jar")))
12847 #t))
12848 (replace 'install
12849 (install-from-pom "org.eclipse.sisu.plexus/pom.xml")))))
12850 (propagated-inputs
12851 `(("java-plexus-classworlds" ,java-plexus-classworlds)
12852 ("java-plexus-utils" ,java-plexus-utils)
12853 ("java-plexus-component-annotations" ,java-plexus-component-annotations)
12854 ("java-cdi-api" ,java-cdi-api)
12855 ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)
12856 ("java-sisu-plexus-parent-pom" ,java-sisu-plexus-parent-pom)))
12857 (inputs
12858 `(("java-osgi-framework" ,java-osgi-framework)
12859 ("java-slf4j-api" ,java-slf4j-api)
12860 ("java-javax-inject" ,java-javax-inject)
12861 ("java-guice" ,java-guice)
12862 ("java-guava" ,java-guava)
12863 ("java-aopalliance" ,java-aopalliance)
12864 ("java-asm" ,java-asm)
12865 ("java-cglib" ,java-cglib)))
12866 (native-inputs
12867 `(("java-junit" ,java-junit)))
12868 (home-page "https://www.eclipse.org/sisu/")
12869 (synopsis "Plexus support for the sisu container")
12870 (description "Sisu is a modular JSR330-based container that supports
12871 classpath scanning, auto-binding, and dynamic auto-wiring. This package
12872 adds Plexus support to the Sisu-Inject container.")
12873 (license license:epl1.0)))
12874
12875 (define java-sisu-plexus-parent-pom
12876 (package
12877 (inherit java-eclipse-sisu-plexus)
12878 (name "java-sisu-plexus-parent-pom")
12879 (arguments
12880 `(#:tests? #f
12881 #:phases
12882 (modify-phases %standard-phases
12883 (delete 'configure)
12884 (delete 'build)
12885 (replace 'install
12886 (install-pom-file "pom.xml")))))
12887 (propagated-inputs
12888 `(("java-sonatype-oss-parent-pom-9" ,java-sonatype-oss-parent-pom-9)))))
12889
12890 (define-public java-commons-compiler
12891 (package
12892 (name "java-commons-compiler")
12893 (version "3.0.8")
12894 (source (origin
12895 (method git-fetch)
12896 (uri (git-reference
12897 (url "https://github.com/janino-compiler/janino")
12898 (commit "91aa95686d1e4ca3b16a984a03a38686572331b2")))
12899 (file-name (string-append name "-" version))
12900 (sha256
12901 (base32
12902 "04hfdl59sgh20qkxzgnibvs8f9hy6n7znxwpk611y5d89977y62r"))
12903 (modules '((guix build utils)))
12904 (snippet
12905 '(begin
12906 (for-each delete-file
12907 (find-files "." "\\.jar$"))
12908 #t))))
12909 (build-system ant-build-system)
12910 (arguments
12911 `(#:jar-name "commons-compiler.jar"
12912 #:source-dir "commons-compiler/src/main"
12913 #:tests? #f)); no tests
12914 (home-page "https://github.com/janino-compiler/janino")
12915 (synopsis "Java compiler")
12916 (description "Commons-compiler contains an API for janino, including the
12917 @code{IExpressionEvaluator}, @code{IScriptEvaluator}, @code{IClassBodyEvaluator}
12918 and @code{ISimpleCompiler} interfaces.")
12919 (license license:bsd-3)))
12920
12921 (define-public java-janino
12922 (package
12923 (inherit java-commons-compiler)
12924 (name "java-janino")
12925 (arguments
12926 `(#:jar-name "janino.jar"
12927 #:source-dir "src/main/java"
12928 #:phases
12929 (modify-phases %standard-phases
12930 (add-before 'configure 'chdir
12931 (lambda _
12932 (chdir "janino")
12933 #t)))))
12934 (inputs
12935 `(("java-commons-compiler" ,java-commons-compiler)))
12936 (native-inputs
12937 `(("java-junit" ,java-junit)
12938 ("java-hamcrest-core" ,java-hamcrest-core)))
12939 (description "Janino is a Java compiler. Janino can compile a set of
12940 source files to a set of class files like @code{javac}, but also compile a
12941 Java expression, block, class body or source file in memory, load the bytecode
12942 and execute it directly in the same JVM. @code{janino} can also be used for
12943 static code analysis or code manipulation.")))
12944
12945 (define-public java-logback-core
12946 (package
12947 (name "java-logback-core")
12948 (version "1.2.3")
12949 (source (origin
12950 (method url-fetch)
12951 (uri (string-append "https://github.com/qos-ch/logback/archive/v_"
12952 version ".tar.gz"))
12953 (file-name (string-append name "-" version ".tar.gz"))
12954 (sha256
12955 (base32
12956 "1x6ga74yfgm94cfx98gybakbrlilx8i2gn6dx13l40kasmys06mi"))
12957 (modules '((guix build utils)))
12958 (snippet
12959 '(begin
12960 (delete-file-recursively "logback-access/lib")
12961 #t))))
12962 (build-system ant-build-system)
12963 (arguments
12964 `(#:jar-name "logback.jar"
12965 #:source-dir "src/main/java"
12966 #:test-dir "src/test"
12967 #:test-exclude
12968 ;; These tests fail with Unable to set MockitoNamingPolicy on cglib generator
12969 ;; which creates FastClasses
12970 (list "**/AllCoreTest.*"
12971 "**/AutoFlushingObjectWriterTest.*"
12972 "**/PackageTest.*"
12973 "**/ResilientOutputStreamTest.*"
12974 ;; And we still don't want to run abstract classes
12975 "**/Abstract*.*")
12976 #:phases
12977 (modify-phases %standard-phases
12978 (add-before 'configure 'chdir
12979 (lambda _
12980 (chdir "logback-core")
12981 #t)))))
12982 (inputs
12983 `(("java-javax-mail" ,java-javax-mail)
12984 ("servlet" ,java-javaee-servletapi)
12985 ("java-commons-compiler" ,java-commons-compiler)
12986 ("java-janino" ,java-janino)))
12987 (native-inputs
12988 `(("java-junit" ,java-junit)
12989 ("java-hamcrest-core" ,java-hamcrest-core)
12990 ("java-mockito-1" ,java-mockito-1)
12991 ("java-cglib" ,java-cglib)
12992 ("java-asm" ,java-asm)
12993 ("java-objenesis" ,java-objenesis)
12994 ("java-joda-time" ,java-joda-time)))
12995 (home-page "https://logback.qos.ch")
12996 (synopsis "Logging for java")
12997 (description "Logback is intended as a successor to the popular log4j project.
12998 This module lays the groundwork for the other two modules.")
12999 ;; Either epl1.0 or lgpl2.1
13000 (license (list license:epl1.0
13001 license:lgpl2.1))))
13002
13003 (define-public java-logback-classic
13004 (package
13005 (inherit java-logback-core)
13006 (name "java-logback-classic")
13007 (arguments
13008 `(#:jar-name "logback-classic.jar"
13009 #:source-dir "src/main/java"
13010 #:test-dir "src/test"
13011 #:tests? #f; tests require more packages: h2, greenmail, hsql, subethamail, slf4j, log4j, felix
13012 #:jdk ,icedtea-8
13013 #:phases
13014 (modify-phases %standard-phases
13015 (add-before 'configure 'chdir
13016 (lambda _
13017 (chdir "logback-classic")
13018 #t))
13019 (replace 'build
13020 (lambda* (#:key inputs #:allow-other-keys)
13021 (mkdir-p "build/classes")
13022 (setenv "CLASSPATH"
13023 (string-join
13024 (apply append (map (lambda (input)
13025 (find-files (assoc-ref inputs input)
13026 ".*.jar"))
13027 '("java-logback-core" "java-slf4j-api"
13028 "java-commons-compiler" "servlet"
13029 "groovy")))
13030 ":"))
13031 (apply invoke "groovyc" "-d" "build/classes" "-j"
13032 (find-files "src/main/" ".*\\.(groovy|java)$"))
13033 (invoke "ant" "jar")
13034 #t)))))
13035 (inputs
13036 `(("java-logback-core" ,java-logback-core)
13037 ("java-slf4j-api" ,java-slf4j-api)
13038 ,@(package-inputs java-logback-core)))
13039 (native-inputs
13040 `(("groovy" ,groovy)))
13041 (description "Logback is intended as a successor to the popular log4j project.
13042 This module can be assimilated to a significantly improved version of log4j.
13043 Moreover, @code{logback-classic} natively implements the slf4j API so that you
13044 can readily switch back and forth between logback and other logging frameworks
13045 such as log4j or @code{java.util.logging} (JUL).")))
13046
13047 (define-public java-jgit
13048 (package
13049 (name "java-jgit")
13050 (version "4.7.0.201704051617-r")
13051 (source (origin
13052 (method url-fetch)
13053 (uri (string-append "https://repo1.maven.org/maven2/"
13054 "org/eclipse/jgit/org.eclipse.jgit/"
13055 version "/org.eclipse.jgit-"
13056 version "-sources.jar"))
13057 (sha256
13058 (base32
13059 "13ii4jn02ynzq6i7gsyi21k2i94jpc85wf6bcm31q4cyvzv0mk4k"))))
13060 (build-system ant-build-system)
13061 (arguments
13062 `(#:tests? #f ; There are no tests to run.
13063 #:jar-name "jgit.jar"
13064 ;; JGit must be built with a JDK supporting Java 8.
13065 #:jdk ,icedtea-8
13066 ;; Target our older default JDK.
13067 #:make-flags (list "-Dtarget=1.7")
13068 #:phases
13069 (modify-phases %standard-phases
13070 ;; The jar file generated by the default build.xml does not include
13071 ;; the text properties files, so we need to add them.
13072 (add-after 'build 'add-properties
13073 (lambda* (#:key jar-name #:allow-other-keys)
13074 (with-directory-excursion "src"
13075 (apply invoke "jar" "-uf"
13076 (string-append "../build/jar/" jar-name)
13077 (find-files "." "\\.properties$")))
13078 #t)))))
13079 (inputs
13080 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
13081 ("java-javaewah" ,java-javaewah)
13082 ("java-jsch" ,java-jsch)
13083 ("java-slf4j-api" ,java-slf4j-api)))
13084 (home-page "https://eclipse.org/jgit/")
13085 (synopsis "Java library implementing the Git version control system")
13086 (description "JGit is a lightweight, pure Java library implementing the
13087 Git version control system, providing repository access routines, support for
13088 network protocols, and core version control algorithms.")
13089 (license license:edl1.0)))
13090
13091 ;; For axoloti. This package can still be built with icedtea-7, which is
13092 ;; currently used as the default JDK.
13093 (define-public java-jgit-4.2
13094 (package (inherit java-jgit)
13095 (version "4.2.0.201601211800-r")
13096 (source (origin
13097 (method url-fetch)
13098 (uri (string-append "https://repo1.maven.org/maven2/"
13099 "org/eclipse/jgit/org.eclipse.jgit/"
13100 version "/org.eclipse.jgit-"
13101 version "-sources.jar"))
13102 (sha256
13103 (base32
13104 "15gm537iivhnzlkjym4x3wn5jqdjdragsw9pdpzqqg21nrc817mm"))))
13105 (build-system ant-build-system)
13106 (arguments
13107 (substitute-keyword-arguments (package-arguments java-jgit)
13108 ;; Build for default JDK.
13109 ((#:jdk _) icedtea-7)
13110 ((#:phases phases)
13111 `(modify-phases ,phases
13112 (add-after 'unpack 'use-latest-javaewah-API
13113 (lambda _
13114 (substitute* "src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java"
13115 (("wordinbits") "WORD_IN_BITS"))
13116 #t))))))
13117 (inputs
13118 `(("java-javaewah" ,java-javaewah)
13119 ("java-jsch" ,java-jsch)
13120 ("java-slf4j-api" ,java-slf4j-api)))))
13121
13122 (define-public abcl
13123 (package
13124 (name "abcl")
13125 (version "1.6.0")
13126 (source
13127 (origin
13128 (method url-fetch)
13129 (uri (string-append "https://abcl.org/releases/"
13130 version "/abcl-src-" version ".tar.gz"))
13131 (sha256
13132 (base32
13133 "0hvbcsffr8n2xwdixc8wyw1bfl9fxn2gyy0c4nma7j9zbn0wwgw9"))
13134 (patches
13135 (search-patches
13136 "abcl-fix-build-xml.patch"))))
13137 (build-system ant-build-system)
13138 (native-inputs
13139 `(("java-junit" ,java-junit)))
13140 (arguments
13141 `(#:build-target "abcl.jar"
13142 #:test-target "abcl.test"
13143 #:phases
13144 (modify-phases %standard-phases
13145 (replace 'install
13146 (lambda* (#:key outputs #:allow-other-keys)
13147 (let ((share (string-append (assoc-ref outputs "out")
13148 "/share/java/"))
13149 (bin (string-append (assoc-ref outputs "out")
13150 "/bin/")))
13151 (mkdir-p share)
13152 (install-file "dist/abcl.jar" share)
13153 (install-file "dist/abcl-contrib.jar" share)
13154 (mkdir-p bin)
13155 (with-output-to-file (string-append bin "abcl")
13156 (lambda _
13157 (let ((classpath (string-append
13158 share "abcl.jar"
13159 ":"
13160 share "abcl-contrib.jar")))
13161 (display (string-append
13162 "#!" (which "sh") "\n"
13163 "if [[ -z $CLASSPATH ]]; then\n"
13164 " cp=\"" classpath "\"\n"
13165 "else\n"
13166 " cp=\"" classpath ":$CLASSPATH\"\n"
13167 "fi\n"
13168 "exec " (which "java")
13169 " -cp $cp org.armedbear.lisp.Main $@\n")))))
13170 (chmod (string-append bin "abcl") #o755)
13171 #t))))))
13172 (home-page "https://abcl.org/")
13173 (synopsis "Common Lisp Implementation on the JVM")
13174 (description
13175 "@dfn{Armed Bear Common Lisp} (ABCL) is a full implementation of the Common
13176 Lisp language featuring both an interpreter and a compiler, running in the
13177 JVM. It supports JSR-223 (Java scripting API): it can be a scripting engine
13178 in any Java application. Additionally, it can be used to implement (parts of)
13179 the application using Java to Lisp integration APIs.")
13180 (license (list license:gpl2+
13181 ;; named-readtables is released under 3 clause BSD
13182 license:bsd-3
13183 ;; jfli is released under CPL 1.0
13184 license:cpl1.0))))
13185
13186 (define-public java-jsonp-api
13187 (package
13188 (name "java-jsonp-api")
13189 (version "1.1.6")
13190 (source (origin
13191 (method git-fetch)
13192 (uri (git-reference
13193 (url "https://github.com/eclipse-ee4j/jsonp")
13194 (commit (string-append "1.1-" version "-RELEASE"))))
13195 (file-name (git-file-name name version))
13196 (sha256
13197 (base32
13198 "0zrj03hkr3jdmqlb4ipjr37cqpp2q2814qpmxi7srlwpdqs0ibgc"))))
13199 (build-system ant-build-system)
13200 (arguments
13201 `(#:jar-name "jsonp-api.jar"
13202 #:tests? #f
13203 #:source-dir "api/src/main/java"
13204 #:test-dir "api/src/test"))
13205 (home-page "https://eclipse-ee4j.github.io/jsonp/")
13206 (synopsis "JSON Processing in Java")
13207 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
13208 parse, generate, transform and query) JSON messages. It produces and
13209 consumes JSON text in a streaming fashion (similar to StAX API for XML)
13210 and allows building a Java object model for JSON text using API classes
13211 (similar to DOM API for XML).")
13212 ;; either gpl2 only with classpath exception, or epl2.0.
13213 (license (list license:gpl2
13214 license:epl2.0))))
13215
13216 (define-public java-jsonp-impl
13217 (package
13218 (inherit java-jsonp-api)
13219 (name "java-jsonp-impl")
13220 (arguments
13221 `(#:jar-name "jsonp-impl.jar"
13222 #:tests? #f
13223 #:source-dir "impl/src/main/java"
13224 #:test-dir "impl/src/test"
13225 #:phases
13226 (modify-phases %standard-phases
13227 (add-before 'build 'copy-resources
13228 (lambda _
13229 (copy-recursively
13230 "impl/src/main/resources/"
13231 "build/classes")
13232 #t)))))
13233 (propagated-inputs
13234 `(("java-jsonp-api" ,java-jsonp-api)))
13235 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
13236 parse, generate, transform and query) JSON messages. This package contains
13237 a reference implementation of that API.")))
13238
13239 (define-public java-xmp
13240 (package
13241 (name "java-xmp")
13242 (version "5.1.3")
13243 (source (origin
13244 (method url-fetch)
13245 (uri (string-append "http://download.macromedia.com/pub/developer"
13246 "/xmp/sdk/XMPCoreJava-" version ".zip"))
13247 (sha256
13248 (base32
13249 "14nai2mmsg7l5ya2y5mx4w4lr1az3sk2fjz6hiy4zdrsavgvl1g7"))))
13250 (build-system ant-build-system)
13251 (arguments
13252 `(#:build-target "build"
13253 #:tests? #f; no tests
13254 #:phases
13255 (modify-phases %standard-phases
13256 (add-after 'unpack 'chdir
13257 (lambda _
13258 (chdir "XMPCore")
13259 #t))
13260 (add-before 'build 'fix-timestamp
13261 (lambda _
13262 (substitute* "build.xml"
13263 (("\\$\\{BuildDate\\}") "1970 Jan 01 00:00:00-GMT"))
13264 #t))
13265 (replace 'install
13266 (install-jars "."))
13267 (add-after 'install 'install-doc
13268 (lambda* (#:key outputs #:allow-other-keys)
13269 (copy-recursively
13270 "docs"
13271 (string-append (assoc-ref outputs "out") "/share/doc/java-xmp"))
13272 #t)))))
13273 (native-inputs
13274 `(("unzip" ,unzip)))
13275 (home-page "https://www.adobe.com/devnet/xmp.html")
13276 (synopsis "Extensible Metadat Platform (XMP) support in Java")
13277 (description "Adobe's Extensible Metadata Platform (XMP) is a labeling
13278 technology that allows you to embed data about a file, known as metadata,
13279 into the file itself. The XMP Toolkit for Java is based on the C++ XMPCore
13280 library and the API is similar.")
13281 (license license:bsd-3)))
13282
13283 (define-public java-metadata-extractor
13284 (package
13285 (name "java-metadata-extractor")
13286 (version "2.11.0")
13287 (source (origin
13288 (method git-fetch)
13289 (uri (git-reference
13290 (url "https://github.com/drewnoakes/metadata-extractor")
13291 (commit version)))
13292 (file-name (git-file-name name version))
13293 (sha256
13294 (base32
13295 "06yrq0swrl1r40yjbk5kqzjxr04jlkq9lfi711jvfgjf5kp2qinj"))))
13296 (build-system ant-build-system)
13297 (arguments
13298 `(#:jar-name "metadata-extractor.jar"
13299 #:source-dir "Source"
13300 #:test-dir "Tests"
13301 #:phases
13302 (modify-phases %standard-phases
13303 (add-before 'check 'fix-test-dir
13304 (lambda _
13305 (substitute* "build.xml"
13306 (("/java\">") "\">"))
13307 #t)))))
13308 (propagated-inputs
13309 `(("java-xmp" ,java-xmp)))
13310 (native-inputs
13311 `(("java-hamcrest-core" ,java-hamcrest-core)
13312 ("java-junit" ,java-junit)))
13313 (home-page "https://github.com/drewnoakes/metadata-extractor")
13314 (synopsis "Extract metadata from image and video files")
13315 (description "Metadata-extractor is a straightforward Java library for
13316 reading metadata from image files. It is able to read metadata in Exif,
13317 IPTC, XMP, ICC and more formats.")
13318 (license license:asl2.0)))
13319
13320 (define-public java-svg-salamander
13321 (package
13322 (name "java-svg-salamander")
13323 (version "1.1.2")
13324 (source (origin
13325 (method git-fetch)
13326 (uri (git-reference
13327 (url "https://github.com/blackears/svgSalamander")
13328 (commit (string-append "v" version))))
13329 (file-name (git-file-name name version))
13330 (sha256
13331 (base32
13332 "1zv3kjdkf6iqf02x6ln76254y634j2ji448y706a65lsbfjmmicf"))
13333 (modules '((guix build utils)))
13334 (snippet
13335 '(begin
13336 (for-each delete-file (find-files "." ".*.jar"))
13337 #t))
13338 (patches
13339 (search-patches "java-svg-salamander-Fix-non-det.patch"))))
13340 (build-system ant-build-system)
13341 (arguments
13342 `(#:tests? #f; no tests
13343 #:phases
13344 (modify-phases %standard-phases
13345 (add-after 'unpack 'chdir
13346 (lambda _
13347 (chdir "svg-core")
13348 #t))
13349 (add-before 'build 'copy-jars
13350 (lambda* (#:key inputs #:allow-other-keys)
13351 (copy-file (car (find-files (assoc-ref inputs "javacc") "\\.jar$"))
13352 "../libraries/javacc.jar")
13353 (copy-file (car (find-files (assoc-ref inputs "ant") "ant\\.jar$"))
13354 "../libraries/ant.jar")
13355 #t))
13356 (replace 'install
13357 (install-jars "dist")))))
13358 (native-inputs
13359 `(("javacc" ,javacc)))
13360 (home-page "https://github.com/blackears/svgSalamander")
13361 (synopsis "SVG engine for Java")
13362 (description "SVG Salamander is an SVG engine for Java that's designed
13363 to be small, fast, and allow programmers to use it with a minimum of fuss.
13364 It's in particular targeted for making it easy to integrate SVG into Java
13365 games and making it much easier for artists to design 2D game content - from
13366 rich interactive menus to charts and graphcs to complex animations.")
13367 (license license:bsd-2)))
13368
13369 (define-public java-jboss-transaction-api-spec
13370 (package
13371 (name "java-jboss-transaction-api-spec")
13372 (version "1.2+1.1.1")
13373 (source (origin
13374 (method git-fetch)
13375 (uri (git-reference
13376 (url "https://github.com/jboss/jboss-transaction-api_spec")
13377 (commit "jboss-transaction-api_1.2_spec-1.1.1.Final")))
13378 (file-name (git-file-name name version))
13379 (sha256
13380 (base32
13381 "1xbfq5hvb86izflydxrqqv3k26c1ba2m0ap6m97shqrsdi9by4wy"))))
13382 (build-system ant-build-system)
13383 (arguments
13384 `(#:jar-name "java-jboss-transaction-api_spec.jar"
13385 #:source-dir "src/main/java"
13386 #:tests? #f)); no tests
13387 (inputs
13388 `(("java-cdi-api" ,java-cdi-api)
13389 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)))
13390 (home-page "https://github.com/jboss/jboss-transaction-api_spec")
13391 (synopsis "Generic transaction management API in Java")
13392 (description "Java-jboss-transaction-api-spec implements the Transactions
13393 API. A transaction is a unit of work containing one or more operations
13394 involving one or more shared resources having ACID (Atomicity, Consistency,
13395 Isolation and Durability) properties.")
13396 ;; either gpl2 only with classpath exception or cddl.
13397 (license (list license:gpl2 license:cddl1.0))))
13398
13399 (define-public java-picocli
13400 (package
13401 (name "java-picocli")
13402 (version "4.3.2")
13403 (source (origin
13404 (method git-fetch)
13405 (uri (git-reference
13406 (url "https://github.com/remkop/picocli")
13407 (commit (string-append "v" version))))
13408 (file-name (git-file-name name version))
13409 (sha256
13410 (base32
13411 "1sxp6rxjfgjd98ly14b3d15dvxkm5wg4g46w12jyhmr0kmkaca3c"))))
13412 (build-system ant-build-system)
13413 (arguments
13414 `(#:jar-name "picocli.jar"
13415 #:source-dir "src/main/java"
13416 ;; Tests require missing dependencies (junitparams, system-rules)
13417 #:tests? #f))
13418 (home-page "https://picocli.info")
13419 (synopsis "REPL for the JVM")
13420 (description "Picocli is a framework for building command line applications
13421 for the JVM. It supports colors, autocompletion, subcommands, and more. Written
13422 in Java, usable from Groovy, Kotlin, Scala, etc.")
13423 (license license:asl2.0)))
13424
13425 (define-public java-jetbrains-annotations
13426 (package
13427 (name "java-jetbrains-annotations")
13428 (version "19.0.0")
13429 (source (origin
13430 (method git-fetch)
13431 (uri (git-reference
13432 (url "https://github.com/JetBrains/java-annotations")
13433 (commit version)))
13434 (file-name (git-file-name name version))
13435 (sha256
13436 (base32
13437 "0z6i1xs60cd5ffz23c49sq68wn5mphhs3xpar1n93ppama2ng80v"))))
13438 (build-system ant-build-system)
13439 (arguments
13440 `(#:jar-name "jetbrains-annotations.jar"
13441 #:source-dir "common/src/main/java:java8/src/main/java"
13442 #:tests? #f)); no tests
13443 (home-page "https://github.com/JetBrains/java-annotations")
13444 (synopsis "Annotations for Java and other JVM languages")
13445 (description "This package contains a set of Java annotations which can be
13446 used in JVM-based languages. They serve as an additional documentation and
13447 can be interpreted by IDEs and static analysis tools to improve code analysis.")
13448 (license license:expat)))
13449
13450 (define-public java-javaparser
13451 (package
13452 (name "java-javaparser")
13453 (version "3.16.1")
13454 (source (origin
13455 (method git-fetch)
13456 (uri (git-reference
13457 (url "https://github.com/javaparser/javaparser")
13458 (commit (string-append "javaparser-parent-" version))))
13459 (file-name (git-file-name name version))
13460 (sha256
13461 (base32
13462 "1a4jk12ffa31fa0y8vda0739vpfj1206p0nha842b7bixbvwamv9"))
13463 (modules '((guix build utils)))
13464 (snippet
13465 '(begin
13466 (for-each delete-file
13467 (find-files "." "\\.jar$"))
13468 #t))))
13469 (build-system ant-build-system)
13470 (arguments
13471 `(#:tests? #f; tests require jbehave and junit5
13472 #:phases
13473 (modify-phases %standard-phases
13474 (add-before 'build 'fill-template
13475 (lambda _
13476 (with-directory-excursion "javaparser-core/src/main"
13477 (copy-file "java-templates/com/github/javaparser/JavaParserBuild.java"
13478 "java/com/github/javaparser/JavaParserBuild.java")
13479 (substitute* "java/com/github/javaparser/JavaParserBuild.java"
13480 (("\\$\\{project.version\\}") ,version)
13481 (("\\$\\{project.name\\}") "javaparser")
13482 (("\\$\\{project.build.finalName\\}") "javaparser")
13483 (("\\$\\{maven.version\\}") "fake")
13484 (("\\$\\{maven.build.version\\}") "fake")
13485 (("\\$\\{build.timestamp\\}") "0")
13486 (("\\$\\{java.vendor\\}") "Guix")
13487 (("\\$\\{java.vendor.url\\}") "https://gnu.org/software/guix")
13488 (("\\$\\{java.version\\}") "1.8")
13489 (("\\$\\{os.arch\\}") "any")
13490 (("\\$\\{os.name\\}") "GuixSD")
13491 (("\\$\\{os.version\\}") "not available")))
13492 #t))
13493 (add-before 'build 'generate-javacc
13494 (lambda _
13495 (with-directory-excursion "javaparser-core/src/main/java"
13496 (invoke "java" "javacc" "../javacc/java.jj"))
13497 #t))
13498 (add-before 'build 'copy-javacc-support
13499 (lambda _
13500 (with-directory-excursion "javaparser-core/src/main"
13501 (copy-recursively "javacc-support" "java"))
13502 #t))
13503 (replace 'build
13504 (lambda _
13505 (define (build name)
13506 (format #t "Building ~a~%" name)
13507 (delete-file-recursively "build/classes")
13508 (mkdir-p "build/classes")
13509 (apply invoke "javac"
13510 "-cp" (string-append (getenv "CLASSPATH") ":"
13511 (string-join (find-files "build/jar" ".")
13512 ":"))
13513 "-d" "build/classes"
13514 (find-files (string-append name "/src/main/java")
13515 ".*.java"))
13516 (invoke "jar" "-cf" (string-append "build/jar/" name ".jar")
13517 "-C" "build/classes" "."))
13518 (mkdir-p "build/classes")
13519 (mkdir-p "build/test-classes")
13520 (mkdir-p "build/jar")
13521 (build "javaparser-core")
13522 (build "javaparser-core-serialization")
13523 (build "javaparser-core-generators")
13524 (build "javaparser-core-metamodel-generator")
13525 (build "javaparser-symbol-solver-core")
13526 #t))
13527 (replace 'install
13528 (install-jars "build/jar")))))
13529 (inputs
13530 `(("java-guava" ,java-guava)
13531 ("java-jboss-javassist" ,java-jboss-javassist)
13532 ("java-jsonp-api" ,java-jsonp-api)))
13533 (native-inputs
13534 `(("javacc" ,javacc)))
13535 (home-page "http://javaparser.org/")
13536 (synopsis "Parser for Java")
13537 (description
13538 "This project contains a set of libraries implementing a Java 1.0 - Java
13539 11 Parser with advanced analysis functionalities.")
13540 (license (list
13541 ;; either lgpl or asl
13542 license:lgpl3+
13543 license:asl2.0))))