gnu: java-commons-codec: Update to 1.14.
[jackhill/guix/guix.git] / gnu / packages / java.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
3 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
4 ;;; Copyright © 2016, 2017 Roel Janssen <roel@gnu.org>
5 ;;; Copyright © 2017, 2019 Carlo Zancanaro <carlo@zancanaro.id.au>
6 ;;; Copyright © 2017-2020 Julien Lepiller <julien@lepiller.eu>
7 ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
8 ;;; Copyright © 2016, 2017, 2018 Alex Vong <alexvong1995@gmail.com>
9 ;;; Copyright © 2017, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
10 ;;; Copyright © 2018, 2019 Gábor Boskovits <boskovits@gmail.com>
11 ;;; Copyright © 2018 Chris Marusich <cmmarusich@gmail.com>
12 ;;; Copyright © 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
13 ;;; Copyright © 2019, 2020 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
14 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
15 ;;; Copyright © 2020 Raghav Gururajan <raghavgururajan@disroot.org>
16 ;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
17 ;;;
18 ;;; This file is part of GNU Guix.
19 ;;;
20 ;;; GNU Guix is free software; you can redistribute it and/or modify it
21 ;;; under the terms of the GNU General Public License as published by
22 ;;; the Free Software Foundation; either version 3 of the License, or (at
23 ;;; your option) any later version.
24 ;;;
25 ;;; GNU Guix is distributed in the hope that it will be useful, but
26 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
27 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 ;;; GNU General Public License for more details.
29 ;;;
30 ;;; You should have received a copy of the GNU General Public License
31 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
32
33 (define-module (gnu packages java)
34 #:use-module ((guix licenses) #:prefix license:)
35 #:use-module (guix packages)
36 #:use-module (guix download)
37 #:use-module (guix hg-download)
38 #:use-module (guix git-download)
39 #:use-module (guix svn-download)
40 #:use-module (guix utils)
41 #:use-module (guix build-system ant)
42 #:use-module (guix build-system gnu)
43 #:use-module (guix build-system trivial)
44 #:use-module (gnu packages)
45 #:use-module (gnu packages attr)
46 #:use-module (gnu packages autotools)
47 #:use-module (gnu packages base)
48 #:use-module (gnu packages bash)
49 #:use-module (gnu packages certs)
50 #:use-module (gnu packages cpio)
51 #:use-module (gnu packages cups)
52 #:use-module (gnu packages compression)
53 #:use-module (gnu packages elf)
54 #:use-module (gnu packages fontutils)
55 #:use-module (gnu packages gawk)
56 #:use-module (gnu packages gettext)
57 #:use-module (gnu packages gl)
58 #:use-module (gnu packages ghostscript) ;lcms
59 #:use-module (gnu packages gnome)
60 #:use-module (gnu packages groovy)
61 #:use-module (gnu packages gtk)
62 #:use-module (gnu packages guile)
63 #:use-module (gnu packages icu4c)
64 #:use-module (gnu packages image)
65 #:use-module (gnu packages java-compression)
66 #:use-module (gnu packages libffi)
67 #:use-module (gnu packages linux) ;alsa
68 #:use-module (gnu packages maths)
69 #:use-module (gnu packages maven-parent-pom)
70 #:use-module (gnu packages nss)
71 #:use-module (gnu packages onc-rpc)
72 #:use-module (gnu packages web)
73 #:use-module (gnu packages wget)
74 #:use-module (gnu packages pkg-config)
75 #:use-module (gnu packages perl)
76 #:use-module (gnu packages popt)
77 #:use-module (gnu packages kerberos)
78 #:use-module (gnu packages xml)
79 #:use-module (gnu packages xorg)
80 #:use-module (gnu packages texinfo)
81 #:use-module ((srfi srfi-1) #:select (fold alist-delete))
82 #:use-module (srfi srfi-11)
83 #:use-module (ice-9 match))
84
85 \f
86 ;;;
87 ;;; Java bootstrap toolchain.
88 ;;;
89
90 ;; The Java bootstrap begins with Jikes, a Java compiler written in C++. We
91 ;; use it to build a simple version of GNU Classpath, the Java standard
92 ;; library. We chose version 0.93 because it is the last version that can be
93 ;; built with Jikes. With Jikes and this version of GNU Classpath we can
94 ;; build JamVM, a Java Virtual Machine. We build version 1.5.1 because it is
95 ;; the last version of JamVM that works with a version of GNU classpath that
96 ;; does not require ECJ. These three packages make up the bootstrap JDK.
97
98 ;; This is sufficient to build an older version of Ant, which is needed to
99 ;; build an older version of ECJ, an incremental Java compiler, both of which
100 ;; are written in Java.
101 ;;
102 ;; ECJ is needed to build the latest release (0.99) and the development
103 ;; version of GNU Classpath. The development version of GNU Classpath has
104 ;; much more support for Java 1.6 than the latest release, but we need to
105 ;; build 0.99 first to get a working version of javah. ECJ, the development
106 ;; version of GNU Classpath, and the latest version of JamVM make up the
107 ;; second stage JDK with which we can build the OpenJDK with the Icedtea 1.x
108 ;; build framework. We then build the more recent JDKs Icedtea 2.x and
109 ;; Icedtea 3.x.
110
111 (define-public libantlr3c
112 (package
113 (name "libantlr3c")
114 (version "3.4")
115 (source
116 (origin
117 (method url-fetch)
118 (uri
119 (string-append "https://www.antlr3.org/download/C/"
120 name "-" version ".tar.gz"))
121 (sha256
122 (base32 "0lpbnb4dq4azmsvlhp6khq1gy42kyqyjv8gww74g5lm2y6blm4fa"))))
123 (build-system gnu-build-system)
124 (arguments
125 `(#:configure-flags (list "--enable-debuginfo" "--disable-static")
126 #:phases (modify-phases %standard-phases
127 (replace 'configure
128 (lambda* (#:key build target native-inputs inputs outputs
129 (configure-flags '()) out-of-source? system
130 #:allow-other-keys)
131 (let ((configure (assoc-ref %standard-phases 'configure))
132 (enable-64bit? (member system '("aarch64-linux"
133 "x86_64-linux"
134 "mips64el-linux"))))
135 (configure #:build build #:target target
136 #:native-inputs native-inputs
137 #:inputs inputs #:outputs outputs
138 #:configure-flags `(,(if enable-64bit?
139 "--enable-64bit"
140 '())
141 ,@configure-flags)
142 #:out-of-source? out-of-source?)))))))
143 (synopsis "ANTLR C Library")
144 (description "LIBANTLR3C provides run-time C libraries for ANTLR3 (ANother
145 Tool for Language Recognition v3).")
146 (home-page "https://www.antlr3.org/")
147 (license license:bsd-3)))
148
149 (define jikes
150 (package
151 (name "jikes")
152 (version "1.22")
153 (source (origin
154 (method url-fetch)
155 (uri (string-append "mirror://sourceforge/jikes/Jikes/"
156 version "/jikes-" version ".tar.bz2"))
157 (sha256
158 (base32
159 "1qqldrp74pzpy5ly421srqn30qppmm9cvjiqdngk8hf47dv2rc0c"))))
160 (build-system gnu-build-system)
161 (home-page "http://jikes.sourceforge.net/")
162 (synopsis "Compiler for the Java language")
163 (description "Jikes is a compiler that translates Java source files as
164 defined in The Java Language Specification into the bytecoded instruction set
165 and binary format defined in The Java Virtual Machine Specification.")
166 (license license:ibmpl1.0)))
167
168 (define-public drip
169 ;; Last release is from 2014, with a few important commits afterwards.
170 (let ((commit "a4bd00df0199e78243847f06cc04ecaea31f8f08"))
171 (package
172 (name "drip")
173 (version (git-version "0.2.4" "1" commit))
174 (source (origin
175 (method git-fetch)
176 (uri (git-reference
177 (url "https://github.com/ninjudd/drip")
178 (commit commit)))
179 (file-name (git-file-name name version))
180 (sha256
181 (base32
182 "0wzmjwfyldr3jn49517xd8yn7dgdk8h88qkga3kjyg1zc375ylg2"))))
183 (build-system gnu-build-system)
184 (native-inputs
185 `(("jdk" ,icedtea "jdk")))
186 (arguments
187 `(#:tests? #f ; No tests.
188 #:phases
189 (modify-phases %standard-phases
190 (delete 'configure)
191 (add-before 'install 'fix-wrapper
192 (lambda* (#:key inputs #:allow-other-keys)
193 (let ((jps (string-append (assoc-ref inputs "jdk") "/bin/jps")))
194 (substitute* "bin/drip"
195 (("jps") jps)
196 (("brew update && brew upgrade drip") "guix pull && guix install drip")
197 ;; No need to make:
198 (("\\(cd -- \"\\$drip_dir\" && make -s\\) \\|\\| exit 1") "")
199 ;; No need to include source:
200 (("\\[\\[ -r \\$drip_dir/src/org/flatland/drip/Main\\.java \\]\\]")
201 "true"))
202 #t)))
203 (replace 'install
204 (lambda* (#:key outputs #:allow-other-keys)
205 (let* ((out (assoc-ref outputs "out"))
206 (bin (string-append out "/bin"))
207 (share (string-append out "/share/drip")))
208 (mkdir-p bin)
209 (for-each
210 (lambda (file)
211 (install-file (string-append "bin/" file) bin))
212 '("drip" "drip_daemon" "drip_proxy"))
213 (install-file "drip.jar" share)
214 (substitute* (string-append bin "/drip")
215 (("drip_dir=\\$bin_dir/..")
216 (string-append "drip_dir=" share)))
217 #t))))))
218 (home-page "https://github.com/ninjudd/drip")
219 (synopsis "Faster Java Virtual Machine launching")
220 (description "Drip is a launcher for the Java Virtual Machine that
221 provides much faster startup times than the @command{java} command. The @command{drip}
222 script is intended to be a drop-in replacement for the @command{java} command,
223 only faster.")
224 (license license:epl1.0))))
225
226 ;; This is the last version of GNU Classpath that can be built without ECJ.
227 (define classpath-bootstrap
228 (package
229 (name "classpath")
230 (version "0.93")
231 (source (origin
232 (method url-fetch)
233 (uri (string-append "mirror://gnu/classpath/classpath-"
234 version ".tar.gz"))
235 (sha256
236 (base32
237 "0i99wf9xd3hw1sj2sazychb9prx8nadxh2clgvk3zlmb28v0jbfz"))
238 (patches (search-patches "classpath-aarch64-support.patch"))))
239 (build-system gnu-build-system)
240 (arguments
241 `(#:configure-flags
242 (list (string-append "JAVAC="
243 (assoc-ref %build-inputs "jikes")
244 "/bin/jikes")
245 "--disable-Werror"
246 "--disable-gmp"
247 "--disable-gtk-peer"
248 "--disable-gconf-peer"
249 "--disable-plugin"
250 "--disable-dssi"
251 "--disable-alsa"
252 "--disable-gjdoc")
253 #:phases
254 (modify-phases %standard-phases
255 ;; XXX: This introduces a memory leak as we remove a call to free up
256 ;; memory for the file name string. This was necessary because of a
257 ;; runtime error that would have prevented us from building
258 ;; ant-bootstrap later. See https://issues.guix.gnu.org/issue/36685
259 ;; for the gnarly details.
260 (add-after 'unpack 'remove-call-to-free
261 (lambda _
262 (substitute* "native/jni/java-io/java_io_VMFile.c"
263 (("result = cpio_isFileExists.*" m)
264 (string-append m "\n//")))
265 #t))
266 (add-after 'install 'install-data
267 (lambda _ (invoke "make" "install-data"))))))
268 (native-inputs
269 `(("jikes" ,jikes)
270 ("fastjar" ,fastjar)
271 ("libltdl" ,libltdl)
272 ("pkg-config" ,pkg-config)))
273 (home-page "https://www.gnu.org/software/classpath/")
274 (synopsis "Essential libraries for Java")
275 (description "GNU Classpath is a project to create core class libraries
276 for use with runtimes, compilers and tools for the Java programming
277 language.")
278 ;; GPLv2 or later, with special linking exception.
279 (license license:gpl2+)))
280
281 ;; This is the last version of JamVM that works with a version of GNU
282 ;; classpath that does not require ECJ.
283 (define jamvm-1-bootstrap
284 (package
285 (name "jamvm")
286 (version "1.5.1")
287 (source (origin
288 (method url-fetch)
289 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
290 "JamVM%20" version "/jamvm-"
291 version ".tar.gz"))
292 (patches (search-patches "jamvm-arm.patch"))
293 (sha256
294 (base32
295 "06lhi03l3b0h48pc7x58bk9my2nrcf1flpmglvys3wyad6yraf36"))
296 (snippet
297 '(begin
298 ;; Remove precompiled software.
299 (delete-file "lib/classes.zip")
300 #t))))
301 (build-system gnu-build-system)
302 (arguments
303 `(#:configure-flags
304 (list (string-append "--with-classpath-install-dir="
305 (assoc-ref %build-inputs "classpath"))
306 "--disable-int-caching"
307 "--enable-runtime-reloc-checks"
308 "--enable-ffi")))
309 (inputs
310 `(("classpath" ,classpath-bootstrap)
311 ("jikes" ,jikes)
312 ("libffi" ,libffi)
313 ("zip" ,zip)
314 ("zlib" ,zlib)))
315 (home-page "http://jamvm.sourceforge.net/")
316 (synopsis "Small Java Virtual Machine")
317 (description "JamVM is a Java Virtual Machine conforming to the JVM
318 specification edition 2 (blue book). It is extremely small. However, unlike
319 other small VMs it supports the full spec, including object finalisation and
320 JNI.")
321 (license license:gpl2+)))
322
323 (define ant-bootstrap
324 (package
325 (name "ant-bootstrap")
326 ;; The 1.10.x series requires Java 8. 1.9.0 and later use generics, which
327 ;; are not supported. The 1.8.x series is the last to use only features
328 ;; supported by Jikes.
329 (version "1.8.4")
330 (source (origin
331 (method url-fetch)
332 (uri (string-append "mirror://apache/"
333 "ant/source/apache-ant-"
334 version "-src.tar.bz2"))
335 (sha256
336 (base32
337 "1cg0lga887qz5iizh6mlkxp01lciymrhmp7wzxpl6zpnldxmzrjx"))))
338 (build-system gnu-build-system)
339 (arguments
340 `(#:imported-modules ((guix build syscalls)
341 ,@%gnu-build-system-modules)
342 #:modules ((srfi srfi-1)
343 (guix build gnu-build-system)
344 (guix build utils)
345 (guix build syscalls))
346 #:tests? #f ; no "check" target
347 #:phases
348 (modify-phases %standard-phases
349 (delete 'bootstrap)
350 (delete 'configure)
351 (replace 'build
352 (lambda* (#:key inputs #:allow-other-keys)
353 (setenv "JAVA_HOME" (assoc-ref inputs "jamvm"))
354 (setenv "JAVACMD"
355 (string-append (assoc-ref inputs "jamvm")
356 "/bin/jamvm"))
357 (setenv "JAVAC"
358 (string-append (assoc-ref inputs "jikes")
359 "/bin/jikes"))
360 (setenv "CLASSPATH"
361 (string-append (assoc-ref inputs "jamvm")
362 "/lib/rt.jar"))
363
364 ;; Ant complains if this file doesn't exist.
365 (setenv "HOME" "/tmp")
366 (with-output-to-file "/tmp/.ant.properties"
367 (lambda _ (display "")))
368
369 ;; Use jikes instead of javac for <javac ...> tags in build.xml
370 (setenv "ANT_OPTS" "-Dbuild.compiler=jikes")
371
372 ;; jikes produces lots of warnings, but they are not very
373 ;; interesting, so we silence them.
374 (setenv "$BOOTJAVAC_OPTS" "-nowarn")
375
376 ;; Without these JamVM options the build may freeze.
377 (substitute* "bootstrap.sh"
378 (("^\"\\$\\{JAVACMD\\}\" " m)
379 ,@(if (string-prefix? "armhf" (or (%current-system)
380 (%current-target-system)))
381 `((string-append m "-Xnocompact "))
382 `((string-append m "-Xnocompact -Xnoinlining ")))))
383
384 ;; Disable tests because we are bootstrapping and thus don't have
385 ;; any of the dependencies required to build and run the tests.
386 (substitute* "build.xml"
387 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
388 (invoke "bash" "bootstrap.sh"
389 (string-append "-Ddist.dir="
390 (assoc-ref %outputs "out")))))
391 (add-after 'build 'strip-jar-timestamps ;based on ant-build-system
392 (lambda* (#:key outputs #:allow-other-keys)
393 (define (repack-archive jar)
394 (let* ((dir (mkdtemp! "jar-contents.XXXXXX"))
395 (manifest (string-append dir "/META-INF/MANIFESTS.MF")))
396 (with-directory-excursion dir
397 (invoke "unzip" jar))
398 (delete-file jar)
399 ;; XXX: copied from (gnu build install)
400 (for-each (lambda (file)
401 (let ((s (lstat file)))
402 (unless (eq? (stat:type s) 'symlink)
403 (utime file 0 0 0 0))))
404 (find-files dir #:directories? #t))
405 ;; It is important that the manifest appears first.
406 (with-directory-excursion dir
407 (let* ((files (find-files "." ".*" #:directories? #t))
408 ;; To ensure that the reference scanner can
409 ;; detect all store references in the jars
410 ;; we disable compression with the "-0" option.
411 (command (if (file-exists? manifest)
412 `("zip" "-0" "-X" ,jar ,manifest
413 ,@files)
414 `("zip" "-0" "-X" ,jar ,@files))))
415 (apply invoke command)))))
416 (for-each repack-archive
417 (find-files
418 (string-append (assoc-ref %outputs "out") "/lib")
419 "\\.jar$"))
420 #t))
421 (delete 'install))))
422 (native-inputs
423 `(("jikes" ,jikes)
424 ("jamvm" ,jamvm-1-bootstrap)
425 ("unzip" ,unzip)
426 ("zip" ,zip)))
427 (home-page "https://ant.apache.org")
428 (synopsis "Build tool for Java")
429 (description
430 "Ant is a platform-independent build tool for Java. It is similar to
431 make but is implemented using the Java language, requires the Java platform,
432 and is best suited to building Java projects. Ant uses XML to describe the
433 build process and its dependencies, whereas Make uses Makefile format.")
434 (license license:asl2.0)))
435
436 ;; Version 3.2.2 is the last version without a dependency on a full-fledged
437 ;; compiler for Java 1.5.
438 (define ecj-bootstrap
439 (package
440 (name "ecj-bootstrap")
441 (version "3.2.2")
442 (source (origin
443 (method url-fetch)
444 (uri (string-append "http://archive.eclipse.org/eclipse/"
445 "downloads/drops/R-" version
446 "-200702121330/ecjsrc.zip"))
447 (sha256
448 (base32
449 "05hj82kxd23qaglsjkaqcj944riisjha7acf7h3ljhrjyljx8307"))))
450 ;; It would be so much easier if we could use the ant-build-system, but we
451 ;; cannot as we don't have ant at this point. We use ecj for
452 ;; bootstrapping the JDK.
453 (build-system gnu-build-system)
454 (arguments
455 `(#:modules ((guix build gnu-build-system)
456 (guix build utils)
457 (srfi srfi-1))
458 #:tests? #f ; there are no tests
459 #:phases
460 (modify-phases %standard-phases
461 (replace 'configure
462 (lambda* (#:key inputs #:allow-other-keys)
463 (setenv "CLASSPATH"
464 (string-join
465 (cons (string-append (assoc-ref inputs "jamvm")
466 "/lib/rt.jar")
467 (find-files (string-append
468 (assoc-ref inputs "ant-bootstrap")
469 "/lib")
470 "\\.jar$"))
471 ":"))
472 #t))
473 (replace 'build
474 (lambda* (#:key inputs #:allow-other-keys)
475 ;; The unpack phase enters the "org" directory by mistake.
476 (chdir "..")
477
478 ;; Create a simple manifest to make ecj executable.
479 (with-output-to-file "manifest"
480 (lambda _
481 (display "Manifest-Version: 1.0
482 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n")))
483
484 ;; Compile it all!
485 (and (apply invoke "jikes"
486 (find-files "." "\\.java$"))
487 (invoke "fastjar" "cvfm"
488 "ecj-bootstrap.jar" "manifest" "."))))
489 (replace 'install
490 (lambda* (#:key outputs #:allow-other-keys)
491 (let ((share (string-append (assoc-ref outputs "out")
492 "/share/java/")))
493 (mkdir-p share)
494 (install-file "ecj-bootstrap.jar" share)
495 #t))))))
496 (native-inputs
497 `(("ant-bootstrap" ,ant-bootstrap)
498 ("unzip" ,unzip)
499 ("jikes" ,jikes)
500 ("jamvm" ,jamvm-1-bootstrap)
501 ("fastjar" ,fastjar)))
502 (home-page "https://eclipse.org")
503 (synopsis "Eclipse Java development tools core batch compiler")
504 (description "This package provides the Eclipse Java core batch compiler
505 for bootstrapping purposes. The @dfn{Eclipse compiler for Java} (ecj) is a
506 requirement for all GNU Classpath releases after version 0.93.")
507 (license license:epl1.0)))
508
509 (define ecj-javac-wrapper
510 (package (inherit ecj-bootstrap)
511 (name "ecj-javac-wrapper")
512 (source #f)
513 (build-system trivial-build-system)
514 (arguments
515 `(#:modules ((guix build utils))
516 #:builder
517 (begin
518 (use-modules (guix build utils))
519 (let* ((bin (string-append (assoc-ref %outputs "out") "/bin"))
520 (target (string-append bin "/javac"))
521 (guile (string-append (assoc-ref %build-inputs "guile")
522 "/bin/guile"))
523 (ecj (string-append (assoc-ref %build-inputs "ecj-bootstrap")
524 "/share/java/ecj-bootstrap.jar"))
525 (java (string-append (assoc-ref %build-inputs "jamvm")
526 "/bin/jamvm"))
527 (bootcp (let ((jvmlib (string-append (assoc-ref %build-inputs "classpath")
528 "/share/classpath")))
529 (string-append jvmlib "/glibj.zip:"
530 jvmlib "/tools.zip"))))
531 (mkdir-p bin)
532 (with-output-to-file target
533 (lambda _
534 (format #t "#!~a --no-auto-compile\n!#\n" guile)
535 (write
536 `(begin (use-modules (ice-9 match)
537 (ice-9 receive)
538 (ice-9 hash-table)
539 (srfi srfi-1)
540 (srfi srfi-26))
541 (define defaults
542 '(("-bootclasspath" ,bootcp)
543 ("-source" "1.5")
544 ("-target" "1.5")
545 ("-cp" ".")))
546 (define (main args)
547 (let ((classpath (getenv "CLASSPATH")))
548 (setenv "CLASSPATH"
549 (string-join (list ,ecj
550 ,(string-append (assoc-ref %build-inputs "jamvm")
551 "/lib/rt.jar")
552 (or classpath ""))
553 ":")))
554 (receive (vm-args other-args)
555 ;; Separate VM arguments from arguments to ECJ.
556 (partition (cut string-prefix? "-J" <>)
557 (fold (lambda (default acc)
558 (if (member (first default) acc)
559 acc (append default acc)))
560 args defaults))
561 (apply system* ,java
562 (append
563 ;; Remove "-J" prefix
564 (map (cut string-drop <> 2) vm-args)
565 '("org.eclipse.jdt.internal.compiler.batch.Main")
566 (cons "-nowarn" other-args)))))
567 ;; Entry point
568 (let ((args (cdr (command-line))))
569 (if (null? args)
570 (format (current-error-port) "javac: no arguments given!\n")
571 (main args)))))))
572 (chmod target #o755)
573 #t))))
574 (native-inputs
575 `(("guile" ,guile-2.2)
576 ("ecj-bootstrap" ,ecj-bootstrap)
577 ("jamvm" ,jamvm-1-bootstrap)
578 ("classpath" ,classpath-bootstrap)))
579 (description "This package provides a wrapper around the @dfn{Eclipse
580 compiler for Java} (ecj) with a command line interface that is compatible with
581 the standard javac executable.")))
582
583 ;; The classpath-bootstrap was built without a virtual machine, so it does not
584 ;; provide a wrapper for javah. We cannot build the development version of
585 ;; Classpath without javah.
586 (define classpath-0.99
587 (package (inherit classpath-bootstrap)
588 (version "0.99")
589 (source (origin
590 (method url-fetch)
591 (uri (string-append "mirror://gnu/classpath/classpath-"
592 version ".tar.gz"))
593 (sha256
594 (base32
595 "1j7cby4k66f1nvckm48xcmh352b1d1b33qk7l6hi7dp9i9zjjagr"))
596 (patches (search-patches "classpath-aarch64-support.patch"))))
597 (arguments
598 `(#:configure-flags
599 (list (string-append "--with-ecj-jar="
600 (assoc-ref %build-inputs "ecj-bootstrap")
601 "/share/java/ecj-bootstrap.jar")
602 (string-append "JAVAC="
603 (assoc-ref %build-inputs "ecj-javac-wrapper")
604 "/bin/javac")
605 (string-append "JAVA="
606 (assoc-ref %build-inputs "jamvm")
607 "/bin/jamvm")
608 "GCJ_JAVAC_TRUE=no"
609 "ac_cv_prog_java_works=yes" ; trust me
610 "--disable-Werror"
611 "--disable-gmp"
612 "--disable-gtk-peer"
613 "--disable-gconf-peer"
614 "--disable-plugin"
615 "--disable-dssi"
616 "--disable-alsa"
617 "--disable-gjdoc")
618 #:phases
619 (modify-phases %standard-phases
620 (add-after 'install 'install-data
621 (lambda _ (invoke "make" "install-data"))))))
622 (native-inputs
623 `(("ecj-bootstrap" ,ecj-bootstrap)
624 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
625 ("fastjar" ,fastjar)
626 ("jamvm" ,jamvm-1-bootstrap)
627 ("classpath" ,classpath-bootstrap)
628 ("libltdl" ,libltdl)
629 ("pkg-config" ,pkg-config)))))
630
631 ;; We need this because classpath-bootstrap does not provide all of the tools
632 ;; we need to build classpath-devel.
633 (define classpath-jamvm-wrappers
634 (package (inherit classpath-0.99)
635 (name "classpath-jamvm-wrappers")
636 (source #f)
637 (build-system trivial-build-system)
638 (arguments
639 `(#:modules ((guix build utils))
640 #:builder
641 (begin
642 (use-modules (guix build utils))
643 (let* ((bash (assoc-ref %build-inputs "bash"))
644 (jamvm (assoc-ref %build-inputs "jamvm"))
645 (classpath (assoc-ref %build-inputs "classpath"))
646 (bin (string-append (assoc-ref %outputs "out")
647 "/bin/")))
648 (mkdir-p bin)
649 (for-each (lambda (tool)
650 (with-output-to-file (string-append bin tool)
651 (lambda _
652 ,@(if (string-prefix? "armhf" (or (%current-system)
653 (%current-target-system)))
654 `((format #t "#!~a/bin/sh
655 ~a/bin/jamvm -Xnocompact -classpath ~a/share/classpath/tools.zip \
656 gnu.classpath.tools.~a.~a $@"
657 bash jamvm classpath tool
658 (if (string=? "native2ascii" tool)
659 "Native2ASCII" "Main")))
660 `((format #t "#!~a/bin/sh
661 ~a/bin/jamvm -Xnocompact -Xnoinlining -classpath ~a/share/classpath/tools.zip \
662 gnu.classpath.tools.~a.~a $@"
663 bash jamvm classpath tool
664 (if (string=? "native2ascii" tool)
665 "Native2ASCII" "Main"))))))
666 (chmod (string-append bin tool) #o755))
667 (list "javah"
668 "rmic"
669 "rmid"
670 "orbd"
671 "rmiregistry"
672 "native2ascii"))
673 #t))))
674 (native-inputs
675 `(("bash" ,bash)
676 ("jamvm" ,jamvm-1-bootstrap)
677 ("classpath" ,classpath-0.99)))
678 (inputs '())
679 (synopsis "Executables from GNU Classpath")
680 (description "This package provides wrappers around the tools provided by
681 the GNU Classpath library. They are executed by the JamVM virtual
682 machine.")))
683
684 ;; The last release of GNU Classpath is 0.99 and it happened in 2012. Since
685 ;; then Classpath has gained much more support for Java 1.6.
686 (define-public classpath-devel
687 (let ((commit "e7c13ee0cf2005206fbec0eca677f8cf66d5a103")
688 (revision "1"))
689 (package (inherit classpath-bootstrap)
690 (version (string-append "0.99-" revision "." (string-take commit 9)))
691 (source (origin
692 (method git-fetch)
693 (uri (git-reference
694 (url "https://git.savannah.gnu.org/git/classpath.git")
695 (commit commit)))
696 (file-name (string-append "classpath-" version "-checkout"))
697 (sha256
698 (base32
699 "1v2rww76ww322mpg3s12a1kkc6gkp31bm9gcxs532h0wq285fiw4"))))
700 (arguments
701 `(#:make-flags
702 ;; Ensure that the initial heap size is smaller than the maximum
703 ;; size. By default only Xmx is set, which can lead to invalid
704 ;; memory settings on some machines with a lot of memory.
705 '("JAVAC_MEM_OPT=-J-Xms512M -J-Xmx768M")
706 #:configure-flags
707 (list (string-append "--with-ecj-jar="
708 (assoc-ref %build-inputs "ecj-bootstrap")
709 "/share/java/ecj-bootstrap.jar")
710 (string-append "--with-javac="
711 (assoc-ref %build-inputs "ecj-javac-wrapper")
712 "/bin/javac")
713 (string-append "JAVA="
714 (assoc-ref %build-inputs "jamvm")
715 "/bin/jamvm")
716 "GCJ_JAVAC_TRUE=no"
717 "ac_cv_prog_java_works=yes" ; trust me
718 "--disable-Werror"
719 "--disable-gmp"
720 "--disable-gtk-peer"
721 "--disable-gconf-peer"
722 "--disable-plugin"
723 "--disable-dssi"
724 "--disable-alsa"
725 "--disable-gjdoc")
726 #:phases
727 (modify-phases %standard-phases
728 ;; XXX The bootstrap phase executes autogen.sh, which fails after
729 ;; complaining about the lack of gettext.
730 (replace 'bootstrap
731 (lambda _ (invoke "autoreconf" "-vif")))
732 (add-after 'unpack 'remove-unsupported-annotations
733 (lambda _
734 (substitute* (find-files "java" "\\.java$")
735 (("@Override") ""))
736 #t))
737 (add-after 'install 'install-data
738 (lambda _ (invoke "make" "install-data"))))))
739 (native-inputs
740 `(("autoconf" ,autoconf)
741 ("automake" ,automake)
742 ("libtool" ,libtool)
743 ("gettext" ,gettext-minimal)
744 ("texinfo" ,texinfo)
745 ("classpath-jamvm-wrappers" ,classpath-jamvm-wrappers) ; for javah
746 ("ecj-bootstrap" ,ecj-bootstrap)
747 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
748 ("fastjar" ,fastjar)
749 ("jamvm" ,jamvm-1-bootstrap)
750 ("libltdl" ,libltdl)
751 ("pkg-config" ,pkg-config))))))
752
753 (define jamvm
754 (package (inherit jamvm-1-bootstrap)
755 (version "2.0.0")
756 (source (origin
757 (method url-fetch)
758 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
759 "JamVM%20" version "/jamvm-"
760 version ".tar.gz"))
761 (sha256
762 (base32
763 "1nl0zxz8y5x8gwsrm7n32bry4dx8x70p8z3s9jbdvs8avyb8whkn"))
764 (patches
765 (search-patches "jamvm-2.0.0-disable-branch-patching.patch"))
766 (snippet
767 '(begin
768 ;; Remove precompiled software.
769 (delete-file "src/classlib/gnuclasspath/lib/classes.zip")
770 #t))))
771 (build-system gnu-build-system)
772 (arguments
773 `(#:configure-flags
774 (list (string-append "--with-classpath-install-dir="
775 (assoc-ref %build-inputs "classpath")))))
776 (inputs
777 `(("classpath" ,classpath-devel)
778 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
779 ("zip" ,zip)
780 ("zlib" ,zlib)))))
781
782 (define ecj-javac-wrapper-final
783 (package (inherit ecj-javac-wrapper)
784 (native-inputs
785 `(("guile" ,guile-2.2)
786 ("ecj-bootstrap" ,ecj-bootstrap)
787 ("jamvm" ,jamvm)
788 ("classpath" ,classpath-devel)))))
789
790 ;; The bootstrap JDK consisting of jamvm, classpath-devel,
791 ;; ecj-javac-wrapper-final cannot build Icedtea 2.x directly, because it's
792 ;; written in Java 7. It can, however, build the unmaintained Icedtea 1.x,
793 ;; which uses Java 6 only.
794 (define-public icedtea-6
795 (package
796 (name "icedtea")
797 (version "1.13.13")
798 (source (origin
799 (method url-fetch)
800 (uri (string-append
801 "http://icedtea.wildebeest.org/download/source/icedtea6-"
802 version ".tar.xz"))
803 (sha256
804 (base32
805 "0bg9sb4f7qbq77c0zf9m17p47ga0kf0r9622g9p12ysg26jd1ksg"))
806 (modules '((guix build utils)))
807 (snippet
808 '(begin
809 (substitute* "Makefile.in"
810 ;; do not leak information about the build host
811 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
812 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
813 #t))))
814 (build-system gnu-build-system)
815 (outputs '("out" ; Java Runtime Environment
816 "jdk" ; Java Development Kit
817 "doc")) ; all documentation
818 (arguments
819 `(;; There are many failing tests and many are known to fail upstream.
820 #:tests? #f
821
822 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
823 ;; gremlin) doesn't support it yet, so skip this phase.
824 #:validate-runpath? #f
825
826 #:modules ((guix build utils)
827 (guix build gnu-build-system)
828 (srfi srfi-19))
829
830 #:configure-flags
831 `("--enable-bootstrap"
832 "--enable-nss"
833 "--without-rhino"
834 "--with-parallel-jobs"
835 "--disable-downloading"
836 "--disable-tests"
837 ,(string-append "--with-ecj="
838 (assoc-ref %build-inputs "ecj")
839 "/share/java/ecj-bootstrap.jar")
840 ,(string-append "--with-jar="
841 (assoc-ref %build-inputs "fastjar")
842 "/bin/fastjar")
843 ,(string-append "--with-jdk-home="
844 (assoc-ref %build-inputs "classpath"))
845 ,(string-append "--with-java="
846 (assoc-ref %build-inputs "jamvm")
847 "/bin/jamvm"))
848 #:phases
849 (modify-phases %standard-phases
850 (replace 'unpack
851 (lambda* (#:key source inputs #:allow-other-keys)
852 (invoke "tar" "xvf" source)
853 (chdir (string-append "icedtea6-" ,version))
854 (mkdir "openjdk")
855 (copy-recursively (assoc-ref inputs "openjdk-src") "openjdk")
856 ;; The convenient OpenJDK source bundle is no longer
857 ;; available for download, so we have to take the sources
858 ;; from the Mercurial repositories and change the Makefile
859 ;; to avoid tests for the OpenJDK zip archive.
860 (with-directory-excursion "openjdk"
861 (for-each (lambda (part)
862 (mkdir part)
863 (copy-recursively
864 (assoc-ref inputs
865 (string-append part "-src"))
866 part))
867 '("jdk" "corba"
868 "langtools" "jaxp" "jaxws")))
869 (with-directory-excursion "openjdk"
870 (invoke "tar" "xvf" (assoc-ref inputs "hotspot-src"))
871 (rename-file "hg-checkout" "hotspot"))
872 (substitute* "patches/freetypeversion.patch"
873 (("REQUIRED_FREETYPE_VERSION = 2.2.1")
874 "REQUIRED_FREETYPE_VERSION = 2.10.1"))
875 (substitute* "Makefile.in"
876 (("echo \"ERROR: No up-to-date OpenJDK zip available\"; exit -1;")
877 "echo \"trust me\";")
878 ;; The contents of the bootstrap directory must be
879 ;; writeable but when copying from the store they are
880 ;; not.
881 (("mkdir -p lib/rt" line)
882 (string-append line "; chmod -R u+w $(BOOT_DIR)")))
883 (invoke "chmod" "-R" "u+w" "openjdk")))
884 (add-after 'unpack 'use-classpath
885 (lambda* (#:key inputs #:allow-other-keys)
886 (let ((jvmlib (assoc-ref inputs "classpath"))
887 (jamvm (assoc-ref inputs "jamvm")))
888 ;; Classpath does not provide rt.jar.
889 (substitute* "Makefile.in"
890 (("\\$\\(SYSTEM_JDK_DIR\\)/jre/lib/rt.jar")
891 (string-append jvmlib "/share/classpath/glibj.zip")))
892 ;; Make sure we can find all classes.
893 (setenv "CLASSPATH"
894 (string-append jvmlib "/share/classpath/glibj.zip:"
895 jvmlib "/share/classpath/tools.zip:"
896 jamvm "/lib/rt.jar"))
897 (setenv "JAVACFLAGS"
898 (string-append "-cp "
899 jvmlib "/share/classpath/glibj.zip:"
900 jvmlib "/share/classpath/tools.zip")))
901 #t))
902 (add-after 'unpack 'patch-patches
903 (lambda _
904 ;; shebang in patches so that they apply cleanly
905 (substitute* '("patches/jtreg-jrunscript.patch"
906 "patches/hotspot/hs23/drop_unlicensed_test.patch")
907 (("#!/bin/sh") (string-append "#!" (which "sh"))))
908 #t))
909 (add-after 'unpack 'patch-paths
910 (lambda* (#:key inputs #:allow-other-keys)
911 ;; buildtree.make generates shell scripts, so we need to replace
912 ;; the generated shebang
913 (substitute* '("openjdk/hotspot/make/linux/makefiles/buildtree.make")
914 (("/bin/sh") (which "bash")))
915
916 (let ((corebin (string-append
917 (assoc-ref inputs "coreutils") "/bin/"))
918 (binbin (string-append
919 (assoc-ref inputs "binutils") "/bin/"))
920 (grepbin (string-append
921 (assoc-ref inputs "grep") "/bin/")))
922 (substitute* '("openjdk/jdk/make/common/shared/Defs-linux.gmk"
923 "openjdk/corba/make/common/shared/Defs-linux.gmk")
924 (("UNIXCOMMAND_PATH = /bin/")
925 (string-append "UNIXCOMMAND_PATH = " corebin))
926 (("USRBIN_PATH = /usr/bin/")
927 (string-append "USRBIN_PATH = " corebin))
928 (("DEVTOOLS_PATH *= */usr/bin/")
929 (string-append "DEVTOOLS_PATH = " corebin))
930 (("COMPILER_PATH *= */usr/bin/")
931 (string-append "COMPILER_PATH = "
932 (assoc-ref inputs "gcc") "/bin/"))
933 (("DEF_OBJCOPY *=.*objcopy")
934 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
935
936 ;; fix path to alsa header
937 (substitute* "openjdk/jdk/make/common/shared/Sanity.gmk"
938 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
939 (string-append "ALSA_INCLUDE="
940 (assoc-ref inputs "alsa-lib")
941 "/include/alsa/version.h")))
942
943 ;; fix hard-coded utility paths
944 (substitute* '("openjdk/jdk/make/common/shared/Defs-utils.gmk"
945 "openjdk/corba/make/common/shared/Defs-utils.gmk")
946 (("ECHO *=.*echo")
947 (string-append "ECHO = " (which "echo")))
948 (("^GREP *=.*grep")
949 (string-append "GREP = " (which "grep")))
950 (("EGREP *=.*egrep")
951 (string-append "EGREP = " (which "egrep")))
952 (("CPIO *=.*cpio")
953 (string-append "CPIO = " (which "cpio")))
954 (("READELF *=.*readelf")
955 (string-append "READELF = " (which "readelf")))
956 (("^ *AR *=.*ar")
957 (string-append "AR = " (which "ar")))
958 (("^ *TAR *=.*tar")
959 (string-append "TAR = " (which "tar")))
960 (("AS *=.*as")
961 (string-append "AS = " (which "as")))
962 (("LD *=.*ld")
963 (string-append "LD = " (which "ld")))
964 (("STRIP *=.*strip")
965 (string-append "STRIP = " (which "strip")))
966 (("NM *=.*nm")
967 (string-append "NM = " (which "nm")))
968 (("^SH *=.*sh")
969 (string-append "SH = " (which "bash")))
970 (("^FIND *=.*find")
971 (string-append "FIND = " (which "find")))
972 (("LDD *=.*ldd")
973 (string-append "LDD = " (which "ldd")))
974 (("NAWK *=.*(n|g)awk")
975 (string-append "NAWK = " (which "gawk")))
976 (("XARGS *=.*xargs")
977 (string-append "XARGS = " (which "xargs")))
978 (("UNZIP *=.*unzip")
979 (string-append "UNZIP = " (which "unzip")))
980 (("ZIPEXE *=.*zip")
981 (string-append "ZIPEXE = " (which "zip")))
982 (("SED *=.*sed")
983 (string-append "SED = " (which "sed"))))
984
985 ;; Some of these timestamps cause problems as they are more than
986 ;; 10 years ago, failing the build process.
987 (substitute*
988 "openjdk/jdk/src/share/classes/java/util/CurrencyData.properties"
989 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
990 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
991 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
992 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY"))
993 #t)))
994 (add-before 'configure 'set-additional-paths
995 (lambda* (#:key inputs #:allow-other-keys)
996 (setenv "CPATH"
997 (string-append (assoc-ref inputs "libxrender")
998 "/include/X11/extensions" ":"
999 (assoc-ref inputs "libxtst")
1000 "/include/X11/extensions" ":"
1001 (assoc-ref inputs "libxinerama")
1002 "/include/X11/extensions" ":"
1003 (or (getenv "CPATH") "")))
1004 (setenv "ALT_CUPS_HEADERS_PATH"
1005 (string-append (assoc-ref inputs "cups")
1006 "/include"))
1007 (setenv "ALT_FREETYPE_HEADERS_PATH"
1008 (string-append (assoc-ref inputs "freetype")
1009 "/include"))
1010 (setenv "ALT_FREETYPE_LIB_PATH"
1011 (string-append (assoc-ref inputs "freetype")
1012 "/lib"))
1013 #t))
1014 (add-before 'build 'disable-os-version-check
1015 ;; allow build on linux major version change
1016 (lambda _
1017 (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok")
1018 #t))
1019 (replace 'install
1020 (lambda* (#:key outputs #:allow-other-keys)
1021 (let ((doc (string-append (assoc-ref outputs "doc")
1022 "/share/doc/icedtea"))
1023 (jre (assoc-ref outputs "out"))
1024 (jdk (assoc-ref outputs "jdk")))
1025 (copy-recursively "openjdk.build/docs" doc)
1026 (copy-recursively "openjdk.build/j2re-image" jre)
1027 (copy-recursively "openjdk.build/j2sdk-image" jdk))
1028 #t)))))
1029 (native-inputs
1030 `(("ant" ,ant-bootstrap)
1031 ("alsa-lib" ,alsa-lib)
1032 ("attr" ,attr)
1033 ("classpath" ,classpath-devel)
1034 ("coreutils" ,coreutils)
1035 ("cpio" ,cpio)
1036 ("cups" ,cups)
1037 ("ecj" ,ecj-bootstrap)
1038 ("ecj-javac" ,ecj-javac-wrapper-final)
1039 ("fastjar" ,fastjar)
1040 ("fontconfig" ,fontconfig)
1041 ("freetype" ,freetype)
1042 ("gtk" ,gtk+-2)
1043 ("gawk" ,gawk)
1044 ("giflib" ,giflib)
1045 ("grep" ,grep)
1046 ("jamvm" ,jamvm)
1047 ("lcms" ,lcms)
1048 ("libjpeg" ,libjpeg-turbo)
1049 ("libnsl" ,libnsl)
1050 ("libpng" ,libpng)
1051 ("libtool" ,libtool)
1052 ("libx11" ,libx11)
1053 ("libxcomposite" ,libxcomposite)
1054 ("libxi" ,libxi)
1055 ("libxinerama" ,libxinerama)
1056 ("libxrender" ,libxrender)
1057 ("libxslt" ,libxslt) ;for xsltproc
1058 ("libxt" ,libxt)
1059 ("libxtst" ,libxtst)
1060 ("mit-krb5" ,mit-krb5)
1061 ("nss" ,nss)
1062 ("nss-certs" ,nss-certs)
1063 ("perl" ,perl)
1064 ("pkg-config" ,pkg-config)
1065 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
1066 ("unzip" ,unzip)
1067 ("wget" ,wget)
1068 ("which" ,which)
1069 ("zip" ,zip)
1070 ("zlib" ,zlib)
1071 ("openjdk-src"
1072 ,(origin
1073 (method hg-fetch)
1074 (uri (hg-reference
1075 (url "http://hg.openjdk.java.net/jdk6/jdk6/")
1076 (changeset "jdk6-b41")))
1077 (sha256
1078 (base32
1079 "14q47yfg586fs64w30g8mk92m5dkxsvr36zzh0ra99xk5x0x96mv"))))
1080 ("jdk-src"
1081 ,(origin
1082 (method hg-fetch)
1083 (uri (hg-reference
1084 (url "http://hg.openjdk.java.net/jdk6/jdk6/jdk/")
1085 (changeset "jdk6-b41")))
1086 (sha256
1087 (base32
1088 "165824nhg1k1dx6zs9dny0j49rmk35jw5b13dmz8c77jfajml4v9"))))
1089 ("hotspot-src"
1090 ,(origin
1091 (method hg-fetch)
1092 (uri (hg-reference
1093 (url "http://hg.openjdk.java.net/jdk6/jdk6/hotspot/")
1094 (changeset "jdk6-b41")))
1095 (sha256
1096 (base32
1097 "07lc1z4k5dj9nrc1wvwmpvxr3xgxrdkdh53xb95skk5ij49yagfd"))
1098 (patches
1099 (search-patches "icedtea-6-hotspot-gcc-segfault-workaround.patch"))))
1100 ("corba-src"
1101 ,(origin
1102 (method hg-fetch)
1103 (uri (hg-reference
1104 (url "http://hg.openjdk.java.net/jdk6/jdk6/corba/")
1105 (changeset "jdk6-b41")))
1106 (sha256
1107 (base32
1108 "1p9g1r9dnax2iwp7yb59qx7m4nmshqhwmrb2b8jj8zgbd9dl2i3q"))))
1109 ("langtools-src"
1110 ,(origin
1111 (method hg-fetch)
1112 (uri (hg-reference
1113 (url "http://hg.openjdk.java.net/jdk6/jdk6/langtools/")
1114 (changeset "jdk6-b41")))
1115 (sha256
1116 (base32
1117 "1x52wd67fynbbd9ild6fb4wvba3f5hhwk03qdjfazd0a1qr37z3d"))))
1118 ("jaxp-src"
1119 ,(origin
1120 (method hg-fetch)
1121 (uri (hg-reference
1122 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxp/")
1123 (changeset "jdk6-b41")))
1124 (sha256
1125 (base32
1126 "0shlqrvzpr4nrkmv215lbxnby63s3yvbdh1yxcayznsyqwa4nlxm"))))
1127 ("jaxws-src"
1128 ,(origin
1129 (method hg-fetch)
1130 (uri (hg-reference
1131 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxws/")
1132 (changeset "jdk6-b41")))
1133 (sha256
1134 (base32
1135 "0835lkw8vib1xhp8lxnybhlvzdh699hbi4mclxanydjk63zbpxk0"))))))
1136 (home-page "http://icedtea.classpath.org")
1137 (synopsis "Java development kit")
1138 (description
1139 "This package provides the OpenJDK built with the IcedTea build harness.
1140 This version of the OpenJDK is no longer maintained and is only used for
1141 bootstrapping purposes.")
1142 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1143 ;; same license as both GNU Classpath and OpenJDK.
1144 (license license:gpl2+)))
1145
1146 (define-public icedtea-7
1147 (let* ((version "2.6.13")
1148 (drop (lambda (name hash)
1149 (origin
1150 (method url-fetch)
1151 (uri (string-append
1152 "http://icedtea.classpath.org/download/drops"
1153 "/icedtea7/" version "/" name ".tar.bz2"))
1154 (sha256 (base32 hash))))))
1155 (package
1156 (name "icedtea")
1157 (version version)
1158 (source (origin
1159 (method url-fetch)
1160 (uri (string-append
1161 "http://icedtea.wildebeest.org/download/source/icedtea-"
1162 version ".tar.xz"))
1163 (sha256
1164 (base32
1165 "1w331rdqx1dcx2xb0fmjmrkdc71xqn20fxsgw8by4xhiblh88khh"))
1166 (modules '((guix build utils)))
1167 (snippet
1168 '(begin
1169 (substitute* "Makefile.in"
1170 ;; do not leak information about the build host
1171 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
1172 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
1173 #t))))
1174 (build-system gnu-build-system)
1175 (outputs '("out" ; Java Runtime Environment
1176 "jdk" ; Java Development Kit
1177 "doc")) ; all documentation
1178 (arguments
1179 `(;; There are many test failures. Some are known to
1180 ;; fail upstream, others relate to not having an X
1181 ;; server running at test time, yet others are a
1182 ;; complete mystery to me.
1183
1184 ;; hotspot: passed: 241; failed: 45; error: 2
1185 ;; langtools: passed: 1,934; failed: 26
1186 ;; jdk: unknown
1187 #:tests? #f
1188
1189 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
1190 ;; gremlin) doesn't support it yet, so skip this phase.
1191 #:validate-runpath? #f
1192
1193 ;; Apparently, the C locale is needed for some of the tests.
1194 #:locale "C"
1195
1196 #:modules ((guix build utils)
1197 (guix build gnu-build-system)
1198 (ice-9 match)
1199 (ice-9 popen)
1200 (srfi srfi-19)
1201 (srfi srfi-26))
1202
1203 #:configure-flags
1204 ;; TODO: package pcsc and sctp, and add to inputs
1205 `("--disable-system-pcsc"
1206 "--disable-system-sctp"
1207 "--enable-bootstrap"
1208 "--enable-nss"
1209 "--without-rhino"
1210 "--disable-downloading"
1211 "--disable-tests" ;they are run in the check phase instead
1212 "--with-openjdk-src-dir=./openjdk.src"
1213 ,(string-append "--with-jdk-home="
1214 (assoc-ref %build-inputs "jdk")))
1215
1216 #:phases
1217 (modify-phases %standard-phases
1218 (replace 'unpack
1219 (lambda* (#:key source inputs #:allow-other-keys)
1220 (let ((target (string-append "icedtea-" ,version))
1221 (unpack (lambda* (name #:optional dir)
1222 (let ((dir (or dir
1223 (string-drop-right name 5))))
1224 (mkdir dir)
1225 (invoke "tar" "xvf"
1226 (assoc-ref inputs name)
1227 "-C" dir
1228 "--strip-components=1")))))
1229 (mkdir target)
1230 (invoke "tar" "xvf" source
1231 "-C" target "--strip-components=1")
1232 (chdir target)
1233 (unpack "openjdk-src" "openjdk.src")
1234 (with-directory-excursion "openjdk.src"
1235 (for-each unpack
1236 (filter (cut string-suffix? "-drop" <>)
1237 (map (match-lambda
1238 ((name . _) name))
1239 inputs))))
1240 #t)))
1241 (add-after 'unpack 'patch-bitrot
1242 (lambda _
1243 (substitute* '("patches/boot/revert-6973616.patch"
1244 "openjdk.src/jdk/make/common/shared/Defs-versions.gmk")
1245 (("REQUIRED_FREETYPE_VERSION = 2.2.1")
1246 "REQUIRED_FREETYPE_VERSION = 2.10.1"))
1247 ;; As of attr 2.4.48 this header is no longer
1248 ;; included. It is provided by the libc instead.
1249 (substitute* '("configure"
1250 "openjdk.src/jdk/src/solaris/native/sun/nio/fs/LinuxNativeDispatcher.c")
1251 (("attr/xattr.h") "sys/xattr.h"))
1252 #t))
1253 (add-after 'unpack 'fix-x11-extension-include-path
1254 (lambda* (#:key inputs #:allow-other-keys)
1255 (substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk"
1256 (((string-append "\\$\\(firstword \\$\\(wildcard "
1257 "\\$\\(OPENWIN_HOME\\)"
1258 "/include/X11/extensions\\).*$"))
1259 (string-append (assoc-ref inputs "libxrender")
1260 "/include/X11/extensions"
1261 " -I" (assoc-ref inputs "libxtst")
1262 "/include/X11/extensions"
1263 " -I" (assoc-ref inputs "libxinerama")
1264 "/include/X11/extensions"))
1265 (("\\$\\(wildcard /usr/include/X11/extensions\\)\\)") ""))
1266 #t))
1267 (add-after 'unpack 'patch-paths
1268 (lambda _
1269 ;; buildtree.make generates shell scripts, so we need to replace
1270 ;; the generated shebang
1271 (substitute* '("openjdk.src/hotspot/make/linux/makefiles/buildtree.make")
1272 (("/bin/sh") (which "bash")))
1273
1274 (let ((corebin (string-append
1275 (assoc-ref %build-inputs "coreutils") "/bin/"))
1276 (binbin (string-append
1277 (assoc-ref %build-inputs "binutils") "/bin/"))
1278 (grepbin (string-append
1279 (assoc-ref %build-inputs "grep") "/bin/")))
1280 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-linux.gmk"
1281 "openjdk.src/corba/make/common/shared/Defs-linux.gmk")
1282 (("UNIXCOMMAND_PATH = /bin/")
1283 (string-append "UNIXCOMMAND_PATH = " corebin))
1284 (("USRBIN_PATH = /usr/bin/")
1285 (string-append "USRBIN_PATH = " corebin))
1286 (("DEVTOOLS_PATH *= */usr/bin/")
1287 (string-append "DEVTOOLS_PATH = " corebin))
1288 (("COMPILER_PATH *= */usr/bin/")
1289 (string-append "COMPILER_PATH = "
1290 (assoc-ref %build-inputs "gcc") "/bin/"))
1291 (("DEF_OBJCOPY *=.*objcopy")
1292 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
1293
1294 ;; fix path to alsa header
1295 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1296 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1297 (string-append "ALSA_INCLUDE="
1298 (assoc-ref %build-inputs "alsa-lib")
1299 "/include/alsa/version.h")))
1300
1301 ;; fix hard-coded utility paths
1302 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-utils.gmk"
1303 "openjdk.src/corba/make/common/shared/Defs-utils.gmk")
1304 (("ECHO *=.*echo")
1305 (string-append "ECHO = " (which "echo")))
1306 (("^GREP *=.*grep")
1307 (string-append "GREP = " (which "grep")))
1308 (("EGREP *=.*egrep")
1309 (string-append "EGREP = " (which "egrep")))
1310 (("CPIO *=.*cpio")
1311 (string-append "CPIO = " (which "cpio")))
1312 (("READELF *=.*readelf")
1313 (string-append "READELF = " (which "readelf")))
1314 (("^ *AR *=.*ar")
1315 (string-append "AR = " (which "ar")))
1316 (("^ *TAR *=.*tar")
1317 (string-append "TAR = " (which "tar")))
1318 (("AS *=.*as")
1319 (string-append "AS = " (which "as")))
1320 (("LD *=.*ld")
1321 (string-append "LD = " (which "ld")))
1322 (("STRIP *=.*strip")
1323 (string-append "STRIP = " (which "strip")))
1324 (("NM *=.*nm")
1325 (string-append "NM = " (which "nm")))
1326 (("^SH *=.*sh")
1327 (string-append "SH = " (which "bash")))
1328 (("^FIND *=.*find")
1329 (string-append "FIND = " (which "find")))
1330 (("LDD *=.*ldd")
1331 (string-append "LDD = " (which "ldd")))
1332 (("NAWK *=.*(n|g)awk")
1333 (string-append "NAWK = " (which "gawk")))
1334 (("XARGS *=.*xargs")
1335 (string-append "XARGS = " (which "xargs")))
1336 (("UNZIP *=.*unzip")
1337 (string-append "UNZIP = " (which "unzip")))
1338 (("ZIPEXE *=.*zip")
1339 (string-append "ZIPEXE = " (which "zip")))
1340 (("SED *=.*sed")
1341 (string-append "SED = " (which "sed"))))
1342
1343 ;; Some of these timestamps cause problems as they are more than
1344 ;; 10 years ago, failing the build process.
1345 (substitute*
1346 "openjdk.src/jdk/src/share/classes/java/util/CurrencyData.properties"
1347 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
1348 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
1349 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
1350 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY")))
1351 #t))
1352 (add-before 'configure 'set-additional-paths
1353 (lambda* (#:key inputs #:allow-other-keys)
1354 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1355 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1356 (string-append "ALSA_INCLUDE="
1357 (assoc-ref inputs "alsa-lib")
1358 "/include/alsa/version.h")))
1359 (setenv "CC" "gcc")
1360 (setenv "CPATH"
1361 (string-append (assoc-ref inputs "libxcomposite")
1362 "/include/X11/extensions" ":"
1363 (assoc-ref inputs "libxrender")
1364 "/include/X11/extensions" ":"
1365 (assoc-ref inputs "libxtst")
1366 "/include/X11/extensions" ":"
1367 (assoc-ref inputs "libxinerama")
1368 "/include/X11/extensions" ":"
1369 (or (getenv "CPATH") "")))
1370 (setenv "ALT_OBJCOPY" (which "objcopy"))
1371 (setenv "ALT_CUPS_HEADERS_PATH"
1372 (string-append (assoc-ref inputs "cups")
1373 "/include"))
1374 (setenv "ALT_FREETYPE_HEADERS_PATH"
1375 (string-append (assoc-ref inputs "freetype")
1376 "/include"))
1377 (setenv "ALT_FREETYPE_LIB_PATH"
1378 (string-append (assoc-ref inputs "freetype")
1379 "/lib"))
1380 #t))
1381 (add-before 'build 'disable-os-version-check
1382 ;; allow build on linux major version change
1383 (lambda _
1384 (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok")
1385 #t))
1386 (add-before 'check 'fix-test-framework
1387 (lambda _
1388 ;; Fix PATH in test environment
1389 (substitute* "test/jtreg/com/sun/javatest/regtest/Main.java"
1390 (("PATH=/bin:/usr/bin")
1391 (string-append "PATH=" (getenv "PATH"))))
1392 (substitute* "test/jtreg/com/sun/javatest/util/SysEnv.java"
1393 (("/usr/bin/env") (which "env")))
1394 (substitute* "openjdk.src/hotspot/test/test_env.sh"
1395 (("/bin/rm") (which "rm"))
1396 (("/bin/cp") (which "cp"))
1397 (("/bin/mv") (which "mv")))
1398 #t))
1399 (add-before 'check 'fix-hotspot-tests
1400 (lambda _
1401 (with-directory-excursion "openjdk.src/hotspot/test/"
1402 (substitute* "jprt.config"
1403 (("PATH=\"\\$\\{path4sdk\\}\"")
1404 (string-append "PATH=" (getenv "PATH")))
1405 (("make=/usr/bin/make")
1406 (string-append "make=" (which "make"))))
1407 (substitute* '("runtime/6626217/Test6626217.sh"
1408 "runtime/7110720/Test7110720.sh")
1409 (("/bin/rm") (which "rm"))
1410 (("/bin/cp") (which "cp"))
1411 (("/bin/mv") (which "mv"))))
1412 #t))
1413 (add-before 'check 'fix-jdk-tests
1414 (lambda _
1415 (with-directory-excursion "openjdk.src/jdk/test/"
1416 (substitute* "com/sun/jdi/JdbReadTwiceTest.sh"
1417 (("/bin/pwd") (which "pwd")))
1418 (substitute* "com/sun/jdi/ShellScaffold.sh"
1419 (("/bin/kill") (which "kill")))
1420 (substitute* "start-Xvfb.sh"
1421 ;;(("/usr/bin/X11/Xvfb") (which "Xvfb"))
1422 (("/usr/bin/nohup") (which "nohup")))
1423 (substitute* "javax/security/auth/Subject/doAs/Test.sh"
1424 (("/bin/rm") (which "rm")))
1425 (substitute* "tools/launcher/MultipleJRE.sh"
1426 (("echo \"#!/bin/sh\"")
1427 (string-append "echo \"#!" (which "rm") "\""))
1428 (("/usr/bin/zip") (which "zip")))
1429 (substitute* "com/sun/jdi/OnThrowTest.java"
1430 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1431 (substitute* "java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java"
1432 (("/usr/bin/uptime") (which "uptime")))
1433 (substitute* "java/lang/ProcessBuilder/Basic.java"
1434 (("/usr/bin/env") (which "env"))
1435 (("/bin/false") (which "false"))
1436 (("/bin/true") (which "true"))
1437 (("/bin/cp") (which "cp"))
1438 (("/bin/sh") (which "sh")))
1439 (substitute* "java/lang/ProcessBuilder/FeelingLucky.java"
1440 (("/bin/sh") (which "sh")))
1441 (substitute* "java/lang/ProcessBuilder/Zombies.java"
1442 (("/usr/bin/perl") (which "perl"))
1443 (("/bin/ps") (which "ps"))
1444 (("/bin/true") (which "true")))
1445 (substitute* "java/lang/Runtime/exec/ConcurrentRead.java"
1446 (("/usr/bin/tee") (which "tee")))
1447 (substitute* "java/lang/Runtime/exec/ExecWithDir.java"
1448 (("/bin/true") (which "true")))
1449 (substitute* "java/lang/Runtime/exec/ExecWithInput.java"
1450 (("/bin/cat") (which "cat")))
1451 (substitute* "java/lang/Runtime/exec/ExitValue.java"
1452 (("/bin/sh") (which "sh"))
1453 (("/bin/true") (which "true"))
1454 (("/bin/kill") (which "kill")))
1455 (substitute* "java/lang/Runtime/exec/LotsOfDestroys.java"
1456 (("/usr/bin/echo") (which "echo")))
1457 (substitute* "java/lang/Runtime/exec/LotsOfOutput.java"
1458 (("/usr/bin/cat") (which "cat")))
1459 (substitute* "java/lang/Runtime/exec/SleepyCat.java"
1460 (("/bin/cat") (which "cat"))
1461 (("/bin/sleep") (which "sleep"))
1462 (("/bin/sh") (which "sh")))
1463 (substitute* "java/lang/Runtime/exec/StreamsSurviveDestroy.java"
1464 (("/bin/cat") (which "cat")))
1465 (substitute* "java/rmi/activation/CommandEnvironment/SetChildEnv.java"
1466 (("/bin/chmod") (which "chmod")))
1467 (substitute* "java/util/zip/ZipFile/Assortment.java"
1468 (("/bin/sh") (which "sh"))))
1469 #t))
1470 (replace 'check
1471 (lambda _
1472 ;; The "make check-*" targets always return zero, so we need to
1473 ;; check for errors in the associated log files to determine
1474 ;; whether any tests have failed.
1475 (use-modules (ice-9 rdelim))
1476 (let* ((error-pattern (make-regexp "^(Error|FAILED):.*"))
1477 (checker (lambda (port)
1478 (let loop ()
1479 (let ((line (read-line port)))
1480 (cond
1481 ((eof-object? line) #t)
1482 ((regexp-exec error-pattern line)
1483 (error "test failed"))
1484 (else (loop)))))))
1485 (run-test (lambda (test)
1486 (invoke "make" test)
1487 (call-with-input-file
1488 (string-append "test/" test ".log")
1489 checker))))
1490 (when #f ; skip tests
1491 (run-test "check-hotspot")
1492 (run-test "check-langtools")
1493 (run-test "check-jdk"))
1494 #t)))
1495 (replace 'install
1496 (lambda* (#:key outputs #:allow-other-keys)
1497 (let ((doc (string-append (assoc-ref outputs "doc")
1498 "/share/doc/icedtea"))
1499 (jre (assoc-ref outputs "out"))
1500 (jdk (assoc-ref outputs "jdk")))
1501 (copy-recursively "openjdk.build/docs" doc)
1502 (copy-recursively "openjdk.build/j2re-image" jre)
1503 (copy-recursively "openjdk.build/j2sdk-image" jdk))
1504 #t))
1505 ;; Some of the libraries in the lib/amd64 folder link to libjvm.so.
1506 ;; But that shared object is located in the server/ folder, so it
1507 ;; cannot be found. This phase creates a symbolic link in the
1508 ;; lib/amd64 folder so that the other libraries can find it.
1509 ;;
1510 ;; See:
1511 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1512 ;;
1513 ;; FIXME: Find the bug in the build system, so that this symlink is
1514 ;; not needed.
1515 (add-after 'install 'install-libjvm
1516 (lambda* (#:key inputs outputs #:allow-other-keys)
1517 (let* ((lib-path (string-append (assoc-ref outputs "out")
1518 ;; See 'INSTALL_ARCH_DIR' in
1519 ;; 'configure'.
1520 ,(match (%current-system)
1521 ("i686-linux"
1522 "/lib/i386")
1523 ("x86_64-linux"
1524 "/lib/amd64")
1525 ("armhf-linux"
1526 "/lib/arm")
1527 ("aarch64-linux"
1528 "/lib/aarch64")
1529 ;; We need a catch-all, dropping
1530 ;; '-linux' works in most cases.
1531 (_
1532 (string-append
1533 "/lib/"
1534 (string-drop-right
1535 (%current-system) 6)))))))
1536 (symlink (string-append lib-path "/server/libjvm.so")
1537 (string-append lib-path "/libjvm.so")))
1538 #t))
1539 ;; By default IcedTea only generates an empty keystore. In order to
1540 ;; be able to use certificates in Java programs we need to generate a
1541 ;; keystore from a set of certificates. For convenience we use the
1542 ;; certificates from the nss-certs package.
1543 (add-after 'install 'install-keystore
1544 (lambda* (#:key inputs outputs #:allow-other-keys)
1545 (let* ((keystore "cacerts")
1546 (certs-dir (string-append (assoc-ref inputs "nss-certs")
1547 "/etc/ssl/certs"))
1548 (keytool (string-append (assoc-ref outputs "jdk")
1549 "/bin/keytool")))
1550 (define (extract-cert file target)
1551 (call-with-input-file file
1552 (lambda (in)
1553 (call-with-output-file target
1554 (lambda (out)
1555 (let loop ((line (read-line in 'concat))
1556 (copying? #f))
1557 (cond
1558 ((eof-object? line) #t)
1559 ((string-prefix? "-----BEGIN" line)
1560 (display line out)
1561 (loop (read-line in 'concat) #t))
1562 ((string-prefix? "-----END" line)
1563 (display line out)
1564 #t)
1565 (else
1566 (when copying? (display line out))
1567 (loop (read-line in 'concat) copying?)))))))))
1568 (define (import-cert cert)
1569 (format #t "Importing certificate ~a\n" (basename cert))
1570 (let ((temp "tmpcert"))
1571 (extract-cert cert temp)
1572 (let ((port (open-pipe* OPEN_WRITE keytool
1573 "-import"
1574 "-alias" (basename cert)
1575 "-keystore" keystore
1576 "-storepass" "changeit"
1577 "-file" temp)))
1578 (display "yes\n" port)
1579 (when (not (zero? (status:exit-val (close-pipe port))))
1580 (format #t "failed to import ~a\n" cert)))
1581 (delete-file temp)))
1582
1583 ;; This is necessary because the certificate directory contains
1584 ;; files with non-ASCII characters in their names.
1585 (setlocale LC_ALL "en_US.utf8")
1586 (setenv "LC_ALL" "en_US.utf8")
1587
1588 (for-each import-cert (find-files certs-dir "\\.pem$"))
1589 (mkdir-p (string-append (assoc-ref outputs "out")
1590 "/lib/security"))
1591 (mkdir-p (string-append (assoc-ref outputs "jdk")
1592 "/jre/lib/security"))
1593
1594 ;; The cacerts files we are going to overwrite are chmod'ed as
1595 ;; read-only (444) in icedtea-8 (which derives from this
1596 ;; package). We have to change this so we can overwrite them.
1597 (chmod (string-append (assoc-ref outputs "out")
1598 "/lib/security/" keystore) #o644)
1599 (chmod (string-append (assoc-ref outputs "jdk")
1600 "/jre/lib/security/" keystore) #o644)
1601
1602 (install-file keystore
1603 (string-append (assoc-ref outputs "out")
1604 "/lib/security"))
1605 (install-file keystore
1606 (string-append (assoc-ref outputs "jdk")
1607 "/jre/lib/security"))
1608 #t))))))
1609 (native-inputs
1610 `(("openjdk-src"
1611 ,(drop "openjdk"
1612 "0l34ikyf62hbzlf9032alzkkqvf7bpmckz4gvirvph755w7gka8l"))
1613 ("corba-drop"
1614 ,(drop "corba"
1615 "050gv2jbg1pi6qkn8w18bwpbklfa5b0kymjvan9pncddbj8m84fz"))
1616 ("jaxp-drop"
1617 ,(drop "jaxp"
1618 "1k6yldwnxfzdg5926r1nlfv8d1r1j7rlp2nkz6gqh05vgyamnfhl"))
1619 ("jaxws-drop"
1620 ,(drop "jaxws"
1621 "110j7jlz47x2gg6f7653x12mssan5kvj9l9h1m1c8c92drfxbqyk"))
1622 ("jdk-drop"
1623 ,(drop "jdk"
1624 "0d1mca38ksxvdskp9im3pp7fdijhj1n3lwq9w13r9s4v3qyskgdd"))
1625 ("langtools-drop"
1626 ,(drop "langtools"
1627 "0nq5236fzxn3p6x8cgncl56mzcmsj07q9gymysnws4c8byc6n0qj"))
1628 ("hotspot-drop"
1629 ,(origin
1630 (method url-fetch)
1631 (uri (string-append
1632 "http://icedtea.classpath.org/downloads/drops"
1633 "/icedtea7/" version "/hotspot.tar.bz2"))
1634 (sha256
1635 (base32
1636 "17bdv39n4lh8l5737c96f3xgamx4y305m067p01cywgp7zaddqws"))
1637 (patches (search-patches
1638 "icedtea-7-hotspot-gcc-segfault-workaround.patch"))))
1639 ("ant" ,ant-bootstrap)
1640 ("attr" ,attr)
1641 ("coreutils" ,coreutils)
1642 ("diffutils" ,diffutils) ;for tests
1643 ("gawk" ,gawk)
1644 ("grep" ,grep)
1645 ("libtool" ,libtool)
1646 ("pkg-config" ,pkg-config)
1647 ("wget" ,wget)
1648 ("which" ,which)
1649 ("cpio" ,cpio)
1650 ("zip" ,zip)
1651 ("unzip" ,unzip)
1652 ("fastjar" ,fastjar)
1653 ("libxslt" ,libxslt) ;for xsltproc
1654 ("nss-certs" ,nss-certs)
1655 ("perl" ,perl)
1656 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
1657 ("jdk" ,icedtea-6 "jdk")))
1658 (inputs
1659 `(("alsa-lib" ,alsa-lib)
1660 ("cups" ,cups)
1661 ("libx11" ,libx11)
1662 ("libxcomposite" ,libxcomposite)
1663 ("libxt" ,libxt)
1664 ("libxtst" ,libxtst)
1665 ("libxi" ,libxi)
1666 ("libxinerama" ,libxinerama)
1667 ("libxrender" ,libxrender)
1668 ("libjpeg" ,libjpeg-turbo)
1669 ("libpng" ,libpng)
1670 ("mit-krb5" ,mit-krb5)
1671 ("nss" ,nss)
1672 ("giflib" ,giflib)
1673 ("fontconfig" ,fontconfig)
1674 ("freetype" ,freetype)
1675 ("lcms" ,lcms)
1676 ("zlib" ,zlib)
1677 ("gtk" ,gtk+-2)))
1678 (home-page "http://icedtea.classpath.org")
1679 (synopsis "Java development kit")
1680 (description
1681 "This package provides the Java development kit OpenJDK built with the
1682 IcedTea build harness.")
1683
1684 ;; 'configure' lists "mips" and "mipsel", but not "mips64el'.
1685 (supported-systems (delete "mips64el-linux" %supported-systems))
1686
1687 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1688 ;; same license as both GNU Classpath and OpenJDK.
1689 (license license:gpl2+))))
1690
1691 (define-public icedtea-8
1692 (let* ((version "3.7.0")
1693 (drop (lambda (name hash)
1694 (origin
1695 (method url-fetch)
1696 (uri (string-append
1697 "http://icedtea.classpath.org/download/drops"
1698 "/icedtea8/" version "/" name ".tar.xz"))
1699 (sha256 (base32 hash))))))
1700 (package (inherit icedtea-7)
1701 (version "3.7.0")
1702 (source (origin
1703 (method url-fetch)
1704 (uri (string-append
1705 "http://icedtea.wildebeest.org/download/source/icedtea-"
1706 version ".tar.xz"))
1707 (sha256
1708 (base32
1709 "09yqzn8rpccs7cyv89hhy5zlznpgqw5x3jz0w1ccp0cz1vgs8l5w"))
1710 (modules '((guix build utils)))
1711 (snippet
1712 '(begin
1713 (substitute* '("configure"
1714 "acinclude.m4")
1715 ;; Do not embed build time
1716 (("(DIST_ID=\"Custom build).*$" _ prefix)
1717 (string-append prefix "\"\n"))
1718 ;; Do not leak information about the build host
1719 (("DIST_NAME=\"\\$build_os\"")
1720 "DIST_NAME=\"guix\""))
1721 #t))))
1722 (arguments
1723 `(#:imported-modules
1724 ((guix build ant-build-system)
1725 (guix build syscalls)
1726 ,@%gnu-build-system-modules)
1727 ,@(substitute-keyword-arguments (package-arguments icedtea-7)
1728 ((#:modules modules)
1729 `((guix build utils)
1730 (guix build gnu-build-system)
1731 ((guix build ant-build-system) #:prefix ant:)
1732 (ice-9 match)
1733 (ice-9 popen)
1734 (srfi srfi-19)
1735 (srfi srfi-26)))
1736 ((#:configure-flags flags)
1737 `(let ((jdk (assoc-ref %build-inputs "jdk")))
1738 `( ;;"--disable-bootstrap"
1739 "--enable-bootstrap"
1740 "--enable-nss"
1741 "--disable-downloading"
1742 "--disable-system-pcsc"
1743 "--disable-system-sctp"
1744 "--disable-tests" ;they are run in the check phase instead
1745 "--with-openjdk-src-dir=./openjdk.src"
1746 ,(string-append "--with-jdk-home=" jdk))))
1747 ((#:phases phases)
1748 `(modify-phases ,phases
1749 (delete 'fix-x11-extension-include-path)
1750 (delete 'patch-paths)
1751 (delete 'set-additional-paths)
1752 (delete 'patch-patches)
1753 (delete 'patch-bitrot)
1754 ;; Prevent the keytool from recording the current time when
1755 ;; adding certificates at build time.
1756 (add-after 'unpack 'patch-keystore
1757 (lambda _
1758 (substitute* "openjdk.src/jdk/src/share/classes/sun/security/provider/JavaKeyStore.java"
1759 (("date = new Date\\(\\);")
1760 "\
1761 date = (System.getenv(\"SOURCE_DATE_EPOCH\") != null) ?\
1762 new Date(Long.parseLong(System.getenv(\"SOURCE_DATE_EPOCH\"))) :\
1763 new Date();"))
1764 #t))
1765 (add-after 'unpack 'patch-jni-libs
1766 ;; Hardcode dynamically loaded libraries.
1767 (lambda _
1768 (let* ((library-path (search-path-as-string->list
1769 (getenv "LIBRARY_PATH")))
1770 (find-library (lambda (name)
1771 (search-path
1772 library-path
1773 (string-append "lib" name ".so")))))
1774 (for-each
1775 (lambda (file)
1776 (catch 'decoding-error
1777 (lambda ()
1778 (substitute* file
1779 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
1780 _ name version)
1781 (format #f "\"~a\"" (find-library name)))
1782 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
1783 (format #f "\"~a\"" (find-library name)))))
1784 (lambda _
1785 ;; Those are safe to skip.
1786 (format (current-error-port)
1787 "warning: failed to substitute: ~a~%"
1788 file))))
1789 (find-files "openjdk.src/jdk/src/solaris/native"
1790 "\\.c|\\.h"))
1791 #t)))
1792 (replace 'install
1793 (lambda* (#:key outputs #:allow-other-keys)
1794 (let ((doc (string-append (assoc-ref outputs "doc")
1795 "/share/doc/icedtea"))
1796 (jre (assoc-ref outputs "out"))
1797 (jdk (assoc-ref outputs "jdk")))
1798 (copy-recursively "openjdk.build/docs" doc)
1799 (copy-recursively "openjdk.build/images/j2re-image" jre)
1800 (copy-recursively "openjdk.build/images/j2sdk-image" jdk)
1801 ;; Install the nss.cfg file to JRE to enable SSL/TLS
1802 ;; support via NSS.
1803 (copy-file (string-append jdk "/jre/lib/security/nss.cfg")
1804 (string-append jre "/lib/security/nss.cfg"))
1805 #t)))
1806 (add-after 'install 'strip-jar-timestamps
1807 (assoc-ref ant:%standard-phases 'strip-jar-timestamps)))))))
1808 (native-inputs
1809 `(("jdk" ,icedtea-7 "jdk")
1810 ("openjdk-src"
1811 ,(drop "openjdk"
1812 "1mj6xgmw31i6qd30qi9dmv7160fbcfq5ikz1jwjihdg2793il19p"))
1813 ("aarch32-drop"
1814 ,(drop "aarch32"
1815 "1wb8k5zm40zld0986dvmlh5xh3gyixbg9h26sl662zy92amhmyyg"))
1816 ("corba-drop"
1817 ,(drop "corba"
1818 "11ma4zz0599cy70xd219v7a8vin7p96xrhhz3wsaw6cjhkzpagah"))
1819 ("jaxp-drop"
1820 ,(drop "jaxp"
1821 "14m1y0z0fbm5z5zjw3vnq85py8dma84bi3f9cw8rhdyc6skk8q4i"))
1822 ("jaxws-drop"
1823 ,(drop "jaxws"
1824 "09andnm6xaasnp963hgx42yiflifiljp9z7z85jrfyc5z8a5whmf"))
1825 ("jdk-drop"
1826 ,(drop "jdk"
1827 "0s6lcpc0zckz2fnq98aqf28nz9y3wbi41a3kyaqqa2abwbkm1zwl"))
1828 ("langtools-drop"
1829 ,(drop "langtools"
1830 "15wizy123vhk40chl1b4p552jf2pw2hdww0myf11qab425axz4nw"))
1831 ("hotspot-drop"
1832 ,(origin
1833 (method url-fetch)
1834 (uri (string-append
1835 "http://icedtea.classpath.org/download/drops"
1836 "/icedtea8/" version "/hotspot.tar.xz"))
1837 (sha256
1838 (base32
1839 "1ciz1w9j0kz7s1dxdhyqq71nla9icyz6qvn0b9z2zgkklqa98qmm"))
1840 (patches (search-patches
1841 "icedtea-7-hotspot-gcc-segfault-workaround.patch"))))
1842 ("nashorn-drop"
1843 ,(drop "nashorn"
1844 "19pzl3ppaw8j6r5cnyp8qiw3hxijh3hdc46l39g5yfhdl4pr4hpa"))
1845 ("shenandoah-drop"
1846 ,(drop "shenandoah"
1847 "0k33anxdzw1icn072wynfmmdjhsv50hay0j1sfkfxny12rb3vgdy"))
1848 ,@(fold alist-delete (package-native-inputs icedtea-7)
1849 '("jdk" "openjdk-src" "corba-drop" "jaxp-drop" "jaxws-drop"
1850 "jdk-drop" "langtools-drop" "hotspot-drop")))))))
1851
1852 (define-public openjdk9
1853 (package
1854 (name "openjdk")
1855 (version "9.181")
1856 (source (origin
1857 (method url-fetch)
1858 (uri "https://hg.openjdk.java.net/jdk/jdk/archive/3cc80be736f2.tar.bz2")
1859 (file-name (string-append name "-" version ".tar.bz2"))
1860 (sha256
1861 (base32
1862 "01ihmyf7k5z17wbr7xig7y40l9f01d5zjgkcmawn1102hw5kchpq"))
1863 (modules '((guix build utils)))
1864 (snippet
1865 `(begin
1866 (for-each delete-file
1867 (find-files "." ".*.(bin|exe|jar)$"))
1868 #t))))
1869 (build-system gnu-build-system)
1870 (outputs '("out" "jdk" "doc"))
1871 (arguments
1872 `(#:tests? #f; require jtreg
1873 #:make-flags '("all")
1874 #:imported-modules
1875 ((guix build syscalls)
1876 ,@%gnu-build-system-modules)
1877 #:phases
1878 (modify-phases %standard-phases
1879 (add-after 'patch-source-shebangs 'fix-java-shebangs
1880 (lambda _
1881 ;; This file was "fixed" by patch-source-shebangs, but it requires
1882 ;; this exact first line.
1883 (substitute* "jdk/make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1884 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
1885 #t))
1886 (replace 'configure
1887 (lambda* (#:key inputs outputs #:allow-other-keys)
1888 ;; TODO: unbundle libpng and lcms
1889 (invoke "bash" "./configure"
1890 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
1891 "--disable-freetype-bundling"
1892 "--disable-warnings-as-errors"
1893 "--disable-hotspot-gtest"
1894 "--with-giflib=system"
1895 "--with-libjpeg=system"
1896 (string-append "--prefix=" (assoc-ref outputs "out")))
1897 #t))
1898 (add-before 'build 'write-source-revision-file
1899 (lambda _
1900 (with-output-to-file ".src-rev"
1901 (lambda _
1902 (display ,version)))
1903 #t))
1904 (replace 'build
1905 (lambda* (#:key make-flags parallel-build? #:allow-other-keys)
1906 (apply invoke "make"
1907 `(,@(if parallel-build?
1908 (list (string-append "JOBS="
1909 (number->string (parallel-job-count))))
1910 '())
1911 ,@make-flags))))
1912 ;; Some of the libraries in the lib/ folder link to libjvm.so.
1913 ;; But that shared object is located in the server/ folder, so it
1914 ;; cannot be found. This phase creates a symbolic link in the
1915 ;; lib/ folder so that the other libraries can find it.
1916 ;;
1917 ;; See:
1918 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1919 ;;
1920 ;; FIXME: Find the bug in the build system, so that this symlink is
1921 ;; not needed.
1922 (add-after 'install 'install-libjvm
1923 (lambda* (#:key inputs outputs #:allow-other-keys)
1924 (let* ((lib-out (string-append (assoc-ref outputs "out")
1925 "/lib"))
1926 (lib-jdk (string-append (assoc-ref outputs "jdk")
1927 "/lib")))
1928 (symlink (string-append lib-jdk "/server/libjvm.so")
1929 (string-append lib-jdk "/libjvm.so"))
1930 (symlink (string-append lib-out "/server/libjvm.so")
1931 (string-append lib-out "/libjvm.so")))
1932 #t))
1933 (replace 'install
1934 (lambda* (#:key outputs #:allow-other-keys)
1935 (let ((out (assoc-ref outputs "out"))
1936 (jdk (assoc-ref outputs "jdk"))
1937 (doc (assoc-ref outputs "doc"))
1938 (images (car (find-files "build" ".*-server-release"
1939 #:directories? #t))))
1940 (copy-recursively (string-append images "/images/jdk") jdk)
1941 (copy-recursively (string-append images "/images/jre") out)
1942 (copy-recursively (string-append images "/images/docs") doc))
1943 #t))
1944 (add-after 'install 'strip-zip-timestamps
1945 (lambda* (#:key outputs #:allow-other-keys)
1946 (use-modules (guix build syscalls))
1947 (for-each (lambda (zip)
1948 (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
1949 (with-directory-excursion dir
1950 (invoke "unzip" zip))
1951 (delete-file zip)
1952 (for-each (lambda (file)
1953 (let ((s (lstat file)))
1954 (unless (eq? (stat:type s) 'symlink)
1955 (format #t "reset ~a~%" file)
1956 (utime file 0 0 0 0))))
1957 (find-files dir #:directories? #t))
1958 (with-directory-excursion dir
1959 (let ((files (find-files "." ".*" #:directories? #t)))
1960 (apply invoke "zip" "-0" "-X" zip files)))))
1961 (find-files (assoc-ref outputs "doc") ".*.zip$"))
1962 #t)))))
1963 (inputs
1964 `(("alsa-lib" ,alsa-lib)
1965 ("cups" ,cups)
1966 ("fontconfig" ,fontconfig)
1967 ("freetype" ,freetype)
1968 ("giflib" ,giflib)
1969 ("lcms" ,lcms)
1970 ("libelf" ,libelf)
1971 ("libjpeg" ,libjpeg-turbo)
1972 ("libice" ,libice)
1973 ("libpng" ,libpng)
1974 ("libx11" ,libx11)
1975 ("libxcomposite" ,libxcomposite)
1976 ("libxi" ,libxi)
1977 ("libxinerama" ,libxinerama)
1978 ("libxrender" ,libxrender)
1979 ("libxt" ,libxt)
1980 ("libxtst" ,libxtst)))
1981 (native-inputs
1982 `(("icedtea-8" ,icedtea-8)
1983 ("icedtea-8:jdk" ,icedtea-8 "jdk")
1984 ;; XXX: The build system fails with newer versions of GNU Make.
1985 ("make@4.2" ,gnu-make-4.2)
1986 ("unzip" ,unzip)
1987 ("which" ,which)
1988 ("zip" ,zip)))
1989 (home-page "https://openjdk.java.net/projects/jdk9/")
1990 (synopsis "Java development kit")
1991 (description
1992 "This package provides the Java development kit OpenJDK.")
1993 (license license:gpl2+)))
1994
1995 (define-public openjdk10
1996 (package
1997 (inherit openjdk9)
1998 (name "openjdk")
1999 (version "10.46")
2000 (source (origin
2001 (method url-fetch)
2002 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/6fa770f9f8ab.tar.bz2")
2003 (file-name (string-append name "-" version ".tar.bz2"))
2004 (sha256
2005 (base32
2006 "0zywq2203b4hx4jms9vbwvjcj1d3k2v3qpx4s33729fkpmid97r4"))
2007 (patches (search-patches
2008 "openjdk-10-idlj-reproducibility.patch"))
2009 (modules '((guix build utils)))
2010 (snippet
2011 `(begin
2012 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2013 #t))))
2014 (arguments
2015 (substitute-keyword-arguments (package-arguments openjdk9)
2016 ((#:phases phases)
2017 `(modify-phases ,phases
2018 (replace 'fix-java-shebangs
2019 (lambda _
2020 ;; This file was "fixed" by patch-source-shebangs, but it requires
2021 ;; this exact first line.
2022 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
2023 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
2024 #t))
2025 (replace 'configure
2026 (lambda* (#:key inputs outputs #:allow-other-keys)
2027 (invoke "bash" "./configure"
2028 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
2029 "--disable-freetype-bundling"
2030 "--disable-warnings-as-errors"
2031 "--disable-hotspot-gtest"
2032 "--with-giflib=system"
2033 "--with-libjpeg=system"
2034 "--with-native-debug-symbols=zipped"
2035 (string-append "--prefix=" (assoc-ref outputs "out")))
2036 #t))))))
2037 (native-inputs
2038 `(("openjdk9" ,openjdk9)
2039 ("openjdk9:jdk" ,openjdk9 "jdk")
2040 ("make@4.2" ,gnu-make-4.2)
2041 ("unzip" ,unzip)
2042 ("which" ,which)
2043 ("zip" ,zip)))))
2044
2045 (define-public openjdk11
2046 (package
2047 (name "openjdk")
2048 (version "11.28")
2049 (source (origin
2050 (method url-fetch)
2051 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/76072a077ee1.tar.bz2")
2052 (file-name (string-append name "-" version ".tar.bz2"))
2053 (sha256
2054 (base32
2055 "0v705w1s9lrqalzahir78pk397rkk9gfvzq821yv8h3xha0bqi6w"))
2056 (modules '((guix build utils)))
2057 (snippet
2058 `(begin
2059 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2060 #t))))
2061 (build-system gnu-build-system)
2062 (outputs '("out" "jdk" "doc"))
2063 (arguments
2064 `(#:imported-modules
2065 ((guix build syscalls)
2066 (ice-9 binary-ports)
2067 (rnrs bytevectors)
2068 ,@%gnu-build-system-modules)
2069 #:tests? #f; requires jtreg
2070 ;; TODO package jtreg
2071 #:configure-flags
2072 `("--disable-option-checking" ; --enable-fast-install default flag errors otherwise
2073 "--disable-warnings-as-errors"
2074 ;; make validate-runpath pass, see: http://issues.guix.info/issue/32894
2075 "--with-native-debug-symbols=zipped"
2076 ;; do not use the bundled libraries
2077 "--with-giflib=system"
2078 "--with-lcms=system"
2079 "--with-libjpeg=system"
2080 "--with-libpng=system"
2081 "--with-version-pre="
2082 ;; allow the build system to locate the system freetype
2083 ,(string-append "--with-freetype-include="
2084 (assoc-ref %build-inputs "freetype") "/include")
2085 ,(string-append "--with-freetype-lib="
2086 (assoc-ref %build-inputs "freetype") "/lib"))
2087 #:phases
2088 (modify-phases %standard-phases
2089 (add-after 'patch-source-shebangs 'fix-java-shebangs
2090 (lambda _
2091 ;; This file was "fixed" by patch-source-shebangs, but it requires
2092 ;; this exact first line.
2093 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
2094 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
2095 #t))
2096 (add-before 'build 'write-source-revision-file
2097 (lambda _
2098 (with-output-to-file ".src-rev"
2099 (lambda _
2100 (display ,version)))
2101 #t))
2102 (replace 'build
2103 (lambda* (#:key parallel-build? make-flags #:allow-other-keys)
2104 (apply invoke "make" "all"
2105 `(,@(if parallel-build?
2106 (list (string-append "JOBS="
2107 (number->string (parallel-job-count))))
2108 '())
2109 ,@make-flags))))
2110 ;; jdk 11 does not build jre by default any more
2111 ;; building it anyways
2112 ;; for further information see:
2113 ;; https://github.com/AdoptOpenJDK/openjdk-build/issues/356
2114 (add-after 'build 'build-jre
2115 (lambda* (#:key parallel-build? make-flags #:allow-other-keys)
2116 (apply invoke "make" "legacy-jre-image"
2117 `(,@(if parallel-build?
2118 (list (string-append "JOBS="
2119 (number->string (parallel-job-count))))
2120 '())
2121 ,@make-flags))))
2122 (replace 'install
2123 (lambda* (#:key outputs #:allow-other-keys)
2124 (let ((out (assoc-ref outputs "out"))
2125 (jdk (assoc-ref outputs "jdk"))
2126 (doc (assoc-ref outputs "doc"))
2127 (images (car (find-files "build" ".*-server-release"
2128 #:directories? #t))))
2129 (copy-recursively (string-append images "/images/jdk") jdk)
2130 (copy-recursively (string-append images "/images/jre") out)
2131 (copy-recursively (string-append images "/images/docs") doc))
2132 #t))
2133 ;; Some of the libraries in the lib/ folder link to libjvm.so.
2134 ;; But that shared object is located in the server/ folder, so it
2135 ;; cannot be found. This phase creates a symbolic link in the
2136 ;; lib/ folder so that the other libraries can find it.
2137 ;;
2138 ;; See:
2139 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
2140 ;;
2141 ;; FIXME: Find the bug in the build system, so that this symlink is
2142 ;; not needed.
2143 (add-after 'install 'install-libjvm
2144 (lambda* (#:key inputs outputs #:allow-other-keys)
2145 (let* ((lib-out (string-append (assoc-ref outputs "out")
2146 "/lib"))
2147 (lib-jdk (string-append (assoc-ref outputs "jdk")
2148 "/lib")))
2149 (symlink (string-append lib-jdk "/server/libjvm.so")
2150 (string-append lib-jdk "/libjvm.so"))
2151 (symlink (string-append lib-out "/server/libjvm.so")
2152 (string-append lib-out "/libjvm.so")))
2153 #t))
2154 (add-after 'install 'strip-character-data-timestamps
2155 (lambda* (#:key outputs #:allow-other-keys)
2156 (use-modules (guix build syscalls))
2157 (let ((archive (string-append
2158 (assoc-ref outputs "jdk") "/lib/src.zip"))
2159 (dir (mkdtemp! "zip-contents.XXXXXX")))
2160 (with-directory-excursion dir
2161 (invoke "unzip" archive))
2162 (delete-file archive)
2163 (with-directory-excursion dir
2164 (let ((char-data-files (find-files "." "CharacterData.*")))
2165 (for-each (lambda (file)
2166 (substitute* file
2167 (((string-append "This file was generated "
2168 "AUTOMATICALLY from a template "
2169 "file.*"))
2170 (string-append "This file was generated "
2171 "AUTOMATICALLY from a template "
2172 "file"))))
2173 char-data-files)))
2174 (with-directory-excursion dir
2175 (let ((files (find-files "." ".*" #:directories? #t)))
2176 (apply invoke "zip" "-0" "-X" archive files))))))
2177 (add-after 'strip-character-data-timestamps 'strip-archive-timestamps
2178 (lambda* (#:key outputs #:allow-other-keys)
2179 (use-modules (guix build syscalls)
2180 (ice-9 binary-ports)
2181 (rnrs bytevectors))
2182 (letrec ((repack-archive
2183 (lambda (archive)
2184 (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
2185 (with-directory-excursion dir
2186 (invoke "unzip" archive))
2187 (delete-file archive)
2188 (for-each (compose repack-archive canonicalize-path)
2189 (find-files dir "(ct.sym|.*.jar)$"))
2190 (let ((reset-file-timestamp
2191 (lambda (file)
2192 (let ((s (lstat file)))
2193 (unless (eq? (stat:type s) 'symlink)
2194 (format #t "reset ~a~%" file)
2195 (utime file 0 0 0 0))))))
2196 (for-each reset-file-timestamp
2197 (find-files dir #:directories? #t)))
2198 (with-directory-excursion dir
2199 (let ((files (find-files "." ".*" #:directories? #t)))
2200 (apply invoke "zip" "-0" "-X" archive files)))))))
2201 (for-each repack-archive
2202 (find-files (assoc-ref outputs "doc") ".*.zip$"))
2203 (for-each repack-archive
2204 (find-files (assoc-ref outputs "jdk")
2205 ".*.(zip|jar|diz)$"))
2206 (repack-archive (string-append (assoc-ref outputs "jdk") "/lib/ct.sym"))
2207 (let ((repack-jmod
2208 (lambda (file-name)
2209 (call-with-input-file file-name
2210 (lambda (file)
2211 (let ((header #vu8(#x4a #x4d #x01 #x00)))
2212 (if (equal? (get-bytevector-n
2213 file (bytevector-length header))
2214 header)
2215 (let* ((header-length (bytevector-length header))
2216 (temp-file (mkstemp!
2217 (string-copy
2218 "temp-file.XXXXXX")))
2219 (temp-filename (port-filename temp-file))
2220 (content-length
2221 (- (stat:size (stat file))
2222 header-length)))
2223 (sendfile temp-file file content-length header-length)
2224 (delete-file file-name)
2225 (close-port temp-file)
2226 (repack-archive (canonicalize-path temp-filename))
2227 (call-with-output-file file-name
2228 (lambda (file)
2229 (put-bytevector file header)
2230 (call-with-input-file temp-filename
2231 (lambda (temp-file)
2232 (sendfile
2233 file temp-file
2234 (stat:size (stat temp-file)) 0)))))))))))))
2235 (for-each repack-jmod
2236 (find-files (assoc-ref outputs "jdk") ".*.jmod$")))
2237 #t)))
2238 (add-after 'install 'remove-timestamp-from-api-summary
2239 (lambda* (#:key outputs #:allow-other-keys)
2240 (substitute* (string-append (assoc-ref outputs "doc")
2241 "/api/overview-summary.html")
2242 (("Generated by javadoc \\(11-internal\\).*$")
2243 "Generated by javadoc (11-internal) -->\n"))
2244 #t)))))
2245 (inputs
2246 `(("alsa-lib" ,alsa-lib)
2247 ("cups" ,cups)
2248 ("fontconfig" ,fontconfig)
2249 ("freetype" ,freetype)
2250 ("giflib" ,giflib)
2251 ("lcms" ,lcms)
2252 ("libjpeg" ,libjpeg-turbo)
2253 ("libpng" ,libpng)
2254 ("libx11" ,libx11)
2255 ("libxext" ,libxext)
2256 ("libxrender" ,libxrender)
2257 ("libxt" ,libxt)
2258 ("libxtst" ,libxtst)))
2259 (native-inputs
2260 `(("autoconf" ,autoconf)
2261 ("openjdk10" ,openjdk10)
2262 ("openjdk10:jdk" ,openjdk10 "jdk")
2263 ("make" ,gnu-make-4.2)
2264 ("pkg-config" ,pkg-config)
2265 ("unzip" ,unzip)
2266 ("which" ,which)
2267 ("zip" ,zip)))
2268 (home-page "https://openjdk.java.net/projects/jdk/11/")
2269 (synopsis "Java development kit")
2270 (description
2271 "This package provides the Java development kit OpenJDK.")
2272 (license license:gpl2+)))
2273
2274 (define-public openjdk12
2275 (package
2276 (inherit openjdk11)
2277 (name "openjdk")
2278 (version "12.33")
2279 (source (origin
2280 (method url-fetch)
2281 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/0276cba45aac.tar.bz2")
2282 (file-name (string-append name "-" version ".tar.bz2"))
2283 (sha256
2284 (base32
2285 "0mbhdrk12b6878kby0flnbak7444dlpm0ihlmf92vk59y1c02bc2"))
2286 (modules '((guix build utils)))
2287 (snippet
2288 `(begin
2289 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2290 #t))))
2291 (inputs
2292 `(("alsa-lib" ,alsa-lib)
2293 ("cups" ,cups)
2294 ("fontconfig" ,fontconfig)
2295 ("freetype" ,freetype)
2296 ("giflib" ,giflib)
2297 ("lcms" ,lcms)
2298 ("libjpeg" ,libjpeg-turbo)
2299 ("libpng" ,libpng)
2300 ("libx11" ,libx11)
2301 ("libxext" ,libxext)
2302 ("libxrandr" ,libxrandr)
2303 ("libxrender" ,libxrender)
2304 ("libxt" ,libxt)
2305 ("libxtst" ,libxtst)))
2306 (native-inputs
2307 `(("autoconf" ,autoconf)
2308 ("openjdk11" ,openjdk11)
2309 ("openjdk11:jdk" ,openjdk11 "jdk")
2310 ("make@4.2" ,gnu-make-4.2)
2311 ("pkg-config" ,pkg-config)
2312 ("unzip" ,unzip)
2313 ("which" ,which)
2314 ("zip" ,zip)))
2315 (home-page "https://openjdk.java.net/projects/jdk/12")))
2316
2317 (define-public openjdk13
2318 (package
2319 (inherit openjdk12)
2320 (name "openjdk")
2321 (version "13.0")
2322 (source (origin
2323 (method url-fetch)
2324 (uri "http://hg.openjdk.java.net/jdk/jdk13/archive/9c250a7600e1.tar.bz2")
2325 (file-name (string-append name "-" version ".tar.bz2"))
2326 (sha256
2327 (base32
2328 "0v0ljvx5dyzp96dw4z4ksw3pvasil7783mgnmd1wk9gads5ab8iq"))
2329 (modules '((guix build utils)))
2330 (snippet
2331 `(begin
2332 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2333 #t))))
2334 (inputs
2335 `(("alsa-lib" ,alsa-lib)
2336 ("cups" ,cups)
2337 ("fontconfig" ,fontconfig)
2338 ("freetype" ,freetype)
2339 ("giflib" ,giflib)
2340 ("lcms" ,lcms)
2341 ("libjpeg" ,libjpeg-turbo)
2342 ("libpng" ,libpng)
2343 ("libx11" ,libx11)
2344 ("libxext" ,libxext)
2345 ("libxrandr" ,libxrandr)
2346 ("libxrender" ,libxrender)
2347 ("libxt" ,libxt)
2348 ("libxtst" ,libxtst)))
2349 (native-inputs
2350 `(("autoconf" ,autoconf)
2351 ("openjdk12:jdk" ,openjdk12 "jdk")
2352 ("make@4.2" ,gnu-make-4.2)
2353 ("pkg-config" ,pkg-config)
2354 ("unzip" ,unzip)
2355 ("which" ,which)
2356 ("zip" ,zip)))
2357 (home-page "https://openjdk.java.net/projects/jdk/13")))
2358
2359 (define-public openjdk14
2360 (package
2361 (inherit openjdk13)
2362 (name "openjdk")
2363 (version "14.0")
2364 (source (origin
2365 (method url-fetch)
2366 (uri "http://hg.openjdk.java.net/jdk/jdk14/archive/bc54620a3848.tar.bz2")
2367 (file-name (string-append name "-" version ".tar.bz2"))
2368 (sha256
2369 (base32
2370 "0z485pk7r1xpw8004g4nrwrzj17sabgx8yfdbxwfvzkjp8qyajch"))
2371 (modules '((guix build utils)))
2372 (snippet
2373 `(begin
2374 ;; The m4 macro uses 'help' to search for builtins, which is
2375 ;; not available in bash-minimal
2376 (substitute* "make/autoconf/basics.m4"
2377 (("if help") "if command -v"))
2378 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2379 #t))))
2380 (inputs
2381 `(("alsa-lib" ,alsa-lib)
2382 ("cups" ,cups)
2383 ("fontconfig" ,fontconfig)
2384 ("freetype" ,freetype)
2385 ("giflib" ,giflib)
2386 ("lcms" ,lcms)
2387 ("libjpeg" ,libjpeg-turbo)
2388 ("libpng" ,libpng)
2389 ("libx11" ,libx11)
2390 ("libxext" ,libxext)
2391 ("libxrandr" ,libxrandr)
2392 ("libxrender" ,libxrender)
2393 ("libxt" ,libxt)
2394 ("libxtst" ,libxtst)))
2395 (native-inputs
2396 `(("autoconf" ,autoconf)
2397 ("make@4.2" ,gnu-make-4.2)
2398 ("openjdk13:jdk" ,openjdk13 "jdk")
2399 ("pkg-config" ,pkg-config)
2400 ("unzip" ,unzip)
2401 ("which" ,which)
2402 ("zip" ,zip)))
2403 (home-page "https://openjdk.java.net/projects/jdk/14")))
2404
2405 (define-public icedtea icedtea-8)
2406
2407 \f
2408 (define-public ant/java8
2409 (package (inherit ant-bootstrap)
2410 (name "ant")
2411 (version "1.10.1")
2412 (source (origin
2413 (method url-fetch)
2414 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2415 version "-src.tar.gz"))
2416 (sha256
2417 (base32
2418 "10p3dh77lkzzzcy32dk9azljixzadp46fggjfbvgkl8mmb8cxxv8"))
2419 (modules '((guix build utils)))
2420 (snippet
2421 '(begin
2422 (for-each delete-file
2423 (find-files "lib/optional" "\\.jar$"))
2424 #t))))
2425 (arguments
2426 (substitute-keyword-arguments (package-arguments ant-bootstrap)
2427 ((#:phases phases)
2428 `(modify-phases ,phases
2429 (add-after 'unpack 'remove-scripts
2430 ;; Remove bat / cmd scripts for DOS as well as the antRun and runant
2431 ;; wrappers.
2432 (lambda _
2433 (for-each delete-file
2434 (find-files "src/script"
2435 "(.*\\.(bat|cmd)|runant.*|antRun.*)"))
2436 #t))
2437 (replace 'build
2438 (lambda* (#:key inputs outputs #:allow-other-keys)
2439 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
2440
2441 ;; Disable tests to avoid dependency on hamcrest-core, which needs
2442 ;; Ant to build. This is necessary in addition to disabling the
2443 ;; "check" phase, because the dependency on "test-jar" would always
2444 ;; result in the tests to be run.
2445 (substitute* "build.xml"
2446 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
2447 (invoke "bash" "bootstrap.sh"
2448 (string-append "-Ddist.dir="
2449 (assoc-ref outputs "out")))))))))
2450 (native-inputs
2451 `(("jdk" ,icedtea-8 "jdk")
2452 ("zip" ,zip)
2453 ("unzip" ,unzip)))))
2454
2455 ;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x series
2456 ;; requires Java 8.
2457 (define-public ant
2458 (package (inherit ant/java8)
2459 (version "1.9.9")
2460 (source (origin
2461 (method url-fetch)
2462 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2463 version "-src.tar.gz"))
2464 (sha256
2465 (base32
2466 "1k28mka0m3isy9yr8gz84kz1f3f879rwaxrd44vdn9xbfwvwk86n"))))
2467 (native-inputs
2468 `(("jdk" ,icedtea-7 "jdk")
2469 ("zip" ,zip)
2470 ("unzip" ,unzip)))))
2471
2472 (define-public ant-apache-bcel
2473 (package
2474 (inherit ant/java8)
2475 (name "ant-apache-bcel")
2476 (arguments
2477 (substitute-keyword-arguments (package-arguments ant/java8)
2478 ((#:phases phases)
2479 `(modify-phases ,phases
2480 (add-after 'unpack 'link-bcel
2481 (lambda* (#:key inputs #:allow-other-keys)
2482 (for-each (lambda (file)
2483 (symlink file
2484 (string-append "lib/optional/"
2485 (basename file))))
2486 (find-files (assoc-ref inputs "java-commons-bcel")
2487 "\\.jar$"))
2488 #t))
2489 (add-after 'build 'install
2490 (lambda* (#:key outputs #:allow-other-keys)
2491 (let* ((out (assoc-ref outputs "out"))
2492 (share (string-append out "/share/java"))
2493 (bin (string-append out "/bin"))
2494 (lib (string-append out "/lib")))
2495 (mkdir-p share)
2496 (install-file (string-append lib "/ant-apache-bcel.jar") share)
2497 (delete-file-recursively bin)
2498 (delete-file-recursively lib)
2499 #t)))))))
2500 (inputs
2501 `(("java-commons-bcel" ,java-commons-bcel)
2502 ,@(package-inputs ant/java8)))))
2503
2504 (define-public ant-junit
2505 (package
2506 (inherit ant/java8)
2507 (name "ant-junit")
2508 (arguments
2509 (substitute-keyword-arguments (package-arguments ant/java8)
2510 ((#:phases phases)
2511 `(modify-phases ,phases
2512 (add-after 'unpack 'link-junit
2513 (lambda* (#:key inputs #:allow-other-keys)
2514 (for-each (lambda (file)
2515 (symlink file
2516 (string-append "lib/optional/"
2517 (basename file))))
2518 (find-files (assoc-ref inputs "java-junit")
2519 "\\.jar$"))
2520 #t))
2521 (add-after 'build 'install
2522 (lambda* (#:key outputs #:allow-other-keys)
2523 (let* ((out (assoc-ref outputs "out"))
2524 (share (string-append out "/share/java"))
2525 (bin (string-append out "/bin"))
2526 (lib (string-append out "/lib")))
2527 (mkdir-p share)
2528 (install-file (string-append lib "/ant-junit.jar") share)
2529 (delete-file-recursively bin)
2530 (delete-file-recursively lib)
2531 #t)))))))
2532 (inputs
2533 `(("java-junit" ,java-junit)
2534 ,@(package-inputs ant/java8)))))
2535
2536 (define-public java-openjfx-build
2537 (package
2538 (name "java-openjfx-build")
2539 ;; This is a java-8 version
2540 (version "8.202")
2541 (source (origin
2542 (method hg-fetch)
2543 (uri (hg-reference
2544 (url "http://hg.openjdk.java.net/openjfx/8u-dev/rt")
2545 (changeset (string-append
2546 (string-join (string-split version #\.) "u")
2547 "-ga"))))
2548 (file-name (string-append name "-" version "-checkout"))
2549 (modules '((guix build utils)))
2550 (snippet
2551 '(begin
2552 ;; Delete included gradle jar
2553 (delete-file-recursively "gradle/wrapper")
2554 #t))
2555 (sha256
2556 (base32
2557 "0yg38mwpivswccv9n96k06x3iv82i4px1a9xg9l8dswzwmfj259f"))
2558 (patches (search-patches "java-openjfx-build-jdk_version.patch"))))
2559 (build-system ant-build-system)
2560 (arguments
2561 `(#:jar-name "java-openjfx.jar"
2562 #:source-dir "buildSrc/src/main/java"
2563 #:test-dir "buildSrc/src/test"
2564 #:phases
2565 (modify-phases %standard-phases
2566 (add-before 'configure 'generate-jsl-parser
2567 (lambda _
2568 (invoke "antlr3" "-o"
2569 "buildSrc/src/main/java/com/sun/scenario/effect/compiler"
2570 "buildSrc/src/main/antlr/JSL.g"))))))
2571 (inputs
2572 `(("antlr3" ,antlr3)
2573 ("java-stringtemplate" ,java-stringtemplate)))
2574 (native-inputs
2575 `(("java-junit" ,java-junit)
2576 ("java-hamcrest-core" ,java-hamcrest-core)))
2577 (home-page "https://openjfx.io")
2578 (synopsis "Graphical application toolkit in Java")
2579 (description "OpenJFX is a client application platform for desktop,
2580 mobile and embedded systems built on Java. Its goal is to produce a
2581 modern, efficient, and fully featured toolkit for developing rich client
2582 applications. This package contains base classes for the OpenJFX
2583 distribution and helper classes for building other parts of the
2584 distribution.")
2585 (license license:gpl2))) ;gpl2 only, with classpath exception
2586
2587 (define-public java-openjfx-base
2588 (package (inherit java-openjfx-build)
2589 (name "java-openjfx-base")
2590 (arguments
2591 `(#:jar-name "java-openjfx-base.jar"
2592 #:source-dir "modules/base/src/main/java:modules/base/src/main/java8:modules/base/src/main/version-info"
2593 #:test-dir "modules/base/src/test"
2594 #:phases
2595 (modify-phases %standard-phases
2596 (add-before 'check 'remove-empty-file
2597 (lambda _
2598 (with-directory-excursion "modules/base/src/test/java"
2599 ;; These files are completely commented, but junit expects them to
2600 ;; contain a class, so tests fail.
2601 (delete-file
2602 "com/sun/javafx/property/adapter/PropertyDescriptorTest.java")
2603 (delete-file
2604 "com/sun/javafx/property/adapter/ReadOnlyPropertyDescriptorTest.java")
2605 (delete-file "javafx/beans/property/PropertiesTest.java")
2606 (delete-file
2607 "javafx/beans/property/adapter/ReadOnlyJavaBeanPropertyBuilder_General_Test.java")
2608 ;; This one fails
2609 (delete-file "com/sun/javafx/runtime/VersionInfoTest.java"))
2610 #t)))))
2611 (propagated-inputs
2612 `(("java-openjfx-build" ,java-openjfx-build)))
2613 (description "OpenJFX is a client application platform for desktop,
2614 mobile and embedded systems built on Java. Its goal is to produce a
2615 modern, efficient, and fully featured toolkit for developing rich client
2616 applications. This package contains base classes for the OpenJFX
2617 distribution.")))
2618
2619 (define-public java-openjfx-graphics
2620 (package (inherit java-openjfx-build)
2621 (name "java-openjfx-graphics")
2622 (arguments
2623 `(#:jar-name "java-openjfx-graphics.jar"
2624 #:source-dir "modules/graphics/src/main/java"
2625 #:tests? #f; require X
2626 #:test-dir "modules/graphics/src/test"))
2627 (propagated-inputs
2628 `(("java-openjfx-base" ,java-openjfx-base)
2629 ("java-swt" ,java-swt)))
2630 (description "OpenJFX is a client application platform for desktop,
2631 mobile and embedded systems built on Java. Its goal is to produce a
2632 modern, efficient, and fully featured toolkit for developing rich client
2633 applications. This package contains graphics-related classes for the
2634 OpenJFX distribution.")))
2635
2636 (define-public java-openjfx-media
2637 (package (inherit java-openjfx-build)
2638 (name "java-openjfx-media")
2639 (propagated-inputs
2640 `(("java-openjxf-graphics" ,java-openjfx-graphics)))
2641 (arguments
2642 `(#:jar-name "java-openjfx-media.jar"
2643 #:source-dir "modules/media/src/main/java"
2644 #:tests? #f)); no tests
2645 (description "OpenJFX is a client application platform for desktop,
2646 mobile and embedded systems built on Java. Its goal is to produce a
2647 modern, efficient, and fully featured toolkit for developing rich client
2648 applications. This package contains media-related classes for the
2649 OpenJFX distribution.")))
2650
2651 (define-public javacc-4
2652 (package
2653 (name "javacc")
2654 (version "4.1")
2655 (source (origin
2656 (method git-fetch)
2657 (uri (git-reference
2658 (url "https://github.com/javacc/javacc")
2659 (commit "release_41")))
2660 (file-name (string-append "javacc-" version "-checkout"))
2661 (sha256
2662 (base32
2663 "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0"))
2664 (modules '((guix build utils)))
2665 ;; delete bundled jars
2666 (snippet '(begin (delete-file-recursively "lib") #t))))
2667 (build-system ant-build-system)
2668 ;; Tests fail with
2669 ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60:
2670 ;; JAVACODE failed
2671 (arguments
2672 `(#:tests? #f
2673 #:phases
2674 (modify-phases %standard-phases
2675 ;; Delete tests to avoid build failure (we don't run them anyway).
2676 (add-after 'unpack 'delete-tests
2677 (lambda _
2678 (for-each delete-file
2679 '("src/org/javacc/JavaCCTestCase.java"
2680 "src/org/javacc/parser/ExpansionTest.java"
2681 "src/org/javacc/parser/OptionsTest.java"
2682 "src/org/javacc/jjtree/JJTreeOptionsTest.java"))
2683 (for-each delete-file-recursively
2684 '("src/org/javacc/parser/test"
2685 "src/org/javacc/jjdoc/test"))
2686 #t))
2687 (replace 'install (install-jars "bin/lib")))))
2688 (home-page "https://javacc.org/")
2689 (synopsis "Java parser generator")
2690 (description "Java Compiler Compiler (JavaCC) is the most popular parser
2691 generator for use with Java applications. A parser generator is a tool that
2692 reads a grammar specification and converts it to a Java program that can
2693 recognize matches to the grammar. In addition to the parser generator itself,
2694 JavaCC provides other standard capabilities related to parser generation such
2695 as tree building (via a tool called JJTree included with JavaCC), actions,
2696 debugging, etc.")
2697 (license license:bsd-3)))
2698
2699 (define-public javacc
2700 (package
2701 (inherit javacc-4)
2702 (version "7.0.4")
2703 (source
2704 (origin
2705 (method git-fetch)
2706 (uri (git-reference
2707 (url "https://github.com/javacc/javacc")
2708 (commit version)))
2709 (file-name (git-file-name "javacc" version))
2710 (sha256
2711 (base32 "18kkak3gda93gr25jrgy6q00g0jr8i24ri2wk4kybz1v234fxx9i"))
2712 (modules '((guix build utils)))
2713 ;; Delete bundled jars.
2714 (snippet '(begin (for-each delete-file-recursively
2715 '("bootstrap" "lib"))
2716 #t))))
2717 (arguments
2718 `(#:make-flags ; bootstrap from javacc-4
2719 (list (string-append "-Dbootstrap-jar="
2720 (assoc-ref %build-inputs "javacc")
2721 "/share/java/javacc.jar"))
2722 #:test-target "test"
2723 #:phases
2724 (modify-phases %standard-phases
2725 (replace 'install (install-jars "target"))
2726 (add-after 'install 'install-bin
2727 (lambda* (#:key outputs inputs #:allow-other-keys)
2728 (let* ((out (assoc-ref outputs "out"))
2729 (dir (string-append out "/share/java"))
2730 (bin (string-append out "/bin"))
2731 (javacc (string-append bin "/javacc")))
2732 (mkdir-p bin)
2733 (with-output-to-file javacc
2734 (lambda _
2735 (display
2736 (string-append "#!/bin/sh\n"
2737 (assoc-ref inputs "jdk") "/bin/java"
2738 " -cp " dir "/javacc.jar" " `basename $0`" " $*"))))
2739 (chmod javacc #o755)
2740 ;; symlink to different names to affect the first argument and
2741 ;; change the behavior of the jar file.
2742 (symlink javacc (string-append bin "/jjdoc"))
2743 (symlink javacc (string-append bin "/jjtree"))
2744 #t))))))
2745
2746 (native-inputs
2747 `(("javacc" ,javacc-4)))))
2748
2749 ;; This is the last 3.x release of ECJ
2750 (define-public java-ecj-3
2751 (package
2752 (name "java-ecj")
2753 (version "3.8.2")
2754 (source (origin
2755 (method url-fetch)
2756 (uri (string-append "http://archive.eclipse.org/eclipse/"
2757 "downloads/drops/R-" version
2758 "-201301310800/ecjsrc-" version ".jar"))
2759 (sha256
2760 (base32
2761 "01mdj14jw11g1jfnki4fi8229p0c6zzckd38zqy2w4m3cjcvsx04"))))
2762 (build-system ant-build-system)
2763 (arguments
2764 `(#:tests? #f ; none included
2765 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2766 #:make-flags (list "-f" "src/build.xml")
2767 #:build-target "build"
2768 #:phases
2769 (modify-phases %standard-phases
2770 (add-after 'unpack 'fix-manifest
2771 (lambda _
2772 ;; Record the main class to make ecj executable.
2773 (with-atomic-file-replacement "src/META-INF/MANIFEST.MF"
2774 (lambda (in out)
2775 (display "Manifest-Version: 1.0
2776 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2777 out)))
2778 #t))
2779 (replace 'install (install-jars ".")))))
2780 (home-page "https://eclipse.org")
2781 (synopsis "Eclipse Java development tools core batch compiler")
2782 (description "This package provides the Eclipse Java core batch compiler.")
2783 (license license:epl1.0)))
2784
2785 ;; This is needed for java-cisd-args4j
2786 (define-public java-ecj-3.5
2787 (package (inherit java-ecj-3)
2788 (version "3.5.1")
2789 (source (origin
2790 (method url-fetch/zipbomb)
2791 (uri (string-append "http://archive.eclipse.org/eclipse/"
2792 "downloads/drops/R-" version
2793 "-200909170800/ecjsrc-" version ".zip"))
2794 (sha256
2795 (base32
2796 "1vnl2mavisc567bip736xzsvvbjif5279wc4a7pbdik5wlir8qr7"))))
2797 (build-system ant-build-system)
2798 (arguments
2799 `(#:tests? #f ; none included
2800 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2801 #:build-target "build"
2802 #:phases
2803 (modify-phases %standard-phases
2804 (add-after 'unpack 'fix-manifest
2805 (lambda _
2806 ;; Record the main class to make ecj executable.
2807 (with-atomic-file-replacement "META-INF/MANIFEST.MF"
2808 (lambda (in out)
2809 (dump-port in out)
2810 (display "Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2811 out)))
2812 #t))
2813 (replace 'install (install-jars ".")))))
2814 (native-inputs
2815 `(("unzip" ,unzip)))))
2816
2817 (define-public java-ecj
2818 (package (inherit java-ecj-3)
2819 (version "4.6.3")
2820 (source
2821 (origin
2822 (method url-fetch)
2823 (uri (string-append
2824 "http://archive.eclipse.org/eclipse/downloads/drops4/R-"
2825 version
2826 "-201703010400/ecjsrc-"
2827 version
2828 ".jar"))
2829 (sha256
2830 (base32
2831 "11cfgsdgznja1pvlxkjbqykxd7pcd5655vkm7s44xmahmap15gpl"))))
2832 (arguments
2833 `(#:tests? #f ; none included
2834 #:build-target "build"
2835 #:phases
2836 (modify-phases %standard-phases
2837 (add-after 'unpack 'fix-build.xml
2838 (lambda _
2839 (substitute* "src/build.xml"
2840 (("^.*MANIFEST.*$")
2841 ""))
2842 #t))
2843 (add-after 'unpack 'fix-prop
2844 (lambda _
2845 (substitute* "src/build.xml"
2846 (("^.*properties.*$")
2847 "<include name=\"**/*.properties\"/>
2848 <include name=\"**/*.props\"/>"))
2849 #t))
2850 (add-before 'build 'chdir
2851 (lambda _
2852 (chdir "src")
2853 #t))
2854 (replace 'install (install-jars ".")))))))
2855
2856 (define-public java-cisd-base
2857 (let ((revision 38938)
2858 (base-version "14.12.0"))
2859 (package
2860 (name "java-cisd-base")
2861 (version (string-append base-version "-" (number->string revision)))
2862 (source (origin
2863 (method svn-fetch)
2864 (uri (svn-reference
2865 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2866 "base/tags/release/"
2867 (version-major+minor base-version)
2868 ".x/" base-version "/base/"))
2869 (revision revision)))
2870 (file-name (string-append "java-cisd-base-" version "-checkout"))
2871 (sha256
2872 (base32
2873 "1i5adyf7nzclb0wydgwa1az04qliid8035vpahaandmkmigbnxiy"))
2874 (modules '((guix build utils)))
2875 (snippet
2876 '(begin
2877 ;; Delete included gradle jar
2878 (delete-file-recursively "gradle/wrapper")
2879 ;; Delete pre-built native libraries
2880 (delete-file-recursively "libs")
2881 #t))))
2882 (build-system ant-build-system)
2883 (arguments
2884 `(#:make-flags '("-file" "build/build.xml")
2885 #:test-target "jar-test"
2886 #:jdk ,icedtea-8
2887 #:phases
2888 (modify-phases %standard-phases
2889 (add-after 'unpack 'unpack-build-resources
2890 (lambda* (#:key inputs #:allow-other-keys)
2891 (copy-recursively (assoc-ref inputs "build-resources")
2892 "../build_resources")
2893 #t))
2894 (add-after 'unpack-build-resources 'fix-dependencies
2895 (lambda* (#:key inputs #:allow-other-keys)
2896 (substitute* "build/build.xml"
2897 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2898 (string-append (assoc-ref inputs "java-testng")
2899 "/share/java/java-testng.jar"))
2900 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2901 (string-append (assoc-ref inputs "java-commons-lang")
2902 "/share/java/commons-lang-"
2903 ,(package-version java-commons-lang) ".jar"))
2904 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2905 (string-append (assoc-ref inputs "java-commons-io")
2906 "/share/java/commons-io-"
2907 ,(package-version java-commons-io)
2908 "-SNAPSHOT.jar"))
2909 ;; Remove dependency on svn
2910 (("<build-info.*") "")
2911 (("\\$\\{revision.number\\}")
2912 ,(number->string revision))
2913 (("\\$\\{version.number\\}") ,base-version))
2914 ;; Remove dependency on classycle
2915 (substitute* "../build_resources/ant/build-common.xml"
2916 (("<taskdef name=\"dependency-checker.*") "")
2917 (("classname=\"classycle.*") "")
2918 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2919 #t))
2920 ;; A few tests fail because of the lack of a proper /etc/groups and
2921 ;; /etc/passwd file in the build container.
2922 (add-after 'unpack 'disable-broken-tests
2923 (lambda _
2924 (substitute* "sourceTest/java/ch/systemsx/cisd/base/AllTests.java"
2925 (("Unix.isOperational\\(\\)") "false"))
2926 #t))
2927 ;; These decorators are almost useless and pull in an unpackaged
2928 ;; dependency.
2929 (add-after 'unpack 'remove-useless-decorators
2930 (lambda _
2931 (substitute* "source/java/ch/systemsx/cisd/base/unix/Unix.java"
2932 (("@Private") "")
2933 (("import ch.rinn.restrictions.Private;") ""))
2934 (substitute* "sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java"
2935 (("@Friend.*") "")
2936 (("import ch.rinn.restrictions.Friend;") ""))
2937 #t))
2938 (add-before 'configure 'build-native-code
2939 (lambda* (#:key inputs #:allow-other-keys)
2940 (let ((jdk (assoc-ref inputs "jdk"))
2941 (dir ,(match (%current-system)
2942 ("i686-linux"
2943 "i386-Linux")
2944 ((or "armhf-linux" "aarch64-linux")
2945 "arm-Linux")
2946 ((or "x86_64-linux")
2947 "amd64-Linux")
2948 (_ "unknown-Linux"))))
2949 (with-directory-excursion "source/c"
2950 (invoke "gcc" "-shared" "-O3" "-fPIC" "unix.c"
2951 (string-append "-I" jdk "/include")
2952 (string-append "-I" jdk "/include/linux")
2953 "-o" "libunix.so")
2954 (invoke "gcc" "-shared" "-O3" "-fPIC"
2955 "-DMACHINE_BYTE_ORDER=1"
2956 "copyCommon.c"
2957 "copyByteChar.c"
2958 "copyByteDouble.c"
2959 "copyByteFloat.c"
2960 "copyByteInt.c"
2961 "copyByteLong.c"
2962 "copyByteShort.c"
2963 (string-append "-I" jdk "/include")
2964 (string-append "-I" jdk "/include/linux")
2965 "-o" "libnativedata.so"))
2966 (install-file "source/c/libunix.so"
2967 (string-append "libs/native/unix/" dir))
2968 (install-file "source/c/libnativedata.so"
2969 (string-append "libs/native/nativedata/" dir))
2970 #t)))
2971 ;; In the "check" phase we only build the test executable.
2972 (add-after 'check 'run-tests
2973 (lambda _
2974 (invoke "java" "-jar" "targets/dist/sis-base-test.jar")
2975 (delete-file "targets/dist/sis-base-test.jar")
2976 #t))
2977 (replace 'install (install-jars "targets/dist")))))
2978 (native-inputs
2979 `(("jdk" ,icedtea-8)
2980 ("java-commons-lang" ,java-commons-lang)
2981 ("java-commons-io" ,java-commons-io)
2982 ("java-testng" ,java-testng)
2983 ("build-resources"
2984 ,(origin
2985 (method svn-fetch)
2986 (uri (svn-reference
2987 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2988 "base/tags/release/"
2989 (version-major+minor base-version)
2990 ".x/" base-version
2991 "/build_resources/"))
2992 (revision revision)))
2993 (sha256
2994 (base32
2995 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
2996 (home-page "http://svnsis.ethz.ch")
2997 (synopsis "Utility classes for libraries from ETH Zurich")
2998 (description "This library supplies some utility classes needed for
2999 libraries from the SIS division at ETH Zurich like jHDF5.")
3000 ;; The C sources are under a non-copyleft license, which looks like a
3001 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
3002 (license (list license:asl2.0
3003 (license:non-copyleft "file://source/c/COPYING"))))))
3004
3005 (define-public java-cisd-args4j
3006 (let ((revision 39162)
3007 (base-version "9.11.2"))
3008 (package
3009 (name "java-cisd-args4j")
3010 (version (string-append base-version "-" (number->string revision)))
3011 (source (origin
3012 (method svn-fetch)
3013 (uri (svn-reference
3014 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3015 "args4j/tags/release/"
3016 (version-major+minor base-version)
3017 ".x/" base-version "/args4j/"))
3018 (revision revision)))
3019 (file-name (string-append "java-cisd-args4j-" version "-checkout"))
3020 (sha256
3021 (base32
3022 "0hhqznjaivq7ips7mkwas78z42s6djsm20rrs7g1zd59rcsakxn2"))))
3023 (build-system ant-build-system)
3024 (arguments
3025 `(#:make-flags '("-file" "build/build.xml")
3026 #:tests? #f ; there are no tests
3027 ;; There are weird build failures with JDK8, such as: "The type
3028 ;; java.io.ObjectInputStream cannot be resolved. It is indirectly
3029 ;; referenced from required .class files"
3030 #:jdk ,icedtea-7
3031 #:modules ((guix build ant-build-system)
3032 (guix build utils)
3033 (guix build java-utils)
3034 (sxml simple)
3035 (sxml transform)
3036 (sxml xpath))
3037 #:phases
3038 (modify-phases %standard-phases
3039 (add-after 'unpack 'unpack-build-resources
3040 (lambda* (#:key inputs #:allow-other-keys)
3041 (mkdir-p "../build_resources")
3042 (invoke "tar" "xf" (assoc-ref inputs "build-resources")
3043 "-C" "../build_resources"
3044 "--strip-components=1")
3045 (mkdir-p "../build_resources/lib")
3046 #t))
3047 (add-after 'unpack-build-resources 'fix-dependencies
3048 (lambda* (#:key inputs #:allow-other-keys)
3049 ;; FIXME: There should be a more convenient abstraction for
3050 ;; editing XML files.
3051 (with-directory-excursion "../build_resources/ant/"
3052 (chmod "build-common.xml" #o664)
3053 (call-with-output-file "build-common.xml.new"
3054 (lambda (port)
3055 (sxml->xml
3056 (pre-post-order
3057 (with-input-from-file "build-common.xml"
3058 (lambda _ (xml->sxml #:trim-whitespace? #t)))
3059 `(;; Remove dependency on classycle and custom ant tasks
3060 (taskdef . ,(lambda (tag . kids)
3061 (let ((name ((sxpath '(name *text*)) kids)))
3062 (if (or (member "build-info" name)
3063 (member "dependency-checker" name)
3064 (member "build-java-subprojects" name)
3065 (member "project-classpath" name))
3066 '() ; skip
3067 `(,tag ,@kids)))))
3068 (typedef . ,(lambda (tag . kids)
3069 (let ((name ((sxpath '(name *text*)) kids)))
3070 (if (member "recursive-jar" name)
3071 '() ; skip
3072 `(,tag ,@kids)))))
3073 (build-java-subprojects . ,(lambda _ '()))
3074 ;; Ignore everything else
3075 (*default* . ,(lambda (tag . kids) `(,tag ,@kids)))
3076 (*text* . ,(lambda (_ txt) txt))))
3077 port)))
3078 (rename-file "build-common.xml.new" "build-common.xml"))
3079 (substitute* "build/build.xml"
3080 (("\\$\\{lib\\}/cisd-base/cisd-base.jar")
3081 (string-append (assoc-ref inputs "java-cisd-base")
3082 "/share/java/sis-base.jar"))
3083 ;; Remove dependency on svn
3084 (("<build-info.*") "")
3085 (("\\$\\{revision.number\\}")
3086 ,(number->string revision))
3087 (("\\$\\{version.number\\}") ,base-version)
3088 ;; Don't use custom ant tasks.
3089 (("recursive-jar") "jar")
3090 (("<project-classpath.*") ""))
3091 #t))
3092 (replace 'install (install-jars "targets/dist")))))
3093 (inputs
3094 `(("java-cisd-base" ,java-cisd-base)))
3095 (native-inputs
3096 `(("ecj" ,java-ecj-3.5)
3097 ("build-resources"
3098 ,(origin
3099 (method svn-fetch)
3100 (uri (svn-reference
3101 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3102 "args4j/tags/release/"
3103 (version-major+minor base-version)
3104 ".x/" base-version
3105 "/build_resources/"))
3106 (revision revision)))
3107 (sha256
3108 (base32
3109 "056cam4k8pll7ass31sy6gwn8g8719njc41yf4l02b0342nilkyf"))
3110 (modules '((guix build utils)))
3111 ;; Delete bundled pre-built jars.
3112 (snippet
3113 '(begin (delete-file-recursively "lib/") #t))))))
3114 (home-page "http://svnsis.ethz.ch")
3115 (synopsis "Command line parser library")
3116 (description "This package provides a parser for command line arguments.")
3117 (license license:asl2.0))))
3118
3119 (define-public java-cisd-jhdf5
3120 (let ((revision 39162)
3121 (base-version "14.12.6"))
3122 (package
3123 (name "java-cisd-jhdf5")
3124 (version (string-append base-version "-" (number->string revision)))
3125 (source (origin
3126 (method svn-fetch)
3127 (uri (svn-reference
3128 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3129 "jhdf5/tags/release/"
3130 (version-major+minor base-version)
3131 ".x/" base-version "/jhdf5/"))
3132 (revision revision)))
3133 (file-name (string-append "java-cisd-jhdf5-" version "-checkout"))
3134 (sha256
3135 (base32
3136 "13i17s2hn0q9drdqvp8csy7770p3hdbh9rp30ihln2ldkfawdmz0"))
3137 (modules '((guix build utils)))
3138 (snippet
3139 '(begin
3140 ;; Delete included gradle jar
3141 (delete-file-recursively "gradle/wrapper")
3142 ;; Delete pre-built native libraries
3143 (delete-file-recursively "libs")
3144 #t))))
3145 (build-system ant-build-system)
3146 (arguments
3147 `(#:make-flags '("-file" "build/build.xml")
3148 #:build-target "jar-all"
3149 #:test-target "jar-test"
3150 #:jdk ,icedtea-8
3151 #:phases
3152 (modify-phases %standard-phases
3153 ;; FIXME: this build phase fails.
3154 (delete 'generate-jar-indices)
3155 ;; Don't erase results from the build phase when building tests.
3156 (add-after 'unpack 'separate-test-target-from-clean
3157 (lambda _
3158 (substitute* "build/build.xml"
3159 (("\"jar-test\" depends=\"clean, ")
3160 "\"jar-test\" depends=\""))
3161 #t))
3162 (add-after 'unpack 'unpack-build-resources
3163 (lambda* (#:key inputs #:allow-other-keys)
3164 (copy-recursively (assoc-ref inputs "build-resources")
3165 "../build_resources")
3166 (delete-file-recursively "../build_resources/lib/")
3167 (mkdir-p "../build_resources/lib")
3168 ;; Remove dependency on classycle
3169 (substitute* "../build_resources/ant/build-common.xml"
3170 (("<taskdef name=\"dependency-checker.*") "")
3171 (("classname=\"classycle.*") "")
3172 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
3173 ;; Remove dependency on svn
3174 (substitute* "build/build.xml"
3175 (("<build-info.*") "")
3176 (("\\$\\{revision.number\\}")
3177 ,(number->string revision))
3178 (("\\$\\{version.number\\}") ,base-version))
3179 #t))
3180 (add-after 'unpack-build-resources 'fix-dependencies
3181 (lambda* (#:key inputs #:allow-other-keys)
3182 (substitute* "../build_resources/ant/build-common.xml"
3183 (("../libraries/testng/testng-jdk15.jar")
3184 (string-append (assoc-ref inputs "java-testng")
3185 "/share/java/java-testng.jar")))
3186 (substitute* "build/build.xml"
3187 (("\\$\\{lib\\}/sis-base/sis-base.jar")
3188 (string-append (assoc-ref inputs "java-cisd-base")
3189 "/share/java/sis-base.jar"))
3190 (("\\$\\{lib\\}/cisd-args4j/cisd-args4j.jar")
3191 (string-append (assoc-ref inputs "java-cisd-args4j")
3192 "/share/java/cisd-args4j.jar"))
3193 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
3194 (string-append (assoc-ref inputs "java-commons-lang")
3195 "/share/java/commons-lang-"
3196 ,(package-version java-commons-lang) ".jar"))
3197 (("\\$\\{lib\\}/commons-io/commons-io.jar")
3198 (string-append (assoc-ref inputs "java-commons-io")
3199 "/share/java/commons-io-"
3200 ,(package-version java-commons-io)
3201 "-SNAPSHOT.jar"))
3202 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
3203 (string-append (assoc-ref inputs "java-testng")
3204 "/share/java/java-testng.jar"))
3205 (("\\$\\{lib\\}/junit4/junit.jar")
3206 (car (find-files (assoc-ref inputs "java-junit") "jar$")))
3207 (("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar")
3208 (car (find-files (assoc-ref inputs "java-hamcrest-core")
3209 "jar$"))))
3210 ;; Remove dependency on ch.rinn.restrictions
3211 (with-directory-excursion "source/java/ch/systemsx/cisd/hdf5/"
3212 (substitute* '("BitSetConversionUtils.java"
3213 "HDF5Utils.java")
3214 (("import ch.rinn.restrictions.Private;") "")
3215 (("@Private") "")))
3216 (with-directory-excursion "sourceTest/java/ch/systemsx/cisd/hdf5/"
3217 (substitute* '("BitSetConversionTest.java"
3218 "h5ar/HDF5ArchiverTest.java")
3219 (("import ch.rinn.restrictions.Friend;") "")
3220 (("@Friend.*") ""))
3221 ;; Remove leftovers from removing @Friend
3222 (substitute* "h5ar/HDF5ArchiverTest.java"
3223 (("\\{ HDF5Archiver.class, IdCache.class, LinkRecord.class \\}\\)")
3224 "")))
3225 #t))
3226 (add-before 'configure 'build-native-library
3227 (lambda* (#:key inputs #:allow-other-keys)
3228 (let ((jdk (assoc-ref inputs "jdk"))
3229 (hdf5 (assoc-ref inputs "hdf5"))
3230 (dir ,(match (%current-system)
3231 ("i686-linux"
3232 "i386-Linux")
3233 ((or "armhf-linux" "aarch64-linux")
3234 "arm-Linux")
3235 ((or "x86_64-linux")
3236 "amd64-Linux")
3237 (_ "unknown-Linux"))))
3238 (with-directory-excursion "source/c"
3239 (apply invoke `("gcc" "-shared" "-O3"
3240 "-fPIC"
3241 "-Wl,--exclude-libs,ALL"
3242 ,@(find-files "jhdf5" "\\.c$")
3243 ,@(find-files "hdf-java" "\\.c$")
3244 ,(string-append "-I" hdf5 "/include")
3245 ,(string-append "-I" jdk "/include")
3246 ,(string-append "-I" jdk "/include/linux")
3247 ,(string-append hdf5 "/lib/libhdf5.a")
3248 "-o" "libjhdf5.so" "-lz")))
3249 (install-file "source/c/libjhdf5.so"
3250 (string-append "libs/native/jhdf5/" dir))
3251 #t)))
3252 ;; In the "check" phase we only build the test executable.
3253 (add-after 'check 'run-tests
3254 (lambda _
3255 (invoke "java" "-jar" "targets/dist/sis-jhdf5-test.jar")
3256 (delete-file "targets/dist/sis-jhdf5-test.jar")
3257 #t))
3258 (replace 'install
3259 (install-jars "targets/dist")))))
3260 (inputs
3261 `(("java-cisd-base" ,java-cisd-base)
3262 ("java-cisd-args4j" ,java-cisd-args4j)
3263 ("java-commons-lang" ,java-commons-lang)
3264 ("java-commons-io" ,java-commons-io)
3265 ("hdf5" ,hdf5)
3266 ("zlib" ,zlib)))
3267 (native-inputs
3268 `(("jdk" ,icedtea-8)
3269 ("java-testng" ,java-testng)
3270 ("java-junit" ,java-junit)
3271 ("java-jmock" ,java-jmock)
3272 ("java-hamcrest-core" ,java-hamcrest-core)
3273 ("build-resources"
3274 ,(origin
3275 (method svn-fetch)
3276 (uri (svn-reference
3277 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3278 "jhdf5/tags/release/"
3279 (version-major+minor base-version)
3280 ".x/" base-version
3281 "/build_resources/"))
3282 (revision revision)))
3283 (sha256
3284 (base32
3285 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
3286 (home-page "https://wiki-bsse.ethz.ch/display/JHDF5/")
3287 (synopsis "Java binding for HDF5")
3288 (description "JHDF5 is a high-level API in Java for reading and writing
3289 HDF5 files, building on the libraries provided by the HDF Group.")
3290 ;; The C sources are under a non-copyleft license, which looks like a
3291 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
3292 (license (list license:asl2.0
3293 (license:non-copyleft "file://source/c/COPYING"))))))
3294
3295 (define-public java-classpathx-servletapi
3296 (package
3297 (name "java-classpathx-servletapi")
3298 (version "3.0.1")
3299 (source (origin
3300 (method url-fetch)
3301 (uri (string-append "mirror://gnu/classpathx/servletapi/"
3302 "servletapi-" version ".tar.gz"))
3303 (sha256
3304 (base32
3305 "07d8h051siga2f33fra72hk12sbq1bxa4jifjg0qj0vfazjjff0x"))))
3306 (build-system ant-build-system)
3307 (arguments
3308 `(#:tests? #f ; there is no test target
3309 #:build-target "compile"
3310 #:make-flags
3311 (list "-Dbuild.compiler=javac1.8"
3312 (string-append "-Ddist=" (assoc-ref %outputs "out")))
3313 #:phases
3314 (modify-phases %standard-phases
3315 (replace 'install
3316 (lambda* (#:key make-flags #:allow-other-keys)
3317 (apply invoke `("ant" "dist" ,@make-flags)))))))
3318 (home-page "https://www.gnu.org/software/classpathx/")
3319 (synopsis "Java servlet API implementation")
3320 (description "This is the GNU servlet API distribution, part of the
3321 ClasspathX project. It provides implementations of version 3.0 of the servlet
3322 API and version 2.1 of the Java ServerPages API.")
3323 (license license:gpl3+)))
3324
3325 (define-public java-javaee-servletapi
3326 (package
3327 (name "java-javaee-servletapi")
3328 (version "3.1.0")
3329 (source (origin
3330 (method git-fetch)
3331 (uri (git-reference
3332 (url "https://github.com/javaee/servlet-spec")
3333 (commit version)))
3334 (file-name (git-file-name name version))
3335 (sha256
3336 (base32
3337 "0s03lj8w5an70lkqbjycgfrfk0kc07vbfav91jzk87gh3awf9ksl"))))
3338 (build-system ant-build-system)
3339 (arguments
3340 `(#:jar-name "javax-servletapi.jar"
3341 ;; no tests
3342 #:tests? #f
3343 #:source-dir "src/main/java"
3344 #:phases
3345 (modify-phases %standard-phases
3346 (add-before 'build 'copy-resources
3347 (lambda _
3348 (mkdir-p "build/classes/javax/servlet/http")
3349 (let ((from-prefix "src/main/java/javax/servlet/")
3350 (to-prefix "build/classes/javax/servlet/"))
3351 (for-each (lambda (f)
3352 (copy-file (string-append from-prefix f)
3353 (string-append to-prefix f)))
3354 (list "LocalStrings_ja.properties"
3355 "LocalStrings.properties"
3356 "LocalStrings_fr.properties"
3357 "http/LocalStrings_es.properties"
3358 "http/LocalStrings_ja.properties"
3359 "http/LocalStrings.properties"
3360 "http/LocalStrings_fr.properties")))
3361 #t)))))
3362 (native-inputs
3363 `(("unzip" ,unzip)))
3364 (home-page "https://javaee.github.io/servlet-spec/")
3365 (synopsis "Java servlet API")
3366 (description "Java Servlet is the foundation web specification in the
3367 Java Enterprise Platform. Developers can build web applications using the
3368 Servlet API to interact with the request/response workflow. This project
3369 provides information on the continued development of the Java Servlet
3370 specification.")
3371 ;; Main code is dual-licensed by Oracle under either GLP2 or CDDL 1.1.
3372 ;; Some files are licensed under ASL 2.0.
3373 (license (list license:asl2.0 license:gpl2 license:cddl1.1))))
3374
3375 (define-public java-swt
3376 (package
3377 (name "java-swt")
3378 (version "4.7.1a")
3379 (source
3380 ;; The types of many variables and procedures differ in the sources
3381 ;; dependent on whether the target architecture is a 32-bit system or a
3382 ;; 64-bit system. Instead of patching the sources on demand in a build
3383 ;; phase we download either the 32-bit archive (which mostly uses "int"
3384 ;; types) or the 64-bit archive (which mostly uses "long" types).
3385 (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9")
3386 (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q")
3387 (file32 "x86")
3388 (file64 "x86_64"))
3389 (let-values (((hash file)
3390 (match (or (%current-target-system) (%current-system))
3391 ("x86_64-linux" (values hash64 file64))
3392 (_ (values hash32 file32)))))
3393 (origin
3394 (method url-fetch)
3395 (uri (string-append
3396 "http://download.eclipse.org/eclipse/downloads/drops4/"
3397 "R-" version "-201710090410/swt-" version
3398 "-gtk-linux-" file ".zip"))
3399 (sha256 (base32 hash))))))
3400 (build-system ant-build-system)
3401 (arguments
3402 `(#:jar-name "swt.jar"
3403 #:jdk ,icedtea-8
3404 #:tests? #f ; no "check" target
3405 #:phases
3406 (modify-phases %standard-phases
3407 (replace 'unpack
3408 (lambda* (#:key source #:allow-other-keys)
3409 (mkdir "swt")
3410 (invoke "unzip" source "-d" "swt")
3411 (chdir "swt")
3412 (mkdir "src")
3413 (invoke "unzip" "src.zip" "-d" "src")))
3414 ;; The classpath contains invalid icecat jars. Since we don't need
3415 ;; anything other than the JDK on the classpath, we can simply unset
3416 ;; it.
3417 (add-after 'configure 'unset-classpath
3418 (lambda _ (unsetenv "CLASSPATH") #t))
3419 (add-before 'build 'build-native
3420 (lambda* (#:key inputs outputs #:allow-other-keys)
3421 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3422 ;; Build shared libraries. Users of SWT have to set the system
3423 ;; property swt.library.path to the "lib" directory of this
3424 ;; package output.
3425 (mkdir-p lib)
3426 (setenv "OUTPUT_DIR" lib)
3427 (with-directory-excursion "src"
3428 (invoke "bash" "build.sh")))))
3429 (add-after 'install 'install-native
3430 (lambda* (#:key outputs #:allow-other-keys)
3431 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3432 (for-each (lambda (file)
3433 (install-file file lib))
3434 (find-files "." "\\.so$"))
3435 #t))))))
3436 (inputs
3437 `(("gtk" ,gtk+-2)
3438 ("libxtst" ,libxtst)
3439 ("libxt" ,libxt)
3440 ("mesa" ,mesa)
3441 ("glu" ,glu)))
3442 (native-inputs
3443 `(("pkg-config" ,pkg-config)
3444 ("unzip" ,unzip)))
3445 (home-page "https://www.eclipse.org/swt/")
3446 (synopsis "Widget toolkit for Java")
3447 (description
3448 "SWT is a widget toolkit for Java designed to provide efficient, portable
3449 access to the user-interface facilities of the operating systems on which it
3450 is implemented.")
3451 ;; SWT code is licensed under EPL1.0
3452 ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1
3453 ;; Cairo bindings contain code under MPL1.1
3454 ;; XULRunner 1.9 bindings contain code under MPL2.0
3455 (license (list
3456 license:epl1.0
3457 license:mpl1.1
3458 license:mpl2.0
3459 license:lgpl2.1+))))
3460
3461 ;; java-hamcrest-core uses qdox version 1.12. We package this version instead
3462 ;; of the latest release.
3463 (define-public java-qdox-1.12
3464 (package
3465 (name "java-qdox")
3466 (version "1.12.1")
3467 (source (origin
3468 (method url-fetch)
3469 (uri (string-append "https://repo1.maven.org/maven2/"
3470 "com/thoughtworks/qdox/qdox/" version
3471 "/qdox-" version "-sources.jar"))
3472 (sha256
3473 (base32
3474 "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl"))))
3475 (build-system ant-build-system)
3476 (arguments
3477 `(;; Tests require junit
3478 #:tests? #f
3479 #:jar-name "qdox.jar"
3480 #:phases
3481 (modify-phases %standard-phases
3482 (replace 'unpack
3483 (lambda* (#:key source #:allow-other-keys)
3484 (mkdir "src")
3485 (with-directory-excursion "src"
3486 (invoke "jar" "-xf" source))))
3487 ;; At this point we don't have junit, so we must remove the API
3488 ;; tests.
3489 (add-after 'unpack 'delete-tests
3490 (lambda _
3491 (delete-file-recursively "src/com/thoughtworks/qdox/junit")
3492 #t)))))
3493 (home-page "https://github.com/codehaus/qdox")
3494 (synopsis "Parse definitions from Java source files")
3495 (description
3496 "QDox is a high speed, small footprint parser for extracting
3497 class/interface/method definitions from source files complete with JavaDoc
3498 @code{@@tags}. It is designed to be used by active code generators or
3499 documentation tools.")
3500 (license license:asl2.0)))
3501
3502 (define-public java-qdox
3503 (package
3504 (name "java-qdox")
3505 ; Newer version exists, but this version is required by java-plexus-component-metadata
3506 (version "2.0-M2")
3507 (source (origin
3508 (method url-fetch)
3509 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
3510 ;; Older releases at https://github.com/codehaus/qdox/
3511 ;; Note: The release at maven is pre-generated. The release at
3512 ;; github requires jflex.
3513 (uri (string-append "https://repo1.maven.org/maven2/"
3514 "com/thoughtworks/qdox/qdox/" version
3515 "/qdox-" version "-sources.jar"))
3516 (sha256
3517 (base32
3518 "10xxrcaicq6axszcr2jpygisa4ch4sinyx5q7kqqxv4lknrmxp5x"))))
3519 (build-system ant-build-system)
3520 (arguments
3521 `(#:jar-name "qdox.jar"
3522 #:tests? #f)); no tests
3523 (home-page "https://github.com/codehaus/qdox")
3524 (synopsis "Parse definitions from Java source files")
3525 (description "QDox is a high speed, small footprint parser for extracting
3526 class/interface/method definitions from source files complete with JavaDoc
3527 @code{@@tags}. It is designed to be used by active code generators or
3528 documentation tools.")
3529 (license license:asl2.0)))
3530
3531 (define-public java-jarjar
3532 (package
3533 (name "java-jarjar")
3534 (version "1.4")
3535 (source (origin
3536 (method url-fetch)
3537 (uri (string-append
3538 "https://storage.googleapis.com/google-code-archive-downloads/v2/"
3539 "code.google.com/jarjar/jarjar-src-" version ".zip"))
3540 (sha256
3541 (base32
3542 "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl"))
3543 (modules '((guix build utils)))
3544 (snippet
3545 '(begin
3546 ;; Delete bundled thirds-party jar archives.
3547 (delete-file-recursively "lib")
3548 (delete-file "src/test/enumtest.jar")
3549 ;; the CLASSPATH needs this directory, create an empty one
3550 (mkdir-p "lib")
3551 #t))))
3552 (build-system ant-build-system)
3553 (arguments
3554 `(;; Tests require junit, which ultimately depends on this package.
3555 #:tests? #f
3556 #:build-target "jar"
3557 #:phases
3558 (modify-phases %standard-phases
3559 (add-before 'build 'do-not-use-bundled-asm
3560 (lambda* (#:key inputs #:allow-other-keys)
3561 (substitute* "build.xml"
3562 (("<path id=\"path.build\">")
3563 (string-append "<path id=\"path.build\"><fileset dir=\""
3564 (assoc-ref inputs "java-asm-bootstrap")
3565 "/share/java\" includes=\"**/*.jar\"/>"))
3566 (("<zipfileset src=\"lib/asm-4.0.jar\"/>") "")
3567 (("lib/asm-commons-4.0.jar")
3568 (string-append (assoc-ref inputs "java-asm-bootstrap")
3569 "/share/java/asm-6.0.jar"))
3570 (("<include name=\"org/objectweb/asm/commons/Remap\\*\\.class\"/>")
3571 (string-append "<include name=\"org/objectweb/asm/"
3572 "commons/Remap*.class\"/>"
3573 "<include name=\"org/objectweb/asm/*.class\"/>"
3574 "<include name=\"org/objectweb/asm/"
3575 "signature/*.class\"/>"
3576 "<include name=\"org/objectweb/asm/"
3577 "commons/SignatureRemapper.class\"/>")))
3578 #t))
3579 (add-before 'build 'remove-maven-dependency
3580 (lambda _
3581 ;; We do not need to build jarjar as a maven plugin just yet, so
3582 ;; remove this file. Maven requires jarjar (but not that plugin),
3583 ;; so removing it improves the bootstrap.
3584 (delete-file "src/main/com/tonicsystems/jarjar/JarJarMojo.java")
3585 #t))
3586 (replace 'install
3587 (lambda* (#:key outputs #:allow-other-keys)
3588 (let ((target (string-append (assoc-ref outputs "out")
3589 "/share/java")))
3590 (install-file (string-append "dist/jarjar-" ,version ".jar")
3591 target))
3592 #t)))))
3593 (inputs
3594 `(("java-asm-bootstrap" ,java-asm-bootstrap)))
3595 (native-inputs
3596 `(("unzip" ,unzip)))
3597 (home-page "https://code.google.com/archive/p/jarjar/")
3598 (synopsis "Repackage Java libraries")
3599 (description
3600 "Jar Jar Links is a utility that makes it easy to repackage Java
3601 libraries and embed them into your own distribution. Jar Jar Links includes
3602 an Ant task that extends the built-in @code{jar} task.")
3603 (license license:asl2.0)))
3604
3605 (define-public java-hamcrest-core
3606 (package
3607 (name "java-hamcrest-core")
3608 (version "1.3")
3609 (source (origin
3610 (method git-fetch)
3611 (uri (git-reference
3612 (url "https://github.com/hamcrest/JavaHamcrest/")
3613 (commit (string-append "hamcrest-java-" version))))
3614 (file-name (git-file-name name version))
3615 (sha256
3616 (base32
3617 "16fxxkrd31ahqvcaby30jgh3z1i0zxh51m24hxgz0z2agxj6bc63"))
3618 (modules '((guix build utils)))
3619 (snippet
3620 '(begin
3621 ;; Delete bundled thirds-party jar archives.
3622 (delete-file-recursively "lib")
3623 #t))))
3624 (build-system ant-build-system)
3625 (arguments
3626 `(#:tests? #f ; Tests require junit
3627 #:modules ((guix build ant-build-system)
3628 (guix build java-utils)
3629 (guix build utils)
3630 (srfi srfi-1))
3631 #:make-flags (list (string-append "-Dversion=" ,version))
3632 #:test-target "unit-test"
3633 #:build-target "core"
3634 #:phases
3635 (modify-phases %standard-phases
3636 ;; Disable unit tests, because they require junit, which requires
3637 ;; hamcrest-core. We also give a fixed value to the "Built-Date"
3638 ;; attribute from the manifest for reproducibility.
3639 (add-before 'configure 'patch-build.xml
3640 (lambda _
3641 (substitute* "build.xml"
3642 (("unit-test, ") "")
3643 (("\\$\\{build.timestamp\\}") "guix"))
3644 #t))
3645 ;; Java's "getMethods()" returns methods in an unpredictable order.
3646 ;; To make the output of the generated code deterministic we must
3647 ;; sort the array of methods.
3648 (add-after 'unpack 'make-method-order-deterministic
3649 (lambda _
3650 (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java"
3651 (("import java\\.util\\.Iterator;" line)
3652 (string-append line "\n"
3653 "import java.util.Arrays; import java.util.Comparator;"))
3654 (("allMethods = cls\\.getMethods\\(\\);" line)
3655 (string-append "_" line
3656 "
3657 private Method[] getSortedMethods() {
3658 Arrays.sort(_allMethods, new Comparator<Method>() {
3659 @Override
3660 public int compare(Method a, Method b) {
3661 return a.toString().compareTo(b.toString());
3662 }
3663 });
3664 return _allMethods;
3665 }
3666
3667 private Method[] allMethods = getSortedMethods();")))
3668 #t))
3669 (add-before 'build 'do-not-use-bundled-qdox
3670 (lambda* (#:key inputs #:allow-other-keys)
3671 (substitute* "build.xml"
3672 (("lib/generator/qdox-1.12.jar")
3673 (string-append (assoc-ref inputs "java-qdox-1.12")
3674 "/share/java/qdox.jar")))
3675 #t))
3676 ;; build.xml searches for .jar files in this directoy, which
3677 ;; we remove from the source archive.
3678 (add-before 'build 'create-dummy-directories
3679 (lambda _
3680 (mkdir-p "lib/integration")
3681 #t))
3682 (add-before 'build 'create-pom
3683 (lambda _
3684 (substitute* "pom/hamcrest-core.pom"
3685 (("@VERSION@") ,version))
3686 #t))
3687 (replace 'install
3688 (install-from-pom "pom/hamcrest-core.pom")))))
3689 (native-inputs
3690 `(("java-qdox-1.12" ,java-qdox-1.12)
3691 ("java-jarjar" ,java-jarjar)))
3692 (propagated-inputs
3693 `(("java-hamcrest-parent-pom" ,java-hamcrest-parent-pom)))
3694 (home-page "http://hamcrest.org/")
3695 (synopsis "Library of matchers for building test expressions")
3696 (description
3697 "This package provides a library of matcher objects (also known as
3698 constraints or predicates) allowing @code{match} rules to be defined
3699 declaratively, to be used in other frameworks. Typical scenarios include
3700 testing frameworks, mocking libraries and UI validation rules.")
3701 (license license:bsd-2)))
3702
3703 (define java-hamcrest-parent-pom
3704 (package
3705 (inherit java-hamcrest-core)
3706 (name "java-hamcrest-parent-pom")
3707 (propagated-inputs '())
3708 (native-inputs '())
3709 (arguments
3710 `(#:tests? #f
3711 #:phases
3712 (modify-phases %standard-phases
3713 (delete 'configure)
3714 (replace 'build
3715 (lambda _
3716 (substitute* "pom/hamcrest-parent.pom"
3717 (("@VERSION@") ,(package-version java-hamcrest-core)))
3718 #t))
3719 (replace 'install
3720 (install-pom-file "pom/hamcrest-parent.pom")))))))
3721
3722 (define-public java-hamcrest-library
3723 (package
3724 (inherit java-hamcrest-core)
3725 (name "java-hamcrest-library")
3726 (arguments
3727 (substitute-keyword-arguments (package-arguments java-hamcrest-core)
3728 ((#:build-target _) "library")
3729 ((#:phases phases)
3730 `(modify-phases ,phases
3731 (replace 'create-pom
3732 (lambda _
3733 (substitute* "pom/hamcrest-library.pom"
3734 (("@VERSION@") ,(package-version java-hamcrest-core)))
3735 #t))
3736 (replace 'install
3737 (install-from-pom "pom/hamcrest-library.pom"))))))
3738 (propagated-inputs
3739 `(("java-hamcrest-core" ,java-hamcrest-core)
3740 ("java-hamcrest-parent-pom" ,java-hamcrest-parent-pom)))))
3741
3742 (define-public java-junit
3743 (package
3744 (name "java-junit")
3745 (version "4.12")
3746 (source (origin
3747 (method git-fetch)
3748 (uri (git-reference
3749 (url "https://github.com/junit-team/junit/")
3750 (commit (string-append "r" version))))
3751 (file-name (git-file-name name version))
3752 (sha256
3753 (base32
3754 "1j8avi91px1z8rjc89cfikwrvfifdmmsarwiyrcnr59ynvpz0v8h"))
3755 (modules '((guix build utils)))
3756 (snippet
3757 '(begin
3758 ;; Delete bundled jar archives.
3759 (delete-file-recursively "lib")
3760 #t))))
3761 (build-system ant-build-system)
3762 (arguments
3763 `(#:jar-name "junit.jar"
3764 #:source-dir "src/main/java"
3765 #:test-dir "src/test"
3766 #:test-exclude (list "**/SimpleTest.java" "**/StackTracesTest.java"
3767 "**/RuleChainTest.java" "**/TestWatchmanTest.java")
3768 #:phases
3769 (modify-phases %standard-phases
3770 (add-before 'check 'copy-test-resources
3771 (lambda _
3772 (copy-recursively "src/test/resources" "build/test-classes")
3773 #t))
3774 (replace 'install
3775 (install-from-pom "pom.xml")))))
3776 (propagated-inputs
3777 `(("java-hamcrest-core" ,java-hamcrest-core)))
3778 (native-inputs
3779 `(("java-hamcrest-library" ,java-hamcrest-library)))
3780 (home-page "https://junit.org/junit4/")
3781 (synopsis "Test framework for Java")
3782 (description
3783 "JUnit is a simple framework to write repeatable tests for Java projects.
3784 JUnit provides assertions for testing expected results, test fixtures for
3785 sharing common test data, and test runners for running tests.")
3786 (license license:epl1.0)))
3787
3788 (define-public java-junitparams
3789 (package
3790 (name "java-junitparams")
3791 (version "1.1.1")
3792 (source (origin
3793 (method git-fetch)
3794 (uri (git-reference
3795 (url "https://github.com/Pragmatists/JUnitParams")
3796 (commit (string-append "JUnitParams-" version))))
3797 (file-name (git-file-name name version))
3798 (sha256
3799 (base32
3800 "0rb52xdfp99invyjrras3w0bf0a81cz30yd47rkkiyqcqj0y1q9b"))))
3801 (build-system ant-build-system)
3802 (arguments
3803 `(#:jar-name "junitparams.jar"
3804 #:source-dir "src/main/java"
3805 #:test-dir "src/test"
3806 #:test-exclude (list "**/SuperclassTest.java")))
3807 (inputs
3808 `(("java-junit" ,java-junit)))
3809 (native-inputs
3810 `(("java-junit" ,java-junit)
3811 ("java-hamcrest-core" ,java-hamcrest-core)
3812 ("java-assertj" ,java-assertj)))
3813 (home-page "https://github.com/Pragmatists/JUnitParams")
3814 (synopsis "Parameterised test support for JUnit")
3815 (description "The JUnitParams project adds a new runner to JUnit and
3816 provides much easier and readable parametrised tests for JUnit.")
3817 (license license:asl2.0)))
3818
3819 (define-public java-plexus-utils
3820 (package
3821 (name "java-plexus-utils")
3822 (version "3.2.0")
3823 (source (origin
3824 (method git-fetch)
3825 (uri (git-reference
3826 (url "https://github.com/codehaus-plexus/plexus-utils")
3827 (commit (string-append "plexus-utils-" version))))
3828 (file-name (git-file-name name version))
3829 (sha256
3830 (base32
3831 "1mlx7xrq7lgqjqcpg7y4hi1ghavf28vvk3har82037dqx61n0f15"))))
3832 (build-system ant-build-system)
3833 ;; FIXME: The default build.xml does not include a target to install
3834 ;; javadoc files.
3835 (arguments
3836 `(#:jar-name "plexus-utils.jar"
3837 #:source-dir "src/main"
3838 #:phases
3839 (modify-phases %standard-phases
3840 (add-after 'unpack 'fix-reference-to-/bin-and-/usr
3841 (lambda _
3842 (substitute* "src/main/java/org/codehaus/plexus/util/\
3843 cli/shell/BourneShell.java"
3844 (("/bin/sh") (which "sh"))
3845 (("/usr/") (getcwd)))
3846 #t))
3847 (add-after 'unpack 'fix-or-disable-broken-tests
3848 (lambda _
3849 (with-directory-excursion "src/test/java/org/codehaus/plexus/util"
3850 (substitute* '("cli/CommandlineTest.java"
3851 "cli/shell/BourneShellTest.java")
3852 (("/bin/sh") (which "sh"))
3853 (("/bin/echo") (which "echo")))
3854
3855 ;; This test depends on MavenProjectStub, but we don't have
3856 ;; a package for Maven.
3857 (delete-file "introspection/ReflectionValueExtractorTest.java")
3858
3859 ;; FIXME: The command line tests fail, maybe because they use
3860 ;; absolute paths.
3861 (delete-file "cli/CommandlineTest.java"))
3862 #t)))))
3863 (native-inputs
3864 `(("java-hamcrest-core" ,java-hamcrest-core)
3865 ("java-junit" ,java-junit)))
3866 (home-page "https://codehaus-plexus.github.io/plexus-utils/")
3867 (synopsis "Common utilities for the Plexus framework")
3868 (description "This package provides various Java utility classes for the
3869 Plexus framework to ease working with strings, files, command lines, XML and
3870 more.")
3871 (license license:asl2.0)))
3872
3873 (define-public java-plexus-interpolation
3874 (package
3875 (name "java-plexus-interpolation")
3876 (version "1.23")
3877 (source (origin
3878 (method git-fetch)
3879 (uri (git-reference
3880 (url "https://github.com/codehaus-plexus/plexus-interpolation")
3881 (commit (string-append "plexus-interpolation-" version))))
3882 (file-name (git-file-name name version))
3883 (sha256
3884 (base32
3885 "005hxxg1adv71a96lz4vp65bk3v1pi76j4c45z29xzizclib16vl"))))
3886 (build-system ant-build-system)
3887 (arguments
3888 `(#:jar-name "plexus-interpolation.jar"
3889 #:source-dir "src/main"))
3890 (native-inputs
3891 `(("java-junit" ,java-junit)
3892 ("java-hamcrest-core" ,java-hamcrest-core)))
3893 (home-page "https://codehaus-plexus.github.io/plexus-interpolation/")
3894 (synopsis "Java components for interpolating ${} strings and the like")
3895 (description "Plexus interpolator is a modular, flexible interpolation
3896 framework for the expression language style commonly seen in Maven, Plexus,
3897 and other related projects.
3898
3899 It has its foundation in the @code{org.codehaus.plexus.utils.interpolation}
3900 package within @code{plexus-utils}, but has been separated in order to allow
3901 these two libraries to vary independently of one another.")
3902 (license license:asl2.0)))
3903
3904 (define-public java-plexus-classworlds
3905 (package
3906 (name "java-plexus-classworlds")
3907 (version "2.5.2")
3908 (source (origin
3909 (method git-fetch)
3910 (uri (git-reference
3911 (url "https://github.com/codehaus-plexus/plexus-classworlds")
3912 (commit (string-append "plexus-classworlds-" version))))
3913 (file-name (git-file-name name version))
3914 (sha256
3915 (base32
3916 "1iv8x55fbni2hg4l7pdpbwfq75xmvq1f25g6nxma8rcdpihsh13r"))))
3917 (build-system ant-build-system)
3918 (arguments
3919 `(#:jar-name "plexus-classworlds.jar"
3920 #:source-dir "src/main"
3921 #:tests? #f));; FIXME: we need to generate some resources as in pom.xml
3922 (native-inputs
3923 `(("java-junit" ,java-junit)))
3924 (home-page "https://codehaus-plexus.github.io/plexus-classworlds/")
3925 (synopsis "Java class loader framework")
3926 (description "Plexus classworlds replaces the native @code{ClassLoader}
3927 mechanism of Java. It is especially useful for dynamic loading of application
3928 components.")
3929 (license license:asl2.0)))
3930
3931 (define java-plexus-container-default-bootstrap
3932 (package
3933 (name "java-plexus-container-default-bootstrap")
3934 (version "1.7.1")
3935 (source (origin
3936 (method git-fetch)
3937 (uri (git-reference
3938 (url "https://github.com/codehaus-plexus/plexus-containers")
3939 (commit (string-append "plexus-containers-" version))))
3940 (file-name (git-file-name name version))
3941 (sha256
3942 (base32
3943 "1316hrp5vqfv0aw7miq2fp0wwy833h66h502h29vnh5sxj27x228"))))
3944 (build-system ant-build-system)
3945 (arguments
3946 `(#:jar-name "container-default.jar"
3947 #:source-dir "plexus-container-default/src/main/java"
3948 #:test-dir "plexus-container-default/src/test"
3949 #:jdk ,icedtea-8
3950 #:tests? #f; requires plexus-archiver, which depends on this package
3951 #:phases
3952 (modify-phases %standard-phases
3953 (add-before 'build 'copy-resources
3954 (lambda _
3955 (copy-recursively
3956 "plexus-container-default/src/main/resources/"
3957 "build/classes")
3958 #t)))))
3959 (inputs
3960 `(("worldclass" ,java-plexus-classworlds)
3961 ("xbean" ,java-geronimo-xbean-reflect)
3962 ("utils" ,java-plexus-utils)
3963 ("junit" ,java-junit)
3964 ("guava" ,java-guava)))
3965 (home-page "https://github.com/codehaus-plexus/plexus-containers")
3966 (synopsis "Inversion-of-control container")
3967 (description "Plexus-default-container is Plexus' inversion-of-control
3968 (@dfn{IoC}) container. It is composed of its public API and its default
3969 implementation.")
3970 (license license:asl2.0)))
3971
3972 (define-public java-plexus-io
3973 (package
3974 (name "java-plexus-io")
3975 (version "3.0.0")
3976 (source (origin
3977 (method git-fetch)
3978 (uri (git-reference
3979 (url "https://github.com/codehaus-plexus/plexus-io")
3980 (commit (string-append "plexus-io-" version))))
3981 (file-name (git-file-name name version))
3982 (sha256
3983 (base32
3984 "1h4q9l2j9sfbscvxpnyy2hazi0r83h3am86y4r959wrl1b24xxwd"))))
3985 (build-system ant-build-system)
3986 (arguments
3987 `(#:jar-name "plexus-io.jar"
3988 #:source-dir "src/main/java"
3989 #:test-dir "src/test"
3990 #:jdk ,icedtea-8
3991 #:phases
3992 (modify-phases %standard-phases
3993 (add-before 'build 'copy-resources
3994 (lambda _
3995 (mkdir-p "build/classes/META-INF/plexus")
3996 (copy-file "src/main/resources/META-INF/plexus/components.xml"
3997 "build/classes/META-INF/plexus/components.xml")
3998 #t)))))
3999 (inputs
4000 `(("utils" ,java-plexus-utils)
4001 ("commons-io" ,java-commons-io)
4002 ("java-jsr305" ,java-jsr305)))
4003 (native-inputs
4004 `(("junit" ,java-junit)
4005 ("hamcrest" ,java-hamcrest-core)
4006 ("guava" ,java-guava)
4007 ("classworlds" ,java-plexus-classworlds)
4008 ("xbean" ,java-geronimo-xbean-reflect)
4009 ("container-default" ,java-plexus-container-default-bootstrap)))
4010 (home-page "https://github.com/codehaus-plexus/plexus-io")
4011 (synopsis "I/O plexus components")
4012 (description "Plexus IO is a set of plexus components, which are designed
4013 for use in I/O operations. This implementation using plexus components allows
4014 reusing it in maven.")
4015 (license license:asl2.0)))
4016
4017 (define-public java-plexus-archiver
4018 (package
4019 (name "java-plexus-archiver")
4020 (version "4.1.0")
4021 (source (origin
4022 (method url-fetch)
4023 (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver"
4024 "/archive/plexus-archiver-" version ".tar.gz"))
4025 (sha256
4026 (base32
4027 "0ry6i92gli0mvdmfih2vgs0lkf9yvx18h2ajxim66yg6yipnp0hg"))))
4028 (build-system ant-build-system)
4029 (arguments
4030 `(#:jar-name "plexus-archiver.jar"
4031 #:source-dir "src/main/java"
4032 #:jdk ,icedtea-8
4033 #:test-dir "src/test"
4034 #:test-exclude (list "**/Abstract*.java" "**/Base*.java")
4035 #:phases
4036 (modify-phases %standard-phases
4037 (add-before 'check 'remove-failing
4038 (lambda _
4039 ;; Requires an older version of plexus container
4040 (delete-file
4041 "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java")
4042 #t))
4043 (add-before 'check 'fix-test-building
4044 (lambda _
4045 (substitute* "build.xml"
4046 (("srcdir=\"src/test\"") "srcdir=\"src/test/java\""))
4047 #t))
4048 (add-before 'build 'copy-resources
4049 (lambda _
4050 (mkdir-p "build/classes/META-INF/plexus")
4051 (copy-file "src/main/resources/META-INF/plexus/components.xml"
4052 "build/classes/META-INF/plexus/components.xml")
4053 #t)))))
4054 (inputs
4055 `(("utils" ,java-plexus-utils)
4056 ("commons-io" ,java-commons-io)
4057 ("snappy" ,java-iq80-snappy)
4058 ("io" ,java-plexus-io)
4059 ("compress" ,java-commons-compress)
4060 ("container-default" ,java-plexus-container-default-bootstrap)
4061 ("snappy" ,java-snappy)
4062 ("java-jsr305" ,java-jsr305)))
4063 (native-inputs
4064 `(("java-hamcrest-core" ,java-hamcrest-core)
4065 ("junit" ,java-junit)
4066 ("classworld" ,java-plexus-classworlds)
4067 ("xbean" ,java-geronimo-xbean-reflect)
4068 ("xz" ,java-xz)
4069 ("guava" ,java-guava)))
4070 (home-page "https://github.com/codehaus-plexus/plexus-archiver")
4071 (synopsis "Archiver component of the Plexus project")
4072 (description "Plexus-archiver contains a component to deal with project
4073 archives (jar).")
4074 (license license:asl2.0)))
4075
4076 (define-public java-plexus-container-default
4077 (package
4078 (inherit java-plexus-container-default-bootstrap)
4079 (name "java-plexus-container-default")
4080 (arguments
4081 `(#:jar-name "container-default.jar"
4082 #:source-dir "plexus-container-default/src/main/java"
4083 #:test-dir "plexus-container-default/src/test"
4084 #:test-exclude (list ;"**/*Test.java"
4085 "**/Abstract*.java"
4086 ;; Requires plexus-hierarchy
4087 "**/PlexusHierarchyTest.java"
4088 ;; Failures
4089 "**/ComponentRealmCompositionTest.java"
4090 "**/PlexusContainerTest.java")
4091 #:jdk ,icedtea-8
4092 #:phases
4093 (modify-phases %standard-phases
4094 (add-before 'build 'copy-resources
4095 (lambda _
4096 (copy-recursively
4097 "plexus-container-default/src/main/resources/"
4098 "build/classes")
4099 #t))
4100 (add-before 'check 'fix-paths
4101 (lambda _
4102 (let ((dir "plexus-container-default/src/test/java/org/codehaus"))
4103 (substitute*
4104 (string-append
4105 dir "/plexus/component/composition/"
4106 "ComponentRealmCompositionTest.java")
4107 (("src/test") "plexus-container-default/src/test"))
4108 #t))))))
4109 (inputs
4110 `(("worldclass" ,java-plexus-classworlds)
4111 ("xbean" ,java-geronimo-xbean-reflect)
4112 ("utils" ,java-plexus-utils)
4113 ("junit" ,java-junit)
4114 ("guava" ,java-guava)))
4115 (native-inputs
4116 `(("archiver" ,java-plexus-archiver)
4117 ("hamcrest" ,java-hamcrest-core)))))
4118
4119 (define-public java-plexus-component-annotations
4120 (package
4121 (inherit java-plexus-container-default)
4122 (name "java-plexus-component-annotations")
4123 (arguments
4124 `(#:jar-name "plexus-component-annotations.jar"
4125 #:source-dir "plexus-component-annotations/src/main/java"
4126 #:tests? #f)); no tests
4127 (inputs '())
4128 (native-inputs '())
4129 (synopsis "Plexus descriptors generator")
4130 (description "This package is a Maven plugin to generate Plexus descriptors
4131 from source tags and class annotations.")))
4132
4133 (define-public java-plexus-cipher
4134 (package
4135 (name "java-plexus-cipher")
4136 (version "1.7")
4137 (source (origin
4138 (method git-fetch)
4139 (uri (git-reference
4140 (url "https://github.com/codehaus-plexus/plexus-cipher")
4141 (commit (string-append "plexus-cipher-" version))))
4142 (file-name (git-file-name name version))
4143 (sha256
4144 (base32
4145 "0m638nzlxbmnbcj5cwdpgs326ab584yv0k803zlx37r6iqwvf6b0"))))
4146 (build-system ant-build-system)
4147 (arguments
4148 `(#:jar-name "plexus-cipher.jar"
4149 #:source-dir "src/main/java"
4150 #:jdk ,icedtea-8
4151 #:tests? #f; FIXME: requires sisu-inject-bean
4152 #:phases
4153 (modify-phases %standard-phases
4154 (add-before 'build 'copy-resources
4155 (lambda _
4156 (copy-recursively "src/main/resources" "build/classes")
4157 (mkdir-p "build/classes/META-INF/sisu")
4158 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
4159 (lambda _
4160 (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
4161 #t)))))
4162 (inputs
4163 `(("java-cdi-api" ,java-cdi-api)
4164 ("java-javax-inject" ,java-javax-inject)))
4165 (home-page "https://github.com/sonatype/plexus-cipher")
4166 (synopsis "Encryption/decryption Component")
4167 (description "Plexus-cipher contains a component to deal with encryption
4168 and decryption.")
4169 (license license:asl2.0)))
4170
4171 (define-public java-plexus-compiler-api
4172 (package
4173 (name "java-plexus-compiler-api")
4174 (version "2.8.4")
4175 (source (origin
4176 (method git-fetch)
4177 (uri (git-reference
4178 (url "https://github.com/codehaus-plexus/plexus-compiler")
4179 (commit (string-append "plexus-compiler-" version))))
4180 (file-name (git-file-name name version))
4181 (sha256
4182 (base32
4183 "1nq1gnn3s6z1j29gmi1hqbklsmm8b1lmnafb0191914f95mn18gk"))))
4184 (build-system ant-build-system)
4185 (arguments
4186 `(#:jar-name "plexus-compiler-api.jar"
4187 #:source-dir "plexus-compiler-api/src/main/java"
4188 #:jdk ,icedtea-8
4189 #:test-dir "plexus-compiler-api/src/test"))
4190 (inputs
4191 `(("java-plexus-container-default" ,java-plexus-container-default)
4192 ("java-plexus-util" ,java-plexus-utils)))
4193 (native-inputs
4194 `(("java-junit" ,java-junit)))
4195 (home-page "https://github.com/codehaus-plexus/plexus-compiler")
4196 (synopsis "Plexus Compilers component's API to manipulate compilers")
4197 (description "This package contains the API used by components to manipulate
4198 compilers.")
4199 (license (list license:asl2.0
4200 license:expat))))
4201
4202 (define-public java-plexus-compiler-javac
4203 (package
4204 (inherit java-plexus-compiler-api)
4205 (name "java-plexus-compiler-javac")
4206 (arguments
4207 `(#:jar-name "plexus-compiler-javac.jar"
4208 #:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java"
4209 #:jdk ,icedtea-8
4210 #:tests? #f; depends on compiler-test -> maven-core -> ... -> this package.
4211 #:test-dir "plexus-compilers/plexus-compiler-javac/src/test"))
4212 (inputs
4213 `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
4214 ("java-plexus-utils" ,java-plexus-utils)
4215 ("java-plexus-container-default" ,java-plexus-container-default)))
4216 (native-inputs
4217 `(("java-junit" ,java-junit)))
4218 (synopsis "Javac Compiler support for Plexus Compiler component")
4219 (description "This package contains the Javac Compiler support for Plexus
4220 Compiler component.")))
4221
4222 (define-public java-plexus-sec-dispatcher
4223 (package
4224 (name "java-plexus-sec-dispatcher")
4225 (version "1.4") ;; Newest release listed at the Maven Central Repository.
4226 (source (origin
4227 ;; This project doesn't tag releases or publish tarballs, so we take
4228 ;; the "prepare release plexus-sec-dispatcher-1.4" git commit.
4229 (method git-fetch)
4230 (uri (git-reference
4231 (url "https://github.com/sonatype/plexus-sec-dispatcher/")
4232 (commit "7db8f880486e192a1c5ea9544e01e756c3d49d0f")))
4233 (sha256
4234 (base32
4235 "1ng4yliy4cqpjr4fxxjbpwyk1wkch5f8vblm1kvwf328s4gibszs"))
4236 (file-name (git-file-name name version))))
4237 (arguments
4238 `(#:jar-name "plexus-sec-dispatcher.jar"
4239 #:source-dir "src/main/java"
4240 #:jdk ,icedtea-8
4241 #:phases
4242 (modify-phases %standard-phases
4243 (add-before 'build 'generate-models
4244 (lambda* (#:key inputs #:allow-other-keys)
4245 (define (modello-single-mode file version mode)
4246 (invoke "java"
4247 "org.codehaus.modello.ModelloCli"
4248 file mode "src/main/java" version
4249 "false" "true"))
4250 (let ((file "src/main/mdo/settings-security.mdo"))
4251 (modello-single-mode file "1.0.0" "java")
4252 (modello-single-mode file "1.0.0" "xpp3-reader")
4253 (modello-single-mode file "1.0.0" "xpp3-writer"))
4254 #t))
4255 (add-before 'build 'generate-components.xml
4256 (lambda _
4257 (mkdir-p "build/classes/META-INF/plexus")
4258 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
4259 (lambda _
4260 (display
4261 "<component-set>\n
4262 <components>\n
4263 <component>\n
4264 <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n
4265 <role-hint>default</role-hint>\n
4266 <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n
4267 <description></description>\n
4268 <requirements>\n
4269 <requirement>\n
4270 <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n
4271 <field-name>_cipher</field-name>\n
4272 </requirement>\n
4273 <requirement>\n
4274 <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n
4275 <field-name>_decryptors</field-name>\n
4276 </requirement>\n
4277 </requirements>\n
4278 <configuration>\n
4279 <_configuration-file>~/.settings-security.xml</_configuration-file>\n
4280 </configuration>\n
4281 </component>\n
4282 </components>\n
4283 </component-set>\n")))
4284 #t))
4285 (add-before 'check 'fix-paths
4286 (lambda _
4287 (copy-recursively "src/test/resources" "target")
4288 #t)))))
4289 (inputs
4290 `(("java-plexus-cipher" ,java-plexus-cipher)))
4291 (native-inputs
4292 `(("java-modello-core" ,java-modello-core)
4293 ;; for modello:
4294 ("java-plexus-container-default" ,java-plexus-container-default)
4295 ("java-plexus-classworlds" ,java-plexus-classworlds)
4296 ("java-plexus-utils" ,java-plexus-utils)
4297 ("java-guava" ,java-guava)
4298 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4299 ("java-sisu-build-api" ,java-sisu-build-api)
4300 ;; modello plugins:
4301 ("java-modellop-plugins-java" ,java-modello-plugins-java)
4302 ("java-modellop-plugins-xml" ,java-modello-plugins-xml)
4303 ("java-modellop-plugins-xpp3" ,java-modello-plugins-xpp3)
4304 ;; for tests
4305 ("java-junit" ,java-junit)))
4306 (build-system ant-build-system)
4307 (home-page "https://github.com/sonatype/plexus-sec-dispatcher")
4308 (synopsis "Plexus Security Dispatcher Component")
4309 (description "This package is the Plexus Security Dispatcher Component.
4310 This component decrypts a string passed to it.")
4311 (license license:asl2.0)))
4312
4313 (define-public java-plexus-cli
4314 (package
4315 (name "java-plexus-cli")
4316 (version "1.7")
4317 (source (origin
4318 (method git-fetch)
4319 (uri (git-reference
4320 (url "https://github.com/sonatype/plexus-cli")
4321 (commit "a776afa6bca84e5107bedb69440329cdb24ed645")))
4322 (file-name (string-append name "-" version))
4323 (sha256
4324 (base32
4325 "0xjrlay605rypv3zd7y24vlwf0039bil3n2cqw54r1ddpysq46vx"))))
4326 (build-system ant-build-system)
4327 (arguments
4328 `(#:jar-name "plexus-cli.jar"
4329 #:source-dir "src/main/java"
4330 #:jdk ,icedtea-8
4331 #:test-dir "src/test"))
4332 (inputs
4333 `(("java-commons-cli" ,java-commons-cli)
4334 ("java-plexus-container-default" ,java-plexus-container-default)
4335 ("java-plexus-classworlds" ,java-plexus-classworlds)))
4336 (native-inputs
4337 `(("java-plexus-utils" ,java-plexus-utils)
4338 ("java-junit" ,java-junit)
4339 ("java-guava" ,java-guava)))
4340 (home-page "https://codehaus-plexus.github.io/plexus-cli")
4341 (synopsis "CLI building library for plexus")
4342 (description "This package is a library to help creating CLI around
4343 Plexus components.")
4344 (license license:asl2.0)))
4345
4346 (define-public java-sisu-build-api
4347 (package
4348 (name "java-sisu-build-api")
4349 (version "0.0.7")
4350 (source (origin
4351 (method git-fetch)
4352 (uri (git-reference
4353 (url "https://github.com/sonatype/sisu-build-api")
4354 (commit (string-append "plexus-build-api-" version))))
4355 (file-name (git-file-name name version))
4356 (sha256
4357 (base32
4358 "1d5w6c58gkx30d51v7qwv1xrhc0ly76848gihmgshj19yf6yhca0"))))
4359 (build-system ant-build-system)
4360 (arguments
4361 `(#:jar-name "sisu-build-api.jar"
4362 #:source-dir "src/main/java"
4363 #:jdk ,icedtea-8
4364 #:tests? #f; FIXME: how to run the tests?
4365 #:phases
4366 (modify-phases %standard-phases
4367 (add-before 'build 'copy-resources
4368 (lambda _
4369 (copy-recursively "src/main/resources" "build/classes")
4370 (substitute* (find-files "build/classes")
4371 (("\\$\\{project.version\\}") ,version))
4372 #t))
4373 (add-before 'build 'generate-plexus-compontent
4374 (lambda _
4375 (mkdir-p "build/classes/META-INF/plexus")
4376 ;; This file is required for plexus to inject this package.
4377 ;; FIXME: how is it generated?
4378 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
4379 (lambda _
4380 (display
4381 "<component-set>\n
4382 <components>\n
4383 <component>\n
4384 <role>org.sonatype.plexus.build.incremental.BuildContext</role>\n
4385 <role-hint>default</role-hint>\n
4386 <implementation>org.sonatype.plexus.build.incremental.DefaultBuildContext</implementation>\n
4387 <description>Filesystem based non-incremental build context implementation\n
4388 which behaves as if all files were just created.</description>\n
4389 </component>\n
4390 </components>\n
4391 </component-set>\n")))
4392 #t)))))
4393 (inputs
4394 `(("java-plexus-utils" ,java-plexus-utils)
4395 ("java-plexus-container-default" ,java-plexus-container-default)))
4396 (home-page "https://github.com/sonatype/sisu-build-api/")
4397 (synopsis "Base build API for maven")
4398 (description "This package contains the base build API for maven and
4399 a default implementation of it. This API is about scanning files in a
4400 project and determining what files need to be rebuilt.")
4401 (license license:asl2.0)))
4402
4403 (define-public java-modello-core
4404 (package
4405 (name "java-modello-core")
4406 (version "1.9.1")
4407 (source (origin
4408 (method git-fetch)
4409 (uri (git-reference
4410 (url "https://github.com/codehaus-plexus/modello")
4411 (commit (string-append "modello-" version))))
4412 (file-name (git-file-name name version))
4413 (sha256
4414 (base32
4415 "1di6ni42aqllpdvkpyfcw70352vr2i8wf6hd5nhd9kmqjb5dj5j4"))))
4416 (build-system ant-build-system)
4417 (arguments
4418 `(#:jar-name "modello-core.jar"
4419 #:source-dir "modello-core/src/main/java"
4420 #:test-dir "modello-core/src/test"
4421 #:main-class "org.codehaus.modello.ModelloCli"
4422 #:jdk ,icedtea-8
4423 #:phases
4424 (modify-phases %standard-phases
4425 (add-before 'build 'copy-resources
4426 (lambda _
4427 (mkdir-p "build/classes/META-INF/plexus")
4428 (copy-file "modello-core/src/main/resources/META-INF/plexus/components.xml"
4429 "build/classes/META-INF/plexus/components.xml")
4430 #t))
4431 (add-before 'check 'fix-tests
4432 (lambda _
4433 (with-directory-excursion "modello-core/src/test/java/org/codehaus"
4434 (substitute* '("modello/core/DefaultModelloCoreTest.java"
4435 "modello/core/io/ModelReaderTest.java")
4436 (("src/test") "modello-core/src/test")))
4437 #t)))))
4438 (inputs
4439 `(("java-plexus-utils" ,java-plexus-utils)
4440 ("java-plexus-container-default" ,java-plexus-container-default)
4441 ("java-sisu-build-api" ,java-sisu-build-api)))
4442 (native-inputs
4443 `(("java-junit" ,java-junit)
4444 ("java-plexus-classworlds" ,java-plexus-classworlds)
4445 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4446 ("java-guava" ,java-guava)))
4447 (home-page "https://codehaus-plexus.github.io/modello/")
4448 (synopsis "Framework for code generation from a simple model")
4449 (description "Modello is a framework for code generation from a simple model.
4450
4451 Modello generates code from a simple model format: based on a plugin
4452 architecture, various types of code and descriptors can be generated from the
4453 single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers,
4454 XSD and documentation.")
4455 (license (list
4456 license:expat
4457 ;; Although this package uses only files licensed under expat,
4458 ;; other parts of the source are licensed under different
4459 ;; licenses. We include them to be inherited by other packages.
4460 license:asl2.0
4461 ;; Some files in modello-plugin-java are licensed under a
4462 ;; 5-clause BSD license.
4463 (license:non-copyleft
4464 (string-append "file:///modello-plugins/modello-plugin-java/"
4465 "src/main/java/org/codehaus/modello/plugin/"
4466 "java/javasource/JNaming.java"))))))
4467
4468 (define-public java-modello-plugins-java
4469 (package
4470 (inherit java-modello-core)
4471 (name "java-modello-plugins-java")
4472 (arguments
4473 `(#:jar-name "modello-plugins-java.jar"
4474 #:source-dir "modello-plugins/modello-plugin-java/src/main/java"
4475 #:test-dir "modello-plugins/modello-plugin-java/src/test"
4476 #:jdk ,icedtea-8
4477 #:tests? #f; requires maven-model, which depends on this package
4478 #:phases
4479 (modify-phases %standard-phases
4480 (add-before 'build 'copy-resources
4481 (lambda _
4482 (mkdir-p "build/classes")
4483 (copy-recursively "modello-plugins/modello-plugin-java/src/main/resources"
4484 "build/classes")
4485 #t)))))
4486 (inputs
4487 `(("java-modello-core" ,java-modello-core)
4488 ,@(package-inputs java-modello-core)))
4489 (synopsis "Modello Java Plugin")
4490 (description "Modello Java Plugin generates Java objects for the model.")))
4491
4492 (define-public java-modello-plugins-xml
4493 (package
4494 (inherit java-modello-core)
4495 (name "java-modello-plugins-xml")
4496 (arguments
4497 `(#:jar-name "modello-plugins-xml.jar"
4498 #:source-dir "modello-plugins/modello-plugin-xml/src/main/java"
4499 #:test-dir "modello-plugins/modello-plugin-xml/src/test"
4500 #:jdk ,icedtea-8
4501 #:phases
4502 (modify-phases %standard-phases
4503 (add-before 'build 'copy-resources
4504 (lambda _
4505 (mkdir-p "build/classes")
4506 (copy-recursively
4507 "modello-plugins/modello-plugin-xml/src/main/resources"
4508 "build/classes")
4509 #t))
4510 (add-before 'check 'fix-paths
4511 (lambda _
4512 (with-directory-excursion "modello-plugins/modello-plugin-xml/src/test"
4513 (substitute*
4514 "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java"
4515 (("src/test") "modello-plugins/modello-plugin-xml/src/test")))
4516 #t)))))
4517 (inputs
4518 `(("java-modello-core" ,java-modello-core)
4519 ("java-modello-plugins-java" ,java-modello-plugins-java)
4520 ,@(package-inputs java-modello-core)))
4521 (synopsis "Modello XML Plugin")
4522 (description "Modello XML Plugin contains shared code for every plugins
4523 working on XML representation of the model.")))
4524
4525 (define-public java-modello-test
4526 (package
4527 (inherit java-modello-core)
4528 (name "java-modello-test")
4529 (arguments
4530 `(#:jar-name "modello-test.jar"
4531 #:source-dir "modello-test/src/main/java"
4532 #:tests? #f; no tests
4533 #:jdk ,icedtea-8))
4534 (inputs
4535 `(("java-plexus-utils" ,java-plexus-utils)
4536 ("java-plexus-compiler-api" ,java-plexus-compiler-api)
4537 ("java-plexus-compiler-javac" ,java-plexus-compiler-javac)
4538 ("java-plexus-container-default" ,java-plexus-container-default)))
4539 (synopsis "Modello test package")
4540 (description "The modello test package contains the basis to create
4541 Modello generator unit-tests, including sample models and xml files to test
4542 every feature for every plugin.")))
4543
4544 (define-public java-modello-plugins-xpp3
4545 (package
4546 (inherit java-modello-core)
4547 (name "java-modello-plugins-xpp3")
4548 (arguments
4549 `(#:jar-name "modello-plugins-xpp3.jar"
4550 #:source-dir "modello-plugins/modello-plugin-xpp3/src/main/java"
4551 #:test-dir "modello-plugins/modello-plugin-xpp3/src/test"
4552 ;; One of the test dependencies is maven-model which depends on this package.
4553 #:tests? #f
4554 #:jdk ,icedtea-8
4555 #:phases
4556 (modify-phases %standard-phases
4557 (add-before 'build 'copy-resources
4558 (lambda _
4559 (mkdir-p "build/classes")
4560 (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources"
4561 "build/classes")
4562 #t)))))
4563 (inputs
4564 `(("java-modello-core" ,java-modello-core)
4565 ("java-modello-plugins-java" ,java-modello-plugins-java)
4566 ("java-modello-plugins-xml" ,java-modello-plugins-xml)
4567 ,@(package-inputs java-modello-core)))
4568 (native-inputs
4569 `(("java-xmlunit" ,java-xmlunit)
4570 ("java-modello-test" ,java-modello-test)
4571 ,@(package-native-inputs java-modello-core)))
4572 (synopsis "Modello XPP3 Plugin")
4573 (description "The modello XPP3 plugin generates XML readers and writers based
4574 on the XPP3 API (XML Pull Parser).")))
4575
4576 (define-public java-asm
4577 (package
4578 (name "java-asm")
4579 (version "6.0")
4580 (source (origin
4581 (method url-fetch)
4582 (uri (string-append "https://download.forge.ow2.org/asm/"
4583 "asm-" version ".tar.gz"))
4584 (sha256
4585 (base32
4586 "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00"))))
4587 (build-system ant-build-system)
4588 (arguments
4589 `(#:build-target "compile"
4590 ;; The tests require an old version of Janino, which no longer compiles
4591 ;; with the JDK7.
4592 #:tests? #f
4593 #:make-flags
4594 (list
4595 ;; We don't need these extra ant tasks, but the build system asks us to
4596 ;; provide a path anyway.
4597 "-Dobjectweb.ant.tasks.path=dummy-path"
4598 ;; The java-aqute.bndlib JAR file will be put onto the classpath and
4599 ;; used during the build automatically by ant-build-system, but
4600 ;; java-asm's build.xml fails unless we provide something here.
4601 "-Dbiz.aQute.bnd.path=dummy-path")
4602 #:phases
4603 (modify-phases %standard-phases
4604 (add-before 'build 'remove-bnd-dependency
4605 (lambda _
4606 ;; This file is the only one to require bnd, and is not needed
4607 ;; because we don't build a bundle.
4608 (delete-file "src/org/objectweb/asm/tools/ModuleInfoBndPlugin.java")
4609 #t))
4610 (add-before 'install 'build-jars
4611 (lambda* (#:key make-flags #:allow-other-keys)
4612 ;; We cannot use the "jar" target because it depends on a couple
4613 ;; of unpackaged, complicated tools.
4614 (mkdir "dist")
4615 (invoke "jar"
4616 "-cf" (string-append "dist/asm-" ,version ".jar")
4617 "-C" "output/build/tmp" ".")))
4618 (replace 'install
4619 (install-jars "dist")))))
4620 (native-inputs
4621 `(("java-junit" ,java-junit)))
4622 (home-page "https://asm.ow2.io/")
4623 (synopsis "Very small and fast Java bytecode manipulation framework")
4624 (description "ASM is an all purpose Java bytecode manipulation and
4625 analysis framework. It can be used to modify existing classes or dynamically
4626 generate classes, directly in binary form. The provided common
4627 transformations and analysis algorithms allow easily assembling custom
4628 complex transformations and code analysis tools.")
4629 (license license:bsd-3)))
4630
4631 (define java-asm-bootstrap
4632 (package
4633 (inherit java-asm)
4634 (name "java-asm-bootstrap")
4635 (arguments
4636 (substitute-keyword-arguments (package-arguments java-asm)
4637 ((#:tests? _) #f)))
4638 (native-inputs `())))
4639
4640 (define-public java-cglib
4641 (package
4642 (name "java-cglib")
4643 (version "3.2.4")
4644 (source
4645 (origin
4646 (method git-fetch)
4647 (uri (git-reference
4648 (url "https://github.com/cglib/cglib")
4649 (commit (string-append
4650 "RELEASE_"
4651 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
4652 version)))))
4653 (file-name (git-file-name name version))
4654 (sha256
4655 (base32 "186451jms2zfp47yd8kxd77az2cqal1my2br7klgyp8fpl4qfg8v"))))
4656 (build-system ant-build-system)
4657 (arguments
4658 `(;; FIXME: tests fail because junit runs
4659 ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem
4660 ;; to describe a test at all.
4661 #:tests? #f
4662 #:jar-name "cglib.jar"
4663 #:phases
4664 (modify-phases %standard-phases
4665 (add-after 'unpack 'chdir
4666 (lambda _ (chdir "cglib") #t)))))
4667 (inputs
4668 `(("java-asm" ,java-asm)
4669 ("java-junit" ,java-junit)))
4670 (home-page "https://github.com/cglib/cglib/")
4671 (synopsis "Java byte code generation library")
4672 (description "The byte code generation library CGLIB is a high level API
4673 to generate and transform Java byte code.")
4674 (license license:asl2.0)))
4675
4676 (define-public java-objenesis
4677 (package
4678 (name "java-objenesis")
4679 (version "2.5.1")
4680 (source (origin
4681 (method git-fetch)
4682 (uri (git-reference
4683 (url "https://github.com/easymock/objenesis")
4684 (commit version)))
4685 (file-name (git-file-name name version))
4686 (sha256
4687 (base32
4688 "054yi200wj00x6dp1sxfrwgndwywadsbn8d8ij1j0v45j9g2vdya"))))
4689 (build-system ant-build-system)
4690 (arguments
4691 `(#:jar-name "objenesis.jar"
4692 #:source-dir "main/src/"
4693 #:test-dir "main/src/test/"))
4694 (native-inputs
4695 `(("java-junit" ,java-junit)
4696 ("java-hamcrest-core" ,java-hamcrest-core)))
4697 (home-page "http://objenesis.org/")
4698 (synopsis "Bypass the constructor when creating an object")
4699 (description "Objenesis is a small Java library that serves one purpose:
4700 to instantiate a new object of a particular class. It is common to see
4701 restrictions in libraries stating that classes must require a default
4702 constructor. Objenesis aims to overcome these restrictions by bypassing the
4703 constructor on object instantiation.")
4704 (license license:asl2.0)))
4705
4706 (define-public java-easymock
4707 (package
4708 (name "java-easymock")
4709 (version "3.4")
4710 (source (origin
4711 (method git-fetch)
4712 (uri (git-reference
4713 (url "https://github.com/easymock/easymock/")
4714 (commit (string-append "easymock-" version))))
4715 (file-name (git-file-name name version))
4716 (sha256
4717 (base32
4718 "02vybm8hc0i0n9sp2f2iiqn54zwqhq835f76wc6b2m7819z5a8dq"))))
4719 (build-system ant-build-system)
4720 (arguments
4721 `(#:jar-name "easymock.jar"
4722 #:source-dir "core/src/main"
4723 #:test-dir "core/src/test"
4724 #:phases
4725 (modify-phases %standard-phases
4726 ;; FIXME: Android support requires the following packages to be
4727 ;; available: com.google.dexmaker.stock.ProxyBuilder
4728 (add-after 'unpack 'delete-android-support
4729 (lambda _
4730 (with-directory-excursion "core/src/main/java/org/easymock/internal"
4731 (substitute* "MocksControl.java"
4732 (("AndroidSupport.isAndroid\\(\\)") "false")
4733 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
4734 (delete-file "AndroidClassProxyFactory.java"))
4735 #t))
4736 (add-after 'unpack 'delete-broken-tests
4737 (lambda _
4738 (with-directory-excursion "core/src/test/java/org/easymock"
4739 ;; This test depends on dexmaker.
4740 (delete-file "tests2/ClassExtensionHelperTest.java")
4741
4742 ;; This is not a test.
4743 (delete-file "tests/BaseEasyMockRunnerTest.java")
4744
4745 ;; This test should be executed with a different runner...
4746 (delete-file "tests2/EasyMockAnnotationsTest.java")
4747 ;; ...but deleting it means that we also have to delete these
4748 ;; dependent files.
4749 (delete-file "tests2/EasyMockRunnerTest.java")
4750 (delete-file "tests2/EasyMockRuleTest.java")
4751
4752 ;; This test fails because the file "easymock.properties" does
4753 ;; not exist.
4754 (delete-file "tests2/EasyMockPropertiesTest.java"))
4755 #t)))))
4756 (inputs
4757 `(("java-asm" ,java-asm)
4758 ("java-cglib" ,java-cglib)
4759 ("java-objenesis" ,java-objenesis)))
4760 (native-inputs
4761 `(("java-junit" ,java-junit)
4762 ("java-hamcrest-core" ,java-hamcrest-core)))
4763 (home-page "https://easymock.org/")
4764 (synopsis "Java library providing mock objects for unit tests")
4765 (description "EasyMock is a Java library that provides an easy way to use
4766 mock objects in unit testing.")
4767 (license license:asl2.0)))
4768
4769 (define-public java-jmock-1
4770 (package
4771 (name "java-jmock")
4772 (version "1.2.0")
4773 (source (origin
4774 (method git-fetch)
4775 (uri (git-reference
4776 (url "https://github.com/jmock-developers/jmock-library")
4777 (commit version)))
4778 (file-name (git-file-name name version))
4779 (sha256
4780 (base32
4781 "0lkga995xd9b9mmzxmcd301hlw83p1h78nibh7djlx7wydscr85z"))))
4782 (build-system ant-build-system)
4783 (arguments
4784 `(#:build-target "jars"
4785 #:test-target "run.tests"
4786 #:phases
4787 (modify-phases %standard-phases
4788 (replace 'install (install-jars "build")))))
4789 (home-page "http://jmock.org/")
4790 (synopsis "Mock object library for test-driven development")
4791 (description "JMock is a library that supports test-driven development of
4792 Java code with mock objects. Mock objects help you design and test the
4793 interactions between the objects in your programs.
4794
4795 The jMock library
4796
4797 @itemize
4798 @item makes it quick and easy to define mock objects
4799 @item lets you precisely specify the interactions between
4800 your objects, reducing the brittleness of your tests
4801 @item plugs into your favourite test framework
4802 @item is easy to extend.
4803 @end itemize\n")
4804 (license license:bsd-3)))
4805
4806 (define-public java-jmock
4807 (package
4808 (inherit java-jmock-1)
4809 (name "java-jmock")
4810 (version "2.8.2")
4811 (source (origin
4812 (method git-fetch)
4813 (uri (git-reference
4814 (url "https://github.com/jmock-developers/jmock-library")
4815 (commit version)))
4816 (file-name (git-file-name name version))
4817 (sha256
4818 (base32
4819 "12b7l22g3nrjvf2dzcw3z03fpd2chrgp0d8xkvn8w55rwb57pax6"))))
4820 (inputs
4821 `(("java-hamcrest-all" ,java-hamcrest-all)
4822 ("java-asm" ,java-asm)
4823 ("java-bsh" ,java-bsh)
4824 ("java-junit" ,java-junit)))
4825 (native-inputs
4826 `(("cglib" ,java-cglib)))
4827 (arguments
4828 `(#:jar-name "java-jmock.jar"
4829 #:source-dir "jmock/src/main/java"
4830 #:test-dir "jmock/src/test"))))
4831
4832 (define-public java-jmock-junit4
4833 (package
4834 (inherit java-jmock)
4835 (name "java-jmock-junit4")
4836 (arguments
4837 `(#:jar-name "java-jmock-junit4.jar"
4838 #:source-dir "jmock-junit4/src/main/java"
4839 #:test-dir "jmock-junit4/src/test"))
4840 (inputs
4841 `(("java-hamcrest-all" ,java-hamcrest-all)
4842 ("java-asm" ,java-asm)
4843 ("java-bsh" ,java-bsh)
4844 ("java-jmock" ,java-jmock)
4845 ("java-jumit" ,java-junit)))))
4846
4847 (define-public java-jmock-legacy
4848 (package
4849 (inherit java-jmock)
4850 (name "java-jmock-legacy")
4851 (arguments
4852 `(#:jar-name "java-jmock-legacy.jar"
4853 #:source-dir "jmock-legacy/src/main/java"
4854 #:test-dir "jmock-legacy/src/test"
4855 #:phases
4856 (modify-phases %standard-phases
4857 (add-before 'check 'copy-tests
4858 (lambda _
4859 ;; This file is a dependancy of some tests
4860 (let ((file "org/jmock/test/acceptance/PackageProtectedType.java"))
4861 (copy-file (string-append "jmock/src/test/java/" file)
4862 (string-append "jmock-legacy/src/test/java/" file))
4863 #t))))))
4864 (inputs
4865 `(("java-hamcrest-all" ,java-hamcrest-all)
4866 ("java-objenesis" ,java-objenesis)
4867 ("java-cglib" ,java-cglib)
4868 ("java-jmock" ,java-jmock)
4869 ("java-asm" ,java-asm)
4870 ("java-bsh" ,java-bsh)
4871 ("java-junit" ,java-junit)))
4872 (native-inputs
4873 `(("java-jmock-junit4" ,java-jmock-junit4)))))
4874
4875 (define-public java-hamcrest-all
4876 (package (inherit java-hamcrest-core)
4877 (name "java-hamcrest-all")
4878 (arguments
4879 `(#:jdk ,icedtea-8
4880 ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core)
4881 ((#:build-target _) "bigjar")
4882 ((#:phases phases)
4883 `(modify-phases ,phases
4884 ;; Some build targets override the classpath, so we need to patch
4885 ;; the build.xml to ensure that required dependencies are on the
4886 ;; classpath.
4887 (add-after 'unpack 'patch-classpath-for-integration
4888 (lambda* (#:key inputs #:allow-other-keys)
4889 (substitute* "build.xml"
4890 ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
4891 (string-join
4892 (cons line
4893 (append
4894 (find-files (assoc-ref inputs "java-junit") "\\.jar$")
4895 (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
4896 (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
4897 ";"))
4898 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
4899 (car (find-files (assoc-ref inputs "java-hamcrest-core")
4900 "jar$"))))
4901 #t))
4902 (replace 'install
4903 (lambda* (#:key outputs #:allow-other-keys)
4904 (let* ((target (string-append (assoc-ref outputs "out")
4905 "/share/java/"))
4906 (version-suffix
4907 ,(string-append
4908 "-" (package-version java-hamcrest-core) ".jar"))
4909 (install-without-version-suffix
4910 (lambda (jar)
4911 (copy-file jar
4912 (string-append target
4913 (basename jar version-suffix)
4914 ".jar")))))
4915 (mkdir-p target)
4916 (for-each
4917 install-without-version-suffix
4918 (find-files "build"
4919 (lambda (name _)
4920 (and (string-suffix? ".jar" name)
4921 (not (string-suffix? "-sources.jar" name)))))))
4922 #t)))))))
4923 (inputs
4924 `(("java-junit" ,java-junit)
4925 ("java-jmock" ,java-jmock-1)
4926 ;; This is necessary because of what seems to be a race condition.
4927 ;; This package would sometimes fail to build because hamcrest-core.jar
4928 ;; could not be found, even though it is built as part of this package.
4929 ;; Adding java-hamcrest-core appears to fix this problem. See
4930 ;; https://debbugs.gnu.org/31390 for more information.
4931 ("java-hamcrest-core" ,java-hamcrest-core)
4932 ("java-easymock" ,java-easymock)
4933 ,@(package-inputs java-hamcrest-core)))))
4934
4935 (define-public java-jopt-simple
4936 (package
4937 (name "java-jopt-simple")
4938 (version "5.0.3")
4939 (source (origin
4940 (method url-fetch)
4941 (uri (string-append "http://repo1.maven.org/maven2/"
4942 "net/sf/jopt-simple/jopt-simple/"
4943 version "/jopt-simple-"
4944 version "-sources.jar"))
4945 (sha256
4946 (base32
4947 "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa"))))
4948 (build-system ant-build-system)
4949 (arguments
4950 `(#:tests? #f ; there are no tests
4951 #:jar-name "jopt-simple.jar"))
4952 (home-page "https://pholser.github.io/jopt-simple/")
4953 (synopsis "Java library for parsing command line options")
4954 (description "JOpt Simple is a Java library for parsing command line
4955 options, such as those you might pass to an invocation of @code{javac}. In
4956 the interest of striving for simplicity, as closely as possible JOpt Simple
4957 attempts to honor the command line option syntaxes of POSIX @code{getopt} and
4958 GNU @code{getopt_long}. It also aims to make option parser configuration and
4959 retrieval of options and their arguments simple and expressive, without being
4960 overly clever.")
4961 (license license:expat)))
4962
4963 (define-public java-commons-math3
4964 (package
4965 (name "java-commons-math3")
4966 (version "3.6.1")
4967 (source (origin
4968 (method url-fetch)
4969 (uri (string-append "mirror://apache/commons/math/source/"
4970 "commons-math3-" version "-src.tar.gz"))
4971 (sha256
4972 (base32
4973 "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6"))))
4974 (build-system ant-build-system)
4975 (arguments
4976 `(#:build-target "jar"
4977 #:test-target "test"
4978 #:make-flags
4979 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
4980 (junit (assoc-ref %build-inputs "java-junit")))
4981 (list (string-append "-Djunit.jar="
4982 (car (find-files junit "jar$")))
4983 (string-append "-Dhamcrest.jar="
4984 (car (find-files hamcrest ".*.jar$")))))
4985 #:phases
4986 (modify-phases %standard-phases
4987 ;; We want to build the jar in the build phase and run the tests
4988 ;; later in a separate phase.
4989 (add-after 'unpack 'untangle-targets
4990 (lambda _
4991 (substitute* "build.xml"
4992 (("name=\"jar\" depends=\"test\"")
4993 "name=\"jar\" depends=\"compile\""))
4994 #t))
4995 ;; There is no install target.
4996 (replace 'install
4997 (install-jars "target")))))
4998 (native-inputs
4999 `(("java-junit" ,java-junit)
5000 ("java-hamcrest-core" ,java-hamcrest-core)))
5001 (home-page "https://commons.apache.org/math/")
5002 (synopsis "Apache Commons mathematics library")
5003 (description "Commons Math is a library of lightweight, self-contained
5004 mathematics and statistics components addressing the most common problems not
5005 available in the Java programming language or Commons Lang.")
5006 (license license:asl2.0)))
5007
5008 (define-public java-jmh
5009 (package
5010 (name "java-jmh")
5011 (version "1.17.5")
5012 (source (origin
5013 (method hg-fetch)
5014 (uri (hg-reference
5015 (url "http://hg.openjdk.java.net/code-tools/jmh/")
5016 (changeset version)))
5017 (file-name (string-append name "-" version "-checkout"))
5018 (sha256
5019 (base32
5020 "1fxyxhg9famwcg1prc4cgwb5wzyxqavn3cjm5vz8605xz7x5k084"))))
5021 (build-system ant-build-system)
5022 (arguments
5023 `(#:jar-name "jmh-core.jar"
5024 #:source-dir "jmh-core/src/main"
5025 #:test-dir "jmh-core/src/test"
5026 #:phases
5027 (modify-phases %standard-phases
5028 ;; This seems to be a bug in the JDK. It may not be necessary in
5029 ;; future versions of the JDK.
5030 (add-after 'unpack 'fix-bug
5031 (lambda _
5032 (with-directory-excursion
5033 "jmh-core/src/main/java/org/openjdk/jmh/runner/options"
5034 (substitute* '("IntegerValueConverter.java"
5035 "ThreadsValueConverter.java")
5036 (("public Class<Integer> valueType")
5037 "public Class<? extends Integer> valueType")))
5038 #t)))))
5039 (inputs
5040 `(("java-jopt-simple" ,java-jopt-simple)
5041 ("java-commons-math3" ,java-commons-math3)))
5042 (native-inputs
5043 `(("java-junit" ,java-junit)
5044 ("java-hamcrest-core" ,java-hamcrest-core)))
5045 (home-page "https://openjdk.java.net/projects/code-tools/jmh/")
5046 (synopsis "Benchmark harness for the JVM")
5047 (description "JMH is a Java harness for building, running, and analysing
5048 nano/micro/milli/macro benchmarks written in Java and other languages
5049 targeting the JVM.")
5050 ;; GPLv2 only
5051 (license license:gpl2)))
5052
5053 (define-public java-commons-collections4
5054 (package
5055 (name "java-commons-collections4")
5056 (version "4.1")
5057 (source (origin
5058 (method url-fetch)
5059 (uri (string-append "mirror://apache/commons/collections/source/"
5060 "commons-collections4-" version "-src.tar.gz"))
5061 (sha256
5062 (base32
5063 "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl"))))
5064 (build-system ant-build-system)
5065 (arguments
5066 `(#:test-target "test"
5067 #:make-flags
5068 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
5069 (junit (assoc-ref %build-inputs "java-junit"))
5070 (easymock (assoc-ref %build-inputs "java-easymock")))
5071 (list (string-append "-Djunit.jar="
5072 (car (find-files junit "jar$")))
5073 (string-append "-Dhamcrest.jar="
5074 (car (find-files hamcrest "jar$")))
5075 (string-append "-Deasymock.jar=" easymock
5076 "/share/java/easymock.jar")))
5077 #:phases
5078 (modify-phases %standard-phases
5079 (replace 'install
5080 (install-jars "target")))))
5081 (native-inputs
5082 `(("java-junit" ,java-junit)
5083 ("java-hamcrest-core" ,java-hamcrest-core)
5084 ("java-easymock" ,java-easymock)))
5085 (home-page "https://commons.apache.org/collections/")
5086 (synopsis "Collections framework")
5087 (description "The Java Collections Framework is the recognised standard
5088 for collection handling in Java. Commons-Collections seek to build upon the
5089 JDK classes by providing new interfaces, implementations and utilities. There
5090 are many features, including:
5091
5092 @itemize
5093 @item @code{Bag} interface for collections that have a number of copies of
5094 each object
5095 @item @code{BidiMap} interface for maps that can be looked up from value to
5096 key as well and key to value
5097 @item @code{MapIterator} interface to provide simple and quick iteration over
5098 maps
5099 @item Transforming decorators that alter each object as it is added to the
5100 collection
5101 @item Composite collections that make multiple collections look like one
5102 @item Ordered maps and sets that retain the order elements are added in,
5103 including an LRU based map
5104 @item Reference map that allows keys and/or values to be garbage collected
5105 under close control
5106 @item Many comparator implementations
5107 @item Many iterator implementations
5108 @item Adapter classes from array and enumerations to collections
5109 @item Utilities to test or create typical set-theory properties of collections
5110 such as union, intersection, and closure.
5111 @end itemize\n")
5112 (license license:asl2.0)))
5113
5114 (define-public java-commons-collections
5115 (package
5116 (inherit java-commons-collections4)
5117 (name "java-commons-collections")
5118 (version "3.2.2")
5119 (source (origin
5120 (method url-fetch)
5121 (uri (string-append "mirror://apache/commons/collections/source/"
5122 "commons-collections-" version "-src.tar.gz"))
5123 (sha256
5124 (base32
5125 "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387"))
5126 (patches
5127 (search-patches "java-commons-collections-fix-java8.patch"))))
5128 (arguments
5129 (substitute-keyword-arguments (package-arguments java-commons-collections4)
5130 ((#:phases phases)
5131 `(modify-phases ,phases
5132 ;; The manifest is required by the build procedure
5133 (add-before 'build 'add-manifest
5134 (lambda _
5135 (mkdir-p "build/conf")
5136 (call-with-output-file "build/conf/MANIFEST.MF"
5137 (lambda (file)
5138 (format file "Manifest-Version: 1.0\n")))
5139 #t))
5140 (replace 'install
5141 (install-jars "build"))))))))
5142
5143 (define java-commons-collections-test-classes
5144 (package
5145 (inherit java-commons-collections)
5146 (arguments
5147 `(#:jar-name "commons-collections-test-classes.jar"
5148 #:source-dir "src/test"
5149 #:tests? #f))
5150 (inputs
5151 `(("collection" ,java-commons-collections)))))
5152
5153 (define-public java-commons-beanutils
5154 (package
5155 (name "java-commons-beanutils")
5156 (version "1.9.3")
5157 (source (origin
5158 (method url-fetch)
5159 (uri (string-append "mirror://apache/commons/beanutils/source/"
5160 "commons-beanutils-" version "-src.tar.gz"))
5161 (sha256
5162 (base32
5163 "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk"))))
5164 (build-system ant-build-system)
5165 (arguments
5166 `(#:test-target "test"
5167 #:tests? #f
5168 #:phases
5169 (modify-phases %standard-phases
5170 (replace 'install
5171 (lambda* (#:key outputs #:allow-other-keys)
5172 (rename-file (string-append "dist/commons-beanutils-" ,version
5173 "-SNAPSHOT.jar")
5174 "commons-beanutils.jar")
5175 (install-file "commons-beanutils.jar"
5176 (string-append (assoc-ref outputs "out") "/share/java/"))
5177 #t)))))
5178 (inputs
5179 `(("logging" ,java-commons-logging-minimal)
5180 ("collections" ,java-commons-collections)))
5181 (native-inputs
5182 `(("junit" ,java-junit)
5183 ("collections-test" ,java-commons-collections-test-classes)))
5184 (home-page "https://commons.apache.org/beanutils/")
5185 (synopsis "Dynamically set or get properties in Java")
5186 (description "BeanUtils provides a simplified interface to reflection and
5187 introspection to set or get dynamically determined properties through their
5188 setter and getter method.")
5189 (license license:asl2.0)))
5190
5191 (define-public java-commons-io
5192 (package
5193 (name "java-commons-io")
5194 (version "2.5")
5195 (source
5196 (origin
5197 (method url-fetch)
5198 (uri (string-append "mirror://apache/commons/io/source/"
5199 "commons-io-" version "-src.tar.gz"))
5200 (sha256
5201 (base32
5202 "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3"))))
5203 (build-system ant-build-system)
5204 (outputs '("out" "doc"))
5205 (arguments
5206 `(#:test-target "test"
5207 #:make-flags
5208 (list (string-append "-Djunit.jar="
5209 (car (find-files (assoc-ref %build-inputs "java-junit")
5210 "jar$"))))
5211 #:phases
5212 (modify-phases %standard-phases
5213 (add-after 'build 'build-javadoc ant-build-javadoc)
5214 (replace 'install (install-jars "target"))
5215 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
5216 (native-inputs
5217 `(("java-junit" ,java-junit)
5218 ("java-hamcrest-core" ,java-hamcrest-core)))
5219 (home-page "https://commons.apache.org/io/")
5220 (synopsis "Common useful IO related classes")
5221 (description "Commons-IO contains utility classes, stream implementations,
5222 file filters and endian classes.")
5223 (license license:asl2.0)))
5224
5225 (define-public java-commons-exec-1.1
5226 (package
5227 (name "java-commons-exec")
5228 (version "1.1")
5229 (source
5230 (origin
5231 (method url-fetch)
5232 (uri (string-append "mirror://apache/commons/exec/source/"
5233 "commons-exec-" version "-src.tar.gz"))
5234 (sha256
5235 (base32
5236 "025dk8xgj10lxwwwqp0hng2rn7fr4vcirxzydqzx9k4dim667alk"))))
5237 (build-system ant-build-system)
5238 (arguments
5239 `(#:test-target "test"
5240 #:make-flags
5241 (list (string-append "-Dmaven.junit.jar="
5242 (car (find-files (assoc-ref %build-inputs "java-junit")
5243 "jar$"))))
5244 #:phases
5245 (modify-phases %standard-phases
5246 (add-before 'build 'delete-network-tests
5247 (lambda _
5248 (delete-file "src/test/java/org/apache/commons/exec/DefaultExecutorTest.java")
5249 (substitute* "src/test/java/org/apache/commons/exec/TestRunner.java"
5250 (("suite\\.addTestSuite\\(DefaultExecutorTest\\.class\\);") ""))
5251 #t))
5252 ;; The "build" phase automatically tests.
5253 (delete 'check)
5254 (replace 'install (install-jars "target")))))
5255 (native-inputs
5256 `(("java-junit" ,java-junit)))
5257 (home-page "https://commons.apache.org/proper/commons-exec/")
5258 (synopsis "Common program execution related classes")
5259 (description "Commons-Exec simplifies executing external processes.")
5260 (license license:asl2.0)))
5261
5262 (define-public java-commons-exec
5263 (package
5264 (inherit java-commons-exec-1.1)
5265 (version "1.3")
5266 (source
5267 (origin
5268 (method url-fetch)
5269 (uri (string-append "mirror://apache/commons/exec/source/"
5270 "commons-exec-" version "-src.tar.gz"))
5271 (sha256
5272 (base32
5273 "17yb4h6f8l49c5iyyvda4z2nmw0bxrx857nrwmsr7mmpb7x441yv"))))
5274 (arguments
5275 `(#:test-target "test"
5276 #:make-flags
5277 (list (string-append "-Dmaven.junit.jar="
5278 (car (find-files (assoc-ref %build-inputs "java-junit")
5279 "jar$")))
5280 "-Dmaven.compiler.source=1.7"
5281 "-Dmaven.compiler.target=1.7")
5282 #:phases
5283 (modify-phases %standard-phases
5284 (add-before 'build 'delete-network-tests
5285 (lambda* (#:key inputs #:allow-other-keys)
5286 ;; This test hangs indefinitely.
5287 (delete-file "src/test/java/org/apache/commons/exec/issues/Exec60Test.java")
5288 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec41Test.java"
5289 (("ping -c 10 127.0.0.1") "sleep 10"))
5290 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec49Test.java"
5291 (("/bin/ls") "ls"))
5292 (call-with-output-file "src/test/scripts/ping.sh"
5293 (lambda (port)
5294 (format port "#!~a/bin/sh\nsleep $1\n"
5295 (assoc-ref inputs "bash"))))
5296 #t))
5297 ;; The "build" phase automatically tests.
5298 (delete 'check)
5299 (replace 'install (install-jars "target")))))
5300 (native-inputs
5301 `(("java-junit" ,java-junit)
5302 ("java-hamcrest-core" ,java-hamcrest-core)))))
5303
5304 (define-public java-commons-lang
5305 (package
5306 (name "java-commons-lang")
5307 (version "2.6")
5308 (source
5309 (origin
5310 (method url-fetch)
5311 (uri (string-append "mirror://apache/commons/lang/source/"
5312 "commons-lang-" version "-src.tar.gz"))
5313 (sha256
5314 (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5"))))
5315 (build-system ant-build-system)
5316 (outputs '("out" "doc"))
5317 (arguments
5318 `(#:test-target "test"
5319 #:test-exclude (list "**/Abstract*.java" "**/Random*.java")
5320 #:phases
5321 (modify-phases %standard-phases
5322 (add-after 'build 'build-javadoc ant-build-javadoc)
5323 (add-before 'check 'disable-failing-test
5324 (lambda _
5325 ;; Disable a failing test
5326 (substitute* "src/test/java/org/apache/commons/lang/\
5327 time/FastDateFormatTest.java"
5328 (("public void testFormat\\(\\)")
5329 "public void disabled_testFormat()"))
5330 #t))
5331 (replace 'install (install-jars "target"))
5332 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
5333 (native-inputs
5334 `(("java-junit" ,java-junit)))
5335 (home-page "https://commons.apache.org/lang/")
5336 (synopsis "Extension of the java.lang package")
5337 (description "The Commons Lang components contains a set of Java classes
5338 that provide helper methods for standard Java classes, especially those found
5339 in the @code{java.lang} package in the Sun JDK. The following classes are
5340 included:
5341
5342 @itemize
5343 @item StringUtils - Helper for @code{java.lang.String}.
5344 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets
5345 of characters such as @code{[a-z]} and @code{[abcdez]}.
5346 @item RandomStringUtils - Helper for creating randomised strings.
5347 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
5348 @item NumberRange - A range of numbers with an upper and lower bound.
5349 @item ObjectUtils - Helper for @code{java.lang.Object}.
5350 @item SerializationUtils - Helper for serializing objects.
5351 @item SystemUtils - Utility class defining the Java system properties.
5352 @item NestedException package - A sub-package for the creation of nested
5353 exceptions.
5354 @item Enum package - A sub-package for the creation of enumerated types.
5355 @item Builder package - A sub-package for the creation of @code{equals},
5356 @code{hashCode}, @code{compareTo} and @code{toString} methods.
5357 @end itemize\n")
5358 (license license:asl2.0)))
5359
5360 (define-public java-commons-lang3
5361 (package
5362 (name "java-commons-lang3")
5363 (version "3.9")
5364 (source
5365 (origin
5366 (method url-fetch)
5367 (uri (string-append "mirror://apache/commons/lang/source/"
5368 "commons-lang3-" version "-src.tar.gz"))
5369 (sha256
5370 (base32 "0s4ffbvsyl16c90l45ximsg4dwd8hmz7wsza3p308fw43h6mwhb6"))))
5371 (build-system ant-build-system)
5372 (arguments
5373 `(#:jar-name "commons-lang3.jar"
5374 #:source-dir "src/main/java"
5375 #:tests? #f; require junit5
5376 #:phases
5377 (modify-phases %standard-phases
5378 (replace 'install (install-from-pom "pom.xml")))))
5379 (propagated-inputs
5380 `(("apache-commons-parent-pom" ,apache-commons-parent-pom-48)))
5381 (home-page "https://commons.apache.org/lang/")
5382 (synopsis "Extension of the java.lang package")
5383 (description "The Commons Lang components contains a set of Java classes
5384 that provide helper methods for standard Java classes, especially those found
5385 in the @code{java.lang} package. The following classes are included:
5386
5387 @itemize
5388 @item StringUtils - Helper for @code{java.lang.String}.
5389 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of
5390 characters such as @code{[a-z]} and @code{[abcdez]}.
5391 @item RandomStringUtils - Helper for creating randomised strings.
5392 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
5393 @item NumberRange - A range of numbers with an upper and lower bound.
5394 @item ObjectUtils - Helper for @code{java.lang.Object}.
5395 @item SerializationUtils - Helper for serializing objects.
5396 @item SystemUtils - Utility class defining the Java system properties.
5397 @item NestedException package - A sub-package for the creation of nested
5398 exceptions.
5399 @item Enum package - A sub-package for the creation of enumerated types.
5400 @item Builder package - A sub-package for the creation of @code{equals},
5401 @code{hashCode}, @code{compareTo} and @code{toString} methods.
5402 @end itemize\n")
5403 (license license:asl2.0)))
5404
5405 (define-public java-commons-bsf
5406 (package
5407 (name "java-commons-bsf")
5408 (version "2.4.0")
5409 (source (origin
5410 (method url-fetch)
5411 (uri (string-append "mirror://apache/commons/bsf/source/bsf-src-"
5412 version ".tar.gz"))
5413 (sha256
5414 (base32
5415 "1sbamr8jl32p1jgf59nw0b2w9qivyg145954hm6ly54cfgsqrdas"))
5416 (modules '((guix build utils)))
5417 (snippet
5418 '(begin
5419 (for-each delete-file
5420 (find-files "." "\\.jar$"))
5421 #t))))
5422 (build-system ant-build-system)
5423 (arguments
5424 `(#:build-target "jar"
5425 #:tests? #f; No test file
5426 #:modules ((guix build ant-build-system)
5427 (guix build utils)
5428 (guix build java-utils)
5429 (sxml simple))
5430 #:phases
5431 (modify-phases %standard-phases
5432 (add-before 'build 'create-properties
5433 (lambda _
5434 ;; This file is missing from the distribution
5435 (call-with-output-file "build-properties.xml"
5436 (lambda (port)
5437 (sxml->xml
5438 `(project (@ (basedir ".") (name "build-properties") (default ""))
5439 (property (@ (name "project.name") (value "bsf")))
5440 (property (@ (name "source.level") (value "1.5")))
5441 (property (@ (name "build.lib") (value "build/jar")))
5442 (property (@ (name "src.dir") (value "src")))
5443 (property (@ (name "tests.dir") (value "src/org/apache/bsf/test")))
5444 (property (@ (name "build.tests") (value "build/test-classes")))
5445 (property (@ (name "build.dest") (value "build/classes"))))
5446 port)))
5447 #t))
5448 (replace 'install (install-jars "build")))))
5449 (native-inputs
5450 `(("java-junit" ,java-junit)))
5451 (inputs
5452 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
5453 (home-page "https://commons.apache.org/proper/commons-bsf")
5454 (synopsis "Bean Scripting Framework")
5455 (description "The Bean Scripting Framework (BSF) is a set of Java classes
5456 which provides scripting language support within Java applications, and access
5457 to Java objects and methods from scripting languages. BSF allows one to write
5458 JSPs in languages other than Java while providing access to the Java class
5459 library. In addition, BSF permits any Java application to be implemented in
5460 part (or dynamically extended) by a language that is embedded within it. This
5461 is achieved by providing an API that permits calling scripting language engines
5462 from within Java, as well as an object registry that exposes Java objects to
5463 these scripting language engines.")
5464 (license license:asl2.0)))
5465
5466 (define-public java-commons-jxpath
5467 (package
5468 (name "java-commons-jxpath")
5469 (version "1.3")
5470 (source (origin
5471 (method url-fetch)
5472 (uri (string-append "mirror://apache/commons/jxpath/source/"
5473 "commons-jxpath-" version "-src.tar.gz"))
5474 (sha256
5475 (base32
5476 "1rpgg31ayn9fwr4bfi2i1ij0npcg79ad2fv0w9hacvawsyc42cfs"))))
5477 (build-system ant-build-system)
5478 (arguments
5479 `(#:jar-name "commons-jxpath.jar"
5480 ;; tests require more dependencies, including mockrunner which depends on old software
5481 #:tests? #f
5482 #:source-dir "src/java"))
5483 (inputs
5484 `(("servlet" ,java-classpathx-servletapi)
5485 ("java-jdom" ,java-jdom)
5486 ("java-commons-beanutils" ,java-commons-beanutils)))
5487 (native-inputs
5488 `(("java-junit" ,java-junit)))
5489 (home-page "https://commons.apache.org/jxpath/")
5490 (synopsis "Simple interpreter of an expression language called XPath.")
5491 (description "The org.apache.commons.jxpath package defines a simple
5492 interpreter of an expression language called XPath. JXPath applies XPath
5493 expressions to graphs of objects of all kinds: JavaBeans, Maps, Servlet
5494 contexts, DOM etc, including mixtures thereof.")
5495 (license license:asl2.0)))
5496
5497 (define-public java-commons-pool
5498 (package
5499 (name "java-commons-pool")
5500 (version "2.6.2")
5501 (source (origin
5502 (method url-fetch)
5503 (uri (string-append "mirror://apache/commons/pool/source/"
5504 "commons-pool2-" version "-src.tar.gz"))
5505 (sha256
5506 (base32
5507 "1fi1hgqmq01bs6azbj3sfswxzadp2r8sjjfiq6ryilz1m50kvrv6"))))
5508 (arguments
5509 `(#:jar-name "common-pool.jar"
5510 #:source-dir "src/main/java"
5511 #:test-exclude
5512 (list "**/PerformanceTest.java")))
5513 (build-system ant-build-system)
5514 (inputs
5515 `(("java-cglib" ,java-cglib)))
5516 (native-inputs
5517 `(("java-junit" ,java-junit)
5518 ("java-hamcrest-core" ,java-hamcrest-core)
5519 ("java-asm" ,java-asm)
5520 ("java-objenesis" ,java-objenesis)))
5521 (home-page "https://commons.apache.org/proper/commons-pool/")
5522 (synopsis "Object-pooling API in Java")
5523 (description "The commons-pool package provides an object-pooling API
5524 and a number of object pool implementations. This package defines a
5525 handful of pooling interfaces and some base classes that may be useful when
5526 creating new pool implementations.")
5527 (license license:asl2.0)))
5528
5529 (define-public java-commons-dbcp
5530 (package
5531 (name "java-commons-dbcp")
5532 (version "2.6.0")
5533 (source (origin
5534 (method url-fetch)
5535 (uri (string-append "mirror://apache/commons/dbcp/source/"
5536 "commons-dbcp2-" version "-src.tar.gz"))
5537 (sha256
5538 (base32
5539 "0axbvcbnf2l70fc3ybrlp3siw2w4ka9mia2pnx4py8gz54cpw3rc"))))
5540 (arguments
5541 `(#:source-dir "src/main/java"
5542 #:jar-name "java-commons-dbcp.jar"
5543 #:tests? #f)); requires apache-geronimo
5544 (inputs
5545 `(("java-commons-pool" ,java-commons-pool)
5546 ("java-commons-logging" ,java-commons-logging-minimal)
5547 ("java-jboss-transaction-api-spec" ,java-jboss-transaction-api-spec)))
5548 (native-inputs
5549 `(("java-junit" ,java-junit)))
5550 (build-system ant-build-system)
5551 (home-page "https://commons.apache.org/proper/commons-dbcp/")
5552 (synopsis "Database Connection Pool for Java")
5553 (description "Commons-dbcp allows you to share a pool of database
5554 connections between users. Creating a new connection for each user can be
5555 time consuming and even unfeasible when the number of simultaneous users is
5556 very large. This package provides a way to share a poole of connections to
5557 reduce that load.")
5558 (license license:asl2.0)))
5559
5560 (define-public java-commons-jcs
5561 (package
5562 (name "java-commons-jcs")
5563 (version "2.2.1")
5564 (source (origin
5565 (method url-fetch)
5566 (uri (string-append "mirror://apache/commons/jcs/source/"
5567 "commons-jcs-dist-" version "-src.tar.gz"))
5568 (sha256
5569 (base32
5570 "0syhq2npjbrl0azqfjm0gvash1qd5qjy4qmysxcrqjsk0nf9fa1q"))))
5571 (build-system ant-build-system)
5572 (arguments
5573 `(#:jar-name "commons-jcs.jar"
5574 #:source-dir "commons-jcs-core/src/main/java"
5575 #:test-dir "commons-jcs-core/src/test"
5576 #:tests? #f; requires hsqldb
5577 #:phases
5578 (modify-phases %standard-phases
5579 (add-before 'build 'prepare
5580 (lambda _
5581 (with-directory-excursion
5582 "commons-jcs-core/src/main/java/org/apache/commons/jcs"
5583 (substitute*
5584 "auxiliary/disk/jdbc/dsfactory/SharedPoolDataSourceFactory.java"
5585 (("commons.dbcp") "commons.dbcp2")
5586 ((".*\\.setMaxActive.*") ""))
5587 ;;; Remove dependency on velocity-tools
5588 (delete-file "admin/servlet/JCSAdminServlet.java"))
5589 #t)))))
5590 (propagated-inputs
5591 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
5592 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
5593 ("java-commons-httpclient" ,java-commons-httpclient)
5594 ("java-commons-dbcp" ,java-commons-dbcp)))
5595 (native-inputs
5596 `(("java-junit" ,java-junit)))
5597 (home-page "https://commons.apache.org/proper/commons-jcs/")
5598 (synopsis "Distributed caching system in Java")
5599 (description "JCS is a distributed caching system written in Java. It
5600 is intended to speed up applications by providing a means to manage cached
5601 data of various dynamic natures. Like any caching system, JCS is most useful
5602 for high read, low put applications. Latency times drop sharply and
5603 bottlenecks move away from the database in an effectively cached system.")
5604 (license license:asl2.0)))
5605
5606 (define-public java-jsr250
5607 (package
5608 (name "java-jsr250")
5609 (version "1.3")
5610 (source (origin
5611 (method url-fetch)
5612 (uri (string-append "https://repo1.maven.org/maven2/"
5613 "javax/annotation/javax.annotation-api/"
5614 version "/javax.annotation-api-"
5615 version "-sources.jar"))
5616 (sha256
5617 (base32
5618 "08clh8n4n9wfglf75qsqfjs6yf79f7x6hqx38cn856pksszv50kz"))))
5619 (build-system ant-build-system)
5620 (arguments
5621 `(#:tests? #f ; no tests included
5622 #:jdk ,icedtea-8
5623 #:jar-name "jsr250.jar"))
5624 (home-page "https://jcp.org/en/jsr/detail?id=250")
5625 (synopsis "Security-related annotations")
5626 (description "This package provides annotations for security. It provides
5627 packages in the @code{javax.annotation} and @code{javax.annotation.security}
5628 namespaces.")
5629 ;; either cddl or gpl2 only, with classpath exception
5630 (license (list license:cddl1.0
5631 license:gpl2))))
5632
5633 (define-public java-jsr305
5634 (package
5635 (name "java-jsr305")
5636 (version "3.0.1")
5637 (source (origin
5638 (method url-fetch)
5639 (uri (string-append "https://repo1.maven.org/maven2/"
5640 "com/google/code/findbugs/"
5641 "jsr305/" version "/jsr305-"
5642 version "-sources.jar"))
5643 (sha256
5644 (base32
5645 "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n"))))
5646 (build-system ant-build-system)
5647 (arguments
5648 `(#:tests? #f ; no tests included
5649 #:jar-name "jsr305.jar"))
5650 (home-page "http://findbugs.sourceforge.net/")
5651 (synopsis "Annotations for the static analyzer called findbugs")
5652 (description "This package provides annotations for the findbugs package.
5653 It provides packages in the @code{javax.annotations} namespace.")
5654 (license license:asl2.0)))
5655
5656 (define-public java-guava
5657 (package
5658 (name "java-guava")
5659 ;; This is the last release of Guava that can be built with Java 7.
5660 (version "20.0")
5661 (source (origin
5662 (method url-fetch)
5663 (uri (string-append "https://github.com/google/guava/"
5664 "releases/download/v" version
5665 "/guava-" version "-sources.jar"))
5666 (sha256
5667 (base32
5668 "1gawrs5gi6j5hcfxdgpnfli75vb9pfi4sn09pnc8xacr669yajwr"))))
5669 (build-system ant-build-system)
5670 (arguments
5671 `(#:tests? #f ; no tests included
5672 #:jar-name "guava.jar"
5673 #:phases
5674 (modify-phases %standard-phases
5675 (add-after 'unpack 'trim-sources
5676 (lambda _
5677 (with-directory-excursion "src/com/google/common"
5678 ;; Remove annotations to avoid extra dependencies:
5679 ;; * "j2objc" annotations are used when converting Java to
5680 ;; Objective C;
5681 ;; * "errorprone" annotations catch common Java mistakes at
5682 ;; compile time;
5683 ;; * "IgnoreJRERequirement" is used for Android.
5684 (substitute* (find-files "." "\\.java$")
5685 (("import com.google.j2objc.*") "")
5686 (("import com.google.errorprone.annotation.*") "")
5687 (("import org.codehaus.mojo.animal_sniffer.*") "")
5688 (("@CanIgnoreReturnValue") "")
5689 (("@LazyInit") "")
5690 (("@WeakOuter") "")
5691 (("@RetainedWith") "")
5692 (("@Weak") "")
5693 (("@ForOverride") "")
5694 (("@J2ObjCIncompatible") "")
5695 (("@IgnoreJRERequirement") "")))
5696 #t)))))
5697 (inputs
5698 `(("java-jsr305" ,java-jsr305)))
5699 (home-page "https://github.com/google/guava")
5700 (synopsis "Google core libraries for Java")
5701 (description "Guava is a set of core libraries that includes new
5702 collection types (such as multimap and multiset), immutable collections, a
5703 graph library, functional types, an in-memory cache, and APIs/utilities for
5704 concurrency, I/O, hashing, primitives, reflection, string processing, and much
5705 more!")
5706 (license license:asl2.0)))
5707
5708 ;; The java-commons-logging package provides adapters to many different
5709 ;; logging frameworks. To avoid an excessive dependency graph we try to build
5710 ;; it with only a minimal set of adapters.
5711 (define-public java-commons-logging-minimal
5712 (package
5713 (name "java-commons-logging-minimal")
5714 (version "1.2")
5715 (source (origin
5716 (method url-fetch)
5717 (uri (string-append "mirror://apache/commons/logging/source/"
5718 "commons-logging-" version "-src.tar.gz"))
5719 (sha256
5720 (base32
5721 "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9"))))
5722 (build-system ant-build-system)
5723 (arguments
5724 `(#:tests? #f ; avoid dependency on logging frameworks
5725 #:jar-name "commons-logging-minimal.jar"
5726 #:phases
5727 (modify-phases %standard-phases
5728 (add-after 'unpack 'delete-adapters-and-tests
5729 (lambda _
5730 ;; Delete all adapters except for NoOpLog, SimpleLog, and
5731 ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl
5732 ;; is used by applications; SimpleLog is the only actually usable
5733 ;; implementation that does not depend on another logging
5734 ;; framework.
5735 (for-each
5736 (lambda (file)
5737 (delete-file (string-append
5738 "src/main/java/org/apache/commons/logging/impl/" file)))
5739 (list "Jdk13LumberjackLogger.java"
5740 "WeakHashtable.java"
5741 "Log4JLogger.java"
5742 "ServletContextCleaner.java"
5743 "Jdk14Logger.java"
5744 "AvalonLogger.java"
5745 "LogKitLogger.java"))
5746 (delete-file-recursively "src/test")
5747 #t)))))
5748 (home-page "https://commons.apache.org/logging/")
5749 (synopsis "Common API for logging implementations")
5750 (description "The Logging package is a thin bridge between different
5751 logging implementations. A library that uses the commons-logging API can be
5752 used with any logging implementation at runtime.")
5753 (license license:asl2.0)))
5754
5755 ;; This is the last release of the 1.x series.
5756 (define-public java-mockito-1
5757 (package
5758 (name "java-mockito")
5759 (version "1.10.19")
5760 (source (origin
5761 (method url-fetch)
5762 (uri (string-append "http://repo1.maven.org/maven2/"
5763 "org/mockito/mockito-core/" version
5764 "/mockito-core-" version "-sources.jar"))
5765 (sha256
5766 (base32
5767 "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc"))))
5768 (build-system ant-build-system)
5769 (arguments
5770 `(#:jar-name "mockito.jar"
5771 #:tests? #f ; no tests included
5772 ;; FIXME: patch-and-repack does not support jars, so we have to apply
5773 ;; patches in build phases.
5774 #:phases
5775 (modify-phases %standard-phases
5776 ;; Mockito was developed against a different version of hamcrest,
5777 ;; which does not require matcher implementations to provide an
5778 ;; implementation of the "describeMismatch" method. We add this
5779 ;; simple definition to pass the build with our version of hamcrest.
5780 (add-after 'unpack 'fix-hamcrest-build-error
5781 (lambda _
5782 (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java"
5783 (("public Matcher getActualMatcher\\(\\) .*" line)
5784 (string-append "
5785 public void describeMismatch(Object item, Description description) {
5786 actualMatcher.describeMismatch(item, description);
5787 }"
5788 line)))
5789 #t))
5790 ;; Mockito bundles cglib. We have a cglib package, so let's use
5791 ;; that instead.
5792 (add-after 'unpack 'use-system-libraries
5793 (lambda _
5794 (with-directory-excursion "src/org/mockito/internal/creation/cglib"
5795 (substitute* '("CGLIBHacker.java"
5796 "CglibMockMaker.java"
5797 "ClassImposterizer.java"
5798 "DelegatingMockitoMethodProxy.java"
5799 "MethodInterceptorFilter.java"
5800 "MockitoNamingPolicy.java"
5801 "SerializableMockitoMethodProxy.java"
5802 "SerializableNoOp.java")
5803 (("import org.mockito.cglib") "import net.sf.cglib")))
5804 #t)))))
5805 (inputs
5806 `(("java-junit" ,java-junit)
5807 ("java-objenesis" ,java-objenesis)
5808 ("java-cglib" ,java-cglib)
5809 ("java-hamcrest-core" ,java-hamcrest-core)))
5810 (home-page "http://mockito.org")
5811 (synopsis "Mockito is a mock library for Java")
5812 (description "Mockito is a mocking library for Java which lets you write
5813 tests with a clean and simple API. It generates mocks using reflection, and
5814 it records all mock invocations, including methods arguments.")
5815 (license license:asl2.0)))
5816
5817 (define-public java-httpcomponents-httpcore
5818 (package
5819 (name "java-httpcomponents-httpcore")
5820 (version "4.4.6")
5821 (source (origin
5822 (method url-fetch)
5823 (uri (string-append "mirror://apache//httpcomponents/httpcore/"
5824 "source/httpcomponents-core-"
5825 version "-src.tar.gz"))
5826 (sha256
5827 (base32
5828 "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy"))))
5829 (build-system ant-build-system)
5830 (arguments
5831 `(#:jar-name "httpcomponents-httpcore.jar"
5832 #:phases
5833 (modify-phases %standard-phases
5834 (add-after 'unpack 'chdir
5835 (lambda _ (chdir "httpcore") #t)))))
5836 (inputs
5837 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
5838 ("java-commons-lang3" ,java-commons-lang3)))
5839 (native-inputs
5840 `(("java-junit" ,java-junit)
5841 ("java-mockito" ,java-mockito-1)))
5842 (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html")
5843 (synopsis "Low level HTTP transport components")
5844 (description "HttpCore is a set of low level HTTP transport components
5845 that can be used to build custom client and server side HTTP services with a
5846 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
5847 on the classic Java I/O and non-blocking, event driven I/O model based on Java
5848 NIO.
5849
5850 This package provides the blocking I/O model library.")
5851 (license license:asl2.0)))
5852
5853 (define-public java-httpcomponents-httpcore-nio
5854 (package (inherit java-httpcomponents-httpcore)
5855 (name "java-httpcomponents-httpcore-nio")
5856 (arguments
5857 `(#:jar-name "httpcomponents-httpcore-nio.jar"
5858 #:phases
5859 (modify-phases %standard-phases
5860 (add-after 'unpack 'chdir
5861 (lambda _ (chdir "httpcore-nio") #t)))))
5862 (inputs
5863 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5864 ("java-hamcrest-core" ,java-hamcrest-core)
5865 ,@(package-inputs java-httpcomponents-httpcore)))
5866 (description "HttpCore is a set of low level HTTP transport components
5867 that can be used to build custom client and server side HTTP services with a
5868 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
5869 on the classic Java I/O and non-blocking, event driven I/O model based on Java
5870 NIO.
5871
5872 This package provides the non-blocking I/O model library based on Java
5873 NIO.")))
5874
5875 (define-public java-httpcomponents-httpcore-ab
5876 (package (inherit java-httpcomponents-httpcore)
5877 (name "java-httpcomponents-httpcore-ab")
5878 (arguments
5879 `(#:jar-name "httpcomponents-httpcore-ab.jar"
5880 #:phases
5881 (modify-phases %standard-phases
5882 (add-after 'unpack 'chdir
5883 (lambda _ (chdir "httpcore-ab") #t)))))
5884 (inputs
5885 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5886 ("java-commons-cli" ,java-commons-cli)
5887 ("java-hamcrest-core" ,java-hamcrest-core)
5888 ,@(package-inputs java-httpcomponents-httpcore)))
5889 (synopsis "Apache HttpCore benchmarking tool")
5890 (description "This package provides the HttpCore benchmarking tool. It is
5891 an Apache AB clone based on HttpCore.")))
5892
5893 (define-public java-httpcomponents-httpclient
5894 (package
5895 (name "java-httpcomponents-httpclient")
5896 (version "4.5.3")
5897 (source (origin
5898 (method url-fetch)
5899 (uri (string-append "mirror://apache/httpcomponents/httpclient/"
5900 "source/httpcomponents-client-"
5901 version "-src.tar.gz"))
5902 (sha256
5903 (base32
5904 "1428399s7qy3cim5wc6f3ks4gl9nf9vkjpfmnlap3jflif7g2pj1"))))
5905 (build-system ant-build-system)
5906 (arguments
5907 `(#:jar-name "httpcomponents-httpclient.jar"
5908 #:phases
5909 (modify-phases %standard-phases
5910 (add-after 'unpack 'chdir
5911 (lambda _ (chdir "httpclient") #t)))))
5912 (inputs
5913 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
5914 ("java-commons-codec" ,java-commons-codec)
5915 ("java-hamcrest-core" ,java-hamcrest-core)
5916 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5917 ("java-mockito" ,java-mockito-1)
5918 ("java-junit" ,java-junit)))
5919 (home-page "https://hc.apache.org/httpcomponents-client-ga/")
5920 (synopsis "HTTP client library for Java")
5921 (description "Although the @code{java.net} package provides basic
5922 functionality for accessing resources via HTTP, it doesn't provide the full
5923 flexibility or functionality needed by many applications. @code{HttpClient}
5924 seeks to fill this void by providing an efficient, up-to-date, and
5925 feature-rich package implementing the client side of the most recent HTTP
5926 standards and recommendations.")
5927 (license license:asl2.0)))
5928
5929 (define-public java-httpcomponents-httpmime
5930 (package (inherit java-httpcomponents-httpclient)
5931 (name "java-httpcomponents-httpmime")
5932 (arguments
5933 `(#:jar-name "httpcomponents-httpmime.jar"
5934 #:phases
5935 (modify-phases %standard-phases
5936 (add-after 'unpack 'chdir
5937 (lambda _ (chdir "httpmime") #t)))))
5938 (inputs
5939 `(("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient)
5940 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5941 ("java-junit" ,java-junit)
5942 ("java-hamcrest-core" ,java-hamcrest-core)))))
5943
5944 (define-public java-commons-net
5945 (package
5946 (name "java-commons-net")
5947 (version "3.6")
5948 (source (origin
5949 (method url-fetch)
5950 (uri (string-append "mirror://apache/commons/net/source/"
5951 "commons-net-" version "-src.tar.gz"))
5952 (sha256
5953 (base32
5954 "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr"))))
5955 (build-system ant-build-system)
5956 (arguments
5957 `(;; FIXME: MainTest.java tries to read "examples.properties" (which
5958 ;; should be "resources/examples/examples.properties"), but gets "null"
5959 ;; instead.
5960 #:tests? #f
5961 #:jar-name "commons-net.jar"))
5962 (native-inputs
5963 `(("java-junit" ,java-junit)
5964 ("java-hamcrest-core" ,java-hamcrest-core)))
5965 (home-page "https://commons.apache.org/net/")
5966 (synopsis "Client library for many basic Internet protocols")
5967 (description "The Apache Commons Net library implements the client side of
5968 many basic Internet protocols. The purpose of the library is to provide
5969 fundamental protocol access, not higher-level abstractions.")
5970 (license license:asl2.0)))
5971
5972 (define-public java-jsch
5973 (package
5974 (name "java-jsch")
5975 (version "0.1.55")
5976 (source (origin
5977 (method url-fetch)
5978 (uri (string-append "mirror://sourceforge/jsch/jsch/"
5979 version "/jsch-" version ".zip"))
5980 (sha256
5981 (base32
5982 "1lxyjwvmwa723wcf3bqn816hkvc03vz4xhbsi7bvfhrz2rpgcfq6"))))
5983 (build-system ant-build-system)
5984 (arguments
5985 `(#:build-target "dist"
5986 #:tests? #f ; no tests included
5987 #:phases
5988 (modify-phases %standard-phases
5989 (replace 'install (install-jars "dist")))))
5990 (native-inputs
5991 `(("unzip" ,unzip)))
5992 (home-page "http://www.jcraft.com/jsch/")
5993 (synopsis "Pure Java implementation of SSH2")
5994 (description "JSch is a pure Java implementation of SSH2. JSch allows you
5995 to connect to an SSH server and use port forwarding, X11 forwarding, file
5996 transfer, etc., and you can integrate its functionality into your own Java
5997 programs.")
5998 (license license:bsd-3)))
5999
6000 (define-public java-commons-compress
6001 (package
6002 (name "java-commons-compress")
6003 (version "1.13")
6004 (source (origin
6005 (method url-fetch)
6006 (uri (string-append "mirror://apache/commons/compress/source/"
6007 "commons-compress-" version "-src.tar.gz"))
6008 (sha256
6009 (base32
6010 "1vjqvavrn0babffn1kciz6v52ibwq2vwhzlb95hazis3lgllnxc8"))))
6011 (build-system ant-build-system)
6012 (arguments
6013 `(#:jar-name "commons-compress.jar"
6014 #:phases
6015 (modify-phases %standard-phases
6016 (add-after 'unpack 'delete-bad-tests
6017 (lambda _
6018 (with-directory-excursion "src/test/java/org/apache/commons/compress/"
6019 ;; FIXME: These tests really should not fail. Maybe they are
6020 ;; indicative of problems with our Java packaging work.
6021
6022 ;; This test fails with a null pointer exception.
6023 (delete-file "archivers/sevenz/SevenZOutputFileTest.java")
6024 ;; This test fails to open test resources.
6025 (delete-file "archivers/zip/ExplodeSupportTest.java")
6026
6027 ;; FIXME: This test adds a dependency on powermock, which is hard to
6028 ;; package at this point.
6029 ;; https://github.com/powermock/powermock
6030 (delete-file "archivers/sevenz/SevenZNativeHeapTest.java"))
6031 #t)))))
6032 (inputs
6033 `(("java-junit" ,java-junit)
6034 ("java-hamcrest-core" ,java-hamcrest-core)
6035 ("java-mockito" ,java-mockito-1)
6036 ("java-xz" ,java-xz)))
6037 (home-page "https://commons.apache.org/proper/commons-compress/")
6038 (synopsis "Java library for working with compressed files")
6039 (description "The Apache Commons Compress library defines an API for
6040 working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ,
6041 Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.")
6042 (license license:asl2.0)))
6043
6044 (define-public java-commons-csv
6045 (package
6046 (name "java-commons-csv")
6047 (version "1.4")
6048 (source (origin
6049 (method url-fetch)
6050 (uri (string-append "mirror://apache/commons/csv/source/"
6051 "commons-csv-" version "-src.tar.gz"))
6052 (sha256
6053 (base32
6054 "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij"))))
6055 (build-system ant-build-system)
6056 (arguments
6057 `(#:jar-name "commons-csv.jar"
6058 #:source-dir "src/main/java"
6059 #:tests? #f)); FIXME: requires java-h2
6060 (inputs
6061 `(("java-hamcrest-core" ,java-hamcrest-core)
6062 ("java-commons-io" ,java-commons-io)
6063 ("java-commons-lang3" ,java-commons-lang3)
6064 ("junit" ,java-junit)))
6065 (home-page "https://commons.apache.org/proper/commons-csv/")
6066 (synopsis "Read and write CSV documents")
6067 (description "Commons CSV reads and writes files in variations of the Comma
6068 Separated Value (CSV) format. The most common CSV formats are predefined in the
6069 CSVFormat class:
6070
6071 @itemize
6072 @item Microsoft Excel
6073 @item Informix UNLOAD
6074 @item Informix UNLOAD CSV
6075 @item MySQL
6076 @item RFC 4180
6077 @item TDF
6078 @end itemize
6079
6080 Custom formats can be created using a fluent style API.")
6081 (license license:asl2.0)))
6082
6083 (define-public java-osgi-annotation
6084 (package
6085 (name "java-osgi-annotation")
6086 (version "6.0.0")
6087 (source (origin
6088 (method url-fetch)
6089 (uri (string-append "https://repo1.maven.org/maven2/"
6090 "org/osgi/org.osgi.annotation/" version "/"
6091 "org.osgi.annotation-" version "-sources.jar"))
6092 (sha256
6093 (base32
6094 "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w"))))
6095 (build-system ant-build-system)
6096 (arguments
6097 `(#:tests? #f ; no tests
6098 #:jar-name "osgi-annotation.jar"))
6099 (home-page "https://www.osgi.org")
6100 (synopsis "Annotation module of OSGi framework")
6101 (description
6102 "OSGi, for Open Services Gateway initiative framework, is a module system
6103 and service platform for the Java programming language. This package contains
6104 the OSGi annotation module, providing additional services to help dynamic
6105 components.")
6106 (license license:asl2.0)))
6107
6108 (define-public java-osgi-core
6109 (package
6110 (name "java-osgi-core")
6111 (version "6.0.0")
6112 (source (origin
6113 (method url-fetch)
6114 (uri (string-append "https://repo1.maven.org/maven2/"
6115 "org/osgi/org.osgi.core/" version "/"
6116 "org.osgi.core-" version "-sources.jar"))
6117 (sha256
6118 (base32
6119 "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv"))))
6120 (build-system ant-build-system)
6121 (arguments
6122 `(#:tests? #f ; no tests
6123 #:jar-name "osgi-core.jar"))
6124 (inputs
6125 `(("java-osgi-annotation" ,java-osgi-annotation)))
6126 (home-page "https://www.osgi.org")
6127 (synopsis "Core module of OSGi framework")
6128 (description
6129 "OSGi, for Open Services Gateway initiative framework, is a module system
6130 and service platform for the Java programming language. This package contains
6131 the OSGi Core module.")
6132 (license license:asl2.0)))
6133
6134 (define-public java-osgi-service-event
6135 (package
6136 (name "java-osgi-service-event")
6137 (version "1.3.1")
6138 (source (origin
6139 (method url-fetch)
6140 (uri (string-append "https://repo1.maven.org/maven2/"
6141 "org/osgi/org.osgi.service.event/"
6142 version "/org.osgi.service.event-"
6143 version "-sources.jar"))
6144 (sha256
6145 (base32
6146 "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm"))))
6147 (build-system ant-build-system)
6148 (arguments
6149 `(#:tests? #f ; no tests
6150 #:jar-name "osgi-service-event.jar"))
6151 (inputs
6152 `(("java-osgi-annotation" ,java-osgi-annotation)
6153 ("java-osgi-core" ,java-osgi-core)))
6154 (home-page "https://www.osgi.org")
6155 (synopsis "OSGi service event module")
6156 (description
6157 "OSGi, for Open Services Gateway initiative framework, is a module system
6158 and service platform for the Java programming language. This package contains
6159 the OSGi @code{org.osgi.service.event} module.")
6160 (license license:asl2.0)))
6161
6162 (define-public java-eclipse-osgi
6163 (package
6164 (name "java-eclipse-osgi")
6165 (version "3.11.3")
6166 (source (origin
6167 (method url-fetch)
6168 (uri (string-append "https://repo1.maven.org/maven2/"
6169 "org/eclipse/platform/org.eclipse.osgi/"
6170 version "/org.eclipse.osgi-"
6171 version "-sources.jar"))
6172 (sha256
6173 (base32
6174 "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b"))))
6175 (build-system ant-build-system)
6176 (arguments
6177 `(#:tests? #f ; no tests included
6178 #:jar-name "eclipse-equinox-osgi.jar"))
6179 (inputs
6180 `(("java-osgi-annotation" ,java-osgi-annotation)))
6181 (home-page "http://www.eclipse.org/equinox/")
6182 (synopsis "Eclipse Equinox OSGi framework")
6183 (description "This package provides an implementation of the OSGi Core
6184 specification.")
6185 (license license:epl1.0)))
6186
6187 (define-public java-eclipse-equinox-common
6188 (package
6189 (name "java-eclipse-equinox-common")
6190 (version "3.10.200")
6191 (source (origin
6192 (method url-fetch)
6193 (uri (string-append "https://repo1.maven.org/maven2/"
6194 "org/eclipse/platform/org.eclipse.equinox.common/"
6195 version "/org.eclipse.equinox.common-"
6196 version "-sources.jar"))
6197 (sha256
6198 (base32
6199 "1yn8ij6xsljlf35sr2l7wvyvc0ss4n1rv0ry5zkgb49dj4hyrqrj"))))
6200 (build-system ant-build-system)
6201 (arguments
6202 `(#:tests? #f ; no tests included
6203 #:jar-name "eclipse-equinox-common.jar"))
6204 (inputs
6205 `(("java-eclipse-osgi" ,java-eclipse-osgi)))
6206 (home-page "http://www.eclipse.org/equinox/")
6207 (synopsis "Common Eclipse runtime")
6208 (description "This package provides the common Eclipse runtime.")
6209 (license license:epl1.0)))
6210
6211 (define-public java-eclipse-core-jobs
6212 (package
6213 (name "java-eclipse-core-jobs")
6214 (version "3.8.0")
6215 (source (origin
6216 (method url-fetch)
6217 (uri (string-append "https://repo1.maven.org/maven2/"
6218 "org/eclipse/platform/org.eclipse.core.jobs/"
6219 version "/org.eclipse.core.jobs-"
6220 version "-sources.jar"))
6221 (sha256
6222 (base32
6223 "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b"))))
6224 (build-system ant-build-system)
6225 (arguments
6226 `(#:tests? #f ; no tests included
6227 #:jar-name "eclipse-core-jobs.jar"))
6228 (inputs
6229 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6230 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6231 (home-page "http://www.eclipse.org/equinox/")
6232 (synopsis "Eclipse jobs mechanism")
6233 (description "This package provides the Eclipse jobs mechanism.")
6234 (license license:epl1.0)))
6235
6236 (define-public java-eclipse-equinox-registry
6237 (package
6238 (name "java-eclipse-equinox-registry")
6239 (version "3.6.100")
6240 (source (origin
6241 (method url-fetch)
6242 (uri (string-append "https://repo1.maven.org/maven2/"
6243 "org/eclipse/platform/org.eclipse.equinox.registry/"
6244 version "/org.eclipse.equinox.registry-"
6245 version "-sources.jar"))
6246 (sha256
6247 (base32
6248 "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k"))))
6249 (build-system ant-build-system)
6250 (arguments
6251 `(#:tests? #f ; no tests included
6252 #:jar-name "eclipse-equinox-registry.jar"))
6253 (inputs
6254 `(("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6255 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6256 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6257 (home-page "http://www.eclipse.org/equinox/")
6258 (synopsis "Eclipse extension registry support")
6259 (description "This package provides support for the Eclipse extension
6260 registry.")
6261 (license license:epl1.0)))
6262
6263 (define-public java-eclipse-equinox-app
6264 (package
6265 (name "java-eclipse-equinox-app")
6266 (version "1.3.400")
6267 (source (origin
6268 (method url-fetch)
6269 (uri (string-append "https://repo1.maven.org/maven2/"
6270 "org/eclipse/platform/org.eclipse.equinox.app/"
6271 version "/org.eclipse.equinox.app-"
6272 version "-sources.jar"))
6273 (sha256
6274 (base32
6275 "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab"))))
6276 (build-system ant-build-system)
6277 (arguments
6278 `(#:tests? #f ; no tests included
6279 #:jar-name "eclipse-equinox-app.jar"))
6280 (inputs
6281 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6282 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6283 ("java-eclipse-osgi" ,java-eclipse-osgi)
6284 ("java-osgi-service-event" ,java-osgi-service-event)))
6285 (home-page "http://www.eclipse.org/equinox/")
6286 (synopsis "Equinox application container")
6287 (description "This package provides the Equinox application container for
6288 Eclipse.")
6289 (license license:epl1.0)))
6290
6291 (define-public java-eclipse-equinox-preferences
6292 (package
6293 (name "java-eclipse-equinox-preferences")
6294 (version "3.6.1")
6295 (source (origin
6296 (method url-fetch)
6297 (uri (string-append "https://repo1.maven.org/maven2/"
6298 "org/eclipse/platform/org.eclipse.equinox.preferences/"
6299 version "/org.eclipse.equinox.preferences-"
6300 version "-sources.jar"))
6301 (sha256
6302 (base32
6303 "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2"))))
6304 (build-system ant-build-system)
6305 (arguments
6306 `(#:tests? #f ; no tests included
6307 #:jar-name "eclipse-equinox-preferences.jar"))
6308 (inputs
6309 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6310 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6311 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6312 (home-page "http://www.eclipse.org/equinox/")
6313 (synopsis "Eclipse preferences mechanism")
6314 (description "This package provides the Eclipse preferences mechanism with
6315 the module @code{org.eclipse.equinox.preferences}.")
6316 (license license:epl1.0)))
6317
6318 (define-public java-eclipse-core-contenttype
6319 (package
6320 (name "java-eclipse-core-contenttype")
6321 (version "3.5.100")
6322 (source (origin
6323 (method url-fetch)
6324 (uri (string-append "https://repo1.maven.org/maven2/"
6325 "org/eclipse/platform/org.eclipse.core.contenttype/"
6326 version "/org.eclipse.core.contenttype-"
6327 version "-sources.jar"))
6328 (sha256
6329 (base32
6330 "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi"))))
6331 (build-system ant-build-system)
6332 (arguments
6333 `(#:tests? #f ; no tests included
6334 #:jar-name "eclipse-core-contenttype.jar"))
6335 (inputs
6336 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6337 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6338 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6339 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6340 (home-page "http://www.eclipse.org/")
6341 (synopsis "Eclipse content mechanism")
6342 (description "This package provides the Eclipse content mechanism in the
6343 @code{org.eclipse.core.contenttype} module.")
6344 (license license:epl1.0)))
6345
6346 (define-public java-eclipse-core-runtime
6347 (package
6348 (name "java-eclipse-core-runtime")
6349 (version "3.15.100")
6350 (source (origin
6351 (method url-fetch)
6352 (uri (string-append "https://repo1.maven.org/maven2/"
6353 "org/eclipse/platform/org.eclipse.core.runtime/"
6354 version "/org.eclipse.core.runtime-"
6355 version "-sources.jar"))
6356 (sha256
6357 (base32
6358 "0l8xayacsbjvz5hypx2fv47vpw2n4dspamcfb3hx30x9hj8vmg7r"))))
6359 (build-system ant-build-system)
6360 (arguments
6361 `(#:tests? #f ; no tests included
6362 #:jar-name "eclipse-core-runtime.jar"))
6363 (inputs
6364 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6365 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6366 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
6367 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6368 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6369 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6370 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6371 (home-page "https://www.eclipse.org/")
6372 (synopsis "Eclipse core runtime")
6373 (description "This package provides the Eclipse core runtime with the
6374 module @code{org.eclipse.core.runtime}.")
6375 (license license:epl1.0)))
6376
6377 (define-public java-eclipse-core-filesystem
6378 (package
6379 (name "java-eclipse-core-filesystem")
6380 (version "1.6.1")
6381 (source (origin
6382 (method url-fetch)
6383 (uri (string-append "https://repo1.maven.org/maven2/"
6384 "org/eclipse/platform/org.eclipse.core.filesystem/"
6385 version "/org.eclipse.core.filesystem-"
6386 version "-sources.jar"))
6387 (sha256
6388 (base32
6389 "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj"))))
6390 (build-system ant-build-system)
6391 (arguments
6392 `(#:tests? #f ; no tests included
6393 #:jar-name "eclipse-core-filesystem.jar"))
6394 (inputs
6395 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6396 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6397 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6398 (home-page "https://www.eclipse.org/")
6399 (synopsis "Eclipse core file system")
6400 (description "This package provides the Eclipse core file system with the
6401 module @code{org.eclipse.core.filesystem}.")
6402 (license license:epl1.0)))
6403
6404 (define-public java-eclipse-core-expressions
6405 (package
6406 (name "java-eclipse-core-expressions")
6407 (version "3.5.100")
6408 (source (origin
6409 (method url-fetch)
6410 (uri (string-append "https://repo1.maven.org/maven2/"
6411 "org/eclipse/platform/org.eclipse.core.expressions/"
6412 version "/org.eclipse.core.expressions-"
6413 version "-sources.jar"))
6414 (sha256
6415 (base32
6416 "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f"))))
6417 (build-system ant-build-system)
6418 (arguments
6419 `(#:tests? #f ; no tests included
6420 #:jar-name "eclipse-core-expressions.jar"))
6421 (inputs
6422 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6423 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6424 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6425 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6426 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6427 (home-page "https://www.eclipse.org/")
6428 (synopsis "Eclipse core expression language")
6429 (description "This package provides the Eclipse core expression language
6430 with the @code{org.eclipse.core.expressions} module.")
6431 (license license:epl1.0)))
6432
6433 (define-public java-eclipse-core-variables
6434 (package
6435 (name "java-eclipse-core-variables")
6436 (version "3.3.0")
6437 (source (origin
6438 (method url-fetch)
6439 (uri (string-append "https://repo1.maven.org/maven2/"
6440 "org/eclipse/platform/org.eclipse.core.variables/"
6441 version "/org.eclipse.core.variables-"
6442 version "-sources.jar"))
6443 (sha256
6444 (base32
6445 "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy"))))
6446 (build-system ant-build-system)
6447 (arguments
6448 `(#:tests? #f ; no tests included
6449 #:jar-name "eclipse-core-variables.jar"))
6450 (inputs
6451 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6452 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6453 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6454 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6455 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6456 (home-page "https://www.eclipse.org/platform")
6457 (synopsis "Eclipse core variables")
6458 (description "This package provides the Eclipse core variables module
6459 @code{org.eclipse.core.variables}.")
6460 (license license:epl1.0)))
6461
6462 (define-public java-eclipse-ant-core
6463 (package
6464 (name "java-eclipse-ant-core")
6465 (version "3.4.100")
6466 (source (origin
6467 (method url-fetch)
6468 (uri (string-append "https://repo1.maven.org/maven2/"
6469 "org/eclipse/platform/org.eclipse.ant.core/"
6470 version "/org.eclipse.ant.core-"
6471 version "-sources.jar"))
6472 (sha256
6473 (base32
6474 "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7"))))
6475 (build-system ant-build-system)
6476 (arguments
6477 `(#:tests? #f ; no tests included
6478 #:jar-name "eclipse-ant-core.jar"))
6479 (inputs
6480 `(("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
6481 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6482 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6483 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6484 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6485 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6486 ("java-eclipse-core-variables" ,java-eclipse-core-variables)
6487 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6488 (home-page "https://www.eclipse.org/platform")
6489 (synopsis "Ant build tool core libraries")
6490 (description "This package provides the ant build tool core libraries with
6491 the module @code{org.eclipse.ant.core}.")
6492 (license license:epl1.0)))
6493
6494 (define-public java-eclipse-core-resources
6495 (package
6496 (name "java-eclipse-core-resources")
6497 (version "3.13.200")
6498 (source (origin
6499 (method url-fetch)
6500 (uri (string-append "https://repo1.maven.org/maven2/"
6501 "org/eclipse/platform/org.eclipse.core.resources/"
6502 version "/org.eclipse.core.resources-"
6503 version "-sources.jar"))
6504 (sha256
6505 (base32
6506 "1sn3b6ky72hkvxcgf9b2jkpbdh3y8lbhi9xxwv1dsiddpkkq91hs"))))
6507 (build-system ant-build-system)
6508 (arguments
6509 `(#:tests? #f ; no tests included
6510 #:jar-name "eclipse-core-resources.jar"))
6511 (inputs
6512 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6513 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6514 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6515 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6516 ("java-eclipse-core-expressions" ,java-eclipse-core-expressions)
6517 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
6518 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6519 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6520 ("java-eclipse-ant-core" ,java-eclipse-ant-core)
6521 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6522 (home-page "https://www.eclipse.org/")
6523 (synopsis "Eclipse core resource management")
6524 (description "This package provides the Eclipse core resource management
6525 module @code{org.eclipse.core.resources}.")
6526 (license license:epl1.0)))
6527
6528 (define-public java-eclipse-compare-core
6529 (package
6530 (name "java-eclipse-compare-core")
6531 (version "3.6.0")
6532 (source (origin
6533 (method url-fetch)
6534 (uri (string-append "https://repo1.maven.org/maven2/"
6535 "org/eclipse/platform/org.eclipse.compare.core/"
6536 version "/org.eclipse.compare.core-"
6537 version "-sources.jar"))
6538 (sha256
6539 (base32
6540 "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg"))))
6541 (build-system ant-build-system)
6542 (arguments
6543 `(#:tests? #f ; no tests included
6544 #:jar-name "eclipse-compare-core.jar"))
6545 (inputs
6546 `(("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6547 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6548 ("java-eclipse-osgi" ,java-eclipse-osgi)
6549 ("java-icu4j" ,java-icu4j)))
6550 (home-page "https://www.eclipse.org/")
6551 (synopsis "Eclipse core compare support")
6552 (description "This package provides the Eclipse core compare support
6553 module @code{org.eclipse.compare.core}.")
6554 (license license:epl1.0)))
6555
6556 (define-public java-eclipse-team-core
6557 (package
6558 (name "java-eclipse-team-core")
6559 (version "3.8.0")
6560 (source (origin
6561 (method url-fetch)
6562 (uri (string-append "https://repo1.maven.org/maven2/"
6563 "org/eclipse/platform/org.eclipse.team.core/"
6564 version "/org.eclipse.team.core-"
6565 version "-sources.jar"))
6566 (sha256
6567 (base32
6568 "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7"))))
6569 (build-system ant-build-system)
6570 (arguments
6571 `(#:tests? #f ; no tests included
6572 #:jar-name "eclipse-team-core.jar"))
6573 (inputs
6574 `(("java-eclipse-compare-core" ,java-eclipse-compare-core)
6575 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6576 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
6577 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6578 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
6579 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6580 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6581 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6582 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6583 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6584 (home-page "https://www.eclipse.org/platform")
6585 (synopsis "Eclipse team support core")
6586 (description "This package provides the Eclipse team support core module
6587 @code{org.eclipse.team.core}.")
6588 (license license:epl1.0)))
6589
6590 (define-public java-eclipse-core-commands
6591 (package
6592 (name "java-eclipse-core-commands")
6593 (version "3.8.1")
6594 (source (origin
6595 (method url-fetch)
6596 (uri (string-append "https://repo1.maven.org/maven2/"
6597 "org/eclipse/platform/org.eclipse.core.commands/"
6598 version "/org.eclipse.core.commands-"
6599 version "-sources.jar"))
6600 (sha256
6601 (base32
6602 "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9"))))
6603 (build-system ant-build-system)
6604 (arguments
6605 `(#:tests? #f ; no tests included
6606 #:jar-name "eclipse-core-commands.jar"))
6607 (inputs
6608 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)))
6609 (home-page "https://www.eclipse.org/platform")
6610 (synopsis "Eclipse core commands")
6611 (description "This package provides Eclipse core commands in the module
6612 @code{org.eclipse.core.commands}.")
6613 (license license:epl1.0)))
6614
6615 (define-public java-eclipse-text
6616 (package
6617 (name "java-eclipse-text")
6618 (version "3.6.0")
6619 (source (origin
6620 (method url-fetch)
6621 (uri (string-append "https://repo1.maven.org/maven2/"
6622 "org/eclipse/platform/org.eclipse.text/"
6623 version "/org.eclipse.text-"
6624 version "-sources.jar"))
6625 (sha256
6626 (base32
6627 "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1"))))
6628 (build-system ant-build-system)
6629 (arguments
6630 `(#:tests? #f ; no tests included
6631 #:jar-name "eclipse-text.jar"
6632 #:phases
6633 (modify-phases %standard-phases
6634 ;; When creating a new category we must make sure that the new list
6635 ;; matches List<Position>. By default it seems to be too generic
6636 ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>.
6637 ;; Without this we get this error:
6638 ;;
6639 ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376:
6640 ;; error: method put in interface Map<K,V> cannot be applied to given types;
6641 ;; [javac] fPositions.put(category, new ArrayList<>());
6642 ;; [javac] ^
6643 ;; [javac] required: String,List<Position>
6644 ;; [javac] found: String,ArrayList<Object>
6645 ;; [javac] reason: actual argument ArrayList<Object> cannot be converted
6646 ;; to List<Position> by method invocation conversion
6647 ;; [javac] where K,V are type-variables:
6648 ;; [javac] K extends Object declared in interface Map
6649 ;; [javac] V extends Object declared in interface Map
6650 ;;
6651 ;; I don't know if this is a good fix. I suspect it is not, but it
6652 ;; seems to work.
6653 (add-after 'unpack 'fix-compilation-error
6654 (lambda _
6655 (substitute* "src/org/eclipse/jface/text/AbstractDocument.java"
6656 (("Positions.put\\(category, new ArrayList<>\\(\\)\\);")
6657 "Positions.put(category, new ArrayList<Position>());"))
6658 #t)))))
6659 (inputs
6660 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6661 ("java-eclipse-core-commands" ,java-eclipse-core-commands)
6662 ("java-icu4j" ,java-icu4j)))
6663 (home-page "http://www.eclipse.org/platform")
6664 (synopsis "Eclipse text library")
6665 (description "Platform Text is part of the Platform UI project and
6666 provides the basic building blocks for text and text editors within Eclipse
6667 and contributes the Eclipse default text editor.")
6668 (license license:epl1.0)))
6669
6670 (define-public java-eclipse-jdt-core
6671 (package
6672 (name "java-eclipse-jdt-core")
6673 (version "3.16.0")
6674 (source (origin
6675 (method url-fetch)
6676 (uri (string-append "https://repo1.maven.org/maven2/"
6677 "org/eclipse/jdt/org.eclipse.jdt.core/"
6678 version "/org.eclipse.jdt.core-"
6679 version "-sources.jar"))
6680 (sha256
6681 (base32
6682 "1g560yr9v2kzv34gc2m3ifpgnj7krcdd6h4gd4z83pwqacwkfz0k"))))
6683 (build-system ant-build-system)
6684 (arguments
6685 `(#:tests? #f ; no tests included
6686 #:jar-name "eclipse-jdt-core.jar"
6687 #:phases
6688 (modify-phases %standard-phases
6689 (add-after 'unpack 'move-sources
6690 (lambda _
6691 (with-directory-excursion "src/jdtCompilerAdaptersrc/"
6692 (for-each (lambda (file)
6693 (install-file file (string-append "../" (dirname file))))
6694 (find-files "." ".*")))
6695 (delete-file-recursively "src/jdtCompilerAdaptersrc/")
6696 #t))
6697 (add-before 'build 'copy-resources
6698 (lambda _
6699 (with-directory-excursion "src"
6700 (for-each (lambda (file)
6701 (install-file file (string-append "../build/classes/" (dirname file))))
6702 (find-files "." ".*.(props|properties|rsc)")))
6703 #t)))))
6704 (inputs
6705 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6706 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
6707 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6708 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
6709 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6710 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
6711 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6712 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6713 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6714 ("java-eclipse-osgi" ,java-eclipse-osgi)
6715 ("java-eclipse-text" ,java-eclipse-text)))
6716 (home-page "https://www.eclipse.org/jdt")
6717 (synopsis "Java development tools core libraries")
6718 (description "This package provides the core libraries of the Eclipse Java
6719 development tools.")
6720 (license license:epl1.0)))
6721
6722 (define-public java-eclipse-jdt-compiler-apt
6723 (package
6724 (name "java-eclipse-jdt-compiler-apt")
6725 (version "1.3.400")
6726 (source (origin
6727 (method url-fetch)
6728 (uri (string-append "https://repo1.maven.org/maven2/"
6729 "org/eclipse/jdt/org.eclipse.jdt.compiler.apt/"
6730 version "/org.eclipse.jdt.compiler.apt-"
6731 version "-sources.jar"))
6732 (sha256
6733 (base32
6734 "1s285k9p2ixdqrknb40jbbvw682n9a7l5lqpn583a8pvlzg2l6r8"))))
6735 (build-system ant-build-system)
6736 (arguments
6737 `(#:tests? #f ; no tests included
6738 #:jar-name "eclipse-jdt-compiler-apt.jar"
6739 #:jdk ,openjdk11))
6740 (inputs
6741 `(("java-eclipse-jdt-core" ,java-eclipse-jdt-core)))
6742 (home-page "https://www.eclipse.org/jdt/apt/")
6743 (synopsis "Annotation processing tool")
6744 (description "APT stands for Annotation Processing Tool. APT provides a
6745 means for generating files and compiling new Java classes based on annotations
6746 found in your source code.")
6747 (license license:epl2.0)))
6748
6749 (define-public java-javax-mail
6750 (package
6751 (name "java-javax-mail")
6752 (version "1.5.6")
6753 (source (origin
6754 (method url-fetch)
6755 (uri (string-append "https://repo1.maven.org/maven2/"
6756 "com/sun/mail/javax.mail/"
6757 version "/javax.mail-"
6758 version "-sources.jar"))
6759 (sha256
6760 (base32
6761 "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9"))))
6762 (build-system ant-build-system)
6763 (arguments
6764 `(#:tests? #f ; no tests
6765 #:jar-name "javax-mail.jar"))
6766 (home-page "https://javamail.java.net")
6767 (synopsis "Reference implementation of the JavaMail API")
6768 (description
6769 "This package provides versions of the JavaMail API implementation, IMAP,
6770 SMTP, and POP3 service providers, some examples, and documentation for the
6771 JavaMail API.")
6772 ;; GPLv2 only with "classpath exception".
6773 (license license:gpl2)))
6774
6775 (define-public java-log4j-api
6776 (package
6777 (name "java-log4j-api")
6778 (version "2.4.1")
6779 (source (origin
6780 (method url-fetch)
6781 (uri (string-append "mirror://apache/logging/log4j/" version
6782 "/apache-log4j-" version "-src.tar.gz"))
6783 (sha256
6784 (base32
6785 "0j5p9gik0jysh37nlrckqbky12isy95cpwg2gv5fas1rcdqbraxd"))))
6786 (build-system ant-build-system)
6787 (arguments
6788 `(#:tests? #f ; tests require unpackaged software
6789 #:jar-name "log4j-api.jar"
6790 #:make-flags
6791 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
6792 "/share/java"))
6793 #:phases
6794 (modify-phases %standard-phases
6795 (add-after 'unpack 'enter-dir
6796 (lambda _ (chdir "log4j-api") #t))
6797 ;; FIXME: The tests require additional software that has not been
6798 ;; packaged yet, such as
6799 ;; * org.apache.maven
6800 ;; * org.apache.felix
6801 (add-after 'enter-dir 'delete-tests
6802 (lambda _ (delete-file-recursively "src/test") #t)))))
6803 (inputs
6804 `(("java-osgi-core" ,java-osgi-core)
6805 ("java-hamcrest-core" ,java-hamcrest-core)
6806 ("java-junit" ,java-junit)))
6807 (home-page "https://logging.apache.org/log4j/2.x/")
6808 (synopsis "API module of the Log4j logging framework for Java")
6809 (description
6810 "This package provides the API module of the Log4j logging framework for
6811 Java.")
6812 (license license:asl2.0)))
6813
6814 (define-public java-log4j-core
6815 (package
6816 (inherit java-log4j-api)
6817 (name "java-log4j-core")
6818 (inputs
6819 `(("java-osgi-core" ,java-osgi-core)
6820 ("java-hamcrest-core" ,java-hamcrest-core)
6821 ("java-log4j-api" ,java-log4j-api)
6822 ("java-mail" ,java-mail)
6823 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
6824 ("java-lmax-disruptor" ,java-lmax-disruptor)
6825 ("java-kafka" ,java-kafka-clients)
6826 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
6827 ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
6828 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
6829 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
6830 ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml)
6831 ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml)
6832 ("java-commons-compress" ,java-commons-compress)
6833 ("java-commons-csv" ,java-commons-csv)
6834 ("java-jeromq" ,java-jeromq)
6835 ("java-junit" ,java-junit)))
6836 (native-inputs
6837 `(("hamcrest" ,java-hamcrest-all)
6838 ("java-commons-io" ,java-commons-io)
6839 ("java-commons-lang3" ,java-commons-lang3)
6840 ("slf4j" ,java-slf4j-api)))
6841 (arguments
6842 `(#:tests? #f ; tests require more dependencies
6843 #:test-dir "src/test"
6844 #:source-dir "src/main/java"
6845 #:jar-name "log4j-core.jar"
6846 #:jdk ,icedtea-8
6847 #:make-flags
6848 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
6849 "/share/java"))
6850 #:phases
6851 (modify-phases %standard-phases
6852 (add-after 'unpack 'enter-dir
6853 (lambda _ (chdir "log4j-core") #t)))))
6854 (synopsis "Core component of the Log4j framework")
6855 (description "This package provides the core component of the Log4j
6856 logging framework for Java.")))
6857
6858 (define-public java-log4j-1.2-api
6859 (package
6860 (inherit java-log4j-api)
6861 (name "java-log4j-1.2-api")
6862 (arguments
6863 `(#:jar-name "java-log4j-1.2-api.jar"
6864 #:source-dir "log4j-1.2-api/src/main/java"
6865 #:jdk ,icedtea-8
6866 ;; Tests require maven-model (and other maven subprojects), which is a
6867 ;; cyclic dependency.
6868 #:tests? #f))
6869 (inputs
6870 `(("log4j-api" ,java-log4j-api)
6871 ("log4j-core" ,java-log4j-core)
6872 ("osgi-core" ,java-osgi-core)
6873 ("eclipse-osgi" ,java-eclipse-osgi)
6874 ("java-lmax-disruptor" ,java-lmax-disruptor)))))
6875
6876 (define-public java-commons-cli
6877 (package
6878 (name "java-commons-cli")
6879 (version "1.4")
6880 (source (origin
6881 (method url-fetch)
6882 (uri (string-append "mirror://apache/commons/cli/source/"
6883 "commons-cli-" version "-src.tar.gz"))
6884 (sha256
6885 (base32
6886 "05hgi2z01fqz374y719gl1dxzqvzci5af071zm7vxrjg9vczipm1"))))
6887 (build-system ant-build-system)
6888 ;; TODO: javadoc
6889 (arguments
6890 `(#:jar-name "commons-cli.jar"))
6891 (native-inputs
6892 `(("java-junit" ,java-junit)
6893 ("java-hamcrest-core" ,java-hamcrest-core)))
6894 (home-page "https://commons.apache.org/cli/")
6895 (synopsis "Command line arguments and options parsing library")
6896 (description "The Apache Commons CLI library provides an API for parsing
6897 command line options passed to programs. It is also able to print help
6898 messages detailing the options available for a command line tool.
6899
6900 Commons CLI supports different types of options:
6901
6902 @itemize
6903 @item POSIX like options (ie. tar -zxvf foo.tar.gz)
6904 @item GNU like long options (ie. du --human-readable --max-depth=1)
6905 @item Java like properties (ie. java -Djava.awt.headless=true Foo)
6906 @item Short options with value attached (ie. gcc -O2 foo.c)
6907 @item long options with single hyphen (ie. ant -projecthelp)
6908 @end itemize
6909
6910 This is a part of the Apache Commons Project.")
6911 (license license:asl2.0)))
6912
6913 (define-public java-commons-codec
6914 (package
6915 (name "java-commons-codec")
6916 (version "1.14")
6917 (source (origin
6918 (method url-fetch)
6919 (uri (string-append "mirror://apache/commons/codec/source/"
6920 "commons-codec-" version "-src.tar.gz"))
6921 (sha256
6922 (base32
6923 "11xr0agckkhm91pb5akf2mbk84yd54gyr178wj57gsm97fi7nkh9"))))
6924 (build-system ant-build-system)
6925 (arguments
6926 `(#:jar-name "java-commons-codec.jar"
6927 #:source-dir "src/main/java"
6928 #:test-dir "src/test"
6929 #:test-exclude (list "**/*AbstractTest.java")
6930 #:phases
6931 (modify-phases %standard-phases
6932 (add-before 'build 'copy-resources
6933 (lambda _
6934 (copy-recursively "src/main/resources"
6935 "build/classes")
6936 #t))
6937 (add-before 'check 'copy-test-resources
6938 (lambda _
6939 (copy-recursively "src/test/resources"
6940 "build/test-classes")
6941 #t))
6942 (replace 'install (install-from-pom "pom.xml")))))
6943 (native-inputs
6944 `(("java-commons-lang3" ,java-commons-lang3)
6945 ("java-junit" ,java-junit)))
6946 (propagated-inputs
6947 `(("apache-commons-parent-pom" ,apache-commons-parent-pom-50)))
6948 (home-page "https://commons.apache.org/codec/")
6949 (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs")
6950 (description "The codec package contains simple encoder and decoders for
6951 various formats such as Base64 and Hexadecimal. In addition to these widely
6952 used encoders and decoders, the codec package also maintains a collection of
6953 phonetic encoding utilities.
6954
6955 This is a part of the Apache Commons Project.")
6956 (license license:asl2.0)))
6957
6958 (define-public java-commons-daemon
6959 (package
6960 (name "java-commons-daemon")
6961 (version "1.1.0")
6962 (source (origin
6963 (method url-fetch)
6964 (uri (string-append "mirror://apache/commons/daemon/source/"
6965 "commons-daemon-" version "-src.tar.gz"))
6966 (sha256
6967 (base32
6968 "141gkhfzv5v3pdhic6y4ardq2dhsa3v36j8wmmhy6f8mac48fp7n"))))
6969 (build-system ant-build-system)
6970 (arguments
6971 `(#:test-target "test"
6972 #:phases
6973 (modify-phases %standard-phases
6974 (add-after 'build 'build-javadoc ant-build-javadoc)
6975 (replace 'install (install-jars "dist"))
6976 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
6977 (native-inputs
6978 `(("java-junit" ,java-junit)))
6979 (home-page "https://commons.apache.org/daemon/")
6980 (synopsis "Library to launch Java applications as daemons")
6981 (description "The Daemon package from Apache Commons can be used to
6982 implement Java applications which can be launched as daemons. For example the
6983 program will be notified about a shutdown so that it can perform cleanup tasks
6984 before its process of execution is destroyed by the operation system.
6985
6986 This package contains the Java library. You will also need the actual binary
6987 for your architecture which is provided by the jsvc package.
6988
6989 This is a part of the Apache Commons Project.")
6990 (license license:asl2.0)))
6991
6992 (define-public java-javaewah
6993 (package
6994 (name "java-javaewah")
6995 (version "1.1.6")
6996 (source (origin
6997 (method git-fetch)
6998 (uri (git-reference
6999 (url "https://github.com/lemire/javaewah/")
7000 (commit (string-append "JavaEWAH-" version))))
7001 (file-name (git-file-name name version))
7002 (sha256
7003 (base32
7004 "1m8qcb1py76v7avbjjrkvyy6fhr5dk2ywy73gbsxqry04gkm2nhw"))))
7005 (build-system ant-build-system)
7006 (arguments `(#:jar-name "javaewah.jar"))
7007 (inputs
7008 `(("java-junit" ,java-junit)
7009 ("java-hamcrest-core" ,java-hamcrest-core)))
7010 (home-page "https://github.com/lemire/javaewah")
7011 (synopsis "Compressed alternative to the Java @code{BitSet} class")
7012 (description "This is a word-aligned compressed variant of the Java
7013 @code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like
7014 compression scheme. It can be used to implement bitmap indexes.
7015
7016 The goal of word-aligned compression is not to achieve the best compression,
7017 but rather to improve query processing time. Hence, JavaEWAH tries to save CPU
7018 cycles, maybe at the expense of storage. However, the EWAH scheme is always
7019 more efficient storage-wise than an uncompressed bitmap (as implemented in the
7020 @code{BitSet} class by Sun).")
7021 ;; GPL2.0 derivates are explicitly allowed.
7022 (license license:asl2.0)))
7023
7024 (define-public java-slf4j-api
7025 (package
7026 (name "java-slf4j-api")
7027 (version "1.7.25")
7028 (source (origin
7029 (method url-fetch)
7030 (uri (string-append "https://www.slf4j.org/dist/slf4j-"
7031 version ".tar.gz"))
7032 (sha256
7033 (base32
7034 "13j51sgzmhhdrfa74gkal5zpip7r1440dh7zsi2c8bpb2zs1v8kb"))
7035 (modules '((guix build utils)))
7036 ;; Delete bundled jars.
7037 (snippet
7038 '(begin
7039 (for-each delete-file (find-files "." "\\.jar$"))
7040 #t))))
7041 (build-system ant-build-system)
7042 (arguments
7043 `(#:jar-name "slf4j-api.jar"
7044 #:source-dir "slf4j-api/src/main"
7045 #:test-dir "slf4j-api/src/test"
7046 #:phases
7047 (modify-phases %standard-phases
7048 (add-after 'build 'regenerate-jar
7049 (lambda _
7050 ;; pom.xml ignores these files in the jar creation process. If we don't,
7051 ;; we get the error "This code should have never made it into slf4j-api.jar"
7052 (delete-file-recursively "build/classes/org/slf4j/impl")
7053 (invoke "jar" "-cf" "build/jar/slf4j-api.jar" "-C"
7054 "build/classes" ".")))
7055 (add-before 'check 'dont-test-abstract-classes
7056 (lambda _
7057 ;; abstract classes are not meant to be run with junit
7058 (substitute* "build.xml"
7059 (("<include name=\"\\*\\*/\\*Test.java\" />")
7060 (string-append "<include name=\"**/*Test.java\" />"
7061 "<exclude name=\"**/MultithreadedInitializationTest"
7062 ".java\" />")))
7063 #t)))))
7064 (inputs
7065 `(("java-junit" ,java-junit)
7066 ("java-hamcrest-core" ,java-hamcrest-core)))
7067 (home-page "https://www.slf4j.org/")
7068 (synopsis "Simple logging facade for Java")
7069 (description "The Simple Logging Facade for Java (SLF4J) serves as a
7070 simple facade or abstraction for various logging
7071 frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j})
7072 allowing the end user to plug in the desired logging framework at deployment
7073 time.")
7074 (license license:expat)))
7075
7076 (define-public java-slf4j-simple
7077 (package
7078 (name "java-slf4j-simple")
7079 (version "1.7.25")
7080 (source (package-source java-slf4j-api))
7081 (build-system ant-build-system)
7082 (arguments
7083 `(#:jar-name "slf4j-simple.jar"
7084 #:source-dir "slf4j-simple/src/main"
7085 #:test-dir "slf4j-simple/src/test"
7086 #:phases
7087 (modify-phases %standard-phases
7088 ;; The tests need some test classes from slf4j-api
7089 (add-before 'check 'build-slf4j-api-test-helpers
7090 (lambda _
7091 ;; Add current dir to CLASSPATH ...
7092 (setenv "CLASSPATH"
7093 (string-append (getcwd) ":" (getenv "CLASSPATH")))
7094 ;; ... and build test helper classes here:
7095 (apply invoke
7096 `("javac" "-d" "."
7097 ,@(find-files "slf4j-api/src/test" ".*\\.java"))))))))
7098 (inputs
7099 `(("java-junit" ,java-junit)
7100 ("java-hamcrest-core" ,java-hamcrest-core)
7101 ("java-slf4j-api" ,java-slf4j-api)))
7102 (home-page "https://www.slf4j.org/")
7103 (synopsis "Simple implementation of simple logging facade for Java")
7104 (description "SLF4J binding for the Simple implementation, which outputs
7105 all events to System.err. Only messages of level INFO and higher are
7106 printed.")
7107 (license license:expat)))
7108
7109 (define-public antlr2
7110 (package
7111 (name "antlr2")
7112 (version "2.7.7")
7113 (source (origin
7114 (method url-fetch)
7115 (uri (string-append "https://www.antlr2.org/download/antlr-"
7116 version ".tar.gz"))
7117 (sha256
7118 (base32
7119 "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5"))
7120 (modules '((guix build utils)))
7121 (snippet
7122 '(begin
7123 (delete-file "antlr.jar")
7124 (substitute* "lib/cpp/antlr/CharScanner.hpp"
7125 (("#include <map>")
7126 (string-append
7127 "#include <map>\n"
7128 "#define EOF (-1)\n"
7129 "#include <strings.h>")))
7130 (substitute* "configure"
7131 (("/bin/sh") "sh"))
7132 #t))))
7133 (build-system gnu-build-system)
7134 (arguments
7135 `(#:tests? #f ; no test target
7136 #:imported-modules ((guix build ant-build-system)
7137 (guix build syscalls)
7138 ,@%gnu-build-system-modules)
7139 #:modules (((guix build ant-build-system) #:prefix ant:)
7140 (guix build gnu-build-system)
7141 (guix build utils))
7142 #:phases
7143 (modify-phases %standard-phases
7144 (add-after 'install 'strip-jar-timestamps
7145 (assoc-ref ant:%standard-phases 'strip-jar-timestamps))
7146 (add-before 'configure 'fix-timestamp
7147 (lambda _
7148 (substitute* "configure"
7149 (("^TIMESTAMP.*") "TIMESTAMP=19700101\n"))
7150 #t))
7151 (add-after 'configure 'fix-bin-ls
7152 (lambda _
7153 (substitute* (find-files "." "Makefile")
7154 (("/bin/ls") "ls"))
7155 #t)))))
7156 (native-inputs
7157 `(("which" ,which)
7158 ("zip" ,zip)
7159 ("java" ,icedtea "jdk")))
7160 (inputs
7161 `(("java" ,icedtea)))
7162 (home-page "https://www.antlr2.org")
7163 (synopsis "Framework for constructing recognizers, compilers, and translators")
7164 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
7165 is a language tool that provides a framework for constructing recognizers,
7166 compilers, and translators from grammatical descriptions containing Java, C#,
7167 C++, or Python actions. ANTLR provides excellent support for tree construction,
7168 tree walking, and translation.")
7169 (license license:public-domain)))
7170
7171 (define-public java-stringtemplate-3
7172 (package
7173 (name "java-stringtemplate")
7174 (version "3.2.1")
7175 (source (origin
7176 (method url-fetch)
7177 (uri (string-append "https://github.com/antlr/website-st4/raw/"
7178 "gh-pages/download/stringtemplate-"
7179 version ".tar.gz"))
7180 (sha256
7181 (base32
7182 "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is"))))
7183 (build-system ant-build-system)
7184 (arguments
7185 `(#:jar-name (string-append ,name "-" ,version ".jar")
7186 #:test-dir "test"
7187 #:modules ((guix build ant-build-system)
7188 (guix build utils)
7189 (srfi srfi-1))
7190 #:phases
7191 (modify-phases %standard-phases
7192 (add-before 'check 'fix-tests
7193 (lambda _
7194 (substitute* "build.xml"
7195 (("\\$\\{test.home\\}/java")
7196 "${test.home}/org"))
7197 #t))
7198 (add-before 'build 'generate-grammar
7199 (lambda _
7200 (with-directory-excursion "src/org/antlr/stringtemplate/language/"
7201 (for-each (lambda (file)
7202 (format #t "~a\n" file)
7203 (invoke "antlr" file))
7204 '("template.g" "angle.bracket.template.g" "action.g"
7205 "eval.g" "group.g" "interface.g")))
7206 #t)))))
7207 (native-inputs
7208 `(("antlr" ,antlr2)
7209 ("java-junit" ,java-junit)))
7210 (home-page "https://www.stringtemplate.org")
7211 (synopsis "Template engine to generate formatted text output")
7212 (description "StringTemplate is a java template engine (with ports for C#,
7213 Objective-C, JavaScript, Scala) for generating source code, web pages, emails,
7214 or any other formatted text output. StringTemplate is particularly good at
7215 code generators, multiple site skins, and internationalization / localization.
7216 StringTemplate also powers ANTLR.")
7217 (license license:bsd-3)))
7218
7219 ;; antlr3 is partially written using antlr3 grammar files. It also depends on
7220 ;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar
7221 ;; files and uses antlr3 at runtime. The latest version requires a recent version
7222 ;; of antlr3 at runtime.
7223 ;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3.
7224 ;; This version of ST4 is sufficient for the latest antlr3.
7225 ;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build
7226 ;; the latest ST4 with it. Then we build our final antlr3 that will be linked
7227 ;; against the latest ST4.
7228 ;; antlr3.3 still depends on antlr3 to generate some files, so we use an
7229 ;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses
7230 ;; only grammar files with the antlr2 syntax.
7231 ;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3.
7232
7233 (define-public java-stringtemplate
7234 (package (inherit java-stringtemplate-3)
7235 (name "java-stringtemplate")
7236 (version "4.0.8")
7237 (source (origin
7238 (method url-fetch)
7239 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/"
7240 version ".tar.gz"))
7241 (file-name (string-append name "-" version ".tar.gz"))
7242 (sha256
7243 (base32
7244 "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087"))))
7245 (build-system ant-build-system)
7246 (arguments
7247 `(#:jar-name (string-append ,name "-" ,version ".jar")
7248 #:tests? #f ; FIXME: tests fail for unknown reasons
7249 #:test-dir "test"
7250 #:modules ((guix build ant-build-system)
7251 (guix build utils)
7252 (srfi srfi-1))
7253 #:phases
7254 (modify-phases %standard-phases
7255 (add-before 'check 'fix-test-target
7256 (lambda _
7257 (substitute* "build.xml"
7258 (("\\$\\{test.home\\}/java") "${test.home}/")
7259 (("\\*Test.java") "Test*.java"))
7260 #t))
7261 (add-before 'build 'generate-grammar
7262 (lambda _
7263 (with-directory-excursion "src/org/stringtemplate/v4/compiler/"
7264 (for-each (lambda (file)
7265 (format #t "~a\n" file)
7266 (invoke "antlr3" file))
7267 '("STParser.g" "Group.g" "CodeGenerator.g")))
7268 #t)))))
7269 (inputs
7270 `(("antlr3" ,antlr3-bootstrap)
7271 ("antlr2" ,antlr2)
7272 ("java-stringtemplate" ,java-stringtemplate-3)
7273 ("java-junit" ,java-junit)))))
7274
7275 (define java-stringtemplate-4.0.6
7276 (package (inherit java-stringtemplate)
7277 (name "java-stringtemplate")
7278 (version "4.0.6")
7279 (source (origin
7280 (method url-fetch)
7281 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-"
7282 version ".tar.gz"))
7283 (file-name (string-append name "-" version ".tar.gz"))
7284 (sha256
7285 (base32
7286 "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp"))))
7287 (inputs
7288 `(("antlr3" ,antlr3-3.3)
7289 ("antlr2" ,antlr2)
7290 ("java-stringtemplate" ,java-stringtemplate-3)))))
7291
7292 (define-public antlr3
7293 (package
7294 (name "antlr3")
7295 (version "3.5.2")
7296 (source (origin
7297 (method git-fetch)
7298 (uri (git-reference
7299 (url "https://github.com/antlr/antlr3")
7300 (commit version)))
7301 (file-name (git-file-name name version))
7302 (sha256
7303 (base32
7304 "0cafavrjmzqhklghrk8c2jqxkdwxgzskm20pbrfd3r41cn00dpnf"))))
7305 (build-system ant-build-system)
7306 (arguments
7307 `(#:jar-name (string-append ,name "-" ,version ".jar")
7308 #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3"
7309 #:tests? #f
7310 #:phases
7311 (modify-phases %standard-phases
7312 (add-after 'install 'bin-install
7313 (lambda* (#:key inputs outputs #:allow-other-keys)
7314 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
7315 (bin (string-append (assoc-ref outputs "out") "/bin")))
7316 (mkdir-p bin)
7317 (with-output-to-file (string-append bin "/antlr3")
7318 (lambda _
7319 (display
7320 (string-append "#!" (which "sh") "\n"
7321 "java -cp " jar "/" ,name "-" ,version ".jar:"
7322 (string-concatenate
7323 (find-files (assoc-ref inputs "stringtemplate")
7324 ".*\\.jar"))
7325 ":"
7326 (string-concatenate
7327 (find-files (assoc-ref inputs "stringtemplate4")
7328 ".*\\.jar"))
7329 ":"
7330 (string-concatenate
7331 (find-files (string-append
7332 (assoc-ref inputs "antlr")
7333 "/lib")
7334 ".*\\.jar"))
7335 " org.antlr.Tool $*"))))
7336 (chmod (string-append bin "/antlr3") #o755))
7337 #t))
7338 (add-before 'build 'generate-grammar
7339 (lambda _
7340 (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/")
7341 (for-each (lambda (file)
7342 (display file)
7343 (newline)
7344 (invoke "antlr3" file))
7345 '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g"
7346 "AssignTokenTypesWalker.g"
7347 "ActionTranslator.g" "TreeToNFAConverter.g"
7348 "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g"
7349 "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g"))
7350 (substitute* "ANTLRParser.java"
7351 (("public Object getTree") "public GrammarAST getTree"))
7352 (substitute* "ANTLRv3Parser.java"
7353 (("public Object getTree") "public CommonTree getTree"))
7354 (chdir "../../../../../java")
7355 (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java"
7356 (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*;
7357 import org.antlr.grammar.v3.ANTLRTreePrinter;"))
7358 (substitute* "org/antlr/tool/ErrorManager.java"
7359 (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") ""))
7360 (chdir "../../../..")
7361 #t))
7362 (add-before 'build 'fix-build-xml
7363 (lambda _
7364 (substitute* "build.xml"
7365 (("target name=\"compile\">")
7366 "target name=\"compile\">
7367 <copy todir=\"${classes.dir}\">
7368 <fileset dir=\"tool/src/main/resources\">
7369 <include name=\"**/*.stg\"/>
7370 <include name=\"**/*.st\"/>
7371 <include name=\"**/*.sti\"/>
7372 <include name=\"**/STLexer.tokens\"/>
7373 </fileset>
7374 </copy>"))
7375 #t)))))
7376 (native-inputs
7377 `(("antlr" ,antlr2)
7378 ("antlr3" ,antlr3-bootstrap)))
7379 (inputs
7380 `(("junit" ,java-junit)
7381 ("stringtemplate" ,java-stringtemplate-3)
7382 ("stringtemplate4" ,java-stringtemplate)))
7383 (propagated-inputs
7384 `(("stringtemplate" ,java-stringtemplate-3)
7385 ("antlr" ,antlr2)
7386 ("stringtemplate4" ,java-stringtemplate-4.0.6)))
7387 (home-page "https://www.antlr3.org")
7388 (synopsis "Framework for constructing recognizers, compilers, and translators")
7389 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
7390 is a language tool that provides a framework for constructing recognizers,
7391 compilers, and translators from grammatical descriptions containing Java, C#,
7392 C++, or Python actions. ANTLR provides excellent support for tree construction,
7393 tree walking, and translation.")
7394 (license license:bsd-3)))
7395
7396 (define antlr3-bootstrap
7397 (package
7398 (inherit antlr3)
7399 (name "antlr3-bootstrap")
7400 (native-inputs
7401 `(("antlr" ,antlr2)
7402 ("antlr3" ,antlr3-3.3)))
7403 (inputs
7404 `(("junit" ,java-junit)))))
7405
7406 (define-public antlr3-3.3
7407 (package
7408 (inherit antlr3)
7409 (name "antlr3")
7410 (version "3.3")
7411 (source (origin
7412 (method url-fetch)
7413 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
7414 "gh-pages/download/antlr-"
7415 version ".tar.gz"))
7416 (sha256
7417 (base32
7418 "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m"))
7419 (patches
7420 (search-patches "antlr3-3_3-fix-java8-compilation.patch"))))
7421 (arguments
7422 `(#:jar-name (string-append ,name "-" ,version ".jar")
7423 #:source-dir (string-join '("tool/src/main/java"
7424 "runtime/Java/src/main/java"
7425 "tool/src/main/antlr2"
7426 "tool/src/main/antlr3")
7427 ":")
7428 #:tests? #f ; FIXME: tests seem to require maven plugin
7429 #:modules ((guix build ant-build-system)
7430 (guix build utils)
7431 (srfi srfi-1))
7432 #:phases
7433 (modify-phases %standard-phases
7434 (add-after 'install 'bin-install
7435 (lambda* (#:key inputs outputs #:allow-other-keys)
7436 (let* ((out (assoc-ref outputs "out"))
7437 (jar (string-append out "/share/java"))
7438 (bin (string-append out "/bin")))
7439 (mkdir-p bin)
7440 (with-output-to-file (string-append bin "/antlr3")
7441 (lambda _
7442 (display
7443 (string-append
7444 "#!" (which "sh") "\n"
7445 "java -cp " jar "/antlr3-3.3.jar:"
7446 (string-join
7447 (append (find-files (assoc-ref inputs "java-stringtemplate")
7448 ".*\\.jar$")
7449 (find-files (string-append (assoc-ref inputs "antlr")
7450 "/lib")
7451 ".*\\.jar$"))
7452 ":")
7453 " org.antlr.Tool $*"))))
7454 (chmod (string-append bin "/antlr3") #o755)
7455 #t)))
7456 (add-before 'build 'generate-grammar
7457 (lambda _
7458 (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java"
7459 (("import org.antlr.grammar.v2.\\*;")
7460 "import org.antlr.grammar.v2.*;\n
7461 import org.antlr.grammar.v2.TreeToNFAConverter;\n
7462 import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n
7463 import org.antlr.grammar.v2.ANTLRTreePrinter;"))
7464 (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/"
7465 (for-each (lambda (file)
7466 (format #t "~a\n" file)
7467 (invoke "antlr" file))
7468 '("antlr.g" "antlr.print.g" "assign.types.g"
7469 "buildnfa.g" "codegen.g" "define.g")))
7470 (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/"
7471 (for-each (lambda (file)
7472 (format #t "~a\n" file)
7473 (invoke "antlr3" file))
7474 '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g"
7475 "ANTLRv3Tree.g")))
7476 #t))
7477 (add-before 'build 'fix-build-xml
7478 (lambda _
7479 (substitute* "build.xml"
7480 (("target name=\"compile\">")
7481 "target name=\"compile\">
7482 <copy todir=\"${classes.dir}\">
7483 <fileset dir=\"tool/src/main/resources\">
7484 <include name=\"**/*.stg\"/>
7485 <include name=\"**/*.st\"/>
7486 <include name=\"**/*.sti\"/>
7487 <include name=\"**/STLexer.tokens\"/>
7488 </fileset>
7489 </copy>"))
7490 #t)))))
7491 (native-inputs
7492 `(("antlr" ,antlr2)
7493 ("antlr3" ,antlr3-3.1)))
7494 (inputs
7495 `(("junit" ,java-junit)))
7496 (propagated-inputs
7497 `(("java-stringtemplate" ,java-stringtemplate-3)
7498 ("antlr" ,antlr2)))))
7499
7500 (define-public antlr3-3.1
7501 (package
7502 (inherit antlr3)
7503 (version "3.1")
7504 (source (origin
7505 (method url-fetch)
7506 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
7507 "gh-pages/download/antlr-"
7508 version ".tar.gz"))
7509 (sha256
7510 (base32
7511 "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z"))
7512 (patches
7513 (search-patches "antlr3-3_1-fix-java8-compilation.patch"))))
7514 (arguments
7515 `(#:jar-name (string-append "antlr3-" ,version ".jar")
7516 #:source-dir "src:runtime/Java/src"
7517 #:tests? #f
7518 #:phases
7519 (modify-phases %standard-phases
7520 (add-after 'install 'bin-install
7521 (lambda* (#:key inputs outputs #:allow-other-keys)
7522 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
7523 (bin (string-append (assoc-ref outputs "out") "/bin")))
7524 (mkdir-p bin)
7525 (with-output-to-file (string-append bin "/antlr3")
7526 (lambda _
7527 (display
7528 (string-append "#!" (which "sh") "\n"
7529 "java -cp " jar "/antlr3-3.1.jar:"
7530 (string-concatenate
7531 (find-files (assoc-ref inputs "stringtemplate")
7532 ".*\\.jar"))
7533 ":"
7534 (string-concatenate
7535 (find-files (string-append
7536 (assoc-ref inputs "antlr")
7537 "/lib")
7538 ".*\\.jar"))
7539 " org.antlr.Tool $*"))))
7540 (chmod (string-append bin "/antlr3") #o755))
7541 #t))
7542 (add-before 'build 'generate-grammar
7543 (lambda _
7544 (let ((dir "src/org/antlr/tool/"))
7545 (for-each (lambda (file)
7546 (display file)
7547 (newline)
7548 (invoke "antlr" "-o" dir (string-append dir file)))
7549 '("antlr.g" "antlr.print.g" "assign.types.g"
7550 "buildnfa.g" "define.g")))
7551 (format #t "codegen.g\n")
7552 (invoke "antlr" "-o" "src/org/antlr/codegen"
7553 "src/org/antlr/codegen/codegen.g")
7554 #t))
7555 (add-before 'build 'fix-build-xml
7556 (lambda _
7557 (substitute* "build.xml"
7558 (("target name=\"compile\">")
7559 "target name=\"compile\">
7560 <copy todir=\"${classes.dir}\">
7561 <fileset dir=\"src\">
7562 <include name=\"**/*.stg\"/>
7563 <include name=\"**/*.st\"/>
7564 <include name=\"**/*.sti\"/>
7565 <include name=\"**/STLexer.tokens\"/>
7566 </fileset>
7567 </copy>"))
7568 #t)))))
7569 (native-inputs
7570 `(("antlr" ,antlr2)))
7571 (inputs
7572 `(("junit" ,java-junit)))
7573 (propagated-inputs
7574 `(("stringtemplate" ,java-stringtemplate-3)))))
7575
7576 (define-public java-commons-cli-1.2
7577 ;; This is a bootstrap dependency for Maven2.
7578 (package
7579 (inherit java-commons-cli)
7580 (version "1.2")
7581 (source (origin
7582 (method url-fetch)
7583 (uri (string-append "mirror://apache/commons/cli/source/"
7584 "commons-cli-" version "-src.tar.gz"))
7585 (sha256
7586 (base32
7587 "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm"))))
7588 (arguments
7589 `(#:jar-name "commons-cli.jar"
7590 #:phases
7591 (modify-phases %standard-phases
7592 (add-before 'check 'fix-build-xml
7593 (lambda* (#:key inputs #:allow-other-keys)
7594 (substitute* "build.xml"
7595 (("dir=\"\\$\\{test.home\\}/java\"")
7596 "dir=\"${test.home}\""))
7597 #t)))))
7598 (native-inputs
7599 `(("java-junit" ,java-junit)))))
7600
7601 (define-public java-microemulator-cldc
7602 (package
7603 (name "java-microemulator-cldc")
7604 (version "2.0.4")
7605 (source (origin
7606 (method url-fetch)
7607 (uri (string-append "https://github.com/barteo/microemu/archive/"
7608 "microemulator_"
7609 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
7610 version)
7611 ".tar.gz"))
7612 (file-name (string-append name "-" version ".tar.gz"))
7613 (sha256
7614 (base32
7615 "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll"))))
7616 (build-system ant-build-system)
7617 (arguments
7618 `(#:jar-name "microemulator-cldc.jar"
7619 #:source-dir "microemu-cldc/src/main/java"
7620 #:tests? #f)); Requires even older software
7621 (home-page "https://github.com/barteo/microemu")
7622 (synopsis "J2ME CLDC emulator")
7623 (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP
7624 Emulator. It demonstrates MIDlet based applications in web browser
7625 applet and can be run as a standalone java application.")
7626 (license (list license:asl2.0
7627 ;; or altenatively:
7628 license:lgpl2.1+))))
7629
7630 (define-public java-datanucleus-javax-persistence
7631 (package
7632 (name "java-datanucleus-javax-persistence")
7633 (version "2.2.0")
7634 (source (origin
7635 (method url-fetch)
7636 (uri (string-append "https://github.com/datanucleus/"
7637 "javax.persistence/archive/javax.persistence-"
7638 version "-release.tar.gz"))
7639 (sha256
7640 (base32
7641 "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx"))))
7642 (build-system ant-build-system)
7643 (arguments
7644 `(#:jar-name "java-datanucleus-javax-persistence.jar"
7645 #:jdk ,icedtea-8
7646 #:source-dir "src/main/java"
7647 #:tests? #f)); no tests
7648 (home-page "https://github.com/datanucleus/javax.persistence")
7649 (synopsis "JPA API")
7650 (description "This package contains a clean definition of JPA API intended
7651 for use with DataNucleus JPA since the JCP haven't provided an official JPA API
7652 jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification
7653 used to generate this API.")
7654 (license (list license:edl1.0 license:epl1.0))))
7655
7656 (define-public java-osgi-cmpn
7657 (package
7658 (name "java-osgi-cmpn")
7659 (version "6.0.0")
7660 (source (origin
7661 (method url-fetch)
7662 (uri (string-append "https://repo1.maven.org/maven2/"
7663 "org/osgi/osgi.cmpn/" version "/osgi.cmpn-"
7664 version "-sources.jar"))
7665 (sha256
7666 (base32
7667 "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys"))))
7668 (build-system ant-build-system)
7669 (arguments
7670 `(#:jar-name "osgi-cmpn.jar"
7671 #:tests? #f)); no tests
7672 (inputs
7673 `(("annotation" ,java-osgi-annotation)
7674 ("core" ,java-osgi-core)
7675 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
7676 ("microemulator" ,java-microemulator-cldc)
7677 ("servlet" ,java-classpathx-servletapi)))
7678 (home-page "https://www.osgi.org")
7679 (synopsis "Compendium specification module of OSGi framework")
7680 (description
7681 "OSGi, for Open Services Gateway initiative framework, is a module system
7682 and service platform for the Java programming language. This package contains
7683 the compendium specification module, providing interfaces and classes for use
7684 in compiling bundles.")
7685 (license license:asl2.0)))
7686
7687 (define-public java-osgi-service-component-annotations
7688 (package
7689 (name "java-osgi-service-component-annotations")
7690 (version "1.3.0")
7691 (source (origin
7692 (method url-fetch)
7693 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7694 "org.osgi.service.component.annotations/"
7695 version "/org.osgi.service.component.annotations-"
7696 version "-sources.jar"))
7697 (sha256
7698 (base32
7699 "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0"))))
7700 (build-system ant-build-system)
7701 (arguments
7702 `(#:jar-name "osgi-service-component-annotations.jar"
7703 #:tests? #f)); no tests
7704 (inputs
7705 `(("annotation" ,java-osgi-annotation)))
7706 (home-page "https://www.osgi.org")
7707 (synopsis "Support annotations for osgi-service-component")
7708 (description
7709 "OSGi, for Open Services Gateway initiative framework, is a module system
7710 and service platform for the Java programming language. This package contains
7711 the support annotations for osgi-service-component.")
7712 (license license:asl2.0)))
7713
7714 (define-public java-osgi-dto
7715 (package
7716 (name "java-osgi-dto")
7717 (version "1.0.0")
7718 (source (origin
7719 (method url-fetch)
7720 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7721 "org.osgi.dto/" version "/org.osgi.dto-"
7722 version "-sources.jar"))
7723 (sha256
7724 (base32
7725 "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr"))))
7726 (build-system ant-build-system)
7727 (arguments
7728 `(#:jar-name "osgi-dto.jar"
7729 #:tests? #f)); no tests
7730 (inputs
7731 `(("annotation" ,java-osgi-annotation)))
7732 (home-page "https://www.osgi.org")
7733 (synopsis "Data Transfer Objects")
7734 (description
7735 "OSGi, for Open Services Gateway initiative framework, is a module system
7736 and service platform for the Java programming language. This package contains
7737 the Data Transfer Objects. It is easily serializable having only public fields
7738 of primitive types and their wrapper classes, Strings, and DTOs. List, Set,
7739 Map and array aggregates may also be used. The aggregates must only hold
7740 objects of the listed types or aggregates.")
7741 (license license:asl2.0)))
7742
7743 (define-public java-osgi-resource
7744 (package
7745 (name "java-osgi-resource")
7746 (version "1.0.0")
7747 (source (origin
7748 (method url-fetch)
7749 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7750 "org.osgi.resource/"
7751 version "/org.osgi.resource-"
7752 version "-sources.jar"))
7753 (sha256
7754 (base32
7755 "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d"))))
7756 (build-system ant-build-system)
7757 (arguments
7758 `(#:jar-name "osgi-resource.jar"
7759 #:tests? #f)); no tests
7760 (inputs
7761 `(("annotation" ,java-osgi-annotation)
7762 ("dto" ,java-osgi-dto)))
7763 (home-page "https://www.osgi.org")
7764 (synopsis "OSGI Resource")
7765 (description
7766 "OSGi, for Open Services Gateway initiative framework, is a module system
7767 and service platform for the Java programming language. This package contains
7768 the definition of common types in osgi packages.")
7769 (license license:asl2.0)))
7770
7771 (define-public java-osgi-namespace-contract
7772 (package
7773 (name "java-osgi-namespace-contract")
7774 (version "1.0.0")
7775 (source (origin
7776 (method url-fetch)
7777 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7778 "org.osgi.namespace.contract/"
7779 version "/org.osgi.namespace.contract-"
7780 version "-sources.jar"))
7781 (sha256
7782 (base32
7783 "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36"))))
7784 (build-system ant-build-system)
7785 (inputs
7786 `(("resource" ,java-osgi-resource)
7787 ("annotation" ,java-osgi-annotation)))
7788 (arguments
7789 `(#:jar-name "osgi-namespace-contract.jar"
7790 #:tests? #f)); no tests
7791 (home-page "https://www.osgi.org")
7792 (synopsis "Contract Capability and Requirement Namespace")
7793 (description
7794 "OSGi, for Open Services Gateway initiative framework, is a module system
7795 and service platform for the Java programming language. This package contains
7796 the names for the attributes and directives for a namespace with contracts.")
7797 (license license:asl2.0)))
7798
7799 (define-public java-osgi-namespace-extender
7800 (package
7801 (name "java-osgi-namespace-extender")
7802 (version "1.0.1")
7803 (source (origin
7804 (method url-fetch)
7805 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7806 "org.osgi.namespace.extender/"
7807 version "/org.osgi.namespace.extender-"
7808 version "-sources.jar"))
7809 (sha256
7810 (base32
7811 "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz"))))
7812 (build-system ant-build-system)
7813 (inputs
7814 `(("resource" ,java-osgi-resource)
7815 ("annotation" ,java-osgi-annotation)))
7816 (arguments
7817 `(#:jar-name "osgi-namespace-extendent.jar"
7818 #:tests? #f)); no tests
7819 (home-page "https://www.osgi.org")
7820 (synopsis "Extender Capability and Requirement Namespace")
7821 (description
7822 "OSGi, for Open Services Gateway initiative framework, is a module system
7823 and service platform for the Java programming language. This package contains
7824 the names for the attributes and directives for an extender namespace.")
7825 (license license:asl2.0)))
7826
7827 (define-public java-osgi-namespace-service
7828 (package
7829 (name "java-osgi-namespace-service")
7830 (version "1.0.0")
7831 (source (origin
7832 (method url-fetch)
7833 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7834 "org.osgi.namespace.service/"
7835 version "/org.osgi.namespace.service-"
7836 version "-sources.jar"))
7837 (sha256
7838 (base32
7839 "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8"))))
7840 (build-system ant-build-system)
7841 (inputs
7842 `(("resource" ,java-osgi-resource)
7843 ("annotation" ,java-osgi-annotation)))
7844 (arguments
7845 `(#:jar-name "osgi-namespace-service.jar"
7846 #:tests? #f)); no tests
7847 (home-page "https://www.osgi.org")
7848 (synopsis "Service Capability and Requirement Namespace")
7849 (description
7850 "OSGi, for Open Services Gateway initiative framework, is a module system
7851 and service platform for the Java programming language. This package contains
7852 the names for the attributes and directives for a service namespace.")
7853 (license license:asl2.0)))
7854
7855 (define-public java-osgi-util-function
7856 (package
7857 (name "java-osgi-util-function")
7858 (version "1.0.0")
7859 (source (origin
7860 (method url-fetch)
7861 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7862 "org.osgi.util.function/"
7863 version "/org.osgi.util.function-"
7864 version "-sources.jar"))
7865 (sha256
7866 (base32
7867 "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x"))))
7868 (build-system ant-build-system)
7869 (arguments
7870 `(#:jar-name "osgi-util-function.jar"
7871 #:tests? #f)); no tests
7872 (inputs
7873 `(("annotation" ,java-osgi-annotation)))
7874 (home-page "https://www.osgi.org")
7875 (synopsis "OSGI Util Function")
7876 (description
7877 "OSGi, for Open Services Gateway initiative framework, is a module system
7878 and service platform for the Java programming language. This package contains
7879 an interface for a function that accepts a single argument and produces a result.")
7880 (license license:asl2.0)))
7881
7882 (define-public java-osgi-util-promise
7883 (package
7884 (name "java-osgi-util-promise")
7885 (version "1.0.0")
7886 (source (origin
7887 (method url-fetch)
7888 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7889 "org.osgi.util.promise/"
7890 version "/org.osgi.util.promise-"
7891 version "-sources.jar"))
7892 (sha256
7893 (base32
7894 "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c"))))
7895 (build-system ant-build-system)
7896 (arguments
7897 `(#:jar-name "osgi-util-promise.jar"
7898 #:tests? #f)); no tests
7899 (inputs
7900 `(("annotation" ,java-osgi-annotation)
7901 ("function" ,java-osgi-util-function)))
7902 (home-page "https://www.osgi.org")
7903 (synopsis "Promise of a value")
7904 (description
7905 "OSGi, for Open Services Gateway initiative framework, is a module system
7906 and service platform for the Java programming language. This package contains
7907 an interface and utilitary classes for promises. A Promise represents a future
7908 value. It handles the interactions for asynchronous processing.")
7909 (license license:asl2.0)))
7910
7911 (define-public java-osgi-service-metatype-annotations
7912 (package
7913 (name "java-osgi-service-metatype-annotations")
7914 (version "1.3.0")
7915 (source (origin
7916 (method url-fetch)
7917 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7918 "org.osgi.service.metatype.annotations/"
7919 version "/org.osgi.service.metatype.annotations-"
7920 version "-sources.jar"))
7921 (sha256
7922 (base32
7923 "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6"))))
7924 (build-system ant-build-system)
7925 (arguments
7926 `(#:jar-name "osgi-service-metatype-annotations.jar"
7927 #:tests? #f)); no tests
7928 (inputs
7929 `(("annotation" ,java-osgi-annotation)))
7930 (home-page "https://www.osgi.org")
7931 (synopsis "Support annotations for metatype")
7932 (description
7933 "OSGi, for Open Services Gateway initiative framework, is a module system
7934 and service platform for the Java programming language. This package contains
7935 the support annotations for metatype.")
7936 (license license:asl2.0)))
7937
7938 (define-public java-osgi-service-repository
7939 (package
7940 (name "java-osgi-service-repository")
7941 (version "1.1.0")
7942 (source (origin
7943 (method url-fetch)
7944 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7945 "org.osgi.service.repository/"
7946 version "/org.osgi.service.repository-"
7947 version "-sources.jar"))
7948 (sha256
7949 (base32
7950 "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n"))))
7951 (build-system ant-build-system)
7952 (arguments
7953 `(#:jar-name "osgi-service-repository.jar"
7954 #:tests? #f)); no tests
7955 (inputs
7956 `(("annotation" ,java-osgi-annotation)
7957 ("promise" ,java-osgi-util-promise)
7958 ("resource" ,java-osgi-resource)))
7959 (home-page "https://www.osgi.org")
7960 (synopsis "OSGI service repository")
7961 (description
7962 "OSGi, for Open Services Gateway initiative framework, is a module system
7963 and service platform for the Java programming language. This package contains
7964 a repository service that contains resources.")
7965 (license license:asl2.0)))
7966
7967 (define-public java-osgi-framework
7968 (package
7969 (name "java-osgi-framework")
7970 (version "1.8.0")
7971 (source (origin
7972 (method url-fetch)
7973 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7974 "org.osgi.framework/" version "/org.osgi.framework-"
7975 version "-sources.jar"))
7976 (sha256
7977 (base32
7978 "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s"))))
7979 (build-system ant-build-system)
7980 (arguments
7981 `(#:jar-name "osgi-framework.jar"
7982 #:tests? #f)); no tests
7983 (inputs
7984 `(("annotation" ,java-osgi-annotation)
7985 ("resource" ,java-osgi-resource)
7986 ("dto" ,java-osgi-dto)))
7987 (home-page "https://www.osgi.org")
7988 (synopsis "OSGi framework")
7989 (description
7990 "OSGi, for Open Services Gateway initiative framework, is a module system
7991 and service platform for the Java programming language.")
7992 (license license:asl2.0)))
7993
7994 (define-public java-osgi-service-log
7995 (package
7996 (name "java-osgi-service-log")
7997 (version "1.3.0")
7998 (source (origin
7999 (method url-fetch)
8000 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8001 "org.osgi.service.log/"
8002 version "/org.osgi.service.log-"
8003 version "-sources.jar"))
8004 (sha256
8005 (base32
8006 "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0"))))
8007 (build-system ant-build-system)
8008 (arguments
8009 `(#:jar-name "osgi-service-log.jar"
8010 #:tests? #f)); no tests
8011 (inputs
8012 `(("java-osgi-framework" ,java-osgi-framework)))
8013 (home-page "https://www.osgi.org")
8014 (synopsis "Provides methods for bundles to write messages to the log")
8015 (description
8016 "OSGi, for Open Services Gateway initiative framework, is a module system
8017 and service platform for the Java programming language. This package contains
8018 the log service.")
8019 (license license:asl2.0)))
8020
8021 (define-public java-osgi-service-jdbc
8022 (package
8023 (name "java-osgi-service-jdbc")
8024 (version "1.0.0")
8025 (source (origin
8026 (method url-fetch)
8027 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8028 "org.osgi.service.jdbc/"
8029 version "/org.osgi.service.jdbc-"
8030 version "-sources.jar"))
8031 (sha256
8032 (base32
8033 "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz"))))
8034 (build-system ant-build-system)
8035 (arguments
8036 `(#:jar-name "osgi-service-jdbc.jar"
8037 #:tests? #f)); no tests
8038 (home-page "https://www.osgi.org")
8039 (synopsis "Factory for JDBC connection factories")
8040 (description
8041 "OSGi, for Open Services Gateway initiative framework, is a module system
8042 and service platform for the Java programming language. This package contains
8043 a factory for JDBC connection factories. There are 3 preferred connection
8044 factories for getting JDBC connections:
8045
8046 @itemize
8047 @item @code{javax.sql.DataSource};
8048 @item @code{javax.sql.ConnectionPoolDataSource};
8049 @item @code{javax.sql.XADataSource}.
8050 @end itemize")
8051 (license license:asl2.0)))
8052
8053 (define-public java-osgi-service-resolver
8054 (package
8055 (name "java-osgi-service-resolver")
8056 (version "1.0.1")
8057 (source (origin
8058 (method url-fetch)
8059 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8060 "org.osgi.service.resolver/"
8061 version "/org.osgi.service.resolver-"
8062 version "-sources.jar"))
8063 (sha256
8064 (base32
8065 "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd"))))
8066 (build-system ant-build-system)
8067 (arguments
8068 `(#:jar-name "osgi-service-resolver.jar"
8069 #:tests? #f)); no tests
8070 (inputs
8071 `(("annotation" ,java-osgi-annotation)
8072 ("resource" ,java-osgi-resource)))
8073 (home-page "https://www.osgi.org")
8074 (synopsis "OSGI Resolver service")
8075 (description
8076 "OSGi, for Open Services Gateway initiative framework, is a module system
8077 and service platform for the Java programming language. This package contains
8078 a resolver service that resolves the specified resources in the context supplied
8079 by the caller.")
8080 (license license:asl2.0)))
8081
8082 (define-public java-osgi-util-tracker
8083 (package
8084 (name "java-osgi-util-tracker")
8085 (version "1.5.1")
8086 (source (origin
8087 (method url-fetch)
8088 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8089 "org.osgi.util.tracker/"
8090 version "/org.osgi.util.tracker-"
8091 version "-sources.jar"))
8092 (sha256
8093 (base32
8094 "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz"))))
8095 (build-system ant-build-system)
8096 (arguments
8097 `(#:jar-name "osgi-util-tracker.jar"
8098 #:tests? #f)); no tests
8099 (inputs
8100 `(("framework" ,java-osgi-framework)
8101 ("annotation" ,java-osgi-annotation)))
8102 (home-page "https://www.osgi.org")
8103 (synopsis "Bundle tracking")
8104 (description
8105 "OSGi, for Open Services Gateway initiative framework, is a module system
8106 and service platform for the Java programming language. This package contains
8107 bundle tracking utility classes.")
8108 (license license:asl2.0)))
8109
8110 (define-public java-osgi-service-cm
8111 (package
8112 (name "java-osgi-service-cm")
8113 (version "1.5.0")
8114 (source (origin
8115 (method url-fetch)
8116 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8117 "org.osgi.service.cm/"
8118 version "/org.osgi.service.cm-"
8119 version "-sources.jar"))
8120 (sha256
8121 (base32
8122 "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6"))))
8123 (build-system ant-build-system)
8124 (arguments
8125 `(#:jar-name "osgi-service-cm.jar"
8126 #:tests? #f)); no tests
8127 (inputs
8128 `(("framework" ,java-osgi-framework)
8129 ("annotation" ,java-osgi-annotation)))
8130 (home-page "https://www.osgi.org")
8131 (synopsis "OSGI Configuration Management")
8132 (description
8133 "OSGi, for Open Services Gateway initiative framework, is a module system
8134 and service platform for the Java programming language. This package contains
8135 utility classes for the configuration of services.")
8136 (license license:asl2.0)))
8137
8138 (define-public java-osgi-service-packageadmin
8139 (package
8140 (name "java-osgi-service-packageadmin")
8141 (version "1.2.0")
8142 (source (origin
8143 (method url-fetch)
8144 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8145 "org.osgi.service.packageadmin/"
8146 version "/org.osgi.service.packageadmin-"
8147 version "-sources.jar"))
8148 (sha256
8149 (base32
8150 "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52"))))
8151 (build-system ant-build-system)
8152 (arguments
8153 `(#:jar-name "osgi-service-packageadmin.jar"
8154 #:tests? #f)); no tests
8155 (inputs
8156 `(("framework" ,java-osgi-framework)))
8157 (home-page "https://www.osgi.org")
8158 (synopsis "OSGI Package Administration")
8159 (description
8160 "OSGi, for Open Services Gateway initiative framework, is a module system
8161 and service platform for the Java programming language. This package contains
8162 the packageadmin service.")
8163 (license license:asl2.0)))
8164
8165 (define-public java-ops4j-base-lang
8166 (package
8167 (name "java-ops4j-base-lang")
8168 (version "1.5.0")
8169 (source (origin
8170 (method url-fetch)
8171 (uri (string-append "https://github.com/ops4j/org.ops4j.base/"
8172 "archive/base-" version ".tar.gz"))
8173 (sha256
8174 (base32
8175 "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw"))))
8176 (build-system ant-build-system)
8177 (arguments
8178 `(#:jar-name "java-ops4j-base-lang.jar"
8179 #:source-dir "ops4j-base-lang/src/main/java"
8180 #:tests? #f; no tests
8181 #:phases
8182 (modify-phases %standard-phases
8183 (add-before 'build 'add-test-file
8184 (lambda _
8185 ;; That file is required by a test in ops4j-pax-exam-core-spi
8186 (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang")
8187 (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties"
8188 (lambda _
8189 (display
8190 (string-append
8191 "version=" ,version "\n"
8192 "groupId=org.ops4j.base"
8193 "artifactId=ops4j-base-lang\n"))))
8194 #t)))))
8195 (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview")
8196 (synopsis "Utility classes and extensions to be used in OPS4J projects")
8197 (description "OPS4J stands for Open Participation Software for Java. This
8198 package contains utilities and extensions related to @code{java.lang}.")
8199 (license license:asl2.0)))
8200
8201 (define-public java-ops4j-base-monitors
8202 (package
8203 (inherit java-ops4j-base-lang)
8204 (name "java-ops4j-base-monitors")
8205 (arguments
8206 `(#:jar-name "java-ops4j-base-monitors.jar"
8207 #:source-dir "ops4j-base-monitors/src/main/java"
8208 #:tests? #f)); no tests
8209 (inputs
8210 `(("lang" ,java-ops4j-base-lang)))
8211 (description "OPS4J stands for Open Participation Software for Java. This
8212 package contains utilities and extensions related to monitoring.")))
8213
8214 (define-public java-ops4j-base-io
8215 (package
8216 (inherit java-ops4j-base-lang)
8217 (name "java-ops4j-base-io")
8218 (arguments
8219 `(#:jar-name "java-ops4j-base-io.jar"
8220 #:source-dir "ops4j-base-io/src/main/java"
8221 #:test-dir "ops4j-base-io/src/test"
8222 #:test-exclude
8223 (list "**/ListerTest.java")))
8224 (inputs
8225 `(("lang" ,java-ops4j-base-monitors)
8226 ("lang" ,java-ops4j-base-lang)))
8227 (native-inputs
8228 `(("junit" ,java-junit)
8229 ("hamcrest" ,java-hamcrest-core)))
8230 (description "OPS4J stands for Open Participation Software for Java. This
8231 package contains utilities and extensions related to handling streams and files.")))
8232
8233 (define-public java-ops4j-base-util
8234 (package
8235 (inherit java-ops4j-base-lang)
8236 (name "java-ops4j-base-util")
8237 (arguments
8238 `(#:jar-name "java-ops4j-base-util.jar"
8239 #:source-dir "ops4j-base-util/src/main/java"
8240 #:test-dir "ops4j-base-util/src/test"))
8241 (inputs
8242 `(("lang" ,java-ops4j-base-lang)))
8243 (native-inputs
8244 `(("junit" ,java-junit)))
8245 (description "OPS4J stands for Open Participation Software for Java. This
8246 package contains utilities and extensions related to environment, i18n and
8247 mime types.")))
8248
8249 (define-public java-ops4j-base-util-property
8250 (package
8251 (inherit java-ops4j-base-lang)
8252 (name "java-ops4j-base-util-property")
8253 (arguments
8254 `(#:jar-name "java-ops4j-base-util-property.jar"
8255 #:source-dir "ops4j-base-util-property/src/main/java"
8256 #:tests? #f)); no tests
8257 (inputs
8258 `(("lang" ,java-ops4j-base-lang)
8259 ("util" ,java-ops4j-base-util)))
8260 (description "OPS4J stands for Open Participation Software for Java. This
8261 package contains utilities and extensions related to resolving properties from
8262 different sources.")))
8263
8264 (define-public java-ops4j-base-store
8265 (package
8266 (inherit java-ops4j-base-lang)
8267 (name "java-ops4j-base-store")
8268 (arguments
8269 `(#:jar-name "java-ops4j-base-store.jar"
8270 #:source-dir "ops4j-base-store/src/main/java"
8271 #:tests? #f)); no tests
8272 (inputs
8273 `(("lang" ,java-ops4j-base-lang)
8274 ("slf4j" ,java-slf4j-api)
8275 ("io" ,java-ops4j-base-io)))
8276 (description "OPS4J stands for Open Participation Software for Java. This
8277 package contains utilities for storing and retrieving data from an
8278 @code{InputStream}.")))
8279
8280 (define-public java-ops4j-base-spi
8281 (package
8282 (inherit java-ops4j-base-lang)
8283 (name "java-ops4j-base-spi")
8284 (arguments
8285 `(#:jar-name "java-ops4j-base-spi.jar"
8286 #:source-dir "ops4j-base-spi/src/main/java"
8287 #:test-dir "ops4j-base-spi/src/test"))
8288 (native-inputs
8289 `(("junit" ,java-junit)
8290 ("hamcrest" ,java-hamcrest-core)))
8291 (description "OPS4J stands for Open Participation Software for Java. This
8292 package contains utilities for obtaining services via the Java SE 6
8293 @code{ServiceLoader}.")))
8294
8295 (define-public java-aqute-bnd-annotation
8296 (package
8297 (name "java-aqute-bnd-annotation")
8298 (version "3.5.0")
8299 (source (origin
8300 (method url-fetch)
8301 (uri (string-append "https://github.com/bndtools/bnd/archive/"
8302 version ".REL.tar.gz"))
8303 (file-name (string-append name "-" version ".tar.gz"))
8304 (sha256
8305 (base32
8306 "1ggyiq0as0f6cz333a0dh98j72kmvv5pf2s47v9554yh905lfqdl"))))
8307 (build-system ant-build-system)
8308 (arguments
8309 `(#:jar-name "java-aqute-bnd-annotation.jar"
8310 #:source-dir "biz.aQute.bnd.annotation/src"
8311 #:tests? #f)); empty test dir
8312 (home-page "https://bnd.bndtools.org/")
8313 (synopsis "Tools for OSGi")
8314 (description "Bnd is a swiss army knife for OSGi, it creates manifest
8315 headers based on analyzing the class code, it verifies the project settings,
8316 it manages project dependencies, gives diffs jars, and much more.")
8317 (license license:asl2.0)))
8318
8319 (define-public java-aqute-libg
8320 (package
8321 (inherit java-aqute-bnd-annotation)
8322 (name "java-aqute-libg")
8323 (arguments
8324 `(#:jar-name "java-aqute-libg.jar"
8325 ;; The build fails when source/target more recent than 1.7. This
8326 ;; is a known issue. See: https://github.com/bndtools/bnd/issues/1327
8327 ;;
8328 ;; It is closed as won't fix. There is no way to change the source
8329 ;; so that it works on 1.8, and still works on 1.6, the upstream
8330 ;; target. It work fine on 1.7, so we use 1.7.
8331 #:make-flags (list "-Dant.build.javac.source=1.7"
8332 "-Dant.build.javac.target=1.7")
8333 #:phases
8334 (modify-phases %standard-phases
8335 (add-before 'configure 'chdir
8336 ;; Change to aQute.libg directory, so that the relative
8337 ;; paths in the tests aren't broken.
8338 (lambda _
8339 (chdir "aQute.libg")
8340 #t))
8341 (add-before 'check 'create-test-directory
8342 ;; Copy the test directory to test/java, since that's where
8343 ;; ant-build-system's default project in build.xml expects to find
8344 ;; the test classes. Leave a copy in the original place to not
8345 ;; break paths in tests.
8346 (lambda _
8347 (mkdir "src/test")
8348 (copy-recursively "test" "src/test/java")
8349 #t)))))
8350 (inputs
8351 `(("slf4j" ,java-slf4j-api)
8352 ("osgi-annot" ,java-osgi-annotation)
8353 ("java-osgi-cmpn" ,java-osgi-cmpn)
8354 ("osgi" ,java-osgi-core)))
8355 (native-inputs
8356 `(("hamcrest" ,java-hamcrest-core)
8357 ("java-junit" ,java-junit)))))
8358
8359 (define-public java-aqute-bndlib
8360 (package
8361 (inherit java-aqute-bnd-annotation)
8362 (name "java-aqute-bndlib")
8363 (arguments
8364 `(#:jar-name "java-bndlib.jar"
8365 #:source-dir "biz.aQute.bndlib/src"
8366 #:tests? #f)); no tests
8367 (inputs
8368 `(("slf4j" ,java-slf4j-api)
8369 ("osgi-annot" ,java-osgi-annotation)
8370 ("java-aqute-libg" ,java-aqute-libg)
8371 ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation)
8372 ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations)
8373 ("java-osgi-service-repository" ,java-osgi-service-repository)
8374 ("java-osgi-service-log" ,java-osgi-service-log)
8375 ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations)
8376 ("java-osgi-namespace-contract" ,java-osgi-namespace-contract)
8377 ("java-osgi-namespace-extender" ,java-osgi-namespace-extender)
8378 ("java-osgi-namespace-service" ,java-osgi-namespace-service)
8379 ("promise" ,java-osgi-util-promise)
8380 ("osgi" ,java-osgi-core)))))
8381
8382 (define-public java-ops4j-pax-tinybundles
8383 (package
8384 (name "java-ops4j-pax-tinybundles")
8385 (version "2.1.1")
8386 (source (origin
8387 (method url-fetch)
8388 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/"
8389 "archive/tinybundles-" version ".tar.gz"))
8390 (sha256
8391 (base32
8392 "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871"))))
8393 (arguments
8394 `(#:jar-name "java-ops4j-pax-tinybundles.jar"
8395 #:source-dir "src/main/java"
8396 #:test-exclude
8397 ;; Abstract base classes for other tests
8398 (list "**/BndTest.java" "**/CoreTest.java")
8399 #:phases
8400 (modify-phases %standard-phases
8401 (add-before 'check 'fix-version
8402 (lambda _
8403 ;; This test has a reference to an old version of bndlib we are not
8404 ;; packaging. It uses the version referenced in pom.xml. We replace
8405 ;; it with our own version.
8406 (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
8407 (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*")
8408 ,(package-version java-aqute-bndlib)))
8409 #t)))))
8410 (inputs
8411 `(("lang" ,java-ops4j-base-lang)
8412 ("io" ,java-ops4j-base-io)
8413 ("store" ,java-ops4j-base-store)
8414 ("slf4j" ,java-slf4j-api)
8415 ("libg" ,java-aqute-libg)
8416 ("bndlib" ,java-aqute-bndlib)))
8417 (native-inputs
8418 `(("junit" ,java-junit)
8419 ("hamcrest" ,java-hamcrest-core)
8420 ("log4j" ,java-log4j-api)
8421 ("bndannotation" ,java-aqute-bnd-annotation)
8422 ("framework" ,java-osgi-framework)))
8423 (build-system ant-build-system)
8424 (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles")
8425 (synopsis "Java APIs to create OSGi related artifacts")
8426 (description "Tinybundles is all about creating OSGi related artifacts like
8427 Bundles, Fragments and Deployment Packages with Java Api. It is very convenient
8428 to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the
8429 other hand, this library can be a foundation of real end user tools that need
8430 to create those artifacts.")
8431 (license license:asl2.0)))
8432
8433 (define-public java-ops4j-pax-exam-core
8434 (package
8435 (name "java-ops4j-pax-exam-core")
8436 (version "4.11.0")
8437 (source (origin
8438 (method url-fetch)
8439 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/"
8440 "archive/exam-reactor-" version ".tar.gz"))
8441 (sha256
8442 (base32
8443 "08mzw8nkah3rj3vznlplnawspxhp61zgvb44ifqa1rni1cvbms2g"))))
8444 (arguments
8445 `(#:jar-name "java-ops4j-pax-exam-core.jar"
8446 #:source-dir "core/pax-exam/src/main/java"
8447 #:test-dir "core/pax-exam/src/test"))
8448 (inputs
8449 `(("slf4j" ,java-slf4j-api)
8450 ("lang" ,java-ops4j-base-lang)
8451 ("io" ,java-ops4j-base-io)
8452 ("util-property" ,java-ops4j-base-util-property)
8453 ("util-store" ,java-ops4j-base-store)
8454 ("java-osgi-core" ,java-osgi-core)))
8455 (native-inputs
8456 `(("junit" ,java-junit)
8457 ("hamcrest" ,java-hamcrest-core)))
8458 (build-system ant-build-system)
8459 (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview")
8460 (synopsis "In-Container Testing for OSGi, Java EE and CDI")
8461 (description "Pax Exam creates OSGi bundles for testing purposes. It lets
8462 the user take control of the OSGi framework, the test framework (e.g. JUnit) and
8463 the system under test at the same time.")
8464 (license license:asl2.0)))
8465
8466 (define-public java-ops4j-pax-exam-core-spi
8467 (package
8468 (inherit java-ops4j-pax-exam-core)
8469 (name "java-ops4j-pax-exam-core-spi")
8470 (arguments
8471 `(#:jar-name "java-ops4j-pax-exam-spi.jar"
8472 #:source-dir "src/main/java"
8473 #:test-exclude
8474 (list
8475 ;; Abstract base class, not a test
8476 "**/BaseStagedReactorTest.java"
8477 ;; Depends on org.mortbay.jetty.testwars:test-war-dump
8478 "**/WarBuilderTest.java")
8479 #:phases
8480 (modify-phases %standard-phases
8481 (add-before 'configure 'chdir
8482 (lambda _
8483 ;; Tests assume we are in this directory
8484 (chdir "core/pax-exam-spi")
8485 #t))
8486 (add-before 'check 'fix-tests
8487 (lambda _
8488 ;; One test checks that this file is present.
8489 (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi")
8490 (with-output-to-file
8491 "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties"
8492 (lambda _
8493 (display
8494 (string-append "artifactId = pax-exam-spi\n"
8495 "version = " ,(package-version java-ops4j-pax-exam-core-spi)))))
8496 ;; Maven puts compilation results in the target directory, while we
8497 ;; put them in the build directory.
8498 (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java"
8499 "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java"
8500 "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java")
8501 (("target") "build"))
8502 ;; One test is expected to fail, but it doesn't throw the expected exception
8503 (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java"
8504 (("AssertionError") "IllegalArgumentException"))
8505 #t)))))
8506 (inputs
8507 `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core)
8508 ("lang" ,java-ops4j-base-lang)
8509 ("monitors" ,java-ops4j-base-monitors)
8510 ("store" ,java-ops4j-base-store)
8511 ("io" ,java-ops4j-base-io)
8512 ("spi" ,java-ops4j-base-spi)
8513 ("osgi" ,java-osgi-core)
8514 ("slf4j" ,java-slf4j-api)
8515 ("tinybundles" ,java-ops4j-pax-tinybundles)))
8516 (native-inputs
8517 `(("mockito" ,java-mockito-1)
8518 ("junit" ,java-junit)
8519 ("hamcrest" ,java-hamcrest-core)
8520 ("cglib" ,java-cglib)
8521 ("objenesis" ,java-objenesis)
8522 ("asm" ,java-asm)))))
8523
8524 (define-public java-ops4j-pax-exam-core-junit
8525 (package
8526 (inherit java-ops4j-pax-exam-core)
8527 (name "java-ops4j-pax-exam-core-junit")
8528 (arguments
8529 `(#:jar-name "ops4j-pax-exam-core-junit.jar"
8530 #:source-dir "drivers/pax-exam-junit4/src/main/java"
8531 #:tests? #f)); no tests
8532 (inputs
8533 `(("junit" ,java-junit)
8534 ("slf4j" ,java-slf4j-api)
8535 ("core" ,java-ops4j-pax-exam-core)
8536 ("spi" ,java-ops4j-pax-exam-core-spi)))
8537 (native-inputs '())))
8538
8539 (define-public java-fasterxml-jackson-annotations
8540 (package
8541 (name "java-fasterxml-jackson-annotations")
8542 (version "2.9.4")
8543 (source (origin
8544 (method url-fetch)
8545 (uri (string-append "https://github.com/FasterXML/"
8546 "jackson-annotations/archive/"
8547 "jackson-annotations-" version ".tar.gz"))
8548 (sha256
8549 (base32
8550 "0mr95xd0da6a4g95zvrl1ryk5n5zv2rc696w3xnsr5hxk2gicfc4"))))
8551 (build-system ant-build-system)
8552 (arguments
8553 `(#:jar-name "jackson-annotations.jar"
8554 #:source-dir "src/main/java"
8555 #:test-dir "src/test"))
8556 (native-inputs
8557 `(("junit" ,java-junit)))
8558 (home-page "https://github.com/FasterXML/jackson-annotations")
8559 (synopsis "General purpose annotations for the Jackson Data Processor")
8560 (description "This package contains general purpose annotations for the
8561 Jackson Data Processor, used on value and handler types. The only annotations
8562 not included are ones that require dependency to the Databind package.")
8563 (license license:asl2.0)))
8564
8565 (define-public java-fasterxml-jackson-core
8566 (package
8567 (name "java-fasterxml-jackson-core")
8568 (version "2.9.4")
8569 (source (origin
8570 (method url-fetch)
8571 (uri (string-append "https://github.com/FasterXML/"
8572 "jackson-core/archive/"
8573 "jackson-core-" version ".tar.gz"))
8574 (sha256
8575 (base32
8576 "159hsnk17jr1gyzkf01cxvsn45srnk37g949r7364qlsr527gjgd"))))
8577 (build-system ant-build-system)
8578 (arguments
8579 `(#:jar-name "jackson-core.jar"
8580 #:source-dir "src/main/java"
8581 #:test-dir "src/test"
8582 #:test-exclude
8583 (list
8584 ;; Expected failure. pom.xml excludes these
8585 "**/failing/**"
8586 ;; Base classes that have no constructor for junit
8587 "**/BaseTest.java"
8588 "**/ConcurrencyReadTest.java"
8589 "**/ManualCharAccessTest.java"
8590 "**/ManualCharAccessTest.java"
8591 "**/TrailingCommasTest.java"
8592 "**/AsyncMissingValuesInObjectTest.java"
8593 "**/AsyncMissingValuesInArrayTest.java")
8594 #:phases
8595 (modify-phases %standard-phases
8596 (add-before 'configure 'generate-PackageVersion.java
8597 (lambda _
8598 (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java")
8599 (in (string-append out ".in")))
8600 (copy-file in out)
8601 (substitute* out
8602 (("@package@") "com.fasterxml.jackson.core.json")
8603 (("@projectversion@") ,version)
8604 (("@projectgroupid@") "com.fasterxml.jackson.core")
8605 (("@projectartifactid@") "jackson-core")))
8606 #t))
8607 (add-before 'build 'copy-resources
8608 (lambda _
8609 (copy-recursively "src/main/resources"
8610 "build/classes")
8611 #t))
8612 (add-before 'check 'copy-test-resources
8613 (lambda _
8614 (copy-recursively "src/test/resources"
8615 "build/test-classes")
8616 #t)))))
8617 (native-inputs
8618 `(("junit" ,java-junit)
8619 ("hamcrest" ,java-hamcrest-core)))
8620 (home-page "https://github.com/FasterXML/jackson-core")
8621 (synopsis "")
8622 (description "")
8623 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8624
8625 (define-public java-fasterxml-jackson-databind
8626 (package
8627 (name "java-fasterxml-jackson-databind")
8628 (version "2.9.4")
8629 (source (origin
8630 (method url-fetch)
8631 (uri (string-append "https://github.com/FasterXML/"
8632 "jackson-databind/archive/"
8633 "jackson-databind-" version ".tar.gz"))
8634 (sha256
8635 (base32
8636 "1zd2cw4z6kdkbx8za96xh9pyicv2a2l7y0rkcx2fqd8hv6d47s08"))))
8637 (build-system ant-build-system)
8638 (arguments
8639 `(#:jar-name "jackson-databind.jar"
8640 #:source-dir "src/main/java"
8641 #:tests? #f; requires javax.measures for which I can't find a free implementation
8642 #:phases
8643 (modify-phases %standard-phases
8644 (add-before 'configure 'generate-PackageVersion.java
8645 (lambda _
8646 (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java")
8647 (in (string-append out ".in")))
8648 (copy-file in out)
8649 (substitute* out
8650 (("@package@") "com.fasterxml.jackson.databind.cfg")
8651 (("@projectversion@") ,version)
8652 (("@projectgroupid@") "com.fasterxml.jackson.databind")
8653 (("@projectartifactid@") "jackson-databind")))
8654 #t))
8655 (add-before 'build 'copy-resources
8656 (lambda _
8657 (copy-recursively "src/main/resources" "build/classes")
8658 #t)))))
8659 (inputs
8660 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
8661 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)))
8662 (home-page "https://github.com/FasterXML/jackson-databind")
8663 (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor")
8664 (description "This package contains the general-purpose data-binding
8665 functionality and tree-model for Jackson Data Processor. It builds on core
8666 streaming parser/generator package, and uses Jackson Annotations for
8667 configuration.")
8668 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8669
8670 (define-public java-fasterxml-jackson-modules-base-jaxb
8671 (package
8672 (name "java-fasterxml-jackson-modules-base-jaxb")
8673 (version "2.9.4")
8674 (source (origin
8675 (method url-fetch)
8676 (uri (string-append "https://github.com/FasterXML/"
8677 "jackson-modules-base/archive/"
8678 "jackson-modules-base-" version ".tar.gz"))
8679 (sha256
8680 (base32
8681 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
8682 (build-system ant-build-system)
8683 (arguments
8684 `(#:jar-name "jackson-modules-base-jaxb.jar"
8685 #:source-dir "jaxb/src/main/java"
8686 #:test-dir "jaxb/src/test"
8687 #:test-exclude
8688 ;; Base class for tests
8689 (list "**/BaseJaxbTest.java")
8690 #:phases
8691 (modify-phases %standard-phases
8692 (add-before 'configure 'generate-PackageVersion.java
8693 (lambda _
8694 (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/"
8695 "jackson/module/jaxb/PackageVersion.java"))
8696 (in (string-append out ".in")))
8697 (copy-file in out)
8698 (substitute* out
8699 (("@package@") "com.fasterxml.jackson.module.jaxb")
8700 (("@projectversion@") ,version)
8701 (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb")
8702 (("@projectartifactid@") "jackson-module-jaxb")))
8703 #t))
8704 (add-before 'build 'copy-resources
8705 (lambda _
8706 (copy-recursively "jaxb/src/main/resources" "build/classes")
8707 #t)))))
8708 (inputs
8709 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
8710 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
8711 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
8712 (native-inputs
8713 `(("java-junit" ,java-junit)))
8714 (home-page "https://github.com/FasterXML/jackson-modules-base")
8715 (synopsis "Jaxb annotations jackson module")
8716 (description "This package is the jaxb annotations module for jackson.")
8717 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8718
8719 (define-public java-fasterxml-jackson-modules-base-mrbean
8720 (package
8721 (name "java-fasterxml-jackson-modules-base-mrbean")
8722 (version "2.9.4")
8723 (source (origin
8724 (method url-fetch)
8725 (uri (string-append "https://github.com/FasterXML/"
8726 "jackson-modules-base/archive/"
8727 "jackson-modules-base-" version ".tar.gz"))
8728 (sha256
8729 (base32
8730 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
8731 (build-system ant-build-system)
8732 (arguments
8733 `(#:jar-name "jackson-modules-base-mrbean.jar"
8734 #:source-dir "mrbean/src/main/java"
8735 #:test-dir "mrbean/src/test"
8736 #:test-exclude
8737 ;; Base class for tests
8738 (list "**/BaseTest.java")
8739 #:phases
8740 (modify-phases %standard-phases
8741 (add-before 'configure 'generate-PackageVersion.java
8742 (lambda _
8743 (let* ((out (string-append "mrbean/src/main/java/com/fasterxml/"
8744 "jackson/module/mrbean/PackageVersion.java"))
8745 (in (string-append out ".in")))
8746 (copy-file in out)
8747 (substitute* out
8748 (("@package@") "com.fasterxml.jackson.module.mrbean")
8749 (("@projectversion@") ,version)
8750 (("@projectgroupid@") "com.fasterxml.jackson.module.mrbean")
8751 (("@projectartifactid@") "jackson-module-mrbean")))
8752 #t)))))
8753 (inputs
8754 `(("java-asm" ,java-asm)
8755 ("java-fasterxml-jackson-annotations"
8756 ,java-fasterxml-jackson-annotations)
8757 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
8758 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
8759 (native-inputs
8760 `(("java-junit" ,java-junit)))
8761 (home-page "https://github.com/FasterXML/jackson-modules-base")
8762 (synopsis "POJO type materialization for Java")
8763 (description "This package implements POJO type materialization.
8764 Databinders can construct implementation classes for Java interfaces as part
8765 of deserialization.")
8766 (license license:asl2.0)))
8767
8768 (define-public java-snakeyaml
8769 (package
8770 (name "java-snakeyaml")
8771 (version "1.18")
8772 (source (origin
8773 (method url-fetch)
8774 (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
8775 version ".tar.gz"))
8776 (file-name (string-append name "-" version ".tar.gz"))
8777 (sha256
8778 (base32
8779 "0474cqcv46zgv9bhms2vgawakq1vyj0hp3h3f1bfys46msia90bh"))))
8780 (build-system ant-build-system)
8781 (arguments
8782 `(#:jar-name "java-snakeyaml.jar"
8783 #:source-dir "src/main/java"
8784 ;; Tests require velocity, a cyclic dependency, and
8785 ;; java-spring-framework-context which is not packaged.
8786 #:tests? #f))
8787 (home-page "https://bitbucket.org/asomov/snakeyaml")
8788 (synopsis "YAML processor")
8789 (description "SnakeYAML is a YAML processor for the Java Virtual Machine.")
8790 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8791
8792 (define-public java-fasterxml-jackson-dataformat-yaml
8793 (package
8794 (name "java-fasterxml-jackson-dataformat-yaml")
8795 (version "2.9.4")
8796 (source (origin
8797 (method url-fetch)
8798 (uri (string-append "https://github.com/FasterXML/"
8799 "jackson-dataformats-text/archive/"
8800 "jackson-dataformats-text-" version ".tar.gz"))
8801 (sha256
8802 (base32
8803 "1hikl06khaxbg439avf442qifcadap8w0lx13f0nnhp2vh3dkbz7"))))
8804 (build-system ant-build-system)
8805 (arguments
8806 `(#:jar-name "jackson-dataformat-yaml.jar"
8807 #:source-dir "yaml/src/main/java"
8808 #:test-dir "yaml/src/test"
8809 #:test-exclude (list "**/failing/**.java")
8810 #:phases
8811 (modify-phases %standard-phases
8812 (add-before 'configure 'generate-PackageVersion.java
8813 (lambda _
8814 (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java")
8815 (in (string-append out ".in")))
8816 (copy-file in out)
8817 (substitute* out
8818 (("@package@") "com.fasterxml.jackson.dataformat.yaml")
8819 (("@projectversion@") ,version)
8820 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml")
8821 (("@projectartifactid@") "jackson-dataformat-yaml")))
8822 #t)))))
8823 (inputs
8824 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
8825 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
8826 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
8827 ("java-snakeyaml" ,java-snakeyaml)))
8828 (native-inputs
8829 `(("junit" ,java-junit)
8830 ("hamcrest" ,java-hamcrest-core)
8831 ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi)
8832 ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit)
8833 ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core)))
8834 (home-page "https://github.com/FasterXML/jackson-dataformats-text")
8835 (synopsis "Yaml backend for Jackson")
8836 (description "Dataformat backends are used to support format alternatives
8837 to JSON, supported by default. This is done by sub-classing Jackson core
8838 abstractions.")
8839 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8840
8841 (define-public java-stax2-api
8842 (package
8843 (name "java-stax2-api")
8844 (version "4.0.0")
8845 (source (origin
8846 (method url-fetch)
8847 (uri (string-append "https://github.com/FasterXML/stax2-api/archive/"
8848 "stax2-api-" version ".tar.gz"))
8849 (sha256
8850 (base32
8851 "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq"))))
8852 (build-system ant-build-system)
8853 (arguments
8854 `(#:jar-name "java-stax2-api.jar"
8855 #:source-dir "src/main/java"
8856 #:tests? #f)); no tests
8857 (home-page "https://github.com/FasterXML/stax2-api")
8858 (synopsis "Stax2 API")
8859 (description "Stax2 API is an extension to basic Stax 1.0 API that adds
8860 significant new functionalities, such as full-featured bi-direction validation
8861 interface and high-performance Typed Access API.")
8862 (license license:bsd-2)))
8863
8864 (define-public java-woodstox-core
8865 (package
8866 (name "java-woodstox-core")
8867 (version "5.0.3")
8868 (source (origin
8869 (method url-fetch)
8870 (uri (string-append "https://github.com/FasterXML/woodstox/archive/"
8871 "woodstox-core-" version ".tar.gz"))
8872 (sha256
8873 (base32
8874 "1i7pdgb8jbw6gdy5kmm0l6rz109n2ns92pqalpyp24vb8vlvdfd4"))))
8875 (build-system ant-build-system)
8876 (arguments
8877 `(#:jar-name "woodstox.jar"
8878 #:test-exclude
8879 (list "**/Base*.java" "failing/**")
8880 #:phases
8881 (modify-phases %standard-phases
8882 (add-before 'build 'remove-msv-dep
8883 (lambda _
8884 ;; we don't need osgi, and it depends on msv
8885 (delete-file-recursively "src/main/java/com/ctc/wstx/osgi")
8886 ;; msv's latest release is from 2011 and we don't need it
8887 (delete-file-recursively "src/main/java/com/ctc/wstx/msv")
8888 (delete-file-recursively "src/test/java/wstxtest/osgi")
8889 (delete-file-recursively "src/test/java/wstxtest/msv")
8890 #t))
8891 (add-before 'build 'copy-resources
8892 (lambda _
8893 (copy-recursively "src/main/resources" "build/classes")
8894 #t)))))
8895 (inputs
8896 `(("stax2" ,java-stax2-api)))
8897 (native-inputs
8898 `(("junit" ,java-junit)))
8899 (home-page "https://github.com/FasterXML/woodstox")
8900 (synopsis "Stax XML API implementation")
8901 (description "Woodstox is a stax XML API implementation.")
8902 (license license:asl2.0)))
8903
8904 (define-public java-fasterxml-jackson-dataformat-xml
8905 (package
8906 (name "java-fasterxml-jackson-dataformat-xml")
8907 (version "2.9.4")
8908 (source (origin
8909 (method url-fetch)
8910 (uri (string-append "https://github.com/FasterXML/"
8911 "jackson-dataformat-xml/archive/"
8912 "jackson-dataformat-xml-" version ".tar.gz"))
8913 (sha256
8914 (base32
8915 "111fkkl90w31jbf30kgj82qdcxlw4sxppki7i198liw0ck1jcavq"))))
8916 (build-system ant-build-system)
8917 (arguments
8918 `(#:jar-name "jackson-dataformat-xml.jar"
8919 #:source-dir "src/main/java"
8920 #:test-exclude
8921 (list "**/failing/**")
8922 #:phases
8923 (modify-phases %standard-phases
8924 (add-before 'configure 'generate-PackageVersion.java
8925 (lambda _
8926 (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java")
8927 (in (string-append out ".in")))
8928 (copy-file in out)
8929 (newline)
8930 (substitute* out
8931 (("@package@") "com.fasterxml.jackson.dataformat.xml")
8932 (("@projectversion@") ,version)
8933 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml")
8934 (("@projectartifactid@") "jackson-dataformat-xml")))
8935 #t))
8936 (add-before 'build 'copy-resources
8937 (lambda _
8938 (copy-recursively "src/main/resources" "build/classes")
8939 #t)))))
8940 (inputs
8941 `(("jackson-annotations" ,java-fasterxml-jackson-annotations)
8942 ("jackson-core" ,java-fasterxml-jackson-core)
8943 ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb)
8944 ("jackson-databind" ,java-fasterxml-jackson-databind)
8945 ("stax2-api" ,java-stax2-api)
8946 ("woodstox" ,java-woodstox-core)))
8947 (native-inputs
8948 `(("junit" ,java-junit)
8949 ("hamcrest" ,java-hamcrest-core)))
8950 (home-page "https://github.com/FasterXML/jackson-dataformat-xml")
8951 (synopsis "Read and write XML")
8952 (description "This package contains Jackson extension component for reading
8953 and writing XML encoded data.
8954
8955 Further, the goal is to emulate how JAXB data-binding works with \"Code-first\"
8956 approach (that is, no support is added for \"Schema-first\" approach). Support
8957 for JAXB annotations is provided by JAXB annotation module; this module
8958 provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator},
8959 @code{JsonFactory}) as well as small number of higher level overrides needed to
8960 make data-binding work.")
8961 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8962
8963 (define-public java-hdrhistogram
8964 (package
8965 (name "java-hdrhistogram")
8966 (version "2.1.9")
8967 (source (origin
8968 (method url-fetch)
8969 (uri (string-append "https://github.com/HdrHistogram/HdrHistogram/"
8970 "archive/HdrHistogram-" version ".tar.gz"))
8971 (sha256
8972 (base32
8973 "1sicbmc3sr42nw93qbkb26q9rn33ag33k6k77phjc3j5h5gjffqv"))))
8974 (build-system ant-build-system)
8975 (arguments
8976 `(#:jar-name "java-hdrhistogram.jar"
8977 #:source-dir "src/main/java"
8978 #:phases
8979 (modify-phases %standard-phases
8980 (add-before 'configure 'set-version
8981 (lambda _
8982 (let* ((version-java "src/main/java/org/HdrHistogram/Version.java")
8983 (template (string-append version-java ".template")))
8984 (copy-file template version-java)
8985 (substitute* version-java
8986 (("\\$VERSION\\$") ,version)
8987 (("\\$BUILD_TIME\\$") "0"))
8988 #t))))))
8989 (native-inputs
8990 `(("junit" ,java-junit)
8991 ("hamcrest" ,java-hamcrest-core)))
8992 (home-page "https://hdrhistogram.github.io/HdrHistogram")
8993 (synopsis "High dynamic range histogram")
8994 (description "Hdrhistogram creates histograms that support
8995 recording and analyzing sampled data value counts across a configurable integer
8996 value range with configurable value precision within the range. Value precision
8997 is expressed as the number of significant digits in the value recording, and
8998 provides control over value quantization behavior across the value range and
8999 the subsequent value resolution at any given level.")
9000 (license license:public-domain)))
9001
9002 (define-public java-cofoja
9003 (package
9004 (name "java-cofoja")
9005 (version "1.3")
9006 (source (origin
9007 (method git-fetch)
9008 (uri (git-reference
9009 (url "https://github.com/nhatminhle/cofoja")
9010 (commit (string-append "v" version))))
9011 (file-name (string-append "java-cofoja-" version "-checkout"))
9012 (sha256
9013 (base32
9014 "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w"))))
9015 (build-system ant-build-system)
9016 (arguments
9017 `(#:build-target "dist"
9018 #:test-target "test"
9019 #:jdk ,icedtea-8
9020 #:make-flags
9021 (list "-Ddist.dir=dist")
9022 #:modules ((guix build ant-build-system)
9023 (guix build java-utils)
9024 (guix build utils)
9025 (srfi srfi-1)
9026 (ice-9 match))
9027 #:phases
9028 (modify-phases %standard-phases
9029 ;; The bulid system ignores the class path the ant-build-system sets
9030 ;; up and instead expects to find all dependencies in the "lib"
9031 ;; directory.
9032 (add-after 'unpack 'create-libdir
9033 (lambda* (#:key inputs #:allow-other-keys)
9034 (mkdir-p "lib")
9035 (for-each
9036 (lambda (file)
9037 (let ((target (string-append "lib/" (basename file))))
9038 (unless (file-exists? target)
9039 (symlink file target))))
9040 (append-map (match-lambda
9041 ((label . dir)
9042 (find-files dir "\\.jar$")))
9043 inputs))
9044 #t))
9045 (replace 'install (install-jars "dist")))))
9046 (inputs
9047 `(("java-asm" ,java-asm)))
9048 (native-inputs
9049 `(("java-junit" ,java-junit)))
9050 (home-page "https://github.com/nhatminhle/cofoja")
9051 (synopsis "Contracts for Java")
9052 (description "Contracts for Java, or Cofoja for short, is a contract
9053 programming framework and test tool for Java, which uses annotation processing
9054 and bytecode instrumentation to provide run-time checking. (In particular,
9055 this is not a static analysis tool.)")
9056 (license license:lgpl3+)))
9057
9058 (define-public java-aopalliance
9059 (package
9060 (name "java-aopalliance")
9061 (version "1.0")
9062 (source (origin
9063 (method git-fetch)
9064 ;; Note: this git repository is not official, but contains the
9065 ;; source code that is in the CVS repository. Downloading the
9066 ;; tarball from sourceforge is undeterministic, and the cvs download
9067 ;; fails.
9068 (uri (git-reference
9069 (url "https://github.com/hoverruan/aopalliance")
9070 (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0")))
9071 (file-name (string-append name "-" version))
9072 (sha256
9073 (base32
9074 "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr"))))
9075 (build-system ant-build-system)
9076 (arguments
9077 `(#:jar-name "java-aopalliance.jar"
9078 #:jdk ,icedtea-8
9079 #:tests? #f; no tests
9080 #:source-dir "aopalliance/src/main"))
9081 (home-page "http://aopalliance.sourceforge.net")
9082 (synopsis "Aspect-Oriented Programming")
9083 (description "The AOP Alliance project is a joint project between several
9084 software engineering people who are interested in Aspect-Oriented Programming
9085 (AOP) and Java.")
9086 (license license:public-domain)))
9087
9088 (define-public java-javax-inject
9089 (package
9090 (name "java-javax-inject")
9091 (version "tck-1")
9092 (source (origin
9093 (method url-fetch)
9094 (uri (string-append "https://github.com/javax-inject/javax-inject/"
9095 "archive/javax.inject-" version ".tar.gz"))
9096 (sha256
9097 (base32
9098 "1ydrlvh2r7vr1g7lhjwy3w2dggpj9h6pix1lakkkgdywb365n6g0"))))
9099 (build-system ant-build-system)
9100 (arguments
9101 `(#:jar-name "java-javax-inject.jar"
9102 #:jdk ,icedtea-8
9103 #:tests? #f)); no tests
9104 (home-page "https://github.com/javax-inject/javax-inject")
9105 (synopsis "JSR-330: Dependency Injection for Java")
9106 (description "This package specifies a means for obtaining objects in such
9107 a way as to maximize reusability, testability and maintainability compared to
9108 traditional approaches such as constructors, factories, and service locators
9109 (e.g., JNDI). This process, known as dependency injection, is beneficial to
9110 most nontrivial applications.
9111
9112 Many types depend on other types. For example, a @var{Stopwatch} might depend
9113 on a @var{TimeSource}. The types on which a type depends are known as its
9114 dependencies. The process of finding an instance of a dependency to use at run
9115 time is known as resolving the dependency. If no such instance can be found,
9116 the dependency is said to be unsatisfied, and the application is broken.")
9117 (license license:asl2.0)))
9118
9119 (define-public java-guice
9120 (package
9121 (name "java-guice")
9122 (version "4.1")
9123 (source (origin
9124 (method git-fetch)
9125 (uri (git-reference
9126 (url "https://github.com/google/guice")
9127 (commit version)))
9128 (file-name (git-file-name name version))
9129 (modules '((guix build utils)))
9130 (snippet
9131 `(begin
9132 (for-each delete-file (find-files "." ".*.jar")) #t))
9133 (sha256
9134 (base32
9135 "18im5hdfl4q1b9chww2s1ii60sn3ydyyar32a2sf2p2g8zlbdswq"))))
9136 (build-system ant-build-system)
9137 (arguments
9138 `(#:jar-name "java-guice.jar"
9139 #:jdk ,icedtea-8
9140 #:tests? #f ; FIXME: tests are not in a java sub directory
9141 #:source-dir "core/src"
9142 #:phases
9143 (modify-phases %standard-phases
9144 (add-after 'unpack 'make-files-writable
9145 (lambda _
9146 (for-each make-file-writable (find-files "."))
9147 #t)))))
9148 (inputs
9149 `(("guava" ,java-guava)
9150 ("java-cglib" ,java-cglib)
9151 ("java-aopalliance" ,java-aopalliance)
9152 ("java-javax-inject" ,java-javax-inject)
9153 ("java-asm" ,java-asm)))
9154 (home-page "https://github.com/google/guice")
9155 (synopsis "Lightweight dependency injection framework")
9156 (description "Guice is a lightweight dependency injection framework for
9157 Java 6 and above.")
9158 (license license:asl2.0)))
9159
9160 (define-public java-guice-servlet
9161 (package
9162 (inherit java-guice)
9163 (name "java-guice-servlet")
9164 (arguments
9165 `(#:jar-name "guice-servlet.jar"
9166 #:source-dir "extensions/servlet/src/"
9167 #:jdk ,icedtea-8
9168 #:tests? #f ; FIXME: not in a java subdir
9169 #:phases
9170 (modify-phases %standard-phases
9171 (add-after 'unpack 'make-files-writable
9172 (lambda _
9173 (for-each make-file-writable (find-files "."))
9174 #t)))))
9175 (inputs
9176 `(("guice" ,java-guice)
9177 ("servlet" ,java-classpathx-servletapi)
9178 ,@(package-inputs java-guice)))))
9179
9180 (define-public java-assertj
9181 (package
9182 (name "java-assertj")
9183 (version "3.8.0")
9184 (source (origin
9185 (method git-fetch)
9186 (uri (git-reference
9187 (url "https://github.com/joel-costigliola/assertj-core")
9188 (commit (string-append "assertj-core-" version))))
9189 (file-name (git-file-name name version))
9190 (sha256
9191 (base32
9192 "1k35cg2in7pzk4pbdjryr0pll5lgk1r6ngrn0j8cdlgi7w8zh2d1"))))
9193 (build-system ant-build-system)
9194 (arguments
9195 `(#:jar-name "java-assertj.jar"
9196 #:jdk ,icedtea-8
9197 #:source-dir "src/main/java"
9198 #:tests? #f)); depends on tng-junit which depends on assertj
9199 (inputs
9200 `(("cglib" ,java-cglib)
9201 ("junit" ,java-junit)
9202 ("hamcrest" ,java-hamcrest-core)))
9203 (native-inputs
9204 `(("mockito" ,java-mockito-1)))
9205 (home-page "https://joel-costigliola.github.io/assertj/index.html")
9206 (synopsis "Fluent assertions for java")
9207 (description "AssertJ core is a Java library that provides a fluent
9208 interface for writing assertions. Its main goal is to improve test code
9209 readability and make maintenance of tests easier.")
9210 (license license:asl2.0)))
9211
9212 (define-public java-jboss-javassist
9213 (package
9214 (name "java-jboss-javassist")
9215 (version "3.21.0")
9216 (source (origin
9217 (method git-fetch)
9218 (uri (git-reference
9219 (url "https://github.com/jboss-javassist/javassist")
9220 (commit
9221 (string-append "rel_"
9222 (string-map
9223 (lambda (x) (if (eq? x #\.) #\_ x)) version)
9224 "_ga"))))
9225 (file-name (git-file-name name version))
9226 (sha256
9227 (base32
9228 "0h3zlcyqiaq01fspm69h7vki67raw305w89p4ha8vlhpzw02qifm"))
9229 (modules '((guix build utils)))
9230 (snippet
9231 '(begin
9232 (delete-file "javassist.jar")))))
9233 (build-system ant-build-system)
9234 (arguments
9235 `(#:jar-name "java-jboss-javassist.jar"
9236 #:jdk ,icedtea-8
9237 #:source-dir "src/main"
9238 #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3
9239 #:phases
9240 (modify-phases %standard-phases
9241 (add-after 'unpack 'make-files-writable
9242 (lambda _
9243 (for-each make-file-writable (find-files "."))
9244 #t)))))
9245 (native-inputs
9246 `(("junit" ,java-junit)))
9247 (home-page "https://github.com/jboss-javassist/javassist")
9248 (synopsis "Java bytecode engineering toolkit")
9249 (description "Javassist (JAVA programming ASSISTant) makes Java bytecode
9250 manipulation simple. It is a class library for editing bytecodes in Java; it
9251 enables Java programs to define a new class at runtime and to modify a class
9252 file when the JVM loads it.")
9253 (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl.
9254
9255 (define-public java-jcommander
9256 (package
9257 (name "java-jcommander")
9258 (version "1.71")
9259 (source (origin
9260 (method git-fetch)
9261 (uri (git-reference
9262 (url "https://github.com/cbeust/jcommander")
9263 (commit version)))
9264 (file-name (git-file-name name version))
9265 (sha256
9266 (base32
9267 "12vcpc19sd7jhvjgp7xz1qjanfix162xb3x2q5zah93rjklj1h57"))))
9268 (build-system ant-build-system)
9269 (arguments
9270 `(#:jar-name "java-jcommander.jar"
9271 #:jdk ,icedtea-8
9272 #:tests? #f; requires testng which depends on jcommander
9273 #:source-dir "src/main/java"))
9274 (home-page "https://jcommander.org")
9275 (synopsis "Command line parameters parser")
9276 (description "JCommander is a very small Java framework that makes it
9277 trivial to parse command line parameters. Parameters are declared with
9278 annotations.")
9279 (license license:asl2.0)))
9280
9281 (define-public java-bsh
9282 (package
9283 (name "java-bsh")
9284 (version "2.0b6")
9285 (source (origin
9286 (method git-fetch)
9287 (uri (git-reference
9288 (url "https://github.com/beanshell/beanshell")
9289 (commit version)))
9290 (file-name (git-file-name name version))
9291 (sha256
9292 (base32
9293 "0kz3f0xjack6c9syssi4qjw1rbd3q5963sk5pmr143hiibxa9csw"))))
9294 (build-system ant-build-system)
9295 (arguments
9296 `(#:build-target "jarall"
9297 #:test-target "junit-tests-all"
9298 #:phases
9299 (modify-phases %standard-phases
9300 (replace 'install
9301 (lambda* (#:key outputs #:allow-other-keys)
9302 (let ((share (string-append (assoc-ref outputs "out") "/share/java")))
9303 (mkdir-p share)
9304 (copy-file "dist/bsh-2.0b6.jar" (string-append share "/bsh-2.0b6.jar"))
9305 #t))))))
9306 (home-page "http://beanshell.org/")
9307 (synopsis "Lightweight Scripting for Java")
9308 (description "BeanShell is a small, free, embeddable Java source
9309 interpreter with object scripting language features, written in Java.
9310 BeanShell dynamically executes standard Java syntax and extends it with common
9311 scripting conveniences such as loose types, commands, and method closures like
9312 those in Perl and JavaScript.")
9313 (license license:asl2.0)))
9314
9315 (define-public java-fest-util
9316 (package
9317 (name "java-fest-util")
9318 (version "1.2.5")
9319 (source (origin
9320 (method git-fetch)
9321 (uri (git-reference
9322 (url "https://github.com/alexruiz/fest-util/")
9323 (commit (string-append "fest-util-" version))))
9324 (file-name (git-file-name name version))
9325 (sha256
9326 (base32
9327 "02kgal7v85snyyvcsxvn4qphid455f4smh2wri1il8d9asw0djbz"))))
9328 (build-system ant-build-system)
9329 (arguments
9330 `(#:jar-name "java-fest-util.jar"
9331 #:source-dir "src/main/java"))
9332 (native-inputs
9333 `(("junit" ,java-junit)
9334 ("hamcrest" ,java-hamcrest-core)))
9335 (home-page "https://github.com/alexruiz/fest-util")
9336 (synopsis "FEST common utilities")
9337 (description "Common utilities used in all FEST module.")
9338 (license license:asl2.0)))
9339
9340 (define-public java-fest-test
9341 (package
9342 (name "java-fest-test")
9343 (version "2.1.0")
9344 (source (origin
9345 (method git-fetch)
9346 (uri (git-reference
9347 (url "https://github.com/alexruiz/fest-test/")
9348 (commit (string-append "fest-test-" version))))
9349 (file-name (git-file-name name version))
9350 (sha256
9351 (base32
9352 "0mg1d2jfh7kbx2c40dchbjr6d8pv59snsyb13mfxsr7xk5n69qbn"))))
9353 (build-system ant-build-system)
9354 (arguments
9355 `(#:jar-name "java-fest-test.jar"
9356 #:source-dir "src/main/java"
9357 #:tests? #f)); no tests
9358 (inputs
9359 `(("junit" ,java-junit)))
9360 (home-page "https://github.com/alexruiz/fest-test")
9361 (synopsis "Common FEST testing infrastructure")
9362 (description "Fest-test contains the common FEST testing infrastructure.")
9363 (license license:asl2.0)))
9364
9365 (define-public java-fest-assert
9366 (package
9367 (name "java-fest-assert")
9368 (version "2.0M10")
9369 (source (origin
9370 (method git-fetch)
9371 (uri (git-reference
9372 (url "https://github.com/alexruiz/fest-assert-2.x/")
9373 (commit (string-append "fest-assert-core-" version))))
9374 (file-name (git-file-name name version))
9375 (sha256
9376 (base32
9377 "1cp8zzyag3s85fz2w68sda9zzaal1y5f9wl8g72wkm12an40w6by"))))
9378 (build-system ant-build-system)
9379 (arguments
9380 `(#:jar-name "java-fest-assert.jar"
9381 #:source-dir "src/main/java"
9382 #:test-exclude
9383 (list
9384 "**/Abstract*.java"
9385 "**/*BaseTest.java"
9386 ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses
9387 "**/MessageFormatter_format_Test.java"
9388 "**/internal/*/*_assert*_Test.java")))
9389 (inputs
9390 `(("java-fest-util" ,java-fest-util)))
9391 (native-inputs
9392 `(("java-junit" ,java-junit)
9393 ("java-fest-test" ,java-fest-test)
9394 ("java-hamcrest-core" ,java-hamcrest-core)
9395 ("java-mockito" ,java-mockito-1)
9396 ("java-cglib" ,java-cglib)
9397 ("java-objenesis" ,java-objenesis)
9398 ("java-asm" ,java-asm)))
9399 (home-page "https://github.com/alexruiz/fest-assert-2.x")
9400 (synopsis "FEST fluent assertions")
9401 (description "FEST-Assert provides a fluent interface for assertions.")
9402 (license license:asl2.0)))
9403
9404 (define-public java-testng
9405 (package
9406 (name "java-testng")
9407 (version "6.14.3")
9408 (source (origin
9409 (method git-fetch)
9410 (uri (git-reference
9411 (url "https://github.com/cbeust/testng")
9412 (commit version)))
9413 (file-name (string-append name "-" version "-checkout"))
9414 (sha256
9415 (base32
9416 "0y6vq30i5g276kw0v2bhbvci22ijg7ax49ap2611yqlhbs4d6dqv"))))
9417 (build-system ant-build-system)
9418 (arguments
9419 `(#:jdk ,icedtea-8; java.util.function
9420 #:jar-name "java-testng.jar"
9421 #:source-dir "src/main/java"
9422 #:phases
9423 (modify-phases %standard-phases
9424 ;; FIXME: I don't know why these tests fail
9425 (add-after 'unpack 'delete-failing-tests
9426 (lambda _
9427 (substitute* "src/test/resources/testng.xml"
9428 (("<class name=\"test.configuration.github1625.TestRunnerIssue1625\"/>") "")
9429 (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") ""))
9430 #t))
9431 ;; We don't have groovy
9432 (add-after 'unpack 'delete-groovy-tests
9433 (lambda _
9434 (delete-file-recursively "src/test/java/test/dependent/issue1648/")
9435 (substitute* "src/test/resources/testng.xml"
9436 (("<class name=\"test.dependent.issue1648.TestRunner\"/>") ""))
9437 #t))
9438 (add-before 'build 'copy-resources
9439 (lambda _
9440 (copy-recursively "src/main/resources" "build/classes")
9441 #t))
9442 (add-before 'check 'copy-test-resources
9443 (lambda _
9444 (copy-recursively "src/test/resources" "build/test-classes")
9445 #t))
9446 (replace 'check
9447 (lambda _
9448 (invoke "ant" "compile-tests")
9449 ;; we don't have groovy
9450 (substitute* "src/test/resources/testng.xml"
9451 (("<class name=\"test.groovy.GroovyTest\" />") ""))
9452 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
9453 ":build/classes"
9454 ":build/test-classes")
9455 "-Dtest.resources.dir=src/test/resources"
9456 "org.testng.TestNG" "src/test/resources/testng.xml"))))))
9457 (propagated-inputs
9458 `(("junit" ,java-junit)
9459 ("java-jsr305" ,java-jsr305)
9460 ("java-bsh" ,java-bsh)
9461 ("java-jcommander" ,java-jcommander)
9462 ("java-guice" ,java-guice)
9463 ("snakeyaml" ,java-snakeyaml)))
9464 (native-inputs
9465 `(("guava" ,java-guava)
9466 ("java-javax-inject" ,java-javax-inject)
9467 ("java-hamcrest" ,java-hamcrest-all)
9468 ("java-assertj" ,java-assertj)
9469 ("java-mockito" ,java-mockito-1)
9470 ("cglib" ,java-cglib)
9471 ("asm" ,java-asm)
9472 ("aopalliance" ,java-aopalliance)))
9473 (home-page "https://testng.org")
9474 (synopsis "Testing framework")
9475 (description "TestNG is a testing framework inspired from JUnit and NUnit
9476 but introducing some new functionalities that make it more powerful and easier
9477 to use.")
9478 (license license:asl2.0)))
9479
9480 (define-public java-jnacl
9481 (let ((commit "094e819afdd63ea81a499b3bcb42a271006bebd9")
9482 (revision "2"))
9483 (package
9484 (name "java-jnacl")
9485 (version (string-append "0.1.0-" revision "." (string-take commit 7)))
9486 (source (origin
9487 (method git-fetch)
9488 (uri (git-reference
9489 (url "https://github.com/neilalexander/jnacl")
9490 (commit commit)))
9491 (file-name (git-file-name name version))
9492 (sha256
9493 (base32
9494 "1d6g6xhn83byv5943n7935wwjsk0ibk0qdvqgr699qqgqqmwisbb"))))
9495 (build-system ant-build-system)
9496 (arguments
9497 `(#:jar-name "jnacl.jar"
9498 #:source-dir "src/main/java"
9499 #:jdk ,icedtea-8
9500 #:phases
9501 (modify-phases %standard-phases
9502 (add-before 'build 'fix-tests
9503 (lambda _
9504 (substitute* '("src/test/java/com/neilalexander/jnacl/NaClTest.java"
9505 "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java")
9506 (("assertions.Assertions") "assertions.api.Assertions"))
9507 #t))
9508 (replace 'check
9509 (lambda _
9510 (invoke "ant" "compile-tests")
9511 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
9512 ":build/classes"
9513 ":build/test-classes")
9514 "org.testng.TestNG" "-testclass"
9515 "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class")
9516 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
9517 ":build/classes"
9518 ":build/test-classes")
9519 "org.testng.TestNG" "-testclass"
9520 "build/test-classes/com/neilalexander/jnacl/NaClTest.class"))))))
9521 (native-inputs
9522 `(("java-testng" ,java-testng)
9523 ("java-fest-util" ,java-fest-util)
9524 ("java-fest-assert" ,java-fest-assert)))
9525 (home-page "https://github.com/neilalexander/jnacl")
9526 (synopsis "Java implementation of NaCl")
9527 (description "Pure Java implementation of the NaCl: Networking and
9528 Cryptography library.")
9529 (license license:bsd-2))))
9530
9531 (define-public java-mvel2
9532 (package
9533 (name "java-mvel2")
9534 (version "2.3.1")
9535 (source (origin
9536 (method url-fetch)
9537 (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-"
9538 version ".Final.tar.gz"))
9539 (sha256
9540 (base32
9541 "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z"))))
9542 (build-system ant-build-system)
9543 (arguments
9544 `(#:jar-name "mvel2.jar"
9545 #:source-dir "src/main/java"
9546 #:test-exclude
9547 (list "**/Abstract*.java"
9548 ;; Base class with no tests
9549 "**/MVELThreadTest.java")
9550 #:phases
9551 (modify-phases %standard-phases
9552 (add-after 'install 'install-bin
9553 (lambda* (#:key outputs #:allow-other-keys)
9554 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
9555 (mkdir-p bin)
9556 (with-output-to-file (string-append bin "/mvel2")
9557 (lambda _
9558 (display
9559 (string-append
9560 "#!" (which "bash") "\n"
9561 "if [ \"$#\" -ne \"2\" ]; then\n"
9562 "echo 'Usage: mvel2 <script> <out.dir>'\n"
9563 "exit\n"
9564 "fi\n"
9565 "java -Dout.dir=$2 -cp " (getenv "CLASSPATH")
9566 ":" (assoc-ref outputs "out") "/share/java/mvel2.jar"
9567 " org.mvel2.sh.Main $1"))))
9568 (chmod (string-append bin "/mvel2") #o755))
9569 #t)))))
9570 (native-inputs
9571 `(("junit" ,java-junit)
9572 ("hamcrest" ,java-hamcrest-core)))
9573 (home-page "https://github.com/mvel/mvel")
9574 (synopsis "MVFLEX Expression Language")
9575 (description "MVEL has largely been inspired by Java syntax, but has some
9576 fundamental differences aimed at making it more efficient as an expression
9577 language, such as operators that directly support collection, array and string
9578 matching, as well as regular expressions. MVEL is used to evaluate expressions
9579 written using Java syntax.
9580
9581 In addition to the expression language, MVEL serves as a templating language for
9582 configuration and string construction.")
9583 (license license:asl2.0)))
9584
9585 (define-public java-commons-jexl-2
9586 (package
9587 (name "java-commons-jexl")
9588 (version "2.1.1")
9589 (source (origin
9590 (method url-fetch)
9591 (uri (string-append "mirror://apache/commons/jexl/source/"
9592 "commons-jexl-" version "-src.tar.gz"))
9593 (sha256
9594 (base32
9595 "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz"))))
9596 (build-system ant-build-system)
9597 (arguments
9598 `(#:jar-name "commons-jexl-2.jar"
9599 #:jdk ,icedtea-8
9600 #:source-dir "src/main/java"
9601 #:phases
9602 (modify-phases %standard-phases
9603 (add-before 'check 'disable-broken-tests
9604 (lambda* (#:key inputs #:allow-other-keys)
9605 (with-directory-excursion "src/test/java/org/apache/commons/jexl2/"
9606 (substitute* "ArithmeticTest.java"
9607 (("asserter.assertExpression\\(\"3 / 0\"") "//")
9608 (("asserter.assertExpression\\(\"imanull") "//"))
9609 ;; This test fails with "ambiguous method invocation"
9610 (delete-file "CacheTest.java")
9611 ;; This test doesn't have access to the temp directory
9612 (substitute* "ClassCreatorTest.java"
9613 (("java.io.tmpdir") "user.dir"))
9614 ;; This test fails in trying to detect whether it can run.
9615 (substitute* "ClassCreator.java"
9616 (("boolean canRun =.*") "boolean canRun = false;\n"))
9617 ;; ...and these tests depend on it.
9618 (delete-file "scripting/JexlScriptEngineOptionalTest.java")
9619 (delete-file "scripting/JexlScriptEngineTest.java"))
9620 #t))
9621 (add-before 'build 'run-javacc
9622 (lambda _
9623 (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/"
9624 (invoke "java" "jjtree" "Parser.jjt")
9625 (invoke "java" "javacc" "Parser.jj"))
9626 #t)))))
9627 (inputs
9628 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
9629 (native-inputs
9630 `(("java-junit" ,java-junit)
9631 ("java-hamcrest-core" ,java-hamcrest-core)
9632 ("javacc" ,javacc-4)))
9633 (home-page "https://commons.apache.org/proper/commons-jexl/")
9634 (synopsis "Java Expression Language ")
9635 (description "JEXL is a library intended to facilitate the implementation
9636 of dynamic and scripting features in applications and frameworks written in
9637 Java. JEXL implements an Expression Language based on some extensions to the
9638 JSTL Expression Language supporting most of the constructs seen in
9639 shell-script or ECMAScript. Its goal is to expose scripting features usable
9640 by technical operatives or consultants working with enterprise platforms.")
9641 (license license:asl2.0)))
9642
9643 (define-public java-lz4
9644 (package
9645 (name "java-lz4")
9646 (version "1.4.0")
9647 (source (origin
9648 (method git-fetch)
9649 (uri (git-reference
9650 (url "https://github.com/lz4/lz4-java")
9651 (commit version)))
9652 (file-name (git-file-name name version))
9653 (sha256
9654 (base32
9655 "0ydjakhv3cz34mfvv14qrh2ksdxifgjwwagjy7r46qr3f68hnf6y"))))
9656 (build-system ant-build-system)
9657 (arguments
9658 `(#:jar-name "lz4.jar"
9659 #:jdk ,icedtea-8
9660 #:source-dir "src/java:src/java-unsafe"
9661 #:tests? #f; FIXME: requires more dependencies
9662 #:phases
9663 (modify-phases %standard-phases
9664 (add-after 'unpack 'make-files-writable
9665 (lambda _
9666 (for-each make-file-writable (find-files "."))
9667 #t))
9668 (add-before 'configure 'generate-source
9669 (lambda _
9670 (with-directory-excursion "src/build/source_templates"
9671 (invoke "mvel2" "../gen_sources.mvel" "../../java"))
9672 #t)))))
9673 (native-inputs
9674 `(("mvel" ,java-mvel2)))
9675 (home-page "https://jpountz.github.io/lz4-java")
9676 (synopsis "Compression algorithm")
9677 (description "LZ4 - Java is a Java port of the popular lz4 compression
9678 algorithms and xxHash hashing algorithm.")
9679 (license license:asl2.0)))
9680
9681 (define-public java-bouncycastle
9682 (package
9683 (name "java-bouncycastle")
9684 (version "1.60")
9685 (source (origin
9686 (method git-fetch)
9687 (uri (git-reference
9688 (url "http://git.bouncycastle.org/repositories/bc-java")
9689 ;(url "https://github.com/bcgit/bc-java")
9690 (commit (string-append "r1rv" (substring version 2 4)))))
9691 (file-name (git-file-name name version))
9692 (sha256
9693 (base32
9694 "1m921a1ac2dl797ffzg3d4j97ch308f25spb4jgsj3npfmmys5gb"))
9695 (modules '((guix build utils)))
9696 (snippet
9697 '(begin
9698 (for-each delete-file
9699 (find-files "." "\\.jar$"))
9700 #t))))
9701 (build-system ant-build-system)
9702 (arguments
9703 `(#:jdk ,icedtea-8
9704 #:tests? #f
9705 #:phases
9706 (modify-phases %standard-phases
9707 (replace 'build
9708 (lambda _
9709 (invoke "ant" "-f" "ant/jdk15+.xml" "build-provider")
9710 (invoke "ant" "-f" "ant/jdk15+.xml" "build")))
9711 ;; FIXME: the tests freeze.
9712 ;; (replace 'check
9713 ;; (lambda _
9714 ;; (invoke "ant" "-f" "ant/jdk15+.xml" "test")))
9715 (replace 'install
9716 (install-jars "build/artifacts/jdk1.5/jars")))))
9717 (inputs
9718 `(("java-javax-mail" ,java-javax-mail)))
9719 (native-inputs
9720 `(("unzip" ,unzip)
9721 ("junit" ,java-junit)
9722 ("java-native-access" ,java-native-access)
9723 ("java-native-access-platform" ,java-native-access-platform)))
9724 (home-page "https://www.bouncycastle.org")
9725 (synopsis "Cryptographic library")
9726 (description "Bouncy Castle is a cryptographic library for the Java
9727 programming language.")
9728 (license license:expat)))
9729
9730 (define-public java-lmax-disruptor
9731 (package
9732 (name "java-lmax-disruptor")
9733 (version "3.3.7")
9734 (source (origin
9735 (method url-fetch)
9736 (uri (string-append "https://github.com/LMAX-Exchange/disruptor/"
9737 "archive/" version ".tar.gz"))
9738 (file-name (string-append name "-" version ".tar.gz"))
9739 (sha256
9740 (base32
9741 "17da2gwj5abnlsfgn2xqjk5lgzbg4vkb0hdv2dvc8r2fx4bi7w3g"))))
9742 (build-system ant-build-system)
9743 (arguments
9744 `(#:jar-name "java-lmax-disruptor.jar"
9745 #:jdk ,icedtea-8
9746 #:tests? #f)); tests hang
9747 (inputs
9748 `(("junit" ,java-junit)
9749 ("java-hdrhistogram" ,java-hdrhistogram)
9750 ("java-jmock" ,java-jmock)
9751 ("java-jmock-legacy" ,java-jmock-legacy)
9752 ("java-jmock-junit4" ,java-jmock-junit4)
9753 ("java-hamcrest-all" ,java-hamcrest-all)))
9754 (native-inputs
9755 `(("cglib" ,java-cglib)
9756 ("objenesis" ,java-objenesis)
9757 ("asm" ,java-asm)))
9758 (home-page "https://www.lmax.com/disruptor")
9759 (synopsis "High performance inter-thread communication")
9760 (description "LMAX Disruptor is a software pattern and software component
9761 for high performance inter-thread communication that avoids the need for
9762 message queues or resource locking.")
9763 (license license:asl2.0)))
9764
9765 (define-public java-commons-bcel
9766 (package
9767 (name "java-commons-bcel")
9768 (version "6.1")
9769 (source (origin
9770 (method url-fetch)
9771 (uri (string-append "mirror://apache/commons/bcel/source/bcel-"
9772 version "-src.tar.gz"))
9773 (sha256
9774 (base32
9775 "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy"))))
9776 (build-system ant-build-system)
9777 (arguments
9778 `(#:jar-name "bcel.jar"
9779 #:jdk ,icedtea-8
9780 #:source-dir "src/main/java"
9781 #:test-dir "src/test/java"
9782 ;; FIXME: Tests require the unpackaged jna.
9783 #:tests? #f))
9784 (home-page "https://commons.apache.org/proper/commons-bcel/")
9785 (synopsis "Byte code engineering library")
9786 (description "The Byte Code Engineering Library (Apache Commons BCEL) is
9787 intended to give users a convenient way to analyze, create, and
9788 manipulate (binary) Java class files. Classes are represented by objects
9789 which contain all the symbolic information of the given class: methods, fields
9790 and byte code instructions, in particular.
9791
9792 Such objects can be read from an existing file, be transformed by a
9793 program (e.g. a class loader at run-time) and written to a file again. An
9794 even more interesting application is the creation of classes from scratch at
9795 run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful
9796 if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format
9797 of Java @code{.class} files.")
9798 (license license:asl2.0)))
9799
9800 (define-public java-xerial-core
9801 (package
9802 (name "java-xerial-core")
9803 (version "2.1")
9804 (source (origin
9805 (method url-fetch)
9806 (uri (string-append "https://github.com/xerial/xerial-java/archive/"
9807 version ".tar.gz"))
9808 (file-name (string-append name "-" version ".tar.gz"))
9809 (sha256
9810 (base32
9811 "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d"))))
9812 (build-system ant-build-system)
9813 (arguments
9814 `(#:jar-name "xerial-core.jar"
9815 #:source-dir "xerial-core/src/main/java"
9816 #:test-dir "xerial-core/src/test"
9817 #:phases
9818 (modify-phases %standard-phases
9819 (add-before 'build 'copy-resources
9820 (lambda _
9821 (copy-recursively "xerial-core/src/main/resources"
9822 "build/classes")
9823 #t)))))
9824 (native-inputs
9825 `(("junit" ,java-junit)
9826 ("hamcrest" ,java-hamcrest-core)))
9827 (home-page "https://github.com/xerial/xerial-java")
9828 (synopsis "Data management libraries for Java")
9829 (description "Xerial is a set of data management libraries for the Java
9830 programming language. The ultimate goal of the Xerial project is to manage
9831 everything as database, including class objects, text format data, data
9832 streams, etc.")
9833 (license license:asl2.0)))
9834
9835 (define-public java-powermock-reflect
9836 (package
9837 (name "java-powermock-reflect")
9838 (version "1.7.3")
9839 (source (origin
9840 (method url-fetch)
9841 (uri (string-append "https://github.com/powermock/powermock/"
9842 "archive/powermock-" version ".tar.gz"))
9843 (file-name (string-append name "-" version ".tar.gz"))
9844 (sha256
9845 (base32
9846 "0sbgi5vqq7k72wzcdjb20s370vyd4hsbnx71pzb8ishml3gy7fwy"))
9847 (patches
9848 (search-patches "java-powermock-fix-java-files.patch"))))
9849 (build-system ant-build-system)
9850 (arguments
9851 `(#:jar-name "java-powermock-reflect.jar"
9852 #:jdk ,icedtea-8
9853 #:source-dir "powermock-reflect/src/main/java"
9854 #:test-dir "powermock-reflect/src/test"))
9855 (inputs
9856 `(("java-objenesis" ,java-objenesis)))
9857 (native-inputs
9858 `(("junit" ,java-junit)
9859 ("cglib" ,java-cglib)
9860 ("asm" ,java-asm)
9861 ("hamcrest" ,java-hamcrest-core)
9862 ("assertj" ,java-assertj)))
9863 (home-page "https://github.com/powermock/powermock")
9864 (synopsis "Mock library extension framework")
9865 (description "PowerMock is a framework that extends other mock libraries
9866 such as EasyMock with more powerful capabilities. PowerMock uses a custom
9867 classloader and bytecode manipulation to enable mocking of static methods,
9868 constructors, final classes and methods, private methods, removal of static
9869 initializers and more. By using a custom classloader no changes need to be
9870 done to the IDE or continuous integration servers which simplifies adoption.")
9871 (license license:asl2.0)))
9872
9873 (define-public java-powermock-core
9874 (package
9875 (inherit java-powermock-reflect)
9876 (name "java-powermock-core")
9877 (arguments
9878 `(#:jar-name "java-powermock-core.jar"
9879 #:source-dir "powermock-core/src/main/java"
9880 #:test-dir "powermock-core/src/test"
9881 #:tests? #f; requires powermock-api
9882 #:jdk ,icedtea-8
9883 #:phases
9884 (modify-phases %standard-phases
9885 (add-before 'build 'copy-resources
9886 (lambda _
9887 (copy-recursively "powermock-core/src/main/resources"
9888 "build/classes")
9889 #t)))))
9890 (inputs
9891 `(("reflect" ,java-powermock-reflect)
9892 ("javassist" ,java-jboss-javassist)))
9893 (native-inputs
9894 `(("junit" ,java-junit)
9895 ("assertj" ,java-assertj)
9896 ("mockito" ,java-mockito-1)))))
9897
9898 (define-public java-powermock-api-support
9899 (package
9900 (inherit java-powermock-reflect)
9901 (name "java-powermock-api-support")
9902 (build-system ant-build-system)
9903 (arguments
9904 `(#:jar-name "java-powermock-api-support.jar"
9905 #:jdk ,icedtea-8
9906 #:source-dir "powermock-api/powermock-api-support/src/main/java"
9907 #:tests? #f)); no tests
9908 (inputs
9909 `(("core" ,java-powermock-core)
9910 ("reflect" ,java-powermock-reflect)))))
9911
9912 (define-public java-powermock-modules-junit4-common
9913 (package
9914 (inherit java-powermock-reflect)
9915 (name "java-powermock-modules-junit4-common")
9916 (build-system ant-build-system)
9917 (arguments
9918 `(#:jar-name "java-powermock-modules-junit4-common.jar"
9919 #:jdk ,icedtea-8
9920 #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java"
9921 #:test-dir "powermock-modules/powermock-module-junit4-common/src/test"))
9922 (inputs
9923 `(("core" ,java-powermock-core)
9924 ("easymock" ,java-easymock)
9925 ("reflect" ,java-powermock-reflect)
9926 ("hamcrest" ,java-hamcrest-core)
9927 ("cglib" ,java-cglib)))))
9928
9929 (define-public java-powermock-modules-junit4
9930 (package
9931 (inherit java-powermock-reflect)
9932 (name "java-powermock-modules-junit4")
9933 (build-system ant-build-system)
9934 (arguments
9935 `(#:jar-name "java-powermock-modules-junit4.jar"
9936 #:jdk ,icedtea-8
9937 #:source-dir "powermock-modules/powermock-module-junit4/src/main/java"
9938 #:test-dir "powermock-modules/powermock-module-junit4/src/test"
9939 #:phases
9940 (modify-phases %standard-phases
9941 (add-before 'build 'fix-junit-detection
9942 (lambda _
9943 ;; Our junit version is 4.12-SNAPSHOT
9944 (substitute* (find-files "powermock-modules/powermock-module-junit4"
9945 "PowerMockJUnit4MethodValidator.java")
9946 (("4.12") "4.12-SNAPSHOT"))
9947 #t)))))
9948 (inputs
9949 `(("core" ,java-powermock-core)
9950 ("reflect" ,java-powermock-reflect)
9951 ("common" ,java-powermock-modules-junit4-common)
9952 ("cglib" ,java-cglib)))
9953 (native-inputs
9954 `(("easymock" ,java-easymock)
9955 ("hamcrest" ,java-hamcrest-core)
9956 ("objenesis" ,java-objenesis)
9957 ("asm" ,java-asm)
9958 ("junit" ,java-junit)))))
9959
9960 (define-public java-powermock-api-easymock
9961 (package
9962 (inherit java-powermock-reflect)
9963 (name "java-powermock-api-easymock")
9964 (build-system ant-build-system)
9965 (arguments
9966 `(#:jar-name "java-powermock-api-easymock.jar"
9967 #:jdk ,icedtea-8
9968 #:source-dir "powermock-api/powermock-api-easymock/src/main/java"
9969 #:tests? #f; no tests
9970 #:phases
9971 (modify-phases %standard-phases
9972 (add-before 'build 'fix-file
9973 (lambda _
9974 ;; FIXME: This looks wrong, but it fixes a build error.
9975 (with-directory-excursion "powermock-api/powermock-api-easymock"
9976 (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java"
9977 (("classLoader instanceof MockClassLoader") "false")
9978 (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";")))
9979 #t)))))
9980 (inputs
9981 `(("core" ,java-powermock-core)
9982 ("easymock" ,java-easymock)
9983 ("reflect" ,java-powermock-reflect)
9984 ("support" ,java-powermock-api-support)
9985 ("cglib" ,java-cglib)))))
9986
9987 (define-public java-jboss-jms-api-spec
9988 (package
9989 (name "java-jboss-jms-api-spec")
9990 (version "2.0")
9991 (source (origin
9992 (method url-fetch)
9993 (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/"
9994 "archive/jboss-jms-api_" version
9995 "_spec-1.0.1.Final.tar.gz"))
9996 (sha256
9997 (base32
9998 "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m"))))
9999 (build-system ant-build-system)
10000 (arguments
10001 `(#:jar-name "java-jboss-jms-api_spec.jar"
10002 #:jdk ,icedtea-8
10003 #:source-dir "."
10004 #:tests? #f)); no tests
10005 (home-page "https://github.com/jboss/jboss-jms-api_spec")
10006 (synopsis "Java Message Service API specification")
10007 (description "Java Message Service (JMS) API is used to send messages
10008 messages between two or more clients. It is a messaging standard that allows
10009 application components to create, send, receive, and read messages.")
10010 ; either gpl2 only with GPL Classpath Exception, or cddl.
10011 (license (list license:gpl2 license:cddl1.0))))
10012
10013 (define-public java-mail
10014 (package
10015 (name "java-mail")
10016 (version "1.6.0")
10017 (source (origin
10018 (method url-fetch)
10019 (uri (string-append "https://github.com/javaee/javamail/archive/"
10020 "JAVAMAIL-1_6_0.tar.gz"))
10021 (sha256
10022 (base32
10023 "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92"))))
10024 (build-system ant-build-system)
10025 (arguments
10026 `(#:jar-name "java-mail.jar"
10027 #:jdk ,icedtea-8
10028 #:source-dir "mail/src/main/java"
10029 #:test-dir "mail/src/test"
10030 #:test-exclude
10031 (list "**/CollectorFormatterTest.java"
10032 "**/CompactFormatterTest.java"
10033 "**/DurationFilterTest.java"
10034 "**/MailHandlerTest.java"
10035 "**/GetLocalAddressTest.java"
10036 ;; FIXME: both end with:
10037 ;; java.lang.ClassNotFoundException:
10038 ;; javax.mail.internet.MimeMultipartParseTest
10039 "**/MimeMultipartParseTest.java"
10040 "**/SearchTermSerializationTest.java")
10041 #:phases
10042 (modify-phases %standard-phases
10043 (add-before 'configure 'move-version.java
10044 (lambda _
10045 (copy-file "mail/src/main/resources/javax/mail/Version.java"
10046 "mail/src/main/java/javax/mail/Version.java")
10047 #t))
10048 (add-before 'build 'copy-resources
10049 (lambda _
10050 (copy-recursively "mail/src/main/resources/META-INF"
10051 "build/classes/META-INF")
10052 #t)))))
10053 (native-inputs
10054 `(("junit" ,java-junit)
10055 ("hamcrest" ,java-hamcrest-core)))
10056 (home-page "https://javaee.github.io/javamail/")
10057 (synopsis "Mail-related functionnalities in Java")
10058 (description "The JavaMail API provides a platform-independent and
10059 protocol-independent framework to build mail and messaging applications.")
10060 ;; General Public License Version 2 only ("GPL") or the Common Development
10061 ;; and Distribution License("CDDL")
10062 (license (list license:cddl1.1
10063 license:gpl2)))); with classpath exception
10064
10065 (define-public java-jeromq
10066 (package
10067 (name "java-jeromq")
10068 (version "0.4.3")
10069 (source (origin
10070 (method git-fetch)
10071 (uri (git-reference
10072 (url "https://github.com/zeromq/jeromq")
10073 (commit (string-append "v" version))))
10074 (file-name (string-append name "-" version "-checkout"))
10075 (sha256
10076 (base32
10077 "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj"))
10078 (patches (search-patches "java-jeromq-fix-tests.patch"))))
10079 (build-system ant-build-system)
10080 (arguments
10081 `(#:jar-name "java-jeromq.jar"
10082 #:source-dir "src/main/java"
10083 #:jdk ,icedtea-8
10084 #:test-exclude
10085 (list
10086 "**/Abstract*.java"
10087 ;; Requires network
10088 "**/ZBeaconTest.java"
10089 ;; Failures
10090 "**/DealerSpecTest.java"
10091 "**/CustomDecoderTest.java"
10092 "**/CustomEncoderTest.java"
10093 "**/ConnectRidTest.java"
10094 "**/ReqSpecTest.java"
10095 "**/PushPullSpecTest.java"
10096 "**/PubSubHwmTest.java"
10097 "**/RouterSpecTest.java"
10098 "**/ProxyTest.java")))
10099 (inputs
10100 `(("java-jnacl" ,java-jnacl)))
10101 (native-inputs
10102 `(("java-hamcrest-core" ,java-hamcrest-core)
10103 ("junit" ,java-junit)))
10104 (home-page "http://zeromq.org/bindings:java")
10105 (synopsis "Java binding for 0MQ")
10106 (description "Jeromq provides the java bindings for 0MQ.")
10107 (license license:mpl2.0)))
10108
10109 (define-public java-kafka-clients
10110 (package
10111 (name "java-kafka-clients")
10112 (version "1.0.0")
10113 (source (origin
10114 (method url-fetch)
10115 (uri (string-append "mirror://apache/kafka/" version "/kafka-"
10116 version "-src.tgz"))
10117 (sha256
10118 (base32
10119 "1yxmnsmliwm7671q5yy9bl4jdqyyn00n26cggz9brwczx80w1vfq"))))
10120 (build-system ant-build-system)
10121 (arguments
10122 `(#:jar-name "java-kafka-clients.jar"
10123 #:jdk ,icedtea-8
10124 #:source-dir "clients/src/main/java"
10125 #:test-dir "clients/src/test"
10126 #:test-exclude
10127 (list
10128 ;; This file does not contain a class
10129 "**/IntegrationTest.java"
10130 ;; Requires network
10131 "**/ClientUtilsTest.java"
10132 ;; End with errors that seem related to our powermock
10133 "**/KafkaProducerTest.java"
10134 "**/BufferPoolTest.java")))
10135 (inputs
10136 `(("java-slf4j-api" ,java-slf4j-api)
10137 ("java-lz4" ,java-lz4)))
10138 (native-inputs
10139 `(("junit" ,java-junit)
10140 ("hamcrest" ,java-hamcrest-all)
10141 ("objenesis" ,java-objenesis)
10142 ("asm" ,java-asm)
10143 ("cglib" ,java-cglib)
10144 ("javassist" ,java-jboss-javassist)
10145 ("snappy" ,java-snappy)
10146 ("easymock" ,java-easymock)
10147 ("powermock" ,java-powermock-core)
10148 ("powermock-easymock" ,java-powermock-api-easymock)
10149 ("powermock-junit4-common" ,java-powermock-modules-junit4-common)
10150 ("powermock-junit4" ,java-powermock-modules-junit4)
10151 ("powermock-support" ,java-powermock-api-support)
10152 ("java-bouncycastle" ,java-bouncycastle)))
10153 (home-page "https://kafka.apache.org")
10154 (synopsis "Distributed streaming platform")
10155 (description "Kafka is a distributed streaming platform, which means:
10156 @itemize
10157 @item it can publish and subscribe to streams of records;
10158 @item it can store streams of records in a fault-tolerant way;
10159 @item it can process streams of records as they occur.
10160 @end itemize")
10161 ;; Either cddl or gpl2 only.
10162 (license (list license:cddl1.1; actually cddl1.1
10163 license:gpl2)))); with classpath exception
10164
10165 (define-public java-jdom
10166 (package
10167 (name "java-jdom")
10168 (version "1.1.3")
10169 (source (origin
10170 (method url-fetch)
10171 (uri (string-append "http://jdom.org/dist/binary/archive/jdom-"
10172 version ".tar.gz"))
10173 (sha256
10174 (base32
10175 "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl"))))
10176 (build-system ant-build-system)
10177 (arguments
10178 `(#:build-target "package"
10179 #:tests? #f; tests are run as part of the build process
10180 #:phases
10181 (modify-phases %standard-phases
10182 (replace 'install
10183 (install-jars "build")))))
10184 (home-page "http://jdom.org/")
10185 (synopsis "Access, manipulate, and output XML data")
10186 (description "Java-based solution for accessing, manipulating, and
10187 outputting XML data from Java code.")
10188 (license license:bsd-4)))
10189
10190 (define-public java-geronimo-xbean-reflect
10191 (package
10192 (name "java-geronimo-xbean-reflect")
10193 (version "4.5")
10194 (source (origin
10195 (method svn-fetch)
10196 (uri (svn-reference
10197 (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/")
10198 (revision 1807396)))
10199 (file-name (string-append name "-" version))
10200 (sha256
10201 (base32
10202 "18q3i6jgm6rkw8aysfgihgywrdc5nvijrwnslmi3ww497jvri6ja"))))
10203 (build-system ant-build-system)
10204 (arguments
10205 `(#:jar-name "geronimo-xbean-reflect.jar"
10206 #:source-dir "xbean-reflect/src/main/java"
10207 #:test-dir "xbean-reflect/src/test"
10208 #:jdk ,icedtea-8
10209 #:test-exclude
10210 (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java"
10211 "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java"
10212 "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java")
10213 #:phases
10214 (modify-phases %standard-phases
10215 (add-before 'build 'fix-source
10216 (lambda _
10217 (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/"))
10218 ;; org.apache.xbean.asm6 is actually repackaged java-asm
10219 (substitute* (string-append dir "XbeanAsmParameterNameLoader.java")
10220 (("org.apache.xbean.asm5") "org.objectweb.asm"))
10221 #t))))))
10222 (inputs
10223 `(("asm" ,java-asm)
10224 ("log4j" ,java-log4j-api)
10225 ("log4j-1.2" ,java-log4j-1.2-api)
10226 ("log4j-core" ,java-log4j-core)
10227 ("logging" ,java-commons-logging-minimal)))
10228 (native-inputs
10229 `(("junit" ,java-junit)))
10230 (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/")
10231 (synopsis "Dependency injection helper")
10232 (description "Xbean-reflect provides very flexible ways to create objects
10233 and graphs of objects for dependency injection frameworks")
10234 (license license:asl2.0)))
10235
10236 (define-public java-geronimo-xbean-bundleutils
10237 (package
10238 (inherit java-geronimo-xbean-reflect)
10239 (name "java-geronimo-xbean-bundleutils")
10240 (arguments
10241 `(#:jar-name "geronimo-xbean-bundleutils.jar"
10242 #:source-dir "xbean-bundleutils/src/main/java"
10243 #:test-dir "xbean-bundleutils/src/test"
10244 #:phases
10245 (modify-phases %standard-phases
10246 (add-before 'build 'fix-java
10247 (lambda _
10248 ;; We use a more recent version of osgi, so this file requires
10249 ;; more interface method implementations.
10250 (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java"
10251 (("import org.osgi.framework.ServiceRegistration;")
10252 "import org.osgi.framework.ServiceRegistration;
10253 import org.osgi.framework.ServiceFactory;
10254 import java.util.Collection;
10255 import org.osgi.framework.ServiceObjects;")
10256 (("public Bundle getBundle\\(\\)")
10257 "@Override
10258 public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) {
10259 throw new UnsupportedOperationException();
10260 }
10261 @Override
10262 public <S> ServiceRegistration<S> registerService(Class<S> clazz,
10263 ServiceFactory<S> factory, Dictionary<String, ?> properties) {
10264 throw new UnsupportedOperationException();
10265 }
10266 public Bundle getBundle()"))
10267 #t)))))
10268 (inputs
10269 `(("java-slf4j" ,java-slf4j-api)
10270 ("java-asm" ,java-asm)
10271 ("java-osgi-framework" ,java-osgi-framework)
10272 ("java-eclipse-osgi" ,java-eclipse-osgi)
10273 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)))))
10274
10275 (define-public java-geronimo-xbean-asm-util
10276 (package
10277 (inherit java-geronimo-xbean-reflect)
10278 (name "java-geronimo-xbean-asm-util")
10279 (arguments
10280 `(#:jar-name "geronimo-xbean-asm-util.jar"
10281 #:source-dir "xbean-asm-util/src/main/java"
10282 #:tests? #f)); no tests
10283 (inputs
10284 `(("java-asm" ,java-asm)))
10285 (native-inputs '())))
10286
10287 (define-public java-geronimo-xbean-finder
10288 (package
10289 (inherit java-geronimo-xbean-reflect)
10290 (name "java-geronimo-xbean-finder")
10291 (arguments
10292 `(#:jar-name "geronimo-xbean-finder.jar"
10293 #:source-dir "xbean-finder/src/main/java"
10294 #:test-dir "xbean-finder/src/test"))
10295 (inputs
10296 `(("java-slf4j-api" ,java-slf4j-api)
10297 ("java-asm" ,java-asm)
10298 ("java-geronimo-xbean-bundleutils" ,java-geronimo-xbean-bundleutils)
10299 ("java-geronimo-xbean-asm-util" ,java-geronimo-xbean-asm-util)
10300 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)
10301 ("java-osgi-framework" ,java-osgi-framework)))
10302 (native-inputs
10303 `(("java-junit" ,java-junit)
10304 ("java-hamcrest-core" ,java-hamcrest-core)))))
10305
10306 (define-public java-gson
10307 (package
10308 (name "java-gson")
10309 (version "2.8.2")
10310 (source (origin
10311 (method url-fetch)
10312 (uri (string-append "https://github.com/google/gson/archive/"
10313 "gson-parent-" version ".tar.gz"))
10314 (sha256
10315 (base32
10316 "1j4qnp7v046q0k48c4kyf69sxaasx2h949d3cqwsm3kzxms3x0f9"))))
10317 (build-system ant-build-system)
10318 (arguments
10319 `(#:jar-name "gson.jar"
10320 #:source-dir "gson/src/main/java"
10321 #:test-dir "gson/src/test"))
10322 (native-inputs
10323 `(("java-junit" ,java-junit)
10324 ("java-hamcrest-core" ,java-hamcrest-core)))
10325 (home-page "https://github.com/google/gson")
10326 (synopsis "Java serialization/deserialization library from/to JSON")
10327 (description "Gson is a Java library that can be used to convert Java
10328 Objects into their JSON representation. It can also be used to convert a JSON
10329 string to an equivalent Java object. Gson can work with arbitrary Java objects
10330 including pre-existing objects that you do not have source-code of.")
10331 (license license:asl2.0)))
10332
10333 (define-public java-hawtjni
10334 (package
10335 (name "java-hawtjni")
10336 (version "1.15")
10337 (source (origin
10338 (method url-fetch)
10339 (uri (string-append "https://github.com/fusesource/hawtjni/archive/"
10340 "hawtjni-project-" version ".tar.gz"))
10341 (sha256
10342 (base32
10343 "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g"))))
10344 (build-system ant-build-system)
10345 (arguments
10346 `(#:jar-name "hawtjni.jar"
10347 #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java"
10348 #:tests? #f; no tests
10349 #:phases
10350 (modify-phases %standard-phases
10351 (add-before 'build 'build-native
10352 (lambda* (#:key inputs #:allow-other-keys)
10353 (let ((include (string-append "-I" (assoc-ref inputs "jdk") "/include/linux")))
10354 (with-directory-excursion "hawtjni-generator/src/main/resources/"
10355 (invoke "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o"
10356 "-fPIC" "-O2" include)
10357 (invoke "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o"
10358 "-fPIC" "-O2" include)
10359 (invoke "gcc" "-o" "libhawtjni.so" "-shared"
10360 "hawtjni.o" "hawtjni-callback.o")))
10361 #t))
10362 (add-after 'install 'install-native
10363 (lambda* (#:key outputs #:allow-other-keys)
10364 (let* ((out (assoc-ref outputs "out"))
10365 (lib (string-append out "/lib"))
10366 (inc (string-append out "/include")))
10367 (with-directory-excursion "hawtjni-generator/src/main/resources/"
10368 (install-file "libhawtjni.so" lib)
10369 (install-file "hawtjni.h" inc)))
10370 #t)))))
10371 (inputs
10372 `(("java-commons-cli" ,java-commons-cli)
10373 ("java-asm" ,java-asm)
10374 ("java-geronimo-xbean-finder" ,java-geronimo-xbean-finder)))
10375 (home-page "https://fusesource.github.io/hawtjni/")
10376 (synopsis "JNI code generator")
10377 (description "HawtJNI is a code generator that produces the JNI code needed
10378 to implement Java native methods. It is based on the jnigen code generator
10379 that is part of the SWT Tools project.")
10380 (license license:asl2.0)))
10381
10382 (define-public java-jansi-native
10383 (package
10384 (name "java-jansi-native")
10385 (version "1.7")
10386 (source (origin
10387 (method url-fetch)
10388 (uri (string-append "https://github.com/fusesource/jansi-native/"
10389 "archive/jansi-native-" version ".tar.gz"))
10390 (sha256
10391 (base32
10392 "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf"))))
10393 (build-system ant-build-system)
10394 (arguments
10395 `(#:jar-name "jansi-native.jar"
10396 #:source-dir "src/main/java"
10397 #:tests? #f; no tests
10398 #:phases
10399 (modify-phases %standard-phases
10400 (add-before 'build 'build-native
10401 (lambda* (#:key inputs #:allow-other-keys)
10402 ;; there are more required files for windows in windows/
10403 (with-directory-excursion "src/main/native-package/src"
10404 (substitute* "jansi_ttyname.c"
10405 (("#include \"jansi_.*") ""))
10406 (invoke "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o"
10407 (string-append "-I" (assoc-ref inputs "java-hawtjni")
10408 "/include")
10409 (string-append "-I" (assoc-ref inputs "jdk")
10410 "/include/linux")
10411 "-fPIC" "-O2")
10412 (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o"))))
10413 (add-before 'build 'install-native
10414 (lambda _
10415 (let ((dir (string-append "build/classes/META-INF/native/"
10416 ,(match (%current-system)
10417 ((or "i686-linux" "armhf-linux")
10418 "linux32")
10419 ((or "x86_64-linux" "aarch64-linux"
10420 "mips64el-linux")
10421 "linux64")
10422 (_ "unknown-kernel")))))
10423 (install-file "src/main/native-package/src/libjansi.so" dir))
10424 #t))
10425 (add-after 'install 'install-native
10426 (lambda* (#:key outputs #:allow-other-keys)
10427 (install-file "src/main/native-package/src/jansi.h"
10428 (string-append (assoc-ref outputs "out") "/include"))
10429 #t)))))
10430 (inputs
10431 `(("java-hawtjni" ,java-hawtjni)))
10432 (home-page "https://fusesource.github.io/jansi/")
10433 (synopsis "Native library for jansi")
10434 (description "This package provides the native library for jansi, a small
10435 Java library that allows you to use ANSI escape sequences to format your
10436 console output.")
10437 (license license:asl2.0)))
10438
10439 (define-public java-jansi
10440 (package
10441 (name "java-jansi")
10442 (version "1.16")
10443 (source (origin
10444 (method url-fetch)
10445 (uri (string-append "https://github.com/fusesource/jansi/archive/"
10446 "jansi-project-" version ".tar.gz"))
10447 (sha256
10448 (base32
10449 "11kh3144i3fzp21dpy8zg52mjmsr214k7km9p8ly0rqk2px0qq2z"))))
10450 (build-system ant-build-system)
10451 (arguments
10452 `(#:jar-name "jansi.jar"
10453 #:source-dir "jansi/src/main/java"
10454 #:test-dir "jansi/src/test"
10455 #:phases
10456 (modify-phases %standard-phases
10457 (add-after 'check 'clear-term
10458 (lambda _
10459 (invoke "echo" "-e" "\\e[0m"))))))
10460 (inputs
10461 `(("java-jansi-native" ,java-jansi-native)))
10462 (native-inputs
10463 `(("java-junit" ,java-junit)
10464 ("java-hamcrest-core" ,java-hamcrest-core)))
10465 (home-page "https://fusesource.github.io/jansi/")
10466 (synopsis "Portable ANSI escape sequences")
10467 (description "Jansi is a Java library that allows you to use ANSI escape
10468 sequences to format your console output which works on every platform.")
10469 (license license:asl2.0)))
10470
10471 (define-public java-jboss-el-api-spec
10472 (package
10473 (name "java-jboss-el-api-spec")
10474 (version "3.0")
10475 (source (origin
10476 (method url-fetch)
10477 (uri (string-append "https://github.com/jboss/jboss-el-api_spec/"
10478 "archive/jboss-el-api_" version
10479 "_spec-1.0.7.Final.tar.gz"))
10480 (sha256
10481 (base32
10482 "1j45ljxalwlibxl7g7iv952sjxkw275m8vyxxij8l6wdd5pf0pdh"))))
10483 (build-system ant-build-system)
10484 (arguments
10485 `(#:jar-name "java-jboss-el-api_spec.jar"
10486 #:jdk ,icedtea-8))
10487 (inputs
10488 `(("java-junit" ,java-junit)))
10489 (home-page "https://github.com/jboss/jboss-el-api_spec")
10490 (synopsis "JSR-341 expression language 3.0 API")
10491 (description "This package contains an implementation of the JSR-341
10492 specification for the expression language 3.0. It implements an expression
10493 language inspired by ECMAScript and XPath. This language is used with
10494 JavaServer Pages (JSP).")
10495 ;; Either GPL2 only or CDDL.
10496 (license (list license:gpl2 license:cddl1.1))))
10497
10498 (define-public java-jboss-interceptors-api-spec
10499 (package
10500 (name "java-jboss-interceptors-api-spec")
10501 (version "1.2")
10502 (source (origin
10503 (method url-fetch)
10504 (uri (string-append "https://github.com/jboss/jboss-interceptors-api_spec/"
10505 "archive/jboss-interceptors-api_" version
10506 "_spec-1.0.0.Final.tar.gz"))
10507 (sha256
10508 (base32
10509 "0wv8x0jp9a5qxlrgkhb5jdk2gr6vi87b4j4kjb8ryxiy9gn8g51z"))))
10510 (build-system ant-build-system)
10511 (arguments
10512 `(#:jar-name "java-jboss-interceptors-api_spec.jar"
10513 #:jdk ,icedtea-8
10514 #:source-dir "."
10515 #:tests? #f)); no tests
10516 (home-page "https://github.com/jboss/jboss-interceptors-api_spec")
10517 (synopsis "Interceptors 1.2 API classes from JSR 318")
10518 (description "Java-jboss-interceptors-api-spec implements the Interceptors
10519 API. Interceptors are used to interpose on business method invocations and
10520 specific events.")
10521 ;; Either GPL2 only or CDDL.
10522 (license (list license:gpl2 license:cddl1.1))))
10523
10524 (define-public java-cdi-api
10525 (package
10526 (name "java-cdi-api")
10527 (version "2.0")
10528 (source (origin
10529 (method url-fetch)
10530 (uri (string-append "https://github.com/cdi-spec/cdi/archive/"
10531 version ".tar.gz"))
10532 (file-name (string-append name "-" version ".tar.gz"))
10533 (sha256
10534 (base32
10535 "1iv8b8bp07c5kmqic14jsr868vycjv4qv02lf3pkgp9z21mnfg5y"))))
10536 (build-system ant-build-system)
10537 (arguments
10538 `(#:source-dir "api/src/main/java"
10539 #:jar-name "java-cdi-api.jar"
10540 #:test-dir "api/src/test"
10541 #:jdk ,icedtea-8
10542 #:tests? #f)); Tests fail because we don't have a CDI provider yet
10543 (inputs
10544 `(("java-javax-inject" ,java-javax-inject)
10545 ("java-jboss-el-api-spec" ,java-jboss-el-api-spec)
10546 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)))
10547 (native-inputs
10548 `(("java-testng" ,java-testng)
10549 ("java-hamcrest-core" ,java-hamcrest-core)))
10550 (home-page "http://cdi-spec.org/")
10551 (synopsis "Contexts and Dependency Injection APIs")
10552 (description "Java-cdi-api contains the required APIs for Contexts and
10553 Dependency Injection (CDI).")
10554 (license license:asl2.0)))
10555
10556 (define-public java-joda-convert
10557 (package
10558 (name "java-joda-convert")
10559 (version "1.9.2")
10560 (source (origin
10561 (method url-fetch)
10562 (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v"
10563 version ".tar.gz"))
10564 (file-name (string-append name "-" version ".tar.gz"))
10565 (sha256
10566 (base32
10567 "0vp346xz7dh9br4q7xazhc7hvzf76a6hf95fki9bg67q5jr0kjh7"))))
10568 (build-system ant-build-system)
10569 (arguments
10570 `(#:jar-name (string-append ,name "-" ,version ".jar")
10571 #:source-dir "src/main/java"
10572 #:test-include (list "**/Test*.java")
10573 ;; Contains only interfaces and base classes (no test)
10574 #:test-exclude (list "**/test*/**.java")))
10575 (inputs
10576 `(("java-guava" ,java-guava)))
10577 (native-inputs
10578 `(("java-junit" ,java-junit)
10579 ("java-hamcrest-core" ,java-hamcrest-core)))
10580 (home-page "https://www.joda.org/joda-convert/")
10581 (synopsis "Conversion between Objects and Strings")
10582 (description "Joda-Convert provides a small set of classes to aid
10583 conversion between Objects and Strings. It is not intended to tackle the
10584 wider problem of Object to Object transformation.")
10585 (license license:asl2.0)))
10586
10587 (define-public java-joda-time
10588 (package
10589 (name "java-joda-time")
10590 (version "2.9.9")
10591 (source (origin
10592 (method url-fetch)
10593 (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v"
10594 version ".tar.gz"))
10595 (file-name (string-append name "-" version ".tar.gz"))
10596 (sha256
10597 (base32
10598 "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1"))))
10599 (build-system ant-build-system)
10600 (arguments
10601 `(#:jar-name "java-joda-time.jar"
10602 #:source-dir "src/main/java"
10603 #:test-include (list "**/Test*.java")
10604 ;; There is no runnable test in these files
10605 #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java")
10606 #:phases
10607 (modify-phases %standard-phases
10608 (add-after 'build 'build-resources
10609 (lambda _
10610 (mkdir-p "build/classes/org/joda/time/tz/data")
10611 (mkdir-p "build/classes/org/joda/time/format")
10612 ;; This will produce the following exception:
10613 ;; java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap"
10614 ;; which is normal, because it doesn't exist yet. It still generates
10615 ;; the same file as in the binary one can find on maven.
10616 (invoke "java" "-cp"
10617 (string-append "build/classes:" (getenv "CLASSPATH"))
10618 "org.joda.time.tz.ZoneInfoCompiler"
10619 "-src" "src/main/java/org/joda/time/tz/src"
10620 "-dst" "build/classes/org/joda/time/tz/data"
10621 "africa" "antarctica" "asia" "australasia"
10622 "europe" "northamerica" "southamerica"
10623 "pacificnew" "etcetera" "backward" "systemv")
10624 (for-each (lambda (f)
10625 (copy-file f (string-append
10626 "build/classes/org/joda/time/format/"
10627 (basename f))))
10628 (find-files "src/main/java/org/joda/time/format" ".*.properties"))
10629 #t))
10630 (add-before 'install 'regenerate-jar
10631 (lambda _
10632 ;; We need to regenerate the jar file to add generated data.
10633 (delete-file "build/jar/java-joda-time.jar")
10634 (invoke "ant" "jar")))
10635 (add-before 'check 'copy-test-resources
10636 (lambda _
10637 (mkdir-p "build/test-classes/org/joda/time/tz/data")
10638 (copy-file "src/test/resources/tzdata/ZoneInfoMap"
10639 "build/test-classes/org/joda/time/tz/data/ZoneInfoMap")
10640 (copy-recursively "src/test/resources" "build/test-classes")
10641 #t)))))
10642 (inputs
10643 `(("java-joda-convert" ,java-joda-convert)))
10644 (native-inputs
10645 `(("java-junit" ,java-junit)
10646 ("java-hamcrest-core" ,java-hamcrest-core)
10647 ("tzdata" ,tzdata)))
10648 (home-page "https://www.joda.org/joda-time/")
10649 (synopsis "Replacement for the Java date and time classes")
10650 (description "Joda-Time is a replacement for the Java date and time
10651 classes prior to Java SE 8.")
10652 (license license:asl2.0)))
10653
10654 (define-public java-xerces
10655 (package
10656 (name "java-xerces")
10657 (version "2.12.1")
10658 (source
10659 (origin
10660 (method url-fetch)
10661 (uri (string-append "mirror://apache/xerces/j/source/"
10662 "Xerces-J-src." version ".tar.gz"))
10663 (sha256
10664 (base32 "0494kq36gw3nah19ifb720vwxbpg4ww0k6m3zq6wyanw6a083p6s"))
10665 (patches (search-patches
10666 "java-xerces-xjavac_taskdef.patch"
10667 "java-xerces-build_dont_unzip.patch"
10668 "java-xerces-bootclasspath.patch"))))
10669 (build-system ant-build-system)
10670 (arguments
10671 `(#:tests? #f;; Test files are not present
10672 #:test-target "test"
10673 #:jdk ,icedtea-8
10674 #:phases
10675 (modify-phases %standard-phases
10676 (add-after 'unpack 'create-build.properties
10677 (lambda* (#:key inputs #:allow-other-keys)
10678 (let ((jaxp (assoc-ref inputs "java-jaxp"))
10679 (resolver (assoc-ref inputs "java-apache-xml-commons-resolver")))
10680 (with-output-to-file "build.properties"
10681 (lambda _
10682 (format #t
10683 "jar.jaxp = ~a/share/java/jaxp.jar~@
10684 jar.apis-ext = ~a/share/java/jaxp.jar~@
10685 jar.resolver = ~a/share/java/xml-resolver.jar~%"
10686 jaxp jaxp resolver)))
10687 ;; Make xerces use our version of jaxp in tests
10688 (substitute* "build.xml"
10689 (("xml-apis.jar")
10690 (string-append jaxp "/share/java/jaxp.jar"))
10691 (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}")
10692 "${jar.apis}")))
10693 #t))
10694 (replace 'install (install-jars "build")))))
10695 (inputs
10696 `(("java-apache-xml-commons-resolver" ,java-apache-xml-commons-resolver)
10697 ("java-jaxp" ,java-jaxp)))
10698 (home-page "https://xerces.apache.org/xerces2-j/")
10699 (synopsis "Validating XML parser for Java with DOM level 3 support")
10700 (description "The Xerces2 Java parser is the reference implementation of
10701 XNI, the Xerces Native Interface, and also a fully conforming XML Schema
10702 processor.
10703
10704 Xerces2-J supports the following standards and APIs:
10705
10706 @itemize
10707 @item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation
10708 @item Namespaces in XML Recommendation
10709 @item Document Object Model (DOM) Level 2 Core, Events, and Traversal and
10710 Range Recommendations
10711 @item Simple API for XML (SAX) 2.0.1 Core and Extension
10712 @item Java APIs for XML Processing (JAXP) 1.2.01
10713 @item XML Schema 1.0 Structures and Datatypes Recommendations
10714 @item Experimental implementation of the Document Object Model (DOM) Level 3
10715 Core and Load/Save Working Drafts
10716 @item Provides a partial implementation of the XML Inclusions (XInclude) W3C
10717 Candidate Recommendation
10718 @end itemize
10719
10720 Xerces is now able to parse documents written according to the XML 1.1
10721 Candidate Recommendation, except that it does not yet provide an option to
10722 enable normalization checking as described in section 2.13 of this
10723 specification. It also handles namespaces according to the XML Namespaces 1.1
10724 Candidate Recommendation, and will correctly serialize XML 1.1 documents if
10725 the DOM level 3 load/save API's are in use.")
10726 (license license:asl2.0)))
10727
10728 (define-public java-jakarta-regexp
10729 (package
10730 (name "java-jakarta-regexp")
10731 (version "1.5")
10732 (source
10733 (origin
10734 (method url-fetch)
10735 (uri (string-append
10736 "https://archive.apache.org/dist/jakarta/regexp/jakarta-regexp-"
10737 version ".tar.gz"))
10738 (sha256
10739 (base32
10740 "0zg9rmyif48dck0cv6ynpxv23mmcsx265am1fnnxss7brgw0ms3r"))))
10741 (build-system ant-build-system)
10742 (arguments
10743 `(#:test-target "test"
10744 #:phases
10745 (modify-phases %standard-phases
10746 (replace 'install
10747 (lambda* (#:key outputs #:allow-other-keys)
10748 (let* ((out (assoc-ref outputs "out"))
10749 (out-share (string-append out "/share/java")))
10750 (mkdir-p out-share)
10751 (for-each (lambda (name)
10752 (install-file name out-share))
10753 (find-files "build" "^jakarta-regexp-.*\\.jar$"))
10754 #t))))))
10755 (home-page "https://attic.apache.org/projects/jakarta-regexp.html")
10756 (synopsis "Regular expression parser generator for Java.")
10757 (description "@code{jakarta-regexp} is an old regular expression parser
10758 generator for Java.")
10759 (license license:asl2.0)))
10760
10761 (define-public java-jline
10762 (package
10763 (name "java-jline")
10764 (version "1.0")
10765 (source (origin
10766 (method url-fetch)
10767 (uri (string-append "https://github.com/jline/jline1/archive/jline-"
10768 version ".tar.gz"))
10769 (sha256
10770 (base32
10771 "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir"))))
10772 (build-system ant-build-system)
10773 (arguments
10774 `(#:jar-name "jline.jar"
10775 #:source-dir "src/main/java"
10776 #:test-dir "src/test"
10777 #:phases
10778 (modify-phases %standard-phases
10779 (add-before 'build 'copy-resources
10780 (lambda _
10781 (copy-recursively "src/main/resources" "build/classes")
10782 #t)))))
10783 (native-inputs
10784 `(("java-junit" ,java-junit)))
10785 (home-page "https://jline.github.io")
10786 (synopsis "Console input handling library")
10787 (description "JLine is a Java library for handling console input. It is
10788 similar in functionality to BSD editline and GNU readline but with additional
10789 features that bring it on par with the Z shell line editor.")
10790 (license license:bsd-3)))
10791
10792 (define-public java-jline-2
10793 (package
10794 (inherit java-jline)
10795 (version "2.14.5")
10796 (source (origin
10797 (method url-fetch)
10798 (uri (string-append "https://github.com/jline/jline2/archive/jline-"
10799 version ".tar.gz"))
10800 (sha256
10801 (base32
10802 "1c6qa26mf0viw8hg4jnv72s7i1qb1gh1l8rrzcdvqhqhx82rkdlf"))))
10803 (arguments
10804 `(#:jdk ,icedtea-8
10805 ,@(package-arguments java-jline)))
10806 (inputs
10807 `(("java-jansi" ,java-jansi)
10808 ("java-jansi-native" ,java-jansi-native)))
10809 (native-inputs
10810 `(("java-powermock-modules-junit4" ,java-powermock-modules-junit4)
10811 ("java-powermock-modules-junit4-common" ,java-powermock-modules-junit4-common)
10812 ("java-powermock-api-easymock" ,java-powermock-api-easymock)
10813 ("java-powermock-api-support" ,java-powermock-api-support)
10814 ("java-powermock-core" ,java-powermock-core)
10815 ("java-powermock-reflect" ,java-powermock-reflect)
10816 ("java-easymock" ,java-easymock)
10817 ("java-jboss-javassist" ,java-jboss-javassist)
10818 ("java-objenesis" ,java-objenesis)
10819 ("java-asm" ,java-asm)
10820 ("java-hamcrest-core" ,java-hamcrest-core)
10821 ("java-cglib" ,java-cglib)
10822 ("java-junit" ,java-junit)
10823 ("java-hawtjni" ,java-hawtjni)))))
10824
10825 (define-public java-xmlunit
10826 (package
10827 (name "java-xmlunit")
10828 (version "2.5.1")
10829 (source (origin
10830 (method url-fetch)
10831 (uri (string-append "https://github.com/xmlunit/xmlunit/archive/v"
10832 version ".tar.gz"))
10833 (file-name (string-append name "-" version ".tar.gz"))
10834 (sha256
10835 (base32
10836 "035rivlnmwhfqj0fzviciv0bkh1h95ps1iwnh2kjcvdbk5nccm4z"))))
10837 (build-system ant-build-system)
10838 (arguments
10839 `(#:jar-name "java-xmlunit.jar"
10840 #:source-dir "xmlunit-core/src/main/java"
10841 #:test-dir "xmlunit-core/src/test"
10842 #:phases
10843 (modify-phases %standard-phases
10844 (add-before 'check 'copy-test-resources
10845 (lambda* (#:key inputs #:allow-other-keys)
10846 (copy-recursively (assoc-ref inputs "resources") "../test-resources")
10847 #t)))))
10848 (native-inputs
10849 `(("java-junit" ,java-junit)
10850 ("java-mockito-1" ,java-mockito-1)
10851 ("java-hamcrest-all" ,java-hamcrest-all)
10852 ("java-objenesis" ,java-objenesis)
10853 ("java-asm" ,java-asm)
10854 ("java-cglib" ,java-cglib)
10855 ("resources"
10856 ,(origin
10857 (method git-fetch)
10858 (uri (git-reference
10859 (url "https://github.com/xmlunit/test-resources")
10860 (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec")))
10861 (file-name "java-xmlunit-test-resources")
10862 (sha256
10863 (base32
10864 "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr"))))))
10865 (home-page "https://www.xmlunit.org/")
10866 (synopsis "XML output testing")
10867 (description "XMLUnit provides you with the tools to verify the XML you
10868 emit is the one you want to create. It provides helpers to validate against
10869 an XML Schema, assert the values of XPath queries or compare XML documents
10870 against expected outcomes.")
10871 (license license:asl2.0)))
10872
10873 (define-public java-xmlunit-legacy
10874 (package
10875 (inherit java-xmlunit)
10876 (name "java-xmlunit-legacy")
10877 (arguments
10878 `(#:jar-name "java-xmlunit-legacy.jar"
10879 #:source-dir "xmlunit-legacy/src/main/java"
10880 #:test-dir "xmlunit-legacy/src/test"))
10881 (inputs
10882 `(("java-xmlunit" ,java-xmlunit)
10883 ("java-junit" ,java-junit)))
10884 (native-inputs
10885 `(("java-mockito-1" ,java-mockito-1)))))
10886
10887 (define-public java-xmlunit-matchers
10888 (package
10889 (inherit java-xmlunit)
10890 (name "java-xmlunit-matchers")
10891 (arguments
10892 `(#:jar-name "java-xmlunit-matchers.jar"
10893 #:source-dir "xmlunit-matchers/src/main/java"
10894 #:test-dir "xmlunit-matchers/src/test"
10895 #:test-exclude
10896 ;; Cannot open xsd for http://www.xmlunit.org/test-support/Book.xsd
10897 (list "**/ValidationMatcherTest.java")
10898 #:phases
10899 (modify-phases %standard-phases
10900 (add-before 'build 'copy-test-class
10901 (lambda _
10902 (copy-file "xmlunit-core/src/test/java/org/xmlunit/TestResources.java"
10903 "xmlunit-matchers/src/test/java/org/xmlunit/TestResources.java")
10904 #t))
10905 (add-before 'build 'fix-test-resources-path
10906 (lambda _
10907 (substitute* (find-files "xmlunit-matchers/src/test" ".*.java")
10908 (("../test-resources") "test-resources"))
10909 #t))
10910 (add-before 'check 'copy-test-resources
10911 (lambda* (#:key inputs #:allow-other-keys)
10912 (copy-recursively (assoc-ref inputs "resources") "test-resources")
10913 #t)))))
10914 (inputs
10915 `(("java-xmlunit" ,java-xmlunit)
10916 ("java-junit" ,java-junit)))))
10917
10918 (define-public java-openchart2
10919 (package
10920 (name "java-openchart2")
10921 (version "1.4.3")
10922 (source (origin
10923 (method url-fetch)
10924 (uri (string-append "http://download.approximatrix.com/openchart2/"
10925 "openchart2-" version ".source.zip"))
10926 (sha256
10927 (base32
10928 "1xq96zm5r02n1blja0072jmmsifmxc40lbyfbnmcnr6mw42frh4g"))))
10929 (build-system ant-build-system)
10930 (arguments
10931 `(#:test-target "test"
10932 #:phases
10933 (modify-phases %standard-phases
10934 (add-after 'unpack 'fix-junit-errors
10935 (lambda _
10936 (with-directory-excursion "unittest/src/com/approximatrix/charting/"
10937 (substitute* '("coordsystem/ticklocator/NumericXTickLocatorTest.java"
10938 "coordsystem/ticklocator/NumericYTickLocatorTest.java"
10939 "coordsystem/ticklocator/ObjectXTickLocatorTest.java"
10940 "model/DefaultChartDataModelConstraintsTest.java"
10941 "model/MultiScatterDataModelConstraintsTest.java"
10942 "model/threedimensional/DotPlotDataModelConstraintsTest.java")
10943 (("(assertEquals[^;]+);" before _)
10944 (string-append (string-drop-right before 2) ", 1E-6);"))))
10945 #t))
10946 (replace 'install (install-jars ".")))))
10947 (native-inputs
10948 `(("unzip" ,unzip)
10949 ("java-junit" ,java-junit)
10950 ("java-hamcrest-core" ,java-hamcrest-core)))
10951 (home-page "https://approximatrix.com/products/openchart2/")
10952 (synopsis "Simple plotting for Java")
10953 (description "Openchart2 provides a simple, yet powerful, interface for
10954 Java programmers to create two-dimensional charts and plots. The library
10955 features an assortment of graph styles, including advanced scatter plots, bar
10956 graphs, and pie charts.")
10957 (license license:lgpl2.1+)))
10958
10959 (define-public java-commons-httpclient
10960 (package
10961 (name "java-commons-httpclient")
10962 (version "3.1")
10963 (source (origin
10964 (method url-fetch)
10965 (uri (string-append "mirror://apache/httpcomponents/"
10966 "commons-httpclient/source/commons-httpclient-"
10967 version "-src.tar.gz"))
10968 (sha256
10969 (base32
10970 "1wlpn3cfy3d4inxy6g7wxcsa8p7sshn6aldk9y4ia3lb879rd97r"))))
10971 (build-system ant-build-system)
10972 (arguments
10973 `(#:build-target "compile"
10974 #:test-target "test"
10975 #:tests? #f; requires junit-textui (junit 3)
10976 #:phases
10977 (modify-phases %standard-phases
10978 (add-before 'build 'fix-accent
10979 (lambda _
10980 (for-each (lambda (file)
10981 (with-fluids ((%default-port-encoding "ISO-8859-1"))
10982 (substitute* file
10983 (("\\* @author Ortwin .*") "* @author Ortwin Glueck\n"))))
10984 '("src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java"
10985 "src/examples/TrivialApp.java" "src/examples/ClientApp.java"
10986 "src/test/org/apache/commons/httpclient/TestHttps.java"
10987 "src/test/org/apache/commons/httpclient/TestURIUtil2.java"))
10988 #t))
10989 (replace 'install
10990 (lambda* (#:key outputs #:allow-other-keys)
10991 (invoke "ant" "dist"
10992 (string-append "-Ddist.home=" (assoc-ref outputs "out")
10993 "/share/java"))
10994 #t)))))
10995 (propagated-inputs
10996 `(("java-commons-logging" ,java-commons-logging-minimal)
10997 ("java-commons-codec" ,java-commons-codec)))
10998 (home-page "https://hc.apache.org")
10999 (synopsis "HTTP/1.1 compliant HTTP agent implementation")
11000 (description "This package contains an HTTP/1.1 compliant HTTP agent
11001 implementation. It also provides reusable components for client-side
11002 authentication, HTTP state management, and HTTP connection management.")
11003 (license license:asl2.0)))
11004
11005 (define-public java-commons-vfs
11006 (package
11007 (name "java-commons-vfs")
11008 (version "2.2")
11009 (source (origin
11010 (method url-fetch)
11011 (uri (string-append "mirror://apache/commons/vfs/source/"
11012 "commons-vfs2-distribution-" version "-src.tar.gz"))
11013 (file-name (string-append name "-" version ".tar.gz"))
11014 (sha256
11015 (base32
11016 "1cnq1iaghbp4cslpnvwbp83i5v234x87irssqynhwpfgw7caf1s3"))
11017 (modules '((guix build utils)))
11018 (snippet
11019 '(begin
11020 (for-each delete-file
11021 (find-files "." "\\.jar$"))
11022 #t))))
11023 (build-system ant-build-system)
11024 (arguments
11025 `(#:jar-name "commons-vfs.jar"
11026 #:source-dir "commons-vfs2/src/main/java"
11027 #:test-dir "commons-vfs2/src/test"
11028 ; FIXME: tests depend on many things: apache sshd, hadoop, ftpserver, ...
11029 #:tests? #f
11030 #:phases
11031 (modify-phases %standard-phases
11032 (add-before 'build 'remove-hadoop-and-webdav
11033 ; Remove these files as they are not required and depend on difficult
11034 ; packages.
11035 (lambda _
11036 (for-each delete-file-recursively
11037 '("commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/webdav"
11038 "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs"))
11039 #t)))))
11040 (inputs
11041 `(("java-commons-collections4" ,java-commons-collections4)
11042 ("java-commons-compress" ,java-commons-compress)
11043 ("java-commons-httpclient" ,java-commons-httpclient)
11044 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
11045 ("java-commons-net" ,java-commons-net)
11046 ("java-jsch" ,java-jsch)))
11047 (home-page "https://commons.apache.org/proper/commons-vfs/")
11048 (synopsis "Java file system library")
11049 (description "Commons VFS provides a single API for accessing various
11050 different file systems. It presents a uniform view of the files from various
11051 different sources, such as the files on local disk, on an HTTP server, or
11052 inside a Zip archive.")
11053 (license license:asl2.0)))
11054
11055 (define-public java-jakarta-oro
11056 (package
11057 (name "java-jakarta-oro")
11058 (version "2.0.8")
11059 (source (origin
11060 (method url-fetch)
11061 (uri (string-append "mirror://apache/jakarta/oro/"
11062 "jakarta-oro-" version ".tar.gz"))
11063 (sha256
11064 (base32
11065 "0rpmnsskiwmsy8r0sckz5n5dbvh3vkxx8hpm177c754r8xy3qksc"))
11066 (modules '((guix build utils)))
11067 (snippet
11068 `(begin
11069 (delete-file (string-append "jakarta-oro-" ,version ".jar"))
11070 #t))))
11071 (build-system ant-build-system)
11072 (arguments
11073 `(#:build-target "package"
11074 #:tests? #f; tests are run as part of the build process
11075 #:phases
11076 (modify-phases %standard-phases
11077 (replace 'install
11078 (install-jars ,(string-append "jakarta-oro-" version))))))
11079 (home-page "https://jakarta.apache.org/oro/")
11080 (synopsis "Text-processing for Java")
11081 (description "The Jakarta-ORO Java classes are a set of text-processing
11082 Java classes that provide Perl5 compatible regular expressions, AWK-like
11083 regular expressions, glob expressions, and utility classes for performing
11084 substitutions, splits, filtering filenames, etc. This library is the successor
11085 of the OROMatcher, AwkTools, PerlTools, and TextTools libraries originally
11086 from ORO, Inc.")
11087 (license license:asl1.1)))
11088
11089 (define-public java-native-access
11090 (package
11091 (name "java-native-access")
11092 (version "4.5.1")
11093 (source (origin
11094 (method url-fetch)
11095 (uri (string-append "https://github.com/java-native-access/jna/"
11096 "archive/" version ".tar.gz"))
11097 (file-name (string-append name "-" version ".tar.gz"))
11098 (sha256
11099 (base32
11100 "0zrpzkib6b905i018a9pqlzkqinphywr6y4jwv6mwp63jjqvqkd9"))
11101 (modules '((guix build utils)))
11102 (snippet
11103 `(begin
11104 (for-each delete-file (find-files "." ".*.jar"))
11105 (delete-file-recursively "native/libffi")
11106 (delete-file-recursively "dist")
11107 #t))))
11108 (build-system ant-build-system)
11109 (arguments
11110 `(#:tests? #f; FIXME: tests require reflections.jar
11111 #:test-target "test"
11112 #:make-flags (list "-Ddynlink.native=true")
11113 #:phases
11114 (modify-phases %standard-phases
11115 (add-before 'build 'fix-build.xml
11116 (lambda* (#:key inputs #:allow-other-keys)
11117 (substitute* "build.xml"
11118 ;; Since we removed the bundled ant.jar, give the correct path
11119 (("lib/ant.jar") (string-append (assoc-ref inputs "ant") "/lib/ant.jar"))
11120 ;; We removed generated native libraries. We can only rebuild one
11121 ;; so don't fail if we can't find a native library for another architecture.
11122 (("zipfileset") "zipfileset erroronmissingarchive=\"false\""))
11123 ;; Copy test dependencies
11124 (copy-file (car (find-files (assoc-ref inputs "java-junit") "jar$"))
11125 "lib/junit.jar")
11126 (copy-file (car (find-files (assoc-ref inputs "java-hamcrest-core")
11127 "jar$"))
11128 "lib/hamcrest-core.jar")
11129 ;; FIXME: once reflections.jar is built, copy it to lib/test.
11130 #t))
11131 (add-before 'build 'build-native
11132 (lambda _
11133 (invoke "ant" "-Ddynlink.native=true" "native")
11134 #t))
11135 (replace 'install
11136 (install-jars "build")))))
11137 (inputs
11138 `(("libffi" ,libffi)
11139 ("libx11" ,libx11)
11140 ("libxt" ,libxt)))
11141 (native-inputs
11142 `(("java-junit" ,java-junit)
11143 ("java-hamcrest-core" ,java-hamcrest-core)))
11144 (home-page "https://github.com/java-native-access/jna")
11145 (synopsis "Access to native shared libraries from Java")
11146 (description "JNA provides Java programs easy access to native shared
11147 libraries without writing anything but Java code - no JNI or native code is
11148 required. JNA allows you to call directly into native functions using natural
11149 Java method invocation.")
11150 ;; Java Native Access project (JNA) is dual-licensed under 2
11151 ;; alternative Free licenses: LGPL 2.1 or later and Apache License 2.0.
11152 (license (list
11153 license:asl2.0
11154 license:lgpl2.1+))))
11155
11156 (define-public java-native-access-platform
11157 (package
11158 (inherit java-native-access)
11159 (name "java-native-access-platform")
11160 (arguments
11161 `(#:test-target "test"
11162 #:tests? #f; require jna-test.jar
11163 #:phases
11164 (modify-phases %standard-phases
11165 (add-before 'build 'chdir
11166 (lambda _
11167 (chdir "contrib/platform")
11168 #t))
11169 (add-after 'chdir 'fix-ant
11170 (lambda* (#:key inputs #:allow-other-keys)
11171 (substitute* "nbproject/project.properties"
11172 (("../../build/jna.jar")
11173 (string-append (assoc-ref inputs "java-native-access")
11174 "/share/java/jna.jar"))
11175 (("../../lib/hamcrest-core-.*.jar")
11176 (car (find-files (assoc-ref inputs "java-hamcrest-core")
11177 "jar$")))
11178 (("../../lib/junit.jar")
11179 (car (find-files (assoc-ref inputs "java-junit")
11180 "jar$"))))
11181 #t))
11182 (replace 'install
11183 (install-jars "dist")))))
11184 (inputs
11185 `(("java-native-access" ,java-native-access)))
11186 (synopsis "Cross-platform mappings for jna")
11187 (description "java-native-access-platfrom has cross-platform mappings
11188 and mappings for a number of commonly used platform functions, including a
11189 large number of Win32 mappings as well as a set of utility classes that
11190 simplify native access.")))
11191
11192 (define-public java-jsch-agentproxy-core
11193 (package
11194 (name "java-jsch-agentproxy-core")
11195 (version "0.0.8")
11196 (source (origin
11197 (method url-fetch)
11198 (uri (string-append "https://github.com/ymnk/jsch-agent-proxy/archive/"
11199 version ".tar.gz"))
11200 (file-name (string-append name "-" version ".tar.gz"))
11201 (sha256
11202 (base32
11203 "02iqg6jbc1kxvfzqcg6wy9ygqxfm82bw5rf6vnswqy4y572niz4q"))))
11204 (build-system ant-build-system)
11205 (arguments
11206 `(#:jar-name "jsch-agentproxy-core.jar"
11207 #:source-dir "jsch-agent-proxy-core/src/main/java"
11208 #:tests? #f)); no tests
11209 (home-page "https://github.com/ymnk/jsch-agent-proxy")
11210 (synopsis "Core component of the proxy to ssh-agent and Pageant in Java")
11211 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
11212 and Pageant included Putty. It will be easily integrated into JSch, and users
11213 will be allowed to use these programs for authentication.")
11214 (license license:bsd-3)))
11215
11216 (define-public java-jsch-agentproxy-sshagent
11217 (package
11218 (inherit java-jsch-agentproxy-core)
11219 (name "java-jsch-agentproxy-sshagent")
11220 (arguments
11221 `(#:jar-name "jsch-agentproxy-sshagent.jar"
11222 #:source-dir "jsch-agent-proxy-sshagent/src/main/java"
11223 #:tests? #f)); no tests
11224 (inputs
11225 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
11226 (synopsis "Proxy to ssh-agent")
11227 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
11228 and Pageant included in Putty. This component contains the code for a proxy to
11229 ssh-agent.")))
11230
11231 (define-public java-jsch-agentproxy-usocket-jna
11232 (package
11233 (inherit java-jsch-agentproxy-core)
11234 (name "java-jsch-agentproxy-usocket-jna")
11235 (arguments
11236 `(#:jar-name "jsch-agentproxy-usocket-jna.jar"
11237 #:source-dir "jsch-agent-proxy-usocket-jna/src/main/java"
11238 #:tests? #f)); no tests
11239 (inputs
11240 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
11241 ("java-native-access" ,java-native-access)))
11242 (synopsis "USocketFactory implementation using JNA")
11243 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
11244 and Pageant included in Putty. This component contains an implementation of
11245 USocketFactory using @dfn{JNA} (Java Native Access).")))
11246
11247 (define-public java-jsch-agentproxy-pageant
11248 (package
11249 (inherit java-jsch-agentproxy-core)
11250 (name "java-jsch-agentproxy-pageant")
11251 (arguments
11252 `(#:jar-name "jsch-agentproxy-pageant.jar"
11253 #:source-dir "jsch-agent-proxy-pageant/src/main/java"
11254 #:tests? #f)); no tests
11255 (inputs
11256 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
11257 ("java-native-access" ,java-native-access)
11258 ("java-native-access-platform" ,java-native-access-platform)))
11259 (synopsis "Proxy to pageant")
11260 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
11261 and Pageant included in Putty. This component contains the code for a proxy to
11262 pageant.")))
11263
11264 (define-public java-jsch-agentproxy-usocket-nc
11265 (package
11266 (inherit java-jsch-agentproxy-core)
11267 (name "java-jsch-agentproxy-usocket-nc")
11268 (arguments
11269 `(#:jar-name "jsch-agentproxy-usocket-nc.jar"
11270 #:source-dir "jsch-agent-proxy-usocket-nc/src/main/java"
11271 #:tests? #f)); no tests
11272 (inputs
11273 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
11274 (synopsis "USocketFactory implementation using netcat")
11275 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
11276 and Pageant included in Putty. This component contains an implementation of
11277 USocketFactory using netcat.")))
11278
11279 (define-public java-jsch-agentproxy-connector-factory
11280 (package
11281 (inherit java-jsch-agentproxy-core)
11282 (name "java-jsch-agentproxy-connector-factory")
11283 (arguments
11284 `(#:jar-name "jsch-agentproxy-connector-factory.jar"
11285 #:source-dir "jsch-agent-proxy-connector-factory/src/main/java"
11286 #:tests? #f)); no tests
11287 (inputs
11288 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
11289 ("java-jsch-agentproxy-sshagent" ,java-jsch-agentproxy-sshagent)
11290 ("java-jsch-agentproxy-usocket-jna" ,java-jsch-agentproxy-usocket-jna)
11291 ("java-jsch-agentproxy-pageant" ,java-jsch-agentproxy-pageant)
11292 ("java-jsch-agentproxy-usocket-nc" ,java-jsch-agentproxy-usocket-nc)))
11293 (synopsis "Connector factory for jsch agent proxy")
11294 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
11295 and Pageant included in Putty. This component contains a connector factory.")))
11296
11297 (define-public java-jsch-agentproxy-jsch
11298 (package
11299 (inherit java-jsch-agentproxy-core)
11300 (name "java-jsch-agentproxy-jsch")
11301 (arguments
11302 `(#:jar-name "jsch-agentproxy-jsch.jar"
11303 #:source-dir "jsch-agent-proxy-jsch/src/main/java"
11304 #:tests? #f)); no tests
11305 (inputs
11306 `(("java-jsch" ,java-jsch)
11307 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
11308 (synopsis "JSch integration library for agentproxy")
11309 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
11310 and Pageant included in Putty. This component contains a library to use
11311 jsch-agent-proxy with JSch.")))
11312
11313 (define-public java-apache-ivy
11314 (package
11315 (name "java-apache-ivy")
11316 (version "2.4.0")
11317 (source (origin
11318 (method url-fetch)
11319 (uri (string-append "mirror://apache//ant/ivy/" version
11320 "/apache-ivy-" version "-src.tar.gz"))
11321 (sha256
11322 (base32
11323 "1xkfn57g2m7l6y0xdq75x5rnrgk52m9jx2xah70g3ggl8750hbr0"))
11324 (patches
11325 (search-patches
11326 "java-apache-ivy-port-to-latest-bouncycastle.patch"))))
11327 (build-system ant-build-system)
11328 (arguments
11329 `(#:jar-name "ivy.jar"
11330 #:tests? #f
11331 #:phases
11332 (modify-phases %standard-phases
11333 (add-before 'build 'remove-example
11334 (lambda _
11335 (delete-file-recursively "src/example")
11336 #t))
11337 (add-before 'build 'copy-resources
11338 (lambda _
11339 (with-directory-excursion "src/java"
11340 (for-each (lambda (file)
11341 (install-file file (string-append "../../build/classes/" (dirname file))))
11342 (append
11343 (find-files "." ".*.css")
11344 (find-files "." ".*.ent")
11345 (find-files "." ".*.html")
11346 (find-files "." ".*.properties")
11347 (find-files "." ".*.xsd")
11348 (find-files "." ".*.xsl")
11349 (find-files "." ".*.xml"))))
11350 #t))
11351 (add-before 'build 'fix-vfs
11352 (lambda _
11353 (substitute*
11354 '("src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java"
11355 "src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java")
11356 (("import org.apache.commons.vfs") "import org.apache.commons.vfs2"))
11357 #t))
11358 (add-before 'install 'copy-manifest
11359 (lambda _
11360 (install-file "META-INF/MANIFEST.MF" "build/classes/META-INF")
11361 #t))
11362 (add-before 'install 'repack
11363 (lambda _
11364 (invoke "jar" "-cmf" "build/classes/META-INF/MANIFEST.MF" "build/jar/ivy.jar"
11365 "-C" "build/classes" ".")))
11366 (add-after 'install 'install-bin
11367 (lambda* (#:key outputs #:allow-other-keys)
11368 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
11369 (ivy (string-append bin "/ivy"))
11370 (jar (string-append (assoc-ref outputs "out") "/share/java/ivy.jar")))
11371 (mkdir-p bin)
11372 (with-output-to-file ivy
11373 (lambda _
11374 (display (string-append
11375 "#!" (which "sh") "\n"
11376 "if [[ -z $CLASSPATH ]]; then\n"
11377 " cp=\"" (getenv "CLASSPATH") ":" jar "\"\n"
11378 "else\n"
11379 " cp=\"" (getenv "CLASSPATH") ":" jar ":$CLASSPATH\"\n"
11380 "fi\n"
11381 (which "java") " -cp $cp org.apache.ivy.Main $@\n"))))
11382 (chmod ivy #o755)
11383 #t))))))
11384 (inputs
11385 `(("java-bouncycastle" ,java-bouncycastle)
11386 ("java-commons-cli" ,java-commons-cli)
11387 ("java-commons-collections" ,java-commons-collections)
11388 ("java-commons-httpclient" ,java-commons-httpclient)
11389 ("java-commons-lang" ,java-commons-lang)
11390 ("java-commons-vfs" ,java-commons-vfs)
11391 ("java-jakarta-oro" ,java-jakarta-oro)
11392 ("java-jsch" ,java-jsch)
11393 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
11394 ("java-jsch-agentproxy-connector-factory" ,java-jsch-agentproxy-connector-factory)
11395 ("java-jsch-agentproxy-jsch" ,java-jsch-agentproxy-jsch)
11396 ("java-junit" ,java-junit)))
11397 (home-page "https://ant.apache.org/ivy")
11398 (synopsis "Dependency manager for the Java programming language")
11399 (description "Ivy is a tool for managing (recording, tracking, resolving
11400 and reporting) project dependencies. It is characterized by the following:
11401
11402 @itemize
11403 @item flexibility and configurability - Ivy is essentially process agnostic
11404 and is not tied to any methodology or structure. Instead it provides the
11405 necessary flexibility and configurability to be adapted to a broad range
11406 of dependency management and build processes.
11407 @item tight integration with Apache Ant - while available as a standalone tool,
11408 Ivy works particularly well with Apache Ant providing a number of
11409 powerful Ant tasks ranging from dependency resolution to dependency
11410 reporting and publication.
11411 @end itemize")
11412 (license license:asl2.0)))
11413
11414 (define-public java-eclipse-sisu-inject
11415 (package
11416 (name "java-eclipse-sisu-inject")
11417 (version "0.3.3")
11418 (source (origin
11419 (method git-fetch)
11420 (uri (git-reference
11421 (url "https://github.com/eclipse/sisu.inject/")
11422 (commit "releases/0.3.3")))
11423 (file-name (git-file-name name version))
11424 (sha256
11425 (base32
11426 "0gibc9x0bw0f4ls086fx73610fcspz9g2as7kcpcfhvl5znysvg7"))))
11427 (build-system ant-build-system)
11428 (arguments
11429 `(#:jar-name "eclipse-sisu-inject.jar"
11430 #:source-dir "org.eclipse.sisu.inject/src"
11431 #:jdk ,icedtea-8
11432 #:tests? #f)); no tests
11433 (inputs
11434 `(("java-guice" ,java-guice)
11435 ("java-guice-servlet" ,java-guice-servlet)
11436 ("java-javax-inject" ,java-javax-inject)
11437 ("java-javaee-servletapi" ,java-javaee-servletapi)
11438 ("java-junit" ,java-junit)
11439 ("java-slf4j-api" ,java-slf4j-api)
11440 ("java-jsr305" ,java-jsr305)
11441 ("java-jsr250" ,java-jsr250)
11442 ("java-cdi-api" ,java-cdi-api)
11443 ("java-osgi-framework" ,java-osgi-framework)
11444 ("java-osgi-util-tracker" ,java-osgi-util-tracker)
11445 ("java-testng" ,java-testng)))
11446 (home-page "https://www.eclipse.org/sisu/")
11447 (synopsis "Classpath scanning, auto-binding, and dynamic auto-wiring")
11448 (description "Sisu is a modular JSR330-based container that supports
11449 classpath scanning, auto-binding, and dynamic auto-wiring. Sisu uses
11450 Google-Guice to perform dependency injection and provide the core JSR330
11451 support, but removes the need to write explicit bindings in Guice modules.
11452 Integration with other containers via the Eclipse Extension Registry and the
11453 OSGi Service Registry is a goal of this project.")
11454 (license license:epl1.0)))
11455
11456 (define-public java-eclipse-sisu-plexus
11457 (package
11458 (name "java-eclipse-sisu-plexus")
11459 (version "0.3.4")
11460 (source (origin
11461 (method git-fetch)
11462 (uri (git-reference
11463 (url "https://github.com/eclipse/sisu.plexus")
11464 (commit (string-append "releases/" version))))
11465 (file-name (git-file-name name version))
11466 (sha256
11467 (base32
11468 "17mjlajnsqnk07cc58h1qpxrif85yb2m2y0pyba48yjjgikk8r9f"))
11469 (modules '((guix build utils)))
11470 (snippet
11471 '(begin
11472 (for-each delete-file (find-files "." ".*.jar"))
11473 (rename-file "org.eclipse.sisu.plexus.tests/src"
11474 "org.eclipse.sisu.plexus.tests/java")
11475 #t))))
11476 (build-system ant-build-system)
11477 (arguments
11478 `(#:jar-name "eclipse-sisu-plexus.jar"
11479 #:source-dir "org.eclipse.sisu.plexus/src"
11480 #:test-dir "org.eclipse.sisu.plexus.tests"
11481 #:test-exclude
11482 (list
11483 ;; This test fails probably because we can't generate the necessary
11484 ;; meta-inf files.
11485 "**/PlexusLoggingTest.*"
11486 ;; FIXME: This test fails because of some injection error
11487 "**/PlexusRequirementTest.*")
11488 #:jdk ,icedtea-8
11489 #:phases
11490 (modify-phases %standard-phases
11491 (add-before 'build 'copy-resources
11492 (lambda _
11493 (install-file "org.eclipse.sisu.plexus/META-INF/plexus/components.xml"
11494 "build/classes/META-INF/plexus")
11495 #t))
11496 (add-before 'check 'build-test-jar
11497 (lambda _
11498 (with-directory-excursion "org.eclipse.sisu.plexus.tests/resources/component-jar/src/main/"
11499 (mkdir "build")
11500 (with-directory-excursion "java"
11501 (apply invoke "javac" "-cp"
11502 (string-append (getenv "CLASSPATH")
11503 ":../../../../../build/classes")
11504 (find-files "." ".*.java"))
11505 (for-each (lambda (file) (install-file file (string-append "../build/" file)))
11506 (find-files "." ".*.jar")))
11507 (mkdir-p "build/META-INF/plexus")
11508 (copy-file "resources/META-INF/plexus/components.xml"
11509 "build/META-INF/plexus/components.xml")
11510 (with-directory-excursion "build"
11511 (invoke "jar" "cf" "../../../component-jar-0.1.jar" ".")))
11512 (with-directory-excursion "org.eclipse.sisu.plexus.tests/"
11513 (copy-recursively "META-INF" "../build/test-classes/META-INF")
11514 (substitute* "java/org/eclipse/sisu/plexus/DefaultPlexusContainerTest.java"
11515 (("resources/component-jar")
11516 "org.eclipse.sisu.plexus.tests/resources/component-jar")))
11517 #t)))))
11518 (inputs
11519 `(("java-plexus-classworlds" ,java-plexus-classworlds)
11520 ("java-plexus-util" ,java-plexus-utils)
11521 ("java-plexus-component-annotations" ,java-plexus-component-annotations)
11522 ("java-osgi-framework" ,java-osgi-framework)
11523 ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)
11524 ("java-guice" ,java-guice)
11525 ("java-javax-inject" ,java-javax-inject)
11526 ("java-slf4j-api" ,java-slf4j-api)
11527 ("java-junit" ,java-junit)))
11528 (native-inputs
11529 `(("java-guava" ,java-guava)
11530 ("java-aopalliance" ,java-aopalliance)
11531 ("java-cglib" ,java-cglib)
11532 ("java-asm" ,java-asm)))
11533 (home-page "https://www.eclipse.org/sisu/")
11534 (synopsis "Plexus support for the sisu container")
11535 (description "Sisu is a modular JSR330-based container that supports
11536 classpath scanning, auto-binding, and dynamic auto-wiring. This package
11537 adds Plexus support to the Sisu-Inject container.")
11538 (license license:epl1.0)))
11539
11540 (define-public java-commons-compiler
11541 (package
11542 (name "java-commons-compiler")
11543 (version "3.0.8")
11544 (source (origin
11545 (method git-fetch)
11546 (uri (git-reference
11547 (url "https://github.com/janino-compiler/janino")
11548 (commit "91aa95686d1e4ca3b16a984a03a38686572331b2")))
11549 (file-name (string-append name "-" version))
11550 (sha256
11551 (base32
11552 "04hfdl59sgh20qkxzgnibvs8f9hy6n7znxwpk611y5d89977y62r"))
11553 (modules '((guix build utils)))
11554 (snippet
11555 '(begin
11556 (for-each delete-file
11557 (find-files "." "\\.jar$"))
11558 #t))))
11559 (build-system ant-build-system)
11560 (arguments
11561 `(#:jar-name "commons-compiler.jar"
11562 #:source-dir "commons-compiler/src/main"
11563 #:tests? #f)); no tests
11564 (home-page "https://github.com/janino-compiler/janino")
11565 (synopsis "Java compiler")
11566 (description "Commons-compiler contains an API for janino, including the
11567 @code{IExpressionEvaluator}, @code{IScriptEvaluator}, @code{IClassBodyEvaluator}
11568 and @code{ISimpleCompiler} interfaces.")
11569 (license license:bsd-3)))
11570
11571 (define-public java-janino
11572 (package
11573 (inherit java-commons-compiler)
11574 (name "java-janino")
11575 (arguments
11576 `(#:jar-name "janino.jar"
11577 #:source-dir "src/main/java"
11578 #:phases
11579 (modify-phases %standard-phases
11580 (add-before 'configure 'chdir
11581 (lambda _
11582 (chdir "janino")
11583 #t)))))
11584 (inputs
11585 `(("java-commons-compiler" ,java-commons-compiler)))
11586 (native-inputs
11587 `(("java-junit" ,java-junit)
11588 ("java-hamcrest-core" ,java-hamcrest-core)))
11589 (description "Janino is a Java compiler. Janino can compile a set of
11590 source files to a set of class files like @code{javac}, but also compile a
11591 Java expression, block, class body or source file in memory, load the bytecode
11592 and execute it directly in the same JVM. @code{janino} can also be used for
11593 static code analysis or code manipulation.")))
11594
11595 (define-public java-logback-core
11596 (package
11597 (name "java-logback-core")
11598 (version "1.2.3")
11599 (source (origin
11600 (method url-fetch)
11601 (uri (string-append "https://github.com/qos-ch/logback/archive/v_"
11602 version ".tar.gz"))
11603 (file-name (string-append name "-" version ".tar.gz"))
11604 (sha256
11605 (base32
11606 "1x6ga74yfgm94cfx98gybakbrlilx8i2gn6dx13l40kasmys06mi"))
11607 (modules '((guix build utils)))
11608 (snippet
11609 '(begin
11610 (delete-file-recursively "logback-access/lib")
11611 #t))))
11612 (build-system ant-build-system)
11613 (arguments
11614 `(#:jar-name "logback.jar"
11615 #:source-dir "src/main/java"
11616 #:test-dir "src/test"
11617 #:test-exclude
11618 ;; These tests fail with Unable to set MockitoNamingPolicy on cglib generator
11619 ;; which creates FastClasses
11620 (list "**/AllCoreTest.*"
11621 "**/AutoFlushingObjectWriterTest.*"
11622 "**/PackageTest.*"
11623 "**/ResilientOutputStreamTest.*"
11624 ;; And we still don't want to run abstract classes
11625 "**/Abstract*.*")
11626 #:phases
11627 (modify-phases %standard-phases
11628 (add-before 'configure 'chdir
11629 (lambda _
11630 (chdir "logback-core")
11631 #t)))))
11632 (inputs
11633 `(("java-javax-mail" ,java-javax-mail)
11634 ("servlet" ,java-javaee-servletapi)
11635 ("java-commons-compiler" ,java-commons-compiler)
11636 ("java-janino" ,java-janino)))
11637 (native-inputs
11638 `(("java-junit" ,java-junit)
11639 ("java-hamcrest-core" ,java-hamcrest-core)
11640 ("java-mockito-1" ,java-mockito-1)
11641 ("java-cglib" ,java-cglib)
11642 ("java-asm" ,java-asm)
11643 ("java-objenesis" ,java-objenesis)
11644 ("java-joda-time" ,java-joda-time)))
11645 (home-page "https://logback.qos.ch")
11646 (synopsis "Logging for java")
11647 (description "Logback is intended as a successor to the popular log4j project.
11648 This module lays the groundwork for the other two modules.")
11649 ;; Either epl1.0 or lgpl2.1
11650 (license (list license:epl1.0
11651 license:lgpl2.1))))
11652
11653 (define-public java-logback-classic
11654 (package
11655 (inherit java-logback-core)
11656 (name "java-logback-classic")
11657 (arguments
11658 `(#:jar-name "logback-classic.jar"
11659 #:source-dir "src/main/java"
11660 #:test-dir "src/test"
11661 #:tests? #f; tests require more packages: h2, greenmail, hsql, subethamail, slf4j, log4j, felix
11662 #:jdk ,icedtea-8
11663 #:phases
11664 (modify-phases %standard-phases
11665 (add-before 'configure 'chdir
11666 (lambda _
11667 (chdir "logback-classic")
11668 #t))
11669 (replace 'build
11670 (lambda* (#:key inputs #:allow-other-keys)
11671 (mkdir-p "build/classes")
11672 (setenv "CLASSPATH"
11673 (string-join
11674 (apply append (map (lambda (input)
11675 (find-files (assoc-ref inputs input)
11676 ".*.jar"))
11677 '("java-logback-core" "java-slf4j-api"
11678 "java-commons-compiler" "servlet"
11679 "groovy")))
11680 ":"))
11681 (apply invoke "groovyc" "-d" "build/classes" "-j"
11682 (find-files "src/main/" ".*\\.(groovy|java)$"))
11683 (invoke "ant" "jar")
11684 #t)))))
11685 (inputs
11686 `(("java-logback-core" ,java-logback-core)
11687 ("java-slf4j-api" ,java-slf4j-api)
11688 ,@(package-inputs java-logback-core)))
11689 (native-inputs
11690 `(("groovy" ,groovy)))
11691 (description "Logback is intended as a successor to the popular log4j project.
11692 This module can be assimilated to a significantly improved version of log4j.
11693 Moreover, @code{logback-classic} natively implements the slf4j API so that you
11694 can readily switch back and forth between logback and other logging frameworks
11695 such as log4j or @code{java.util.logging} (JUL).")))
11696
11697 (define-public java-jgit
11698 (package
11699 (name "java-jgit")
11700 (version "4.7.0.201704051617-r")
11701 (source (origin
11702 (method url-fetch)
11703 (uri (string-append "https://repo1.maven.org/maven2/"
11704 "org/eclipse/jgit/org.eclipse.jgit/"
11705 version "/org.eclipse.jgit-"
11706 version "-sources.jar"))
11707 (sha256
11708 (base32
11709 "13ii4jn02ynzq6i7gsyi21k2i94jpc85wf6bcm31q4cyvzv0mk4k"))))
11710 (build-system ant-build-system)
11711 (arguments
11712 `(#:tests? #f ; There are no tests to run.
11713 #:jar-name "jgit.jar"
11714 ;; JGit must be built with a JDK supporting Java 8.
11715 #:jdk ,icedtea-8
11716 ;; Target our older default JDK.
11717 #:make-flags (list "-Dtarget=1.7")
11718 #:phases
11719 (modify-phases %standard-phases
11720 ;; The jar file generated by the default build.xml does not include
11721 ;; the text properties files, so we need to add them.
11722 (add-after 'build 'add-properties
11723 (lambda* (#:key jar-name #:allow-other-keys)
11724 (with-directory-excursion "src"
11725 (apply invoke "jar" "-uf"
11726 (string-append "../build/jar/" jar-name)
11727 (find-files "." "\\.properties$")))
11728 #t)))))
11729 (inputs
11730 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
11731 ("java-javaewah" ,java-javaewah)
11732 ("java-jsch" ,java-jsch)
11733 ("java-slf4j-api" ,java-slf4j-api)))
11734 (home-page "https://eclipse.org/jgit/")
11735 (synopsis "Java library implementing the Git version control system")
11736 (description "JGit is a lightweight, pure Java library implementing the
11737 Git version control system, providing repository access routines, support for
11738 network protocols, and core version control algorithms.")
11739 (license license:edl1.0)))
11740
11741 ;; For axoloti. This package can still be built with icedtea-7, which is
11742 ;; currently used as the default JDK.
11743 (define-public java-jgit-4.2
11744 (package (inherit java-jgit)
11745 (version "4.2.0.201601211800-r")
11746 (source (origin
11747 (method url-fetch)
11748 (uri (string-append "https://repo1.maven.org/maven2/"
11749 "org/eclipse/jgit/org.eclipse.jgit/"
11750 version "/org.eclipse.jgit-"
11751 version "-sources.jar"))
11752 (sha256
11753 (base32
11754 "15gm537iivhnzlkjym4x3wn5jqdjdragsw9pdpzqqg21nrc817mm"))))
11755 (build-system ant-build-system)
11756 (arguments
11757 (substitute-keyword-arguments (package-arguments java-jgit)
11758 ;; Build for default JDK.
11759 ((#:jdk _) icedtea-7)
11760 ((#:phases phases)
11761 `(modify-phases ,phases
11762 (add-after 'unpack 'use-latest-javaewah-API
11763 (lambda _
11764 (substitute* "src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java"
11765 (("wordinbits") "WORD_IN_BITS"))
11766 #t))))))
11767 (inputs
11768 `(("java-javaewah" ,java-javaewah)
11769 ("java-jsch" ,java-jsch)
11770 ("java-slf4j-api" ,java-slf4j-api)))))
11771
11772 (define-public abcl
11773 (package
11774 (name "abcl")
11775 (version "1.6.0")
11776 (source
11777 (origin
11778 (method url-fetch)
11779 (uri (string-append "https://abcl.org/releases/"
11780 version "/abcl-src-" version ".tar.gz"))
11781 (sha256
11782 (base32
11783 "0hvbcsffr8n2xwdixc8wyw1bfl9fxn2gyy0c4nma7j9zbn0wwgw9"))
11784 (patches
11785 (search-patches
11786 "abcl-fix-build-xml.patch"))))
11787 (build-system ant-build-system)
11788 (native-inputs
11789 `(("java-junit" ,java-junit)))
11790 (arguments
11791 `(#:build-target "abcl.jar"
11792 #:test-target "abcl.test"
11793 #:phases
11794 (modify-phases %standard-phases
11795 (replace 'install
11796 (lambda* (#:key outputs #:allow-other-keys)
11797 (let ((share (string-append (assoc-ref outputs "out")
11798 "/share/java/"))
11799 (bin (string-append (assoc-ref outputs "out")
11800 "/bin/")))
11801 (mkdir-p share)
11802 (install-file "dist/abcl.jar" share)
11803 (install-file "dist/abcl-contrib.jar" share)
11804 (mkdir-p bin)
11805 (with-output-to-file (string-append bin "abcl")
11806 (lambda _
11807 (let ((classpath (string-append
11808 share "abcl.jar"
11809 ":"
11810 share "abcl-contrib.jar")))
11811 (display (string-append
11812 "#!" (which "sh") "\n"
11813 "if [[ -z $CLASSPATH ]]; then\n"
11814 " cp=\"" classpath "\"\n"
11815 "else\n"
11816 " cp=\"" classpath ":$CLASSPATH\"\n"
11817 "fi\n"
11818 "exec " (which "java")
11819 " -cp $cp org.armedbear.lisp.Main $@\n")))))
11820 (chmod (string-append bin "abcl") #o755)
11821 #t))))))
11822 (home-page "https://abcl.org/")
11823 (synopsis "Common Lisp Implementation on the JVM")
11824 (description
11825 "@dfn{Armed Bear Common Lisp} (ABCL) is a full implementation of the Common
11826 Lisp language featuring both an interpreter and a compiler, running in the
11827 JVM. It supports JSR-223 (Java scripting API): it can be a scripting engine
11828 in any Java application. Additionally, it can be used to implement (parts of)
11829 the application using Java to Lisp integration APIs.")
11830 (license (list license:gpl2+
11831 ;; named-readtables is released under 3 clause BSD
11832 license:bsd-3
11833 ;; jfli is released under CPL 1.0
11834 license:cpl1.0))))
11835
11836 (define-public java-jsonp-api
11837 (package
11838 (name "java-jsonp-api")
11839 (version "1.1.6")
11840 (source (origin
11841 (method git-fetch)
11842 (uri (git-reference
11843 (url "https://github.com/eclipse-ee4j/jsonp")
11844 (commit (string-append "1.1-" version "-RELEASE"))))
11845 (file-name (git-file-name name version))
11846 (sha256
11847 (base32
11848 "0zrj03hkr3jdmqlb4ipjr37cqpp2q2814qpmxi7srlwpdqs0ibgc"))))
11849 (build-system ant-build-system)
11850 (arguments
11851 `(#:jar-name "jsonp-api.jar"
11852 #:tests? #f
11853 #:source-dir "api/src/main/java"
11854 #:test-dir "api/src/test"))
11855 (home-page "https://eclipse-ee4j.github.io/jsonp/")
11856 (synopsis "JSON Processing in Java")
11857 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
11858 parse, generate, transform and query) JSON messages. It produces and
11859 consumes JSON text in a streaming fashion (similar to StAX API for XML)
11860 and allows building a Java object model for JSON text using API classes
11861 (similar to DOM API for XML).")
11862 ;; either gpl2 only with classpath exception, or epl2.0.
11863 (license (list license:gpl2
11864 license:epl2.0))))
11865
11866 (define-public java-jsonp-impl
11867 (package
11868 (inherit java-jsonp-api)
11869 (name "java-jsonp-impl")
11870 (arguments
11871 `(#:jar-name "jsonp-impl.jar"
11872 #:tests? #f
11873 #:source-dir "impl/src/main/java"
11874 #:test-dir "impl/src/test"
11875 #:phases
11876 (modify-phases %standard-phases
11877 (add-before 'build 'copy-resources
11878 (lambda _
11879 (copy-recursively
11880 "impl/src/main/resources/"
11881 "build/classes")
11882 #t)))))
11883 (propagated-inputs
11884 `(("java-jsonp-api" ,java-jsonp-api)))
11885 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
11886 parse, generate, transform and query) JSON messages. This package contains
11887 a reference implementation of that API.")))
11888
11889 (define-public java-xmp
11890 (package
11891 (name "java-xmp")
11892 (version "5.1.3")
11893 (source (origin
11894 (method url-fetch)
11895 (uri (string-append "http://download.macromedia.com/pub/developer"
11896 "/xmp/sdk/XMPCoreJava-" version ".zip"))
11897 (sha256
11898 (base32
11899 "14nai2mmsg7l5ya2y5mx4w4lr1az3sk2fjz6hiy4zdrsavgvl1g7"))))
11900 (build-system ant-build-system)
11901 (arguments
11902 `(#:build-target "build"
11903 #:tests? #f; no tests
11904 #:phases
11905 (modify-phases %standard-phases
11906 (add-after 'unpack 'chdir
11907 (lambda _
11908 (chdir "XMPCore")
11909 #t))
11910 (add-before 'build 'fix-timestamp
11911 (lambda _
11912 (substitute* "build.xml"
11913 (("\\$\\{BuildDate\\}") "1970 Jan 01 00:00:00-GMT"))
11914 #t))
11915 (replace 'install
11916 (install-jars "."))
11917 (add-after 'install 'install-doc
11918 (lambda* (#:key outputs #:allow-other-keys)
11919 (copy-recursively
11920 "docs"
11921 (string-append (assoc-ref outputs "out") "/share/doc/java-xmp"))
11922 #t)))))
11923 (native-inputs
11924 `(("unzip" ,unzip)))
11925 (home-page "https://www.adobe.com/devnet/xmp.html")
11926 (synopsis "Extensible Metadat Platform (XMP) support in Java")
11927 (description "Adobe's Extensible Metadata Platform (XMP) is a labeling
11928 technology that allows you to embed data about a file, known as metadata,
11929 into the file itself. The XMP Toolkit for Java is based on the C++ XMPCore
11930 library and the API is similar.")
11931 (license license:bsd-3)))
11932
11933 (define-public java-metadata-extractor
11934 (package
11935 (name "java-metadata-extractor")
11936 (version "2.11.0")
11937 (source (origin
11938 (method git-fetch)
11939 (uri (git-reference
11940 (url "https://github.com/drewnoakes/metadata-extractor")
11941 (commit version)))
11942 (file-name (git-file-name name version))
11943 (sha256
11944 (base32
11945 "06yrq0swrl1r40yjbk5kqzjxr04jlkq9lfi711jvfgjf5kp2qinj"))))
11946 (build-system ant-build-system)
11947 (arguments
11948 `(#:jar-name "metadata-extractor.jar"
11949 #:source-dir "Source"
11950 #:test-dir "Tests"
11951 #:phases
11952 (modify-phases %standard-phases
11953 (add-before 'check 'fix-test-dir
11954 (lambda _
11955 (substitute* "build.xml"
11956 (("/java\">") "\">"))
11957 #t)))))
11958 (propagated-inputs
11959 `(("java-xmp" ,java-xmp)))
11960 (native-inputs
11961 `(("java-hamcrest-core" ,java-hamcrest-core)
11962 ("java-junit" ,java-junit)))
11963 (home-page "https://github.com/drewnoakes/metadata-extractor")
11964 (synopsis "Extract metadata from image and video files")
11965 (description "Metadata-extractor is a straightforward Java library for
11966 reading metadata from image files. It is able to read metadata in Exif,
11967 IPTC, XMP, ICC and more formats.")
11968 (license license:asl2.0)))
11969
11970 (define-public java-svg-salamander
11971 (package
11972 (name "java-svg-salamander")
11973 (version "1.1.2")
11974 (source (origin
11975 (method git-fetch)
11976 (uri (git-reference
11977 (url "https://github.com/blackears/svgSalamander")
11978 (commit (string-append "v" version))))
11979 (file-name (git-file-name name version))
11980 (sha256
11981 (base32
11982 "1zv3kjdkf6iqf02x6ln76254y634j2ji448y706a65lsbfjmmicf"))
11983 (modules '((guix build utils)))
11984 (snippet
11985 '(begin
11986 (for-each delete-file (find-files "." ".*.jar"))
11987 #t))
11988 (patches
11989 (search-patches "java-svg-salamander-Fix-non-det.patch"))))
11990 (build-system ant-build-system)
11991 (arguments
11992 `(#:tests? #f; no tests
11993 #:phases
11994 (modify-phases %standard-phases
11995 (add-after 'unpack 'chdir
11996 (lambda _
11997 (chdir "svg-core")
11998 #t))
11999 (add-before 'build 'copy-jars
12000 (lambda* (#:key inputs #:allow-other-keys)
12001 (copy-file (car (find-files (assoc-ref inputs "javacc") "\\.jar$"))
12002 "../libraries/javacc.jar")
12003 (copy-file (car (find-files (assoc-ref inputs "ant") "ant\\.jar$"))
12004 "../libraries/ant.jar")
12005 #t))
12006 (replace 'install
12007 (install-jars "dist")))))
12008 (native-inputs
12009 `(("javacc" ,javacc)))
12010 (home-page "https://github.com/blackears/svgSalamander")
12011 (synopsis "SVG engine for Java")
12012 (description "SVG Salamander is an SVG engine for Java that's designed
12013 to be small, fast, and allow programmers to use it with a minimum of fuss.
12014 It's in particular targeted for making it easy to integrate SVG into Java
12015 games and making it much easier for artists to design 2D game content - from
12016 rich interactive menus to charts and graphcs to complex animations.")
12017 (license license:bsd-2)))
12018
12019 (define-public java-jboss-transaction-api-spec
12020 (package
12021 (name "java-jboss-transaction-api-spec")
12022 (version "1.2+1.1.1")
12023 (source (origin
12024 (method git-fetch)
12025 (uri (git-reference
12026 (url "https://github.com/jboss/jboss-transaction-api_spec")
12027 (commit "jboss-transaction-api_1.2_spec-1.1.1.Final")))
12028 (file-name (git-file-name name version))
12029 (sha256
12030 (base32
12031 "1xbfq5hvb86izflydxrqqv3k26c1ba2m0ap6m97shqrsdi9by4wy"))))
12032 (build-system ant-build-system)
12033 (arguments
12034 `(#:jar-name "java-jboss-transaction-api_spec.jar"
12035 #:source-dir "src/main/java"
12036 #:tests? #f)); no tests
12037 (inputs
12038 `(("java-cdi-api" ,java-cdi-api)
12039 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)))
12040 (home-page "https://github.com/jboss/jboss-transaction-api_spec")
12041 (synopsis "Generic transaction management API in Java")
12042 (description "Java-jboss-transaction-api-spec implements the Transactions
12043 API. A transaction is a unit of work containing one or more operations
12044 involving one or more shared resources having ACID (Atomicity, Consistency,
12045 Isolation and Durability) properties.")
12046 ;; either gpl2 only with classpath exception or cddl.
12047 (license (list license:gpl2 license:cddl1.0))))
12048
12049 (define-public java-picocli
12050 (package
12051 (name "java-picocli")
12052 (version "4.3.2")
12053 (source (origin
12054 (method git-fetch)
12055 (uri (git-reference
12056 (url "https://github.com/remkop/picocli")
12057 (commit (string-append "v" version))))
12058 (file-name (git-file-name name version))
12059 (sha256
12060 (base32
12061 "1sxp6rxjfgjd98ly14b3d15dvxkm5wg4g46w12jyhmr0kmkaca3c"))))
12062 (build-system ant-build-system)
12063 (arguments
12064 `(#:jar-name "picocli.jar"
12065 #:source-dir "src/main/java"
12066 ;; Tests require missing dependencies (junitparams, system-rules)
12067 #:tests? #f))
12068 (home-page "https://picocli.info")
12069 (synopsis "REPL for the JVM")
12070 (description "Picocli is a framework for building command line applications
12071 for the JVM. It supports colors, autocompletion, subcommands, and more. Written
12072 in Java, usable from Groovy, Kotlin, Scala, etc.")
12073 (license license:asl2.0)))
12074
12075 (define-public java-jetbrains-annotations
12076 (package
12077 (name "java-jetbrains-annotations")
12078 (version "19.0.0")
12079 (source (origin
12080 (method git-fetch)
12081 (uri (git-reference
12082 (url "https://github.com/JetBrains/java-annotations")
12083 (commit version)))
12084 (file-name (git-file-name name version))
12085 (sha256
12086 (base32
12087 "0z6i1xs60cd5ffz23c49sq68wn5mphhs3xpar1n93ppama2ng80v"))))
12088 (build-system ant-build-system)
12089 (arguments
12090 `(#:jar-name "jetbrains-annotations.jar"
12091 #:source-dir "common/src/main/java:java8/src/main/java"
12092 #:tests? #f)); no tests
12093 (home-page "https://github.com/JetBrains/java-annotations")
12094 (synopsis "Annotations for Java and other JVM languages")
12095 (description "This package contains a set of Java annotations which can be
12096 used in JVM-based languages. They serve as an additional documentation and
12097 can be interpreted by IDEs and static analysis tools to improve code analysis.")
12098 (license license:expat)))