gnu: libretro-lowresnx: Update to 1.2.
[jackhill/guix/guix.git] / gnu / packages / java.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 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, 2021 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, 2021 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, 2021 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 ;;; Copyright © 2021 Vincent Legoll <vincent.legoll@gmail.com>
18 ;;;
19 ;;; This file is part of GNU Guix.
20 ;;;
21 ;;; GNU Guix is free software; you can redistribute it and/or modify it
22 ;;; under the terms of the GNU General Public License as published by
23 ;;; the Free Software Foundation; either version 3 of the License, or (at
24 ;;; your option) any later version.
25 ;;;
26 ;;; GNU Guix is distributed in the hope that it will be useful, but
27 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
28 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29 ;;; GNU General Public License for more details.
30 ;;;
31 ;;; You should have received a copy of the GNU General Public License
32 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
33
34 (define-module (gnu packages java)
35 #:use-module ((guix licenses) #:prefix license:)
36 #:use-module (guix packages)
37 #:use-module (guix download)
38 #:use-module (guix hg-download)
39 #:use-module (guix git-download)
40 #:use-module (guix svn-download)
41 #:use-module ((guix build utils) #:select (alist-replace))
42 #:use-module (guix utils)
43 #:use-module (guix build-system ant)
44 #:use-module (guix build-system gnu)
45 #:use-module (guix build-system trivial)
46 #:use-module (gnu packages)
47 #:use-module (gnu packages attr)
48 #:use-module (gnu packages autotools)
49 #:use-module (gnu packages base)
50 #:use-module (gnu packages bash)
51 #:use-module (gnu packages certs)
52 #:use-module (gnu packages cpio)
53 #:use-module (gnu packages cups)
54 #:use-module (gnu packages compression)
55 #:use-module (gnu packages elf)
56 #:use-module (gnu packages fontutils)
57 #:use-module (gnu packages gawk)
58 #:use-module (gnu packages gettext)
59 #:use-module (gnu packages gl)
60 #:use-module (gnu packages ghostscript) ;lcms
61 #:use-module (gnu packages gnome)
62 #:use-module (gnu packages groovy)
63 #:use-module (gnu packages gtk)
64 #:use-module (gnu packages guile)
65 #:use-module (gnu packages icu4c)
66 #:use-module (gnu packages image)
67 #:use-module (gnu packages java-compression)
68 #:use-module (gnu packages libffi)
69 #:use-module (gnu packages linux) ;alsa
70 #:use-module (gnu packages maths)
71 #:use-module (gnu packages maven)
72 #:use-module (gnu packages maven-parent-pom)
73 #:use-module (gnu packages nss)
74 #:use-module (gnu packages onc-rpc)
75 #:use-module (gnu packages web)
76 #:use-module (gnu packages wget)
77 #:use-module (gnu packages pkg-config)
78 #:use-module (gnu packages perl)
79 #:use-module (gnu packages popt)
80 #:use-module (gnu packages kerberos)
81 #:use-module (gnu packages xml)
82 #:use-module (gnu packages xorg)
83 #:use-module (gnu packages texinfo)
84 #:use-module ((srfi srfi-1) #:select (fold alist-delete))
85 #:use-module (srfi srfi-11)
86 #:use-module (ice-9 match))
87
88 \f
89 ;;;
90 ;;; Java bootstrap toolchain.
91 ;;;
92
93 ;; The Java bootstrap begins with Jikes, a Java compiler written in C++. We
94 ;; use it to build a simple version of GNU Classpath, the Java standard
95 ;; library. We chose version 0.93 because it is the last version that can be
96 ;; built with Jikes. With Jikes and this version of GNU Classpath we can
97 ;; build JamVM, a Java Virtual Machine. We build version 1.5.1 because it is
98 ;; the last version of JamVM that works with a version of GNU classpath that
99 ;; does not require ECJ. These three packages make up the bootstrap JDK.
100
101 ;; This is sufficient to build an older version of Ant, which is needed to
102 ;; build an older version of ECJ, an incremental Java compiler, both of which
103 ;; are written in Java.
104 ;;
105 ;; ECJ is needed to build the latest release (0.99) and the development
106 ;; version of GNU Classpath. The development version of GNU Classpath has
107 ;; much more support for Java 1.6 than the latest release, but we need to
108 ;; build 0.99 first to get a working version of javah. ECJ, the development
109 ;; version of GNU Classpath, and the latest version of JamVM make up the
110 ;; second stage JDK with which we can build the OpenJDK with the Icedtea 1.x
111 ;; build framework. We then build the more recent JDKs Icedtea 2.x and
112 ;; Icedtea 3.x.
113
114 (define-public libantlr3c
115 (package
116 (name "libantlr3c")
117 (version "3.4")
118 (source
119 (origin
120 (method url-fetch)
121 (uri
122 (string-append "https://www.antlr3.org/download/C/"
123 name "-" version ".tar.gz"))
124 (sha256
125 (base32 "0lpbnb4dq4azmsvlhp6khq1gy42kyqyjv8gww74g5lm2y6blm4fa"))))
126 (build-system gnu-build-system)
127 (arguments
128 `(#:configure-flags (list "--enable-debuginfo" "--disable-static")
129 #:phases (modify-phases %standard-phases
130 (replace 'configure
131 (lambda* (#:key build target native-inputs inputs outputs
132 (configure-flags '()) out-of-source? system
133 #:allow-other-keys)
134 (let ((configure (assoc-ref %standard-phases 'configure))
135 (enable-64bit? (member system '("aarch64-linux"
136 "x86_64-linux"
137 "mips64el-linux"))))
138 (configure #:build build #:target target
139 #:native-inputs native-inputs
140 #:inputs inputs #:outputs outputs
141 #:configure-flags `(,(if enable-64bit?
142 "--enable-64bit"
143 '())
144 ,@configure-flags)
145 #:out-of-source? out-of-source?)))))))
146 (synopsis "ANTLR C Library")
147 (description "LIBANTLR3C provides run-time C libraries for ANTLR3 (ANother
148 Tool for Language Recognition v3).")
149 (home-page "https://www.antlr3.org/")
150 (license license:bsd-3)))
151
152 (define jikes
153 (package
154 (name "jikes")
155 (version "1.22")
156 (source (origin
157 (method url-fetch)
158 (uri (string-append "mirror://sourceforge/jikes/Jikes/"
159 version "/jikes-" version ".tar.bz2"))
160 (sha256
161 (base32
162 "1qqldrp74pzpy5ly421srqn30qppmm9cvjiqdngk8hf47dv2rc0c"))))
163 (build-system gnu-build-system)
164 (home-page "http://jikes.sourceforge.net/")
165 (synopsis "Compiler for the Java language")
166 (description "Jikes is a compiler that translates Java source files as
167 defined in The Java Language Specification into the bytecoded instruction set
168 and binary format defined in The Java Virtual Machine Specification.")
169 (license license:ibmpl1.0)))
170
171 (define-public drip
172 ;; Last release is from 2014, with a few important commits afterwards.
173 (let ((commit "a4bd00df0199e78243847f06cc04ecaea31f8f08"))
174 (package
175 (name "drip")
176 (version (git-version "0.2.4" "1" commit))
177 (source (origin
178 (method git-fetch)
179 (uri (git-reference
180 (url "https://github.com/ninjudd/drip")
181 (commit commit)))
182 (file-name (git-file-name name version))
183 (sha256
184 (base32
185 "0wzmjwfyldr3jn49517xd8yn7dgdk8h88qkga3kjyg1zc375ylg2"))))
186 (build-system gnu-build-system)
187 (native-inputs
188 `(("jdk" ,icedtea "jdk")))
189 (arguments
190 `(#:tests? #f ; No tests.
191 #:phases
192 (modify-phases %standard-phases
193 (delete 'configure)
194 (add-before 'install 'fix-wrapper
195 (lambda* (#:key inputs #:allow-other-keys)
196 (let ((jps (string-append (assoc-ref inputs "jdk") "/bin/jps")))
197 (substitute* "bin/drip"
198 (("jps") jps)
199 (("brew update && brew upgrade drip") "guix pull && guix install drip")
200 ;; No need to make:
201 (("\\(cd -- \"\\$drip_dir\" && make -s\\) \\|\\| exit 1") "")
202 ;; No need to include source:
203 (("\\[\\[ -r \\$drip_dir/src/org/flatland/drip/Main\\.java \\]\\]")
204 "true"))
205 #t)))
206 (replace 'install
207 (lambda* (#:key outputs #:allow-other-keys)
208 (let* ((out (assoc-ref outputs "out"))
209 (bin (string-append out "/bin"))
210 (share (string-append out "/share/drip")))
211 (mkdir-p bin)
212 (for-each
213 (lambda (file)
214 (install-file (string-append "bin/" file) bin))
215 '("drip" "drip_daemon" "drip_proxy"))
216 (install-file "drip.jar" share)
217 (substitute* (string-append bin "/drip")
218 (("drip_dir=\\$bin_dir/..")
219 (string-append "drip_dir=" share)))
220 #t))))))
221 (home-page "https://github.com/ninjudd/drip")
222 (synopsis "Faster Java Virtual Machine launching")
223 (description "Drip is a launcher for the Java Virtual Machine that
224 provides much faster startup times than the @command{java} command. The @command{drip}
225 script is intended to be a drop-in replacement for the @command{java} command,
226 only faster.")
227 (license license:epl1.0))))
228
229 ;; This is the last version of GNU Classpath that can be built without ECJ.
230 (define classpath-bootstrap
231 (package
232 (name "classpath")
233 (version "0.93")
234 (source (origin
235 (method url-fetch)
236 (uri (string-append "mirror://gnu/classpath/classpath-"
237 version ".tar.gz"))
238 (sha256
239 (base32
240 "0i99wf9xd3hw1sj2sazychb9prx8nadxh2clgvk3zlmb28v0jbfz"))
241 (patches (search-patches "classpath-aarch64-support.patch"))))
242 (build-system gnu-build-system)
243 (arguments
244 `(#:configure-flags
245 (list (string-append "JAVAC="
246 (assoc-ref %build-inputs "jikes")
247 "/bin/jikes")
248 "--disable-Werror"
249 "--disable-gmp"
250 "--disable-gtk-peer"
251 "--disable-gconf-peer"
252 "--disable-plugin"
253 "--disable-dssi"
254 "--disable-alsa"
255 "--disable-gjdoc")
256 #:phases
257 (modify-phases %standard-phases
258 ;; XXX: This introduces a memory leak as we remove a call to free up
259 ;; memory for the file name string. This was necessary because of a
260 ;; runtime error that would have prevented us from building
261 ;; ant-bootstrap later. See https://issues.guix.gnu.org/issue/36685
262 ;; for the gnarly details.
263 (add-after 'unpack 'remove-call-to-free
264 (lambda _
265 (substitute* "native/jni/java-io/java_io_VMFile.c"
266 (("result = cpio_isFileExists.*" m)
267 (string-append m "\n//")))
268 #t))
269 (add-after 'install 'install-data
270 (lambda _ (invoke "make" "install-data"))))))
271 (native-inputs
272 `(("jikes" ,jikes)
273 ("fastjar" ,fastjar)
274 ("libltdl" ,libltdl)
275 ("pkg-config" ,pkg-config)))
276 (home-page "https://www.gnu.org/software/classpath/")
277 (synopsis "Essential libraries for Java")
278 (description "GNU Classpath is a project to create core class libraries
279 for use with runtimes, compilers and tools for the Java programming
280 language.")
281 ;; GPLv2 or later, with special linking exception.
282 (license license:gpl2+)))
283
284 ;; This is the last version of JamVM that works with a version of GNU
285 ;; classpath that does not require ECJ.
286 (define jamvm-1-bootstrap
287 (package
288 (name "jamvm")
289 (version "1.5.1")
290 (source (origin
291 (method url-fetch)
292 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
293 "JamVM%20" version "/jamvm-"
294 version ".tar.gz"))
295 (patches (search-patches "jamvm-1.5.1-aarch64-support.patch"
296 "jamvm-1.5.1-armv7-support.patch"))
297 (sha256
298 (base32
299 "06lhi03l3b0h48pc7x58bk9my2nrcf1flpmglvys3wyad6yraf36"))
300 (snippet
301 '(begin
302 ;; Remove precompiled software.
303 (delete-file "lib/classes.zip")
304 #t))))
305 (build-system gnu-build-system)
306 (arguments
307 `(#:configure-flags
308 (list (string-append "--with-classpath-install-dir="
309 (assoc-ref %build-inputs "classpath"))
310 "--disable-int-caching"
311 "--enable-runtime-reloc-checks"
312 "--enable-ffi")
313 #:phases
314 ,(if (string-prefix? "aarch64" (or (%current-system)
315 (%current-target-system)))
316 ;; Makefiles and the configure script need to be regenerated to
317 ;; incorporate support for AArch64.
318 '(modify-phases %standard-phases
319 (replace 'bootstrap
320 (lambda _ (invoke "autoreconf" "-vif"))))
321 '%standard-phases)))
322 (inputs
323 `(("classpath" ,classpath-bootstrap)
324 ("jikes" ,jikes)
325 ("libffi" ,libffi)
326 ("zip" ,zip)
327 ("zlib" ,zlib)))
328 (native-inputs
329 (if (string-prefix? "aarch64" (or (%current-system)
330 (%current-target-system)))
331 ;; Additional packages needed for autoreconf.
332 `(("autoconf" ,autoconf)
333 ("automake" ,automake)
334 ("libtool" ,libtool))
335 '()))
336 (home-page "http://jamvm.sourceforge.net/")
337 (synopsis "Small Java Virtual Machine")
338 (description "JamVM is a Java Virtual Machine conforming to the JVM
339 specification edition 2 (blue book). It is extremely small. However, unlike
340 other small VMs it supports the full spec, including object finalisation and
341 JNI.")
342 (license license:gpl2+)))
343
344 (define ant-bootstrap
345 (package
346 (name "ant-bootstrap")
347 ;; The 1.10.x series requires Java 8. 1.9.0 and later use generics, which
348 ;; are not supported. The 1.8.x series is the last to use only features
349 ;; supported by Jikes.
350 (version "1.8.4")
351 (source (origin
352 (method url-fetch)
353 (uri (string-append "mirror://apache/"
354 "ant/source/apache-ant-"
355 version "-src.tar.bz2"))
356 (sha256
357 (base32
358 "1cg0lga887qz5iizh6mlkxp01lciymrhmp7wzxpl6zpnldxmzrjx"))))
359 (build-system gnu-build-system)
360 (arguments
361 `(#:imported-modules ((guix build syscalls)
362 ,@%gnu-build-system-modules)
363 #:modules ((srfi srfi-1)
364 (guix build gnu-build-system)
365 (guix build utils)
366 (guix build syscalls))
367 #:tests? #f ; no "check" target
368 #:phases
369 (modify-phases %standard-phases
370 (delete 'bootstrap)
371 (delete 'configure)
372 (replace 'build
373 (lambda* (#:key inputs #:allow-other-keys)
374 (setenv "JAVA_HOME" (assoc-ref inputs "jamvm"))
375 (setenv "JAVACMD"
376 (string-append (assoc-ref inputs "jamvm")
377 "/bin/jamvm"))
378 (setenv "JAVAC"
379 (string-append (assoc-ref inputs "jikes")
380 "/bin/jikes"))
381 (setenv "CLASSPATH"
382 (string-append (assoc-ref inputs "jamvm")
383 "/lib/rt.jar"))
384
385 ;; Ant complains if this file doesn't exist.
386 (setenv "HOME" "/tmp")
387 (with-output-to-file "/tmp/.ant.properties"
388 (lambda _ (display "")))
389
390 ;; Use jikes instead of javac for <javac ...> tags in build.xml
391 (setenv "ANT_OPTS" "-Dbuild.compiler=jikes")
392
393 ;; jikes produces lots of warnings, but they are not very
394 ;; interesting, so we silence them.
395 (setenv "$BOOTJAVAC_OPTS" "-nowarn")
396
397 ;; Without these JamVM options the build may freeze.
398 (substitute* "bootstrap.sh"
399 (("^\"\\$\\{JAVACMD\\}\" " m)
400 ,@(if (string-prefix? "armhf" (or (%current-system)
401 (%current-target-system)))
402 `((string-append m "-Xnocompact "))
403 `((string-append m "-Xnocompact -Xnoinlining ")))))
404
405 ;; Disable tests because we are bootstrapping and thus don't have
406 ;; any of the dependencies required to build and run the tests.
407 (substitute* "build.xml"
408 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
409 (invoke "bash" "bootstrap.sh"
410 (string-append "-Ddist.dir="
411 (assoc-ref %outputs "out")))))
412 (add-after 'build 'strip-jar-timestamps ;based on ant-build-system
413 (lambda* (#:key outputs #:allow-other-keys)
414 (define (repack-archive jar)
415 (let* ((dir (mkdtemp! "jar-contents.XXXXXX"))
416 (manifest (string-append dir "/META-INF/MANIFESTS.MF")))
417 (with-directory-excursion dir
418 (invoke "unzip" jar))
419 (delete-file jar)
420 ;; XXX: copied from (gnu build install)
421 (for-each (lambda (file)
422 (let ((s (lstat file)))
423 (unless (eq? (stat:type s) 'symlink)
424 (utime file 0 0 0 0))))
425 (find-files dir #:directories? #t))
426 ;; It is important that the manifest appears first.
427 (with-directory-excursion dir
428 (let* ((files (find-files "." ".*" #:directories? #t))
429 ;; To ensure that the reference scanner can
430 ;; detect all store references in the jars
431 ;; we disable compression with the "-0" option.
432 (command (if (file-exists? manifest)
433 `("zip" "-0" "-X" ,jar ,manifest
434 ,@files)
435 `("zip" "-0" "-X" ,jar ,@files))))
436 (apply invoke command)))))
437 (for-each repack-archive
438 (find-files
439 (string-append (assoc-ref %outputs "out") "/lib")
440 "\\.jar$"))
441 #t))
442 (delete 'install))))
443 (native-inputs
444 `(("jikes" ,jikes)
445 ("jamvm" ,jamvm-1-bootstrap)
446 ("unzip" ,unzip)
447 ("zip" ,zip)))
448 (home-page "https://ant.apache.org")
449 (synopsis "Build tool for Java")
450 (description
451 "Ant is a platform-independent build tool for Java. It is similar to
452 make but is implemented using the Java language, requires the Java platform,
453 and is best suited to building Java projects. Ant uses XML to describe the
454 build process and its dependencies, whereas Make uses Makefile format.")
455 (license license:asl2.0)))
456
457 ;; Version 3.2.2 is the last version without a dependency on a full-fledged
458 ;; compiler for Java 1.5.
459 (define ecj-bootstrap
460 (package
461 (name "ecj-bootstrap")
462 (version "3.2.2")
463 (source (origin
464 (method url-fetch)
465 (uri (string-append "http://archive.eclipse.org/eclipse/"
466 "downloads/drops/R-" version
467 "-200702121330/ecjsrc.zip"))
468 (sha256
469 (base32
470 "05hj82kxd23qaglsjkaqcj944riisjha7acf7h3ljhrjyljx8307"))))
471 ;; It would be so much easier if we could use the ant-build-system, but we
472 ;; cannot as we don't have ant at this point. We use ecj for
473 ;; bootstrapping the JDK.
474 (build-system gnu-build-system)
475 (arguments
476 `(#:modules ((guix build gnu-build-system)
477 (guix build utils)
478 (srfi srfi-1))
479 #:tests? #f ; there are no tests
480 #:phases
481 (modify-phases %standard-phases
482 (replace 'configure
483 (lambda* (#:key inputs #:allow-other-keys)
484 (setenv "CLASSPATH"
485 (string-join
486 (cons (string-append (assoc-ref inputs "jamvm")
487 "/lib/rt.jar")
488 (find-files (string-append
489 (assoc-ref inputs "ant-bootstrap")
490 "/lib")
491 "\\.jar$"))
492 ":"))
493 #t))
494 (replace 'build
495 (lambda* (#:key inputs #:allow-other-keys)
496 ;; The unpack phase enters the "org" directory by mistake.
497 (chdir "..")
498
499 ;; Create a simple manifest to make ecj executable.
500 (with-output-to-file "manifest"
501 (lambda _
502 (display "Manifest-Version: 1.0
503 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n")))
504
505 ;; Compile it all!
506 (and (apply invoke "jikes"
507 (find-files "." "\\.java$"))
508 (invoke "fastjar" "cvfm"
509 "ecj-bootstrap.jar" "manifest" "."))))
510 (replace 'install
511 (lambda* (#:key outputs #:allow-other-keys)
512 (let ((share (string-append (assoc-ref outputs "out")
513 "/share/java/")))
514 (mkdir-p share)
515 (install-file "ecj-bootstrap.jar" share)
516 #t))))))
517 (native-inputs
518 `(("ant-bootstrap" ,ant-bootstrap)
519 ("unzip" ,unzip)
520 ("jikes" ,jikes)
521 ("jamvm" ,jamvm-1-bootstrap)
522 ("fastjar" ,fastjar)))
523 (home-page "https://eclipse.org")
524 (synopsis "Eclipse Java development tools core batch compiler")
525 (description "This package provides the Eclipse Java core batch compiler
526 for bootstrapping purposes. The @dfn{Eclipse compiler for Java} (ecj) is a
527 requirement for all GNU Classpath releases after version 0.93.")
528 (license license:epl1.0)))
529
530 (define ecj-javac-wrapper
531 (package (inherit ecj-bootstrap)
532 (name "ecj-javac-wrapper")
533 (source #f)
534 (build-system trivial-build-system)
535 (arguments
536 `(#:modules ((guix build utils))
537 #:builder
538 (begin
539 (use-modules (guix build utils))
540 (let* ((bin (string-append (assoc-ref %outputs "out") "/bin"))
541 (target (string-append bin "/javac"))
542 (guile (string-append (assoc-ref %build-inputs "guile")
543 "/bin/guile"))
544 (ecj (string-append (assoc-ref %build-inputs "ecj-bootstrap")
545 "/share/java/ecj-bootstrap.jar"))
546 (java (string-append (assoc-ref %build-inputs "jamvm")
547 "/bin/jamvm"))
548 (bootcp (let ((jvmlib (string-append (assoc-ref %build-inputs "classpath")
549 "/share/classpath")))
550 (string-append jvmlib "/glibj.zip:"
551 jvmlib "/tools.zip"))))
552 (mkdir-p bin)
553 (with-output-to-file target
554 (lambda _
555 (format #t "#!~a --no-auto-compile\n!#\n" guile)
556 (write
557 `(begin (use-modules (ice-9 match)
558 (ice-9 receive)
559 (ice-9 hash-table)
560 (srfi srfi-1)
561 (srfi srfi-26))
562 (define defaults
563 '(("-bootclasspath" ,bootcp)
564 ("-source" "1.5")
565 ("-target" "1.5")
566 ("-cp" ".")))
567 (define (main args)
568 (let ((classpath (getenv "CLASSPATH")))
569 (setenv "CLASSPATH"
570 (string-join (list ,ecj
571 ,(string-append (assoc-ref %build-inputs "jamvm")
572 "/lib/rt.jar")
573 (or classpath ""))
574 ":")))
575 (receive (vm-args other-args)
576 ;; Separate VM arguments from arguments to ECJ.
577 (partition (cut string-prefix? "-J" <>)
578 (fold (lambda (default acc)
579 (if (member (first default) acc)
580 acc (append default acc)))
581 args defaults))
582 (apply system* ,java
583 (append
584 ;; Remove "-J" prefix
585 (map (cut string-drop <> 2) vm-args)
586 '("org.eclipse.jdt.internal.compiler.batch.Main")
587 (cons "-nowarn" other-args)))))
588 ;; Entry point
589 (let ((args (cdr (command-line))))
590 (if (null? args)
591 (format (current-error-port) "javac: no arguments given!\n")
592 (main args)))))))
593 (chmod target #o755)
594 #t))))
595 (native-inputs
596 `(("guile" ,guile-2.2)
597 ("ecj-bootstrap" ,ecj-bootstrap)
598 ("jamvm" ,jamvm-1-bootstrap)
599 ("classpath" ,classpath-bootstrap)))
600 (description "This package provides a wrapper around the @dfn{Eclipse
601 compiler for Java} (ecj) with a command line interface that is compatible with
602 the standard javac executable.")))
603
604 ;; The classpath-bootstrap was built without a virtual machine, so it does not
605 ;; provide a wrapper for javah. We cannot build the development version of
606 ;; Classpath without javah.
607 (define classpath-0.99
608 (package (inherit classpath-bootstrap)
609 (version "0.99")
610 (source (origin
611 (method url-fetch)
612 (uri (string-append "mirror://gnu/classpath/classpath-"
613 version ".tar.gz"))
614 (sha256
615 (base32
616 "1j7cby4k66f1nvckm48xcmh352b1d1b33qk7l6hi7dp9i9zjjagr"))
617 (patches (search-patches "classpath-aarch64-support.patch"))))
618 (arguments
619 `(#:configure-flags
620 (list (string-append "--with-ecj-jar="
621 (assoc-ref %build-inputs "ecj-bootstrap")
622 "/share/java/ecj-bootstrap.jar")
623 (string-append "JAVAC="
624 (assoc-ref %build-inputs "ecj-javac-wrapper")
625 "/bin/javac")
626 (string-append "JAVA="
627 (assoc-ref %build-inputs "jamvm")
628 "/bin/jamvm")
629 "GCJ_JAVAC_TRUE=no"
630 "ac_cv_prog_java_works=yes" ; trust me
631 "--disable-Werror"
632 "--disable-gmp"
633 "--disable-gtk-peer"
634 "--disable-gconf-peer"
635 "--disable-plugin"
636 "--disable-dssi"
637 "--disable-alsa"
638 "--disable-gjdoc")
639 #:phases
640 (modify-phases %standard-phases
641 (add-after 'install 'install-data
642 (lambda _ (invoke "make" "install-data"))))))
643 (native-inputs
644 `(("ecj-bootstrap" ,ecj-bootstrap)
645 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
646 ("fastjar" ,fastjar)
647 ("jamvm" ,jamvm-1-bootstrap)
648 ("classpath" ,classpath-bootstrap)
649 ("libltdl" ,libltdl)
650 ("pkg-config" ,pkg-config)))))
651
652 ;; We need this because classpath-bootstrap does not provide all of the tools
653 ;; we need to build classpath-devel.
654 (define classpath-jamvm-wrappers
655 (package (inherit classpath-0.99)
656 (name "classpath-jamvm-wrappers")
657 (source #f)
658 (build-system trivial-build-system)
659 (arguments
660 `(#:modules ((guix build utils))
661 #:builder
662 (begin
663 (use-modules (guix build utils))
664 (let* ((bash (assoc-ref %build-inputs "bash"))
665 (jamvm (assoc-ref %build-inputs "jamvm"))
666 (classpath (assoc-ref %build-inputs "classpath"))
667 (bin (string-append (assoc-ref %outputs "out")
668 "/bin/")))
669 (mkdir-p bin)
670 (for-each (lambda (tool)
671 (with-output-to-file (string-append bin tool)
672 (lambda _
673 ,@(if (string-prefix? "armhf" (or (%current-system)
674 (%current-target-system)))
675 `((format #t "#!~a/bin/sh
676 ~a/bin/jamvm -Xnocompact -classpath ~a/share/classpath/tools.zip \
677 gnu.classpath.tools.~a.~a $@"
678 bash jamvm classpath tool
679 (if (string=? "native2ascii" tool)
680 "Native2ASCII" "Main")))
681 `((format #t "#!~a/bin/sh
682 ~a/bin/jamvm -Xnocompact -Xnoinlining -classpath ~a/share/classpath/tools.zip \
683 gnu.classpath.tools.~a.~a $@"
684 bash jamvm classpath tool
685 (if (string=? "native2ascii" tool)
686 "Native2ASCII" "Main"))))))
687 (chmod (string-append bin tool) #o755))
688 (list "javah"
689 "rmic"
690 "rmid"
691 "orbd"
692 "rmiregistry"
693 "native2ascii"))
694 #t))))
695 (native-inputs
696 `(("bash" ,bash)
697 ("jamvm" ,jamvm-1-bootstrap)
698 ("classpath" ,classpath-0.99)))
699 (inputs '())
700 (synopsis "Executables from GNU Classpath")
701 (description "This package provides wrappers around the tools provided by
702 the GNU Classpath library. They are executed by the JamVM virtual
703 machine.")))
704
705 ;; The last release of GNU Classpath is 0.99 and it happened in 2012. Since
706 ;; then Classpath has gained much more support for Java 1.6.
707 (define-public classpath-devel
708 (let ((commit "e7c13ee0cf2005206fbec0eca677f8cf66d5a103")
709 (revision "1"))
710 (package (inherit classpath-bootstrap)
711 (version (string-append "0.99-" revision "." (string-take commit 9)))
712 (source (origin
713 (method git-fetch)
714 (uri (git-reference
715 (url "https://git.savannah.gnu.org/git/classpath.git")
716 (commit commit)))
717 (file-name (string-append "classpath-" version "-checkout"))
718 (sha256
719 (base32
720 "1v2rww76ww322mpg3s12a1kkc6gkp31bm9gcxs532h0wq285fiw4"))
721 (patches (search-patches "classpath-aarch64-support.patch"))))
722 (arguments
723 `(#:make-flags
724 ;; Ensure that the initial heap size is smaller than the maximum
725 ;; size. By default only Xmx is set, which can lead to invalid
726 ;; memory settings on some machines with a lot of memory.
727 '("JAVAC_MEM_OPT=-J-Xms512M -J-Xmx768M")
728 #:configure-flags
729 (list (string-append "--with-ecj-jar="
730 (assoc-ref %build-inputs "ecj-bootstrap")
731 "/share/java/ecj-bootstrap.jar")
732 (string-append "--with-javac="
733 (assoc-ref %build-inputs "ecj-javac-wrapper")
734 "/bin/javac")
735 (string-append "JAVA="
736 (assoc-ref %build-inputs "jamvm")
737 "/bin/jamvm")
738 "GCJ_JAVAC_TRUE=no"
739 "ac_cv_prog_java_works=yes" ; trust me
740 "--disable-Werror"
741 "--disable-gmp"
742 "--disable-gtk-peer"
743 "--disable-gconf-peer"
744 "--disable-plugin"
745 "--disable-dssi"
746 "--disable-alsa"
747 "--disable-gjdoc")
748 #:phases
749 (modify-phases %standard-phases
750 ;; XXX The bootstrap phase executes autogen.sh, which fails after
751 ;; complaining about the lack of gettext.
752 (replace 'bootstrap
753 (lambda _ (invoke "autoreconf" "-vif")))
754 (add-after 'unpack 'remove-unsupported-annotations
755 (lambda _
756 (substitute* (find-files "java" "\\.java$")
757 (("@Override") ""))
758 #t))
759 (add-after 'install 'install-data
760 (lambda _ (invoke "make" "install-data"))))))
761 (native-inputs
762 `(("autoconf" ,autoconf)
763 ("automake" ,automake)
764 ("libtool" ,libtool)
765 ("gettext" ,gettext-minimal)
766 ("texinfo" ,texinfo)
767 ("classpath-jamvm-wrappers" ,classpath-jamvm-wrappers) ; for javah
768 ("ecj-bootstrap" ,ecj-bootstrap)
769 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
770 ("fastjar" ,fastjar)
771 ("jamvm" ,jamvm-1-bootstrap)
772 ("libltdl" ,libltdl)
773 ("pkg-config" ,pkg-config))))))
774
775 (define jamvm
776 (package (inherit jamvm-1-bootstrap)
777 (version "2.0.0")
778 (source (origin
779 (method url-fetch)
780 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
781 "JamVM%20" version "/jamvm-"
782 version ".tar.gz"))
783 (sha256
784 (base32
785 "1nl0zxz8y5x8gwsrm7n32bry4dx8x70p8z3s9jbdvs8avyb8whkn"))
786 (patches
787 (search-patches "jamvm-2.0.0-disable-branch-patching.patch"
788 "jamvm-2.0.0-opcode-guard.patch"
789 "jamvm-2.0.0-aarch64-support.patch"))
790 (snippet
791 '(begin
792 ;; Remove precompiled software.
793 (delete-file "src/classlib/gnuclasspath/lib/classes.zip")
794 #t))))
795 (build-system gnu-build-system)
796 (arguments
797 (substitute-keyword-arguments (package-arguments jamvm-1-bootstrap)
798 ((#:configure-flags _)
799 '(list (string-append "--with-classpath-install-dir="
800 (assoc-ref %build-inputs "classpath"))))))
801 (inputs
802 `(("classpath" ,classpath-devel)
803 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
804 ("zip" ,zip)
805 ("zlib" ,zlib)))))
806
807 (define ecj-javac-wrapper-final
808 (package (inherit ecj-javac-wrapper)
809 (native-inputs
810 `(("guile" ,guile-2.2)
811 ("ecj-bootstrap" ,ecj-bootstrap)
812 ("jamvm" ,jamvm)
813 ("classpath" ,classpath-devel)))))
814
815 ;; The bootstrap JDK consisting of jamvm, classpath-devel,
816 ;; ecj-javac-wrapper-final cannot build Icedtea 2.x directly, because it's
817 ;; written in Java 7. It can, however, build the unmaintained Icedtea 1.x,
818 ;; which uses Java 6 only.
819 (define-public icedtea-6
820 (package
821 (name "icedtea")
822 (version "1.13.13")
823 (source (origin
824 (method url-fetch)
825 (uri (string-append
826 "http://icedtea.wildebeest.org/download/source/icedtea6-"
827 version ".tar.xz"))
828 (sha256
829 (base32
830 "0bg9sb4f7qbq77c0zf9m17p47ga0kf0r9622g9p12ysg26jd1ksg"))
831 (patches (search-patches
832 "icedtea-6-extend-hotspot-aarch64-support.patch"))
833 (modules '((guix build utils)))
834 (snippet
835 '(begin
836 (substitute* "Makefile.in"
837 ;; do not leak information about the build host
838 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
839 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
840 #t))))
841 (build-system gnu-build-system)
842 (outputs '("out" ; Java Runtime Environment
843 "jdk" ; Java Development Kit
844 "doc")) ; all documentation
845 (arguments
846 `(;; There are many failing tests and many are known to fail upstream.
847 #:tests? #f
848
849 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
850 ;; gremlin) doesn't support it yet, so skip this phase.
851 #:validate-runpath? #f
852
853 #:modules ((guix build utils)
854 (guix build gnu-build-system)
855 (srfi srfi-19))
856
857 #:configure-flags
858 `("--enable-bootstrap"
859 "--enable-nss"
860 "--without-rhino"
861 ,(string-append "--with-parallel-jobs="
862 (number->string (parallel-job-count)))
863 "--disable-downloading"
864 "--disable-tests"
865 ,(string-append "--with-ecj="
866 (assoc-ref %build-inputs "ecj")
867 "/share/java/ecj-bootstrap.jar")
868 ,(string-append "--with-jar="
869 (assoc-ref %build-inputs "fastjar")
870 "/bin/fastjar")
871 ,(string-append "--with-jdk-home="
872 (assoc-ref %build-inputs "classpath"))
873 ,(string-append "--with-java="
874 (assoc-ref %build-inputs "jamvm")
875 "/bin/jamvm"))
876 #:phases
877 (modify-phases %standard-phases
878 (replace 'unpack
879 (lambda* (#:key source inputs #:allow-other-keys)
880 (invoke "tar" "xvf" source)
881 (chdir (string-append "icedtea6-" ,version))
882 (mkdir "openjdk")
883 (copy-recursively (assoc-ref inputs "openjdk-src") "openjdk")
884 ;; The convenient OpenJDK source bundle is no longer
885 ;; available for download, so we have to take the sources
886 ;; from the Mercurial repositories and change the Makefile
887 ;; to avoid tests for the OpenJDK zip archive.
888 (with-directory-excursion "openjdk"
889 (for-each (lambda (part)
890 (mkdir part)
891 (copy-recursively
892 (assoc-ref inputs
893 (string-append part "-src"))
894 part))
895 '("jdk" "hotspot" "corba"
896 "langtools" "jaxp" "jaxws")))
897 (substitute* "patches/freetypeversion.patch"
898 (("REQUIRED_FREETYPE_VERSION = 2.2.1")
899 "REQUIRED_FREETYPE_VERSION = 2.10.1"))
900 (substitute* "Makefile.in"
901 (("echo \"ERROR: No up-to-date OpenJDK zip available\"; exit -1;")
902 "echo \"trust me\";")
903 ;; The contents of the bootstrap directory must be
904 ;; writeable but when copying from the store they are
905 ;; not.
906 (("mkdir -p lib/rt" line)
907 (string-append line "; chmod -R u+w $(BOOT_DIR)")))
908 (invoke "chmod" "-R" "u+w" "openjdk")))
909 (add-after 'unpack 'use-classpath
910 (lambda* (#:key inputs #:allow-other-keys)
911 (let ((jvmlib (assoc-ref inputs "classpath"))
912 (jamvm (assoc-ref inputs "jamvm")))
913 ;; Classpath does not provide rt.jar.
914 (substitute* "Makefile.in"
915 (("\\$\\(SYSTEM_JDK_DIR\\)/jre/lib/rt.jar")
916 (string-append jvmlib "/share/classpath/glibj.zip")))
917 ;; Make sure we can find all classes.
918 (setenv "CLASSPATH"
919 (string-append jvmlib "/share/classpath/glibj.zip:"
920 jvmlib "/share/classpath/tools.zip:"
921 jamvm "/lib/rt.jar"))
922 (setenv "JAVACFLAGS"
923 (string-append "-cp "
924 jvmlib "/share/classpath/glibj.zip:"
925 jvmlib "/share/classpath/tools.zip")))
926 #t))
927 (add-after 'unpack 'patch-patches
928 (lambda _
929 ;; shebang in patches so that they apply cleanly
930 (substitute* '("patches/jtreg-jrunscript.patch"
931 "patches/hotspot/hs23/drop_unlicensed_test.patch")
932 (("#!/bin/sh") (string-append "#!" (which "sh"))))
933 #t))
934 (add-after 'unpack 'patch-paths
935 (lambda* (#:key inputs #:allow-other-keys)
936 ;; buildtree.make generates shell scripts, so we need to replace
937 ;; the generated shebang
938 (substitute* '("openjdk/hotspot/make/linux/makefiles/buildtree.make")
939 (("/bin/sh") (which "bash")))
940
941 (let ((corebin (string-append
942 (assoc-ref inputs "coreutils") "/bin/"))
943 (binbin (string-append
944 (assoc-ref inputs "binutils") "/bin/"))
945 (grepbin (string-append
946 (assoc-ref inputs "grep") "/bin/")))
947 (substitute* '("openjdk/jdk/make/common/shared/Defs-linux.gmk"
948 "openjdk/corba/make/common/shared/Defs-linux.gmk")
949 (("UNIXCOMMAND_PATH = /bin/")
950 (string-append "UNIXCOMMAND_PATH = " corebin))
951 (("USRBIN_PATH = /usr/bin/")
952 (string-append "USRBIN_PATH = " corebin))
953 (("DEVTOOLS_PATH *= */usr/bin/")
954 (string-append "DEVTOOLS_PATH = " corebin))
955 (("COMPILER_PATH *= */usr/bin/")
956 (string-append "COMPILER_PATH = "
957 (assoc-ref inputs "gcc") "/bin/"))
958 (("DEF_OBJCOPY *=.*objcopy")
959 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
960
961 ;; fix path to alsa header
962 (substitute* "openjdk/jdk/make/common/shared/Sanity.gmk"
963 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
964 (string-append "ALSA_INCLUDE="
965 (assoc-ref inputs "alsa-lib")
966 "/include/alsa/version.h")))
967
968 ;; fix hard-coded utility paths
969 (substitute* '("openjdk/jdk/make/common/shared/Defs-utils.gmk"
970 "openjdk/corba/make/common/shared/Defs-utils.gmk")
971 (("ECHO *=.*echo")
972 (string-append "ECHO = " (which "echo")))
973 (("^GREP *=.*grep")
974 (string-append "GREP = " (which "grep")))
975 (("EGREP *=.*egrep")
976 (string-append "EGREP = " (which "egrep")))
977 (("CPIO *=.*cpio")
978 (string-append "CPIO = " (which "cpio")))
979 (("READELF *=.*readelf")
980 (string-append "READELF = " (which "readelf")))
981 (("^ *AR *=.*ar")
982 (string-append "AR = " (which "ar")))
983 (("^ *TAR *=.*tar")
984 (string-append "TAR = " (which "tar")))
985 (("AS *=.*as")
986 (string-append "AS = " (which "as")))
987 (("LD *=.*ld")
988 (string-append "LD = " (which "ld")))
989 (("STRIP *=.*strip")
990 (string-append "STRIP = " (which "strip")))
991 (("NM *=.*nm")
992 (string-append "NM = " (which "nm")))
993 (("^SH *=.*sh")
994 (string-append "SH = " (which "bash")))
995 (("^FIND *=.*find")
996 (string-append "FIND = " (which "find")))
997 (("LDD *=.*ldd")
998 (string-append "LDD = " (which "ldd")))
999 (("NAWK *=.*(n|g)awk")
1000 (string-append "NAWK = " (which "gawk")))
1001 (("XARGS *=.*xargs")
1002 (string-append "XARGS = " (which "xargs")))
1003 (("UNZIP *=.*unzip")
1004 (string-append "UNZIP = " (which "unzip")))
1005 (("ZIPEXE *=.*zip")
1006 (string-append "ZIPEXE = " (which "zip")))
1007 (("SED *=.*sed")
1008 (string-append "SED = " (which "sed"))))
1009
1010 ;; Some of these timestamps cause problems as they are more than
1011 ;; 10 years ago, failing the build process.
1012 (substitute*
1013 "openjdk/jdk/src/share/classes/java/util/CurrencyData.properties"
1014 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
1015 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
1016 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
1017 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY"))
1018 #t)))
1019 (add-before 'configure 'set-additional-paths
1020 (lambda* (#:key inputs #:allow-other-keys)
1021 (setenv "CPATH"
1022 (string-append (assoc-ref inputs "libxrender")
1023 "/include/X11/extensions" ":"
1024 (assoc-ref inputs "libxtst")
1025 "/include/X11/extensions" ":"
1026 (assoc-ref inputs "libxinerama")
1027 "/include/X11/extensions" ":"
1028 (or (getenv "CPATH") "")))
1029 (setenv "ALT_CUPS_HEADERS_PATH"
1030 (string-append (assoc-ref inputs "cups")
1031 "/include"))
1032 (setenv "ALT_FREETYPE_HEADERS_PATH"
1033 (string-append (assoc-ref inputs "freetype")
1034 "/include"))
1035 (setenv "ALT_FREETYPE_LIB_PATH"
1036 (string-append (assoc-ref inputs "freetype")
1037 "/lib"))
1038 #t))
1039 (add-before 'build 'disable-os-version-check
1040 ;; allow build on linux major version change
1041 (lambda _
1042 (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok")
1043 #t))
1044 (replace 'install
1045 (lambda* (#:key outputs #:allow-other-keys)
1046 (let ((doc (string-append (assoc-ref outputs "doc")
1047 "/share/doc/icedtea"))
1048 (jre (assoc-ref outputs "out"))
1049 (jdk (assoc-ref outputs "jdk")))
1050 (copy-recursively "openjdk.build/docs" doc)
1051 (copy-recursively "openjdk.build/j2re-image" jre)
1052 (copy-recursively "openjdk.build/j2sdk-image" jdk))
1053 #t)))))
1054 (native-inputs
1055 `(("ant" ,ant-bootstrap)
1056 ("alsa-lib" ,alsa-lib)
1057 ("attr" ,attr)
1058 ("classpath" ,classpath-devel)
1059 ("coreutils" ,coreutils)
1060 ("cpio" ,cpio)
1061 ("cups" ,cups)
1062 ("ecj" ,ecj-bootstrap)
1063 ("ecj-javac" ,ecj-javac-wrapper-final)
1064 ("fastjar" ,fastjar)
1065 ("fontconfig" ,fontconfig)
1066 ("freetype" ,freetype)
1067 ("gtk" ,gtk+-2)
1068 ("gawk" ,gawk)
1069 ("giflib" ,giflib)
1070 ("grep" ,grep)
1071 ("jamvm" ,jamvm)
1072 ("lcms" ,lcms)
1073 ("libjpeg" ,libjpeg-turbo)
1074 ("libnsl" ,libnsl)
1075 ("libpng" ,libpng)
1076 ("libtool" ,libtool)
1077 ("libx11" ,libx11)
1078 ("libxcomposite" ,libxcomposite)
1079 ("libxi" ,libxi)
1080 ("libxinerama" ,libxinerama)
1081 ("libxrender" ,libxrender)
1082 ("libxslt" ,libxslt) ;for xsltproc
1083 ("libxt" ,libxt)
1084 ("libxtst" ,libxtst)
1085 ("mit-krb5" ,mit-krb5)
1086 ("nss" ,nss)
1087 ("nss-certs" ,nss-certs)
1088 ("perl" ,perl)
1089 ("pkg-config" ,pkg-config)
1090 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
1091 ("unzip" ,unzip)
1092 ("wget" ,wget)
1093 ("which" ,which)
1094 ("zip" ,zip)
1095 ("zlib" ,zlib)
1096 ("openjdk-src"
1097 ,(origin
1098 (method hg-fetch)
1099 (uri (hg-reference
1100 (url "http://hg.openjdk.java.net/jdk6/jdk6/")
1101 (changeset "jdk6-b41")))
1102 (sha256
1103 (base32
1104 "14q47yfg586fs64w30g8mk92m5dkxsvr36zzh0ra99xk5x0x96mv"))))
1105 ("jdk-src"
1106 ,(origin
1107 (method hg-fetch)
1108 (uri (hg-reference
1109 (url "http://hg.openjdk.java.net/jdk6/jdk6/jdk/")
1110 (changeset "jdk6-b41")))
1111 (sha256
1112 (base32
1113 "165824nhg1k1dx6zs9dny0j49rmk35jw5b13dmz8c77jfajml4v9"))))
1114 ("hotspot-src"
1115 ,(origin
1116 (method hg-fetch)
1117 (uri (hg-reference
1118 (url "http://hg.openjdk.java.net/jdk6/jdk6/hotspot/")
1119 (changeset "jdk6-b41")))
1120 (sha256
1121 (base32
1122 "07lc1z4k5dj9nrc1wvwmpvxr3xgxrdkdh53xb95skk5ij49yagfd"))))
1123 ("corba-src"
1124 ,(origin
1125 (method hg-fetch)
1126 (uri (hg-reference
1127 (url "http://hg.openjdk.java.net/jdk6/jdk6/corba/")
1128 (changeset "jdk6-b41")))
1129 (sha256
1130 (base32
1131 "1p9g1r9dnax2iwp7yb59qx7m4nmshqhwmrb2b8jj8zgbd9dl2i3q"))))
1132 ("langtools-src"
1133 ,(origin
1134 (method hg-fetch)
1135 (uri (hg-reference
1136 (url "http://hg.openjdk.java.net/jdk6/jdk6/langtools/")
1137 (changeset "jdk6-b41")))
1138 (sha256
1139 (base32
1140 "1x52wd67fynbbd9ild6fb4wvba3f5hhwk03qdjfazd0a1qr37z3d"))))
1141 ("jaxp-src"
1142 ,(origin
1143 (method hg-fetch)
1144 (uri (hg-reference
1145 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxp/")
1146 (changeset "jdk6-b41")))
1147 (sha256
1148 (base32
1149 "0shlqrvzpr4nrkmv215lbxnby63s3yvbdh1yxcayznsyqwa4nlxm"))))
1150 ("jaxws-src"
1151 ,(origin
1152 (method hg-fetch)
1153 (uri (hg-reference
1154 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxws/")
1155 (changeset "jdk6-b41")))
1156 (sha256
1157 (base32
1158 "0835lkw8vib1xhp8lxnybhlvzdh699hbi4mclxanydjk63zbpxk0"))))))
1159 (home-page "http://icedtea.classpath.org")
1160 (synopsis "Java development kit")
1161 (description
1162 "This package provides the OpenJDK built with the IcedTea build harness.
1163 This version of the OpenJDK is no longer maintained and is only used for
1164 bootstrapping purposes.")
1165 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1166 ;; same license as both GNU Classpath and OpenJDK.
1167 (license license:gpl2+)))
1168
1169 (define-public icedtea-7
1170 (let* ((version "2.6.13")
1171 (drop (lambda (name hash)
1172 (origin
1173 (method url-fetch)
1174 (uri (string-append
1175 "http://icedtea.classpath.org/download/drops"
1176 "/icedtea7/" version "/" name ".tar.bz2"))
1177 (sha256 (base32 hash))))))
1178 (package
1179 (name "icedtea")
1180 (version version)
1181 (source (origin
1182 (method url-fetch)
1183 (uri (string-append
1184 "http://icedtea.wildebeest.org/download/source/icedtea-"
1185 version ".tar.xz"))
1186 (sha256
1187 (base32
1188 "1w331rdqx1dcx2xb0fmjmrkdc71xqn20fxsgw8by4xhiblh88khh"))
1189 (modules '((guix build utils)))
1190 (snippet
1191 '(begin
1192 (substitute* "Makefile.in"
1193 ;; do not leak information about the build host
1194 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
1195 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
1196 #t))))
1197 (build-system gnu-build-system)
1198 (outputs '("out" ; Java Runtime Environment
1199 "jdk" ; Java Development Kit
1200 "doc")) ; all documentation
1201 (arguments
1202 `(;; There are many test failures. Some are known to
1203 ;; fail upstream, others relate to not having an X
1204 ;; server running at test time, yet others are a
1205 ;; complete mystery to me.
1206
1207 ;; hotspot: passed: 241; failed: 45; error: 2
1208 ;; langtools: passed: 1,934; failed: 26
1209 ;; jdk: unknown
1210 #:tests? #f
1211
1212 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
1213 ;; gremlin) doesn't support it yet, so skip this phase.
1214 #:validate-runpath? #f
1215
1216 ;; Apparently, the C locale is needed for some of the tests.
1217 #:locale "C"
1218
1219 #:modules ((guix build utils)
1220 (guix build gnu-build-system)
1221 (ice-9 match)
1222 (ice-9 popen)
1223 (srfi srfi-19)
1224 (srfi srfi-26))
1225
1226 #:configure-flags
1227 ;; TODO: package pcsc and sctp, and add to inputs
1228 `("--disable-system-pcsc"
1229 "--disable-system-sctp"
1230 "--enable-bootstrap"
1231 "--enable-nss"
1232 "--without-rhino"
1233 ,(string-append "--with-parallel-jobs="
1234 (number->string (parallel-job-count)))
1235 "--disable-downloading"
1236 "--disable-tests" ;they are run in the check phase instead
1237 "--with-openjdk-src-dir=./openjdk.src"
1238 ,(string-append "--with-jdk-home="
1239 (assoc-ref %build-inputs "jdk")))
1240
1241 #:phases
1242 (modify-phases %standard-phases
1243 (replace 'unpack
1244 (lambda* (#:key source inputs #:allow-other-keys)
1245 (let ((target (string-append "icedtea-" ,version))
1246 (unpack (lambda* (name #:optional dir)
1247 (let ((dir (or dir
1248 (string-drop-right name 5))))
1249 (mkdir dir)
1250 (invoke "tar" "xvf"
1251 (assoc-ref inputs name)
1252 "-C" dir
1253 "--strip-components=1")))))
1254 (mkdir target)
1255 (invoke "tar" "xvf" source
1256 "-C" target "--strip-components=1")
1257 (chdir target)
1258 (unpack "openjdk-src" "openjdk.src")
1259 (with-directory-excursion "openjdk.src"
1260 (for-each unpack
1261 (filter (cut string-suffix? "-drop" <>)
1262 (map (match-lambda
1263 ((name . _) name))
1264 inputs))))
1265 #t)))
1266 (add-after 'unpack 'patch-bitrot
1267 (lambda _
1268 (substitute* '("patches/boot/revert-6973616.patch"
1269 "openjdk.src/jdk/make/common/shared/Defs-versions.gmk")
1270 (("REQUIRED_FREETYPE_VERSION = 2.2.1")
1271 "REQUIRED_FREETYPE_VERSION = 2.10.1"))
1272 ;; As of attr 2.4.48 this header is no longer
1273 ;; included. It is provided by the libc instead.
1274 (substitute* '("configure"
1275 "openjdk.src/jdk/src/solaris/native/sun/nio/fs/LinuxNativeDispatcher.c")
1276 (("attr/xattr.h") "sys/xattr.h"))
1277 #t))
1278 (add-after 'unpack 'fix-x11-extension-include-path
1279 (lambda* (#:key inputs #:allow-other-keys)
1280 (substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk"
1281 (((string-append "\\$\\(firstword \\$\\(wildcard "
1282 "\\$\\(OPENWIN_HOME\\)"
1283 "/include/X11/extensions\\).*$"))
1284 (string-append (assoc-ref inputs "libxrender")
1285 "/include/X11/extensions"
1286 " -I" (assoc-ref inputs "libxtst")
1287 "/include/X11/extensions"
1288 " -I" (assoc-ref inputs "libxinerama")
1289 "/include/X11/extensions"))
1290 (("\\$\\(wildcard /usr/include/X11/extensions\\)\\)") ""))
1291 #t))
1292 (add-after 'unpack 'patch-paths
1293 (lambda _
1294 ;; buildtree.make generates shell scripts, so we need to replace
1295 ;; the generated shebang
1296 (substitute* '("openjdk.src/hotspot/make/linux/makefiles/buildtree.make")
1297 (("/bin/sh") (which "bash")))
1298
1299 (let ((corebin (string-append
1300 (assoc-ref %build-inputs "coreutils") "/bin/"))
1301 (binbin (string-append
1302 (assoc-ref %build-inputs "binutils") "/bin/"))
1303 (grepbin (string-append
1304 (assoc-ref %build-inputs "grep") "/bin/")))
1305 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-linux.gmk"
1306 "openjdk.src/corba/make/common/shared/Defs-linux.gmk")
1307 (("UNIXCOMMAND_PATH = /bin/")
1308 (string-append "UNIXCOMMAND_PATH = " corebin))
1309 (("USRBIN_PATH = /usr/bin/")
1310 (string-append "USRBIN_PATH = " corebin))
1311 (("DEVTOOLS_PATH *= */usr/bin/")
1312 (string-append "DEVTOOLS_PATH = " corebin))
1313 (("COMPILER_PATH *= */usr/bin/")
1314 (string-append "COMPILER_PATH = "
1315 (assoc-ref %build-inputs "gcc") "/bin/"))
1316 (("DEF_OBJCOPY *=.*objcopy")
1317 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
1318
1319 ;; fix path to alsa header
1320 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1321 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1322 (string-append "ALSA_INCLUDE="
1323 (assoc-ref %build-inputs "alsa-lib")
1324 "/include/alsa/version.h")))
1325
1326 ;; fix hard-coded utility paths
1327 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-utils.gmk"
1328 "openjdk.src/corba/make/common/shared/Defs-utils.gmk")
1329 (("ECHO *=.*echo")
1330 (string-append "ECHO = " (which "echo")))
1331 (("^GREP *=.*grep")
1332 (string-append "GREP = " (which "grep")))
1333 (("EGREP *=.*egrep")
1334 (string-append "EGREP = " (which "egrep")))
1335 (("CPIO *=.*cpio")
1336 (string-append "CPIO = " (which "cpio")))
1337 (("READELF *=.*readelf")
1338 (string-append "READELF = " (which "readelf")))
1339 (("^ *AR *=.*ar")
1340 (string-append "AR = " (which "ar")))
1341 (("^ *TAR *=.*tar")
1342 (string-append "TAR = " (which "tar")))
1343 (("AS *=.*as")
1344 (string-append "AS = " (which "as")))
1345 (("LD *=.*ld")
1346 (string-append "LD = " (which "ld")))
1347 (("STRIP *=.*strip")
1348 (string-append "STRIP = " (which "strip")))
1349 (("NM *=.*nm")
1350 (string-append "NM = " (which "nm")))
1351 (("^SH *=.*sh")
1352 (string-append "SH = " (which "bash")))
1353 (("^FIND *=.*find")
1354 (string-append "FIND = " (which "find")))
1355 (("LDD *=.*ldd")
1356 (string-append "LDD = " (which "ldd")))
1357 (("NAWK *=.*(n|g)awk")
1358 (string-append "NAWK = " (which "gawk")))
1359 (("XARGS *=.*xargs")
1360 (string-append "XARGS = " (which "xargs")))
1361 (("UNZIP *=.*unzip")
1362 (string-append "UNZIP = " (which "unzip")))
1363 (("ZIPEXE *=.*zip")
1364 (string-append "ZIPEXE = " (which "zip")))
1365 (("SED *=.*sed")
1366 (string-append "SED = " (which "sed"))))
1367
1368 ;; Some of these timestamps cause problems as they are more than
1369 ;; 10 years ago, failing the build process.
1370 (substitute*
1371 "openjdk.src/jdk/src/share/classes/java/util/CurrencyData.properties"
1372 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
1373 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
1374 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
1375 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY")))
1376 #t))
1377 (add-before 'configure 'set-additional-paths
1378 (lambda* (#:key inputs #:allow-other-keys)
1379 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1380 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1381 (string-append "ALSA_INCLUDE="
1382 (assoc-ref inputs "alsa-lib")
1383 "/include/alsa/version.h")))
1384 (setenv "CC" "gcc")
1385 (setenv "CPATH"
1386 (string-append (assoc-ref inputs "libxcomposite")
1387 "/include/X11/extensions" ":"
1388 (assoc-ref inputs "libxrender")
1389 "/include/X11/extensions" ":"
1390 (assoc-ref inputs "libxtst")
1391 "/include/X11/extensions" ":"
1392 (assoc-ref inputs "libxinerama")
1393 "/include/X11/extensions" ":"
1394 (or (getenv "CPATH") "")))
1395 (setenv "ALT_OBJCOPY" (which "objcopy"))
1396 (setenv "ALT_CUPS_HEADERS_PATH"
1397 (string-append (assoc-ref inputs "cups")
1398 "/include"))
1399 (setenv "ALT_FREETYPE_HEADERS_PATH"
1400 (string-append (assoc-ref inputs "freetype")
1401 "/include"))
1402 (setenv "ALT_FREETYPE_LIB_PATH"
1403 (string-append (assoc-ref inputs "freetype")
1404 "/lib"))
1405 #t))
1406 (add-before 'build 'disable-os-version-check
1407 ;; allow build on linux major version change
1408 (lambda _
1409 (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok")
1410 #t))
1411 (add-before 'check 'fix-test-framework
1412 (lambda _
1413 ;; Fix PATH in test environment
1414 (substitute* "test/jtreg/com/sun/javatest/regtest/Main.java"
1415 (("PATH=/bin:/usr/bin")
1416 (string-append "PATH=" (getenv "PATH"))))
1417 (substitute* "test/jtreg/com/sun/javatest/util/SysEnv.java"
1418 (("/usr/bin/env") (which "env")))
1419 (substitute* "openjdk.src/hotspot/test/test_env.sh"
1420 (("/bin/rm") (which "rm"))
1421 (("/bin/cp") (which "cp"))
1422 (("/bin/mv") (which "mv")))
1423 #t))
1424 (add-before 'check 'fix-hotspot-tests
1425 (lambda _
1426 (with-directory-excursion "openjdk.src/hotspot/test/"
1427 (substitute* "jprt.config"
1428 (("PATH=\"\\$\\{path4sdk\\}\"")
1429 (string-append "PATH=" (getenv "PATH")))
1430 (("make=/usr/bin/make")
1431 (string-append "make=" (which "make"))))
1432 (substitute* '("runtime/6626217/Test6626217.sh"
1433 "runtime/7110720/Test7110720.sh")
1434 (("/bin/rm") (which "rm"))
1435 (("/bin/cp") (which "cp"))
1436 (("/bin/mv") (which "mv"))))
1437 #t))
1438 (add-before 'check 'fix-jdk-tests
1439 (lambda _
1440 (with-directory-excursion "openjdk.src/jdk/test/"
1441 (substitute* "com/sun/jdi/JdbReadTwiceTest.sh"
1442 (("/bin/pwd") (which "pwd")))
1443 (substitute* "com/sun/jdi/ShellScaffold.sh"
1444 (("/bin/kill") (which "kill")))
1445 (substitute* "start-Xvfb.sh"
1446 ;;(("/usr/bin/X11/Xvfb") (which "Xvfb"))
1447 (("/usr/bin/nohup") (which "nohup")))
1448 (substitute* "javax/security/auth/Subject/doAs/Test.sh"
1449 (("/bin/rm") (which "rm")))
1450 (substitute* "tools/launcher/MultipleJRE.sh"
1451 (("echo \"#!/bin/sh\"")
1452 (string-append "echo \"#!" (which "rm") "\""))
1453 (("/usr/bin/zip") (which "zip")))
1454 (substitute* "com/sun/jdi/OnThrowTest.java"
1455 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1456 (substitute* "java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java"
1457 (("/usr/bin/uptime") (which "uptime")))
1458 (substitute* "java/lang/ProcessBuilder/Basic.java"
1459 (("/usr/bin/env") (which "env"))
1460 (("/bin/false") (which "false"))
1461 (("/bin/true") (which "true"))
1462 (("/bin/cp") (which "cp"))
1463 (("/bin/sh") (which "sh")))
1464 (substitute* "java/lang/ProcessBuilder/FeelingLucky.java"
1465 (("/bin/sh") (which "sh")))
1466 (substitute* "java/lang/ProcessBuilder/Zombies.java"
1467 (("/usr/bin/perl") (which "perl"))
1468 (("/bin/ps") (which "ps"))
1469 (("/bin/true") (which "true")))
1470 (substitute* "java/lang/Runtime/exec/ConcurrentRead.java"
1471 (("/usr/bin/tee") (which "tee")))
1472 (substitute* "java/lang/Runtime/exec/ExecWithDir.java"
1473 (("/bin/true") (which "true")))
1474 (substitute* "java/lang/Runtime/exec/ExecWithInput.java"
1475 (("/bin/cat") (which "cat")))
1476 (substitute* "java/lang/Runtime/exec/ExitValue.java"
1477 (("/bin/sh") (which "sh"))
1478 (("/bin/true") (which "true"))
1479 (("/bin/kill") (which "kill")))
1480 (substitute* "java/lang/Runtime/exec/LotsOfDestroys.java"
1481 (("/usr/bin/echo") (which "echo")))
1482 (substitute* "java/lang/Runtime/exec/LotsOfOutput.java"
1483 (("/usr/bin/cat") (which "cat")))
1484 (substitute* "java/lang/Runtime/exec/SleepyCat.java"
1485 (("/bin/cat") (which "cat"))
1486 (("/bin/sleep") (which "sleep"))
1487 (("/bin/sh") (which "sh")))
1488 (substitute* "java/lang/Runtime/exec/StreamsSurviveDestroy.java"
1489 (("/bin/cat") (which "cat")))
1490 (substitute* "java/rmi/activation/CommandEnvironment/SetChildEnv.java"
1491 (("/bin/chmod") (which "chmod")))
1492 (substitute* "java/util/zip/ZipFile/Assortment.java"
1493 (("/bin/sh") (which "sh"))))
1494 #t))
1495 (replace 'check
1496 (lambda _
1497 ;; The "make check-*" targets always return zero, so we need to
1498 ;; check for errors in the associated log files to determine
1499 ;; whether any tests have failed.
1500 (use-modules (ice-9 rdelim))
1501 (let* ((error-pattern (make-regexp "^(Error|FAILED):.*"))
1502 (checker (lambda (port)
1503 (let loop ()
1504 (let ((line (read-line port)))
1505 (cond
1506 ((eof-object? line) #t)
1507 ((regexp-exec error-pattern line)
1508 (error "test failed"))
1509 (else (loop)))))))
1510 (run-test (lambda (test)
1511 (invoke "make" test)
1512 (call-with-input-file
1513 (string-append "test/" test ".log")
1514 checker))))
1515 (when #f ; skip tests
1516 (run-test "check-hotspot")
1517 (run-test "check-langtools")
1518 (run-test "check-jdk"))
1519 #t)))
1520 (replace 'install
1521 (lambda* (#:key outputs #:allow-other-keys)
1522 (let ((doc (string-append (assoc-ref outputs "doc")
1523 "/share/doc/icedtea"))
1524 (jre (assoc-ref outputs "out"))
1525 (jdk (assoc-ref outputs "jdk")))
1526 (copy-recursively "openjdk.build/docs" doc)
1527 (copy-recursively "openjdk.build/j2re-image" jre)
1528 (copy-recursively "openjdk.build/j2sdk-image" jdk))
1529 #t))
1530 ;; Some of the libraries in the lib/amd64 folder link to libjvm.so.
1531 ;; But that shared object is located in the server/ folder, so it
1532 ;; cannot be found. This phase creates a symbolic link in the
1533 ;; lib/amd64 folder so that the other libraries can find it.
1534 ;;
1535 ;; See:
1536 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1537 ;;
1538 ;; FIXME: Find the bug in the build system, so that this symlink is
1539 ;; not needed.
1540 (add-after 'install 'install-libjvm
1541 (lambda* (#:key inputs outputs #:allow-other-keys)
1542 (let* ((lib-path (string-append (assoc-ref outputs "out")
1543 ;; See 'INSTALL_ARCH_DIR' in
1544 ;; 'configure'.
1545 ,(match (%current-system)
1546 ("i686-linux"
1547 "/lib/i386")
1548 ("x86_64-linux"
1549 "/lib/amd64")
1550 ("armhf-linux"
1551 "/lib/arm")
1552 ("aarch64-linux"
1553 "/lib/aarch64")
1554 ;; We need a catch-all, dropping
1555 ;; '-linux' works in most cases.
1556 (_
1557 (string-append
1558 "/lib/"
1559 (string-drop-right
1560 (%current-system) 6)))))))
1561 (symlink (string-append lib-path "/server/libjvm.so")
1562 (string-append lib-path "/libjvm.so")))
1563 #t))
1564 ;; By default IcedTea only generates an empty keystore. In order to
1565 ;; be able to use certificates in Java programs we need to generate a
1566 ;; keystore from a set of certificates. For convenience we use the
1567 ;; certificates from the nss-certs package.
1568 (add-after 'install 'install-keystore
1569 (lambda* (#:key inputs outputs #:allow-other-keys)
1570 (let* ((keystore "cacerts")
1571 (certs-dir (string-append (assoc-ref inputs "nss-certs")
1572 "/etc/ssl/certs"))
1573 (keytool (string-append (assoc-ref outputs "jdk")
1574 "/bin/keytool")))
1575 (define (extract-cert file target)
1576 (call-with-input-file file
1577 (lambda (in)
1578 (call-with-output-file target
1579 (lambda (out)
1580 (let loop ((line (read-line in 'concat))
1581 (copying? #f))
1582 (cond
1583 ((eof-object? line) #t)
1584 ((string-prefix? "-----BEGIN" line)
1585 (display line out)
1586 (loop (read-line in 'concat) #t))
1587 ((string-prefix? "-----END" line)
1588 (display line out)
1589 #t)
1590 (else
1591 (when copying? (display line out))
1592 (loop (read-line in 'concat) copying?)))))))))
1593 (define (import-cert cert)
1594 (format #t "Importing certificate ~a\n" (basename cert))
1595 (let ((temp "tmpcert"))
1596 (extract-cert cert temp)
1597 (let ((port (open-pipe* OPEN_WRITE keytool
1598 "-import"
1599 "-alias" (basename cert)
1600 "-keystore" keystore
1601 "-storepass" "changeit"
1602 "-file" temp)))
1603 (display "yes\n" port)
1604 (when (not (zero? (status:exit-val (close-pipe port))))
1605 (format #t "failed to import ~a\n" cert)))
1606 (delete-file temp)))
1607
1608 ;; This is necessary because the certificate directory contains
1609 ;; files with non-ASCII characters in their names.
1610 (setlocale LC_ALL "en_US.utf8")
1611 (setenv "LC_ALL" "en_US.utf8")
1612
1613 (for-each import-cert (find-files certs-dir "\\.pem$"))
1614 (mkdir-p (string-append (assoc-ref outputs "out")
1615 "/lib/security"))
1616 (mkdir-p (string-append (assoc-ref outputs "jdk")
1617 "/jre/lib/security"))
1618
1619 ;; The cacerts files we are going to overwrite are chmod'ed as
1620 ;; read-only (444) in icedtea-8 (which derives from this
1621 ;; package). We have to change this so we can overwrite them.
1622 (chmod (string-append (assoc-ref outputs "out")
1623 "/lib/security/" keystore) #o644)
1624 (chmod (string-append (assoc-ref outputs "jdk")
1625 "/jre/lib/security/" keystore) #o644)
1626
1627 (install-file keystore
1628 (string-append (assoc-ref outputs "out")
1629 "/lib/security"))
1630 (install-file keystore
1631 (string-append (assoc-ref outputs "jdk")
1632 "/jre/lib/security"))
1633 #t))))))
1634 (native-inputs
1635 `(("openjdk-src"
1636 ,(drop "openjdk"
1637 "0l34ikyf62hbzlf9032alzkkqvf7bpmckz4gvirvph755w7gka8l"))
1638 ("corba-drop"
1639 ,(drop "corba"
1640 "050gv2jbg1pi6qkn8w18bwpbklfa5b0kymjvan9pncddbj8m84fz"))
1641 ("jaxp-drop"
1642 ,(drop "jaxp"
1643 "1k6yldwnxfzdg5926r1nlfv8d1r1j7rlp2nkz6gqh05vgyamnfhl"))
1644 ("jaxws-drop"
1645 ,(drop "jaxws"
1646 "110j7jlz47x2gg6f7653x12mssan5kvj9l9h1m1c8c92drfxbqyk"))
1647 ("jdk-drop"
1648 ,(drop "jdk"
1649 "0d1mca38ksxvdskp9im3pp7fdijhj1n3lwq9w13r9s4v3qyskgdd"))
1650 ("langtools-drop"
1651 ,(drop "langtools"
1652 "0nq5236fzxn3p6x8cgncl56mzcmsj07q9gymysnws4c8byc6n0qj"))
1653 ("hotspot-drop"
1654 ,(origin
1655 (method url-fetch)
1656 (uri (string-append
1657 "http://icedtea.classpath.org/downloads/drops"
1658 "/icedtea7/" version "/hotspot.tar.bz2"))
1659 (sha256
1660 (base32
1661 "17bdv39n4lh8l5737c96f3xgamx4y305m067p01cywgp7zaddqws"))
1662 (patches (search-patches
1663 "icedtea-7-hotspot-aarch64-use-c++98.patch"))))
1664 ("ant" ,ant-bootstrap)
1665 ("attr" ,attr)
1666 ("coreutils" ,coreutils)
1667 ("diffutils" ,diffutils) ;for tests
1668 ("gawk" ,gawk)
1669 ("grep" ,grep)
1670 ("libtool" ,libtool)
1671 ("pkg-config" ,pkg-config)
1672 ("wget" ,wget)
1673 ("which" ,which)
1674 ("cpio" ,cpio)
1675 ("zip" ,zip)
1676 ("unzip" ,unzip)
1677 ("fastjar" ,fastjar)
1678 ("libxslt" ,libxslt) ;for xsltproc
1679 ("nss-certs" ,nss-certs)
1680 ("perl" ,perl)
1681 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
1682 ("jdk" ,icedtea-6 "jdk")))
1683 (inputs
1684 `(("alsa-lib" ,alsa-lib)
1685 ("cups" ,cups)
1686 ("libx11" ,libx11)
1687 ("libxcomposite" ,libxcomposite)
1688 ("libxt" ,libxt)
1689 ("libxtst" ,libxtst)
1690 ("libxi" ,libxi)
1691 ("libxinerama" ,libxinerama)
1692 ("libxrender" ,libxrender)
1693 ("libjpeg" ,libjpeg-turbo)
1694 ("libpng" ,libpng)
1695 ("mit-krb5" ,mit-krb5)
1696 ("nss" ,nss)
1697 ("giflib" ,giflib)
1698 ("fontconfig" ,fontconfig)
1699 ("freetype" ,freetype)
1700 ("lcms" ,lcms)
1701 ("zlib" ,zlib)
1702 ("gtk" ,gtk+-2)))
1703 (home-page "http://icedtea.classpath.org")
1704 (synopsis "Java development kit")
1705 (description
1706 "This package provides the Java development kit OpenJDK built with the
1707 IcedTea build harness.")
1708
1709 ;; 'configure' lists "mips" and "mipsel", but not "mips64el'.
1710 (supported-systems (delete "mips64el-linux" %supported-systems))
1711
1712 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1713 ;; same license as both GNU Classpath and OpenJDK.
1714 (license license:gpl2+))))
1715
1716 (define-public icedtea-8
1717 (let* ((version "3.7.0")
1718 (drop (lambda (name hash)
1719 (origin
1720 (method url-fetch)
1721 (uri (string-append
1722 "http://icedtea.classpath.org/download/drops"
1723 "/icedtea8/" version "/" name ".tar.xz"))
1724 (sha256 (base32 hash))))))
1725 (package (inherit icedtea-7)
1726 (version "3.7.0")
1727 (source (origin
1728 (method url-fetch)
1729 (uri (string-append
1730 "http://icedtea.wildebeest.org/download/source/icedtea-"
1731 version ".tar.xz"))
1732 (sha256
1733 (base32
1734 "09yqzn8rpccs7cyv89hhy5zlznpgqw5x3jz0w1ccp0cz1vgs8l5w"))
1735 (modules '((guix build utils)))
1736 (snippet
1737 '(begin
1738 (substitute* '("configure"
1739 "acinclude.m4")
1740 ;; Do not embed build time
1741 (("(DIST_ID=\"Custom build).*$" _ prefix)
1742 (string-append prefix "\"\n"))
1743 ;; Do not leak information about the build host
1744 (("DIST_NAME=\"\\$build_os\"")
1745 "DIST_NAME=\"guix\""))
1746 #t))))
1747 (arguments
1748 `(#:imported-modules
1749 ((guix build ant-build-system)
1750 (guix build syscalls)
1751 ,@%gnu-build-system-modules)
1752
1753 #:disallowed-references ((,icedtea-7 "jdk"))
1754
1755 ,@(substitute-keyword-arguments (package-arguments icedtea-7)
1756 ((#:modules modules)
1757 `((guix build utils)
1758 (guix build gnu-build-system)
1759 ((guix build ant-build-system) #:prefix ant:)
1760 (ice-9 match)
1761 (ice-9 popen)
1762 (srfi srfi-19)
1763 (srfi srfi-26)))
1764 ((#:configure-flags flags)
1765 `(let ((jdk (assoc-ref %build-inputs "jdk")))
1766 `( ;;"--disable-bootstrap"
1767 "--enable-bootstrap"
1768 "--enable-nss"
1769 ,(string-append "--with-parallel-jobs="
1770 (number->string (parallel-job-count)))
1771 "--disable-downloading"
1772 "--disable-system-pcsc"
1773 "--disable-system-sctp"
1774 "--disable-tests" ;they are run in the check phase instead
1775 "--with-openjdk-src-dir=./openjdk.src"
1776 ,(string-append "--with-jdk-home=" jdk))))
1777 ((#:phases phases)
1778 `(modify-phases ,phases
1779 (delete 'fix-x11-extension-include-path)
1780 (delete 'patch-paths)
1781 (delete 'set-additional-paths)
1782 (delete 'patch-patches)
1783 (delete 'patch-bitrot)
1784 ;; Prevent the keytool from recording the current time when
1785 ;; adding certificates at build time.
1786 (add-after 'unpack 'patch-keystore
1787 (lambda _
1788 (substitute* "openjdk.src/jdk/src/share/classes/sun/security/provider/JavaKeyStore.java"
1789 (("date = new Date\\(\\);")
1790 "\
1791 date = (System.getenv(\"SOURCE_DATE_EPOCH\") != null) ?\
1792 new Date(Long.parseLong(System.getenv(\"SOURCE_DATE_EPOCH\"))) :\
1793 new Date();"))
1794 #t))
1795 (add-after 'unpack 'patch-jni-libs
1796 ;; Hardcode dynamically loaded libraries.
1797 (lambda _
1798 (define remove
1799 (@ (srfi srfi-1) remove))
1800
1801 (define (icedtea-or-openjdk? path)
1802 (or (string-contains path "openjdk")
1803 (string-contains path "icedtea")))
1804
1805 (let* ((library-path (remove icedtea-or-openjdk?
1806 (search-path-as-string->list
1807 (getenv "LIBRARY_PATH"))))
1808 (find-library (lambda (name)
1809 (or (search-path
1810 library-path
1811 (string-append "lib" name ".so"))
1812 (string-append "lib" name ".so")))))
1813 (for-each
1814 (lambda (file)
1815 (catch 'decoding-error
1816 (lambda ()
1817 (substitute* file
1818 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
1819 _ name version)
1820 (string-append "\"" (find-library name) "\""))
1821 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
1822 (string-append "\"" (find-library name) "\""))))
1823 (lambda _
1824 ;; Those are safe to skip.
1825 (format (current-error-port)
1826 "warning: failed to substitute: ~a~%"
1827 file))))
1828 (find-files "openjdk.src/jdk/src/solaris/native"
1829 "\\.c|\\.h"))
1830 #t)))
1831 (replace 'install
1832 (lambda* (#:key outputs #:allow-other-keys)
1833 (let ((doc (string-append (assoc-ref outputs "doc")
1834 "/share/doc/icedtea"))
1835 (jre (assoc-ref outputs "out"))
1836 (jdk (assoc-ref outputs "jdk")))
1837 (copy-recursively "openjdk.build/docs" doc)
1838 (copy-recursively "openjdk.build/images/j2re-image" jre)
1839 (copy-recursively "openjdk.build/images/j2sdk-image" jdk)
1840 ;; Install the nss.cfg file to JRE to enable SSL/TLS
1841 ;; support via NSS.
1842 (copy-file (string-append jdk "/jre/lib/security/nss.cfg")
1843 (string-append jre "/lib/security/nss.cfg"))
1844 #t)))
1845 (add-after 'install 'strip-jar-timestamps
1846 (assoc-ref ant:%standard-phases 'strip-jar-timestamps)))))))
1847 (native-inputs
1848 `(("jdk" ,icedtea-7 "jdk")
1849 ("openjdk-src"
1850 ,(drop "openjdk"
1851 "1mj6xgmw31i6qd30qi9dmv7160fbcfq5ikz1jwjihdg2793il19p"))
1852 ("aarch32-drop"
1853 ,(drop "aarch32"
1854 "1wb8k5zm40zld0986dvmlh5xh3gyixbg9h26sl662zy92amhmyyg"))
1855 ("corba-drop"
1856 ,(drop "corba"
1857 "11ma4zz0599cy70xd219v7a8vin7p96xrhhz3wsaw6cjhkzpagah"))
1858 ("jaxp-drop"
1859 ,(drop "jaxp"
1860 "14m1y0z0fbm5z5zjw3vnq85py8dma84bi3f9cw8rhdyc6skk8q4i"))
1861 ("jaxws-drop"
1862 ,(drop "jaxws"
1863 "09andnm6xaasnp963hgx42yiflifiljp9z7z85jrfyc5z8a5whmf"))
1864 ("jdk-drop"
1865 ,(drop "jdk"
1866 "0s6lcpc0zckz2fnq98aqf28nz9y3wbi41a3kyaqqa2abwbkm1zwl"))
1867 ("langtools-drop"
1868 ,(drop "langtools"
1869 "15wizy123vhk40chl1b4p552jf2pw2hdww0myf11qab425axz4nw"))
1870 ("hotspot-drop"
1871 ,(drop "hotspot"
1872 "1ciz1w9j0kz7s1dxdhyqq71nla9icyz6qvn0b9z2zgkklqa98qmm"))
1873 ("nashorn-drop"
1874 ,(drop "nashorn"
1875 "19pzl3ppaw8j6r5cnyp8qiw3hxijh3hdc46l39g5yfhdl4pr4hpa"))
1876 ("shenandoah-drop"
1877 ,(drop "shenandoah"
1878 "0k33anxdzw1icn072wynfmmdjhsv50hay0j1sfkfxny12rb3vgdy"))
1879 ,@(fold alist-delete (package-native-inputs icedtea-7)
1880 '("jdk" "openjdk-src" "corba-drop" "jaxp-drop" "jaxws-drop"
1881 "jdk-drop" "langtools-drop" "hotspot-drop")))))))
1882
1883 (define-public openjdk9
1884 (package
1885 (name "openjdk")
1886 (version "9.181")
1887 (source (origin
1888 (method url-fetch)
1889 (uri "https://hg.openjdk.java.net/jdk/jdk/archive/3cc80be736f2.tar.bz2")
1890 (file-name (string-append name "-" version ".tar.bz2"))
1891 (sha256
1892 (base32
1893 "01ihmyf7k5z17wbr7xig7y40l9f01d5zjgkcmawn1102hw5kchpq"))
1894 (modules '((guix build utils)))
1895 (snippet
1896 `(begin
1897 (for-each delete-file
1898 (find-files "." ".*.(bin|exe|jar)$"))
1899 #t))))
1900 (build-system gnu-build-system)
1901 (outputs '("out" "jdk" "doc"))
1902 (arguments
1903 `(#:tests? #f; require jtreg
1904 #:make-flags '("all")
1905 #:imported-modules
1906 ((guix build syscalls)
1907 ,@%gnu-build-system-modules)
1908
1909 #:disallowed-references (,icedtea-8 (,icedtea-8 "jdk"))
1910
1911 #:phases
1912 (modify-phases %standard-phases
1913 (add-after 'patch-source-shebangs 'fix-java-shebangs
1914 (lambda _
1915 ;; This file was "fixed" by patch-source-shebangs, but it requires
1916 ;; this exact first line.
1917 (substitute* "jdk/make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1918 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
1919 #t))
1920 (replace 'configure
1921 (lambda* (#:key inputs outputs #:allow-other-keys)
1922 ;; TODO: unbundle libpng and lcms
1923 (invoke "bash" "./configure"
1924 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
1925 "--disable-freetype-bundling"
1926 "--disable-warnings-as-errors"
1927 "--disable-hotspot-gtest"
1928 "--with-giflib=system"
1929 "--with-libjpeg=system"
1930 (string-append "--prefix=" (assoc-ref outputs "out")))
1931 #t))
1932 (add-before 'build 'write-source-revision-file
1933 (lambda _
1934 (with-output-to-file ".src-rev"
1935 (lambda _
1936 (display ,version)))
1937 #t))
1938 (replace 'build
1939 (lambda* (#:key make-flags parallel-build? #:allow-other-keys)
1940 (apply invoke "make"
1941 `(,@(if parallel-build?
1942 (list (string-append "JOBS="
1943 (number->string (parallel-job-count))))
1944 '())
1945 ,@make-flags))))
1946 (add-after 'unpack 'patch-jni-libs
1947 ;; Hardcode dynamically loaded libraries.
1948 (lambda _
1949 (define remove
1950 (@ (srfi srfi-1) remove))
1951
1952 (define (icedtea-or-openjdk? path)
1953 (or (string-contains path "openjdk")
1954 (string-contains path "icedtea")))
1955
1956 (let* ((library-path (remove icedtea-or-openjdk?
1957 (search-path-as-string->list
1958 (getenv "LIBRARY_PATH"))))
1959 (find-library (lambda (name)
1960 (or (search-path
1961 library-path
1962 (string-append "lib" name ".so"))
1963 (string-append "lib" name ".so")))))
1964 (for-each
1965 (lambda (file)
1966 (catch 'decoding-error
1967 (lambda ()
1968 (substitute* file
1969 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
1970 _ name version)
1971 (string-append "\"" (find-library name) "\""))
1972 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
1973 (string-append "\"" (find-library name) "\""))))
1974 (lambda _
1975 ;; Those are safe to skip.
1976 (format (current-error-port)
1977 "warning: failed to substitute: ~a~%"
1978 file))))
1979 (find-files "."
1980 "\\.c$|\\.h$"))
1981 #t)))
1982 ;; Some of the libraries in the lib/ folder link to libjvm.so.
1983 ;; But that shared object is located in the server/ folder, so it
1984 ;; cannot be found. This phase creates a symbolic link in the
1985 ;; lib/ folder so that the other libraries can find it.
1986 ;;
1987 ;; See:
1988 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1989 ;;
1990 ;; FIXME: Find the bug in the build system, so that this symlink is
1991 ;; not needed.
1992 (add-after 'install 'install-libjvm
1993 (lambda* (#:key inputs outputs #:allow-other-keys)
1994 (let* ((lib-out (string-append (assoc-ref outputs "out")
1995 "/lib"))
1996 (lib-jdk (string-append (assoc-ref outputs "jdk")
1997 "/lib")))
1998 (symlink (string-append lib-jdk "/server/libjvm.so")
1999 (string-append lib-jdk "/libjvm.so"))
2000 (symlink (string-append lib-out "/server/libjvm.so")
2001 (string-append lib-out "/libjvm.so")))
2002 #t))
2003 (replace 'install
2004 (lambda* (#:key outputs #:allow-other-keys)
2005 (let ((out (assoc-ref outputs "out"))
2006 (jdk (assoc-ref outputs "jdk"))
2007 (doc (assoc-ref outputs "doc"))
2008 (images (car (find-files "build" ".*-server-release"
2009 #:directories? #t))))
2010 (copy-recursively (string-append images "/images/jdk") jdk)
2011 (copy-recursively (string-append images "/images/jre") out)
2012 (copy-recursively (string-append images "/images/docs") doc))
2013 #t))
2014 (add-after 'install 'strip-zip-timestamps
2015 (lambda* (#:key outputs #:allow-other-keys)
2016 (use-modules (guix build syscalls))
2017 (for-each (lambda (zip)
2018 (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
2019 (with-directory-excursion dir
2020 (invoke "unzip" zip))
2021 (delete-file zip)
2022 (for-each (lambda (file)
2023 (let ((s (lstat file)))
2024 (unless (eq? (stat:type s) 'symlink)
2025 (format #t "reset ~a~%" file)
2026 (utime file 0 0 0 0))))
2027 (find-files dir #:directories? #t))
2028 (with-directory-excursion dir
2029 (let ((files (find-files "." ".*" #:directories? #t)))
2030 (apply invoke "zip" "-0" "-X" zip files)))))
2031 (find-files (assoc-ref outputs "doc") ".*.zip$"))
2032 #t)))))
2033 (inputs
2034 `(("alsa-lib" ,alsa-lib)
2035 ("cups" ,cups)
2036 ("fontconfig" ,fontconfig)
2037 ("freetype" ,freetype)
2038 ("giflib" ,giflib)
2039 ("lcms" ,lcms)
2040 ("libelf" ,libelf)
2041 ("libjpeg" ,libjpeg-turbo)
2042 ("libice" ,libice)
2043 ("libpng" ,libpng)
2044 ("libx11" ,libx11)
2045 ("libxcomposite" ,libxcomposite)
2046 ("libxi" ,libxi)
2047 ("libxinerama" ,libxinerama)
2048 ("libxrender" ,libxrender)
2049 ("libxt" ,libxt)
2050 ("libxtst" ,libxtst)))
2051 (native-inputs
2052 `(("icedtea-8" ,icedtea-8)
2053 ("icedtea-8:jdk" ,icedtea-8 "jdk")
2054 ;; XXX: The build system fails with newer versions of GNU Make.
2055 ("make@4.2" ,gnu-make-4.2)
2056 ("unzip" ,unzip)
2057 ("which" ,which)
2058 ("zip" ,zip)))
2059 (home-page "https://openjdk.java.net/projects/jdk9/")
2060 (synopsis "Java development kit")
2061 (description
2062 "This package provides the Java development kit OpenJDK.")
2063 (license license:gpl2+)))
2064
2065 (define-public openjdk10
2066 (package
2067 (inherit openjdk9)
2068 (name "openjdk")
2069 (version "10.46")
2070 (source (origin
2071 (method url-fetch)
2072 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/6fa770f9f8ab.tar.bz2")
2073 (file-name (string-append name "-" version ".tar.bz2"))
2074 (sha256
2075 (base32
2076 "0zywq2203b4hx4jms9vbwvjcj1d3k2v3qpx4s33729fkpmid97r4"))
2077 (patches (search-patches
2078 "openjdk-10-idlj-reproducibility.patch"))
2079 (modules '((guix build utils)))
2080 (snippet
2081 `(begin
2082 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2083 #t))))
2084 (arguments
2085 (substitute-keyword-arguments (package-arguments openjdk9)
2086 ((#:phases phases)
2087 `(modify-phases ,phases
2088 (replace 'fix-java-shebangs
2089 (lambda _
2090 ;; This file was "fixed" by patch-source-shebangs, but it requires
2091 ;; this exact first line.
2092 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
2093 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
2094 #t))
2095 (replace 'configure
2096 (lambda* (#:key inputs outputs #:allow-other-keys)
2097 (invoke "bash" "./configure"
2098 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
2099 "--disable-freetype-bundling"
2100 "--disable-warnings-as-errors"
2101 "--disable-hotspot-gtest"
2102 "--with-giflib=system"
2103 "--with-libjpeg=system"
2104 "--with-native-debug-symbols=zipped"
2105 (string-append "--prefix=" (assoc-ref outputs "out")))
2106 #t))))
2107 ((#:disallowed-references _ '())
2108 `(,openjdk9 (,openjdk9 "jdk")))))
2109 (native-inputs
2110 `(("openjdk9" ,openjdk9)
2111 ("openjdk9:jdk" ,openjdk9 "jdk")
2112 ("make@4.2" ,gnu-make-4.2)
2113 ("unzip" ,unzip)
2114 ("which" ,which)
2115 ("zip" ,zip)))))
2116
2117 (define-public openjdk11
2118 (package
2119 (name "openjdk")
2120 (version "11.28")
2121 (source (origin
2122 (method url-fetch)
2123 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/76072a077ee1.tar.bz2")
2124 (file-name (string-append name "-" version ".tar.bz2"))
2125 (sha256
2126 (base32
2127 "0v705w1s9lrqalzahir78pk397rkk9gfvzq821yv8h3xha0bqi6w"))
2128 (modules '((guix build utils)))
2129 (snippet
2130 `(begin
2131 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2132 #t))))
2133 (build-system gnu-build-system)
2134 (outputs '("out" "jdk" "doc"))
2135 (arguments
2136 `(#:imported-modules ((guix build syscalls)
2137 ,@%gnu-build-system-modules)
2138
2139 #:disallowed-references (,openjdk10 (,openjdk10 "jdk"))
2140
2141 #:tests? #f; requires jtreg
2142 ;; TODO package jtreg
2143 #:configure-flags
2144 `("--disable-option-checking" ; --enable-fast-install default flag errors otherwise
2145 "--disable-warnings-as-errors"
2146 ;; make validate-runpath pass, see: http://issues.guix.info/issue/32894
2147 "--with-native-debug-symbols=zipped"
2148 ;; do not use the bundled libraries
2149 "--with-giflib=system"
2150 "--with-lcms=system"
2151 "--with-libjpeg=system"
2152 "--with-libpng=system"
2153 "--with-version-pre="
2154 ;; allow the build system to locate the system freetype
2155 ,(string-append "--with-freetype-include="
2156 (assoc-ref %build-inputs "freetype") "/include")
2157 ,(string-append "--with-freetype-lib="
2158 (assoc-ref %build-inputs "freetype") "/lib"))
2159 #:phases
2160 (modify-phases %standard-phases
2161 (add-after 'patch-source-shebangs 'fix-java-shebangs
2162 (lambda _
2163 ;; This file was "fixed" by patch-source-shebangs, but it requires
2164 ;; this exact first line.
2165 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
2166 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
2167 #t))
2168 (add-after 'unpack 'patch-jni-libs
2169 ;; Hardcode dynamically loaded libraries.
2170 (lambda _
2171 (define remove
2172 (@ (srfi srfi-1) remove))
2173
2174 (define (icedtea-or-openjdk? path)
2175 (or (string-contains path "openjdk")
2176 (string-contains path "icedtea")))
2177
2178 (let* ((library-path (remove icedtea-or-openjdk?
2179 (search-path-as-string->list
2180 (getenv "LIBRARY_PATH"))))
2181 (find-library (lambda (name)
2182 (or (search-path
2183 library-path
2184 (string-append "lib" name ".so"))
2185 (string-append "lib" name ".so")))))
2186 (for-each
2187 (lambda (file)
2188 (catch 'decoding-error
2189 (lambda ()
2190 (substitute* file
2191 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
2192 _ name version)
2193 (string-append "\"" (find-library name) "\""))
2194 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
2195 (string-append "\"" (find-library name) "\""))))
2196 (lambda _
2197 ;; Those are safe to skip.
2198 (format (current-error-port)
2199 "warning: failed to substitute: ~a~%"
2200 file))))
2201 (find-files "."
2202 "\\.c$|\\.h$"))
2203 #t)))
2204 (add-before 'build 'write-source-revision-file
2205 (lambda _
2206 (with-output-to-file ".src-rev"
2207 (lambda _
2208 (display ,version)))
2209 #t))
2210 (replace 'build
2211 (lambda* (#:key parallel-build? make-flags #:allow-other-keys)
2212 (apply invoke "make" "all"
2213 `(,@(if parallel-build?
2214 (list (string-append "JOBS="
2215 (number->string (parallel-job-count))))
2216 '())
2217 ,@make-flags))))
2218 ;; jdk 11 does not build jre by default any more
2219 ;; building it anyways
2220 ;; for further information see:
2221 ;; https://github.com/AdoptOpenJDK/openjdk-build/issues/356
2222 (add-after 'build 'build-jre
2223 (lambda* (#:key parallel-build? make-flags #:allow-other-keys)
2224 (apply invoke "make" "legacy-jre-image"
2225 `(,@(if parallel-build?
2226 (list (string-append "JOBS="
2227 (number->string (parallel-job-count))))
2228 '())
2229 ,@make-flags))))
2230 (replace 'install
2231 (lambda* (#:key outputs #:allow-other-keys)
2232 (let ((out (assoc-ref outputs "out"))
2233 (jdk (assoc-ref outputs "jdk"))
2234 (doc (assoc-ref outputs "doc"))
2235 (images (car (find-files "build" ".*-server-release"
2236 #:directories? #t))))
2237 (copy-recursively (string-append images "/images/jdk") jdk)
2238 (copy-recursively (string-append images "/images/jre") out)
2239 (copy-recursively (string-append images "/images/docs") doc))
2240 #t))
2241 ;; Some of the libraries in the lib/ folder link to libjvm.so.
2242 ;; But that shared object is located in the server/ folder, so it
2243 ;; cannot be found. This phase creates a symbolic link in the
2244 ;; lib/ folder so that the other libraries can find it.
2245 ;;
2246 ;; See:
2247 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
2248 ;;
2249 ;; FIXME: Find the bug in the build system, so that this symlink is
2250 ;; not needed.
2251 (add-after 'install 'install-libjvm
2252 (lambda* (#:key inputs outputs #:allow-other-keys)
2253 (let* ((lib-out (string-append (assoc-ref outputs "out")
2254 "/lib"))
2255 (lib-jdk (string-append (assoc-ref outputs "jdk")
2256 "/lib")))
2257 (symlink (string-append lib-jdk "/server/libjvm.so")
2258 (string-append lib-jdk "/libjvm.so"))
2259 (symlink (string-append lib-out "/server/libjvm.so")
2260 (string-append lib-out "/libjvm.so")))
2261 #t))
2262 (add-after 'install 'strip-character-data-timestamps
2263 (lambda* (#:key outputs #:allow-other-keys)
2264 (use-modules (guix build syscalls))
2265 (let ((archive (string-append
2266 (assoc-ref outputs "jdk") "/lib/src.zip"))
2267 (dir (mkdtemp! "zip-contents.XXXXXX")))
2268 (with-directory-excursion dir
2269 (invoke "unzip" archive))
2270 (delete-file archive)
2271 (with-directory-excursion dir
2272 (let ((char-data-files (find-files "." "CharacterData.*")))
2273 (for-each (lambda (file)
2274 (substitute* file
2275 (((string-append "This file was generated "
2276 "AUTOMATICALLY from a template "
2277 "file.*"))
2278 (string-append "This file was generated "
2279 "AUTOMATICALLY from a template "
2280 "file"))))
2281 char-data-files)))
2282 (with-directory-excursion dir
2283 (let ((files (find-files "." ".*" #:directories? #t)))
2284 (apply invoke "zip" "-0" "-X" archive files))))))
2285 (add-after 'strip-character-data-timestamps 'strip-archive-timestamps
2286 (lambda* (#:key outputs #:allow-other-keys)
2287 (use-modules (guix build syscalls)
2288 (ice-9 binary-ports)
2289 (rnrs bytevectors))
2290 (letrec ((repack-archive
2291 (lambda (archive)
2292 (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
2293 (with-directory-excursion dir
2294 (invoke "unzip" archive))
2295 (delete-file archive)
2296 (for-each (compose repack-archive canonicalize-path)
2297 (find-files dir "(ct.sym|.*.jar)$"))
2298 (let ((reset-file-timestamp
2299 (lambda (file)
2300 (let ((s (lstat file)))
2301 (unless (eq? (stat:type s) 'symlink)
2302 (format #t "reset ~a~%" file)
2303 (utime file 0 0 0 0))))))
2304 (for-each reset-file-timestamp
2305 (find-files dir #:directories? #t)))
2306 (with-directory-excursion dir
2307 (let ((files (find-files "." ".*" #:directories? #t)))
2308 (apply invoke "zip" "-0" "-X" archive files)))))))
2309 (for-each repack-archive
2310 (find-files (assoc-ref outputs "doc") ".*.zip$"))
2311 (for-each repack-archive
2312 (find-files (assoc-ref outputs "jdk")
2313 ".*.(zip|jar|diz)$"))
2314 (repack-archive (string-append (assoc-ref outputs "jdk") "/lib/ct.sym"))
2315 (let ((repack-jmod
2316 (lambda (file-name)
2317 (call-with-input-file file-name
2318 (lambda (file)
2319 (let ((header #vu8(#x4a #x4d #x01 #x00)))
2320 (if (equal? (get-bytevector-n
2321 file (bytevector-length header))
2322 header)
2323 (let* ((header-length (bytevector-length header))
2324 (temp-file (mkstemp!
2325 (string-copy
2326 "temp-file.XXXXXX")))
2327 (temp-filename (port-filename temp-file))
2328 (content-length
2329 (- (stat:size (stat file))
2330 header-length)))
2331 (sendfile temp-file file content-length header-length)
2332 (delete-file file-name)
2333 (close-port temp-file)
2334 (repack-archive (canonicalize-path temp-filename))
2335 (call-with-output-file file-name
2336 (lambda (file)
2337 (put-bytevector file header)
2338 (call-with-input-file temp-filename
2339 (lambda (temp-file)
2340 (sendfile
2341 file temp-file
2342 (stat:size (stat temp-file)) 0)))))))))))))
2343 (for-each repack-jmod
2344 (find-files (assoc-ref outputs "jdk") ".*.jmod$")))
2345 #t)))
2346 (add-after 'install 'remove-timestamp-from-api-summary
2347 (lambda* (#:key outputs #:allow-other-keys)
2348 (substitute* (string-append (assoc-ref outputs "doc")
2349 "/api/overview-summary.html")
2350 (("Generated by javadoc \\(11-internal\\).*$")
2351 "Generated by javadoc (11-internal) -->\n"))
2352 #t)))))
2353 (inputs
2354 `(("alsa-lib" ,alsa-lib)
2355 ("cups" ,cups)
2356 ("fontconfig" ,fontconfig)
2357 ("freetype" ,freetype)
2358 ("giflib" ,giflib)
2359 ("lcms" ,lcms)
2360 ("libjpeg" ,libjpeg-turbo)
2361 ("libpng" ,libpng)
2362 ("libx11" ,libx11)
2363 ("libxext" ,libxext)
2364 ("libxrender" ,libxrender)
2365 ("libxt" ,libxt)
2366 ("libxtst" ,libxtst)))
2367 (native-inputs
2368 `(("autoconf" ,autoconf)
2369 ("openjdk10" ,openjdk10)
2370 ("openjdk10:jdk" ,openjdk10 "jdk")
2371 ("make" ,gnu-make-4.2)
2372 ("pkg-config" ,pkg-config)
2373 ("unzip" ,unzip)
2374 ("which" ,which)
2375 ("zip" ,zip)))
2376 (home-page "https://openjdk.java.net/projects/jdk/11/")
2377 (synopsis "Java development kit")
2378 (description
2379 "This package provides the Java development kit OpenJDK.")
2380 (license license:gpl2+)))
2381
2382 (define-public openjdk12
2383 (package
2384 (inherit openjdk11)
2385 (name "openjdk")
2386 (version "12.33")
2387 (source (origin
2388 (method url-fetch)
2389 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/0276cba45aac.tar.bz2")
2390 (file-name (string-append name "-" version ".tar.bz2"))
2391 (sha256
2392 (base32
2393 "0mbhdrk12b6878kby0flnbak7444dlpm0ihlmf92vk59y1c02bc2"))
2394 (modules '((guix build utils)))
2395 (snippet
2396 `(begin
2397 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2398 #t))))
2399 (inputs
2400 `(("alsa-lib" ,alsa-lib)
2401 ("cups" ,cups)
2402 ("fontconfig" ,fontconfig)
2403 ("freetype" ,freetype)
2404 ("giflib" ,giflib)
2405 ("lcms" ,lcms)
2406 ("libjpeg" ,libjpeg-turbo)
2407 ("libpng" ,libpng)
2408 ("libx11" ,libx11)
2409 ("libxext" ,libxext)
2410 ("libxrandr" ,libxrandr)
2411 ("libxrender" ,libxrender)
2412 ("libxt" ,libxt)
2413 ("libxtst" ,libxtst)))
2414 (native-inputs
2415 `(("autoconf" ,autoconf)
2416 ("openjdk11" ,openjdk11)
2417 ("openjdk11:jdk" ,openjdk11 "jdk")
2418 ("make@4.2" ,gnu-make-4.2)
2419 ("pkg-config" ,pkg-config)
2420 ("unzip" ,unzip)
2421 ("which" ,which)
2422 ("zip" ,zip)))
2423 (home-page "https://openjdk.java.net/projects/jdk/12")))
2424
2425 (define-public openjdk13
2426 (package
2427 (inherit openjdk12)
2428 (name "openjdk")
2429 (version "13.0")
2430 (source (origin
2431 (method url-fetch)
2432 (uri "http://hg.openjdk.java.net/jdk/jdk13/archive/9c250a7600e1.tar.bz2")
2433 (file-name (string-append name "-" version ".tar.bz2"))
2434 (sha256
2435 (base32
2436 "0v0ljvx5dyzp96dw4z4ksw3pvasil7783mgnmd1wk9gads5ab8iq"))
2437 (modules '((guix build utils)))
2438 (snippet
2439 `(begin
2440 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2441 #t))))
2442 (inputs
2443 `(("alsa-lib" ,alsa-lib)
2444 ("cups" ,cups)
2445 ("fontconfig" ,fontconfig)
2446 ("freetype" ,freetype)
2447 ("giflib" ,giflib)
2448 ("lcms" ,lcms)
2449 ("libjpeg" ,libjpeg-turbo)
2450 ("libpng" ,libpng)
2451 ("libx11" ,libx11)
2452 ("libxext" ,libxext)
2453 ("libxrandr" ,libxrandr)
2454 ("libxrender" ,libxrender)
2455 ("libxt" ,libxt)
2456 ("libxtst" ,libxtst)))
2457 (native-inputs
2458 `(("autoconf" ,autoconf)
2459 ("openjdk12:jdk" ,openjdk12 "jdk")
2460 ("make@4.2" ,gnu-make-4.2)
2461 ("pkg-config" ,pkg-config)
2462 ("unzip" ,unzip)
2463 ("which" ,which)
2464 ("zip" ,zip)))
2465 (home-page "https://openjdk.java.net/projects/jdk/13")))
2466
2467 (define-public openjdk14
2468 (package
2469 (inherit openjdk13)
2470 (name "openjdk")
2471 (version "14.0")
2472 (source (origin
2473 (method url-fetch)
2474 (uri "http://hg.openjdk.java.net/jdk/jdk14/archive/bc54620a3848.tar.bz2")
2475 (file-name (string-append name "-" version ".tar.bz2"))
2476 (sha256
2477 (base32
2478 "0z485pk7r1xpw8004g4nrwrzj17sabgx8yfdbxwfvzkjp8qyajch"))
2479 (modules '((guix build utils)))
2480 (snippet
2481 `(begin
2482 ;; The m4 macro uses 'help' to search for builtins, which is
2483 ;; not available in bash-minimal
2484 (substitute* "make/autoconf/basics.m4"
2485 (("if help") "if command -v"))
2486 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2487 #t))))
2488 (inputs
2489 `(("alsa-lib" ,alsa-lib)
2490 ("cups" ,cups)
2491 ("fontconfig" ,fontconfig)
2492 ("freetype" ,freetype)
2493 ("giflib" ,giflib)
2494 ("lcms" ,lcms)
2495 ("libjpeg" ,libjpeg-turbo)
2496 ("libpng" ,libpng)
2497 ("libx11" ,libx11)
2498 ("libxext" ,libxext)
2499 ("libxrandr" ,libxrandr)
2500 ("libxrender" ,libxrender)
2501 ("libxt" ,libxt)
2502 ("libxtst" ,libxtst)))
2503 (native-inputs
2504 `(("autoconf" ,autoconf)
2505 ("make@4.2" ,gnu-make-4.2)
2506 ("openjdk13:jdk" ,openjdk13 "jdk")
2507 ("pkg-config" ,pkg-config)
2508 ("unzip" ,unzip)
2509 ("which" ,which)
2510 ("zip" ,zip)))
2511 (home-page "https://openjdk.java.net/projects/jdk/14")))
2512
2513 (define-public icedtea icedtea-8)
2514
2515 \f
2516 (define-public ant/java8
2517 (package (inherit ant-bootstrap)
2518 (name "ant")
2519 (version "1.10.10")
2520 (source (origin
2521 (method url-fetch)
2522 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2523 version "-src.tar.gz"))
2524 (sha256
2525 (base32
2526 "1dhkk9ajc378cln6sj9q0ya8bl9dpyji5xcrl1zq41zx1k6j54g5"))
2527 (modules '((guix build utils)))
2528 (snippet
2529 '(begin
2530 (for-each delete-file
2531 (find-files "lib/optional" "\\.jar$"))
2532 #t))))
2533 (arguments
2534 (substitute-keyword-arguments (package-arguments ant-bootstrap)
2535 ((#:phases phases)
2536 `(modify-phases ,phases
2537 (add-after 'unpack 'remove-scripts
2538 ;; Remove bat / cmd scripts for DOS as well as the antRun and runant
2539 ;; wrappers.
2540 (lambda _
2541 (for-each delete-file
2542 (find-files "src/script"
2543 "(.*\\.(bat|cmd)|runant.*|antRun.*)"))
2544 #t))
2545 (replace 'build
2546 (lambda* (#:key inputs outputs #:allow-other-keys)
2547 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
2548
2549 ;; Disable tests to avoid dependency on hamcrest-core, which needs
2550 ;; Ant to build. This is necessary in addition to disabling the
2551 ;; "check" phase, because the dependency on "test-jar" would always
2552 ;; result in the tests to be run.
2553 (substitute* "build.xml"
2554 (("depends=\"jars,test-jar") "depends=\"jars"))
2555 (invoke "bash" "bootstrap.sh"
2556 (string-append "-Ddist.dir="
2557 (assoc-ref outputs "out")))))))))
2558 (native-inputs
2559 `(("jdk" ,icedtea-8 "jdk")
2560 ("zip" ,zip)
2561 ("unzip" ,unzip)))))
2562
2563 ;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x series
2564 ;; requires Java 8.
2565 (define-public ant
2566 (package (inherit ant/java8)
2567 (version "1.9.15")
2568 (source (origin
2569 (method url-fetch)
2570 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2571 version "-src.tar.gz"))
2572 (sha256
2573 (base32
2574 "1xy30f1w5gaqk6g3f0vw7ygix4rb6032qkcw42y4z8wd9jihgygd"))))
2575 (native-inputs
2576 `(("jdk" ,icedtea-7 "jdk")
2577 ("zip" ,zip)
2578 ("unzip" ,unzip)))))
2579
2580 (define-public ant-apache-bcel
2581 (package
2582 (inherit ant/java8)
2583 (name "ant-apache-bcel")
2584 (arguments
2585 (substitute-keyword-arguments (package-arguments ant/java8)
2586 ((#:phases phases)
2587 `(modify-phases ,phases
2588 (add-after 'unpack 'link-bcel
2589 (lambda* (#:key inputs #:allow-other-keys)
2590 (for-each (lambda (file)
2591 (symlink file
2592 (string-append "lib/optional/"
2593 (basename file))))
2594 (find-files (assoc-ref inputs "java-commons-bcel")
2595 "\\.jar$"))
2596 #t))
2597 (add-after 'build 'install
2598 (lambda* (#:key outputs #:allow-other-keys)
2599 (let* ((out (assoc-ref outputs "out"))
2600 (share (string-append out "/share/java"))
2601 (bin (string-append out "/bin"))
2602 (lib (string-append out "/lib")))
2603 (mkdir-p share)
2604 (install-file (string-append lib "/ant-apache-bcel.jar") share)
2605 (delete-file-recursively bin)
2606 (delete-file-recursively lib)
2607 #t)))))))
2608 (inputs
2609 `(("java-commons-bcel" ,java-commons-bcel)
2610 ,@(package-inputs ant/java8)))))
2611
2612 (define-public ant-junit
2613 (package
2614 (inherit ant/java8)
2615 (name "ant-junit")
2616 (arguments
2617 (substitute-keyword-arguments (package-arguments ant/java8)
2618 ((#:phases phases)
2619 `(modify-phases ,phases
2620 (add-after 'unpack 'link-junit
2621 (lambda* (#:key inputs #:allow-other-keys)
2622 (for-each (lambda (file)
2623 (symlink file
2624 (string-append "lib/optional/"
2625 (basename file))))
2626 (find-files (assoc-ref inputs "java-junit")
2627 "\\.jar$"))
2628 #t))
2629 (add-after 'build 'install
2630 (lambda* (#:key outputs #:allow-other-keys)
2631 (let* ((out (assoc-ref outputs "out"))
2632 (share (string-append out "/share/java"))
2633 (bin (string-append out "/bin"))
2634 (lib (string-append out "/lib")))
2635 (mkdir-p share)
2636 (install-file (string-append lib "/ant-junit.jar") share)
2637 (delete-file-recursively bin)
2638 (delete-file-recursively lib)
2639 #t)))))))
2640 (inputs
2641 `(("java-junit" ,java-junit)
2642 ,@(package-inputs ant/java8)))))
2643
2644 (define-public java-openjfx-build
2645 (package
2646 (name "java-openjfx-build")
2647 ;; This is a java-8 version
2648 (version "8.202")
2649 (source (origin
2650 (method hg-fetch)
2651 (uri (hg-reference
2652 (url "http://hg.openjdk.java.net/openjfx/8u-dev/rt")
2653 (changeset (string-append
2654 (string-join (string-split version #\.) "u")
2655 "-ga"))))
2656 (file-name (string-append name "-" version "-checkout"))
2657 (modules '((guix build utils)))
2658 (snippet
2659 '(begin
2660 ;; Delete included gradle jar
2661 (delete-file-recursively "gradle/wrapper")
2662 #t))
2663 (sha256
2664 (base32
2665 "0yg38mwpivswccv9n96k06x3iv82i4px1a9xg9l8dswzwmfj259f"))
2666 (patches (search-patches "java-openjfx-build-jdk_version.patch"))))
2667 (build-system ant-build-system)
2668 (arguments
2669 `(#:jar-name "java-openjfx.jar"
2670 #:source-dir "buildSrc/src/main/java"
2671 #:test-dir "buildSrc/src/test"
2672 #:phases
2673 (modify-phases %standard-phases
2674 (add-before 'configure 'generate-jsl-parser
2675 (lambda _
2676 (invoke "antlr3" "-o"
2677 "buildSrc/src/main/java/com/sun/scenario/effect/compiler"
2678 "buildSrc/src/main/antlr/JSL.g"))))))
2679 (inputs
2680 `(("antlr3" ,antlr3)
2681 ("java-stringtemplate" ,java-stringtemplate)))
2682 (native-inputs
2683 `(("java-junit" ,java-junit)
2684 ("java-hamcrest-core" ,java-hamcrest-core)))
2685 (home-page "https://openjfx.io")
2686 (synopsis "Graphical application toolkit in Java")
2687 (description "OpenJFX is a client application platform for desktop,
2688 mobile and embedded systems built on Java. Its goal is to produce a
2689 modern, efficient, and fully featured toolkit for developing rich client
2690 applications. This package contains base classes for the OpenJFX
2691 distribution and helper classes for building other parts of the
2692 distribution.")
2693 (license license:gpl2))) ;gpl2 only, with classpath exception
2694
2695 (define-public java-openjfx-base
2696 (package (inherit java-openjfx-build)
2697 (name "java-openjfx-base")
2698 (arguments
2699 `(#:jar-name "java-openjfx-base.jar"
2700 #:source-dir "modules/base/src/main/java:modules/base/src/main/java8:modules/base/src/main/version-info"
2701 #:test-dir "modules/base/src/test"
2702 #:phases
2703 (modify-phases %standard-phases
2704 (add-before 'check 'remove-empty-file
2705 (lambda _
2706 (with-directory-excursion "modules/base/src/test/java"
2707 ;; These files are completely commented, but junit expects them to
2708 ;; contain a class, so tests fail.
2709 (delete-file
2710 "com/sun/javafx/property/adapter/PropertyDescriptorTest.java")
2711 (delete-file
2712 "com/sun/javafx/property/adapter/ReadOnlyPropertyDescriptorTest.java")
2713 (delete-file "javafx/beans/property/PropertiesTest.java")
2714 (delete-file
2715 "javafx/beans/property/adapter/ReadOnlyJavaBeanPropertyBuilder_General_Test.java")
2716 ;; This one fails
2717 (delete-file "com/sun/javafx/runtime/VersionInfoTest.java"))
2718 #t)))))
2719 (propagated-inputs
2720 `(("java-openjfx-build" ,java-openjfx-build)))
2721 (description "OpenJFX is a client application platform for desktop,
2722 mobile and embedded systems built on Java. Its goal is to produce a
2723 modern, efficient, and fully featured toolkit for developing rich client
2724 applications. This package contains base classes for the OpenJFX
2725 distribution.")))
2726
2727 (define-public java-openjfx-graphics
2728 (package (inherit java-openjfx-build)
2729 (name "java-openjfx-graphics")
2730 (arguments
2731 `(#:jar-name "java-openjfx-graphics.jar"
2732 #:source-dir "modules/graphics/src/main/java"
2733 #:tests? #f; require X
2734 #:test-dir "modules/graphics/src/test"
2735 #:phases
2736 (modify-phases %standard-phases
2737 (add-after 'unpack 'copy-missing-file
2738 (lambda* (#:key inputs #:allow-other-keys)
2739 (let ((target "modules/graphics/src/main/native-prism-sw/JNativeSurface.c"))
2740 (copy-file (assoc-ref inputs "JNativeSurface.c") target)
2741 ;; XXX: looks like the missing file we found isn't *quite*
2742 ;; compatible...
2743 (substitute* target
2744 (("case TYPE_INT_ARGB:") "")))))
2745 (add-after 'build 'build-native
2746 (lambda* (#:key inputs outputs #:allow-other-keys)
2747 (let ((jdk (assoc-ref inputs "jdk"))
2748 (class-file->class-name
2749 (lambda (class-file)
2750 (string-map (lambda (c)
2751 (if (char=? c #\/) #\. c))
2752 (string-drop-right class-file
2753 (string-length ".class"))))))
2754 (setenv "CPPFLAGS"
2755 (string-append "-DINLINE=inline "
2756 "-DLINUX "
2757 "-I" jdk "/include "
2758 "-I" jdk "/include/linux "
2759 "-I " (getcwd) "/build/classes/include "
2760 "-I " (getcwd) "/modules/graphics/src/main/native-prism-sw"))
2761
2762 ;; Instructions have been adapted from buildSrc/linux.gradle
2763 (with-directory-excursion "build/classes"
2764 ;; Build prism
2765 (mkdir-p "include")
2766
2767 ;; Generate headers for prism
2768 (apply invoke "javah" "-d" "include" "-cp" "."
2769 (map class-file->class-name
2770 (append (find-files "com/sun/prism/impl" "\\.class$")
2771 (find-files "com/sun/prism" "PresentableState.*\\.class$"))))
2772
2773 ;; ...then for prism_sw
2774 (apply invoke "javah" "-d" "include" "-cp" "."
2775 (map class-file->class-name
2776 (find-files "com/sun/pisces" "\\.class$")))
2777
2778 ;; ...and for prism_es2
2779 (apply invoke "javah" "-d" "include" "-cp" "."
2780 (map class-file->class-name
2781 (find-files "com/sun/prism/es2" "\\.class$")))))
2782
2783 (with-directory-excursion "netbeans/native-prism"
2784 (invoke "make" "CONF=Release"))
2785 (with-directory-excursion "netbeans/native-prism-sw"
2786 (invoke "make" "CONF=Release"))
2787 ;; TODO: This fails due to unknown EGL procedure names
2788 #;
2789 (with-directory-excursion "netbeans/native-prism-es2"
2790 (invoke "make" "CONF=Release"))
2791
2792 (let* ((out (assoc-ref outputs "out"))
2793 (dir ,(match (%current-system)
2794 ("i686-linux"
2795 "i386")
2796 ((or "armhf-linux" "aarch64-linux")
2797 "arm")
2798 ((or "x86_64-linux")
2799 "amd64")
2800 (_ "unknown")))
2801 (target (string-append out "/share/" dir "/")))
2802 (mkdir-p target)
2803 (for-each (lambda (file)
2804 (let ((new-name
2805 (string-append "lib"
2806 (string-map
2807 (lambda (c)
2808 (if (char=? c #\-) #\_ c))
2809 (string-drop (basename file)
2810 (string-length "libnative-"))))))
2811 (copy-file file
2812 (string-append target new-name))))
2813 (find-files "netbeans" "\\.so$"))))))))
2814 (propagated-inputs
2815 `(("java-openjfx-base" ,java-openjfx-base)
2816 ("java-swt" ,java-swt)))
2817 ;; XXX: for unknown reasons
2818 ;; modules/graphics/src/main/native-prism-sw/JNativeSurface.c is missing
2819 ;; in this revision.
2820 (native-inputs
2821 `(("JNativeSurface.c"
2822 ,(origin
2823 (method url-fetch)
2824 (uri "https://raw.githubusercontent.com/openjdk/jfx/8u20-b02\
2825 /modules/graphics/src/main/native-prism-sw/JNativeSurface.c")
2826 (sha256
2827 (base32
2828 "1kp15wbnd6rn0nciczp5ibq0ikby2yysvx1gnz5fa05vl2mm8mbm"))))))
2829 (description "OpenJFX is a client application platform for desktop,
2830 mobile and embedded systems built on Java. Its goal is to produce a
2831 modern, efficient, and fully featured toolkit for developing rich client
2832 applications. This package contains graphics-related classes for the
2833 OpenJFX distribution.")))
2834
2835 (define-public java-openjfx-media
2836 (package (inherit java-openjfx-build)
2837 (name "java-openjfx-media")
2838 (propagated-inputs
2839 `(("java-openjxf-graphics" ,java-openjfx-graphics)))
2840 (arguments
2841 `(#:jar-name "java-openjfx-media.jar"
2842 #:source-dir "modules/media/src/main/java"
2843 #:tests? #f)); no tests
2844 (description "OpenJFX is a client application platform for desktop,
2845 mobile and embedded systems built on Java. Its goal is to produce a
2846 modern, efficient, and fully featured toolkit for developing rich client
2847 applications. This package contains media-related classes for the
2848 OpenJFX distribution.")))
2849
2850 (define-public java-openjfx-controls
2851 (package (inherit java-openjfx-build)
2852 (name "java-openjfx-controls")
2853 (propagated-inputs
2854 `(("java-openjxf-graphics" ,java-openjfx-graphics)))
2855 (arguments
2856 `(#:jar-name "java-openjfx-controls.jar"
2857 #:source-dir "modules/controls/src/main/java"
2858 #:test-dir "modules/controls/src/test"
2859 ;; TODO: tests require com.sun.javafx.pgstub,
2860 ;; javafx.collections.MockSetObserver, and
2861 ;; com.sun.javafx.binding.ExpressionHelperUtility
2862 #:tests? #false
2863 #:phases
2864 (modify-phases %standard-phases
2865 (add-after 'unpack 'copy-resources
2866 (lambda _
2867 (copy-recursively "modules/controls/src/test/resources"
2868 "build/test-classes")
2869 (copy-recursively "modules/controls/src/main/resources"
2870 "build/classes"))))))
2871 (description "OpenJFX is a client application platform for desktop,
2872 mobile and embedded systems built on Java. Its goal is to produce a
2873 modern, efficient, and fully featured toolkit for developing rich client
2874 applications. This package contains UI control classes for the
2875 OpenJFX distribution.")))
2876
2877 (define-public javacc-4
2878 (package
2879 (name "javacc")
2880 (version "4.1")
2881 (source (origin
2882 (method git-fetch)
2883 (uri (git-reference
2884 (url "https://github.com/javacc/javacc")
2885 (commit "release_41")))
2886 (file-name (string-append "javacc-" version "-checkout"))
2887 (sha256
2888 (base32
2889 "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0"))
2890 (modules '((guix build utils)))
2891 ;; delete bundled jars
2892 (snippet '(begin (delete-file-recursively "lib") #t))))
2893 (build-system ant-build-system)
2894 ;; Tests fail with
2895 ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60:
2896 ;; JAVACODE failed
2897 (arguments
2898 `(#:tests? #f
2899 #:phases
2900 (modify-phases %standard-phases
2901 ;; Delete tests to avoid build failure (we don't run them anyway).
2902 (add-after 'unpack 'delete-tests
2903 (lambda _
2904 (for-each delete-file
2905 '("src/org/javacc/JavaCCTestCase.java"
2906 "src/org/javacc/parser/ExpansionTest.java"
2907 "src/org/javacc/parser/OptionsTest.java"
2908 "src/org/javacc/jjtree/JJTreeOptionsTest.java"))
2909 (for-each delete-file-recursively
2910 '("src/org/javacc/parser/test"
2911 "src/org/javacc/jjdoc/test"))
2912 #t))
2913 (replace 'install (install-jars "bin/lib")))))
2914 (home-page "https://javacc.org/")
2915 (synopsis "Java parser generator")
2916 (description "Java Compiler Compiler (JavaCC) is the most popular parser
2917 generator for use with Java applications. A parser generator is a tool that
2918 reads a grammar specification and converts it to a Java program that can
2919 recognize matches to the grammar. In addition to the parser generator itself,
2920 JavaCC provides other standard capabilities related to parser generation such
2921 as tree building (via a tool called JJTree included with JavaCC), actions,
2922 debugging, etc.")
2923 (license license:bsd-3)))
2924
2925 ;; javacc-3, as javacc-4 is not properly bootstrapped: is contains a javacc.jar
2926 ;; in the bootstrap/ directory.
2927 (define-public javacc-3
2928 (package
2929 (inherit javacc-4)
2930 (version "3.2")
2931 (source (origin
2932 (method git-fetch)
2933 (uri (git-reference
2934 (url "https://github.com/javacc/javacc")
2935 (commit "release_32")))
2936 (file-name (string-append "javacc-" version "-checkout"))
2937 (sha256
2938 (base32
2939 "1pyf1xyh8gk83nxqn2v2mdws32l68ydznha41cxa4l2kkbq1v1g3"))))
2940 (arguments
2941 `(#:tests? #f
2942 #:phases
2943 (modify-phases %standard-phases
2944 (add-before 'build 'set-java-version
2945 (lambda _
2946 (for-each
2947 (lambda (file)
2948 (substitute* file
2949 (("debug=") "source=\"1.4\" debug=")))
2950 (find-files "." "build.xml"))
2951 #t))
2952 (replace 'install (install-jars "bin/lib")))))))
2953
2954 (define-public javacc
2955 (package
2956 (inherit javacc-4)
2957 (version "7.0.4")
2958 (source
2959 (origin
2960 (method git-fetch)
2961 (uri (git-reference
2962 (url "https://github.com/javacc/javacc")
2963 (commit version)))
2964 (file-name (git-file-name "javacc" version))
2965 (sha256
2966 (base32 "18kkak3gda93gr25jrgy6q00g0jr8i24ri2wk4kybz1v234fxx9i"))
2967 (modules '((guix build utils)))
2968 ;; Delete bundled jars.
2969 (snippet '(begin (for-each delete-file-recursively
2970 '("bootstrap" "lib"))
2971 #t))))
2972 (arguments
2973 `(#:make-flags ; bootstrap from javacc-4
2974 (list (string-append "-Dbootstrap-jar="
2975 (assoc-ref %build-inputs "javacc")
2976 "/share/java/javacc.jar"))
2977 #:test-target "test"
2978 #:phases
2979 (modify-phases %standard-phases
2980 (replace 'install (install-jars "target"))
2981 (add-after 'install 'install-bin
2982 (lambda* (#:key outputs inputs #:allow-other-keys)
2983 (let* ((out (assoc-ref outputs "out"))
2984 (dir (string-append out "/share/java"))
2985 (bin (string-append out "/bin"))
2986 (javacc (string-append bin "/javacc")))
2987 (mkdir-p bin)
2988 (with-output-to-file javacc
2989 (lambda _
2990 (display
2991 (string-append "#!/bin/sh\n"
2992 (assoc-ref inputs "jdk") "/bin/java"
2993 " -cp " dir "/javacc.jar" " `basename $0`" " $*"))))
2994 (chmod javacc #o755)
2995 ;; symlink to different names to affect the first argument and
2996 ;; change the behavior of the jar file.
2997 (symlink javacc (string-append bin "/jjdoc"))
2998 (symlink javacc (string-append bin "/jjtree"))
2999 #t))))))
3000
3001 (native-inputs
3002 `(("javacc" ,javacc-4)))))
3003
3004 ;; This is the last 3.x release of ECJ
3005 (define-public java-ecj-3
3006 (package
3007 (name "java-ecj")
3008 (version "3.8.2")
3009 (source (origin
3010 (method url-fetch)
3011 (uri (string-append "http://archive.eclipse.org/eclipse/"
3012 "downloads/drops/R-" version
3013 "-201301310800/ecjsrc-" version ".jar"))
3014 (sha256
3015 (base32
3016 "01mdj14jw11g1jfnki4fi8229p0c6zzckd38zqy2w4m3cjcvsx04"))))
3017 (build-system ant-build-system)
3018 (arguments
3019 `(#:tests? #f ; none included
3020 #:jdk ,icedtea-7 ; doesn't build with JDK8+
3021 #:make-flags (list "-f" "src/build.xml")
3022 #:build-target "build"
3023 #:phases
3024 (modify-phases %standard-phases
3025 (add-after 'unpack 'fix-manifest
3026 (lambda _
3027 ;; Record the main class to make ecj executable.
3028 (with-atomic-file-replacement "src/META-INF/MANIFEST.MF"
3029 (lambda (in out)
3030 (display "Manifest-Version: 1.0
3031 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
3032 out)))
3033 #t))
3034 (replace 'install (install-jars ".")))))
3035 (home-page "https://eclipse.org")
3036 (synopsis "Eclipse Java development tools core batch compiler")
3037 (description "This package provides the Eclipse Java core batch compiler.")
3038 (license license:epl1.0)))
3039
3040 ;; This is needed for java-cisd-args4j
3041 (define-public java-ecj-3.5
3042 (package (inherit java-ecj-3)
3043 (version "3.5.1")
3044 (source (origin
3045 (method url-fetch/zipbomb)
3046 (uri (string-append "http://archive.eclipse.org/eclipse/"
3047 "downloads/drops/R-" version
3048 "-200909170800/ecjsrc-" version ".zip"))
3049 (sha256
3050 (base32
3051 "1vnl2mavisc567bip736xzsvvbjif5279wc4a7pbdik5wlir8qr7"))))
3052 (build-system ant-build-system)
3053 (arguments
3054 `(#:tests? #f ; none included
3055 #:jdk ,icedtea-7 ; doesn't build with JDK8+
3056 #:build-target "build"
3057 #:phases
3058 (modify-phases %standard-phases
3059 (add-after 'unpack 'fix-manifest
3060 (lambda _
3061 ;; Record the main class to make ecj executable.
3062 (with-atomic-file-replacement "META-INF/MANIFEST.MF"
3063 (lambda (in out)
3064 (dump-port in out)
3065 (display "Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
3066 out)))
3067 #t))
3068 (replace 'install (install-jars ".")))))
3069 (native-inputs
3070 `(("unzip" ,unzip)))))
3071
3072 (define-public java-ecj
3073 (package (inherit java-ecj-3)
3074 (version "4.6.3")
3075 (source
3076 (origin
3077 (method url-fetch)
3078 (uri (string-append
3079 "http://archive.eclipse.org/eclipse/downloads/drops4/R-"
3080 version
3081 "-201703010400/ecjsrc-"
3082 version
3083 ".jar"))
3084 (sha256
3085 (base32
3086 "11cfgsdgznja1pvlxkjbqykxd7pcd5655vkm7s44xmahmap15gpl"))))
3087 (arguments
3088 `(#:tests? #f ; none included
3089 #:build-target "build"
3090 #:phases
3091 (modify-phases %standard-phases
3092 (add-after 'unpack 'fix-build.xml
3093 (lambda _
3094 (substitute* "src/build.xml"
3095 (("^.*MANIFEST.*$")
3096 ""))
3097 #t))
3098 (add-after 'unpack 'fix-prop
3099 (lambda _
3100 (substitute* "src/build.xml"
3101 (("^.*properties.*$")
3102 "<include name=\"**/*.properties\"/>
3103 <include name=\"**/*.props\"/>"))
3104 #t))
3105 (add-before 'build 'chdir
3106 (lambda _
3107 (chdir "src")
3108 #t))
3109 (replace 'install (install-jars ".")))))))
3110
3111 (define-public java-cisd-base
3112 (let ((revision 38938)
3113 (base-version "14.12.0"))
3114 (package
3115 (name "java-cisd-base")
3116 (version (string-append base-version "-" (number->string revision)))
3117 (source (origin
3118 (method svn-fetch)
3119 (uri (svn-reference
3120 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3121 "base/tags/release/"
3122 (version-major+minor base-version)
3123 ".x/" base-version "/base/"))
3124 (revision revision)))
3125 (file-name (string-append "java-cisd-base-" version "-checkout"))
3126 (sha256
3127 (base32
3128 "1i5adyf7nzclb0wydgwa1az04qliid8035vpahaandmkmigbnxiy"))
3129 (modules '((guix build utils)))
3130 (snippet
3131 '(begin
3132 ;; Delete included gradle jar
3133 (delete-file-recursively "gradle/wrapper")
3134 ;; Delete pre-built native libraries
3135 (delete-file-recursively "libs")
3136 #t))))
3137 (build-system ant-build-system)
3138 (arguments
3139 `(#:make-flags '("-file" "build/build.xml")
3140 #:test-target "jar-test"
3141 #:jdk ,icedtea-8
3142 #:phases
3143 (modify-phases %standard-phases
3144 (add-after 'unpack 'unpack-build-resources
3145 (lambda* (#:key inputs #:allow-other-keys)
3146 (copy-recursively (assoc-ref inputs "build-resources")
3147 "../build_resources")
3148 #t))
3149 (add-after 'unpack-build-resources 'fix-dependencies
3150 (lambda* (#:key inputs #:allow-other-keys)
3151 (substitute* "build/build.xml"
3152 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
3153 (string-append (assoc-ref inputs "java-testng")
3154 "/share/java/java-testng.jar"))
3155 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
3156 (string-append (assoc-ref inputs "java-commons-lang")
3157 "/share/java/commons-lang-"
3158 ,(package-version java-commons-lang) ".jar"))
3159 (("\\$\\{lib\\}/commons-io/commons-io.jar")
3160 (string-append (assoc-ref inputs "java-commons-io")
3161 "/lib/m2/commons-io/commons-io/"
3162 ,(package-version java-commons-io)
3163 "/commons-io-"
3164 ,(package-version java-commons-io)
3165 ".jar"))
3166 ;; Remove dependency on svn
3167 (("<build-info.*") "")
3168 (("\\$\\{revision.number\\}")
3169 ,(number->string revision))
3170 (("\\$\\{version.number\\}") ,base-version))
3171 ;; Remove dependency on classycle
3172 (substitute* "../build_resources/ant/build-common.xml"
3173 (("<taskdef name=\"dependency-checker.*") "")
3174 (("classname=\"classycle.*") "")
3175 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
3176 #t))
3177 ;; A few tests fail because of the lack of a proper /etc/groups and
3178 ;; /etc/passwd file in the build container.
3179 (add-after 'unpack 'disable-broken-tests
3180 (lambda _
3181 (substitute* "sourceTest/java/ch/systemsx/cisd/base/AllTests.java"
3182 (("Unix.isOperational\\(\\)") "false"))
3183 #t))
3184 ;; These decorators are almost useless and pull in an unpackaged
3185 ;; dependency.
3186 (add-after 'unpack 'remove-useless-decorators
3187 (lambda _
3188 (substitute* "source/java/ch/systemsx/cisd/base/unix/Unix.java"
3189 (("@Private") "")
3190 (("import ch.rinn.restrictions.Private;") ""))
3191 (substitute* "sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java"
3192 (("@Friend.*") "")
3193 (("import ch.rinn.restrictions.Friend;") ""))
3194 #t))
3195 (add-before 'configure 'build-native-code
3196 (lambda* (#:key inputs #:allow-other-keys)
3197 (let ((jdk (assoc-ref inputs "jdk"))
3198 (dir ,(match (%current-system)
3199 ("i686-linux"
3200 "i386-Linux")
3201 ((or "armhf-linux" "aarch64-linux")
3202 "arm-Linux")
3203 ((or "x86_64-linux")
3204 "amd64-Linux")
3205 (_ "unknown-Linux"))))
3206 (with-directory-excursion "source/c"
3207 (invoke "gcc" "-shared" "-O3" "-fPIC" "unix.c"
3208 (string-append "-I" jdk "/include")
3209 (string-append "-I" jdk "/include/linux")
3210 "-o" "libunix.so")
3211 (invoke "gcc" "-shared" "-O3" "-fPIC"
3212 "-DMACHINE_BYTE_ORDER=1"
3213 "copyCommon.c"
3214 "copyByteChar.c"
3215 "copyByteDouble.c"
3216 "copyByteFloat.c"
3217 "copyByteInt.c"
3218 "copyByteLong.c"
3219 "copyByteShort.c"
3220 (string-append "-I" jdk "/include")
3221 (string-append "-I" jdk "/include/linux")
3222 "-o" "libnativedata.so"))
3223 (install-file "source/c/libunix.so"
3224 (string-append "libs/native/unix/" dir))
3225 (install-file "source/c/libnativedata.so"
3226 (string-append "libs/native/nativedata/" dir))
3227 #t)))
3228 ;; In the "check" phase we only build the test executable.
3229 (add-after 'check 'run-tests
3230 (lambda _
3231 (invoke "java" "-jar" "targets/dist/sis-base-test.jar")
3232 (delete-file "targets/dist/sis-base-test.jar")
3233 #t))
3234 (replace 'install (install-jars "targets/dist")))))
3235 (native-inputs
3236 `(("jdk" ,icedtea-8)
3237 ("java-commons-lang" ,java-commons-lang)
3238 ("java-commons-io" ,java-commons-io)
3239 ("java-testng" ,java-testng)
3240 ("build-resources"
3241 ,(origin
3242 (method svn-fetch)
3243 (uri (svn-reference
3244 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3245 "base/tags/release/"
3246 (version-major+minor base-version)
3247 ".x/" base-version
3248 "/build_resources/"))
3249 (revision revision)))
3250 (sha256
3251 (base32
3252 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
3253 (home-page "http://svnsis.ethz.ch")
3254 (synopsis "Utility classes for libraries from ETH Zurich")
3255 (description "This library supplies some utility classes needed for
3256 libraries from the SIS division at ETH Zurich like jHDF5.")
3257 ;; The C sources are under a non-copyleft license, which looks like a
3258 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
3259 (license (list license:asl2.0
3260 (license:non-copyleft "file://source/c/COPYING"))))))
3261
3262 (define-public java-cisd-args4j
3263 (let ((revision 39162)
3264 (base-version "9.11.2"))
3265 (package
3266 (name "java-cisd-args4j")
3267 (version (string-append base-version "-" (number->string revision)))
3268 (source (origin
3269 (method svn-fetch)
3270 (uri (svn-reference
3271 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3272 "args4j/tags/release/"
3273 (version-major+minor base-version)
3274 ".x/" base-version "/args4j/"))
3275 (revision revision)))
3276 (file-name (string-append "java-cisd-args4j-" version "-checkout"))
3277 (sha256
3278 (base32
3279 "0hhqznjaivq7ips7mkwas78z42s6djsm20rrs7g1zd59rcsakxn2"))))
3280 (build-system ant-build-system)
3281 (arguments
3282 `(#:make-flags '("-file" "build/build.xml")
3283 #:tests? #f ; there are no tests
3284 ;; There are weird build failures with JDK8, such as: "The type
3285 ;; java.io.ObjectInputStream cannot be resolved. It is indirectly
3286 ;; referenced from required .class files"
3287 #:jdk ,icedtea-7
3288 #:modules ((guix build ant-build-system)
3289 (guix build utils)
3290 (guix build java-utils)
3291 (sxml simple)
3292 (sxml transform)
3293 (sxml xpath))
3294 #:phases
3295 (modify-phases %standard-phases
3296 (add-after 'unpack 'unpack-build-resources
3297 (lambda* (#:key inputs #:allow-other-keys)
3298 (mkdir-p "../build_resources")
3299 (invoke "tar" "xf" (assoc-ref inputs "build-resources")
3300 "-C" "../build_resources"
3301 "--strip-components=1")
3302 (mkdir-p "../build_resources/lib")
3303 #t))
3304 (add-after 'unpack-build-resources 'fix-dependencies
3305 (lambda* (#:key inputs #:allow-other-keys)
3306 ;; FIXME: There should be a more convenient abstraction for
3307 ;; editing XML files.
3308 (with-directory-excursion "../build_resources/ant/"
3309 (chmod "build-common.xml" #o664)
3310 (call-with-output-file "build-common.xml.new"
3311 (lambda (port)
3312 (sxml->xml
3313 (pre-post-order
3314 (with-input-from-file "build-common.xml"
3315 (lambda _ (xml->sxml #:trim-whitespace? #t)))
3316 `(;; Remove dependency on classycle and custom ant tasks
3317 (taskdef . ,(lambda (tag . kids)
3318 (let ((name ((sxpath '(name *text*)) kids)))
3319 (if (or (member "build-info" name)
3320 (member "dependency-checker" name)
3321 (member "build-java-subprojects" name)
3322 (member "project-classpath" name))
3323 '() ; skip
3324 `(,tag ,@kids)))))
3325 (typedef . ,(lambda (tag . kids)
3326 (let ((name ((sxpath '(name *text*)) kids)))
3327 (if (member "recursive-jar" name)
3328 '() ; skip
3329 `(,tag ,@kids)))))
3330 (build-java-subprojects . ,(lambda _ '()))
3331 ;; Ignore everything else
3332 (*default* . ,(lambda (tag . kids) `(,tag ,@kids)))
3333 (*text* . ,(lambda (_ txt) txt))))
3334 port)))
3335 (rename-file "build-common.xml.new" "build-common.xml"))
3336 (substitute* "build/build.xml"
3337 (("\\$\\{lib\\}/cisd-base/cisd-base.jar")
3338 (string-append (assoc-ref inputs "java-cisd-base")
3339 "/share/java/sis-base.jar"))
3340 ;; Remove dependency on svn
3341 (("<build-info.*") "")
3342 (("\\$\\{revision.number\\}")
3343 ,(number->string revision))
3344 (("\\$\\{version.number\\}") ,base-version)
3345 ;; Don't use custom ant tasks.
3346 (("recursive-jar") "jar")
3347 (("<project-classpath.*") ""))
3348 #t))
3349 (replace 'install (install-jars "targets/dist")))))
3350 (inputs
3351 `(("java-cisd-base" ,java-cisd-base)))
3352 (native-inputs
3353 `(("ecj" ,java-ecj-3.5)
3354 ("build-resources"
3355 ,(origin
3356 (method svn-fetch)
3357 (uri (svn-reference
3358 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3359 "args4j/tags/release/"
3360 (version-major+minor base-version)
3361 ".x/" base-version
3362 "/build_resources/"))
3363 (revision revision)))
3364 (sha256
3365 (base32
3366 "056cam4k8pll7ass31sy6gwn8g8719njc41yf4l02b0342nilkyf"))
3367 (modules '((guix build utils)))
3368 ;; Delete bundled pre-built jars.
3369 (snippet
3370 '(begin (delete-file-recursively "lib/") #t))))))
3371 (home-page "http://svnsis.ethz.ch")
3372 (synopsis "Command line parser library")
3373 (description "This package provides a parser for command line arguments.")
3374 (license license:asl2.0))))
3375
3376 (define-public java-cisd-jhdf5
3377 (let ((revision 39162)
3378 (base-version "14.12.6"))
3379 (package
3380 (name "java-cisd-jhdf5")
3381 (version (string-append base-version "-" (number->string revision)))
3382 (source (origin
3383 (method svn-fetch)
3384 (uri (svn-reference
3385 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3386 "jhdf5/tags/release/"
3387 (version-major+minor base-version)
3388 ".x/" base-version "/jhdf5/"))
3389 (revision revision)))
3390 (file-name (string-append "java-cisd-jhdf5-" version "-checkout"))
3391 (sha256
3392 (base32
3393 "13i17s2hn0q9drdqvp8csy7770p3hdbh9rp30ihln2ldkfawdmz0"))
3394 (modules '((guix build utils)))
3395 (snippet
3396 '(begin
3397 ;; Delete included gradle jar
3398 (delete-file-recursively "gradle/wrapper")
3399 ;; Delete pre-built native libraries
3400 (delete-file-recursively "libs")
3401 #t))))
3402 (build-system ant-build-system)
3403 (arguments
3404 `(#:make-flags '("-file" "build/build.xml")
3405 #:build-target "jar-all"
3406 #:test-target "jar-test"
3407 #:jdk ,icedtea-8
3408 #:phases
3409 (modify-phases %standard-phases
3410 ;; FIXME: this build phase fails.
3411 (delete 'generate-jar-indices)
3412 ;; Don't erase results from the build phase when building tests.
3413 (add-after 'unpack 'separate-test-target-from-clean
3414 (lambda _
3415 (substitute* "build/build.xml"
3416 (("\"jar-test\" depends=\"clean, ")
3417 "\"jar-test\" depends=\""))
3418 #t))
3419 (add-after 'unpack 'unpack-build-resources
3420 (lambda* (#:key inputs #:allow-other-keys)
3421 (copy-recursively (assoc-ref inputs "build-resources")
3422 "../build_resources")
3423 (delete-file-recursively "../build_resources/lib/")
3424 (mkdir-p "../build_resources/lib")
3425 ;; Remove dependency on classycle
3426 (substitute* "../build_resources/ant/build-common.xml"
3427 (("<taskdef name=\"dependency-checker.*") "")
3428 (("classname=\"classycle.*") "")
3429 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
3430 ;; Remove dependency on svn
3431 (substitute* "build/build.xml"
3432 (("<build-info.*") "")
3433 (("\\$\\{revision.number\\}")
3434 ,(number->string revision))
3435 (("\\$\\{version.number\\}") ,base-version))
3436 #t))
3437 (add-after 'unpack-build-resources 'fix-dependencies
3438 (lambda* (#:key inputs #:allow-other-keys)
3439 (substitute* "../build_resources/ant/build-common.xml"
3440 (("../libraries/testng/testng-jdk15.jar")
3441 (string-append (assoc-ref inputs "java-testng")
3442 "/share/java/java-testng.jar")))
3443 (substitute* "build/build.xml"
3444 (("\\$\\{lib\\}/sis-base/sis-base.jar")
3445 (string-append (assoc-ref inputs "java-cisd-base")
3446 "/share/java/sis-base.jar"))
3447 (("\\$\\{lib\\}/cisd-args4j/cisd-args4j.jar")
3448 (string-append (assoc-ref inputs "java-cisd-args4j")
3449 "/share/java/cisd-args4j.jar"))
3450 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
3451 (string-append (assoc-ref inputs "java-commons-lang")
3452 "/share/java/commons-lang-"
3453 ,(package-version java-commons-lang) ".jar"))
3454 (("\\$\\{lib\\}/commons-io/commons-io.jar")
3455 (string-append (assoc-ref inputs "java-commons-io")
3456 "/lib/m2/commons-io/commons-io/"
3457 ,(package-version java-commons-io)
3458 "/commons-io-"
3459 ,(package-version java-commons-io)
3460 ".jar"))
3461 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
3462 (string-append (assoc-ref inputs "java-testng")
3463 "/share/java/java-testng.jar"))
3464 (("\\$\\{lib\\}/junit4/junit.jar")
3465 (car (find-files (assoc-ref inputs "java-junit") "jar$")))
3466 (("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar")
3467 (car (find-files (assoc-ref inputs "java-hamcrest-core")
3468 "jar$"))))
3469 ;; Remove dependency on ch.rinn.restrictions
3470 (with-directory-excursion "source/java/ch/systemsx/cisd/hdf5/"
3471 (substitute* '("BitSetConversionUtils.java"
3472 "HDF5Utils.java")
3473 (("import ch.rinn.restrictions.Private;") "")
3474 (("@Private") "")))
3475 (with-directory-excursion "sourceTest/java/ch/systemsx/cisd/hdf5/"
3476 (substitute* '("BitSetConversionTest.java"
3477 "h5ar/HDF5ArchiverTest.java")
3478 (("import ch.rinn.restrictions.Friend;") "")
3479 (("@Friend.*") ""))
3480 ;; Remove leftovers from removing @Friend
3481 (substitute* "h5ar/HDF5ArchiverTest.java"
3482 (("\\{ HDF5Archiver.class, IdCache.class, LinkRecord.class \\}\\)")
3483 "")))
3484 #t))
3485 (add-before 'configure 'build-native-library
3486 (lambda* (#:key inputs #:allow-other-keys)
3487 (let ((jdk (assoc-ref inputs "jdk"))
3488 (hdf5 (assoc-ref inputs "hdf5"))
3489 (dir ,(match (%current-system)
3490 ("i686-linux"
3491 "i386-Linux")
3492 ((or "armhf-linux" "aarch64-linux")
3493 "arm-Linux")
3494 ((or "x86_64-linux")
3495 "amd64-Linux")
3496 (_ "unknown-Linux"))))
3497 (with-directory-excursion "source/c"
3498 (apply invoke `("gcc" "-shared" "-O3"
3499 "-fPIC"
3500 "-Wl,--exclude-libs,ALL"
3501 ,@(find-files "jhdf5" "\\.c$")
3502 ,@(find-files "hdf-java" "\\.c$")
3503 ,(string-append "-I" hdf5 "/include")
3504 ,(string-append "-I" jdk "/include")
3505 ,(string-append "-I" jdk "/include/linux")
3506 ,(string-append hdf5 "/lib/libhdf5.a")
3507 "-o" "libjhdf5.so" "-lz")))
3508 (install-file "source/c/libjhdf5.so"
3509 (string-append "libs/native/jhdf5/" dir))
3510 #t)))
3511 ;; In the "check" phase we only build the test executable.
3512 (add-after 'check 'run-tests
3513 (lambda _
3514 (invoke "java" "-jar" "targets/dist/sis-jhdf5-test.jar")
3515 (delete-file "targets/dist/sis-jhdf5-test.jar")
3516 #t))
3517 (replace 'install
3518 (install-jars "targets/dist")))))
3519 (inputs
3520 `(("java-cisd-base" ,java-cisd-base)
3521 ("java-cisd-args4j" ,java-cisd-args4j)
3522 ("java-commons-lang" ,java-commons-lang)
3523 ("java-commons-io" ,java-commons-io)
3524 ("hdf5" ,hdf5-1.8)
3525 ("zlib" ,zlib)))
3526 (native-inputs
3527 `(("jdk" ,icedtea-8)
3528 ("java-testng" ,java-testng)
3529 ("java-junit" ,java-junit)
3530 ("java-jmock" ,java-jmock)
3531 ("java-hamcrest-core" ,java-hamcrest-core)
3532 ("build-resources"
3533 ,(origin
3534 (method svn-fetch)
3535 (uri (svn-reference
3536 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3537 "jhdf5/tags/release/"
3538 (version-major+minor base-version)
3539 ".x/" base-version
3540 "/build_resources/"))
3541 (revision revision)))
3542 (sha256
3543 (base32
3544 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
3545 (home-page "https://wiki-bsse.ethz.ch/display/JHDF5/")
3546 (synopsis "Java binding for HDF5")
3547 (description "JHDF5 is a high-level API in Java for reading and writing
3548 HDF5 files, building on the libraries provided by the HDF Group.")
3549 ;; The C sources are under a non-copyleft license, which looks like a
3550 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
3551 (license (list license:asl2.0
3552 (license:non-copyleft "file://source/c/COPYING"))))))
3553
3554 (define-public java-classpathx-servletapi
3555 (package
3556 (name "java-classpathx-servletapi")
3557 (version "3.0.1")
3558 (source (origin
3559 (method url-fetch)
3560 (uri (string-append "mirror://gnu/classpathx/servletapi/"
3561 "servletapi-" version ".tar.gz"))
3562 (sha256
3563 (base32
3564 "07d8h051siga2f33fra72hk12sbq1bxa4jifjg0qj0vfazjjff0x"))))
3565 (build-system ant-build-system)
3566 (arguments
3567 `(#:tests? #f ; there is no test target
3568 #:build-target "compile"
3569 #:make-flags
3570 (list "-Dbuild.compiler=javac1.8"
3571 (string-append "-Ddist=" (assoc-ref %outputs "out")))
3572 #:phases
3573 (modify-phases %standard-phases
3574 (replace 'install
3575 (lambda* (#:key make-flags #:allow-other-keys)
3576 (apply invoke `("ant" "dist" ,@make-flags)))))))
3577 (home-page "https://www.gnu.org/software/classpathx/")
3578 (synopsis "Java servlet API implementation")
3579 (description "This is the GNU servlet API distribution, part of the
3580 ClasspathX project. It provides implementations of version 3.0 of the servlet
3581 API and version 2.1 of the Java ServerPages API.")
3582 (license license:gpl3+)))
3583
3584 (define-public java-javaee-servletapi
3585 (package
3586 (name "java-javaee-servletapi")
3587 (version "3.1.0")
3588 (source (origin
3589 (method git-fetch)
3590 (uri (git-reference
3591 (url "https://github.com/javaee/servlet-spec")
3592 (commit version)))
3593 (file-name (git-file-name name version))
3594 (sha256
3595 (base32
3596 "0s03lj8w5an70lkqbjycgfrfk0kc07vbfav91jzk87gh3awf9ksl"))))
3597 (build-system ant-build-system)
3598 (arguments
3599 `(#:jar-name "javax-servletapi.jar"
3600 ;; no tests
3601 #:tests? #f
3602 #:source-dir "src/main/java"
3603 #:phases
3604 (modify-phases %standard-phases
3605 (add-before 'build 'copy-resources
3606 (lambda _
3607 (mkdir-p "build/classes/javax/servlet/http")
3608 (let ((from-prefix "src/main/java/javax/servlet/")
3609 (to-prefix "build/classes/javax/servlet/"))
3610 (for-each (lambda (f)
3611 (copy-file (string-append from-prefix f)
3612 (string-append to-prefix f)))
3613 (list "LocalStrings_ja.properties"
3614 "LocalStrings.properties"
3615 "LocalStrings_fr.properties"
3616 "http/LocalStrings_es.properties"
3617 "http/LocalStrings_ja.properties"
3618 "http/LocalStrings.properties"
3619 "http/LocalStrings_fr.properties")))
3620 #t)))))
3621 (native-inputs
3622 `(("unzip" ,unzip)))
3623 (home-page "https://javaee.github.io/servlet-spec/")
3624 (synopsis "Java servlet API")
3625 (description "Java Servlet is the foundation web specification in the
3626 Java Enterprise Platform. Developers can build web applications using the
3627 Servlet API to interact with the request/response workflow. This project
3628 provides information on the continued development of the Java Servlet
3629 specification.")
3630 ;; Main code is dual-licensed by Oracle under either GLP2 or CDDL 1.1.
3631 ;; Some files are licensed under ASL 2.0.
3632 (license (list license:asl2.0 license:gpl2 license:cddl1.1))))
3633
3634 (define-public java-swt
3635 (package
3636 (name "java-swt")
3637 (version "4.7.1a")
3638 (source
3639 ;; The types of many variables and procedures differ in the sources
3640 ;; dependent on whether the target architecture is a 32-bit system or a
3641 ;; 64-bit system. Instead of patching the sources on demand in a build
3642 ;; phase we download either the 32-bit archive (which mostly uses "int"
3643 ;; types) or the 64-bit archive (which mostly uses "long" types).
3644 (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9")
3645 (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q")
3646 (file32 "x86")
3647 (file64 "x86_64"))
3648 (let-values (((hash file)
3649 (match (or (%current-target-system) (%current-system))
3650 ("x86_64-linux" (values hash64 file64))
3651 (_ (values hash32 file32)))))
3652 (origin
3653 (method url-fetch)
3654 (uri (string-append
3655 "http://download.eclipse.org/eclipse/downloads/drops4/"
3656 "R-" version "-201710090410/swt-" version
3657 "-gtk-linux-" file ".zip"))
3658 (sha256 (base32 hash))))))
3659 (build-system ant-build-system)
3660 (arguments
3661 `(#:jar-name "swt.jar"
3662 #:jdk ,icedtea-8
3663 #:tests? #f ; no "check" target
3664 #:phases
3665 (modify-phases %standard-phases
3666 (replace 'unpack
3667 (lambda* (#:key source #:allow-other-keys)
3668 (mkdir "swt")
3669 (invoke "unzip" source "-d" "swt")
3670 (chdir "swt")
3671 (mkdir "src")
3672 (invoke "unzip" "src.zip" "-d" "src")))
3673 ;; The classpath contains invalid icecat jars. Since we don't need
3674 ;; anything other than the JDK on the classpath, we can simply unset
3675 ;; it.
3676 (add-after 'configure 'unset-classpath
3677 (lambda _ (unsetenv "CLASSPATH") #t))
3678 (add-before 'build 'build-native
3679 (lambda* (#:key inputs outputs #:allow-other-keys)
3680 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3681 ;; Build shared libraries. Users of SWT have to set the system
3682 ;; property swt.library.path to the "lib" directory of this
3683 ;; package output.
3684 (mkdir-p lib)
3685 (setenv "OUTPUT_DIR" lib)
3686 (with-directory-excursion "src"
3687 (invoke "bash" "build.sh")))))
3688 (add-after 'install 'install-native
3689 (lambda* (#:key outputs #:allow-other-keys)
3690 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3691 (for-each (lambda (file)
3692 (install-file file lib))
3693 (find-files "." "\\.so$"))
3694 #t))))))
3695 (inputs
3696 `(("gtk" ,gtk+-2)
3697 ("libxtst" ,libxtst)
3698 ("libxt" ,libxt)
3699 ("mesa" ,mesa)
3700 ("glu" ,glu)))
3701 (native-inputs
3702 `(("pkg-config" ,pkg-config)
3703 ("unzip" ,unzip)))
3704 (home-page "https://www.eclipse.org/swt/")
3705 (synopsis "Widget toolkit for Java")
3706 (description
3707 "SWT is a widget toolkit for Java designed to provide efficient, portable
3708 access to the user-interface facilities of the operating systems on which it
3709 is implemented.")
3710 ;; SWT code is licensed under EPL1.0
3711 ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1
3712 ;; Cairo bindings contain code under MPL1.1
3713 ;; XULRunner 1.9 bindings contain code under MPL2.0
3714 (license (list
3715 license:epl1.0
3716 license:mpl1.1
3717 license:mpl2.0
3718 license:lgpl2.1+))))
3719
3720 ;; java-hamcrest-core uses qdox version 1.12. We package this version instead
3721 ;; of the latest release.
3722 (define-public java-qdox-1.12
3723 (package
3724 (name "java-qdox")
3725 (version "1.12.1")
3726 (source (origin
3727 (method url-fetch)
3728 (uri (string-append "https://repo1.maven.org/maven2/"
3729 "com/thoughtworks/qdox/qdox/" version
3730 "/qdox-" version "-sources.jar"))
3731 (sha256
3732 (base32
3733 "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl"))))
3734 (build-system ant-build-system)
3735 (arguments
3736 `(;; Tests require junit
3737 #:tests? #f
3738 #:jar-name "qdox.jar"
3739 #:phases
3740 (modify-phases %standard-phases
3741 (replace 'unpack
3742 (lambda* (#:key source #:allow-other-keys)
3743 (mkdir "src")
3744 (with-directory-excursion "src"
3745 (invoke "jar" "-xf" source))))
3746 ;; At this point we don't have junit, so we must remove the API
3747 ;; tests.
3748 (add-after 'unpack 'delete-tests
3749 (lambda _
3750 (delete-file-recursively "src/com/thoughtworks/qdox/junit")
3751 #t)))))
3752 (home-page "https://github.com/codehaus/qdox")
3753 (synopsis "Parse definitions from Java source files")
3754 (description
3755 "QDox is a high speed, small footprint parser for extracting
3756 class/interface/method definitions from source files complete with JavaDoc
3757 @code{@@tags}. It is designed to be used by active code generators or
3758 documentation tools.")
3759 (license license:asl2.0)))
3760
3761 (define-public java-qdox
3762 (package
3763 (name "java-qdox")
3764 ; Newer version exists, but this version is required by java-plexus-component-metadata
3765 (version "2.0-M2")
3766 (source (origin
3767 (method url-fetch)
3768 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
3769 ;; Older releases at https://github.com/codehaus/qdox/
3770 ;; Note: The release at maven is pre-generated. The release at
3771 ;; github requires jflex.
3772 (uri (string-append "https://repo1.maven.org/maven2/"
3773 "com/thoughtworks/qdox/qdox/" version
3774 "/qdox-" version "-sources.jar"))
3775 (sha256
3776 (base32
3777 "10xxrcaicq6axszcr2jpygisa4ch4sinyx5q7kqqxv4lknrmxp5x"))))
3778 (build-system ant-build-system)
3779 (arguments
3780 `(#:jar-name "qdox.jar"
3781 #:tests? #f; no tests
3782 #:modules
3783 ((guix build ant-build-system)
3784 (guix build java-utils)
3785 (guix build utils)
3786 (sxml simple))
3787 #:phases
3788 (modify-phases %standard-phases
3789 (add-before 'install 'create-pom
3790 (lambda _
3791 (with-output-to-file "pom.xml"
3792 (lambda _
3793 (sxml->xml
3794 `((project
3795 (modelVersion "4.0.0")
3796 (name "QDox")
3797 (groupId "com.thoughtworks.qdox")
3798 (artifactId "qdox")
3799 (version ,,version))))))
3800 #t))
3801 (replace 'install
3802 (install-from-pom "pom.xml")))))
3803 (home-page "https://github.com/codehaus/qdox")
3804 (synopsis "Parse definitions from Java source files")
3805 (description "QDox is a high speed, small footprint parser for extracting
3806 class/interface/method definitions from source files complete with JavaDoc
3807 @code{@@tags}. It is designed to be used by active code generators or
3808 documentation tools.")
3809 (license license:asl2.0)))
3810
3811 (define-public java-qdox-2-M9
3812 (package
3813 (inherit java-qdox)
3814 (version "2.0-M9"); required by plexus-java
3815 (source (origin
3816 (method url-fetch)
3817 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
3818 ;; Older releases at https://github.com/codehaus/qdox/
3819 ;; Note: The release at maven is pre-generated. The release at
3820 ;; github requires jflex.
3821 (uri (string-append "https://repo1.maven.org/maven2/"
3822 "com/thoughtworks/qdox/qdox/" version
3823 "/qdox-" version "-sources.jar"))
3824 (sha256
3825 (base32
3826 "1s2jnmx2dkwnaha12lcj26aynywgwa8sslc47z82wx8xai13y4fg"))))))
3827
3828 (define-public java-jarjar
3829 (package
3830 (name "java-jarjar")
3831 (version "1.4")
3832 (source (origin
3833 (method url-fetch)
3834 (uri (string-append
3835 "https://storage.googleapis.com/google-code-archive-downloads/v2/"
3836 "code.google.com/jarjar/jarjar-src-" version ".zip"))
3837 (sha256
3838 (base32
3839 "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl"))
3840 (modules '((guix build utils)))
3841 (snippet
3842 '(begin
3843 ;; Delete bundled thirds-party jar archives.
3844 (delete-file-recursively "lib")
3845 (delete-file "src/test/enumtest.jar")
3846 ;; the CLASSPATH needs this directory, create an empty one
3847 (mkdir-p "lib")
3848 #t))))
3849 (build-system ant-build-system)
3850 (arguments
3851 `(;; Tests require junit, which ultimately depends on this package.
3852 #:tests? #f
3853 #:build-target "jar"
3854 #:phases
3855 (modify-phases %standard-phases
3856 (add-before 'build 'do-not-use-bundled-asm
3857 (lambda* (#:key inputs #:allow-other-keys)
3858 (substitute* "build.xml"
3859 (("<path id=\"path.build\">")
3860 (string-append "<path id=\"path.build\"><fileset dir=\""
3861 (assoc-ref inputs "java-asm-bootstrap")
3862 "/lib/m2\" includes=\"**/*.jar\"/>"))
3863 (("<zipfileset src=\"lib/asm-4.0.jar\"/>") "")
3864 (("lib/asm-commons-4.0.jar")
3865 (car (find-files (assoc-ref inputs "java-asm-bootstrap")
3866 "asm-6.0.jar")))
3867 (("<include name=\"org/objectweb/asm/commons/Remap\\*\\.class\"/>")
3868 (string-append "<include name=\"org/objectweb/asm/"
3869 "commons/Remap*.class\"/>"
3870 "<include name=\"org/objectweb/asm/*.class\"/>"
3871 "<include name=\"org/objectweb/asm/"
3872 "signature/*.class\"/>"
3873 "<include name=\"org/objectweb/asm/"
3874 "commons/SignatureRemapper.class\"/>")))
3875 #t))
3876 (add-before 'build 'remove-maven-dependency
3877 (lambda _
3878 ;; We do not need to build jarjar as a maven plugin just yet, so
3879 ;; remove this file. Maven requires jarjar (but not that plugin),
3880 ;; so removing it improves the bootstrap.
3881 (delete-file "src/main/com/tonicsystems/jarjar/JarJarMojo.java")
3882 #t))
3883 (replace 'install
3884 (lambda* (#:key outputs #:allow-other-keys)
3885 (let ((target (string-append (assoc-ref outputs "out")
3886 "/share/java")))
3887 (install-file (string-append "dist/jarjar-" ,version ".jar")
3888 target))
3889 #t)))))
3890 (inputs
3891 `(("java-asm-bootstrap" ,java-asm-bootstrap)))
3892 (native-inputs
3893 `(("unzip" ,unzip)))
3894 (home-page "https://code.google.com/archive/p/jarjar/")
3895 (synopsis "Repackage Java libraries")
3896 (description
3897 "Jar Jar Links is a utility that makes it easy to repackage Java
3898 libraries and embed them into your own distribution. Jar Jar Links includes
3899 an Ant task that extends the built-in @code{jar} task.")
3900 (license license:asl2.0)))
3901
3902 (define-public java-hamcrest-core
3903 (package
3904 (name "java-hamcrest-core")
3905 (version "1.3")
3906 (source (origin
3907 (method git-fetch)
3908 (uri (git-reference
3909 (url "https://github.com/hamcrest/JavaHamcrest/")
3910 (commit (string-append "hamcrest-java-" version))))
3911 (file-name (git-file-name name version))
3912 (sha256
3913 (base32
3914 "16fxxkrd31ahqvcaby30jgh3z1i0zxh51m24hxgz0z2agxj6bc63"))
3915 (modules '((guix build utils)))
3916 (snippet
3917 '(begin
3918 ;; Delete bundled thirds-party jar archives.
3919 (delete-file-recursively "lib")
3920 #t))))
3921 (build-system ant-build-system)
3922 (arguments
3923 `(#:tests? #f ; Tests require junit
3924 #:modules ((guix build ant-build-system)
3925 (guix build java-utils)
3926 (guix build utils)
3927 (srfi srfi-1))
3928 #:make-flags (list (string-append "-Dversion=" ,version))
3929 #:test-target "unit-test"
3930 #:build-target "core"
3931 #:phases
3932 (modify-phases %standard-phases
3933 ;; Disable unit tests, because they require junit, which requires
3934 ;; hamcrest-core. We also give a fixed value to the "Built-Date"
3935 ;; attribute from the manifest for reproducibility.
3936 (add-before 'configure 'patch-build.xml
3937 (lambda _
3938 (substitute* "build.xml"
3939 (("unit-test, ") "")
3940 (("\\$\\{build.timestamp\\}") "guix"))
3941 #t))
3942 ;; Java's "getMethods()" returns methods in an unpredictable order.
3943 ;; To make the output of the generated code deterministic we must
3944 ;; sort the array of methods.
3945 (add-after 'unpack 'make-method-order-deterministic
3946 (lambda _
3947 (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java"
3948 (("import java\\.util\\.Iterator;" line)
3949 (string-append line "\n"
3950 "import java.util.Arrays; import java.util.Comparator;"))
3951 (("allMethods = cls\\.getMethods\\(\\);" line)
3952 (string-append "_" line
3953 "
3954 private Method[] getSortedMethods() {
3955 Arrays.sort(_allMethods, new Comparator<Method>() {
3956 @Override
3957 public int compare(Method a, Method b) {
3958 return a.toString().compareTo(b.toString());
3959 }
3960 });
3961 return _allMethods;
3962 }
3963
3964 private Method[] allMethods = getSortedMethods();")))
3965 #t))
3966 (add-before 'build 'do-not-use-bundled-qdox
3967 (lambda* (#:key inputs #:allow-other-keys)
3968 (substitute* "build.xml"
3969 (("lib/generator/qdox-1.12.jar")
3970 (string-append (assoc-ref inputs "java-qdox-1.12")
3971 "/share/java/qdox.jar")))
3972 #t))
3973 ;; build.xml searches for .jar files in this directoy, which
3974 ;; we remove from the source archive.
3975 (add-before 'build 'create-dummy-directories
3976 (lambda _
3977 (mkdir-p "lib/integration")
3978 #t))
3979 (add-before 'build 'create-pom
3980 (lambda _
3981 (substitute* "pom/hamcrest-core.pom"
3982 (("@VERSION@") ,version))
3983 #t))
3984 (replace 'install
3985 (install-from-pom "pom/hamcrest-core.pom")))))
3986 (native-inputs
3987 `(("java-qdox-1.12" ,java-qdox-1.12)
3988 ("java-jarjar" ,java-jarjar)))
3989 (propagated-inputs
3990 `(("java-hamcrest-parent-pom" ,java-hamcrest-parent-pom)))
3991 (home-page "http://hamcrest.org/")
3992 (synopsis "Library of matchers for building test expressions")
3993 (description
3994 "This package provides a library of matcher objects (also known as
3995 constraints or predicates) allowing @code{match} rules to be defined
3996 declaratively, to be used in other frameworks. Typical scenarios include
3997 testing frameworks, mocking libraries and UI validation rules.")
3998 (license license:bsd-2)))
3999
4000 (define java-hamcrest-parent-pom
4001 (package
4002 (inherit java-hamcrest-core)
4003 (name "java-hamcrest-parent-pom")
4004 (propagated-inputs '())
4005 (native-inputs '())
4006 (arguments
4007 `(#:tests? #f
4008 #:phases
4009 (modify-phases %standard-phases
4010 (delete 'configure)
4011 (replace 'build
4012 (lambda _
4013 (substitute* "pom/hamcrest-parent.pom"
4014 (("@VERSION@") ,(package-version java-hamcrest-core)))
4015 #t))
4016 (replace 'install
4017 (install-pom-file "pom/hamcrest-parent.pom")))))))
4018
4019 (define-public java-hamcrest-library
4020 (package
4021 (inherit java-hamcrest-core)
4022 (name "java-hamcrest-library")
4023 (arguments
4024 (substitute-keyword-arguments (package-arguments java-hamcrest-core)
4025 ((#:build-target _) "library")
4026 ((#:phases phases)
4027 `(modify-phases ,phases
4028 (add-after 'unpack 'patch-classpath-for-integration
4029 (lambda* (#:key inputs #:allow-other-keys)
4030 (substitute* "build.xml"
4031 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
4032 (car (find-files (assoc-ref inputs "java-hamcrest-core")
4033 "jar$"))))
4034 #t))
4035 (replace 'create-pom
4036 (lambda _
4037 (substitute* "pom/hamcrest-library.pom"
4038 (("@VERSION@") ,(package-version java-hamcrest-core)))
4039 #t))
4040 (replace 'install
4041 (install-from-pom "pom/hamcrest-library.pom"))))))
4042 (propagated-inputs
4043 `(("java-hamcrest-core" ,java-hamcrest-core)
4044 ("java-hamcrest-parent-pom" ,java-hamcrest-parent-pom)))))
4045
4046 (define-public java-junit
4047 (package
4048 (name "java-junit")
4049 (version "4.12")
4050 (source (origin
4051 (method git-fetch)
4052 (uri (git-reference
4053 (url "https://github.com/junit-team/junit/")
4054 (commit (string-append "r" version))))
4055 (file-name (git-file-name name version))
4056 (sha256
4057 (base32
4058 "1j8avi91px1z8rjc89cfikwrvfifdmmsarwiyrcnr59ynvpz0v8h"))
4059 (modules '((guix build utils)))
4060 (snippet
4061 '(begin
4062 ;; Delete bundled jar archives.
4063 (delete-file-recursively "lib")
4064 #t))))
4065 (build-system ant-build-system)
4066 (arguments
4067 `(#:jar-name "junit.jar"
4068 #:source-dir "src/main/java"
4069 #:test-dir "src/test"
4070 #:test-exclude (list "**/SimpleTest.java" "**/StackTracesTest.java"
4071 "**/RuleChainTest.java" "**/TestWatchmanTest.java")
4072 #:phases
4073 (modify-phases %standard-phases
4074 (add-before 'check 'copy-test-resources
4075 (lambda _
4076 (copy-recursively "src/test/resources" "build/test-classes")
4077 #t))
4078 (replace 'install
4079 (install-from-pom "pom.xml")))))
4080 (propagated-inputs
4081 `(("java-hamcrest-core" ,java-hamcrest-core)))
4082 (native-inputs
4083 `(("java-hamcrest-library" ,java-hamcrest-library)))
4084 (home-page "https://junit.org/junit4/")
4085 (synopsis "Test framework for Java")
4086 (description
4087 "JUnit is a simple framework to write repeatable tests for Java projects.
4088 JUnit provides assertions for testing expected results, test fixtures for
4089 sharing common test data, and test runners for running tests.")
4090 (license license:epl1.0)))
4091
4092 (define-public java-junitparams
4093 (package
4094 (name "java-junitparams")
4095 (version "1.1.1")
4096 (source (origin
4097 (method git-fetch)
4098 (uri (git-reference
4099 (url "https://github.com/Pragmatists/JUnitParams")
4100 (commit (string-append "JUnitParams-" version))))
4101 (file-name (git-file-name name version))
4102 (sha256
4103 (base32
4104 "0rb52xdfp99invyjrras3w0bf0a81cz30yd47rkkiyqcqj0y1q9b"))))
4105 (build-system ant-build-system)
4106 (arguments
4107 `(#:jar-name "junitparams.jar"
4108 #:source-dir "src/main/java"
4109 #:test-dir "src/test"
4110 #:test-exclude (list "**/SuperclassTest.java")))
4111 (inputs
4112 `(("java-junit" ,java-junit)))
4113 (native-inputs
4114 `(("java-junit" ,java-junit)
4115 ("java-hamcrest-core" ,java-hamcrest-core)
4116 ("java-assertj" ,java-assertj)))
4117 (home-page "https://github.com/Pragmatists/JUnitParams")
4118 (synopsis "Parameterised test support for JUnit")
4119 (description "The JUnitParams project adds a new runner to JUnit and
4120 provides much easier and readable parametrised tests for JUnit.")
4121 (license license:asl2.0)))
4122
4123 (define-public java-plexus-utils
4124 (package
4125 (name "java-plexus-utils")
4126 ;; sisu-build-api needs this version, later versions don't work
4127 (version "3.2.1")
4128 (source (origin
4129 (method git-fetch)
4130 (uri (git-reference
4131 (url "https://github.com/codehaus-plexus/plexus-utils")
4132 (commit (string-append "plexus-utils-" version))))
4133 (file-name (git-file-name name version))
4134 (sha256
4135 (base32
4136 "1w169glixyk94jbczj8jzg897lsab46jihiaa3dhw0p06g35va8b"))))
4137 (build-system ant-build-system)
4138 ;; FIXME: The default build.xml does not include a target to install
4139 ;; javadoc files.
4140 (arguments
4141 `(#:jar-name "plexus-utils.jar"
4142 #:source-dir "src/main"
4143 #:phases
4144 (modify-phases %standard-phases
4145 (add-after 'unpack 'fix-reference-to-/bin-and-/usr
4146 (lambda _
4147 (substitute* "src/main/java/org/codehaus/plexus/util/\
4148 cli/shell/BourneShell.java"
4149 (("/bin/sh") (which "sh"))
4150 (("/usr/") (getcwd)))
4151 #t))
4152 (add-after 'unpack 'fix-or-disable-broken-tests
4153 (lambda _
4154 (with-directory-excursion "src/test/java/org/codehaus/plexus/util"
4155 (substitute* '("cli/CommandlineTest.java"
4156 "cli/shell/BourneShellTest.java")
4157 (("/bin/sh") (which "sh"))
4158 (("/bin/echo") (which "echo")))
4159
4160 ;; This test depends on MavenProjectStub, but we don't have
4161 ;; a package for Maven.
4162 (delete-file "introspection/ReflectionValueExtractorTest.java")
4163
4164 ;; FIXME: The command line tests fail, maybe because they use
4165 ;; absolute paths.
4166 (delete-file "cli/CommandlineTest.java")
4167
4168 ;; These tests require openjdk jmh, which is not packaged yet
4169 (for-each delete-file (find-files "." "PerfTest.java$")))
4170 #t))
4171 (add-before 'build 'copy-resources
4172 (lambda _
4173 (copy-recursively "src/main/resources" "build/classes")
4174 #t))
4175 (replace 'install (install-from-pom "pom.xml")))))
4176 (native-inputs
4177 `(("java-hamcrest-core" ,java-hamcrest-core)
4178 ("java-junit" ,java-junit)))
4179 (propagated-inputs
4180 `(("plexus-parent-pom" ,plexus-parent-pom-5.1)))
4181 (home-page "https://codehaus-plexus.github.io/plexus-utils/")
4182 (synopsis "Common utilities for the Plexus framework")
4183 (description "This package provides various Java utility classes for the
4184 Plexus framework to ease working with strings, files, command lines, XML and
4185 more.")
4186 (license license:asl2.0)))
4187
4188 (define-public java-plexus-utils-3.3.0
4189 (package
4190 (inherit java-plexus-utils)
4191 (version "3.3.0")
4192 (source (origin
4193 (method git-fetch)
4194 (uri (git-reference
4195 (url "https://github.com/codehaus-plexus/plexus-utils")
4196 (commit (string-append "plexus-utils-" version))))
4197 (file-name (git-file-name "java-plexus-utils" version))
4198 (sha256
4199 (base32
4200 "0d0fq21rzjy0j55kcp8w9k1rbq9rwr0r7cc8239p9jbz54vihp0g"))))))
4201
4202 (define-public java-plexus-interpolation
4203 (package
4204 (name "java-plexus-interpolation")
4205 (version "1.26")
4206 (source (origin
4207 (method git-fetch)
4208 (uri (git-reference
4209 (url "https://github.com/codehaus-plexus/plexus-interpolation")
4210 (commit (string-append "plexus-interpolation-" version))))
4211 (file-name (git-file-name name version))
4212 (sha256
4213 (base32
4214 "1rahjmhywf6d5m32qzlc9izawyvcd71abfm9k03f13rs2xmfxzlh"))))
4215 (build-system ant-build-system)
4216 (arguments
4217 `(#:jar-name "plexus-interpolation.jar"
4218 #:source-dir "src/main"
4219 #:phases
4220 (modify-phases %standard-phases
4221 (replace 'install (install-from-pom "pom.xml")))))
4222 (propagated-inputs
4223 `(("plexus-parent-pom-5.1" ,plexus-parent-pom-5.1)))
4224 (native-inputs
4225 `(("java-junit" ,java-junit)
4226 ("java-hamcrest-core" ,java-hamcrest-core)))
4227 (home-page "https://codehaus-plexus.github.io/plexus-interpolation/")
4228 (synopsis "Java components for interpolating ${} strings and the like")
4229 (description "Plexus interpolator is a modular, flexible interpolation
4230 framework for the expression language style commonly seen in Maven, Plexus,
4231 and other related projects.
4232
4233 It has its foundation in the @code{org.codehaus.plexus.utils.interpolation}
4234 package within @code{plexus-utils}, but has been separated in order to allow
4235 these two libraries to vary independently of one another.")
4236 (license license:asl2.0)))
4237
4238 (define-public java-plexus-classworlds
4239 (package
4240 (name "java-plexus-classworlds")
4241 (version "2.6.0")
4242 (source (origin
4243 (method git-fetch)
4244 (uri (git-reference
4245 (url "https://github.com/codehaus-plexus/plexus-classworlds")
4246 (commit (string-append "plexus-classworlds-" version))))
4247 (file-name (git-file-name name version))
4248 (sha256
4249 (base32
4250 "034k2hgvj1saalwbnzrbg4n0zgzwcpz1lhlb8q4kgglsp9pmm03s"))))
4251 (build-system ant-build-system)
4252 (arguments
4253 `(#:jar-name "plexus-classworlds.jar"
4254 #:source-dir "src/main"
4255 #:tests? #f;; FIXME: we need to generate some resources as in pom.xml
4256 #:phases
4257 (modify-phases %standard-phases
4258 (replace 'install (install-from-pom "pom.xml")))))
4259 (propagated-inputs
4260 `(("plexus-parent-pom-5.1" ,plexus-parent-pom-5.1)))
4261 (native-inputs
4262 `(("java-junit" ,java-junit)))
4263 (home-page "https://codehaus-plexus.github.io/plexus-classworlds/")
4264 (synopsis "Java class loader framework")
4265 (description "Plexus classworlds replaces the native @code{ClassLoader}
4266 mechanism of Java. It is especially useful for dynamic loading of application
4267 components.")
4268 (license license:asl2.0)))
4269
4270 (define java-plexus-container-default-bootstrap
4271 (package
4272 (name "java-plexus-container-default-bootstrap")
4273 (version "1.7.1")
4274 (source (origin
4275 (method git-fetch)
4276 (uri (git-reference
4277 (url "https://github.com/codehaus-plexus/plexus-containers")
4278 (commit (string-append "plexus-containers-" version))))
4279 (file-name (git-file-name name version))
4280 (sha256
4281 (base32
4282 "1316hrp5vqfv0aw7miq2fp0wwy833h66h502h29vnh5sxj27x228"))))
4283 (build-system ant-build-system)
4284 (arguments
4285 `(#:jar-name "container-default.jar"
4286 #:source-dir "plexus-container-default/src/main/java"
4287 #:test-dir "plexus-container-default/src/test"
4288 #:tests? #f; requires plexus-archiver, which depends on this package
4289 #:phases
4290 (modify-phases %standard-phases
4291 (add-before 'build 'fix-google-collections
4292 (lambda _
4293 ;; Google collections are now replaced with guava
4294 (substitute* "plexus-container-default/pom.xml"
4295 (("google-collections") "guava")
4296 (("com.google.collections") "com.google.guava"))
4297 #t))
4298 (add-before 'build 'copy-resources
4299 (lambda _
4300 (copy-recursively
4301 "plexus-container-default/src/main/resources/"
4302 "build/classes")
4303 #t))
4304 (replace 'install
4305 (install-from-pom "plexus-container-default/pom.xml")))))
4306 (propagated-inputs
4307 `(("java-plexus-worldclass" ,java-plexus-classworlds)
4308 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4309 ("java-plexus-utils" ,java-plexus-utils)
4310 ("java-junit" ,java-junit)
4311 ("java-guava" ,java-guava)
4312 ("java-plexus-containers-parent-pom" ,java-plexus-containers-parent-pom)))
4313 (home-page "https://github.com/codehaus-plexus/plexus-containers")
4314 (synopsis "Inversion-of-control container")
4315 (description "Plexus-default-container is Plexus' inversion-of-control
4316 (@dfn{IoC}) container. It is composed of its public API and its default
4317 implementation.")
4318 (license license:asl2.0)))
4319
4320 (define java-plexus-containers-parent-pom
4321 (package
4322 (inherit java-plexus-container-default-bootstrap)
4323 (name "java-plexus-containers-parent-pom")
4324 (arguments
4325 `(#:tests? #f
4326 #:phases
4327 (modify-phases %standard-phases
4328 (delete 'configure)
4329 (delete 'build)
4330 (replace 'install
4331 (install-pom-file "pom.xml")))))
4332 (propagated-inputs
4333 `(("plexus-parent-pom" ,plexus-parent-pom-4.0)))))
4334
4335 (define-public java-plexus-io
4336 (package
4337 (name "java-plexus-io")
4338 (version "3.2.0")
4339 (source (origin
4340 (method git-fetch)
4341 (uri (git-reference
4342 (url "https://github.com/codehaus-plexus/plexus-io")
4343 (commit (string-append "plexus-io-" version))))
4344 (file-name (git-file-name name version))
4345 (sha256
4346 (base32
4347 "1r3wqfpbxq8vp4p914i8p88r0994rmcjw02hz14n11cfb6gsyvlr"))))
4348 (build-system ant-build-system)
4349 (arguments
4350 `(#:jar-name "plexus-io.jar"
4351 #:source-dir "src/main/java"
4352 #:test-dir "src/test"
4353 #:phases
4354 (modify-phases %standard-phases
4355 (add-before 'build 'copy-resources
4356 (lambda _
4357 (mkdir-p "build/classes")
4358 (copy-recursively "src/main/resources" "build/classes")
4359 (mkdir-p "build/test-classes")
4360 (copy-recursively "src/test/resources" "build/test-classes")
4361 #t))
4362 (replace 'install (install-from-pom "pom.xml")))))
4363 (propagated-inputs
4364 `(("java-plexus-utils" ,java-plexus-utils-3.3.0)
4365 ("java-commons-io" ,java-commons-io)
4366 ("plexus-parent-pom" ,plexus-parent-pom-5.1)))
4367 (inputs
4368 `(("java-jsr305" ,java-jsr305)))
4369 (native-inputs
4370 `(("junit" ,java-junit)
4371 ("hamcrest" ,java-hamcrest-core)
4372 ("guava" ,java-guava)
4373 ("classworlds" ,java-plexus-classworlds)
4374 ("xbean" ,java-geronimo-xbean-reflect)
4375 ("container-default" ,java-plexus-container-default-bootstrap)))
4376 (home-page "https://github.com/codehaus-plexus/plexus-io")
4377 (synopsis "I/O plexus components")
4378 (description "Plexus IO is a set of plexus components, which are designed
4379 for use in I/O operations. This implementation using plexus components allows
4380 reusing it in maven.")
4381 (license license:asl2.0)))
4382
4383 (define-public java-plexus-archiver
4384 (package
4385 (name "java-plexus-archiver")
4386 (version "4.2.2")
4387 (source (origin
4388 (method url-fetch)
4389 (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver"
4390 "/archive/plexus-archiver-" version ".tar.gz"))
4391 (sha256
4392 (base32
4393 "144n971r3lfrx3l12nf2scm80x4xdvgbkk4bjpa4vcvvdrll6qys"))))
4394 (build-system ant-build-system)
4395 (arguments
4396 `(#:jar-name "plexus-archiver.jar"
4397 #:source-dir "src/main/java"
4398 #:test-dir "src/test"
4399 #:test-exclude (list "**/Abstract*.java" "**/Base*.java")
4400 #:phases
4401 (modify-phases %standard-phases
4402 (add-before 'check 'remove-failing
4403 (lambda _
4404 ;; Requires an older version of plexus container
4405 (delete-file
4406 "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java")
4407 #t))
4408 (add-before 'check 'fix-test-building
4409 (lambda _
4410 (substitute* "build.xml"
4411 (("srcdir=\"src/test\"") "srcdir=\"src/test/java\""))
4412 #t))
4413 (add-before 'build 'copy-resources
4414 (lambda _
4415 (mkdir-p "build/classes")
4416 (copy-recursively "src/main/resources" "build/classes")
4417 (mkdir-p "build/test-classes")
4418 (copy-recursively "src/test/resources" "build/test-classes")
4419 #t))
4420 (replace 'install (install-from-pom "pom.xml")))))
4421 (propagated-inputs
4422 `(("java-plexus-utils" ,java-plexus-utils-3.3.0)
4423 ("java-plexus-io" ,java-plexus-io)
4424 ("java-iq80-snappy" ,java-iq80-snappy)
4425 ("java-commons-compress" ,java-commons-compress)
4426 ("plexus-parent-pom" ,plexus-parent-pom-6.1)))
4427 (inputs
4428 `(("java-jsr305" ,java-jsr305)
4429 ("java-plexus-container-default"
4430 ,java-plexus-container-default-bootstrap)))
4431 (native-inputs
4432 `(("java-hamcrest-core" ,java-hamcrest-core)
4433 ("junit" ,java-junit)
4434 ("classworld" ,java-plexus-classworlds)
4435 ("xbean" ,java-geronimo-xbean-reflect)
4436 ("xz" ,java-xz)
4437 ("guava" ,java-guava)))
4438 (home-page "https://github.com/codehaus-plexus/plexus-archiver")
4439 (synopsis "Archiver component of the Plexus project")
4440 (description "Plexus-archiver contains a component to deal with project
4441 archives (jar).")
4442 (license license:asl2.0)))
4443
4444 (define-public java-plexus-container-default
4445 (package
4446 (inherit java-plexus-container-default-bootstrap)
4447 (name "java-plexus-container-default")
4448 (arguments
4449 `(#:jar-name "container-default.jar"
4450 #:source-dir "plexus-container-default/src/main/java"
4451 #:test-dir "plexus-container-default/src/test"
4452 #:test-exclude (list ;"**/*Test.java"
4453 "**/Abstract*.java"
4454 ;; Requires plexus-hierarchy
4455 "**/PlexusHierarchyTest.java"
4456 ;; Failures
4457 "**/ComponentRealmCompositionTest.java"
4458 "**/PlexusContainerTest.java")
4459 #:phases
4460 (modify-phases %standard-phases
4461 (add-before 'build 'fix-google-collections
4462 (lambda _
4463 ;; Google collections are now replaced with guava
4464 (substitute* "plexus-container-default/pom.xml"
4465 (("google-collections") "guava")
4466 (("com.google.collections") "com.google.guava"))
4467 #t))
4468 (add-before 'build 'copy-resources
4469 (lambda _
4470 (copy-recursively
4471 "plexus-container-default/src/main/resources/"
4472 "build/classes")
4473 #t))
4474 (add-before 'check 'fix-paths
4475 (lambda _
4476 (let ((dir "plexus-container-default/src/test/java/org/codehaus"))
4477 (substitute*
4478 (string-append
4479 dir "/plexus/component/composition/"
4480 "ComponentRealmCompositionTest.java")
4481 (("src/test") "plexus-container-default/src/test"))
4482 #t)))
4483 (replace 'install
4484 (install-from-pom "plexus-container-default/pom.xml")))))
4485 (inputs
4486 `(("worldclass" ,java-plexus-classworlds)
4487 ("xbean" ,java-geronimo-xbean-reflect)
4488 ("utils" ,java-plexus-utils)
4489 ("junit" ,java-junit)
4490 ("guava" ,java-guava)))
4491 (native-inputs
4492 `(("archiver" ,java-plexus-archiver)
4493 ("hamcrest" ,java-hamcrest-core)))))
4494
4495 (define-public java-plexus-component-annotations
4496 (package
4497 (inherit java-plexus-container-default)
4498 (name "java-plexus-component-annotations")
4499 (arguments
4500 `(#:jar-name "plexus-component-annotations.jar"
4501 #:source-dir "plexus-component-annotations/src/main/java"
4502 #:tests? #f; no tests
4503 #:phases
4504 (modify-phases %standard-phases
4505 (replace 'install
4506 (install-from-pom "plexus-component-annotations/pom.xml")))))
4507 (propagated-inputs
4508 `(("java-plexus-containers-parent-pom" ,java-plexus-containers-parent-pom)))
4509 (inputs '())
4510 (native-inputs '())
4511 (synopsis "Plexus descriptors generator")
4512 (description "This package is a Maven plugin to generate Plexus descriptors
4513 from source tags and class annotations.")))
4514
4515 (define-public java-plexus-component-metadata
4516 (package
4517 (inherit java-plexus-container-default)
4518 (name "java-plexus-component-metadata")
4519 (arguments
4520 `(#:jar-name "plexus-component-metadata.jar"
4521 #:source-dir "src/main/java"
4522 #:test-dir "src/test"
4523 #:jdk ,icedtea-8
4524 #:phases
4525 (modify-phases %standard-phases
4526 (add-before 'configure 'chdir
4527 (lambda _
4528 (chdir "plexus-component-metadata")
4529 #t))
4530 (add-before 'build 'copy-resources
4531 (lambda _
4532 (copy-recursively "src/main/resources"
4533 "build/classes/")
4534 #t)))))
4535 (propagated-inputs
4536 `(("java-plexus-container-default" ,java-plexus-container-default)
4537 ("java-plexu-component-annotations" ,java-plexus-component-annotations)
4538 ("java-plexus-utils" ,java-plexus-utils)
4539 ("java-plexus-cli" ,java-plexus-cli)
4540 ("java-plexus-classworlds" ,java-plexus-classworlds)
4541 ("maven-plugin-api" ,maven-plugin-api)
4542 ("maven-plugin-annotations" ,maven-plugin-annotations)
4543 ("maven-core-bootstrap" ,maven-core-bootstrap)
4544 ("maven-model" ,maven-model)
4545 ("java-commons-cli" ,java-commons-cli)
4546 ("java-qdox" ,java-qdox)
4547 ("java-jdom2" ,java-jdom2)
4548 ("java-asm" ,java-asm)))
4549 (native-inputs
4550 `(("java-junit" ,java-junit)
4551 ("java-guava" ,java-guava)
4552 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)))
4553 (synopsis "Inversion-of-control container for Maven")
4554 (description "The Plexus project provides a full software stack for creating
4555 and executing software projects. Based on the Plexus container, the
4556 applications can utilise component-oriented programming to build modular,
4557 reusable components that can easily be assembled and reused. This package
4558 provides the Maven plugin generating the component metadata.")))
4559
4560 (define-public java-plexus-cipher
4561 (package
4562 (name "java-plexus-cipher")
4563 (version "1.7")
4564 (source (origin
4565 (method git-fetch)
4566 (uri (git-reference
4567 (url "https://github.com/codehaus-plexus/plexus-cipher")
4568 (commit (string-append "plexus-cipher-" version))))
4569 (file-name (git-file-name name version))
4570 (sha256
4571 (base32
4572 "0m638nzlxbmnbcj5cwdpgs326ab584yv0k803zlx37r6iqwvf6b0"))))
4573 (build-system ant-build-system)
4574 (arguments
4575 `(#:jar-name "plexus-cipher.jar"
4576 #:source-dir "src/main/java"
4577 #:tests? #f; FIXME: requires sisu-inject-bean
4578 #:phases
4579 (modify-phases %standard-phases
4580 (add-before 'build 'copy-resources
4581 (lambda _
4582 (copy-recursively "src/main/resources" "build/classes")
4583 (mkdir-p "build/classes/META-INF/sisu")
4584 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
4585 (lambda _
4586 (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
4587 #t))
4588 (add-before 'install 'fix-test-dependency
4589 (lambda _
4590 ;; sisu-inject-bean is only used for tests, but its scope is "provided".
4591 (substitute* "pom.xml"
4592 (("provided") "test"))
4593 #t))
4594 (replace 'install (install-from-pom "pom.xml")))))
4595 (inputs
4596 `(("java-cdi-api" ,java-cdi-api)
4597 ("java-javax-inject" ,java-javax-inject)))
4598 (propagated-inputs
4599 `(("java-sonatype-spice-parent-pom" ,java-sonatype-spice-parent-pom-15)))
4600 (native-inputs
4601 `(("java-junit" ,java-junit)))
4602 (home-page "https://github.com/sonatype/plexus-cipher")
4603 (synopsis "Encryption/decryption Component")
4604 (description "Plexus-cipher contains a component to deal with encryption
4605 and decryption.")
4606 (license license:asl2.0)))
4607
4608 (define-public java-plexus-java
4609 (package
4610 (name "java-plexus-java")
4611 (version "0.9.10")
4612 (source (origin
4613 (method git-fetch)
4614 (uri (git-reference
4615 (url "https://github.com/codehaus-plexus/plexus-languages")
4616 (commit (string-append "plexus-languages-" version))))
4617 (file-name (git-file-name name version))
4618 (sha256
4619 (base32
4620 "0vmvgq5hfxs90yyxgssfpwq78l7vwx1ljwpkk594mrdr8sm668b5"))
4621 (modules '((guix build utils)))
4622 (snippet
4623 `(begin
4624 (for-each delete-file (find-files "." ".*.jar$"))
4625 #t))))
4626 (build-system ant-build-system)
4627 (arguments
4628 `(#:jar-name "plexus-java.java"
4629 #:source-dir "plexus-java/src/main/java"
4630 #:test-dir "plexus-java/src/test"
4631 #:tests? #f; require mockito 2
4632 #:phases
4633 (modify-phases %standard-phases
4634 (add-after 'build 'generate-metadata
4635 (lambda _
4636 (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes")
4637 "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli"
4638 "--source" "plexus-java/src/main/java"
4639 "--output" "build/classes/META-INF/plexus/components.xml"
4640 "--classes" "build/classes"
4641 "--descriptors" "build/classes/META-INF")
4642 (invoke "ant" "jar")
4643 #t))
4644 (add-before 'install 'install-parent
4645 (install-pom-file "pom.xml"))
4646 (replace 'install
4647 (install-from-pom "plexus-java/pom.xml")))))
4648 (propagated-inputs
4649 `(("java-asm" ,java-asm)
4650 ("java-qdox" ,java-qdox-2-M9)
4651 ("java-javax-inject" ,java-javax-inject)
4652 ("plexus-parent-pom" ,plexus-parent-pom-4.0)))
4653 (inputs
4654 `(("java-plexus-component-annotations" ,java-plexus-component-annotations)))
4655 (native-inputs
4656 `(("java-plexus-component-metadata" ,java-plexus-component-metadata)
4657 ("java-junit" ,java-junit)))
4658 (home-page "https://codehaus-plexus.github.io/plexus-languages/plexus-java")
4659 (synopsis "Shared language features for Java")
4660 (description "This package contains shared language features of the Java
4661 language, for the plexus project.")
4662 (license license:asl2.0)))
4663
4664 (define-public java-plexus-compiler-api
4665 (package
4666 (name "java-plexus-compiler-api")
4667 (version "2.8.4")
4668 (source (origin
4669 (method git-fetch)
4670 (uri (git-reference
4671 (url "https://github.com/codehaus-plexus/plexus-compiler")
4672 (commit (string-append "plexus-compiler-" version))))
4673 (file-name (git-file-name name version))
4674 (sha256
4675 (base32
4676 "1nq1gnn3s6z1j29gmi1hqbklsmm8b1lmnafb0191914f95mn18gk"))))
4677 (build-system ant-build-system)
4678 (arguments
4679 `(#:jar-name "plexus-compiler-api.jar"
4680 #:source-dir "plexus-compiler-api/src/main/java"
4681 #:test-dir "plexus-compiler-api/src/test"
4682 #:phases
4683 (modify-phases %standard-phases
4684 (replace 'install
4685 (install-from-pom "plexus-compiler-api/pom.xml")))))
4686 (propagated-inputs
4687 `(("java-plexus-container-default" ,java-plexus-container-default)
4688 ("java-plexus-compiler-pom" ,java-plexus-compiler-pom)
4689 ("java-plexus-util" ,java-plexus-utils)))
4690 (native-inputs
4691 `(("java-junit" ,java-junit)))
4692 (home-page "https://github.com/codehaus-plexus/plexus-compiler")
4693 (synopsis "Plexus Compilers component's API to manipulate compilers")
4694 (description "This package contains the API used by components to manipulate
4695 compilers.")
4696 (license (list license:asl2.0
4697 license:expat))))
4698
4699 (define java-plexus-compiler-pom
4700 (package
4701 (inherit java-plexus-compiler-api)
4702 (name "java-plexus-compiler-pom")
4703 (arguments
4704 `(#:tests? #f
4705 #:phases
4706 (modify-phases %standard-phases
4707 (delete 'configure)
4708 (delete 'build)
4709 (replace 'install
4710 (install-pom-file "pom.xml"))
4711 (add-after 'install 'install-compilers
4712 (install-pom-file "plexus-compilers/pom.xml")))))
4713 (propagated-inputs
4714 `(("plexus-components-parent-pom-4.0" ,plexus-components-parent-pom-4.0)))))
4715
4716 (define plexus-components-parent-pom-4.0
4717 (package
4718 (name "plexus-components-parent-pom")
4719 (version "4.0")
4720 (source (origin
4721 (method git-fetch)
4722 (uri (git-reference
4723 (url "https://github.com/codehaus-plexus/plexus-components")
4724 (commit (string-append "plexus-components-" version))))
4725 (file-name (git-file-name name version))
4726 (sha256
4727 (base32
4728 "041bm8yv0m2i17mqg8zljib4ykpha7ijls2qfdwvkma4d39lhysi"))))
4729 (build-system ant-build-system)
4730 (arguments
4731 `(#:tests? #f
4732 #:phases
4733 (modify-phases %standard-phases
4734 (delete 'configure)
4735 (delete 'build)
4736 (replace 'install
4737 (install-pom-file "pom.xml")))))
4738 (propagated-inputs
4739 `(("plexus-parent-pom-4.0" ,plexus-parent-pom-4.0)))
4740 (home-page "https://codehaus-plexus.github.io/plexus-components")
4741 (synopsis "Plexus parent pom")
4742 (description "This package contains the Plexus components parent POM.")
4743 (license license:asl2.0)))
4744
4745 (define-public java-plexus-compiler-manager
4746 (package
4747 (inherit java-plexus-compiler-api)
4748 (name "java-plexus-compiler-manager")
4749 (arguments
4750 `(#:jar-name "compiler-compiler-manager.java"
4751 #:source-dir "plexus-compiler-manager/src/main/java"
4752 #:test-dir "plexus-compiler-manager/src/test"
4753 #:tests? #f
4754 #:phases
4755 (modify-phases %standard-phases
4756 (add-after 'build 'generate-metadata
4757 (lambda _
4758 (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes")
4759 "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli"
4760 "--source" "plexus-compiler-manager/src/main/java"
4761 "--output" "build/classes/META-INF/plexus/components.xml"
4762 "--classes" "build/classes"
4763 "--descriptors" "build/classes/META-INF")
4764 (invoke "ant" "jar")
4765 #t))
4766 (add-after 'generate-metadata 'rebuild
4767 (lambda _
4768 (invoke "ant" "jar")
4769 #t))
4770 (replace 'install
4771 (install-from-pom "plexus-compiler-manager/pom.xml")))))
4772 (propagated-inputs
4773 `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
4774 ("java-plexus-compiler-pom" ,java-plexus-compiler-pom)
4775 ("java-plexus-container-default" ,java-plexus-container-default)))
4776 (native-inputs
4777 `(("unzip" ,unzip)
4778 ("java-plexus-component-metadata" ,java-plexus-component-metadata)))
4779 (synopsis "Compiler management for Plexus Compiler component")
4780 (description "Plexus Compiler is a Plexus component to use different
4781 compilers through a uniform API. This component chooses the compiler
4782 implementation to use in a project.")))
4783
4784 (define-public java-plexus-compiler-javac
4785 (package
4786 (inherit java-plexus-compiler-api)
4787 (name "java-plexus-compiler-javac")
4788 (arguments
4789 `(#:jar-name "plexus-compiler-javac.jar"
4790 #:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java"
4791 #:jdk ,icedtea-8
4792 #:tests? #f; depends on compiler-test -> maven-core -> ... -> this package.
4793 #:test-dir "plexus-compilers/plexus-compiler-javac/src/test"
4794 #:modules ((guix build ant-build-system)
4795 (guix build utils)
4796 (guix build java-utils)
4797 (sxml simple))
4798 #:phases
4799 (modify-phases %standard-phases
4800 ;; We cannot use java-plexus-component-metadata to generate the metadata
4801 ;; because it ultimately depends on this package.
4802 ;; Create it manually instead
4803 (add-before 'build 'create-metadata
4804 (lambda _
4805 (let* ((dir "build/classes/META-INF/plexus")
4806 (file (string-append dir "/components.xml")))
4807 (mkdir-p dir)
4808 (with-output-to-file file
4809 (lambda _
4810 (sxml->xml
4811 `(component-set
4812 (components
4813 (component
4814 (role "org.codehaus.plexus.compiler.Compiler")
4815 (role-hint "javac")
4816 (implementation "org.codehaus.plexus.compiler.javac.JavacCompiler")
4817 (isolated-realm "false"))))))))
4818 #t))
4819 (replace 'install
4820 (install-from-pom "plexus-compilers/plexus-compiler-javac/pom.xml")))))
4821 (propagated-inputs
4822 `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
4823 ("java-plexus-utils" ,java-plexus-utils)
4824 ("java-plexus-container-default" ,java-plexus-container-default)))
4825 (synopsis "Javac Compiler support for Plexus Compiler component")
4826 (description "This package contains the Javac Compiler support for Plexus
4827 Compiler component.")))
4828
4829 (define plexus-components-pom-1.1.20
4830 (package
4831 (name "plexus-components-pom-1.1.20")
4832 (version "1.1.20")
4833 (source (origin
4834 (method git-fetch)
4835 (uri (git-reference
4836 (url "https://github.com/codehaus-plexus/plexus-components")
4837 (commit (string-append "plexus-components-" version))))
4838 (file-name (git-file-name name version))
4839 (sha256
4840 (base32
4841 "1q254k95m9icyfsvaw8c226midg8v6v436wvivhv7im825mnp5yb"))))
4842 (build-system ant-build-system)
4843 (arguments
4844 `(#:tests? #f
4845 #:phases
4846 (modify-phases %standard-phases
4847 (delete 'configure)
4848 (delete 'build)
4849 (replace 'install
4850 (install-pom-file "pom.xml")))))
4851 (propagated-inputs
4852 `(("plexus-parent-pom" ,plexus-parent-pom-3.1)))
4853 (home-page "https://github.com/codehaus-plexus/plexus-components")
4854 (synopsis "Maven parent pom for plexus packages")
4855 (description "This package contains the parent pom for plexus component
4856 packages.")
4857 (license license:asl2.0)))
4858
4859 (define-public java-plexus-digest
4860 (package
4861 (name "java-plexus-digest")
4862 (version "1.2")
4863 (source (origin
4864 (method git-fetch)
4865 (uri (git-reference
4866 (url "https://github.com/codehaus-plexus/plexus-digest")
4867 (commit "2a52ad1bda8297fa0e287163d2fa37245ec6a430")))
4868 (file-name (git-file-name name version))
4869 (sha256
4870 (base32
4871 "19w5wxsliz8r42niry68qa665kvjsb8081dazg9vgd3pca72w07x"))))
4872 (build-system ant-build-system)
4873 (arguments
4874 `(#:jar-name "plexus-digest.jar"
4875 #:source-dir "src/main/java"
4876 #:tests? #f
4877 #:phases
4878 (modify-phases %standard-phases
4879 (replace 'install
4880 (install-from-pom "pom.xml")))))
4881 (propagated-inputs
4882 `(("java-plexus-utils" ,java-plexus-utils)
4883 ("plexus-components-pom-1.1.20" ,plexus-components-pom-1.1.20)))
4884 (native-inputs
4885 `(("java-junit" ,java-junit)))
4886 (home-page "https://github.com/codehaus-plexus/plexus-digest")
4887 (synopsis "Hash function utilities for Java")
4888 (description "This package is a plexus component that contains hash
4889 function utilities.")
4890 (license license:asl2.0)))
4891
4892 (define-public java-plexus-sec-dispatcher
4893 (package
4894 (name "java-plexus-sec-dispatcher")
4895 (version "1.4") ;; Newest release listed at the Maven Central Repository.
4896 (source (origin
4897 ;; This project doesn't tag releases or publish tarballs, so we take
4898 ;; the "prepare release plexus-sec-dispatcher-1.4" git commit.
4899 (method git-fetch)
4900 (uri (git-reference
4901 (url "https://github.com/sonatype/plexus-sec-dispatcher/")
4902 (commit "7db8f880486e192a1c5ea9544e01e756c3d49d0f")))
4903 (sha256
4904 (base32
4905 "1ng4yliy4cqpjr4fxxjbpwyk1wkch5f8vblm1kvwf328s4gibszs"))
4906 (file-name (git-file-name name version))))
4907 (arguments
4908 `(#:jar-name "plexus-sec-dispatcher.jar"
4909 #:source-dir "src/main/java"
4910 #:phases
4911 (modify-phases %standard-phases
4912 (add-before 'build 'generate-models
4913 (lambda* (#:key inputs #:allow-other-keys)
4914 (define (modello-single-mode file version mode)
4915 (invoke "java"
4916 "org.codehaus.modello.ModelloCli"
4917 file mode "src/main/java" version
4918 "false" "true"))
4919 (let ((file "src/main/mdo/settings-security.mdo"))
4920 (modello-single-mode file "1.0.0" "java")
4921 (modello-single-mode file "1.0.0" "xpp3-reader")
4922 (modello-single-mode file "1.0.0" "xpp3-writer"))
4923 #t))
4924 (add-before 'build 'generate-components.xml
4925 (lambda _
4926 (mkdir-p "build/classes/META-INF/plexus")
4927 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
4928 (lambda _
4929 (display
4930 "<component-set>\n
4931 <components>\n
4932 <component>\n
4933 <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n
4934 <role-hint>default</role-hint>\n
4935 <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n
4936 <description></description>\n
4937 <requirements>\n
4938 <requirement>\n
4939 <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n
4940 <field-name>_cipher</field-name>\n
4941 </requirement>\n
4942 <requirement>\n
4943 <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n
4944 <field-name>_decryptors</field-name>\n
4945 </requirement>\n
4946 </requirements>\n
4947 <configuration>\n
4948 <_configuration-file>~/.settings-security.xml</_configuration-file>\n
4949 </configuration>\n
4950 </component>\n
4951 </components>\n
4952 </component-set>\n")))
4953 #t))
4954 (add-before 'check 'fix-paths
4955 (lambda _
4956 (copy-recursively "src/test/resources" "target")
4957 #t))
4958 (replace 'install (install-from-pom "pom.xml")))))
4959 (propagated-inputs
4960 `(("java-plexus-utils" ,java-plexus-utils)
4961 ("java-plexus-cipher" ,java-plexus-cipher)
4962 ("java-sonatype-spice-parent-pom" ,java-sonatype-spice-parent-pom-12)))
4963 (native-inputs
4964 `(("java-modello-core" ,java-modello-core)
4965 ;; for modello:
4966 ("java-plexus-container-default" ,java-plexus-container-default)
4967 ("java-plexus-classworlds" ,java-plexus-classworlds)
4968 ("java-plexus-utils" ,java-plexus-utils)
4969 ("java-guava" ,java-guava)
4970 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4971 ("java-sisu-build-api" ,java-sisu-build-api)
4972 ;; modello plugins:
4973 ("java-modellop-plugins-java" ,java-modello-plugins-java)
4974 ("java-modellop-plugins-xml" ,java-modello-plugins-xml)
4975 ("java-modellop-plugins-xpp3" ,java-modello-plugins-xpp3)
4976 ;; for tests
4977 ("java-junit" ,java-junit)))
4978 (build-system ant-build-system)
4979 (home-page "https://github.com/sonatype/plexus-sec-dispatcher")
4980 (synopsis "Plexus Security Dispatcher Component")
4981 (description "This package is the Plexus Security Dispatcher Component.
4982 This component decrypts a string passed to it.")
4983 (license license:asl2.0)))
4984
4985 (define-public java-plexus-cli
4986 (package
4987 (name "java-plexus-cli")
4988 (version "1.7")
4989 (source (origin
4990 (method git-fetch)
4991 (uri (git-reference
4992 (url "https://github.com/sonatype/plexus-cli")
4993 (commit "a776afa6bca84e5107bedb69440329cdb24ed645")))
4994 (file-name (string-append name "-" version))
4995 (sha256
4996 (base32
4997 "0xjrlay605rypv3zd7y24vlwf0039bil3n2cqw54r1ddpysq46vx"))))
4998 (build-system ant-build-system)
4999 (arguments
5000 `(#:jar-name "plexus-cli.jar"
5001 #:source-dir "src/main/java"
5002 #:jdk ,icedtea-8
5003 #:test-dir "src/test"))
5004 (inputs
5005 `(("java-commons-cli" ,java-commons-cli)
5006 ("java-plexus-container-default" ,java-plexus-container-default)
5007 ("java-plexus-classworlds" ,java-plexus-classworlds)))
5008 (native-inputs
5009 `(("java-plexus-utils" ,java-plexus-utils)
5010 ("java-junit" ,java-junit)
5011 ("java-guava" ,java-guava)))
5012 (home-page "https://codehaus-plexus.github.io/plexus-cli")
5013 (synopsis "CLI building library for plexus")
5014 (description "This package is a library to help creating CLI around
5015 Plexus components.")
5016 (license license:asl2.0)))
5017
5018 (define-public java-sisu-build-api
5019 (package
5020 (name "java-sisu-build-api")
5021 (version "0.0.7")
5022 (source (origin
5023 (method git-fetch)
5024 (uri (git-reference
5025 (url "https://github.com/sonatype/sisu-build-api")
5026 (commit (string-append "plexus-build-api-" version))))
5027 (file-name (git-file-name name version))
5028 (sha256
5029 (base32
5030 "1d5w6c58gkx30d51v7qwv1xrhc0ly76848gihmgshj19yf6yhca0"))))
5031 (build-system ant-build-system)
5032 (arguments
5033 `(#:jar-name "sisu-build-api.jar"
5034 #:source-dir "src/main/java"
5035 #:jdk ,icedtea-8
5036 #:tests? #f; FIXME: how to run the tests?
5037 #:phases
5038 (modify-phases %standard-phases
5039 (add-before 'build 'copy-resources
5040 (lambda _
5041 (copy-recursively "src/main/resources" "build/classes")
5042 (substitute* (find-files "build/classes")
5043 (("\\$\\{project.version\\}") ,version))
5044 #t))
5045 (add-before 'build 'generate-plexus-compontent
5046 (lambda _
5047 (mkdir-p "build/classes/META-INF/plexus")
5048 ;; This file is required for plexus to inject this package.
5049 ;; FIXME: how is it generated?
5050 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
5051 (lambda _
5052 (display
5053 "<component-set>\n
5054 <components>\n
5055 <component>\n
5056 <role>org.sonatype.plexus.build.incremental.BuildContext</role>\n
5057 <role-hint>default</role-hint>\n
5058 <implementation>org.sonatype.plexus.build.incremental.DefaultBuildContext</implementation>\n
5059 <description>Filesystem based non-incremental build context implementation\n
5060 which behaves as if all files were just created.</description>\n
5061 </component>\n
5062 </components>\n
5063 </component-set>\n")))
5064 #t))
5065 (replace 'install
5066 (install-from-pom "pom.xml")))))
5067 (inputs
5068 `(("java-plexus-utils" ,java-plexus-utils)
5069 ("java-plexus-container-default" ,java-plexus-container-default)))
5070 (home-page "https://github.com/sonatype/sisu-build-api/")
5071 (synopsis "Base build API for maven")
5072 (description "This package contains the base build API for maven and
5073 a default implementation of it. This API is about scanning files in a
5074 project and determining what files need to be rebuilt.")
5075 (license license:asl2.0)))
5076
5077 (define-public java-modello-core
5078 (package
5079 (name "java-modello-core")
5080 (version "1.9.1")
5081 (source (origin
5082 (method git-fetch)
5083 (uri (git-reference
5084 (url "https://github.com/codehaus-plexus/modello")
5085 (commit (string-append "modello-" version))))
5086 (file-name (git-file-name name version))
5087 (sha256
5088 (base32
5089 "1di6ni42aqllpdvkpyfcw70352vr2i8wf6hd5nhd9kmqjb5dj5j4"))))
5090 (build-system ant-build-system)
5091 (arguments
5092 `(#:jar-name "modello-core.jar"
5093 #:source-dir "modello-core/src/main/java"
5094 #:test-dir "modello-core/src/test"
5095 #:main-class "org.codehaus.modello.ModelloCli"
5096 #:jdk ,icedtea-8
5097 #:phases
5098 (modify-phases %standard-phases
5099 (add-before 'build 'copy-resources
5100 (lambda _
5101 (mkdir-p "build/classes/META-INF/plexus")
5102 (copy-file "modello-core/src/main/resources/META-INF/plexus/components.xml"
5103 "build/classes/META-INF/plexus/components.xml")
5104 #t))
5105 (add-before 'check 'fix-tests
5106 (lambda _
5107 (with-directory-excursion "modello-core/src/test/java/org/codehaus"
5108 (substitute* '("modello/core/DefaultModelloCoreTest.java"
5109 "modello/core/io/ModelReaderTest.java")
5110 (("src/test") "modello-core/src/test")))
5111 #t)))))
5112 (propagated-inputs
5113 `(("java-plexus-utils" ,java-plexus-utils)
5114 ("java-plexus-container-default" ,java-plexus-container-default)
5115 ("java-sisu-build-api" ,java-sisu-build-api)))
5116 (native-inputs
5117 `(("java-junit" ,java-junit)
5118 ("java-plexus-classworlds" ,java-plexus-classworlds)
5119 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
5120 ("java-guava" ,java-guava)))
5121 (home-page "https://codehaus-plexus.github.io/modello/")
5122 (synopsis "Framework for code generation from a simple model")
5123 (description "Modello is a framework for code generation from a simple model.
5124
5125 Modello generates code from a simple model format: based on a plugin
5126 architecture, various types of code and descriptors can be generated from the
5127 single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers,
5128 XSD and documentation.")
5129 (license (list
5130 license:expat
5131 ;; Although this package uses only files licensed under expat,
5132 ;; other parts of the source are licensed under different
5133 ;; licenses. We include them to be inherited by other packages.
5134 license:asl2.0
5135 ;; Some files in modello-plugin-java are licensed under a
5136 ;; 5-clause BSD license.
5137 (license:non-copyleft
5138 (string-append "file:///modello-plugins/modello-plugin-java/"
5139 "src/main/java/org/codehaus/modello/plugin/"
5140 "java/javasource/JNaming.java"))))))
5141
5142 (define-public java-modello-plugins-java
5143 (package
5144 (inherit java-modello-core)
5145 (name "java-modello-plugins-java")
5146 (arguments
5147 `(#:jar-name "modello-plugins-java.jar"
5148 #:source-dir "modello-plugins/modello-plugin-java/src/main/java"
5149 #:test-dir "modello-plugins/modello-plugin-java/src/test"
5150 #:jdk ,icedtea-8
5151 #:tests? #f; requires maven-model, which depends on this package
5152 #:phases
5153 (modify-phases %standard-phases
5154 (add-before 'build 'copy-resources
5155 (lambda _
5156 (mkdir-p "build/classes")
5157 (copy-recursively "modello-plugins/modello-plugin-java/src/main/resources"
5158 "build/classes")
5159 #t)))))
5160 (inputs
5161 `(("java-modello-core" ,java-modello-core)))
5162 (synopsis "Modello Java Plugin")
5163 (description "Modello Java Plugin generates Java objects for the model.")))
5164
5165 (define-public java-modello-plugins-xml
5166 (package
5167 (inherit java-modello-core)
5168 (name "java-modello-plugins-xml")
5169 (arguments
5170 `(#:jar-name "modello-plugins-xml.jar"
5171 #:source-dir "modello-plugins/modello-plugin-xml/src/main/java"
5172 #:test-dir "modello-plugins/modello-plugin-xml/src/test"
5173 #:jdk ,icedtea-8
5174 #:phases
5175 (modify-phases %standard-phases
5176 (add-before 'build 'copy-resources
5177 (lambda _
5178 (mkdir-p "build/classes")
5179 (copy-recursively
5180 "modello-plugins/modello-plugin-xml/src/main/resources"
5181 "build/classes")
5182 #t))
5183 (add-before 'check 'fix-paths
5184 (lambda _
5185 (with-directory-excursion "modello-plugins/modello-plugin-xml/src/test"
5186 (substitute*
5187 "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java"
5188 (("src/test") "modello-plugins/modello-plugin-xml/src/test")))
5189 #t)))))
5190 (propagated-inputs
5191 `(("java-modello-core" ,java-modello-core)
5192 ("java-modello-plugins-java" ,java-modello-plugins-java)))
5193 (synopsis "Modello XML Plugin")
5194 (description "Modello XML Plugin contains shared code for every plugins
5195 working on XML representation of the model.")))
5196
5197 (define-public java-modello-test
5198 (package
5199 (inherit java-modello-core)
5200 (name "java-modello-test")
5201 (arguments
5202 `(#:jar-name "modello-test.jar"
5203 #:source-dir "modello-test/src/main/java"
5204 #:tests? #f; no tests
5205 #:jdk ,icedtea-8))
5206 (inputs
5207 `(("java-plexus-utils" ,java-plexus-utils)
5208 ("java-plexus-compiler-api" ,java-plexus-compiler-api)
5209 ("java-plexus-compiler-javac" ,java-plexus-compiler-javac)
5210 ("java-plexus-container-default" ,java-plexus-container-default)))
5211 (synopsis "Modello test package")
5212 (description "The modello test package contains the basis to create
5213 Modello generator unit-tests, including sample models and xml files to test
5214 every feature for every plugin.")))
5215
5216 (define-public java-modello-plugins-xpp3
5217 (package
5218 (inherit java-modello-core)
5219 (name "java-modello-plugins-xpp3")
5220 (arguments
5221 `(#:jar-name "modello-plugins-xpp3.jar"
5222 #:source-dir "modello-plugins/modello-plugin-xpp3/src/main/java"
5223 #:test-dir "modello-plugins/modello-plugin-xpp3/src/test"
5224 ;; One of the test dependencies is maven-model which depends on this package.
5225 #:tests? #f
5226 #:jdk ,icedtea-8
5227 #:phases
5228 (modify-phases %standard-phases
5229 (add-before 'build 'copy-resources
5230 (lambda _
5231 (mkdir-p "build/classes")
5232 (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources"
5233 "build/classes")
5234 #t)))))
5235 (propagated-inputs
5236 `(("java-modello-core" ,java-modello-core)
5237 ("java-modello-plugins-java" ,java-modello-plugins-java)
5238 ("java-modello-plugins-xml" ,java-modello-plugins-xml)))
5239 (native-inputs
5240 `(("java-xmlunit" ,java-xmlunit)
5241 ("java-modello-test" ,java-modello-test)
5242 ,@(package-native-inputs java-modello-core)))
5243 (synopsis "Modello XPP3 Plugin")
5244 (description "The modello XPP3 plugin generates XML readers and writers based
5245 on the XPP3 API (XML Pull Parser).")))
5246
5247 (define-public java-asm
5248 (package
5249 (name "java-asm")
5250 (version "6.0")
5251 (source (origin
5252 (method url-fetch)
5253 (uri (string-append "https://download.forge.ow2.org/asm/"
5254 "asm-" version ".tar.gz"))
5255 (sha256
5256 (base32
5257 "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00"))))
5258 (build-system ant-build-system)
5259 (arguments
5260 `(#:build-target "compile"
5261 ;; The tests require an old version of Janino, which no longer compiles
5262 ;; with the JDK7.
5263 #:tests? #f
5264 #:make-flags
5265 (list
5266 ;; We don't need these extra ant tasks, but the build system asks us to
5267 ;; provide a path anyway.
5268 "-Dobjectweb.ant.tasks.path=dummy-path"
5269 ;; The java-aqute.bndlib JAR file will be put onto the classpath and
5270 ;; used during the build automatically by ant-build-system, but
5271 ;; java-asm's build.xml fails unless we provide something here.
5272 "-Dbiz.aQute.bnd.path=dummy-path")
5273 #:phases
5274 (modify-phases %standard-phases
5275 (add-before 'build 'remove-bnd-dependency
5276 (lambda _
5277 ;; This file is the only one to require bnd, and is not needed
5278 ;; because we don't build a bundle.
5279 (delete-file "src/org/objectweb/asm/tools/ModuleInfoBndPlugin.java")
5280 #t))
5281 (add-before 'install 'build-jars
5282 (lambda* (#:key make-flags #:allow-other-keys)
5283 ;; We cannot use the "jar" target because it depends on a couple
5284 ;; of unpackaged, complicated tools.
5285 (mkdir "dist")
5286 (invoke "jar"
5287 "-cf" (string-append "dist/asm-" ,version ".jar")
5288 "-C" "output/build/tmp" ".")))
5289 (add-before 'install 'fix-pom
5290 (lambda _
5291 (substitute* (find-files "archive" "\\.pom$")
5292 (("@product.artifact@") ,version))
5293 #t))
5294 (add-before 'install 'install-parent
5295 (install-pom-file "archive/asm-parent.pom"))
5296 (replace 'install
5297 (install-from-pom "archive/asm.pom")))))
5298 (native-inputs
5299 `(("java-junit" ,java-junit)))
5300 (propagated-inputs
5301 `(("java-org-ow2-parent-pom" ,java-org-ow2-parent-pom-1.3)))
5302 (home-page "https://asm.ow2.io/")
5303 (synopsis "Very small and fast Java bytecode manipulation framework")
5304 (description "ASM is an all purpose Java bytecode manipulation and
5305 analysis framework. It can be used to modify existing classes or dynamically
5306 generate classes, directly in binary form. The provided common
5307 transformations and analysis algorithms allow easily assembling custom
5308 complex transformations and code analysis tools.")
5309 (license license:bsd-3)))
5310
5311 (define java-org-ow2-parent-pom-1.3
5312 (package
5313 (name "java-org-ow2-parent-pom")
5314 (version "1.3")
5315 (source (origin
5316 (method url-fetch)
5317 (uri "https://repo1.maven.org/maven2/org/ow2/ow2/1.3/ow2-1.3.pom")
5318 (sha256
5319 (base32
5320 "1yr8hfx8gffpppa4ii6cvrsq029a6x8hzy7nsavxhs60s9kmq8ai"))))
5321 (build-system ant-build-system)
5322 (arguments
5323 `(#:tests? #f
5324 #:phases
5325 (modify-phases %standard-phases
5326 (delete 'unpack)
5327 (delete 'build)
5328 (delete 'configure)
5329 (replace 'install
5330 (install-pom-file (assoc-ref %build-inputs "source"))))))
5331 (home-page "https://ow2.org")
5332 (synopsis "Ow2.org parent pom")
5333 (description "This package contains the parent pom for projects from ow2.org,
5334 including java-asm.")
5335 (license license:lgpl2.1+)))
5336
5337 (define java-asm-bootstrap
5338 (package
5339 (inherit java-asm)
5340 (name "java-asm-bootstrap")
5341 (arguments
5342 (substitute-keyword-arguments (package-arguments java-asm)
5343 ((#:tests? _) #f)))
5344 (native-inputs `())))
5345
5346 (define-public java-asm-8
5347 (package
5348 (inherit java-asm)
5349 (version "8.0.1")
5350 (source (origin
5351 (method git-fetch)
5352 (uri (git-reference
5353 (url "https://gitlab.ow2.org/asm/asm")
5354 (commit (string-append
5355 "ASM_" (string-join (string-split version #\.)
5356 "_")))))
5357 (file-name (git-file-name "java-asm" version))
5358 (sha256
5359 (base32
5360 "1s6j27zc1i76gh891w2g48b1c3abp9w8zp5j54yb1vm5h8djkd69"))))
5361 (arguments
5362 `(#:jar-name "asm8.jar"
5363 #:source-dir "asm/src/main/java"
5364 #:test-dir "asm/src/test"
5365 ;; tests depend on junit5
5366 #:tests? #f))
5367 (propagated-inputs '())
5368 (native-inputs '())))
5369
5370 (define-public java-asm-tree-8
5371 (package
5372 (inherit java-asm-8)
5373 (name "java-asm-tree")
5374 (arguments
5375 `(#:jar-name "asm-tree.jar"
5376 #:source-dir "asm-tree/src/main/java"
5377 #:test-dir "asm-tree/src/test"
5378 ;; tests depend on junit5
5379 #:tests? #f))
5380 (inputs
5381 `(("java-asm" ,java-asm-8)))))
5382
5383 (define-public java-asm-analysis-8
5384 (package
5385 (inherit java-asm-8)
5386 (name "java-asm-analysis")
5387 (arguments
5388 `(#:jar-name "asm-analysis.jar"
5389 #:source-dir "asm-analysis/src/main/java"
5390 #:test-dir "asm-analysis/src/test"
5391 ;; tests depend on junit5
5392 #:tests? #f))
5393 (inputs
5394 `(("java-asm" ,java-asm-8)
5395 ("java-asm-tree" ,java-asm-tree-8)))))
5396
5397 (define-public java-asm-util-8
5398 (package
5399 (inherit java-asm-8)
5400 (name "java-asm-util")
5401 (arguments
5402 `(#:jar-name "asm-util8.jar"
5403 #:source-dir "asm-util/src/main/java"
5404 #:test-dir "asm-util/src/test"
5405 ;; tests depend on junit5
5406 #:tests? #f))
5407 (inputs
5408 `(("java-asm" ,java-asm-8)
5409 ("java-asm-analysis" ,java-asm-analysis-8)
5410 ("java-asm-tree" ,java-asm-tree-8)))))
5411
5412 (define-public java-cglib
5413 (package
5414 (name "java-cglib")
5415 (version "3.2.4")
5416 (source
5417 (origin
5418 (method git-fetch)
5419 (uri (git-reference
5420 (url "https://github.com/cglib/cglib")
5421 (commit (string-append
5422 "RELEASE_"
5423 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
5424 version)))))
5425 (file-name (git-file-name name version))
5426 (sha256
5427 (base32 "186451jms2zfp47yd8kxd77az2cqal1my2br7klgyp8fpl4qfg8v"))))
5428 (build-system ant-build-system)
5429 (arguments
5430 `(;; FIXME: tests fail because junit runs
5431 ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem
5432 ;; to describe a test at all.
5433 #:tests? #f
5434 #:jar-name "cglib.jar"
5435 #:phases
5436 (modify-phases %standard-phases
5437 (add-after 'unpack 'chdir
5438 (lambda _ (chdir "cglib") #t)))))
5439 (inputs
5440 `(("java-asm" ,java-asm)
5441 ("java-junit" ,java-junit)))
5442 (home-page "https://github.com/cglib/cglib/")
5443 (synopsis "Java byte code generation library")
5444 (description "The byte code generation library CGLIB is a high level API
5445 to generate and transform Java byte code.")
5446 (license license:asl2.0)))
5447
5448 (define-public java-objenesis
5449 (package
5450 (name "java-objenesis")
5451 (version "2.5.1")
5452 (source (origin
5453 (method git-fetch)
5454 (uri (git-reference
5455 (url "https://github.com/easymock/objenesis")
5456 (commit version)))
5457 (file-name (git-file-name name version))
5458 (sha256
5459 (base32
5460 "054yi200wj00x6dp1sxfrwgndwywadsbn8d8ij1j0v45j9g2vdya"))))
5461 (build-system ant-build-system)
5462 (arguments
5463 `(#:jar-name "objenesis.jar"
5464 #:source-dir "main/src/"
5465 #:test-dir "main/src/test/"))
5466 (native-inputs
5467 `(("java-junit" ,java-junit)
5468 ("java-hamcrest-core" ,java-hamcrest-core)))
5469 (home-page "http://objenesis.org/")
5470 (synopsis "Bypass the constructor when creating an object")
5471 (description "Objenesis is a small Java library that serves one purpose:
5472 to instantiate a new object of a particular class. It is common to see
5473 restrictions in libraries stating that classes must require a default
5474 constructor. Objenesis aims to overcome these restrictions by bypassing the
5475 constructor on object instantiation.")
5476 (license license:asl2.0)))
5477
5478 (define-public java-easymock
5479 (package
5480 (name "java-easymock")
5481 (version "3.4")
5482 (source (origin
5483 (method git-fetch)
5484 (uri (git-reference
5485 (url "https://github.com/easymock/easymock/")
5486 (commit (string-append "easymock-" version))))
5487 (file-name (git-file-name name version))
5488 (sha256
5489 (base32
5490 "02vybm8hc0i0n9sp2f2iiqn54zwqhq835f76wc6b2m7819z5a8dq"))))
5491 (build-system ant-build-system)
5492 (arguments
5493 `(#:jar-name "easymock.jar"
5494 #:source-dir "core/src/main"
5495 #:test-dir "core/src/test"
5496 #:phases
5497 (modify-phases %standard-phases
5498 ;; FIXME: Android support requires the following packages to be
5499 ;; available: com.google.dexmaker.stock.ProxyBuilder
5500 (add-after 'unpack 'delete-android-support
5501 (lambda _
5502 (with-directory-excursion "core/src/main/java/org/easymock/internal"
5503 (substitute* "MocksControl.java"
5504 (("AndroidSupport.isAndroid\\(\\)") "false")
5505 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
5506 (delete-file "AndroidClassProxyFactory.java"))
5507 #t))
5508 (add-after 'unpack 'delete-broken-tests
5509 (lambda _
5510 (with-directory-excursion "core/src/test/java/org/easymock"
5511 ;; This test depends on dexmaker.
5512 (delete-file "tests2/ClassExtensionHelperTest.java")
5513
5514 ;; This is not a test.
5515 (delete-file "tests/BaseEasyMockRunnerTest.java")
5516
5517 ;; This test should be executed with a different runner...
5518 (delete-file "tests2/EasyMockAnnotationsTest.java")
5519 ;; ...but deleting it means that we also have to delete these
5520 ;; dependent files.
5521 (delete-file "tests2/EasyMockRunnerTest.java")
5522 (delete-file "tests2/EasyMockRuleTest.java")
5523
5524 ;; This test fails because the file "easymock.properties" does
5525 ;; not exist.
5526 (delete-file "tests2/EasyMockPropertiesTest.java"))
5527 #t)))))
5528 (inputs
5529 `(("java-asm" ,java-asm)
5530 ("java-cglib" ,java-cglib)
5531 ("java-objenesis" ,java-objenesis)))
5532 (native-inputs
5533 `(("java-junit" ,java-junit)
5534 ("java-hamcrest-core" ,java-hamcrest-core)))
5535 (home-page "https://easymock.org/")
5536 (synopsis "Java library providing mock objects for unit tests")
5537 (description "EasyMock is a Java library that provides an easy way to use
5538 mock objects in unit testing.")
5539 (license license:asl2.0)))
5540
5541 (define-public java-jmock-1
5542 (package
5543 (name "java-jmock")
5544 (version "1.2.0")
5545 (source (origin
5546 (method git-fetch)
5547 (uri (git-reference
5548 (url "https://github.com/jmock-developers/jmock-library")
5549 (commit version)))
5550 (file-name (git-file-name name version))
5551 (sha256
5552 (base32
5553 "0lkga995xd9b9mmzxmcd301hlw83p1h78nibh7djlx7wydscr85z"))))
5554 (build-system ant-build-system)
5555 (arguments
5556 `(#:build-target "jars"
5557 #:test-target "run.tests"
5558 #:phases
5559 (modify-phases %standard-phases
5560 (replace 'install (install-jars "build")))))
5561 (home-page "http://jmock.org/")
5562 (synopsis "Mock object library for test-driven development")
5563 (description "JMock is a library that supports test-driven development of
5564 Java code with mock objects. Mock objects help you design and test the
5565 interactions between the objects in your programs.
5566
5567 The jMock library
5568
5569 @itemize
5570 @item makes it quick and easy to define mock objects
5571 @item lets you precisely specify the interactions between
5572 your objects, reducing the brittleness of your tests
5573 @item plugs into your favourite test framework
5574 @item is easy to extend.
5575 @end itemize\n")
5576 (license license:bsd-3)))
5577
5578 (define-public java-jmock
5579 (package
5580 (inherit java-jmock-1)
5581 (name "java-jmock")
5582 (version "2.8.2")
5583 (source (origin
5584 (method git-fetch)
5585 (uri (git-reference
5586 (url "https://github.com/jmock-developers/jmock-library")
5587 (commit version)))
5588 (file-name (git-file-name name version))
5589 (sha256
5590 (base32
5591 "12b7l22g3nrjvf2dzcw3z03fpd2chrgp0d8xkvn8w55rwb57pax6"))))
5592 (inputs
5593 `(("java-hamcrest-all" ,java-hamcrest-all)
5594 ("java-asm" ,java-asm)
5595 ("java-bsh" ,java-bsh)
5596 ("java-junit" ,java-junit)))
5597 (native-inputs
5598 `(("cglib" ,java-cglib)))
5599 (arguments
5600 `(#:jar-name "java-jmock.jar"
5601 #:source-dir "jmock/src/main/java"
5602 #:test-dir "jmock/src/test"))))
5603
5604 (define-public java-jmock-junit4
5605 (package
5606 (inherit java-jmock)
5607 (name "java-jmock-junit4")
5608 (arguments
5609 `(#:jar-name "java-jmock-junit4.jar"
5610 #:source-dir "jmock-junit4/src/main/java"
5611 #:test-dir "jmock-junit4/src/test"))
5612 (inputs
5613 `(("java-hamcrest-all" ,java-hamcrest-all)
5614 ("java-asm" ,java-asm)
5615 ("java-bsh" ,java-bsh)
5616 ("java-jmock" ,java-jmock)
5617 ("java-jumit" ,java-junit)))))
5618
5619 (define-public java-jmock-legacy
5620 (package
5621 (inherit java-jmock)
5622 (name "java-jmock-legacy")
5623 (arguments
5624 `(#:jar-name "java-jmock-legacy.jar"
5625 #:source-dir "jmock-legacy/src/main/java"
5626 #:test-dir "jmock-legacy/src/test"
5627 #:phases
5628 (modify-phases %standard-phases
5629 (add-before 'check 'copy-tests
5630 (lambda _
5631 ;; This file is a dependancy of some tests
5632 (let ((file "org/jmock/test/acceptance/PackageProtectedType.java"))
5633 (copy-file (string-append "jmock/src/test/java/" file)
5634 (string-append "jmock-legacy/src/test/java/" file))
5635 #t))))))
5636 (inputs
5637 `(("java-hamcrest-all" ,java-hamcrest-all)
5638 ("java-objenesis" ,java-objenesis)
5639 ("java-cglib" ,java-cglib)
5640 ("java-jmock" ,java-jmock)
5641 ("java-asm" ,java-asm)
5642 ("java-bsh" ,java-bsh)
5643 ("java-junit" ,java-junit)))
5644 (native-inputs
5645 `(("java-jmock-junit4" ,java-jmock-junit4)))))
5646
5647 (define-public java-hamcrest-all
5648 (package (inherit java-hamcrest-core)
5649 (name "java-hamcrest-all")
5650 (arguments
5651 `(#:jdk ,icedtea-8
5652 ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core)
5653 ((#:build-target _) "bigjar")
5654 ((#:phases phases)
5655 `(modify-phases ,phases
5656 ;; Some build targets override the classpath, so we need to patch
5657 ;; the build.xml to ensure that required dependencies are on the
5658 ;; classpath.
5659 (add-after 'unpack 'patch-classpath-for-integration
5660 (lambda* (#:key inputs #:allow-other-keys)
5661 (substitute* "build.xml"
5662 ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
5663 (string-join
5664 (cons line
5665 (append
5666 (find-files (assoc-ref inputs "java-junit") "\\.jar$")
5667 (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
5668 (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
5669 ";"))
5670 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
5671 (car (find-files (assoc-ref inputs "java-hamcrest-core")
5672 "jar$"))))
5673 #t))
5674 (replace 'install
5675 (lambda* (#:key outputs #:allow-other-keys)
5676 (let* ((target (string-append (assoc-ref outputs "out")
5677 "/share/java/"))
5678 (version-suffix
5679 ,(string-append
5680 "-" (package-version java-hamcrest-core) ".jar"))
5681 (install-without-version-suffix
5682 (lambda (jar)
5683 (copy-file jar
5684 (string-append target
5685 (basename jar version-suffix)
5686 ".jar")))))
5687 (mkdir-p target)
5688 (for-each
5689 install-without-version-suffix
5690 (find-files "build"
5691 (lambda (name _)
5692 (and (string-suffix? ".jar" name)
5693 (not (string-suffix? "-sources.jar" name)))))))
5694 #t)))))))
5695 (inputs
5696 `(("java-junit" ,java-junit)
5697 ("java-jmock" ,java-jmock-1)
5698 ;; This is necessary because of what seems to be a race condition.
5699 ;; This package would sometimes fail to build because hamcrest-core.jar
5700 ;; could not be found, even though it is built as part of this package.
5701 ;; Adding java-hamcrest-core appears to fix this problem. See
5702 ;; https://debbugs.gnu.org/31390 for more information.
5703 ("java-hamcrest-core" ,java-hamcrest-core)
5704 ("java-easymock" ,java-easymock)
5705 ,@(package-inputs java-hamcrest-core)))))
5706
5707 (define-public java-jopt-simple
5708 (package
5709 (name "java-jopt-simple")
5710 (version "5.0.3")
5711 (source (origin
5712 (method url-fetch)
5713 (uri (string-append "http://repo1.maven.org/maven2/"
5714 "net/sf/jopt-simple/jopt-simple/"
5715 version "/jopt-simple-"
5716 version "-sources.jar"))
5717 (sha256
5718 (base32
5719 "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa"))))
5720 (build-system ant-build-system)
5721 (arguments
5722 `(#:tests? #f ; there are no tests
5723 #:jar-name "jopt-simple.jar"))
5724 (home-page "https://pholser.github.io/jopt-simple/")
5725 (synopsis "Java library for parsing command line options")
5726 (description "JOpt Simple is a Java library for parsing command line
5727 options, such as those you might pass to an invocation of @code{javac}. In
5728 the interest of striving for simplicity, as closely as possible JOpt Simple
5729 attempts to honor the command line option syntaxes of POSIX @code{getopt} and
5730 GNU @code{getopt_long}. It also aims to make option parser configuration and
5731 retrieval of options and their arguments simple and expressive, without being
5732 overly clever.")
5733 (license license:expat)))
5734
5735 (define-public java-commons-math3
5736 (package
5737 (name "java-commons-math3")
5738 (version "3.6.1")
5739 (source (origin
5740 (method url-fetch)
5741 (uri (string-append "mirror://apache/commons/math/source/"
5742 "commons-math3-" version "-src.tar.gz"))
5743 (sha256
5744 (base32
5745 "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6"))))
5746 (build-system ant-build-system)
5747 (arguments
5748 `(#:build-target "jar"
5749 #:test-target "test"
5750 #:make-flags
5751 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
5752 (junit (assoc-ref %build-inputs "java-junit")))
5753 (list (string-append "-Djunit.jar="
5754 (car (find-files junit "jar$")))
5755 (string-append "-Dhamcrest.jar="
5756 (car (find-files hamcrest ".*.jar$")))))
5757 #:phases
5758 (modify-phases %standard-phases
5759 ;; We want to build the jar in the build phase and run the tests
5760 ;; later in a separate phase.
5761 (add-after 'unpack 'untangle-targets
5762 (lambda _
5763 (substitute* "build.xml"
5764 (("name=\"jar\" depends=\"test\"")
5765 "name=\"jar\" depends=\"compile\""))
5766 #t))
5767 ;; There is no install target.
5768 (replace 'install
5769 (install-jars "target")))))
5770 (native-inputs
5771 `(("java-junit" ,java-junit)
5772 ("java-hamcrest-core" ,java-hamcrest-core)))
5773 (home-page "https://commons.apache.org/math/")
5774 (synopsis "Apache Commons mathematics library")
5775 (description "Commons Math is a library of lightweight, self-contained
5776 mathematics and statistics components addressing the most common problems not
5777 available in the Java programming language or Commons Lang.")
5778 (license license:asl2.0)))
5779
5780 (define-public java-jmh
5781 (package
5782 (name "java-jmh")
5783 (version "1.17.5")
5784 (source (origin
5785 (method hg-fetch)
5786 (uri (hg-reference
5787 (url "http://hg.openjdk.java.net/code-tools/jmh/")
5788 (changeset version)))
5789 (file-name (string-append name "-" version "-checkout"))
5790 (sha256
5791 (base32
5792 "1fxyxhg9famwcg1prc4cgwb5wzyxqavn3cjm5vz8605xz7x5k084"))))
5793 (build-system ant-build-system)
5794 (arguments
5795 `(#:jar-name "jmh-core.jar"
5796 #:source-dir "jmh-core/src/main"
5797 #:test-dir "jmh-core/src/test"
5798 #:phases
5799 (modify-phases %standard-phases
5800 ;; This seems to be a bug in the JDK. It may not be necessary in
5801 ;; future versions of the JDK.
5802 (add-after 'unpack 'fix-bug
5803 (lambda _
5804 (with-directory-excursion
5805 "jmh-core/src/main/java/org/openjdk/jmh/runner/options"
5806 (substitute* '("IntegerValueConverter.java"
5807 "ThreadsValueConverter.java")
5808 (("public Class<Integer> valueType")
5809 "public Class<? extends Integer> valueType")))
5810 #t)))))
5811 (inputs
5812 `(("java-jopt-simple" ,java-jopt-simple)
5813 ("java-commons-math3" ,java-commons-math3)))
5814 (native-inputs
5815 `(("java-junit" ,java-junit)
5816 ("java-hamcrest-core" ,java-hamcrest-core)))
5817 (home-page "https://openjdk.java.net/projects/code-tools/jmh/")
5818 (synopsis "Benchmark harness for the JVM")
5819 (description "JMH is a Java harness for building, running, and analysing
5820 nano/micro/milli/macro benchmarks written in Java and other languages
5821 targeting the JVM.")
5822 ;; GPLv2 only
5823 (license license:gpl2)))
5824
5825 (define-public java-commons-collections4
5826 (package
5827 (name "java-commons-collections4")
5828 (version "4.1")
5829 (source (origin
5830 (method url-fetch)
5831 (uri (string-append "mirror://apache/commons/collections/source/"
5832 "commons-collections4-" version "-src.tar.gz"))
5833 (sha256
5834 (base32
5835 "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl"))))
5836 (build-system ant-build-system)
5837 (arguments
5838 `(#:test-target "test"
5839 #:make-flags
5840 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
5841 (junit (assoc-ref %build-inputs "java-junit"))
5842 (easymock (assoc-ref %build-inputs "java-easymock")))
5843 (list (string-append "-Djunit.jar="
5844 (car (find-files junit "jar$")))
5845 (string-append "-Dhamcrest.jar="
5846 (car (find-files hamcrest "jar$")))
5847 (string-append "-Deasymock.jar=" easymock
5848 "/share/java/easymock.jar")))
5849 #:phases
5850 (modify-phases %standard-phases
5851 (replace 'install
5852 (install-jars "target")))))
5853 (native-inputs
5854 `(("java-junit" ,java-junit)
5855 ("java-hamcrest-core" ,java-hamcrest-core)
5856 ("java-easymock" ,java-easymock)))
5857 (home-page "https://commons.apache.org/collections/")
5858 (synopsis "Collections framework")
5859 (description "The Java Collections Framework is the recognised standard
5860 for collection handling in Java. Commons-Collections seek to build upon the
5861 JDK classes by providing new interfaces, implementations and utilities. There
5862 are many features, including:
5863
5864 @itemize
5865 @item @code{Bag} interface for collections that have a number of copies of
5866 each object
5867 @item @code{BidiMap} interface for maps that can be looked up from value to
5868 key as well and key to value
5869 @item @code{MapIterator} interface to provide simple and quick iteration over
5870 maps
5871 @item Transforming decorators that alter each object as it is added to the
5872 collection
5873 @item Composite collections that make multiple collections look like one
5874 @item Ordered maps and sets that retain the order elements are added in,
5875 including an LRU based map
5876 @item Reference map that allows keys and/or values to be garbage collected
5877 under close control
5878 @item Many comparator implementations
5879 @item Many iterator implementations
5880 @item Adapter classes from array and enumerations to collections
5881 @item Utilities to test or create typical set-theory properties of collections
5882 such as union, intersection, and closure.
5883 @end itemize\n")
5884 (license license:asl2.0)))
5885
5886 (define-public java-commons-collections
5887 (package
5888 (inherit java-commons-collections4)
5889 (name "java-commons-collections")
5890 (version "3.2.2")
5891 (source (origin
5892 (method url-fetch)
5893 (uri (string-append "mirror://apache/commons/collections/source/"
5894 "commons-collections-" version "-src.tar.gz"))
5895 (sha256
5896 (base32
5897 "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387"))
5898 (patches
5899 (search-patches "java-commons-collections-fix-java8.patch"))))
5900 (arguments
5901 (substitute-keyword-arguments (package-arguments java-commons-collections4)
5902 ((#:phases phases)
5903 `(modify-phases ,phases
5904 ;; The manifest is required by the build procedure
5905 (add-before 'build 'add-manifest
5906 (lambda _
5907 (mkdir-p "build/conf")
5908 (call-with-output-file "build/conf/MANIFEST.MF"
5909 (lambda (file)
5910 (format file "Manifest-Version: 1.0\n")))
5911 #t))
5912 (replace 'install
5913 (install-jars "build"))))))))
5914
5915 (define java-commons-collections-test-classes
5916 (package
5917 (inherit java-commons-collections)
5918 (arguments
5919 `(#:jar-name "commons-collections-test-classes.jar"
5920 #:source-dir "src/test"
5921 #:tests? #f))
5922 (inputs
5923 `(("collection" ,java-commons-collections)))))
5924
5925 (define-public java-commons-beanutils
5926 (package
5927 (name "java-commons-beanutils")
5928 (version "1.9.3")
5929 (source (origin
5930 (method url-fetch)
5931 (uri (string-append "mirror://apache/commons/beanutils/source/"
5932 "commons-beanutils-" version "-src.tar.gz"))
5933 (sha256
5934 (base32
5935 "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk"))))
5936 (build-system ant-build-system)
5937 (arguments
5938 `(#:test-target "test"
5939 #:tests? #f
5940 #:phases
5941 (modify-phases %standard-phases
5942 (replace 'install
5943 (lambda* (#:key outputs #:allow-other-keys)
5944 (rename-file (string-append "dist/commons-beanutils-" ,version
5945 "-SNAPSHOT.jar")
5946 "commons-beanutils.jar")
5947 (install-file "commons-beanutils.jar"
5948 (string-append (assoc-ref outputs "out") "/share/java/"))
5949 #t)))))
5950 (inputs
5951 `(("logging" ,java-commons-logging-minimal)
5952 ("collections" ,java-commons-collections)))
5953 (native-inputs
5954 `(("junit" ,java-junit)
5955 ("collections-test" ,java-commons-collections-test-classes)))
5956 (home-page "https://commons.apache.org/beanutils/")
5957 (synopsis "Dynamically set or get properties in Java")
5958 (description "BeanUtils provides a simplified interface to reflection and
5959 introspection to set or get dynamically determined properties through their
5960 setter and getter method.")
5961 (license license:asl2.0)))
5962
5963 (define-public java-commons-io
5964 (package
5965 (name "java-commons-io")
5966 (version "2.5")
5967 (source
5968 (origin
5969 (method url-fetch)
5970 (uri (string-append "mirror://apache/commons/io/source/"
5971 "commons-io-" version "-src.tar.gz"))
5972 (sha256
5973 (base32
5974 "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3"))))
5975 (build-system ant-build-system)
5976 (outputs '("out" "doc"))
5977 (arguments
5978 `(#:test-target "test"
5979 #:make-flags
5980 (list (string-append "-Djunit.jar="
5981 (car (find-files (assoc-ref %build-inputs "java-junit")
5982 "jar$"))))
5983 #:phases
5984 (modify-phases %standard-phases
5985 (add-after 'build 'build-javadoc ant-build-javadoc)
5986 (replace 'install (install-from-pom "pom.xml"))
5987 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
5988 (native-inputs
5989 `(("java-junit" ,java-junit)
5990 ("java-hamcrest-core" ,java-hamcrest-core)))
5991 (propagated-inputs
5992 `(("apache-commons-parent-pom" ,apache-commons-parent-pom-39)))
5993 (home-page "https://commons.apache.org/io/")
5994 (synopsis "Common useful IO related classes")
5995 (description "Commons-IO contains utility classes, stream implementations,
5996 file filters and endian classes.")
5997 (license license:asl2.0)))
5998
5999 (define-public java-commons-exec-1.1
6000 (package
6001 (name "java-commons-exec")
6002 (version "1.1")
6003 (source
6004 (origin
6005 (method url-fetch)
6006 (uri (string-append "mirror://apache/commons/exec/source/"
6007 "commons-exec-" version "-src.tar.gz"))
6008 (sha256
6009 (base32
6010 "025dk8xgj10lxwwwqp0hng2rn7fr4vcirxzydqzx9k4dim667alk"))))
6011 (build-system ant-build-system)
6012 (arguments
6013 `(#:test-target "test"
6014 #:make-flags
6015 (list (string-append "-Dmaven.junit.jar="
6016 (car (find-files (assoc-ref %build-inputs "java-junit")
6017 "jar$"))))
6018 #:phases
6019 (modify-phases %standard-phases
6020 (add-before 'build 'delete-network-tests
6021 (lambda _
6022 (delete-file "src/test/java/org/apache/commons/exec/DefaultExecutorTest.java")
6023 (substitute* "src/test/java/org/apache/commons/exec/TestRunner.java"
6024 (("suite\\.addTestSuite\\(DefaultExecutorTest\\.class\\);") ""))
6025 #t))
6026 ;; The "build" phase automatically tests.
6027 (delete 'check)
6028 (replace 'install (install-jars "target")))))
6029 (native-inputs
6030 `(("java-junit" ,java-junit)))
6031 (home-page "https://commons.apache.org/proper/commons-exec/")
6032 (synopsis "Common program execution related classes")
6033 (description "Commons-Exec simplifies executing external processes.")
6034 (license license:asl2.0)))
6035
6036 (define-public java-commons-exec
6037 (package
6038 (inherit java-commons-exec-1.1)
6039 (version "1.3")
6040 (source
6041 (origin
6042 (method url-fetch)
6043 (uri (string-append "mirror://apache/commons/exec/source/"
6044 "commons-exec-" version "-src.tar.gz"))
6045 (sha256
6046 (base32
6047 "17yb4h6f8l49c5iyyvda4z2nmw0bxrx857nrwmsr7mmpb7x441yv"))))
6048 (arguments
6049 `(#:test-target "test"
6050 #:make-flags
6051 (list (string-append "-Dmaven.junit.jar="
6052 (car (find-files (assoc-ref %build-inputs "java-junit")
6053 "jar$")))
6054 "-Dmaven.compiler.source=1.7"
6055 "-Dmaven.compiler.target=1.7")
6056 #:phases
6057 (modify-phases %standard-phases
6058 (add-before 'build 'delete-network-tests
6059 (lambda* (#:key inputs #:allow-other-keys)
6060 ;; This test hangs indefinitely.
6061 (delete-file "src/test/java/org/apache/commons/exec/issues/Exec60Test.java")
6062 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec41Test.java"
6063 (("ping -c 10 127.0.0.1") "sleep 10"))
6064 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec49Test.java"
6065 (("/bin/ls") "ls"))
6066 (call-with-output-file "src/test/scripts/ping.sh"
6067 (lambda (port)
6068 (format port "#!~a/bin/sh\nsleep $1\n"
6069 (assoc-ref inputs "bash"))))
6070 #t))
6071 ;; The "build" phase automatically tests.
6072 (delete 'check)
6073 (replace 'install (install-jars "target")))))
6074 (native-inputs
6075 `(("java-junit" ,java-junit)
6076 ("java-hamcrest-core" ,java-hamcrest-core)))))
6077
6078 (define-public java-commons-lang
6079 (package
6080 (name "java-commons-lang")
6081 (version "2.6")
6082 (source
6083 (origin
6084 (method url-fetch)
6085 (uri (string-append "mirror://apache/commons/lang/source/"
6086 "commons-lang-" version "-src.tar.gz"))
6087 (sha256
6088 (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5"))))
6089 (build-system ant-build-system)
6090 (outputs '("out" "doc"))
6091 (arguments
6092 `(#:test-target "test"
6093 #:test-exclude (list "**/Abstract*.java" "**/Random*.java")
6094 #:phases
6095 (modify-phases %standard-phases
6096 (add-after 'build 'build-javadoc ant-build-javadoc)
6097 (add-before 'check 'disable-failing-test
6098 (lambda _
6099 ;; Disable a failing test
6100 (substitute* "src/test/java/org/apache/commons/lang/\
6101 time/FastDateFormatTest.java"
6102 (("public void testFormat\\(\\)")
6103 "public void disabled_testFormat()"))
6104 #t))
6105 (replace 'install (install-jars "target"))
6106 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
6107 (native-inputs
6108 `(("java-junit" ,java-junit)))
6109 (home-page "https://commons.apache.org/lang/")
6110 (synopsis "Extension of the java.lang package")
6111 (description "The Commons Lang components contains a set of Java classes
6112 that provide helper methods for standard Java classes, especially those found
6113 in the @code{java.lang} package in the Sun JDK. The following classes are
6114 included:
6115
6116 @itemize
6117 @item StringUtils - Helper for @code{java.lang.String}.
6118 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets
6119 of characters such as @code{[a-z]} and @code{[abcdez]}.
6120 @item RandomStringUtils - Helper for creating randomised strings.
6121 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
6122 @item NumberRange - A range of numbers with an upper and lower bound.
6123 @item ObjectUtils - Helper for @code{java.lang.Object}.
6124 @item SerializationUtils - Helper for serializing objects.
6125 @item SystemUtils - Utility class defining the Java system properties.
6126 @item NestedException package - A sub-package for the creation of nested
6127 exceptions.
6128 @item Enum package - A sub-package for the creation of enumerated types.
6129 @item Builder package - A sub-package for the creation of @code{equals},
6130 @code{hashCode}, @code{compareTo} and @code{toString} methods.
6131 @end itemize\n")
6132 (license license:asl2.0)))
6133
6134 (define-public java-commons-lang3
6135 (package
6136 (name "java-commons-lang3")
6137 (version "3.9")
6138 (source
6139 (origin
6140 (method url-fetch)
6141 (uri (string-append "mirror://apache/commons/lang/source/"
6142 "commons-lang3-" version "-src.tar.gz"))
6143 (sha256
6144 (base32 "0s4ffbvsyl16c90l45ximsg4dwd8hmz7wsza3p308fw43h6mwhb6"))))
6145 (build-system ant-build-system)
6146 (arguments
6147 `(#:jar-name "commons-lang3.jar"
6148 #:source-dir "src/main/java"
6149 #:tests? #f; require junit5
6150 #:phases
6151 (modify-phases %standard-phases
6152 (replace 'install (install-from-pom "pom.xml")))))
6153 (propagated-inputs
6154 `(("apache-commons-parent-pom" ,apache-commons-parent-pom-48)))
6155 (home-page "https://commons.apache.org/lang/")
6156 (synopsis "Extension of the java.lang package")
6157 (description "The Commons Lang components contains a set of Java classes
6158 that provide helper methods for standard Java classes, especially those found
6159 in the @code{java.lang} package. The following classes are included:
6160
6161 @itemize
6162 @item StringUtils - Helper for @code{java.lang.String}.
6163 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of
6164 characters such as @code{[a-z]} and @code{[abcdez]}.
6165 @item RandomStringUtils - Helper for creating randomised strings.
6166 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
6167 @item NumberRange - A range of numbers with an upper and lower bound.
6168 @item ObjectUtils - Helper for @code{java.lang.Object}.
6169 @item SerializationUtils - Helper for serializing objects.
6170 @item SystemUtils - Utility class defining the Java system properties.
6171 @item NestedException package - A sub-package for the creation of nested
6172 exceptions.
6173 @item Enum package - A sub-package for the creation of enumerated types.
6174 @item Builder package - A sub-package for the creation of @code{equals},
6175 @code{hashCode}, @code{compareTo} and @code{toString} methods.
6176 @end itemize\n")
6177 (license license:asl2.0)))
6178
6179 (define-public java-commons-bsf
6180 (package
6181 (name "java-commons-bsf")
6182 (version "2.4.0")
6183 (source (origin
6184 (method url-fetch)
6185 (uri (string-append "mirror://apache/commons/bsf/source/bsf-src-"
6186 version ".tar.gz"))
6187 (sha256
6188 (base32
6189 "1sbamr8jl32p1jgf59nw0b2w9qivyg145954hm6ly54cfgsqrdas"))
6190 (modules '((guix build utils)))
6191 (snippet
6192 '(begin
6193 (for-each delete-file
6194 (find-files "." "\\.jar$"))
6195 #t))))
6196 (build-system ant-build-system)
6197 (arguments
6198 `(#:build-target "jar"
6199 #:tests? #f; No test file
6200 #:modules ((guix build ant-build-system)
6201 (guix build utils)
6202 (guix build java-utils)
6203 (sxml simple))
6204 #:phases
6205 (modify-phases %standard-phases
6206 (add-before 'build 'create-properties
6207 (lambda _
6208 ;; This file is missing from the distribution
6209 (call-with-output-file "build-properties.xml"
6210 (lambda (port)
6211 (sxml->xml
6212 `(project (@ (basedir ".") (name "build-properties") (default ""))
6213 (property (@ (name "project.name") (value "bsf")))
6214 (property (@ (name "source.level") (value "1.5")))
6215 (property (@ (name "build.lib") (value "build/jar")))
6216 (property (@ (name "src.dir") (value "src")))
6217 (property (@ (name "tests.dir") (value "src/org/apache/bsf/test")))
6218 (property (@ (name "build.tests") (value "build/test-classes")))
6219 (property (@ (name "build.dest") (value "build/classes"))))
6220 port)))
6221 #t))
6222 (replace 'install (install-jars "build")))))
6223 (native-inputs
6224 `(("java-junit" ,java-junit)))
6225 (inputs
6226 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
6227 (home-page "https://commons.apache.org/proper/commons-bsf")
6228 (synopsis "Bean Scripting Framework")
6229 (description "The Bean Scripting Framework (BSF) is a set of Java classes
6230 which provides scripting language support within Java applications, and access
6231 to Java objects and methods from scripting languages. BSF allows one to write
6232 JSPs in languages other than Java while providing access to the Java class
6233 library. In addition, BSF permits any Java application to be implemented in
6234 part (or dynamically extended) by a language that is embedded within it. This
6235 is achieved by providing an API that permits calling scripting language engines
6236 from within Java, as well as an object registry that exposes Java objects to
6237 these scripting language engines.")
6238 (license license:asl2.0)))
6239
6240 (define-public java-commons-jxpath
6241 (package
6242 (name "java-commons-jxpath")
6243 (version "1.3")
6244 (source (origin
6245 (method url-fetch)
6246 (uri (string-append "mirror://apache/commons/jxpath/source/"
6247 "commons-jxpath-" version "-src.tar.gz"))
6248 (sha256
6249 (base32
6250 "1rpgg31ayn9fwr4bfi2i1ij0npcg79ad2fv0w9hacvawsyc42cfs"))))
6251 (build-system ant-build-system)
6252 (arguments
6253 `(#:jar-name "commons-jxpath.jar"
6254 ;; tests require more dependencies, including mockrunner which depends on old software
6255 #:tests? #f
6256 #:source-dir "src/java"))
6257 (inputs
6258 `(("servlet" ,java-classpathx-servletapi)
6259 ("java-jdom" ,java-jdom)
6260 ("java-commons-beanutils" ,java-commons-beanutils)))
6261 (native-inputs
6262 `(("java-junit" ,java-junit)))
6263 (home-page "https://commons.apache.org/jxpath/")
6264 (synopsis "Simple interpreter of an expression language called XPath.")
6265 (description "The org.apache.commons.jxpath package defines a simple
6266 interpreter of an expression language called XPath. JXPath applies XPath
6267 expressions to graphs of objects of all kinds: JavaBeans, Maps, Servlet
6268 contexts, DOM etc, including mixtures thereof.")
6269 (license license:asl2.0)))
6270
6271 (define-public java-commons-pool
6272 (package
6273 (name "java-commons-pool")
6274 (version "2.6.2")
6275 (source (origin
6276 (method url-fetch)
6277 (uri (string-append "mirror://apache/commons/pool/source/"
6278 "commons-pool2-" version "-src.tar.gz"))
6279 (sha256
6280 (base32
6281 "1fi1hgqmq01bs6azbj3sfswxzadp2r8sjjfiq6ryilz1m50kvrv6"))))
6282 (arguments
6283 `(#:jar-name "common-pool.jar"
6284 #:source-dir "src/main/java"
6285 #:test-exclude
6286 (list "**/PerformanceTest.java")))
6287 (build-system ant-build-system)
6288 (inputs
6289 `(("java-cglib" ,java-cglib)))
6290 (native-inputs
6291 `(("java-junit" ,java-junit)
6292 ("java-hamcrest-core" ,java-hamcrest-core)
6293 ("java-asm" ,java-asm)
6294 ("java-objenesis" ,java-objenesis)))
6295 (home-page "https://commons.apache.org/proper/commons-pool/")
6296 (synopsis "Object-pooling API in Java")
6297 (description "The commons-pool package provides an object-pooling API
6298 and a number of object pool implementations. This package defines a
6299 handful of pooling interfaces and some base classes that may be useful when
6300 creating new pool implementations.")
6301 (license license:asl2.0)))
6302
6303 (define-public java-commons-dbcp
6304 (package
6305 (name "java-commons-dbcp")
6306 (version "2.6.0")
6307 (source (origin
6308 (method url-fetch)
6309 (uri (string-append "mirror://apache/commons/dbcp/source/"
6310 "commons-dbcp2-" version "-src.tar.gz"))
6311 (sha256
6312 (base32
6313 "0axbvcbnf2l70fc3ybrlp3siw2w4ka9mia2pnx4py8gz54cpw3rc"))))
6314 (arguments
6315 `(#:source-dir "src/main/java"
6316 #:jar-name "java-commons-dbcp.jar"
6317 #:tests? #f)); requires apache-geronimo
6318 (inputs
6319 `(("java-commons-pool" ,java-commons-pool)
6320 ("java-commons-logging" ,java-commons-logging-minimal)
6321 ("java-jboss-transaction-api-spec" ,java-jboss-transaction-api-spec)))
6322 (native-inputs
6323 `(("java-junit" ,java-junit)))
6324 (build-system ant-build-system)
6325 (home-page "https://commons.apache.org/proper/commons-dbcp/")
6326 (synopsis "Database Connection Pool for Java")
6327 (description "Commons-dbcp allows you to share a pool of database
6328 connections between users. Creating a new connection for each user can be
6329 time consuming and even unfeasible when the number of simultaneous users is
6330 very large. This package provides a way to share a poole of connections to
6331 reduce that load.")
6332 (license license:asl2.0)))
6333
6334 (define-public java-commons-jcs
6335 (package
6336 (name "java-commons-jcs")
6337 (version "2.2.1")
6338 (source (origin
6339 (method url-fetch)
6340 (uri (string-append "mirror://apache/commons/jcs/source/"
6341 "commons-jcs-dist-" version "-src.tar.gz"))
6342 (sha256
6343 (base32
6344 "0syhq2npjbrl0azqfjm0gvash1qd5qjy4qmysxcrqjsk0nf9fa1q"))))
6345 (build-system ant-build-system)
6346 (arguments
6347 `(#:jar-name "commons-jcs.jar"
6348 #:source-dir "commons-jcs-core/src/main/java"
6349 #:test-dir "commons-jcs-core/src/test"
6350 #:tests? #f; requires hsqldb
6351 #:phases
6352 (modify-phases %standard-phases
6353 (add-before 'build 'prepare
6354 (lambda _
6355 (with-directory-excursion
6356 "commons-jcs-core/src/main/java/org/apache/commons/jcs"
6357 (substitute*
6358 "auxiliary/disk/jdbc/dsfactory/SharedPoolDataSourceFactory.java"
6359 (("commons.dbcp") "commons.dbcp2")
6360 ((".*\\.setMaxActive.*") ""))
6361 ;;; Remove dependency on velocity-tools
6362 (delete-file "admin/servlet/JCSAdminServlet.java"))
6363 #t)))))
6364 (propagated-inputs
6365 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
6366 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
6367 ("java-commons-httpclient" ,java-commons-httpclient)
6368 ("java-commons-dbcp" ,java-commons-dbcp)))
6369 (native-inputs
6370 `(("java-junit" ,java-junit)))
6371 (home-page "https://commons.apache.org/proper/commons-jcs/")
6372 (synopsis "Distributed caching system in Java")
6373 (description "JCS is a distributed caching system written in Java. It
6374 is intended to speed up applications by providing a means to manage cached
6375 data of various dynamic natures. Like any caching system, JCS is most useful
6376 for high read, low put applications. Latency times drop sharply and
6377 bottlenecks move away from the database in an effectively cached system.")
6378 (license license:asl2.0)))
6379
6380 (define-public java-jsr250
6381 (package
6382 (name "java-jsr250")
6383 (version "1.3")
6384 (source (origin
6385 (method url-fetch)
6386 (uri (string-append "https://repo1.maven.org/maven2/"
6387 "javax/annotation/javax.annotation-api/"
6388 version "/javax.annotation-api-"
6389 version "-sources.jar"))
6390 (sha256
6391 (base32
6392 "08clh8n4n9wfglf75qsqfjs6yf79f7x6hqx38cn856pksszv50kz"))))
6393 (build-system ant-build-system)
6394 (arguments
6395 `(#:tests? #f ; no tests included
6396 #:jdk ,icedtea-8
6397 #:jar-name "jsr250.jar"
6398 #:modules ((guix build ant-build-system)
6399 (guix build utils)
6400 (guix build maven pom)
6401 (guix build java-utils)
6402 (sxml simple))
6403 #:phases
6404 (modify-phases %standard-phases
6405 (add-before 'install 'create-pom
6406 (lambda _
6407 (with-output-to-file "pom.xml"
6408 (lambda _
6409 (sxml->xml
6410 `((project
6411 (modelVersion "4.0.0")
6412 (name "jsr250")
6413 (groupId "javax.annotation")
6414 (artifactId "jsr250-api")
6415 (version ,,version))))))
6416 #t))
6417 (replace 'install
6418 (install-from-pom "pom.xml")))))
6419 (home-page "https://jcp.org/en/jsr/detail?id=250")
6420 (synopsis "Security-related annotations")
6421 (description "This package provides annotations for security. It provides
6422 packages in the @code{javax.annotation} and @code{javax.annotation.security}
6423 namespaces.")
6424 ;; either cddl or gpl2 only, with classpath exception
6425 (license (list license:cddl1.0
6426 license:gpl2))))
6427
6428 (define-public java-jsr305
6429 (package
6430 (name "java-jsr305")
6431 (version "3.0.1")
6432 (source (origin
6433 (method url-fetch)
6434 (uri (string-append "https://repo1.maven.org/maven2/"
6435 "com/google/code/findbugs/"
6436 "jsr305/" version "/jsr305-"
6437 version "-sources.jar"))
6438 (sha256
6439 (base32
6440 "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n"))))
6441 (build-system ant-build-system)
6442 (arguments
6443 `(#:tests? #f ; no tests included
6444 #:jar-name "jsr305.jar"
6445 #:modules ((guix build ant-build-system)
6446 (guix build java-utils)
6447 (guix build maven pom)
6448 (guix build utils)
6449 (sxml simple))
6450 #:phases
6451 (modify-phases %standard-phases
6452 (add-before 'install 'create-pom
6453 (lambda _
6454 (with-output-to-file "pom.xml"
6455 (lambda _
6456 (sxml->xml
6457 `((project
6458 (modelVersion "4.0.0")
6459 (name "jsr305")
6460 (groupId "com.google.code.findbugs")
6461 (artifactId "jsr305")
6462 (version ,,version))))))
6463 #t))
6464 (replace 'install
6465 (install-from-pom "pom.xml")))))
6466 (home-page "http://findbugs.sourceforge.net/")
6467 (synopsis "Annotations for the static analyzer called findbugs")
6468 (description "This package provides annotations for the findbugs package.
6469 It provides packages in the @code{javax.annotations} namespace.")
6470 (license license:asl2.0)))
6471
6472 (define-public java-guava
6473 (package
6474 (name "java-guava")
6475 ;; This is the last release of Guava that can be built with Java 7.
6476 (version "20.0")
6477 (source (origin
6478 (method git-fetch)
6479 (uri (git-reference
6480 (url "https://github.com/google/guava/")
6481 (commit (string-append "v" version))))
6482 (file-name (git-file-name name version))
6483 (sha256
6484 (base32
6485 "00h5cawdjic1vind3yivzh1f58flvm1yfmhsyqwyvmbvj1vakysp"))))
6486 (build-system ant-build-system)
6487 (arguments
6488 `(#:tests? #f ; no tests included
6489 #:jar-name "guava.jar"
6490 #:source-dir "guava/src"
6491 #:phases
6492 (modify-phases %standard-phases
6493 (add-after 'unpack 'trim-sources
6494 (lambda _
6495 (with-directory-excursion "guava/src/com/google/common"
6496 ;; Remove annotations to avoid extra dependencies:
6497 ;; * "j2objc" annotations are used when converting Java to
6498 ;; Objective C;
6499 ;; * "errorprone" annotations catch common Java mistakes at
6500 ;; compile time;
6501 ;; * "IgnoreJRERequirement" is used for Android.
6502 (substitute* (find-files "." "\\.java$")
6503 (("import com.google.j2objc.*") "")
6504 (("import com.google.errorprone.annotation.*") "")
6505 (("import org.codehaus.mojo.animal_sniffer.*") "")
6506 (("@CanIgnoreReturnValue") "")
6507 (("@LazyInit") "")
6508 (("@WeakOuter") "")
6509 (("@RetainedWith") "")
6510 (("@Weak") "")
6511 (("@ForOverride") "")
6512 (("@J2ObjCIncompatible") "")
6513 (("@IgnoreJRERequirement") "")))
6514 #t))
6515 (replace 'install (install-from-pom "guava/pom.xml")))))
6516 (inputs
6517 `(("java-jsr305" ,java-jsr305)))
6518 (propagated-inputs
6519 `(("java-guava-parent-pom" ,java-guava-parent-pom)))
6520 (home-page "https://github.com/google/guava")
6521 (synopsis "Google core libraries for Java")
6522 (description "Guava is a set of core libraries that includes new
6523 collection types (such as multimap and multiset), immutable collections, a
6524 graph library, functional types, an in-memory cache, and APIs/utilities for
6525 concurrency, I/O, hashing, primitives, reflection, string processing, and much
6526 more!")
6527 (license license:asl2.0)))
6528
6529 (define java-guava-parent-pom
6530 (package
6531 (inherit java-guava)
6532 (name "java-guava-parent-pom")
6533 (arguments
6534 `(#:tests? #f
6535 #:phases
6536 (modify-phases %standard-phases
6537 (delete 'configure)
6538 (delete 'build)
6539 (replace 'install
6540 (install-pom-file "pom.xml")))))
6541 (propagated-inputs
6542 `(("java-sonatype-oss-parent-pom" ,java-sonatype-oss-parent-pom-7)))))
6543
6544 ;; The java-commons-logging package provides adapters to many different
6545 ;; logging frameworks. To avoid an excessive dependency graph we try to build
6546 ;; it with only a minimal set of adapters.
6547 (define-public java-commons-logging-minimal
6548 (package
6549 (name "java-commons-logging-minimal")
6550 (version "1.2")
6551 (source (origin
6552 (method url-fetch)
6553 (uri (string-append "mirror://apache/commons/logging/source/"
6554 "commons-logging-" version "-src.tar.gz"))
6555 (sha256
6556 (base32
6557 "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9"))))
6558 (build-system ant-build-system)
6559 (arguments
6560 `(#:tests? #f ; avoid dependency on logging frameworks
6561 #:jar-name "commons-logging-minimal.jar"
6562 #:phases
6563 (modify-phases %standard-phases
6564 (add-after 'unpack 'delete-adapters-and-tests
6565 (lambda _
6566 ;; Delete all adapters except for NoOpLog, SimpleLog, and
6567 ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl
6568 ;; is used by applications; SimpleLog is the only actually usable
6569 ;; implementation that does not depend on another logging
6570 ;; framework.
6571 (for-each
6572 (lambda (file)
6573 (delete-file (string-append
6574 "src/main/java/org/apache/commons/logging/impl/" file)))
6575 (list "Jdk13LumberjackLogger.java"
6576 "WeakHashtable.java"
6577 "Log4JLogger.java"
6578 "ServletContextCleaner.java"
6579 "Jdk14Logger.java"
6580 "AvalonLogger.java"
6581 "LogKitLogger.java"))
6582 (delete-file-recursively "src/test")
6583 #t)))))
6584 (home-page "https://commons.apache.org/logging/")
6585 (synopsis "Common API for logging implementations")
6586 (description "The Logging package is a thin bridge between different
6587 logging implementations. A library that uses the commons-logging API can be
6588 used with any logging implementation at runtime.")
6589 (license license:asl2.0)))
6590
6591 ;; This is the last release of the 1.x series.
6592 (define-public java-mockito-1
6593 (package
6594 (name "java-mockito")
6595 (version "1.10.19")
6596 (source (origin
6597 (method url-fetch)
6598 (uri (string-append "http://repo1.maven.org/maven2/"
6599 "org/mockito/mockito-core/" version
6600 "/mockito-core-" version "-sources.jar"))
6601 (sha256
6602 (base32
6603 "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc"))))
6604 (build-system ant-build-system)
6605 (arguments
6606 `(#:jar-name "mockito.jar"
6607 #:tests? #f ; no tests included
6608 ;; FIXME: patch-and-repack does not support jars, so we have to apply
6609 ;; patches in build phases.
6610 #:phases
6611 (modify-phases %standard-phases
6612 ;; Mockito was developed against a different version of hamcrest,
6613 ;; which does not require matcher implementations to provide an
6614 ;; implementation of the "describeMismatch" method. We add this
6615 ;; simple definition to pass the build with our version of hamcrest.
6616 (add-after 'unpack 'fix-hamcrest-build-error
6617 (lambda _
6618 (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java"
6619 (("public Matcher getActualMatcher\\(\\) .*" line)
6620 (string-append "
6621 public void describeMismatch(Object item, Description description) {
6622 actualMatcher.describeMismatch(item, description);
6623 }"
6624 line)))
6625 #t))
6626 ;; Mockito bundles cglib. We have a cglib package, so let's use
6627 ;; that instead.
6628 (add-after 'unpack 'use-system-libraries
6629 (lambda _
6630 (with-directory-excursion "src/org/mockito/internal/creation/cglib"
6631 (substitute* '("CGLIBHacker.java"
6632 "CglibMockMaker.java"
6633 "ClassImposterizer.java"
6634 "DelegatingMockitoMethodProxy.java"
6635 "MethodInterceptorFilter.java"
6636 "MockitoNamingPolicy.java"
6637 "SerializableMockitoMethodProxy.java"
6638 "SerializableNoOp.java")
6639 (("import org.mockito.cglib") "import net.sf.cglib")))
6640 #t)))))
6641 (inputs
6642 `(("java-junit" ,java-junit)
6643 ("java-objenesis" ,java-objenesis)
6644 ("java-cglib" ,java-cglib)
6645 ("java-hamcrest-core" ,java-hamcrest-core)))
6646 (home-page "http://mockito.org")
6647 (synopsis "Mockito is a mock library for Java")
6648 (description "Mockito is a mocking library for Java which lets you write
6649 tests with a clean and simple API. It generates mocks using reflection, and
6650 it records all mock invocations, including methods arguments.")
6651 (license license:asl2.0)))
6652
6653 (define-public java-httpcomponents-httpcore
6654 (package
6655 (name "java-httpcomponents-httpcore")
6656 (version "4.4.6")
6657 (source (origin
6658 (method url-fetch)
6659 (uri (string-append "mirror://apache//httpcomponents/httpcore/"
6660 "source/httpcomponents-core-"
6661 version "-src.tar.gz"))
6662 (sha256
6663 (base32
6664 "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy"))))
6665 (build-system ant-build-system)
6666 (arguments
6667 `(#:jar-name "httpcomponents-httpcore.jar"
6668 #:phases
6669 (modify-phases %standard-phases
6670 (add-after 'unpack 'chdir
6671 (lambda _ (chdir "httpcore") #t)))))
6672 (inputs
6673 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
6674 ("java-commons-lang3" ,java-commons-lang3)))
6675 (native-inputs
6676 `(("java-junit" ,java-junit)
6677 ("java-mockito" ,java-mockito-1)))
6678 (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html")
6679 (synopsis "Low level HTTP transport components")
6680 (description "HttpCore is a set of low level HTTP transport components
6681 that can be used to build custom client and server side HTTP services with a
6682 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
6683 on the classic Java I/O and non-blocking, event driven I/O model based on Java
6684 NIO.
6685
6686 This package provides the blocking I/O model library.")
6687 (license license:asl2.0)))
6688
6689 (define-public java-httpcomponents-httpcore-nio
6690 (package (inherit java-httpcomponents-httpcore)
6691 (name "java-httpcomponents-httpcore-nio")
6692 (arguments
6693 `(#:jar-name "httpcomponents-httpcore-nio.jar"
6694 #:phases
6695 (modify-phases %standard-phases
6696 (add-after 'unpack 'chdir
6697 (lambda _ (chdir "httpcore-nio") #t)))))
6698 (inputs
6699 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
6700 ("java-hamcrest-core" ,java-hamcrest-core)
6701 ,@(package-inputs java-httpcomponents-httpcore)))
6702 (description "HttpCore is a set of low level HTTP transport components
6703 that can be used to build custom client and server side HTTP services with a
6704 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
6705 on the classic Java I/O and non-blocking, event driven I/O model based on Java
6706 NIO.
6707
6708 This package provides the non-blocking I/O model library based on Java
6709 NIO.")))
6710
6711 (define-public java-httpcomponents-httpcore-ab
6712 (package (inherit java-httpcomponents-httpcore)
6713 (name "java-httpcomponents-httpcore-ab")
6714 (arguments
6715 `(#:jar-name "httpcomponents-httpcore-ab.jar"
6716 #:phases
6717 (modify-phases %standard-phases
6718 (add-after 'unpack 'chdir
6719 (lambda _ (chdir "httpcore-ab") #t)))))
6720 (inputs
6721 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
6722 ("java-commons-cli" ,java-commons-cli)
6723 ("java-hamcrest-core" ,java-hamcrest-core)
6724 ,@(package-inputs java-httpcomponents-httpcore)))
6725 (synopsis "Apache HttpCore benchmarking tool")
6726 (description "This package provides the HttpCore benchmarking tool. It is
6727 an Apache AB clone based on HttpCore.")))
6728
6729 (define-public java-httpcomponents-httpclient
6730 (package
6731 (name "java-httpcomponents-httpclient")
6732 (version "4.5.12")
6733 (source (origin
6734 (method url-fetch)
6735 (uri (string-append "mirror://apache/httpcomponents/httpclient/"
6736 "source/httpcomponents-client-"
6737 version "-src.tar.gz"))
6738 (sha256
6739 (base32
6740 "1va99m2zc2liv0v9vn72p5ja8yz4s5wq7zpahaai5nr966kvxzkb"))))
6741 (build-system ant-build-system)
6742 (arguments
6743 `(#:jar-name "httpcomponents-httpclient.jar"
6744 #:phases
6745 (modify-phases %standard-phases
6746 (add-after 'unpack 'chdir
6747 (lambda _ (chdir "httpclient") #t)))))
6748 (inputs
6749 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
6750 ("java-commons-codec" ,java-commons-codec)
6751 ("java-hamcrest-core" ,java-hamcrest-core)
6752 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
6753 ("java-mockito" ,java-mockito-1)
6754 ("java-junit" ,java-junit)))
6755 (home-page "https://hc.apache.org/httpcomponents-client-ga/")
6756 (synopsis "HTTP client library for Java")
6757 (description "Although the @code{java.net} package provides basic
6758 functionality for accessing resources via HTTP, it doesn't provide the full
6759 flexibility or functionality needed by many applications. @code{HttpClient}
6760 seeks to fill this void by providing an efficient, up-to-date, and
6761 feature-rich package implementing the client side of the most recent HTTP
6762 standards and recommendations.")
6763 (license license:asl2.0)))
6764
6765 (define-public java-httpcomponents-httpmime
6766 (package (inherit java-httpcomponents-httpclient)
6767 (name "java-httpcomponents-httpmime")
6768 (arguments
6769 `(#:jar-name "httpcomponents-httpmime.jar"
6770 #:phases
6771 (modify-phases %standard-phases
6772 (add-after 'unpack 'chdir
6773 (lambda _ (chdir "httpmime") #t)))))
6774 (inputs
6775 `(("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient)
6776 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
6777 ("java-junit" ,java-junit)
6778 ("java-hamcrest-core" ,java-hamcrest-core)))))
6779
6780 (define-public java-commons-net
6781 (package
6782 (name "java-commons-net")
6783 (version "3.6")
6784 (source (origin
6785 (method url-fetch)
6786 (uri (string-append "mirror://apache/commons/net/source/"
6787 "commons-net-" version "-src.tar.gz"))
6788 (sha256
6789 (base32
6790 "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr"))))
6791 (build-system ant-build-system)
6792 (arguments
6793 `(;; FIXME: MainTest.java tries to read "examples.properties" (which
6794 ;; should be "resources/examples/examples.properties"), but gets "null"
6795 ;; instead.
6796 #:tests? #f
6797 #:jar-name "commons-net.jar"))
6798 (native-inputs
6799 `(("java-junit" ,java-junit)
6800 ("java-hamcrest-core" ,java-hamcrest-core)))
6801 (home-page "https://commons.apache.org/net/")
6802 (synopsis "Client library for many basic Internet protocols")
6803 (description "The Apache Commons Net library implements the client side of
6804 many basic Internet protocols. The purpose of the library is to provide
6805 fundamental protocol access, not higher-level abstractions.")
6806 (license license:asl2.0)))
6807
6808 (define-public java-jsch
6809 (package
6810 (name "java-jsch")
6811 (version "0.1.55")
6812 (source (origin
6813 (method url-fetch)
6814 (uri (string-append "mirror://sourceforge/jsch/jsch/"
6815 version "/jsch-" version ".zip"))
6816 (sha256
6817 (base32
6818 "1lxyjwvmwa723wcf3bqn816hkvc03vz4xhbsi7bvfhrz2rpgcfq6"))))
6819 (build-system ant-build-system)
6820 (arguments
6821 `(#:build-target "dist"
6822 #:tests? #f ; no tests included
6823 #:phases
6824 (modify-phases %standard-phases
6825 (replace 'install (install-jars "dist")))))
6826 (native-inputs
6827 `(("unzip" ,unzip)))
6828 (home-page "http://www.jcraft.com/jsch/")
6829 (synopsis "Pure Java implementation of SSH2")
6830 (description "JSch is a pure Java implementation of SSH2. JSch allows you
6831 to connect to an SSH server and use port forwarding, X11 forwarding, file
6832 transfer, etc., and you can integrate its functionality into your own Java
6833 programs.")
6834 (license license:bsd-3)))
6835
6836 (define-public java-commons-compress
6837 (package
6838 (name "java-commons-compress")
6839 (version "1.13")
6840 (source (origin
6841 (method url-fetch)
6842 (uri (string-append "mirror://apache/commons/compress/source/"
6843 "commons-compress-" version "-src.tar.gz"))
6844 (sha256
6845 (base32
6846 "1vjqvavrn0babffn1kciz6v52ibwq2vwhzlb95hazis3lgllnxc8"))))
6847 (build-system ant-build-system)
6848 (arguments
6849 `(#:jar-name "commons-compress.jar"
6850 #:phases
6851 (modify-phases %standard-phases
6852 (add-after 'unpack 'delete-bad-tests
6853 (lambda _
6854 (with-directory-excursion "src/test/java/org/apache/commons/compress/"
6855 ;; FIXME: These tests really should not fail. Maybe they are
6856 ;; indicative of problems with our Java packaging work.
6857
6858 ;; This test fails with a null pointer exception.
6859 (delete-file "archivers/sevenz/SevenZOutputFileTest.java")
6860 ;; This test fails to open test resources.
6861 (delete-file "archivers/zip/ExplodeSupportTest.java")
6862
6863 ;; FIXME: This test adds a dependency on powermock, which is hard to
6864 ;; package at this point.
6865 ;; https://github.com/powermock/powermock
6866 (delete-file "archivers/sevenz/SevenZNativeHeapTest.java"))
6867 #t))
6868 (replace 'install (install-from-pom "pom.xml")))))
6869 (propagated-inputs
6870 `(("java-xz" ,java-xz)
6871 ("apache-commons-parent-pom" ,apache-commons-parent-pom-41)))
6872 (native-inputs
6873 `(("java-junit" ,java-junit)
6874 ("java-mockito" ,java-mockito-1)))
6875 (home-page "https://commons.apache.org/proper/commons-compress/")
6876 (synopsis "Java library for working with compressed files")
6877 (description "The Apache Commons Compress library defines an API for
6878 working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ,
6879 Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.")
6880 (license license:asl2.0)))
6881
6882 (define-public java-commons-csv
6883 (package
6884 (name "java-commons-csv")
6885 (version "1.4")
6886 (source (origin
6887 (method url-fetch)
6888 (uri (string-append "mirror://apache/commons/csv/source/"
6889 "commons-csv-" version "-src.tar.gz"))
6890 (sha256
6891 (base32
6892 "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij"))))
6893 (build-system ant-build-system)
6894 (arguments
6895 `(#:jar-name "commons-csv.jar"
6896 #:source-dir "src/main/java"
6897 #:tests? #f)); FIXME: requires java-h2
6898 (inputs
6899 `(("java-hamcrest-core" ,java-hamcrest-core)
6900 ("java-commons-io" ,java-commons-io)
6901 ("java-commons-lang3" ,java-commons-lang3)
6902 ("junit" ,java-junit)))
6903 (home-page "https://commons.apache.org/proper/commons-csv/")
6904 (synopsis "Read and write CSV documents")
6905 (description "Commons CSV reads and writes files in variations of the Comma
6906 Separated Value (CSV) format. The most common CSV formats are predefined in the
6907 CSVFormat class:
6908
6909 @itemize
6910 @item Microsoft Excel
6911 @item Informix UNLOAD
6912 @item Informix UNLOAD CSV
6913 @item MySQL
6914 @item RFC 4180
6915 @item TDF
6916 @end itemize
6917
6918 Custom formats can be created using a fluent style API.")
6919 (license license:asl2.0)))
6920
6921 (define-public java-osgi-annotation
6922 (package
6923 (name "java-osgi-annotation")
6924 (version "6.0.0")
6925 (source (origin
6926 (method url-fetch)
6927 (uri (string-append "https://repo1.maven.org/maven2/"
6928 "org/osgi/org.osgi.annotation/" version "/"
6929 "org.osgi.annotation-" version "-sources.jar"))
6930 (sha256
6931 (base32
6932 "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w"))))
6933 (build-system ant-build-system)
6934 (arguments
6935 `(#:tests? #f ; no tests
6936 #:jar-name "osgi-annotation.jar"))
6937 (home-page "https://www.osgi.org")
6938 (synopsis "Annotation module of OSGi framework")
6939 (description
6940 "OSGi, for Open Services Gateway initiative framework, is a module system
6941 and service platform for the Java programming language. This package contains
6942 the OSGi annotation module, providing additional services to help dynamic
6943 components.")
6944 (license license:asl2.0)))
6945
6946 (define-public java-osgi-core
6947 (package
6948 (name "java-osgi-core")
6949 (version "6.0.0")
6950 (source (origin
6951 (method url-fetch)
6952 (uri (string-append "https://repo1.maven.org/maven2/"
6953 "org/osgi/org.osgi.core/" version "/"
6954 "org.osgi.core-" version "-sources.jar"))
6955 (sha256
6956 (base32
6957 "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv"))))
6958 (build-system ant-build-system)
6959 (arguments
6960 `(#:tests? #f ; no tests
6961 #:jar-name "osgi-core.jar"))
6962 (inputs
6963 `(("java-osgi-annotation" ,java-osgi-annotation)))
6964 (home-page "https://www.osgi.org")
6965 (synopsis "Core module of OSGi framework")
6966 (description
6967 "OSGi, for Open Services Gateway initiative framework, is a module system
6968 and service platform for the Java programming language. This package contains
6969 the OSGi Core module.")
6970 (license license:asl2.0)))
6971
6972 (define-public java-osgi-service-event
6973 (package
6974 (name "java-osgi-service-event")
6975 (version "1.3.1")
6976 (source (origin
6977 (method url-fetch)
6978 (uri (string-append "https://repo1.maven.org/maven2/"
6979 "org/osgi/org.osgi.service.event/"
6980 version "/org.osgi.service.event-"
6981 version "-sources.jar"))
6982 (sha256
6983 (base32
6984 "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm"))))
6985 (build-system ant-build-system)
6986 (arguments
6987 `(#:tests? #f ; no tests
6988 #:jar-name "osgi-service-event.jar"))
6989 (inputs
6990 `(("java-osgi-annotation" ,java-osgi-annotation)
6991 ("java-osgi-core" ,java-osgi-core)))
6992 (home-page "https://www.osgi.org")
6993 (synopsis "OSGi service event module")
6994 (description
6995 "OSGi, for Open Services Gateway initiative framework, is a module system
6996 and service platform for the Java programming language. This package contains
6997 the OSGi @code{org.osgi.service.event} module.")
6998 (license license:asl2.0)))
6999
7000 (define-public java-eclipse-osgi
7001 (package
7002 (name "java-eclipse-osgi")
7003 (version "3.11.3")
7004 (source (origin
7005 (method url-fetch)
7006 (uri (string-append "https://repo1.maven.org/maven2/"
7007 "org/eclipse/platform/org.eclipse.osgi/"
7008 version "/org.eclipse.osgi-"
7009 version "-sources.jar"))
7010 (sha256
7011 (base32
7012 "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b"))))
7013 (build-system ant-build-system)
7014 (arguments
7015 `(#:tests? #f ; no tests included
7016 #:jar-name "eclipse-equinox-osgi.jar"))
7017 (inputs
7018 `(("java-osgi-annotation" ,java-osgi-annotation)))
7019 (home-page "http://www.eclipse.org/equinox/")
7020 (synopsis "Eclipse Equinox OSGi framework")
7021 (description "This package provides an implementation of the OSGi Core
7022 specification.")
7023 (license license:epl1.0)))
7024
7025 (define-public java-eclipse-equinox-common
7026 (package
7027 (name "java-eclipse-equinox-common")
7028 (version "3.10.200")
7029 (source (origin
7030 (method url-fetch)
7031 (uri (string-append "https://repo1.maven.org/maven2/"
7032 "org/eclipse/platform/org.eclipse.equinox.common/"
7033 version "/org.eclipse.equinox.common-"
7034 version "-sources.jar"))
7035 (sha256
7036 (base32
7037 "1yn8ij6xsljlf35sr2l7wvyvc0ss4n1rv0ry5zkgb49dj4hyrqrj"))))
7038 (build-system ant-build-system)
7039 (arguments
7040 `(#:tests? #f ; no tests included
7041 #:jar-name "eclipse-equinox-common.jar"))
7042 (inputs
7043 `(("java-eclipse-osgi" ,java-eclipse-osgi)))
7044 (home-page "http://www.eclipse.org/equinox/")
7045 (synopsis "Common Eclipse runtime")
7046 (description "This package provides the common Eclipse runtime.")
7047 (license license:epl1.0)))
7048
7049 (define-public java-eclipse-core-jobs
7050 (package
7051 (name "java-eclipse-core-jobs")
7052 (version "3.8.0")
7053 (source (origin
7054 (method url-fetch)
7055 (uri (string-append "https://repo1.maven.org/maven2/"
7056 "org/eclipse/platform/org.eclipse.core.jobs/"
7057 version "/org.eclipse.core.jobs-"
7058 version "-sources.jar"))
7059 (sha256
7060 (base32
7061 "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b"))))
7062 (build-system ant-build-system)
7063 (arguments
7064 `(#:tests? #f ; no tests included
7065 #:jar-name "eclipse-core-jobs.jar"))
7066 (inputs
7067 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7068 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7069 (home-page "http://www.eclipse.org/equinox/")
7070 (synopsis "Eclipse jobs mechanism")
7071 (description "This package provides the Eclipse jobs mechanism.")
7072 (license license:epl1.0)))
7073
7074 (define-public java-eclipse-equinox-registry
7075 (package
7076 (name "java-eclipse-equinox-registry")
7077 (version "3.6.100")
7078 (source (origin
7079 (method url-fetch)
7080 (uri (string-append "https://repo1.maven.org/maven2/"
7081 "org/eclipse/platform/org.eclipse.equinox.registry/"
7082 version "/org.eclipse.equinox.registry-"
7083 version "-sources.jar"))
7084 (sha256
7085 (base32
7086 "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k"))))
7087 (build-system ant-build-system)
7088 (arguments
7089 `(#:tests? #f ; no tests included
7090 #:jar-name "eclipse-equinox-registry.jar"))
7091 (inputs
7092 `(("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
7093 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7094 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7095 (home-page "http://www.eclipse.org/equinox/")
7096 (synopsis "Eclipse extension registry support")
7097 (description "This package provides support for the Eclipse extension
7098 registry.")
7099 (license license:epl1.0)))
7100
7101 (define-public java-eclipse-equinox-app
7102 (package
7103 (name "java-eclipse-equinox-app")
7104 (version "1.3.400")
7105 (source (origin
7106 (method url-fetch)
7107 (uri (string-append "https://repo1.maven.org/maven2/"
7108 "org/eclipse/platform/org.eclipse.equinox.app/"
7109 version "/org.eclipse.equinox.app-"
7110 version "-sources.jar"))
7111 (sha256
7112 (base32
7113 "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab"))))
7114 (build-system ant-build-system)
7115 (arguments
7116 `(#:tests? #f ; no tests included
7117 #:jar-name "eclipse-equinox-app.jar"))
7118 (inputs
7119 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7120 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7121 ("java-eclipse-osgi" ,java-eclipse-osgi)
7122 ("java-osgi-service-event" ,java-osgi-service-event)))
7123 (home-page "http://www.eclipse.org/equinox/")
7124 (synopsis "Equinox application container")
7125 (description "This package provides the Equinox application container for
7126 Eclipse.")
7127 (license license:epl1.0)))
7128
7129 (define-public java-eclipse-equinox-preferences
7130 (package
7131 (name "java-eclipse-equinox-preferences")
7132 (version "3.6.1")
7133 (source (origin
7134 (method url-fetch)
7135 (uri (string-append "https://repo1.maven.org/maven2/"
7136 "org/eclipse/platform/org.eclipse.equinox.preferences/"
7137 version "/org.eclipse.equinox.preferences-"
7138 version "-sources.jar"))
7139 (sha256
7140 (base32
7141 "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2"))))
7142 (build-system ant-build-system)
7143 (arguments
7144 `(#:tests? #f ; no tests included
7145 #:jar-name "eclipse-equinox-preferences.jar"))
7146 (inputs
7147 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7148 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7149 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7150 (home-page "http://www.eclipse.org/equinox/")
7151 (synopsis "Eclipse preferences mechanism")
7152 (description "This package provides the Eclipse preferences mechanism with
7153 the module @code{org.eclipse.equinox.preferences}.")
7154 (license license:epl1.0)))
7155
7156 (define-public java-eclipse-core-contenttype
7157 (package
7158 (name "java-eclipse-core-contenttype")
7159 (version "3.5.100")
7160 (source (origin
7161 (method url-fetch)
7162 (uri (string-append "https://repo1.maven.org/maven2/"
7163 "org/eclipse/platform/org.eclipse.core.contenttype/"
7164 version "/org.eclipse.core.contenttype-"
7165 version "-sources.jar"))
7166 (sha256
7167 (base32
7168 "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi"))))
7169 (build-system ant-build-system)
7170 (arguments
7171 `(#:tests? #f ; no tests included
7172 #:jar-name "eclipse-core-contenttype.jar"))
7173 (inputs
7174 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7175 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7176 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7177 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7178 (home-page "http://www.eclipse.org/")
7179 (synopsis "Eclipse content mechanism")
7180 (description "This package provides the Eclipse content mechanism in the
7181 @code{org.eclipse.core.contenttype} module.")
7182 (license license:epl1.0)))
7183
7184 (define-public java-eclipse-core-runtime
7185 (package
7186 (name "java-eclipse-core-runtime")
7187 (version "3.15.100")
7188 (source (origin
7189 (method url-fetch)
7190 (uri (string-append "https://repo1.maven.org/maven2/"
7191 "org/eclipse/platform/org.eclipse.core.runtime/"
7192 version "/org.eclipse.core.runtime-"
7193 version "-sources.jar"))
7194 (sha256
7195 (base32
7196 "0l8xayacsbjvz5hypx2fv47vpw2n4dspamcfb3hx30x9hj8vmg7r"))))
7197 (build-system ant-build-system)
7198 (arguments
7199 `(#:tests? #f ; no tests included
7200 #:jar-name "eclipse-core-runtime.jar"))
7201 (inputs
7202 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
7203 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
7204 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
7205 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7206 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7207 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7208 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7209 (home-page "https://www.eclipse.org/")
7210 (synopsis "Eclipse core runtime")
7211 (description "This package provides the Eclipse core runtime with the
7212 module @code{org.eclipse.core.runtime}.")
7213 (license license:epl1.0)))
7214
7215 (define-public java-eclipse-core-filesystem
7216 (package
7217 (name "java-eclipse-core-filesystem")
7218 (version "1.6.1")
7219 (source (origin
7220 (method url-fetch)
7221 (uri (string-append "https://repo1.maven.org/maven2/"
7222 "org/eclipse/platform/org.eclipse.core.filesystem/"
7223 version "/org.eclipse.core.filesystem-"
7224 version "-sources.jar"))
7225 (sha256
7226 (base32
7227 "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj"))))
7228 (build-system ant-build-system)
7229 (arguments
7230 `(#:tests? #f ; no tests included
7231 #:jar-name "eclipse-core-filesystem.jar"))
7232 (inputs
7233 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7234 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7235 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7236 (home-page "https://www.eclipse.org/")
7237 (synopsis "Eclipse core file system")
7238 (description "This package provides the Eclipse core file system with the
7239 module @code{org.eclipse.core.filesystem}.")
7240 (license license:epl1.0)))
7241
7242 (define-public java-eclipse-core-expressions
7243 (package
7244 (name "java-eclipse-core-expressions")
7245 (version "3.5.100")
7246 (source (origin
7247 (method url-fetch)
7248 (uri (string-append "https://repo1.maven.org/maven2/"
7249 "org/eclipse/platform/org.eclipse.core.expressions/"
7250 version "/org.eclipse.core.expressions-"
7251 version "-sources.jar"))
7252 (sha256
7253 (base32
7254 "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f"))))
7255 (build-system ant-build-system)
7256 (arguments
7257 `(#:tests? #f ; no tests included
7258 #:jar-name "eclipse-core-expressions.jar"))
7259 (inputs
7260 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7261 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7262 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7263 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7264 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7265 (home-page "https://www.eclipse.org/")
7266 (synopsis "Eclipse core expression language")
7267 (description "This package provides the Eclipse core expression language
7268 with the @code{org.eclipse.core.expressions} module.")
7269 (license license:epl1.0)))
7270
7271 (define-public java-eclipse-core-variables
7272 (package
7273 (name "java-eclipse-core-variables")
7274 (version "3.3.0")
7275 (source (origin
7276 (method url-fetch)
7277 (uri (string-append "https://repo1.maven.org/maven2/"
7278 "org/eclipse/platform/org.eclipse.core.variables/"
7279 version "/org.eclipse.core.variables-"
7280 version "-sources.jar"))
7281 (sha256
7282 (base32
7283 "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy"))))
7284 (build-system ant-build-system)
7285 (arguments
7286 `(#:tests? #f ; no tests included
7287 #:jar-name "eclipse-core-variables.jar"))
7288 (inputs
7289 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7290 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7291 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7292 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7293 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7294 (home-page "https://www.eclipse.org/platform")
7295 (synopsis "Eclipse core variables")
7296 (description "This package provides the Eclipse core variables module
7297 @code{org.eclipse.core.variables}.")
7298 (license license:epl1.0)))
7299
7300 (define-public java-eclipse-ant-core
7301 (package
7302 (name "java-eclipse-ant-core")
7303 (version "3.4.100")
7304 (source (origin
7305 (method url-fetch)
7306 (uri (string-append "https://repo1.maven.org/maven2/"
7307 "org/eclipse/platform/org.eclipse.ant.core/"
7308 version "/org.eclipse.ant.core-"
7309 version "-sources.jar"))
7310 (sha256
7311 (base32
7312 "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7"))))
7313 (build-system ant-build-system)
7314 (arguments
7315 `(#:tests? #f ; no tests included
7316 #:jar-name "eclipse-ant-core.jar"))
7317 (inputs
7318 `(("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
7319 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7320 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7321 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7322 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
7323 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7324 ("java-eclipse-core-variables" ,java-eclipse-core-variables)
7325 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7326 (home-page "https://www.eclipse.org/platform")
7327 (synopsis "Ant build tool core libraries")
7328 (description "This package provides the ant build tool core libraries with
7329 the module @code{org.eclipse.ant.core}.")
7330 (license license:epl1.0)))
7331
7332 (define-public java-eclipse-core-resources
7333 (package
7334 (name "java-eclipse-core-resources")
7335 (version "3.13.200")
7336 (source (origin
7337 (method url-fetch)
7338 (uri (string-append "https://repo1.maven.org/maven2/"
7339 "org/eclipse/platform/org.eclipse.core.resources/"
7340 version "/org.eclipse.core.resources-"
7341 version "-sources.jar"))
7342 (sha256
7343 (base32
7344 "1sn3b6ky72hkvxcgf9b2jkpbdh3y8lbhi9xxwv1dsiddpkkq91hs"))))
7345 (build-system ant-build-system)
7346 (arguments
7347 `(#:tests? #f ; no tests included
7348 #:jar-name "eclipse-core-resources.jar"))
7349 (inputs
7350 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7351 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7352 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7353 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
7354 ("java-eclipse-core-expressions" ,java-eclipse-core-expressions)
7355 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
7356 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
7357 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7358 ("java-eclipse-ant-core" ,java-eclipse-ant-core)
7359 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7360 (home-page "https://www.eclipse.org/")
7361 (synopsis "Eclipse core resource management")
7362 (description "This package provides the Eclipse core resource management
7363 module @code{org.eclipse.core.resources}.")
7364 (license license:epl1.0)))
7365
7366 (define-public java-eclipse-compare-core
7367 (package
7368 (name "java-eclipse-compare-core")
7369 (version "3.6.0")
7370 (source (origin
7371 (method url-fetch)
7372 (uri (string-append "https://repo1.maven.org/maven2/"
7373 "org/eclipse/platform/org.eclipse.compare.core/"
7374 version "/org.eclipse.compare.core-"
7375 version "-sources.jar"))
7376 (sha256
7377 (base32
7378 "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg"))))
7379 (build-system ant-build-system)
7380 (arguments
7381 `(#:tests? #f ; no tests included
7382 #:jar-name "eclipse-compare-core.jar"))
7383 (inputs
7384 `(("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7385 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7386 ("java-eclipse-osgi" ,java-eclipse-osgi)
7387 ("java-icu4j" ,java-icu4j)))
7388 (home-page "https://www.eclipse.org/")
7389 (synopsis "Eclipse core compare support")
7390 (description "This package provides the Eclipse core compare support
7391 module @code{org.eclipse.compare.core}.")
7392 (license license:epl1.0)))
7393
7394 (define-public java-eclipse-team-core
7395 (package
7396 (name "java-eclipse-team-core")
7397 (version "3.8.0")
7398 (source (origin
7399 (method url-fetch)
7400 (uri (string-append "https://repo1.maven.org/maven2/"
7401 "org/eclipse/platform/org.eclipse.team.core/"
7402 version "/org.eclipse.team.core-"
7403 version "-sources.jar"))
7404 (sha256
7405 (base32
7406 "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7"))))
7407 (build-system ant-build-system)
7408 (arguments
7409 `(#:tests? #f ; no tests included
7410 #:jar-name "eclipse-team-core.jar"))
7411 (inputs
7412 `(("java-eclipse-compare-core" ,java-eclipse-compare-core)
7413 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
7414 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
7415 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
7416 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
7417 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7418 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7419 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7420 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7421 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7422 (home-page "https://www.eclipse.org/platform")
7423 (synopsis "Eclipse team support core")
7424 (description "This package provides the Eclipse team support core module
7425 @code{org.eclipse.team.core}.")
7426 (license license:epl1.0)))
7427
7428 (define-public java-eclipse-core-commands
7429 (package
7430 (name "java-eclipse-core-commands")
7431 (version "3.8.1")
7432 (source (origin
7433 (method url-fetch)
7434 (uri (string-append "https://repo1.maven.org/maven2/"
7435 "org/eclipse/platform/org.eclipse.core.commands/"
7436 version "/org.eclipse.core.commands-"
7437 version "-sources.jar"))
7438 (sha256
7439 (base32
7440 "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9"))))
7441 (build-system ant-build-system)
7442 (arguments
7443 `(#:tests? #f ; no tests included
7444 #:jar-name "eclipse-core-commands.jar"))
7445 (inputs
7446 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)))
7447 (home-page "https://www.eclipse.org/platform")
7448 (synopsis "Eclipse core commands")
7449 (description "This package provides Eclipse core commands in the module
7450 @code{org.eclipse.core.commands}.")
7451 (license license:epl1.0)))
7452
7453 (define-public java-eclipse-text
7454 (package
7455 (name "java-eclipse-text")
7456 (version "3.6.0")
7457 (source (origin
7458 (method url-fetch)
7459 (uri (string-append "https://repo1.maven.org/maven2/"
7460 "org/eclipse/platform/org.eclipse.text/"
7461 version "/org.eclipse.text-"
7462 version "-sources.jar"))
7463 (sha256
7464 (base32
7465 "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1"))))
7466 (build-system ant-build-system)
7467 (arguments
7468 `(#:tests? #f ; no tests included
7469 #:jar-name "eclipse-text.jar"
7470 #:phases
7471 (modify-phases %standard-phases
7472 ;; When creating a new category we must make sure that the new list
7473 ;; matches List<Position>. By default it seems to be too generic
7474 ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>.
7475 ;; Without this we get this error:
7476 ;;
7477 ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376:
7478 ;; error: method put in interface Map<K,V> cannot be applied to given types;
7479 ;; [javac] fPositions.put(category, new ArrayList<>());
7480 ;; [javac] ^
7481 ;; [javac] required: String,List<Position>
7482 ;; [javac] found: String,ArrayList<Object>
7483 ;; [javac] reason: actual argument ArrayList<Object> cannot be converted
7484 ;; to List<Position> by method invocation conversion
7485 ;; [javac] where K,V are type-variables:
7486 ;; [javac] K extends Object declared in interface Map
7487 ;; [javac] V extends Object declared in interface Map
7488 ;;
7489 ;; I don't know if this is a good fix. I suspect it is not, but it
7490 ;; seems to work.
7491 (add-after 'unpack 'fix-compilation-error
7492 (lambda _
7493 (substitute* "src/org/eclipse/jface/text/AbstractDocument.java"
7494 (("Positions.put\\(category, new ArrayList<>\\(\\)\\);")
7495 "Positions.put(category, new ArrayList<Position>());"))
7496 #t)))))
7497 (inputs
7498 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7499 ("java-eclipse-core-commands" ,java-eclipse-core-commands)
7500 ("java-icu4j" ,java-icu4j)))
7501 (home-page "http://www.eclipse.org/platform")
7502 (synopsis "Eclipse text library")
7503 (description "Platform Text is part of the Platform UI project and
7504 provides the basic building blocks for text and text editors within Eclipse
7505 and contributes the Eclipse default text editor.")
7506 (license license:epl1.0)))
7507
7508 (define-public java-eclipse-jdt-core
7509 (package
7510 (name "java-eclipse-jdt-core")
7511 (version "3.16.0")
7512 (source (origin
7513 (method url-fetch)
7514 (uri (string-append "https://repo1.maven.org/maven2/"
7515 "org/eclipse/jdt/org.eclipse.jdt.core/"
7516 version "/org.eclipse.jdt.core-"
7517 version "-sources.jar"))
7518 (sha256
7519 (base32
7520 "1g560yr9v2kzv34gc2m3ifpgnj7krcdd6h4gd4z83pwqacwkfz0k"))))
7521 (build-system ant-build-system)
7522 (arguments
7523 `(#:tests? #f ; no tests included
7524 #:jar-name "eclipse-jdt-core.jar"
7525 #:phases
7526 (modify-phases %standard-phases
7527 (add-after 'unpack 'move-sources
7528 (lambda _
7529 (with-directory-excursion "src/jdtCompilerAdaptersrc/"
7530 (for-each (lambda (file)
7531 (install-file file (string-append "../" (dirname file))))
7532 (find-files "." ".*")))
7533 (delete-file-recursively "src/jdtCompilerAdaptersrc/")
7534 #t))
7535 (add-before 'build 'copy-resources
7536 (lambda _
7537 (with-directory-excursion "src"
7538 (for-each (lambda (file)
7539 (install-file file (string-append "../build/classes/" (dirname file))))
7540 (find-files "." ".*.(props|properties|rsc)")))
7541 #t)))))
7542 (inputs
7543 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
7544 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
7545 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
7546 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
7547 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7548 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
7549 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7550 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7551 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7552 ("java-eclipse-osgi" ,java-eclipse-osgi)
7553 ("java-eclipse-text" ,java-eclipse-text)))
7554 (home-page "https://www.eclipse.org/jdt")
7555 (synopsis "Java development tools core libraries")
7556 (description "This package provides the core libraries of the Eclipse Java
7557 development tools.")
7558 (license license:epl1.0)))
7559
7560 (define-public java-eclipse-jdt-compiler-apt
7561 (package
7562 (name "java-eclipse-jdt-compiler-apt")
7563 (version "1.3.400")
7564 (source (origin
7565 (method url-fetch)
7566 (uri (string-append "https://repo1.maven.org/maven2/"
7567 "org/eclipse/jdt/org.eclipse.jdt.compiler.apt/"
7568 version "/org.eclipse.jdt.compiler.apt-"
7569 version "-sources.jar"))
7570 (sha256
7571 (base32
7572 "1s285k9p2ixdqrknb40jbbvw682n9a7l5lqpn583a8pvlzg2l6r8"))))
7573 (build-system ant-build-system)
7574 (arguments
7575 `(#:tests? #f ; no tests included
7576 #:jar-name "eclipse-jdt-compiler-apt.jar"
7577 #:jdk ,openjdk11))
7578 (inputs
7579 `(("java-eclipse-jdt-core" ,java-eclipse-jdt-core)))
7580 (home-page "https://www.eclipse.org/jdt/apt/")
7581 (synopsis "Annotation processing tool")
7582 (description "APT stands for Annotation Processing Tool. APT provides a
7583 means for generating files and compiling new Java classes based on annotations
7584 found in your source code.")
7585 (license license:epl2.0)))
7586
7587 (define-public java-javax-mail
7588 (package
7589 (name "java-javax-mail")
7590 (version "1.5.6")
7591 (source (origin
7592 (method url-fetch)
7593 (uri (string-append "https://repo1.maven.org/maven2/"
7594 "com/sun/mail/javax.mail/"
7595 version "/javax.mail-"
7596 version "-sources.jar"))
7597 (sha256
7598 (base32
7599 "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9"))))
7600 (build-system ant-build-system)
7601 (arguments
7602 `(#:tests? #f ; no tests
7603 #:jar-name "javax-mail.jar"))
7604 (home-page "https://javamail.java.net")
7605 (synopsis "Reference implementation of the JavaMail API")
7606 (description
7607 "This package provides versions of the JavaMail API implementation, IMAP,
7608 SMTP, and POP3 service providers, some examples, and documentation for the
7609 JavaMail API.")
7610 ;; GPLv2 only with "classpath exception".
7611 (license license:gpl2)))
7612
7613 (define-public java-log4j-api
7614 (package
7615 (name "java-log4j-api")
7616 (version "2.4.1")
7617 (source (origin
7618 (method url-fetch)
7619 (uri (string-append "mirror://apache/logging/log4j/" version
7620 "/apache-log4j-" version "-src.tar.gz"))
7621 (sha256
7622 (base32
7623 "0j5p9gik0jysh37nlrckqbky12isy95cpwg2gv5fas1rcdqbraxd"))))
7624 (build-system ant-build-system)
7625 (arguments
7626 `(#:tests? #f ; tests require unpackaged software
7627 #:jar-name "log4j-api.jar"
7628 #:make-flags
7629 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
7630 "/share/java"))
7631 #:phases
7632 (modify-phases %standard-phases
7633 (add-after 'unpack 'enter-dir
7634 (lambda _ (chdir "log4j-api") #t))
7635 ;; FIXME: The tests require additional software that has not been
7636 ;; packaged yet, such as
7637 ;; * org.apache.maven
7638 ;; * org.apache.felix
7639 (add-after 'enter-dir 'delete-tests
7640 (lambda _ (delete-file-recursively "src/test") #t)))))
7641 (inputs
7642 `(("java-osgi-core" ,java-osgi-core)
7643 ("java-hamcrest-core" ,java-hamcrest-core)
7644 ("java-junit" ,java-junit)))
7645 (home-page "https://logging.apache.org/log4j/2.x/")
7646 (synopsis "API module of the Log4j logging framework for Java")
7647 (description
7648 "This package provides the API module of the Log4j logging framework for
7649 Java.")
7650 (license license:asl2.0)))
7651
7652 (define-public java-log4j-core
7653 (package
7654 (inherit java-log4j-api)
7655 (name "java-log4j-core")
7656 (inputs
7657 `(("java-osgi-core" ,java-osgi-core)
7658 ("java-hamcrest-core" ,java-hamcrest-core)
7659 ("java-log4j-api" ,java-log4j-api)
7660 ("java-mail" ,java-mail)
7661 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
7662 ("java-lmax-disruptor" ,java-lmax-disruptor)
7663 ("java-kafka" ,java-kafka-clients)
7664 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
7665 ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7666 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
7667 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
7668 ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml)
7669 ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml)
7670 ("java-commons-compress" ,java-commons-compress)
7671 ("java-commons-csv" ,java-commons-csv)
7672 ("java-jeromq" ,java-jeromq)
7673 ("java-junit" ,java-junit)))
7674 (native-inputs
7675 `(("hamcrest" ,java-hamcrest-all)
7676 ("java-commons-io" ,java-commons-io)
7677 ("java-commons-lang3" ,java-commons-lang3)
7678 ("slf4j" ,java-slf4j-api)))
7679 (arguments
7680 `(#:tests? #f ; tests require more dependencies
7681 #:test-dir "src/test"
7682 #:source-dir "src/main/java"
7683 #:jar-name "log4j-core.jar"
7684 #:jdk ,icedtea-8
7685 #:make-flags
7686 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
7687 "/share/java"))
7688 #:phases
7689 (modify-phases %standard-phases
7690 (add-after 'unpack 'enter-dir
7691 (lambda _ (chdir "log4j-core") #t)))))
7692 (synopsis "Core component of the Log4j framework")
7693 (description "This package provides the core component of the Log4j
7694 logging framework for Java.")))
7695
7696 (define-public java-log4j-1.2-api
7697 (package
7698 (inherit java-log4j-api)
7699 (name "java-log4j-1.2-api")
7700 (arguments
7701 `(#:jar-name "java-log4j-1.2-api.jar"
7702 #:source-dir "log4j-1.2-api/src/main/java"
7703 #:jdk ,icedtea-8
7704 ;; Tests require maven-model (and other maven subprojects), which is a
7705 ;; cyclic dependency.
7706 #:tests? #f))
7707 (inputs
7708 `(("log4j-api" ,java-log4j-api)
7709 ("log4j-core" ,java-log4j-core)
7710 ("osgi-core" ,java-osgi-core)
7711 ("eclipse-osgi" ,java-eclipse-osgi)
7712 ("java-lmax-disruptor" ,java-lmax-disruptor)))))
7713
7714 (define-public java-commons-cli
7715 (package
7716 (name "java-commons-cli")
7717 (version "1.4")
7718 (source (origin
7719 (method url-fetch)
7720 (uri (string-append "mirror://apache/commons/cli/source/"
7721 "commons-cli-" version "-src.tar.gz"))
7722 (sha256
7723 (base32
7724 "05hgi2z01fqz374y719gl1dxzqvzci5af071zm7vxrjg9vczipm1"))))
7725 (build-system ant-build-system)
7726 ;; TODO: javadoc
7727 (arguments
7728 `(#:jar-name "commons-cli.jar"
7729 #:phases
7730 (modify-phases %standard-phases
7731 (replace 'install
7732 (install-from-pom "pom.xml")))))
7733 (native-inputs
7734 `(("java-junit" ,java-junit)
7735 ("java-hamcrest-core" ,java-hamcrest-core)))
7736 (home-page "https://commons.apache.org/cli/")
7737 (synopsis "Command line arguments and options parsing library")
7738 (description "The Apache Commons CLI library provides an API for parsing
7739 command line options passed to programs. It is also able to print help
7740 messages detailing the options available for a command line tool.
7741
7742 Commons CLI supports different types of options:
7743
7744 @itemize
7745 @item POSIX like options (ie. tar -zxvf foo.tar.gz)
7746 @item GNU like long options (ie. du --human-readable --max-depth=1)
7747 @item Java like properties (ie. java -Djava.awt.headless=true Foo)
7748 @item Short options with value attached (ie. gcc -O2 foo.c)
7749 @item long options with single hyphen (ie. ant -projecthelp)
7750 @end itemize
7751
7752 This is a part of the Apache Commons Project.")
7753 (license license:asl2.0)))
7754
7755 (define-public java-commons-codec
7756 (package
7757 (name "java-commons-codec")
7758 (version "1.14")
7759 (source (origin
7760 (method url-fetch)
7761 (uri (string-append "mirror://apache/commons/codec/source/"
7762 "commons-codec-" version "-src.tar.gz"))
7763 (sha256
7764 (base32
7765 "11xr0agckkhm91pb5akf2mbk84yd54gyr178wj57gsm97fi7nkh9"))))
7766 (build-system ant-build-system)
7767 (arguments
7768 `(#:jar-name "java-commons-codec.jar"
7769 #:source-dir "src/main/java"
7770 #:test-dir "src/test"
7771 #:test-exclude (list "**/*AbstractTest.java")
7772 #:phases
7773 (modify-phases %standard-phases
7774 (add-before 'build 'copy-resources
7775 (lambda _
7776 (copy-recursively "src/main/resources"
7777 "build/classes")
7778 #t))
7779 (add-before 'check 'copy-test-resources
7780 (lambda _
7781 (copy-recursively "src/test/resources"
7782 "build/test-classes")
7783 #t))
7784 (replace 'install (install-from-pom "pom.xml")))))
7785 (native-inputs
7786 `(("java-commons-lang3" ,java-commons-lang3)
7787 ("java-junit" ,java-junit)))
7788 (propagated-inputs
7789 `(("apache-commons-parent-pom" ,apache-commons-parent-pom-50)))
7790 (home-page "https://commons.apache.org/codec/")
7791 (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs")
7792 (description "The codec package contains simple encoder and decoders for
7793 various formats such as Base64 and Hexadecimal. In addition to these widely
7794 used encoders and decoders, the codec package also maintains a collection of
7795 phonetic encoding utilities.
7796
7797 This is a part of the Apache Commons Project.")
7798 (license license:asl2.0)))
7799
7800 (define-public java-commons-daemon
7801 (package
7802 (name "java-commons-daemon")
7803 (version "1.1.0")
7804 (source (origin
7805 (method url-fetch)
7806 (uri (string-append "mirror://apache/commons/daemon/source/"
7807 "commons-daemon-" version "-src.tar.gz"))
7808 (sha256
7809 (base32
7810 "141gkhfzv5v3pdhic6y4ardq2dhsa3v36j8wmmhy6f8mac48fp7n"))))
7811 (build-system ant-build-system)
7812 (arguments
7813 `(#:test-target "test"
7814 #:phases
7815 (modify-phases %standard-phases
7816 (add-after 'build 'build-javadoc ant-build-javadoc)
7817 (replace 'install (install-jars "dist"))
7818 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
7819 (native-inputs
7820 `(("java-junit" ,java-junit)))
7821 (home-page "https://commons.apache.org/daemon/")
7822 (synopsis "Library to launch Java applications as daemons")
7823 (description "The Daemon package from Apache Commons can be used to
7824 implement Java applications which can be launched as daemons. For example the
7825 program will be notified about a shutdown so that it can perform cleanup tasks
7826 before its process of execution is destroyed by the operation system.
7827
7828 This package contains the Java library. You will also need the actual binary
7829 for your architecture which is provided by the jsvc package.
7830
7831 This is a part of the Apache Commons Project.")
7832 (license license:asl2.0)))
7833
7834 (define-public java-javaewah
7835 (package
7836 (name "java-javaewah")
7837 (version "1.1.6")
7838 (source (origin
7839 (method git-fetch)
7840 (uri (git-reference
7841 (url "https://github.com/lemire/javaewah/")
7842 (commit (string-append "JavaEWAH-" version))))
7843 (file-name (git-file-name name version))
7844 (sha256
7845 (base32
7846 "1m8qcb1py76v7avbjjrkvyy6fhr5dk2ywy73gbsxqry04gkm2nhw"))))
7847 (build-system ant-build-system)
7848 (arguments `(#:jar-name "javaewah.jar"))
7849 (inputs
7850 `(("java-junit" ,java-junit)
7851 ("java-hamcrest-core" ,java-hamcrest-core)))
7852 (home-page "https://github.com/lemire/javaewah")
7853 (synopsis "Compressed alternative to the Java @code{BitSet} class")
7854 (description "This is a word-aligned compressed variant of the Java
7855 @code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like
7856 compression scheme. It can be used to implement bitmap indexes.
7857
7858 The goal of word-aligned compression is not to achieve the best compression,
7859 but rather to improve query processing time. Hence, JavaEWAH tries to save CPU
7860 cycles, maybe at the expense of storage. However, the EWAH scheme is always
7861 more efficient storage-wise than an uncompressed bitmap (as implemented in the
7862 @code{BitSet} class by Sun).")
7863 ;; GPL2.0 derivates are explicitly allowed.
7864 (license license:asl2.0)))
7865
7866 (define-public java-slf4j-api
7867 (package
7868 (name "java-slf4j-api")
7869 (version "1.7.25")
7870 (source (origin
7871 (method url-fetch)
7872 (uri (string-append "https://www.slf4j.org/dist/slf4j-"
7873 version ".tar.gz"))
7874 (sha256
7875 (base32
7876 "13j51sgzmhhdrfa74gkal5zpip7r1440dh7zsi2c8bpb2zs1v8kb"))
7877 (modules '((guix build utils)))
7878 ;; Delete bundled jars.
7879 (snippet
7880 '(begin
7881 (for-each delete-file (find-files "." "\\.jar$"))
7882 #t))))
7883 (build-system ant-build-system)
7884 (arguments
7885 `(#:jar-name "slf4j-api.jar"
7886 #:source-dir "slf4j-api/src/main"
7887 #:test-dir "slf4j-api/src/test"
7888 #:phases
7889 (modify-phases %standard-phases
7890 (add-after 'build 'regenerate-jar
7891 (lambda _
7892 ;; pom.xml ignores these files in the jar creation process. If we don't,
7893 ;; we get the error "This code should have never made it into slf4j-api.jar"
7894 (delete-file-recursively "build/classes/org/slf4j/impl")
7895 (invoke "jar" "-cf" "build/jar/slf4j-api.jar" "-C"
7896 "build/classes" ".")))
7897 (add-before 'check 'dont-test-abstract-classes
7898 (lambda _
7899 ;; abstract classes are not meant to be run with junit
7900 (substitute* "build.xml"
7901 (("<include name=\"\\*\\*/\\*Test.java\" />")
7902 (string-append "<include name=\"**/*Test.java\" />"
7903 "<exclude name=\"**/MultithreadedInitializationTest"
7904 ".java\" />")))
7905 #t))
7906 (replace 'install
7907 (install-from-pom "slf4j-api/pom.xml")))))
7908 (propagated-inputs
7909 `(("java-slf4j-parent" ,java-slf4j-parent)))
7910 (native-inputs
7911 `(("java-junit" ,java-junit)
7912 ("java-hamcrest-core" ,java-hamcrest-core)))
7913 (home-page "https://www.slf4j.org/")
7914 (synopsis "Simple logging facade for Java")
7915 (description "The Simple Logging Facade for Java (SLF4J) serves as a
7916 simple facade or abstraction for various logging
7917 frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j})
7918 allowing the end user to plug in the desired logging framework at deployment
7919 time.")
7920 (license license:expat)))
7921
7922 (define java-slf4j-parent
7923 (package
7924 (inherit java-slf4j-api)
7925 (name "java-slf4j-parent")
7926 (native-inputs `())
7927 (propagated-inputs '())
7928 (arguments
7929 `(#:tests? #f
7930 #:phases
7931 (modify-phases %standard-phases
7932 (delete 'build)
7933 (delete 'configure)
7934 (replace 'install
7935 (install-pom-file "pom.xml")))))))
7936
7937 (define-public java-slf4j-simple
7938 (package
7939 (name "java-slf4j-simple")
7940 (version "1.7.25")
7941 (source (package-source java-slf4j-api))
7942 (build-system ant-build-system)
7943 (arguments
7944 `(#:jar-name "slf4j-simple.jar"
7945 #:source-dir "slf4j-simple/src/main"
7946 #:test-dir "slf4j-simple/src/test"
7947 #:phases
7948 (modify-phases %standard-phases
7949 ;; The tests need some test classes from slf4j-api
7950 (add-before 'check 'build-slf4j-api-test-helpers
7951 (lambda _
7952 ;; Add current dir to CLASSPATH ...
7953 (setenv "CLASSPATH"
7954 (string-append (getcwd) ":" (getenv "CLASSPATH")))
7955 ;; ... and build test helper classes here:
7956 (apply invoke
7957 `("javac" "-d" "."
7958 ,@(find-files "slf4j-api/src/test" ".*\\.java")))))
7959 (replace 'install
7960 (install-from-pom "slf4j-simple/pom.xml")))))
7961 (propagated-inputs
7962 `(("java-slf4j-api" ,java-slf4j-api)))
7963 (native-inputs
7964 `(("java-junit" ,java-junit)
7965 ("java-hamcrest-core" ,java-hamcrest-core)))
7966 (home-page "https://www.slf4j.org/")
7967 (synopsis "Simple implementation of simple logging facade for Java")
7968 (description "SLF4J binding for the Simple implementation, which outputs
7969 all events to System.err. Only messages of level INFO and higher are
7970 printed.")
7971 (license license:expat)))
7972
7973 (define-public antlr2
7974 (package
7975 (name "antlr2")
7976 (version "2.7.7")
7977 (source (origin
7978 (method url-fetch)
7979 (uri (string-append "https://www.antlr2.org/download/antlr-"
7980 version ".tar.gz"))
7981 (sha256
7982 (base32
7983 "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5"))
7984 (modules '((guix build utils)))
7985 (snippet
7986 '(begin
7987 (delete-file "antlr.jar")
7988 (substitute* "lib/cpp/antlr/CharScanner.hpp"
7989 (("#include <map>")
7990 (string-append
7991 "#include <map>\n"
7992 "#define EOF (-1)\n"
7993 "#include <strings.h>")))
7994 (substitute* "configure"
7995 (("/bin/sh") "sh"))
7996 #t))))
7997 (build-system gnu-build-system)
7998 (arguments
7999 `(#:tests? #f ; no test target
8000 #:imported-modules ((guix build ant-build-system)
8001 (guix build syscalls)
8002 ,@%gnu-build-system-modules)
8003 #:modules (((guix build ant-build-system) #:prefix ant:)
8004 (guix build gnu-build-system)
8005 (guix build utils))
8006 #:phases
8007 (modify-phases %standard-phases
8008 (add-after 'install 'strip-jar-timestamps
8009 (assoc-ref ant:%standard-phases 'strip-jar-timestamps))
8010 (add-before 'configure 'fix-timestamp
8011 (lambda _
8012 (substitute* "configure"
8013 (("^TIMESTAMP.*") "TIMESTAMP=19700101\n"))
8014 #t))
8015 (add-after 'configure 'fix-bin-ls
8016 (lambda _
8017 (substitute* (find-files "." "Makefile")
8018 (("/bin/ls") "ls"))
8019 #t)))))
8020 (native-inputs
8021 `(("which" ,which)
8022 ("zip" ,zip)
8023 ("java" ,icedtea "jdk")))
8024 (inputs
8025 `(("java" ,icedtea)))
8026 (home-page "https://www.antlr2.org")
8027 (synopsis "Framework for constructing recognizers, compilers, and translators")
8028 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
8029 is a language tool that provides a framework for constructing recognizers,
8030 compilers, and translators from grammatical descriptions containing Java, C#,
8031 C++, or Python actions. ANTLR provides excellent support for tree construction,
8032 tree walking, and translation.")
8033 (license license:public-domain)))
8034
8035 (define-public java-stringtemplate-3
8036 (package
8037 (name "java-stringtemplate")
8038 (version "3.2.1")
8039 (source (origin
8040 (method url-fetch)
8041 (uri (string-append "https://github.com/antlr/website-st4/raw/"
8042 "gh-pages/download/stringtemplate-"
8043 version ".tar.gz"))
8044 (sha256
8045 (base32
8046 "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is"))))
8047 (build-system ant-build-system)
8048 (arguments
8049 `(#:jar-name (string-append ,name "-" ,version ".jar")
8050 #:test-dir "test"
8051 #:modules ((guix build ant-build-system)
8052 (guix build utils)
8053 (srfi srfi-1))
8054 #:phases
8055 (modify-phases %standard-phases
8056 (add-before 'check 'fix-tests
8057 (lambda _
8058 (substitute* "build.xml"
8059 (("\\$\\{test.home\\}/java")
8060 "${test.home}/org"))
8061 #t))
8062 (add-before 'build 'generate-grammar
8063 (lambda _
8064 (with-directory-excursion "src/org/antlr/stringtemplate/language/"
8065 (for-each (lambda (file)
8066 (format #t "~a\n" file)
8067 (invoke "antlr" file))
8068 '("template.g" "angle.bracket.template.g" "action.g"
8069 "eval.g" "group.g" "interface.g")))
8070 #t)))))
8071 (native-inputs
8072 `(("antlr" ,antlr2)
8073 ("java-junit" ,java-junit)))
8074 (home-page "https://www.stringtemplate.org")
8075 (synopsis "Template engine to generate formatted text output")
8076 (description "StringTemplate is a java template engine (with ports for C#,
8077 Objective-C, JavaScript, Scala) for generating source code, web pages, emails,
8078 or any other formatted text output. StringTemplate is particularly good at
8079 code generators, multiple site skins, and internationalization / localization.
8080 StringTemplate also powers ANTLR.")
8081 (license license:bsd-3)))
8082
8083 ;; antlr3 is partially written using antlr3 grammar files. It also depends on
8084 ;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar
8085 ;; files and uses antlr3 at runtime. The latest version requires a recent version
8086 ;; of antlr3 at runtime.
8087 ;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3.
8088 ;; This version of ST4 is sufficient for the latest antlr3.
8089 ;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build
8090 ;; the latest ST4 with it. Then we build our final antlr3 that will be linked
8091 ;; against the latest ST4.
8092 ;; antlr3.3 still depends on antlr3 to generate some files, so we use an
8093 ;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses
8094 ;; only grammar files with the antlr2 syntax.
8095 ;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3.
8096
8097 (define-public java-stringtemplate
8098 (package (inherit java-stringtemplate-3)
8099 (name "java-stringtemplate")
8100 (version "4.0.8")
8101 (source (origin
8102 (method url-fetch)
8103 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/"
8104 version ".tar.gz"))
8105 (file-name (string-append name "-" version ".tar.gz"))
8106 (sha256
8107 (base32
8108 "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087"))))
8109 (build-system ant-build-system)
8110 (arguments
8111 `(#:jar-name (string-append ,name "-" ,version ".jar")
8112 #:tests? #f ; FIXME: tests fail for unknown reasons
8113 #:test-dir "test"
8114 #:modules ((guix build ant-build-system)
8115 (guix build utils)
8116 (srfi srfi-1))
8117 #:phases
8118 (modify-phases %standard-phases
8119 (add-before 'check 'fix-test-target
8120 (lambda _
8121 (substitute* "build.xml"
8122 (("\\$\\{test.home\\}/java") "${test.home}/")
8123 (("\\*Test.java") "Test*.java"))
8124 #t))
8125 (add-before 'build 'generate-grammar
8126 (lambda _
8127 (with-directory-excursion "src/org/stringtemplate/v4/compiler/"
8128 (for-each (lambda (file)
8129 (format #t "~a\n" file)
8130 (invoke "antlr3" file))
8131 '("STParser.g" "Group.g" "CodeGenerator.g")))
8132 #t)))))
8133 (inputs
8134 `(("antlr3" ,antlr3-bootstrap)
8135 ("antlr2" ,antlr2)
8136 ("java-stringtemplate" ,java-stringtemplate-3)
8137 ("java-junit" ,java-junit)))))
8138
8139 (define java-stringtemplate-4.0.6
8140 (package (inherit java-stringtemplate)
8141 (name "java-stringtemplate")
8142 (version "4.0.6")
8143 (source (origin
8144 (method url-fetch)
8145 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-"
8146 version ".tar.gz"))
8147 (file-name (string-append name "-" version ".tar.gz"))
8148 (sha256
8149 (base32
8150 "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp"))))
8151 (inputs
8152 `(("antlr3" ,antlr3-3.3)
8153 ("antlr2" ,antlr2)
8154 ("java-stringtemplate" ,java-stringtemplate-3)))))
8155
8156 (define-public antlr3
8157 (package
8158 (name "antlr3")
8159 (version "3.5.2")
8160 (source (origin
8161 (method git-fetch)
8162 (uri (git-reference
8163 (url "https://github.com/antlr/antlr3")
8164 (commit version)))
8165 (file-name (git-file-name name version))
8166 (sha256
8167 (base32
8168 "0cafavrjmzqhklghrk8c2jqxkdwxgzskm20pbrfd3r41cn00dpnf"))))
8169 (build-system ant-build-system)
8170 (arguments
8171 `(#:jar-name (string-append ,name "-" ,version ".jar")
8172 #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3"
8173 #:tests? #f
8174 #:phases
8175 (modify-phases %standard-phases
8176 (add-after 'install 'bin-install
8177 (lambda* (#:key inputs outputs #:allow-other-keys)
8178 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
8179 (bin (string-append (assoc-ref outputs "out") "/bin")))
8180 (mkdir-p bin)
8181 (with-output-to-file (string-append bin "/antlr3")
8182 (lambda _
8183 (display
8184 (string-append "#!" (which "sh") "\n"
8185 "java -cp " jar "/" ,name "-" ,version ".jar:"
8186 (string-concatenate
8187 (find-files (assoc-ref inputs "stringtemplate")
8188 ".*\\.jar"))
8189 ":"
8190 (string-concatenate
8191 (find-files (assoc-ref inputs "stringtemplate4")
8192 ".*\\.jar"))
8193 ":"
8194 (string-concatenate
8195 (find-files (string-append
8196 (assoc-ref inputs "antlr")
8197 "/lib")
8198 ".*\\.jar"))
8199 " org.antlr.Tool $*"))))
8200 (chmod (string-append bin "/antlr3") #o755))
8201 #t))
8202 (add-before 'build 'generate-grammar
8203 (lambda _
8204 (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/")
8205 (for-each (lambda (file)
8206 (display file)
8207 (newline)
8208 (invoke "antlr3" file))
8209 '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g"
8210 "AssignTokenTypesWalker.g"
8211 "ActionTranslator.g" "TreeToNFAConverter.g"
8212 "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g"
8213 "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g"))
8214 (substitute* "ANTLRParser.java"
8215 (("public Object getTree") "public GrammarAST getTree"))
8216 (substitute* "ANTLRv3Parser.java"
8217 (("public Object getTree") "public CommonTree getTree"))
8218 (chdir "../../../../../java")
8219 (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java"
8220 (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*;
8221 import org.antlr.grammar.v3.ANTLRTreePrinter;"))
8222 (substitute* "org/antlr/tool/ErrorManager.java"
8223 (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") ""))
8224 (chdir "../../../..")
8225 #t))
8226 (add-before 'build 'fix-build-xml
8227 (lambda _
8228 (substitute* "build.xml"
8229 (("target name=\"compile\">")
8230 "target name=\"compile\">
8231 <copy todir=\"${classes.dir}\">
8232 <fileset dir=\"tool/src/main/resources\">
8233 <include name=\"**/*.stg\"/>
8234 <include name=\"**/*.st\"/>
8235 <include name=\"**/*.sti\"/>
8236 <include name=\"**/STLexer.tokens\"/>
8237 </fileset>
8238 </copy>"))
8239 #t)))))
8240 (native-inputs
8241 `(("antlr" ,antlr2)
8242 ("antlr3" ,antlr3-bootstrap)))
8243 (inputs
8244 `(("junit" ,java-junit)
8245 ("stringtemplate" ,java-stringtemplate-3)
8246 ("stringtemplate4" ,java-stringtemplate)))
8247 (propagated-inputs
8248 `(("stringtemplate" ,java-stringtemplate-3)
8249 ("antlr" ,antlr2)
8250 ("stringtemplate4" ,java-stringtemplate-4.0.6)))
8251 (home-page "https://www.antlr3.org")
8252 (synopsis "Framework for constructing recognizers, compilers, and translators")
8253 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
8254 is a language tool that provides a framework for constructing recognizers,
8255 compilers, and translators from grammatical descriptions containing Java, C#,
8256 C++, or Python actions. ANTLR provides excellent support for tree construction,
8257 tree walking, and translation.")
8258 (license license:bsd-3)))
8259
8260 (define antlr3-bootstrap
8261 (package
8262 (inherit antlr3)
8263 (name "antlr3-bootstrap")
8264 (native-inputs
8265 `(("antlr" ,antlr2)
8266 ("antlr3" ,antlr3-3.3)))
8267 (inputs
8268 `(("junit" ,java-junit)))))
8269
8270 (define-public antlr3-3.3
8271 (package
8272 (inherit antlr3)
8273 (name "antlr3")
8274 (version "3.3")
8275 (source (origin
8276 (method url-fetch)
8277 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
8278 "gh-pages/download/antlr-"
8279 version ".tar.gz"))
8280 (sha256
8281 (base32
8282 "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m"))
8283 (patches
8284 (search-patches "antlr3-3_3-fix-java8-compilation.patch"))))
8285 (arguments
8286 `(#:jar-name (string-append ,name "-" ,version ".jar")
8287 #:source-dir (string-join '("tool/src/main/java"
8288 "runtime/Java/src/main/java"
8289 "tool/src/main/antlr2"
8290 "tool/src/main/antlr3")
8291 ":")
8292 #:tests? #f ; FIXME: tests seem to require maven plugin
8293 #:modules ((guix build ant-build-system)
8294 (guix build utils)
8295 (srfi srfi-1))
8296 #:phases
8297 (modify-phases %standard-phases
8298 (add-after 'install 'bin-install
8299 (lambda* (#:key inputs outputs #:allow-other-keys)
8300 (let* ((out (assoc-ref outputs "out"))
8301 (jar (string-append out "/share/java"))
8302 (bin (string-append out "/bin")))
8303 (mkdir-p bin)
8304 (with-output-to-file (string-append bin "/antlr3")
8305 (lambda _
8306 (display
8307 (string-append
8308 "#!" (which "sh") "\n"
8309 "java -cp " jar "/antlr3-3.3.jar:"
8310 (string-join
8311 (append (find-files (assoc-ref inputs "java-stringtemplate")
8312 ".*\\.jar$")
8313 (find-files (string-append (assoc-ref inputs "antlr")
8314 "/lib")
8315 ".*\\.jar$"))
8316 ":")
8317 " org.antlr.Tool $*"))))
8318 (chmod (string-append bin "/antlr3") #o755)
8319 #t)))
8320 (add-before 'build 'generate-grammar
8321 (lambda _
8322 (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java"
8323 (("import org.antlr.grammar.v2.\\*;")
8324 "import org.antlr.grammar.v2.*;\n
8325 import org.antlr.grammar.v2.TreeToNFAConverter;\n
8326 import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n
8327 import org.antlr.grammar.v2.ANTLRTreePrinter;"))
8328 (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/"
8329 (for-each (lambda (file)
8330 (format #t "~a\n" file)
8331 (invoke "antlr" file))
8332 '("antlr.g" "antlr.print.g" "assign.types.g"
8333 "buildnfa.g" "codegen.g" "define.g")))
8334 (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/"
8335 (for-each (lambda (file)
8336 (format #t "~a\n" file)
8337 (invoke "antlr3" file))
8338 '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g"
8339 "ANTLRv3Tree.g")))
8340 #t))
8341 (add-before 'build 'fix-build-xml
8342 (lambda _
8343 (substitute* "build.xml"
8344 (("target name=\"compile\">")
8345 "target name=\"compile\">
8346 <copy todir=\"${classes.dir}\">
8347 <fileset dir=\"tool/src/main/resources\">
8348 <include name=\"**/*.stg\"/>
8349 <include name=\"**/*.st\"/>
8350 <include name=\"**/*.sti\"/>
8351 <include name=\"**/STLexer.tokens\"/>
8352 </fileset>
8353 </copy>"))
8354 #t)))))
8355 (native-inputs
8356 `(("antlr" ,antlr2)
8357 ("antlr3" ,antlr3-3.1)))
8358 (inputs
8359 `(("junit" ,java-junit)))
8360 (propagated-inputs
8361 `(("java-stringtemplate" ,java-stringtemplate-3)
8362 ("antlr" ,antlr2)))))
8363
8364 (define-public antlr3-3.1
8365 (package
8366 (inherit antlr3)
8367 (version "3.1")
8368 (source (origin
8369 (method url-fetch)
8370 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
8371 "gh-pages/download/antlr-"
8372 version ".tar.gz"))
8373 (sha256
8374 (base32
8375 "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z"))
8376 (patches
8377 (search-patches "antlr3-3_1-fix-java8-compilation.patch"))))
8378 (arguments
8379 `(#:jar-name (string-append "antlr3-" ,version ".jar")
8380 #:source-dir "src:runtime/Java/src"
8381 #:tests? #f
8382 #:phases
8383 (modify-phases %standard-phases
8384 (add-after 'install 'bin-install
8385 (lambda* (#:key inputs outputs #:allow-other-keys)
8386 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
8387 (bin (string-append (assoc-ref outputs "out") "/bin")))
8388 (mkdir-p bin)
8389 (with-output-to-file (string-append bin "/antlr3")
8390 (lambda _
8391 (display
8392 (string-append "#!" (which "sh") "\n"
8393 "java -cp " jar "/antlr3-3.1.jar:"
8394 (string-concatenate
8395 (find-files (assoc-ref inputs "stringtemplate")
8396 ".*\\.jar"))
8397 ":"
8398 (string-concatenate
8399 (find-files (string-append
8400 (assoc-ref inputs "antlr")
8401 "/lib")
8402 ".*\\.jar"))
8403 " org.antlr.Tool $*"))))
8404 (chmod (string-append bin "/antlr3") #o755))
8405 #t))
8406 (add-before 'build 'generate-grammar
8407 (lambda _
8408 (let ((dir "src/org/antlr/tool/"))
8409 (for-each (lambda (file)
8410 (display file)
8411 (newline)
8412 (invoke "antlr" "-o" dir (string-append dir file)))
8413 '("antlr.g" "antlr.print.g" "assign.types.g"
8414 "buildnfa.g" "define.g")))
8415 (format #t "codegen.g\n")
8416 (invoke "antlr" "-o" "src/org/antlr/codegen"
8417 "src/org/antlr/codegen/codegen.g")
8418 #t))
8419 (add-before 'build 'fix-build-xml
8420 (lambda _
8421 (substitute* "build.xml"
8422 (("target name=\"compile\">")
8423 "target name=\"compile\">
8424 <copy todir=\"${classes.dir}\">
8425 <fileset dir=\"src\">
8426 <include name=\"**/*.stg\"/>
8427 <include name=\"**/*.st\"/>
8428 <include name=\"**/*.sti\"/>
8429 <include name=\"**/STLexer.tokens\"/>
8430 </fileset>
8431 </copy>"))
8432 #t)))))
8433 (native-inputs
8434 `(("antlr" ,antlr2)))
8435 (inputs
8436 `(("junit" ,java-junit)))
8437 (propagated-inputs
8438 `(("stringtemplate" ,java-stringtemplate-3)))))
8439
8440 (define-public java-treelayout
8441 (package
8442 (name "java-treelayout")
8443 (version "1.0.3")
8444 (source (origin
8445 (method git-fetch)
8446 (uri (git-reference
8447 (url "https://github.com/abego/treelayout")
8448 (commit (string-append "v" version))))
8449 (file-name (git-file-name name version))
8450 (sha256
8451 (base32
8452 "18my8ql9b1y0n0zrvkih7xfhf3dpgfhyfifvkcfhmwcvw3divxak"))))
8453 (build-system ant-build-system)
8454 (arguments
8455 `(#:jar-name (string-append ,name "-" ,version ".jar")
8456 #:source-dir "org.abego.treelayout/src/main/java"
8457 #:test-dir "org.abego.treelayout/src/test"))
8458 (inputs
8459 `(("java-junit" ,java-junit)))
8460 (native-inputs
8461 `(("java-hamcrest-core" ,java-hamcrest-core)))
8462 (home-page "http://treelayout.sourceforge.net")
8463 (synopsis "Tree Layout Algorithm in Java")
8464 (description "TreeLayout creates tree layouts for arbitrary trees. It is
8465 not restricted to a specific output or format, but can be used for any kind of
8466 two dimensional diagram. Examples are Swing based components, SVG files, etc.
8467 This is possible because TreeLayout separates the layout of a tree from the
8468 actual rendering.")
8469 (license license:bsd-3)))
8470
8471 (define-public java-antlr4-runtime
8472 (package
8473 (name "java-antlr4-runtime")
8474 (version "4.8")
8475 (source (origin
8476 (method git-fetch)
8477 (uri (git-reference
8478 (url "https://github.com/antlr/antlr4")
8479 (commit version)))
8480 (file-name (git-file-name name version))
8481 (sha256
8482 (base32
8483 "1qal3add26qxskm85nk7r758arladn5rcyjinmhlhznmpbbv9j8m"))
8484 (patches
8485 (search-patches "java-antlr4-Add-standalone-generator.patch"
8486 "java-antlr4-fix-code-too-large.java"))))
8487 (build-system ant-build-system)
8488 (arguments
8489 `(#:jar-name "java-antlr4-runtime.jar"
8490 #:source-dir "runtime/Java/src/org"
8491 #:tests? #f; tests depend on java-antlr4 itself
8492 #:phases
8493 (modify-phases %standard-phases
8494 (add-before 'build 'copy-resources
8495 (lambda _
8496 (copy-recursively "runtime/Java/src/main/dot"
8497 "build/classes")
8498 #t)))))
8499 (home-page "https://www.antlr.org")
8500 (synopsis "ANTLR runtime library")
8501 (description "This package contains the runtime library used with generated
8502 sources by ANTLR.")
8503 (license license:bsd-3)))
8504
8505 (define-public antlr4
8506 (package
8507 (inherit java-antlr4-runtime)
8508 (name "antlr4")
8509 (arguments
8510 `(#:jar-name "antlr4.jar"
8511 #:source-dir "tool/src"
8512 #:test-dir "tool-testsuite/test:runtime-testsuite/test:runtime-testsuite/annotations/src"
8513 #:test-include (list "**/Test*.java")
8514 #:test-exclude (list
8515 ;; no runnable method
8516 "**/TestOutputReading.java"
8517 ;; no @Test methods
8518 "**/TestParserErrors.java"
8519 "**/TestSemPredEvalParser.java"
8520 "**/TestSets.java"
8521 "**/TestListeners.java"
8522 "**/TestParseTrees.java"
8523 "**/TestParserExec.java"
8524 "**/TestLexerErrors.java"
8525 "**/TestPerformance.java"
8526 "**/TestCompositeParsers.java"
8527 "**/TestLexerExec.java"
8528 "**/TestSemPredEvalLexer.java"
8529 "**/TestLeftRecursion.java"
8530 "**/TestFullContextParsing.java"
8531 "**/TestCompositeLexers.java"
8532 ;; Null pointer exception
8533 "**/TestCompositeGrammars.java"
8534 ;; Wrong assumption on emoji
8535 "**/TestUnicodeData.java")
8536 #:phases
8537 (modify-phases %standard-phases
8538 (add-before 'build 'fix-build.xml
8539 (lambda _
8540 ;; tests are not in a java subdirectory
8541 (substitute* "build.xml"
8542 (("\\$\\{test.home\\}/java") "${test.home}"))
8543 #t))
8544 ;; tests require to have a working antlr4 binary
8545 (delete 'check)
8546 (add-after 'bin-install 'check
8547 (lambda _
8548 (invoke "ant" "compile-tests")
8549 (invoke "ant" "check" "-Dtest.home=runtime-testsuite/annotations/src")
8550 (invoke "ant" "check" "-Dtest.home=runtime-testsuite/test")
8551 (invoke "ant" "check" "-Dtest.home=tool-testsuite/test")
8552 #t))
8553 (add-before 'check 'remove-unrelated-languages
8554 (lambda _
8555 ;; There are tests for other languages that ANTLR can generate, but
8556 ;; we don't have the infrastructure for that yet. Let's test Java
8557 ;; generation only.
8558 (for-each
8559 (lambda (language)
8560 (delete-file-recursively
8561 (string-append "runtime-testsuite/test/org/antlr/v4/test/runtime/"
8562 language)))
8563 '("cpp" "csharp" "go" "javascript" "php" "python" "python2"
8564 "python3" "swift"))
8565 #t))
8566 (add-before 'check 'generate-test-parsers
8567 (lambda* (#:key outputs #:allow-other-keys)
8568 (define (run-antlr dir filename package)
8569 (invoke "antlr4" "-lib" dir "-visitor" "-no-listener"
8570 "-package" package (string-append dir "/" filename)
8571 "-Xlog"))
8572 (setenv "PATH" (string-append (getenv "PATH") ":"
8573 (assoc-ref outputs "out") "/bin"))
8574 (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api"
8575 "Java.g4" "org.antlr.v4.test.runtime.java.api")
8576 (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api"
8577 "VisitorBasic.g4" "org.antlr.v4.test.runtime.java.api")
8578 (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api"
8579 "VisitorCalc.g4" "org.antlr.v4.test.runtime.java.api")
8580 #t))
8581 (add-before 'check 'remove-graphemes
8582 (lambda _
8583 ;; When running antlr on grahemes.g4, we get a runtime exception:
8584 ;; set is empty. So delete the file that depends on it.
8585 (delete-file
8586 "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api/perf/TimeLexerSpeed.java")
8587 #t))
8588 (add-after 'install 'bin-install
8589 (lambda* (#:key inputs outputs #:allow-other-keys)
8590 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
8591 (bin (string-append (assoc-ref outputs "out") "/bin")))
8592 (mkdir-p bin)
8593 (with-output-to-file (string-append bin "/antlr4")
8594 (lambda _
8595 (display
8596 (string-append "#!" (which "sh") "\n"
8597 "java -cp " jar "/antlr4.jar:"
8598 (string-join
8599 (apply
8600 append
8601 (map
8602 (lambda (input)
8603 (find-files (assoc-ref inputs input)
8604 ".*\\.jar"))
8605 '("antlr3" "java-stringtemplate"
8606 "java-antlr4-runtime" "java-treelayout"
8607 "java-jsonp-api" "java-icu4j")))
8608 ":")
8609 " org.antlr.v4.Tool $*"))))
8610 (chmod (string-append bin "/antlr4") #o755)
8611 #t)))
8612 (add-before 'build 'copy-resources
8613 (lambda _
8614 (copy-recursively "tool/resources/" "build/classes")
8615 #t))
8616 (add-before 'build 'generate-unicode
8617 (lambda _
8618 ;; First: build the generator
8619 (invoke "javac" "-cp" (getenv "CLASSPATH")
8620 "tool/src/org/antlr/v4/unicode/UnicodeRenderer.java"
8621 "tool/src/org/antlr/v4/unicode/UnicodeDataTemplateController.java")
8622 ;; Then use it
8623 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8624 ":tool/src:runtime/Java")
8625 "org.antlr.v4.unicode.UnicodeRenderer"
8626 "tool/resources/org/antlr/v4/tool/templates"
8627 "unicodedata"
8628 "tool/src/org/antlr/v4/unicode/UnicodeData.java")
8629 ;; It seems there is a bug with our ST4
8630 (substitute* "tool/src/org/antlr/v4/unicode/UnicodeData.java"
8631 (("\\\\>") ">"))
8632 ;; Remove the additional file
8633 (delete-file "tool/src/org/antlr/v4/unicode/UnicodeRenderer.java")
8634 #t))
8635 (add-before 'build 'generate-grammar
8636 (lambda* (#:key inputs #:allow-other-keys)
8637 (with-directory-excursion "tool/src/org/antlr/v4/parse"
8638 (for-each (lambda (file)
8639 (display file)
8640 (newline)
8641 (invoke "antlr3" file))
8642 '("ANTLRLexer.g" "ANTLRParser.g" "BlockSetTransformer.g"
8643 "GrammarTreeVisitor.g" "ATNBuilder.g"
8644 "ActionSplitter.g" "LeftRecursiveRuleWalker.g")))
8645 (with-directory-excursion "tool/src/org/antlr/v4/codegen"
8646 (install-file "../parse/ANTLRParser.tokens" ".")
8647 (display "SourceGenTriggers.g\n")
8648 (invoke "antlr3" "SourceGenTriggers.g"))
8649 #t)))))
8650 (inputs
8651 `(("antlr3" ,antlr3)
8652 ("java-antlr4-runtime" ,java-antlr4-runtime)
8653 ("java-icu4j" ,java-icu4j)
8654 ("java-jsonp-api" ,java-jsonp-api)
8655 ("java-stringtemplate" ,java-stringtemplate)
8656 ("java-treelayout" ,java-treelayout)))
8657 (native-inputs
8658 `(("java-junit" ,java-junit)))
8659 (synopsis "Parser and lexer generator in Java")
8660 (description "ANTLR (ANother Tool for Language Recognition) is a powerful
8661 parser generator for reading, processing, executing, or translating structured
8662 text or binary files. It's widely used to build languages, tools, and
8663 frameworks. From a grammar, ANTLR generates a parser that can build and walk
8664 parse trees.")))
8665
8666 (define-public java-antlr4-runtime-4.1
8667 (package
8668 (inherit java-antlr4-runtime)
8669 (version "4.1")
8670 (source (origin
8671 (method git-fetch)
8672 (uri (git-reference
8673 (url "https://github.com/antlr/antlr4")
8674 (commit version)))
8675 (file-name (git-file-name "antlr4" version))
8676 (sha256
8677 (base32
8678 "1i8hmx5an58cjyvhji0xgpvd6lq00z1k1mjys025q2wqc25wv4c1"))))
8679 (arguments
8680 (substitute-keyword-arguments (package-arguments java-antlr4-runtime)
8681 ((#:phases phases)
8682 `(modify-phases ,phases
8683 (add-before 'configure 'chmod
8684 (lambda _
8685 (chmod "build.xml" #o644)
8686 #t))))))
8687 (inputs
8688 `(("java-treelayout" ,java-treelayout)))))
8689
8690 (define-public antlr4-4.1
8691 (package
8692 (inherit antlr4)
8693 (version (package-version java-antlr4-runtime-4.1))
8694 (source (package-source java-antlr4-runtime-4.1))
8695 (arguments
8696 (substitute-keyword-arguments (package-arguments antlr4)
8697 ((#:test-dir _)
8698 "tool/test")
8699 ((#:test-exclude excludes)
8700 `(list "**/TestParseErrors.java"
8701 "**/TestTopologicalSort.java"
8702 ,@excludes))
8703 ((#:phases phases)
8704 `(modify-phases ,phases
8705 (delete 'generate-unicode)
8706 (replace 'check
8707 (lambda _
8708 (invoke "ant" "check")
8709 #t))
8710 (add-before 'configure 'chmod
8711 (lambda _
8712 (chmod "build.xml" #o644)
8713 #t))
8714 (delete 'remove-graphemes)
8715 (delete 'remove-unrelated-languages)
8716 (delete 'generate-test-parsers)))))
8717 (inputs
8718 (alist-replace
8719 "java-antlr4-runtime" (list java-antlr4-runtime-4.1)
8720 (package-inputs antlr4)))))
8721
8722 (define-public java-tunnelvisionlabs-antlr4-runtime-annotations
8723 (package
8724 (inherit java-antlr4-runtime)
8725 (name "java-tunnelvisionlabs-antlr4-runtime-annotations")
8726 (version "4.7.4")
8727 (source (origin
8728 (method git-fetch)
8729 (uri (git-reference
8730 (url "https://github.com/tunnelvisionlabs/antlr4")
8731 (commit (string-append version "-opt"))))
8732 (file-name (git-file-name "java-tunnelvisionlabs-antlr4" version))
8733 (sha256
8734 (base32
8735 "1mf2lvvsszpialsk23ma83pwp50nd32lrbjpa847zlm5gmranbr8"))
8736 (patches
8737 (search-patches "java-antlr4-Add-standalone-generator.patch"
8738 "java-tunnelvisionlabs-antlr-code-too-large.patch"))))
8739 (arguments
8740 `(#:jar-name "java-antlr4-runtime-annotations.jar"
8741 #:source-dir "runtime/JavaAnnotations/src"
8742 #:tests? #f; no tests
8743 #:phases
8744 (modify-phases %standard-phases
8745 (add-after 'build 'copy-resources
8746 (lambda _
8747 (copy-recursively "runtime/JavaAnnotations/resources"
8748 "build/classes")
8749 #t))
8750 (add-after 'copy-resources 'rebuild-jar
8751 (lambda _
8752 (invoke "ant" "jar")
8753 #t)))))
8754 (inputs '())
8755 (native-inputs '())
8756 (synopsis "Annotations for ANTLR's runtime library")
8757 (description "This package contains annotations used during the build of
8758 the runtime library of ANTLR.")))
8759
8760 ;; the runtime of this library requires a lexer that is generated by antlr4.
8761 ;; However, antlr4 itself requires this library at build and run-time. We
8762 ;; use antlr4@4.1, the closest version of antlr that doesn't need this
8763 ;; bootstrap process, to generate the lexer. The generated lexer is built
8764 ;; for the 4.1 runtime, which is slightly different from this runtime.
8765 ;; So, we build the runtime with antlr 4.1, with a broken xml lexer, that we
8766 ;; use to build antlr4. We then re-use this antlr4 to build the runtime, and
8767 ;; the proper, working, runtime to build antlr4 again.
8768 (define java-tunnelvisionlabs-antlr4-runtime-bootstrap
8769 (package
8770 (inherit java-antlr4-runtime)
8771 (name "java-tunnelvisionlabs-antlr4-runtime")
8772 (version (package-version java-tunnelvisionlabs-antlr4-runtime-annotations))
8773 (source (package-source java-tunnelvisionlabs-antlr4-runtime-annotations))
8774 (arguments
8775 `(#:jar-name "java-antlr4-runtime.jar"
8776 #:source-dir "runtime/Java/src"
8777 #:tests? #f; tests require antlr4, but antlr4 depends on this package
8778 #:phases
8779 (modify-phases %standard-phases
8780 (add-before 'build 'generate-xpath-lexer
8781 (lambda _
8782 (invoke "antlr4" "-lib" "runtime/Java/src/org/antlr/v4/runtime/tree/xpath"
8783 "-visitor" "-no-listener"
8784 "-package" "org.antlr.v4.runtime.tree.xpath"
8785 "runtime/Java/src/org/antlr/v4/runtime/tree/xpath/XPathLexer.g4")
8786 ;; Generated code is for an incompatible version of the runtime
8787 (substitute* "runtime/Java/src/org/antlr/v4/runtime/tree/xpath/XPathLexer.java"
8788 (("LexerATNSimulator\\(this,_ATN,_decisionToDFA,_sharedContextCache\\)")
8789 "LexerATNSimulator(this,_ATN)"))
8790 #t))
8791 (add-before 'build 'copy-resources
8792 (lambda _
8793 (copy-recursively "runtime/Java/src/main/dot"
8794 "build/classes")
8795 #t)))))
8796 (native-inputs
8797 `(("antlr4" ,antlr4-4.1)
8798 ("java-tunnelvisionlabs-antlr4-runtime-annotations"
8799 ,java-tunnelvisionlabs-antlr4-runtime-annotations)))))
8800
8801 (define java-tunnelvisionlabs-antlr4-bootstrap
8802 (package
8803 (inherit antlr4)
8804 (name "java-tunnelvisionlabs-antlr4")
8805 (version (package-version java-tunnelvisionlabs-antlr4-runtime-annotations))
8806 (source (package-source java-tunnelvisionlabs-antlr4-runtime-annotations))
8807 (arguments
8808 (substitute-keyword-arguments (package-arguments antlr4)
8809 ((#:test-dir _)
8810 "tool/test:runtime-testsuite/src")
8811 ((#:phases phases)
8812 `(modify-phases ,phases
8813 (delete 'remove-unrelated-languages)
8814 (delete 'remove-graphemes)
8815 (delete 'generate-test-parsers)
8816 (delete 'check)))))
8817 (native-inputs '())
8818 (inputs
8819 `(("antlr3" ,antlr3)
8820 ("java-antlr4-runtime" ,java-tunnelvisionlabs-antlr4-runtime-bootstrap)
8821 ("java-tunnelvisionlabs-antlr4-runtime-annotations"
8822 ,java-tunnelvisionlabs-antlr4-runtime-annotations)
8823 ("java-icu4j" ,java-icu4j)
8824 ("java-jsonp-api" ,java-jsonp-api)
8825 ("java-stringtemplate" ,java-stringtemplate)
8826 ("java-treelayout" ,java-treelayout)))))
8827
8828 (define-public java-tunnelvisionlabs-antlr4-runtime
8829 (package
8830 (inherit java-tunnelvisionlabs-antlr4-runtime-bootstrap)
8831 (native-inputs
8832 (alist-replace
8833 "antlr4" (list java-tunnelvisionlabs-antlr4-bootstrap)
8834 (package-native-inputs java-tunnelvisionlabs-antlr4-runtime-bootstrap)))))
8835
8836 (define-public java-tunnelvisionlabs-antlr4
8837 (package
8838 (inherit java-tunnelvisionlabs-antlr4-bootstrap)
8839 (inputs
8840 (alist-replace
8841 "java-antlr4-runtime" (list java-tunnelvisionlabs-antlr4-runtime)
8842 (package-inputs java-tunnelvisionlabs-antlr4-bootstrap)))))
8843
8844 (define-public java-commons-cli-1.2
8845 ;; This is a bootstrap dependency for Maven2.
8846 (package
8847 (inherit java-commons-cli)
8848 (version "1.2")
8849 (source (origin
8850 (method url-fetch)
8851 (uri (string-append "mirror://apache/commons/cli/source/"
8852 "commons-cli-" version "-src.tar.gz"))
8853 (sha256
8854 (base32
8855 "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm"))))
8856 (arguments
8857 `(#:jar-name "commons-cli.jar"
8858 #:phases
8859 (modify-phases %standard-phases
8860 (add-before 'check 'fix-build-xml
8861 (lambda* (#:key inputs #:allow-other-keys)
8862 (substitute* "build.xml"
8863 (("dir=\"\\$\\{test.home\\}/java\"")
8864 "dir=\"${test.home}\""))
8865 #t)))))
8866 (native-inputs
8867 `(("java-junit" ,java-junit)))))
8868
8869 (define-public java-microemulator-cldc
8870 (package
8871 (name "java-microemulator-cldc")
8872 (version "2.0.4")
8873 (source (origin
8874 (method url-fetch)
8875 (uri (string-append "https://github.com/barteo/microemu/archive/"
8876 "microemulator_"
8877 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
8878 version)
8879 ".tar.gz"))
8880 (file-name (string-append name "-" version ".tar.gz"))
8881 (sha256
8882 (base32
8883 "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll"))))
8884 (build-system ant-build-system)
8885 (arguments
8886 `(#:jar-name "microemulator-cldc.jar"
8887 #:source-dir "microemu-cldc/src/main/java"
8888 #:tests? #f)); Requires even older software
8889 (home-page "https://github.com/barteo/microemu")
8890 (synopsis "J2ME CLDC emulator")
8891 (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP
8892 Emulator. It demonstrates MIDlet based applications in web browser
8893 applet and can be run as a standalone java application.")
8894 (license (list license:asl2.0
8895 ;; or altenatively:
8896 license:lgpl2.1+))))
8897
8898 (define-public java-datanucleus-javax-persistence
8899 (package
8900 (name "java-datanucleus-javax-persistence")
8901 (version "2.2.0")
8902 (source (origin
8903 (method url-fetch)
8904 (uri (string-append "https://github.com/datanucleus/"
8905 "javax.persistence/archive/javax.persistence-"
8906 version "-release.tar.gz"))
8907 (sha256
8908 (base32
8909 "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx"))))
8910 (build-system ant-build-system)
8911 (arguments
8912 `(#:jar-name "java-datanucleus-javax-persistence.jar"
8913 #:jdk ,icedtea-8
8914 #:source-dir "src/main/java"
8915 #:tests? #f)); no tests
8916 (home-page "https://github.com/datanucleus/javax.persistence")
8917 (synopsis "JPA API")
8918 (description "This package contains a clean definition of JPA API intended
8919 for use with DataNucleus JPA since the JCP haven't provided an official JPA API
8920 jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification
8921 used to generate this API.")
8922 (license (list license:edl1.0 license:epl1.0))))
8923
8924 (define-public java-osgi-cmpn
8925 (package
8926 (name "java-osgi-cmpn")
8927 (version "6.0.0")
8928 (source (origin
8929 (method url-fetch)
8930 (uri (string-append "https://repo1.maven.org/maven2/"
8931 "org/osgi/osgi.cmpn/" version "/osgi.cmpn-"
8932 version "-sources.jar"))
8933 (sha256
8934 (base32
8935 "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys"))))
8936 (build-system ant-build-system)
8937 (arguments
8938 `(#:jar-name "osgi-cmpn.jar"
8939 #:tests? #f)); no tests
8940 (inputs
8941 `(("annotation" ,java-osgi-annotation)
8942 ("core" ,java-osgi-core)
8943 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
8944 ("microemulator" ,java-microemulator-cldc)
8945 ("servlet" ,java-classpathx-servletapi)))
8946 (home-page "https://www.osgi.org")
8947 (synopsis "Compendium specification module of OSGi framework")
8948 (description
8949 "OSGi, for Open Services Gateway initiative framework, is a module system
8950 and service platform for the Java programming language. This package contains
8951 the compendium specification module, providing interfaces and classes for use
8952 in compiling bundles.")
8953 (license license:asl2.0)))
8954
8955 (define-public java-osgi-service-component-annotations
8956 (package
8957 (name "java-osgi-service-component-annotations")
8958 (version "1.3.0")
8959 (source (origin
8960 (method url-fetch)
8961 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8962 "org.osgi.service.component.annotations/"
8963 version "/org.osgi.service.component.annotations-"
8964 version "-sources.jar"))
8965 (sha256
8966 (base32
8967 "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0"))))
8968 (build-system ant-build-system)
8969 (arguments
8970 `(#:jar-name "osgi-service-component-annotations.jar"
8971 #:tests? #f)); no tests
8972 (inputs
8973 `(("annotation" ,java-osgi-annotation)))
8974 (home-page "https://www.osgi.org")
8975 (synopsis "Support annotations for osgi-service-component")
8976 (description
8977 "OSGi, for Open Services Gateway initiative framework, is a module system
8978 and service platform for the Java programming language. This package contains
8979 the support annotations for osgi-service-component.")
8980 (license license:asl2.0)))
8981
8982 (define-public java-osgi-dto
8983 (package
8984 (name "java-osgi-dto")
8985 (version "1.0.0")
8986 (source (origin
8987 (method url-fetch)
8988 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8989 "org.osgi.dto/" version "/org.osgi.dto-"
8990 version "-sources.jar"))
8991 (sha256
8992 (base32
8993 "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr"))))
8994 (build-system ant-build-system)
8995 (arguments
8996 `(#:jar-name "osgi-dto.jar"
8997 #:tests? #f)); no tests
8998 (inputs
8999 `(("annotation" ,java-osgi-annotation)))
9000 (home-page "https://www.osgi.org")
9001 (synopsis "Data Transfer Objects")
9002 (description
9003 "OSGi, for Open Services Gateway initiative framework, is a module system
9004 and service platform for the Java programming language. This package contains
9005 the Data Transfer Objects. It is easily serializable having only public fields
9006 of primitive types and their wrapper classes, Strings, and DTOs. List, Set,
9007 Map and array aggregates may also be used. The aggregates must only hold
9008 objects of the listed types or aggregates.")
9009 (license license:asl2.0)))
9010
9011 (define-public java-osgi-resource
9012 (package
9013 (name "java-osgi-resource")
9014 (version "1.0.0")
9015 (source (origin
9016 (method url-fetch)
9017 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9018 "org.osgi.resource/"
9019 version "/org.osgi.resource-"
9020 version "-sources.jar"))
9021 (sha256
9022 (base32
9023 "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d"))))
9024 (build-system ant-build-system)
9025 (arguments
9026 `(#:jar-name "osgi-resource.jar"
9027 #:tests? #f)); no tests
9028 (inputs
9029 `(("annotation" ,java-osgi-annotation)
9030 ("dto" ,java-osgi-dto)))
9031 (home-page "https://www.osgi.org")
9032 (synopsis "OSGI Resource")
9033 (description
9034 "OSGi, for Open Services Gateway initiative framework, is a module system
9035 and service platform for the Java programming language. This package contains
9036 the definition of common types in osgi packages.")
9037 (license license:asl2.0)))
9038
9039 (define-public java-osgi-namespace-contract
9040 (package
9041 (name "java-osgi-namespace-contract")
9042 (version "1.0.0")
9043 (source (origin
9044 (method url-fetch)
9045 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9046 "org.osgi.namespace.contract/"
9047 version "/org.osgi.namespace.contract-"
9048 version "-sources.jar"))
9049 (sha256
9050 (base32
9051 "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36"))))
9052 (build-system ant-build-system)
9053 (inputs
9054 `(("resource" ,java-osgi-resource)
9055 ("annotation" ,java-osgi-annotation)))
9056 (arguments
9057 `(#:jar-name "osgi-namespace-contract.jar"
9058 #:tests? #f)); no tests
9059 (home-page "https://www.osgi.org")
9060 (synopsis "Contract Capability and Requirement Namespace")
9061 (description
9062 "OSGi, for Open Services Gateway initiative framework, is a module system
9063 and service platform for the Java programming language. This package contains
9064 the names for the attributes and directives for a namespace with contracts.")
9065 (license license:asl2.0)))
9066
9067 (define-public java-osgi-namespace-extender
9068 (package
9069 (name "java-osgi-namespace-extender")
9070 (version "1.0.1")
9071 (source (origin
9072 (method url-fetch)
9073 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9074 "org.osgi.namespace.extender/"
9075 version "/org.osgi.namespace.extender-"
9076 version "-sources.jar"))
9077 (sha256
9078 (base32
9079 "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz"))))
9080 (build-system ant-build-system)
9081 (inputs
9082 `(("resource" ,java-osgi-resource)
9083 ("annotation" ,java-osgi-annotation)))
9084 (arguments
9085 `(#:jar-name "osgi-namespace-extendent.jar"
9086 #:tests? #f)); no tests
9087 (home-page "https://www.osgi.org")
9088 (synopsis "Extender Capability and Requirement Namespace")
9089 (description
9090 "OSGi, for Open Services Gateway initiative framework, is a module system
9091 and service platform for the Java programming language. This package contains
9092 the names for the attributes and directives for an extender namespace.")
9093 (license license:asl2.0)))
9094
9095 (define-public java-osgi-namespace-service
9096 (package
9097 (name "java-osgi-namespace-service")
9098 (version "1.0.0")
9099 (source (origin
9100 (method url-fetch)
9101 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9102 "org.osgi.namespace.service/"
9103 version "/org.osgi.namespace.service-"
9104 version "-sources.jar"))
9105 (sha256
9106 (base32
9107 "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8"))))
9108 (build-system ant-build-system)
9109 (inputs
9110 `(("resource" ,java-osgi-resource)
9111 ("annotation" ,java-osgi-annotation)))
9112 (arguments
9113 `(#:jar-name "osgi-namespace-service.jar"
9114 #:tests? #f)); no tests
9115 (home-page "https://www.osgi.org")
9116 (synopsis "Service Capability and Requirement Namespace")
9117 (description
9118 "OSGi, for Open Services Gateway initiative framework, is a module system
9119 and service platform for the Java programming language. This package contains
9120 the names for the attributes and directives for a service namespace.")
9121 (license license:asl2.0)))
9122
9123 (define-public java-osgi-util-function
9124 (package
9125 (name "java-osgi-util-function")
9126 (version "1.0.0")
9127 (source (origin
9128 (method url-fetch)
9129 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9130 "org.osgi.util.function/"
9131 version "/org.osgi.util.function-"
9132 version "-sources.jar"))
9133 (sha256
9134 (base32
9135 "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x"))))
9136 (build-system ant-build-system)
9137 (arguments
9138 `(#:jar-name "osgi-util-function.jar"
9139 #:tests? #f)); no tests
9140 (inputs
9141 `(("annotation" ,java-osgi-annotation)))
9142 (home-page "https://www.osgi.org")
9143 (synopsis "OSGI Util Function")
9144 (description
9145 "OSGi, for Open Services Gateway initiative framework, is a module system
9146 and service platform for the Java programming language. This package contains
9147 an interface for a function that accepts a single argument and produces a result.")
9148 (license license:asl2.0)))
9149
9150 (define-public java-osgi-util-promise
9151 (package
9152 (name "java-osgi-util-promise")
9153 (version "1.0.0")
9154 (source (origin
9155 (method url-fetch)
9156 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9157 "org.osgi.util.promise/"
9158 version "/org.osgi.util.promise-"
9159 version "-sources.jar"))
9160 (sha256
9161 (base32
9162 "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c"))))
9163 (build-system ant-build-system)
9164 (arguments
9165 `(#:jar-name "osgi-util-promise.jar"
9166 #:tests? #f)); no tests
9167 (inputs
9168 `(("annotation" ,java-osgi-annotation)
9169 ("function" ,java-osgi-util-function)))
9170 (home-page "https://www.osgi.org")
9171 (synopsis "Promise of a value")
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 an interface and utilitary classes for promises. A Promise represents a future
9176 value. It handles the interactions for asynchronous processing.")
9177 (license license:asl2.0)))
9178
9179 (define-public java-osgi-service-metatype-annotations
9180 (package
9181 (name "java-osgi-service-metatype-annotations")
9182 (version "1.3.0")
9183 (source (origin
9184 (method url-fetch)
9185 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9186 "org.osgi.service.metatype.annotations/"
9187 version "/org.osgi.service.metatype.annotations-"
9188 version "-sources.jar"))
9189 (sha256
9190 (base32
9191 "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6"))))
9192 (build-system ant-build-system)
9193 (arguments
9194 `(#:jar-name "osgi-service-metatype-annotations.jar"
9195 #:tests? #f)); no tests
9196 (inputs
9197 `(("annotation" ,java-osgi-annotation)))
9198 (home-page "https://www.osgi.org")
9199 (synopsis "Support annotations for metatype")
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 the support annotations for metatype.")
9204 (license license:asl2.0)))
9205
9206 (define-public java-osgi-service-repository
9207 (package
9208 (name "java-osgi-service-repository")
9209 (version "1.1.0")
9210 (source (origin
9211 (method url-fetch)
9212 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9213 "org.osgi.service.repository/"
9214 version "/org.osgi.service.repository-"
9215 version "-sources.jar"))
9216 (sha256
9217 (base32
9218 "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n"))))
9219 (build-system ant-build-system)
9220 (arguments
9221 `(#:jar-name "osgi-service-repository.jar"
9222 #:tests? #f)); no tests
9223 (inputs
9224 `(("annotation" ,java-osgi-annotation)
9225 ("promise" ,java-osgi-util-promise)
9226 ("resource" ,java-osgi-resource)))
9227 (home-page "https://www.osgi.org")
9228 (synopsis "OSGI service repository")
9229 (description
9230 "OSGi, for Open Services Gateway initiative framework, is a module system
9231 and service platform for the Java programming language. This package contains
9232 a repository service that contains resources.")
9233 (license license:asl2.0)))
9234
9235 (define-public java-osgi-framework
9236 (package
9237 (name "java-osgi-framework")
9238 (version "1.8.0")
9239 (source (origin
9240 (method url-fetch)
9241 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9242 "org.osgi.framework/" version "/org.osgi.framework-"
9243 version "-sources.jar"))
9244 (sha256
9245 (base32
9246 "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s"))))
9247 (build-system ant-build-system)
9248 (arguments
9249 `(#:jar-name "osgi-framework.jar"
9250 #:tests? #f)); no tests
9251 (inputs
9252 `(("annotation" ,java-osgi-annotation)
9253 ("resource" ,java-osgi-resource)
9254 ("dto" ,java-osgi-dto)))
9255 (home-page "https://www.osgi.org")
9256 (synopsis "OSGi framework")
9257 (description
9258 "OSGi, for Open Services Gateway initiative framework, is a module system
9259 and service platform for the Java programming language.")
9260 (license license:asl2.0)))
9261
9262 (define-public java-osgi-service-log
9263 (package
9264 (name "java-osgi-service-log")
9265 (version "1.3.0")
9266 (source (origin
9267 (method url-fetch)
9268 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9269 "org.osgi.service.log/"
9270 version "/org.osgi.service.log-"
9271 version "-sources.jar"))
9272 (sha256
9273 (base32
9274 "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0"))))
9275 (build-system ant-build-system)
9276 (arguments
9277 `(#:jar-name "osgi-service-log.jar"
9278 #:tests? #f)); no tests
9279 (inputs
9280 `(("java-osgi-framework" ,java-osgi-framework)))
9281 (home-page "https://www.osgi.org")
9282 (synopsis "Provides methods for bundles to write messages to the log")
9283 (description
9284 "OSGi, for Open Services Gateway initiative framework, is a module system
9285 and service platform for the Java programming language. This package contains
9286 the log service.")
9287 (license license:asl2.0)))
9288
9289 (define-public java-osgi-service-jdbc
9290 (package
9291 (name "java-osgi-service-jdbc")
9292 (version "1.0.0")
9293 (source (origin
9294 (method url-fetch)
9295 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9296 "org.osgi.service.jdbc/"
9297 version "/org.osgi.service.jdbc-"
9298 version "-sources.jar"))
9299 (sha256
9300 (base32
9301 "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz"))))
9302 (build-system ant-build-system)
9303 (arguments
9304 `(#:jar-name "osgi-service-jdbc.jar"
9305 #:tests? #f)); no tests
9306 (home-page "https://www.osgi.org")
9307 (synopsis "Factory for JDBC connection factories")
9308 (description
9309 "OSGi, for Open Services Gateway initiative framework, is a module system
9310 and service platform for the Java programming language. This package contains
9311 a factory for JDBC connection factories. There are 3 preferred connection
9312 factories for getting JDBC connections:
9313
9314 @itemize
9315 @item @code{javax.sql.DataSource};
9316 @item @code{javax.sql.ConnectionPoolDataSource};
9317 @item @code{javax.sql.XADataSource}.
9318 @end itemize")
9319 (license license:asl2.0)))
9320
9321 (define-public java-osgi-service-resolver
9322 (package
9323 (name "java-osgi-service-resolver")
9324 (version "1.0.1")
9325 (source (origin
9326 (method url-fetch)
9327 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9328 "org.osgi.service.resolver/"
9329 version "/org.osgi.service.resolver-"
9330 version "-sources.jar"))
9331 (sha256
9332 (base32
9333 "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd"))))
9334 (build-system ant-build-system)
9335 (arguments
9336 `(#:jar-name "osgi-service-resolver.jar"
9337 #:tests? #f)); no tests
9338 (inputs
9339 `(("annotation" ,java-osgi-annotation)
9340 ("resource" ,java-osgi-resource)))
9341 (home-page "https://www.osgi.org")
9342 (synopsis "OSGI Resolver service")
9343 (description
9344 "OSGi, for Open Services Gateway initiative framework, is a module system
9345 and service platform for the Java programming language. This package contains
9346 a resolver service that resolves the specified resources in the context supplied
9347 by the caller.")
9348 (license license:asl2.0)))
9349
9350 (define-public java-osgi-util-tracker
9351 (package
9352 (name "java-osgi-util-tracker")
9353 (version "1.5.1")
9354 (source (origin
9355 (method url-fetch)
9356 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9357 "org.osgi.util.tracker/"
9358 version "/org.osgi.util.tracker-"
9359 version "-sources.jar"))
9360 (sha256
9361 (base32
9362 "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz"))))
9363 (build-system ant-build-system)
9364 (arguments
9365 `(#:jar-name "osgi-util-tracker.jar"
9366 #:tests? #f)); no tests
9367 (inputs
9368 `(("framework" ,java-osgi-framework)
9369 ("annotation" ,java-osgi-annotation)))
9370 (home-page "https://www.osgi.org")
9371 (synopsis "Bundle tracking")
9372 (description
9373 "OSGi, for Open Services Gateway initiative framework, is a module system
9374 and service platform for the Java programming language. This package contains
9375 bundle tracking utility classes.")
9376 (license license:asl2.0)))
9377
9378 (define-public java-osgi-service-cm
9379 (package
9380 (name "java-osgi-service-cm")
9381 (version "1.5.0")
9382 (source (origin
9383 (method url-fetch)
9384 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9385 "org.osgi.service.cm/"
9386 version "/org.osgi.service.cm-"
9387 version "-sources.jar"))
9388 (sha256
9389 (base32
9390 "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6"))))
9391 (build-system ant-build-system)
9392 (arguments
9393 `(#:jar-name "osgi-service-cm.jar"
9394 #:tests? #f)); no tests
9395 (inputs
9396 `(("framework" ,java-osgi-framework)
9397 ("annotation" ,java-osgi-annotation)))
9398 (home-page "https://www.osgi.org")
9399 (synopsis "OSGI Configuration Management")
9400 (description
9401 "OSGi, for Open Services Gateway initiative framework, is a module system
9402 and service platform for the Java programming language. This package contains
9403 utility classes for the configuration of services.")
9404 (license license:asl2.0)))
9405
9406 (define-public java-osgi-service-packageadmin
9407 (package
9408 (name "java-osgi-service-packageadmin")
9409 (version "1.2.0")
9410 (source (origin
9411 (method url-fetch)
9412 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9413 "org.osgi.service.packageadmin/"
9414 version "/org.osgi.service.packageadmin-"
9415 version "-sources.jar"))
9416 (sha256
9417 (base32
9418 "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52"))))
9419 (build-system ant-build-system)
9420 (arguments
9421 `(#:jar-name "osgi-service-packageadmin.jar"
9422 #:tests? #f)); no tests
9423 (inputs
9424 `(("framework" ,java-osgi-framework)))
9425 (home-page "https://www.osgi.org")
9426 (synopsis "OSGI Package Administration")
9427 (description
9428 "OSGi, for Open Services Gateway initiative framework, is a module system
9429 and service platform for the Java programming language. This package contains
9430 the packageadmin service.")
9431 (license license:asl2.0)))
9432
9433 (define-public java-ops4j-base-lang
9434 (package
9435 (name "java-ops4j-base-lang")
9436 (version "1.5.0")
9437 (source (origin
9438 (method url-fetch)
9439 (uri (string-append "https://github.com/ops4j/org.ops4j.base/"
9440 "archive/base-" version ".tar.gz"))
9441 (sha256
9442 (base32
9443 "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw"))))
9444 (build-system ant-build-system)
9445 (arguments
9446 `(#:jar-name "java-ops4j-base-lang.jar"
9447 #:source-dir "ops4j-base-lang/src/main/java"
9448 #:tests? #f; no tests
9449 #:phases
9450 (modify-phases %standard-phases
9451 (add-before 'build 'add-test-file
9452 (lambda _
9453 ;; That file is required by a test in ops4j-pax-exam-core-spi
9454 (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang")
9455 (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties"
9456 (lambda _
9457 (display
9458 (string-append
9459 "version=" ,version "\n"
9460 "groupId=org.ops4j.base"
9461 "artifactId=ops4j-base-lang\n"))))
9462 #t)))))
9463 (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview")
9464 (synopsis "Utility classes and extensions to be used in OPS4J projects")
9465 (description "OPS4J stands for Open Participation Software for Java. This
9466 package contains utilities and extensions related to @code{java.lang}.")
9467 (license license:asl2.0)))
9468
9469 (define-public java-ops4j-base-monitors
9470 (package
9471 (inherit java-ops4j-base-lang)
9472 (name "java-ops4j-base-monitors")
9473 (arguments
9474 `(#:jar-name "java-ops4j-base-monitors.jar"
9475 #:source-dir "ops4j-base-monitors/src/main/java"
9476 #:tests? #f)); no tests
9477 (inputs
9478 `(("lang" ,java-ops4j-base-lang)))
9479 (description "OPS4J stands for Open Participation Software for Java. This
9480 package contains utilities and extensions related to monitoring.")))
9481
9482 (define-public java-ops4j-base-io
9483 (package
9484 (inherit java-ops4j-base-lang)
9485 (name "java-ops4j-base-io")
9486 (arguments
9487 `(#:jar-name "java-ops4j-base-io.jar"
9488 #:source-dir "ops4j-base-io/src/main/java"
9489 #:test-dir "ops4j-base-io/src/test"
9490 #:test-exclude
9491 (list "**/ListerTest.java")))
9492 (inputs
9493 `(("lang" ,java-ops4j-base-monitors)
9494 ("lang" ,java-ops4j-base-lang)))
9495 (native-inputs
9496 `(("junit" ,java-junit)
9497 ("hamcrest" ,java-hamcrest-core)))
9498 (description "OPS4J stands for Open Participation Software for Java. This
9499 package contains utilities and extensions related to handling streams and files.")))
9500
9501 (define-public java-ops4j-base-util
9502 (package
9503 (inherit java-ops4j-base-lang)
9504 (name "java-ops4j-base-util")
9505 (arguments
9506 `(#:jar-name "java-ops4j-base-util.jar"
9507 #:source-dir "ops4j-base-util/src/main/java"
9508 #:test-dir "ops4j-base-util/src/test"))
9509 (inputs
9510 `(("lang" ,java-ops4j-base-lang)))
9511 (native-inputs
9512 `(("junit" ,java-junit)))
9513 (description "OPS4J stands for Open Participation Software for Java. This
9514 package contains utilities and extensions related to environment, i18n and
9515 mime types.")))
9516
9517 (define-public java-ops4j-base-util-property
9518 (package
9519 (inherit java-ops4j-base-lang)
9520 (name "java-ops4j-base-util-property")
9521 (arguments
9522 `(#:jar-name "java-ops4j-base-util-property.jar"
9523 #:source-dir "ops4j-base-util-property/src/main/java"
9524 #:tests? #f)); no tests
9525 (inputs
9526 `(("lang" ,java-ops4j-base-lang)
9527 ("util" ,java-ops4j-base-util)))
9528 (description "OPS4J stands for Open Participation Software for Java. This
9529 package contains utilities and extensions related to resolving properties from
9530 different sources.")))
9531
9532 (define-public java-ops4j-base-store
9533 (package
9534 (inherit java-ops4j-base-lang)
9535 (name "java-ops4j-base-store")
9536 (arguments
9537 `(#:jar-name "java-ops4j-base-store.jar"
9538 #:source-dir "ops4j-base-store/src/main/java"
9539 #:tests? #f)); no tests
9540 (inputs
9541 `(("lang" ,java-ops4j-base-lang)
9542 ("slf4j" ,java-slf4j-api)
9543 ("io" ,java-ops4j-base-io)))
9544 (description "OPS4J stands for Open Participation Software for Java. This
9545 package contains utilities for storing and retrieving data from an
9546 @code{InputStream}.")))
9547
9548 (define-public java-ops4j-base-spi
9549 (package
9550 (inherit java-ops4j-base-lang)
9551 (name "java-ops4j-base-spi")
9552 (arguments
9553 `(#:jar-name "java-ops4j-base-spi.jar"
9554 #:source-dir "ops4j-base-spi/src/main/java"
9555 #:test-dir "ops4j-base-spi/src/test"))
9556 (native-inputs
9557 `(("junit" ,java-junit)
9558 ("hamcrest" ,java-hamcrest-core)))
9559 (description "OPS4J stands for Open Participation Software for Java. This
9560 package contains utilities for obtaining services via the Java SE 6
9561 @code{ServiceLoader}.")))
9562
9563 (define-public java-aqute-bnd-annotation
9564 (package
9565 (name "java-aqute-bnd-annotation")
9566 (version "3.5.0")
9567 (source (origin
9568 (method url-fetch)
9569 (uri (string-append "https://github.com/bndtools/bnd/archive/"
9570 version ".REL.tar.gz"))
9571 (file-name (string-append name "-" version ".tar.gz"))
9572 (sha256
9573 (base32
9574 "1ggyiq0as0f6cz333a0dh98j72kmvv5pf2s47v9554yh905lfqdl"))))
9575 (build-system ant-build-system)
9576 (arguments
9577 `(#:jar-name "java-aqute-bnd-annotation.jar"
9578 #:source-dir "biz.aQute.bnd.annotation/src"
9579 #:tests? #f)); empty test dir
9580 (home-page "https://bnd.bndtools.org/")
9581 (synopsis "Tools for OSGi")
9582 (description "Bnd is a swiss army knife for OSGi, it creates manifest
9583 headers based on analyzing the class code, it verifies the project settings,
9584 it manages project dependencies, gives diffs jars, and much more.")
9585 (license license:asl2.0)))
9586
9587 (define-public java-aqute-libg
9588 (package
9589 (inherit java-aqute-bnd-annotation)
9590 (name "java-aqute-libg")
9591 (arguments
9592 `(#:jar-name "java-aqute-libg.jar"
9593 ;; The build fails when source/target more recent than 1.7. This
9594 ;; is a known issue. See: https://github.com/bndtools/bnd/issues/1327
9595 ;;
9596 ;; It is closed as won't fix. There is no way to change the source
9597 ;; so that it works on 1.8, and still works on 1.6, the upstream
9598 ;; target. It work fine on 1.7, so we use 1.7.
9599 #:make-flags (list "-Dant.build.javac.source=1.7"
9600 "-Dant.build.javac.target=1.7")
9601 #:phases
9602 (modify-phases %standard-phases
9603 (add-before 'configure 'chdir
9604 ;; Change to aQute.libg directory, so that the relative
9605 ;; paths in the tests aren't broken.
9606 (lambda _
9607 (chdir "aQute.libg")
9608 #t))
9609 (add-before 'check 'create-test-directory
9610 ;; Copy the test directory to test/java, since that's where
9611 ;; ant-build-system's default project in build.xml expects to find
9612 ;; the test classes. Leave a copy in the original place to not
9613 ;; break paths in tests.
9614 (lambda _
9615 (mkdir "src/test")
9616 (copy-recursively "test" "src/test/java")
9617 #t)))))
9618 (inputs
9619 `(("slf4j" ,java-slf4j-api)
9620 ("osgi-annot" ,java-osgi-annotation)
9621 ("java-osgi-cmpn" ,java-osgi-cmpn)
9622 ("osgi" ,java-osgi-core)))
9623 (native-inputs
9624 `(("hamcrest" ,java-hamcrest-core)
9625 ("java-junit" ,java-junit)))))
9626
9627 (define-public java-aqute-bndlib
9628 (package
9629 (inherit java-aqute-bnd-annotation)
9630 (name "java-aqute-bndlib")
9631 (arguments
9632 `(#:jar-name "java-bndlib.jar"
9633 #:source-dir "biz.aQute.bndlib/src"
9634 #:tests? #f)); no tests
9635 (inputs
9636 `(("slf4j" ,java-slf4j-api)
9637 ("osgi-annot" ,java-osgi-annotation)
9638 ("java-aqute-libg" ,java-aqute-libg)
9639 ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation)
9640 ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations)
9641 ("java-osgi-service-repository" ,java-osgi-service-repository)
9642 ("java-osgi-service-log" ,java-osgi-service-log)
9643 ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations)
9644 ("java-osgi-namespace-contract" ,java-osgi-namespace-contract)
9645 ("java-osgi-namespace-extender" ,java-osgi-namespace-extender)
9646 ("java-osgi-namespace-service" ,java-osgi-namespace-service)
9647 ("promise" ,java-osgi-util-promise)
9648 ("osgi" ,java-osgi-core)))))
9649
9650 (define-public java-ops4j-pax-tinybundles
9651 (package
9652 (name "java-ops4j-pax-tinybundles")
9653 (version "2.1.1")
9654 (source (origin
9655 (method url-fetch)
9656 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/"
9657 "archive/tinybundles-" version ".tar.gz"))
9658 (sha256
9659 (base32
9660 "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871"))))
9661 (arguments
9662 `(#:jar-name "java-ops4j-pax-tinybundles.jar"
9663 #:source-dir "src/main/java"
9664 #:test-exclude
9665 ;; Abstract base classes for other tests
9666 (list "**/BndTest.java" "**/CoreTest.java")
9667 #:phases
9668 (modify-phases %standard-phases
9669 (add-before 'check 'fix-version
9670 (lambda _
9671 ;; This test has a reference to an old version of bndlib we are not
9672 ;; packaging. It uses the version referenced in pom.xml. We replace
9673 ;; it with our own version.
9674 (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
9675 (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*")
9676 ,(package-version java-aqute-bndlib)))
9677 #t)))))
9678 (inputs
9679 `(("lang" ,java-ops4j-base-lang)
9680 ("io" ,java-ops4j-base-io)
9681 ("store" ,java-ops4j-base-store)
9682 ("slf4j" ,java-slf4j-api)
9683 ("libg" ,java-aqute-libg)
9684 ("bndlib" ,java-aqute-bndlib)))
9685 (native-inputs
9686 `(("junit" ,java-junit)
9687 ("hamcrest" ,java-hamcrest-core)
9688 ("log4j" ,java-log4j-api)
9689 ("bndannotation" ,java-aqute-bnd-annotation)
9690 ("framework" ,java-osgi-framework)))
9691 (build-system ant-build-system)
9692 (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles")
9693 (synopsis "Java APIs to create OSGi related artifacts")
9694 (description "Tinybundles is all about creating OSGi related artifacts like
9695 Bundles, Fragments and Deployment Packages with Java Api. It is very convenient
9696 to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the
9697 other hand, this library can be a foundation of real end user tools that need
9698 to create those artifacts.")
9699 (license license:asl2.0)))
9700
9701 (define-public java-ops4j-pax-exam-core
9702 (package
9703 (name "java-ops4j-pax-exam-core")
9704 (version "4.11.0")
9705 (source (origin
9706 (method url-fetch)
9707 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/"
9708 "archive/exam-reactor-" version ".tar.gz"))
9709 (sha256
9710 (base32
9711 "08mzw8nkah3rj3vznlplnawspxhp61zgvb44ifqa1rni1cvbms2g"))))
9712 (arguments
9713 `(#:jar-name "java-ops4j-pax-exam-core.jar"
9714 #:source-dir "core/pax-exam/src/main/java"
9715 #:test-dir "core/pax-exam/src/test"))
9716 (inputs
9717 `(("slf4j" ,java-slf4j-api)
9718 ("lang" ,java-ops4j-base-lang)
9719 ("io" ,java-ops4j-base-io)
9720 ("util-property" ,java-ops4j-base-util-property)
9721 ("util-store" ,java-ops4j-base-store)
9722 ("java-osgi-core" ,java-osgi-core)))
9723 (native-inputs
9724 `(("junit" ,java-junit)
9725 ("hamcrest" ,java-hamcrest-core)))
9726 (build-system ant-build-system)
9727 (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview")
9728 (synopsis "In-Container Testing for OSGi, Java EE and CDI")
9729 (description "Pax Exam creates OSGi bundles for testing purposes. It lets
9730 the user take control of the OSGi framework, the test framework (e.g. JUnit) and
9731 the system under test at the same time.")
9732 (license license:asl2.0)))
9733
9734 (define-public java-ops4j-pax-exam-core-spi
9735 (package
9736 (inherit java-ops4j-pax-exam-core)
9737 (name "java-ops4j-pax-exam-core-spi")
9738 (arguments
9739 `(#:jar-name "java-ops4j-pax-exam-spi.jar"
9740 #:source-dir "src/main/java"
9741 #:test-exclude
9742 (list
9743 ;; Abstract base class, not a test
9744 "**/BaseStagedReactorTest.java"
9745 ;; Depends on org.mortbay.jetty.testwars:test-war-dump
9746 "**/WarBuilderTest.java")
9747 #:phases
9748 (modify-phases %standard-phases
9749 (add-before 'configure 'chdir
9750 (lambda _
9751 ;; Tests assume we are in this directory
9752 (chdir "core/pax-exam-spi")
9753 #t))
9754 (add-before 'check 'fix-tests
9755 (lambda _
9756 ;; One test checks that this file is present.
9757 (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi")
9758 (with-output-to-file
9759 "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties"
9760 (lambda _
9761 (display
9762 (string-append "artifactId = pax-exam-spi\n"
9763 "version = " ,(package-version java-ops4j-pax-exam-core-spi)))))
9764 ;; Maven puts compilation results in the target directory, while we
9765 ;; put them in the build directory.
9766 (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java"
9767 "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java"
9768 "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java")
9769 (("target") "build"))
9770 ;; One test is expected to fail, but it doesn't throw the expected exception
9771 (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java"
9772 (("AssertionError") "IllegalArgumentException"))
9773 #t)))))
9774 (inputs
9775 `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core)
9776 ("lang" ,java-ops4j-base-lang)
9777 ("monitors" ,java-ops4j-base-monitors)
9778 ("store" ,java-ops4j-base-store)
9779 ("io" ,java-ops4j-base-io)
9780 ("spi" ,java-ops4j-base-spi)
9781 ("osgi" ,java-osgi-core)
9782 ("slf4j" ,java-slf4j-api)
9783 ("tinybundles" ,java-ops4j-pax-tinybundles)))
9784 (native-inputs
9785 `(("mockito" ,java-mockito-1)
9786 ("junit" ,java-junit)
9787 ("hamcrest" ,java-hamcrest-core)
9788 ("cglib" ,java-cglib)
9789 ("objenesis" ,java-objenesis)
9790 ("asm" ,java-asm)))))
9791
9792 (define-public java-ops4j-pax-exam-core-junit
9793 (package
9794 (inherit java-ops4j-pax-exam-core)
9795 (name "java-ops4j-pax-exam-core-junit")
9796 (arguments
9797 `(#:jar-name "ops4j-pax-exam-core-junit.jar"
9798 #:source-dir "drivers/pax-exam-junit4/src/main/java"
9799 #:tests? #f)); no tests
9800 (inputs
9801 `(("junit" ,java-junit)
9802 ("slf4j" ,java-slf4j-api)
9803 ("core" ,java-ops4j-pax-exam-core)
9804 ("spi" ,java-ops4j-pax-exam-core-spi)))
9805 (native-inputs '())))
9806
9807 (define-public java-fasterxml-jackson-annotations
9808 (package
9809 (name "java-fasterxml-jackson-annotations")
9810 (version "2.9.4")
9811 (source (origin
9812 (method url-fetch)
9813 (uri (string-append "https://github.com/FasterXML/"
9814 "jackson-annotations/archive/"
9815 "jackson-annotations-" version ".tar.gz"))
9816 (sha256
9817 (base32
9818 "0mr95xd0da6a4g95zvrl1ryk5n5zv2rc696w3xnsr5hxk2gicfc4"))))
9819 (build-system ant-build-system)
9820 (arguments
9821 `(#:jar-name "jackson-annotations.jar"
9822 #:source-dir "src/main/java"
9823 #:test-dir "src/test"))
9824 (native-inputs
9825 `(("junit" ,java-junit)))
9826 (home-page "https://github.com/FasterXML/jackson-annotations")
9827 (synopsis "General purpose annotations for the Jackson Data Processor")
9828 (description "This package contains general purpose annotations for the
9829 Jackson Data Processor, used on value and handler types. The only annotations
9830 not included are ones that require dependency to the Databind package.")
9831 (license license:asl2.0)))
9832
9833 (define-public java-fasterxml-jackson-core
9834 (package
9835 (name "java-fasterxml-jackson-core")
9836 (version "2.9.4")
9837 (source (origin
9838 (method url-fetch)
9839 (uri (string-append "https://github.com/FasterXML/"
9840 "jackson-core/archive/"
9841 "jackson-core-" version ".tar.gz"))
9842 (sha256
9843 (base32
9844 "159hsnk17jr1gyzkf01cxvsn45srnk37g949r7364qlsr527gjgd"))))
9845 (build-system ant-build-system)
9846 (arguments
9847 `(#:jar-name "jackson-core.jar"
9848 #:source-dir "src/main/java"
9849 #:test-dir "src/test"
9850 #:test-exclude
9851 (list
9852 ;; Expected failure. pom.xml excludes these
9853 "**/failing/**"
9854 ;; Base classes that have no constructor for junit
9855 "**/BaseTest.java"
9856 "**/ConcurrencyReadTest.java"
9857 "**/ManualCharAccessTest.java"
9858 "**/ManualCharAccessTest.java"
9859 "**/TrailingCommasTest.java"
9860 "**/AsyncMissingValuesInObjectTest.java"
9861 "**/AsyncMissingValuesInArrayTest.java")
9862 #:phases
9863 (modify-phases %standard-phases
9864 (add-before 'configure 'generate-PackageVersion.java
9865 (lambda _
9866 (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java")
9867 (in (string-append out ".in")))
9868 (copy-file in out)
9869 (substitute* out
9870 (("@package@") "com.fasterxml.jackson.core.json")
9871 (("@projectversion@") ,version)
9872 (("@projectgroupid@") "com.fasterxml.jackson.core")
9873 (("@projectartifactid@") "jackson-core")))
9874 #t))
9875 (add-before 'build 'copy-resources
9876 (lambda _
9877 (copy-recursively "src/main/resources"
9878 "build/classes")
9879 #t))
9880 (add-before 'check 'copy-test-resources
9881 (lambda _
9882 (copy-recursively "src/test/resources"
9883 "build/test-classes")
9884 #t)))))
9885 (native-inputs
9886 `(("junit" ,java-junit)
9887 ("hamcrest" ,java-hamcrest-core)))
9888 (home-page "https://github.com/FasterXML/jackson-core")
9889 (synopsis "Low-level streaming parser and generator abstractions")
9890 (description "This package contains core low-level incremental
9891 (streaming) parser and generator abstractions used by the Jackson Data
9892 Processor. It also includes the default implementation of handler types
9893 (parser, generator) that handle JSON format.")
9894 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9895
9896 (define-public java-fasterxml-jackson-databind
9897 (package
9898 (name "java-fasterxml-jackson-databind")
9899 (version "2.9.4")
9900 (source (origin
9901 (method url-fetch)
9902 (uri (string-append "https://github.com/FasterXML/"
9903 "jackson-databind/archive/"
9904 "jackson-databind-" version ".tar.gz"))
9905 (sha256
9906 (base32
9907 "1zd2cw4z6kdkbx8za96xh9pyicv2a2l7y0rkcx2fqd8hv6d47s08"))))
9908 (build-system ant-build-system)
9909 (arguments
9910 `(#:jar-name "jackson-databind.jar"
9911 #:source-dir "src/main/java"
9912 #:tests? #f; requires javax.measures for which I can't find a free implementation
9913 #:phases
9914 (modify-phases %standard-phases
9915 (add-before 'configure 'generate-PackageVersion.java
9916 (lambda _
9917 (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java")
9918 (in (string-append out ".in")))
9919 (copy-file in out)
9920 (substitute* out
9921 (("@package@") "com.fasterxml.jackson.databind.cfg")
9922 (("@projectversion@") ,version)
9923 (("@projectgroupid@") "com.fasterxml.jackson.databind")
9924 (("@projectartifactid@") "jackson-databind")))
9925 #t))
9926 (add-before 'build 'copy-resources
9927 (lambda _
9928 (copy-recursively "src/main/resources" "build/classes")
9929 #t)))))
9930 (inputs
9931 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
9932 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)))
9933 (home-page "https://github.com/FasterXML/jackson-databind")
9934 (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor")
9935 (description "This package contains the general-purpose data-binding
9936 functionality and tree-model for Jackson Data Processor. It builds on core
9937 streaming parser/generator package, and uses Jackson Annotations for
9938 configuration.")
9939 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9940
9941 (define-public java-fasterxml-jackson-modules-base-jaxb
9942 (package
9943 (name "java-fasterxml-jackson-modules-base-jaxb")
9944 (version "2.9.4")
9945 (source (origin
9946 (method url-fetch)
9947 (uri (string-append "https://github.com/FasterXML/"
9948 "jackson-modules-base/archive/"
9949 "jackson-modules-base-" version ".tar.gz"))
9950 (sha256
9951 (base32
9952 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
9953 (build-system ant-build-system)
9954 (arguments
9955 `(#:jar-name "jackson-modules-base-jaxb.jar"
9956 #:source-dir "jaxb/src/main/java"
9957 #:test-dir "jaxb/src/test"
9958 #:test-exclude
9959 ;; Base class for tests
9960 (list "**/BaseJaxbTest.java")
9961 #:phases
9962 (modify-phases %standard-phases
9963 (add-before 'configure 'generate-PackageVersion.java
9964 (lambda _
9965 (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/"
9966 "jackson/module/jaxb/PackageVersion.java"))
9967 (in (string-append out ".in")))
9968 (copy-file in out)
9969 (substitute* out
9970 (("@package@") "com.fasterxml.jackson.module.jaxb")
9971 (("@projectversion@") ,version)
9972 (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb")
9973 (("@projectartifactid@") "jackson-module-jaxb")))
9974 #t))
9975 (add-before 'build 'copy-resources
9976 (lambda _
9977 (copy-recursively "jaxb/src/main/resources" "build/classes")
9978 #t)))))
9979 (inputs
9980 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
9981 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
9982 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
9983 (native-inputs
9984 `(("java-junit" ,java-junit)))
9985 (home-page "https://github.com/FasterXML/jackson-modules-base")
9986 (synopsis "Jaxb annotations jackson module")
9987 (description "This package is the jaxb annotations module for jackson.")
9988 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9989
9990 (define-public java-fasterxml-jackson-modules-base-mrbean
9991 (package
9992 (name "java-fasterxml-jackson-modules-base-mrbean")
9993 (version "2.9.4")
9994 (source (origin
9995 (method url-fetch)
9996 (uri (string-append "https://github.com/FasterXML/"
9997 "jackson-modules-base/archive/"
9998 "jackson-modules-base-" version ".tar.gz"))
9999 (sha256
10000 (base32
10001 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
10002 (build-system ant-build-system)
10003 (arguments
10004 `(#:jar-name "jackson-modules-base-mrbean.jar"
10005 #:source-dir "mrbean/src/main/java"
10006 #:test-dir "mrbean/src/test"
10007 #:test-exclude
10008 ;; Base class for tests
10009 (list "**/BaseTest.java")
10010 #:phases
10011 (modify-phases %standard-phases
10012 (add-before 'configure 'generate-PackageVersion.java
10013 (lambda _
10014 (let* ((out (string-append "mrbean/src/main/java/com/fasterxml/"
10015 "jackson/module/mrbean/PackageVersion.java"))
10016 (in (string-append out ".in")))
10017 (copy-file in out)
10018 (substitute* out
10019 (("@package@") "com.fasterxml.jackson.module.mrbean")
10020 (("@projectversion@") ,version)
10021 (("@projectgroupid@") "com.fasterxml.jackson.module.mrbean")
10022 (("@projectartifactid@") "jackson-module-mrbean")))
10023 #t)))))
10024 (inputs
10025 `(("java-asm" ,java-asm)
10026 ("java-fasterxml-jackson-annotations"
10027 ,java-fasterxml-jackson-annotations)
10028 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
10029 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
10030 (native-inputs
10031 `(("java-junit" ,java-junit)))
10032 (home-page "https://github.com/FasterXML/jackson-modules-base")
10033 (synopsis "POJO type materialization for Java")
10034 (description "This package implements POJO type materialization.
10035 Databinders can construct implementation classes for Java interfaces as part
10036 of deserialization.")
10037 (license license:asl2.0)))
10038
10039 (define-public java-snakeyaml
10040 (package
10041 (name "java-snakeyaml")
10042 (version "1.18")
10043 (source (origin
10044 (method url-fetch)
10045 (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
10046 version ".tar.gz"))
10047 (file-name (string-append name "-" version ".tar.gz"))
10048 (sha256
10049 (base32
10050 "0474cqcv46zgv9bhms2vgawakq1vyj0hp3h3f1bfys46msia90bh"))))
10051 (build-system ant-build-system)
10052 (arguments
10053 `(#:jar-name "java-snakeyaml.jar"
10054 #:source-dir "src/main/java"
10055 ;; Tests require velocity, a cyclic dependency, and
10056 ;; java-spring-framework-context which is not packaged.
10057 #:tests? #f))
10058 (home-page "https://bitbucket.org/asomov/snakeyaml")
10059 (synopsis "YAML processor")
10060 (description "SnakeYAML is a YAML processor for the Java Virtual Machine.")
10061 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
10062
10063 (define-public java-fasterxml-jackson-dataformat-yaml
10064 (package
10065 (name "java-fasterxml-jackson-dataformat-yaml")
10066 (version "2.9.4")
10067 (source (origin
10068 (method url-fetch)
10069 (uri (string-append "https://github.com/FasterXML/"
10070 "jackson-dataformats-text/archive/"
10071 "jackson-dataformats-text-" version ".tar.gz"))
10072 (sha256
10073 (base32
10074 "1hikl06khaxbg439avf442qifcadap8w0lx13f0nnhp2vh3dkbz7"))))
10075 (build-system ant-build-system)
10076 (arguments
10077 `(#:jar-name "jackson-dataformat-yaml.jar"
10078 #:source-dir "yaml/src/main/java"
10079 #:test-dir "yaml/src/test"
10080 #:test-exclude (list "**/failing/**.java")
10081 #:phases
10082 (modify-phases %standard-phases
10083 (add-before 'configure 'generate-PackageVersion.java
10084 (lambda _
10085 (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java")
10086 (in (string-append out ".in")))
10087 (copy-file in out)
10088 (substitute* out
10089 (("@package@") "com.fasterxml.jackson.dataformat.yaml")
10090 (("@projectversion@") ,version)
10091 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml")
10092 (("@projectartifactid@") "jackson-dataformat-yaml")))
10093 #t)))))
10094 (inputs
10095 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
10096 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
10097 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
10098 ("java-snakeyaml" ,java-snakeyaml)))
10099 (native-inputs
10100 `(("junit" ,java-junit)
10101 ("hamcrest" ,java-hamcrest-core)
10102 ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi)
10103 ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit)
10104 ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core)))
10105 (home-page "https://github.com/FasterXML/jackson-dataformats-text")
10106 (synopsis "Yaml backend for Jackson")
10107 (description "Dataformat backends are used to support format alternatives
10108 to JSON, supported by default. This is done by sub-classing Jackson core
10109 abstractions.")
10110 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
10111
10112 (define-public java-stax2-api
10113 (package
10114 (name "java-stax2-api")
10115 (version "4.0.0")
10116 (source (origin
10117 (method url-fetch)
10118 (uri (string-append "https://github.com/FasterXML/stax2-api/archive/"
10119 "stax2-api-" version ".tar.gz"))
10120 (sha256
10121 (base32
10122 "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq"))))
10123 (build-system ant-build-system)
10124 (arguments
10125 `(#:jar-name "java-stax2-api.jar"
10126 #:source-dir "src/main/java"
10127 #:tests? #f)); no tests
10128 (home-page "https://github.com/FasterXML/stax2-api")
10129 (synopsis "Stax2 API")
10130 (description "Stax2 API is an extension to basic Stax 1.0 API that adds
10131 significant new functionalities, such as full-featured bi-direction validation
10132 interface and high-performance Typed Access API.")
10133 (license license:bsd-2)))
10134
10135 (define-public java-woodstox-core
10136 (package
10137 (name "java-woodstox-core")
10138 (version "5.0.3")
10139 (source (origin
10140 (method git-fetch)
10141 (uri (git-reference
10142 (url "https://github.com/FasterXML/woodstox")
10143 (commit (string-append "woodstox-core-" version))))
10144 (file-name (git-file-name name version))
10145 (sha256
10146 (base32
10147 "0bfylk24a967hwxprxqbg6cdvm6n4ldcarp54yg980viwvjiglyp"))))
10148 (build-system ant-build-system)
10149 (arguments
10150 `(#:jar-name "woodstox.jar"
10151 #:test-exclude
10152 (list "**/Base*.java" "failing/**")
10153 #:phases
10154 (modify-phases %standard-phases
10155 (add-before 'build 'remove-msv-dep
10156 (lambda _
10157 ;; we don't need osgi, and it depends on msv
10158 (delete-file-recursively "src/main/java/com/ctc/wstx/osgi")
10159 ;; msv's latest release is from 2011 and we don't need it
10160 (delete-file-recursively "src/main/java/com/ctc/wstx/msv")
10161 (delete-file-recursively "src/test/java/wstxtest/osgi")
10162 (delete-file-recursively "src/test/java/wstxtest/msv")
10163 #t))
10164 (add-before 'build 'copy-resources
10165 (lambda _
10166 (copy-recursively "src/main/resources" "build/classes")
10167 #t)))))
10168 (inputs
10169 `(("stax2" ,java-stax2-api)))
10170 (native-inputs
10171 `(("junit" ,java-junit)))
10172 (home-page "https://github.com/FasterXML/woodstox")
10173 (synopsis "Stax XML API implementation")
10174 (description "Woodstox is a stax XML API implementation.")
10175 (license license:asl2.0)))
10176
10177 (define-public java-fasterxml-jackson-dataformat-xml
10178 (package
10179 (name "java-fasterxml-jackson-dataformat-xml")
10180 (version "2.9.4")
10181 (source (origin
10182 (method git-fetch)
10183 (uri (git-reference
10184 (url "https://github.com/FasterXML/jackson-dataformat-xml")
10185 (commit (string-append "jackson-dataformat-xml-" version))))
10186 (file-name (git-file-name name version))
10187 (sha256
10188 (base32
10189 "0s1wl65mbs57c2hz2v8rnh8i04y5lpyyvnjz562j5j6b83vwwpfx"))))
10190 (build-system ant-build-system)
10191 (arguments
10192 `(#:jar-name "jackson-dataformat-xml.jar"
10193 #:source-dir "src/main/java"
10194 #:test-exclude
10195 (list "**/failing/**")
10196 #:phases
10197 (modify-phases %standard-phases
10198 (add-before 'configure 'generate-PackageVersion.java
10199 (lambda _
10200 (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java")
10201 (in (string-append out ".in")))
10202 (copy-file in out)
10203 (newline)
10204 (substitute* out
10205 (("@package@") "com.fasterxml.jackson.dataformat.xml")
10206 (("@projectversion@") ,version)
10207 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml")
10208 (("@projectartifactid@") "jackson-dataformat-xml")))
10209 #t))
10210 (add-before 'build 'copy-resources
10211 (lambda _
10212 (copy-recursively "src/main/resources" "build/classes")
10213 #t)))))
10214 (inputs
10215 `(("jackson-annotations" ,java-fasterxml-jackson-annotations)
10216 ("jackson-core" ,java-fasterxml-jackson-core)
10217 ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb)
10218 ("jackson-databind" ,java-fasterxml-jackson-databind)
10219 ("stax2-api" ,java-stax2-api)
10220 ("woodstox" ,java-woodstox-core)))
10221 (native-inputs
10222 `(("junit" ,java-junit)
10223 ("hamcrest" ,java-hamcrest-core)))
10224 (home-page "https://github.com/FasterXML/jackson-dataformat-xml")
10225 (synopsis "Read and write XML")
10226 (description "This package contains Jackson extension component for reading
10227 and writing XML encoded data.
10228
10229 Further, the goal is to emulate how JAXB data-binding works with \"Code-first\"
10230 approach (that is, no support is added for \"Schema-first\" approach). Support
10231 for JAXB annotations is provided by JAXB annotation module; this module
10232 provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator},
10233 @code{JsonFactory}) as well as small number of higher level overrides needed to
10234 make data-binding work.")
10235 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
10236
10237 (define-public java-hdrhistogram
10238 (package
10239 (name "java-hdrhistogram")
10240 (version "2.1.9")
10241 (source (origin
10242 (method git-fetch)
10243 (uri (git-reference
10244 (url "https://github.com/HdrHistogram/HdrHistogram")
10245 (commit (string-append "HdrHistogram-" version))))
10246 (file-name (git-file-name name version))
10247 (sha256
10248 (base32
10249 "1cw8aa1vk258k42xs6wpy72m4gbai540jq032qsa7c5586iawx2d"))))
10250 (build-system ant-build-system)
10251 (arguments
10252 `(#:jar-name "java-hdrhistogram.jar"
10253 #:source-dir "src/main/java"
10254 #:phases
10255 (modify-phases %standard-phases
10256 (add-after 'unpack 'make-files-writable
10257 (lambda _
10258 (for-each make-file-writable (find-files "."))
10259 #t))
10260 (add-before 'configure 'set-version
10261 (lambda _
10262 (let* ((version-java "src/main/java/org/HdrHistogram/Version.java")
10263 (template (string-append version-java ".template")))
10264 (copy-file template version-java)
10265 (substitute* version-java
10266 (("\\$VERSION\\$") ,version)
10267 (("\\$BUILD_TIME\\$") "0"))
10268 #t))))))
10269 (native-inputs
10270 `(("junit" ,java-junit)
10271 ("hamcrest" ,java-hamcrest-core)))
10272 (home-page "https://hdrhistogram.github.io/HdrHistogram")
10273 (synopsis "High dynamic range histogram")
10274 (description "Hdrhistogram creates histograms that support
10275 recording and analyzing sampled data value counts across a configurable integer
10276 value range with configurable value precision within the range. Value precision
10277 is expressed as the number of significant digits in the value recording, and
10278 provides control over value quantization behavior across the value range and
10279 the subsequent value resolution at any given level.")
10280 (license license:public-domain)))
10281
10282 (define-public java-cofoja
10283 (package
10284 (name "java-cofoja")
10285 (version "1.3")
10286 (source (origin
10287 (method git-fetch)
10288 (uri (git-reference
10289 (url "https://github.com/nhatminhle/cofoja")
10290 (commit (string-append "v" version))))
10291 (file-name (string-append "java-cofoja-" version "-checkout"))
10292 (sha256
10293 (base32
10294 "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w"))))
10295 (build-system ant-build-system)
10296 (arguments
10297 `(#:build-target "dist"
10298 #:test-target "test"
10299 #:jdk ,icedtea-8
10300 #:make-flags
10301 (list "-Ddist.dir=dist")
10302 #:modules ((guix build ant-build-system)
10303 (guix build java-utils)
10304 (guix build utils)
10305 (srfi srfi-1)
10306 (ice-9 match))
10307 #:phases
10308 (modify-phases %standard-phases
10309 ;; The bulid system ignores the class path the ant-build-system sets
10310 ;; up and instead expects to find all dependencies in the "lib"
10311 ;; directory.
10312 (add-after 'unpack 'create-libdir
10313 (lambda* (#:key inputs #:allow-other-keys)
10314 (mkdir-p "lib")
10315 (for-each
10316 (lambda (file)
10317 (let ((target (string-append "lib/" (basename file))))
10318 (unless (file-exists? target)
10319 (symlink file target))))
10320 (append-map (match-lambda
10321 ((label . dir)
10322 (find-files dir "\\.jar$")))
10323 inputs))
10324 #t))
10325 (replace 'install (install-jars "dist")))))
10326 (inputs
10327 `(("java-asm" ,java-asm)))
10328 (native-inputs
10329 `(("java-junit" ,java-junit)))
10330 (home-page "https://github.com/nhatminhle/cofoja")
10331 (synopsis "Contracts for Java")
10332 (description "Contracts for Java, or Cofoja for short, is a contract
10333 programming framework and test tool for Java, which uses annotation processing
10334 and bytecode instrumentation to provide run-time checking. (In particular,
10335 this is not a static analysis tool.)")
10336 (license license:lgpl3+)))
10337
10338 (define-public java-aopalliance
10339 (package
10340 (name "java-aopalliance")
10341 (version "1.0")
10342 (source (origin
10343 (method git-fetch)
10344 ;; Note: this git repository is not official, but contains the
10345 ;; source code that is in the CVS repository. Downloading the
10346 ;; tarball from sourceforge is undeterministic, and the cvs download
10347 ;; fails.
10348 (uri (git-reference
10349 (url "https://github.com/hoverruan/aopalliance")
10350 (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0")))
10351 (file-name (string-append name "-" version))
10352 (sha256
10353 (base32
10354 "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr"))))
10355 (build-system ant-build-system)
10356 (arguments
10357 `(#:jar-name "java-aopalliance.jar"
10358 #:jdk ,icedtea-8
10359 #:tests? #f; no tests
10360 #:source-dir "aopalliance/src/main"
10361 #:modules ((guix build ant-build-system)
10362 (guix build utils)
10363 (guix build maven pom)
10364 (guix build java-utils)
10365 (sxml simple))
10366 #:phases
10367 (modify-phases %standard-phases
10368 (add-before 'install 'create-pom
10369 (lambda _
10370 (with-output-to-file "pom.xml"
10371 (lambda _
10372 (sxml->xml
10373 `((project
10374 (modelVersion "4.0.0")
10375 (name "aopalliance")
10376 (groupId "aopalliance")
10377 (artifactId "aopalliance")
10378 (version "1.0"))))))
10379 #t))
10380 (replace 'install
10381 (install-from-pom "pom.xml")))))
10382 (home-page "http://aopalliance.sourceforge.net")
10383 (synopsis "Aspect-Oriented Programming")
10384 (description "The AOP Alliance project is a joint project between several
10385 software engineering people who are interested in Aspect-Oriented Programming
10386 (AOP) and Java.")
10387 (license license:public-domain)))
10388
10389 (define-public java-javax-inject
10390 (package
10391 (name "java-javax-inject")
10392 (version "1")
10393 (source (origin
10394 (method git-fetch)
10395 (uri (git-reference
10396 (url "https://github.com/javax-inject/javax-inject")
10397 (commit version)))
10398 (file-name (git-file-name name version))
10399 (sha256
10400 (base32
10401 "1rspl0nkvk1jif6nccikw93xic6ljj2b6kpy2mffwi2mnvc13j7x"))))
10402 (build-system ant-build-system)
10403 (arguments
10404 `(#:jar-name "java-javax-inject.jar"
10405 #:tests? #f; no tests
10406 #:phases
10407 (modify-phases %standard-phases
10408 (replace 'install
10409 (install-from-pom "pom.xml")))))
10410 (home-page "https://github.com/javax-inject/javax-inject")
10411 (synopsis "JSR-330: Dependency Injection for Java")
10412 (description "This package specifies a means for obtaining objects in such
10413 a way as to maximize reusability, testability and maintainability compared to
10414 traditional approaches such as constructors, factories, and service locators
10415 (e.g., JNDI). This process, known as dependency injection, is beneficial to
10416 most nontrivial applications.
10417
10418 Many types depend on other types. For example, a @var{Stopwatch} might depend
10419 on a @var{TimeSource}. The types on which a type depends are known as its
10420 dependencies. The process of finding an instance of a dependency to use at run
10421 time is known as resolving the dependency. If no such instance can be found,
10422 the dependency is said to be unsatisfied, and the application is broken.")
10423 (license license:asl2.0)))
10424
10425 (define-public java-guice
10426 (package
10427 (name "java-guice")
10428 (version "4.1")
10429 (source (origin
10430 (method git-fetch)
10431 (uri (git-reference
10432 (url "https://github.com/google/guice")
10433 (commit version)))
10434 (file-name (git-file-name name version))
10435 (modules '((guix build utils)))
10436 (snippet
10437 `(begin
10438 (for-each delete-file (find-files "." ".*.jar")) #t))
10439 (sha256
10440 (base32
10441 "18im5hdfl4q1b9chww2s1ii60sn3ydyyar32a2sf2p2g8zlbdswq"))))
10442 (build-system ant-build-system)
10443 (arguments
10444 `(#:jar-name "java-guice.jar"
10445 #:jdk ,icedtea-8
10446 #:tests? #f; FIXME: tests are not in a java sub directory
10447 #:source-dir "core/src"
10448 #:phases
10449 (modify-phases %standard-phases
10450 (add-after 'unpack 'make-files-writable
10451 (lambda _
10452 (for-each make-file-writable (find-files "."))
10453 #t))
10454 (replace 'install
10455 (install-from-pom "core/pom.xml")))))
10456 (propagated-inputs
10457 `(("java-aopalliance" ,java-aopalliance)
10458 ("java-asm" ,java-asm)
10459 ("java-cglib" ,java-cglib)
10460 ("java-guava" ,java-guava)
10461 ("java-javax-inject" ,java-javax-inject)
10462 ("java-guice-parent-pom" ,java-guice-parent-pom)))
10463 (home-page "https://github.com/google/guice")
10464 (synopsis "Lightweight dependency injection framework")
10465 (description "Guice is a lightweight dependency injection framework for
10466 Java 6 and above.")
10467 (license license:asl2.0)))
10468
10469 (define-public java-guice-servlet
10470 (package
10471 (inherit java-guice)
10472 (name "java-guice-servlet")
10473 (arguments
10474 `(#:jar-name "guice-servlet.jar"
10475 #:source-dir "extensions/servlet/src/"
10476 #:jdk ,icedtea-8
10477 #:tests? #f ; FIXME: not in a java subdir
10478 #:phases
10479 (modify-phases %standard-phases
10480 (add-after 'unpack 'make-files-writable
10481 (lambda _
10482 (for-each make-file-writable (find-files "."))
10483 #t)))))
10484 (inputs
10485 `(("guice" ,java-guice)
10486 ("servlet" ,java-classpathx-servletapi)
10487 ,@(package-inputs java-guice)))))
10488
10489 (define java-guice-parent-pom
10490 (package
10491 (inherit java-guice)
10492 (name "java-guice-parent-pom")
10493 (arguments
10494 `(#:tests? #f
10495 #:phases
10496 (modify-phases %standard-phases
10497 (delete 'configure)
10498 (delete 'build)
10499 (add-after 'install 'install-extensions
10500 (install-pom-file "extensions/pom.xml"))
10501 (replace 'install
10502 (install-pom-file "pom.xml")))))
10503 (propagated-inputs
10504 `(("java-google-parent-pom" ,java-google-parent-pom-5)))))
10505
10506 (define java-google-parent-pom-5
10507 (package
10508 (name "java-google-parent-pom")
10509 (version "5")
10510 (source (origin
10511 (method git-fetch)
10512 (uri (git-reference
10513 (url "https://github.com/google/google-maven-parents")
10514 (commit (string-append "google-" version))))
10515 (file-name (git-file-name name version))
10516 (sha256
10517 (base32
10518 "0zb7hx24p8k8rfdvix2vsbfqn73jhrycdndvhf8j5gbii9wbqibv"))))
10519 (build-system ant-build-system)
10520 (arguments
10521 `(#:tests? #f
10522 #:phases
10523 (modify-phases %standard-phases
10524 (delete 'configure)
10525 (delete 'build)
10526 (replace 'install
10527 (install-pom-file "pom.xml")))))
10528 (home-page "https://github.com/google/google-maven-parents")
10529 (synopsis "Google parent pom")
10530 (description "This package contains the Maven parent POM for other Google
10531 Java projects.")
10532 (license license:asl2.0)))
10533
10534 (define-public java-assertj
10535 (package
10536 (name "java-assertj")
10537 (version "3.8.0")
10538 (source (origin
10539 (method git-fetch)
10540 (uri (git-reference
10541 (url "https://github.com/joel-costigliola/assertj-core")
10542 (commit (string-append "assertj-core-" version))))
10543 (file-name (git-file-name name version))
10544 (sha256
10545 (base32
10546 "1k35cg2in7pzk4pbdjryr0pll5lgk1r6ngrn0j8cdlgi7w8zh2d1"))))
10547 (build-system ant-build-system)
10548 (arguments
10549 `(#:jar-name "java-assertj.jar"
10550 #:jdk ,icedtea-8
10551 #:source-dir "src/main/java"
10552 #:tests? #f)); depends on tng-junit which depends on assertj
10553 (inputs
10554 `(("cglib" ,java-cglib)
10555 ("junit" ,java-junit)
10556 ("hamcrest" ,java-hamcrest-core)))
10557 (native-inputs
10558 `(("mockito" ,java-mockito-1)))
10559 (home-page "https://joel-costigliola.github.io/assertj/index.html")
10560 (synopsis "Fluent assertions for java")
10561 (description "AssertJ core is a Java library that provides a fluent
10562 interface for writing assertions. Its main goal is to improve test code
10563 readability and make maintenance of tests easier.")
10564 (license license:asl2.0)))
10565
10566 (define-public java-jboss-javassist
10567 (package
10568 (name "java-jboss-javassist")
10569 (version "3.21.0")
10570 (source (origin
10571 (method git-fetch)
10572 (uri (git-reference
10573 (url "https://github.com/jboss-javassist/javassist")
10574 (commit
10575 (string-append "rel_"
10576 (string-map
10577 (lambda (x) (if (eq? x #\.) #\_ x)) version)
10578 "_ga"))))
10579 (file-name (git-file-name name version))
10580 (sha256
10581 (base32
10582 "0h3zlcyqiaq01fspm69h7vki67raw305w89p4ha8vlhpzw02qifm"))
10583 (modules '((guix build utils)))
10584 (snippet
10585 '(begin
10586 (delete-file "javassist.jar")))))
10587 (build-system ant-build-system)
10588 (arguments
10589 `(#:jar-name "java-jboss-javassist.jar"
10590 #:jdk ,icedtea-8
10591 #:source-dir "src/main"
10592 #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3
10593 #:phases
10594 (modify-phases %standard-phases
10595 (add-after 'unpack 'make-files-writable
10596 (lambda _
10597 (for-each make-file-writable (find-files "."))
10598 #t)))))
10599 (native-inputs
10600 `(("junit" ,java-junit)))
10601 (home-page "https://github.com/jboss-javassist/javassist")
10602 (synopsis "Java bytecode engineering toolkit")
10603 (description "Javassist (JAVA programming ASSISTant) makes Java bytecode
10604 manipulation simple. It is a class library for editing bytecodes in Java; it
10605 enables Java programs to define a new class at runtime and to modify a class
10606 file when the JVM loads it.")
10607 (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl.
10608
10609 (define-public java-jcommander
10610 (package
10611 (name "java-jcommander")
10612 (version "1.71")
10613 (source (origin
10614 (method git-fetch)
10615 (uri (git-reference
10616 (url "https://github.com/cbeust/jcommander")
10617 (commit version)))
10618 (file-name (git-file-name name version))
10619 (sha256
10620 (base32
10621 "12vcpc19sd7jhvjgp7xz1qjanfix162xb3x2q5zah93rjklj1h57"))))
10622 (build-system ant-build-system)
10623 (arguments
10624 `(#:jar-name "java-jcommander.jar"
10625 #:jdk ,icedtea-8
10626 #:tests? #f; requires testng which depends on jcommander
10627 #:source-dir "src/main/java"))
10628 (home-page "https://jcommander.org")
10629 (synopsis "Command line parameters parser")
10630 (description "JCommander is a very small Java framework that makes it
10631 trivial to parse command line parameters. Parameters are declared with
10632 annotations.")
10633 (license license:asl2.0)))
10634
10635 (define-public java-bsh
10636 (package
10637 (name "java-bsh")
10638 (version "2.0b6")
10639 (source (origin
10640 (method git-fetch)
10641 (uri (git-reference
10642 (url "https://github.com/beanshell/beanshell")
10643 (commit version)))
10644 (file-name (git-file-name name version))
10645 (sha256
10646 (base32
10647 "0kz3f0xjack6c9syssi4qjw1rbd3q5963sk5pmr143hiibxa9csw"))
10648 (modules '((guix build utils)))
10649 (snippet
10650 '(begin
10651 ;; Delete bundled third-party jar archives.
10652 (for-each delete-file (find-files "." ".*.jar$"))
10653 (for-each (lambda (file) (chmod file #o644))
10654 (find-files "." "."))
10655 #t))))
10656 (build-system ant-build-system)
10657 (arguments
10658 `(#:build-target "jarall"
10659 #:test-target "junit-tests-all"
10660 #:make-flags (list "-DDATE" "(no date for reproducibility)")
10661 #:phases
10662 (modify-phases %standard-phases
10663 (add-before 'install 'fix-pom
10664 (lambda _
10665 (substitute* "pom.xml"
10666 (("org.apache-extras.beanshell") "org.beanshell"))
10667 #t))
10668 (replace 'install
10669 (install-from-pom "pom.xml")))))
10670 (inputs
10671 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
10672 ("java-commons-bsf" ,java-commons-bsf)))
10673 (native-inputs
10674 `(("java-junit" ,java-junit)
10675 ("javacc" ,javacc-3)))
10676 (home-page "http://beanshell.org/")
10677 (synopsis "Lightweight Scripting for Java")
10678 (description "BeanShell is a small, free, embeddable Java source
10679 interpreter with object scripting language features, written in Java.
10680 BeanShell dynamically executes standard Java syntax and extends it with common
10681 scripting conveniences such as loose types, commands, and method closures like
10682 those in Perl and JavaScript.")
10683 (license license:asl2.0)))
10684
10685 (define-public java-fest-util
10686 (package
10687 (name "java-fest-util")
10688 (version "1.2.5")
10689 (source (origin
10690 (method git-fetch)
10691 (uri (git-reference
10692 (url "https://github.com/alexruiz/fest-util/")
10693 (commit (string-append "fest-util-" version))))
10694 (file-name (git-file-name name version))
10695 (sha256
10696 (base32
10697 "02kgal7v85snyyvcsxvn4qphid455f4smh2wri1il8d9asw0djbz"))))
10698 (build-system ant-build-system)
10699 (arguments
10700 `(#:jar-name "java-fest-util.jar"
10701 #:source-dir "src/main/java"))
10702 (native-inputs
10703 `(("junit" ,java-junit)
10704 ("hamcrest" ,java-hamcrest-core)))
10705 (home-page "https://github.com/alexruiz/fest-util")
10706 (synopsis "FEST common utilities")
10707 (description "Common utilities used in all FEST module.")
10708 (license license:asl2.0)))
10709
10710 (define-public java-fest-test
10711 (package
10712 (name "java-fest-test")
10713 (version "2.1.0")
10714 (source (origin
10715 (method git-fetch)
10716 (uri (git-reference
10717 (url "https://github.com/alexruiz/fest-test/")
10718 (commit (string-append "fest-test-" version))))
10719 (file-name (git-file-name name version))
10720 (sha256
10721 (base32
10722 "0mg1d2jfh7kbx2c40dchbjr6d8pv59snsyb13mfxsr7xk5n69qbn"))))
10723 (build-system ant-build-system)
10724 (arguments
10725 `(#:jar-name "java-fest-test.jar"
10726 #:source-dir "src/main/java"
10727 #:tests? #f)); no tests
10728 (inputs
10729 `(("junit" ,java-junit)))
10730 (home-page "https://github.com/alexruiz/fest-test")
10731 (synopsis "Common FEST testing infrastructure")
10732 (description "Fest-test contains the common FEST testing infrastructure.")
10733 (license license:asl2.0)))
10734
10735 (define-public java-fest-assert
10736 (package
10737 (name "java-fest-assert")
10738 (version "2.0M10")
10739 (source (origin
10740 (method git-fetch)
10741 (uri (git-reference
10742 (url "https://github.com/alexruiz/fest-assert-2.x/")
10743 (commit (string-append "fest-assert-core-" version))))
10744 (file-name (git-file-name name version))
10745 (sha256
10746 (base32
10747 "1cp8zzyag3s85fz2w68sda9zzaal1y5f9wl8g72wkm12an40w6by"))))
10748 (build-system ant-build-system)
10749 (arguments
10750 `(#:jar-name "java-fest-assert.jar"
10751 #:source-dir "src/main/java"
10752 #:test-exclude
10753 (list
10754 "**/Abstract*.java"
10755 "**/*BaseTest.java"
10756 ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses
10757 "**/MessageFormatter_format_Test.java"
10758 "**/internal/*/*_assert*_Test.java")))
10759 (inputs
10760 `(("java-fest-util" ,java-fest-util)))
10761 (native-inputs
10762 `(("java-junit" ,java-junit)
10763 ("java-fest-test" ,java-fest-test)
10764 ("java-hamcrest-core" ,java-hamcrest-core)
10765 ("java-mockito" ,java-mockito-1)
10766 ("java-cglib" ,java-cglib)
10767 ("java-objenesis" ,java-objenesis)
10768 ("java-asm" ,java-asm)))
10769 (home-page "https://github.com/alexruiz/fest-assert-2.x")
10770 (synopsis "FEST fluent assertions")
10771 (description "FEST-Assert provides a fluent interface for assertions.")
10772 (license license:asl2.0)))
10773
10774 (define-public java-testng
10775 (package
10776 (name "java-testng")
10777 (version "6.14.3")
10778 (source (origin
10779 (method git-fetch)
10780 (uri (git-reference
10781 (url "https://github.com/cbeust/testng")
10782 (commit version)))
10783 (file-name (string-append name "-" version "-checkout"))
10784 (sha256
10785 (base32
10786 "0y6vq30i5g276kw0v2bhbvci22ijg7ax49ap2611yqlhbs4d6dqv"))))
10787 (build-system ant-build-system)
10788 (arguments
10789 `(#:jdk ,icedtea-8; java.util.function
10790 #:jar-name "java-testng.jar"
10791 #:source-dir "src/main/java"
10792 #:phases
10793 (modify-phases %standard-phases
10794 ;; FIXME: I don't know why these tests fail
10795 (add-after 'unpack 'delete-failing-tests
10796 (lambda _
10797 (substitute* "src/test/resources/testng.xml"
10798 (("<class name=\"test.configuration.github1625.TestRunnerIssue1625\"/>") "")
10799 (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") ""))
10800 #t))
10801 ;; We don't have groovy
10802 (add-after 'unpack 'delete-groovy-tests
10803 (lambda _
10804 (delete-file-recursively "src/test/java/test/dependent/issue1648/")
10805 (substitute* "src/test/resources/testng.xml"
10806 (("<class name=\"test.dependent.issue1648.TestRunner\"/>") ""))
10807 #t))
10808 (add-before 'build 'copy-resources
10809 (lambda _
10810 (copy-recursively "src/main/resources" "build/classes")
10811 #t))
10812 (add-before 'check 'copy-test-resources
10813 (lambda _
10814 (copy-recursively "src/test/resources" "build/test-classes")
10815 #t))
10816 (replace 'check
10817 (lambda _
10818 (invoke "ant" "compile-tests")
10819 ;; we don't have groovy
10820 (substitute* "src/test/resources/testng.xml"
10821 (("<class name=\"test.groovy.GroovyTest\" />") ""))
10822 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
10823 ":build/classes"
10824 ":build/test-classes")
10825 "-Dtest.resources.dir=src/test/resources"
10826 "org.testng.TestNG" "src/test/resources/testng.xml"))))))
10827 (propagated-inputs
10828 `(("junit" ,java-junit)
10829 ("java-jsr305" ,java-jsr305)
10830 ("java-bsh" ,java-bsh)
10831 ("java-jcommander" ,java-jcommander)
10832 ("java-guice" ,java-guice)
10833 ("snakeyaml" ,java-snakeyaml)))
10834 (native-inputs
10835 `(("guava" ,java-guava)
10836 ("java-javax-inject" ,java-javax-inject)
10837 ("java-hamcrest" ,java-hamcrest-all)
10838 ("java-assertj" ,java-assertj)
10839 ("java-mockito" ,java-mockito-1)
10840 ("cglib" ,java-cglib)
10841 ("asm" ,java-asm)
10842 ("aopalliance" ,java-aopalliance)))
10843 (home-page "https://testng.org")
10844 (synopsis "Testing framework")
10845 (description "TestNG is a testing framework inspired from JUnit and NUnit
10846 but introducing some new functionalities that make it more powerful and easier
10847 to use.")
10848 (license license:asl2.0)))
10849
10850 (define-public java-jnacl
10851 (let ((commit "094e819afdd63ea81a499b3bcb42a271006bebd9")
10852 (revision "2"))
10853 (package
10854 (name "java-jnacl")
10855 (version (string-append "0.1.0-" revision "." (string-take commit 7)))
10856 (source (origin
10857 (method git-fetch)
10858 (uri (git-reference
10859 (url "https://github.com/neilalexander/jnacl")
10860 (commit commit)))
10861 (file-name (git-file-name name version))
10862 (sha256
10863 (base32
10864 "1d6g6xhn83byv5943n7935wwjsk0ibk0qdvqgr699qqgqqmwisbb"))))
10865 (build-system ant-build-system)
10866 (arguments
10867 `(#:jar-name "jnacl.jar"
10868 #:source-dir "src/main/java"
10869 #:jdk ,icedtea-8
10870 #:phases
10871 (modify-phases %standard-phases
10872 (add-before 'build 'fix-tests
10873 (lambda _
10874 (substitute* '("src/test/java/com/neilalexander/jnacl/NaClTest.java"
10875 "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java")
10876 (("assertions.Assertions") "assertions.api.Assertions"))
10877 #t))
10878 (replace 'check
10879 (lambda _
10880 (invoke "ant" "compile-tests")
10881 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
10882 ":build/classes"
10883 ":build/test-classes")
10884 "org.testng.TestNG" "-testclass"
10885 "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class")
10886 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
10887 ":build/classes"
10888 ":build/test-classes")
10889 "org.testng.TestNG" "-testclass"
10890 "build/test-classes/com/neilalexander/jnacl/NaClTest.class"))))))
10891 (native-inputs
10892 `(("java-testng" ,java-testng)
10893 ("java-fest-util" ,java-fest-util)
10894 ("java-fest-assert" ,java-fest-assert)))
10895 (home-page "https://github.com/neilalexander/jnacl")
10896 (synopsis "Java implementation of NaCl")
10897 (description "Pure Java implementation of the NaCl: Networking and
10898 Cryptography library.")
10899 (license license:bsd-2))))
10900
10901 (define-public java-mvel2
10902 (package
10903 (name "java-mvel2")
10904 (version "2.3.1")
10905 (source (origin
10906 (method url-fetch)
10907 (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-"
10908 version ".Final.tar.gz"))
10909 (sha256
10910 (base32
10911 "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z"))))
10912 (build-system ant-build-system)
10913 (arguments
10914 `(#:jar-name "mvel2.jar"
10915 #:source-dir "src/main/java"
10916 #:test-exclude
10917 (list "**/Abstract*.java"
10918 ;; Base class with no tests
10919 "**/MVELThreadTest.java")
10920 #:phases
10921 (modify-phases %standard-phases
10922 (add-after 'install 'install-bin
10923 (lambda* (#:key outputs #:allow-other-keys)
10924 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
10925 (mkdir-p bin)
10926 (with-output-to-file (string-append bin "/mvel2")
10927 (lambda _
10928 (display
10929 (string-append
10930 "#!" (which "bash") "\n"
10931 "if [ \"$#\" -ne \"2\" ]; then\n"
10932 "echo 'Usage: mvel2 <script> <out.dir>'\n"
10933 "exit\n"
10934 "fi\n"
10935 "java -Dout.dir=$2 -cp " (getenv "CLASSPATH")
10936 ":" (assoc-ref outputs "out") "/share/java/mvel2.jar"
10937 " org.mvel2.sh.Main $1"))))
10938 (chmod (string-append bin "/mvel2") #o755))
10939 #t)))))
10940 (native-inputs
10941 `(("junit" ,java-junit)
10942 ("hamcrest" ,java-hamcrest-core)))
10943 (home-page "https://github.com/mvel/mvel")
10944 (synopsis "MVFLEX Expression Language")
10945 (description "MVEL has largely been inspired by Java syntax, but has some
10946 fundamental differences aimed at making it more efficient as an expression
10947 language, such as operators that directly support collection, array and string
10948 matching, as well as regular expressions. MVEL is used to evaluate expressions
10949 written using Java syntax.
10950
10951 In addition to the expression language, MVEL serves as a templating language for
10952 configuration and string construction.")
10953 (license license:asl2.0)))
10954
10955 (define-public java-commons-jexl-2
10956 (package
10957 (name "java-commons-jexl")
10958 (version "2.1.1")
10959 (source (origin
10960 (method url-fetch)
10961 (uri (string-append "mirror://apache/commons/jexl/source/"
10962 "commons-jexl-" version "-src.tar.gz"))
10963 (sha256
10964 (base32
10965 "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz"))))
10966 (build-system ant-build-system)
10967 (arguments
10968 `(#:jar-name "commons-jexl-2.jar"
10969 #:jdk ,icedtea-8
10970 #:source-dir "src/main/java"
10971 #:phases
10972 (modify-phases %standard-phases
10973 (add-before 'check 'disable-broken-tests
10974 (lambda* (#:key inputs #:allow-other-keys)
10975 (with-directory-excursion "src/test/java/org/apache/commons/jexl2/"
10976 (substitute* "ArithmeticTest.java"
10977 (("asserter.assertExpression\\(\"3 / 0\"") "//")
10978 (("asserter.assertExpression\\(\"imanull") "//"))
10979 ;; This test fails with "ambiguous method invocation"
10980 (delete-file "CacheTest.java")
10981 ;; This test doesn't have access to the temp directory
10982 (substitute* "ClassCreatorTest.java"
10983 (("java.io.tmpdir") "user.dir"))
10984 ;; This test fails in trying to detect whether it can run.
10985 (substitute* "ClassCreator.java"
10986 (("boolean canRun =.*") "boolean canRun = false;\n"))
10987 ;; ...and these tests depend on it.
10988 (delete-file "scripting/JexlScriptEngineOptionalTest.java")
10989 (delete-file "scripting/JexlScriptEngineTest.java"))
10990 #t))
10991 (add-before 'build 'run-javacc
10992 (lambda _
10993 (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/"
10994 (invoke "java" "jjtree" "Parser.jjt")
10995 (invoke "java" "javacc" "Parser.jj"))
10996 #t)))))
10997 (inputs
10998 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
10999 (native-inputs
11000 `(("java-junit" ,java-junit)
11001 ("java-hamcrest-core" ,java-hamcrest-core)
11002 ("javacc" ,javacc-4)))
11003 (home-page "https://commons.apache.org/proper/commons-jexl/")
11004 (synopsis "Java Expression Language ")
11005 (description "JEXL is a library intended to facilitate the implementation
11006 of dynamic and scripting features in applications and frameworks written in
11007 Java. JEXL implements an Expression Language based on some extensions to the
11008 JSTL Expression Language supporting most of the constructs seen in
11009 shell-script or ECMAScript. Its goal is to expose scripting features usable
11010 by technical operatives or consultants working with enterprise platforms.")
11011 (license license:asl2.0)))
11012
11013 (define-public java-lz4
11014 (package
11015 (name "java-lz4")
11016 (version "1.4.0")
11017 (source (origin
11018 (method git-fetch)
11019 (uri (git-reference
11020 (url "https://github.com/lz4/lz4-java")
11021 (commit version)))
11022 (file-name (git-file-name name version))
11023 (sha256
11024 (base32
11025 "0ydjakhv3cz34mfvv14qrh2ksdxifgjwwagjy7r46qr3f68hnf6y"))))
11026 (build-system ant-build-system)
11027 (arguments
11028 `(#:jar-name "lz4.jar"
11029 #:jdk ,icedtea-8
11030 #:source-dir "src/java:src/java-unsafe"
11031 #:tests? #f; FIXME: requires more dependencies
11032 #:phases
11033 (modify-phases %standard-phases
11034 (add-after 'unpack 'make-files-writable
11035 (lambda _
11036 (for-each make-file-writable (find-files "."))
11037 #t))
11038 (add-before 'configure 'generate-source
11039 (lambda _
11040 (with-directory-excursion "src/build/source_templates"
11041 (invoke "mvel2" "../gen_sources.mvel" "../../java"))
11042 #t)))))
11043 (native-inputs
11044 `(("mvel" ,java-mvel2)))
11045 (home-page "https://jpountz.github.io/lz4-java")
11046 (synopsis "Compression algorithm")
11047 (description "LZ4 - Java is a Java port of the popular lz4 compression
11048 algorithms and xxHash hashing algorithm.")
11049 (license license:asl2.0)))
11050
11051 (define-public java-bouncycastle
11052 (package
11053 (name "java-bouncycastle")
11054 (version "1.67")
11055 (source (origin
11056 (method git-fetch)
11057 (uri (git-reference
11058 (url "http://git.bouncycastle.org/repositories/bc-java")
11059 ;(url "https://github.com/bcgit/bc-java")
11060 (commit (string-append "r1rv" (substring version 2 4)))))
11061 (file-name (git-file-name name version))
11062 (sha256
11063 (base32
11064 "1449q7fyh03s1q0bqljcrhgacwcyqmg2bbvb3z084avgapwsainz"))
11065 (modules '((guix build utils)))
11066 (snippet
11067 '(begin
11068 (for-each delete-file
11069 (find-files "." "\\.jar$"))
11070 #t))))
11071 (build-system ant-build-system)
11072 (arguments
11073 `(#:jdk ,icedtea-8
11074 #:tests? #f
11075 #:phases
11076 (modify-phases %standard-phases
11077 (replace 'build
11078 (lambda _
11079 (invoke "ant" "-f" "ant/jdk15+.xml" "build-provider")
11080 (invoke "ant" "-f" "ant/jdk15+.xml" "build")))
11081 ;; FIXME: the tests freeze.
11082 ;; (replace 'check
11083 ;; (lambda _
11084 ;; (invoke "ant" "-f" "ant/jdk15+.xml" "test")))
11085 (replace 'install
11086 (install-jars "build/artifacts/jdk1.5/jars")))))
11087 (inputs
11088 `(("java-javax-mail" ,java-javax-mail)))
11089 (native-inputs
11090 `(("unzip" ,unzip)
11091 ("junit" ,java-junit)
11092 ("java-native-access" ,java-native-access)
11093 ("java-native-access-platform" ,java-native-access-platform)))
11094 (home-page "https://www.bouncycastle.org")
11095 (synopsis "Cryptographic library")
11096 (description "Bouncy Castle is a cryptographic library for the Java
11097 programming language.")
11098 (license license:expat)))
11099
11100 (define-public java-lmax-disruptor
11101 (package
11102 (name "java-lmax-disruptor")
11103 (version "3.3.7")
11104 (source (origin
11105 (method url-fetch)
11106 (uri (string-append "https://github.com/LMAX-Exchange/disruptor/"
11107 "archive/" version ".tar.gz"))
11108 (file-name (string-append name "-" version ".tar.gz"))
11109 (sha256
11110 (base32
11111 "17da2gwj5abnlsfgn2xqjk5lgzbg4vkb0hdv2dvc8r2fx4bi7w3g"))))
11112 (build-system ant-build-system)
11113 (arguments
11114 `(#:jar-name "java-lmax-disruptor.jar"
11115 #:jdk ,icedtea-8
11116 #:tests? #f)); tests hang
11117 (inputs
11118 `(("junit" ,java-junit)
11119 ("java-hdrhistogram" ,java-hdrhistogram)
11120 ("java-jmock" ,java-jmock)
11121 ("java-jmock-legacy" ,java-jmock-legacy)
11122 ("java-jmock-junit4" ,java-jmock-junit4)
11123 ("java-hamcrest-all" ,java-hamcrest-all)))
11124 (native-inputs
11125 `(("cglib" ,java-cglib)
11126 ("objenesis" ,java-objenesis)
11127 ("asm" ,java-asm)))
11128 (home-page "https://www.lmax.com/disruptor")
11129 (synopsis "High performance inter-thread communication")
11130 (description "LMAX Disruptor is a software pattern and software component
11131 for high performance inter-thread communication that avoids the need for
11132 message queues or resource locking.")
11133 (license license:asl2.0)))
11134
11135 (define-public java-commons-bcel
11136 (package
11137 (name "java-commons-bcel")
11138 (version "6.1")
11139 (source (origin
11140 (method url-fetch)
11141 (uri (string-append "mirror://apache/commons/bcel/source/bcel-"
11142 version "-src.tar.gz"))
11143 (sha256
11144 (base32
11145 "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy"))))
11146 (build-system ant-build-system)
11147 (arguments
11148 `(#:jar-name "bcel.jar"
11149 #:jdk ,icedtea-8
11150 #:source-dir "src/main/java"
11151 #:test-dir "src/test/java"
11152 ;; FIXME: Tests require the unpackaged jna.
11153 #:tests? #f))
11154 (home-page "https://commons.apache.org/proper/commons-bcel/")
11155 (synopsis "Byte code engineering library")
11156 (description "The Byte Code Engineering Library (Apache Commons BCEL) is
11157 intended to give users a convenient way to analyze, create, and
11158 manipulate (binary) Java class files. Classes are represented by objects
11159 which contain all the symbolic information of the given class: methods, fields
11160 and byte code instructions, in particular.
11161
11162 Such objects can be read from an existing file, be transformed by a
11163 program (e.g. a class loader at run-time) and written to a file again. An
11164 even more interesting application is the creation of classes from scratch at
11165 run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful
11166 if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format
11167 of Java @code{.class} files.")
11168 (license license:asl2.0)))
11169
11170 (define-public java-xerial-core
11171 (package
11172 (name "java-xerial-core")
11173 (version "2.1")
11174 (source (origin
11175 (method url-fetch)
11176 (uri (string-append "https://github.com/xerial/xerial-java/archive/"
11177 version ".tar.gz"))
11178 (file-name (string-append name "-" version ".tar.gz"))
11179 (sha256
11180 (base32
11181 "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d"))))
11182 (build-system ant-build-system)
11183 (arguments
11184 `(#:jar-name "xerial-core.jar"
11185 #:source-dir "xerial-core/src/main/java"
11186 #:test-dir "xerial-core/src/test"
11187 #:phases
11188 (modify-phases %standard-phases
11189 (add-before 'build 'copy-resources
11190 (lambda _
11191 (copy-recursively "xerial-core/src/main/resources"
11192 "build/classes")
11193 #t)))))
11194 (native-inputs
11195 `(("junit" ,java-junit)
11196 ("hamcrest" ,java-hamcrest-core)))
11197 (home-page "https://github.com/xerial/xerial-java")
11198 (synopsis "Data management libraries for Java")
11199 (description "Xerial is a set of data management libraries for the Java
11200 programming language. The ultimate goal of the Xerial project is to manage
11201 everything as database, including class objects, text format data, data
11202 streams, etc.")
11203 (license license:asl2.0)))
11204
11205 (define-public java-powermock-reflect
11206 (package
11207 (name "java-powermock-reflect")
11208 (version "1.7.3")
11209 (source (origin
11210 (method url-fetch)
11211 (uri (string-append "https://github.com/powermock/powermock/"
11212 "archive/powermock-" version ".tar.gz"))
11213 (file-name (string-append name "-" version ".tar.gz"))
11214 (sha256
11215 (base32
11216 "0sbgi5vqq7k72wzcdjb20s370vyd4hsbnx71pzb8ishml3gy7fwy"))
11217 (patches
11218 (search-patches "java-powermock-fix-java-files.patch"))))
11219 (build-system ant-build-system)
11220 (arguments
11221 `(#:jar-name "java-powermock-reflect.jar"
11222 #:jdk ,icedtea-8
11223 #:source-dir "powermock-reflect/src/main/java"
11224 #:test-dir "powermock-reflect/src/test"))
11225 (inputs
11226 `(("java-objenesis" ,java-objenesis)))
11227 (native-inputs
11228 `(("junit" ,java-junit)
11229 ("cglib" ,java-cglib)
11230 ("asm" ,java-asm)
11231 ("hamcrest" ,java-hamcrest-core)
11232 ("assertj" ,java-assertj)))
11233 (home-page "https://github.com/powermock/powermock")
11234 (synopsis "Mock library extension framework")
11235 (description "PowerMock is a framework that extends other mock libraries
11236 such as EasyMock with more powerful capabilities. PowerMock uses a custom
11237 classloader and bytecode manipulation to enable mocking of static methods,
11238 constructors, final classes and methods, private methods, removal of static
11239 initializers and more. By using a custom classloader no changes need to be
11240 done to the IDE or continuous integration servers which simplifies adoption.")
11241 (license license:asl2.0)))
11242
11243 (define-public java-powermock-core
11244 (package
11245 (inherit java-powermock-reflect)
11246 (name "java-powermock-core")
11247 (arguments
11248 `(#:jar-name "java-powermock-core.jar"
11249 #:source-dir "powermock-core/src/main/java"
11250 #:test-dir "powermock-core/src/test"
11251 #:tests? #f; requires powermock-api
11252 #:jdk ,icedtea-8
11253 #:phases
11254 (modify-phases %standard-phases
11255 (add-before 'build 'copy-resources
11256 (lambda _
11257 (copy-recursively "powermock-core/src/main/resources"
11258 "build/classes")
11259 #t)))))
11260 (inputs
11261 `(("reflect" ,java-powermock-reflect)
11262 ("javassist" ,java-jboss-javassist)))
11263 (native-inputs
11264 `(("junit" ,java-junit)
11265 ("assertj" ,java-assertj)
11266 ("mockito" ,java-mockito-1)))))
11267
11268 (define-public java-powermock-api-support
11269 (package
11270 (inherit java-powermock-reflect)
11271 (name "java-powermock-api-support")
11272 (build-system ant-build-system)
11273 (arguments
11274 `(#:jar-name "java-powermock-api-support.jar"
11275 #:jdk ,icedtea-8
11276 #:source-dir "powermock-api/powermock-api-support/src/main/java"
11277 #:tests? #f)); no tests
11278 (inputs
11279 `(("core" ,java-powermock-core)
11280 ("reflect" ,java-powermock-reflect)))))
11281
11282 (define-public java-powermock-modules-junit4-common
11283 (package
11284 (inherit java-powermock-reflect)
11285 (name "java-powermock-modules-junit4-common")
11286 (build-system ant-build-system)
11287 (arguments
11288 `(#:jar-name "java-powermock-modules-junit4-common.jar"
11289 #:jdk ,icedtea-8
11290 #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java"
11291 #:test-dir "powermock-modules/powermock-module-junit4-common/src/test"))
11292 (inputs
11293 `(("core" ,java-powermock-core)
11294 ("easymock" ,java-easymock)
11295 ("reflect" ,java-powermock-reflect)
11296 ("hamcrest" ,java-hamcrest-core)
11297 ("cglib" ,java-cglib)))))
11298
11299 (define-public java-powermock-modules-junit4
11300 (package
11301 (inherit java-powermock-reflect)
11302 (name "java-powermock-modules-junit4")
11303 (build-system ant-build-system)
11304 (arguments
11305 `(#:jar-name "java-powermock-modules-junit4.jar"
11306 #:jdk ,icedtea-8
11307 #:source-dir "powermock-modules/powermock-module-junit4/src/main/java"
11308 #:test-dir "powermock-modules/powermock-module-junit4/src/test"
11309 #:phases
11310 (modify-phases %standard-phases
11311 (add-before 'build 'fix-junit-detection
11312 (lambda _
11313 ;; Our junit version is 4.12-SNAPSHOT
11314 (substitute* (find-files "powermock-modules/powermock-module-junit4"
11315 "PowerMockJUnit4MethodValidator.java")
11316 (("4.12") "4.12-SNAPSHOT"))
11317 #t)))))
11318 (inputs
11319 `(("core" ,java-powermock-core)
11320 ("reflect" ,java-powermock-reflect)
11321 ("common" ,java-powermock-modules-junit4-common)
11322 ("cglib" ,java-cglib)))
11323 (native-inputs
11324 `(("easymock" ,java-easymock)
11325 ("hamcrest" ,java-hamcrest-core)
11326 ("objenesis" ,java-objenesis)
11327 ("asm" ,java-asm)
11328 ("junit" ,java-junit)))))
11329
11330 (define-public java-powermock-api-easymock
11331 (package
11332 (inherit java-powermock-reflect)
11333 (name "java-powermock-api-easymock")
11334 (build-system ant-build-system)
11335 (arguments
11336 `(#:jar-name "java-powermock-api-easymock.jar"
11337 #:jdk ,icedtea-8
11338 #:source-dir "powermock-api/powermock-api-easymock/src/main/java"
11339 #:tests? #f; no tests
11340 #:phases
11341 (modify-phases %standard-phases
11342 (add-before 'build 'fix-file
11343 (lambda _
11344 ;; FIXME: This looks wrong, but it fixes a build error.
11345 (with-directory-excursion "powermock-api/powermock-api-easymock"
11346 (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java"
11347 (("classLoader instanceof MockClassLoader") "false")
11348 (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";")))
11349 #t)))))
11350 (inputs
11351 `(("core" ,java-powermock-core)
11352 ("easymock" ,java-easymock)
11353 ("reflect" ,java-powermock-reflect)
11354 ("support" ,java-powermock-api-support)
11355 ("cglib" ,java-cglib)))))
11356
11357 (define-public java-jboss-jms-api-spec
11358 (package
11359 (name "java-jboss-jms-api-spec")
11360 (version "2.0")
11361 (source (origin
11362 (method url-fetch)
11363 (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/"
11364 "archive/jboss-jms-api_" version
11365 "_spec-1.0.1.Final.tar.gz"))
11366 (sha256
11367 (base32
11368 "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m"))))
11369 (build-system ant-build-system)
11370 (arguments
11371 `(#:jar-name "java-jboss-jms-api_spec.jar"
11372 #:jdk ,icedtea-8
11373 #:source-dir "."
11374 #:tests? #f)); no tests
11375 (home-page "https://github.com/jboss/jboss-jms-api_spec")
11376 (synopsis "Java Message Service API specification")
11377 (description "Java Message Service (JMS) API is used to send messages
11378 messages between two or more clients. It is a messaging standard that allows
11379 application components to create, send, receive, and read messages.")
11380 ; either gpl2 only with GPL Classpath Exception, or cddl.
11381 (license (list license:gpl2 license:cddl1.0))))
11382
11383 (define-public java-mail
11384 (package
11385 (name "java-mail")
11386 (version "1.6.0")
11387 (source (origin
11388 (method url-fetch)
11389 (uri (string-append "https://github.com/javaee/javamail/archive/"
11390 "JAVAMAIL-1_6_0.tar.gz"))
11391 (sha256
11392 (base32
11393 "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92"))))
11394 (build-system ant-build-system)
11395 (arguments
11396 `(#:jar-name "java-mail.jar"
11397 #:jdk ,icedtea-8
11398 #:source-dir "mail/src/main/java"
11399 #:test-dir "mail/src/test"
11400 #:test-exclude
11401 (list "**/CollectorFormatterTest.java"
11402 "**/CompactFormatterTest.java"
11403 "**/DurationFilterTest.java"
11404 "**/MailHandlerTest.java"
11405 "**/GetLocalAddressTest.java"
11406 ;; FIXME: both end with:
11407 ;; java.lang.ClassNotFoundException:
11408 ;; javax.mail.internet.MimeMultipartParseTest
11409 "**/MimeMultipartParseTest.java"
11410 "**/SearchTermSerializationTest.java")
11411 #:phases
11412 (modify-phases %standard-phases
11413 (add-before 'configure 'move-version.java
11414 (lambda _
11415 (copy-file "mail/src/main/resources/javax/mail/Version.java"
11416 "mail/src/main/java/javax/mail/Version.java")
11417 #t))
11418 (add-before 'build 'copy-resources
11419 (lambda _
11420 (copy-recursively "mail/src/main/resources/META-INF"
11421 "build/classes/META-INF")
11422 #t)))))
11423 (native-inputs
11424 `(("junit" ,java-junit)
11425 ("hamcrest" ,java-hamcrest-core)))
11426 (home-page "https://javaee.github.io/javamail/")
11427 (synopsis "Mail-related functionality in Java")
11428 (description "The JavaMail API provides a platform-independent and
11429 protocol-independent framework to build mail and messaging applications.")
11430 ;; General Public License Version 2 only ("GPL") or the Common Development
11431 ;; and Distribution License("CDDL")
11432 (license (list license:cddl1.1
11433 license:gpl2)))); with classpath exception
11434
11435 (define-public java-jeromq
11436 (package
11437 (name "java-jeromq")
11438 (version "0.4.3")
11439 (source (origin
11440 (method git-fetch)
11441 (uri (git-reference
11442 (url "https://github.com/zeromq/jeromq")
11443 (commit (string-append "v" version))))
11444 (file-name (string-append name "-" version "-checkout"))
11445 (sha256
11446 (base32
11447 "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj"))
11448 (patches (search-patches "java-jeromq-fix-tests.patch"))))
11449 (build-system ant-build-system)
11450 (arguments
11451 `(#:jar-name "java-jeromq.jar"
11452 #:source-dir "src/main/java"
11453 #:jdk ,icedtea-8
11454 #:test-exclude
11455 (list
11456 "**/Abstract*.java"
11457 ;; Requires network
11458 "**/ZBeaconTest.java"
11459 ;; Failures
11460 "**/DealerSpecTest.java"
11461 "**/CustomDecoderTest.java"
11462 "**/CustomEncoderTest.java"
11463 "**/ConnectRidTest.java"
11464 "**/ReqSpecTest.java"
11465 "**/PushPullSpecTest.java"
11466 "**/PubSubHwmTest.java"
11467 "**/RouterSpecTest.java"
11468 "**/ProxyTest.java")))
11469 (inputs
11470 `(("java-jnacl" ,java-jnacl)))
11471 (native-inputs
11472 `(("java-hamcrest-core" ,java-hamcrest-core)
11473 ("junit" ,java-junit)))
11474 (home-page "http://zeromq.org/bindings:java")
11475 (synopsis "Java binding for 0MQ")
11476 (description "Jeromq provides the java bindings for 0MQ.")
11477 (license license:mpl2.0)))
11478
11479 (define-public java-kafka-clients
11480 (package
11481 (name "java-kafka-clients")
11482 (version "1.0.0")
11483 (source (origin
11484 (method url-fetch)
11485 (uri (string-append "mirror://apache/kafka/" version "/kafka-"
11486 version "-src.tgz"))
11487 (sha256
11488 (base32
11489 "1yxmnsmliwm7671q5yy9bl4jdqyyn00n26cggz9brwczx80w1vfq"))))
11490 (build-system ant-build-system)
11491 (arguments
11492 `(#:jar-name "java-kafka-clients.jar"
11493 #:jdk ,icedtea-8
11494 #:source-dir "clients/src/main/java"
11495 #:test-dir "clients/src/test"
11496 #:test-exclude
11497 (list
11498 ;; This file does not contain a class
11499 "**/IntegrationTest.java"
11500 ;; Requires network
11501 "**/ClientUtilsTest.java"
11502 ;; End with errors that seem related to our powermock
11503 "**/KafkaProducerTest.java"
11504 "**/BufferPoolTest.java")))
11505 (inputs
11506 `(("java-slf4j-api" ,java-slf4j-api)
11507 ("java-lz4" ,java-lz4)))
11508 (native-inputs
11509 `(("junit" ,java-junit)
11510 ("hamcrest" ,java-hamcrest-all)
11511 ("objenesis" ,java-objenesis)
11512 ("asm" ,java-asm)
11513 ("cglib" ,java-cglib)
11514 ("javassist" ,java-jboss-javassist)
11515 ("snappy" ,java-snappy)
11516 ("easymock" ,java-easymock)
11517 ("powermock" ,java-powermock-core)
11518 ("powermock-easymock" ,java-powermock-api-easymock)
11519 ("powermock-junit4-common" ,java-powermock-modules-junit4-common)
11520 ("powermock-junit4" ,java-powermock-modules-junit4)
11521 ("powermock-support" ,java-powermock-api-support)
11522 ("java-bouncycastle" ,java-bouncycastle)))
11523 (home-page "https://kafka.apache.org")
11524 (synopsis "Distributed streaming platform")
11525 (description "Kafka is a distributed streaming platform, which means:
11526 @itemize
11527 @item it can publish and subscribe to streams of records;
11528 @item it can store streams of records in a fault-tolerant way;
11529 @item it can process streams of records as they occur.
11530 @end itemize")
11531 ;; Either cddl or gpl2 only.
11532 (license (list license:cddl1.1; actually cddl1.1
11533 license:gpl2)))); with classpath exception
11534
11535 (define-public java-jdom
11536 (package
11537 (name "java-jdom")
11538 (version "1.1.3")
11539 (source (origin
11540 (method url-fetch)
11541 (uri (string-append "http://jdom.org/dist/binary/archive/jdom-"
11542 version ".tar.gz"))
11543 (sha256
11544 (base32
11545 "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl"))))
11546 (build-system ant-build-system)
11547 (arguments
11548 `(#:build-target "package"
11549 #:tests? #f; tests are run as part of the build process
11550 #:phases
11551 (modify-phases %standard-phases
11552 (replace 'install
11553 (install-jars "build")))))
11554 (home-page "http://jdom.org/")
11555 (synopsis "Access, manipulate, and output XML data")
11556 (description "Java-based solution for accessing, manipulating, and
11557 outputting XML data from Java code.")
11558 (license license:bsd-4)))
11559
11560 (define-public java-geronimo-xbean-reflect
11561 (package
11562 (name "java-geronimo-xbean-reflect")
11563 (version "4.5")
11564 (source (origin
11565 (method svn-fetch)
11566 (uri (svn-reference
11567 (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/")
11568 (revision 1807396)))
11569 (file-name (string-append name "-" version))
11570 (sha256
11571 (base32
11572 "18q3i6jgm6rkw8aysfgihgywrdc5nvijrwnslmi3ww497jvri6ja"))))
11573 (build-system ant-build-system)
11574 (arguments
11575 `(#:jar-name "geronimo-xbean-reflect.jar"
11576 #:source-dir "xbean-reflect/src/main/java"
11577 #:test-dir "xbean-reflect/src/test"
11578 #:jdk ,icedtea-8
11579 #:test-exclude
11580 (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java"
11581 "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java"
11582 "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java")
11583 #:phases
11584 (modify-phases %standard-phases
11585 (add-before 'build 'fix-source
11586 (lambda _
11587 (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/"))
11588 ;; org.apache.xbean.asm6 is actually repackaged java-asm
11589 (substitute* (string-append dir "XbeanAsmParameterNameLoader.java")
11590 (("org.apache.xbean.asm5") "org.objectweb.asm"))
11591 #t)))
11592 (replace 'install (install-from-pom "xbean-reflect/pom.xml")))))
11593 (inputs
11594 `(("asm" ,java-asm)
11595 ("log4j" ,java-log4j-api)
11596 ("log4j-1.2" ,java-log4j-1.2-api)
11597 ("log4j-core" ,java-log4j-core)
11598 ("logging" ,java-commons-logging-minimal)))
11599 (propagated-inputs
11600 `(("java-geronimo-parent-pom" ,java-geronimo-parent-pom)))
11601 (native-inputs
11602 `(("junit" ,java-junit)))
11603 (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/")
11604 (synopsis "Dependency injection helper")
11605 (description "Xbean-reflect provides very flexible ways to create objects
11606 and graphs of objects for dependency injection frameworks")
11607 (license license:asl2.0)))
11608
11609 (define java-geronimo-genesis-2.1
11610 (package
11611 (name "java-geronimo-genesis")
11612 (version "2.1")
11613 (source (origin
11614 (method svn-fetch)
11615 (uri (svn-reference
11616 (url (string-append "https://svn.apache.org/repos/asf/"
11617 "geronimo/genesis/tags/genesis-"
11618 version))
11619 (revision 1807396)))
11620 (file-name (string-append name "-" version "-source"))
11621 (sha256
11622 (base32
11623 "119yn795jvnjf52si84q192s8wag1k013iabg78b7wnadssnnh31"))))
11624 (build-system ant-build-system)
11625 (arguments
11626 `(#:tests? #f
11627 #:phases
11628 (modify-phases %standard-phases
11629 (delete 'configure)
11630 (delete 'build)
11631 (replace 'install
11632 (install-pom-file "pom.xml"))
11633 (add-after 'install 'install-enforcer-rules
11634 (install-pom-file "genesis-enforcer-rules/pom.xml"))
11635 (add-after 'install 'install-flava
11636 (install-pom-file "genesis-default-flava/pom.xml"))
11637 (add-after 'install 'install-packaging
11638 (install-pom-file "genesis-packaging/pom.xml"))
11639 (add-after 'install-flava 'install-flava-java4
11640 (install-pom-file "genesis-default-flava/genesis-java1.4-flava/pom.xml"))
11641 (add-after 'install-flava 'install-flava-java5
11642 (install-pom-file "genesis-default-flava/genesis-java5-flava/pom.xml"))
11643 (add-after 'install-flava 'install-flava-java6
11644 (install-pom-file "genesis-default-flava/genesis-java6-flava/pom.xml")))))
11645 (propagated-inputs
11646 `(("apache-parent-pom" ,apache-parent-pom-13)))
11647 (home-page "https://geronimo.apache.org")
11648 (synopsis "Collection of maven POM files for the Geronimo project")
11649 (description "Apache Geronimo is a server runtime. This package contains
11650 only pom files used by other components in the Geronimo project.")
11651 (license license:asl2.0)))
11652
11653 (define java-geronimo-parent-pom
11654 (package
11655 (inherit java-geronimo-xbean-reflect)
11656 (name "java-geronimo-parent-pom")
11657 (arguments
11658 `(#:tests? #f
11659 #:phases
11660 (modify-phases %standard-phases
11661 (delete 'configure)
11662 (delete 'build)
11663 (replace 'install
11664 (install-pom-file "pom.xml")))))
11665 (propagated-inputs
11666 `(("java-geronimo-genesis" ,java-geronimo-genesis-2.1)))))
11667
11668 (define-public java-geronimo-xbean-bundleutils
11669 (package
11670 (inherit java-geronimo-xbean-reflect)
11671 (name "java-geronimo-xbean-bundleutils")
11672 (arguments
11673 `(#:jar-name "geronimo-xbean-bundleutils.jar"
11674 #:source-dir "xbean-bundleutils/src/main/java"
11675 #:test-dir "xbean-bundleutils/src/test"
11676 #:phases
11677 (modify-phases %standard-phases
11678 (add-before 'build 'fix-java
11679 (lambda _
11680 ;; We use a more recent version of osgi, so this file requires
11681 ;; more interface method implementations.
11682 (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java"
11683 (("import org.osgi.framework.ServiceRegistration;")
11684 "import org.osgi.framework.ServiceRegistration;
11685 import org.osgi.framework.ServiceFactory;
11686 import java.util.Collection;
11687 import org.osgi.framework.ServiceObjects;")
11688 (("public Bundle getBundle\\(\\)")
11689 "@Override
11690 public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) {
11691 throw new UnsupportedOperationException();
11692 }
11693 @Override
11694 public <S> ServiceRegistration<S> registerService(Class<S> clazz,
11695 ServiceFactory<S> factory, Dictionary<String, ?> properties) {
11696 throw new UnsupportedOperationException();
11697 }
11698 public Bundle getBundle()"))
11699 #t)))))
11700 (inputs
11701 `(("java-slf4j" ,java-slf4j-api)
11702 ("java-asm" ,java-asm)
11703 ("java-osgi-framework" ,java-osgi-framework)
11704 ("java-eclipse-osgi" ,java-eclipse-osgi)
11705 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)))))
11706
11707 (define-public java-geronimo-xbean-asm-util
11708 (package
11709 (inherit java-geronimo-xbean-reflect)
11710 (name "java-geronimo-xbean-asm-util")
11711 (arguments
11712 `(#:jar-name "geronimo-xbean-asm-util.jar"
11713 #:source-dir "xbean-asm-util/src/main/java"
11714 #:tests? #f)); no tests
11715 (inputs
11716 `(("java-asm" ,java-asm)))
11717 (native-inputs '())))
11718
11719 (define-public java-geronimo-xbean-finder
11720 (package
11721 (inherit java-geronimo-xbean-reflect)
11722 (name "java-geronimo-xbean-finder")
11723 (arguments
11724 `(#:jar-name "geronimo-xbean-finder.jar"
11725 #:source-dir "xbean-finder/src/main/java"
11726 #:test-dir "xbean-finder/src/test"))
11727 (inputs
11728 `(("java-slf4j-api" ,java-slf4j-api)
11729 ("java-asm" ,java-asm)
11730 ("java-geronimo-xbean-bundleutils" ,java-geronimo-xbean-bundleutils)
11731 ("java-geronimo-xbean-asm-util" ,java-geronimo-xbean-asm-util)
11732 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)
11733 ("java-osgi-framework" ,java-osgi-framework)))
11734 (native-inputs
11735 `(("java-junit" ,java-junit)
11736 ("java-hamcrest-core" ,java-hamcrest-core)))))
11737
11738 (define-public java-gson
11739 (package
11740 (name "java-gson")
11741 (version "2.8.2")
11742 (source (origin
11743 (method url-fetch)
11744 (uri (string-append "https://github.com/google/gson/archive/"
11745 "gson-parent-" version ".tar.gz"))
11746 (sha256
11747 (base32
11748 "1j4qnp7v046q0k48c4kyf69sxaasx2h949d3cqwsm3kzxms3x0f9"))))
11749 (build-system ant-build-system)
11750 (arguments
11751 `(#:jar-name "gson.jar"
11752 #:source-dir "gson/src/main/java"
11753 #:test-dir "gson/src/test"))
11754 (native-inputs
11755 `(("java-junit" ,java-junit)
11756 ("java-hamcrest-core" ,java-hamcrest-core)))
11757 (home-page "https://github.com/google/gson")
11758 (synopsis "Java serialization/deserialization library from/to JSON")
11759 (description "Gson is a Java library that can be used to convert Java
11760 Objects into their JSON representation. It can also be used to convert a JSON
11761 string to an equivalent Java object. Gson can work with arbitrary Java objects
11762 including pre-existing objects that you do not have source-code of.")
11763 (license license:asl2.0)))
11764
11765 (define-public java-hawtjni
11766 (package
11767 (name "java-hawtjni")
11768 (version "1.15")
11769 (source (origin
11770 (method url-fetch)
11771 (uri (string-append "https://github.com/fusesource/hawtjni/archive/"
11772 "hawtjni-project-" version ".tar.gz"))
11773 (sha256
11774 (base32
11775 "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g"))))
11776 (build-system ant-build-system)
11777 (arguments
11778 `(#:jar-name "hawtjni.jar"
11779 #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java"
11780 #:tests? #f; no tests
11781 #:phases
11782 (modify-phases %standard-phases
11783 (add-before 'build 'build-native
11784 (lambda* (#:key inputs #:allow-other-keys)
11785 (let ((include (string-append "-I" (assoc-ref inputs "jdk") "/include/linux")))
11786 (with-directory-excursion "hawtjni-generator/src/main/resources/"
11787 (invoke "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o"
11788 "-fPIC" "-O2" include)
11789 (invoke "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o"
11790 "-fPIC" "-O2" include)
11791 (invoke "gcc" "-o" "libhawtjni.so" "-shared"
11792 "hawtjni.o" "hawtjni-callback.o")))
11793 #t))
11794 (add-after 'install 'install-native
11795 (lambda* (#:key outputs #:allow-other-keys)
11796 (let* ((out (assoc-ref outputs "out"))
11797 (lib (string-append out "/lib"))
11798 (inc (string-append out "/include")))
11799 (with-directory-excursion "hawtjni-generator/src/main/resources/"
11800 (install-file "libhawtjni.so" lib)
11801 (install-file "hawtjni.h" inc)))
11802 #t))
11803 (add-before 'install 'install-parent
11804 (install-pom-file "pom.xml"))
11805 (replace 'install
11806 (install-from-pom "hawtjni-runtime/pom.xml")))))
11807 (inputs
11808 `(("java-commons-cli" ,java-commons-cli)
11809 ("java-asm" ,java-asm)
11810 ("java-geronimo-xbean-finder" ,java-geronimo-xbean-finder)))
11811 (home-page "https://fusesource.github.io/hawtjni/")
11812 (synopsis "JNI code generator")
11813 (description "HawtJNI is a code generator that produces the JNI code needed
11814 to implement Java native methods. It is based on the jnigen code generator
11815 that is part of the SWT Tools project.")
11816 (license license:asl2.0)))
11817
11818 (define-public java-jansi-native
11819 (package
11820 (name "java-jansi-native")
11821 (version "1.7")
11822 (source (origin
11823 (method url-fetch)
11824 (uri (string-append "https://github.com/fusesource/jansi-native/"
11825 "archive/jansi-native-" version ".tar.gz"))
11826 (sha256
11827 (base32
11828 "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf"))))
11829 (build-system ant-build-system)
11830 (arguments
11831 `(#:jar-name "jansi-native.jar"
11832 #:source-dir "src/main/java"
11833 #:tests? #f; no tests
11834 #:phases
11835 (modify-phases %standard-phases
11836 (add-before 'build 'build-native
11837 (lambda* (#:key inputs #:allow-other-keys)
11838 ;; there are more required files for windows in windows/
11839 (with-directory-excursion "src/main/native-package/src"
11840 (substitute* "jansi_ttyname.c"
11841 (("#include \"jansi_.*") ""))
11842 (invoke "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o"
11843 (string-append "-I" (assoc-ref inputs "java-hawtjni")
11844 "/include")
11845 (string-append "-I" (assoc-ref inputs "jdk")
11846 "/include/linux")
11847 "-fPIC" "-O2")
11848 (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o"))))
11849 (add-before 'build 'install-native
11850 (lambda _
11851 (let ((dir (string-append "build/classes/META-INF/native/"
11852 ,(match (%current-system)
11853 ((or "i686-linux" "armhf-linux")
11854 "linux32")
11855 ((or "x86_64-linux" "aarch64-linux"
11856 "mips64el-linux")
11857 "linux64")
11858 (_ "unknown-kernel")))))
11859 (install-file "src/main/native-package/src/libjansi.so" dir))
11860 #t))
11861 (add-after 'install 'install-native
11862 (lambda* (#:key outputs #:allow-other-keys)
11863 (install-file "src/main/native-package/src/jansi.h"
11864 (string-append (assoc-ref outputs "out") "/include"))
11865 #t))
11866 (add-before 'install 'fix-pom
11867 (lambda _
11868 ;; pom contains variables to complete name, but we don't support that
11869 (substitute* "pom.xml"
11870 (("\\$\\{platform\\}") "native"))
11871 #t))
11872 (replace 'install
11873 (install-from-pom "pom.xml")))))
11874 (propagated-inputs
11875 `(("java-hawtjni" ,java-hawtjni)))
11876 (home-page "https://fusesource.github.io/jansi/")
11877 (synopsis "Native library for jansi")
11878 (description "This package provides the native library for jansi, a small
11879 Java library that allows you to use ANSI escape sequences to format your
11880 console output.")
11881 (license license:asl2.0)))
11882
11883 (define-public java-jansi
11884 (package
11885 (name "java-jansi")
11886 (version "1.16")
11887 (source (origin
11888 (method url-fetch)
11889 (uri (string-append "https://github.com/fusesource/jansi/archive/"
11890 "jansi-project-" version ".tar.gz"))
11891 (sha256
11892 (base32
11893 "11kh3144i3fzp21dpy8zg52mjmsr214k7km9p8ly0rqk2px0qq2z"))))
11894 (build-system ant-build-system)
11895 (arguments
11896 `(#:jar-name "jansi.jar"
11897 #:source-dir "jansi/src/main/java"
11898 #:test-dir "jansi/src/test"
11899 #:phases
11900 (modify-phases %standard-phases
11901 (add-after 'check 'clear-term
11902 (lambda _
11903 (invoke "echo" "-e" "\\e[0m")))
11904 (add-before 'install 'install-parent
11905 (install-pom-file "pom.xml"))
11906 (add-before 'install 'fix-pom
11907 (lambda _
11908 ;; pom adds jansi native versions for different platforms, but we
11909 ;; only need one, so use native instead
11910 (substitute* "jansi/pom.xml"
11911 (("windows32") "native")
11912 (("windows64") "native")
11913 (("osx") "native")
11914 (("linux32") "native")
11915 (("linux64") "native")
11916 (("freebsd32") "native")
11917 (("freebsd64") "native"))
11918 #t))
11919 (replace 'install
11920 (install-from-pom "jansi/pom.xml")))))
11921 (propagated-inputs
11922 `(("java-jansi-native" ,java-jansi-native)))
11923 (native-inputs
11924 `(("java-junit" ,java-junit)
11925 ("java-hamcrest-core" ,java-hamcrest-core)))
11926 (home-page "https://fusesource.github.io/jansi/")
11927 (synopsis "Portable ANSI escape sequences")
11928 (description "Jansi is a Java library that allows you to use ANSI escape
11929 sequences to format your console output which works on every platform.")
11930 (license license:asl2.0)))
11931
11932 (define-public java-jboss-el-api-spec
11933 (package
11934 (name "java-jboss-el-api-spec")
11935 (version "3.0")
11936 (source (origin
11937 (method url-fetch)
11938 (uri (string-append "https://github.com/jboss/jboss-el-api_spec/"
11939 "archive/jboss-el-api_" version
11940 "_spec-1.0.7.Final.tar.gz"))
11941 (sha256
11942 (base32
11943 "1j45ljxalwlibxl7g7iv952sjxkw275m8vyxxij8l6wdd5pf0pdh"))))
11944 (build-system ant-build-system)
11945 (arguments
11946 `(#:jar-name "java-jboss-el-api_spec.jar"
11947 #:modules ((guix build ant-build-system)
11948 (guix build utils)
11949 (guix build maven pom)
11950 (guix build java-utils)
11951 (sxml simple))
11952 #:phases
11953 (modify-phases %standard-phases
11954 ;; the origin of javax.el:javax.el-api is unknown, so we use this package
11955 ;; instead, which implements the same thing. We override the pom file
11956 ;; to "rename" the package so it can be found by maven.
11957 (add-before 'install 'override-pom
11958 (lambda _
11959 (delete-file "pom.xml")
11960 (with-output-to-file "pom.xml"
11961 (lambda _
11962 (sxml->xml
11963 `(project
11964 (modelVersion "4.0.0")
11965 (name "el-api")
11966 (groupId "javax.el")
11967 (artifactId "javax.el-api")
11968 (version "3.0")))))
11969 #t))
11970 (replace 'install
11971 (install-from-pom "pom.xml")))))
11972 (inputs
11973 `(("java-junit" ,java-junit)))
11974 (home-page "https://github.com/jboss/jboss-el-api_spec")
11975 (synopsis "JSR-341 expression language 3.0 API")
11976 (description "This package contains an implementation of the JSR-341
11977 specification for the expression language 3.0. It implements an expression
11978 language inspired by ECMAScript and XPath. This language is used with
11979 JavaServer Pages (JSP).")
11980 ;; Either GPL2 only or CDDL.
11981 (license (list license:gpl2 license:cddl1.1))))
11982
11983 (define-public java-jboss-interceptors-api-spec
11984 (package
11985 (name "java-jboss-interceptors-api-spec")
11986 (version "1.2")
11987 (source (origin
11988 (method url-fetch)
11989 (uri (string-append "https://github.com/jboss/jboss-interceptors-api_spec/"
11990 "archive/jboss-interceptors-api_" version
11991 "_spec-1.0.0.Final.tar.gz"))
11992 (sha256
11993 (base32
11994 "0wv8x0jp9a5qxlrgkhb5jdk2gr6vi87b4j4kjb8ryxiy9gn8g51z"))))
11995 (build-system ant-build-system)
11996 (arguments
11997 `(#:jar-name "java-jboss-interceptors-api_spec.jar"
11998 #:jdk ,icedtea-8
11999 #:source-dir "."
12000 #:tests? #f; no tests
12001 #:modules ((guix build ant-build-system)
12002 (guix build utils)
12003 (guix build maven pom)
12004 (guix build java-utils)
12005 (sxml simple))
12006 #:phases
12007 (modify-phases %standard-phases
12008 ;; the origin of javax.interceptor:javax.interceptor-api is unknown,
12009 ;; so we use this package instead, which implements the same thing.
12010 ;; We override the pom file to "rename" the package so it can be found
12011 ;; by maven.
12012 (add-before 'install 'override-pom
12013 (lambda _
12014 (delete-file "pom.xml")
12015 (with-output-to-file "pom.xml"
12016 (lambda _
12017 (sxml->xml
12018 `(project
12019 (modelVersion "4.0.0")
12020 (name "interceptor-api")
12021 (groupId "javax.interceptor")
12022 (artifactId "javax.interceptor-api")
12023 (version "3.0")))))
12024 #t))
12025 (replace 'install
12026 (install-from-pom "pom.xml")))))
12027 (home-page "https://github.com/jboss/jboss-interceptors-api_spec")
12028 (synopsis "Interceptors 1.2 API classes from JSR 318")
12029 (description "Java-jboss-interceptors-api-spec implements the Interceptors
12030 API. Interceptors are used to interpose on business method invocations and
12031 specific events.")
12032 ;; Either GPL2 only or CDDL.
12033 (license (list license:gpl2 license:cddl1.1))))
12034
12035 (define-public java-cdi-api
12036 (package
12037 (name "java-cdi-api")
12038 (version "2.0")
12039 (source (origin
12040 (method url-fetch)
12041 (uri (string-append "https://github.com/cdi-spec/cdi/archive/"
12042 version ".tar.gz"))
12043 (file-name (string-append name "-" version ".tar.gz"))
12044 (sha256
12045 (base32
12046 "1iv8b8bp07c5kmqic14jsr868vycjv4qv02lf3pkgp9z21mnfg5y"))))
12047 (build-system ant-build-system)
12048 (arguments
12049 `(#:source-dir "api/src/main/java"
12050 #:jar-name "java-cdi-api.jar"
12051 #:test-dir "api/src/test"
12052 #:jdk ,icedtea-8
12053 #:tests? #f; Tests fail because we don't have a CDI provider yet
12054 #:phases
12055 (modify-phases %standard-phases
12056 (replace 'install
12057 (install-from-pom "api/pom.xml")))))
12058 (propagated-inputs
12059 `(("java-javax-inject" ,java-javax-inject)
12060 ("java-jboss-el-api-spec" ,java-jboss-el-api-spec)
12061 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)
12062 ("java-weld-parent-pom" ,java-weld-parent-pom)))
12063 (native-inputs
12064 `(("java-testng" ,java-testng)
12065 ("java-hamcrest-core" ,java-hamcrest-core)))
12066 (home-page "http://cdi-spec.org/")
12067 (synopsis "Contexts and Dependency Injection APIs")
12068 (description "Java-cdi-api contains the required APIs for Contexts and
12069 Dependency Injection (CDI).")
12070 (license license:asl2.0)))
12071
12072 (define-public java-joda-convert
12073 (package
12074 (name "java-joda-convert")
12075 (version "1.9.2")
12076 (source (origin
12077 (method url-fetch)
12078 (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v"
12079 version ".tar.gz"))
12080 (file-name (string-append name "-" version ".tar.gz"))
12081 (sha256
12082 (base32
12083 "0vp346xz7dh9br4q7xazhc7hvzf76a6hf95fki9bg67q5jr0kjh7"))))
12084 (build-system ant-build-system)
12085 (arguments
12086 `(#:jar-name (string-append ,name "-" ,version ".jar")
12087 #:source-dir "src/main/java"
12088 #:test-include (list "**/Test*.java")
12089 ;; Contains only interfaces and base classes (no test)
12090 #:test-exclude (list "**/test*/**.java")))
12091 (inputs
12092 `(("java-guava" ,java-guava)))
12093 (native-inputs
12094 `(("java-junit" ,java-junit)
12095 ("java-hamcrest-core" ,java-hamcrest-core)))
12096 (home-page "https://www.joda.org/joda-convert/")
12097 (synopsis "Conversion between Objects and Strings")
12098 (description "Joda-Convert provides a small set of classes to aid
12099 conversion between Objects and Strings. It is not intended to tackle the
12100 wider problem of Object to Object transformation.")
12101 (license license:asl2.0)))
12102
12103 (define-public java-joda-time
12104 (package
12105 (name "java-joda-time")
12106 (version "2.9.9")
12107 (source (origin
12108 (method url-fetch)
12109 (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v"
12110 version ".tar.gz"))
12111 (file-name (string-append name "-" version ".tar.gz"))
12112 (sha256
12113 (base32
12114 "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1"))))
12115 (build-system ant-build-system)
12116 (arguments
12117 `(#:jar-name "java-joda-time.jar"
12118 #:source-dir "src/main/java"
12119 #:test-include (list "**/Test*.java")
12120 ;; There is no runnable test in these files
12121 #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java")
12122 #:phases
12123 (modify-phases %standard-phases
12124 (add-after 'build 'build-resources
12125 (lambda _
12126 (mkdir-p "build/classes/org/joda/time/tz/data")
12127 (mkdir-p "build/classes/org/joda/time/format")
12128 ;; This will produce the following exception:
12129 ;; java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap"
12130 ;; which is normal, because it doesn't exist yet. It still generates
12131 ;; the same file as in the binary one can find on maven.
12132 (invoke "java" "-cp"
12133 (string-append "build/classes:" (getenv "CLASSPATH"))
12134 "org.joda.time.tz.ZoneInfoCompiler"
12135 "-src" "src/main/java/org/joda/time/tz/src"
12136 "-dst" "build/classes/org/joda/time/tz/data"
12137 "africa" "antarctica" "asia" "australasia"
12138 "europe" "northamerica" "southamerica"
12139 "pacificnew" "etcetera" "backward" "systemv")
12140 (for-each (lambda (f)
12141 (copy-file f (string-append
12142 "build/classes/org/joda/time/format/"
12143 (basename f))))
12144 (find-files "src/main/java/org/joda/time/format" ".*.properties"))
12145 #t))
12146 (add-before 'install 'regenerate-jar
12147 (lambda _
12148 ;; We need to regenerate the jar file to add generated data.
12149 (delete-file "build/jar/java-joda-time.jar")
12150 (invoke "ant" "jar")))
12151 (add-before 'check 'copy-test-resources
12152 (lambda _
12153 (mkdir-p "build/test-classes/org/joda/time/tz/data")
12154 (copy-file "src/test/resources/tzdata/ZoneInfoMap"
12155 "build/test-classes/org/joda/time/tz/data/ZoneInfoMap")
12156 (copy-recursively "src/test/resources" "build/test-classes")
12157 #t)))))
12158 (inputs
12159 `(("java-joda-convert" ,java-joda-convert)))
12160 (native-inputs
12161 `(("java-junit" ,java-junit)
12162 ("java-hamcrest-core" ,java-hamcrest-core)
12163 ("tzdata" ,tzdata)))
12164 (home-page "https://www.joda.org/joda-time/")
12165 (synopsis "Replacement for the Java date and time classes")
12166 (description "Joda-Time is a replacement for the Java date and time
12167 classes prior to Java SE 8.")
12168 (license license:asl2.0)))
12169
12170 (define-public java-xerces
12171 (package
12172 (name "java-xerces")
12173 (version "2.12.1")
12174 (source
12175 (origin
12176 (method url-fetch)
12177 (uri (string-append "mirror://apache/xerces/j/source/"
12178 "Xerces-J-src." version ".tar.gz"))
12179 (sha256
12180 (base32 "0494kq36gw3nah19ifb720vwxbpg4ww0k6m3zq6wyanw6a083p6s"))
12181 (patches (search-patches
12182 "java-xerces-xjavac_taskdef.patch"
12183 "java-xerces-build_dont_unzip.patch"
12184 "java-xerces-bootclasspath.patch"))))
12185 (build-system ant-build-system)
12186 (arguments
12187 `(#:tests? #f;; Test files are not present
12188 #:test-target "test"
12189 #:jdk ,icedtea-8
12190 #:phases
12191 (modify-phases %standard-phases
12192 (add-after 'unpack 'create-build.properties
12193 (lambda* (#:key inputs #:allow-other-keys)
12194 (let ((jaxp (assoc-ref inputs "java-jaxp"))
12195 (resolver (assoc-ref inputs "java-apache-xml-commons-resolver")))
12196 (with-output-to-file "build.properties"
12197 (lambda _
12198 (format #t
12199 "jar.jaxp = ~a/share/java/jaxp.jar~@
12200 jar.apis-ext = ~a/share/java/jaxp.jar~@
12201 jar.resolver = ~a/share/java/xml-resolver.jar~%"
12202 jaxp jaxp resolver)))
12203 ;; Make xerces use our version of jaxp in tests
12204 (substitute* "build.xml"
12205 (("xml-apis.jar")
12206 (string-append jaxp "/share/java/jaxp.jar"))
12207 (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}")
12208 "${jar.apis}")))
12209 #t))
12210 (replace 'install (install-jars "build")))))
12211 (inputs
12212 `(("java-apache-xml-commons-resolver" ,java-apache-xml-commons-resolver)
12213 ("java-jaxp" ,java-jaxp)))
12214 (home-page "https://xerces.apache.org/xerces2-j/")
12215 (synopsis "Validating XML parser for Java with DOM level 3 support")
12216 (description "The Xerces2 Java parser is the reference implementation of
12217 XNI, the Xerces Native Interface, and also a fully conforming XML Schema
12218 processor.
12219
12220 Xerces2-J supports the following standards and APIs:
12221
12222 @itemize
12223 @item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation
12224 @item Namespaces in XML Recommendation
12225 @item Document Object Model (DOM) Level 2 Core, Events, and Traversal and
12226 Range Recommendations
12227 @item Simple API for XML (SAX) 2.0.1 Core and Extension
12228 @item Java APIs for XML Processing (JAXP) 1.2.01
12229 @item XML Schema 1.0 Structures and Datatypes Recommendations
12230 @item Experimental implementation of the Document Object Model (DOM) Level 3
12231 Core and Load/Save Working Drafts
12232 @item Provides a partial implementation of the XML Inclusions (XInclude) W3C
12233 Candidate Recommendation
12234 @end itemize
12235
12236 Xerces is now able to parse documents written according to the XML 1.1
12237 Candidate Recommendation, except that it does not yet provide an option to
12238 enable normalization checking as described in section 2.13 of this
12239 specification. It also handles namespaces according to the XML Namespaces 1.1
12240 Candidate Recommendation, and will correctly serialize XML 1.1 documents if
12241 the DOM level 3 load/save API's are in use.")
12242 (license license:asl2.0)))
12243
12244 (define-public java-jakarta-regexp
12245 (package
12246 (name "java-jakarta-regexp")
12247 (version "1.5")
12248 (source
12249 (origin
12250 (method url-fetch)
12251 (uri (string-append
12252 "https://archive.apache.org/dist/jakarta/regexp/jakarta-regexp-"
12253 version ".tar.gz"))
12254 (sha256
12255 (base32
12256 "0zg9rmyif48dck0cv6ynpxv23mmcsx265am1fnnxss7brgw0ms3r"))))
12257 (build-system ant-build-system)
12258 (arguments
12259 `(#:test-target "test"
12260 #:phases
12261 (modify-phases %standard-phases
12262 (replace 'install
12263 (lambda* (#:key outputs #:allow-other-keys)
12264 (let* ((out (assoc-ref outputs "out"))
12265 (out-share (string-append out "/share/java")))
12266 (mkdir-p out-share)
12267 (for-each (lambda (name)
12268 (install-file name out-share))
12269 (find-files "build" "^jakarta-regexp-.*\\.jar$"))
12270 #t))))))
12271 (home-page "https://attic.apache.org/projects/jakarta-regexp.html")
12272 (synopsis "Regular expression parser generator for Java.")
12273 (description "@code{jakarta-regexp} is an old regular expression parser
12274 generator for Java.")
12275 (license license:asl2.0)))
12276
12277 (define-public java-jline
12278 (package
12279 (name "java-jline")
12280 (version "1.0")
12281 (source (origin
12282 (method url-fetch)
12283 (uri (string-append "https://github.com/jline/jline1/archive/jline-"
12284 version ".tar.gz"))
12285 (sha256
12286 (base32
12287 "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir"))))
12288 (build-system ant-build-system)
12289 (arguments
12290 `(#:jar-name "jline.jar"
12291 #:source-dir "src/main/java"
12292 #:test-dir "src/test"
12293 #:phases
12294 (modify-phases %standard-phases
12295 (add-before 'build 'copy-resources
12296 (lambda _
12297 (copy-recursively "src/main/resources" "build/classes")
12298 #t)))))
12299 (native-inputs
12300 `(("java-junit" ,java-junit)))
12301 (home-page "https://jline.github.io")
12302 (synopsis "Console input handling library")
12303 (description "JLine is a Java library for handling console input. It is
12304 similar in functionality to BSD editline and GNU readline but with additional
12305 features that bring it on par with the Z shell line editor.")
12306 (license license:bsd-3)))
12307
12308 (define-public java-jline-2
12309 (package
12310 (inherit java-jline)
12311 (version "2.14.5")
12312 (source (origin
12313 (method url-fetch)
12314 (uri (string-append "https://github.com/jline/jline2/archive/jline-"
12315 version ".tar.gz"))
12316 (sha256
12317 (base32
12318 "1c6qa26mf0viw8hg4jnv72s7i1qb1gh1l8rrzcdvqhqhx82rkdlf"))))
12319 (arguments
12320 `(#:jdk ,icedtea-8
12321 ,@(package-arguments java-jline)))
12322 (inputs
12323 `(("java-jansi" ,java-jansi)
12324 ("java-jansi-native" ,java-jansi-native)))
12325 (native-inputs
12326 `(("java-powermock-modules-junit4" ,java-powermock-modules-junit4)
12327 ("java-powermock-modules-junit4-common" ,java-powermock-modules-junit4-common)
12328 ("java-powermock-api-easymock" ,java-powermock-api-easymock)
12329 ("java-powermock-api-support" ,java-powermock-api-support)
12330 ("java-powermock-core" ,java-powermock-core)
12331 ("java-powermock-reflect" ,java-powermock-reflect)
12332 ("java-easymock" ,java-easymock)
12333 ("java-jboss-javassist" ,java-jboss-javassist)
12334 ("java-objenesis" ,java-objenesis)
12335 ("java-asm" ,java-asm)
12336 ("java-hamcrest-core" ,java-hamcrest-core)
12337 ("java-cglib" ,java-cglib)
12338 ("java-junit" ,java-junit)
12339 ("java-hawtjni" ,java-hawtjni)))))
12340
12341 (define-public java-xmlunit
12342 (package
12343 (name "java-xmlunit")
12344 (version "2.5.1")
12345 (source (origin
12346 (method url-fetch)
12347 (uri (string-append "https://github.com/xmlunit/xmlunit/archive/v"
12348 version ".tar.gz"))
12349 (file-name (string-append name "-" version ".tar.gz"))
12350 (sha256
12351 (base32
12352 "035rivlnmwhfqj0fzviciv0bkh1h95ps1iwnh2kjcvdbk5nccm4z"))))
12353 (build-system ant-build-system)
12354 (arguments
12355 `(#:jar-name "java-xmlunit.jar"
12356 #:source-dir "xmlunit-core/src/main/java"
12357 #:test-dir "xmlunit-core/src/test"
12358 #:phases
12359 (modify-phases %standard-phases
12360 (add-before 'check 'copy-test-resources
12361 (lambda* (#:key inputs #:allow-other-keys)
12362 (copy-recursively (assoc-ref inputs "resources") "../test-resources")
12363 #t)))))
12364 (native-inputs
12365 `(("java-junit" ,java-junit)
12366 ("java-mockito-1" ,java-mockito-1)
12367 ("java-hamcrest-all" ,java-hamcrest-all)
12368 ("java-objenesis" ,java-objenesis)
12369 ("java-asm" ,java-asm)
12370 ("java-cglib" ,java-cglib)
12371 ("resources"
12372 ,(origin
12373 (method git-fetch)
12374 (uri (git-reference
12375 (url "https://github.com/xmlunit/test-resources")
12376 (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec")))
12377 (file-name "java-xmlunit-test-resources")
12378 (sha256
12379 (base32
12380 "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr"))))))
12381 (home-page "https://www.xmlunit.org/")
12382 (synopsis "XML output testing")
12383 (description "XMLUnit provides you with the tools to verify the XML you
12384 emit is the one you want to create. It provides helpers to validate against
12385 an XML Schema, assert the values of XPath queries or compare XML documents
12386 against expected outcomes.")
12387 (license license:asl2.0)))
12388
12389 (define-public java-xmlunit-legacy
12390 (package
12391 (inherit java-xmlunit)
12392 (name "java-xmlunit-legacy")
12393 (arguments
12394 `(#:jar-name "java-xmlunit-legacy.jar"
12395 #:source-dir "xmlunit-legacy/src/main/java"
12396 #:test-dir "xmlunit-legacy/src/test"))
12397 (inputs
12398 `(("java-xmlunit" ,java-xmlunit)
12399 ("java-junit" ,java-junit)))
12400 (native-inputs
12401 `(("java-mockito-1" ,java-mockito-1)))))
12402
12403 (define-public java-xmlunit-matchers
12404 (package
12405 (inherit java-xmlunit)
12406 (name "java-xmlunit-matchers")
12407 (arguments
12408 `(#:jar-name "java-xmlunit-matchers.jar"
12409 #:source-dir "xmlunit-matchers/src/main/java"
12410 #:test-dir "xmlunit-matchers/src/test"
12411 #:test-exclude
12412 ;; Cannot open xsd for http://www.xmlunit.org/test-support/Book.xsd
12413 (list "**/ValidationMatcherTest.java")
12414 #:phases
12415 (modify-phases %standard-phases
12416 (add-before 'build 'copy-test-class
12417 (lambda _
12418 (copy-file "xmlunit-core/src/test/java/org/xmlunit/TestResources.java"
12419 "xmlunit-matchers/src/test/java/org/xmlunit/TestResources.java")
12420 #t))
12421 (add-before 'build 'fix-test-resources-path
12422 (lambda _
12423 (substitute* (find-files "xmlunit-matchers/src/test" ".*.java")
12424 (("../test-resources") "test-resources"))
12425 #t))
12426 (add-before 'check 'copy-test-resources
12427 (lambda* (#:key inputs #:allow-other-keys)
12428 (copy-recursively (assoc-ref inputs "resources") "test-resources")
12429 #t)))))
12430 (inputs
12431 `(("java-xmlunit" ,java-xmlunit)
12432 ("java-junit" ,java-junit)))))
12433
12434 (define-public java-openchart2
12435 (package
12436 (name "java-openchart2")
12437 (version "1.4.3")
12438 (source (origin
12439 (method url-fetch)
12440 (uri (string-append "http://download.approximatrix.com/openchart2/"
12441 "openchart2-" version ".source.zip"))
12442 (sha256
12443 (base32
12444 "1xq96zm5r02n1blja0072jmmsifmxc40lbyfbnmcnr6mw42frh4g"))))
12445 (build-system ant-build-system)
12446 (arguments
12447 `(#:test-target "test"
12448 #:phases
12449 (modify-phases %standard-phases
12450 (add-after 'unpack 'fix-junit-errors
12451 (lambda _
12452 (with-directory-excursion "unittest/src/com/approximatrix/charting/"
12453 (substitute* '("coordsystem/ticklocator/NumericXTickLocatorTest.java"
12454 "coordsystem/ticklocator/NumericYTickLocatorTest.java"
12455 "coordsystem/ticklocator/ObjectXTickLocatorTest.java"
12456 "model/DefaultChartDataModelConstraintsTest.java"
12457 "model/MultiScatterDataModelConstraintsTest.java"
12458 "model/threedimensional/DotPlotDataModelConstraintsTest.java")
12459 (("(assertEquals[^;]+);" before _)
12460 (string-append (string-drop-right before 2) ", 1E-6);"))))
12461 #t))
12462 (replace 'install (install-jars ".")))))
12463 (native-inputs
12464 `(("unzip" ,unzip)
12465 ("java-junit" ,java-junit)
12466 ("java-hamcrest-core" ,java-hamcrest-core)))
12467 (home-page "https://approximatrix.com/products/openchart2/")
12468 (synopsis "Simple plotting for Java")
12469 (description "Openchart2 provides a simple, yet powerful, interface for
12470 Java programmers to create two-dimensional charts and plots. The library
12471 features an assortment of graph styles, including advanced scatter plots, bar
12472 graphs, and pie charts.")
12473 (license license:lgpl2.1+)))
12474
12475 (define-public java-commons-httpclient
12476 (package
12477 (name "java-commons-httpclient")
12478 (version "3.1")
12479 (source (origin
12480 (method url-fetch)
12481 (uri (string-append "mirror://apache/httpcomponents/"
12482 "commons-httpclient/source/commons-httpclient-"
12483 version "-src.tar.gz"))
12484 (sha256
12485 (base32
12486 "1wlpn3cfy3d4inxy6g7wxcsa8p7sshn6aldk9y4ia3lb879rd97r"))))
12487 (build-system ant-build-system)
12488 (arguments
12489 `(#:build-target "compile"
12490 #:test-target "test"
12491 #:tests? #f; requires junit-textui (junit 3)
12492 #:phases
12493 (modify-phases %standard-phases
12494 (add-before 'build 'fix-accent
12495 (lambda _
12496 (for-each (lambda (file)
12497 (with-fluids ((%default-port-encoding "ISO-8859-1"))
12498 (substitute* file
12499 (("\\* @author Ortwin .*") "* @author Ortwin Glueck\n"))))
12500 '("src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java"
12501 "src/examples/TrivialApp.java" "src/examples/ClientApp.java"
12502 "src/test/org/apache/commons/httpclient/TestHttps.java"
12503 "src/test/org/apache/commons/httpclient/TestURIUtil2.java"))
12504 #t))
12505 (replace 'install
12506 (lambda* (#:key outputs #:allow-other-keys)
12507 (invoke "ant" "dist"
12508 (string-append "-Ddist.home=" (assoc-ref outputs "out")
12509 "/share/java"))
12510 #t)))))
12511 (propagated-inputs
12512 `(("java-commons-logging" ,java-commons-logging-minimal)
12513 ("java-commons-codec" ,java-commons-codec)))
12514 (home-page "https://hc.apache.org")
12515 (synopsis "HTTP/1.1 compliant HTTP agent implementation")
12516 (description "This package contains an HTTP/1.1 compliant HTTP agent
12517 implementation. It also provides reusable components for client-side
12518 authentication, HTTP state management, and HTTP connection management.")
12519 (license license:asl2.0)))
12520
12521 (define-public java-commons-vfs
12522 (package
12523 (name "java-commons-vfs")
12524 (version "2.2")
12525 (source (origin
12526 (method url-fetch)
12527 (uri (string-append "mirror://apache/commons/vfs/source/"
12528 "commons-vfs2-distribution-" version "-src.tar.gz"))
12529 (file-name (string-append name "-" version ".tar.gz"))
12530 (sha256
12531 (base32
12532 "1cnq1iaghbp4cslpnvwbp83i5v234x87irssqynhwpfgw7caf1s3"))
12533 (modules '((guix build utils)))
12534 (snippet
12535 '(begin
12536 (for-each delete-file
12537 (find-files "." "\\.jar$"))
12538 #t))))
12539 (build-system ant-build-system)
12540 (arguments
12541 `(#:jar-name "commons-vfs.jar"
12542 #:source-dir "commons-vfs2/src/main/java"
12543 #:test-dir "commons-vfs2/src/test"
12544 ; FIXME: tests depend on many things: apache sshd, hadoop, ftpserver, ...
12545 #:tests? #f
12546 #:phases
12547 (modify-phases %standard-phases
12548 (add-before 'build 'remove-hadoop-and-webdav
12549 ; Remove these files as they are not required and depend on difficult
12550 ; packages.
12551 (lambda _
12552 (for-each delete-file-recursively
12553 '("commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/webdav"
12554 "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs"))
12555 #t)))))
12556 (inputs
12557 `(("java-commons-collections4" ,java-commons-collections4)
12558 ("java-commons-compress" ,java-commons-compress)
12559 ("java-commons-httpclient" ,java-commons-httpclient)
12560 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
12561 ("java-commons-net" ,java-commons-net)
12562 ("java-jsch" ,java-jsch)))
12563 (home-page "https://commons.apache.org/proper/commons-vfs/")
12564 (synopsis "Java file system library")
12565 (description "Commons VFS provides a single API for accessing various
12566 different file systems. It presents a uniform view of the files from various
12567 different sources, such as the files on local disk, on an HTTP server, or
12568 inside a Zip archive.")
12569 (license license:asl2.0)))
12570
12571 (define-public java-jakarta-oro
12572 (package
12573 (name "java-jakarta-oro")
12574 (version "2.0.8")
12575 (source (origin
12576 (method url-fetch)
12577 (uri (string-append "mirror://apache/jakarta/oro/"
12578 "jakarta-oro-" version ".tar.gz"))
12579 (sha256
12580 (base32
12581 "0rpmnsskiwmsy8r0sckz5n5dbvh3vkxx8hpm177c754r8xy3qksc"))
12582 (modules '((guix build utils)))
12583 (snippet
12584 `(begin
12585 (delete-file (string-append "jakarta-oro-" ,version ".jar"))
12586 #t))))
12587 (build-system ant-build-system)
12588 (arguments
12589 `(#:build-target "package"
12590 #:make-flags (list "-DDATE" "(no recorded date for reproducibility)")
12591 #:tests? #f; tests are run as part of the build process
12592 #:phases
12593 (modify-phases %standard-phases
12594 (replace 'install
12595 (install-jars ,(string-append "jakarta-oro-" version))))))
12596 (home-page "https://jakarta.apache.org/oro/")
12597 (synopsis "Text-processing for Java")
12598 (description "The Jakarta-ORO Java classes are a set of text-processing
12599 Java classes that provide Perl5 compatible regular expressions, AWK-like
12600 regular expressions, glob expressions, and utility classes for performing
12601 substitutions, splits, filtering filenames, etc. This library is the successor
12602 of the OROMatcher, AwkTools, PerlTools, and TextTools libraries originally
12603 from ORO, Inc.")
12604 (license license:asl1.1)))
12605
12606 (define-public java-native-access
12607 (package
12608 (name "java-native-access")
12609 (version "4.5.1")
12610 (source (origin
12611 (method url-fetch)
12612 (uri (string-append "https://github.com/java-native-access/jna/"
12613 "archive/" version ".tar.gz"))
12614 (file-name (string-append name "-" version ".tar.gz"))
12615 (sha256
12616 (base32
12617 "0zrpzkib6b905i018a9pqlzkqinphywr6y4jwv6mwp63jjqvqkd9"))
12618 (modules '((guix build utils)))
12619 (snippet
12620 `(begin
12621 (for-each delete-file (find-files "." ".*.jar"))
12622 (delete-file-recursively "native/libffi")
12623 (delete-file-recursively "dist")
12624 #t))))
12625 (build-system ant-build-system)
12626 (arguments
12627 `(#:tests? #f; FIXME: tests require reflections.jar
12628 #:test-target "test"
12629 #:make-flags (list "-Ddynlink.native=true")
12630 #:phases
12631 (modify-phases %standard-phases
12632 (add-before 'build 'fix-build.xml
12633 (lambda* (#:key inputs #:allow-other-keys)
12634 (substitute* "build.xml"
12635 ;; Since we removed the bundled ant.jar, give the correct path
12636 (("lib/ant.jar") (string-append (assoc-ref inputs "ant") "/lib/ant.jar"))
12637 ;; We removed generated native libraries. We can only rebuild one
12638 ;; so don't fail if we can't find a native library for another architecture.
12639 (("zipfileset") "zipfileset erroronmissingarchive=\"false\""))
12640 ;; Copy test dependencies
12641 (copy-file (car (find-files (assoc-ref inputs "java-junit") "jar$"))
12642 "lib/junit.jar")
12643 (copy-file (car (find-files (assoc-ref inputs "java-hamcrest-core")
12644 "jar$"))
12645 "lib/hamcrest-core.jar")
12646 ;; FIXME: once reflections.jar is built, copy it to lib/test.
12647 #t))
12648 (add-before 'build 'build-native
12649 (lambda _
12650 (invoke "ant" "-Ddynlink.native=true" "native")
12651 #t))
12652 (replace 'install
12653 (install-jars "build")))))
12654 (inputs
12655 `(("libffi" ,libffi)
12656 ("libx11" ,libx11)
12657 ("libxt" ,libxt)))
12658 (native-inputs
12659 `(("java-junit" ,java-junit)
12660 ("java-hamcrest-core" ,java-hamcrest-core)))
12661 (home-page "https://github.com/java-native-access/jna")
12662 (synopsis "Access to native shared libraries from Java")
12663 (description "JNA provides Java programs easy access to native shared
12664 libraries without writing anything but Java code - no JNI or native code is
12665 required. JNA allows you to call directly into native functions using natural
12666 Java method invocation.")
12667 ;; Java Native Access project (JNA) is dual-licensed under 2
12668 ;; alternative Free licenses: LGPL 2.1 or later and Apache License 2.0.
12669 (license (list
12670 license:asl2.0
12671 license:lgpl2.1+))))
12672
12673 (define-public java-native-access-platform
12674 (package
12675 (inherit java-native-access)
12676 (name "java-native-access-platform")
12677 (arguments
12678 `(#:test-target "test"
12679 #:tests? #f; require jna-test.jar
12680 #:phases
12681 (modify-phases %standard-phases
12682 (add-before 'build 'chdir
12683 (lambda _
12684 (chdir "contrib/platform")
12685 #t))
12686 (add-after 'chdir 'fix-ant
12687 (lambda* (#:key inputs #:allow-other-keys)
12688 (substitute* "nbproject/project.properties"
12689 (("../../build/jna.jar")
12690 (string-append (assoc-ref inputs "java-native-access")
12691 "/share/java/jna.jar"))
12692 (("../../lib/hamcrest-core-.*.jar")
12693 (car (find-files (assoc-ref inputs "java-hamcrest-core")
12694 "jar$")))
12695 (("../../lib/junit.jar")
12696 (car (find-files (assoc-ref inputs "java-junit")
12697 "jar$"))))
12698 #t))
12699 (replace 'install
12700 (install-jars "dist")))))
12701 (inputs
12702 `(("java-native-access" ,java-native-access)))
12703 (synopsis "Cross-platform mappings for jna")
12704 (description "java-native-access-platform has cross-platform mappings
12705 and mappings for a number of commonly used platform functions, including a
12706 large number of Win32 mappings as well as a set of utility classes that
12707 simplify native access.")))
12708
12709 (define-public java-jsch-agentproxy-core
12710 (package
12711 (name "java-jsch-agentproxy-core")
12712 (version "0.0.8")
12713 (source (origin
12714 (method url-fetch)
12715 (uri (string-append "https://github.com/ymnk/jsch-agent-proxy/archive/"
12716 version ".tar.gz"))
12717 (file-name (string-append name "-" version ".tar.gz"))
12718 (sha256
12719 (base32
12720 "02iqg6jbc1kxvfzqcg6wy9ygqxfm82bw5rf6vnswqy4y572niz4q"))))
12721 (build-system ant-build-system)
12722 (arguments
12723 `(#:jar-name "jsch-agentproxy-core.jar"
12724 #:source-dir "jsch-agent-proxy-core/src/main/java"
12725 #:tests? #f)); no tests
12726 (home-page "https://github.com/ymnk/jsch-agent-proxy")
12727 (synopsis "Core component of the proxy to ssh-agent and Pageant in Java")
12728 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12729 and Pageant included Putty. It will be easily integrated into JSch, and users
12730 will be allowed to use these programs for authentication.")
12731 (license license:bsd-3)))
12732
12733 (define-public java-jsch-agentproxy-sshagent
12734 (package
12735 (inherit java-jsch-agentproxy-core)
12736 (name "java-jsch-agentproxy-sshagent")
12737 (arguments
12738 `(#:jar-name "jsch-agentproxy-sshagent.jar"
12739 #:source-dir "jsch-agent-proxy-sshagent/src/main/java"
12740 #:tests? #f)); no tests
12741 (inputs
12742 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
12743 (synopsis "Proxy to ssh-agent")
12744 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12745 and Pageant included in Putty. This component contains the code for a proxy to
12746 ssh-agent.")))
12747
12748 (define-public java-jsch-agentproxy-usocket-jna
12749 (package
12750 (inherit java-jsch-agentproxy-core)
12751 (name "java-jsch-agentproxy-usocket-jna")
12752 (arguments
12753 `(#:jar-name "jsch-agentproxy-usocket-jna.jar"
12754 #:source-dir "jsch-agent-proxy-usocket-jna/src/main/java"
12755 #:tests? #f)); no tests
12756 (inputs
12757 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
12758 ("java-native-access" ,java-native-access)))
12759 (synopsis "USocketFactory implementation using JNA")
12760 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12761 and Pageant included in Putty. This component contains an implementation of
12762 USocketFactory using @dfn{JNA} (Java Native Access).")))
12763
12764 (define-public java-jsch-agentproxy-pageant
12765 (package
12766 (inherit java-jsch-agentproxy-core)
12767 (name "java-jsch-agentproxy-pageant")
12768 (arguments
12769 `(#:jar-name "jsch-agentproxy-pageant.jar"
12770 #:source-dir "jsch-agent-proxy-pageant/src/main/java"
12771 #:tests? #f)); no tests
12772 (inputs
12773 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
12774 ("java-native-access" ,java-native-access)
12775 ("java-native-access-platform" ,java-native-access-platform)))
12776 (synopsis "Proxy to pageant")
12777 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12778 and Pageant included in Putty. This component contains the code for a proxy to
12779 pageant.")))
12780
12781 (define-public java-jsch-agentproxy-usocket-nc
12782 (package
12783 (inherit java-jsch-agentproxy-core)
12784 (name "java-jsch-agentproxy-usocket-nc")
12785 (arguments
12786 `(#:jar-name "jsch-agentproxy-usocket-nc.jar"
12787 #:source-dir "jsch-agent-proxy-usocket-nc/src/main/java"
12788 #:tests? #f)); no tests
12789 (inputs
12790 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
12791 (synopsis "USocketFactory implementation using netcat")
12792 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12793 and Pageant included in Putty. This component contains an implementation of
12794 USocketFactory using netcat.")))
12795
12796 (define-public java-jsch-agentproxy-connector-factory
12797 (package
12798 (inherit java-jsch-agentproxy-core)
12799 (name "java-jsch-agentproxy-connector-factory")
12800 (arguments
12801 `(#:jar-name "jsch-agentproxy-connector-factory.jar"
12802 #:source-dir "jsch-agent-proxy-connector-factory/src/main/java"
12803 #:tests? #f)); no tests
12804 (inputs
12805 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
12806 ("java-jsch-agentproxy-sshagent" ,java-jsch-agentproxy-sshagent)
12807 ("java-jsch-agentproxy-usocket-jna" ,java-jsch-agentproxy-usocket-jna)
12808 ("java-jsch-agentproxy-pageant" ,java-jsch-agentproxy-pageant)
12809 ("java-jsch-agentproxy-usocket-nc" ,java-jsch-agentproxy-usocket-nc)))
12810 (synopsis "Connector factory for jsch agent proxy")
12811 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12812 and Pageant included in Putty. This component contains a connector factory.")))
12813
12814 (define-public java-jsch-agentproxy-jsch
12815 (package
12816 (inherit java-jsch-agentproxy-core)
12817 (name "java-jsch-agentproxy-jsch")
12818 (arguments
12819 `(#:jar-name "jsch-agentproxy-jsch.jar"
12820 #:source-dir "jsch-agent-proxy-jsch/src/main/java"
12821 #:tests? #f)); no tests
12822 (inputs
12823 `(("java-jsch" ,java-jsch)
12824 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
12825 (synopsis "JSch integration library for agentproxy")
12826 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12827 and Pageant included in Putty. This component contains a library to use
12828 jsch-agent-proxy with JSch.")))
12829
12830 (define-public java-apache-ivy
12831 (package
12832 (name "java-apache-ivy")
12833 (version "2.4.0")
12834 (source (origin
12835 (method url-fetch)
12836 (uri (string-append "mirror://apache//ant/ivy/" version
12837 "/apache-ivy-" version "-src.tar.gz"))
12838 (sha256
12839 (base32
12840 "1xkfn57g2m7l6y0xdq75x5rnrgk52m9jx2xah70g3ggl8750hbr0"))
12841 (patches
12842 (search-patches
12843 "java-apache-ivy-port-to-latest-bouncycastle.patch"))))
12844 (build-system ant-build-system)
12845 (arguments
12846 `(#:jar-name "ivy.jar"
12847 #:tests? #f
12848 #:phases
12849 (modify-phases %standard-phases
12850 (add-before 'build 'remove-example
12851 (lambda _
12852 (delete-file-recursively "src/example")
12853 #t))
12854 (add-before 'build 'copy-resources
12855 (lambda _
12856 (with-directory-excursion "src/java"
12857 (for-each (lambda (file)
12858 (install-file file (string-append "../../build/classes/" (dirname file))))
12859 (append
12860 (find-files "." ".*.css")
12861 (find-files "." ".*.ent")
12862 (find-files "." ".*.html")
12863 (find-files "." ".*.properties")
12864 (find-files "." ".*.xsd")
12865 (find-files "." ".*.xsl")
12866 (find-files "." ".*.xml"))))
12867 #t))
12868 (add-before 'build 'fix-vfs
12869 (lambda _
12870 (substitute*
12871 '("src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java"
12872 "src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java")
12873 (("import org.apache.commons.vfs") "import org.apache.commons.vfs2"))
12874 #t))
12875 (add-before 'install 'copy-manifest
12876 (lambda _
12877 (install-file "META-INF/MANIFEST.MF" "build/classes/META-INF")
12878 #t))
12879 (add-before 'install 'repack
12880 (lambda _
12881 (invoke "jar" "-cmf" "build/classes/META-INF/MANIFEST.MF" "build/jar/ivy.jar"
12882 "-C" "build/classes" ".")))
12883 (add-after 'install 'install-bin
12884 (lambda* (#:key outputs #:allow-other-keys)
12885 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
12886 (ivy (string-append bin "/ivy"))
12887 (jar (string-append (assoc-ref outputs "out") "/share/java/ivy.jar")))
12888 (mkdir-p bin)
12889 (with-output-to-file ivy
12890 (lambda _
12891 (display (string-append
12892 "#!" (which "sh") "\n"
12893 "if [[ -z $CLASSPATH ]]; then\n"
12894 " cp=\"" (getenv "CLASSPATH") ":" jar "\"\n"
12895 "else\n"
12896 " cp=\"" (getenv "CLASSPATH") ":" jar ":$CLASSPATH\"\n"
12897 "fi\n"
12898 (which "java") " -cp $cp org.apache.ivy.Main $@\n"))))
12899 (chmod ivy #o755)
12900 #t))))))
12901 (inputs
12902 `(("java-bouncycastle" ,java-bouncycastle)
12903 ("java-commons-cli" ,java-commons-cli)
12904 ("java-commons-collections" ,java-commons-collections)
12905 ("java-commons-httpclient" ,java-commons-httpclient)
12906 ("java-commons-lang" ,java-commons-lang)
12907 ("java-commons-vfs" ,java-commons-vfs)
12908 ("java-jakarta-oro" ,java-jakarta-oro)
12909 ("java-jsch" ,java-jsch)
12910 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
12911 ("java-jsch-agentproxy-connector-factory" ,java-jsch-agentproxy-connector-factory)
12912 ("java-jsch-agentproxy-jsch" ,java-jsch-agentproxy-jsch)
12913 ("java-junit" ,java-junit)))
12914 (home-page "https://ant.apache.org/ivy")
12915 (synopsis "Dependency manager for the Java programming language")
12916 (description "Ivy is a tool for managing (recording, tracking, resolving
12917 and reporting) project dependencies. It is characterized by the following:
12918
12919 @itemize
12920 @item flexibility and configurability - Ivy is essentially process agnostic
12921 and is not tied to any methodology or structure. Instead it provides the
12922 necessary flexibility and configurability to be adapted to a broad range
12923 of dependency management and build processes.
12924 @item tight integration with Apache Ant - while available as a standalone tool,
12925 Ivy works particularly well with Apache Ant providing a number of
12926 powerful Ant tasks ranging from dependency resolution to dependency
12927 reporting and publication.
12928 @end itemize")
12929 (license license:asl2.0)))
12930
12931 (define-public java-eclipse-sisu-inject
12932 (package
12933 (name "java-eclipse-sisu-inject")
12934 (version "0.3.4")
12935 (source (origin
12936 (method git-fetch)
12937 (uri (git-reference
12938 (url "https://github.com/eclipse/sisu.inject/")
12939 (commit (string-append "releases/" version))))
12940 (file-name (git-file-name name version))
12941 (sha256
12942 (base32
12943 "16044sizdb0rjbhlfbmcnpds5y7by7dyn9b0c11606aikqi8k3x6"))))
12944 (build-system ant-build-system)
12945 (arguments
12946 `(#:jar-name "eclipse-sisu-inject.jar"
12947 #:source-dir "org.eclipse.sisu.inject/src"
12948 #:tests? #f; no tests
12949 #:phases
12950 (modify-phases %standard-phases
12951 (replace 'install
12952 (install-from-pom "org.eclipse.sisu.inject/pom.xml")))))
12953 (propagated-inputs
12954 `(("java-guice" ,java-guice)
12955 ("java-sisu-inject-parent-pom" ,java-sisu-inject-parent-pom)))
12956 (inputs
12957 `(("java-guice-servlet" ,java-guice-servlet)
12958 ("java-javax-inject" ,java-javax-inject)
12959 ("java-javaee-servletapi" ,java-javaee-servletapi)
12960 ("java-junit" ,java-junit)
12961 ("java-slf4j-api" ,java-slf4j-api)
12962 ("java-jsr305" ,java-jsr305)
12963 ("java-jsr250" ,java-jsr250)
12964 ("java-cdi-api" ,java-cdi-api)
12965 ("java-osgi-framework" ,java-osgi-framework)
12966 ("java-osgi-util-tracker" ,java-osgi-util-tracker)
12967 ("java-testng" ,java-testng)))
12968 (home-page "https://www.eclipse.org/sisu/")
12969 (synopsis "Classpath scanning, auto-binding, and dynamic auto-wiring")
12970 (description "Sisu is a modular JSR330-based container that supports
12971 classpath scanning, auto-binding, and dynamic auto-wiring. Sisu uses
12972 Google-Guice to perform dependency injection and provide the core JSR330
12973 support, but removes the need to write explicit bindings in Guice modules.
12974 Integration with other containers via the Eclipse Extension Registry and the
12975 OSGi Service Registry is a goal of this project.")
12976 (license license:epl1.0)))
12977
12978 (define java-sisu-inject-parent-pom
12979 (package
12980 (inherit java-eclipse-sisu-inject)
12981 (name "java-sisu-inject-parent-pom")
12982 (arguments
12983 `(#:tests? #f
12984 #:phases
12985 (modify-phases %standard-phases
12986 (delete 'configure)
12987 (delete 'build)
12988 (replace 'install
12989 (install-pom-file "pom.xml")))))
12990 (propagated-inputs '())))
12991
12992 (define-public java-eclipse-sisu-plexus
12993 (package
12994 (name "java-eclipse-sisu-plexus")
12995 (version "0.3.4")
12996 (source (origin
12997 (method git-fetch)
12998 (uri (git-reference
12999 (url "https://github.com/eclipse/sisu.plexus")
13000 (commit (string-append "releases/" version))))
13001 (file-name (git-file-name name version))
13002 (sha256
13003 (base32
13004 "17mjlajnsqnk07cc58h1qpxrif85yb2m2y0pyba48yjjgikk8r9f"))
13005 (modules '((guix build utils)))
13006 (snippet
13007 '(begin
13008 (for-each delete-file (find-files "." ".*.jar"))
13009 (rename-file "org.eclipse.sisu.plexus.tests/src"
13010 "org.eclipse.sisu.plexus.tests/java")
13011 #t))))
13012 (build-system ant-build-system)
13013 (arguments
13014 `(#:jar-name "eclipse-sisu-plexus.jar"
13015 #:source-dir "org.eclipse.sisu.plexus/src"
13016 #:test-dir "org.eclipse.sisu.plexus.tests"
13017 #:test-exclude
13018 (list
13019 ;; This test fails probably because we can't generate the necessary
13020 ;; meta-inf files.
13021 "**/PlexusLoggingTest.*"
13022 ;; FIXME: This test fails because of some injection error
13023 "**/PlexusRequirementTest.*")
13024 #:jdk ,icedtea-8
13025 #:phases
13026 (modify-phases %standard-phases
13027 (add-before 'build 'copy-resources
13028 (lambda _
13029 (install-file "org.eclipse.sisu.plexus/META-INF/plexus/components.xml"
13030 "build/classes/META-INF/plexus")
13031 #t))
13032 (add-before 'check 'build-test-jar
13033 (lambda _
13034 (with-directory-excursion "org.eclipse.sisu.plexus.tests/resources/component-jar/src/main/"
13035 (mkdir "build")
13036 (with-directory-excursion "java"
13037 (apply invoke "javac" "-cp"
13038 (string-append (getenv "CLASSPATH")
13039 ":../../../../../build/classes")
13040 (find-files "." ".*.java"))
13041 (for-each (lambda (file) (install-file file (string-append "../build/" file)))
13042 (find-files "." ".*.jar")))
13043 (mkdir-p "build/META-INF/plexus")
13044 (copy-file "resources/META-INF/plexus/components.xml"
13045 "build/META-INF/plexus/components.xml")
13046 (with-directory-excursion "build"
13047 (invoke "jar" "cf" "../../../component-jar-0.1.jar" ".")))
13048 (with-directory-excursion "org.eclipse.sisu.plexus.tests/"
13049 (copy-recursively "META-INF" "../build/test-classes/META-INF")
13050 (substitute* "java/org/eclipse/sisu/plexus/DefaultPlexusContainerTest.java"
13051 (("resources/component-jar")
13052 "org.eclipse.sisu.plexus.tests/resources/component-jar")))
13053 #t))
13054 (replace 'install
13055 (install-from-pom "org.eclipse.sisu.plexus/pom.xml")))))
13056 (propagated-inputs
13057 `(("java-plexus-classworlds" ,java-plexus-classworlds)
13058 ("java-plexus-utils" ,java-plexus-utils)
13059 ("java-plexus-component-annotations" ,java-plexus-component-annotations)
13060 ("java-cdi-api" ,java-cdi-api)
13061 ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)
13062 ("java-sisu-plexus-parent-pom" ,java-sisu-plexus-parent-pom)))
13063 (inputs
13064 `(("java-osgi-framework" ,java-osgi-framework)
13065 ("java-slf4j-api" ,java-slf4j-api)
13066 ("java-javax-inject" ,java-javax-inject)
13067 ("java-guice" ,java-guice)
13068 ("java-guava" ,java-guava)
13069 ("java-aopalliance" ,java-aopalliance)
13070 ("java-asm" ,java-asm)
13071 ("java-cglib" ,java-cglib)))
13072 (native-inputs
13073 `(("java-junit" ,java-junit)))
13074 (home-page "https://www.eclipse.org/sisu/")
13075 (synopsis "Plexus support for the sisu container")
13076 (description "Sisu is a modular JSR330-based container that supports
13077 classpath scanning, auto-binding, and dynamic auto-wiring. This package
13078 adds Plexus support to the Sisu-Inject container.")
13079 (license license:epl1.0)))
13080
13081 (define java-sisu-plexus-parent-pom
13082 (package
13083 (inherit java-eclipse-sisu-plexus)
13084 (name "java-sisu-plexus-parent-pom")
13085 (arguments
13086 `(#:tests? #f
13087 #:phases
13088 (modify-phases %standard-phases
13089 (delete 'configure)
13090 (delete 'build)
13091 (replace 'install
13092 (install-pom-file "pom.xml")))))
13093 (propagated-inputs
13094 `(("java-sonatype-oss-parent-pom-9" ,java-sonatype-oss-parent-pom-9)))))
13095
13096 (define-public java-commons-compiler
13097 (package
13098 (name "java-commons-compiler")
13099 (version "3.0.8")
13100 (source (origin
13101 (method git-fetch)
13102 (uri (git-reference
13103 (url "https://github.com/janino-compiler/janino")
13104 (commit "91aa95686d1e4ca3b16a984a03a38686572331b2")))
13105 (file-name (string-append name "-" version))
13106 (sha256
13107 (base32
13108 "04hfdl59sgh20qkxzgnibvs8f9hy6n7znxwpk611y5d89977y62r"))
13109 (modules '((guix build utils)))
13110 (snippet
13111 '(begin
13112 (for-each delete-file
13113 (find-files "." "\\.jar$"))
13114 #t))))
13115 (build-system ant-build-system)
13116 (arguments
13117 `(#:jar-name "commons-compiler.jar"
13118 #:source-dir "commons-compiler/src/main"
13119 #:tests? #f)); no tests
13120 (home-page "https://github.com/janino-compiler/janino")
13121 (synopsis "Java compiler")
13122 (description "Commons-compiler contains an API for janino, including the
13123 @code{IExpressionEvaluator}, @code{IScriptEvaluator}, @code{IClassBodyEvaluator}
13124 and @code{ISimpleCompiler} interfaces.")
13125 (license license:bsd-3)))
13126
13127 (define-public java-janino
13128 (package
13129 (inherit java-commons-compiler)
13130 (name "java-janino")
13131 (arguments
13132 `(#:jar-name "janino.jar"
13133 #:source-dir "src/main/java"
13134 #:phases
13135 (modify-phases %standard-phases
13136 (add-before 'configure 'chdir
13137 (lambda _
13138 (chdir "janino")
13139 #t)))))
13140 (inputs
13141 `(("java-commons-compiler" ,java-commons-compiler)))
13142 (native-inputs
13143 `(("java-junit" ,java-junit)
13144 ("java-hamcrest-core" ,java-hamcrest-core)))
13145 (description "Janino is a Java compiler. Janino can compile a set of
13146 source files to a set of class files like @code{javac}, but also compile a
13147 Java expression, block, class body or source file in memory, load the bytecode
13148 and execute it directly in the same JVM. @code{janino} can also be used for
13149 static code analysis or code manipulation.")))
13150
13151 (define-public java-logback-core
13152 (package
13153 (name "java-logback-core")
13154 (version "1.2.3")
13155 (source (origin
13156 (method url-fetch)
13157 (uri (string-append "https://github.com/qos-ch/logback/archive/v_"
13158 version ".tar.gz"))
13159 (file-name (string-append name "-" version ".tar.gz"))
13160 (sha256
13161 (base32
13162 "1x6ga74yfgm94cfx98gybakbrlilx8i2gn6dx13l40kasmys06mi"))
13163 (modules '((guix build utils)))
13164 (snippet
13165 '(begin
13166 (delete-file-recursively "logback-access/lib")
13167 #t))))
13168 (build-system ant-build-system)
13169 (arguments
13170 `(#:jar-name "logback.jar"
13171 #:source-dir "src/main/java"
13172 #:test-dir "src/test"
13173 #:test-exclude
13174 ;; These tests fail with Unable to set MockitoNamingPolicy on cglib generator
13175 ;; which creates FastClasses
13176 (list "**/AllCoreTest.*"
13177 "**/AutoFlushingObjectWriterTest.*"
13178 "**/PackageTest.*"
13179 "**/ResilientOutputStreamTest.*"
13180 ;; And we still don't want to run abstract classes
13181 "**/Abstract*.*")
13182 #:phases
13183 (modify-phases %standard-phases
13184 (add-before 'configure 'chdir
13185 (lambda _
13186 (chdir "logback-core")
13187 #t)))))
13188 (inputs
13189 `(("java-javax-mail" ,java-javax-mail)
13190 ("servlet" ,java-javaee-servletapi)
13191 ("java-commons-compiler" ,java-commons-compiler)
13192 ("java-janino" ,java-janino)))
13193 (native-inputs
13194 `(("java-junit" ,java-junit)
13195 ("java-hamcrest-core" ,java-hamcrest-core)
13196 ("java-mockito-1" ,java-mockito-1)
13197 ("java-cglib" ,java-cglib)
13198 ("java-asm" ,java-asm)
13199 ("java-objenesis" ,java-objenesis)
13200 ("java-joda-time" ,java-joda-time)))
13201 (home-page "https://logback.qos.ch")
13202 (synopsis "Logging for java")
13203 (description "Logback is intended as a successor to the popular log4j project.
13204 This module lays the groundwork for the other two modules.")
13205 ;; Either epl1.0 or lgpl2.1
13206 (license (list license:epl1.0
13207 license:lgpl2.1))))
13208
13209 (define-public java-logback-classic
13210 (package
13211 (inherit java-logback-core)
13212 (name "java-logback-classic")
13213 (arguments
13214 `(#:jar-name "logback-classic.jar"
13215 #:source-dir "src/main/java"
13216 #:test-dir "src/test"
13217 #:tests? #f; tests require more packages: h2, greenmail, hsql, subethamail, slf4j, log4j, felix
13218 #:jdk ,icedtea-8
13219 #:phases
13220 (modify-phases %standard-phases
13221 (add-before 'configure 'chdir
13222 (lambda _
13223 (chdir "logback-classic")
13224 #t))
13225 (replace 'build
13226 (lambda* (#:key inputs #:allow-other-keys)
13227 (mkdir-p "build/classes")
13228 (setenv "CLASSPATH"
13229 (string-join
13230 (apply append (map (lambda (input)
13231 (find-files (assoc-ref inputs input)
13232 ".*.jar"))
13233 '("java-logback-core" "java-slf4j-api"
13234 "java-commons-compiler" "servlet"
13235 "groovy")))
13236 ":"))
13237 (apply invoke "groovyc" "-d" "build/classes" "-j"
13238 (find-files "src/main/" ".*\\.(groovy|java)$"))
13239 (invoke "ant" "jar")
13240 #t)))))
13241 (inputs
13242 `(("java-logback-core" ,java-logback-core)
13243 ("java-slf4j-api" ,java-slf4j-api)
13244 ,@(package-inputs java-logback-core)))
13245 (native-inputs
13246 `(("groovy" ,groovy)))
13247 (description "Logback is intended as a successor to the popular log4j project.
13248 This module can be assimilated to a significantly improved version of log4j.
13249 Moreover, @code{logback-classic} natively implements the slf4j API so that you
13250 can readily switch back and forth between logback and other logging frameworks
13251 such as log4j or @code{java.util.logging} (JUL).")))
13252
13253 (define-public java-jgit
13254 (package
13255 (name "java-jgit")
13256 (version "4.7.0.201704051617-r")
13257 (source (origin
13258 (method url-fetch)
13259 (uri (string-append "https://repo1.maven.org/maven2/"
13260 "org/eclipse/jgit/org.eclipse.jgit/"
13261 version "/org.eclipse.jgit-"
13262 version "-sources.jar"))
13263 (sha256
13264 (base32
13265 "13ii4jn02ynzq6i7gsyi21k2i94jpc85wf6bcm31q4cyvzv0mk4k"))))
13266 (build-system ant-build-system)
13267 (arguments
13268 `(#:tests? #f ; There are no tests to run.
13269 #:jar-name "jgit.jar"
13270 ;; JGit must be built with a JDK supporting Java 8.
13271 #:jdk ,icedtea-8
13272 ;; Target our older default JDK.
13273 #:make-flags (list "-Dtarget=1.7")
13274 #:phases
13275 (modify-phases %standard-phases
13276 ;; The jar file generated by the default build.xml does not include
13277 ;; the text properties files, so we need to add them.
13278 (add-after 'build 'add-properties
13279 (lambda* (#:key jar-name #:allow-other-keys)
13280 (with-directory-excursion "src"
13281 (apply invoke "jar" "-uf"
13282 (string-append "../build/jar/" jar-name)
13283 (find-files "." "\\.properties$")))
13284 #t)))))
13285 (inputs
13286 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
13287 ("java-javaewah" ,java-javaewah)
13288 ("java-jsch" ,java-jsch)
13289 ("java-slf4j-api" ,java-slf4j-api)))
13290 (home-page "https://eclipse.org/jgit/")
13291 (synopsis "Java library implementing the Git version control system")
13292 (description "JGit is a lightweight, pure Java library implementing the
13293 Git version control system, providing repository access routines, support for
13294 network protocols, and core version control algorithms.")
13295 (license license:edl1.0)))
13296
13297 ;; For axoloti. This package can still be built with icedtea-7, which is
13298 ;; currently used as the default JDK.
13299 (define-public java-jgit-4.2
13300 (package (inherit java-jgit)
13301 (version "4.2.0.201601211800-r")
13302 (source (origin
13303 (method url-fetch)
13304 (uri (string-append "https://repo1.maven.org/maven2/"
13305 "org/eclipse/jgit/org.eclipse.jgit/"
13306 version "/org.eclipse.jgit-"
13307 version "-sources.jar"))
13308 (sha256
13309 (base32
13310 "15gm537iivhnzlkjym4x3wn5jqdjdragsw9pdpzqqg21nrc817mm"))))
13311 (build-system ant-build-system)
13312 (arguments
13313 (substitute-keyword-arguments (package-arguments java-jgit)
13314 ;; Build for default JDK.
13315 ((#:jdk _) icedtea-7)
13316 ((#:phases phases)
13317 `(modify-phases ,phases
13318 (add-after 'unpack 'use-latest-javaewah-API
13319 (lambda _
13320 (substitute* "src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java"
13321 (("wordinbits") "WORD_IN_BITS"))
13322 #t))))))
13323 (inputs
13324 `(("java-javaewah" ,java-javaewah)
13325 ("java-jsch" ,java-jsch)
13326 ("java-slf4j-api" ,java-slf4j-api)))))
13327
13328 (define-public abcl
13329 (package
13330 (name "abcl")
13331 (version "1.8.0")
13332 (source
13333 (origin
13334 (method url-fetch)
13335 (uri (string-append "https://abcl.org/releases/"
13336 version "/abcl-src-" version ".tar.gz"))
13337 (sha256
13338 (base32
13339 "0zr5mmqyj484vza089l8vc88d07g0m8ymxzglvar3ydwyvi1x1qx"))
13340 (patches
13341 (search-patches
13342 "abcl-fix-build-xml.patch"))))
13343 (build-system ant-build-system)
13344 (native-inputs
13345 `(("java-junit" ,java-junit)))
13346 (arguments
13347 `(#:build-target "abcl.jar"
13348 #:test-target "abcl.test"
13349 #:phases
13350 (modify-phases %standard-phases
13351 (replace 'install
13352 (lambda* (#:key outputs #:allow-other-keys)
13353 (let ((share (string-append (assoc-ref outputs "out")
13354 "/share/java/"))
13355 (bin (string-append (assoc-ref outputs "out")
13356 "/bin/")))
13357 (mkdir-p share)
13358 (install-file "dist/abcl.jar" share)
13359 (install-file "dist/abcl-contrib.jar" share)
13360 (mkdir-p bin)
13361 (with-output-to-file (string-append bin "abcl")
13362 (lambda _
13363 (let ((classpath (string-append
13364 share "abcl.jar"
13365 ":"
13366 share "abcl-contrib.jar")))
13367 (display (string-append
13368 "#!" (which "sh") "\n"
13369 "if [[ -z $CLASSPATH ]]; then\n"
13370 " cp=\"" classpath "\"\n"
13371 "else\n"
13372 " cp=\"" classpath ":$CLASSPATH\"\n"
13373 "fi\n"
13374 "exec " (which "java")
13375 " -cp $cp org.armedbear.lisp.Main $@\n")))))
13376 (chmod (string-append bin "abcl") #o755)
13377 #t))))))
13378 (home-page "https://abcl.org/")
13379 (synopsis "Common Lisp Implementation on the JVM")
13380 (description
13381 "@dfn{Armed Bear Common Lisp} (ABCL) is a full implementation of the Common
13382 Lisp language featuring both an interpreter and a compiler, running in the
13383 JVM. It supports JSR-223 (Java scripting API): it can be a scripting engine
13384 in any Java application. Additionally, it can be used to implement (parts of)
13385 the application using Java to Lisp integration APIs.")
13386 (license (list license:gpl2+
13387 ;; named-readtables is released under 3 clause BSD
13388 license:bsd-3
13389 ;; jfli is released under CPL 1.0
13390 license:cpl1.0))))
13391
13392 (define-public java-jsonp-api
13393 (package
13394 (name "java-jsonp-api")
13395 (version "1.1.6")
13396 (source (origin
13397 (method git-fetch)
13398 (uri (git-reference
13399 (url "https://github.com/eclipse-ee4j/jsonp")
13400 (commit (string-append "1.1-" version "-RELEASE"))))
13401 (file-name (git-file-name name version))
13402 (sha256
13403 (base32
13404 "0zrj03hkr3jdmqlb4ipjr37cqpp2q2814qpmxi7srlwpdqs0ibgc"))))
13405 (build-system ant-build-system)
13406 (arguments
13407 `(#:jar-name "jsonp-api.jar"
13408 #:tests? #f
13409 #:source-dir "api/src/main/java"
13410 #:test-dir "api/src/test"))
13411 (home-page "https://eclipse-ee4j.github.io/jsonp/")
13412 (synopsis "JSON Processing in Java")
13413 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
13414 parse, generate, transform and query) JSON messages. It produces and
13415 consumes JSON text in a streaming fashion (similar to StAX API for XML)
13416 and allows building a Java object model for JSON text using API classes
13417 (similar to DOM API for XML).")
13418 ;; either gpl2 only with classpath exception, or epl2.0.
13419 (license (list license:gpl2
13420 license:epl2.0))))
13421
13422 (define-public java-jsonp-impl
13423 (package
13424 (inherit java-jsonp-api)
13425 (name "java-jsonp-impl")
13426 (arguments
13427 `(#:jar-name "jsonp-impl.jar"
13428 #:tests? #f
13429 #:source-dir "impl/src/main/java"
13430 #:test-dir "impl/src/test"
13431 #:phases
13432 (modify-phases %standard-phases
13433 (add-before 'build 'copy-resources
13434 (lambda _
13435 (copy-recursively
13436 "impl/src/main/resources/"
13437 "build/classes")
13438 #t)))))
13439 (propagated-inputs
13440 `(("java-jsonp-api" ,java-jsonp-api)))
13441 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
13442 parse, generate, transform and query) JSON messages. This package contains
13443 a reference implementation of that API.")))
13444
13445 (define-public java-xmp
13446 (package
13447 (name "java-xmp")
13448 (version "5.1.3")
13449 (source (origin
13450 (method url-fetch)
13451 (uri (string-append "http://download.macromedia.com/pub/developer"
13452 "/xmp/sdk/XMPCoreJava-" version ".zip"))
13453 (sha256
13454 (base32
13455 "14nai2mmsg7l5ya2y5mx4w4lr1az3sk2fjz6hiy4zdrsavgvl1g7"))))
13456 (build-system ant-build-system)
13457 (arguments
13458 `(#:build-target "build"
13459 #:tests? #f; no tests
13460 #:phases
13461 (modify-phases %standard-phases
13462 (add-after 'unpack 'chdir
13463 (lambda _
13464 (chdir "XMPCore")
13465 #t))
13466 (add-before 'build 'fix-timestamp
13467 (lambda _
13468 (substitute* "build.xml"
13469 (("\\$\\{BuildDate\\}") "1970 Jan 01 00:00:00-GMT"))
13470 #t))
13471 (replace 'install
13472 (install-jars "."))
13473 (add-after 'install 'install-doc
13474 (lambda* (#:key outputs #:allow-other-keys)
13475 (copy-recursively
13476 "docs"
13477 (string-append (assoc-ref outputs "out") "/share/doc/java-xmp"))
13478 #t)))))
13479 (native-inputs
13480 `(("unzip" ,unzip)))
13481 (home-page "https://www.adobe.com/devnet/xmp.html")
13482 (synopsis "Extensible Metadat Platform (XMP) support in Java")
13483 (description "Adobe's Extensible Metadata Platform (XMP) is a labeling
13484 technology that allows you to embed data about a file, known as metadata,
13485 into the file itself. The XMP Toolkit for Java is based on the C++ XMPCore
13486 library and the API is similar.")
13487 (license license:bsd-3)))
13488
13489 (define-public java-args4j
13490 (package
13491 (name "java-args4j")
13492 (version "2.33")
13493 (source (origin
13494 (method git-fetch)
13495 (uri (git-reference
13496 (url "https://github.com/kohsuke/args4j")
13497 (commit (string-append "args4j-site-" version))))
13498 (file-name (git-file-name name version))
13499 (sha256
13500 (base32
13501 "0w061fg65qrsm1a0lz0vyprsyidj31krjb459qi2lw0y78xza26s"))))
13502 (build-system ant-build-system)
13503 (arguments
13504 `(#:jar-name "args4j.jar"
13505 #:source-dir "args4j/src"
13506 #:test-dir "args4j/test"
13507 #:test-exclude
13508 (list "**/ExampleTest.*"
13509 "**/ExternalConfiguredTest.*" ; fails to find a file
13510 ;; We still don't want to run abstract classes
13511 "**/Abstract*.*")
13512 #:phases
13513 (modify-phases %standard-phases
13514 (add-before 'check 'fix-test-dir
13515 (lambda _
13516 (substitute* "build.xml"
13517 (("/java\">") "\">"))
13518 #t))
13519 (add-before 'build 'copy-resources
13520 (lambda _
13521 (let ((from-prefix "args4j/src/org/kohsuke/args4j/")
13522 (to-prefix "build/classes/org/kohsuke/args4j/"))
13523 (for-each (lambda (f)
13524 (install-file
13525 (string-append from-prefix f)
13526 (string-append to-prefix (dirname f))))
13527 (list "Messages.properties"
13528 "Messages_de.properties"
13529 "Messages_en.properties"
13530 "Messages_ru.properties"
13531 "spi/Messages.properties"
13532 "spi/Messages_de.properties"
13533 "spi/Messages_en.properties"
13534 "spi/Messages_ru.properties")))
13535 #t)))))
13536 (native-inputs
13537 `(("java-junit" ,java-junit)))
13538 (home-page "https://args4j.kohsuke.org/")
13539 (synopsis "Command line parser library")
13540 (description "Args4j is a small Java class library that makes it easy to
13541 parse command line options/arguments in your CUI application.")
13542 (license license:expat)))
13543
13544 (define-public java-metadata-extractor
13545 (package
13546 (name "java-metadata-extractor")
13547 (version "2.11.0")
13548 (source (origin
13549 (method git-fetch)
13550 (uri (git-reference
13551 (url "https://github.com/drewnoakes/metadata-extractor")
13552 (commit version)))
13553 (file-name (git-file-name name version))
13554 (sha256
13555 (base32
13556 "06yrq0swrl1r40yjbk5kqzjxr04jlkq9lfi711jvfgjf5kp2qinj"))))
13557 (build-system ant-build-system)
13558 (arguments
13559 `(#:jar-name "metadata-extractor.jar"
13560 #:source-dir "Source"
13561 #:test-dir "Tests"
13562 #:phases
13563 (modify-phases %standard-phases
13564 (add-before 'check 'fix-test-dir
13565 (lambda _
13566 (substitute* "build.xml"
13567 (("/java\">") "\">"))
13568 #t)))))
13569 (propagated-inputs
13570 `(("java-xmp" ,java-xmp)))
13571 (native-inputs
13572 `(("java-hamcrest-core" ,java-hamcrest-core)
13573 ("java-junit" ,java-junit)))
13574 (home-page "https://github.com/drewnoakes/metadata-extractor")
13575 (synopsis "Extract metadata from image and video files")
13576 (description "Metadata-extractor is a straightforward Java library for
13577 reading metadata from image files. It is able to read metadata in Exif,
13578 IPTC, XMP, ICC and more formats.")
13579 (license license:asl2.0)))
13580
13581 (define-public java-svg-salamander
13582 (package
13583 (name "java-svg-salamander")
13584 (version "1.1.2")
13585 (source (origin
13586 (method git-fetch)
13587 (uri (git-reference
13588 (url "https://github.com/blackears/svgSalamander")
13589 (commit (string-append "v" version))))
13590 (file-name (git-file-name name version))
13591 (sha256
13592 (base32
13593 "1zv3kjdkf6iqf02x6ln76254y634j2ji448y706a65lsbfjmmicf"))
13594 (modules '((guix build utils)))
13595 (snippet
13596 '(begin
13597 (for-each delete-file (find-files "." ".*.jar"))
13598 #t))
13599 (patches
13600 (search-patches "java-svg-salamander-Fix-non-det.patch"))))
13601 (build-system ant-build-system)
13602 (arguments
13603 `(#:tests? #f; no tests
13604 #:phases
13605 (modify-phases %standard-phases
13606 (add-after 'unpack 'chdir
13607 (lambda _
13608 (chdir "svg-core")
13609 #t))
13610 (add-before 'build 'copy-jars
13611 (lambda* (#:key inputs #:allow-other-keys)
13612 (copy-file (car (find-files (assoc-ref inputs "javacc") "\\.jar$"))
13613 "../libraries/javacc.jar")
13614 (copy-file (car (find-files (assoc-ref inputs "ant") "ant\\.jar$"))
13615 "../libraries/ant.jar")
13616 #t))
13617 (replace 'install
13618 (install-jars "dist")))))
13619 (native-inputs
13620 `(("javacc" ,javacc)))
13621 (home-page "https://github.com/blackears/svgSalamander")
13622 (synopsis "SVG engine for Java")
13623 (description "SVG Salamander is an SVG engine for Java that's designed
13624 to be small, fast, and allow programmers to use it with a minimum of fuss.
13625 It's in particular targeted for making it easy to integrate SVG into Java
13626 games and making it much easier for artists to design 2D game content - from
13627 rich interactive menus to charts and graphcs to complex animations.")
13628 (license license:bsd-2)))
13629
13630 (define-public java-jboss-transaction-api-spec
13631 (package
13632 (name "java-jboss-transaction-api-spec")
13633 (version "1.2+1.1.1")
13634 (source (origin
13635 (method git-fetch)
13636 (uri (git-reference
13637 (url "https://github.com/jboss/jboss-transaction-api_spec")
13638 (commit "jboss-transaction-api_1.2_spec-1.1.1.Final")))
13639 (file-name (git-file-name name version))
13640 (sha256
13641 (base32
13642 "1xbfq5hvb86izflydxrqqv3k26c1ba2m0ap6m97shqrsdi9by4wy"))))
13643 (build-system ant-build-system)
13644 (arguments
13645 `(#:jar-name "java-jboss-transaction-api_spec.jar"
13646 #:source-dir "src/main/java"
13647 #:tests? #f)); no tests
13648 (inputs
13649 `(("java-cdi-api" ,java-cdi-api)
13650 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)))
13651 (home-page "https://github.com/jboss/jboss-transaction-api_spec")
13652 (synopsis "Generic transaction management API in Java")
13653 (description "Java-jboss-transaction-api-spec implements the Transactions
13654 API. A transaction is a unit of work containing one or more operations
13655 involving one or more shared resources having ACID (Atomicity, Consistency,
13656 Isolation and Durability) properties.")
13657 ;; either gpl2 only with classpath exception or cddl.
13658 (license (list license:gpl2 license:cddl1.0))))
13659
13660 (define-public java-picocli
13661 (package
13662 (name "java-picocli")
13663 (version "4.3.2")
13664 (source (origin
13665 (method git-fetch)
13666 (uri (git-reference
13667 (url "https://github.com/remkop/picocli")
13668 (commit (string-append "v" version))))
13669 (file-name (git-file-name name version))
13670 (sha256
13671 (base32
13672 "1sxp6rxjfgjd98ly14b3d15dvxkm5wg4g46w12jyhmr0kmkaca3c"))))
13673 (build-system ant-build-system)
13674 (arguments
13675 `(#:jar-name "picocli.jar"
13676 #:source-dir "src/main/java"
13677 ;; Tests require missing dependencies (junitparams, system-rules)
13678 #:tests? #f))
13679 (home-page "https://picocli.info")
13680 (synopsis "REPL for the JVM")
13681 (description "Picocli is a framework for building command line applications
13682 for the JVM. It supports colors, autocompletion, subcommands, and more. Written
13683 in Java, usable from Groovy, Kotlin, Scala, etc.")
13684 (license license:asl2.0)))
13685
13686 (define-public java-jetbrains-annotations
13687 (package
13688 (name "java-jetbrains-annotations")
13689 (version "19.0.0")
13690 (source (origin
13691 (method git-fetch)
13692 (uri (git-reference
13693 (url "https://github.com/JetBrains/java-annotations")
13694 (commit version)))
13695 (file-name (git-file-name name version))
13696 (sha256
13697 (base32
13698 "0z6i1xs60cd5ffz23c49sq68wn5mphhs3xpar1n93ppama2ng80v"))))
13699 (build-system ant-build-system)
13700 (arguments
13701 `(#:jar-name "jetbrains-annotations.jar"
13702 #:source-dir "common/src/main/java:java8/src/main/java"
13703 #:tests? #f)); no tests
13704 (home-page "https://github.com/JetBrains/java-annotations")
13705 (synopsis "Annotations for Java and other JVM languages")
13706 (description "This package contains a set of Java annotations which can be
13707 used in JVM-based languages. They serve as an additional documentation and
13708 can be interpreted by IDEs and static analysis tools to improve code analysis.")
13709 (license license:expat)))
13710
13711 (define-public java-javaparser
13712 (package
13713 (name "java-javaparser")
13714 (version "3.16.1")
13715 (source (origin
13716 (method git-fetch)
13717 (uri (git-reference
13718 (url "https://github.com/javaparser/javaparser")
13719 (commit (string-append "javaparser-parent-" version))))
13720 (file-name (git-file-name name version))
13721 (sha256
13722 (base32
13723 "1a4jk12ffa31fa0y8vda0739vpfj1206p0nha842b7bixbvwamv9"))
13724 (modules '((guix build utils)))
13725 (snippet
13726 '(begin
13727 (for-each delete-file
13728 (find-files "." "\\.jar$"))
13729 #t))))
13730 (build-system ant-build-system)
13731 (arguments
13732 `(#:tests? #f; tests require jbehave and junit5
13733 #:phases
13734 (modify-phases %standard-phases
13735 (add-before 'build 'fill-template
13736 (lambda _
13737 (with-directory-excursion "javaparser-core/src/main"
13738 (copy-file "java-templates/com/github/javaparser/JavaParserBuild.java"
13739 "java/com/github/javaparser/JavaParserBuild.java")
13740 (substitute* "java/com/github/javaparser/JavaParserBuild.java"
13741 (("\\$\\{project.version\\}") ,version)
13742 (("\\$\\{project.name\\}") "javaparser")
13743 (("\\$\\{project.build.finalName\\}") "javaparser")
13744 (("\\$\\{maven.version\\}") "fake")
13745 (("\\$\\{maven.build.version\\}") "fake")
13746 (("\\$\\{build.timestamp\\}") "0")
13747 (("\\$\\{java.vendor\\}") "Guix")
13748 (("\\$\\{java.vendor.url\\}") "https://gnu.org/software/guix")
13749 (("\\$\\{java.version\\}") "1.8")
13750 (("\\$\\{os.arch\\}") "any")
13751 (("\\$\\{os.name\\}") "GuixSD")
13752 (("\\$\\{os.version\\}") "not available")))
13753 #t))
13754 (add-before 'build 'generate-javacc
13755 (lambda _
13756 (with-directory-excursion "javaparser-core/src/main/java"
13757 (invoke "java" "javacc" "../javacc/java.jj"))
13758 #t))
13759 (add-before 'build 'copy-javacc-support
13760 (lambda _
13761 (with-directory-excursion "javaparser-core/src/main"
13762 (copy-recursively "javacc-support" "java"))
13763 #t))
13764 (replace 'build
13765 (lambda _
13766 (define (build name)
13767 (format #t "Building ~a~%" name)
13768 (delete-file-recursively "build/classes")
13769 (mkdir-p "build/classes")
13770 (apply invoke "javac"
13771 "-cp" (string-append (getenv "CLASSPATH") ":"
13772 (string-join (find-files "build/jar" ".")
13773 ":"))
13774 "-d" "build/classes"
13775 (find-files (string-append name "/src/main/java")
13776 ".*.java"))
13777 (invoke "jar" "-cf" (string-append "build/jar/" name ".jar")
13778 "-C" "build/classes" "."))
13779 (mkdir-p "build/classes")
13780 (mkdir-p "build/test-classes")
13781 (mkdir-p "build/jar")
13782 (build "javaparser-core")
13783 (build "javaparser-core-serialization")
13784 (build "javaparser-core-generators")
13785 (build "javaparser-core-metamodel-generator")
13786 (build "javaparser-symbol-solver-core")
13787 #t))
13788 (replace 'install
13789 (install-jars "build/jar")))))
13790 (inputs
13791 `(("java-guava" ,java-guava)
13792 ("java-jboss-javassist" ,java-jboss-javassist)
13793 ("java-jsonp-api" ,java-jsonp-api)))
13794 (native-inputs
13795 `(("javacc" ,javacc)))
13796 (home-page "http://javaparser.org/")
13797 (synopsis "Parser for Java")
13798 (description
13799 "This project contains a set of libraries implementing a Java 1.0 - Java
13800 11 Parser with advanced analysis functionalities.")
13801 (license (list
13802 ;; either lgpl or asl
13803 license:lgpl3+
13804 license:asl2.0))))