gnu: Add rawdog.
[jackhill/guix/guix.git] / gnu / packages / java.scm
CommitLineData
0760e3a1 1;;; GNU Guix --- Functional package management for GNU
b7a1cac6 2;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
559239af 3;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
ea9e58ef 4;;; Copyright © 2016, 2017 Roel Janssen <roel@gnu.org>
717b6ba6 5;;; Copyright © 2017, 2019 Carlo Zancanaro <carlo@zancanaro.id.au>
da655b1e 6;;; Copyright © 2017, 2018, 2019 Julien Lepiller <julien@lepiller.eu>
88f256a1 7;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
1d47ea86 8;;; Copyright © 2016, 2017, 2018 Alex Vong <alexvong1995@gmail.com>
1c8ba10a 9;;; Copyright © 2017, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
0bc11cc7 10;;; Copyright © 2018, 2019 Gábor Boskovits <boskovits@gmail.com>
d0e9ded7 11;;; Copyright © 2018 Chris Marusich <cmmarusich@gmail.com>
2703d573 12;;; Copyright © 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
60f5ab0b 13;;; Copyright © 2019, 2020 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
9820d6ed 14;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
f1cf62f5
RG
15;;; Copyright © 2020 Raghav Gururajan <raghavgururajan@disroot.org>
16;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
0760e3a1
RW
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)
62c9bfaa 37 #:use-module (guix hg-download)
72885a4c 38 #:use-module (guix git-download)
78745d33 39 #:use-module (guix svn-download)
f6789047 40 #:use-module (guix utils)
068e476f 41 #:use-module (guix build-system ant)
0760e3a1 42 #:use-module (guix build-system gnu)
6a5829d9 43 #:use-module (guix build-system trivial)
0760e3a1
RW
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)
f21403e2 49 #:use-module (gnu packages certs)
0760e3a1
RW
50 #:use-module (gnu packages cpio)
51 #:use-module (gnu packages cups)
52 #:use-module (gnu packages compression)
dd741059 53 #:use-module (gnu packages elf)
0760e3a1
RW
54 #:use-module (gnu packages fontutils)
55 #:use-module (gnu packages gawk)
72885a4c 56 #:use-module (gnu packages gettext)
0760e3a1 57 #:use-module (gnu packages gcc)
8581c813 58 #:use-module (gnu packages gl)
0760e3a1
RW
59 #:use-module (gnu packages ghostscript) ;lcms
60 #:use-module (gnu packages gnome)
3a69f5f2 61 #:use-module (gnu packages groovy)
0760e3a1 62 #:use-module (gnu packages gtk)
6a5829d9 63 #:use-module (gnu packages guile)
afb5858d 64 #:use-module (gnu packages icu4c)
0760e3a1 65 #:use-module (gnu packages image)
24155bf4 66 #:use-module (gnu packages java-compression)
c4fd86f9 67 #:use-module (gnu packages libffi)
0760e3a1 68 #:use-module (gnu packages linux) ;alsa
2f0d0418 69 #:use-module (gnu packages maths)
aff0cce9 70 #:use-module (gnu packages nss)
bcb078a4 71 #:use-module (gnu packages onc-rpc)
5766984b 72 #:use-module (gnu packages web)
0760e3a1 73 #:use-module (gnu packages wget)
0760e3a1
RW
74 #:use-module (gnu packages pkg-config)
75 #:use-module (gnu packages perl)
c4fd86f9 76 #:use-module (gnu packages popt)
89e34644 77 #:use-module (gnu packages kerberos)
0760e3a1
RW
78 #:use-module (gnu packages xml)
79 #:use-module (gnu packages xorg)
f6789047 80 #:use-module (gnu packages texinfo)
2d15f601
RW
81 #:use-module ((srfi srfi-1) #:select (fold alist-delete))
82 #:use-module (srfi srfi-11)
83 #:use-module (ice-9 match))
0760e3a1 84
e1ae3587
RW
85\f
86;;;
87;;; Java bootstrap toolchain.
88;;;
89
90;; The Java bootstrap begins with Jikes, a Java compiler written in C++. We
269fb7d3
RW
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.
e1ae3587 101;;
269fb7d3
RW
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.
e1ae3587 110
f1cf62f5
RG
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
145Tool for Language Recognition v3).")
146 (home-page "https://www.antlr3.org/")
147 (license license:bsd-3)))
148
e1ae3587
RW
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
164defined in The Java Language Specification into the bytecoded instruction set
165and binary format defined in The Java Virtual Machine Specification.")
166 (license license:ibmpl1.0)))
167
45f762ee
RW
168;; This is the last version of GNU Classpath that can be built without ECJ.
169(define classpath-bootstrap
2551fee8 170 (package
45f762ee
RW
171 (name "classpath")
172 (version "0.93")
2551fee8
RW
173 (source (origin
174 (method url-fetch)
45f762ee
RW
175 (uri (string-append "mirror://gnu/classpath/classpath-"
176 version ".tar.gz"))
2551fee8
RW
177 (sha256
178 (base32
bab9793f
EF
179 "0i99wf9xd3hw1sj2sazychb9prx8nadxh2clgvk3zlmb28v0jbfz"))
180 (patches (search-patches "classpath-aarch64-support.patch"))))
2551fee8
RW
181 (build-system gnu-build-system)
182 (arguments
183 `(#:configure-flags
45f762ee
RW
184 (list (string-append "JAVAC="
185 (assoc-ref %build-inputs "jikes")
186 "/bin/jikes")
2551fee8
RW
187 "--disable-Werror"
188 "--disable-gmp"
189 "--disable-gtk-peer"
45f762ee 190 "--disable-gconf-peer"
2551fee8
RW
191 "--disable-plugin"
192 "--disable-dssi"
193 "--disable-alsa"
45f762ee
RW
194 "--disable-gjdoc")
195 #:phases
196 (modify-phases %standard-phases
4fb59c9e
RW
197 ;; XXX: This introduces a memory leak as we remove a call to free up
198 ;; memory for the file name string. This was necessary because of a
199 ;; runtime error that would have prevented us from building
200 ;; ant-bootstrap later. See https://issues.guix.gnu.org/issue/36685
201 ;; for the gnarly details.
202 (add-after 'unpack 'remove-call-to-free
203 (lambda _
204 (substitute* "native/jni/java-io/java_io_VMFile.c"
205 (("result = cpio_isFileExists.*" m)
206 (string-append m "\n//")))
207 #t))
45f762ee 208 (add-after 'install 'install-data
0c66a4eb 209 (lambda _ (invoke "make" "install-data"))))))
2551fee8
RW
210 (native-inputs
211 `(("jikes" ,jikes)
212 ("fastjar" ,fastjar)
45f762ee 213 ("libltdl" ,libltdl)
2551fee8 214 ("pkg-config" ,pkg-config)))
45f762ee
RW
215 (home-page "https://www.gnu.org/software/classpath/")
216 (synopsis "Essential libraries for Java")
217 (description "GNU Classpath is a project to create core class libraries
218for use with runtimes, compilers and tools for the Java programming
219language.")
220 ;; GPLv2 or later, with special linking exception.
221 (license license:gpl2+)))
57f6c50d 222
063629aa
RW
223;; This is the last version of JamVM that works with a version of GNU
224;; classpath that does not require ECJ.
225(define jamvm-1-bootstrap
57f6c50d 226 (package
063629aa
RW
227 (name "jamvm")
228 (version "1.5.1")
57f6c50d
RW
229 (source (origin
230 (method url-fetch)
063629aa
RW
231 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
232 "JamVM%20" version "/jamvm-"
233 version ".tar.gz"))
64b2efc1 234 (patches (search-patches "jamvm-arm.patch"))
57f6c50d
RW
235 (sha256
236 (base32
cff1e095
237 "06lhi03l3b0h48pc7x58bk9my2nrcf1flpmglvys3wyad6yraf36"))
238 (snippet
239 '(begin
240 ;; Remove precompiled software.
241 (delete-file "lib/classes.zip")
242 #t))))
57f6c50d
RW
243 (build-system gnu-build-system)
244 (arguments
c4fd86f9 245 `(#:configure-flags
063629aa 246 (list (string-append "--with-classpath-install-dir="
fc37b4af
RW
247 (assoc-ref %build-inputs "classpath"))
248 "--disable-int-caching"
249 "--enable-runtime-reloc-checks"
250 "--enable-ffi")))
57f6c50d 251 (inputs
063629aa 252 `(("classpath" ,classpath-bootstrap)
57f6c50d 253 ("jikes" ,jikes)
fc37b4af 254 ("libffi" ,libffi)
cff1e095 255 ("zip" ,zip)
063629aa 256 ("zlib" ,zlib)))
22bd735a
RW
257 ;; When built with a recent GCC and glibc the configure step of icedtea-6
258 ;; fails with an invalid instruction error.
259 (native-inputs
260 `(("gcc" ,gcc-5)
261 ("libc" ,glibc-2.28)))
063629aa
RW
262 (home-page "http://jamvm.sourceforge.net/")
263 (synopsis "Small Java Virtual Machine")
264 (description "JamVM is a Java Virtual Machine conforming to the JVM
265specification edition 2 (blue book). It is extremely small. However, unlike
266other small VMs it supports the full spec, including object finalisation and
267JNI.")
268 (license license:gpl2+)))
2551fee8 269
5783bd77
RW
270(define ant-bootstrap
271 (package
272 (name "ant-bootstrap")
273 ;; The 1.10.x series requires Java 8. 1.9.0 and later use generics, which
274 ;; are not supported. The 1.8.x series is the last to use only features
ff4d9fdf
RW
275 ;; supported by Jikes.
276 (version "1.8.4")
5783bd77
RW
277 (source (origin
278 (method url-fetch)
279 (uri (string-append "http://archive.apache.org/dist/"
280 "ant/source/apache-ant-"
281 version "-src.tar.bz2"))
282 (sha256
283 (base32
ff4d9fdf 284 "1cg0lga887qz5iizh6mlkxp01lciymrhmp7wzxpl6zpnldxmzrjx"))))
5783bd77
RW
285 (build-system gnu-build-system)
286 (arguments
cded3a75
GB
287 `(#:imported-modules ((guix build syscalls)
288 ,@%gnu-build-system-modules)
289 #:modules ((srfi srfi-1)
290 (guix build gnu-build-system)
291 (guix build utils)
292 (guix build syscalls))
293 #:tests? #f ; no "check" target
5783bd77
RW
294 #:phases
295 (modify-phases %standard-phases
d4fd4c3a 296 (delete 'bootstrap)
5783bd77
RW
297 (delete 'configure)
298 (replace 'build
299 (lambda* (#:key inputs #:allow-other-keys)
aa432388 300 (setenv "JAVA_HOME" (assoc-ref inputs "jamvm"))
5783bd77 301 (setenv "JAVACMD"
aa432388
RW
302 (string-append (assoc-ref inputs "jamvm")
303 "/bin/jamvm"))
5783bd77 304 (setenv "JAVAC"
aa432388
RW
305 (string-append (assoc-ref inputs "jikes")
306 "/bin/jikes"))
307 (setenv "CLASSPATH"
308 (string-append (assoc-ref inputs "jamvm")
309 "/lib/rt.jar"))
5783bd77 310
d4fd4c3a
RW
311 ;; Ant complains if this file doesn't exist.
312 (setenv "HOME" "/tmp")
313 (with-output-to-file "/tmp/.ant.properties"
314 (lambda _ (display "")))
5783bd77
RW
315
316 ;; Use jikes instead of javac for <javac ...> tags in build.xml
317 (setenv "ANT_OPTS" "-Dbuild.compiler=jikes")
318
319 ;; jikes produces lots of warnings, but they are not very
320 ;; interesting, so we silence them.
321 (setenv "$BOOTJAVAC_OPTS" "-nowarn")
322
d4fd4c3a
RW
323 ;; Without these JamVM options the build may freeze.
324 (substitute* "bootstrap.sh"
325 (("^\"\\$\\{JAVACMD\\}\" " m)
a495998b
EF
326 ,@(if (string-prefix? "armhf" (or (%current-system)
327 (%current-target-system)))
328 `((string-append m "-Xnocompact "))
329 `((string-append m "-Xnocompact -Xnoinlining ")))))
d4fd4c3a 330
5783bd77
RW
331 ;; Disable tests because we are bootstrapping and thus don't have
332 ;; any of the dependencies required to build and run the tests.
333 (substitute* "build.xml"
334 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
8e14634a
EF
335 (invoke "bash" "bootstrap.sh"
336 (string-append "-Ddist.dir="
337 (assoc-ref %outputs "out")))))
cded3a75
GB
338 (add-after 'build 'strip-jar-timestamps ;based on ant-build-system
339 (lambda* (#:key outputs #:allow-other-keys)
340 (define (repack-archive jar)
341 (let* ((dir (mkdtemp! "jar-contents.XXXXXX"))
342 (manifest (string-append dir "/META-INF/MANIFESTS.MF")))
343 (with-directory-excursion dir
344 (invoke "unzip" jar))
345 (delete-file jar)
346 ;; XXX: copied from (gnu build install)
347 (for-each (lambda (file)
348 (let ((s (lstat file)))
349 (unless (eq? (stat:type s) 'symlink)
350 (utime file 0 0 0 0))))
351 (find-files dir #:directories? #t))
352 ;; It is important that the manifest appears first.
353 (with-directory-excursion dir
354 (let* ((files (find-files "." ".*" #:directories? #t))
355 ;; To ensure that the reference scanner can
356 ;; detect all store references in the jars
357 ;; we disable compression with the "-0" option.
358 (command (if (file-exists? manifest)
359 `("zip" "-0" "-X" ,jar ,manifest
360 ,@files)
361 `("zip" "-0" "-X" ,jar ,@files))))
362 (apply invoke command)))))
363 (for-each repack-archive
364 (find-files
365 (string-append (assoc-ref %outputs "out") "/lib")
366 "\\.jar$"))
367 #t))
5783bd77
RW
368 (delete 'install))))
369 (native-inputs
370 `(("jikes" ,jikes)
cded3a75
GB
371 ("jamvm" ,jamvm-1-bootstrap)
372 ("unzip" ,unzip)
b42b5afd 373 ("zip" ,zip)))
0b1d71b2 374 (home-page "https://ant.apache.org")
5783bd77
RW
375 (synopsis "Build tool for Java")
376 (description
377 "Ant is a platform-independent build tool for Java. It is similar to
378make but is implemented using the Java language, requires the Java platform,
379and is best suited to building Java projects. Ant uses XML to describe the
380build process and its dependencies, whereas Make uses Makefile format.")
381 (license license:asl2.0)))
382
5461721f
RW
383;; Version 3.2.2 is the last version without a dependency on a full-fledged
384;; compiler for Java 1.5.
385(define ecj-bootstrap
386 (package
387 (name "ecj-bootstrap")
388 (version "3.2.2")
389 (source (origin
390 (method url-fetch)
391 (uri (string-append "http://archive.eclipse.org/eclipse/"
392 "downloads/drops/R-" version
393 "-200702121330/ecjsrc.zip"))
394 (sha256
395 (base32
396 "05hj82kxd23qaglsjkaqcj944riisjha7acf7h3ljhrjyljx8307"))))
397 ;; It would be so much easier if we could use the ant-build-system, but we
398 ;; cannot as we don't have ant at this point. We use ecj for
399 ;; bootstrapping the JDK.
400 (build-system gnu-build-system)
401 (arguments
402 `(#:modules ((guix build gnu-build-system)
403 (guix build utils)
404 (srfi srfi-1))
405 #:tests? #f ; there are no tests
406 #:phases
407 (modify-phases %standard-phases
408 (replace 'configure
409 (lambda* (#:key inputs #:allow-other-keys)
410 (setenv "CLASSPATH"
411 (string-join
6c775dc6
RW
412 (cons (string-append (assoc-ref inputs "jamvm")
413 "/lib/rt.jar")
414 (find-files (string-append
415 (assoc-ref inputs "ant-bootstrap")
416 "/lib")
417 "\\.jar$"))
5461721f
RW
418 ":"))
419 #t))
420 (replace 'build
421 (lambda* (#:key inputs #:allow-other-keys)
422 ;; The unpack phase enters the "org" directory by mistake.
423 (chdir "..")
424
425 ;; Create a simple manifest to make ecj executable.
426 (with-output-to-file "manifest"
427 (lambda _
428 (display "Manifest-Version: 1.0
429Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n")))
430
431 ;; Compile it all!
0b302a16
EF
432 (and (apply invoke "jikes"
433 (find-files "." "\\.java$"))
434 (invoke "fastjar" "cvfm"
435 "ecj-bootstrap.jar" "manifest" "."))))
5461721f
RW
436 (replace 'install
437 (lambda* (#:key outputs #:allow-other-keys)
438 (let ((share (string-append (assoc-ref outputs "out")
439 "/share/java/")))
440 (mkdir-p share)
441 (install-file "ecj-bootstrap.jar" share)
442 #t))))))
443 (native-inputs
444 `(("ant-bootstrap" ,ant-bootstrap)
445 ("unzip" ,unzip)
6c775dc6
RW
446 ("jikes" ,jikes)
447 ("jamvm" ,jamvm-1-bootstrap)
5461721f
RW
448 ("fastjar" ,fastjar)))
449 (home-page "https://eclipse.org")
450 (synopsis "Eclipse Java development tools core batch compiler")
451 (description "This package provides the Eclipse Java core batch compiler
452for bootstrapping purposes. The @dfn{Eclipse compiler for Java} (ecj) is a
453requirement for all GNU Classpath releases after version 0.93.")
454 (license license:epl1.0)))
455
6a5829d9
RW
456(define ecj-javac-wrapper
457 (package (inherit ecj-bootstrap)
458 (name "ecj-javac-wrapper")
459 (source #f)
460 (build-system trivial-build-system)
461 (arguments
462 `(#:modules ((guix build utils))
463 #:builder
c4f06c11 464 (begin
6a5829d9
RW
465 (use-modules (guix build utils))
466 (let* ((bin (string-append (assoc-ref %outputs "out") "/bin"))
467 (target (string-append bin "/javac"))
468 (guile (string-append (assoc-ref %build-inputs "guile")
469 "/bin/guile"))
470 (ecj (string-append (assoc-ref %build-inputs "ecj-bootstrap")
471 "/share/java/ecj-bootstrap.jar"))
c4f06c11
RW
472 (java (string-append (assoc-ref %build-inputs "jamvm")
473 "/bin/jamvm"))
474 (bootcp (let ((jvmlib (string-append (assoc-ref %build-inputs "classpath")
475 "/share/classpath")))
51602aac
RW
476 (string-append jvmlib "/glibj.zip:"
477 jvmlib "/tools.zip"))))
6a5829d9
RW
478 (mkdir-p bin)
479 (with-output-to-file target
480 (lambda _
481 (format #t "#!~a --no-auto-compile\n!#\n" guile)
482 (write
483 `(begin (use-modules (ice-9 match)
484 (ice-9 receive)
485 (ice-9 hash-table)
486 (srfi srfi-1)
487 (srfi srfi-26))
488 (define defaults
489 '(("-bootclasspath" ,bootcp)
490 ("-source" "1.5")
491 ("-target" "1.5")
492 ("-cp" ".")))
493 (define (main args)
494 (let ((classpath (getenv "CLASSPATH")))
495 (setenv "CLASSPATH"
c4f06c11
RW
496 (string-join (list ,ecj
497 ,(string-append (assoc-ref %build-inputs "jamvm")
498 "/lib/rt.jar")
499 (or classpath ""))
500 ":")))
6a5829d9
RW
501 (receive (vm-args other-args)
502 ;; Separate VM arguments from arguments to ECJ.
503 (partition (cut string-prefix? "-J" <>)
504 (fold (lambda (default acc)
505 (if (member (first default) acc)
506 acc (append default acc)))
507 args defaults))
508 (apply system* ,java
509 (append
510 ;; Remove "-J" prefix
511 (map (cut string-drop <> 2) vm-args)
512 '("org.eclipse.jdt.internal.compiler.batch.Main")
513 (cons "-nowarn" other-args)))))
514 ;; Entry point
515 (let ((args (cdr (command-line))))
516 (if (null? args)
517 (format (current-error-port) "javac: no arguments given!\n")
518 (main args)))))))
519 (chmod target #o755)
520 #t))))
521 (native-inputs
522 `(("guile" ,guile-2.2)
523 ("ecj-bootstrap" ,ecj-bootstrap)
c4f06c11
RW
524 ("jamvm" ,jamvm-1-bootstrap)
525 ("classpath" ,classpath-bootstrap)))
6a5829d9
RW
526 (description "This package provides a wrapper around the @dfn{Eclipse
527compiler for Java} (ecj) with a command line interface that is compatible with
528the standard javac executable.")))
529
8778da03
RW
530;; The classpath-bootstrap was built without a virtual machine, so it does not
531;; provide a wrapper for javah. We cannot build the development version of
532;; Classpath without javah.
533(define classpath-0.99
534 (package (inherit classpath-bootstrap)
d3551e86
RW
535 (version "0.99")
536 (source (origin
537 (method url-fetch)
538 (uri (string-append "mirror://gnu/classpath/classpath-"
539 version ".tar.gz"))
540 (sha256
541 (base32
bab9793f
EF
542 "1j7cby4k66f1nvckm48xcmh352b1d1b33qk7l6hi7dp9i9zjjagr"))
543 (patches (search-patches "classpath-aarch64-support.patch"))))
d3551e86
RW
544 (arguments
545 `(#:configure-flags
546 (list (string-append "--with-ecj-jar="
547 (assoc-ref %build-inputs "ecj-bootstrap")
548 "/share/java/ecj-bootstrap.jar")
549 (string-append "JAVAC="
550 (assoc-ref %build-inputs "ecj-javac-wrapper")
551 "/bin/javac")
552 (string-append "JAVA="
8778da03
RW
553 (assoc-ref %build-inputs "jamvm")
554 "/bin/jamvm")
d3551e86
RW
555 "GCJ_JAVAC_TRUE=no"
556 "ac_cv_prog_java_works=yes" ; trust me
557 "--disable-Werror"
558 "--disable-gmp"
559 "--disable-gtk-peer"
560 "--disable-gconf-peer"
561 "--disable-plugin"
562 "--disable-dssi"
563 "--disable-alsa"
564 "--disable-gjdoc")
565 #:phases
566 (modify-phases %standard-phases
567 (add-after 'install 'install-data
15a59c21 568 (lambda _ (invoke "make" "install-data"))))))
d3551e86
RW
569 (native-inputs
570 `(("ecj-bootstrap" ,ecj-bootstrap)
571 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
572 ("fastjar" ,fastjar)
8778da03
RW
573 ("jamvm" ,jamvm-1-bootstrap)
574 ("classpath" ,classpath-bootstrap)
d3551e86 575 ("libltdl" ,libltdl)
8778da03 576 ("pkg-config" ,pkg-config)))))
d3551e86 577
c98d7a66
RW
578;; We need this because classpath-bootstrap does not provide all of the tools
579;; we need to build classpath-devel.
04d7cae2 580(define classpath-jamvm-wrappers
c98d7a66 581 (package (inherit classpath-0.99)
04d7cae2
RW
582 (name "classpath-jamvm-wrappers")
583 (source #f)
584 (build-system trivial-build-system)
585 (arguments
586 `(#:modules ((guix build utils))
587 #:builder
588 (begin
589 (use-modules (guix build utils))
590 (let* ((bash (assoc-ref %build-inputs "bash"))
591 (jamvm (assoc-ref %build-inputs "jamvm"))
592 (classpath (assoc-ref %build-inputs "classpath"))
593 (bin (string-append (assoc-ref %outputs "out")
594 "/bin/")))
595 (mkdir-p bin)
596 (for-each (lambda (tool)
597 (with-output-to-file (string-append bin tool)
598 (lambda _
e3ec1258
EF
599 ,@(if (string-prefix? "armhf" (or (%current-system)
600 (%current-target-system)))
601 `((format #t "#!~a/bin/sh
602~a/bin/jamvm -Xnocompact -classpath ~a/share/classpath/tools.zip \
603gnu.classpath.tools.~a.~a $@"
604 bash jamvm classpath tool
605 (if (string=? "native2ascii" tool)
606 "Native2ASCII" "Main")))
607 `((format #t "#!~a/bin/sh
40e3a197 608~a/bin/jamvm -Xnocompact -Xnoinlining -classpath ~a/share/classpath/tools.zip \
04d7cae2
RW
609gnu.classpath.tools.~a.~a $@"
610 bash jamvm classpath tool
611 (if (string=? "native2ascii" tool)
e3ec1258 612 "Native2ASCII" "Main"))))))
04d7cae2
RW
613 (chmod (string-append bin tool) #o755))
614 (list "javah"
615 "rmic"
616 "rmid"
617 "orbd"
618 "rmiregistry"
619 "native2ascii"))
620 #t))))
621 (native-inputs
622 `(("bash" ,bash)
c98d7a66
RW
623 ("jamvm" ,jamvm-1-bootstrap)
624 ("classpath" ,classpath-0.99)))
04d7cae2
RW
625 (inputs '())
626 (synopsis "Executables from GNU Classpath")
627 (description "This package provides wrappers around the tools provided by
628the GNU Classpath library. They are executed by the JamVM virtual
629machine.")))
630
72885a4c
RW
631;; The last release of GNU Classpath is 0.99 and it happened in 2012. Since
632;; then Classpath has gained much more support for Java 1.6.
633(define-public classpath-devel
634 (let ((commit "e7c13ee0cf2005206fbec0eca677f8cf66d5a103")
635 (revision "1"))
8778da03 636 (package (inherit classpath-bootstrap)
72885a4c
RW
637 (version (string-append "0.99-" revision "." (string-take commit 9)))
638 (source (origin
639 (method git-fetch)
640 (uri (git-reference
5f13bf09 641 (url "https://git.savannah.gnu.org/git/classpath.git")
72885a4c 642 (commit commit)))
51988e3a 643 (file-name (string-append "classpath-" version "-checkout"))
72885a4c
RW
644 (sha256
645 (base32
646 "1v2rww76ww322mpg3s12a1kkc6gkp31bm9gcxs532h0wq285fiw4"))))
647 (arguments
93c103ab
RW
648 `(#:make-flags
649 ;; Ensure that the initial heap size is smaller than the maximum
650 ;; size. By default only Xmx is set, which can lead to invalid
651 ;; memory settings on some machines with a lot of memory.
652 '("JAVAC_MEM_OPT=-J-Xms512M -J-Xmx768M")
653 #:configure-flags
72885a4c
RW
654 (list (string-append "--with-ecj-jar="
655 (assoc-ref %build-inputs "ecj-bootstrap")
656 "/share/java/ecj-bootstrap.jar")
93c103ab 657 (string-append "--with-javac="
72885a4c
RW
658 (assoc-ref %build-inputs "ecj-javac-wrapper")
659 "/bin/javac")
660 (string-append "JAVA="
661 (assoc-ref %build-inputs "jamvm")
662 "/bin/jamvm")
663 "GCJ_JAVAC_TRUE=no"
664 "ac_cv_prog_java_works=yes" ; trust me
665 "--disable-Werror"
666 "--disable-gmp"
667 "--disable-gtk-peer"
668 "--disable-gconf-peer"
669 "--disable-plugin"
670 "--disable-dssi"
671 "--disable-alsa"
672 "--disable-gjdoc")
673 #:phases
674 (modify-phases %standard-phases
2a69f48e
RW
675 ;; XXX The bootstrap phase executes autogen.sh, which fails after
676 ;; complaining about the lack of gettext.
677 (replace 'bootstrap
678 (lambda _ (invoke "autoreconf" "-vif")))
72885a4c
RW
679 (add-after 'unpack 'remove-unsupported-annotations
680 (lambda _
681 (substitute* (find-files "java" "\\.java$")
682 (("@Override") ""))
683 #t))
684 (add-after 'install 'install-data
4c65eb43 685 (lambda _ (invoke "make" "install-data"))))))
72885a4c
RW
686 (native-inputs
687 `(("autoconf" ,autoconf)
688 ("automake" ,automake)
689 ("libtool" ,libtool)
690 ("gettext" ,gettext-minimal)
691 ("texinfo" ,texinfo)
692 ("classpath-jamvm-wrappers" ,classpath-jamvm-wrappers) ; for javah
693 ("ecj-bootstrap" ,ecj-bootstrap)
b5a0d427 694 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
72885a4c 695 ("fastjar" ,fastjar)
58d2b135 696 ("jamvm" ,jamvm-1-bootstrap)
72885a4c
RW
697 ("libltdl" ,libltdl)
698 ("pkg-config" ,pkg-config))))))
699
58d2b135
RW
700(define jamvm
701 (package (inherit jamvm-1-bootstrap)
702 (version "2.0.0")
703 (source (origin
704 (method url-fetch)
705 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
706 "JamVM%20" version "/jamvm-"
707 version ".tar.gz"))
708 (sha256
709 (base32
cff1e095
710 "1nl0zxz8y5x8gwsrm7n32bry4dx8x70p8z3s9jbdvs8avyb8whkn"))
711 (snippet
712 '(begin
713 ;; Remove precompiled software.
714 (delete-file "src/classlib/gnuclasspath/lib/classes.zip")
715 #t))))
58d2b135
RW
716 (build-system gnu-build-system)
717 (arguments
718 `(#:configure-flags
719 (list (string-append "--with-classpath-install-dir="
720 (assoc-ref %build-inputs "classpath")))))
8c6091e3
RW
721 (inputs
722 `(("classpath" ,classpath-devel)
b5a0d427 723 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
cff1e095 724 ("zip" ,zip)
8c6091e3
RW
725 ("zlib" ,zlib)))))
726
b5a0d427
RW
727(define ecj-javac-wrapper-final
728 (package (inherit ecj-javac-wrapper)
1bf56c72
RW
729 (native-inputs
730 `(("guile" ,guile-2.2)
731 ("ecj-bootstrap" ,ecj-bootstrap)
732 ("jamvm" ,jamvm)
733 ("classpath" ,classpath-devel)))))
734
98419316 735;; The bootstrap JDK consisting of jamvm, classpath-devel,
b5a0d427
RW
736;; ecj-javac-wrapper-final cannot build Icedtea 2.x directly, because it's
737;; written in Java 7. It can, however, build the unmaintained Icedtea 1.x,
738;; which uses Java 6 only.
98419316
RW
739(define-public icedtea-6
740 (package
741 (name "icedtea")
742 (version "1.13.13")
743 (source (origin
744 (method url-fetch)
745 (uri (string-append
746 "http://icedtea.wildebeest.org/download/source/icedtea6-"
747 version ".tar.xz"))
748 (sha256
749 (base32
750 "0bg9sb4f7qbq77c0zf9m17p47ga0kf0r9622g9p12ysg26jd1ksg"))
751 (modules '((guix build utils)))
752 (snippet
6cbee49d
MW
753 '(begin
754 (substitute* "Makefile.in"
755 ;; do not leak information about the build host
756 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
757 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
758 #t))))
98419316
RW
759 (build-system gnu-build-system)
760 (outputs '("out" ; Java Runtime Environment
761 "jdk" ; Java Development Kit
762 "doc")) ; all documentation
763 (arguments
764 `(;; There are many failing tests and many are known to fail upstream.
765 #:tests? #f
766
767 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
768 ;; gremlin) doesn't support it yet, so skip this phase.
769 #:validate-runpath? #f
770
771 #:modules ((guix build utils)
772 (guix build gnu-build-system)
773 (srfi srfi-19))
774
775 #:configure-flags
776 `("--enable-bootstrap"
777 "--enable-nss"
778 "--without-rhino"
779 "--with-parallel-jobs"
780 "--disable-downloading"
781 "--disable-tests"
782 ,(string-append "--with-ecj="
783 (assoc-ref %build-inputs "ecj")
784 "/share/java/ecj-bootstrap.jar")
785 ,(string-append "--with-jar="
786 (assoc-ref %build-inputs "fastjar")
787 "/bin/fastjar")
788 ,(string-append "--with-jdk-home="
789 (assoc-ref %build-inputs "classpath"))
790 ,(string-append "--with-java="
791 (assoc-ref %build-inputs "jamvm")
792 "/bin/jamvm"))
793 #:phases
794 (modify-phases %standard-phases
795 (replace 'unpack
796 (lambda* (#:key source inputs #:allow-other-keys)
2c8ac364
MW
797 (invoke "tar" "xvf" source)
798 (chdir (string-append "icedtea6-" ,version))
799 (mkdir "openjdk")
800 (copy-recursively (assoc-ref inputs "openjdk-src") "openjdk")
801 ;; The convenient OpenJDK source bundle is no longer
802 ;; available for download, so we have to take the sources
803 ;; from the Mercurial repositories and change the Makefile
804 ;; to avoid tests for the OpenJDK zip archive.
805 (with-directory-excursion "openjdk"
806 (for-each (lambda (part)
807 (mkdir part)
808 (copy-recursively
809 (assoc-ref inputs
810 (string-append part "-src"))
811 part))
873325b0 812 '("jdk" "corba"
2c8ac364 813 "langtools" "jaxp" "jaxws")))
873325b0
MB
814 (with-directory-excursion "openjdk"
815 (invoke "tar" "xvf" (assoc-ref inputs "hotspot-src"))
816 (rename-file "hg-checkout" "hotspot"))
306c1e61
RW
817 (substitute* "patches/freetypeversion.patch"
818 (("REQUIRED_FREETYPE_VERSION = 2.2.1")
819 "REQUIRED_FREETYPE_VERSION = 2.10.1"))
2c8ac364
MW
820 (substitute* "Makefile.in"
821 (("echo \"ERROR: No up-to-date OpenJDK zip available\"; exit -1;")
822 "echo \"trust me\";")
823 ;; The contents of the bootstrap directory must be
824 ;; writeable but when copying from the store they are
825 ;; not.
826 (("mkdir -p lib/rt" line)
827 (string-append line "; chmod -R u+w $(BOOT_DIR)")))
828 (invoke "chmod" "-R" "u+w" "openjdk")))
98419316
RW
829 (add-after 'unpack 'use-classpath
830 (lambda* (#:key inputs #:allow-other-keys)
b5a0d427
RW
831 (let ((jvmlib (assoc-ref inputs "classpath"))
832 (jamvm (assoc-ref inputs "jamvm")))
98419316
RW
833 ;; Classpath does not provide rt.jar.
834 (substitute* "Makefile.in"
835 (("\\$\\(SYSTEM_JDK_DIR\\)/jre/lib/rt.jar")
836 (string-append jvmlib "/share/classpath/glibj.zip")))
837 ;; Make sure we can find all classes.
838 (setenv "CLASSPATH"
839 (string-append jvmlib "/share/classpath/glibj.zip:"
b5a0d427
RW
840 jvmlib "/share/classpath/tools.zip:"
841 jamvm "/lib/rt.jar"))
98419316
RW
842 (setenv "JAVACFLAGS"
843 (string-append "-cp "
844 jvmlib "/share/classpath/glibj.zip:"
845 jvmlib "/share/classpath/tools.zip")))
846 #t))
847 (add-after 'unpack 'patch-patches
848 (lambda _
849 ;; shebang in patches so that they apply cleanly
850 (substitute* '("patches/jtreg-jrunscript.patch"
851 "patches/hotspot/hs23/drop_unlicensed_test.patch")
852 (("#!/bin/sh") (string-append "#!" (which "sh"))))
853 #t))
854 (add-after 'unpack 'patch-paths
855 (lambda* (#:key inputs #:allow-other-keys)
856 ;; buildtree.make generates shell scripts, so we need to replace
857 ;; the generated shebang
858 (substitute* '("openjdk/hotspot/make/linux/makefiles/buildtree.make")
859 (("/bin/sh") (which "bash")))
860
861 (let ((corebin (string-append
862 (assoc-ref inputs "coreutils") "/bin/"))
863 (binbin (string-append
864 (assoc-ref inputs "binutils") "/bin/"))
865 (grepbin (string-append
866 (assoc-ref inputs "grep") "/bin/")))
867 (substitute* '("openjdk/jdk/make/common/shared/Defs-linux.gmk"
868 "openjdk/corba/make/common/shared/Defs-linux.gmk")
869 (("UNIXCOMMAND_PATH = /bin/")
870 (string-append "UNIXCOMMAND_PATH = " corebin))
871 (("USRBIN_PATH = /usr/bin/")
872 (string-append "USRBIN_PATH = " corebin))
873 (("DEVTOOLS_PATH *= */usr/bin/")
874 (string-append "DEVTOOLS_PATH = " corebin))
875 (("COMPILER_PATH *= */usr/bin/")
876 (string-append "COMPILER_PATH = "
877 (assoc-ref inputs "gcc") "/bin/"))
878 (("DEF_OBJCOPY *=.*objcopy")
879 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
880
881 ;; fix path to alsa header
882 (substitute* "openjdk/jdk/make/common/shared/Sanity.gmk"
883 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
884 (string-append "ALSA_INCLUDE="
885 (assoc-ref inputs "alsa-lib")
886 "/include/alsa/version.h")))
887
888 ;; fix hard-coded utility paths
889 (substitute* '("openjdk/jdk/make/common/shared/Defs-utils.gmk"
890 "openjdk/corba/make/common/shared/Defs-utils.gmk")
891 (("ECHO *=.*echo")
892 (string-append "ECHO = " (which "echo")))
893 (("^GREP *=.*grep")
894 (string-append "GREP = " (which "grep")))
895 (("EGREP *=.*egrep")
896 (string-append "EGREP = " (which "egrep")))
897 (("CPIO *=.*cpio")
898 (string-append "CPIO = " (which "cpio")))
899 (("READELF *=.*readelf")
900 (string-append "READELF = " (which "readelf")))
901 (("^ *AR *=.*ar")
902 (string-append "AR = " (which "ar")))
903 (("^ *TAR *=.*tar")
904 (string-append "TAR = " (which "tar")))
905 (("AS *=.*as")
906 (string-append "AS = " (which "as")))
907 (("LD *=.*ld")
908 (string-append "LD = " (which "ld")))
909 (("STRIP *=.*strip")
910 (string-append "STRIP = " (which "strip")))
911 (("NM *=.*nm")
912 (string-append "NM = " (which "nm")))
913 (("^SH *=.*sh")
914 (string-append "SH = " (which "bash")))
915 (("^FIND *=.*find")
916 (string-append "FIND = " (which "find")))
917 (("LDD *=.*ldd")
918 (string-append "LDD = " (which "ldd")))
919 (("NAWK *=.*(n|g)awk")
920 (string-append "NAWK = " (which "gawk")))
921 (("XARGS *=.*xargs")
922 (string-append "XARGS = " (which "xargs")))
923 (("UNZIP *=.*unzip")
924 (string-append "UNZIP = " (which "unzip")))
925 (("ZIPEXE *=.*zip")
926 (string-append "ZIPEXE = " (which "zip")))
927 (("SED *=.*sed")
928 (string-append "SED = " (which "sed"))))
929
930 ;; Some of these timestamps cause problems as they are more than
931 ;; 10 years ago, failing the build process.
932 (substitute*
933 "openjdk/jdk/src/share/classes/java/util/CurrencyData.properties"
934 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
935 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
936 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
937 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY"))
938 #t)))
939 (add-before 'configure 'set-additional-paths
940 (lambda* (#:key inputs #:allow-other-keys)
941 (setenv "CPATH"
942 (string-append (assoc-ref inputs "libxrender")
943 "/include/X11/extensions" ":"
944 (assoc-ref inputs "libxtst")
945 "/include/X11/extensions" ":"
946 (assoc-ref inputs "libxinerama")
947 "/include/X11/extensions" ":"
948 (or (getenv "CPATH") "")))
949 (setenv "ALT_CUPS_HEADERS_PATH"
950 (string-append (assoc-ref inputs "cups")
951 "/include"))
952 (setenv "ALT_FREETYPE_HEADERS_PATH"
953 (string-append (assoc-ref inputs "freetype")
954 "/include"))
955 (setenv "ALT_FREETYPE_LIB_PATH"
956 (string-append (assoc-ref inputs "freetype")
957 "/lib"))
958 #t))
0bc11cc7
GB
959 (add-before 'build 'disable-os-version-check
960 ;; allow build on linux major version change
961 (lambda _
962 (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok")
963 #t))
98419316
RW
964 (replace 'install
965 (lambda* (#:key outputs #:allow-other-keys)
966 (let ((doc (string-append (assoc-ref outputs "doc")
967 "/share/doc/icedtea"))
968 (jre (assoc-ref outputs "out"))
969 (jdk (assoc-ref outputs "jdk")))
970 (copy-recursively "openjdk.build/docs" doc)
971 (copy-recursively "openjdk.build/j2re-image" jre)
972 (copy-recursively "openjdk.build/j2sdk-image" jdk))
973 #t)))))
974 (native-inputs
975 `(("ant" ,ant-bootstrap)
976 ("alsa-lib" ,alsa-lib)
977 ("attr" ,attr)
978 ("classpath" ,classpath-devel)
979 ("coreutils" ,coreutils)
980 ("cpio" ,cpio)
981 ("cups" ,cups)
982 ("ecj" ,ecj-bootstrap)
b5a0d427 983 ("ecj-javac" ,ecj-javac-wrapper-final)
98419316
RW
984 ("fastjar" ,fastjar)
985 ("fontconfig" ,fontconfig)
986 ("freetype" ,freetype)
987 ("gtk" ,gtk+-2)
988 ("gawk" ,gawk)
989 ("giflib" ,giflib)
990 ("grep" ,grep)
991 ("jamvm" ,jamvm)
992 ("lcms" ,lcms)
4bd428a7 993 ("libjpeg" ,libjpeg-turbo)
bcb078a4 994 ("libnsl" ,libnsl)
98419316
RW
995 ("libpng" ,libpng)
996 ("libtool" ,libtool)
997 ("libx11" ,libx11)
998 ("libxcomposite" ,libxcomposite)
999 ("libxi" ,libxi)
1000 ("libxinerama" ,libxinerama)
1001 ("libxrender" ,libxrender)
1002 ("libxslt" ,libxslt) ;for xsltproc
1003 ("libxt" ,libxt)
1004 ("libxtst" ,libxtst)
1005 ("mit-krb5" ,mit-krb5)
1006 ("nss" ,nss)
1007 ("nss-certs" ,nss-certs)
1008 ("perl" ,perl)
1009 ("pkg-config" ,pkg-config)
1010 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
1011 ("unzip" ,unzip)
1012 ("wget" ,wget)
1013 ("which" ,which)
1014 ("zip" ,zip)
1015 ("zlib" ,zlib)
1016 ("openjdk-src"
1017 ,(origin
1018 (method hg-fetch)
1019 (uri (hg-reference
1020 (url "http://hg.openjdk.java.net/jdk6/jdk6/")
1021 (changeset "jdk6-b41")))
1022 (sha256
1023 (base32
1024 "14q47yfg586fs64w30g8mk92m5dkxsvr36zzh0ra99xk5x0x96mv"))))
1025 ("jdk-src"
1026 ,(origin
1027 (method hg-fetch)
1028 (uri (hg-reference
1029 (url "http://hg.openjdk.java.net/jdk6/jdk6/jdk/")
1030 (changeset "jdk6-b41")))
1031 (sha256
1032 (base32
1033 "165824nhg1k1dx6zs9dny0j49rmk35jw5b13dmz8c77jfajml4v9"))))
1034 ("hotspot-src"
1035 ,(origin
1036 (method hg-fetch)
1037 (uri (hg-reference
1038 (url "http://hg.openjdk.java.net/jdk6/jdk6/hotspot/")
1039 (changeset "jdk6-b41")))
1040 (sha256
1041 (base32
1cdff8cd
GB
1042 "07lc1z4k5dj9nrc1wvwmpvxr3xgxrdkdh53xb95skk5ij49yagfd"))
1043 (patches
1044 (search-patches "icedtea-6-hotspot-gcc-segfault-workaround.patch"))))
98419316
RW
1045 ("corba-src"
1046 ,(origin
1047 (method hg-fetch)
1048 (uri (hg-reference
1049 (url "http://hg.openjdk.java.net/jdk6/jdk6/corba/")
1050 (changeset "jdk6-b41")))
1051 (sha256
1052 (base32
1053 "1p9g1r9dnax2iwp7yb59qx7m4nmshqhwmrb2b8jj8zgbd9dl2i3q"))))
1054 ("langtools-src"
1055 ,(origin
1056 (method hg-fetch)
1057 (uri (hg-reference
1058 (url "http://hg.openjdk.java.net/jdk6/jdk6/langtools/")
1059 (changeset "jdk6-b41")))
1060 (sha256
1061 (base32
1062 "1x52wd67fynbbd9ild6fb4wvba3f5hhwk03qdjfazd0a1qr37z3d"))))
1063 ("jaxp-src"
1064 ,(origin
1065 (method hg-fetch)
1066 (uri (hg-reference
1067 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxp/")
1068 (changeset "jdk6-b41")))
1069 (sha256
1070 (base32
1071 "0shlqrvzpr4nrkmv215lbxnby63s3yvbdh1yxcayznsyqwa4nlxm"))))
1072 ("jaxws-src"
1073 ,(origin
1074 (method hg-fetch)
1075 (uri (hg-reference
1076 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxws/")
1077 (changeset "jdk6-b41")))
1078 (sha256
1079 (base32
1080 "0835lkw8vib1xhp8lxnybhlvzdh699hbi4mclxanydjk63zbpxk0"))))))
1081 (home-page "http://icedtea.classpath.org")
1082 (synopsis "Java development kit")
1083 (description
1084 "This package provides the OpenJDK built with the IcedTea build harness.
1085This version of the OpenJDK is no longer maintained and is only used for
1086bootstrapping purposes.")
1087 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1088 ;; same license as both GNU Classpath and OpenJDK.
1089 (license license:gpl2+)))
1090
a243e12a 1091(define-public icedtea-7
7f6485e7 1092 (let* ((version "2.6.13")
f6789047
RW
1093 (drop (lambda (name hash)
1094 (origin
1095 (method url-fetch)
1096 (uri (string-append
d30ce4a7 1097 "http://icedtea.classpath.org/download/drops"
f6789047
RW
1098 "/icedtea7/" version "/" name ".tar.bz2"))
1099 (sha256 (base32 hash))))))
71053e14
RW
1100 (package
1101 (name "icedtea")
f6789047
RW
1102 (version version)
1103 (source (origin
1104 (method url-fetch)
1105 (uri (string-append
1106 "http://icedtea.wildebeest.org/download/source/icedtea-"
1107 version ".tar.xz"))
1108 (sha256
1109 (base32
7f6485e7 1110 "1w331rdqx1dcx2xb0fmjmrkdc71xqn20fxsgw8by4xhiblh88khh"))
f6789047
RW
1111 (modules '((guix build utils)))
1112 (snippet
6cbee49d
MW
1113 '(begin
1114 (substitute* "Makefile.in"
1115 ;; do not leak information about the build host
1116 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
1117 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
1118 #t))))
71053e14
RW
1119 (build-system gnu-build-system)
1120 (outputs '("out" ; Java Runtime Environment
1121 "jdk" ; Java Development Kit
1122 "doc")) ; all documentation
f6789047
RW
1123 (arguments
1124 `(;; There are many test failures. Some are known to
1125 ;; fail upstream, others relate to not having an X
1126 ;; server running at test time, yet others are a
1127 ;; complete mystery to me.
1128
1129 ;; hotspot: passed: 241; failed: 45; error: 2
1130 ;; langtools: passed: 1,934; failed: 26
1131 ;; jdk: unknown
1132 #:tests? #f
71053e14
RW
1133
1134 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
1135 ;; gremlin) doesn't support it yet, so skip this phase.
1136 #:validate-runpath? #f
1137
f6789047
RW
1138 ;; Apparently, the C locale is needed for some of the tests.
1139 #:locale "C"
71053e14
RW
1140
1141 #:modules ((guix build utils)
1142 (guix build gnu-build-system)
1143 (ice-9 match)
1144 (ice-9 popen)
71053e14
RW
1145 (srfi srfi-19)
1146 (srfi srfi-26))
1147
1148 #:configure-flags
e2098e2d
RW
1149 ;; TODO: package pcsc and sctp, and add to inputs
1150 `("--disable-system-pcsc"
1151 "--disable-system-sctp"
1152 "--enable-bootstrap"
1153 "--enable-nss"
1154 "--without-rhino"
1155 "--disable-downloading"
1156 "--disable-tests" ;they are run in the check phase instead
1157 "--with-openjdk-src-dir=./openjdk.src"
1158 ,(string-append "--with-jdk-home="
1159 (assoc-ref %build-inputs "jdk")))
71053e14
RW
1160
1161 #:phases
1162 (modify-phases %standard-phases
1163 (replace 'unpack
1164 (lambda* (#:key source inputs #:allow-other-keys)
1165 (let ((target (string-append "icedtea-" ,version))
1166 (unpack (lambda* (name #:optional dir)
1167 (let ((dir (or dir
1168 (string-drop-right name 5))))
1169 (mkdir dir)
2c8ac364
MW
1170 (invoke "tar" "xvf"
1171 (assoc-ref inputs name)
1172 "-C" dir
1173 "--strip-components=1")))))
71053e14 1174 (mkdir target)
2c8ac364
MW
1175 (invoke "tar" "xvf" source
1176 "-C" target "--strip-components=1")
1177 (chdir target)
1178 (unpack "openjdk-src" "openjdk.src")
1179 (with-directory-excursion "openjdk.src"
1180 (for-each unpack
1181 (filter (cut string-suffix? "-drop" <>)
1182 (map (match-lambda
1183 ((name . _) name))
1184 inputs))))
1185 #t)))
6b7e09ae
RW
1186 (add-after 'unpack 'patch-bitrot
1187 (lambda _
1188 (substitute* '("patches/boot/revert-6973616.patch"
1189 "openjdk.src/jdk/make/common/shared/Defs-versions.gmk")
1190 (("REQUIRED_FREETYPE_VERSION = 2.2.1")
1191 "REQUIRED_FREETYPE_VERSION = 2.10.1"))
1192 ;; As of attr 2.4.48 this header is no longer
1193 ;; included. It is provided by the libc instead.
1194 (substitute* '("configure"
1195 "openjdk.src/jdk/src/solaris/native/sun/nio/fs/LinuxNativeDispatcher.c")
1196 (("attr/xattr.h") "sys/xattr.h"))
1197 #t))
71053e14
RW
1198 (add-after 'unpack 'fix-x11-extension-include-path
1199 (lambda* (#:key inputs #:allow-other-keys)
1200 (substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk"
1201 (((string-append "\\$\\(firstword \\$\\(wildcard "
1202 "\\$\\(OPENWIN_HOME\\)"
1203 "/include/X11/extensions\\).*$"))
1204 (string-append (assoc-ref inputs "libxrender")
1205 "/include/X11/extensions"
1206 " -I" (assoc-ref inputs "libxtst")
1207 "/include/X11/extensions"
1208 " -I" (assoc-ref inputs "libxinerama")
1209 "/include/X11/extensions"))
1210 (("\\$\\(wildcard /usr/include/X11/extensions\\)\\)") ""))
1211 #t))
1212 (add-after 'unpack 'patch-paths
1213 (lambda _
1214 ;; buildtree.make generates shell scripts, so we need to replace
1215 ;; the generated shebang
1216 (substitute* '("openjdk.src/hotspot/make/linux/makefiles/buildtree.make")
1217 (("/bin/sh") (which "bash")))
1218
1219 (let ((corebin (string-append
1220 (assoc-ref %build-inputs "coreutils") "/bin/"))
1221 (binbin (string-append
1222 (assoc-ref %build-inputs "binutils") "/bin/"))
1223 (grepbin (string-append
1224 (assoc-ref %build-inputs "grep") "/bin/")))
1225 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-linux.gmk"
1226 "openjdk.src/corba/make/common/shared/Defs-linux.gmk")
1227 (("UNIXCOMMAND_PATH = /bin/")
1228 (string-append "UNIXCOMMAND_PATH = " corebin))
1229 (("USRBIN_PATH = /usr/bin/")
1230 (string-append "USRBIN_PATH = " corebin))
1231 (("DEVTOOLS_PATH *= */usr/bin/")
1232 (string-append "DEVTOOLS_PATH = " corebin))
1233 (("COMPILER_PATH *= */usr/bin/")
1234 (string-append "COMPILER_PATH = "
1235 (assoc-ref %build-inputs "gcc") "/bin/"))
1236 (("DEF_OBJCOPY *=.*objcopy")
1237 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
1238
1239 ;; fix path to alsa header
1240 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1241 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1242 (string-append "ALSA_INCLUDE="
1243 (assoc-ref %build-inputs "alsa-lib")
1244 "/include/alsa/version.h")))
1245
1246 ;; fix hard-coded utility paths
1247 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-utils.gmk"
1248 "openjdk.src/corba/make/common/shared/Defs-utils.gmk")
1249 (("ECHO *=.*echo")
1250 (string-append "ECHO = " (which "echo")))
1251 (("^GREP *=.*grep")
1252 (string-append "GREP = " (which "grep")))
1253 (("EGREP *=.*egrep")
1254 (string-append "EGREP = " (which "egrep")))
1255 (("CPIO *=.*cpio")
1256 (string-append "CPIO = " (which "cpio")))
1257 (("READELF *=.*readelf")
1258 (string-append "READELF = " (which "readelf")))
1259 (("^ *AR *=.*ar")
1260 (string-append "AR = " (which "ar")))
1261 (("^ *TAR *=.*tar")
1262 (string-append "TAR = " (which "tar")))
1263 (("AS *=.*as")
1264 (string-append "AS = " (which "as")))
1265 (("LD *=.*ld")
1266 (string-append "LD = " (which "ld")))
1267 (("STRIP *=.*strip")
1268 (string-append "STRIP = " (which "strip")))
1269 (("NM *=.*nm")
1270 (string-append "NM = " (which "nm")))
1271 (("^SH *=.*sh")
1272 (string-append "SH = " (which "bash")))
1273 (("^FIND *=.*find")
1274 (string-append "FIND = " (which "find")))
1275 (("LDD *=.*ldd")
1276 (string-append "LDD = " (which "ldd")))
1277 (("NAWK *=.*(n|g)awk")
1278 (string-append "NAWK = " (which "gawk")))
1279 (("XARGS *=.*xargs")
1280 (string-append "XARGS = " (which "xargs")))
1281 (("UNZIP *=.*unzip")
1282 (string-append "UNZIP = " (which "unzip")))
1283 (("ZIPEXE *=.*zip")
1284 (string-append "ZIPEXE = " (which "zip")))
1285 (("SED *=.*sed")
1286 (string-append "SED = " (which "sed"))))
1287
1288 ;; Some of these timestamps cause problems as they are more than
1289 ;; 10 years ago, failing the build process.
1290 (substitute*
1291 "openjdk.src/jdk/src/share/classes/java/util/CurrencyData.properties"
1292 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
1293 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
1294 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
1295 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY")))
1296 #t))
1297 (add-before 'configure 'set-additional-paths
1298 (lambda* (#:key inputs #:allow-other-keys)
e2098e2d
RW
1299 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1300 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1301 (string-append "ALSA_INCLUDE="
1302 (assoc-ref inputs "alsa-lib")
1303 "/include/alsa/version.h")))
1304 (setenv "CC" "gcc")
1305 (setenv "CPATH"
1306 (string-append (assoc-ref inputs "libxcomposite")
1307 "/include/X11/extensions" ":"
1308 (assoc-ref inputs "libxrender")
1309 "/include/X11/extensions" ":"
1310 (assoc-ref inputs "libxtst")
1311 "/include/X11/extensions" ":"
1312 (assoc-ref inputs "libxinerama")
1313 "/include/X11/extensions" ":"
1314 (or (getenv "CPATH") "")))
1315 (setenv "ALT_OBJCOPY" (which "objcopy"))
1316 (setenv "ALT_CUPS_HEADERS_PATH"
1317 (string-append (assoc-ref inputs "cups")
1318 "/include"))
1319 (setenv "ALT_FREETYPE_HEADERS_PATH"
1320 (string-append (assoc-ref inputs "freetype")
1321 "/include"))
1322 (setenv "ALT_FREETYPE_LIB_PATH"
1323 (string-append (assoc-ref inputs "freetype")
1324 "/lib"))
71053e14 1325 #t))
59199e1a
GB
1326 (add-before 'build 'disable-os-version-check
1327 ;; allow build on linux major version change
1328 (lambda _
1329 (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok")
1330 #t))
71053e14
RW
1331 (add-before 'check 'fix-test-framework
1332 (lambda _
1333 ;; Fix PATH in test environment
1334 (substitute* "test/jtreg/com/sun/javatest/regtest/Main.java"
1335 (("PATH=/bin:/usr/bin")
1336 (string-append "PATH=" (getenv "PATH"))))
1337 (substitute* "test/jtreg/com/sun/javatest/util/SysEnv.java"
1338 (("/usr/bin/env") (which "env")))
1339 (substitute* "openjdk.src/hotspot/test/test_env.sh"
1340 (("/bin/rm") (which "rm"))
1341 (("/bin/cp") (which "cp"))
1342 (("/bin/mv") (which "mv")))
1343 #t))
1344 (add-before 'check 'fix-hotspot-tests
1345 (lambda _
1346 (with-directory-excursion "openjdk.src/hotspot/test/"
1347 (substitute* "jprt.config"
1348 (("PATH=\"\\$\\{path4sdk\\}\"")
1349 (string-append "PATH=" (getenv "PATH")))
1350 (("make=/usr/bin/make")
1351 (string-append "make=" (which "make"))))
1352 (substitute* '("runtime/6626217/Test6626217.sh"
1353 "runtime/7110720/Test7110720.sh")
1354 (("/bin/rm") (which "rm"))
1355 (("/bin/cp") (which "cp"))
1356 (("/bin/mv") (which "mv"))))
1357 #t))
1358 (add-before 'check 'fix-jdk-tests
1359 (lambda _
1360 (with-directory-excursion "openjdk.src/jdk/test/"
1361 (substitute* "com/sun/jdi/JdbReadTwiceTest.sh"
1362 (("/bin/pwd") (which "pwd")))
1363 (substitute* "com/sun/jdi/ShellScaffold.sh"
1364 (("/bin/kill") (which "kill")))
1365 (substitute* "start-Xvfb.sh"
1366 ;;(("/usr/bin/X11/Xvfb") (which "Xvfb"))
1367 (("/usr/bin/nohup") (which "nohup")))
1368 (substitute* "javax/security/auth/Subject/doAs/Test.sh"
1369 (("/bin/rm") (which "rm")))
1370 (substitute* "tools/launcher/MultipleJRE.sh"
1371 (("echo \"#!/bin/sh\"")
1372 (string-append "echo \"#!" (which "rm") "\""))
1373 (("/usr/bin/zip") (which "zip")))
1374 (substitute* "com/sun/jdi/OnThrowTest.java"
1375 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1376 (substitute* "java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java"
1377 (("/usr/bin/uptime") (which "uptime")))
1378 (substitute* "java/lang/ProcessBuilder/Basic.java"
1379 (("/usr/bin/env") (which "env"))
1380 (("/bin/false") (which "false"))
1381 (("/bin/true") (which "true"))
1382 (("/bin/cp") (which "cp"))
1383 (("/bin/sh") (which "sh")))
1384 (substitute* "java/lang/ProcessBuilder/FeelingLucky.java"
1385 (("/bin/sh") (which "sh")))
1386 (substitute* "java/lang/ProcessBuilder/Zombies.java"
1387 (("/usr/bin/perl") (which "perl"))
1388 (("/bin/ps") (which "ps"))
1389 (("/bin/true") (which "true")))
1390 (substitute* "java/lang/Runtime/exec/ConcurrentRead.java"
1391 (("/usr/bin/tee") (which "tee")))
1392 (substitute* "java/lang/Runtime/exec/ExecWithDir.java"
1393 (("/bin/true") (which "true")))
1394 (substitute* "java/lang/Runtime/exec/ExecWithInput.java"
1395 (("/bin/cat") (which "cat")))
1396 (substitute* "java/lang/Runtime/exec/ExitValue.java"
1397 (("/bin/sh") (which "sh"))
1398 (("/bin/true") (which "true"))
1399 (("/bin/kill") (which "kill")))
1400 (substitute* "java/lang/Runtime/exec/LotsOfDestroys.java"
1401 (("/usr/bin/echo") (which "echo")))
1402 (substitute* "java/lang/Runtime/exec/LotsOfOutput.java"
1403 (("/usr/bin/cat") (which "cat")))
1404 (substitute* "java/lang/Runtime/exec/SleepyCat.java"
1405 (("/bin/cat") (which "cat"))
1406 (("/bin/sleep") (which "sleep"))
1407 (("/bin/sh") (which "sh")))
1408 (substitute* "java/lang/Runtime/exec/StreamsSurviveDestroy.java"
1409 (("/bin/cat") (which "cat")))
1410 (substitute* "java/rmi/activation/CommandEnvironment/SetChildEnv.java"
1411 (("/bin/chmod") (which "chmod")))
1412 (substitute* "java/util/zip/ZipFile/Assortment.java"
1413 (("/bin/sh") (which "sh"))))
1414 #t))
1415 (replace 'check
1416 (lambda _
1417 ;; The "make check-*" targets always return zero, so we need to
1418 ;; check for errors in the associated log files to determine
1419 ;; whether any tests have failed.
1420 (use-modules (ice-9 rdelim))
1421 (let* ((error-pattern (make-regexp "^(Error|FAILED):.*"))
1422 (checker (lambda (port)
1423 (let loop ()
1424 (let ((line (read-line port)))
1425 (cond
1426 ((eof-object? line) #t)
2c8ac364
MW
1427 ((regexp-exec error-pattern line)
1428 (error "test failed"))
71053e14
RW
1429 (else (loop)))))))
1430 (run-test (lambda (test)
2c8ac364 1431 (invoke "make" test)
71053e14
RW
1432 (call-with-input-file
1433 (string-append "test/" test ".log")
1434 checker))))
2c8ac364
MW
1435 (when #f ; skip tests
1436 (run-test "check-hotspot")
1437 (run-test "check-langtools")
fa41a089
MW
1438 (run-test "check-jdk"))
1439 #t)))
71053e14
RW
1440 (replace 'install
1441 (lambda* (#:key outputs #:allow-other-keys)
1442 (let ((doc (string-append (assoc-ref outputs "doc")
1443 "/share/doc/icedtea"))
1444 (jre (assoc-ref outputs "out"))
1445 (jdk (assoc-ref outputs "jdk")))
1446 (copy-recursively "openjdk.build/docs" doc)
1447 (copy-recursively "openjdk.build/j2re-image" jre)
1448 (copy-recursively "openjdk.build/j2sdk-image" jdk))
1449 #t))
491dc2fb
RJ
1450 ;; Some of the libraries in the lib/amd64 folder link to libjvm.so.
1451 ;; But that shared object is located in the server/ folder, so it
1452 ;; cannot be found. This phase creates a symbolic link in the
1453 ;; lib/amd64 folder so that the other libraries can find it.
1454 ;;
1455 ;; See:
1456 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1457 ;;
1458 ;; FIXME: Find the bug in the build system, so that this symlink is
1459 ;; not needed.
1460 (add-after 'install 'install-libjvm
1461 (lambda* (#:key inputs outputs #:allow-other-keys)
1462 (let* ((lib-path (string-append (assoc-ref outputs "out")
d3e22bcc
LC
1463 ;; See 'INSTALL_ARCH_DIR' in
1464 ;; 'configure'.
1b6f99ea
RW
1465 ,(match (%current-system)
1466 ("i686-linux"
048d21a8 1467 "/lib/i386")
1b6f99ea 1468 ("x86_64-linux"
048d21a8 1469 "/lib/amd64")
d3e22bcc 1470 ("armhf-linux"
048d21a8 1471 "/lib/arm")
d3e22bcc 1472 ("aarch64-linux"
41763008
EF
1473 "/lib/aarch64")
1474 ;; We need a catch-all, dropping
1475 ;; '-linux' works in most cases.
1476 (_
1477 (string-append
1478 "/lib/"
1479 (string-drop-right
1480 (%current-system) 6)))))))
491dc2fb
RJ
1481 (symlink (string-append lib-path "/server/libjvm.so")
1482 (string-append lib-path "/libjvm.so")))
1483 #t))
71053e14
RW
1484 ;; By default IcedTea only generates an empty keystore. In order to
1485 ;; be able to use certificates in Java programs we need to generate a
1486 ;; keystore from a set of certificates. For convenience we use the
1487 ;; certificates from the nss-certs package.
1488 (add-after 'install 'install-keystore
1489 (lambda* (#:key inputs outputs #:allow-other-keys)
1490 (let* ((keystore "cacerts")
1491 (certs-dir (string-append (assoc-ref inputs "nss-certs")
1492 "/etc/ssl/certs"))
1493 (keytool (string-append (assoc-ref outputs "jdk")
1494 "/bin/keytool")))
1495 (define (extract-cert file target)
1496 (call-with-input-file file
1497 (lambda (in)
1498 (call-with-output-file target
1499 (lambda (out)
1500 (let loop ((line (read-line in 'concat))
1501 (copying? #f))
1502 (cond
1503 ((eof-object? line) #t)
1504 ((string-prefix? "-----BEGIN" line)
1505 (display line out)
1506 (loop (read-line in 'concat) #t))
1507 ((string-prefix? "-----END" line)
1508 (display line out)
1509 #t)
1510 (else
1511 (when copying? (display line out))
1512 (loop (read-line in 'concat) copying?)))))))))
1513 (define (import-cert cert)
1514 (format #t "Importing certificate ~a\n" (basename cert))
1515 (let ((temp "tmpcert"))
1516 (extract-cert cert temp)
1517 (let ((port (open-pipe* OPEN_WRITE keytool
1518 "-import"
1519 "-alias" (basename cert)
1520 "-keystore" keystore
1521 "-storepass" "changeit"
1522 "-file" temp)))
1523 (display "yes\n" port)
1524 (when (not (zero? (status:exit-val (close-pipe port))))
1525 (format #t "failed to import ~a\n" cert)))
1526 (delete-file temp)))
1527
1528 ;; This is necessary because the certificate directory contains
1529 ;; files with non-ASCII characters in their names.
1530 (setlocale LC_ALL "en_US.utf8")
1531 (setenv "LC_ALL" "en_US.utf8")
1532
1533 (for-each import-cert (find-files certs-dir "\\.pem$"))
1534 (mkdir-p (string-append (assoc-ref outputs "out")
1535 "/lib/security"))
1536 (mkdir-p (string-append (assoc-ref outputs "jdk")
1537 "/jre/lib/security"))
1538
1539 ;; The cacerts files we are going to overwrite are chmod'ed as
1540 ;; read-only (444) in icedtea-8 (which derives from this
1541 ;; package). We have to change this so we can overwrite them.
1542 (chmod (string-append (assoc-ref outputs "out")
1543 "/lib/security/" keystore) #o644)
1544 (chmod (string-append (assoc-ref outputs "jdk")
1545 "/jre/lib/security/" keystore) #o644)
1546
1547 (install-file keystore
1548 (string-append (assoc-ref outputs "out")
1549 "/lib/security"))
1550 (install-file keystore
1551 (string-append (assoc-ref outputs "jdk")
1552 "/jre/lib/security"))
1553 #t))))))
f6789047 1554 (native-inputs
d9148890 1555 `(("openjdk-src"
f6789047 1556 ,(drop "openjdk"
7f6485e7 1557 "0l34ikyf62hbzlf9032alzkkqvf7bpmckz4gvirvph755w7gka8l"))
f6789047
RW
1558 ("corba-drop"
1559 ,(drop "corba"
7f6485e7 1560 "050gv2jbg1pi6qkn8w18bwpbklfa5b0kymjvan9pncddbj8m84fz"))
f6789047
RW
1561 ("jaxp-drop"
1562 ,(drop "jaxp"
7f6485e7 1563 "1k6yldwnxfzdg5926r1nlfv8d1r1j7rlp2nkz6gqh05vgyamnfhl"))
f6789047
RW
1564 ("jaxws-drop"
1565 ,(drop "jaxws"
7f6485e7 1566 "110j7jlz47x2gg6f7653x12mssan5kvj9l9h1m1c8c92drfxbqyk"))
f6789047
RW
1567 ("jdk-drop"
1568 ,(drop "jdk"
7f6485e7 1569 "0d1mca38ksxvdskp9im3pp7fdijhj1n3lwq9w13r9s4v3qyskgdd"))
f6789047
RW
1570 ("langtools-drop"
1571 ,(drop "langtools"
7f6485e7 1572 "0nq5236fzxn3p6x8cgncl56mzcmsj07q9gymysnws4c8byc6n0qj"))
f6789047 1573 ("hotspot-drop"
db024183
GB
1574 ,(origin
1575 (method url-fetch)
1576 (uri (string-append
1577 "http://icedtea.classpath.org/downloads/drops"
1578 "/icedtea7/" version "/hotspot.tar.bz2"))
1579 (sha256
1580 (base32
1581 "17bdv39n4lh8l5737c96f3xgamx4y305m067p01cywgp7zaddqws"))
1582 (patches (search-patches
1583 "icedtea-7-hotspot-gcc-segfault-workaround.patch"))))
e2098e2d 1584 ("ant" ,ant-bootstrap)
71053e14 1585 ("attr" ,attr)
71053e14
RW
1586 ("coreutils" ,coreutils)
1587 ("diffutils" ,diffutils) ;for tests
1588 ("gawk" ,gawk)
1589 ("grep" ,grep)
1590 ("libtool" ,libtool)
1591 ("pkg-config" ,pkg-config)
1592 ("wget" ,wget)
1593 ("which" ,which)
1594 ("cpio" ,cpio)
1595 ("zip" ,zip)
1596 ("unzip" ,unzip)
1597 ("fastjar" ,fastjar)
1598 ("libxslt" ,libxslt) ;for xsltproc
1599 ("nss-certs" ,nss-certs)
1600 ("perl" ,perl)
1601 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
e2098e2d 1602 ("jdk" ,icedtea-6 "jdk")))
b711df02 1603 (inputs
71053e14
RW
1604 `(("alsa-lib" ,alsa-lib)
1605 ("cups" ,cups)
1606 ("libx11" ,libx11)
1607 ("libxcomposite" ,libxcomposite)
1608 ("libxt" ,libxt)
1609 ("libxtst" ,libxtst)
1610 ("libxi" ,libxi)
1611 ("libxinerama" ,libxinerama)
1612 ("libxrender" ,libxrender)
4bd428a7 1613 ("libjpeg" ,libjpeg-turbo)
71053e14
RW
1614 ("libpng" ,libpng)
1615 ("mit-krb5" ,mit-krb5)
1616 ("nss" ,nss)
1617 ("giflib" ,giflib)
1618 ("fontconfig" ,fontconfig)
1619 ("freetype" ,freetype)
1620 ("lcms" ,lcms)
1621 ("zlib" ,zlib)
1622 ("gtk" ,gtk+-2)))
1623 (home-page "http://icedtea.classpath.org")
1624 (synopsis "Java development kit")
1625 (description
1626 "This package provides the Java development kit OpenJDK built with the
1627IcedTea build harness.")
d3e22bcc
LC
1628
1629 ;; 'configure' lists "mips" and "mipsel", but not "mips64el'.
1630 (supported-systems (delete "mips64el-linux" %supported-systems))
1631
71053e14
RW
1632 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1633 ;; same license as both GNU Classpath and OpenJDK.
1634 (license license:gpl2+))))
d2540f80 1635
349a3147 1636(define-public icedtea-8
1d97d8ff 1637 (let* ((version "3.7.0")
349a3147
RW
1638 (drop (lambda (name hash)
1639 (origin
1640 (method url-fetch)
1641 (uri (string-append
db531f73 1642 "http://icedtea.classpath.org/download/drops"
349a3147
RW
1643 "/icedtea8/" version "/" name ".tar.xz"))
1644 (sha256 (base32 hash))))))
1645 (package (inherit icedtea-7)
1d97d8ff 1646 (version "3.7.0")
349a3147
RW
1647 (source (origin
1648 (method url-fetch)
1649 (uri (string-append
1650 "http://icedtea.wildebeest.org/download/source/icedtea-"
1651 version ".tar.xz"))
1652 (sha256
1653 (base32
1d97d8ff 1654 "09yqzn8rpccs7cyv89hhy5zlznpgqw5x3jz0w1ccp0cz1vgs8l5w"))
349a3147
RW
1655 (modules '((guix build utils)))
1656 (snippet
0c729ef4 1657 '(begin
f2785bd6
RW
1658 (substitute* '("configure"
1659 "acinclude.m4")
0c729ef4
RW
1660 ;; Do not embed build time
1661 (("(DIST_ID=\"Custom build).*$" _ prefix)
1662 (string-append prefix "\"\n"))
1663 ;; Do not leak information about the build host
1664 (("DIST_NAME=\"\\$build_os\"")
1665 "DIST_NAME=\"guix\""))
1666 #t))))
349a3147 1667 (arguments
f2785bd6
RW
1668 `(#:imported-modules
1669 ((guix build ant-build-system)
1670 (guix build syscalls)
1671 ,@%gnu-build-system-modules)
1672 ,@(substitute-keyword-arguments (package-arguments icedtea-7)
1673 ((#:modules modules)
1674 `((guix build utils)
1675 (guix build gnu-build-system)
1676 ((guix build ant-build-system) #:prefix ant:)
1677 (ice-9 match)
1678 (ice-9 popen)
1679 (srfi srfi-19)
1680 (srfi srfi-26)))
1681 ((#:configure-flags flags)
1682 `(let ((jdk (assoc-ref %build-inputs "jdk")))
1683 `( ;;"--disable-bootstrap"
1684 "--enable-bootstrap"
1685 "--enable-nss"
1686 "--disable-downloading"
1687 "--disable-system-pcsc"
1688 "--disable-system-sctp"
1689 "--disable-tests" ;they are run in the check phase instead
1690 "--with-openjdk-src-dir=./openjdk.src"
1691 ,(string-append "--with-jdk-home=" jdk))))
1692 ((#:phases phases)
1693 `(modify-phases ,phases
1694 (delete 'fix-x11-extension-include-path)
1695 (delete 'patch-paths)
1696 (delete 'set-additional-paths)
1697 (delete 'patch-patches)
6b7e09ae 1698 (delete 'patch-bitrot)
f2785bd6
RW
1699 ;; Prevent the keytool from recording the current time when
1700 ;; adding certificates at build time.
1701 (add-after 'unpack 'patch-keystore
1702 (lambda _
1703 (substitute* "openjdk.src/jdk/src/share/classes/sun/security/provider/JavaKeyStore.java"
1704 (("date = new Date\\(\\);")
1705 "\
1706date = (System.getenv(\"SOURCE_DATE_EPOCH\") != null) ?\
1707new Date(Long.parseLong(System.getenv(\"SOURCE_DATE_EPOCH\"))) :\
1708new Date();"))
1709 #t))
1710 (add-after 'unpack 'patch-jni-libs
1711 ;; Hardcode dynamically loaded libraries.
1712 (lambda _
1713 (let* ((library-path (search-path-as-string->list
1714 (getenv "LIBRARY_PATH")))
1715 (find-library (lambda (name)
1716 (search-path
1717 library-path
1718 (string-append "lib" name ".so")))))
1719 (for-each
1720 (lambda (file)
1721 (catch 'decoding-error
1722 (lambda ()
1723 (substitute* file
1724 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
1725 _ name version)
1726 (format #f "\"~a\"" (find-library name)))
1727 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
1728 (format #f "\"~a\"" (find-library name)))))
1729 (lambda _
1730 ;; Those are safe to skip.
1731 (format (current-error-port)
1732 "warning: failed to substitute: ~a~%"
1733 file))))
1734 (find-files "openjdk.src/jdk/src/solaris/native"
1735 "\\.c|\\.h"))
1736 #t)))
1737 (replace 'install
1738 (lambda* (#:key outputs #:allow-other-keys)
1739 (let ((doc (string-append (assoc-ref outputs "doc")
1740 "/share/doc/icedtea"))
1741 (jre (assoc-ref outputs "out"))
1742 (jdk (assoc-ref outputs "jdk")))
1743 (copy-recursively "openjdk.build/docs" doc)
1744 (copy-recursively "openjdk.build/images/j2re-image" jre)
1745 (copy-recursively "openjdk.build/images/j2sdk-image" jdk)
1746 ;; Install the nss.cfg file to JRE to enable SSL/TLS
1747 ;; support via NSS.
1748 (copy-file (string-append jdk "/jre/lib/security/nss.cfg")
1749 (string-append jre "/lib/security/nss.cfg"))
1750 #t)))
1751 (add-after 'install 'strip-jar-timestamps
1752 (assoc-ref ant:%standard-phases 'strip-jar-timestamps)))))))
349a3147
RW
1753 (native-inputs
1754 `(("jdk" ,icedtea-7 "jdk")
1755 ("openjdk-src"
1756 ,(drop "openjdk"
1d97d8ff 1757 "1mj6xgmw31i6qd30qi9dmv7160fbcfq5ikz1jwjihdg2793il19p"))
12eecbf0
LF
1758 ("aarch32-drop"
1759 ,(drop "aarch32"
1d97d8ff 1760 "1wb8k5zm40zld0986dvmlh5xh3gyixbg9h26sl662zy92amhmyyg"))
349a3147
RW
1761 ("corba-drop"
1762 ,(drop "corba"
1d97d8ff 1763 "11ma4zz0599cy70xd219v7a8vin7p96xrhhz3wsaw6cjhkzpagah"))
349a3147
RW
1764 ("jaxp-drop"
1765 ,(drop "jaxp"
1d97d8ff 1766 "14m1y0z0fbm5z5zjw3vnq85py8dma84bi3f9cw8rhdyc6skk8q4i"))
349a3147
RW
1767 ("jaxws-drop"
1768 ,(drop "jaxws"
1d97d8ff 1769 "09andnm6xaasnp963hgx42yiflifiljp9z7z85jrfyc5z8a5whmf"))
349a3147
RW
1770 ("jdk-drop"
1771 ,(drop "jdk"
1d97d8ff 1772 "0s6lcpc0zckz2fnq98aqf28nz9y3wbi41a3kyaqqa2abwbkm1zwl"))
349a3147
RW
1773 ("langtools-drop"
1774 ,(drop "langtools"
1d97d8ff 1775 "15wizy123vhk40chl1b4p552jf2pw2hdww0myf11qab425axz4nw"))
349a3147 1776 ("hotspot-drop"
673135df
GB
1777 ,(origin
1778 (method url-fetch)
1779 (uri (string-append
1780 "http://icedtea.classpath.org/download/drops"
1781 "/icedtea8/" version "/hotspot.tar.xz"))
1782 (sha256
1783 (base32
1784 "1ciz1w9j0kz7s1dxdhyqq71nla9icyz6qvn0b9z2zgkklqa98qmm"))
1785 (patches (search-patches
1786 "icedtea-7-hotspot-gcc-segfault-workaround.patch"))))
349a3147
RW
1787 ("nashorn-drop"
1788 ,(drop "nashorn"
1d97d8ff 1789 "19pzl3ppaw8j6r5cnyp8qiw3hxijh3hdc46l39g5yfhdl4pr4hpa"))
fd34d4f4
LF
1790 ("shenandoah-drop"
1791 ,(drop "shenandoah"
1d97d8ff 1792 "0k33anxdzw1icn072wynfmmdjhsv50hay0j1sfkfxny12rb3vgdy"))
349a3147 1793 ,@(fold alist-delete (package-native-inputs icedtea-7)
e2098e2d 1794 '("jdk" "openjdk-src" "corba-drop" "jaxp-drop" "jaxws-drop"
349a3147
RW
1795 "jdk-drop" "langtools-drop" "hotspot-drop")))))))
1796
dd741059
JL
1797(define-public openjdk9
1798 (package
1799 (name "openjdk")
1800 (version "9.181")
1801 (source (origin
1802 (method url-fetch)
1803 (uri "https://hg.openjdk.java.net/jdk/jdk/archive/3cc80be736f2.tar.bz2")
1804 (file-name (string-append name "-" version ".tar.bz2"))
1805 (sha256
1806 (base32
1807 "01ihmyf7k5z17wbr7xig7y40l9f01d5zjgkcmawn1102hw5kchpq"))
1808 (modules '((guix build utils)))
1809 (snippet
1810 `(begin
b7a1cac6
RW
1811 (for-each delete-file
1812 (find-files "." ".*.(bin|exe|jar)$"))
dd741059
JL
1813 #t))))
1814 (build-system gnu-build-system)
1815 (outputs '("out" "jdk" "doc"))
1816 (arguments
1817 `(#:tests? #f; require jtreg
f5789c26 1818 #:make-flags '("all")
dd741059
JL
1819 #:imported-modules
1820 ((guix build syscalls)
1821 ,@%gnu-build-system-modules)
1822 #:phases
1823 (modify-phases %standard-phases
1824 (add-after 'patch-source-shebangs 'fix-java-shebangs
1825 (lambda _
1826 ;; This file was "fixed" by patch-source-shebangs, but it requires
1827 ;; this exact first line.
1828 (substitute* "jdk/make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1829 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
1830 #t))
1831 (replace 'configure
1832 (lambda* (#:key inputs outputs #:allow-other-keys)
1833 ;; TODO: unbundle libpng and lcms
1834 (invoke "bash" "./configure"
1835 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
1836 "--disable-freetype-bundling"
1837 "--disable-warnings-as-errors"
1838 "--disable-hotspot-gtest"
1839 "--with-giflib=system"
1840 "--with-libjpeg=system"
1841 (string-append "--prefix=" (assoc-ref outputs "out")))
1842 #t))
f5789c26 1843 (add-before 'build 'write-source-revision-file
dd741059
JL
1844 (lambda _
1845 (with-output-to-file ".src-rev"
1846 (lambda _
1847 (display ,version)))
dd741059 1848 #t))
f5789c26
RW
1849 (replace 'build
1850 (lambda* (#:key make-flags parallel-build? #:allow-other-keys)
1851 (apply invoke "make"
1852 `(,@(if parallel-build?
1853 (list (string-append "JOBS="
1854 (number->string (parallel-job-count))))
1855 '())
1856 ,@make-flags))))
dd741059
JL
1857 ;; Some of the libraries in the lib/ folder link to libjvm.so.
1858 ;; But that shared object is located in the server/ folder, so it
1859 ;; cannot be found. This phase creates a symbolic link in the
1860 ;; lib/ folder so that the other libraries can find it.
1861 ;;
1862 ;; See:
1863 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1864 ;;
1865 ;; FIXME: Find the bug in the build system, so that this symlink is
1866 ;; not needed.
1867 (add-after 'install 'install-libjvm
1868 (lambda* (#:key inputs outputs #:allow-other-keys)
1869 (let* ((lib-out (string-append (assoc-ref outputs "out")
1870 "/lib"))
1871 (lib-jdk (string-append (assoc-ref outputs "jdk")
1872 "/lib")))
1873 (symlink (string-append lib-jdk "/server/libjvm.so")
1874 (string-append lib-jdk "/libjvm.so"))
1875 (symlink (string-append lib-out "/server/libjvm.so")
1876 (string-append lib-out "/libjvm.so")))
1877 #t))
1878 (replace 'install
1879 (lambda* (#:key outputs #:allow-other-keys)
1880 (let ((out (assoc-ref outputs "out"))
1881 (jdk (assoc-ref outputs "jdk"))
1882 (doc (assoc-ref outputs "doc"))
1883 (images (car (find-files "build" ".*-server-release"
1884 #:directories? #t))))
1885 (copy-recursively (string-append images "/images/jdk") jdk)
1886 (copy-recursively (string-append images "/images/jre") out)
1887 (copy-recursively (string-append images "/images/docs") doc))
1888 #t))
1889 (add-after 'install 'strip-zip-timestamps
1890 (lambda* (#:key outputs #:allow-other-keys)
1891 (use-modules (guix build syscalls))
1892 (for-each (lambda (zip)
1893 (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
1894 (with-directory-excursion dir
1895 (invoke "unzip" zip))
1896 (delete-file zip)
1897 (for-each (lambda (file)
1898 (let ((s (lstat file)))
1899 (unless (eq? (stat:type s) 'symlink)
1900 (format #t "reset ~a~%" file)
1901 (utime file 0 0 0 0))))
1902 (find-files dir #:directories? #t))
1903 (with-directory-excursion dir
1904 (let ((files (find-files "." ".*" #:directories? #t)))
1905 (apply invoke "zip" "-0" "-X" zip files)))))
1906 (find-files (assoc-ref outputs "doc") ".*.zip$"))
1907 #t)))))
1908 (inputs
1909 `(("alsa-lib" ,alsa-lib)
1910 ("cups" ,cups)
1911 ("fontconfig" ,fontconfig)
1912 ("freetype" ,freetype)
1913 ("giflib" ,giflib)
1914 ("lcms" ,lcms)
1915 ("libelf" ,libelf)
4bd428a7 1916 ("libjpeg" ,libjpeg-turbo)
dd741059
JL
1917 ("libice" ,libice)
1918 ("libpng" ,libpng)
1919 ("libx11" ,libx11)
1920 ("libxcomposite" ,libxcomposite)
1921 ("libxi" ,libxi)
1922 ("libxinerama" ,libxinerama)
1923 ("libxrender" ,libxrender)
1924 ("libxt" ,libxt)
1925 ("libxtst" ,libxtst)))
1926 (native-inputs
1927 `(("icedtea-8" ,icedtea-8)
1928 ("icedtea-8:jdk" ,icedtea-8 "jdk")
f5789c26 1929 ;; XXX: The build system fails with newer versions of GNU Make.
5fd0c288 1930 ("make@4.2" ,gnu-make-4.2)
dd741059
JL
1931 ("unzip" ,unzip)
1932 ("which" ,which)
1933 ("zip" ,zip)))
1934 (home-page "https://openjdk.java.net/projects/jdk9/")
1935 (synopsis "Java development kit")
1936 (description
1937 "This package provides the Java development kit OpenJDK.")
1938 (license license:gpl2+)))
1939
16b89ecc
JL
1940(define-public openjdk10
1941 (package
1942 (inherit openjdk9)
1943 (name "openjdk")
1944 (version "10.46")
1945 (source (origin
1946 (method url-fetch)
1947 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/6fa770f9f8ab.tar.bz2")
1948 (file-name (string-append name "-" version ".tar.bz2"))
1949 (sha256
1950 (base32
1951 "0zywq2203b4hx4jms9vbwvjcj1d3k2v3qpx4s33729fkpmid97r4"))
accb5c31
GB
1952 (patches (search-patches
1953 "openjdk-10-idlj-reproducibility.patch"))
16b89ecc
JL
1954 (modules '((guix build utils)))
1955 (snippet
1956 `(begin
49ad6aec 1957 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
16b89ecc
JL
1958 #t))))
1959 (arguments
1960 (substitute-keyword-arguments (package-arguments openjdk9)
1961 ((#:phases phases)
1962 `(modify-phases ,phases
1963 (replace 'fix-java-shebangs
1964 (lambda _
1965 ;; This file was "fixed" by patch-source-shebangs, but it requires
1966 ;; this exact first line.
1967 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1968 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
1969 #t))
1970 (replace 'configure
1971 (lambda* (#:key inputs outputs #:allow-other-keys)
1972 (invoke "bash" "./configure"
1973 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
1974 "--disable-freetype-bundling"
1975 "--disable-warnings-as-errors"
1976 "--disable-hotspot-gtest"
1977 "--with-giflib=system"
1978 "--with-libjpeg=system"
1979 "--with-native-debug-symbols=zipped"
1980 (string-append "--prefix=" (assoc-ref outputs "out")))
1981 #t))))))
1982 (native-inputs
1983 `(("openjdk9" ,openjdk9)
1984 ("openjdk9:jdk" ,openjdk9 "jdk")
5fd0c288 1985 ("make@4.2" ,gnu-make-4.2)
16b89ecc
JL
1986 ("unzip" ,unzip)
1987 ("which" ,which)
1988 ("zip" ,zip)))))
1989
95bc85b7
GB
1990(define-public openjdk11
1991 (package
1992 (name "openjdk")
1993 (version "11.28")
1994 (source (origin
1995 (method url-fetch)
1996 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/76072a077ee1.tar.bz2")
1997 (file-name (string-append name "-" version ".tar.bz2"))
1998 (sha256
1999 (base32
2000 "0v705w1s9lrqalzahir78pk397rkk9gfvzq821yv8h3xha0bqi6w"))
2001 (modules '((guix build utils)))
2002 (snippet
2003 `(begin
62d46ad6 2004 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
95bc85b7
GB
2005 #t))))
2006 (build-system gnu-build-system)
2007 (outputs '("out" "jdk" "doc"))
2008 (arguments
2009 `(#:imported-modules
2010 ((guix build syscalls)
2011 (ice-9 binary-ports)
2012 (rnrs bytevectors)
2013 ,@%gnu-build-system-modules)
2014 #:tests? #f; requires jtreg
2015 ;; TODO package jtreg
95bc85b7
GB
2016 #:configure-flags
2017 `("--disable-option-checking" ; --enable-fast-install default flag errors otherwise
2018 "--disable-warnings-as-errors"
2019 ;; make validate-runpath pass, see: http://issues.guix.info/issue/32894
2020 "--with-native-debug-symbols=zipped"
2021 ;; do not use the bundled libraries
2022 "--with-giflib=system"
2023 "--with-lcms=system"
2024 "--with-libjpeg=system"
2025 "--with-libpng=system"
70d23edf 2026 "--with-version-pre="
95bc85b7
GB
2027 ;; allow the build system to locate the system freetype
2028 ,(string-append "--with-freetype-include="
2029 (assoc-ref %build-inputs "freetype") "/include")
2030 ,(string-append "--with-freetype-lib="
2031 (assoc-ref %build-inputs "freetype") "/lib"))
95bc85b7
GB
2032 #:phases
2033 (modify-phases %standard-phases
2034 (add-after 'patch-source-shebangs 'fix-java-shebangs
2035 (lambda _
2036 ;; This file was "fixed" by patch-source-shebangs, but it requires
2037 ;; this exact first line.
2038 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
2039 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
2040 #t))
7b82e1cd 2041 (add-before 'build 'write-source-revision-file
95bc85b7
GB
2042 (lambda _
2043 (with-output-to-file ".src-rev"
2044 (lambda _
2045 (display ,version)))
95bc85b7 2046 #t))
7b82e1cd
RW
2047 (replace 'build
2048 (lambda* (#:key parallel-build? make-flags #:allow-other-keys)
2049 (apply invoke "make" "all"
2050 `(,@(if parallel-build?
2051 (list (string-append "JOBS="
2052 (number->string (parallel-job-count))))
2053 '())
2054 ,@make-flags))))
95bc85b7
GB
2055 ;; jdk 11 does not build jre by default any more
2056 ;; building it anyways
2057 ;; for further information see:
2058 ;; https://github.com/AdoptOpenJDK/openjdk-build/issues/356
2059 (add-after 'build 'build-jre
7b82e1cd
RW
2060 (lambda* (#:key parallel-build? make-flags #:allow-other-keys)
2061 (apply invoke "make" "legacy-jre-image"
2062 `(,@(if parallel-build?
2063 (list (string-append "JOBS="
2064 (number->string (parallel-job-count))))
2065 '())
2066 ,@make-flags))))
95bc85b7
GB
2067 (replace 'install
2068 (lambda* (#:key outputs #:allow-other-keys)
2069 (let ((out (assoc-ref outputs "out"))
2070 (jdk (assoc-ref outputs "jdk"))
2071 (doc (assoc-ref outputs "doc"))
2072 (images (car (find-files "build" ".*-server-release"
2073 #:directories? #t))))
2074 (copy-recursively (string-append images "/images/jdk") jdk)
2075 (copy-recursively (string-append images "/images/jre") out)
2076 (copy-recursively (string-append images "/images/docs") doc))
2077 #t))
2078 ;; Some of the libraries in the lib/ folder link to libjvm.so.
2079 ;; But that shared object is located in the server/ folder, so it
2080 ;; cannot be found. This phase creates a symbolic link in the
2081 ;; lib/ folder so that the other libraries can find it.
2082 ;;
2083 ;; See:
2084 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
2085 ;;
2086 ;; FIXME: Find the bug in the build system, so that this symlink is
2087 ;; not needed.
2088 (add-after 'install 'install-libjvm
2089 (lambda* (#:key inputs outputs #:allow-other-keys)
2090 (let* ((lib-out (string-append (assoc-ref outputs "out")
2091 "/lib"))
2092 (lib-jdk (string-append (assoc-ref outputs "jdk")
2093 "/lib")))
2094 (symlink (string-append lib-jdk "/server/libjvm.so")
2095 (string-append lib-jdk "/libjvm.so"))
2096 (symlink (string-append lib-out "/server/libjvm.so")
2097 (string-append lib-out "/libjvm.so")))
2098 #t))
2099 (add-after 'install 'strip-character-data-timestamps
2100 (lambda* (#:key outputs #:allow-other-keys)
2101 (use-modules (guix build syscalls))
2102 (let ((archive (string-append
2103 (assoc-ref outputs "jdk") "/lib/src.zip"))
2104 (dir (mkdtemp! "zip-contents.XXXXXX")))
2105 (with-directory-excursion dir
2106 (invoke "unzip" archive))
2107 (delete-file archive)
2108 (with-directory-excursion dir
2109 (let ((char-data-files (find-files "." "CharacterData.*")))
2110 (for-each (lambda (file)
2111 (substitute* file
2112 (((string-append "This file was generated "
2113 "AUTOMATICALLY from a template "
2114 "file.*"))
2115 (string-append "This file was generated "
2116 "AUTOMATICALLY from a template "
2117 "file"))))
2118 char-data-files)))
2119 (with-directory-excursion dir
2120 (let ((files (find-files "." ".*" #:directories? #t)))
2121 (apply invoke "zip" "-0" "-X" archive files))))))
2122 (add-after 'strip-character-data-timestamps 'strip-archive-timestamps
2123 (lambda* (#:key outputs #:allow-other-keys)
2124 (use-modules (guix build syscalls)
2125 (ice-9 binary-ports)
2126 (rnrs bytevectors))
2127 (letrec ((repack-archive
2128 (lambda (archive)
2129 (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
2130 (with-directory-excursion dir
2131 (invoke "unzip" archive))
2132 (delete-file archive)
2133 (for-each (compose repack-archive canonicalize-path)
2134 (find-files dir "(ct.sym|.*.jar)$"))
2135 (let ((reset-file-timestamp
2136 (lambda (file)
2137 (let ((s (lstat file)))
2138 (unless (eq? (stat:type s) 'symlink)
2139 (format #t "reset ~a~%" file)
2140 (utime file 0 0 0 0))))))
2141 (for-each reset-file-timestamp
2142 (find-files dir #:directories? #t)))
2143 (with-directory-excursion dir
2144 (let ((files (find-files "." ".*" #:directories? #t)))
2145 (apply invoke "zip" "-0" "-X" archive files)))))))
2146 (for-each repack-archive
2147 (find-files (assoc-ref outputs "doc") ".*.zip$"))
2148 (for-each repack-archive
2149 (find-files (assoc-ref outputs "jdk")
2150 ".*.(zip|jar|diz)$"))
2151 (repack-archive (string-append (assoc-ref outputs "jdk") "/lib/ct.sym"))
2152 (let ((repack-jmod
2153 (lambda (file-name)
2154 (call-with-input-file file-name
2155 (lambda (file)
2156 (let ((header #vu8(#x4a #x4d #x01 #x00)))
2157 (if (equal? (get-bytevector-n
2158 file (bytevector-length header))
2159 header)
2160 (let* ((header-length (bytevector-length header))
2161 (temp-file (mkstemp!
2162 (string-copy
2163 "temp-file.XXXXXX")))
2164 (temp-filename (port-filename temp-file))
2165 (content-length
2166 (- (stat:size (stat file))
2167 header-length)))
2168 (sendfile temp-file file content-length header-length)
2169 (delete-file file-name)
2170 (close-port temp-file)
2171 (repack-archive (canonicalize-path temp-filename))
2172 (call-with-output-file file-name
2173 (lambda (file)
2174 (put-bytevector file header)
2175 (call-with-input-file temp-filename
2176 (lambda (temp-file)
2177 (sendfile
2178 file temp-file
2179 (stat:size (stat temp-file)) 0)))))))))))))
2180 (for-each repack-jmod
2181 (find-files (assoc-ref outputs "jdk") ".*.jmod$")))
2182 #t)))
2183 (add-after 'install 'remove-timestamp-from-api-summary
2184 (lambda* (#:key outputs #:allow-other-keys)
2185 (substitute* (string-append (assoc-ref outputs "doc")
2186 "/api/overview-summary.html")
2187 (("Generated by javadoc \\(11-internal\\).*$")
2188 "Generated by javadoc (11-internal) -->\n"))
2189 #t)))))
2190 (inputs
2191 `(("alsa-lib" ,alsa-lib)
2192 ("cups" ,cups)
2193 ("fontconfig" ,fontconfig)
2194 ("freetype" ,freetype)
2195 ("giflib" ,giflib)
2196 ("lcms" ,lcms)
4bd428a7 2197 ("libjpeg" ,libjpeg-turbo)
95bc85b7
GB
2198 ("libpng" ,libpng)
2199 ("libx11" ,libx11)
2200 ("libxext" ,libxext)
2201 ("libxrender" ,libxrender)
2202 ("libxt" ,libxt)
2203 ("libxtst" ,libxtst)))
2204 (native-inputs
2205 `(("autoconf" ,autoconf)
2206 ("openjdk10" ,openjdk10)
2207 ("openjdk10:jdk" ,openjdk10 "jdk")
5fd0c288 2208 ("make" ,gnu-make-4.2)
95bc85b7
GB
2209 ("pkg-config" ,pkg-config)
2210 ("unzip" ,unzip)
2211 ("which" ,which)
2212 ("zip" ,zip)))
2213 (home-page "https://openjdk.java.net/projects/jdk/11/")
2214 (synopsis "Java development kit")
2215 (description
2216 "This package provides the Java development kit OpenJDK.")
2217 (license license:gpl2+)))
2218
64dc8e9e
GB
2219(define-public openjdk12
2220 (package
2221 (inherit openjdk11)
2222 (name "openjdk")
2223 (version "12.33")
2224 (source (origin
2225 (method url-fetch)
2226 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/0276cba45aac.tar.bz2")
2227 (file-name (string-append name "-" version ".tar.bz2"))
2228 (sha256
2229 (base32
2230 "0mbhdrk12b6878kby0flnbak7444dlpm0ihlmf92vk59y1c02bc2"))
2231 (modules '((guix build utils)))
2232 (snippet
2233 `(begin
c7c9370d 2234 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
64dc8e9e
GB
2235 #t))))
2236 (inputs
2237 `(("alsa-lib" ,alsa-lib)
2238 ("cups" ,cups)
2239 ("fontconfig" ,fontconfig)
2240 ("freetype" ,freetype)
2241 ("giflib" ,giflib)
2242 ("lcms" ,lcms)
4bd428a7 2243 ("libjpeg" ,libjpeg-turbo)
64dc8e9e
GB
2244 ("libpng" ,libpng)
2245 ("libx11" ,libx11)
2246 ("libxext" ,libxext)
2247 ("libxrandr" ,libxrandr)
2248 ("libxrender" ,libxrender)
2249 ("libxt" ,libxt)
2250 ("libxtst" ,libxtst)))
2251 (native-inputs
2252 `(("autoconf" ,autoconf)
2253 ("openjdk11" ,openjdk11)
2254 ("openjdk11:jdk" ,openjdk11 "jdk")
5fd0c288 2255 ("make@4.2" ,gnu-make-4.2)
64dc8e9e
GB
2256 ("pkg-config" ,pkg-config)
2257 ("unzip" ,unzip)
2258 ("which" ,which)
2259 ("zip" ,zip)))
2260 (home-page "https://openjdk.java.net/projects/jdk/12")))
2261
33aa65e0 2262(define-public icedtea icedtea-8)
068e476f 2263
5490480c 2264\f
8bbd0408
RW
2265(define-public ant/java8
2266 (package (inherit ant-bootstrap)
2267 (name "ant")
2268 (version "1.10.1")
2269 (source (origin
2270 (method url-fetch)
2271 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2272 version "-src.tar.gz"))
2273 (sha256
2274 (base32
2275 "10p3dh77lkzzzcy32dk9azljixzadp46fggjfbvgkl8mmb8cxxv8"))
2276 (modules '((guix build utils)))
2277 (snippet
2278 '(begin
2279 (for-each delete-file
2280 (find-files "lib/optional" "\\.jar$"))
2281 #t))))
2282 (arguments
2283 (substitute-keyword-arguments (package-arguments ant-bootstrap)
2284 ((#:phases phases)
2285 `(modify-phases ,phases
2286 (add-after 'unpack 'remove-scripts
2287 ;; Remove bat / cmd scripts for DOS as well as the antRun and runant
2288 ;; wrappers.
2289 (lambda _
2290 (for-each delete-file
2291 (find-files "src/script"
2292 "(.*\\.(bat|cmd)|runant.*|antRun.*)"))
2293 #t))
2294 (replace 'build
2295 (lambda* (#:key inputs outputs #:allow-other-keys)
2296 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
2297
2298 ;; Disable tests to avoid dependency on hamcrest-core, which needs
2299 ;; Ant to build. This is necessary in addition to disabling the
2300 ;; "check" phase, because the dependency on "test-jar" would always
2301 ;; result in the tests to be run.
2302 (substitute* "build.xml"
2303 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
2c8ac364
MW
2304 (invoke "bash" "bootstrap.sh"
2305 (string-append "-Ddist.dir="
2306 (assoc-ref outputs "out")))))))))
8bbd0408 2307 (native-inputs
1c7ef07e
GB
2308 `(("jdk" ,icedtea-8 "jdk")
2309 ("zip" ,zip)
2310 ("unzip" ,unzip)))))
8bbd0408 2311
e441fc56
RW
2312;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x series
2313;; requires Java 8.
2314(define-public ant
2315 (package (inherit ant/java8)
2316 (version "1.9.9")
2317 (source (origin
2318 (method url-fetch)
2319 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2320 version "-src.tar.gz"))
2321 (sha256
2322 (base32
2323 "1k28mka0m3isy9yr8gz84kz1f3f879rwaxrd44vdn9xbfwvwk86n"))))
2324 (native-inputs
3b6ba18b
GB
2325 `(("jdk" ,icedtea-7 "jdk")
2326 ("zip" ,zip)
2327 ("unzip" ,unzip)))))
e441fc56 2328
9ce7ac99
RW
2329(define-public ant-apache-bcel
2330 (package
2331 (inherit ant/java8)
2332 (name "ant-apache-bcel")
2333 (arguments
2334 (substitute-keyword-arguments (package-arguments ant/java8)
2335 ((#:phases phases)
2336 `(modify-phases ,phases
2337 (add-after 'unpack 'link-bcel
2338 (lambda* (#:key inputs #:allow-other-keys)
2339 (for-each (lambda (file)
2340 (symlink file
2341 (string-append "lib/optional/"
2342 (basename file))))
2343 (find-files (assoc-ref inputs "java-commons-bcel")
2344 "\\.jar$"))
2345 #t))
2346 (add-after 'build 'install
2347 (lambda* (#:key outputs #:allow-other-keys)
2348 (let* ((out (assoc-ref outputs "out"))
2349 (share (string-append out "/share/java"))
2350 (bin (string-append out "/bin"))
2351 (lib (string-append out "/lib")))
2352 (mkdir-p share)
2353 (install-file (string-append lib "/ant-apache-bcel.jar") share)
2354 (delete-file-recursively bin)
2355 (delete-file-recursively lib)
2356 #t)))))))
2357 (inputs
2358 `(("java-commons-bcel" ,java-commons-bcel)
2359 ,@(package-inputs ant/java8)))))
2360
fa6c4213
RW
2361(define-public ant-junit
2362 (package
2363 (inherit ant/java8)
2364 (name "ant-junit")
2365 (arguments
2366 (substitute-keyword-arguments (package-arguments ant/java8)
2367 ((#:phases phases)
2368 `(modify-phases ,phases
2369 (add-after 'unpack 'link-junit
2370 (lambda* (#:key inputs #:allow-other-keys)
2371 (for-each (lambda (file)
2372 (symlink file
2373 (string-append "lib/optional/"
2374 (basename file))))
2375 (find-files (assoc-ref inputs "java-junit")
2376 "\\.jar$"))
2377 #t))
2378 (add-after 'build 'install
2379 (lambda* (#:key outputs #:allow-other-keys)
2380 (let* ((out (assoc-ref outputs "out"))
2381 (share (string-append out "/share/java"))
2382 (bin (string-append out "/bin"))
2383 (lib (string-append out "/lib")))
2384 (mkdir-p share)
2385 (install-file (string-append lib "/ant-junit.jar") share)
2386 (delete-file-recursively bin)
2387 (delete-file-recursively lib)
2388 #t)))))))
2389 (inputs
2390 `(("java-junit" ,java-junit)
2391 ,@(package-inputs ant/java8)))))
2392
7214fbd2
JL
2393(define-public java-openjfx-build
2394 (package
2395 (name "java-openjfx-build")
2396 ;; This is a java-8 version
2397 (version "8.202")
2398 (source (origin
2399 (method hg-fetch)
2400 (uri (hg-reference
2401 (url "http://hg.openjdk.java.net/openjfx/8u-dev/rt")
2402 (changeset (string-append
2403 (string-join (string-split version #\.) "u")
2404 "-ga"))))
2405 (file-name (string-append name "-" version "-checkout"))
2c2b1ef8
BH
2406 (modules '((guix build utils)))
2407 (snippet
2408 '(begin
2409 ;; Delete included gradle jar
2410 (delete-file-recursively "gradle/wrapper")
2411 #t))
7214fbd2
JL
2412 (sha256
2413 (base32
2414 "0yg38mwpivswccv9n96k06x3iv82i4px1a9xg9l8dswzwmfj259f"))))
2415 (build-system ant-build-system)
2416 (arguments
2417 `(#:jar-name "java-openjfx.jar"
2418 #:source-dir "buildSrc/src/main/java"
2419 #:test-dir "buildSrc/src/test"
2420 #:phases
2421 (modify-phases %standard-phases
2422 (add-before 'configure 'generate-jsl-parser
2423 (lambda _
2424 (invoke "antlr3" "-o"
2425 "buildSrc/src/main/java/com/sun/scenario/effect/compiler"
2426 "buildSrc/src/main/antlr/JSL.g"))))))
2427 (inputs
2428 `(("antlr3" ,antlr3)
2429 ("java-stringtemplate" ,java-stringtemplate)))
2430 (native-inputs
2431 `(("java-junit" ,java-junit)
2432 ("java-hamcrest-core" ,java-hamcrest-core)))
2433 (home-page "https://openjfx.io")
2434 (synopsis "Graphical application toolkit in Java")
2435 (description "OpenJFX is a client application platform for desktop,
2436mobile and embedded systems built on Java. Its goal is to produce a
2437modern, efficient, and fully featured toolkit for developing rich client
2438applications. This package contains base classes for the OpenJFX
2439distribution and helper classes for building other parts of the
2440distribution.")
2441 (license license:gpl2))) ;gpl2 only, with classpath exception
2442
46f05439
JL
2443(define-public java-openjfx-base
2444 (package (inherit java-openjfx-build)
2445 (name "java-openjfx-base")
2446 (arguments
2447 `(#:jar-name "java-openjfx-base.jar"
2448 #:source-dir "modules/base/src/main/java:modules/base/src/main/java8:modules/base/src/main/version-info"
2449 #:test-dir "modules/base/src/test"
2450 #:phases
2451 (modify-phases %standard-phases
2452 (add-before 'check 'remove-empty-file
2453 (lambda _
2454 (with-directory-excursion "modules/base/src/test/java"
2455 ;; These files are completely commented, but junit expects them to
2456 ;; contain a class, so tests fail.
2457 (delete-file
2458 "com/sun/javafx/property/adapter/PropertyDescriptorTest.java")
2459 (delete-file
2460 "com/sun/javafx/property/adapter/ReadOnlyPropertyDescriptorTest.java")
2461 (delete-file "javafx/beans/property/PropertiesTest.java")
2462 (delete-file
2463 "javafx/beans/property/adapter/ReadOnlyJavaBeanPropertyBuilder_General_Test.java")
2464 ;; This one fails
2465 (delete-file "com/sun/javafx/runtime/VersionInfoTest.java"))
2466 #t)))))
2467 (propagated-inputs
2468 `(("java-openjfx-build" ,java-openjfx-build)))
2469 (description "OpenJFX is a client application platform for desktop,
2470mobile and embedded systems built on Java. Its goal is to produce a
2471modern, efficient, and fully featured toolkit for developing rich client
2472applications. This package contains base classes for the OpenJFX
2473distribution.")))
36f73d70
JL
2474
2475(define-public java-openjfx-graphics
2476 (package (inherit java-openjfx-build)
2477 (name "java-openjfx-graphics")
2478 (arguments
2479 `(#:jar-name "java-openjfx-graphics.jar"
2480 #:source-dir "modules/graphics/src/main/java"
2481 #:tests? #f; require X
2482 #:test-dir "modules/graphics/src/test"))
2483 (propagated-inputs
2484 `(("java-openjfx-base" ,java-openjfx-base)
2485 ("java-swt" ,java-swt)))
2486 (description "OpenJFX is a client application platform for desktop,
2487mobile and embedded systems built on Java. Its goal is to produce a
2488modern, efficient, and fully featured toolkit for developing rich client
2489applications. This package contains graphics-related classes for the
2490OpenJFX distribution.")))
68a13319
JL
2491
2492(define-public java-openjfx-media
2493 (package (inherit java-openjfx-build)
2494 (name "java-openjfx-media")
2495 (propagated-inputs
2496 `(("java-openjxf-graphics" ,java-openjfx-graphics)))
2497 (arguments
2498 `(#:jar-name "java-openjfx-media.jar"
2499 #:source-dir "modules/media/src/main/java"
2500 #:tests? #f)); no tests
2501 (description "OpenJFX is a client application platform for desktop,
2502mobile and embedded systems built on Java. Its goal is to produce a
2503modern, efficient, and fully featured toolkit for developing rich client
2504applications. This package contains media-related classes for the
2505OpenJFX distribution.")))
46f05439 2506
53fb0476 2507(define-public javacc-4
fc8d100b
RW
2508 (package
2509 (name "javacc")
53fb0476 2510 (version "4.1")
fc8d100b 2511 (source (origin
53fb0476
AV
2512 (method git-fetch)
2513 (uri (git-reference
2514 (url "https://github.com/javacc/javacc.git")
2515 (commit "release_41")))
2516 (file-name (string-append "javacc-" version "-checkout"))
fc8d100b
RW
2517 (sha256
2518 (base32
6662d65f
AV
2519 "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0"))
2520 (modules '((guix build utils)))
2521 ;; delete bundled jars
2522 (snippet '(begin (delete-file-recursively "lib") #t))))
fc8d100b 2523 (build-system ant-build-system)
53fb0476
AV
2524 ;; Tests fail with
2525 ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60:
2526 ;; JAVACODE failed
fc8d100b 2527 (arguments
53fb0476 2528 `(#:tests? #f
fc8d100b
RW
2529 #:phases
2530 (modify-phases %standard-phases
6662d65f
AV
2531 ;; Delete tests to avoid build failure (we don't run them anyway).
2532 (add-after 'unpack 'delete-tests
fc8d100b 2533 (lambda _
6662d65f
AV
2534 (for-each delete-file
2535 '("src/org/javacc/JavaCCTestCase.java"
2536 "src/org/javacc/parser/ExpansionTest.java"
2537 "src/org/javacc/parser/OptionsTest.java"
2538 "src/org/javacc/jjtree/JJTreeOptionsTest.java"))
2539 (for-each delete-file-recursively
2540 '("src/org/javacc/parser/test"
2541 "src/org/javacc/jjdoc/test"))
2542 #t))
53fb0476 2543 (replace 'install (install-jars "bin/lib")))))
fc8d100b
RW
2544 (home-page "https://javacc.org/")
2545 (synopsis "Java parser generator")
2546 (description "Java Compiler Compiler (JavaCC) is the most popular parser
2547generator for use with Java applications. A parser generator is a tool that
2548reads a grammar specification and converts it to a Java program that can
2549recognize matches to the grammar. In addition to the parser generator itself,
2550JavaCC provides other standard capabilities related to parser generation such
2551as tree building (via a tool called JJTree included with JavaCC), actions,
2552debugging, etc.")
2553 (license license:bsd-3)))
2554
53fb0476
AV
2555(define-public javacc
2556 (package
2557 (inherit javacc-4)
6b66e470 2558 (version "7.0.4")
ebf8048d
TGR
2559 (source
2560 (origin
2561 (method git-fetch)
2562 (uri (git-reference
2563 (url "https://github.com/javacc/javacc.git")
2564 (commit version)))
2565 (file-name (git-file-name "javacc" version))
2566 (sha256
2567 (base32 "18kkak3gda93gr25jrgy6q00g0jr8i24ri2wk4kybz1v234fxx9i"))
2568 (modules '((guix build utils)))
2569 ;; Delete bundled jars.
2570 (snippet '(begin (for-each delete-file-recursively
2571 '("bootstrap" "lib"))
2572 #t))))
6688c41e 2573 (arguments
6b66e470 2574 `(#:make-flags ; bootstrap from javacc-4
33428d12
AV
2575 (list (string-append "-Dbootstrap-jar="
2576 (assoc-ref %build-inputs "javacc")
2577 "/share/java/javacc.jar"))
2578 #:test-target "test"
6688c41e
RW
2579 #:phases
2580 (modify-phases %standard-phases
16fdf2f5
JL
2581 (replace 'install (install-jars "target"))
2582 (add-after 'install 'install-bin
2583 (lambda* (#:key outputs inputs #:allow-other-keys)
2584 (let* ((out (assoc-ref outputs "out"))
2585 (dir (string-append out "/share/java"))
2586 (bin (string-append out "/bin"))
2587 (javacc (string-append bin "/javacc")))
2588 (mkdir-p bin)
2589 (with-output-to-file javacc
2590 (lambda _
2591 (display
2592 (string-append "#!/bin/sh\n"
2593 (assoc-ref inputs "jdk") "/bin/java"
2594 " -cp " dir "/javacc.jar" " `basename $0`" " $*"))))
2595 (chmod javacc #o755)
2596 ;; symlink to different names to affect the first argument and
2597 ;; change the behavior of the jar file.
2598 (symlink javacc (string-append bin "/jjdoc"))
2599 (symlink javacc (string-append bin "/jjtree"))
2600 #t))))))
2601
33428d12
AV
2602 (native-inputs
2603 `(("javacc" ,javacc-4)))))
6688c41e 2604
c1cb8576
RW
2605;; This is the last 3.x release of ECJ
2606(define-public java-ecj-3
2607 (package
2608 (name "java-ecj")
2609 (version "3.8.2")
2610 (source (origin
2611 (method url-fetch)
2612 (uri (string-append "http://archive.eclipse.org/eclipse/"
2613 "downloads/drops/R-" version
2614 "-201301310800/ecjsrc-" version ".jar"))
2615 (sha256
2616 (base32
2617 "01mdj14jw11g1jfnki4fi8229p0c6zzckd38zqy2w4m3cjcvsx04"))))
2618 (build-system ant-build-system)
2619 (arguments
2620 `(#:tests? #f ; none included
2621 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2622 #:make-flags (list "-f" "src/build.xml")
2623 #:build-target "build"
2624 #:phases
2625 (modify-phases %standard-phases
2626 (add-after 'unpack 'fix-manifest
2627 (lambda _
2628 ;; Record the main class to make ecj executable.
2629 (with-atomic-file-replacement "src/META-INF/MANIFEST.MF"
2630 (lambda (in out)
2631 (display "Manifest-Version: 1.0
2632Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2c8ac364
MW
2633 out)))
2634 #t))
c1cb8576
RW
2635 (replace 'install (install-jars ".")))))
2636 (home-page "https://eclipse.org")
2637 (synopsis "Eclipse Java development tools core batch compiler")
2638 (description "This package provides the Eclipse Java core batch compiler.")
2639 (license license:epl1.0)))
2640
f201b18e
RW
2641;; This is needed for java-cisd-args4j
2642(define-public java-ecj-3.5
2643 (package (inherit java-ecj-3)
2644 (version "3.5.1")
2645 (source (origin
2646 (method url-fetch/zipbomb)
2647 (uri (string-append "http://archive.eclipse.org/eclipse/"
2648 "downloads/drops/R-" version
2649 "-200909170800/ecjsrc-" version ".zip"))
2650 (sha256
2651 (base32
2652 "1vnl2mavisc567bip736xzsvvbjif5279wc4a7pbdik5wlir8qr7"))))
2653 (build-system ant-build-system)
2654 (arguments
2655 `(#:tests? #f ; none included
2656 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2657 #:build-target "build"
2658 #:phases
2659 (modify-phases %standard-phases
2660 (add-after 'unpack 'fix-manifest
2661 (lambda _
2662 ;; Record the main class to make ecj executable.
2663 (with-atomic-file-replacement "META-INF/MANIFEST.MF"
2664 (lambda (in out)
2665 (dump-port in out)
2666 (display "Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2c8ac364
MW
2667 out)))
2668 #t))
f201b18e
RW
2669 (replace 'install (install-jars ".")))))
2670 (native-inputs
2671 `(("unzip" ,unzip)))))
2672
bc3497a5
BH
2673(define-public java-ecj
2674 (package (inherit java-ecj-3)
2675 (version "4.6.3")
2676 (source
2677 (origin
2678 (method url-fetch)
2679 (uri (string-append
2680 "http://archive.eclipse.org/eclipse/downloads/drops4/R-"
2681 version
2682 "-201703010400/ecjsrc-"
2683 version
2684 ".jar"))
2685 (sha256
2686 (base32
2687 "11cfgsdgznja1pvlxkjbqykxd7pcd5655vkm7s44xmahmap15gpl"))))
2688 (arguments
2689 `(#:tests? #f ; none included
2690 #:build-target "build"
2691 #:phases
2692 (modify-phases %standard-phases
2693 (add-after 'unpack 'fix-build.xml
2694 (lambda _
2695 (substitute* "src/build.xml"
2696 (("^.*MANIFEST.*$")
2697 ""))
2698 #t))
2699 (add-after 'unpack 'fix-prop
2700 (lambda _
2701 (substitute* "src/build.xml"
2702 (("^.*properties.*$")
2703 "<include name=\"**/*.properties\"/>
2704 <include name=\"**/*.props\"/>"))
2705 #t))
2706 (add-before 'build 'chdir
2707 (lambda _
2708 (chdir "src")
2709 #t))
2710 (replace 'install (install-jars ".")))))))
2711
30d55473
RW
2712(define-public java-cisd-base
2713 (let ((revision 38938)
2714 (base-version "14.12.0"))
2715 (package
2716 (name "java-cisd-base")
2717 (version (string-append base-version "-" (number->string revision)))
2718 (source (origin
2719 (method svn-fetch)
2720 (uri (svn-reference
2721 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2722 "base/tags/release/"
2723 (version-major+minor base-version)
2724 ".x/" base-version "/base/"))
2725 (revision revision)))
2726 (file-name (string-append "java-cisd-base-" version "-checkout"))
2727 (sha256
2728 (base32
2729 "1i5adyf7nzclb0wydgwa1az04qliid8035vpahaandmkmigbnxiy"))
2730 (modules '((guix build utils)))
2731 (snippet
2732 '(begin
2733 ;; Delete included gradle jar
2734 (delete-file-recursively "gradle/wrapper")
2735 ;; Delete pre-built native libraries
2736 (delete-file-recursively "libs")
2737 #t))))
2738 (build-system ant-build-system)
2739 (arguments
2740 `(#:make-flags '("-file" "build/build.xml")
2741 #:test-target "jar-test"
2742 #:jdk ,icedtea-8
2743 #:phases
2744 (modify-phases %standard-phases
2745 (add-after 'unpack 'unpack-build-resources
2746 (lambda* (#:key inputs #:allow-other-keys)
2747 (copy-recursively (assoc-ref inputs "build-resources")
2748 "../build_resources")
2749 #t))
2750 (add-after 'unpack-build-resources 'fix-dependencies
2751 (lambda* (#:key inputs #:allow-other-keys)
2752 (substitute* "build/build.xml"
2753 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2754 (string-append (assoc-ref inputs "java-testng")
2755 "/share/java/java-testng.jar"))
2756 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2757 (string-append (assoc-ref inputs "java-commons-lang")
2758 "/share/java/commons-lang-"
2759 ,(package-version java-commons-lang) ".jar"))
2760 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2761 (string-append (assoc-ref inputs "java-commons-io")
2762 "/share/java/commons-io-"
2763 ,(package-version java-commons-io)
2764 "-SNAPSHOT.jar"))
2765 ;; Remove dependency on svn
2766 (("<build-info.*") "")
2767 (("\\$\\{revision.number\\}")
2768 ,(number->string revision))
2769 (("\\$\\{version.number\\}") ,base-version))
2770 ;; Remove dependency on classycle
2771 (substitute* "../build_resources/ant/build-common.xml"
2772 (("<taskdef name=\"dependency-checker.*") "")
2773 (("classname=\"classycle.*") "")
2774 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2775 #t))
2776 ;; A few tests fail because of the lack of a proper /etc/groups and
2777 ;; /etc/passwd file in the build container.
2778 (add-after 'unpack 'disable-broken-tests
2779 (lambda _
2780 (substitute* "sourceTest/java/ch/systemsx/cisd/base/AllTests.java"
2781 (("Unix.isOperational\\(\\)") "false"))
2782 #t))
2783 ;; These decorators are almost useless and pull in an unpackaged
2784 ;; dependency.
2785 (add-after 'unpack 'remove-useless-decorators
2786 (lambda _
2787 (substitute* "source/java/ch/systemsx/cisd/base/unix/Unix.java"
2788 (("@Private") "")
2789 (("import ch.rinn.restrictions.Private;") ""))
2790 (substitute* "sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java"
2791 (("@Friend.*") "")
2792 (("import ch.rinn.restrictions.Friend;") ""))
2793 #t))
2794 (add-before 'configure 'build-native-code
2795 (lambda* (#:key inputs #:allow-other-keys)
2796 (let ((jdk (assoc-ref inputs "jdk"))
2797 (dir ,(match (%current-system)
2798 ("i686-linux"
2799 "i386-Linux")
2800 ((or "armhf-linux" "aarch64-linux")
2801 "arm-Linux")
2802 ((or "x86_64-linux")
2803 "amd64-Linux")
2804 (_ "unknown-Linux"))))
2805 (with-directory-excursion "source/c"
2806 (invoke "gcc" "-shared" "-O3" "-fPIC" "unix.c"
2807 (string-append "-I" jdk "/include")
2808 (string-append "-I" jdk "/include/linux")
2809 "-o" "libunix.so")
2810 (invoke "gcc" "-shared" "-O3" "-fPIC"
2811 "-DMACHINE_BYTE_ORDER=1"
2812 "copyCommon.c"
2813 "copyByteChar.c"
2814 "copyByteDouble.c"
2815 "copyByteFloat.c"
2816 "copyByteInt.c"
2817 "copyByteLong.c"
2818 "copyByteShort.c"
2819 (string-append "-I" jdk "/include")
2820 (string-append "-I" jdk "/include/linux")
2821 "-o" "libnativedata.so"))
2822 (install-file "source/c/libunix.so"
2823 (string-append "libs/native/unix/" dir))
2824 (install-file "source/c/libnativedata.so"
2825 (string-append "libs/native/nativedata/" dir))
2826 #t)))
2827 ;; In the "check" phase we only build the test executable.
2828 (add-after 'check 'run-tests
2829 (lambda _
2830 (invoke "java" "-jar" "targets/dist/sis-base-test.jar")
2831 (delete-file "targets/dist/sis-base-test.jar")
2832 #t))
2833 (replace 'install (install-jars "targets/dist")))))
2834 (native-inputs
2835 `(("jdk" ,icedtea-8)
2836 ("java-commons-lang" ,java-commons-lang)
2837 ("java-commons-io" ,java-commons-io)
2838 ("java-testng" ,java-testng)
2839 ("build-resources"
2840 ,(origin
2841 (method svn-fetch)
2842 (uri (svn-reference
2843 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2844 "base/tags/release/"
2845 (version-major+minor base-version)
2846 ".x/" base-version
2847 "/build_resources/"))
2848 (revision revision)))
2849 (sha256
2850 (base32
2851 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
2852 (home-page "http://svnsis.ethz.ch")
2853 (synopsis "Utility classes for libraries from ETH Zurich")
2854 (description "This library supplies some utility classes needed for
2855libraries from the SIS division at ETH Zurich like jHDF5.")
2856 ;; The C sources are under a non-copyleft license, which looks like a
2857 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
2858 (license (list license:asl2.0
2859 (license:non-copyleft "file://source/c/COPYING"))))))
2860
04ddca26
RW
2861(define-public java-cisd-args4j
2862 (let ((revision 39162)
2863 (base-version "9.11.2"))
2864 (package
2865 (name "java-cisd-args4j")
2866 (version (string-append base-version "-" (number->string revision)))
2867 (source (origin
2868 (method svn-fetch)
2869 (uri (svn-reference
2870 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2871 "args4j/tags/release/"
2872 (version-major+minor base-version)
2873 ".x/" base-version "/args4j/"))
2874 (revision revision)))
2875 (file-name (string-append "java-cisd-args4j-" version "-checkout"))
2876 (sha256
2877 (base32
2878 "0hhqznjaivq7ips7mkwas78z42s6djsm20rrs7g1zd59rcsakxn2"))))
2879 (build-system ant-build-system)
2880 (arguments
2881 `(#:make-flags '("-file" "build/build.xml")
2882 #:tests? #f ; there are no tests
2883 ;; There are weird build failures with JDK8, such as: "The type
2884 ;; java.io.ObjectInputStream cannot be resolved. It is indirectly
2885 ;; referenced from required .class files"
2886 #:jdk ,icedtea-7
2887 #:modules ((guix build ant-build-system)
2888 (guix build utils)
2889 (guix build java-utils)
2890 (sxml simple)
2891 (sxml transform)
2892 (sxml xpath))
2893 #:phases
2894 (modify-phases %standard-phases
2895 (add-after 'unpack 'unpack-build-resources
2896 (lambda* (#:key inputs #:allow-other-keys)
2897 (mkdir-p "../build_resources")
2898 (invoke "tar" "xf" (assoc-ref inputs "build-resources")
2899 "-C" "../build_resources"
2900 "--strip-components=1")
2901 (mkdir-p "../build_resources/lib")
2902 #t))
2903 (add-after 'unpack-build-resources 'fix-dependencies
2904 (lambda* (#:key inputs #:allow-other-keys)
2905 ;; FIXME: There should be a more convenient abstraction for
2906 ;; editing XML files.
2907 (with-directory-excursion "../build_resources/ant/"
2908 (chmod "build-common.xml" #o664)
2909 (call-with-output-file "build-common.xml.new"
2910 (lambda (port)
2911 (sxml->xml
2912 (pre-post-order
2913 (with-input-from-file "build-common.xml"
2914 (lambda _ (xml->sxml #:trim-whitespace? #t)))
2915 `(;; Remove dependency on classycle and custom ant tasks
2916 (taskdef . ,(lambda (tag . kids)
2917 (let ((name ((sxpath '(name *text*)) kids)))
2918 (if (or (member "build-info" name)
2919 (member "dependency-checker" name)
2920 (member "build-java-subprojects" name)
2921 (member "project-classpath" name))
2922 '() ; skip
2923 `(,tag ,@kids)))))
2924 (typedef . ,(lambda (tag . kids)
2925 (let ((name ((sxpath '(name *text*)) kids)))
2926 (if (member "recursive-jar" name)
2927 '() ; skip
2928 `(,tag ,@kids)))))
2929 (build-java-subprojects . ,(lambda _ '()))
2930 ;; Ignore everything else
2931 (*default* . ,(lambda (tag . kids) `(,tag ,@kids)))
2932 (*text* . ,(lambda (_ txt) txt))))
2933 port)))
2934 (rename-file "build-common.xml.new" "build-common.xml"))
2935 (substitute* "build/build.xml"
2936 (("\\$\\{lib\\}/cisd-base/cisd-base.jar")
2937 (string-append (assoc-ref inputs "java-cisd-base")
2938 "/share/java/sis-base.jar"))
2939 ;; Remove dependency on svn
2940 (("<build-info.*") "")
2941 (("\\$\\{revision.number\\}")
2942 ,(number->string revision))
2943 (("\\$\\{version.number\\}") ,base-version)
2944 ;; Don't use custom ant tasks.
2945 (("recursive-jar") "jar")
2946 (("<project-classpath.*") ""))
2947 #t))
2948 (replace 'install (install-jars "targets/dist")))))
2949 (inputs
2950 `(("java-cisd-base" ,java-cisd-base)))
2951 (native-inputs
2952 `(("ecj" ,java-ecj-3.5)
2953 ("build-resources"
2954 ,(origin
2955 (method svn-fetch)
2956 (uri (svn-reference
2957 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2958 "args4j/tags/release/"
2959 (version-major+minor base-version)
2960 ".x/" base-version
2961 "/build_resources/"))
2962 (revision revision)))
2963 (sha256
2964 (base32
2965 "056cam4k8pll7ass31sy6gwn8g8719njc41yf4l02b0342nilkyf"))
2966 (modules '((guix build utils)))
2967 ;; Delete bundled pre-built jars.
2968 (snippet
2969 '(begin (delete-file-recursively "lib/") #t))))))
2970 (home-page "http://svnsis.ethz.ch")
2971 (synopsis "Command line parser library")
2972 (description "This package provides a parser for command line arguments.")
2973 (license license:asl2.0))))
2974
2f0d0418
RW
2975(define-public java-cisd-jhdf5
2976 (let ((revision 39162)
2977 (base-version "14.12.6"))
2978 (package
2979 (name "java-cisd-jhdf5")
2980 (version (string-append base-version "-" (number->string revision)))
2981 (source (origin
2982 (method svn-fetch)
2983 (uri (svn-reference
2984 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2985 "jhdf5/tags/release/"
2986 (version-major+minor base-version)
2987 ".x/" base-version "/jhdf5/"))
2988 (revision revision)))
2989 (file-name (string-append "java-cisd-jhdf5-" version "-checkout"))
2990 (sha256
2991 (base32
2992 "13i17s2hn0q9drdqvp8csy7770p3hdbh9rp30ihln2ldkfawdmz0"))
2993 (modules '((guix build utils)))
2994 (snippet
2995 '(begin
2996 ;; Delete included gradle jar
2997 (delete-file-recursively "gradle/wrapper")
2998 ;; Delete pre-built native libraries
2999 (delete-file-recursively "libs")
3000 #t))))
3001 (build-system ant-build-system)
3002 (arguments
3003 `(#:make-flags '("-file" "build/build.xml")
3004 #:build-target "jar-all"
3005 #:test-target "jar-test"
3006 #:jdk ,icedtea-8
3007 #:phases
3008 (modify-phases %standard-phases
1ed386fc
RW
3009 ;; FIXME: this build phase fails.
3010 (delete 'generate-jar-indices)
2f0d0418
RW
3011 ;; Don't erase results from the build phase when building tests.
3012 (add-after 'unpack 'separate-test-target-from-clean
3013 (lambda _
3014 (substitute* "build/build.xml"
3015 (("\"jar-test\" depends=\"clean, ")
3016 "\"jar-test\" depends=\""))
3017 #t))
3018 (add-after 'unpack 'unpack-build-resources
3019 (lambda* (#:key inputs #:allow-other-keys)
3020 (copy-recursively (assoc-ref inputs "build-resources")
3021 "../build_resources")
3022 (delete-file-recursively "../build_resources/lib/")
3023 (mkdir-p "../build_resources/lib")
3024 ;; Remove dependency on classycle
3025 (substitute* "../build_resources/ant/build-common.xml"
3026 (("<taskdef name=\"dependency-checker.*") "")
3027 (("classname=\"classycle.*") "")
3028 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
3029 ;; Remove dependency on svn
3030 (substitute* "build/build.xml"
3031 (("<build-info.*") "")
3032 (("\\$\\{revision.number\\}")
3033 ,(number->string revision))
3034 (("\\$\\{version.number\\}") ,base-version))
3035 #t))
3036 (add-after 'unpack-build-resources 'fix-dependencies
3037 (lambda* (#:key inputs #:allow-other-keys)
3038 (substitute* "../build_resources/ant/build-common.xml"
3039 (("../libraries/testng/testng-jdk15.jar")
3040 (string-append (assoc-ref inputs "java-testng")
3041 "/share/java/java-testng.jar")))
3042 (substitute* "build/build.xml"
3043 (("\\$\\{lib\\}/sis-base/sis-base.jar")
3044 (string-append (assoc-ref inputs "java-cisd-base")
3045 "/share/java/sis-base.jar"))
3046 (("\\$\\{lib\\}/cisd-args4j/cisd-args4j.jar")
3047 (string-append (assoc-ref inputs "java-cisd-args4j")
3048 "/share/java/cisd-args4j.jar"))
3049 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
3050 (string-append (assoc-ref inputs "java-commons-lang")
3051 "/share/java/commons-lang-"
3052 ,(package-version java-commons-lang) ".jar"))
3053 (("\\$\\{lib\\}/commons-io/commons-io.jar")
3054 (string-append (assoc-ref inputs "java-commons-io")
3055 "/share/java/commons-io-"
3056 ,(package-version java-commons-io)
3057 "-SNAPSHOT.jar"))
3058 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
3059 (string-append (assoc-ref inputs "java-testng")
3060 "/share/java/java-testng.jar"))
3061 (("\\$\\{lib\\}/junit4/junit.jar")
3062 (string-append (assoc-ref inputs "java-junit")
3063 "/share/java/junit.jar"))
3064 (("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar")
3065 (string-append (assoc-ref inputs "java-hamcrest-core")
3066 "/share/java/hamcrest-core.jar")))
3067 ;; Remove dependency on ch.rinn.restrictions
3068 (with-directory-excursion "source/java/ch/systemsx/cisd/hdf5/"
3069 (substitute* '("BitSetConversionUtils.java"
3070 "HDF5Utils.java")
3071 (("import ch.rinn.restrictions.Private;") "")
3072 (("@Private") "")))
3073 (with-directory-excursion "sourceTest/java/ch/systemsx/cisd/hdf5/"
3074 (substitute* '("BitSetConversionTest.java"
3075 "h5ar/HDF5ArchiverTest.java")
3076 (("import ch.rinn.restrictions.Friend;") "")
3077 (("@Friend.*") ""))
3078 ;; Remove leftovers from removing @Friend
3079 (substitute* "h5ar/HDF5ArchiverTest.java"
3080 (("\\{ HDF5Archiver.class, IdCache.class, LinkRecord.class \\}\\)")
3081 "")))
3082 #t))
3083 (add-before 'configure 'build-native-library
3084 (lambda* (#:key inputs #:allow-other-keys)
3085 (let ((jdk (assoc-ref inputs "jdk"))
3086 (hdf5 (assoc-ref inputs "hdf5"))
3087 (dir ,(match (%current-system)
3088 ("i686-linux"
3089 "i386-Linux")
3090 ((or "armhf-linux" "aarch64-linux")
3091 "arm-Linux")
3092 ((or "x86_64-linux")
3093 "amd64-Linux")
3094 (_ "unknown-Linux"))))
3095 (with-directory-excursion "source/c"
3096 (apply invoke `("gcc" "-shared" "-O3"
3097 "-fPIC"
3098 "-Wl,--exclude-libs,ALL"
3099 ,@(find-files "jhdf5" "\\.c$")
3100 ,@(find-files "hdf-java" "\\.c$")
3101 ,(string-append "-I" hdf5 "/include")
3102 ,(string-append "-I" jdk "/include")
3103 ,(string-append "-I" jdk "/include/linux")
3104 ,(string-append hdf5 "/lib/libhdf5.a")
3105 "-o" "libjhdf5.so" "-lz")))
3106 (install-file "source/c/libjhdf5.so"
3107 (string-append "libs/native/jhdf5/" dir))
3108 #t)))
3109 ;; In the "check" phase we only build the test executable.
3110 (add-after 'check 'run-tests
3111 (lambda _
3112 (invoke "java" "-jar" "targets/dist/sis-jhdf5-test.jar")
3113 (delete-file "targets/dist/sis-jhdf5-test.jar")
3114 #t))
3115 (replace 'install
3116 (install-jars "targets/dist")))))
3117 (inputs
3118 `(("java-cisd-base" ,java-cisd-base)
3119 ("java-cisd-args4j" ,java-cisd-args4j)
3120 ("java-commons-lang" ,java-commons-lang)
3121 ("java-commons-io" ,java-commons-io)
3122 ("hdf5" ,hdf5)
3123 ("zlib" ,zlib)))
3124 (native-inputs
3125 `(("jdk" ,icedtea-8)
3126 ("java-testng" ,java-testng)
3127 ("java-junit" ,java-junit)
3128 ("java-jmock" ,java-jmock)
3129 ("java-hamcrest-core" ,java-hamcrest-core)
3130 ("build-resources"
3131 ,(origin
3132 (method svn-fetch)
3133 (uri (svn-reference
3134 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3135 "jhdf5/tags/release/"
3136 (version-major+minor base-version)
3137 ".x/" base-version
3138 "/build_resources/"))
3139 (revision revision)))
3140 (sha256
3141 (base32
3142 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
3143 (home-page "https://wiki-bsse.ethz.ch/display/JHDF5/")
3144 (synopsis "Java binding for HDF5")
3145 (description "JHDF5 is a high-level API in Java for reading and writing
3146HDF5 files, building on the libraries provided by the HDF Group.")
3147 ;; The C sources are under a non-copyleft license, which looks like a
3148 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
3149 (license (list license:asl2.0
3150 (license:non-copyleft "file://source/c/COPYING"))))))
3151
218d093b
RW
3152(define-public java-classpathx-servletapi
3153 (package
3154 (name "java-classpathx-servletapi")
ae307724 3155 (version "3.0.1")
218d093b
RW
3156 (source (origin
3157 (method url-fetch)
3158 (uri (string-append "mirror://gnu/classpathx/servletapi/"
3159 "servletapi-" version ".tar.gz"))
3160 (sha256
3161 (base32
ae307724 3162 "07d8h051siga2f33fra72hk12sbq1bxa4jifjg0qj0vfazjjff0x"))))
218d093b
RW
3163 (build-system ant-build-system)
3164 (arguments
3165 `(#:tests? #f ; there is no test target
3166 #:build-target "compile"
218d093b 3167 #:make-flags
ae307724 3168 (list "-Dbuild.compiler=javac1.8"
218d093b
RW
3169 (string-append "-Ddist=" (assoc-ref %outputs "out")))
3170 #:phases
3171 (modify-phases %standard-phases
3172 (replace 'install
3173 (lambda* (#:key make-flags #:allow-other-keys)
2c8ac364 3174 (apply invoke `("ant" "dist" ,@make-flags)))))))
218d093b
RW
3175 (home-page "https://www.gnu.org/software/classpathx/")
3176 (synopsis "Java servlet API implementation")
3177 (description "This is the GNU servlet API distribution, part of the
3178ClasspathX project. It provides implementations of version 3.0 of the servlet
3179API and version 2.1 of the Java ServerPages API.")
3180 (license license:gpl3+)))
3181
10d62a88
BH
3182(define-public java-javaee-servletapi
3183 (package
3184 (name "java-javaee-servletapi")
3185 (version "3.1.0")
44bac44c
BH
3186 (source (origin
3187 (method git-fetch)
3188 (uri (git-reference
3189 (url "https://github.com/javaee/servlet-spec.git")
3190 (commit version)))
3191 (file-name (git-file-name name version))
3192 (sha256
3193 (base32
3194 "0s03lj8w5an70lkqbjycgfrfk0kc07vbfav91jzk87gh3awf9ksl"))))
10d62a88
BH
3195 (build-system ant-build-system)
3196 (arguments
3197 `(#:jar-name "javax-servletapi.jar"
3198 ;; no tests
3199 #:tests? #f
8ea8d607
BH
3200 #:source-dir "src/main/java"
3201 #:phases
3202 (modify-phases %standard-phases
3203 (add-before 'build 'copy-resources
3204 (lambda _
3205 (mkdir-p "build/classes/javax/servlet/http")
3206 (let ((from-prefix "src/main/java/javax/servlet/")
3207 (to-prefix "build/classes/javax/servlet/"))
3208 (for-each (lambda (f)
3209 (copy-file (string-append from-prefix f)
3210 (string-append to-prefix f)))
3211 (list "LocalStrings_ja.properties"
3212 "LocalStrings.properties"
3213 "LocalStrings_fr.properties"
3214 "http/LocalStrings_es.properties"
3215 "http/LocalStrings_ja.properties"
3216 "http/LocalStrings.properties"
3217 "http/LocalStrings_fr.properties")))
3218 #t)))))
10d62a88
BH
3219 (native-inputs
3220 `(("unzip" ,unzip)))
3221 (home-page "https://javaee.github.io/servlet-spec/")
3222 (synopsis "Java servlet API")
3223 (description "Java Servlet is the foundation web specification in the
3224Java Enterprise Platform. Developers can build web applications using the
3225Servlet API to interact with the request/response workflow. This project
3226provides information on the continued development of the Java Servlet
3227specification.")
3228 ;; Main code is dual-licensed by Oracle under either GLP2 or CDDL 1.1.
3229 ;; Some files are licensed under ASL 2.0.
3230 (license (list license:asl2.0 license:gpl2 license:cddl1.1))))
3231
5490480c
RW
3232(define-public java-swt
3233 (package
3234 (name "java-swt")
8710d4dd 3235 (version "4.7.1a")
5490480c
RW
3236 (source
3237 ;; The types of many variables and procedures differ in the sources
3238 ;; dependent on whether the target architecture is a 32-bit system or a
3239 ;; 64-bit system. Instead of patching the sources on demand in a build
3240 ;; phase we download either the 32-bit archive (which mostly uses "int"
3241 ;; types) or the 64-bit archive (which mostly uses "long" types).
8710d4dd
RW
3242 (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9")
3243 (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q")
5490480c
RW
3244 (file32 "x86")
3245 (file64 "x86_64"))
3246 (let-values (((hash file)
3247 (match (or (%current-target-system) (%current-system))
3248 ("x86_64-linux" (values hash64 file64))
3249 (_ (values hash32 file32)))))
3250 (origin
3251 (method url-fetch)
3252 (uri (string-append
8710d4dd
RW
3253 "http://download.eclipse.org/eclipse/downloads/drops4/"
3254 "R-" version "-201710090410/swt-" version
3255 "-gtk-linux-" file ".zip"))
5490480c
RW
3256 (sha256 (base32 hash))))))
3257 (build-system ant-build-system)
3258 (arguments
3259 `(#:jar-name "swt.jar"
8710d4dd 3260 #:jdk ,icedtea-8
5490480c
RW
3261 #:tests? #f ; no "check" target
3262 #:phases
3263 (modify-phases %standard-phases
3264 (replace 'unpack
3265 (lambda* (#:key source #:allow-other-keys)
2c8ac364
MW
3266 (mkdir "swt")
3267 (invoke "unzip" source "-d" "swt")
3268 (chdir "swt")
3269 (mkdir "src")
3270 (invoke "unzip" "src.zip" "-d" "src")))
5490480c
RW
3271 ;; The classpath contains invalid icecat jars. Since we don't need
3272 ;; anything other than the JDK on the classpath, we can simply unset
3273 ;; it.
3274 (add-after 'configure 'unset-classpath
3275 (lambda _ (unsetenv "CLASSPATH") #t))
3276 (add-before 'build 'build-native
3277 (lambda* (#:key inputs outputs #:allow-other-keys)
3278 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3279 ;; Build shared libraries. Users of SWT have to set the system
3280 ;; property swt.library.path to the "lib" directory of this
3281 ;; package output.
3282 (mkdir-p lib)
3283 (setenv "OUTPUT_DIR" lib)
3284 (with-directory-excursion "src"
2c8ac364 3285 (invoke "bash" "build.sh")))))
5490480c
RW
3286 (add-after 'install 'install-native
3287 (lambda* (#:key outputs #:allow-other-keys)
3288 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3289 (for-each (lambda (file)
3290 (install-file file lib))
3291 (find-files "." "\\.so$"))
3292 #t))))))
3293 (inputs
8710d4dd 3294 `(("gtk" ,gtk+-2)
5490480c
RW
3295 ("libxtst" ,libxtst)
3296 ("libxt" ,libxt)
3297 ("mesa" ,mesa)
3298 ("glu" ,glu)))
3299 (native-inputs
3300 `(("pkg-config" ,pkg-config)
3301 ("unzip" ,unzip)))
3302 (home-page "https://www.eclipse.org/swt/")
3303 (synopsis "Widget toolkit for Java")
3304 (description
3305 "SWT is a widget toolkit for Java designed to provide efficient, portable
3306access to the user-interface facilities of the operating systems on which it
3307is implemented.")
3308 ;; SWT code is licensed under EPL1.0
3309 ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1
3310 ;; Cairo bindings contain code under MPL1.1
3311 ;; XULRunner 1.9 bindings contain code under MPL2.0
3312 (license (list
3313 license:epl1.0
3314 license:mpl1.1
3315 license:mpl2.0
3316 license:lgpl2.1+))))
3317
068e476f
RJ
3318(define-public java-xz
3319 (package
3320 (name "java-xz")
92966847 3321 (version "1.6")
068e476f
RJ
3322 (source (origin
3323 (method url-fetch)
3324 (uri (string-append "http://tukaani.org/xz/xz-java-" version ".zip"))
3325 (sha256
3326 (base32
92966847 3327 "1z3p1ri1gvl07inxn0agx44ck8n7wrzfmvkz8nbq3njn8r9wba8x"))))
068e476f
RJ
3328 (build-system ant-build-system)
3329 (arguments
3330 `(#:tests? #f ; There are no tests to run.
3331 #:jar-name ,(string-append "xz-" version ".jar")
3332 #:phases
3333 (modify-phases %standard-phases
3334 ;; The unpack phase enters the "maven" directory by accident.
3335 (add-after 'unpack 'chdir
3336 (lambda _ (chdir "..") #t)))))
3337 (native-inputs
3338 `(("unzip" ,unzip)))
d6ddc5ab 3339 (home-page "https://tukaani.org/xz/java.html")
068e476f
RJ
3340 (synopsis "Implementation of XZ data compression in pure Java")
3341 (description "This library aims to be a complete implementation of XZ data
3342compression in pure Java. Single-threaded streamed compression and
3343decompression and random access decompression have been fully implemented.")
3344 (license license:public-domain)))
04100c3b
RW
3345
3346;; java-hamcrest-core uses qdox version 1.12. We package this version instead
3347;; of the latest release.
3348(define-public java-qdox-1.12
3349 (package
3350 (name "java-qdox")
3351 (version "1.12.1")
3352 (source (origin
3353 (method url-fetch)
3344bc49 3354 (uri (string-append "https://repo1.maven.org/maven2/"
04100c3b
RW
3355 "com/thoughtworks/qdox/qdox/" version
3356 "/qdox-" version "-sources.jar"))
3357 (sha256
3358 (base32
3359 "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl"))))
3360 (build-system ant-build-system)
3361 (arguments
3362 `(;; Tests require junit
3363 #:tests? #f
3364 #:jar-name "qdox.jar"
3365 #:phases
3366 (modify-phases %standard-phases
3367 (replace 'unpack
3368 (lambda* (#:key source #:allow-other-keys)
3369 (mkdir "src")
3370 (with-directory-excursion "src"
2c8ac364 3371 (invoke "jar" "-xf" source))))
04100c3b
RW
3372 ;; At this point we don't have junit, so we must remove the API
3373 ;; tests.
3374 (add-after 'unpack 'delete-tests
3375 (lambda _
3376 (delete-file-recursively "src/com/thoughtworks/qdox/junit")
3377 #t)))))
3344bc49 3378 (home-page "https://github.com/codehaus/qdox")
04100c3b
RW
3379 (synopsis "Parse definitions from Java source files")
3380 (description
3381 "QDox is a high speed, small footprint parser for extracting
3382class/interface/method definitions from source files complete with JavaDoc
b13cf17f 3383@code{@@tags}. It is designed to be used by active code generators or
04100c3b
RW
3384documentation tools.")
3385 (license license:asl2.0)))
e7e28510 3386
5281ba17
BH
3387(define-public java-qdox
3388 (package
3389 (name "java-qdox")
3390 ; Newer version exists, but this version is required by java-plexus-component-metadata
3391 (version "2.0-M2")
3392 (source (origin
3393 (method url-fetch)
3394 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
3395 ;; Older releases at https://github.com/codehaus/qdox/
3396 ;; Note: The release at maven is pre-generated. The release at
3397 ;; github requires jflex.
3398 (uri (string-append "https://repo1.maven.org/maven2/"
3399 "com/thoughtworks/qdox/qdox/" version
3400 "/qdox-" version "-sources.jar"))
3401 (sha256
3402 (base32
3403 "10xxrcaicq6axszcr2jpygisa4ch4sinyx5q7kqqxv4lknrmxp5x"))))
3404 (build-system ant-build-system)
3405 (arguments
3406 `(#:jar-name "qdox.jar"
3407 #:tests? #f)); no tests
3408 (home-page "https://github.com/codehaus/qdox")
3409 (synopsis "Parse definitions from Java source files")
3410 (description "QDox is a high speed, small footprint parser for extracting
3411class/interface/method definitions from source files complete with JavaDoc
3412@code{@@tags}. It is designed to be used by active code generators or
3413documentation tools.")
3414 (license license:asl2.0)))
3415
e7e28510
RW
3416(define-public java-jarjar
3417 (package
3418 (name "java-jarjar")
3419 (version "1.4")
3420 (source (origin
3421 (method url-fetch)
3422 (uri (string-append
3423 "https://storage.googleapis.com/google-code-archive-downloads/v2/"
3424 "code.google.com/jarjar/jarjar-src-" version ".zip"))
3425 (sha256
3426 (base32
88aa75e9
GB
3427 "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl"))
3428 (modules '((guix build utils)))
3429 (snippet
3430 '(begin
3431 ;; Delete bundled thirds-party jar archives.
3432 ;; TODO: unbundle maven-plugin-api.
3433 (delete-file "lib/asm-4.0.jar")
3434 (delete-file "lib/asm-commons-4.0.jar")
3435 (delete-file "lib/junit-4.8.1.jar")
3436 #t))))
e7e28510
RW
3437 (build-system ant-build-system)
3438 (arguments
3439 `(;; Tests require junit, which ultimately depends on this package.
3440 #:tests? #f
3441 #:build-target "jar"
3442 #:phases
3443 (modify-phases %standard-phases
88aa75e9
GB
3444 (add-before 'build 'do-not-use-bundled-asm
3445 (lambda* (#:key inputs #:allow-other-keys)
3446 (substitute* "build.xml"
3447 (("<path id=\"path.build\">")
3448 (string-append "<path id=\"path.build\"><fileset dir=\""
3449 (assoc-ref inputs "java-asm-bootstrap")
3450 "/share/java\" includes=\"**/*.jar\"/>"))
3451 (("<zipfileset src=\"lib/asm-4.0.jar\"/>") "")
3452 (("lib/asm-commons-4.0.jar")
3453 (string-append (assoc-ref inputs "java-asm-bootstrap")
3454 "/share/java/asm-6.0.jar"))
3455 (("<include name=\"org/objectweb/asm/commons/Remap\\*\\.class\"/>")
3456 (string-append "<include name=\"org/objectweb/asm/"
3457 "commons/Remap*.class\"/>"
3458 "<include name=\"org/objectweb/asm/*.class\"/>"
3459 "<include name=\"org/objectweb/asm/"
3460 "signature/*.class\"/>"
3461 "<include name=\"org/objectweb/asm/"
3462 "commons/SignatureRemapper.class\"/>")))
3463 #t))
e7e28510
RW
3464 (replace 'install
3465 (lambda* (#:key outputs #:allow-other-keys)
3466 (let ((target (string-append (assoc-ref outputs "out")
3467 "/share/java")))
3468 (install-file (string-append "dist/jarjar-" ,version ".jar")
3469 target))
3470 #t)))))
88aa75e9
GB
3471 (inputs
3472 `(("java-asm-bootstrap" ,java-asm-bootstrap)))
e7e28510
RW
3473 (native-inputs
3474 `(("unzip" ,unzip)))
3475 (home-page "https://code.google.com/archive/p/jarjar/")
3476 (synopsis "Repackage Java libraries")
3477 (description
3478 "Jar Jar Links is a utility that makes it easy to repackage Java
3479libraries and embed them into your own distribution. Jar Jar Links includes
3480an Ant task that extends the built-in @code{jar} task.")
3481 (license license:asl2.0)))
87c31a21
RW
3482
3483(define-public java-hamcrest-core
3484 (package
3485 (name "java-hamcrest-core")
3486 (version "1.3")
3487 (source (origin
2703d573
EF
3488 (method git-fetch)
3489 (uri (git-reference
3490 (url "https://github.com/hamcrest/JavaHamcrest/")
3491 (commit (string-append "hamcrest-java-" version))))
3492 (file-name (git-file-name name version))
87c31a21
RW
3493 (sha256
3494 (base32
2703d573 3495 "16fxxkrd31ahqvcaby30jgh3z1i0zxh51m24hxgz0z2agxj6bc63"))
87c31a21
RW
3496 (modules '((guix build utils)))
3497 (snippet
3498 '(begin
00672896
HG
3499 ;; Delete bundled thirds-party jar archives.
3500 (delete-file-recursively "lib")
87c31a21
RW
3501 #t))))
3502 (build-system ant-build-system)
3503 (arguments
3504 `(#:tests? #f ; Tests require junit
a8d3cb62
RW
3505 #:modules ((guix build ant-build-system)
3506 (guix build utils)
3507 (srfi srfi-1))
87c31a21 3508 #:make-flags (list (string-append "-Dversion=" ,version))
fae0b4ca 3509 #:test-target "unit-test"
87c31a21
RW
3510 #:build-target "core"
3511 #:phases
3512 (modify-phases %standard-phases
3513 ;; Disable unit tests, because they require junit, which requires
3514 ;; hamcrest-core. We also give a fixed value to the "Built-Date"
3515 ;; attribute from the manifest for reproducibility.
3516 (add-before 'configure 'patch-build.xml
3517 (lambda _
3518 (substitute* "build.xml"
3519 (("unit-test, ") "")
3520 (("\\$\\{build.timestamp\\}") "guix"))
3521 #t))
3522 ;; Java's "getMethods()" returns methods in an unpredictable order.
3523 ;; To make the output of the generated code deterministic we must
3524 ;; sort the array of methods.
3525 (add-after 'unpack 'make-method-order-deterministic
3526 (lambda _
3527 (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java"
3528 (("import java\\.util\\.Iterator;" line)
3529 (string-append line "\n"
3530 "import java.util.Arrays; import java.util.Comparator;"))
3531 (("allMethods = cls\\.getMethods\\(\\);" line)
3532 (string-append "_" line
3533 "
3534private Method[] getSortedMethods() {
3535 Arrays.sort(_allMethods, new Comparator<Method>() {
3536 @Override
3537 public int compare(Method a, Method b) {
3538 return a.toString().compareTo(b.toString());
3539 }
3540 });
3541 return _allMethods;
3542}
3543
2c8ac364
MW
3544private Method[] allMethods = getSortedMethods();")))
3545 #t))
87c31a21
RW
3546 (add-before 'build 'do-not-use-bundled-qdox
3547 (lambda* (#:key inputs #:allow-other-keys)
3548 (substitute* "build.xml"
3549 (("lib/generator/qdox-1.12.jar")
3550 (string-append (assoc-ref inputs "java-qdox-1.12")
3551 "/share/java/qdox.jar")))
3552 #t))
fab959d3
HG
3553 ;; build.xml searches for .jar files in this directoy, which
3554 ;; we remove from the source archive.
3555 (add-before 'build 'create-dummy-directories
3556 (lambda _
3557 (mkdir-p "lib/integration")
3558 #t))
87c31a21
RW
3559 (replace 'install
3560 (lambda* (#:key outputs #:allow-other-keys)
a8d3cb62
RW
3561 (let* ((target (string-append (assoc-ref outputs "out")
3562 "/share/java/"))
3563 (version-suffix ,(string-append "-" version ".jar"))
3564 (install-without-version-suffix
3565 (lambda (jar)
3566 (copy-file jar
3567 (string-append target
3568 (basename jar version-suffix)
3569 ".jar")))))
3570 (mkdir-p target)
3571 (for-each
3572 install-without-version-suffix
3573 (find-files "build"
3574 (lambda (name _)
3575 (and (string-suffix? ".jar" name)
3576 (not (string-suffix? "-sources.jar" name)))))))
3577 #t)))))
87c31a21
RW
3578 (native-inputs
3579 `(("java-qdox-1.12" ,java-qdox-1.12)
3580 ("java-jarjar" ,java-jarjar)))
3581 (home-page "http://hamcrest.org/")
3582 (synopsis "Library of matchers for building test expressions")
3583 (description
3584 "This package provides a library of matcher objects (also known as
3585constraints or predicates) allowing @code{match} rules to be defined
3586declaratively, to be used in other frameworks. Typical scenarios include
3587testing frameworks, mocking libraries and UI validation rules.")
3588 (license license:bsd-2)))
d0184f44
RW
3589
3590(define-public java-junit
3591 (package
3592 (name "java-junit")
3593 (version "4.12")
3594 (source (origin
42c1c59e
EF
3595 (method git-fetch)
3596 (uri (git-reference
3597 (url "https://github.com/junit-team/junit/")
3598 (commit (string-append "r" version))))
3599 (file-name (git-file-name name version))
d0184f44
RW
3600 (sha256
3601 (base32
42c1c59e 3602 "1j8avi91px1z8rjc89cfikwrvfifdmmsarwiyrcnr59ynvpz0v8h"))
d0184f44
RW
3603 (modules '((guix build utils)))
3604 (snippet
3605 '(begin
3606 ;; Delete bundled jar archives.
3607 (delete-file-recursively "lib")
3608 #t))))
3609 (build-system ant-build-system)
3610 (arguments
3611 `(#:tests? #f ; no tests
3612 #:jar-name "junit.jar"))
3613 (inputs
3614 `(("java-hamcrest-core" ,java-hamcrest-core)))
42c1c59e 3615 (home-page "https://junit.org/junit4/")
d0184f44
RW
3616 (synopsis "Test framework for Java")
3617 (description
3618 "JUnit is a simple framework to write repeatable tests for Java projects.
3619JUnit provides assertions for testing expected results, test fixtures for
3620sharing common test data, and test runners for running tests.")
3621 (license license:epl1.0)))
9fb20d01
RW
3622
3623(define-public java-plexus-utils
3624 (package
3625 (name "java-plexus-utils")
0cd8efcc 3626 (version "3.2.0")
9fb20d01 3627 (source (origin
c53badd4
EF
3628 (method git-fetch)
3629 (uri (git-reference
3630 (url "https://github.com/codehaus-plexus/plexus-utils")
3631 (commit (string-append "plexus-utils-" version))))
3632 (file-name (git-file-name name version))
9fb20d01
RW
3633 (sha256
3634 (base32
c53badd4 3635 "1mlx7xrq7lgqjqcpg7y4hi1ghavf28vvk3har82037dqx61n0f15"))))
9fb20d01
RW
3636 (build-system ant-build-system)
3637 ;; FIXME: The default build.xml does not include a target to install
3638 ;; javadoc files.
3639 (arguments
3640 `(#:jar-name "plexus-utils.jar"
3641 #:source-dir "src/main"
3642 #:phases
3643 (modify-phases %standard-phases
3644 (add-after 'unpack 'fix-reference-to-/bin-and-/usr
3645 (lambda _
3646 (substitute* "src/main/java/org/codehaus/plexus/util/\
3647cli/shell/BourneShell.java"
3648 (("/bin/sh") (which "sh"))
3649 (("/usr/") (getcwd)))
3650 #t))
3651 (add-after 'unpack 'fix-or-disable-broken-tests
3652 (lambda _
3653 (with-directory-excursion "src/test/java/org/codehaus/plexus/util"
3654 (substitute* '("cli/CommandlineTest.java"
3655 "cli/shell/BourneShellTest.java")
3656 (("/bin/sh") (which "sh"))
3657 (("/bin/echo") (which "echo")))
3658
3659 ;; This test depends on MavenProjectStub, but we don't have
3660 ;; a package for Maven.
3661 (delete-file "introspection/ReflectionValueExtractorTest.java")
3662
3663 ;; FIXME: The command line tests fail, maybe because they use
3664 ;; absolute paths.
3665 (delete-file "cli/CommandlineTest.java"))
3666 #t)))))
3667 (native-inputs
0cd8efcc
JL
3668 `(("java-hamcrest-core" ,java-hamcrest-core)
3669 ("java-junit" ,java-junit)))
1b4d40cf 3670 (home-page "https://codehaus-plexus.github.io/plexus-utils/")
9fb20d01
RW
3671 (synopsis "Common utilities for the Plexus framework")
3672 (description "This package provides various Java utility classes for the
3673Plexus framework to ease working with strings, files, command lines, XML and
3674more.")
3675 (license license:asl2.0)))
1e555562
HG
3676
3677(define-public java-plexus-interpolation
3678 (package
3679 (name "java-plexus-interpolation")
3680 (version "1.23")
3681 (source (origin
c4b67ba3
EF
3682 (method git-fetch)
3683 (uri (git-reference
3684 (url "https://github.com/codehaus-plexus/plexus-interpolation")
3685 (commit (string-append "plexus-interpolation-" version))))
3686 (file-name (git-file-name name version))
1e555562
HG
3687 (sha256
3688 (base32
c4b67ba3 3689 "005hxxg1adv71a96lz4vp65bk3v1pi76j4c45z29xzizclib16vl"))))
1e555562
HG
3690 (build-system ant-build-system)
3691 (arguments
3692 `(#:jar-name "plexus-interpolation.jar"
3693 #:source-dir "src/main"))
3694 (native-inputs
3695 `(("java-junit" ,java-junit)
3696 ("java-hamcrest-core" ,java-hamcrest-core)))
35e74723 3697 (home-page "https://codehaus-plexus.github.io/plexus-interpolation/")
1e555562
HG
3698 (synopsis "Java components for interpolating ${} strings and the like")
3699 (description "Plexus interpolator is a modular, flexible interpolation
3700framework for the expression language style commonly seen in Maven, Plexus,
3701and other related projects.
3702
3703It has its foundation in the @code{org.codehaus.plexus.utils.interpolation}
3704package within @code{plexus-utils}, but has been separated in order to allow
3705these two libraries to vary independently of one another.")
3706 (license license:asl2.0)))
8f8ed9aa 3707
bb27eb0d
JL
3708(define-public java-plexus-classworlds
3709 (package
3710 (name "java-plexus-classworlds")
3711 (version "2.5.2")
3712 (source (origin
9520b2b1
EF
3713 (method git-fetch)
3714 (uri (git-reference
3715 (url "https://github.com/codehaus-plexus/plexus-classworlds")
3716 (commit (string-append "plexus-classworlds-" version))))
3717 (file-name (git-file-name name version))
bb27eb0d
JL
3718 (sha256
3719 (base32
9520b2b1 3720 "1iv8x55fbni2hg4l7pdpbwfq75xmvq1f25g6nxma8rcdpihsh13r"))))
bb27eb0d
JL
3721 (build-system ant-build-system)
3722 (arguments
3723 `(#:jar-name "plexus-classworlds.jar"
3724 #:source-dir "src/main"
3725 #:tests? #f));; FIXME: we need to generate some resources as in pom.xml
3726 (native-inputs
3727 `(("java-junit" ,java-junit)))
268dc472 3728 (home-page "https://codehaus-plexus.github.io/plexus-classworlds/")
bb27eb0d 3729 (synopsis "Java class loader framework")
f4548394
TGR
3730 (description "Plexus classworlds replaces the native @code{ClassLoader}
3731mechanism of Java. It is especially useful for dynamic loading of application
bb27eb0d
JL
3732components.")
3733 (license license:asl2.0)))
3734
a7ad92ad 3735(define java-plexus-container-default-bootstrap
0726d4ea
JL
3736 (package
3737 (name "java-plexus-container-default-bootstrap")
3738 (version "1.7.1")
3739 (source (origin
3a26ea3a
EF
3740 (method git-fetch)
3741 (uri (git-reference
3742 (url "https://github.com/codehaus-plexus/plexus-containers")
3743 (commit (string-append "plexus-containers-" version))))
3744 (file-name (git-file-name name version))
0726d4ea
JL
3745 (sha256
3746 (base32
3a26ea3a 3747 "1316hrp5vqfv0aw7miq2fp0wwy833h66h502h29vnh5sxj27x228"))))
0726d4ea
JL
3748 (build-system ant-build-system)
3749 (arguments
3750 `(#:jar-name "container-default.jar"
3751 #:source-dir "plexus-container-default/src/main/java"
3752 #:test-dir "plexus-container-default/src/test"
3753 #:jdk ,icedtea-8
3754 #:tests? #f; requires plexus-archiver, which depends on this package
3755 #:phases
3756 (modify-phases %standard-phases
3757 (add-before 'build 'copy-resources
3758 (lambda _
3759 (copy-recursively
3760 "plexus-container-default/src/main/resources/"
3761 "build/classes")
3762 #t)))))
3763 (inputs
3764 `(("worldclass" ,java-plexus-classworlds)
3765 ("xbean" ,java-geronimo-xbean-reflect)
3766 ("utils" ,java-plexus-utils)
3767 ("junit" ,java-junit)
3768 ("guava" ,java-guava)))
3769 (home-page "https://github.com/codehaus-plexus/plexus-containers")
f4548394 3770 (synopsis "Inversion-of-control container")
0726d4ea 3771 (description "Plexus-default-container is Plexus' inversion-of-control
f4548394 3772(@dfn{IoC}) container. It is composed of its public API and its default
0726d4ea
JL
3773implementation.")
3774 (license license:asl2.0)))
3775
0858b9dc
JL
3776(define-public java-plexus-io
3777 (package
3778 (name "java-plexus-io")
3779 (version "3.0.0")
3780 (source (origin
48fe942c
EF
3781 (method git-fetch)
3782 (uri (git-reference
3783 (url "https://github.com/codehaus-plexus/plexus-io")
3784 (commit (string-append "plexus-io-" version))))
3785 (file-name (git-file-name name version))
0858b9dc
JL
3786 (sha256
3787 (base32
48fe942c 3788 "1h4q9l2j9sfbscvxpnyy2hazi0r83h3am86y4r959wrl1b24xxwd"))))
0858b9dc
JL
3789 (build-system ant-build-system)
3790 (arguments
3791 `(#:jar-name "plexus-io.jar"
3792 #:source-dir "src/main/java"
3793 #:test-dir "src/test"
3794 #:jdk ,icedtea-8
3795 #:phases
3796 (modify-phases %standard-phases
3797 (add-before 'build 'copy-resources
3798 (lambda _
3799 (mkdir-p "build/classes/META-INF/plexus")
3800 (copy-file "src/main/resources/META-INF/plexus/components.xml"
3801 "build/classes/META-INF/plexus/components.xml")
3802 #t)))))
3803 (inputs
3804 `(("utils" ,java-plexus-utils)
3805 ("commons-io" ,java-commons-io)
3806 ("java-jsr305" ,java-jsr305)))
3807 (native-inputs
3808 `(("junit" ,java-junit)
3809 ("hamcrest" ,java-hamcrest-core)
3810 ("guava" ,java-guava)
3811 ("classworlds" ,java-plexus-classworlds)
3812 ("xbean" ,java-geronimo-xbean-reflect)
3813 ("container-default" ,java-plexus-container-default-bootstrap)))
3814 (home-page "https://github.com/codehaus-plexus/plexus-io")
3815 (synopsis "I/O plexus components")
3816 (description "Plexus IO is a set of plexus components, which are designed
3817for use in I/O operations. This implementation using plexus components allows
3818reusing it in maven.")
3819 (license license:asl2.0)))
3820
b51df3ca
JL
3821(define-public java-plexus-archiver
3822 (package
3823 (name "java-plexus-archiver")
6f737ae6 3824 (version "4.1.0")
b51df3ca
JL
3825 (source (origin
3826 (method url-fetch)
3827 (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver"
3828 "/archive/plexus-archiver-" version ".tar.gz"))
3829 (sha256
3830 (base32
6f737ae6 3831 "0ry6i92gli0mvdmfih2vgs0lkf9yvx18h2ajxim66yg6yipnp0hg"))))
b51df3ca
JL
3832 (build-system ant-build-system)
3833 (arguments
3834 `(#:jar-name "plexus-archiver.jar"
3835 #:source-dir "src/main/java"
3836 #:jdk ,icedtea-8
3837 #:test-dir "src/test"
3838 #:test-exclude (list "**/Abstract*.java" "**/Base*.java")
3839 #:phases
3840 (modify-phases %standard-phases
3841 (add-before 'check 'remove-failing
3842 (lambda _
3843 ;; Requires an older version of plexus container
3844 (delete-file
2c8ac364
MW
3845 "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java")
3846 #t))
6f737ae6
JL
3847 (add-before 'check 'fix-test-building
3848 (lambda _
3849 (substitute* "build.xml"
3850 (("srcdir=\"src/test\"") "srcdir=\"src/test/java\""))
3851 #t))
b51df3ca
JL
3852 (add-before 'build 'copy-resources
3853 (lambda _
3854 (mkdir-p "build/classes/META-INF/plexus")
3855 (copy-file "src/main/resources/META-INF/plexus/components.xml"
3856 "build/classes/META-INF/plexus/components.xml")
3857 #t)))))
3858 (inputs
3859 `(("utils" ,java-plexus-utils)
3860 ("commons-io" ,java-commons-io)
3861 ("snappy" ,java-iq80-snappy)
3862 ("io" ,java-plexus-io)
3863 ("compress" ,java-commons-compress)
3864 ("container-default" ,java-plexus-container-default-bootstrap)
3865 ("snappy" ,java-snappy)
3866 ("java-jsr305" ,java-jsr305)))
3867 (native-inputs
6f737ae6
JL
3868 `(("java-hamcrest-core" ,java-hamcrest-core)
3869 ("junit" ,java-junit)
b51df3ca
JL
3870 ("classworld" ,java-plexus-classworlds)
3871 ("xbean" ,java-geronimo-xbean-reflect)
3872 ("xz" ,java-tukaani-xz)
3873 ("guava" ,java-guava)))
3874 (home-page "https://github.com/codehaus-plexus/plexus-archiver")
3875 (synopsis "Archiver component of the Plexus project")
3876 (description "Plexus-archiver contains a component to deal with project
3877archives (jar).")
3878 (license license:asl2.0)))
3879
a0837294
JL
3880(define-public java-plexus-container-default
3881 (package
3882 (inherit java-plexus-container-default-bootstrap)
3883 (name "java-plexus-container-default")
3884 (arguments
3885 `(#:jar-name "container-default.jar"
3886 #:source-dir "plexus-container-default/src/main/java"
3887 #:test-dir "plexus-container-default/src/test"
3888 #:test-exclude (list ;"**/*Test.java"
3889 "**/Abstract*.java"
3890 ;; Requires plexus-hierarchy
3891 "**/PlexusHierarchyTest.java"
3892 ;; Failures
3893 "**/ComponentRealmCompositionTest.java"
3894 "**/PlexusContainerTest.java")
3895 #:jdk ,icedtea-8
3896 #:phases
3897 (modify-phases %standard-phases
3898 (add-before 'build 'copy-resources
3899 (lambda _
3900 (copy-recursively
3901 "plexus-container-default/src/main/resources/"
3902 "build/classes")
3903 #t))
3904 (add-before 'check 'fix-paths
3905 (lambda _
3906 (let ((dir "plexus-container-default/src/test/java/org/codehaus"))
3907 (substitute*
3908 (string-append
3909 dir "/plexus/component/composition/"
3910 "ComponentRealmCompositionTest.java")
3911 (("src/test") "plexus-container-default/src/test"))
3912 #t))))))
3913 (inputs
3914 `(("worldclass" ,java-plexus-classworlds)
3915 ("xbean" ,java-geronimo-xbean-reflect)
3916 ("utils" ,java-plexus-utils)
3917 ("junit" ,java-junit)
3918 ("guava" ,java-guava)))
3919 (native-inputs
3920 `(("archiver" ,java-plexus-archiver)
3921 ("hamcrest" ,java-hamcrest-core)))))
3922
3214afab
JL
3923(define-public java-plexus-component-annotations
3924 (package
3925 (inherit java-plexus-container-default)
3926 (name "java-plexus-component-annotations")
3927 (arguments
3928 `(#:jar-name "plexus-component-annotations.jar"
3929 #:source-dir "plexus-component-annotations/src/main/java"
3930 #:tests? #f)); no tests
3931 (inputs '())
3932 (native-inputs '())
3933 (synopsis "Plexus descriptors generator")
3934 (description "This package is a Maven plugin to generate Plexus descriptors
3935from source tags and class annotations.")))
3936
4f77ba17
JL
3937(define-public java-plexus-cipher
3938 (package
3939 (name "java-plexus-cipher")
3940 (version "1.7")
3941 (source (origin
d0e64613
EF
3942 (method git-fetch)
3943 (uri (git-reference
3944 (url "https://github.com/codehaus-plexus/plexus-cipher")
3945 (commit (string-append "plexus-cipher-" version))))
3946 (file-name (git-file-name name version))
4f77ba17
JL
3947 (sha256
3948 (base32
d0e64613 3949 "0m638nzlxbmnbcj5cwdpgs326ab584yv0k803zlx37r6iqwvf6b0"))))
4f77ba17
JL
3950 (build-system ant-build-system)
3951 (arguments
3952 `(#:jar-name "plexus-cipher.jar"
3953 #:source-dir "src/main/java"
3954 #:jdk ,icedtea-8
3955 #:tests? #f; FIXME: requires sisu-inject-bean
3956 #:phases
3957 (modify-phases %standard-phases
3958 (add-before 'build 'copy-resources
3959 (lambda _
3960 (copy-recursively "src/main/resources" "build/classes")
3961 (mkdir-p "build/classes/META-INF/sisu")
3962 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
3963 (lambda _
3964 (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
3965 #t)))))
3966 (inputs
3967 `(("java-cdi-api" ,java-cdi-api)
3968 ("java-javax-inject" ,java-javax-inject)))
3969 (home-page "https://github.com/sonatype/plexus-cipher")
3970 (synopsis "Encryption/decryption Component")
3971 (description "Plexus-cipher contains a component to deal with encryption
3972and decryption.")
3973 (license license:asl2.0)))
3974
239126d4
JL
3975(define-public java-plexus-compiler-api
3976 (package
3977 (name "java-plexus-compiler-api")
a70182b0 3978 (version "2.8.4")
239126d4 3979 (source (origin
5723137a
EF
3980 (method git-fetch)
3981 (uri (git-reference
3982 (url "https://github.com/codehaus-plexus/plexus-compiler")
3983 (commit (string-append "plexus-compiler-" version))))
3984 (file-name (git-file-name name version))
239126d4
JL
3985 (sha256
3986 (base32
5723137a 3987 "1nq1gnn3s6z1j29gmi1hqbklsmm8b1lmnafb0191914f95mn18gk"))))
239126d4
JL
3988 (build-system ant-build-system)
3989 (arguments
3990 `(#:jar-name "plexus-compiler-api.jar"
3991 #:source-dir "plexus-compiler-api/src/main/java"
3992 #:jdk ,icedtea-8
3993 #:test-dir "plexus-compiler-api/src/test"))
3994 (inputs
3995 `(("java-plexus-container-default" ,java-plexus-container-default)
3996 ("java-plexus-util" ,java-plexus-utils)))
3997 (native-inputs
3998 `(("java-junit" ,java-junit)))
3999 (home-page "https://github.com/codehaus-plexus/plexus-compiler")
4000 (synopsis "Plexus Compilers component's API to manipulate compilers")
4001 (description "This package contains the API used by components to manipulate
4002compilers.")
4003 (license (list license:asl2.0
4004 license:expat))))
4005
f8a519fa
JL
4006(define-public java-plexus-compiler-javac
4007 (package
4008 (inherit java-plexus-compiler-api)
4009 (name "java-plexus-compiler-javac")
4010 (arguments
4011 `(#:jar-name "plexus-compiler-javac.jar"
4012 #:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java"
4013 #:jdk ,icedtea-8
4014 #:tests? #f; depends on compiler-test -> maven-core -> ... -> this package.
4015 #:test-dir "plexus-compilers/plexus-compiler-javac/src/test"))
4016 (inputs
4017 `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
4018 ("java-plexus-utils" ,java-plexus-utils)
4019 ("java-plexus-container-default" ,java-plexus-container-default)))
4020 (native-inputs
4021 `(("java-junit" ,java-junit)))
4022 (synopsis "Javac Compiler support for Plexus Compiler component")
4023 (description "This package contains the Javac Compiler support for Plexus
4024Compiler component.")))
4025
0aa85081
JL
4026(define-public java-plexus-sec-dispatcher
4027 (package
4028 (name "java-plexus-sec-dispatcher")
4029 (version "1.4") ;; Newest release listed at the Maven Central Repository.
4030 (source (origin
4031 ;; This project doesn't tag releases or publish tarballs, so we take
4032 ;; the "prepare release plexus-sec-dispatcher-1.4" git commit.
d9e356a8
EF
4033 (method git-fetch)
4034 (uri (git-reference
4035 (url "https://github.com/sonatype/plexus-sec-dispatcher/")
4036 (commit "7db8f880486e192a1c5ea9544e01e756c3d49d0f")))
0aa85081
JL
4037 (sha256
4038 (base32
d9e356a8
EF
4039 "1ng4yliy4cqpjr4fxxjbpwyk1wkch5f8vblm1kvwf328s4gibszs"))
4040 (file-name (git-file-name name version))))
0aa85081
JL
4041 (arguments
4042 `(#:jar-name "plexus-sec-dispatcher.jar"
4043 #:source-dir "src/main/java"
4044 #:jdk ,icedtea-8
4045 #:phases
4046 (modify-phases %standard-phases
4047 (add-before 'build 'generate-models
4048 (lambda* (#:key inputs #:allow-other-keys)
4049 (define (modello-single-mode file version mode)
2c8ac364
MW
4050 (invoke "java"
4051 "org.codehaus.modello.ModelloCli"
4052 file mode "src/main/java" version
4053 "false" "true"))
0aa85081 4054 (let ((file "src/main/mdo/settings-security.mdo"))
0aa85081
JL
4055 (modello-single-mode file "1.0.0" "java")
4056 (modello-single-mode file "1.0.0" "xpp3-reader")
2c8ac364
MW
4057 (modello-single-mode file "1.0.0" "xpp3-writer"))
4058 #t))
0aa85081
JL
4059 (add-before 'build 'generate-components.xml
4060 (lambda _
4061 (mkdir-p "build/classes/META-INF/plexus")
4062 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
4063 (lambda _
4064 (display
4065 "<component-set>\n
4066 <components>\n
4067 <component>\n
4068 <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n
4069 <role-hint>default</role-hint>\n
4070 <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n
4071 <description></description>\n
4072 <requirements>\n
4073 <requirement>\n
4074 <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n
4075 <field-name>_cipher</field-name>\n
4076 </requirement>\n
4077 <requirement>\n
4078 <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n
4079 <field-name>_decryptors</field-name>\n
4080 </requirement>\n
4081 </requirements>\n
4082 <configuration>\n
4083 <_configuration-file>~/.settings-security.xml</_configuration-file>\n
4084 </configuration>\n
4085 </component>\n
4086 </components>\n
2c8ac364
MW
4087</component-set>\n")))
4088 #t))
0aa85081
JL
4089 (add-before 'check 'fix-paths
4090 (lambda _
2c8ac364
MW
4091 (copy-recursively "src/test/resources" "target")
4092 #t)))))
0aa85081
JL
4093 (inputs
4094 `(("java-plexus-cipher" ,java-plexus-cipher)))
4095 (native-inputs
4096 `(("java-modello-core" ,java-modello-core)
4097 ;; for modello:
4098 ("java-plexus-container-default" ,java-plexus-container-default)
4099 ("java-plexus-classworlds" ,java-plexus-classworlds)
4100 ("java-plexus-utils" ,java-plexus-utils)
4101 ("java-guava" ,java-guava)
4102 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4103 ("java-sisu-build-api" ,java-sisu-build-api)
4104 ;; modello plugins:
4105 ("java-modellop-plugins-java" ,java-modello-plugins-java)
4106 ("java-modellop-plugins-xml" ,java-modello-plugins-xml)
4107 ("java-modellop-plugins-xpp3" ,java-modello-plugins-xpp3)
4108 ;; for tests
4109 ("java-junit" ,java-junit)))
4110 (build-system ant-build-system)
4111 (home-page "https://github.com/sonatype/plexus-sec-dispatcher")
4112 (synopsis "Plexus Security Dispatcher Component")
4113 (description "This package is the Plexus Security Dispatcher Component.
4114This component decrypts a string passed to it.")
4115 (license license:asl2.0)))
4116
7d65489f
JL
4117(define-public java-plexus-cli
4118 (package
4119 (name "java-plexus-cli")
4120 (version "1.7")
4121 (source (origin
4122 (method git-fetch)
4123 (uri (git-reference
4124 (url "https://github.com/sonatype/plexus-cli")
4125 (commit "a776afa6bca84e5107bedb69440329cdb24ed645")))
4126 (file-name (string-append name "-" version))
4127 (sha256
4128 (base32
4129 "0xjrlay605rypv3zd7y24vlwf0039bil3n2cqw54r1ddpysq46vx"))))
4130 (build-system ant-build-system)
4131 (arguments
4132 `(#:jar-name "plexus-cli.jar"
4133 #:source-dir "src/main/java"
4134 #:jdk ,icedtea-8
4135 #:test-dir "src/test"))
4136 (inputs
4137 `(("java-commons-cli" ,java-commons-cli)
4138 ("java-plexus-container-default" ,java-plexus-container-default)
4139 ("java-plexus-classworlds" ,java-plexus-classworlds)))
4140 (native-inputs
4141 `(("java-plexus-utils" ,java-plexus-utils)
4142 ("java-junit" ,java-junit)
4143 ("java-guava" ,java-guava)))
4144 (home-page "https://codehaus-plexus.github.io/plexus-cli")
4145 (synopsis "CLI building library for plexus")
4146 (description "This package is a library to help creating CLI around
4147Plexus components.")
4148 (license license:asl2.0)))
4149
8f524749
JL
4150(define-public java-sisu-build-api
4151 (package
4152 (name "java-sisu-build-api")
4153 (version "0.0.7")
4154 (source (origin
16c62763
EF
4155 (method git-fetch)
4156 (uri (git-reference
4157 (url "https://github.com/sonatype/sisu-build-api")
4158 (commit (string-append "plexus-build-api-" version))))
4159 (file-name (git-file-name name version))
8f524749
JL
4160 (sha256
4161 (base32
16c62763 4162 "1d5w6c58gkx30d51v7qwv1xrhc0ly76848gihmgshj19yf6yhca0"))))
8f524749
JL
4163 (build-system ant-build-system)
4164 (arguments
4165 `(#:jar-name "sisu-build-api.jar"
4166 #:source-dir "src/main/java"
4167 #:jdk ,icedtea-8
4168 #:tests? #f; FIXME: how to run the tests?
4169 #:phases
4170 (modify-phases %standard-phases
4171 (add-before 'build 'copy-resources
4172 (lambda _
4173 (copy-recursively "src/main/resources" "build/classes")
4174 (substitute* (find-files "build/classes")
4175 (("\\$\\{project.version\\}") ,version))
4176 #t))
4177 (add-before 'build 'generate-plexus-compontent
4178 (lambda _
4179 (mkdir-p "build/classes/META-INF/plexus")
4180 ;; This file is required for plexus to inject this package.
4181 ;; FIXME: how is it generated?
4182 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
4183 (lambda _
4184 (display
4185 "<component-set>\n
4186 <components>\n
4187 <component>\n
4188 <role>org.sonatype.plexus.build.incremental.BuildContext</role>\n
4189 <role-hint>default</role-hint>\n
4190 <implementation>org.sonatype.plexus.build.incremental.DefaultBuildContext</implementation>\n
4191 <description>Filesystem based non-incremental build context implementation\n
4192which behaves as if all files were just created.</description>\n
4193 </component>\n
4194 </components>\n
4195</component-set>\n")))
4196 #t)))))
4197 (inputs
4198 `(("java-plexus-utils" ,java-plexus-utils)
4199 ("java-plexus-container-default" ,java-plexus-container-default)))
4200 (home-page "https://github.com/sonatype/sisu-build-api/")
4201 (synopsis "Base build API for maven")
4202 (description "This package contains the base build API for maven and
4203a default implementation of it. This API is about scanning files in a
4204project and determining what files need to be rebuilt.")
4205 (license license:asl2.0)))
4206
b26c8b61
JL
4207(define-public java-modello-core
4208 (package
4209 (name "java-modello-core")
4210 (version "1.9.1")
4211 (source (origin
df9487c5
EF
4212 (method git-fetch)
4213 (uri (git-reference
4214 (url "https://github.com/codehaus-plexus/modello")
4215 (commit (string-append "modello-" version))))
4216 (file-name (git-file-name name version))
b26c8b61
JL
4217 (sha256
4218 (base32
df9487c5 4219 "1di6ni42aqllpdvkpyfcw70352vr2i8wf6hd5nhd9kmqjb5dj5j4"))))
b26c8b61
JL
4220 (build-system ant-build-system)
4221 (arguments
4222 `(#:jar-name "modello-core.jar"
4223 #:source-dir "modello-core/src/main/java"
4224 #:test-dir "modello-core/src/test"
4225 #:main-class "org.codehaus.modello.ModelloCli"
4226 #:jdk ,icedtea-8
4227 #:phases
4228 (modify-phases %standard-phases
4229 (add-before 'build 'copy-resources
4230 (lambda _
4231 (mkdir-p "build/classes/META-INF/plexus")
4232 (copy-file "modello-core/src/main/resources/META-INF/plexus/components.xml"
4233 "build/classes/META-INF/plexus/components.xml")
4234 #t))
4235 (add-before 'check 'fix-tests
4236 (lambda _
4237 (with-directory-excursion "modello-core/src/test/java/org/codehaus"
4238 (substitute* '("modello/core/DefaultModelloCoreTest.java"
4239 "modello/core/io/ModelReaderTest.java")
4240 (("src/test") "modello-core/src/test")))
4241 #t)))))
4242 (inputs
4243 `(("java-plexus-utils" ,java-plexus-utils)
4244 ("java-plexus-container-default" ,java-plexus-container-default)
4245 ("java-sisu-build-api" ,java-sisu-build-api)))
4246 (native-inputs
4247 `(("java-junit" ,java-junit)
4248 ("java-plexus-classworlds" ,java-plexus-classworlds)
4249 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4250 ("java-guava" ,java-guava)))
7942a129 4251 (home-page "https://codehaus-plexus.github.io/modello/")
b26c8b61
JL
4252 (synopsis "Framework for code generation from a simple model")
4253 (description "Modello is a framework for code generation from a simple model.
4254
4255Modello generates code from a simple model format: based on a plugin
4256architecture, various types of code and descriptors can be generated from the
4257single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers,
4258XSD and documentation.")
4259 (license (list
4260 license:expat
4261 ;; Although this package uses only files licensed under expat,
4262 ;; other parts of the source are licensed under different
4263 ;; licenses. We include them to be inherited by other packages.
4264 license:asl2.0
4265 ;; Some files in modello-plugin-java are licensed under a
4266 ;; 5-clause BSD license.
4267 (license:non-copyleft
4268 (string-append "file:///modello-plugins/modello-plugin-java/"
4269 "src/main/java/org/codehaus/modello/plugin/"
4270 "java/javasource/JNaming.java"))))))
4271
fc620bef
JL
4272(define-public java-modello-plugins-java
4273 (package
4274 (inherit java-modello-core)
4275 (name "java-modello-plugins-java")
4276 (arguments
4277 `(#:jar-name "modello-plugins-java.jar"
4278 #:source-dir "modello-plugins/modello-plugin-java/src/main/java"
4279 #:test-dir "modello-plugins/modello-plugin-java/src/test"
4280 #:jdk ,icedtea-8
4281 #:tests? #f; requires maven-model, which depends on this package
4282 #:phases
4283 (modify-phases %standard-phases
4284 (add-before 'build 'copy-resources
4285 (lambda _
4286 (mkdir-p "build/classes")
4287 (copy-recursively "modello-plugins/modello-plugin-java/src/main/resources"
4288 "build/classes")
4289 #t)))))
4290 (inputs
4291 `(("java-modello-core" ,java-modello-core)
4292 ,@(package-inputs java-modello-core)))
4293 (synopsis "Modello Java Plugin")
4294 (description "Modello Java Plugin generates Java objects for the model.")))
4295
a0ce95ba
JL
4296(define-public java-modello-plugins-xml
4297 (package
4298 (inherit java-modello-core)
4299 (name "java-modello-plugins-xml")
4300 (arguments
4301 `(#:jar-name "modello-plugins-xml.jar"
4302 #:source-dir "modello-plugins/modello-plugin-xml/src/main/java"
4303 #:test-dir "modello-plugins/modello-plugin-xml/src/test"
4304 #:jdk ,icedtea-8
4305 #:phases
4306 (modify-phases %standard-phases
4307 (add-before 'build 'copy-resources
4308 (lambda _
4309 (mkdir-p "build/classes")
4310 (copy-recursively
4311 "modello-plugins/modello-plugin-xml/src/main/resources"
4312 "build/classes")
4313 #t))
4314 (add-before 'check 'fix-paths
4315 (lambda _
4316 (with-directory-excursion "modello-plugins/modello-plugin-xml/src/test"
4317 (substitute*
4318 "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java"
2c8ac364
MW
4319 (("src/test") "modello-plugins/modello-plugin-xml/src/test")))
4320 #t)))))
a0ce95ba
JL
4321 (inputs
4322 `(("java-modello-core" ,java-modello-core)
4323 ("java-modello-plugins-java" ,java-modello-plugins-java)
4324 ,@(package-inputs java-modello-core)))
4325 (synopsis "Modello XML Plugin")
4326 (description "Modello XML Plugin contains shared code for every plugins
4327working on XML representation of the model.")))
4328
e4708560
JL
4329(define-public java-modello-test
4330 (package
4331 (inherit java-modello-core)
4332 (name "java-modello-test")
4333 (arguments
4334 `(#:jar-name "modello-test.jar"
4335 #:source-dir "modello-test/src/main/java"
4336 #:tests? #f; no tests
4337 #:jdk ,icedtea-8))
4338 (inputs
4339 `(("java-plexus-utils" ,java-plexus-utils)
4340 ("java-plexus-compiler-api" ,java-plexus-compiler-api)
4341 ("java-plexus-compiler-javac" ,java-plexus-compiler-javac)
4342 ("java-plexus-container-default" ,java-plexus-container-default)))
4343 (synopsis "Modello test package")
4344 (description "The modello test package contains the basis to create
4345Modello generator unit-tests, including sample models and xml files to test
4346every feature for every plugin.")))
4347
36607d3b
JL
4348(define-public java-modello-plugins-xpp3
4349 (package
4350 (inherit java-modello-core)
4351 (name "java-modello-plugins-xpp3")
4352 (arguments
4353 `(#:jar-name "modello-plugins-xpp3.jar"
4354 #:source-dir "modello-plugins/modello-plugin-xpp3/src/main/java"
4355 #:test-dir "modello-plugins/modello-plugin-xpp3/src/test"
4356 ;; One of the test dependencies is maven-model which depends on this package.
4357 #:tests? #f
4358 #:jdk ,icedtea-8
4359 #:phases
4360 (modify-phases %standard-phases
4361 (add-before 'build 'copy-resources
4362 (lambda _
4363 (mkdir-p "build/classes")
4364 (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources"
4365 "build/classes")
4366 #t)))))
4367 (inputs
4368 `(("java-modello-core" ,java-modello-core)
4369 ("java-modello-plugins-java" ,java-modello-plugins-java)
4370 ("java-modello-plugins-xml" ,java-modello-plugins-xml)
4371 ,@(package-inputs java-modello-core)))
4372 (native-inputs
4373 `(("java-xmlunit" ,java-xmlunit)
4374 ("java-modello-test" ,java-modello-test)
4375 ,@(package-native-inputs java-modello-core)))
4376 (synopsis "Modello XPP3 Plugin")
4377 (description "The modello XPP3 plugin generates XML readers and writers based
4378on the XPP3 API (XML Pull Parser).")))
4379
8f8ed9aa
RW
4380(define-public java-asm
4381 (package
4382 (name "java-asm")
d0e9ded7 4383 (version "6.0")
8f8ed9aa
RW
4384 (source (origin
4385 (method url-fetch)
654f997d 4386 (uri (string-append "https://download.forge.ow2.org/asm/"
8f8ed9aa
RW
4387 "asm-" version ".tar.gz"))
4388 (sha256
4389 (base32
d0e9ded7 4390 "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00"))))
8f8ed9aa 4391 (build-system ant-build-system)
d0e9ded7 4392 (propagated-inputs
9d216017
GB
4393 `(("java-aqute-bndlib" ,java-aqute-bndlib)
4394 ("java-aqute-libg" ,java-aqute-libg)))
8f8ed9aa
RW
4395 (arguments
4396 `(#:build-target "compile"
4397 ;; The tests require an old version of Janino, which no longer compiles
4398 ;; with the JDK7.
4399 #:tests? #f
d0e9ded7
GB
4400 #:make-flags
4401 (list
4402 ;; We don't need these extra ant tasks, but the build system asks us to
4403 ;; provide a path anyway.
4404 "-Dobjectweb.ant.tasks.path=dummy-path"
4405 ;; The java-aqute.bndlib JAR file will be put onto the classpath and
4406 ;; used during the build automatically by ant-build-system, but
4407 ;; java-asm's build.xml fails unless we provide something here.
4408 "-Dbiz.aQute.bnd.path=dummy-path")
8f8ed9aa
RW
4409 #:phases
4410 (modify-phases %standard-phases
4411 (add-before 'install 'build-jars
4412 (lambda* (#:key make-flags #:allow-other-keys)
4413 ;; We cannot use the "jar" target because it depends on a couple
4414 ;; of unpackaged, complicated tools.
4415 (mkdir "dist")
2c8ac364
MW
4416 (invoke "jar"
4417 "-cf" (string-append "dist/asm-" ,version ".jar")
4418 "-C" "output/build/tmp" ".")))
8f8ed9aa
RW
4419 (replace 'install
4420 (install-jars "dist")))))
4421 (native-inputs
4422 `(("java-junit" ,java-junit)))
1e4ae551 4423 (home-page "https://asm.ow2.io/")
8f8ed9aa
RW
4424 (synopsis "Very small and fast Java bytecode manipulation framework")
4425 (description "ASM is an all purpose Java bytecode manipulation and
4426analysis framework. It can be used to modify existing classes or dynamically
4427generate classes, directly in binary form. The provided common
a4cb4d17 4428transformations and analysis algorithms allow easily assembling custom
8f8ed9aa
RW
4429complex transformations and code analysis tools.")
4430 (license license:bsd-3)))
607fe24a 4431
bfb4004d
GB
4432(define java-asm-bootstrap
4433 (package
4434 (inherit java-asm)
4435 (name "java-asm-bootstrap")
4436 (arguments
4437 (substitute-keyword-arguments (package-arguments java-asm)
4438 ((#:tests? _) #f)))
4439 (native-inputs `())
4440 (propagated-inputs
4441 `(("java-aqute-bndlib" ,java-aqute-bndlib-bootstrap)
4442 ("java-aqute-libg" ,java-aqute-libg-bootstrap)
4443 ,@(delete `("java-aqute-bndlib" ,java-aqute-bndlib)
de99ba7e 4444 (delete `("java-aqute-libg" ,java-aqute-libg)
bfb4004d
GB
4445 (package-inputs java-asm)))))))
4446
607fe24a
RW
4447(define-public java-cglib
4448 (package
4449 (name "java-cglib")
4450 (version "3.2.4")
5c44505b
TGR
4451 (source
4452 (origin
4453 (method git-fetch)
4454 (uri (git-reference
4455 (url "https://github.com/cglib/cglib.git")
4456 (commit (string-append
4457 "RELEASE_"
4458 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
4459 version)))))
4460 (file-name (git-file-name name version))
4461 (sha256
4462 (base32 "186451jms2zfp47yd8kxd77az2cqal1my2br7klgyp8fpl4qfg8v"))))
607fe24a
RW
4463 (build-system ant-build-system)
4464 (arguments
4465 `(;; FIXME: tests fail because junit runs
4466 ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem
4467 ;; to describe a test at all.
4468 #:tests? #f
4469 #:jar-name "cglib.jar"
4470 #:phases
4471 (modify-phases %standard-phases
4472 (add-after 'unpack 'chdir
4473 (lambda _ (chdir "cglib") #t)))))
4474 (inputs
4475 `(("java-asm" ,java-asm)
4476 ("java-junit" ,java-junit)))
4477 (home-page "https://github.com/cglib/cglib/")
4478 (synopsis "Java byte code generation library")
4479 (description "The byte code generation library CGLIB is a high level API
4480to generate and transform Java byte code.")
4481 (license license:asl2.0)))
33e34bfe
RW
4482
4483(define-public java-objenesis
4484 (package
4485 (name "java-objenesis")
4486 (version "2.5.1")
4487 (source (origin
3dc7a8ce
EF
4488 (method git-fetch)
4489 (uri (git-reference
4490 (url "https://github.com/easymock/objenesis")
4491 (commit version)))
4492 (file-name (git-file-name name version))
33e34bfe
RW
4493 (sha256
4494 (base32
3dc7a8ce 4495 "054yi200wj00x6dp1sxfrwgndwywadsbn8d8ij1j0v45j9g2vdya"))))
33e34bfe
RW
4496 (build-system ant-build-system)
4497 (arguments
4498 `(#:jar-name "objenesis.jar"
4499 #:source-dir "main/src/"
4500 #:test-dir "main/src/test/"))
4501 (native-inputs
4502 `(("java-junit" ,java-junit)
4503 ("java-hamcrest-core" ,java-hamcrest-core)))
4504 (home-page "http://objenesis.org/")
4505 (synopsis "Bypass the constructor when creating an object")
4506 (description "Objenesis is a small Java library that serves one purpose:
4507to instantiate a new object of a particular class. It is common to see
4508restrictions in libraries stating that classes must require a default
4509constructor. Objenesis aims to overcome these restrictions by bypassing the
4510constructor on object instantiation.")
4511 (license license:asl2.0)))
ae589876
RW
4512
4513(define-public java-easymock
4514 (package
4515 (name "java-easymock")
4516 (version "3.4")
4517 (source (origin
7cf90f64
EF
4518 (method git-fetch)
4519 (uri (git-reference
4520 (url "https://github.com/easymock/easymock/")
4521 (commit (string-append "easymock-" version))))
4522 (file-name (git-file-name name version))
ae589876
RW
4523 (sha256
4524 (base32
7cf90f64 4525 "02vybm8hc0i0n9sp2f2iiqn54zwqhq835f76wc6b2m7819z5a8dq"))))
ae589876
RW
4526 (build-system ant-build-system)
4527 (arguments
4528 `(#:jar-name "easymock.jar"
4529 #:source-dir "core/src/main"
4530 #:test-dir "core/src/test"
4531 #:phases
4532 (modify-phases %standard-phases
4533 ;; FIXME: Android support requires the following packages to be
4534 ;; available: com.google.dexmaker.stock.ProxyBuilder
4535 (add-after 'unpack 'delete-android-support
4536 (lambda _
4537 (with-directory-excursion "core/src/main/java/org/easymock/internal"
4538 (substitute* "MocksControl.java"
4539 (("AndroidSupport.isAndroid\\(\\)") "false")
4540 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
4541 (delete-file "AndroidClassProxyFactory.java"))
4542 #t))
4543 (add-after 'unpack 'delete-broken-tests
4544 (lambda _
4545 (with-directory-excursion "core/src/test/java/org/easymock"
4546 ;; This test depends on dexmaker.
4547 (delete-file "tests2/ClassExtensionHelperTest.java")
4548
4549 ;; This is not a test.
4550 (delete-file "tests/BaseEasyMockRunnerTest.java")
4551
4552 ;; This test should be executed with a different runner...
4553 (delete-file "tests2/EasyMockAnnotationsTest.java")
4554 ;; ...but deleting it means that we also have to delete these
4555 ;; dependent files.
4556 (delete-file "tests2/EasyMockRunnerTest.java")
4557 (delete-file "tests2/EasyMockRuleTest.java")
4558
4559 ;; This test fails because the file "easymock.properties" does
4560 ;; not exist.
4561 (delete-file "tests2/EasyMockPropertiesTest.java"))
4562 #t)))))
4563 (inputs
4564 `(("java-asm" ,java-asm)
4565 ("java-cglib" ,java-cglib)
4566 ("java-objenesis" ,java-objenesis)))
4567 (native-inputs
4568 `(("java-junit" ,java-junit)
4569 ("java-hamcrest-core" ,java-hamcrest-core)))
7cf90f64 4570 (home-page "https://easymock.org/")
ae589876
RW
4571 (synopsis "Java library providing mock objects for unit tests")
4572 (description "EasyMock is a Java library that provides an easy way to use
4573mock objects in unit testing.")
4574 (license license:asl2.0)))
7aa37023 4575
f12ad6c7
RW
4576(define-public java-jmock-1
4577 (package
4578 (name "java-jmock")
4579 (version "1.2.0")
4580 (source (origin
7cf26f24
EF
4581 (method git-fetch)
4582 (uri (git-reference
4583 (url "https://github.com/jmock-developers/jmock-library")
4584 (commit version)))
4585 (file-name (git-file-name name version))
f12ad6c7
RW
4586 (sha256
4587 (base32
7cf26f24 4588 "0lkga995xd9b9mmzxmcd301hlw83p1h78nibh7djlx7wydscr85z"))))
f12ad6c7
RW
4589 (build-system ant-build-system)
4590 (arguments
4591 `(#:build-target "jars"
4592 #:test-target "run.tests"
4593 #:phases
4594 (modify-phases %standard-phases
4595 (replace 'install (install-jars "build")))))
7cf26f24 4596 (home-page "http://jmock.org/")
f12ad6c7
RW
4597 (synopsis "Mock object library for test-driven development")
4598 (description "JMock is a library that supports test-driven development of
4599Java code with mock objects. Mock objects help you design and test the
4600interactions between the objects in your programs.
4601
4602The jMock library
4603
4604@itemize
4605@item makes it quick and easy to define mock objects
4606@item lets you precisely specify the interactions between
4607 your objects, reducing the brittleness of your tests
4608@item plugs into your favourite test framework
4609@item is easy to extend.
4610@end itemize\n")
4611 (license license:bsd-3)))
4612
045124ae
JL
4613(define-public java-jmock
4614 (package
4615 (inherit java-jmock-1)
4616 (name "java-jmock")
4617 (version "2.8.2")
4618 (source (origin
242af295
EF
4619 (method git-fetch)
4620 (uri (git-reference
4621 (url "https://github.com/jmock-developers/jmock-library")
4622 (commit version)))
4623 (file-name (git-file-name name version))
045124ae
JL
4624 (sha256
4625 (base32
242af295 4626 "12b7l22g3nrjvf2dzcw3z03fpd2chrgp0d8xkvn8w55rwb57pax6"))))
045124ae
JL
4627 (inputs
4628 `(("java-hamcrest-all" ,java-hamcrest-all)
4629 ("java-asm" ,java-asm)
4630 ("java-bsh" ,java-bsh)
4631 ("java-junit" ,java-junit)))
4632 (native-inputs
4633 `(("cglib" ,java-cglib)))
4634 (arguments
4635 `(#:jar-name "java-jmock.jar"
4636 #:source-dir "jmock/src/main/java"
4637 #:test-dir "jmock/src/test"))))
4638
25436c6d
JL
4639(define-public java-jmock-junit4
4640 (package
4641 (inherit java-jmock)
4642 (name "java-jmock-junit4")
4643 (arguments
4644 `(#:jar-name "java-jmock-junit4.jar"
4645 #:source-dir "jmock-junit4/src/main/java"
4646 #:test-dir "jmock-junit4/src/test"))
4647 (inputs
4648 `(("java-hamcrest-all" ,java-hamcrest-all)
4649 ("java-asm" ,java-asm)
4650 ("java-bsh" ,java-bsh)
4651 ("java-jmock" ,java-jmock)
4652 ("java-jumit" ,java-junit)))))
4653
e84b899d
JL
4654(define-public java-jmock-legacy
4655 (package
4656 (inherit java-jmock)
4657 (name "java-jmock-legacy")
4658 (arguments
4659 `(#:jar-name "java-jmock-legacy.jar"
4660 #:source-dir "jmock-legacy/src/main/java"
4661 #:test-dir "jmock-legacy/src/test"
4662 #:phases
4663 (modify-phases %standard-phases
4664 (add-before 'check 'copy-tests
4665 (lambda _
4666 ;; This file is a dependancy of some tests
4667 (let ((file "org/jmock/test/acceptance/PackageProtectedType.java"))
4668 (copy-file (string-append "jmock/src/test/java/" file)
4669 (string-append "jmock-legacy/src/test/java/" file))
4670 #t))))))
4671 (inputs
4672 `(("java-hamcrest-all" ,java-hamcrest-all)
4673 ("java-objenesis" ,java-objenesis)
4674 ("java-cglib" ,java-cglib)
4675 ("java-jmock" ,java-jmock)
4676 ("java-asm" ,java-asm)
4677 ("java-bsh" ,java-bsh)
4678 ("java-junit" ,java-junit)))
4679 (native-inputs
4680 `(("java-jmock-junit4" ,java-jmock-junit4)))))
4681
439c59da
RW
4682(define-public java-hamcrest-all
4683 (package (inherit java-hamcrest-core)
4684 (name "java-hamcrest-all")
4685 (arguments
bfc007e1
RW
4686 `(#:jdk ,icedtea-8
4687 ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core)
4688 ((#:build-target _) "bigjar")
4689 ((#:phases phases)
4690 `(modify-phases ,phases
4691 ;; Some build targets override the classpath, so we need to patch
4692 ;; the build.xml to ensure that required dependencies are on the
4693 ;; classpath.
4694 (add-after 'unpack 'patch-classpath-for-integration
4695 (lambda* (#:key inputs #:allow-other-keys)
4696 (substitute* "build.xml"
4697 ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
4698 (string-join
4699 (cons line
4700 (append
4701 (find-files (assoc-ref inputs "java-junit") "\\.jar$")
4702 (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
4703 (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
2cc63e6f
RW
4704 ";"))
4705 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
4706 (string-append (assoc-ref inputs "java-hamcrest-core")
4707 "/share/java/hamcrest-core.jar")))
bfc007e1 4708 #t)))))))
439c59da
RW
4709 (inputs
4710 `(("java-junit" ,java-junit)
4711 ("java-jmock" ,java-jmock-1)
2cc63e6f
RW
4712 ;; This is necessary because of what seems to be a race condition.
4713 ;; This package would sometimes fail to build because hamcrest-core.jar
4714 ;; could not be found, even though it is built as part of this package.
4715 ;; Adding java-hamcrest-core appears to fix this problem. See
4716 ;; https://debbugs.gnu.org/31390 for more information.
4717 ("java-hamcrest-core" ,java-hamcrest-core)
439c59da 4718 ("java-easymock" ,java-easymock)
439c59da
RW
4719 ,@(package-inputs java-hamcrest-core)))))
4720
7aa37023
RW
4721(define-public java-jopt-simple
4722 (package
4723 (name "java-jopt-simple")
4724 (version "5.0.3")
4725 (source (origin
4726 (method url-fetch)
4727 (uri (string-append "http://repo1.maven.org/maven2/"
4728 "net/sf/jopt-simple/jopt-simple/"
4729 version "/jopt-simple-"
4730 version "-sources.jar"))
4731 (sha256
4732 (base32
4733 "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa"))))
4734 (build-system ant-build-system)
4735 (arguments
4736 `(#:tests? #f ; there are no tests
4737 #:jar-name "jopt-simple.jar"))
4738 (home-page "https://pholser.github.io/jopt-simple/")
4739 (synopsis "Java library for parsing command line options")
4740 (description "JOpt Simple is a Java library for parsing command line
4741options, such as those you might pass to an invocation of @code{javac}. In
4742the interest of striving for simplicity, as closely as possible JOpt Simple
4743attempts to honor the command line option syntaxes of POSIX @code{getopt} and
4744GNU @code{getopt_long}. It also aims to make option parser configuration and
4745retrieval of options and their arguments simple and expressive, without being
4746overly clever.")
4747 (license license:expat)))
840969e8
RW
4748
4749(define-public java-commons-math3
4750 (package
4751 (name "java-commons-math3")
4752 (version "3.6.1")
4753 (source (origin
4754 (method url-fetch)
4755 (uri (string-append "mirror://apache/commons/math/source/"
4756 "commons-math3-" version "-src.tar.gz"))
4757 (sha256
4758 (base32
4759 "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6"))))
4760 (build-system ant-build-system)
4761 (arguments
4762 `(#:build-target "jar"
4763 #:test-target "test"
4764 #:make-flags
4765 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
4766 (junit (assoc-ref %build-inputs "java-junit")))
4767 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4768 (string-append "-Dhamcrest.jar=" hamcrest
4769 "/share/java/hamcrest-core.jar")))
4770 #:phases
4771 (modify-phases %standard-phases
4772 ;; We want to build the jar in the build phase and run the tests
4773 ;; later in a separate phase.
4774 (add-after 'unpack 'untangle-targets
4775 (lambda _
4776 (substitute* "build.xml"
4777 (("name=\"jar\" depends=\"test\"")
4778 "name=\"jar\" depends=\"compile\""))
4779 #t))
4780 ;; There is no install target.
4781 (replace 'install
4782 (install-jars "target")))))
4783 (native-inputs
4784 `(("java-junit" ,java-junit)
4785 ("java-hamcrest-core" ,java-hamcrest-core)))
4f236f84 4786 (home-page "https://commons.apache.org/math/")
840969e8
RW
4787 (synopsis "Apache Commons mathematics library")
4788 (description "Commons Math is a library of lightweight, self-contained
4789mathematics and statistics components addressing the most common problems not
4790available in the Java programming language or Commons Lang.")
4791 (license license:asl2.0)))
62c9bfaa
RW
4792
4793(define-public java-jmh
4794 (package
4795 (name "java-jmh")
4796 (version "1.17.5")
4797 (source (origin
4798 (method hg-fetch)
4799 (uri (hg-reference
4800 (url "http://hg.openjdk.java.net/code-tools/jmh/")
4801 (changeset version)))
4802 (file-name (string-append name "-" version "-checkout"))
4803 (sha256
4804 (base32
4805 "1fxyxhg9famwcg1prc4cgwb5wzyxqavn3cjm5vz8605xz7x5k084"))))
4806 (build-system ant-build-system)
4807 (arguments
4808 `(#:jar-name "jmh-core.jar"
4809 #:source-dir "jmh-core/src/main"
4810 #:test-dir "jmh-core/src/test"
4811 #:phases
4812 (modify-phases %standard-phases
4813 ;; This seems to be a bug in the JDK. It may not be necessary in
4814 ;; future versions of the JDK.
4815 (add-after 'unpack 'fix-bug
4816 (lambda _
4817 (with-directory-excursion
4818 "jmh-core/src/main/java/org/openjdk/jmh/runner/options"
4819 (substitute* '("IntegerValueConverter.java"
4820 "ThreadsValueConverter.java")
4821 (("public Class<Integer> valueType")
4822 "public Class<? extends Integer> valueType")))
4823 #t)))))
4824 (inputs
4825 `(("java-jopt-simple" ,java-jopt-simple)
4826 ("java-commons-math3" ,java-commons-math3)))
4827 (native-inputs
4828 `(("java-junit" ,java-junit)
4829 ("java-hamcrest-core" ,java-hamcrest-core)))
e799400d 4830 (home-page "https://openjdk.java.net/projects/code-tools/jmh/")
62c9bfaa
RW
4831 (synopsis "Benchmark harness for the JVM")
4832 (description "JMH is a Java harness for building, running, and analysing
4833nano/micro/milli/macro benchmarks written in Java and other languages
f4548394 4834targeting the JVM.")
62c9bfaa
RW
4835 ;; GPLv2 only
4836 (license license:gpl2)))
56ebb4e9
RW
4837
4838(define-public java-commons-collections4
4839 (package
4840 (name "java-commons-collections4")
4841 (version "4.1")
4842 (source (origin
4843 (method url-fetch)
4844 (uri (string-append "mirror://apache/commons/collections/source/"
4845 "commons-collections4-" version "-src.tar.gz"))
4846 (sha256
4847 (base32
4848 "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl"))))
4849 (build-system ant-build-system)
4850 (arguments
4851 `(#:test-target "test"
4852 #:make-flags
4853 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
4854 (junit (assoc-ref %build-inputs "java-junit"))
4855 (easymock (assoc-ref %build-inputs "java-easymock")))
4856 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4857 (string-append "-Dhamcrest.jar=" hamcrest
4858 "/share/java/hamcrest-core.jar")
4859 (string-append "-Deasymock.jar=" easymock
4860 "/share/java/easymock.jar")))
4861 #:phases
4862 (modify-phases %standard-phases
4863 (replace 'install
4864 (install-jars "target")))))
4865 (native-inputs
4866 `(("java-junit" ,java-junit)
4867 ("java-hamcrest-core" ,java-hamcrest-core)
4868 ("java-easymock" ,java-easymock)))
21e207d2 4869 (home-page "https://commons.apache.org/collections/")
56ebb4e9
RW
4870 (synopsis "Collections framework")
4871 (description "The Java Collections Framework is the recognised standard
4872for collection handling in Java. Commons-Collections seek to build upon the
4873JDK classes by providing new interfaces, implementations and utilities. There
4874are many features, including:
4875
4876@itemize
4877@item @code{Bag} interface for collections that have a number of copies of
4878 each object
4879@item @code{BidiMap} interface for maps that can be looked up from value to
4880 key as well and key to value
4881@item @code{MapIterator} interface to provide simple and quick iteration over
4882 maps
4883@item Transforming decorators that alter each object as it is added to the
4884 collection
4885@item Composite collections that make multiple collections look like one
4886@item Ordered maps and sets that retain the order elements are added in,
4887 including an LRU based map
4888@item Reference map that allows keys and/or values to be garbage collected
4889 under close control
4890@item Many comparator implementations
4891@item Many iterator implementations
4892@item Adapter classes from array and enumerations to collections
4893@item Utilities to test or create typical set-theory properties of collections
4894 such as union, intersection, and closure.
4895@end itemize\n")
4896 (license license:asl2.0)))
6af63e65 4897
229a9864
JL
4898(define-public java-commons-collections
4899 (package
4900 (inherit java-commons-collections4)
4901 (name "java-commons-collections")
4902 (version "3.2.2")
4903 (source (origin
4904 (method url-fetch)
4905 (uri (string-append "mirror://apache/commons/collections/source/"
4906 "commons-collections-" version "-src.tar.gz"))
4907 (sha256
4908 (base32
7c7323e4
GB
4909 "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387"))
4910 (patches
4911 (search-patches "java-commons-collections-fix-java8.patch"))))
229a9864
JL
4912 (arguments
4913 (substitute-keyword-arguments (package-arguments java-commons-collections4)
4914 ((#:phases phases)
4915 `(modify-phases ,phases
4916 ;; The manifest is required by the build procedure
4917 (add-before 'build 'add-manifest
4918 (lambda _
4919 (mkdir-p "build/conf")
4920 (call-with-output-file "build/conf/MANIFEST.MF"
4921 (lambda (file)
2c8ac364
MW
4922 (format file "Manifest-Version: 1.0\n")))
4923 #t))
229a9864
JL
4924 (replace 'install
4925 (install-jars "build"))))))))
4926
5aa2f3f4
JL
4927(define java-commons-collections-test-classes
4928 (package
4929 (inherit java-commons-collections)
4930 (arguments
4931 `(#:jar-name "commons-collections-test-classes.jar"
4932 #:source-dir "src/test"
4933 #:tests? #f))
4934 (inputs
4935 `(("collection" ,java-commons-collections)))))
4936
4937(define-public java-commons-beanutils
4938 (package
4939 (name "java-commons-beanutils")
4940 (version "1.9.3")
4941 (source (origin
4942 (method url-fetch)
4943 (uri (string-append "mirror://apache/commons/beanutils/source/"
4944 "commons-beanutils-" version "-src.tar.gz"))
4945 (sha256
4946 (base32
4947 "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk"))))
4948 (build-system ant-build-system)
4949 (arguments
4950 `(#:test-target "test"
4951 #:tests? #f
4952 #:phases
4953 (modify-phases %standard-phases
4954 (replace 'install
4955 (lambda* (#:key outputs #:allow-other-keys)
4956 (rename-file (string-append "dist/commons-beanutils-" ,version
4957 "-SNAPSHOT.jar")
4958 "commons-beanutils.jar")
4959 (install-file "commons-beanutils.jar"
4960 (string-append (assoc-ref outputs "out") "/share/java/"))
4961 #t)))))
4962 (inputs
4963 `(("logging" ,java-commons-logging-minimal)
4964 ("collections" ,java-commons-collections)))
4965 (native-inputs
4966 `(("junit" ,java-junit)
4967 ("collections-test" ,java-commons-collections-test-classes)))
4f236f84 4968 (home-page "https://commons.apache.org/beanutils/")
5aa2f3f4
JL
4969 (synopsis "Dynamically set or get properties in Java")
4970 (description "BeanUtils provides a simplified interface to reflection and
4971introspection to set or get dynamically determined properties through their
4972setter and getter method.")
4973 (license license:asl2.0)))
4974
6af63e65
HG
4975(define-public java-commons-io
4976 (package
4977 (name "java-commons-io")
4978 (version "2.5")
4979 (source
4980 (origin
4981 (method url-fetch)
4982 (uri (string-append "mirror://apache/commons/io/source/"
4983 "commons-io-" version "-src.tar.gz"))
4984 (sha256
4985 (base32
4986 "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3"))))
4987 (build-system ant-build-system)
4988 (outputs '("out" "doc"))
4989 (arguments
4990 `(#:test-target "test"
4991 #:make-flags
4992 (list (string-append "-Djunit.jar="
4993 (assoc-ref %build-inputs "java-junit")
4994 "/share/java/junit.jar"))
4995 #:phases
4996 (modify-phases %standard-phases
4997 (add-after 'build 'build-javadoc ant-build-javadoc)
4998 (replace 'install (install-jars "target"))
4999 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
5000 (native-inputs
5001 `(("java-junit" ,java-junit)
5002 ("java-hamcrest-core" ,java-hamcrest-core)))
4f236f84 5003 (home-page "https://commons.apache.org/io/")
6af63e65
HG
5004 (synopsis "Common useful IO related classes")
5005 (description "Commons-IO contains utility classes, stream implementations,
5006file filters and endian classes.")
5007 (license license:asl2.0)))
d631b5f3 5008
46f9022c
DM
5009(define-public java-commons-exec-1.1
5010 (package
5011 (name "java-commons-exec")
5012 (version "1.1")
5013 (source
5014 (origin
5015 (method url-fetch)
5016 (uri (string-append "mirror://apache/commons/exec/source/"
5017 "commons-exec-" version "-src.tar.gz"))
5018 (sha256
5019 (base32
5020 "025dk8xgj10lxwwwqp0hng2rn7fr4vcirxzydqzx9k4dim667alk"))))
5021 (build-system ant-build-system)
5022 (arguments
5023 `(#:test-target "test"
5024 #:make-flags
5025 (list (string-append "-Dmaven.junit.jar="
5026 (assoc-ref %build-inputs "java-junit")
5027 "/share/java/junit.jar"))
5028 #:phases
5029 (modify-phases %standard-phases
5030 (add-before 'build 'delete-network-tests
5031 (lambda _
5032 (delete-file "src/test/java/org/apache/commons/exec/DefaultExecutorTest.java")
5033 (substitute* "src/test/java/org/apache/commons/exec/TestRunner.java"
5034 (("suite\\.addTestSuite\\(DefaultExecutorTest\\.class\\);") ""))
5035 #t))
5036 ;; The "build" phase automatically tests.
5037 (delete 'check)
5038 (replace 'install (install-jars "target")))))
5039 (native-inputs
5040 `(("java-junit" ,java-junit)))
31b85761 5041 (home-page "https://commons.apache.org/proper/commons-exec/")
46f9022c
DM
5042 (synopsis "Common program execution related classes")
5043 (description "Commons-Exec simplifies executing external processes.")
5044 (license license:asl2.0)))
5045
5046(define-public java-commons-exec
5047 (package
5048 (inherit java-commons-exec-1.1)
5049 (version "1.3")
5050 (source
5051 (origin
5052 (method url-fetch)
5053 (uri (string-append "mirror://apache/commons/exec/source/"
5054 "commons-exec-" version "-src.tar.gz"))
5055 (sha256
5056 (base32
5057 "17yb4h6f8l49c5iyyvda4z2nmw0bxrx857nrwmsr7mmpb7x441yv"))))
5058 (arguments
5059 `(#:test-target "test"
5060 #:make-flags
5061 (list (string-append "-Dmaven.junit.jar="
5062 (assoc-ref %build-inputs "java-junit")
5063 "/share/java/junit.jar")
5064 "-Dmaven.compiler.source=1.7"
5065 "-Dmaven.compiler.target=1.7")
5066 #:phases
5067 (modify-phases %standard-phases
5068 (add-before 'build 'delete-network-tests
5069 (lambda* (#:key inputs #:allow-other-keys)
5070 ;; This test hangs indefinitely.
5071 (delete-file "src/test/java/org/apache/commons/exec/issues/Exec60Test.java")
5072 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec41Test.java"
5073 (("ping -c 10 127.0.0.1") "sleep 10"))
5074 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec49Test.java"
5075 (("/bin/ls") "ls"))
5076 (call-with-output-file "src/test/scripts/ping.sh"
5077 (lambda (port)
5078 (format port "#!~a/bin/sh\nsleep $1\n"
5079 (assoc-ref inputs "bash"))))
5080 #t))
5081 ;; The "build" phase automatically tests.
5082 (delete 'check)
5083 (replace 'install (install-jars "target")))))
5084 (native-inputs
5085 `(("java-junit" ,java-junit)
5086 ("java-hamcrest-core" ,java-hamcrest-core)))))
5087
d631b5f3
HG
5088(define-public java-commons-lang
5089 (package
5090 (name "java-commons-lang")
5091 (version "2.6")
5092 (source
5093 (origin
5094 (method url-fetch)
5095 (uri (string-append "mirror://apache/commons/lang/source/"
5096 "commons-lang-" version "-src.tar.gz"))
5097 (sha256
5098 (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5"))))
5099 (build-system ant-build-system)
5100 (outputs '("out" "doc"))
5101 (arguments
5102 `(#:test-target "test"
e5a96113 5103 #:test-exclude (list "**/Abstract*.java" "**/Random*.java")
d631b5f3
HG
5104 #:phases
5105 (modify-phases %standard-phases
5106 (add-after 'build 'build-javadoc ant-build-javadoc)
5107 (add-before 'check 'disable-failing-test
5108 (lambda _
5109 ;; Disable a failing test
5110 (substitute* "src/test/java/org/apache/commons/lang/\
5111time/FastDateFormatTest.java"
5112 (("public void testFormat\\(\\)")
5113 "public void disabled_testFormat()"))
5114 #t))
5115 (replace 'install (install-jars "target"))
5116 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
5117 (native-inputs
5118 `(("java-junit" ,java-junit)))
4f236f84 5119 (home-page "https://commons.apache.org/lang/")
d631b5f3
HG
5120 (synopsis "Extension of the java.lang package")
5121 (description "The Commons Lang components contains a set of Java classes
5122that provide helper methods for standard Java classes, especially those found
5123in the @code{java.lang} package in the Sun JDK. The following classes are
5124included:
5125
5126@itemize
5127@item StringUtils - Helper for @code{java.lang.String}.
5128@item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets
5129 of characters such as @code{[a-z]} and @code{[abcdez]}.
5130@item RandomStringUtils - Helper for creating randomised strings.
5131@item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
5132@item NumberRange - A range of numbers with an upper and lower bound.
5133@item ObjectUtils - Helper for @code{java.lang.Object}.
5134@item SerializationUtils - Helper for serializing objects.
5135@item SystemUtils - Utility class defining the Java system properties.
5136@item NestedException package - A sub-package for the creation of nested
5137 exceptions.
5138@item Enum package - A sub-package for the creation of enumerated types.
5139@item Builder package - A sub-package for the creation of @code{equals},
5140 @code{hashCode}, @code{compareTo} and @code{toString} methods.
5141@end itemize\n")
5142 (license license:asl2.0)))
82e18864
HG
5143
5144(define-public java-commons-lang3
5145 (package
5146 (name "java-commons-lang3")
5147 (version "3.4")
5148 (source
5149 (origin
5150 (method url-fetch)
5151 (uri (string-append "mirror://apache/commons/lang/source/"
5152 "commons-lang3-" version "-src.tar.gz"))
5153 (sha256
5154 (base32 "0xpshb9spjhplq5a7mr0y1bgfw8190ik4xj8f569xidfcki1d6kg"))))
5155 (build-system ant-build-system)
5156 (outputs '("out" "doc"))
5157 (arguments
5158 `(#:test-target "test"
5159 #:make-flags
5160 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-all"))
5161 (junit (assoc-ref %build-inputs "java-junit"))
5162 (easymock (assoc-ref %build-inputs "java-easymock"))
5163 (io (assoc-ref %build-inputs "java-commons-io")))
5164 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
5165 (string-append "-Dhamcrest.jar=" hamcrest
5166 "/share/java/hamcrest-all.jar")
5167 (string-append "-Dcommons-io.jar=" io
5168 "/share/java/commons-io-"
5169 ,(package-version java-commons-io)
5170 "-SNAPSHOT.jar")
5171 (string-append "-Deasymock.jar=" easymock
5172 "/share/java/easymock.jar")))
5173 #:phases
5174 (modify-phases %standard-phases
5175 (add-after 'build 'build-javadoc ant-build-javadoc)
5176 (replace 'install (install-jars "target"))
5177 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
5178 (native-inputs
5179 `(("java-junit" ,java-junit)
5180 ("java-commons-io" ,java-commons-io)
5181 ("java-hamcrest-all" ,java-hamcrest-all)
5182 ("java-easymock" ,java-easymock)))
4f236f84 5183 (home-page "https://commons.apache.org/lang/")
82e18864
HG
5184 (synopsis "Extension of the java.lang package")
5185 (description "The Commons Lang components contains a set of Java classes
5186that provide helper methods for standard Java classes, especially those found
5187in the @code{java.lang} package. The following classes are included:
5188
5189@itemize
5190@item StringUtils - Helper for @code{java.lang.String}.
5191@item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of
5192 characters such as @code{[a-z]} and @code{[abcdez]}.
5193@item RandomStringUtils - Helper for creating randomised strings.
5194@item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
5195@item NumberRange - A range of numbers with an upper and lower bound.
5196@item ObjectUtils - Helper for @code{java.lang.Object}.
5197@item SerializationUtils - Helper for serializing objects.
5198@item SystemUtils - Utility class defining the Java system properties.
5199@item NestedException package - A sub-package for the creation of nested
5200 exceptions.
5201@item Enum package - A sub-package for the creation of enumerated types.
5202@item Builder package - A sub-package for the creation of @code{equals},
5203 @code{hashCode}, @code{compareTo} and @code{toString} methods.
5204@end itemize\n")
5205 (license license:asl2.0)))
1c188f4e 5206
afb13a10
JL
5207(define-public java-commons-bsf
5208 (package
5209 (name "java-commons-bsf")
5210 (version "2.4.0")
5211 (source (origin
5212 (method url-fetch)
5213 (uri (string-append "mirror://apache/commons/bsf/source/bsf-src-"
5214 version ".tar.gz"))
5215 (sha256
5216 (base32
5217 "1sbamr8jl32p1jgf59nw0b2w9qivyg145954hm6ly54cfgsqrdas"))
5218 (modules '((guix build utils)))
5219 (snippet
5220 '(begin
5221 (for-each delete-file
5222 (find-files "." "\\.jar$"))
5223 #t))))
5224 (build-system ant-build-system)
5225 (arguments
5226 `(#:build-target "jar"
5227 #:tests? #f; No test file
5228 #:modules ((guix build ant-build-system)
5229 (guix build utils)
5230 (guix build java-utils)
5231 (sxml simple))
5232 #:phases
5233 (modify-phases %standard-phases
5234 (add-before 'build 'create-properties
5235 (lambda _
5236 ;; This file is missing from the distribution
5237 (call-with-output-file "build-properties.xml"
5238 (lambda (port)
5239 (sxml->xml
5240 `(project (@ (basedir ".") (name "build-properties") (default ""))
5241 (property (@ (name "project.name") (value "bsf")))
5242 (property (@ (name "source.level") (value "1.5")))
5243 (property (@ (name "build.lib") (value "build/jar")))
5244 (property (@ (name "src.dir") (value "src")))
5245 (property (@ (name "tests.dir") (value "src/org/apache/bsf/test")))
5246 (property (@ (name "build.tests") (value "build/test-classes")))
5247 (property (@ (name "build.dest") (value "build/classes"))))
2c8ac364
MW
5248 port)))
5249 #t))
afb13a10
JL
5250 (replace 'install (install-jars "build")))))
5251 (native-inputs
5252 `(("java-junit" ,java-junit)))
5253 (inputs
5254 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
5255 (home-page "https://commons.apache.org/proper/commons-bsf")
5256 (synopsis "Bean Scripting Framework")
5257 (description "The Bean Scripting Framework (BSF) is a set of Java classes
5258which provides scripting language support within Java applications, and access
5259to Java objects and methods from scripting languages. BSF allows one to write
5260JSPs in languages other than Java while providing access to the Java class
5261library. In addition, BSF permits any Java application to be implemented in
5262part (or dynamically extended) by a language that is embedded within it. This
5263is achieved by providing an API that permits calling scripting language engines
5264from within Java, as well as an object registry that exposes Java objects to
5265these scripting language engines.")
5266 (license license:asl2.0)))
5267
66006fe5
JL
5268(define-public java-commons-jxpath
5269 (package
5270 (name "java-commons-jxpath")
5271 (version "1.3")
5272 (source (origin
5273 (method url-fetch)
5274 (uri (string-append "mirror://apache/commons/jxpath/source/"
5275 "commons-jxpath-" version "-src.tar.gz"))
5276 (sha256
5277 (base32
5278 "1rpgg31ayn9fwr4bfi2i1ij0npcg79ad2fv0w9hacvawsyc42cfs"))))
5279 (build-system ant-build-system)
5280 (arguments
5281 `(#:jar-name "commons-jxpath.jar"
5282 ;; tests require more dependencies, including mockrunner which depends on old software
5283 #:tests? #f
5284 #:source-dir "src/java"))
5285 (inputs
10eddaca 5286 `(("servlet" ,java-classpathx-servletapi)
66006fe5
JL
5287 ("java-jdom" ,java-jdom)
5288 ("java-commons-beanutils" ,java-commons-beanutils)))
5289 (native-inputs
5290 `(("java-junit" ,java-junit)))
4f236f84 5291 (home-page "https://commons.apache.org/jxpath/")
66006fe5
JL
5292 (synopsis "Simple interpreter of an expression language called XPath.")
5293 (description "The org.apache.commons.jxpath package defines a simple
5294interpreter of an expression language called XPath. JXPath applies XPath
5295expressions to graphs of objects of all kinds: JavaBeans, Maps, Servlet
5296contexts, DOM etc, including mixtures thereof.")
5297 (license license:asl2.0)))
5298
b635d272
JL
5299(define-public java-commons-pool
5300 (package
5301 (name "java-commons-pool")
5302 (version "2.6.2")
5303 (source (origin
5304 (method url-fetch)
5305 (uri (string-append "mirror://apache/commons/pool/source/"
5306 "commons-pool2-" version "-src.tar.gz"))
5307 (sha256
5308 (base32
5309 "1fi1hgqmq01bs6azbj3sfswxzadp2r8sjjfiq6ryilz1m50kvrv6"))))
5310 (arguments
5311 `(#:jar-name "common-pool.jar"
5312 #:source-dir "src/main/java"
5313 #:test-exclude
5314 (list "**/PerformanceTest.java")))
5315 (build-system ant-build-system)
5316 (inputs
5317 `(("java-cglib" ,java-cglib)))
5318 (native-inputs
5319 `(("java-junit" ,java-junit)
5320 ("java-hamcrest-core" ,java-hamcrest-core)
5321 ("java-asm" ,java-asm)
5322 ("java-objenesis" ,java-objenesis)))
5323 (home-page "https://commons.apache.org/proper/commons-pool/")
5324 (synopsis "Object-pooling API in Java")
5325 (description "The commons-pool package provides an object-pooling API
5326and a number of object pool implementations. This package defines a
5327handful of pooling interfaces and some base classes that may be useful when
5328creating new pool implementations.")
5329 (license license:asl2.0)))
5330
f31ea164
JL
5331(define-public java-commons-dbcp
5332 (package
5333 (name "java-commons-dbcp")
5334 (version "2.6.0")
5335 (source (origin
5336 (method url-fetch)
5337 (uri (string-append "mirror://apache/commons/dbcp/source/"
5338 "commons-dbcp2-" version "-src.tar.gz"))
5339 (sha256
5340 (base32
5341 "0axbvcbnf2l70fc3ybrlp3siw2w4ka9mia2pnx4py8gz54cpw3rc"))))
5342 (arguments
5343 `(#:source-dir "src/main/java"
5344 #:jar-name "java-commons-dbcp.jar"
5345 #:tests? #f)); requires apache-geronimo
5346 (inputs
5347 `(("java-commons-pool" ,java-commons-pool)
5348 ("java-commons-logging" ,java-commons-logging-minimal)
5349 ("java-jboss-transaction-api-spec" ,java-jboss-transaction-api-spec)))
5350 (native-inputs
5351 `(("java-junit" ,java-junit)))
5352 (build-system ant-build-system)
5353 (home-page "https://commons.apache.org/proper/commons-dbcp/")
5354 (synopsis "Database Connection Pool for Java")
5355 (description "Commons-dbcp allows you to share a pool of database
5356connections between users. Creating a new connection for each user can be
5357time consuming and even unfeasible when the number of simultaneous users is
5358very large. This package provides a way to share a poole of connections to
5359reduce that load.")
5360 (license license:asl2.0)))
5361
934b83e4
JL
5362(define-public java-commons-jcs
5363 (package
5364 (name "java-commons-jcs")
5365 (version "2.2.1")
5366 (source (origin
5367 (method url-fetch)
5368 (uri (string-append "mirror://apache/commons/jcs/source/"
5369 "commons-jcs-dist-" version "-src.tar.gz"))
5370 (sha256
5371 (base32
5372 "0syhq2npjbrl0azqfjm0gvash1qd5qjy4qmysxcrqjsk0nf9fa1q"))))
5373 (build-system ant-build-system)
5374 (arguments
5375 `(#:jar-name "commons-jcs.jar"
5376 #:source-dir "commons-jcs-core/src/main/java"
5377 #:test-dir "commons-jcs-core/src/test"
5378 #:tests? #f; requires hsqldb
5379 #:phases
5380 (modify-phases %standard-phases
5381 (add-before 'build 'prepare
5382 (lambda _
5383 (with-directory-excursion
5384 "commons-jcs-core/src/main/java/org/apache/commons/jcs"
5385 (substitute*
5386 "auxiliary/disk/jdbc/dsfactory/SharedPoolDataSourceFactory.java"
5387 (("commons.dbcp") "commons.dbcp2")
5388 ((".*\\.setMaxActive.*") ""))
5389 ;;; Remove dependency on velocity-tools
5390 (delete-file "admin/servlet/JCSAdminServlet.java"))
5391 #t)))))
5392 (propagated-inputs
5393 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
5394 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
5395 ("java-commons-httpclient" ,java-commons-httpclient)
5396 ("java-commons-dbcp" ,java-commons-dbcp)))
5397 (native-inputs
5398 `(("java-junit" ,java-junit)))
5399 (home-page "https://commons.apache.org/proper/commons-jcs/")
5400 (synopsis "Distributed caching system in Java")
5401 (description "JCS is a distributed caching system written in Java. It
5402is intended to speed up applications by providing a means to manage cached
5403data of various dynamic natures. Like any caching system, JCS is most useful
5404for high read, low put applications. Latency times drop sharply and
5405bottlenecks move away from the database in an effectively cached system.")
5406 (license license:asl2.0)))
5407
a1a5ef20
JL
5408(define-public java-jsr250
5409 (package
5410 (name "java-jsr250")
5411 (version "1.3")
5412 (source (origin
5413 (method url-fetch)
5414 (uri (string-append "https://repo1.maven.org/maven2/"
5415 "javax/annotation/javax.annotation-api/"
5416 version "/javax.annotation-api-"
5417 version "-sources.jar"))
5418 (sha256
5419 (base32
5420 "08clh8n4n9wfglf75qsqfjs6yf79f7x6hqx38cn856pksszv50kz"))))
5421 (build-system ant-build-system)
5422 (arguments
5423 `(#:tests? #f ; no tests included
5424 #:jdk ,icedtea-8
5425 #:jar-name "jsr250.jar"))
5426 (home-page "https://jcp.org/en/jsr/detail?id=250")
5427 (synopsis "Security-related annotations")
5428 (description "This package provides annotations for security. It provides
5429packages in the @code{javax.annotation} and @code{javax.annotation.security}
5430namespaces.")
5431 ;; either cddl or gpl2 only, with classpath exception
5432 (license (list license:cddl1.0
5433 license:gpl2))))
5434
0d4a0d60
RW
5435(define-public java-jsr305
5436 (package
5437 (name "java-jsr305")
5438 (version "3.0.1")
5439 (source (origin
5440 (method url-fetch)
5441 (uri (string-append "https://repo1.maven.org/maven2/"
5442 "com/google/code/findbugs/"
5443 "jsr305/" version "/jsr305-"
5444 version "-sources.jar"))
5445 (sha256
5446 (base32
5447 "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n"))))
5448 (build-system ant-build-system)
5449 (arguments
5450 `(#:tests? #f ; no tests included
5451 #:jar-name "jsr305.jar"))
5452 (home-page "http://findbugs.sourceforge.net/")
5453 (synopsis "Annotations for the static analyzer called findbugs")
5454 (description "This package provides annotations for the findbugs package.
5455It provides packages in the @code{javax.annotations} namespace.")
5456 (license license:asl2.0)))
5457
4f3e47ea
RW
5458(define-public java-guava
5459 (package
5460 (name "java-guava")
5461 ;; This is the last release of Guava that can be built with Java 7.
5462 (version "20.0")
5463 (source (origin
5464 (method url-fetch)
5465 (uri (string-append "https://github.com/google/guava/"
5466 "releases/download/v" version
5467 "/guava-" version "-sources.jar"))
5468 (sha256
5469 (base32
5470 "1gawrs5gi6j5hcfxdgpnfli75vb9pfi4sn09pnc8xacr669yajwr"))))
5471 (build-system ant-build-system)
5472 (arguments
5473 `(#:tests? #f ; no tests included
5474 #:jar-name "guava.jar"
5475 #:phases
5476 (modify-phases %standard-phases
5477 (add-after 'unpack 'trim-sources
5478 (lambda _
5479 (with-directory-excursion "src/com/google/common"
5480 ;; Remove annotations to avoid extra dependencies:
5481 ;; * "j2objc" annotations are used when converting Java to
5482 ;; Objective C;
5483 ;; * "errorprone" annotations catch common Java mistakes at
5484 ;; compile time;
5485 ;; * "IgnoreJRERequirement" is used for Android.
5486 (substitute* (find-files "." "\\.java$")
5487 (("import com.google.j2objc.*") "")
5488 (("import com.google.errorprone.annotation.*") "")
5489 (("import org.codehaus.mojo.animal_sniffer.*") "")
5490 (("@CanIgnoreReturnValue") "")
5491 (("@LazyInit") "")
5492 (("@WeakOuter") "")
5493 (("@RetainedWith") "")
5494 (("@Weak") "")
5495 (("@ForOverride") "")
5496 (("@J2ObjCIncompatible") "")
5497 (("@IgnoreJRERequirement") "")))
5498 #t)))))
5499 (inputs
5500 `(("java-jsr305" ,java-jsr305)))
5501 (home-page "https://github.com/google/guava")
5502 (synopsis "Google core libraries for Java")
5503 (description "Guava is a set of core libraries that includes new
5504collection types (such as multimap and multiset), immutable collections, a
5505graph library, functional types, an in-memory cache, and APIs/utilities for
5506concurrency, I/O, hashing, primitives, reflection, string processing, and much
5507more!")
5508 (license license:asl2.0)))
5509
af8f8281
RW
5510;; The java-commons-logging package provides adapters to many different
5511;; logging frameworks. To avoid an excessive dependency graph we try to build
5512;; it with only a minimal set of adapters.
5513(define-public java-commons-logging-minimal
5514 (package
5515 (name "java-commons-logging-minimal")
5516 (version "1.2")
5517 (source (origin
5518 (method url-fetch)
5519 (uri (string-append "mirror://apache/commons/logging/source/"
5520 "commons-logging-" version "-src.tar.gz"))
5521 (sha256
5522 (base32
5523 "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9"))))
5524 (build-system ant-build-system)
5525 (arguments
5526 `(#:tests? #f ; avoid dependency on logging frameworks
5527 #:jar-name "commons-logging-minimal.jar"
5528 #:phases
5529 (modify-phases %standard-phases
5530 (add-after 'unpack 'delete-adapters-and-tests
5531 (lambda _
5532 ;; Delete all adapters except for NoOpLog, SimpleLog, and
5533 ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl
5534 ;; is used by applications; SimpleLog is the only actually usable
5535 ;; implementation that does not depend on another logging
5536 ;; framework.
5537 (for-each
5538 (lambda (file)
5539 (delete-file (string-append
5540 "src/main/java/org/apache/commons/logging/impl/" file)))
5541 (list "Jdk13LumberjackLogger.java"
5542 "WeakHashtable.java"
5543 "Log4JLogger.java"
5544 "ServletContextCleaner.java"
5545 "Jdk14Logger.java"
5546 "AvalonLogger.java"
5547 "LogKitLogger.java"))
5548 (delete-file-recursively "src/test")
5549 #t)))))
4f236f84 5550 (home-page "https://commons.apache.org/logging/")
af8f8281
RW
5551 (synopsis "Common API for logging implementations")
5552 (description "The Logging package is a thin bridge between different
5553logging implementations. A library that uses the commons-logging API can be
5554used with any logging implementation at runtime.")
5555 (license license:asl2.0)))
5556
90e65abe
RW
5557;; This is the last release of the 1.x series.
5558(define-public java-mockito-1
5559 (package
5560 (name "java-mockito")
5561 (version "1.10.19")
5562 (source (origin
5563 (method url-fetch)
5564 (uri (string-append "http://repo1.maven.org/maven2/"
5565 "org/mockito/mockito-core/" version
5566 "/mockito-core-" version "-sources.jar"))
5567 (sha256
5568 (base32
5569 "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc"))))
5570 (build-system ant-build-system)
5571 (arguments
5572 `(#:jar-name "mockito.jar"
5573 #:tests? #f ; no tests included
5574 ;; FIXME: patch-and-repack does not support jars, so we have to apply
5575 ;; patches in build phases.
5576 #:phases
5577 (modify-phases %standard-phases
5578 ;; Mockito was developed against a different version of hamcrest,
5579 ;; which does not require matcher implementations to provide an
5580 ;; implementation of the "describeMismatch" method. We add this
5581 ;; simple definition to pass the build with our version of hamcrest.
5582 (add-after 'unpack 'fix-hamcrest-build-error
5583 (lambda _
5584 (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java"
5585 (("public Matcher getActualMatcher\\(\\) .*" line)
5586 (string-append "
5587 public void describeMismatch(Object item, Description description) {
5588 actualMatcher.describeMismatch(item, description);
5589 }"
5590 line)))
5591 #t))
5592 ;; Mockito bundles cglib. We have a cglib package, so let's use
5593 ;; that instead.
5594 (add-after 'unpack 'use-system-libraries
5595 (lambda _
5596 (with-directory-excursion "src/org/mockito/internal/creation/cglib"
5597 (substitute* '("CGLIBHacker.java"
5598 "CglibMockMaker.java"
5599 "ClassImposterizer.java"
5600 "DelegatingMockitoMethodProxy.java"
5601 "MethodInterceptorFilter.java"
5602 "MockitoNamingPolicy.java"
5603 "SerializableMockitoMethodProxy.java"
5604 "SerializableNoOp.java")
5605 (("import org.mockito.cglib") "import net.sf.cglib")))
5606 #t)))))
5607 (inputs
5608 `(("java-junit" ,java-junit)
5609 ("java-objenesis" ,java-objenesis)
5610 ("java-cglib" ,java-cglib)
5611 ("java-hamcrest-core" ,java-hamcrest-core)))
5612 (home-page "http://mockito.org")
5613 (synopsis "Mockito is a mock library for Java")
5614 (description "Mockito is a mocking library for Java which lets you write
5615tests with a clean and simple API. It generates mocks using reflection, and
5616it records all mock invocations, including methods arguments.")
5617 (license license:asl2.0)))
5618
4f4d2e47
RW
5619(define-public java-httpcomponents-httpcore
5620 (package
5621 (name "java-httpcomponents-httpcore")
5622 (version "4.4.6")
5623 (source (origin
5624 (method url-fetch)
5625 (uri (string-append "mirror://apache//httpcomponents/httpcore/"
5626 "source/httpcomponents-core-"
5627 version "-src.tar.gz"))
5628 (sha256
5629 (base32
5630 "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy"))))
5631 (build-system ant-build-system)
5632 (arguments
5633 `(#:jar-name "httpcomponents-httpcore.jar"
5634 #:phases
5635 (modify-phases %standard-phases
5636 (add-after 'unpack 'chdir
5637 (lambda _ (chdir "httpcore") #t)))))
5638 (inputs
5639 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
5640 ("java-commons-lang3" ,java-commons-lang3)))
5641 (native-inputs
5642 `(("java-junit" ,java-junit)
5643 ("java-mockito" ,java-mockito-1)))
5644 (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html")
5645 (synopsis "Low level HTTP transport components")
5646 (description "HttpCore is a set of low level HTTP transport components
5647that can be used to build custom client and server side HTTP services with a
5648minimal footprint. HttpCore supports two I/O models: blocking I/O model based
5649on the classic Java I/O and non-blocking, event driven I/O model based on Java
5650NIO.
5651
5652This package provides the blocking I/O model library.")
5653 (license license:asl2.0)))
5654
3a068b43
RW
5655(define-public java-httpcomponents-httpcore-nio
5656 (package (inherit java-httpcomponents-httpcore)
5657 (name "java-httpcomponents-httpcore-nio")
5658 (arguments
5659 `(#:jar-name "httpcomponents-httpcore-nio.jar"
5660 #:phases
5661 (modify-phases %standard-phases
5662 (add-after 'unpack 'chdir
5663 (lambda _ (chdir "httpcore-nio") #t)))))
5664 (inputs
5665 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5666 ("java-hamcrest-core" ,java-hamcrest-core)
5667 ,@(package-inputs java-httpcomponents-httpcore)))
5668 (description "HttpCore is a set of low level HTTP transport components
5669that can be used to build custom client and server side HTTP services with a
5670minimal footprint. HttpCore supports two I/O models: blocking I/O model based
5671on the classic Java I/O and non-blocking, event driven I/O model based on Java
5672NIO.
5673
5674This package provides the non-blocking I/O model library based on Java
5675NIO.")))
5676
e1dd78f6
RW
5677(define-public java-httpcomponents-httpcore-ab
5678 (package (inherit java-httpcomponents-httpcore)
5679 (name "java-httpcomponents-httpcore-ab")
5680 (arguments
5681 `(#:jar-name "httpcomponents-httpcore-ab.jar"
5682 #:phases
5683 (modify-phases %standard-phases
5684 (add-after 'unpack 'chdir
5685 (lambda _ (chdir "httpcore-ab") #t)))))
5686 (inputs
5687 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5688 ("java-commons-cli" ,java-commons-cli)
5689 ("java-hamcrest-core" ,java-hamcrest-core)
5690 ,@(package-inputs java-httpcomponents-httpcore)))
5691 (synopsis "Apache HttpCore benchmarking tool")
5692 (description "This package provides the HttpCore benchmarking tool. It is
5693an Apache AB clone based on HttpCore.")))
5694
14a671d8
RW
5695(define-public java-httpcomponents-httpclient
5696 (package
5697 (name "java-httpcomponents-httpclient")
5698 (version "4.5.3")
5699 (source (origin
5700 (method url-fetch)
5701 (uri (string-append "mirror://apache/httpcomponents/httpclient/"
5702 "source/httpcomponents-client-"
5703 version "-src.tar.gz"))
5704 (sha256
5705 (base32
5706 "1428399s7qy3cim5wc6f3ks4gl9nf9vkjpfmnlap3jflif7g2pj1"))))
5707 (build-system ant-build-system)
5708 (arguments
5709 `(#:jar-name "httpcomponents-httpclient.jar"
5710 #:phases
5711 (modify-phases %standard-phases
5712 (add-after 'unpack 'chdir
5713 (lambda _ (chdir "httpclient") #t)))))
5714 (inputs
5715 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
5716 ("java-commons-codec" ,java-commons-codec)
5717 ("java-hamcrest-core" ,java-hamcrest-core)
5718 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5719 ("java-mockito" ,java-mockito-1)
5720 ("java-junit" ,java-junit)))
5721 (home-page "https://hc.apache.org/httpcomponents-client-ga/")
5722 (synopsis "HTTP client library for Java")
5723 (description "Although the @code{java.net} package provides basic
5724functionality for accessing resources via HTTP, it doesn't provide the full
5725flexibility or functionality needed by many applications. @code{HttpClient}
5726seeks to fill this void by providing an efficient, up-to-date, and
5727feature-rich package implementing the client side of the most recent HTTP
5728standards and recommendations.")
5729 (license license:asl2.0)))
5730
cbce5de2
RW
5731(define-public java-httpcomponents-httpmime
5732 (package (inherit java-httpcomponents-httpclient)
5733 (name "java-httpcomponents-httpmime")
5734 (arguments
5735 `(#:jar-name "httpcomponents-httpmime.jar"
5736 #:phases
5737 (modify-phases %standard-phases
5738 (add-after 'unpack 'chdir
5739 (lambda _ (chdir "httpmime") #t)))))
5740 (inputs
5741 `(("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient)
5742 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5743 ("java-junit" ,java-junit)
5744 ("java-hamcrest-core" ,java-hamcrest-core)))))
5745
4b34c21f
RW
5746(define-public java-commons-net
5747 (package
5748 (name "java-commons-net")
5749 (version "3.6")
5750 (source (origin
5751 (method url-fetch)
5752 (uri (string-append "mirror://apache/commons/net/source/"
5753 "commons-net-" version "-src.tar.gz"))
5754 (sha256
5755 (base32
5756 "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr"))))
5757 (build-system ant-build-system)
5758 (arguments
5759 `(;; FIXME: MainTest.java tries to read "examples.properties" (which
5760 ;; should be "resources/examples/examples.properties"), but gets "null"
5761 ;; instead.
5762 #:tests? #f
5763 #:jar-name "commons-net.jar"))
5764 (native-inputs
5765 `(("java-junit" ,java-junit)
5766 ("java-hamcrest-core" ,java-hamcrest-core)))
4f236f84 5767 (home-page "https://commons.apache.org/net/")
4b34c21f
RW
5768 (synopsis "Client library for many basic Internet protocols")
5769 (description "The Apache Commons Net library implements the client side of
5770many basic Internet protocols. The purpose of the library is to provide
5771fundamental protocol access, not higher-level abstractions.")
5772 (license license:asl2.0)))
5773
808cb58f
RW
5774(define-public java-jsch
5775 (package
5776 (name "java-jsch")
1c8ba10a 5777 (version "0.1.55")
808cb58f
RW
5778 (source (origin
5779 (method url-fetch)
5780 (uri (string-append "mirror://sourceforge/jsch/jsch/"
5781 version "/jsch-" version ".zip"))
5782 (sha256
5783 (base32
1c8ba10a 5784 "1lxyjwvmwa723wcf3bqn816hkvc03vz4xhbsi7bvfhrz2rpgcfq6"))))
808cb58f
RW
5785 (build-system ant-build-system)
5786 (arguments
5787 `(#:build-target "dist"
1c8ba10a 5788 #:tests? #f ; no tests included
808cb58f
RW
5789 #:phases
5790 (modify-phases %standard-phases
5791 (replace 'install (install-jars "dist")))))
5792 (native-inputs
5793 `(("unzip" ,unzip)))
5794 (home-page "http://www.jcraft.com/jsch/")
5795 (synopsis "Pure Java implementation of SSH2")
5796 (description "JSch is a pure Java implementation of SSH2. JSch allows you
5797to connect to an SSH server and use port forwarding, X11 forwarding, file
5798transfer, etc., and you can integrate its functionality into your own Java
5799programs.")
5800 (license license:bsd-3)))
5801
a6244698
RW
5802(define-public java-commons-compress
5803 (package
5804 (name "java-commons-compress")
5805 (version "1.13")
5806 (source (origin
5807 (method url-fetch)
5808 (uri (string-append "mirror://apache/commons/compress/source/"
5809 "commons-compress-" version "-src.tar.gz"))
5810 (sha256
5811 (base32
5812 "1vjqvavrn0babffn1kciz6v52ibwq2vwhzlb95hazis3lgllnxc8"))))
5813 (build-system ant-build-system)
5814 (arguments
5815 `(#:jar-name "commons-compress.jar"
5816 #:phases
5817 (modify-phases %standard-phases
5818 (add-after 'unpack 'delete-bad-tests
5819 (lambda _
5820 (with-directory-excursion "src/test/java/org/apache/commons/compress/"
5821 ;; FIXME: These tests really should not fail. Maybe they are
5822 ;; indicative of problems with our Java packaging work.
5823
5824 ;; This test fails with a null pointer exception.
5825 (delete-file "archivers/sevenz/SevenZOutputFileTest.java")
5826 ;; This test fails to open test resources.
5827 (delete-file "archivers/zip/ExplodeSupportTest.java")
5828
5829 ;; FIXME: This test adds a dependency on powermock, which is hard to
5830 ;; package at this point.
5831 ;; https://github.com/powermock/powermock
5832 (delete-file "archivers/sevenz/SevenZNativeHeapTest.java"))
5833 #t)))))
5834 (inputs
5835 `(("java-junit" ,java-junit)
5836 ("java-hamcrest-core" ,java-hamcrest-core)
5837 ("java-mockito" ,java-mockito-1)
5838 ("java-xz" ,java-xz)))
5839 (home-page "https://commons.apache.org/proper/commons-compress/")
5840 (synopsis "Java library for working with compressed files")
5841 (description "The Apache Commons Compress library defines an API for
5842working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ,
5843Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.")
5844 (license license:asl2.0)))
5845
51263ff5
JL
5846(define-public java-commons-csv
5847 (package
5848 (name "java-commons-csv")
5849 (version "1.4")
5850 (source (origin
5851 (method url-fetch)
5852 (uri (string-append "mirror://apache/commons/csv/source/"
5853 "commons-csv-" version "-src.tar.gz"))
5854 (sha256
5855 (base32
5856 "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij"))))
5857 (build-system ant-build-system)
5858 (arguments
5859 `(#:jar-name "commons-csv.jar"
5860 #:source-dir "src/main/java"
5861 #:tests? #f)); FIXME: requires java-h2
5862 (inputs
5863 `(("java-hamcrest-core" ,java-hamcrest-core)
5864 ("java-commons-io" ,java-commons-io)
5865 ("java-commons-lang3" ,java-commons-lang3)
5866 ("junit" ,java-junit)))
5867 (home-page "https://commons.apache.org/proper/commons-csv/")
5868 (synopsis "Read and write CSV documents")
5869 (description "Commons CSV reads and writes files in variations of the Comma
5870Separated Value (CSV) format. The most common CSV formats are predefined in the
5871CSVFormat class:
5872
5873@itemize
5874@item Microsoft Excel
5875@item Informix UNLOAD
5876@item Informix UNLOAD CSV
5877@item MySQL
5878@item RFC 4180
5879@item TDF
5880@end itemize
5881
5882Custom formats can be created using a fluent style API.")
5883 (license license:asl2.0)))
5884
6ee6d0b5
RW
5885(define-public java-osgi-annotation
5886 (package
5887 (name "java-osgi-annotation")
5888 (version "6.0.0")
5889 (source (origin
5890 (method url-fetch)
5891 (uri (string-append "https://repo1.maven.org/maven2/"
5892 "org/osgi/org.osgi.annotation/" version "/"
5893 "org.osgi.annotation-" version "-sources.jar"))
5894 (sha256
5895 (base32
5896 "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w"))))
5897 (build-system ant-build-system)
5898 (arguments
5899 `(#:tests? #f ; no tests
5900 #:jar-name "osgi-annotation.jar"))
c353d014 5901 (home-page "https://www.osgi.org")
6ee6d0b5
RW
5902 (synopsis "Annotation module of OSGi framework")
5903 (description
5904 "OSGi, for Open Services Gateway initiative framework, is a module system
5905and service platform for the Java programming language. This package contains
5906the OSGi annotation module, providing additional services to help dynamic
5907components.")
5908 (license license:asl2.0)))
5909
37e2e5d4
RW
5910(define-public java-osgi-core
5911 (package
5912 (name "java-osgi-core")
5913 (version "6.0.0")
5914 (source (origin
5915 (method url-fetch)
5916 (uri (string-append "https://repo1.maven.org/maven2/"
5917 "org/osgi/org.osgi.core/" version "/"
5918 "org.osgi.core-" version "-sources.jar"))
5919 (sha256
5920 (base32
5921 "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv"))))
5922 (build-system ant-build-system)
5923 (arguments
5924 `(#:tests? #f ; no tests
5925 #:jar-name "osgi-core.jar"))
5926 (inputs
5927 `(("java-osgi-annotation" ,java-osgi-annotation)))
c353d014 5928 (home-page "https://www.osgi.org")
37e2e5d4
RW
5929 (synopsis "Core module of OSGi framework")
5930 (description
5931 "OSGi, for Open Services Gateway initiative framework, is a module system
5932and service platform for the Java programming language. This package contains
5933the OSGi Core module.")
5934 (license license:asl2.0)))
5935
8af92c8f
RW
5936(define-public java-osgi-service-event
5937 (package
5938 (name "java-osgi-service-event")
5939 (version "1.3.1")
5940 (source (origin
5941 (method url-fetch)
5942 (uri (string-append "https://repo1.maven.org/maven2/"
5943 "org/osgi/org.osgi.service.event/"
5944 version "/org.osgi.service.event-"
5945 version "-sources.jar"))
5946 (sha256
5947 (base32
5948 "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm"))))
5949 (build-system ant-build-system)
5950 (arguments
5951 `(#:tests? #f ; no tests
5952 #:jar-name "osgi-service-event.jar"))
5953 (inputs
5954 `(("java-osgi-annotation" ,java-osgi-annotation)
5955 ("java-osgi-core" ,java-osgi-core)))
c353d014 5956 (home-page "https://www.osgi.org")
8af92c8f
RW
5957 (synopsis "OSGi service event module")
5958 (description
5959 "OSGi, for Open Services Gateway initiative framework, is a module system
5960and service platform for the Java programming language. This package contains
5961the OSGi @code{org.osgi.service.event} module.")
5962 (license license:asl2.0)))
5963
674e93a0
RW
5964(define-public java-eclipse-osgi
5965 (package
5966 (name "java-eclipse-osgi")
5967 (version "3.11.3")
5968 (source (origin
5969 (method url-fetch)
5970 (uri (string-append "https://repo1.maven.org/maven2/"
5971 "org/eclipse/platform/org.eclipse.osgi/"
5972 version "/org.eclipse.osgi-"
5973 version "-sources.jar"))
5974 (sha256
5975 (base32
5976 "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b"))))
5977 (build-system ant-build-system)
5978 (arguments
5979 `(#:tests? #f ; no tests included
5980 #:jar-name "eclipse-equinox-osgi.jar"))
5981 (inputs
5982 `(("java-osgi-annotation" ,java-osgi-annotation)))
5983 (home-page "http://www.eclipse.org/equinox/")
5984 (synopsis "Eclipse Equinox OSGi framework")
5985 (description "This package provides an implementation of the OSGi Core
5986specification.")
5987 (license license:epl1.0)))
5988
81b55b1e
RW
5989(define-public java-eclipse-equinox-common
5990 (package
5991 (name "java-eclipse-equinox-common")
e40e3792 5992 (version "3.10.200")
81b55b1e
RW
5993 (source (origin
5994 (method url-fetch)
5995 (uri (string-append "https://repo1.maven.org/maven2/"
5996 "org/eclipse/platform/org.eclipse.equinox.common/"
5997 version "/org.eclipse.equinox.common-"
5998 version "-sources.jar"))
5999 (sha256
6000 (base32
e40e3792 6001 "1yn8ij6xsljlf35sr2l7wvyvc0ss4n1rv0ry5zkgb49dj4hyrqrj"))))
81b55b1e
RW
6002 (build-system ant-build-system)
6003 (arguments
6004 `(#:tests? #f ; no tests included
6005 #:jar-name "eclipse-equinox-common.jar"))
6006 (inputs
6007 `(("java-eclipse-osgi" ,java-eclipse-osgi)))
6008 (home-page "http://www.eclipse.org/equinox/")
6009 (synopsis "Common Eclipse runtime")
6010 (description "This package provides the common Eclipse runtime.")
6011 (license license:epl1.0)))
6012
90368ad9
RW
6013(define-public java-eclipse-core-jobs
6014 (package
6015 (name "java-eclipse-core-jobs")
6016 (version "3.8.0")
6017 (source (origin
6018 (method url-fetch)
6019 (uri (string-append "https://repo1.maven.org/maven2/"
6020 "org/eclipse/platform/org.eclipse.core.jobs/"
6021 version "/org.eclipse.core.jobs-"
6022 version "-sources.jar"))
6023 (sha256
6024 (base32
6025 "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b"))))
6026 (build-system ant-build-system)
6027 (arguments
6028 `(#:tests? #f ; no tests included
6029 #:jar-name "eclipse-core-jobs.jar"))
6030 (inputs
6031 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6032 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6033 (home-page "http://www.eclipse.org/equinox/")
6034 (synopsis "Eclipse jobs mechanism")
6035 (description "This package provides the Eclipse jobs mechanism.")
6036 (license license:epl1.0)))
6037
fbaf09eb
RW
6038(define-public java-eclipse-equinox-registry
6039 (package
6040 (name "java-eclipse-equinox-registry")
6041 (version "3.6.100")
6042 (source (origin
6043 (method url-fetch)
6044 (uri (string-append "https://repo1.maven.org/maven2/"
6045 "org/eclipse/platform/org.eclipse.equinox.registry/"
6046 version "/org.eclipse.equinox.registry-"
6047 version "-sources.jar"))
6048 (sha256
6049 (base32
6050 "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k"))))
6051 (build-system ant-build-system)
6052 (arguments
6053 `(#:tests? #f ; no tests included
6054 #:jar-name "eclipse-equinox-registry.jar"))
6055 (inputs
6056 `(("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6057 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6058 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6059 (home-page "http://www.eclipse.org/equinox/")
6060 (synopsis "Eclipse extension registry support")
6061 (description "This package provides support for the Eclipse extension
6062registry.")
6063 (license license:epl1.0)))
6064
65214c87
RW
6065(define-public java-eclipse-equinox-app
6066 (package
6067 (name "java-eclipse-equinox-app")
6068 (version "1.3.400")
6069 (source (origin
6070 (method url-fetch)
6071 (uri (string-append "https://repo1.maven.org/maven2/"
6072 "org/eclipse/platform/org.eclipse.equinox.app/"
6073 version "/org.eclipse.equinox.app-"
6074 version "-sources.jar"))
6075 (sha256
6076 (base32
6077 "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab"))))
6078 (build-system ant-build-system)
6079 (arguments
6080 `(#:tests? #f ; no tests included
6081 #:jar-name "eclipse-equinox-app.jar"))
6082 (inputs
6083 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6084 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6085 ("java-eclipse-osgi" ,java-eclipse-osgi)
6086 ("java-osgi-service-event" ,java-osgi-service-event)))
6087 (home-page "http://www.eclipse.org/equinox/")
6088 (synopsis "Equinox application container")
6089 (description "This package provides the Equinox application container for
6090Eclipse.")
6091 (license license:epl1.0)))
6092
3f970214
RW
6093(define-public java-eclipse-equinox-preferences
6094 (package
6095 (name "java-eclipse-equinox-preferences")
6096 (version "3.6.1")
6097 (source (origin
6098 (method url-fetch)
6099 (uri (string-append "https://repo1.maven.org/maven2/"
6100 "org/eclipse/platform/org.eclipse.equinox.preferences/"
6101 version "/org.eclipse.equinox.preferences-"
6102 version "-sources.jar"))
6103 (sha256
6104 (base32
6105 "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2"))))
6106 (build-system ant-build-system)
6107 (arguments
6108 `(#:tests? #f ; no tests included
6109 #:jar-name "eclipse-equinox-preferences.jar"))
6110 (inputs
6111 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6112 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6113 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6114 (home-page "http://www.eclipse.org/equinox/")
6115 (synopsis "Eclipse preferences mechanism")
6116 (description "This package provides the Eclipse preferences mechanism with
6117the module @code{org.eclipse.equinox.preferences}.")
6118 (license license:epl1.0)))
6119
4ad3d4f3
RW
6120(define-public java-eclipse-core-contenttype
6121 (package
6122 (name "java-eclipse-core-contenttype")
6123 (version "3.5.100")
6124 (source (origin
6125 (method url-fetch)
6126 (uri (string-append "https://repo1.maven.org/maven2/"
6127 "org/eclipse/platform/org.eclipse.core.contenttype/"
6128 version "/org.eclipse.core.contenttype-"
6129 version "-sources.jar"))
6130 (sha256
6131 (base32
6132 "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi"))))
6133 (build-system ant-build-system)
6134 (arguments
6135 `(#:tests? #f ; no tests included
6136 #:jar-name "eclipse-core-contenttype.jar"))
6137 (inputs
6138 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6139 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6140 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6141 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6142 (home-page "http://www.eclipse.org/")
6143 (synopsis "Eclipse content mechanism")
6144 (description "This package provides the Eclipse content mechanism in the
6145@code{org.eclipse.core.contenttype} module.")
6146 (license license:epl1.0)))
6147
6a7f7e49
RW
6148(define-public java-eclipse-core-runtime
6149 (package
6150 (name "java-eclipse-core-runtime")
4fa9b6e6 6151 (version "3.15.100")
6a7f7e49
RW
6152 (source (origin
6153 (method url-fetch)
6154 (uri (string-append "https://repo1.maven.org/maven2/"
6155 "org/eclipse/platform/org.eclipse.core.runtime/"
6156 version "/org.eclipse.core.runtime-"
6157 version "-sources.jar"))
6158 (sha256
6159 (base32
4fa9b6e6 6160 "0l8xayacsbjvz5hypx2fv47vpw2n4dspamcfb3hx30x9hj8vmg7r"))))
6a7f7e49
RW
6161 (build-system ant-build-system)
6162 (arguments
6163 `(#:tests? #f ; no tests included
6164 #:jar-name "eclipse-core-runtime.jar"))
6165 (inputs
6166 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6167 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6168 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
6169 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6170 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6171 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6172 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6173 (home-page "https://www.eclipse.org/")
6174 (synopsis "Eclipse core runtime")
6175 (description "This package provides the Eclipse core runtime with the
6176module @code{org.eclipse.core.runtime}.")
6177 (license license:epl1.0)))
6178
b3806a15
RW
6179(define-public java-eclipse-core-filesystem
6180 (package
6181 (name "java-eclipse-core-filesystem")
6182 (version "1.6.1")
6183 (source (origin
6184 (method url-fetch)
6185 (uri (string-append "https://repo1.maven.org/maven2/"
6186 "org/eclipse/platform/org.eclipse.core.filesystem/"
6187 version "/org.eclipse.core.filesystem-"
6188 version "-sources.jar"))
6189 (sha256
6190 (base32
6191 "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj"))))
6192 (build-system ant-build-system)
6193 (arguments
6194 `(#:tests? #f ; no tests included
6195 #:jar-name "eclipse-core-filesystem.jar"))
6196 (inputs
6197 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6198 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6199 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6200 (home-page "https://www.eclipse.org/")
6201 (synopsis "Eclipse core file system")
6202 (description "This package provides the Eclipse core file system with the
6203module @code{org.eclipse.core.filesystem}.")
6204 (license license:epl1.0)))
6205
e96060de
RW
6206(define-public java-eclipse-core-expressions
6207 (package
6208 (name "java-eclipse-core-expressions")
6209 (version "3.5.100")
6210 (source (origin
6211 (method url-fetch)
6212 (uri (string-append "https://repo1.maven.org/maven2/"
6213 "org/eclipse/platform/org.eclipse.core.expressions/"
6214 version "/org.eclipse.core.expressions-"
6215 version "-sources.jar"))
6216 (sha256
6217 (base32
6218 "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f"))))
6219 (build-system ant-build-system)
6220 (arguments
6221 `(#:tests? #f ; no tests included
6222 #:jar-name "eclipse-core-expressions.jar"))
6223 (inputs
6224 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6225 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6226 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6227 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6228 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6229 (home-page "https://www.eclipse.org/")
6230 (synopsis "Eclipse core expression language")
6231 (description "This package provides the Eclipse core expression language
6232with the @code{org.eclipse.core.expressions} module.")
6233 (license license:epl1.0)))
6234
e8d0f7c8
RW
6235(define-public java-eclipse-core-variables
6236 (package
6237 (name "java-eclipse-core-variables")
6238 (version "3.3.0")
6239 (source (origin
6240 (method url-fetch)
6241 (uri (string-append "https://repo1.maven.org/maven2/"
6242 "org/eclipse/platform/org.eclipse.core.variables/"
6243 version "/org.eclipse.core.variables-"
6244 version "-sources.jar"))
6245 (sha256
6246 (base32
6247 "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy"))))
6248 (build-system ant-build-system)
6249 (arguments
6250 `(#:tests? #f ; no tests included
6251 #:jar-name "eclipse-core-variables.jar"))
6252 (inputs
6253 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6254 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6255 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6256 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6257 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6258 (home-page "https://www.eclipse.org/platform")
6259 (synopsis "Eclipse core variables")
6260 (description "This package provides the Eclipse core variables module
6261@code{org.eclipse.core.variables}.")
6262 (license license:epl1.0)))
6263
7c3d479e
RW
6264(define-public java-eclipse-ant-core
6265 (package
6266 (name "java-eclipse-ant-core")
6267 (version "3.4.100")
6268 (source (origin
6269 (method url-fetch)
6270 (uri (string-append "https://repo1.maven.org/maven2/"
6271 "org/eclipse/platform/org.eclipse.ant.core/"
6272 version "/org.eclipse.ant.core-"
6273 version "-sources.jar"))
6274 (sha256
6275 (base32
6276 "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7"))))
6277 (build-system ant-build-system)
6278 (arguments
6279 `(#:tests? #f ; no tests included
6280 #:jar-name "eclipse-ant-core.jar"))
6281 (inputs
6282 `(("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
6283 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6284 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6285 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6286 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6287 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6288 ("java-eclipse-core-variables" ,java-eclipse-core-variables)
6289 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6290 (home-page "https://www.eclipse.org/platform")
6291 (synopsis "Ant build tool core libraries")
6292 (description "This package provides the ant build tool core libraries with
6293the module @code{org.eclipse.ant.core}.")
6294 (license license:epl1.0)))
6295
6636f638
RW
6296(define-public java-eclipse-core-resources
6297 (package
6298 (name "java-eclipse-core-resources")
c8427a5e 6299 (version "3.13.200")
6636f638
RW
6300 (source (origin
6301 (method url-fetch)
6302 (uri (string-append "https://repo1.maven.org/maven2/"
6303 "org/eclipse/platform/org.eclipse.core.resources/"
6304 version "/org.eclipse.core.resources-"
6305 version "-sources.jar"))
6306 (sha256
6307 (base32
c8427a5e 6308 "1sn3b6ky72hkvxcgf9b2jkpbdh3y8lbhi9xxwv1dsiddpkkq91hs"))))
6636f638
RW
6309 (build-system ant-build-system)
6310 (arguments
6311 `(#:tests? #f ; no tests included
6312 #:jar-name "eclipse-core-resources.jar"))
6313 (inputs
6314 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6315 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6316 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6317 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6318 ("java-eclipse-core-expressions" ,java-eclipse-core-expressions)
6319 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
6320 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6321 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6322 ("java-eclipse-ant-core" ,java-eclipse-ant-core)
6323 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6324 (home-page "https://www.eclipse.org/")
6325 (synopsis "Eclipse core resource management")
6326 (description "This package provides the Eclipse core resource management
6327module @code{org.eclipse.core.resources}.")
6328 (license license:epl1.0)))
6329
afb5858d
RW
6330(define-public java-eclipse-compare-core
6331 (package
6332 (name "java-eclipse-compare-core")
6333 (version "3.6.0")
6334 (source (origin
6335 (method url-fetch)
6336 (uri (string-append "https://repo1.maven.org/maven2/"
6337 "org/eclipse/platform/org.eclipse.compare.core/"
6338 version "/org.eclipse.compare.core-"
6339 version "-sources.jar"))
6340 (sha256
6341 (base32
6342 "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg"))))
6343 (build-system ant-build-system)
6344 (arguments
6345 `(#:tests? #f ; no tests included
6346 #:jar-name "eclipse-compare-core.jar"))
6347 (inputs
6348 `(("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6349 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6350 ("java-eclipse-osgi" ,java-eclipse-osgi)
6351 ("java-icu4j" ,java-icu4j)))
6352 (home-page "https://www.eclipse.org/")
6353 (synopsis "Eclipse core compare support")
6354 (description "This package provides the Eclipse core compare support
6355module @code{org.eclipse.compare.core}.")
6356 (license license:epl1.0)))
6357
1bb191fc
RW
6358(define-public java-eclipse-team-core
6359 (package
6360 (name "java-eclipse-team-core")
6361 (version "3.8.0")
6362 (source (origin
6363 (method url-fetch)
6364 (uri (string-append "https://repo1.maven.org/maven2/"
6365 "org/eclipse/platform/org.eclipse.team.core/"
6366 version "/org.eclipse.team.core-"
6367 version "-sources.jar"))
6368 (sha256
6369 (base32
6370 "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7"))))
6371 (build-system ant-build-system)
6372 (arguments
6373 `(#:tests? #f ; no tests included
6374 #:jar-name "eclipse-team-core.jar"))
6375 (inputs
6376 `(("java-eclipse-compare-core" ,java-eclipse-compare-core)
6377 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6378 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
6379 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6380 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
6381 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6382 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6383 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6384 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6385 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6386 (home-page "https://www.eclipse.org/platform")
6387 (synopsis "Eclipse team support core")
6388 (description "This package provides the Eclipse team support core module
6389@code{org.eclipse.team.core}.")
6390 (license license:epl1.0)))
6391
31342529
RW
6392(define-public java-eclipse-core-commands
6393 (package
6394 (name "java-eclipse-core-commands")
6395 (version "3.8.1")
6396 (source (origin
6397 (method url-fetch)
6398 (uri (string-append "https://repo1.maven.org/maven2/"
6399 "org/eclipse/platform/org.eclipse.core.commands/"
6400 version "/org.eclipse.core.commands-"
6401 version "-sources.jar"))
6402 (sha256
6403 (base32
6404 "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9"))))
6405 (build-system ant-build-system)
6406 (arguments
6407 `(#:tests? #f ; no tests included
6408 #:jar-name "eclipse-core-commands.jar"))
6409 (inputs
6410 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)))
6411 (home-page "https://www.eclipse.org/platform")
6412 (synopsis "Eclipse core commands")
6413 (description "This package provides Eclipse core commands in the module
6414@code{org.eclipse.core.commands}.")
6415 (license license:epl1.0)))
6416
bf96acf7
RW
6417(define-public java-eclipse-text
6418 (package
6419 (name "java-eclipse-text")
6420 (version "3.6.0")
6421 (source (origin
6422 (method url-fetch)
6423 (uri (string-append "https://repo1.maven.org/maven2/"
6424 "org/eclipse/platform/org.eclipse.text/"
6425 version "/org.eclipse.text-"
6426 version "-sources.jar"))
6427 (sha256
6428 (base32
6429 "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1"))))
6430 (build-system ant-build-system)
6431 (arguments
6432 `(#:tests? #f ; no tests included
6433 #:jar-name "eclipse-text.jar"
6434 #:phases
6435 (modify-phases %standard-phases
6436 ;; When creating a new category we must make sure that the new list
6437 ;; matches List<Position>. By default it seems to be too generic
6438 ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>.
6439 ;; Without this we get this error:
6440 ;;
6441 ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376:
6442 ;; error: method put in interface Map<K,V> cannot be applied to given types;
6443 ;; [javac] fPositions.put(category, new ArrayList<>());
6444 ;; [javac] ^
6445 ;; [javac] required: String,List<Position>
6446 ;; [javac] found: String,ArrayList<Object>
6447 ;; [javac] reason: actual argument ArrayList<Object> cannot be converted
6448 ;; to List<Position> by method invocation conversion
6449 ;; [javac] where K,V are type-variables:
6450 ;; [javac] K extends Object declared in interface Map
6451 ;; [javac] V extends Object declared in interface Map
6452 ;;
6453 ;; I don't know if this is a good fix. I suspect it is not, but it
6454 ;; seems to work.
6455 (add-after 'unpack 'fix-compilation-error
6456 (lambda _
6457 (substitute* "src/org/eclipse/jface/text/AbstractDocument.java"
6458 (("Positions.put\\(category, new ArrayList<>\\(\\)\\);")
6459 "Positions.put(category, new ArrayList<Position>());"))
6460 #t)))))
6461 (inputs
6462 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6463 ("java-eclipse-core-commands" ,java-eclipse-core-commands)
6464 ("java-icu4j" ,java-icu4j)))
6465 (home-page "http://www.eclipse.org/platform")
6466 (synopsis "Eclipse text library")
6467 (description "Platform Text is part of the Platform UI project and
6468provides the basic building blocks for text and text editors within Eclipse
6469and contributes the Eclipse default text editor.")
6470 (license license:epl1.0)))
6471
c24d11b7
RW
6472(define-public java-eclipse-jdt-core
6473 (package
6474 (name "java-eclipse-jdt-core")
43d6776b 6475 (version "3.16.0")
c24d11b7
RW
6476 (source (origin
6477 (method url-fetch)
6478 (uri (string-append "https://repo1.maven.org/maven2/"
6479 "org/eclipse/jdt/org.eclipse.jdt.core/"
6480 version "/org.eclipse.jdt.core-"
6481 version "-sources.jar"))
6482 (sha256
6483 (base32
43d6776b 6484 "1g560yr9v2kzv34gc2m3ifpgnj7krcdd6h4gd4z83pwqacwkfz0k"))))
c24d11b7
RW
6485 (build-system ant-build-system)
6486 (arguments
6487 `(#:tests? #f ; no tests included
84b226c2
RW
6488 #:jar-name "eclipse-jdt-core.jar"
6489 #:phases
6490 (modify-phases %standard-phases
6491 (add-after 'unpack 'move-sources
6492 (lambda _
6493 (with-directory-excursion "src/jdtCompilerAdaptersrc/"
6494 (for-each (lambda (file)
6495 (install-file file (string-append "../" (dirname file))))
6496 (find-files "." ".*")))
6497 (delete-file-recursively "src/jdtCompilerAdaptersrc/")
6498 #t))
6499 (add-before 'build 'copy-resources
6500 (lambda _
6501 (with-directory-excursion "src"
6502 (for-each (lambda (file)
6503 (install-file file (string-append "../build/classes/" (dirname file))))
6504 (find-files "." ".*.(props|properties|rsc)")))
6505 #t)))))
c24d11b7
RW
6506 (inputs
6507 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6508 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
6509 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6510 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
6511 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6512 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
6513 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6514 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6515 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6516 ("java-eclipse-osgi" ,java-eclipse-osgi)
6517 ("java-eclipse-text" ,java-eclipse-text)))
6518 (home-page "https://www.eclipse.org/jdt")
6519 (synopsis "Java development tools core libraries")
6520 (description "This package provides the core libraries of the Eclipse Java
6521development tools.")
6522 (license license:epl1.0)))
6523
74c2339f
RW
6524(define-public java-eclipse-jdt-compiler-apt
6525 (package
6526 (name "java-eclipse-jdt-compiler-apt")
6527 (version "1.3.400")
6528 (source (origin
6529 (method url-fetch)
6530 (uri (string-append "https://repo1.maven.org/maven2/"
6531 "org/eclipse/jdt/org.eclipse.jdt.compiler.apt/"
6532 version "/org.eclipse.jdt.compiler.apt-"
6533 version "-sources.jar"))
6534 (sha256
6535 (base32
6536 "1s285k9p2ixdqrknb40jbbvw682n9a7l5lqpn583a8pvlzg2l6r8"))))
6537 (build-system ant-build-system)
6538 (arguments
6539 `(#:tests? #f ; no tests included
6540 #:jar-name "eclipse-jdt-compiler-apt.jar"
6541 #:jdk ,openjdk11))
6542 (inputs
6543 `(("java-eclipse-jdt-core" ,java-eclipse-jdt-core)))
6544 (home-page "https://www.eclipse.org/jdt/apt/")
6545 (synopsis "Annotation processing tool")
6546 (description "APT stands for Annotation Processing Tool. APT provides a
6547means for generating files and compiling new Java classes based on annotations
6548found in your source code.")
6549 (license license:epl2.0)))
6550
a5cdcf6c
RW
6551(define-public java-javax-mail
6552 (package
6553 (name "java-javax-mail")
6554 (version "1.5.6")
6555 (source (origin
6556 (method url-fetch)
6557 (uri (string-append "https://repo1.maven.org/maven2/"
6558 "com/sun/mail/javax.mail/"
6559 version "/javax.mail-"
6560 version "-sources.jar"))
6561 (sha256
6562 (base32
6563 "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9"))))
6564 (build-system ant-build-system)
6565 (arguments
6566 `(#:tests? #f ; no tests
6567 #:jar-name "javax-mail.jar"))
6568 (home-page "https://javamail.java.net")
6569 (synopsis "Reference implementation of the JavaMail API")
6570 (description
6571 "This package provides versions of the JavaMail API implementation, IMAP,
6572SMTP, and POP3 service providers, some examples, and documentation for the
6573JavaMail API.")
6574 ;; GPLv2 only with "classpath exception".
6575 (license license:gpl2)))
6576
0e660c4d
RW
6577(define-public java-log4j-api
6578 (package
6579 (name "java-log4j-api")
6580 (version "2.4.1")
6581 (source (origin
6582 (method url-fetch)
6583 (uri (string-append "mirror://apache/logging/log4j/" version
6584 "/apache-log4j-" version "-src.tar.gz"))
6585 (sha256
6586 (base32
6587 "0j5p9gik0jysh37nlrckqbky12isy95cpwg2gv5fas1rcdqbraxd"))))
6588 (build-system ant-build-system)
6589 (arguments
6590 `(#:tests? #f ; tests require unpackaged software
6591 #:jar-name "log4j-api.jar"
6592 #:make-flags
6593 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
6594 "/share/java"))
6595 #:phases
6596 (modify-phases %standard-phases
6597 (add-after 'unpack 'enter-dir
6598 (lambda _ (chdir "log4j-api") #t))
6599 ;; FIXME: The tests require additional software that has not been
6600 ;; packaged yet, such as
6601 ;; * org.apache.maven
6602 ;; * org.apache.felix
6603 (add-after 'enter-dir 'delete-tests
6604 (lambda _ (delete-file-recursively "src/test") #t)))))
6605 (inputs
6606 `(("java-osgi-core" ,java-osgi-core)
6607 ("java-hamcrest-core" ,java-hamcrest-core)
6608 ("java-junit" ,java-junit)))
4d1ddb51 6609 (home-page "https://logging.apache.org/log4j/2.x/")
0e660c4d
RW
6610 (synopsis "API module of the Log4j logging framework for Java")
6611 (description
6612 "This package provides the API module of the Log4j logging framework for
6613Java.")
6614 (license license:asl2.0)))
6615
dfef4231
JL
6616(define-public java-log4j-core
6617 (package
6618 (inherit java-log4j-api)
6619 (name "java-log4j-core")
6620 (inputs
6621 `(("java-osgi-core" ,java-osgi-core)
6622 ("java-hamcrest-core" ,java-hamcrest-core)
6623 ("java-log4j-api" ,java-log4j-api)
6624 ("java-mail" ,java-mail)
6625 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
6626 ("java-lmax-disruptor" ,java-lmax-disruptor)
6627 ("java-kafka" ,java-kafka-clients)
6628 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
6629 ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
6630 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
6631 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
6632 ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml)
6633 ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml)
6634 ("java-commons-compress" ,java-commons-compress)
6635 ("java-commons-csv" ,java-commons-csv)
6636 ("java-jeromq" ,java-jeromq)
6637 ("java-junit" ,java-junit)))
6638 (native-inputs
6639 `(("hamcrest" ,java-hamcrest-all)
6640 ("java-commons-io" ,java-commons-io)
6641 ("java-commons-lang3" ,java-commons-lang3)
6642 ("slf4j" ,java-slf4j-api)))
6643 (arguments
6644 `(#:tests? #f ; tests require more dependencies
6645 #:test-dir "src/test"
6646 #:source-dir "src/main/java"
6647 #:jar-name "log4j-core.jar"
6648 #:jdk ,icedtea-8
6649 #:make-flags
6650 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
6651 "/share/java"))
6652 #:phases
6653 (modify-phases %standard-phases
6654 (add-after 'unpack 'enter-dir
6655 (lambda _ (chdir "log4j-core") #t)))))
6656 (synopsis "Core component of the Log4j framework")
6657 (description "This package provides the core component of the Log4j
6658logging framework for Java.")))
6659
2caf873e
JL
6660(define-public java-log4j-1.2-api
6661 (package
6662 (inherit java-log4j-api)
6663 (name "java-log4j-1.2-api")
6664 (arguments
6665 `(#:jar-name "java-log4j-1.2-api.jar"
6666 #:source-dir "log4j-1.2-api/src/main/java"
6667 #:jdk ,icedtea-8
6668 ;; Tests require maven-model (and other maven subprojects), which is a
6669 ;; cyclic dependency.
6670 #:tests? #f))
6671 (inputs
6672 `(("log4j-api" ,java-log4j-api)
6673 ("log4j-core" ,java-log4j-core)
6674 ("osgi-core" ,java-osgi-core)
6675 ("eclipse-osgi" ,java-eclipse-osgi)
6676 ("java-lmax-disruptor" ,java-lmax-disruptor)))))
6677
1c188f4e
HG
6678(define-public java-commons-cli
6679 (package
6680 (name "java-commons-cli")
37602dd8 6681 (version "1.4")
1c188f4e
HG
6682 (source (origin
6683 (method url-fetch)
6684 (uri (string-append "mirror://apache/commons/cli/source/"
6685 "commons-cli-" version "-src.tar.gz"))
6686 (sha256
6687 (base32
37602dd8 6688 "05hgi2z01fqz374y719gl1dxzqvzci5af071zm7vxrjg9vczipm1"))))
1c188f4e
HG
6689 (build-system ant-build-system)
6690 ;; TODO: javadoc
6691 (arguments
6692 `(#:jar-name "commons-cli.jar"))
6693 (native-inputs
6694 `(("java-junit" ,java-junit)
6695 ("java-hamcrest-core" ,java-hamcrest-core)))
1b3a6038 6696 (home-page "https://commons.apache.org/cli/")
1c188f4e
HG
6697 (synopsis "Command line arguments and options parsing library")
6698 (description "The Apache Commons CLI library provides an API for parsing
6699command line options passed to programs. It is also able to print help
6700messages detailing the options available for a command line tool.
6701
6702Commons CLI supports different types of options:
6703
6704@itemize
6705@item POSIX like options (ie. tar -zxvf foo.tar.gz)
6706@item GNU like long options (ie. du --human-readable --max-depth=1)
6707@item Java like properties (ie. java -Djava.awt.headless=true Foo)
6708@item Short options with value attached (ie. gcc -O2 foo.c)
6709@item long options with single hyphen (ie. ant -projecthelp)
6710@end itemize
6711
6712This is a part of the Apache Commons Project.")
6713 (license license:asl2.0)))
0a8519bc
HG
6714
6715(define-public java-commons-codec
6716 (package
6717 (name "java-commons-codec")
6718 (version "1.10")
6719 (source (origin
6720 (method url-fetch)
6721 (uri (string-append "mirror://apache/commons/codec/source/"
6722 "commons-codec-" version "-src.tar.gz"))
6723 (sha256
6724 (base32
6725 "1w9qg30y4s0x8gnmr2fgj4lyplfn788jqxbcz27lf5kbr6n8xr65"))))
6726 (build-system ant-build-system)
6727 (outputs '("out" "doc"))
6728 (arguments
6729 `(#:test-target "test"
6730 #:make-flags
6731 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
6732 (junit (assoc-ref %build-inputs "java-junit")))
6733 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
6734 (string-append "-Dhamcrest.jar=" hamcrest
6735 "/share/java/hamcrest-core.jar")
6736 ;; Do not append version to jar.
6737 "-Dfinal.name=commons-codec"))
6738 #:phases
6739 (modify-phases %standard-phases
6740 (add-after 'build 'build-javadoc ant-build-javadoc)
6741 (replace 'install (install-jars "dist"))
6742 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
6743 (native-inputs
6744 `(("java-junit" ,java-junit)
6745 ("java-hamcrest-core" ,java-hamcrest-core)))
77e1fe31 6746 (home-page "https://commons.apache.org/codec/")
0a8519bc
HG
6747 (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs")
6748 (description "The codec package contains simple encoder and decoders for
6749various formats such as Base64 and Hexadecimal. In addition to these widely
6750used encoders and decoders, the codec package also maintains a collection of
6751phonetic encoding utilities.
6752
6753This is a part of the Apache Commons Project.")
6754 (license license:asl2.0)))
7d91c1b9
HG
6755
6756(define-public java-commons-daemon
6757 (package
6758 (name "java-commons-daemon")
b503ae3d 6759 (version "1.1.0")
7d91c1b9
HG
6760 (source (origin
6761 (method url-fetch)
6762 (uri (string-append "mirror://apache/commons/daemon/source/"
6763 "commons-daemon-" version "-src.tar.gz"))
6764 (sha256
6765 (base32
b503ae3d 6766 "141gkhfzv5v3pdhic6y4ardq2dhsa3v36j8wmmhy6f8mac48fp7n"))))
7d91c1b9
HG
6767 (build-system ant-build-system)
6768 (arguments
6769 `(#:test-target "test"
6770 #:phases
6771 (modify-phases %standard-phases
6772 (add-after 'build 'build-javadoc ant-build-javadoc)
6773 (replace 'install (install-jars "dist"))
6774 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
6775 (native-inputs
6776 `(("java-junit" ,java-junit)))
4f236f84 6777 (home-page "https://commons.apache.org/daemon/")
7d91c1b9
HG
6778 (synopsis "Library to launch Java applications as daemons")
6779 (description "The Daemon package from Apache Commons can be used to
6780implement Java applications which can be launched as daemons. For example the
6781program will be notified about a shutdown so that it can perform cleanup tasks
6782before its process of execution is destroyed by the operation system.
6783
6784This package contains the Java library. You will also need the actual binary
6785for your architecture which is provided by the jsvc package.
6786
6787This is a part of the Apache Commons Project.")
6788 (license license:asl2.0)))
9f68e74a 6789
eb270ecf
RW
6790(define-public java-javaewah
6791 (package
6792 (name "java-javaewah")
6793 (version "1.1.6")
6794 (source (origin
2876b233
EF
6795 (method git-fetch)
6796 (uri (git-reference
6797 (url "https://github.com/lemire/javaewah/")
6798 (commit (string-append "JavaEWAH-" version))))
6799 (file-name (git-file-name name version))
eb270ecf
RW
6800 (sha256
6801 (base32
2876b233 6802 "1m8qcb1py76v7avbjjrkvyy6fhr5dk2ywy73gbsxqry04gkm2nhw"))))
eb270ecf
RW
6803 (build-system ant-build-system)
6804 (arguments `(#:jar-name "javaewah.jar"))
6805 (inputs
6806 `(("java-junit" ,java-junit)
6807 ("java-hamcrest-core" ,java-hamcrest-core)))
6808 (home-page "https://github.com/lemire/javaewah")
6809 (synopsis "Compressed alternative to the Java @code{BitSet} class")
6810 (description "This is a word-aligned compressed variant of the Java
6811@code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like
6812compression scheme. It can be used to implement bitmap indexes.
6813
6814The goal of word-aligned compression is not to achieve the best compression,
2876b233 6815but rather to improve query processing time. Hence, JavaEWAH tries to save CPU
eb270ecf
RW
6816cycles, maybe at the expense of storage. However, the EWAH scheme is always
6817more efficient storage-wise than an uncompressed bitmap (as implemented in the
6818@code{BitSet} class by Sun).")
6819 ;; GPL2.0 derivates are explicitly allowed.
6820 (license license:asl2.0)))
6821
f8e4d022
RW
6822(define-public java-slf4j-api
6823 (package
6824 (name "java-slf4j-api")
6825 (version "1.7.25")
6826 (source (origin
6827 (method url-fetch)
6828 (uri (string-append "https://www.slf4j.org/dist/slf4j-"
6829 version ".tar.gz"))
6830 (sha256
6831 (base32
6832 "13j51sgzmhhdrfa74gkal5zpip7r1440dh7zsi2c8bpb2zs1v8kb"))
6833 (modules '((guix build utils)))
6834 ;; Delete bundled jars.
6835 (snippet
6836 '(begin
6837 (for-each delete-file (find-files "." "\\.jar$"))
6838 #t))))
6839 (build-system ant-build-system)
6840 (arguments
dcf7a8a6 6841 `(#:jar-name "slf4j-api.jar"
f8e4d022 6842 #:source-dir "slf4j-api/src/main"
dcf7a8a6
JL
6843 #:test-dir "slf4j-api/src/test"
6844 #:phases
6845 (modify-phases %standard-phases
6846 (add-after 'build 'regenerate-jar
6847 (lambda _
6848 ;; pom.xml ignores these files in the jar creation process. If we don't,
6849 ;; we get the error "This code should have never made it into slf4j-api.jar"
6850 (delete-file-recursively "build/classes/org/slf4j/impl")
2c8ac364
MW
6851 (invoke "jar" "-cf" "build/jar/slf4j-api.jar" "-C"
6852 "build/classes" ".")))
dcf7a8a6
JL
6853 (add-before 'check 'dont-test-abstract-classes
6854 (lambda _
6855 ;; abstract classes are not meant to be run with junit
6856 (substitute* "build.xml"
6857 (("<include name=\"\\*\\*/\\*Test.java\" />")
6858 (string-append "<include name=\"**/*Test.java\" />"
6859 "<exclude name=\"**/MultithreadedInitializationTest"
2c8ac364
MW
6860 ".java\" />")))
6861 #t)))))
f8e4d022
RW
6862 (inputs
6863 `(("java-junit" ,java-junit)
6864 ("java-hamcrest-core" ,java-hamcrest-core)))
6865 (home-page "https://www.slf4j.org/")
6866 (synopsis "Simple logging facade for Java")
6867 (description "The Simple Logging Facade for Java (SLF4J) serves as a
6868simple facade or abstraction for various logging
6869frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j})
6870allowing the end user to plug in the desired logging framework at deployment
6871time.")
6872 (license license:expat)))
6873
6d047cc4
GB
6874(define java-slf4j-api-bootstrap
6875 (package
6876 (inherit java-slf4j-api)
6877 (name "java-slf4j-api-bootstrap")
6878 (inputs `())
6879 (arguments
6880 (substitute-keyword-arguments (package-arguments java-slf4j-api)
6881 ((#:tests? _ #f) #f)))))
6882
88f256a1
TD
6883(define-public java-slf4j-simple
6884 (package
6885 (name "java-slf4j-simple")
6886 (version "1.7.25")
6887 (source (package-source java-slf4j-api))
6888 (build-system ant-build-system)
6889 (arguments
6890 `(#:jar-name "slf4j-simple.jar"
6891 #:source-dir "slf4j-simple/src/main"
6892 #:test-dir "slf4j-simple/src/test"
6893 #:phases
6894 (modify-phases %standard-phases
6895 ;; The tests need some test classes from slf4j-api
6896 (add-before 'check 'build-slf4j-api-test-helpers
6897 (lambda _
6898 ;; Add current dir to CLASSPATH ...
6899 (setenv "CLASSPATH"
6900 (string-append (getcwd) ":" (getenv "CLASSPATH")))
6901 ;; ... and build test helper classes here:
2c8ac364
MW
6902 (apply invoke
6903 `("javac" "-d" "."
6904 ,@(find-files "slf4j-api/src/test" ".*\\.java"))))))))
88f256a1
TD
6905 (inputs
6906 `(("java-junit" ,java-junit)
6907 ("java-hamcrest-core" ,java-hamcrest-core)
6908 ("java-slf4j-api" ,java-slf4j-api)))
6909 (home-page "https://www.slf4j.org/")
6910 (synopsis "Simple implementation of simple logging facade for Java")
6911 (description "SLF4J binding for the Simple implementation, which outputs
6912all events to System.err. Only messages of level INFO and higher are
6913printed.")
6914 (license license:expat)))
6915
9f68e74a
JL
6916(define-public antlr2
6917 (package
6918 (name "antlr2")
6919 (version "2.7.7")
6920 (source (origin
6921 (method url-fetch)
7420c1ee 6922 (uri (string-append "https://www.antlr2.org/download/antlr-"
9f68e74a
JL
6923 version ".tar.gz"))
6924 (sha256
6925 (base32
6926 "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5"))
6927 (modules '((guix build utils)))
6928 (snippet
6929 '(begin
6930 (delete-file "antlr.jar")
6931 (substitute* "lib/cpp/antlr/CharScanner.hpp"
6932 (("#include <map>")
6933 (string-append
6d225e89
RW
6934 "#include <map>\n"
6935 "#define EOF (-1)\n"
6936 "#include <strings.h>")))
9f68e74a 6937 (substitute* "configure"
6d225e89
RW
6938 (("/bin/sh") "sh"))
6939 #t))))
9f68e74a
JL
6940 (build-system gnu-build-system)
6941 (arguments
6d225e89 6942 `(#:tests? #f ; no test target
3ad90395
RW
6943 #:imported-modules ((guix build ant-build-system)
6944 (guix build syscalls)
6945 ,@%gnu-build-system-modules)
6946 #:modules (((guix build ant-build-system) #:prefix ant:)
6947 (guix build gnu-build-system)
6948 (guix build utils))
9f68e74a
JL
6949 #:phases
6950 (modify-phases %standard-phases
6951 (add-after 'install 'strip-jar-timestamps
3ad90395 6952 (assoc-ref ant:%standard-phases 'strip-jar-timestamps))
79f6fc0d
JL
6953 (add-before 'configure 'fix-timestamp
6954 (lambda _
6955 (substitute* "configure"
6956 (("^TIMESTAMP.*") "TIMESTAMP=19700101\n"))
6957 #t))
9f68e74a
JL
6958 (add-after 'configure 'fix-bin-ls
6959 (lambda _
3ad90395
RW
6960 (substitute* (find-files "." "Makefile")
6961 (("/bin/ls") "ls"))
6962 #t)))))
9f68e74a
JL
6963 (native-inputs
6964 `(("which" ,which)
6965 ("zip" ,zip)
6966 ("java" ,icedtea "jdk")))
6967 (inputs
6968 `(("java" ,icedtea)))
7420c1ee 6969 (home-page "https://www.antlr2.org")
9f68e74a
JL
6970 (synopsis "Framework for constructing recognizers, compilers, and translators")
6971 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
6972is a language tool that provides a framework for constructing recognizers,
6973compilers, and translators from grammatical descriptions containing Java, C#,
6974C++, or Python actions. ANTLR provides excellent support for tree construction,
6975tree walking, and translation.")
6976 (license license:public-domain)))
a0f15eff 6977
e44112e1 6978(define-public java-stringtemplate-3
a0f15eff 6979 (package
e44112e1 6980 (name "java-stringtemplate")
a0f15eff
JL
6981 (version "3.2.1")
6982 (source (origin
6983 (method url-fetch)
6984 (uri (string-append "https://github.com/antlr/website-st4/raw/"
6985 "gh-pages/download/stringtemplate-"
6986 version ".tar.gz"))
6987 (sha256
6988 (base32
6989 "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is"))))
6990 (build-system ant-build-system)
6991 (arguments
129d926d 6992 `(#:jar-name (string-append ,name "-" ,version ".jar")
2fcda6d2 6993 #:test-dir "test"
b101b4e8
RW
6994 #:modules ((guix build ant-build-system)
6995 (guix build utils)
6996 (srfi srfi-1))
a0f15eff
JL
6997 #:phases
6998 (modify-phases %standard-phases
2fcda6d2
RW
6999 (add-before 'check 'fix-tests
7000 (lambda _
7001 (substitute* "build.xml"
7002 (("\\$\\{test.home\\}/java")
7003 "${test.home}/org"))
7004 #t))
a0f15eff
JL
7005 (add-before 'build 'generate-grammar
7006 (lambda _
b101b4e8 7007 (with-directory-excursion "src/org/antlr/stringtemplate/language/"
2c8ac364
MW
7008 (for-each (lambda (file)
7009 (format #t "~a\n" file)
7010 (invoke "antlr" file))
7011 '("template.g" "angle.bracket.template.g" "action.g"
7012 "eval.g" "group.g" "interface.g")))
7013 #t)))))
a0f15eff 7014 (native-inputs
2fcda6d2
RW
7015 `(("antlr" ,antlr2)
7016 ("java-junit" ,java-junit)))
ba11a8bd 7017 (home-page "https://www.stringtemplate.org")
a0f15eff
JL
7018 (synopsis "Template engine to generate formatted text output")
7019 (description "StringTemplate is a java template engine (with ports for C#,
7020Objective-C, JavaScript, Scala) for generating source code, web pages, emails,
7021or any other formatted text output. StringTemplate is particularly good at
7022code generators, multiple site skins, and internationalization / localization.
7023StringTemplate also powers ANTLR.")
7024 (license license:bsd-3)))
4ad8aed7
JL
7025
7026;; antlr3 is partially written using antlr3 grammar files. It also depends on
7027;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar
7028;; files and uses antlr3 at runtime. The latest version requires a recent version
7029;; of antlr3 at runtime.
7030;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3.
7031;; This version of ST4 is sufficient for the latest antlr3.
7032;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build
7033;; the latest ST4 with it. Then we build our final antlr3 that will be linked
7034;; against the latest ST4.
7035;; antlr3.3 still depends on antlr3 to generate some files, so we use an
7036;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses
7037;; only grammar files with the antlr2 syntax.
7038;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3.
7039
64b7efc0 7040(define-public java-stringtemplate
407df789 7041 (package (inherit java-stringtemplate-3)
64b7efc0 7042 (name "java-stringtemplate")
4ad8aed7
JL
7043 (version "4.0.8")
7044 (source (origin
7045 (method url-fetch)
7046 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/"
7047 version ".tar.gz"))
7048 (file-name (string-append name "-" version ".tar.gz"))
7049 (sha256
7050 (base32
7051 "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087"))))
7052 (build-system ant-build-system)
7053 (arguments
6db77c7c
RW
7054 `(#:jar-name (string-append ,name "-" ,version ".jar")
7055 #:tests? #f ; FIXME: tests fail for unknown reasons
7056 #:test-dir "test"
f4aa4cfe
RW
7057 #:modules ((guix build ant-build-system)
7058 (guix build utils)
7059 (srfi srfi-1))
4ad8aed7
JL
7060 #:phases
7061 (modify-phases %standard-phases
6db77c7c
RW
7062 (add-before 'check 'fix-test-target
7063 (lambda _
7064 (substitute* "build.xml"
7065 (("\\$\\{test.home\\}/java") "${test.home}/")
7066 (("\\*Test.java") "Test*.java"))
7067 #t))
4ad8aed7 7068 (add-before 'build 'generate-grammar
f4aa4cfe
RW
7069 (lambda _
7070 (with-directory-excursion "src/org/stringtemplate/v4/compiler/"
2c8ac364
MW
7071 (for-each (lambda (file)
7072 (format #t "~a\n" file)
7073 (invoke "antlr3" file))
7074 '("STParser.g" "Group.g" "CodeGenerator.g")))
7075 #t)))))
4ad8aed7
JL
7076 (inputs
7077 `(("antlr3" ,antlr3-bootstrap)
7078 ("antlr2" ,antlr2)
6db77c7c
RW
7079 ("java-stringtemplate" ,java-stringtemplate-3)
7080 ("java-junit" ,java-junit)))))
4ad8aed7 7081
1345eeb0 7082(define java-stringtemplate-4.0.6
64b7efc0 7083 (package (inherit java-stringtemplate)
1345eeb0 7084 (name "java-stringtemplate")
4ad8aed7
JL
7085 (version "4.0.6")
7086 (source (origin
7087 (method url-fetch)
7088 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-"
7089 version ".tar.gz"))
7090 (file-name (string-append name "-" version ".tar.gz"))
7091 (sha256
7092 (base32
7093 "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp"))))
7094 (inputs
7095 `(("antlr3" ,antlr3-3.3)
7096 ("antlr2" ,antlr2)
e44112e1 7097 ("java-stringtemplate" ,java-stringtemplate-3)))))
4ad8aed7
JL
7098
7099(define-public antlr3
7100 (package
7101 (name "antlr3")
7102 (version "3.5.2")
7103 (source (origin
043ee597
EF
7104 (method git-fetch)
7105 (uri (git-reference
7106 (url "https://github.com/antlr/antlr3")
7107 (commit version)))
7108 (file-name (git-file-name name version))
4ad8aed7
JL
7109 (sha256
7110 (base32
043ee597 7111 "0cafavrjmzqhklghrk8c2jqxkdwxgzskm20pbrfd3r41cn00dpnf"))))
4ad8aed7
JL
7112 (build-system ant-build-system)
7113 (arguments
7114 `(#:jar-name (string-append ,name "-" ,version ".jar")
7115 #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3"
7116 #:tests? #f
7117 #:phases
7118 (modify-phases %standard-phases
7119 (add-after 'install 'bin-install
7120 (lambda* (#:key inputs outputs #:allow-other-keys)
7121 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
7122 (bin (string-append (assoc-ref outputs "out") "/bin")))
7123 (mkdir-p bin)
7124 (with-output-to-file (string-append bin "/antlr3")
7125 (lambda _
7126 (display
7127 (string-append "#!" (which "sh") "\n"
7128 "java -cp " jar "/" ,name "-" ,version ".jar:"
7129 (string-concatenate
7130 (find-files (assoc-ref inputs "stringtemplate")
7131 ".*\\.jar"))
7132 ":"
7133 (string-concatenate
7134 (find-files (assoc-ref inputs "stringtemplate4")
7135 ".*\\.jar"))
7136 ":"
7137 (string-concatenate
7138 (find-files (string-append
7139 (assoc-ref inputs "antlr")
7140 "/lib")
7141 ".*\\.jar"))
7142 " org.antlr.Tool $*"))))
2c8ac364
MW
7143 (chmod (string-append bin "/antlr3") #o755))
7144 #t))
4ad8aed7
JL
7145 (add-before 'build 'generate-grammar
7146 (lambda _
7147 (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/")
7148 (for-each (lambda (file)
7149 (display file)
7150 (newline)
2c8ac364 7151 (invoke "antlr3" file))
4ad8aed7
JL
7152 '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g"
7153 "AssignTokenTypesWalker.g"
7154 "ActionTranslator.g" "TreeToNFAConverter.g"
7155 "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g"
7156 "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g"))
7157 (substitute* "ANTLRParser.java"
7158 (("public Object getTree") "public GrammarAST getTree"))
7159 (substitute* "ANTLRv3Parser.java"
7160 (("public Object getTree") "public CommonTree getTree"))
7161 (chdir "../../../../../java")
4ad8aed7
JL
7162 (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java"
7163 (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*;
7164import org.antlr.grammar.v3.ANTLRTreePrinter;"))
7165 (substitute* "org/antlr/tool/ErrorManager.java"
7166 (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") ""))
2c8ac364
MW
7167 (chdir "../../../..")
7168 #t))
4ad8aed7
JL
7169 (add-before 'build 'fix-build-xml
7170 (lambda _
7171 (substitute* "build.xml"
570f3b63
JL
7172 (("target name=\"compile\">")
7173 "target name=\"compile\">
7174<copy todir=\"${classes.dir}\">
4ad8aed7
JL
7175<fileset dir=\"tool/src/main/resources\">
7176<include name=\"**/*.stg\"/>
7177<include name=\"**/*.st\"/>
7178<include name=\"**/*.sti\"/>
7179<include name=\"**/STLexer.tokens\"/>
7180</fileset>
570f3b63 7181</copy>"))
2c8ac364 7182 #t)))))
4ad8aed7
JL
7183 (native-inputs
7184 `(("antlr" ,antlr2)
7185 ("antlr3" ,antlr3-bootstrap)))
7186 (inputs
7187 `(("junit" ,java-junit)
e44112e1 7188 ("stringtemplate" ,java-stringtemplate-3)
64b7efc0 7189 ("stringtemplate4" ,java-stringtemplate)))
4ad8aed7 7190 (propagated-inputs
e44112e1 7191 `(("stringtemplate" ,java-stringtemplate-3)
4ad8aed7 7192 ("antlr" ,antlr2)
1345eeb0 7193 ("stringtemplate4" ,java-stringtemplate-4.0.6)))
a264250b 7194 (home-page "https://www.antlr3.org")
4ad8aed7
JL
7195 (synopsis "Framework for constructing recognizers, compilers, and translators")
7196 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
7197is a language tool that provides a framework for constructing recognizers,
7198compilers, and translators from grammatical descriptions containing Java, C#,
7199C++, or Python actions. ANTLR provides excellent support for tree construction,
7200tree walking, and translation.")
7201 (license license:bsd-3)))
7202
7203(define antlr3-bootstrap
7204 (package
7205 (inherit antlr3)
7206 (name "antlr3-bootstrap")
7207 (native-inputs
7208 `(("antlr" ,antlr2)
7209 ("antlr3" ,antlr3-3.3)))
7210 (inputs
7211 `(("junit" ,java-junit)))))
7212
011f9412 7213(define-public antlr3-3.3
4ad8aed7
JL
7214 (package
7215 (inherit antlr3)
7216 (name "antlr3")
7217 (version "3.3")
7218 (source (origin
7219 (method url-fetch)
7220 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
7221 "gh-pages/download/antlr-"
7222 version ".tar.gz"))
7223 (sha256
7224 (base32
48c86220
GB
7225 "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m"))
7226 (patches
7227 (search-patches "antlr3-3_3-fix-java8-compilation.patch"))))
4ad8aed7
JL
7228 (arguments
7229 `(#:jar-name (string-append ,name "-" ,version ".jar")
a9540107
RW
7230 #:source-dir (string-join '("tool/src/main/java"
7231 "runtime/Java/src/main/java"
7232 "tool/src/main/antlr2"
7233 "tool/src/main/antlr3")
7234 ":")
7235 #:tests? #f ; FIXME: tests seem to require maven plugin
7236 #:modules ((guix build ant-build-system)
7237 (guix build utils)
7238 (srfi srfi-1))
4ad8aed7
JL
7239 #:phases
7240 (modify-phases %standard-phases
7241 (add-after 'install 'bin-install
7242 (lambda* (#:key inputs outputs #:allow-other-keys)
a9540107
RW
7243 (let* ((out (assoc-ref outputs "out"))
7244 (jar (string-append out "/share/java"))
7245 (bin (string-append out "/bin")))
4ad8aed7
JL
7246 (mkdir-p bin)
7247 (with-output-to-file (string-append bin "/antlr3")
7248 (lambda _
7249 (display
a9540107
RW
7250 (string-append
7251 "#!" (which "sh") "\n"
7252 "java -cp " jar "/antlr3-3.3.jar:"
7253 (string-join
7254 (append (find-files (assoc-ref inputs "java-stringtemplate")
7255 ".*\\.jar$")
7256 (find-files (string-append (assoc-ref inputs "antlr")
7257 "/lib")
7258 ".*\\.jar$"))
7259 ":")
7260 " org.antlr.Tool $*"))))
7261 (chmod (string-append bin "/antlr3") #o755)
7262 #t)))
4ad8aed7
JL
7263 (add-before 'build 'generate-grammar
7264 (lambda _
4ad8aed7
JL
7265 (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java"
7266 (("import org.antlr.grammar.v2.\\*;")
7267 "import org.antlr.grammar.v2.*;\n
7268import org.antlr.grammar.v2.TreeToNFAConverter;\n
7269import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n
a9540107 7270import org.antlr.grammar.v2.ANTLRTreePrinter;"))
2c8ac364
MW
7271 (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/"
7272 (for-each (lambda (file)
7273 (format #t "~a\n" file)
7274 (invoke "antlr" file))
7275 '("antlr.g" "antlr.print.g" "assign.types.g"
7276 "buildnfa.g" "codegen.g" "define.g")))
7277 (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/"
7278 (for-each (lambda (file)
7279 (format #t "~a\n" file)
7280 (invoke "antlr3" file))
7281 '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g"
7282 "ANTLRv3Tree.g")))
7283 #t))
4ad8aed7
JL
7284 (add-before 'build 'fix-build-xml
7285 (lambda _
7286 (substitute* "build.xml"
570f3b63
JL
7287 (("target name=\"compile\">")
7288 "target name=\"compile\">
7289<copy todir=\"${classes.dir}\">
4ad8aed7
JL
7290<fileset dir=\"tool/src/main/resources\">
7291<include name=\"**/*.stg\"/>
7292<include name=\"**/*.st\"/>
7293<include name=\"**/*.sti\"/>
7294<include name=\"**/STLexer.tokens\"/>
7295</fileset>
570f3b63 7296</copy>"))
a9540107 7297 #t)))))
4ad8aed7
JL
7298 (native-inputs
7299 `(("antlr" ,antlr2)
7300 ("antlr3" ,antlr3-3.1)))
7301 (inputs
7302 `(("junit" ,java-junit)))
7303 (propagated-inputs
e44112e1 7304 `(("java-stringtemplate" ,java-stringtemplate-3)
4ad8aed7
JL
7305 ("antlr" ,antlr2)
7306 ("antlr3" ,antlr3-3.1)))))
7307
570f3b63 7308(define-public antlr3-3.1
4ad8aed7
JL
7309 (package
7310 (inherit antlr3)
4ad8aed7
JL
7311 (version "3.1")
7312 (source (origin
7313 (method url-fetch)
7314 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
7315 "gh-pages/download/antlr-"
7316 version ".tar.gz"))
7317 (sha256
7318 (base32
4c763b4d
GB
7319 "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z"))
7320 (patches
7321 (search-patches "antlr3-3_1-fix-java8-compilation.patch"))))
4ad8aed7 7322 (arguments
ec32bc98 7323 `(#:jar-name (string-append "antlr3-" ,version ".jar")
4ad8aed7
JL
7324 #:source-dir "src:runtime/Java/src"
7325 #:tests? #f
7326 #:phases
7327 (modify-phases %standard-phases
7328 (add-after 'install 'bin-install
7329 (lambda* (#:key inputs outputs #:allow-other-keys)
7330 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
7331 (bin (string-append (assoc-ref outputs "out") "/bin")))
7332 (mkdir-p bin)
7333 (with-output-to-file (string-append bin "/antlr3")
7334 (lambda _
7335 (display
7336 (string-append "#!" (which "sh") "\n"
57e37764 7337 "java -cp " jar "/antlr3-3.1.jar:"
4ad8aed7
JL
7338 (string-concatenate
7339 (find-files (assoc-ref inputs "stringtemplate")
7340 ".*\\.jar"))
7341 ":"
7342 (string-concatenate
7343 (find-files (string-append
7344 (assoc-ref inputs "antlr")
7345 "/lib")
7346 ".*\\.jar"))
7347 " org.antlr.Tool $*"))))
2c8ac364
MW
7348 (chmod (string-append bin "/antlr3") #o755))
7349 #t))
4ad8aed7
JL
7350 (add-before 'build 'generate-grammar
7351 (lambda _
7352 (let ((dir "src/org/antlr/tool/"))
7353 (for-each (lambda (file)
7354 (display file)
7355 (newline)
13f38d31 7356 (invoke "antlr" "-o" dir (string-append dir file)))
4ad8aed7
JL
7357 '("antlr.g" "antlr.print.g" "assign.types.g"
7358 "buildnfa.g" "define.g")))
7359 (format #t "codegen.g\n")
13f38d31
RW
7360 (invoke "antlr" "-o" "src/org/antlr/codegen"
7361 "src/org/antlr/codegen/codegen.g")
7362 #t))
4ad8aed7
JL
7363 (add-before 'build 'fix-build-xml
7364 (lambda _
7365 (substitute* "build.xml"
570f3b63
JL
7366 (("target name=\"compile\">")
7367 "target name=\"compile\">
7368<copy todir=\"${classes.dir}\">
4ad8aed7
JL
7369<fileset dir=\"src\">
7370<include name=\"**/*.stg\"/>
7371<include name=\"**/*.st\"/>
7372<include name=\"**/*.sti\"/>
7373<include name=\"**/STLexer.tokens\"/>
7374</fileset>
570f3b63 7375</copy>"))
2c8ac364 7376 #t)))))
4ad8aed7
JL
7377 (native-inputs
7378 `(("antlr" ,antlr2)))
7379 (inputs
7380 `(("junit" ,java-junit)))
7381 (propagated-inputs
e44112e1 7382 `(("stringtemplate" ,java-stringtemplate-3)))))
d44bcd7a 7383
742242a5
GB
7384(define-public java-commons-cli-1.2
7385 ;; This is a bootstrap dependency for Maven2.
7386 (package
7387 (inherit java-commons-cli)
7388 (version "1.2")
7389 (source (origin
7390 (method url-fetch)
7391 (uri (string-append "mirror://apache/commons/cli/source/"
7392 "commons-cli-" version "-src.tar.gz"))
7393 (sha256
7394 (base32
7395 "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm"))))
7396 (arguments
7397 `(#:jar-name "commons-cli.jar"
7398 #:phases
7399 (modify-phases %standard-phases
7400 (add-before 'check 'fix-build-xml
7401 (lambda* (#:key inputs #:allow-other-keys)
7402 (substitute* "build.xml"
7403 (("dir=\"\\$\\{test.home\\}/java\"")
7404 "dir=\"${test.home}\""))
7405 #t)))))
7406 (native-inputs
7407 `(("java-junit" ,java-junit)))))
30deadee
JL
7408
7409(define-public java-microemulator-cldc
7410 (package
7411 (name "java-microemulator-cldc")
7412 (version "2.0.4")
7413 (source (origin
7414 (method url-fetch)
7415 (uri (string-append "https://github.com/barteo/microemu/archive/"
7416 "microemulator_"
7417 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
7418 version)
7419 ".tar.gz"))
7420 (file-name (string-append name "-" version ".tar.gz"))
7421 (sha256
7422 (base32
7423 "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll"))))
7424 (build-system ant-build-system)
7425 (arguments
7426 `(#:jar-name "microemulator-cldc.jar"
7427 #:source-dir "microemu-cldc/src/main/java"
7428 #:tests? #f)); Requires even older software
7429 (home-page "https://github.com/barteo/microemu")
7430 (synopsis "J2ME CLDC emulator")
7431 (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP
60738bdc 7432Emulator. It demonstrates MIDlet based applications in web browser
30deadee
JL
7433applet and can be run as a standalone java application.")
7434 (license (list license:asl2.0
7435 ;; or altenatively:
7436 license:lgpl2.1+))))
8e2f3e5e
JL
7437
7438(define-public java-datanucleus-javax-persistence
7439 (package
7440 (name "java-datanucleus-javax-persistence")
7441 (version "2.2.0")
7442 (source (origin
7443 (method url-fetch)
7444 (uri (string-append "https://github.com/datanucleus/"
7445 "javax.persistence/archive/javax.persistence-"
7446 version "-release.tar.gz"))
7447 (sha256
7448 (base32
7449 "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx"))))
7450 (build-system ant-build-system)
7451 (arguments
7452 `(#:jar-name "java-datanucleus-javax-persistence.jar"
7453 #:jdk ,icedtea-8
7454 #:source-dir "src/main/java"
7455 #:tests? #f)); no tests
7456 (home-page "https://github.com/datanucleus/javax.persistence")
7457 (synopsis "JPA API")
7458 (description "This package contains a clean definition of JPA API intended
7459for use with DataNucleus JPA since the JCP haven't provided an official JPA API
7460jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification
7461used to generate this API.")
7462 (license (list license:edl1.0 license:epl1.0))))
3240ddbf
JL
7463
7464(define-public java-osgi-cmpn
7465 (package
7466 (name "java-osgi-cmpn")
7467 (version "6.0.0")
7468 (source (origin
7469 (method url-fetch)
7779ad50 7470 (uri (string-append "https://repo1.maven.org/maven2/"
3240ddbf
JL
7471 "org/osgi/osgi.cmpn/" version "/osgi.cmpn-"
7472 version "-sources.jar"))
7473 (sha256
7474 (base32
7475 "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys"))))
7476 (build-system ant-build-system)
7477 (arguments
7478 `(#:jar-name "osgi-cmpn.jar"
7479 #:tests? #f)); no tests
7480 (inputs
7481 `(("annotation" ,java-osgi-annotation)
7482 ("core" ,java-osgi-core)
7483 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
7484 ("microemulator" ,java-microemulator-cldc)
7485 ("servlet" ,java-classpathx-servletapi)))
c353d014 7486 (home-page "https://www.osgi.org")
3240ddbf
JL
7487 (synopsis "Compendium specification module of OSGi framework")
7488 (description
7489 "OSGi, for Open Services Gateway initiative framework, is a module system
7490and service platform for the Java programming language. This package contains
7491the compendium specification module, providing interfaces and classes for use
7492in compiling bundles.")
7493 (license license:asl2.0)))
747c7574
JL
7494
7495(define-public java-osgi-service-component-annotations
7496 (package
7497 (name "java-osgi-service-component-annotations")
7498 (version "1.3.0")
7499 (source (origin
7500 (method url-fetch)
fa315559 7501 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
747c7574
JL
7502 "org.osgi.service.component.annotations/"
7503 version "/org.osgi.service.component.annotations-"
7504 version "-sources.jar"))
7505 (sha256
7506 (base32
7507 "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0"))))
7508 (build-system ant-build-system)
7509 (arguments
7510 `(#:jar-name "osgi-service-component-annotations.jar"
7511 #:tests? #f)); no tests
7512 (inputs
7513 `(("annotation" ,java-osgi-annotation)))
c353d014 7514 (home-page "https://www.osgi.org")
747c7574
JL
7515 (synopsis "Support annotations for osgi-service-component")
7516 (description
7517 "OSGi, for Open Services Gateway initiative framework, is a module system
7518and service platform for the Java programming language. This package contains
7519the support annotations for osgi-service-component.")
7520 (license license:asl2.0)))
999b5fb4
JL
7521
7522(define-public java-osgi-dto
7523 (package
7524 (name "java-osgi-dto")
7525 (version "1.0.0")
7526 (source (origin
7527 (method url-fetch)
fc1c5dbd 7528 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
999b5fb4
JL
7529 "org.osgi.dto/" version "/org.osgi.dto-"
7530 version "-sources.jar"))
7531 (sha256
7532 (base32
7533 "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr"))))
7534 (build-system ant-build-system)
7535 (arguments
7536 `(#:jar-name "osgi-dto.jar"
7537 #:tests? #f)); no tests
7538 (inputs
7539 `(("annotation" ,java-osgi-annotation)))
c353d014 7540 (home-page "https://www.osgi.org")
999b5fb4
JL
7541 (synopsis "Data Transfer Objects")
7542 (description
7543 "OSGi, for Open Services Gateway initiative framework, is a module system
7544and service platform for the Java programming language. This package contains
7545the Data Transfer Objects. It is easily serializable having only public fields
7546of primitive types and their wrapper classes, Strings, and DTOs. List, Set,
7547Map and array aggregates may also be used. The aggregates must only hold
7548objects of the listed types or aggregates.")
7549 (license license:asl2.0)))
c304ce6a
JL
7550
7551(define-public java-osgi-resource
7552 (package
7553 (name "java-osgi-resource")
7554 (version "1.0.0")
7555 (source (origin
7556 (method url-fetch)
1f2643fa 7557 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
c304ce6a
JL
7558 "org.osgi.resource/"
7559 version "/org.osgi.resource-"
7560 version "-sources.jar"))
7561 (sha256
7562 (base32
7563 "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d"))))
7564 (build-system ant-build-system)
7565 (arguments
7566 `(#:jar-name "osgi-resource.jar"
7567 #:tests? #f)); no tests
7568 (inputs
7569 `(("annotation" ,java-osgi-annotation)
7570 ("dto" ,java-osgi-dto)))
c353d014 7571 (home-page "https://www.osgi.org")
c304ce6a
JL
7572 (synopsis "OSGI Resource")
7573 (description
7574 "OSGi, for Open Services Gateway initiative framework, is a module system
7575and service platform for the Java programming language. This package contains
7576the definition of common types in osgi packages.")
7577 (license license:asl2.0)))
c2b14516
JL
7578
7579(define-public java-osgi-namespace-contract
7580 (package
7581 (name "java-osgi-namespace-contract")
7582 (version "1.0.0")
7583 (source (origin
7584 (method url-fetch)
60f5ab0b 7585 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
c2b14516
JL
7586 "org.osgi.namespace.contract/"
7587 version "/org.osgi.namespace.contract-"
7588 version "-sources.jar"))
7589 (sha256
7590 (base32
7591 "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36"))))
7592 (build-system ant-build-system)
7593 (inputs
7594 `(("resource" ,java-osgi-resource)
7595 ("annotation" ,java-osgi-annotation)))
7596 (arguments
7597 `(#:jar-name "osgi-namespace-contract.jar"
7598 #:tests? #f)); no tests
c353d014 7599 (home-page "https://www.osgi.org")
c2b14516
JL
7600 (synopsis "Contract Capability and Requirement Namespace")
7601 (description
7602 "OSGi, for Open Services Gateway initiative framework, is a module system
7603and service platform for the Java programming language. This package contains
7604the names for the attributes and directives for a namespace with contracts.")
7605 (license license:asl2.0)))
f809c963
JL
7606
7607(define-public java-osgi-namespace-extender
7608 (package
7609 (name "java-osgi-namespace-extender")
7610 (version "1.0.1")
7611 (source (origin
7612 (method url-fetch)
fccce661 7613 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
f809c963
JL
7614 "org.osgi.namespace.extender/"
7615 version "/org.osgi.namespace.extender-"
7616 version "-sources.jar"))
7617 (sha256
7618 (base32
7619 "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz"))))
7620 (build-system ant-build-system)
7621 (inputs
7622 `(("resource" ,java-osgi-resource)
7623 ("annotation" ,java-osgi-annotation)))
7624 (arguments
7625 `(#:jar-name "osgi-namespace-extendent.jar"
7626 #:tests? #f)); no tests
c353d014 7627 (home-page "https://www.osgi.org")
f809c963
JL
7628 (synopsis "Extender Capability and Requirement Namespace")
7629 (description
7630 "OSGi, for Open Services Gateway initiative framework, is a module system
7631and service platform for the Java programming language. This package contains
b784962d
JL
7632the names for the attributes and directives for an extender namespace.")
7633 (license license:asl2.0)))
7634
7635(define-public java-osgi-namespace-service
7636 (package
7637 (name "java-osgi-namespace-service")
7638 (version "1.0.0")
7639 (source (origin
7640 (method url-fetch)
ec4ba417 7641 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
b784962d
JL
7642 "org.osgi.namespace.service/"
7643 version "/org.osgi.namespace.service-"
7644 version "-sources.jar"))
7645 (sha256
7646 (base32
7647 "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8"))))
7648 (build-system ant-build-system)
7649 (inputs
7650 `(("resource" ,java-osgi-resource)
7651 ("annotation" ,java-osgi-annotation)))
7652 (arguments
7653 `(#:jar-name "osgi-namespace-service.jar"
7654 #:tests? #f)); no tests
c353d014 7655 (home-page "https://www.osgi.org")
b784962d
JL
7656 (synopsis "Service Capability and Requirement Namespace")
7657 (description
7658 "OSGi, for Open Services Gateway initiative framework, is a module system
7659and service platform for the Java programming language. This package contains
7660the names for the attributes and directives for a service namespace.")
f809c963 7661 (license license:asl2.0)))
0f0c5218
JL
7662
7663(define-public java-osgi-util-function
7664 (package
7665 (name "java-osgi-util-function")
7666 (version "1.0.0")
7667 (source (origin
7668 (method url-fetch)
43be0299 7669 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
0f0c5218
JL
7670 "org.osgi.util.function/"
7671 version "/org.osgi.util.function-"
7672 version "-sources.jar"))
7673 (sha256
7674 (base32
7675 "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x"))))
7676 (build-system ant-build-system)
7677 (arguments
7678 `(#:jar-name "osgi-util-function.jar"
7679 #:tests? #f)); no tests
7680 (inputs
7681 `(("annotation" ,java-osgi-annotation)))
c353d014 7682 (home-page "https://www.osgi.org")
0f0c5218
JL
7683 (synopsis "OSGI Util Function")
7684 (description
7685 "OSGi, for Open Services Gateway initiative framework, is a module system
7686and service platform for the Java programming language. This package contains
7687an interface for a function that accepts a single argument and produces a result.")
7688 (license license:asl2.0)))
27103135
JL
7689
7690(define-public java-osgi-util-promise
7691 (package
7692 (name "java-osgi-util-promise")
7693 (version "1.0.0")
7694 (source (origin
7695 (method url-fetch)
c962e6c4 7696 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
27103135
JL
7697 "org.osgi.util.promise/"
7698 version "/org.osgi.util.promise-"
7699 version "-sources.jar"))
7700 (sha256
7701 (base32
7702 "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c"))))
7703 (build-system ant-build-system)
7704 (arguments
7705 `(#:jar-name "osgi-util-promise.jar"
7706 #:tests? #f)); no tests
7707 (inputs
7708 `(("annotation" ,java-osgi-annotation)
7709 ("function" ,java-osgi-util-function)))
c353d014 7710 (home-page "https://www.osgi.org")
27103135
JL
7711 (synopsis "Promise of a value")
7712 (description
7713 "OSGi, for Open Services Gateway initiative framework, is a module system
7714and service platform for the Java programming language. This package contains
7715an interface and utilitary classes for promises. A Promise represents a future
7716value. It handles the interactions for asynchronous processing.")
7717 (license license:asl2.0)))
2b1fdb2b
JL
7718
7719(define-public java-osgi-service-metatype-annotations
7720 (package
7721 (name "java-osgi-service-metatype-annotations")
7722 (version "1.3.0")
7723 (source (origin
7724 (method url-fetch)
98b1985f 7725 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
2b1fdb2b
JL
7726 "org.osgi.service.metatype.annotations/"
7727 version "/org.osgi.service.metatype.annotations-"
7728 version "-sources.jar"))
7729 (sha256
7730 (base32
7731 "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6"))))
7732 (build-system ant-build-system)
7733 (arguments
7734 `(#:jar-name "osgi-service-metatype-annotations.jar"
7735 #:tests? #f)); no tests
7736 (inputs
7737 `(("annotation" ,java-osgi-annotation)))
c353d014 7738 (home-page "https://www.osgi.org")
2b1fdb2b
JL
7739 (synopsis "Support annotations for metatype")
7740 (description
7741 "OSGi, for Open Services Gateway initiative framework, is a module system
7742and service platform for the Java programming language. This package contains
7743the support annotations for metatype.")
7744 (license license:asl2.0)))
a13acfbe
JL
7745
7746(define-public java-osgi-service-repository
7747 (package
7748 (name "java-osgi-service-repository")
7749 (version "1.1.0")
7750 (source (origin
7751 (method url-fetch)
7a5c5017 7752 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
a13acfbe
JL
7753 "org.osgi.service.repository/"
7754 version "/org.osgi.service.repository-"
7755 version "-sources.jar"))
7756 (sha256
7757 (base32
7758 "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n"))))
7759 (build-system ant-build-system)
7760 (arguments
7761 `(#:jar-name "osgi-service-repository.jar"
7762 #:tests? #f)); no tests
7763 (inputs
7764 `(("annotation" ,java-osgi-annotation)
7765 ("promise" ,java-osgi-util-promise)
7766 ("resource" ,java-osgi-resource)))
c353d014 7767 (home-page "https://www.osgi.org")
a13acfbe
JL
7768 (synopsis "OSGI service repository")
7769 (description
7770 "OSGi, for Open Services Gateway initiative framework, is a module system
7771and service platform for the Java programming language. This package contains
7772a repository service that contains resources.")
7773 (license license:asl2.0)))
dfd91541
JL
7774
7775(define-public java-osgi-framework
7776 (package
7777 (name "java-osgi-framework")
7778 (version "1.8.0")
7779 (source (origin
7780 (method url-fetch)
05662561 7781 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
dfd91541
JL
7782 "org.osgi.framework/" version "/org.osgi.framework-"
7783 version "-sources.jar"))
7784 (sha256
7785 (base32
7786 "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s"))))
7787 (build-system ant-build-system)
7788 (arguments
7789 `(#:jar-name "osgi-framework.jar"
7790 #:tests? #f)); no tests
7791 (inputs
7792 `(("annotation" ,java-osgi-annotation)
7793 ("resource" ,java-osgi-resource)
7794 ("dto" ,java-osgi-dto)))
c353d014 7795 (home-page "https://www.osgi.org")
dfd91541
JL
7796 (synopsis "OSGi framework")
7797 (description
7798 "OSGi, for Open Services Gateway initiative framework, is a module system
7799and service platform for the Java programming language.")
7800 (license license:asl2.0)))
98c9f16c
JL
7801
7802(define-public java-osgi-service-log
7803 (package
7804 (name "java-osgi-service-log")
7805 (version "1.3.0")
7806 (source (origin
7807 (method url-fetch)
9b0bf25c 7808 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
98c9f16c
JL
7809 "org.osgi.service.log/"
7810 version "/org.osgi.service.log-"
7811 version "-sources.jar"))
7812 (sha256
7813 (base32
7814 "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0"))))
7815 (build-system ant-build-system)
7816 (arguments
7817 `(#:jar-name "osgi-service-log.jar"
7818 #:tests? #f)); no tests
7819 (inputs
7820 `(("java-osgi-framework" ,java-osgi-framework)))
c353d014 7821 (home-page "https://www.osgi.org")
98c9f16c
JL
7822 (synopsis "Provides methods for bundles to write messages to the log")
7823 (description
7824 "OSGi, for Open Services Gateway initiative framework, is a module system
7825and service platform for the Java programming language. This package contains
7826the log service.")
7827 (license license:asl2.0)))
dd76d44b
JL
7828
7829(define-public java-osgi-service-jdbc
7830 (package
7831 (name "java-osgi-service-jdbc")
7832 (version "1.0.0")
7833 (source (origin
7834 (method url-fetch)
4a6a7b2d 7835 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
dd76d44b
JL
7836 "org.osgi.service.jdbc/"
7837 version "/org.osgi.service.jdbc-"
7838 version "-sources.jar"))
7839 (sha256
7840 (base32
7841 "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz"))))
7842 (build-system ant-build-system)
7843 (arguments
7844 `(#:jar-name "osgi-service-jdbc.jar"
7845 #:tests? #f)); no tests
c353d014 7846 (home-page "https://www.osgi.org")
dd76d44b
JL
7847 (synopsis "Factory for JDBC connection factories")
7848 (description
7849 "OSGi, for Open Services Gateway initiative framework, is a module system
7850and service platform for the Java programming language. This package contains
7851a factory for JDBC connection factories. There are 3 preferred connection
7852factories for getting JDBC connections:
7853
7854@itemize
7855@item @code{javax.sql.DataSource};
7856@item @code{javax.sql.ConnectionPoolDataSource};
7857@item @code{javax.sql.XADataSource}.
7858@end itemize")
7859 (license license:asl2.0)))
291d3f22
JL
7860
7861(define-public java-osgi-service-resolver
7862 (package
7863 (name "java-osgi-service-resolver")
7864 (version "1.0.1")
7865 (source (origin
7866 (method url-fetch)
b787534b 7867 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
291d3f22
JL
7868 "org.osgi.service.resolver/"
7869 version "/org.osgi.service.resolver-"
7870 version "-sources.jar"))
7871 (sha256
7872 (base32
7873 "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd"))))
7874 (build-system ant-build-system)
7875 (arguments
7876 `(#:jar-name "osgi-service-resolver.jar"
7877 #:tests? #f)); no tests
7878 (inputs
7879 `(("annotation" ,java-osgi-annotation)
7880 ("resource" ,java-osgi-resource)))
c353d014 7881 (home-page "https://www.osgi.org")
291d3f22
JL
7882 (synopsis "OSGI Resolver service")
7883 (description
7884 "OSGi, for Open Services Gateway initiative framework, is a module system
7885and service platform for the Java programming language. This package contains
7886a resolver service that resolves the specified resources in the context supplied
7887by the caller.")
7888 (license license:asl2.0)))
1884bb81
JL
7889
7890(define-public java-osgi-util-tracker
7891 (package
7892 (name "java-osgi-util-tracker")
7893 (version "1.5.1")
7894 (source (origin
7895 (method url-fetch)
e0695da9 7896 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
1884bb81
JL
7897 "org.osgi.util.tracker/"
7898 version "/org.osgi.util.tracker-"
7899 version "-sources.jar"))
7900 (sha256
7901 (base32
7902 "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz"))))
7903 (build-system ant-build-system)
7904 (arguments
7905 `(#:jar-name "osgi-util-tracker.jar"
7906 #:tests? #f)); no tests
7907 (inputs
7908 `(("framework" ,java-osgi-framework)
7909 ("annotation" ,java-osgi-annotation)))
c353d014 7910 (home-page "https://www.osgi.org")
1884bb81
JL
7911 (synopsis "Bundle tracking")
7912 (description
7913 "OSGi, for Open Services Gateway initiative framework, is a module system
7914and service platform for the Java programming language. This package contains
7915bundle tracking utility classes.")
7916 (license license:asl2.0)))
fb9c48b8
JL
7917
7918(define-public java-osgi-service-cm
7919 (package
7920 (name "java-osgi-service-cm")
7921 (version "1.5.0")
7922 (source (origin
7923 (method url-fetch)
f8f2fefb 7924 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
fb9c48b8
JL
7925 "org.osgi.service.cm/"
7926 version "/org.osgi.service.cm-"
7927 version "-sources.jar"))
7928 (sha256
7929 (base32
7930 "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6"))))
7931 (build-system ant-build-system)
7932 (arguments
7933 `(#:jar-name "osgi-service-cm.jar"
7934 #:tests? #f)); no tests
7935 (inputs
7936 `(("framework" ,java-osgi-framework)
7937 ("annotation" ,java-osgi-annotation)))
c353d014 7938 (home-page "https://www.osgi.org")
fb9c48b8
JL
7939 (synopsis "OSGI Configuration Management")
7940 (description
7941 "OSGi, for Open Services Gateway initiative framework, is a module system
7942and service platform for the Java programming language. This package contains
7943utility classes for the configuration of services.")
7944 (license license:asl2.0)))
500aac75
JL
7945
7946(define-public java-osgi-service-packageadmin
7947 (package
7948 (name "java-osgi-service-packageadmin")
7949 (version "1.2.0")
7950 (source (origin
7951 (method url-fetch)
839e3e89 7952 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
500aac75
JL
7953 "org.osgi.service.packageadmin/"
7954 version "/org.osgi.service.packageadmin-"
7955 version "-sources.jar"))
7956 (sha256
7957 (base32
7958 "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52"))))
7959 (build-system ant-build-system)
7960 (arguments
7961 `(#:jar-name "osgi-service-packageadmin.jar"
7962 #:tests? #f)); no tests
7963 (inputs
7964 `(("framework" ,java-osgi-framework)))
c353d014 7965 (home-page "https://www.osgi.org")
500aac75
JL
7966 (synopsis "OSGI Package Administration")
7967 (description
7968 "OSGi, for Open Services Gateway initiative framework, is a module system
7969and service platform for the Java programming language. This package contains
7970the packageadmin service.")
7971 (license license:asl2.0)))
77a4f1ae
JL
7972
7973(define-public java-ops4j-base-lang
7974 (package
7975 (name "java-ops4j-base-lang")
7976 (version "1.5.0")
7977 (source (origin
7978 (method url-fetch)
7979 (uri (string-append "https://github.com/ops4j/org.ops4j.base/"
7980 "archive/base-" version ".tar.gz"))
7981 (sha256
7982 (base32
7983 "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw"))))
7984 (build-system ant-build-system)
7985 (arguments
7986 `(#:jar-name "java-ops4j-base-lang.jar"
7987 #:source-dir "ops4j-base-lang/src/main/java"
7988 #:tests? #f; no tests
7989 #:phases
7990 (modify-phases %standard-phases
7991 (add-before 'build 'add-test-file
7992 (lambda _
7993 ;; That file is required by a test in ops4j-pax-exam-core-spi
7994 (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang")
7995 (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties"
7996 (lambda _
7997 (display
7998 (string-append
7999 "version=" ,version "\n"
8000 "groupId=org.ops4j.base"
2c8ac364
MW
8001 "artifactId=ops4j-base-lang\n"))))
8002 #t)))))
77a4f1ae
JL
8003 (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview")
8004 (synopsis "Utility classes and extensions to be used in OPS4J projects")
8005 (description "OPS4J stands for Open Participation Software for Java. This
8006package contains utilities and extensions related to @code{java.lang}.")
8007 (license license:asl2.0)))
b2353495
JL
8008
8009(define-public java-ops4j-base-monitors
8010 (package
8011 (inherit java-ops4j-base-lang)
8012 (name "java-ops4j-base-monitors")
8013 (arguments
8014 `(#:jar-name "java-ops4j-base-monitors.jar"
8015 #:source-dir "ops4j-base-monitors/src/main/java"
8016 #:tests? #f)); no tests
8017 (inputs
8018 `(("lang" ,java-ops4j-base-lang)))
8019 (description "OPS4J stands for Open Participation Software for Java. This
8020package contains utilities and extensions related to monitoring.")))
322d349a
JL
8021
8022(define-public java-ops4j-base-io
8023 (package
8024 (inherit java-ops4j-base-lang)
8025 (name "java-ops4j-base-io")
8026 (arguments
8027 `(#:jar-name "java-ops4j-base-io.jar"
8028 #:source-dir "ops4j-base-io/src/main/java"
8029 #:test-dir "ops4j-base-io/src/test"
8030 #:test-exclude
8031 (list "**/ListerTest.java")))
8032 (inputs
8033 `(("lang" ,java-ops4j-base-monitors)
8034 ("lang" ,java-ops4j-base-lang)))
8035 (native-inputs
8036 `(("junit" ,java-junit)
8037 ("hamcrest" ,java-hamcrest-core)))
8038 (description "OPS4J stands for Open Participation Software for Java. This
8039package contains utilities and extensions related to handling streams and files.")))
559919c1
JL
8040
8041(define-public java-ops4j-base-util
8042 (package
8043 (inherit java-ops4j-base-lang)
8044 (name "java-ops4j-base-util")
8045 (arguments
8046 `(#:jar-name "java-ops4j-base-util.jar"
8047 #:source-dir "ops4j-base-util/src/main/java"
8048 #:test-dir "ops4j-base-util/src/test"))
8049 (inputs
8050 `(("lang" ,java-ops4j-base-lang)))
8051 (native-inputs
8052 `(("junit" ,java-junit)))
8053 (description "OPS4J stands for Open Participation Software for Java. This
8054package contains utilities and extensions related to environment, i18n and
8055mime types.")))
60dcec7a
JL
8056
8057(define-public java-ops4j-base-util-property
8058 (package
8059 (inherit java-ops4j-base-lang)
8060 (name "java-ops4j-base-util-property")
8061 (arguments
8062 `(#:jar-name "java-ops4j-base-util-property.jar"
8063 #:source-dir "ops4j-base-util-property/src/main/java"
8064 #:tests? #f)); no tests
8065 (inputs
8066 `(("lang" ,java-ops4j-base-lang)
8067 ("util" ,java-ops4j-base-util)))
8068 (description "OPS4J stands for Open Participation Software for Java. This
8069package contains utilities and extensions related to resolving properties from
8070different sources.")))
0edf8cf0
JL
8071
8072(define-public java-ops4j-base-store
8073 (package
8074 (inherit java-ops4j-base-lang)
8075 (name "java-ops4j-base-store")
8076 (arguments
8077 `(#:jar-name "java-ops4j-base-store.jar"
8078 #:source-dir "ops4j-base-store/src/main/java"
8079 #:tests? #f)); no tests
8080 (inputs
8081 `(("lang" ,java-ops4j-base-lang)
8082 ("slf4j" ,java-slf4j-api)
8083 ("io" ,java-ops4j-base-io)))
8084 (description "OPS4J stands for Open Participation Software for Java. This
8085package contains utilities for storing and retrieving data from an
8086@code{InputStream}.")))
214fcd8a
JL
8087
8088(define-public java-ops4j-base-spi
8089 (package
8090 (inherit java-ops4j-base-lang)
8091 (name "java-ops4j-base-spi")
8092 (arguments
8093 `(#:jar-name "java-ops4j-base-spi.jar"
8094 #:source-dir "ops4j-base-spi/src/main/java"
8095 #:test-dir "ops4j-base-spi/src/test"))
8096 (native-inputs
8097 `(("junit" ,java-junit)
8098 ("hamcrest" ,java-hamcrest-core)))
8099 (description "OPS4J stands for Open Participation Software for Java. This
8100package contains utilities for obtaining services via the Java SE 6
8101@code{ServiceLoader}.")))
e1edf42e
JL
8102
8103(define-public java-aqute-bnd-annotation
8104 (package
8105 (name "java-aqute-bnd-annotation")
2cac8891 8106 (version "3.5.0")
e1edf42e
JL
8107 (source (origin
8108 (method url-fetch)
8109 (uri (string-append "https://github.com/bndtools/bnd/archive/"
8110 version ".REL.tar.gz"))
8111 (file-name (string-append name "-" version ".tar.gz"))
8112 (sha256
8113 (base32
2cac8891 8114 "1ggyiq0as0f6cz333a0dh98j72kmvv5pf2s47v9554yh905lfqdl"))))
e1edf42e
JL
8115 (build-system ant-build-system)
8116 (arguments
8117 `(#:jar-name "java-aqute-bnd-annotation.jar"
8118 #:source-dir "biz.aQute.bnd.annotation/src"
8119 #:tests? #f)); empty test dir
27c0eade 8120 (home-page "https://bnd.bndtools.org/")
e1edf42e
JL
8121 (synopsis "Tools for OSGi")
8122 (description "Bnd is a swiss army knife for OSGi, it creates manifest
8123headers based on analyzing the class code, it verifies the project settings,
8124it manages project dependencies, gives diffs jars, and much more.")
8125 (license license:asl2.0)))
60ba2978
JL
8126
8127(define-public java-aqute-libg
8128 (package
8129 (inherit java-aqute-bnd-annotation)
8130 (name "java-aqute-libg")
8131 (arguments
8132 `(#:jar-name "java-aqute-libg.jar"
78754995
GB
8133 ;; The build fails when source/target more recent than 1.7. This
8134 ;; is a known issue. See: https://github.com/bndtools/bnd/issues/1327
8135 ;;
8136 ;; It is closed as won't fix. There is no way to change the source
8137 ;; so that it works on 1.8, and still works on 1.6, the upstream
8138 ;; target. It work fine on 1.7, so we use 1.7.
8139 #:make-flags (list "-Dant.build.javac.source=1.7"
8140 "-Dant.build.javac.target=1.7")
2ab089b7
GB
8141 #:phases
8142 (modify-phases %standard-phases
8143 (add-before 'configure 'chdir
8144 ;; Change to aQute.libg directory, so that the relative
8145 ;; paths in the tests aren't broken.
8146 (lambda _
8147 (chdir "aQute.libg")
8148 #t))
8149 (add-before 'check 'create-test-directory
8150 ;; Copy the test directory to test/java, since that's where
8151 ;; ant-build-system's default project in build.xml expects to find
8152 ;; the test classes. Leave a copy in the original place to not
8153 ;; break paths in tests.
8154 (lambda _
8155 (mkdir "src/test")
8156 (copy-recursively "test" "src/test/java")
8157 #t)))))
60ba2978
JL
8158 (inputs
8159 `(("slf4j" ,java-slf4j-api)
8160 ("osgi-annot" ,java-osgi-annotation)
8161 ("java-osgi-cmpn" ,java-osgi-cmpn)
2ab089b7
GB
8162 ("osgi" ,java-osgi-core)))
8163 (native-inputs
8164 `(("hamcrest" ,java-hamcrest-core)
8165 ("java-junit" ,java-junit)))))
5f26a131 8166
288a5959
GB
8167(define java-aqute-libg-bootstrap
8168 (package
8169 (inherit java-aqute-libg)
8170 (name "java-aqute-libg-bootstrap")
aca7dcdd
GB
8171 (arguments
8172 ;; Disable tests, at this stage of bootstrap we have no test frameworks.
3785ccd2
GB
8173 (substitute-keyword-arguments (package-arguments java-aqute-libg)
8174 ((#:tests? _ #f) #f)))
288a5959
GB
8175 (inputs
8176 `(("slf4j-bootstrap" ,java-slf4j-api-bootstrap)
8177 ,@(delete `("slf4j" ,java-slf4j-api)
aca7dcdd
GB
8178 (package-inputs java-aqute-libg))))
8179 (native-inputs '())))
288a5959 8180
5f26a131
JL
8181(define-public java-aqute-bndlib
8182 (package
8183 (inherit java-aqute-bnd-annotation)
8184 (name "java-aqute-bndlib")
8185 (arguments
8186 `(#:jar-name "java-bndlib.jar"
8187 #:source-dir "biz.aQute.bndlib/src"
8188 #:tests? #f)); no tests
8189 (inputs
8190 `(("slf4j" ,java-slf4j-api)
8191 ("osgi-annot" ,java-osgi-annotation)
8192 ("java-aqute-libg" ,java-aqute-libg)
8193 ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation)
8194 ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations)
8195 ("java-osgi-service-repository" ,java-osgi-service-repository)
8196 ("java-osgi-service-log" ,java-osgi-service-log)
8197 ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations)
8198 ("java-osgi-namespace-contract" ,java-osgi-namespace-contract)
8199 ("java-osgi-namespace-extender" ,java-osgi-namespace-extender)
8200 ("java-osgi-namespace-service" ,java-osgi-namespace-service)
8201 ("promise" ,java-osgi-util-promise)
8202 ("osgi" ,java-osgi-core)))))
25aef81d 8203
869803aa
GB
8204(define java-aqute-bndlib-bootstrap
8205 (package
8206 (inherit java-aqute-bndlib)
8207 (name "java-aqute-bndlib-bootstrap")
8208 (inputs
8209 `(("slf4j-bootstrap" ,java-slf4j-api-bootstrap)
8210 ("java-aqute-libg-bootstrap" ,java-aqute-libg-bootstrap)
8211 ,@(delete `("slf4j" ,java-slf4j-api)
8212 (delete `("java-aqute-libg" ,java-aqute-libg)
8213 (package-inputs java-aqute-bndlib)))))))
8214
25aef81d
JL
8215(define-public java-ops4j-pax-tinybundles
8216 (package
8217 (name "java-ops4j-pax-tinybundles")
8218 (version "2.1.1")
8219 (source (origin
8220 (method url-fetch)
8221 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/"
8222 "archive/tinybundles-" version ".tar.gz"))
8223 (sha256
8224 (base32
8225 "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871"))))
8226 (arguments
8227 `(#:jar-name "java-ops4j-pax-tinybundles.jar"
8228 #:source-dir "src/main/java"
8229 #:test-exclude
8230 ;; Abstract base classes for other tests
8231 (list "**/BndTest.java" "**/CoreTest.java")
8232 #:phases
8233 (modify-phases %standard-phases
8234 (add-before 'check 'fix-version
8235 (lambda _
8236 ;; This test has a reference to an old version of bndlib we are not
8237 ;; packaging. It uses the version referenced in pom.xml. We replace
8238 ;; it with our own version.
8239 (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
0f277802 8240 (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*")
2c8ac364
MW
8241 ,(package-version java-aqute-bndlib)))
8242 #t)))))
25aef81d
JL
8243 (inputs
8244 `(("lang" ,java-ops4j-base-lang)
8245 ("io" ,java-ops4j-base-io)
8246 ("store" ,java-ops4j-base-store)
8247 ("slf4j" ,java-slf4j-api)
8248 ("libg" ,java-aqute-libg)
8249 ("bndlib" ,java-aqute-bndlib)))
8250 (native-inputs
8251 `(("junit" ,java-junit)
8252 ("hamcrest" ,java-hamcrest-core)
8253 ("log4j" ,java-log4j-api)
8254 ("bndannotation" ,java-aqute-bnd-annotation)
8255 ("framework" ,java-osgi-framework)))
8256 (build-system ant-build-system)
8257 (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles")
8258 (synopsis "Java APIs to create OSGi related artifacts")
8259 (description "Tinybundles is all about creating OSGi related artifacts like
6fa0914a 8260Bundles, Fragments and Deployment Packages with Java Api. It is very convenient
25aef81d
JL
8261to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the
8262other hand, this library can be a foundation of real end user tools that need
8263to create those artifacts.")
8264 (license license:asl2.0)))
e179add0
JL
8265
8266(define-public java-ops4j-pax-exam-core
8267 (package
8268 (name "java-ops4j-pax-exam-core")
8269 (version "4.11.0")
8270 (source (origin
8271 (method url-fetch)
8272 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/"
8273 "archive/exam-reactor-" version ".tar.gz"))
8274 (sha256
8275 (base32
8276 "08mzw8nkah3rj3vznlplnawspxhp61zgvb44ifqa1rni1cvbms2g"))))
8277 (arguments
8278 `(#:jar-name "java-ops4j-pax-exam-core.jar"
8279 #:source-dir "core/pax-exam/src/main/java"
8280 #:test-dir "core/pax-exam/src/test"))
8281 (inputs
8282 `(("slf4j" ,java-slf4j-api)
8283 ("lang" ,java-ops4j-base-lang)
8284 ("io" ,java-ops4j-base-io)
8285 ("util-property" ,java-ops4j-base-util-property)
8286 ("util-store" ,java-ops4j-base-store)
8287 ("java-osgi-core" ,java-osgi-core)))
8288 (native-inputs
8289 `(("junit" ,java-junit)
8290 ("hamcrest" ,java-hamcrest-core)))
8291 (build-system ant-build-system)
8292 (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview")
8293 (synopsis "In-Container Testing for OSGi, Java EE and CDI")
8294 (description "Pax Exam creates OSGi bundles for testing purposes. It lets
8295the user take control of the OSGi framework, the test framework (e.g. JUnit) and
8296the system under test at the same time.")
8297 (license license:asl2.0)))
7a7c2b75
JL
8298
8299(define-public java-ops4j-pax-exam-core-spi
8300 (package
8301 (inherit java-ops4j-pax-exam-core)
8302 (name "java-ops4j-pax-exam-core-spi")
8303 (arguments
8304 `(#:jar-name "java-ops4j-pax-exam-spi.jar"
8305 #:source-dir "src/main/java"
8306 #:test-exclude
8307 (list
8308 ;; Abstract base class, not a test
8309 "**/BaseStagedReactorTest.java"
8310 ;; Depends on org.mortbay.jetty.testwars:test-war-dump
8311 "**/WarBuilderTest.java")
8312 #:phases
8313 (modify-phases %standard-phases
8314 (add-before 'configure 'chdir
8315 (lambda _
8316 ;; Tests assume we are in this directory
2c8ac364
MW
8317 (chdir "core/pax-exam-spi")
8318 #t))
7a7c2b75
JL
8319 (add-before 'check 'fix-tests
8320 (lambda _
8321 ;; One test checks that this file is present.
8322 (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi")
8323 (with-output-to-file
8324 "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties"
8325 (lambda _
8326 (display
8327 (string-append "artifactId = pax-exam-spi\n"
8328 "version = " ,(package-version java-ops4j-pax-exam-core-spi)))))
8329 ;; Maven puts compilation results in the target directory, while we
8330 ;; put them in the build directory.
8331 (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java"
8332 "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java"
8333 "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java")
8334 (("target") "build"))
8335 ;; One test is expected to fail, but it doesn't throw the expected exception
8336 (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java"
2c8ac364
MW
8337 (("AssertionError") "IllegalArgumentException"))
8338 #t)))))
7a7c2b75
JL
8339 (inputs
8340 `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core)
8341 ("lang" ,java-ops4j-base-lang)
8342 ("monitors" ,java-ops4j-base-monitors)
8343 ("store" ,java-ops4j-base-store)
8344 ("io" ,java-ops4j-base-io)
8345 ("spi" ,java-ops4j-base-spi)
8346 ("osgi" ,java-osgi-core)
8347 ("slf4j" ,java-slf4j-api)
8348 ("tinybundles" ,java-ops4j-pax-tinybundles)))
8349 (native-inputs
8350 `(("mockito" ,java-mockito-1)
8351 ("junit" ,java-junit)
8352 ("hamcrest" ,java-hamcrest-core)
8353 ("cglib" ,java-cglib)
8354 ("objenesis" ,java-objenesis)
8355 ("asm" ,java-asm)))))
4496d77f
JL
8356
8357(define-public java-ops4j-pax-exam-core-junit
8358 (package
8359 (inherit java-ops4j-pax-exam-core)
8360 (name "java-ops4j-pax-exam-core-junit")
8361 (arguments
8362 `(#:jar-name "ops4j-pax-exam-core-junit.jar"
8363 #:source-dir "drivers/pax-exam-junit4/src/main/java"
8364 #:tests? #f)); no tests
8365 (inputs
8366 `(("junit" ,java-junit)
8367 ("slf4j" ,java-slf4j-api)
8368 ("core" ,java-ops4j-pax-exam-core)
8369 ("spi" ,java-ops4j-pax-exam-core-spi)))
8370 (native-inputs '())))
cb05f60d
JL
8371
8372(define-public java-fasterxml-jackson-annotations
8373 (package
8374 (name "java-fasterxml-jackson-annotations")
93dceea4 8375 (version "2.9.4")
cb05f60d
JL
8376 (source (origin
8377 (method url-fetch)
8378 (uri (string-append "https://github.com/FasterXML/"
8379 "jackson-annotations/archive/"
8380 "jackson-annotations-" version ".tar.gz"))
8381 (sha256
8382 (base32
93dceea4 8383 "0mr95xd0da6a4g95zvrl1ryk5n5zv2rc696w3xnsr5hxk2gicfc4"))))
cb05f60d
JL
8384 (build-system ant-build-system)
8385 (arguments
8386 `(#:jar-name "jackson-annotations.jar"
8387 #:source-dir "src/main/java"
8388 #:test-dir "src/test"))
8389 (native-inputs
8390 `(("junit" ,java-junit)))
8391 (home-page "https://github.com/FasterXML/jackson-annotations")
8392 (synopsis "General purpose annotations for the Jackson Data Processor")
8393 (description "This package contains general purpose annotations for the
8394Jackson Data Processor, used on value and handler types. The only annotations
8395not included are ones that require dependency to the Databind package.")
8396 (license license:asl2.0)))
0b5481df
JL
8397
8398(define-public java-fasterxml-jackson-core
8399 (package
8400 (name "java-fasterxml-jackson-core")
38a0fc38 8401 (version "2.9.4")
0b5481df
JL
8402 (source (origin
8403 (method url-fetch)
8404 (uri (string-append "https://github.com/FasterXML/"
8405 "jackson-core/archive/"
8406 "jackson-core-" version ".tar.gz"))
8407 (sha256
8408 (base32
38a0fc38 8409 "159hsnk17jr1gyzkf01cxvsn45srnk37g949r7364qlsr527gjgd"))))
0b5481df
JL
8410 (build-system ant-build-system)
8411 (arguments
8412 `(#:jar-name "jackson-core.jar"
8413 #:source-dir "src/main/java"
8414 #:test-dir "src/test"
8415 #:test-exclude
8416 (list
8417 ;; Expected failure. pom.xml excludes these
8418 "**/failing/**"
8419 ;; Base classes that have no constructor for junit
8420 "**/BaseTest.java"
8421 "**/ConcurrencyReadTest.java"
8422 "**/ManualCharAccessTest.java"
8423 "**/ManualCharAccessTest.java"
8424 "**/TrailingCommasTest.java"
8425 "**/AsyncMissingValuesInObjectTest.java"
8426 "**/AsyncMissingValuesInArrayTest.java")
8427 #:phases
8428 (modify-phases %standard-phases
8429 (add-before 'configure 'generate-PackageVersion.java
8430 (lambda _
8431 (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java")
8432 (in (string-append out ".in")))
8433 (copy-file in out)
8434 (substitute* out
8435 (("@package@") "com.fasterxml.jackson.core.json")
8436 (("@projectversion@") ,version)
8437 (("@projectgroupid@") "com.fasterxml.jackson.core")
2c8ac364
MW
8438 (("@projectartifactid@") "jackson-core")))
8439 #t))
0b5481df
JL
8440 (add-before 'build 'copy-resources
8441 (lambda _
8442 (copy-recursively "src/main/resources"
2c8ac364
MW
8443 "build/classes")
8444 #t))
0b5481df
JL
8445 (add-before 'check 'copy-test-resources
8446 (lambda _
8447 (copy-recursively "src/test/resources"
2c8ac364
MW
8448 "build/test-classes")
8449 #t)))))
0b5481df
JL
8450 (native-inputs
8451 `(("junit" ,java-junit)
8452 ("hamcrest" ,java-hamcrest-core)))
8453 (home-page "https://github.com/FasterXML/jackson-core")
8454 (synopsis "")
8455 (description "")
8456 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
f234c7a0
JL
8457
8458(define-public java-fasterxml-jackson-databind
8459 (package
8460 (name "java-fasterxml-jackson-databind")
3c1edff5 8461 (version "2.9.4")
f234c7a0
JL
8462 (source (origin
8463 (method url-fetch)
8464 (uri (string-append "https://github.com/FasterXML/"
8465 "jackson-databind/archive/"
8466 "jackson-databind-" version ".tar.gz"))
8467 (sha256
8468 (base32
3c1edff5 8469 "1zd2cw4z6kdkbx8za96xh9pyicv2a2l7y0rkcx2fqd8hv6d47s08"))))
f234c7a0
JL
8470 (build-system ant-build-system)
8471 (arguments
8472 `(#:jar-name "jackson-databind.jar"
8473 #:source-dir "src/main/java"
8474 #:tests? #f; requires javax.measures for which I can't find a free implementation
8475 #:phases
8476 (modify-phases %standard-phases
8477 (add-before 'configure 'generate-PackageVersion.java
8478 (lambda _
8479 (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java")
8480 (in (string-append out ".in")))
8481 (copy-file in out)
8482 (substitute* out
8483 (("@package@") "com.fasterxml.jackson.databind.cfg")
8484 (("@projectversion@") ,version)
8485 (("@projectgroupid@") "com.fasterxml.jackson.databind")
2c8ac364
MW
8486 (("@projectartifactid@") "jackson-databind")))
8487 #t))
f234c7a0
JL
8488 (add-before 'build 'copy-resources
8489 (lambda _
2c8ac364
MW
8490 (copy-recursively "src/main/resources" "build/classes")
8491 #t)))))
f234c7a0
JL
8492 (inputs
8493 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
8494 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)))
8495 (home-page "https://github.com/FasterXML/jackson-databind")
8496 (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor")
8497 (description "This package contains the general-purpose data-binding
8498functionality and tree-model for Jackson Data Processor. It builds on core
8499streaming parser/generator package, and uses Jackson Annotations for
8500configuration.")
8501 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
d57d8b89
JL
8502
8503(define-public java-fasterxml-jackson-modules-base-jaxb
8504 (package
8505 (name "java-fasterxml-jackson-modules-base-jaxb")
07207211 8506 (version "2.9.4")
d57d8b89
JL
8507 (source (origin
8508 (method url-fetch)
8509 (uri (string-append "https://github.com/FasterXML/"
8510 "jackson-modules-base/archive/"
8511 "jackson-modules-base-" version ".tar.gz"))
8512 (sha256
8513 (base32
07207211 8514 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
d57d8b89
JL
8515 (build-system ant-build-system)
8516 (arguments
8517 `(#:jar-name "jackson-modules-base-jaxb.jar"
8518 #:source-dir "jaxb/src/main/java"
8519 #:test-dir "jaxb/src/test"
8520 #:test-exclude
8521 ;; Base class for tests
8522 (list "**/BaseJaxbTest.java")
8523 #:phases
8524 (modify-phases %standard-phases
8525 (add-before 'configure 'generate-PackageVersion.java
8526 (lambda _
8527 (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/"
8528 "jackson/module/jaxb/PackageVersion.java"))
8529 (in (string-append out ".in")))
8530 (copy-file in out)
8531 (substitute* out
8532 (("@package@") "com.fasterxml.jackson.module.jaxb")
8533 (("@projectversion@") ,version)
8534 (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb")
2c8ac364
MW
8535 (("@projectartifactid@") "jackson-module-jaxb")))
8536 #t))
d57d8b89
JL
8537 (add-before 'build 'copy-resources
8538 (lambda _
2c8ac364
MW
8539 (copy-recursively "jaxb/src/main/resources" "build/classes")
8540 #t)))))
d57d8b89
JL
8541 (inputs
8542 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
8543 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
8544 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
8545 (native-inputs
8546 `(("java-junit" ,java-junit)))
8547 (home-page "https://github.com/FasterXML/jackson-modules-base")
8548 (synopsis "Jaxb annotations jackson module")
8549 (description "This package is the jaxb annotations module for jackson.")
8550 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
0f296d37 8551
5165fb40
DM
8552(define-public java-fasterxml-jackson-modules-base-mrbean
8553 (package
8554 (name "java-fasterxml-jackson-modules-base-mrbean")
8555 (version "2.9.4")
8556 (source (origin
8557 (method url-fetch)
8558 (uri (string-append "https://github.com/FasterXML/"
8559 "jackson-modules-base/archive/"
8560 "jackson-modules-base-" version ".tar.gz"))
8561 (sha256
8562 (base32
8563 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
8564 (build-system ant-build-system)
8565 (arguments
8566 `(#:jar-name "jackson-modules-base-mrbean.jar"
8567 #:source-dir "mrbean/src/main/java"
8568 #:test-dir "mrbean/src/test"
8569 #:test-exclude
8570 ;; Base class for tests
8571 (list "**/BaseTest.java")
8572 #:phases
8573 (modify-phases %standard-phases
8574 (add-before 'configure 'generate-PackageVersion.java
8575 (lambda _
8576 (let* ((out (string-append "mrbean/src/main/java/com/fasterxml/"
8577 "jackson/module/mrbean/PackageVersion.java"))
8578 (in (string-append out ".in")))
8579 (copy-file in out)
8580 (substitute* out
8581 (("@package@") "com.fasterxml.jackson.module.mrbean")
8582 (("@projectversion@") ,version)
8583 (("@projectgroupid@") "com.fasterxml.jackson.module.mrbean")
8584 (("@projectartifactid@") "jackson-module-mrbean")))
8585 #t)))))
8586 (inputs
8587 `(("java-asm" ,java-asm)
8588 ("java-fasterxml-jackson-annotations"
8589 ,java-fasterxml-jackson-annotations)
8590 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
8591 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
8592 (native-inputs
8593 `(("java-junit" ,java-junit)))
8594 (home-page "https://github.com/FasterXML/jackson-modules-base")
8595 (synopsis "POJO type materialization for Java")
8596 (description "This package implements POJO type materialization.
8597Databinders can construct implementation classes for Java interfaces as part
8598of deserialization.")
8599 (license license:asl2.0)))
8600
0f296d37
JL
8601(define-public java-snakeyaml
8602 (package
8603 (name "java-snakeyaml")
8604 (version "1.18")
8605 (source (origin
8606 (method url-fetch)
8607 (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
8608 version ".tar.gz"))
307856cd 8609 (file-name (string-append name "-" version ".tar.gz"))
0f296d37
JL
8610 (sha256
8611 (base32
b19f155c 8612 "0474cqcv46zgv9bhms2vgawakq1vyj0hp3h3f1bfys46msia90bh"))))
0f296d37
JL
8613 (build-system ant-build-system)
8614 (arguments
8615 `(#:jar-name "java-snakeyaml.jar"
8616 #:source-dir "src/main/java"
8617 ;; Tests require velocity, a cyclic dependency, and
8618 ;; java-spring-framework-context which is not packaged.
8619 #:tests? #f))
8620 (home-page "https://bitbucket.org/asomov/snakeyaml")
8621 (synopsis "YAML processor")
8622 (description "SnakeYAML is a YAML processor for the Java Virtual Machine.")
8623 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
087c8fd2
JL
8624
8625(define-public java-fasterxml-jackson-dataformat-yaml
8626 (package
8627 (name "java-fasterxml-jackson-dataformat-yaml")
1f2be88f 8628 (version "2.9.4")
087c8fd2
JL
8629 (source (origin
8630 (method url-fetch)
8631 (uri (string-append "https://github.com/FasterXML/"
8632 "jackson-dataformats-text/archive/"
8633 "jackson-dataformats-text-" version ".tar.gz"))
8634 (sha256
8635 (base32
1f2be88f 8636 "1hikl06khaxbg439avf442qifcadap8w0lx13f0nnhp2vh3dkbz7"))))
087c8fd2
JL
8637 (build-system ant-build-system)
8638 (arguments
8639 `(#:jar-name "jackson-dataformat-yaml.jar"
8640 #:source-dir "yaml/src/main/java"
8641 #:test-dir "yaml/src/test"
8642 #:test-exclude (list "**/failing/**.java")
8643 #:phases
8644 (modify-phases %standard-phases
8645 (add-before 'configure 'generate-PackageVersion.java
8646 (lambda _
8647 (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java")
8648 (in (string-append out ".in")))
8649 (copy-file in out)
8650 (substitute* out
8651 (("@package@") "com.fasterxml.jackson.dataformat.yaml")
8652 (("@projectversion@") ,version)
8653 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml")
2c8ac364
MW
8654 (("@projectartifactid@") "jackson-dataformat-yaml")))
8655 #t)))))
087c8fd2
JL
8656 (inputs
8657 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
8658 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
8659 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
8660 ("java-snakeyaml" ,java-snakeyaml)))
8661 (native-inputs
8662 `(("junit" ,java-junit)
8663 ("hamcrest" ,java-hamcrest-core)
8664 ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi)
8665 ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit)
8666 ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core)))
8667 (home-page "https://github.com/FasterXML/jackson-dataformats-text")
8668 (synopsis "Yaml backend for Jackson")
8669 (description "Dataformat backends are used to support format alternatives
8670to JSON, supported by default. This is done by sub-classing Jackson core
8671abstractions.")
8672 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
6fd07b98
JL
8673
8674(define-public java-stax2-api
8675 (package
8676 (name "java-stax2-api")
8677 (version "4.0.0")
8678 (source (origin
8679 (method url-fetch)
8680 (uri (string-append "https://github.com/FasterXML/stax2-api/archive/"
8681 "stax2-api-" version ".tar.gz"))
8682 (sha256
8683 (base32
8684 "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq"))))
8685 (build-system ant-build-system)
8686 (arguments
8687 `(#:jar-name "java-stax2-api.jar"
8688 #:source-dir "src/main/java"
8689 #:tests? #f)); no tests
8690 (home-page "https://github.com/FasterXML/stax2-api")
8691 (synopsis "Stax2 API")
8692 (description "Stax2 API is an extension to basic Stax 1.0 API that adds
8693significant new functionalities, such as full-featured bi-direction validation
8694interface and high-performance Typed Access API.")
8695 (license license:bsd-2)))
40f193f3
JL
8696
8697(define-public java-woodstox-core
8698 (package
8699 (name "java-woodstox-core")
8700 (version "5.0.3")
8701 (source (origin
8702 (method url-fetch)
8703 (uri (string-append "https://github.com/FasterXML/woodstox/archive/"
8704 "woodstox-core-" version ".tar.gz"))
8705 (sha256
8706 (base32
8707 "1i7pdgb8jbw6gdy5kmm0l6rz109n2ns92pqalpyp24vb8vlvdfd4"))))
8708 (build-system ant-build-system)
8709 (arguments
8710 `(#:jar-name "woodstox.jar"
8711 #:test-exclude
8712 (list "**/Base*.java" "failing/**")
8713 #:phases
8714 (modify-phases %standard-phases
8715 (add-before 'build 'remove-msv-dep
8716 (lambda _
8717 ;; we don't need osgi, and it depends on msv
8718 (delete-file-recursively "src/main/java/com/ctc/wstx/osgi")
8719 ;; msv's latest release is from 2011 and we don't need it
8720 (delete-file-recursively "src/main/java/com/ctc/wstx/msv")
8721 (delete-file-recursively "src/test/java/wstxtest/osgi")
2c8ac364
MW
8722 (delete-file-recursively "src/test/java/wstxtest/msv")
8723 #t))
40f193f3
JL
8724 (add-before 'build 'copy-resources
8725 (lambda _
2c8ac364
MW
8726 (copy-recursively "src/main/resources" "build/classes")
8727 #t)))))
40f193f3
JL
8728 (inputs
8729 `(("stax2" ,java-stax2-api)))
8730 (native-inputs
8731 `(("junit" ,java-junit)))
8732 (home-page "https://github.com/FasterXML/woodstox")
8733 (synopsis "Stax XML API implementation")
8734 (description "Woodstox is a stax XML API implementation.")
8735 (license license:asl2.0)))
262a4d33
JL
8736
8737(define-public java-fasterxml-jackson-dataformat-xml
8738 (package
8739 (name "java-fasterxml-jackson-dataformat-xml")
f3bbe029 8740 (version "2.9.4")
262a4d33
JL
8741 (source (origin
8742 (method url-fetch)
8743 (uri (string-append "https://github.com/FasterXML/"
8744 "jackson-dataformat-xml/archive/"
8745 "jackson-dataformat-xml-" version ".tar.gz"))
8746 (sha256
8747 (base32
f3bbe029 8748 "111fkkl90w31jbf30kgj82qdcxlw4sxppki7i198liw0ck1jcavq"))))
262a4d33
JL
8749 (build-system ant-build-system)
8750 (arguments
8751 `(#:jar-name "jackson-dataformat-xml.jar"
8752 #:source-dir "src/main/java"
8753 #:test-exclude
8754 (list "**/failing/**")
8755 #:phases
8756 (modify-phases %standard-phases
8757 (add-before 'configure 'generate-PackageVersion.java
8758 (lambda _
8759 (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java")
8760 (in (string-append out ".in")))
8761 (copy-file in out)
8762 (newline)
8763 (substitute* out
8764 (("@package@") "com.fasterxml.jackson.dataformat.xml")
8765 (("@projectversion@") ,version)
8766 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml")
2c8ac364
MW
8767 (("@projectartifactid@") "jackson-dataformat-xml")))
8768 #t))
262a4d33
JL
8769 (add-before 'build 'copy-resources
8770 (lambda _
2c8ac364
MW
8771 (copy-recursively "src/main/resources" "build/classes")
8772 #t)))))
262a4d33
JL
8773 (inputs
8774 `(("jackson-annotations" ,java-fasterxml-jackson-annotations)
8775 ("jackson-core" ,java-fasterxml-jackson-core)
8776 ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb)
8777 ("jackson-databind" ,java-fasterxml-jackson-databind)
8778 ("stax2-api" ,java-stax2-api)
8779 ("woodstox" ,java-woodstox-core)))
8780 (native-inputs
8781 `(("junit" ,java-junit)
8782 ("hamcrest" ,java-hamcrest-core)))
8783 (home-page "https://github.com/FasterXML/jackson-dataformat-xml")
8784 (synopsis "Read and write XML")
8785 (description "This package contains Jackson extension component for reading
8786and writing XML encoded data.
8787
8788Further, the goal is to emulate how JAXB data-binding works with \"Code-first\"
8789approach (that is, no support is added for \"Schema-first\" approach). Support
8790for JAXB annotations is provided by JAXB annotation module; this module
8791provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator},
8792@code{JsonFactory}) as well as small number of higher level overrides needed to
8793make data-binding work.")
8794 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
90a127c7
JL
8795
8796(define-public java-hdrhistogram
8797 (package
8798 (name "java-hdrhistogram")
8799 (version "2.1.9")
8800 (source (origin
8801 (method url-fetch)
8802 (uri (string-append "https://github.com/HdrHistogram/HdrHistogram/"
8803 "archive/HdrHistogram-" version ".tar.gz"))
8804 (sha256
8805 (base32
8806 "1sicbmc3sr42nw93qbkb26q9rn33ag33k6k77phjc3j5h5gjffqv"))))
8807 (build-system ant-build-system)
8808 (arguments
8809 `(#:jar-name "java-hdrhistogram.jar"
8810 #:source-dir "src/main/java"
8811 #:phases
8812 (modify-phases %standard-phases
8813 (add-before 'configure 'set-version
8814 (lambda _
8815 (let* ((version-java "src/main/java/org/HdrHistogram/Version.java")
8816 (template (string-append version-java ".template")))
8817 (copy-file template version-java)
8818 (substitute* version-java
8819 (("\\$VERSION\\$") ,version)
8820 (("\\$BUILD_TIME\\$") "0"))
8821 #t))))))
8822 (native-inputs
8823 `(("junit" ,java-junit)
8824 ("hamcrest" ,java-hamcrest-core)))
8825 (home-page "https://hdrhistogram.github.io/HdrHistogram")
8826 (synopsis "High dynamic range histogram")
61fa3c67 8827 (description "Hdrhistogram creates histograms that support
90a127c7
JL
8828recording and analyzing sampled data value counts across a configurable integer
8829value range with configurable value precision within the range. Value precision
8830is expressed as the number of significant digits in the value recording, and
8831provides control over value quantization behavior across the value range and
8832the subsequent value resolution at any given level.")
8833 (license license:public-domain)))
5d104a27 8834
c5ff11dc
RW
8835(define-public java-cofoja
8836 (package
8837 (name "java-cofoja")
8838 (version "1.3")
8839 (source (origin
8840 (method git-fetch)
8841 (uri (git-reference
8842 (url "https://github.com/nhatminhle/cofoja.git")
8843 (commit (string-append "v" version))))
8844 (file-name (string-append "java-cofoja-" version "-checkout"))
8845 (sha256
8846 (base32
8847 "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w"))))
8848 (build-system ant-build-system)
8849 (arguments
8850 `(#:build-target "dist"
8851 #:test-target "test"
8852 #:jdk ,icedtea-8
8853 #:make-flags
8854 (list "-Ddist.dir=dist")
8855 #:modules ((guix build ant-build-system)
8856 (guix build java-utils)
8857 (guix build utils)
8858 (srfi srfi-1)
8859 (ice-9 match))
8860 #:phases
8861 (modify-phases %standard-phases
8862 ;; The bulid system ignores the class path the ant-build-system sets
8863 ;; up and instead expects to find all dependencies in the "lib"
8864 ;; directory.
8865 (add-after 'unpack 'create-libdir
8866 (lambda* (#:key inputs #:allow-other-keys)
8867 (mkdir-p "lib")
8868 (for-each
8869 (lambda (file)
8870 (let ((target (string-append "lib/" (basename file))))
8871 (unless (file-exists? target)
8872 (symlink file target))))
8873 (append-map (match-lambda
8874 ((label . dir)
8875 (find-files dir "\\.jar$")))
8876 inputs))
8877 #t))
8878 (replace 'install (install-jars "dist")))))
8879 (inputs
8880 `(("java-asm" ,java-asm)))
8881 (native-inputs
8882 `(("java-junit" ,java-junit)))
8883 (home-page "https://github.com/nhatminhle/cofoja")
8884 (synopsis "Contracts for Java")
8885 (description "Contracts for Java, or Cofoja for short, is a contract
8886programming framework and test tool for Java, which uses annotation processing
8887and bytecode instrumentation to provide run-time checking. (In particular,
8888this is not a static analysis tool.)")
8889 (license license:lgpl3+)))
8890
5d104a27
JL
8891(define-public java-aopalliance
8892 (package
8893 (name "java-aopalliance")
8894 (version "1.0")
8895 (source (origin
8896 (method git-fetch)
8897 ;; Note: this git repository is not official, but contains the
8898 ;; source code that is in the CVS repository. Downloading the
8899 ;; tarball from sourceforge is undeterministic, and the cvs download
8900 ;; fails.
8901 (uri (git-reference
8902 (url "https://github.com/hoverruan/aopalliance")
8903 (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0")))
8904 (file-name (string-append name "-" version))
8905 (sha256
8906 (base32
8907 "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr"))))
8908 (build-system ant-build-system)
8909 (arguments
8910 `(#:jar-name "java-aopalliance.jar"
8911 #:jdk ,icedtea-8
8912 #:tests? #f; no tests
8913 #:source-dir "aopalliance/src/main"))
8914 (home-page "http://aopalliance.sourceforge.net")
8915 (synopsis "Aspect-Oriented Programming")
8916 (description "The AOP Alliance project is a joint project between several
8917software engineering people who are interested in Aspect-Oriented Programming
8918(AOP) and Java.")
8919 (license license:public-domain)))
454536e0
JL
8920
8921(define-public java-javax-inject
8922 (package
8923 (name "java-javax-inject")
8924 (version "tck-1")
8925 (source (origin
8926 (method url-fetch)
8927 (uri (string-append "https://github.com/javax-inject/javax-inject/"
8928 "archive/javax.inject-" version ".tar.gz"))
8929 (sha256
8930 (base32
8931 "1ydrlvh2r7vr1g7lhjwy3w2dggpj9h6pix1lakkkgdywb365n6g0"))))
8932 (build-system ant-build-system)
8933 (arguments
8934 `(#:jar-name "java-javax-inject.jar"
8935 #:jdk ,icedtea-8
8936 #:tests? #f)); no tests
8937 (home-page "http://github.com/javax-inject/javax-inject")
8938 (synopsis "JSR-330: Dependency Injection for Java")
8939 (description "This package specifies a means for obtaining objects in such
8940a way as to maximize reusability, testability and maintainability compared to
8941traditional approaches such as constructors, factories, and service locators
8942(e.g., JNDI). This process, known as dependency injection, is beneficial to
8943most nontrivial applications.
8944
8945Many types depend on other types. For example, a @var{Stopwatch} might depend
8946on a @var{TimeSource}. The types on which a type depends are known as its
8947dependencies. The process of finding an instance of a dependency to use at run
8948time is known as resolving the dependency. If no such instance can be found,
8949the dependency is said to be unsatisfied, and the application is broken.")
8950 (license license:asl2.0)))
5766984b
JL
8951
8952(define-public java-guice
8953 (package
8954 (name "java-guice")
8955 (version "4.1")
8956 (source (origin
8957 (method url-fetch)
8958 (uri (string-append "https://github.com/google/guice/archive/"
8959 version ".tar.gz"))
8960 (file-name (string-append name "-" version ".tar.gz"))
9936ffe7
BH
8961 (modules '((guix build utils)))
8962 (snippet
8963 `(begin
8964 (for-each delete-file (find-files "." ".*.jar"))))
5766984b
JL
8965 (sha256
8966 (base32
8967 "0dwmqjzlavb144ywqqglj3h68hqszkff8ai0a42hyb5il0qh4rbp"))))
8968 (build-system ant-build-system)
8969 (arguments
8970 `(#:jar-name "java-guice.jar"
8971 #:jdk ,icedtea-8
8972 #:tests? #f; FIXME: tests are not in a java sub directory
8973 #:source-dir "core/src"))
8974 (inputs
8975 `(("guava" ,java-guava)
8976 ("java-cglib" ,java-cglib)
8977 ("java-aopalliance" ,java-aopalliance)
8978 ("java-javax-inject" ,java-javax-inject)
8979 ("java-asm" ,java-asm)))
8980 (home-page "https://github.com/google/guice")
8981 (synopsis "Lightweight dependency injection framework")
8982 (description "Guice is a lightweight dependency injection framework fo
8983Java 6 and above.")
8984 (license license:asl2.0)))
ec4e8ad7
JL
8985
8986(define-public java-guice-servlet
8987 (package
8988 (inherit java-guice)
8989 (name "java-guice-servlet")
8990 (arguments
8991 `(#:jar-name "guice-servlet.jar"
8992 #:source-dir "extensions/servlet/src/"
8993 #:jdk ,icedtea-8
8994 #:tests? #f)); FIXME: not in a java subdir
8995 (inputs
8996 `(("guice" ,java-guice)
10eddaca 8997 ("servlet" ,java-classpathx-servletapi)
ec4e8ad7 8998 ,@(package-inputs java-guice)))))
b12fe1e5
JL
8999
9000(define-public java-assertj
9001 (package
9002 (name "java-assertj")
9003 (version "3.8.0")
9004 (source (origin
9005 (method url-fetch)
9006 (uri (string-append "https://github.com/joel-costigliola/"
9007 "assertj-core/archive/"
9008 "assertj-core-" version ".tar.gz"))
9009 (sha256
9010 (base32
9011 "1kf124fxskf548rklkg86294w2x6ajqrff94rrhyqns31danqkfz"))))
9012 (build-system ant-build-system)
9013 (arguments
9014 `(#:jar-name "java-assertj.jar"
9015 #:jdk ,icedtea-8
9016 #:source-dir "src/main/java"
9017 #:tests? #f)); depends on tng-junit which depends on assertj
9018 (inputs
9019 `(("cglib" ,java-cglib)
9020 ("junit" ,java-junit)
9021 ("hamcrest" ,java-hamcrest-core)))
9022 (native-inputs
9023 `(("mockito" ,java-mockito-1)))
9024 (home-page "https://joel-costigliola.github.io/assertj/index.html")
9025 (synopsis "Fluent assertions for java")
9026 (description "AssertJ core is a Java library that provides a fluent
9027interface for writing assertions. Its main goal is to improve test code
9028readability and make maintenance of tests easier.")
9029 (license license:asl2.0)))
6768e0a7
JL
9030
9031(define-public java-jboss-javassist
9032 (package
9033 (name "java-jboss-javassist")
9034 (version "3.21.0")
9035 (source (origin
9036 (method url-fetch)
9037 (uri (string-append "https://github.com/jboss-javassist/javassist/"
9038 "archive/rel_"
9039 (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)
9040 "_ga.tar.gz"))
9041 (sha256
9042 (base32
9043 "10lpcr3sbf7y6fq6fc2h2ik7rqrivwcy4747bg0kxhwszil3cfmf"))))
9044 (build-system ant-build-system)
9045 (arguments
9046 `(#:jar-name "java-jboss-javassist.jar"
9047 #:jdk ,icedtea-8
9048 #:source-dir "src/main"
9049 #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3
9050 #:phases
9051 (modify-phases %standard-phases
9052 (add-before 'configure 'remove-binary
9053 (lambda _
9054 (delete-file "javassist.jar")
9055 #t)))))
9056 (native-inputs
9057 `(("junit" ,java-junit)))
9058 (home-page "https://github.com/jboss-javassist/javassist")
9059 (synopsis "Java bytecode engineering toolkit")
9060 (description "Javassist (JAVA programming ASSISTant) makes Java bytecode
9061manipulation simple. It is a class library for editing bytecodes in Java; it
9062enables Java programs to define a new class at runtime and to modify a class
9063file when the JVM loads it.")
9064 (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl.
a6dd06d0
JL
9065
9066(define-public java-jcommander
9067 (package
9068 (name "java-jcommander")
9069 (version "1.71")
9070 (source (origin
9071 (method url-fetch)
9072 (uri (string-append "https://github.com/cbeust/jcommander/archive/"
9073 version ".tar.gz"))
9074 (file-name (string-append name "-" version ".tar.gz"))
9075 (sha256
9076 (base32
9077 "1f5k2ckay6qjc3d3w3d7bc0p3cx3c7n6p6zxvw1kibqdr0q98wlx"))))
9078 (build-system ant-build-system)
9079 (arguments
9080 `(#:jar-name "java-jcommander.jar"
9081 #:jdk ,icedtea-8
9082 #:tests? #f; requires testng which depends on jcommander
9083 #:source-dir "src/main/java"))
dcfdc908 9084 (home-page "https://jcommander.org")
a6dd06d0
JL
9085 (synopsis "Command line parameters parser")
9086 (description "JCommander is a very small Java framework that makes it
9087trivial to parse command line parameters. Parameters are declared with
9088annotations.")
9089 (license license:asl2.0)))
11bc385b
JL
9090
9091(define-public java-bsh
9092 (package
9093 (name "java-bsh")
9094 (version "2.0b6")
9095 (source (origin
9096 (method url-fetch)
9097 (uri (string-append "https://github.com/beanshell/beanshell/archive/"
9098 version ".tar.gz"))
9099 (file-name (string-append name "-" version ".tar.gz"))
9100 (sha256
9101 (base32
9102 "1bawkxk6jyc75hxvzkpz689h73cn3f222m0ar3nvb0dal2b85kfv"))))
9103 (build-system ant-build-system)
9104 (arguments
9105 `(#:build-target "jarall"
9106 #:test-target "junit-tests-all"
9107 #:phases
9108 (modify-phases %standard-phases
9109 (replace 'install
9110 (lambda* (#:key outputs #:allow-other-keys)
9111 (let ((share (string-append (assoc-ref outputs "out") "/share/java")))
9112 (mkdir-p share)
9113 (copy-file "dist/bsh-2.0b6.jar" (string-append share "/bsh-2.0b6.jar"))
9114 #t))))))
9115 (home-page "http://beanshell.org/")
9116 (synopsis "Lightweight Scripting for Java")
9117 (description "BeanShell is a small, free, embeddable Java source
9118interpreter with object scripting language features, written in Java.
9119BeanShell dynamically executes standard Java syntax and extends it with common
9120scripting conveniences such as loose types, commands, and method closures like
9121those in Perl and JavaScript.")
9122 (license license:asl2.0)))
7a343e97
JL
9123
9124(define-public java-fest-util
9125 (package
9126 (name "java-fest-util")
9127 (version "1.2.5")
9128 (source (origin
00f3190d
EF
9129 (method git-fetch)
9130 (uri (git-reference
9131 (url "https://github.com/alexruiz/fest-util/")
9132 (commit (string-append "fest-util-" version))))
9133 (file-name (git-file-name name version))
7a343e97
JL
9134 (sha256
9135 (base32
00f3190d 9136 "02kgal7v85snyyvcsxvn4qphid455f4smh2wri1il8d9asw0djbz"))))
7a343e97
JL
9137 (build-system ant-build-system)
9138 (arguments
9139 `(#:jar-name "java-fest-util.jar"
9140 #:source-dir "src/main/java"))
9141 (native-inputs
9142 `(("junit" ,java-junit)
9143 ("hamcrest" ,java-hamcrest-core)))
9144 (home-page "https://github.com/alexruiz/fest-util")
9145 (synopsis "FEST common utilities")
9146 (description "Common utilities used in all FEST module.")
9147 (license license:asl2.0)))
3c6c8358
JL
9148
9149(define-public java-fest-test
9150 (package
9151 (name "java-fest-test")
9152 (version "2.1.0")
9153 (source (origin
79e74008
EF
9154 (method git-fetch)
9155 (uri (git-reference
9156 (url "https://github.com/alexruiz/fest-test/")
9157 (commit (string-append "fest-test-" version))))
9158 (file-name (git-file-name name version))
3c6c8358
JL
9159 (sha256
9160 (base32
79e74008 9161 "0mg1d2jfh7kbx2c40dchbjr6d8pv59snsyb13mfxsr7xk5n69qbn"))))
3c6c8358
JL
9162 (build-system ant-build-system)
9163 (arguments
9164 `(#:jar-name "java-fest-test.jar"
9165 #:source-dir "src/main/java"
9166 #:tests? #f)); no tests
9167 (inputs
9168 `(("junit" ,java-junit)))
9169 (home-page "https://github.com/alexruiz/fest-test")
9170 (synopsis "Common FEST testing infrastructure")
9171 (description "Fest-test contains the common FEST testing infrastructure.")
9172 (license license:asl2.0)))
ca98e448
JL
9173
9174(define-public java-fest-assert
9175 (package
9176 (name "java-fest-assert")
9177 (version "2.0M10")
9178 (source (origin
e9917c69
EF
9179 (method git-fetch)
9180 (uri (git-reference
9181 (url "https://github.com/alexruiz/fest-assert-2.x/")
9182 (commit (string-append "fest-assert-core-" version))))
9183 (file-name (git-file-name name version))
ca98e448
JL
9184 (sha256
9185 (base32
e9917c69 9186 "1cp8zzyag3s85fz2w68sda9zzaal1y5f9wl8g72wkm12an40w6by"))))
ca98e448
JL
9187 (build-system ant-build-system)
9188 (arguments
9189 `(#:jar-name "java-fest-assert.jar"
9190 #:source-dir "src/main/java"
9191 #:test-exclude
9192 (list
9193 "**/Abstract*.java"
9194 "**/*BaseTest.java"
9195 ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses
9196 "**/MessageFormatter_format_Test.java"
9197 "**/internal/*/*_assert*_Test.java")))
9198 (inputs
9199 `(("java-fest-util" ,java-fest-util)))
9200 (native-inputs
9201 `(("java-junit" ,java-junit)
9202 ("java-fest-test" ,java-fest-test)
9203 ("java-hamcrest-core" ,java-hamcrest-core)
9204 ("java-mockito" ,java-mockito-1)
9205 ("java-cglib" ,java-cglib)
9206 ("java-objenesis" ,java-objenesis)
9207 ("java-asm" ,java-asm)))
9208 (home-page "https://github.com/alexruiz/fest-assert-2.x")
9209 (synopsis "FEST fluent assertions")
9210 (description "FEST-Assert provides a fluent interface for assertions.")
9211 (license license:asl2.0)))
0442d897
JL
9212
9213(define-public java-testng
9214 (package
9215 (name "java-testng")
3422e10e 9216 (version "6.14.3")
0442d897 9217 (source (origin
36b39d16
RW
9218 (method git-fetch)
9219 (uri (git-reference
9220 (url "https://github.com/cbeust/testng.git")
9221 (commit version)))
9222 (file-name (string-append name "-" version "-checkout"))
0442d897
JL
9223 (sha256
9224 (base32
3422e10e 9225 "0y6vq30i5g276kw0v2bhbvci22ijg7ax49ap2611yqlhbs4d6dqv"))))
0442d897
JL
9226 (build-system ant-build-system)
9227 (arguments
9228 `(#:jdk ,icedtea-8; java.util.function
9229 #:jar-name "java-testng.jar"
9230 #:source-dir "src/main/java"
9231 #:phases
9232 (modify-phases %standard-phases
36b39d16
RW
9233 ;; FIXME: I don't know why these tests fail
9234 (add-after 'unpack 'delete-failing-tests
9235 (lambda _
9236 (substitute* "src/test/resources/testng.xml"
9237 (("<class name=\"test.configuration.github1625.TestRunnerIssue1625\"/>") "")
9238 (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") ""))
9239 #t))
9240 ;; We don't have groovy
9241 (add-after 'unpack 'delete-groovy-tests
9242 (lambda _
9243 (delete-file-recursively "src/test/java/test/dependent/issue1648/")
9244 (substitute* "src/test/resources/testng.xml"
9245 (("<class name=\"test.dependent.issue1648.TestRunner\"/>") ""))
9246 #t))
0442d897
JL
9247 (add-before 'build 'copy-resources
9248 (lambda _
9249 (copy-recursively "src/main/resources" "build/classes")
9250 #t))
9251 (add-before 'check 'copy-test-resources
9252 (lambda _
9253 (copy-recursively "src/test/resources" "build/test-classes")
9254 #t))
9255 (replace 'check
9256 (lambda _
2c8ac364 9257 (invoke "ant" "compile-tests")
0442d897
JL
9258 ;; we don't have groovy
9259 (substitute* "src/test/resources/testng.xml"
9260 (("<class name=\"test.groovy.GroovyTest\" />") ""))
2c8ac364
MW
9261 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
9262 ":build/classes"
9263 ":build/test-classes")
9264 "-Dtest.resources.dir=src/test/resources"
9265 "org.testng.TestNG" "src/test/resources/testng.xml"))))))
0442d897
JL
9266 (propagated-inputs
9267 `(("junit" ,java-junit)
9268 ("java-jsr305" ,java-jsr305)
9269 ("java-bsh" ,java-bsh)
9270 ("java-jcommander" ,java-jcommander)
9271 ("java-guice" ,java-guice)
9272 ("snakeyaml" ,java-snakeyaml)))
9273 (native-inputs
9274 `(("guava" ,java-guava)
9275 ("java-javax-inject" ,java-javax-inject)
9276 ("java-hamcrest" ,java-hamcrest-all)
9277 ("java-assertj" ,java-assertj)
36b39d16 9278 ("java-mockito" ,java-mockito-1)
0442d897
JL
9279 ("cglib" ,java-cglib)
9280 ("asm" ,java-asm)
9281 ("aopalliance" ,java-aopalliance)))
c9010605 9282 (home-page "https://testng.org")
0442d897
JL
9283 (synopsis "Testing framework")
9284 (description "TestNG is a testing framework inspired from JUnit and NUnit
9285but introducing some new functionalities that make it more powerful and easier
9286to use.")
9287 (license license:asl2.0)))
1717a7de
JL
9288
9289(define-public java-jnacl
3e87923a
RW
9290 (let ((commit "094e819afdd63ea81a499b3bcb42a271006bebd9")
9291 (revision "2"))
9292 (package
9293 (name "java-jnacl")
9294 (version (string-append "0.1.0-" revision "." (string-take commit 7)))
9295 (source (origin
9296 (method git-fetch)
9297 (uri (git-reference
9298 (url "https://github.com/neilalexander/jnacl.git")
9299 (commit commit)))
6c34ad73 9300 (file-name (git-file-name name version))
3e87923a
RW
9301 (sha256
9302 (base32
9303 "1d6g6xhn83byv5943n7935wwjsk0ibk0qdvqgr699qqgqqmwisbb"))))
9304 (build-system ant-build-system)
9305 (arguments
8c7d32e0 9306 `(#:jar-name "jnacl.jar"
3e87923a
RW
9307 #:source-dir "src/main/java"
9308 #:jdk ,icedtea-8
9309 #:phases
9310 (modify-phases %standard-phases
9311 (add-before 'build 'fix-tests
9312 (lambda _
9313 (substitute* '("src/test/java/com/neilalexander/jnacl/NaClTest.java"
9314 "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java")
9315 (("assertions.Assertions") "assertions.api.Assertions"))
9316 #t))
9317 (replace 'check
9318 (lambda _
9319 (invoke "ant" "compile-tests")
9320 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
9321 ":build/classes"
9322 ":build/test-classes")
9323 "org.testng.TestNG" "-testclass"
9324 "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class")
9325 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
9326 ":build/classes"
9327 ":build/test-classes")
9328 "org.testng.TestNG" "-testclass"
2c8ac364 9329 "build/test-classes/com/neilalexander/jnacl/NaClTest.class"))))))
3e87923a
RW
9330 (native-inputs
9331 `(("java-testng" ,java-testng)
9332 ("java-fest-util" ,java-fest-util)
9333 ("java-fest-assert" ,java-fest-assert)))
9334 (home-page "https://github.com/neilalexander/jnacl")
9335 (synopsis "Java implementation of NaCl")
9336 (description "Pure Java implementation of the NaCl: Networking and
1717a7de 9337Cryptography library.")
3e87923a 9338 (license license:bsd-2))))
eaf3cb7a
JL
9339
9340(define-public java-mvel2
9341 (package
9342 (name "java-mvel2")
9343 (version "2.3.1")
9344 (source (origin
9345 (method url-fetch)
9346 (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-"
9347 version ".Final.tar.gz"))
9348 (sha256
9349 (base32
9350 "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z"))))
9351 (build-system ant-build-system)
9352 (arguments
9353 `(#:jar-name "mvel2.jar"
9354 #:source-dir "src/main/java"
9355 #:test-exclude
9356 (list "**/Abstract*.java"
9357 ;; Base class with no tests
9358 "**/MVELThreadTest.java")
9359 #:phases
9360 (modify-phases %standard-phases
9361 (add-after 'install 'install-bin
9362 (lambda* (#:key outputs #:allow-other-keys)
9363 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
9364 (mkdir-p bin)
9365 (with-output-to-file (string-append bin "/mvel2")
9366 (lambda _
9367 (display
9368 (string-append
9369 "#!" (which "bash") "\n"
9370 "if [ \"$#\" -ne \"2\" ]; then\n"
9371 "echo 'Usage: mvel2 <script> <out.dir>'\n"
9372 "exit\n"
9373 "fi\n"
9374 "java -Dout.dir=$2 -cp " (getenv "CLASSPATH")
9375 ":" (assoc-ref outputs "out") "/share/java/mvel2.jar"
9376 " org.mvel2.sh.Main $1"))))
9377 (chmod (string-append bin "/mvel2") #o755))
9378 #t)))))
9379 (native-inputs
9380 `(("junit" ,java-junit)
9381 ("hamcrest" ,java-hamcrest-core)))
9382 (home-page "https://github.com/mvel/mvel")
9383 (synopsis "MVFLEX Expression Language")
9384 (description "MVEL has largely been inspired by Java syntax, but has some
9385fundamental differences aimed at making it more efficient as an expression
9386language, such as operators that directly support collection, array and string
9387matching, as well as regular expressions. MVEL is used to evaluate expressions
9388written using Java syntax.
9389
9390In addition to the expression language, MVEL serves as a templating language for
9391configuration and string construction.")
9392 (license license:asl2.0)))
d54d7d31 9393
9e325e8c
RW
9394(define-public java-commons-jexl-2
9395 (package
9396 (name "java-commons-jexl")
9397 (version "2.1.1")
9398 (source (origin
9399 (method url-fetch)
9400 (uri (string-append "mirror://apache/commons/jexl/source/"
9401 "commons-jexl-" version "-src.tar.gz"))
9402 (sha256
9403 (base32
9404 "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz"))))
9405 (build-system ant-build-system)
9406 (arguments
9407 `(#:jar-name "commons-jexl-2.jar"
9408 #:jdk ,icedtea-8
9409 #:source-dir "src/main/java"
9410 #:phases
9411 (modify-phases %standard-phases
9412 (add-before 'check 'disable-broken-tests
9413 (lambda* (#:key inputs #:allow-other-keys)
9414 (with-directory-excursion "src/test/java/org/apache/commons/jexl2/"
9415 (substitute* "ArithmeticTest.java"
9416 (("asserter.assertExpression\\(\"3 / 0\"") "//")
9417 (("asserter.assertExpression\\(\"imanull") "//"))
9418 ;; This test fails with "ambiguous method invocation"
9419 (delete-file "CacheTest.java")
9420 ;; This test doesn't have access to the temp directory
9421 (substitute* "ClassCreatorTest.java"
9422 (("java.io.tmpdir") "user.dir"))
9423 ;; This test fails in trying to detect whether it can run.
9424 (substitute* "ClassCreator.java"
9425 (("boolean canRun =.*") "boolean canRun = false;\n"))
9426 ;; ...and these tests depend on it.
9427 (delete-file "scripting/JexlScriptEngineOptionalTest.java")
9428 (delete-file "scripting/JexlScriptEngineTest.java"))
9429 #t))
9430 (add-before 'build 'run-javacc
9431 (lambda _
9432 (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/"
080d0b60
RW
9433 (invoke "java" "jjtree" "Parser.jjt")
9434 (invoke "java" "javacc" "Parser.jj"))
9435 #t)))))
9e325e8c
RW
9436 (inputs
9437 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
9438 (native-inputs
9439 `(("java-junit" ,java-junit)
9440 ("java-hamcrest-core" ,java-hamcrest-core)
9441 ("javacc" ,javacc-4)))
9442 (home-page "https://commons.apache.org/proper/commons-jexl/")
9443 (synopsis "Java Expression Language ")
9444 (description "JEXL is a library intended to facilitate the implementation
9445of dynamic and scripting features in applications and frameworks written in
9446Java. JEXL implements an Expression Language based on some extensions to the
9447JSTL Expression Language supporting most of the constructs seen in
9448shell-script or ECMAScript. Its goal is to expose scripting features usable
9449by technical operatives or consultants working with enterprise platforms.")
9450 (license license:asl2.0)))
9451
d54d7d31
JL
9452(define-public java-lz4
9453 (package
9454 (name "java-lz4")
9455 (version "1.4.0")
9456 (source (origin
6632fc28
EF
9457 (method git-fetch)
9458 (uri (git-reference
9459 (url "https://github.com/lz4/lz4-java")
9460 (commit version)))
9461 (file-name (git-file-name name version))
d54d7d31
JL
9462 (sha256
9463 (base32
6632fc28 9464 "0ydjakhv3cz34mfvv14qrh2ksdxifgjwwagjy7r46qr3f68hnf6y"))))
d54d7d31
JL
9465 (build-system ant-build-system)
9466 (arguments
9467 `(#:jar-name "lz4.jar"
9468 #:jdk ,icedtea-8
9469 #:source-dir "src/java:src/java-unsafe"
9470 #:tests? #f; FIXME: requires more dependencies
9471 #:phases
9472 (modify-phases %standard-phases
6632fc28
EF
9473 (add-after 'unpack 'make-files-writable
9474 (lambda _
9475 (for-each make-file-writable (find-files "."))
9476 #t))
d54d7d31
JL
9477 (add-before 'configure 'generate-source
9478 (lambda _
9479 (with-directory-excursion "src/build/source_templates"
1b6bc516
RW
9480 (invoke "mvel2" "../gen_sources.mvel" "../../java"))
9481 #t)))))
d54d7d31
JL
9482 (native-inputs
9483 `(("mvel" ,java-mvel2)))
9484 (home-page "https://jpountz.github.io/lz4-java")
9485 (synopsis "Compression algorithm")
9486 (description "LZ4 - Java is a Java port of the popular lz4 compression
9487algorithms and xxHash hashing algorithm.")
9488 (license license:asl2.0)))
62315865 9489
50d70a72 9490(define-public java-bouncycastle
62315865 9491 (package
50d70a72 9492 (name "java-bouncycastle")
248a9e16 9493 (version "1.60")
62315865 9494 (source (origin
a8f01c45
EF
9495 (method git-fetch)
9496 (uri (git-reference
9497 (url "http://git.bouncycastle.org/repositories/bc-java")
9498 ;(url "https://github.com/bcgit/bc-java")
9499 (commit (string-append "r1rv" (substring version 2 4)))))
9500 (file-name (git-file-name name version))
62315865
JL
9501 (sha256
9502 (base32
a8f01c45 9503 "1m921a1ac2dl797ffzg3d4j97ch308f25spb4jgsj3npfmmys5gb"))
50d70a72
JL
9504 (modules '((guix build utils)))
9505 (snippet
9506 '(begin
9507 (for-each delete-file
9508 (find-files "." "\\.jar$"))
9509 #t))))
62315865
JL
9510 (build-system ant-build-system)
9511 (arguments
50d70a72 9512 `(#:jdk ,icedtea-8
0c68f7fd 9513 #:tests? #f
62315865
JL
9514 #:phases
9515 (modify-phases %standard-phases
50d70a72 9516 (replace 'build
62315865 9517 (lambda _
50d70a72 9518 (invoke "ant" "-f" "ant/jdk15+.xml" "build-provider")
2c8ac364 9519 (invoke "ant" "-f" "ant/jdk15+.xml" "build")))
0c68f7fd
RW
9520 ;; FIXME: the tests freeze.
9521 ;; (replace 'check
9522 ;; (lambda _
9523 ;; (invoke "ant" "-f" "ant/jdk15+.xml" "test")))
50d70a72
JL
9524 (replace 'install
9525 (install-jars "build/artifacts/jdk1.5/jars")))))
9526 (inputs
9527 `(("java-javax-mail" ,java-javax-mail)))
31208367
JL
9528 (native-inputs
9529 `(("unzip" ,unzip)
50d70a72
JL
9530 ("junit" ,java-junit)
9531 ("java-native-access" ,java-native-access)
9532 ("java-native-access-platform" ,java-native-access-platform)))
31208367
JL
9533 (home-page "https://www.bouncycastle.org")
9534 (synopsis "Cryptographic library")
50d70a72
JL
9535 (description "Bouncy Castle is a cryptographic library for the Java
9536programming language.")
31208367 9537 (license license:expat)))
a53d9ac0
JL
9538
9539(define-public java-lmax-disruptor
9540 (package
9541 (name "java-lmax-disruptor")
9542 (version "3.3.7")
9543 (source (origin
9544 (method url-fetch)
9545 (uri (string-append "https://github.com/LMAX-Exchange/disruptor/"
9546 "archive/" version ".tar.gz"))
9547 (file-name (string-append name "-" version ".tar.gz"))
9548 (sha256
9549 (base32
9550 "17da2gwj5abnlsfgn2xqjk5lgzbg4vkb0hdv2dvc8r2fx4bi7w3g"))))
9551 (build-system ant-build-system)
9552 (arguments
9553 `(#:jar-name "java-lmax-disruptor.jar"
9554 #:jdk ,icedtea-8
9555 #:tests? #f)); tests hang
9556 (inputs
9557 `(("junit" ,java-junit)
9558 ("java-hdrhistogram" ,java-hdrhistogram)
9559 ("java-jmock" ,java-jmock)
9560 ("java-jmock-legacy" ,java-jmock-legacy)
9561 ("java-jmock-junit4" ,java-jmock-junit4)
9562 ("java-hamcrest-all" ,java-hamcrest-all)))
9563 (native-inputs
9564 `(("cglib" ,java-cglib)
9565 ("objenesis" ,java-objenesis)
9566 ("asm" ,java-asm)))
9567 (home-page "https://www.lmax.com/disruptor")
9568 (synopsis "High performance inter-thread communication")
9569 (description "LMAX Disruptor is a software pattern and software component
9570for high performance inter-thread communication that avoids the need for
9571message queues or resource locking.")
9572 (license license:asl2.0)))
5619556b 9573
5e3abfc8
RW
9574(define-public java-commons-bcel
9575 (package
9576 (name "java-commons-bcel")
9577 (version "6.1")
9578 (source (origin
9579 (method url-fetch)
9580 (uri (string-append "mirror://apache/commons/bcel/source/bcel-"
9581 version "-src.tar.gz"))
9582 (sha256
9583 (base32
9584 "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy"))))
9585 (build-system ant-build-system)
9586 (arguments
9587 `(#:jar-name "bcel.jar"
9588 #:jdk ,icedtea-8
9589 #:source-dir "src/main/java"
9590 #:test-dir "src/test/java"
9591 ;; FIXME: Tests require the unpackaged jna.
9592 #:tests? #f))
9593 (home-page "https://commons.apache.org/proper/commons-bcel/")
9594 (synopsis "Byte code engineering library")
9595 (description "The Byte Code Engineering Library (Apache Commons BCEL) is
9596intended to give users a convenient way to analyze, create, and
9597manipulate (binary) Java class files. Classes are represented by objects
9598which contain all the symbolic information of the given class: methods, fields
9599and byte code instructions, in particular.
9600
9601Such objects can be read from an existing file, be transformed by a
9602program (e.g. a class loader at run-time) and written to a file again. An
9603even more interesting application is the creation of classes from scratch at
9604run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful
9605if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format
9606of Java @code{.class} files.")
9607 (license license:asl2.0)))
9608
5619556b
JL
9609(define-public java-xerial-core
9610 (package
9611 (name "java-xerial-core")
9612 (version "2.1")
9613 (source (origin
9614 (method url-fetch)
9615 (uri (string-append "https://github.com/xerial/xerial-java/archive/"
9616 version ".tar.gz"))
9617 (file-name (string-append name "-" version ".tar.gz"))
9618 (sha256
9619 (base32
9620 "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d"))))
9621 (build-system ant-build-system)
9622 (arguments
9623 `(#:jar-name "xerial-core.jar"
9624 #:source-dir "xerial-core/src/main/java"
9625 #:test-dir "xerial-core/src/test"
9626 #:phases
9627 (modify-phases %standard-phases
9628 (add-before 'build 'copy-resources
9629 (lambda _
9630 (copy-recursively "xerial-core/src/main/resources"
9631 "build/classes")
9632 #t)))))
9633 (native-inputs
9634 `(("junit" ,java-junit)
9635 ("hamcrest" ,java-hamcrest-core)))
9636 (home-page "https://github.com/xerial/xerial-java")
f4548394 9637 (synopsis "Data management libraries for Java")
5619556b 9638 (description "Xerial is a set of data management libraries for the Java
f4548394 9639programming language. The ultimate goal of the Xerial project is to manage
5619556b
JL
9640everything as database, including class objects, text format data, data
9641streams, etc.")
9642 (license license:asl2.0)))
8d6a4815
JL
9643
9644(define-public java-powermock-reflect
9645 (package
9646 (name "java-powermock-reflect")
9647 (version "1.7.3")
9648 (source (origin
9649 (method url-fetch)
9650 (uri (string-append "https://github.com/powermock/powermock/"
9651 "archive/powermock-" version ".tar.gz"))
9652 (file-name (string-append name "-" version ".tar.gz"))
9653 (sha256
9654 (base32
9655 "0sbgi5vqq7k72wzcdjb20s370vyd4hsbnx71pzb8ishml3gy7fwy"))
9656 (patches
9657 (search-patches "java-powermock-fix-java-files.patch"))))
9658 (build-system ant-build-system)
9659 (arguments
9660 `(#:jar-name "java-powermock-reflect.jar"
9661 #:jdk ,icedtea-8
9662 #:source-dir "powermock-reflect/src/main/java"
9663 #:test-dir "powermock-reflect/src/test"))
9664 (inputs
9665 `(("java-objenesis" ,java-objenesis)))
9666 (native-inputs
9667 `(("junit" ,java-junit)
9668 ("cglib" ,java-cglib)
9669 ("asm" ,java-asm)
9670 ("hamcrest" ,java-hamcrest-core)
9671 ("assertj" ,java-assertj)))
9672 (home-page "https://github.com/powermock/powermock")
9673 (synopsis "Mock library extension framework")
9674 (description "PowerMock is a framework that extends other mock libraries
9675such as EasyMock with more powerful capabilities. PowerMock uses a custom
9676classloader and bytecode manipulation to enable mocking of static methods,
9677constructors, final classes and methods, private methods, removal of static
9678initializers and more. By using a custom classloader no changes need to be
9679done to the IDE or continuous integration servers which simplifies adoption.")
9680 (license license:asl2.0)))
d4a4d5da
JL
9681
9682(define-public java-powermock-core
9683 (package
9684 (inherit java-powermock-reflect)
9685 (name "java-powermock-core")
9686 (arguments
9687 `(#:jar-name "java-powermock-core.jar"
9688 #:source-dir "powermock-core/src/main/java"
9689 #:test-dir "powermock-core/src/test"
9690 #:tests? #f; requires powermock-api
59e0021c
JL
9691 #:jdk ,icedtea-8
9692 #:phases
9693 (modify-phases %standard-phases
9694 (add-before 'build 'copy-resources
9695 (lambda _
9696 (copy-recursively "powermock-core/src/main/resources"
2c8ac364
MW
9697 "build/classes")
9698 #t)))))
d4a4d5da
JL
9699 (inputs
9700 `(("reflect" ,java-powermock-reflect)
9701 ("javassist" ,java-jboss-javassist)))
9702 (native-inputs
9703 `(("junit" ,java-junit)
9704 ("assertj" ,java-assertj)
9705 ("mockito" ,java-mockito-1)))))
2d5d65d7
JL
9706
9707(define-public java-powermock-api-support
9708 (package
9709 (inherit java-powermock-reflect)
9710 (name "java-powermock-api-support")
9711 (build-system ant-build-system)
9712 (arguments
9713 `(#:jar-name "java-powermock-api-support.jar"
9714 #:jdk ,icedtea-8
9715 #:source-dir "powermock-api/powermock-api-support/src/main/java"
9716 #:tests? #f)); no tests
9717 (inputs
9718 `(("core" ,java-powermock-core)
9719 ("reflect" ,java-powermock-reflect)))))
6c21d46c
JL
9720
9721(define-public java-powermock-modules-junit4-common
9722 (package
9723 (inherit java-powermock-reflect)
9724 (name "java-powermock-modules-junit4-common")
9725 (build-system ant-build-system)
9726 (arguments
9727 `(#:jar-name "java-powermock-modules-junit4-common.jar"
9728 #:jdk ,icedtea-8
9729 #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java"
9730 #:test-dir "powermock-modules/powermock-module-junit4-common/src/test"))
9731 (inputs
9732 `(("core" ,java-powermock-core)
9733 ("easymock" ,java-easymock)
9734 ("reflect" ,java-powermock-reflect)
9735 ("hamcrest" ,java-hamcrest-core)
9736 ("cglib" ,java-cglib)))))
33db1681
JL
9737
9738(define-public java-powermock-modules-junit4
9739 (package
9740 (inherit java-powermock-reflect)
9741 (name "java-powermock-modules-junit4")
9742 (build-system ant-build-system)
9743 (arguments
9744 `(#:jar-name "java-powermock-modules-junit4.jar"
9745 #:jdk ,icedtea-8
9746 #:source-dir "powermock-modules/powermock-module-junit4/src/main/java"
1124683d
JL
9747 #:test-dir "powermock-modules/powermock-module-junit4/src/test"
9748 #:phases
9749 (modify-phases %standard-phases
9750 (add-before 'build 'fix-junit-detection
9751 (lambda _
9752 ;; Our junit version is 4.12-SNAPSHOT
9753 (substitute* (find-files "powermock-modules/powermock-module-junit4"
9754 "PowerMockJUnit4MethodValidator.java")
2c8ac364
MW
9755 (("4.12") "4.12-SNAPSHOT"))
9756 #t)))))
33db1681
JL
9757 (inputs
9758 `(("core" ,java-powermock-core)
9759 ("reflect" ,java-powermock-reflect)
9760 ("common" ,java-powermock-modules-junit4-common)
9761 ("cglib" ,java-cglib)))
9762 (native-inputs
9763 `(("easymock" ,java-easymock)
9764 ("hamcrest" ,java-hamcrest-core)
9765 ("objenesis" ,java-objenesis)
9766 ("asm" ,java-asm)
9767 ("junit" ,java-junit)))))
4d508975
JL
9768
9769(define-public java-powermock-api-easymock
9770 (package
9771 (inherit java-powermock-reflect)
9772 (name "java-powermock-api-easymock")
9773 (build-system ant-build-system)
9774 (arguments
9775 `(#:jar-name "java-powermock-api-easymock.jar"
9776 #:jdk ,icedtea-8
9777 #:source-dir "powermock-api/powermock-api-easymock/src/main/java"
9778 #:tests? #f; no tests
9779 #:phases
9780 (modify-phases %standard-phases
9781 (add-before 'build 'fix-file
9782 (lambda _
9783 ;; FIXME: This looks wrong, but it fixes a build error.
9784 (with-directory-excursion "powermock-api/powermock-api-easymock"
9785 (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java"
9786 (("classLoader instanceof MockClassLoader") "false")
9787 (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";")))
9788 #t)))))
9789 (inputs
9790 `(("core" ,java-powermock-core)
9791 ("easymock" ,java-easymock)
9792 ("reflect" ,java-powermock-reflect)
9793 ("support" ,java-powermock-api-support)
9794 ("cglib" ,java-cglib)))))
5fb3e822
JL
9795
9796(define-public java-jboss-jms-api-spec
9797 (package
9798 (name "java-jboss-jms-api-spec")
9799 (version "2.0")
9800 (source (origin
9801 (method url-fetch)
9802 (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/"
9803 "archive/jboss-jms-api_" version
9804 "_spec-1.0.1.Final.tar.gz"))
9805 (sha256
9806 (base32
9807 "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m"))))
9808 (build-system ant-build-system)
9809 (arguments
9810 `(#:jar-name "java-jboss-jms-api_spec.jar"
9811 #:jdk ,icedtea-8
9812 #:source-dir "."
9813 #:tests? #f)); no tests
9814 (home-page "https://github.com/jboss/jboss-jms-api_spec")
9815 (synopsis "Java Message Service API specification")
9816 (description "Java Message Service (JMS) API is used to send messages
9817messages between two or more clients. It is a messaging standard that allows
9818application components to create, send, receive, and read messages.")
9819 ; either gpl2 only with GPL Classpath Exception, or cddl.
9820 (license (list license:gpl2 license:cddl1.0))))
3ff47c66
JL
9821
9822(define-public java-mail
9823 (package
9824 (name "java-mail")
9825 (version "1.6.0")
9826 (source (origin
9827 (method url-fetch)
9828 (uri (string-append "https://github.com/javaee/javamail/archive/"
9829 "JAVAMAIL-1_6_0.tar.gz"))
9830 (sha256
9831 (base32
9832 "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92"))))
9833 (build-system ant-build-system)
9834 (arguments
9835 `(#:jar-name "java-mail.jar"
9836 #:jdk ,icedtea-8
9837 #:source-dir "mail/src/main/java"
9838 #:test-dir "mail/src/test"
9839 #:test-exclude
9840 (list "**/CollectorFormatterTest.java"
9841 "**/CompactFormatterTest.java"
9842 "**/DurationFilterTest.java"
9843 "**/MailHandlerTest.java"
9844 "**/GetLocalAddressTest.java"
9845 ;; FIXME: both end with:
9846 ;; java.lang.ClassNotFoundException:
9847 ;; javax.mail.internet.MimeMultipartParseTest
9848 "**/MimeMultipartParseTest.java"
9849 "**/SearchTermSerializationTest.java")
9850 #:phases
9851 (modify-phases %standard-phases
9852 (add-before 'configure 'move-version.java
9853 (lambda _
9854 (copy-file "mail/src/main/resources/javax/mail/Version.java"
218d1dde
RW
9855 "mail/src/main/java/javax/mail/Version.java")
9856 #t))
3ff47c66
JL
9857 (add-before 'build 'copy-resources
9858 (lambda _
9859 (copy-recursively "mail/src/main/resources/META-INF"
9860 "build/classes/META-INF")
9861 #t)))))
9862 (native-inputs
9863 `(("junit" ,java-junit)
9864 ("hamcrest" ,java-hamcrest-core)))
9865 (home-page "https://javaee.github.io/javamail/")
9866 (synopsis "Mail-related functionnalities in Java")
9867 (description "The JavaMail API provides a platform-independent and
9868protocol-independent framework to build mail and messaging applications.")
9869 ;; General Public License Version 2 only ("GPL") or the Common Development
9870 ;; and Distribution License("CDDL")
9871 (license (list license:cddl1.1
9872 license:gpl2)))); with classpath exception
217b20e4
JL
9873
9874(define-public java-jeromq
9875 (package
9876 (name "java-jeromq")
4aa0a1df 9877 (version "0.4.3")
217b20e4 9878 (source (origin
4aa0a1df
RW
9879 (method git-fetch)
9880 (uri (git-reference
9881 (url "https://github.com/zeromq/jeromq.git")
9882 (commit (string-append "v" version))))
9883 (file-name (string-append name "-" version "-checkout"))
217b20e4
JL
9884 (sha256
9885 (base32
594bd3a0
GB
9886 "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj"))
9887 (patches (search-patches "java-jeromq-fix-tests.patch"))))
217b20e4
JL
9888 (build-system ant-build-system)
9889 (arguments
9890 `(#:jar-name "java-jeromq.jar"
9891 #:source-dir "src/main/java"
9892 #:jdk ,icedtea-8
9893 #:test-exclude
9894 (list
9895 "**/Abstract*.java"
9896 ;; Requires network
9897 "**/ZBeaconTest.java"
9898 ;; Failures
4aa0a1df 9899 "**/DealerSpecTest.java"
217b20e4 9900 "**/CustomDecoderTest.java"
594bd3a0
GB
9901 "**/CustomEncoderTest.java"
9902 "**/ConnectRidTest.java"
9903 "**/ReqSpecTest.java"
9904 "**/PushPullSpecTest.java"
9905 "**/PubSubHwmTest.java"
9906 "**/RouterSpecTest.java"
9907 "**/ProxyTest.java")))
217b20e4
JL
9908 (inputs
9909 `(("java-jnacl" ,java-jnacl)))
9910 (native-inputs
9911 `(("java-hamcrest-core" ,java-hamcrest-core)
9912 ("junit" ,java-junit)))
9913 (home-page "http://zeromq.org/bindings:java")
9914 (synopsis "Java binding for 0MQ")
9915 (description "Jeromq provides the java bindings for 0MQ.")
9916 (license license:mpl2.0)))
46c6905a
JL
9917
9918(define-public java-kafka-clients
9919 (package
9920 (name "java-kafka-clients")
9921 (version "1.0.0")
9922 (source (origin
9923 (method url-fetch)
9924 (uri (string-append "mirror://apache/kafka/" version "/kafka-"
9925 version "-src.tgz"))
9926 (sha256
9927 (base32
9928 "1yxmnsmliwm7671q5yy9bl4jdqyyn00n26cggz9brwczx80w1vfq"))))
9929 (build-system ant-build-system)
9930 (arguments
9931 `(#:jar-name "java-kafka-clients.jar"
9932 #:jdk ,icedtea-8
9933 #:source-dir "clients/src/main/java"
9934 #:test-dir "clients/src/test"
9935 #:test-exclude
9936 (list
9937 ;; This file does not contain a class
9938 "**/IntegrationTest.java"
9939 ;; Requires network
9940 "**/ClientUtilsTest.java"
9941 ;; End with errors that seem related to our powermock
9942 "**/KafkaProducerTest.java"
9943 "**/BufferPoolTest.java")))
9944 (inputs
9945 `(("java-slf4j-api" ,java-slf4j-api)
9946 ("java-lz4" ,java-lz4)))
9947 (native-inputs
9948 `(("junit" ,java-junit)
9949 ("hamcrest" ,java-hamcrest-all)
9950 ("objenesis" ,java-objenesis)
9951 ("asm" ,java-asm)
9952 ("cglib" ,java-cglib)
9953 ("javassist" ,java-jboss-javassist)
9954 ("snappy" ,java-snappy)
9955 ("easymock" ,java-easymock)
9956 ("powermock" ,java-powermock-core)
9957 ("powermock-easymock" ,java-powermock-api-easymock)
9958 ("powermock-junit4-common" ,java-powermock-modules-junit4-common)
9959 ("powermock-junit4" ,java-powermock-modules-junit4)
9960 ("powermock-support" ,java-powermock-api-support)
50d70a72 9961 ("java-bouncycastle" ,java-bouncycastle)))
46c6905a
JL
9962 (home-page "https://kafka.apache.org")
9963 (synopsis "Distributed streaming platform")
9964 (description "Kafka is a distributed streaming platform, which means:
9965@itemize
9966@item it can publish and subscribe to streams of records;
9967@item it can store streams of records in a fault-tolerant way;
9968@item it can process streams of records as they occur.
9969@end itemize")
9970 ;; Either cddl or gpl2 only.
9971 (license (list license:cddl1.1; actually cddl1.1
9972 license:gpl2)))); with classpath exception
0b54e190
JL
9973
9974(define-public java-jdom
9975 (package
9976 (name "java-jdom")
9977 (version "1.1.3")
9978 (source (origin
9979 (method url-fetch)
9980 (uri (string-append "http://jdom.org/dist/binary/archive/jdom-"
9981 version ".tar.gz"))
9982 (sha256
9983 (base32
9984 "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl"))))
9985 (build-system ant-build-system)
9986 (arguments
9987 `(#:build-target "package"
9988 #:tests? #f; tests are run as part of the build process
9989 #:phases
9990 (modify-phases %standard-phases
9991 (replace 'install
9992 (install-jars "build")))))
9993 (home-page "http://jdom.org/")
9994 (synopsis "Access, manipulate, and output XML data")
9995 (description "Java-based solution for accessing, manipulating, and
9996outputting XML data from Java code.")
9997 (license license:bsd-4)))
78745d33
JL
9998
9999(define-public java-geronimo-xbean-reflect
10000 (package
10001 (name "java-geronimo-xbean-reflect")
10002 (version "4.5")
10003 (source (origin
10004 (method svn-fetch)
10005 (uri (svn-reference
10006 (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/")
10007 (revision 1807396)))
10008 (file-name (string-append name "-" version))
10009 (sha256
10010 (base32
10011 "18q3i6jgm6rkw8aysfgihgywrdc5nvijrwnslmi3ww497jvri6ja"))))
10012 (build-system ant-build-system)
10013 (arguments
10014 `(#:jar-name "geronimo-xbean-reflect.jar"
10015 #:source-dir "xbean-reflect/src/main/java"
10016 #:test-dir "xbean-reflect/src/test"
10017 #:jdk ,icedtea-8
10018 #:test-exclude
10019 (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java"
10020 "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java"
10021 "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java")
10022 #:phases
10023 (modify-phases %standard-phases
10024 (add-before 'build 'fix-source
10025 (lambda _
10026 (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/"))
10027 ;; org.apache.xbean.asm6 is actually repackaged java-asm
10028 (substitute* (string-append dir "XbeanAsmParameterNameLoader.java")
10029 (("org.apache.xbean.asm5") "org.objectweb.asm"))
10030 #t))))))
10031 (inputs
10032 `(("asm" ,java-asm)
10033 ("log4j" ,java-log4j-api)
10034 ("log4j-1.2" ,java-log4j-1.2-api)
10035 ("log4j-core" ,java-log4j-core)
10036 ("logging" ,java-commons-logging-minimal)))
10037 (native-inputs
10038 `(("junit" ,java-junit)))
10039 (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/")
10040 (synopsis "Dependency injection helper")
10041 (description "Xbean-reflect provides very flexible ways to create objects
10042and graphs of objects for dependency injection frameworks")
10043 (license license:asl2.0)))
09c44196 10044
3fda539b
JL
10045(define-public java-geronimo-xbean-bundleutils
10046 (package
10047 (inherit java-geronimo-xbean-reflect)
10048 (name "java-geronimo-xbean-bundleutils")
10049 (arguments
10050 `(#:jar-name "geronimo-xbean-bundleutils.jar"
10051 #:source-dir "xbean-bundleutils/src/main/java"
10052 #:test-dir "xbean-bundleutils/src/test"
10053 #:phases
10054 (modify-phases %standard-phases
10055 (add-before 'build 'fix-java
10056 (lambda _
10057 ;; We use a more recent version of osgi, so this file requires
10058 ;; more interface method implementations.
10059 (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java"
10060 (("import org.osgi.framework.ServiceRegistration;")
10061 "import org.osgi.framework.ServiceRegistration;
10062import org.osgi.framework.ServiceFactory;
10063import java.util.Collection;
10064import org.osgi.framework.ServiceObjects;")
10065 (("public Bundle getBundle\\(\\)")
10066 "@Override
10067public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) {
10068 throw new UnsupportedOperationException();
10069}
10070@Override
10071public <S> ServiceRegistration<S> registerService(Class<S> clazz,
10072 ServiceFactory<S> factory, Dictionary<String, ?> properties) {
10073 throw new UnsupportedOperationException();
10074}
10075public Bundle getBundle()"))
10076 #t)))))
10077 (inputs
10078 `(("java-slf4j" ,java-slf4j-api)
10079 ("java-asm" ,java-asm)
10080 ("java-osgi-framework" ,java-osgi-framework)
10081 ("java-eclipse-osgi" ,java-eclipse-osgi)
10082 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)))))
0cb9ce32
JL
10083
10084(define-public java-geronimo-xbean-asm-util
10085 (package
10086 (inherit java-geronimo-xbean-reflect)
10087 (name "java-geronimo-xbean-asm-util")
10088 (arguments
10089 `(#:jar-name "geronimo-xbean-asm-util.jar"
10090 #:source-dir "xbean-asm-util/src/main/java"
10091 #:tests? #f)); no tests
10092 (inputs
10093 `(("java-asm" ,java-asm)))
10094 (native-inputs '())))
8d510f65
JL
10095
10096(define-public java-geronimo-xbean-finder
10097 (package
10098 (inherit java-geronimo-xbean-reflect)
10099 (name "java-geronimo-xbean-finder")
10100 (arguments
10101 `(#:jar-name "geronimo-xbean-finder.jar"
10102 #:source-dir "xbean-finder/src/main/java"
10103 #:test-dir "xbean-finder/src/test"))
10104 (inputs
10105 `(("java-slf4j-api" ,java-slf4j-api)
10106 ("java-asm" ,java-asm)
10107 ("java-geronimo-xbean-bundleutils" ,java-geronimo-xbean-bundleutils)
10108 ("java-geronimo-xbean-asm-util" ,java-geronimo-xbean-asm-util)
10109 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)
10110 ("java-osgi-framework" ,java-osgi-framework)))
10111 (native-inputs
10112 `(("java-junit" ,java-junit)
10113 ("java-hamcrest-core" ,java-hamcrest-core)))))
3fda539b 10114
09c44196
JL
10115(define-public java-gson
10116 (package
10117 (name "java-gson")
10118 (version "2.8.2")
10119 (source (origin
10120 (method url-fetch)
10121 (uri (string-append "https://github.com/google/gson/archive/"
10122 "gson-parent-" version ".tar.gz"))
10123 (sha256
10124 (base32
10125 "1j4qnp7v046q0k48c4kyf69sxaasx2h949d3cqwsm3kzxms3x0f9"))))
10126 (build-system ant-build-system)
10127 (arguments
10128 `(#:jar-name "gson.jar"
10129 #:source-dir "gson/src/main/java"
10130 #:test-dir "gson/src/test"))
10131 (native-inputs
10132 `(("java-junit" ,java-junit)
10133 ("java-hamcrest-core" ,java-hamcrest-core)))
10134 (home-page "https://github.com/google/gson")
10135 (synopsis "Java serialization/deserialization library from/to JSON")
10136 (description "Gson is a Java library that can be used to convert Java
10137Objects into their JSON representation. It can also be used to convert a JSON
10138string to an equivalent Java object. Gson can work with arbitrary Java objects
10139including pre-existing objects that you do not have source-code of.")
10140 (license license:asl2.0)))
335aa20b
JL
10141
10142(define-public java-hawtjni
10143 (package
10144 (name "java-hawtjni")
10145 (version "1.15")
10146 (source (origin
10147 (method url-fetch)
10148 (uri (string-append "https://github.com/fusesource/hawtjni/archive/"
10149 "hawtjni-project-" version ".tar.gz"))
10150 (sha256
10151 (base32
10152 "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g"))))
10153 (build-system ant-build-system)
10154 (arguments
10155 `(#:jar-name "hawtjni.jar"
10156 #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java"
10157 #:tests? #f; no tests
10158 #:phases
10159 (modify-phases %standard-phases
10160 (add-before 'build 'build-native
10161 (lambda* (#:key inputs #:allow-other-keys)
6338ea9a
RW
10162 (let ((include (string-append "-I" (assoc-ref inputs "jdk") "/include/linux")))
10163 (with-directory-excursion "hawtjni-generator/src/main/resources/"
10164 (invoke "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o"
10165 "-fPIC" "-O2" include)
10166 (invoke "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o"
10167 "-fPIC" "-O2" include)
10168 (invoke "gcc" "-o" "libhawtjni.so" "-shared"
10169 "hawtjni.o" "hawtjni-callback.o")))
10170 #t))
335aa20b
JL
10171 (add-after 'install 'install-native
10172 (lambda* (#:key outputs #:allow-other-keys)
10173 (let* ((out (assoc-ref outputs "out"))
10174 (lib (string-append out "/lib"))
10175 (inc (string-append out "/include")))
335aa20b 10176 (with-directory-excursion "hawtjni-generator/src/main/resources/"
6338ea9a
RW
10177 (install-file "libhawtjni.so" lib)
10178 (install-file "hawtjni.h" inc)))
335aa20b
JL
10179 #t)))))
10180 (inputs
10181 `(("java-commons-cli" ,java-commons-cli)
10182 ("java-asm" ,java-asm)
10183 ("java-geronimo-xbean-finder" ,java-geronimo-xbean-finder)))
10184 (home-page "https://fusesource.github.io/hawtjni/")
10185 (synopsis "JNI code generator")
10186 (description "HawtJNI is a code generator that produces the JNI code needed
10187to implement Java native methods. It is based on the jnigen code generator
10188that is part of the SWT Tools project.")
10189 (license license:asl2.0)))
d0c62afa
JL
10190
10191(define-public java-jansi-native
10192 (package
10193 (name "java-jansi-native")
10194 (version "1.7")
10195 (source (origin
10196 (method url-fetch)
10197 (uri (string-append "https://github.com/fusesource/jansi-native/"
10198 "archive/jansi-native-" version ".tar.gz"))
10199 (sha256
10200 (base32
10201 "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf"))))
10202 (build-system ant-build-system)
10203 (arguments
10204 `(#:jar-name "jansi-native.jar"
10205 #:source-dir "src/main/java"
10206 #:tests? #f; no tests
10207 #:phases
10208 (modify-phases %standard-phases
10209 (add-before 'build 'build-native
10210 (lambda* (#:key inputs #:allow-other-keys)
10211 ;; there are more required files for windows in windows/
10212 (with-directory-excursion "src/main/native-package/src"
10213 (substitute* "jansi_ttyname.c"
10214 (("#include \"jansi_.*") ""))
e85c1bf6
RW
10215 (invoke "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o"
10216 (string-append "-I" (assoc-ref inputs "java-hawtjni")
10217 "/include")
10218 (string-append "-I" (assoc-ref inputs "jdk")
10219 "/include/linux")
10220 "-fPIC" "-O2")
2c8ac364 10221 (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o"))))
d0c62afa
JL
10222 (add-before 'build 'install-native
10223 (lambda _
10224 (let ((dir (string-append "build/classes/META-INF/native/"
10225 ,(match (%current-system)
10226 ((or "i686-linux" "armhf-linux")
10227 "linux32")
3c4103c8
LC
10228 ((or "x86_64-linux" "aarch64-linux"
10229 "mips64el-linux")
9820d6ed
JN
10230 "linux64")
10231 (_ "unknown-kernel")))))
d0c62afa
JL
10232 (install-file "src/main/native-package/src/libjansi.so" dir))
10233 #t))
10234 (add-after 'install 'install-native
10235 (lambda* (#:key outputs #:allow-other-keys)
d0c62afa
JL
10236 (install-file "src/main/native-package/src/jansi.h"
10237 (string-append (assoc-ref outputs "out") "/include"))
10238 #t)))))
10239 (inputs
10240 `(("java-hawtjni" ,java-hawtjni)))
10241 (home-page "https://fusesource.github.io/jansi/")
10242 (synopsis "Native library for jansi")
3d6925ef
RW
10243 (description "This package provides the native library for jansi, a small
10244Java library that allows you to use ANSI escape sequences to format your
10245console output.")
d0c62afa 10246 (license license:asl2.0)))
a87ea1ad
JL
10247
10248(define-public java-jansi
10249 (package
10250 (name "java-jansi")
10251 (version "1.16")
10252 (source (origin
10253 (method url-fetch)
10254 (uri (string-append "https://github.com/fusesource/jansi/archive/"
10255 "jansi-project-" version ".tar.gz"))
10256 (sha256
10257 (base32
10258 "11kh3144i3fzp21dpy8zg52mjmsr214k7km9p8ly0rqk2px0qq2z"))))
10259 (build-system ant-build-system)
10260 (arguments
10261 `(#:jar-name "jansi.jar"
10262 #:source-dir "jansi/src/main/java"
10263 #:test-dir "jansi/src/test"
10264 #:phases
10265 (modify-phases %standard-phases
10266 (add-after 'check 'clear-term
10267 (lambda _
2c8ac364 10268 (invoke "echo" "-e" "\\e[0m"))))))
a87ea1ad
JL
10269 (inputs
10270 `(("java-jansi-native" ,java-jansi-native)))
10271 (native-inputs
10272 `(("java-junit" ,java-junit)
10273 ("java-hamcrest-core" ,java-hamcrest-core)))
10274 (home-page "https://fusesource.github.io/jansi/")
10275 (synopsis "Portable ANSI escape sequences")
10276 (description "Jansi is a Java library that allows you to use ANSI escape
10277sequences to format your console output which works on every platform.")
10278 (license license:asl2.0)))
cc061329
JL
10279
10280(define-public java-jboss-el-api-spec
10281 (package
10282 (name "java-jboss-el-api-spec")
10283 (version "3.0")
10284 (source (origin
10285 (method url-fetch)
10286 (uri (string-append "https://github.com/jboss/jboss-el-api_spec/"
10287 "archive/jboss-el-api_" version
10288 "_spec-1.0.7.Final.tar.gz"))
10289 (sha256
10290 (base32
10291 "1j45ljxalwlibxl7g7iv952sjxkw275m8vyxxij8l6wdd5pf0pdh"))))
10292 (build-system ant-build-system)
10293 (arguments
10294 `(#:jar-name "java-jboss-el-api_spec.jar"
10295 #:jdk ,icedtea-8))
10296 (inputs
10297 `(("java-junit" ,java-junit)))
10298 (home-page "https://github.com/jboss/jboss-el-api_spec")
10299 (synopsis "JSR-341 expression language 3.0 API")
10300 (description "This package contains an implementation of the JSR-341
10301specification for the expression language 3.0. It implements an expression
10302language inspired by ECMAScript and XPath. This language is used with
10303JavaServer Pages (JSP).")
10304 ;; Either GPL2 only or CDDL.
10305 (license (list license:gpl2 license:cddl1.1))))
cc03a786
JL
10306
10307(define-public java-jboss-interceptors-api-spec
10308 (package
10309 (name "java-jboss-interceptors-api-spec")
10310 (version "1.2")
10311 (source (origin
10312 (method url-fetch)
10313 (uri (string-append "https://github.com/jboss/jboss-interceptors-api_spec/"
10314 "archive/jboss-interceptors-api_" version
10315 "_spec-1.0.0.Final.tar.gz"))
10316 (sha256
10317 (base32
10318 "0wv8x0jp9a5qxlrgkhb5jdk2gr6vi87b4j4kjb8ryxiy9gn8g51z"))))
10319 (build-system ant-build-system)
10320 (arguments
10321 `(#:jar-name "java-jboss-interceptors-api_spec.jar"
10322 #:jdk ,icedtea-8
10323 #:source-dir "."
10324 #:tests? #f)); no tests
10325 (home-page "https://github.com/jboss/jboss-interceptors-api_spec")
10326 (synopsis "Interceptors 1.2 API classes from JSR 318")
10327 (description "Java-jboss-interceptors-api-spec implements the Interceptors
10328API. Interceptors are used to interpose on business method invocations and
10329specific events.")
10330 ;; Either GPL2 only or CDDL.
10331 (license (list license:gpl2 license:cddl1.1))))
a10a451c
JL
10332
10333(define-public java-cdi-api
10334 (package
10335 (name "java-cdi-api")
10336 (version "2.0")
10337 (source (origin
10338 (method url-fetch)
10339 (uri (string-append "https://github.com/cdi-spec/cdi/archive/"
10340 version ".tar.gz"))
10341 (file-name (string-append name "-" version ".tar.gz"))
10342 (sha256
10343 (base32
10344 "1iv8b8bp07c5kmqic14jsr868vycjv4qv02lf3pkgp9z21mnfg5y"))))
10345 (build-system ant-build-system)
10346 (arguments
10347 `(#:source-dir "api/src/main/java"
10348 #:jar-name "java-cdi-api.jar"
10349 #:test-dir "api/src/test"
10350 #:jdk ,icedtea-8
10351 #:tests? #f)); Tests fail because we don't have a CDI provider yet
10352 (inputs
10353 `(("java-javax-inject" ,java-javax-inject)
10354 ("java-jboss-el-api-spec" ,java-jboss-el-api-spec)
10355 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)))
10356 (native-inputs
10357 `(("java-testng" ,java-testng)
10358 ("java-hamcrest-core" ,java-hamcrest-core)))
10359 (home-page "http://cdi-spec.org/")
10360 (synopsis "Contexts and Dependency Injection APIs")
10361 (description "Java-cdi-api contains the required APIs for Contexts and
10362Dependency Injection (CDI).")
10363 (license license:asl2.0)))
d57fd728
JL
10364
10365(define-public java-joda-convert
10366 (package
10367 (name "java-joda-convert")
10368 (version "1.9.2")
10369 (source (origin
10370 (method url-fetch)
10371 (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v"
10372 version ".tar.gz"))
10373 (file-name (string-append name "-" version ".tar.gz"))
10374 (sha256
10375 (base32
10376 "0vp346xz7dh9br4q7xazhc7hvzf76a6hf95fki9bg67q5jr0kjh7"))))
10377 (build-system ant-build-system)
10378 (arguments
10379 `(#:jar-name (string-append ,name "-" ,version ".jar")
10380 #:source-dir "src/main/java"
10381 #:test-include (list "**/Test*.java")
10382 ;; Contains only interfaces and base classes (no test)
10383 #:test-exclude (list "**/test*/**.java")))
10384 (inputs
10385 `(("java-guava" ,java-guava)))
10386 (native-inputs
10387 `(("java-junit" ,java-junit)
10388 ("java-hamcrest-core" ,java-hamcrest-core)))
c82ddf33 10389 (home-page "https://www.joda.org/joda-convert/")
d57fd728
JL
10390 (synopsis "Conversion between Objects and Strings")
10391 (description "Joda-Convert provides a small set of classes to aid
10392conversion between Objects and Strings. It is not intended to tackle the
10393wider problem of Object to Object transformation.")
10394 (license license:asl2.0)))
0158ea8a
JL
10395
10396(define-public java-joda-time
10397 (package
10398 (name "java-joda-time")
10399 (version "2.9.9")
10400 (source (origin
10401 (method url-fetch)
10402 (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v"
10403 version ".tar.gz"))
10404 (file-name (string-append name "-" version ".tar.gz"))
10405 (sha256
10406 (base32
10407 "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1"))))
10408 (build-system ant-build-system)
10409 (arguments
10410 `(#:jar-name "java-joda-time.jar"
10411 #:source-dir "src/main/java"
10412 #:test-include (list "**/Test*.java")
10413 ;; There is no runnable test in these files
10414 #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java")
10415 #:phases
10416 (modify-phases %standard-phases
10417 (add-after 'build 'build-resources
10418 (lambda _
10419 (mkdir-p "build/classes/org/joda/time/tz/data")
10420 (mkdir-p "build/classes/org/joda/time/format")
6d0368eb
JL
10421 ;; This will produce the following exception:
10422 ;; java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap"
10423 ;; which is normal, because it doesn't exist yet. It still generates
10424 ;; the same file as in the binary one can find on maven.
10425 (invoke "java" "-cp"
10426 (string-append "build/classes:" (getenv "CLASSPATH"))
10427 "org.joda.time.tz.ZoneInfoCompiler"
10428 "-src" "src/main/java/org/joda/time/tz/src"
10429 "-dst" "build/classes/org/joda/time/tz/data"
10430 "africa" "antarctica" "asia" "australasia"
10431 "europe" "northamerica" "southamerica"
10432 "pacificnew" "etcetera" "backward" "systemv")
0158ea8a
JL
10433 (for-each (lambda (f)
10434 (copy-file f (string-append
10435 "build/classes/org/joda/time/format/"
10436 (basename f))))
10437 (find-files "src/main/java/org/joda/time/format" ".*.properties"))
10438 #t))
10439 (add-before 'install 'regenerate-jar
10440 (lambda _
10441 ;; We need to regenerate the jar file to add generated data.
10442 (delete-file "build/jar/java-joda-time.jar")
6d0368eb 10443 (invoke "ant" "jar")))
0158ea8a
JL
10444 (add-before 'check 'copy-test-resources
10445 (lambda _
10446 (mkdir-p "build/test-classes/org/joda/time/tz/data")
10447 (copy-file "src/test/resources/tzdata/ZoneInfoMap"
10448 "build/test-classes/org/joda/time/tz/data/ZoneInfoMap")
10449 (copy-recursively "src/test/resources" "build/test-classes")
10450 #t)))))
10451 (inputs
10452 `(("java-joda-convert" ,java-joda-convert)))
10453 (native-inputs
10454 `(("java-junit" ,java-junit)
10455 ("java-hamcrest-core" ,java-hamcrest-core)
10456 ("tzdata" ,tzdata)))
14544d2f 10457 (home-page "https://www.joda.org/joda-time/")
0158ea8a
JL
10458 (synopsis "Replacement for the Java date and time classes")
10459 (description "Joda-Time is a replacement for the Java date and time
10460classes prior to Java SE 8.")
10461 (license license:asl2.0)))
6d0368eb
JL
10462
10463(define-public java-xerces
10464 (package
10465 (name "java-xerces")
10466 (version "2.11.0")
10467 (source
10468 (origin
10469 (method url-fetch)
10470 (uri (string-append "mirror://apache/xerces/j/source/"
10471 "Xerces-J-src." version ".tar.gz"))
10472 (sha256
10473 (base32 "1006igwy2lqrmjvdk64v8dg6qbk9c29pm8xxx7r87n0vnpvmx6pm"))
10474 (patches (search-patches
10475 "java-xerces-xjavac_taskdef.patch"
10476 "java-xerces-build_dont_unzip.patch"
10477 "java-xerces-bootclasspath.patch"))))
10478 (build-system ant-build-system)
10479 (arguments
10480 `(#:tests? #f;; Test files are not present
10481 #:test-target "test"
10482 #:jdk ,icedtea-8
10483 #:phases
10484 (modify-phases %standard-phases
10485 (add-after 'unpack 'create-build.properties
10486 (lambda* (#:key inputs #:allow-other-keys)
10487 (let ((jaxp (assoc-ref inputs "java-jaxp"))
10488 (resolver (assoc-ref inputs "java-apache-xml-commons-resolver")))
10489 (with-output-to-file "build.properties"
10490 (lambda _
10491 (format #t
10492 "jar.jaxp = ~a/share/java/jaxp.jar~@
10493 jar.apis-ext = ~a/share/java/jaxp.jar~@
10494 jar.resolver = ~a/share/java/xml-resolver.jar~%"
10495 jaxp jaxp resolver)))
10496 ;; Make xerces use our version of jaxp in tests
10497 (substitute* "build.xml"
10498 (("xml-apis.jar")
10499 (string-append jaxp "/share/java/jaxp.jar"))
10500 (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}")
10501 "${jar.apis}")))
10502 #t))
10503 (replace 'install (install-jars "build")))))
10504 (inputs
10505 `(("java-apache-xml-commons-resolver" ,java-apache-xml-commons-resolver)
10506 ("java-jaxp" ,java-jaxp)))
10507 (home-page "https://xerces.apache.org/xerces2-j/")
10508 (synopsis "Validating XML parser for Java with DOM level 3 support")
10509 (description "The Xerces2 Java parser is the reference implementation of
10510XNI, the Xerces Native Interface, and also a fully conforming XML Schema
10511processor.
10512
10513Xerces2-J supports the following standards and APIs:
10514
10515@itemize
10516@item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation
10517@item Namespaces in XML Recommendation
10518@item Document Object Model (DOM) Level 2 Core, Events, and Traversal and
10519 Range Recommendations
10520@item Simple API for XML (SAX) 2.0.1 Core and Extension
10521@item Java APIs for XML Processing (JAXP) 1.2.01
10522@item XML Schema 1.0 Structures and Datatypes Recommendations
10523@item Experimental implementation of the Document Object Model (DOM) Level 3
10524 Core and Load/Save Working Drafts
10525@item Provides a partial implementation of the XML Inclusions (XInclude) W3C
10526 Candidate Recommendation
10527@end itemize
10528
10529Xerces is now able to parse documents written according to the XML 1.1
10530Candidate Recommendation, except that it does not yet provide an option to
10531enable normalization checking as described in section 2.13 of this
10532specification. It also handles namespaces according to the XML Namespaces 1.1
10533Candidate Recommendation, and will correctly serialize XML 1.1 documents if
10534the DOM level 3 load/save API's are in use.")
10535 (license license:asl2.0)))
e06bf428 10536
ae6922ed
DM
10537(define-public java-jakarta-regexp
10538 (package
10539 (name "java-jakarta-regexp")
10540 (version "1.5")
10541 (source
10542 (origin
10543 (method url-fetch)
10544 (uri (string-append
10545 "https://archive.apache.org/dist/jakarta/regexp/jakarta-regexp-"
10546 version ".tar.gz"))
10547 (sha256
10548 (base32
10549 "0zg9rmyif48dck0cv6ynpxv23mmcsx265am1fnnxss7brgw0ms3r"))))
10550 (build-system ant-build-system)
10551 (arguments
10552 `(#:test-target "test"
10553 #:phases
10554 (modify-phases %standard-phases
10555 (replace 'install
10556 (lambda* (#:key outputs #:allow-other-keys)
10557 (let* ((out (assoc-ref outputs "out"))
10558 (out-share (string-append out "/share/java")))
10559 (mkdir-p out-share)
10560 (for-each (lambda (name)
10561 (install-file name out-share))
10562 (find-files "build" "^jakarta-regexp-.*\\.jar$"))
10563 #t))))))
10564 (home-page "https://attic.apache.org/projects/jakarta-regexp.html")
10565 (synopsis "Regular expression parser generator for Java.")
10566 (description "@code{jakarta-regexp} is an old regular expression parser
10567generator for Java.")
10568 (license license:asl2.0)))
10569
e06bf428
JL
10570(define-public java-jline
10571 (package
10572 (name "java-jline")
10573 (version "1.0")
10574 (source (origin
10575 (method url-fetch)
10576 (uri (string-append "https://github.com/jline/jline1/archive/jline-"
10577 version ".tar.gz"))
10578 (sha256
10579 (base32
10580 "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir"))))
10581 (build-system ant-build-system)
10582 (arguments
10583 `(#:jar-name "jline.jar"
10584 #:source-dir "src/main/java"
10585 #:test-dir "src/test"
10586 #:phases
10587 (modify-phases %standard-phases
10588 (add-before 'build 'copy-resources
10589 (lambda _
10590 (copy-recursively "src/main/resources" "build/classes")
10591 #t)))))
10592 (native-inputs
10593 `(("java-junit" ,java-junit)))
10594 (home-page "https://jline.github.io")
10595 (synopsis "Console input handling library")
10596 (description "JLine is a Java library for handling console input. It is
10597similar in functionality to BSD editline and GNU readline but with additional
10598features that bring it on par with the Z shell line editor.")
10599 (license license:bsd-3)))
7ac4f054 10600
49d74311
JL
10601(define-public java-jline-2
10602 (package
10603 (inherit java-jline)
10604 (version "2.14.5")
10605 (source (origin
10606 (method url-fetch)
10607 (uri (string-append "https://github.com/jline/jline2/archive/jline-"
10608 version ".tar.gz"))
10609 (sha256
10610 (base32
10611 "1c6qa26mf0viw8hg4jnv72s7i1qb1gh1l8rrzcdvqhqhx82rkdlf"))))
10612 (arguments
10613 `(#:jdk ,icedtea-8
10614 ,@(package-arguments java-jline)))
10615 (inputs
10616 `(("java-jansi" ,java-jansi)
10617 ("java-jansi-native" ,java-jansi-native)))
10618 (native-inputs
10619 `(("java-powermock-modules-junit4" ,java-powermock-modules-junit4)
10620 ("java-powermock-modules-junit4-common" ,java-powermock-modules-junit4-common)
10621 ("java-powermock-api-easymock" ,java-powermock-api-easymock)
10622 ("java-powermock-api-support" ,java-powermock-api-support)
10623 ("java-powermock-core" ,java-powermock-core)
10624 ("java-powermock-reflect" ,java-powermock-reflect)
10625 ("java-easymock" ,java-easymock)
10626 ("java-jboss-javassist" ,java-jboss-javassist)
10627 ("java-objenesis" ,java-objenesis)
10628 ("java-asm" ,java-asm)
10629 ("java-hamcrest-core" ,java-hamcrest-core)
10630 ("java-cglib" ,java-cglib)
10631 ("java-junit" ,java-junit)
10632 ("java-hawtjni" ,java-hawtjni)))))
10633
7ac4f054
JL
10634(define-public java-xmlunit
10635 (package
10636 (name "java-xmlunit")
10637 (version "2.5.1")
10638 (source (origin
10639 (method url-fetch)
10640 (uri (string-append "https://github.com/xmlunit/xmlunit/archive/v"
10641 version ".tar.gz"))
10642 (file-name (string-append name "-" version ".tar.gz"))
10643 (sha256
10644 (base32
10645 "035rivlnmwhfqj0fzviciv0bkh1h95ps1iwnh2kjcvdbk5nccm4z"))))
10646 (build-system ant-build-system)
10647 (arguments
10648 `(#:jar-name "java-xmlunit.jar"
10649 #:source-dir "xmlunit-core/src/main/java"
10650 #:test-dir "xmlunit-core/src/test"
10651 #:phases
10652 (modify-phases %standard-phases
10653 (add-before 'check 'copy-test-resources
10654 (lambda* (#:key inputs #:allow-other-keys)
10655 (copy-recursively (assoc-ref inputs "resources") "../test-resources")
10656 #t)))))
10657 (native-inputs
10658 `(("java-junit" ,java-junit)
10659 ("java-mockito-1" ,java-mockito-1)
10660 ("java-hamcrest-all" ,java-hamcrest-all)
10661 ("java-objenesis" ,java-objenesis)
10662 ("java-asm" ,java-asm)
10663 ("java-cglib" ,java-cglib)
10664 ("resources"
10665 ,(origin
10666 (method git-fetch)
10667 (uri (git-reference
10668 (url "https://github.com/xmlunit/test-resources.git")
10669 (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec")))
10670 (file-name "java-xmlunit-test-resources")
10671 (sha256
10672 (base32
10673 "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr"))))))
10674 (home-page "http://www.xmlunit.org/")
10675 (synopsis "XML output testing")
10676 (description "XMLUnit provides you with the tools to verify the XML you
10677emit is the one you want to create. It provides helpers to validate against
10678an XML Schema, assert the values of XPath queries or compare XML documents
10679against expected outcomes.")
10680 (license license:asl2.0)))
73a1f10a
JL
10681
10682(define-public java-xmlunit-legacy
10683 (package
10684 (inherit java-xmlunit)
10685 (name "java-xmlunit-legacy")
10686 (arguments
10687 `(#:jar-name "java-xmlunit-legacy.jar"
10688 #:source-dir "xmlunit-legacy/src/main/java"
10689 #:test-dir "xmlunit-legacy/src/test"))
10690 (inputs
10691 `(("java-xmlunit" ,java-xmlunit)
10692 ("java-junit" ,java-junit)))
10693 (native-inputs
10694 `(("java-mockito-1" ,java-mockito-1)))))
93abc975 10695
f5cc5ead
JL
10696(define-public java-xmlunit-matchers
10697 (package
10698 (inherit java-xmlunit)
10699 (name "java-xmlunit-matchers")
10700 (arguments
10701 `(#:jar-name "java-xmlunit-matchers.jar"
10702 #:source-dir "xmlunit-matchers/src/main/java"
10703 #:test-dir "xmlunit-matchers/src/test"
10704 #:test-exclude
10705 ;; Cannot open xsd for http://www.xmlunit.org/test-support/Book.xsd
10706 (list "**/ValidationMatcherTest.java")
10707 #:phases
10708 (modify-phases %standard-phases
10709 (add-before 'build 'copy-test-class
10710 (lambda _
10711 (copy-file "xmlunit-core/src/test/java/org/xmlunit/TestResources.java"
10712 "xmlunit-matchers/src/test/java/org/xmlunit/TestResources.java")
10713 #t))
10714 (add-before 'build 'fix-test-resources-path
10715 (lambda _
10716 (substitute* (find-files "xmlunit-matchers/src/test" ".*.java")
10717 (("../test-resources") "test-resources"))
10718 #t))
10719 (add-before 'check 'copy-test-resources
10720 (lambda* (#:key inputs #:allow-other-keys)
10721 (copy-recursively (assoc-ref inputs "resources") "test-resources")
10722 #t)))))
10723 (inputs
10724 `(("java-xmlunit" ,java-xmlunit)
10725 ("java-junit" ,java-junit)))))
10726
93abc975
RW
10727(define-public java-openchart2
10728 (package
10729 (name "java-openchart2")
10730 (version "1.4.3")
10731 (source (origin
10732 (method url-fetch)
10733 (uri (string-append "http://download.approximatrix.com/openchart2/"
10734 "openchart2-" version ".source.zip"))
10735 (sha256
10736 (base32
10737 "1xq96zm5r02n1blja0072jmmsifmxc40lbyfbnmcnr6mw42frh4g"))))
10738 (build-system ant-build-system)
10739 (arguments
10740 `(#:test-target "test"
10741 #:phases
10742 (modify-phases %standard-phases
10743 (add-after 'unpack 'fix-junit-errors
10744 (lambda _
10745 (with-directory-excursion "unittest/src/com/approximatrix/charting/"
10746 (substitute* '("coordsystem/ticklocator/NumericXTickLocatorTest.java"
10747 "coordsystem/ticklocator/NumericYTickLocatorTest.java"
10748 "coordsystem/ticklocator/ObjectXTickLocatorTest.java"
10749 "model/DefaultChartDataModelConstraintsTest.java"
10750 "model/MultiScatterDataModelConstraintsTest.java"
10751 "model/threedimensional/DotPlotDataModelConstraintsTest.java")
10752 (("(assertEquals[^;]+);" before _)
10753 (string-append (string-drop-right before 2) ", 1E-6);"))))
10754 #t))
10755 (replace 'install (install-jars ".")))))
10756 (native-inputs
10757 `(("unzip" ,unzip)
10758 ("java-junit" ,java-junit)
10759 ("java-hamcrest-core" ,java-hamcrest-core)))
a809d632 10760 (home-page "https://approximatrix.com/products/openchart2/")
93abc975
RW
10761 (synopsis "Simple plotting for Java")
10762 (description "Openchart2 provides a simple, yet powerful, interface for
10763Java programmers to create two-dimensional charts and plots. The library
10764features an assortment of graph styles, including advanced scatter plots, bar
10765graphs, and pie charts.")
10766 (license license:lgpl2.1+)))
5f5b31c6
JL
10767
10768(define-public java-commons-httpclient
10769 (package
10770 (name "java-commons-httpclient")
10771 (version "3.1")
10772 (source (origin
10773 (method url-fetch)
10774 (uri (string-append "https://archive.apache.org/dist/httpcomponents/"
10775 "commons-httpclient/source/commons-httpclient-"
10776 version "-src.tar.gz"))
10777 (sha256
10778 (base32
10779 "1wlpn3cfy3d4inxy6g7wxcsa8p7sshn6aldk9y4ia3lb879rd97r"))))
10780 (build-system ant-build-system)
10781 (arguments
10782 `(#:build-target "compile"
10783 #:test-target "test"
10784 #:tests? #f; requires junit-textui (junit 3)
10785 #:phases
10786 (modify-phases %standard-phases
10787 (add-before 'build 'fix-accent
10788 (lambda _
10789 (for-each (lambda (file)
10790 (with-fluids ((%default-port-encoding "ISO-8859-1"))
10791 (substitute* file
10792 (("\\* @author Ortwin .*") "* @author Ortwin Glueck\n"))))
10793 '("src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java"
10794 "src/examples/TrivialApp.java" "src/examples/ClientApp.java"
10795 "src/test/org/apache/commons/httpclient/TestHttps.java"
2c8ac364
MW
10796 "src/test/org/apache/commons/httpclient/TestURIUtil2.java"))
10797 #t))
5f5b31c6
JL
10798 (replace 'install
10799 (lambda* (#:key outputs #:allow-other-keys)
10800 (invoke "ant" "dist"
10801 (string-append "-Ddist.home=" (assoc-ref outputs "out")
10802 "/share/java"))
10803 #t)))))
10804 (propagated-inputs
10805 `(("java-commons-logging" ,java-commons-logging-minimal)
10806 ("java-commons-codec" ,java-commons-codec)))
10807 (home-page "https://hc.apache.org")
10808 (synopsis "HTTP/1.1 compliant HTTP agent implementation")
10809 (description "This package contains an HTTP/1.1 compliant HTTP agent
10810implementation. It also provides reusable components for client-side
10811authentication, HTTP state management, and HTTP connection management.")
10812 (license license:asl2.0)))
5fe981dc
JL
10813
10814(define-public java-commons-vfs
10815 (package
10816 (name "java-commons-vfs")
10817 (version "2.2")
10818 (source (origin
10819 (method url-fetch)
10820 (uri (string-append "mirror://apache/commons/vfs/source/"
10821 "commons-vfs2-distribution-" version "-src.tar.gz"))
10822 (file-name (string-append name "-" version ".tar.gz"))
10823 (sha256
10824 (base32
10825 "1cnq1iaghbp4cslpnvwbp83i5v234x87irssqynhwpfgw7caf1s3"))
10826 (modules '((guix build utils)))
10827 (snippet
10828 '(begin
10829 (for-each delete-file
10830 (find-files "." "\\.jar$"))
10831 #t))))
10832 (build-system ant-build-system)
10833 (arguments
10834 `(#:jar-name "commons-vfs.jar"
10835 #:source-dir "commons-vfs2/src/main/java"
10836 #:test-dir "commons-vfs2/src/test"
10837 ; FIXME: tests depend on many things: apache sshd, hadoop, ftpserver, ...
10838 #:tests? #f
10839 #:phases
10840 (modify-phases %standard-phases
10841 (add-before 'build 'remove-hadoop-and-webdav
10842 ; Remove these files as they are not required and depend on difficult
10843 ; packages.
10844 (lambda _
10845 (for-each delete-file-recursively
10846 '("commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/webdav"
2c8ac364
MW
10847 "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs"))
10848 #t)))))
5fe981dc
JL
10849 (inputs
10850 `(("java-commons-collections4" ,java-commons-collections4)
10851 ("java-commons-compress" ,java-commons-compress)
10852 ("java-commons-httpclient" ,java-commons-httpclient)
10853 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
10854 ("java-commons-net" ,java-commons-net)
10855 ("java-jsch" ,java-jsch)))
4f236f84 10856 (home-page "https://commons.apache.org/proper/commons-vfs/")
52beae7b 10857 (synopsis "Java file system library")
5fe981dc
JL
10858 (description "Commons VFS provides a single API for accessing various
10859different file systems. It presents a uniform view of the files from various
10860different sources, such as the files on local disk, on an HTTP server, or
10861inside a Zip archive.")
10862 (license license:asl2.0)))
f7b512c0
JL
10863
10864(define-public java-jakarta-oro
10865 (package
10866 (name "java-jakarta-oro")
10867 (version "2.0.8")
10868 (source (origin
10869 (method url-fetch)
10870 (uri (string-append "https://archive.apache.org/dist/jakarta/oro/"
10871 "jakarta-oro-" version ".tar.gz"))
10872 (sha256
10873 (base32
10874 "0rpmnsskiwmsy8r0sckz5n5dbvh3vkxx8hpm177c754r8xy3qksc"))
10875 (modules '((guix build utils)))
10876 (snippet
10877 `(begin
10878 (delete-file (string-append "jakarta-oro-" ,version ".jar"))
10879 #t))))
10880 (build-system ant-build-system)
10881 (arguments
10882 `(#:build-target "package"
10883 #:tests? #f; tests are run as part of the build process
10884 #:phases
10885 (modify-phases %standard-phases
10886 (replace 'install
10887 (install-jars ,(string-append "jakarta-oro-" version))))))
10888 (home-page "https://jakarta.apache.org/oro/")
10889 (synopsis "Text-processing for Java")
10890 (description "The Jakarta-ORO Java classes are a set of text-processing
10891Java classes that provide Perl5 compatible regular expressions, AWK-like
10892regular expressions, glob expressions, and utility classes for performing
10893substitutions, splits, filtering filenames, etc. This library is the successor
10894of the OROMatcher, AwkTools, PerlTools, and TextTools libraries originally
10895from ORO, Inc.")
10896 (license license:asl1.1)))
a970288c
JL
10897
10898(define-public java-native-access
10899 (package
10900 (name "java-native-access")
10901 (version "4.5.1")
10902 (source (origin
10903 (method url-fetch)
10904 (uri (string-append "https://github.com/java-native-access/jna/"
10905 "archive/" version ".tar.gz"))
10906 (file-name (string-append name "-" version ".tar.gz"))
10907 (sha256
10908 (base32
10909 "0zrpzkib6b905i018a9pqlzkqinphywr6y4jwv6mwp63jjqvqkd9"))
10910 (modules '((guix build utils)))
10911 (snippet
10912 `(begin
10913 (for-each delete-file (find-files "." ".*.jar"))
10914 (delete-file-recursively "native/libffi")
10915 (delete-file-recursively "dist")
10916 #t))))
10917 (build-system ant-build-system)
10918 (arguments
10919 `(#:tests? #f; FIXME: tests require reflections.jar
10920 #:test-target "test"
10921 #:make-flags (list "-Ddynlink.native=true")
10922 #:phases
10923 (modify-phases %standard-phases
10924 (add-before 'build 'fix-build.xml
10925 (lambda* (#:key inputs #:allow-other-keys)
10926 (substitute* "build.xml"
10927 ;; Since we removed the bundled ant.jar, give the correct path
10928 (("lib/ant.jar") (string-append (assoc-ref inputs "ant") "/lib/ant.jar"))
10929 ;; We removed generated native libraries. We can only rebuild one
10930 ;; so don't fail if we can't find a native library for another architecture.
10931 (("zipfileset") "zipfileset erroronmissingarchive=\"false\""))
10932 ;; Copy test dependencies
10933 (copy-file (string-append (assoc-ref inputs "java-junit")
10934 "/share/java/junit.jar")
10935 "lib/junit.jar")
10936 (copy-file (string-append (assoc-ref inputs "java-hamcrest-core")
10937 "/share/java/hamcrest-core.jar")
10938 "lib/hamcrest-core.jar")
10939 ;; FIXME: once reflections.jar is built, copy it to lib/test.
10940 #t))
10941 (add-before 'build 'build-native
10942 (lambda _
10943 (invoke "ant" "-Ddynlink.native=true" "native")
10944 #t))
10945 (replace 'install
10946 (install-jars "build")))))
10947 (inputs
10948 `(("libffi" ,libffi)
10949 ("libx11" ,libx11)
10950 ("libxt" ,libxt)))
10951 (native-inputs
10952 `(("java-junit" ,java-junit)
10953 ("java-hamcrest-core" ,java-hamcrest-core)))
10954 (home-page "https://github.com/java-native-access/jna")
10955 (synopsis "Access to native shared libraries from Java")
10956 (description "JNA provides Java programs easy access to native shared
10957libraries without writing anything but Java code - no JNI or native code is
10958required. JNA allows you to call directly into native functions using natural
10959Java method invocation.")
10960 ;; Java Native Access project (JNA) is dual-licensed under 2
10961 ;; alternative Free licenses: LGPL 2.1 or later and Apache License 2.0.
10962 (license (list
10963 license:asl2.0
10964 license:lgpl2.1+))))
cfb55cfc
JL
10965
10966(define-public java-native-access-platform
10967 (package
10968 (inherit java-native-access)
10969 (name "java-native-access-platform")
10970 (arguments
10971 `(#:test-target "test"
10972 #:tests? #f; require jna-test.jar
10973 #:phases
10974 (modify-phases %standard-phases
10975 (add-before 'build 'chdir
10976 (lambda _
10977 (chdir "contrib/platform")
10978 #t))
10979 (add-after 'chdir 'fix-ant
10980 (lambda* (#:key inputs #:allow-other-keys)
10981 (substitute* "nbproject/project.properties"
10982 (("../../build/jna.jar")
10983 (string-append (assoc-ref inputs "java-native-access")
10984 "/share/java/jna.jar"))
10985 (("../../lib/hamcrest-core-.*.jar")
10986 (string-append (assoc-ref inputs "java-hamcrest-core")
10987 "/share/java/hamcrest-core.jar"))
10988 (("../../lib/junit.jar")
10989 (string-append (assoc-ref inputs "java-junit")
10990 "/share/java/junit.jar")))
10991 #t))
10992 (replace 'install
10993 (install-jars "dist")))))
10994 (inputs
10995 `(("java-native-access" ,java-native-access)))
10996 (synopsis "Cross-platform mappings for jna")
10997 (description "java-native-access-platfrom has cross-platform mappings
10998and mappings for a number of commonly used platform functions, including a
10999large number of Win32 mappings as well as a set of utility classes that
11000simplify native access.")))
470674a5
JL
11001
11002(define-public java-jsch-agentproxy-core
11003 (package
11004 (name "java-jsch-agentproxy-core")
11005 (version "0.0.8")
11006 (source (origin
11007 (method url-fetch)
11008 (uri (string-append "https://github.com/ymnk/jsch-agent-proxy/archive/"
11009 version ".tar.gz"))
11010 (file-name (string-append name "-" version ".tar.gz"))
11011 (sha256
11012 (base32
11013 "02iqg6jbc1kxvfzqcg6wy9ygqxfm82bw5rf6vnswqy4y572niz4q"))))
11014 (build-system ant-build-system)
11015 (arguments
11016 `(#:jar-name "jsch-agentproxy-core.jar"
11017 #:source-dir "jsch-agent-proxy-core/src/main/java"
11018 #:tests? #f)); no tests
11019 (home-page "https://github.com/ymnk/jsch-agent-proxy")
f1d79c97 11020 (synopsis "Core component of the proxy to ssh-agent and Pageant in Java")
470674a5
JL
11021 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
11022and Pageant included Putty. It will be easily integrated into JSch, and users
11023will be allowed to use these programs for authentication.")
11024 (license license:bsd-3)))
f1d79c97
JL
11025
11026(define-public java-jsch-agentproxy-sshagent
11027 (package
11028 (inherit java-jsch-agentproxy-core)
11029 (name "java-jsch-agentproxy-sshagent")
11030 (arguments
11031 `(#:jar-name "jsch-agentproxy-sshagent.jar"
11032 #:source-dir "jsch-agent-proxy-sshagent/src/main/java"
11033 #:tests? #f)); no tests
11034 (inputs
11035 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
11036 (synopsis "Proxy to ssh-agent")
11037 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
11038and Pageant included in Putty. This component contains the code for a proxy to
11039ssh-agent.")))
f438e638
JL
11040
11041(define-public java-jsch-agentproxy-usocket-jna
11042 (package
11043 (inherit java-jsch-agentproxy-core)
11044 (name "java-jsch-agentproxy-usocket-jna")
11045 (arguments
11046 `(#:jar-name "jsch-agentproxy-usocket-jna.jar"
11047 #:source-dir "jsch-agent-proxy-usocket-jna/src/main/java"
11048 #:tests? #f)); no tests
11049 (inputs
11050 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
11051 ("java-native-access" ,java-native-access)))
11052 (synopsis "USocketFactory implementation using JNA")
11053 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
11054and Pageant included in Putty. This component contains an implementation of
11055USocketFactory using @dfn{JNA} (Java Native Access).")))
475225e3
JL
11056
11057(define-public java-jsch-agentproxy-pageant
11058 (package
11059 (inherit java-jsch-agentproxy-core)
11060 (name "java-jsch-agentproxy-pageant")
11061 (arguments
11062 `(#:jar-name "jsch-agentproxy-pageant.jar"
11063 #:source-dir "jsch-agent-proxy-pageant/src/main/java"
11064 #:tests? #f)); no tests
11065 (inputs
11066 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
11067 ("java-native-access" ,java-native-access)
11068 ("java-native-access-platform" ,java-native-access-platform)))
11069 (synopsis "Proxy to pageant")
11070 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
11071and Pageant included in Putty. This component contains the code for a proxy to
11072pageant.")))
96d6d9c7
JL
11073
11074(define-public java-jsch-agentproxy-usocket-nc
11075 (package
11076 (inherit java-jsch-agentproxy-core)
11077 (name "java-jsch-agentproxy-usocket-nc")
11078 (arguments
11079 `(#:jar-name "jsch-agentproxy-usocket-nc.jar"
11080 #:source-dir "jsch-agent-proxy-usocket-nc/src/main/java"
11081 #:tests? #f)); no tests
11082 (inputs
11083 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
11084 (synopsis "USocketFactory implementation using netcat")
11085 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
11086and Pageant included in Putty. This component contains an implementation of
11087USocketFactory using netcat.")))
5a46b17b
JL
11088
11089(define-public java-jsch-agentproxy-connector-factory
11090 (package
11091 (inherit java-jsch-agentproxy-core)
11092 (name "java-jsch-agentproxy-connector-factory")
11093 (arguments
11094 `(#:jar-name "jsch-agentproxy-connector-factory.jar"
11095 #:source-dir "jsch-agent-proxy-connector-factory/src/main/java"
11096 #:tests? #f)); no tests
11097 (inputs
11098 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
11099 ("java-jsch-agentproxy-sshagent" ,java-jsch-agentproxy-sshagent)
11100 ("java-jsch-agentproxy-usocket-jna" ,java-jsch-agentproxy-usocket-jna)
11101 ("java-jsch-agentproxy-pageant" ,java-jsch-agentproxy-pageant)
11102 ("java-jsch-agentproxy-usocket-nc" ,java-jsch-agentproxy-usocket-nc)))
11103 (synopsis "Connector factory for jsch agent proxy")
11104 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
11105and Pageant included in Putty. This component contains a connector factory.")))
b0fbf596
JL
11106
11107(define-public java-jsch-agentproxy-jsch
11108 (package
11109 (inherit java-jsch-agentproxy-core)
11110 (name "java-jsch-agentproxy-jsch")
11111 (arguments
11112 `(#:jar-name "jsch-agentproxy-jsch.jar"
11113 #:source-dir "jsch-agent-proxy-jsch/src/main/java"
11114 #:tests? #f)); no tests
11115 (inputs
11116 `(("java-jsch" ,java-jsch)
11117 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
11118 (synopsis "JSch integration library for agentproxy")
11119 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
11120and Pageant included in Putty. This component contains a library to use
11121jsch-agent-proxy with JSch.")))
f1f4a4f0
JL
11122
11123(define-public java-apache-ivy
11124 (package
11125 (name "java-apache-ivy")
11126 (version "2.4.0")
11127 (source (origin
11128 (method url-fetch)
11129 (uri (string-append "mirror://apache//ant/ivy/" version
11130 "/apache-ivy-" version "-src.tar.gz"))
11131 (sha256
11132 (base32
11133 "1xkfn57g2m7l6y0xdq75x5rnrgk52m9jx2xah70g3ggl8750hbr0"))
11134 (patches
11135 (search-patches
11136 "java-apache-ivy-port-to-latest-bouncycastle.patch"))))
11137 (build-system ant-build-system)
11138 (arguments
11139 `(#:jar-name "ivy.jar"
11140 #:tests? #f
11141 #:phases
11142 (modify-phases %standard-phases
11143 (add-before 'build 'remove-example
11144 (lambda _
11145 (delete-file-recursively "src/example")
11146 #t))
11147 (add-before 'build 'copy-resources
11148 (lambda _
11149 (with-directory-excursion "src/java"
11150 (for-each (lambda (file)
11151 (install-file file (string-append "../../build/classes/" (dirname file))))
11152 (append
11153 (find-files "." ".*.css")
11154 (find-files "." ".*.ent")
11155 (find-files "." ".*.html")
11156 (find-files "." ".*.properties")
11157 (find-files "." ".*.xsd")
11158 (find-files "." ".*.xsl")
2c8ac364
MW
11159 (find-files "." ".*.xml"))))
11160 #t))
f1f4a4f0
JL
11161 (add-before 'build 'fix-vfs
11162 (lambda _
11163 (substitute*
11164 '("src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java"
11165 "src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java")
11166 (("import org.apache.commons.vfs") "import org.apache.commons.vfs2"))
11167 #t))
11168 (add-before 'install 'copy-manifest
11169 (lambda _
11170 (install-file "META-INF/MANIFEST.MF" "build/classes/META-INF")
11171 #t))
11172 (add-before 'install 'repack
11173 (lambda _
11174 (invoke "jar" "-cmf" "build/classes/META-INF/MANIFEST.MF" "build/jar/ivy.jar"
2c8ac364 11175 "-C" "build/classes" ".")))
f1f4a4f0
JL
11176 (add-after 'install 'install-bin
11177 (lambda* (#:key outputs #:allow-other-keys)
11178 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
11179 (ivy (string-append bin "/ivy"))
11180 (jar (string-append (assoc-ref outputs "out") "/share/java/ivy.jar")))
11181 (mkdir-p bin)
11182 (with-output-to-file ivy
11183 (lambda _
11184 (display (string-append
11185 "#!" (which "sh") "\n"
11186 "if [[ -z $CLASSPATH ]]; then\n"
11187 " cp=\"" (getenv "CLASSPATH") ":" jar "\"\n"
11188 "else\n"
11189 " cp=\"" (getenv "CLASSPATH") ":" jar ":$CLASSPATH\"\n"
11190 "fi\n"
11191 (which "java") " -cp $cp org.apache.ivy.Main $@\n"))))
11192 (chmod ivy #o755)
11193 #t))))))
11194 (inputs
11195 `(("java-bouncycastle" ,java-bouncycastle)
11196 ("java-commons-cli" ,java-commons-cli)
11197 ("java-commons-collections" ,java-commons-collections)
11198 ("java-commons-httpclient" ,java-commons-httpclient)
11199 ("java-commons-lang" ,java-commons-lang)
11200 ("java-commons-vfs" ,java-commons-vfs)
11201 ("java-jakarta-oro" ,java-jakarta-oro)
11202 ("java-jsch" ,java-jsch)
11203 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
11204 ("java-jsch-agentproxy-connector-factory" ,java-jsch-agentproxy-connector-factory)
11205 ("java-jsch-agentproxy-jsch" ,java-jsch-agentproxy-jsch)
11206 ("java-junit" ,java-junit)))
11207 (home-page "https://ant.apache.org/ivy")
11208 (synopsis "Dependency manager for the Java programming language")
11209 (description "Ivy is a tool for managing (recording, tracking, resolving
11210and reporting) project dependencies. It is characterized by the following:
11211
11212@itemize
11213@item flexibility and configurability - Ivy is essentially process agnostic
11214 and is not tied to any methodology or structure. Instead it provides the
11215 necessary flexibility and configurability to be adapted to a broad range
11216 of dependency management and build processes.
11217@item tight integration with Apache Ant - while available as a standalone tool,
11218 Ivy works particularly well with Apache Ant providing a number of
11219 powerful Ant tasks ranging from dependency resolution to dependency
11220 reporting and publication.
11221@end itemize")
11222 (license license:asl2.0)))
1a1810f5
JL
11223
11224(define-public java-eclipse-sisu-inject
11225 (package
11226 (name "java-eclipse-sisu-inject")
11227 (version "0.3.3")
11228 (source (origin
ae69b39e
BH
11229 (method git-fetch)
11230 (uri (git-reference
11231 (url "https://github.com/eclipse/sisu.inject/")
11232 (commit "releases/0.3.3")))
11233 (file-name (git-file-name name version))
1a1810f5
JL
11234 (sha256
11235 (base32
ae69b39e 11236 "0gibc9x0bw0f4ls086fx73610fcspz9g2as7kcpcfhvl5znysvg7"))))
1a1810f5
JL
11237 (build-system ant-build-system)
11238 (arguments
11239 `(#:jar-name "eclipse-sisu-inject.jar"
11240 #:source-dir "org.eclipse.sisu.inject/src"
11241 #:jdk ,icedtea-8
11242 #:tests? #f)); no tests
11243 (inputs
11244 `(("java-guice" ,java-guice)
11245 ("java-guice-servlet" ,java-guice-servlet)
11246 ("java-javax-inject" ,java-javax-inject)
4b472f6a 11247 ("java-javaee-servletapi" ,java-javaee-servletapi)
1a1810f5
JL
11248 ("java-junit" ,java-junit)
11249 ("java-slf4j-api" ,java-slf4j-api)
11250 ("java-jsr305" ,java-jsr305)
11251 ("java-jsr250" ,java-jsr250)
11252 ("java-cdi-api" ,java-cdi-api)
11253 ("java-osgi-framework" ,java-osgi-framework)
11254 ("java-osgi-util-tracker" ,java-osgi-util-tracker)
11255 ("java-testng" ,java-testng)))
11256 (home-page "https://www.eclipse.org/sisu/")
11257 (synopsis "Classpath scanning, auto-binding, and dynamic auto-wiring")
11258 (description "Sisu is a modular JSR330-based container that supports
11259classpath scanning, auto-binding, and dynamic auto-wiring. Sisu uses
11260Google-Guice to perform dependency injection and provide the core JSR330
11261support, but removes the need to write explicit bindings in Guice modules.
11262Integration with other containers via the Eclipse Extension Registry and the
11263OSGi Service Registry is a goal of this project.")
11264 (license license:epl1.0)))
7049dea1
JL
11265
11266(define-public java-eclipse-sisu-plexus
11267 (package
11268 (name "java-eclipse-sisu-plexus")
e0c0b078 11269 (version "0.3.4")
7049dea1 11270 (source (origin
3560a2cd
EF
11271 (method git-fetch)
11272 (uri (git-reference
11273 (url "https://github.com/eclipse/sisu.plexus.git")
11274 (commit (string-append "releases/" version))))
11275 (file-name (git-file-name name version))
7049dea1
JL
11276 (sha256
11277 (base32
e0c0b078 11278 "17mjlajnsqnk07cc58h1qpxrif85yb2m2y0pyba48yjjgikk8r9f"))
7049dea1
JL
11279 (modules '((guix build utils)))
11280 (snippet
11281 '(begin
11282 (for-each delete-file (find-files "." ".*.jar"))
11283 (rename-file "org.eclipse.sisu.plexus.tests/src"
11284 "org.eclipse.sisu.plexus.tests/java")
11285 #t))))
11286 (build-system ant-build-system)
11287 (arguments
11288 `(#:jar-name "eclipse-sisu-plexus.jar"
11289 #:source-dir "org.eclipse.sisu.plexus/src"
11290 #:test-dir "org.eclipse.sisu.plexus.tests"
11291 #:test-exclude
11292 (list
11293 ;; This test fails probably because we can't generate the necessary
11294 ;; meta-inf files.
11295 "**/PlexusLoggingTest.*"
11296 ;; FIXME: This test fails because of some injection error
11297 "**/PlexusRequirementTest.*")
11298 #:jdk ,icedtea-8
11299 #:phases
11300 (modify-phases %standard-phases
11301 (add-before 'build 'copy-resources
11302 (lambda _
11303 (install-file "org.eclipse.sisu.plexus/META-INF/plexus/components.xml"
11304 "build/classes/META-INF/plexus")
11305 #t))
11306 (add-before 'check 'build-test-jar
11307 (lambda _
11308 (with-directory-excursion "org.eclipse.sisu.plexus.tests/resources/component-jar/src/main/"
11309 (mkdir "build")
11310 (with-directory-excursion "java"
11311 (apply invoke "javac" "-cp"
11312 (string-append (getenv "CLASSPATH")
11313 ":../../../../../build/classes")
11314 (find-files "." ".*.java"))
11315 (for-each (lambda (file) (install-file file (string-append "../build/" file)))
11316 (find-files "." ".*.jar")))
11317 (mkdir-p "build/META-INF/plexus")
11318 (copy-file "resources/META-INF/plexus/components.xml"
11319 "build/META-INF/plexus/components.xml")
11320 (with-directory-excursion "build"
11321 (invoke "jar" "cf" "../../../component-jar-0.1.jar" ".")))
11322 (with-directory-excursion "org.eclipse.sisu.plexus.tests/"
11323 (copy-recursively "META-INF" "../build/test-classes/META-INF")
11324 (substitute* "java/org/eclipse/sisu/plexus/DefaultPlexusContainerTest.java"
11325 (("resources/component-jar")
11326 "org.eclipse.sisu.plexus.tests/resources/component-jar")))
11327 #t)))))
11328 (inputs
11329 `(("java-plexus-classworlds" ,java-plexus-classworlds)
11330 ("java-plexus-util" ,java-plexus-utils)
11331 ("java-plexus-component-annotations" ,java-plexus-component-annotations)
11332 ("java-osgi-framework" ,java-osgi-framework)
11333 ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)
11334 ("java-guice" ,java-guice)
11335 ("java-javax-inject" ,java-javax-inject)
11336 ("java-slf4j-api" ,java-slf4j-api)
11337 ("java-junit" ,java-junit)))
11338 (native-inputs
11339 `(("java-guava" ,java-guava)
11340 ("java-aopalliance" ,java-aopalliance)
11341 ("java-cglib" ,java-cglib)
11342 ("java-asm" ,java-asm)))
11343 (home-page "https://www.eclipse.org/sisu/")
11344 (synopsis "Plexus support for the sisu container")
11345 (description "Sisu is a modular JSR330-based container that supports
11346classpath scanning, auto-binding, and dynamic auto-wiring. This package
11347adds Plexus support to the Sisu-Inject container.")
11348 (license license:epl1.0)))
3fa18fe7
JL
11349
11350(define-public java-commons-compiler
11351 (package
11352 (name "java-commons-compiler")
11353 (version "3.0.8")
11354 (source (origin
11355 (method git-fetch)
11356 (uri (git-reference
11357 (url "https://github.com/janino-compiler/janino")
11358 (commit "91aa95686d1e4ca3b16a984a03a38686572331b2")))
11359 (file-name (string-append name "-" version))
11360 (sha256
11361 (base32
11362 "04hfdl59sgh20qkxzgnibvs8f9hy6n7znxwpk611y5d89977y62r"))
11363 (modules '((guix build utils)))
11364 (snippet
11365 '(begin
11366 (for-each delete-file
11367 (find-files "." "\\.jar$"))
11368 #t))))
11369 (build-system ant-build-system)
11370 (arguments
11371 `(#:jar-name "commons-compiler.jar"
11372 #:source-dir "commons-compiler/src/main"
11373 #:tests? #f)); no tests
11374 (home-page "https://github.com/janino-compiler/janino")
11375 (synopsis "Java compiler")
11376 (description "Commons-compiler contains an API for janino, including the
11377@code{IExpressionEvaluator}, @code{IScriptEvaluator}, @code{IClassBodyEvaluator}
11378and @code{ISimpleCompiler} interfaces.")
11379 (license license:bsd-3)))
3402e651
JL
11380
11381(define-public java-janino
11382 (package
11383 (inherit java-commons-compiler)
11384 (name "java-janino")
11385 (arguments
11386 `(#:jar-name "janino.jar"
11387 #:source-dir "src/main/java"
11388 #:phases
11389 (modify-phases %standard-phases
11390 (add-before 'configure 'chdir
11391 (lambda _
2c8ac364
MW
11392 (chdir "janino")
11393 #t)))))
3402e651
JL
11394 (inputs
11395 `(("java-commons-compiler" ,java-commons-compiler)))
11396 (native-inputs
11397 `(("java-junit" ,java-junit)
11398 ("java-hamcrest-core" ,java-hamcrest-core)))
11399 (description "Janino is a Java compiler. Janino can compile a set of
11400source files to a set of class files like @code{javac}, but also compile a
11401Java expression, block, class body or source file in memory, load the bytecode
11402and execute it directly in the same JVM. @code{janino} can also be used for
11403static code analysis or code manipulation.")))
7d8207a4
JL
11404
11405(define-public java-logback-core
11406 (package
11407 (name "java-logback-core")
11408 (version "1.2.3")
11409 (source (origin
11410 (method url-fetch)
11411 (uri (string-append "https://github.com/qos-ch/logback/archive/v_"
11412 version ".tar.gz"))
b1ccd2a1 11413 (file-name (string-append name "-" version ".tar.gz"))
7d8207a4
JL
11414 (sha256
11415 (base32
11416 "1x6ga74yfgm94cfx98gybakbrlilx8i2gn6dx13l40kasmys06mi"))
11417 (modules '((guix build utils)))
11418 (snippet
2c8ac364
MW
11419 '(begin
11420 (delete-file-recursively "logback-access/lib")
11421 #t))))
7d8207a4
JL
11422 (build-system ant-build-system)
11423 (arguments
11424 `(#:jar-name "logback.jar"
11425 #:source-dir "src/main/java"
11426 #:test-dir "src/test"
11427 #:test-exclude
11428 ;; These tests fail with Unable to set MockitoNamingPolicy on cglib generator
11429 ;; which creates FastClasses
11430 (list "**/AllCoreTest.*"
11431 "**/AutoFlushingObjectWriterTest.*"
11432 "**/PackageTest.*"
11433 "**/ResilientOutputStreamTest.*"
11434 ;; And we still don't want to run abstract classes
11435 "**/Abstract*.*")
11436 #:phases
11437 (modify-phases %standard-phases
11438 (add-before 'configure 'chdir
11439 (lambda _
11440 (chdir "logback-core")
11441 #t)))))
11442 (inputs
11443 `(("java-javax-mail" ,java-javax-mail)
4b472f6a 11444 ("servlet" ,java-javaee-servletapi)
7d8207a4
JL
11445 ("java-commons-compiler" ,java-commons-compiler)
11446 ("java-janino" ,java-janino)))
11447 (native-inputs
11448 `(("java-junit" ,java-junit)
11449 ("java-hamcrest-core" ,java-hamcrest-core)
11450 ("java-mockito-1" ,java-mockito-1)
11451 ("java-cglib" ,java-cglib)
11452 ("java-asm" ,java-asm)
11453 ("java-objenesis" ,java-objenesis)
11454 ("java-joda-time" ,java-joda-time)))
11455 (home-page "https://logback.qos.ch")
11456 (synopsis "Logging for java")
11457 (description "Logback is intended as a successor to the popular log4j project.
11458This module lays the groundwork for the other two modules.")
11459 ;; Either epl1.0 or lgpl2.1
11460 (license (list license:epl1.0
11461 license:lgpl2.1))))
3a69f5f2
JL
11462
11463(define-public java-logback-classic
11464 (package
11465 (inherit java-logback-core)
11466 (name "java-logback-classic")
11467 (arguments
11468 `(#:jar-name "logback-classic.jar"
11469 #:source-dir "src/main/java"
11470 #:test-dir "src/test"
11471 #:tests? #f; tests require more packages: h2, greenmail, hsql, subethamail, slf4j, log4j, felix
11472 #:jdk ,icedtea-8
11473 #:phases
11474 (modify-phases %standard-phases
11475 (add-before 'configure 'chdir
11476 (lambda _
11477 (chdir "logback-classic")
11478 #t))
11479 (replace 'build
11480 (lambda* (#:key inputs #:allow-other-keys)
11481 (mkdir-p "build/classes")
11482 (setenv "CLASSPATH"
11483 (string-join
11484 (apply append (map (lambda (input)
11485 (find-files (assoc-ref inputs input)
11486 ".*.jar"))
11487 '("java-logback-core" "java-slf4j-api"
4b472f6a 11488 "java-commons-compiler" "servlet"
3a69f5f2
JL
11489 "groovy")))
11490 ":"))
11491 (apply invoke "groovyc" "-d" "build/classes" "-j"
11492 (find-files "src/main/" ".*\\.(groovy|java)$"))
11493 (invoke "ant" "jar")
11494 #t)))))
11495 (inputs
11496 `(("java-logback-core" ,java-logback-core)
11497 ("java-slf4j-api" ,java-slf4j-api)
11498 ,@(package-inputs java-logback-core)))
11499 (native-inputs
11500 `(("groovy" ,groovy)))
11501 (description "Logback is intended as a successor to the popular log4j project.
11502This module can be assimilated to a significantly improved version of log4j.
11503Moreover, @code{logback-classic} natively implements the slf4j API so that you
11504can readily switch back and forth between logback and other logging frameworks
11505such as log4j or @code{java.util.logging} (JUL).")))
ab621bf1 11506
c786dff0
LC
11507(define-public java-jgit
11508 (package
11509 (name "java-jgit")
11510 (version "4.7.0.201704051617-r")
11511 (source (origin
11512 (method url-fetch)
11513 (uri (string-append "https://repo1.maven.org/maven2/"
11514 "org/eclipse/jgit/org.eclipse.jgit/"
11515 version "/org.eclipse.jgit-"
11516 version "-sources.jar"))
11517 (sha256
11518 (base32
11519 "13ii4jn02ynzq6i7gsyi21k2i94jpc85wf6bcm31q4cyvzv0mk4k"))))
11520 (build-system ant-build-system)
11521 (arguments
11522 `(#:tests? #f ; There are no tests to run.
11523 #:jar-name "jgit.jar"
11524 ;; JGit must be built with a JDK supporting Java 8.
11525 #:jdk ,icedtea-8
11526 ;; Target our older default JDK.
11527 #:make-flags (list "-Dtarget=1.7")
11528 #:phases
11529 (modify-phases %standard-phases
11530 ;; The jar file generated by the default build.xml does not include
11531 ;; the text properties files, so we need to add them.
11532 (add-after 'build 'add-properties
11533 (lambda* (#:key jar-name #:allow-other-keys)
11534 (with-directory-excursion "src"
11535 (apply invoke "jar" "-uf"
11536 (string-append "../build/jar/" jar-name)
11537 (find-files "." "\\.properties$")))
11538 #t)))))
11539 (inputs
11540 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
11541 ("java-javaewah" ,java-javaewah)
11542 ("java-jsch" ,java-jsch)
11543 ("java-slf4j-api" ,java-slf4j-api)))
11544 (home-page "https://eclipse.org/jgit/")
11545 (synopsis "Java library implementing the Git version control system")
11546 (description "JGit is a lightweight, pure Java library implementing the
11547Git version control system, providing repository access routines, support for
11548network protocols, and core version control algorithms.")
11549 (license license:edl1.0)))
11550
11551;; For axoloti. This package can still be built with icedtea-7, which is
11552;; currently used as the default JDK.
11553(define-public java-jgit-4.2
11554 (package (inherit java-jgit)
11555 (version "4.2.0.201601211800-r")
11556 (source (origin
11557 (method url-fetch)
11558 (uri (string-append "https://repo1.maven.org/maven2/"
11559 "org/eclipse/jgit/org.eclipse.jgit/"
11560 version "/org.eclipse.jgit-"
11561 version "-sources.jar"))
11562 (sha256
11563 (base32
11564 "15gm537iivhnzlkjym4x3wn5jqdjdragsw9pdpzqqg21nrc817mm"))))
11565 (build-system ant-build-system)
11566 (arguments
11567 (substitute-keyword-arguments (package-arguments java-jgit)
11568 ;; Build for default JDK.
11569 ((#:jdk _) icedtea-7)
11570 ((#:phases phases)
11571 `(modify-phases ,phases
11572 (add-after 'unpack 'use-latest-javaewah-API
11573 (lambda _
11574 (substitute* "src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java"
11575 (("wordinbits") "WORD_IN_BITS"))
11576 #t))))))
11577 (inputs
11578 `(("java-javaewah" ,java-javaewah)
11579 ("java-jsch" ,java-jsch)
11580 ("java-slf4j-api" ,java-slf4j-api)))))
717b6ba6
CZ
11581
11582(define-public abcl
11583 (package
11584 (name "abcl")
514001e9 11585 (version "1.6.0")
717b6ba6
CZ
11586 (source
11587 (origin
11588 (method url-fetch)
11589 (uri (string-append "https://abcl.org/releases/"
11590 version "/abcl-src-" version ".tar.gz"))
11591 (sha256
11592 (base32
514001e9 11593 "0hvbcsffr8n2xwdixc8wyw1bfl9fxn2gyy0c4nma7j9zbn0wwgw9"))
717b6ba6
CZ
11594 (patches
11595 (search-patches
11596 "abcl-fix-build-xml.patch"))))
11597 (build-system ant-build-system)
11598 (native-inputs
11599 `(("java-junit" ,java-junit)))
11600 (arguments
11601 `(#:build-target "abcl.jar"
11602 #:test-target "abcl.test"
11603 #:phases
11604 (modify-phases %standard-phases
11605 (replace 'install
11606 (lambda* (#:key outputs #:allow-other-keys)
11607 (let ((share (string-append (assoc-ref outputs "out")
11608 "/share/java/"))
11609 (bin (string-append (assoc-ref outputs "out")
11610 "/bin/")))
11611 (mkdir-p share)
11612 (install-file "dist/abcl.jar" share)
11613 (install-file "dist/abcl-contrib.jar" share)
11614 (mkdir-p bin)
11615 (with-output-to-file (string-append bin "abcl")
11616 (lambda _
11617 (let ((classpath (string-append
11618 share "abcl.jar"
11619 ":"
11620 share "abcl-contrib.jar")))
11621 (display (string-append
11622 "#!" (which "sh") "\n"
11623 "if [[ -z $CLASSPATH ]]; then\n"
11624 " cp=\"" classpath "\"\n"
11625 "else\n"
11626 " cp=\"" classpath ":$CLASSPATH\"\n"
11627 "fi\n"
11628 "exec " (which "java")
11629 " -cp $cp org.armedbear.lisp.Main $@\n")))))
11630 (chmod (string-append bin "abcl") #o755)
11631 #t))))))
11632 (home-page "https://abcl.org/")
11633 (synopsis "Common Lisp Implementation on the JVM")
11634 (description
11635 "@dfn{Armed Bear Common Lisp} (ABCL) is a full implementation of the Common
11636Lisp language featuring both an interpreter and a compiler, running in the
11637JVM. It supports JSR-223 (Java scripting API): it can be a scripting engine
11638in any Java application. Additionally, it can be used to implement (parts of)
11639the application using Java to Lisp integration APIs.")
11640 (license (list license:gpl2+
11641 ;; named-readtables is released under 3 clause BSD
11642 license:bsd-3
11643 ;; jfli is released under CPL 1.0
11644 license:cpl1.0))))
da655b1e
JL
11645
11646(define-public java-jsonp-api
11647 (package
11648 (name "java-jsonp-api")
83c4c502 11649 (version "1.1.6")
da655b1e
JL
11650 (source (origin
11651 (method git-fetch)
11652 (uri (git-reference
11653 (url "https://github.com/eclipse-ee4j/jsonp")
83c4c502 11654 (commit (string-append "1.1-" version "-RELEASE"))))
da655b1e
JL
11655 (file-name (git-file-name name version))
11656 (sha256
11657 (base32
83c4c502 11658 "0zrj03hkr3jdmqlb4ipjr37cqpp2q2814qpmxi7srlwpdqs0ibgc"))))
da655b1e
JL
11659 (build-system ant-build-system)
11660 (arguments
11661 `(#:jar-name "jsonp-api.jar"
11662 #:tests? #f
11663 #:source-dir "api/src/main/java"
11664 #:test-dir "api/src/test"))
11665 (home-page "https://eclipse-ee4j.github.io/jsonp/")
11666 (synopsis "JSON Processing in Java")
11667 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
11668parse, generate, transform and query) JSON messages. It produces and
11669consumes JSON text in a streaming fashion (similar to StAX API for XML)
44a057a1 11670and allows building a Java object model for JSON text using API classes
da655b1e
JL
11671(similar to DOM API for XML).")
11672 ;; either gpl2 only with classpath exception, or epl2.0.
11673 (license (list license:gpl2
11674 license:epl2.0))))
d45f73c9
JL
11675
11676(define-public java-jsonp-impl
11677 (package
11678 (inherit java-jsonp-api)
11679 (name "java-jsonp-impl")
11680 (arguments
11681 `(#:jar-name "jsonp-impl.jar"
11682 #:tests? #f
11683 #:source-dir "impl/src/main/java"
83c4c502
JL
11684 #:test-dir "impl/src/test"
11685 #:phases
11686 (modify-phases %standard-phases
11687 (add-before 'build 'copy-resources
11688 (lambda _
11689 (copy-recursively
11690 "impl/src/main/resources/"
11691 "build/classes")
11692 #t)))))
d45f73c9
JL
11693 (propagated-inputs
11694 `(("java-jsonp-api" ,java-jsonp-api)))
11695 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
11696parse, generate, transform and query) JSON messages. This package contains
11697a reference implementation of that API.")))
357f4564
JL
11698
11699(define-public java-xmp
11700 (package
11701 (name "java-xmp")
11702 (version "5.1.3")
11703 (source (origin
11704 (method url-fetch)
11705 (uri (string-append "http://download.macromedia.com/pub/developer"
11706 "/xmp/sdk/XMPCoreJava-" version ".zip"))
11707 (sha256
11708 (base32
11709 "14nai2mmsg7l5ya2y5mx4w4lr1az3sk2fjz6hiy4zdrsavgvl1g7"))))
11710 (build-system ant-build-system)
11711 (arguments
11712 `(#:build-target "build"
11713 #:tests? #f; no tests
11714 #:phases
11715 (modify-phases %standard-phases
11716 (add-after 'unpack 'chdir
11717 (lambda _
11718 (chdir "XMPCore")
11719 #t))
11720 (add-before 'build 'fix-timestamp
11721 (lambda _
11722 (substitute* "build.xml"
11723 (("\\$\\{BuildDate\\}") "1970 Jan 01 00:00:00-GMT"))
11724 #t))
11725 (replace 'install
11726 (install-jars "."))
11727 (add-after 'install 'install-doc
11728 (lambda* (#:key outputs #:allow-other-keys)
11729 (copy-recursively
11730 "docs"
11731 (string-append (assoc-ref outputs "out") "/share/doc/java-xmp"))
11732 #t)))))
11733 (native-inputs
11734 `(("unzip" ,unzip)))
11735 (home-page "https://www.adobe.com/devnet/xmp.html")
11736 (synopsis "Extensible Metadat Platform (XMP) support in Java")
11737 (description "Adobe's Extensible Metadata Platform (XMP) is a labeling
11738technology that allows you to embed data about a file, known as metadata,
11739into the file itself. The XMP Toolkit for Java is based on the C++ XMPCore
11740library and the API is similar.")
11741 (license license:bsd-3)))
a005c63a
JL
11742
11743(define-public java-metadata-extractor
11744 (package
11745 (name "java-metadata-extractor")
11746 (version "2.11.0")
11747 (source (origin
11748 (method git-fetch)
11749 (uri (git-reference
11750 (url "https://github.com/drewnoakes/metadata-extractor")
11751 (commit version)))
11752 (file-name (git-file-name name version))
11753 (sha256
11754 (base32
11755 "06yrq0swrl1r40yjbk5kqzjxr04jlkq9lfi711jvfgjf5kp2qinj"))))
11756 (build-system ant-build-system)
11757 (arguments
11758 `(#:jar-name "metadata-extractor.jar"
11759 #:source-dir "Source"
11760 #:test-dir "Tests"
11761 #:phases
11762 (modify-phases %standard-phases
11763 (add-before 'check 'fix-test-dir
11764 (lambda _
11765 (substitute* "build.xml"
11766 (("/java\">") "\">"))
11767 #t)))))
11768 (propagated-inputs
11769 `(("java-xmp" ,java-xmp)))
11770 (native-inputs
11771 `(("java-hamcrest-core" ,java-hamcrest-core)
11772 ("java-junit" ,java-junit)))
11773 (home-page "https://github.com/drewnoakes/metadata-extractor")
11774 (synopsis "Extract metadata from image and video files")
11775 (description "Metadata-extractor is a straightforward Java library for
11776reading metadata from image files. It is able to read metadata in Exif,
11777IPTC, XMP, ICC and more formats.")
11778 (license license:asl2.0)))
0dd6089d
JL
11779
11780(define-public java-svg-salamander
11781 (package
11782 (name "java-svg-salamander")
11783 (version "1.1.2")
11784 (source (origin
11785 (method git-fetch)
11786 (uri (git-reference
11787 (url "https://github.com/blackears/svgSalamander")
11788 (commit (string-append "v" version))))
11789 (file-name (git-file-name name version))
11790 (sha256
11791 (base32
11792 "1zv3kjdkf6iqf02x6ln76254y634j2ji448y706a65lsbfjmmicf"))
11793 (modules '((guix build utils)))
11794 (snippet
58c3a4f5
BH
11795 '(begin
11796 (for-each delete-file (find-files "." ".*.jar"))
11797 #t))
0dd6089d
JL
11798 (patches
11799 (search-patches "java-svg-salamander-Fix-non-det.patch"))))
11800 (build-system ant-build-system)
11801 (arguments
11802 `(#:tests? #f; no tests
11803 #:phases
11804 (modify-phases %standard-phases
11805 (add-after 'unpack 'chdir
11806 (lambda _
11807 (chdir "svg-core")
11808 #t))
11809 (add-before 'build 'copy-jars
11810 (lambda* (#:key inputs #:allow-other-keys)
11811 (copy-file (car (find-files (assoc-ref inputs "javacc") "\\.jar$"))
11812 "../libraries/javacc.jar")
11813 (copy-file (car (find-files (assoc-ref inputs "ant") "ant\\.jar$"))
11814 "../libraries/ant.jar")
11815 #t))
11816 (replace 'install
11817 (install-jars "dist")))))
11818 (native-inputs
11819 `(("javacc" ,javacc)))
11820 (home-page "https://github.com/blackears/svgSalamander")
11821 (synopsis "SVG engine for Java")
11822 (description "SVG Salamander is an SVG engine for Java that's designed
11823to be small, fast, and allow programmers to use it with a minimum of fuss.
11824It's in particular targeted for making it easy to integrate SVG into Java
11825games and making it much easier for artists to design 2D game content - from
11826rich interactive menus to charts and graphcs to complex animations.")
11827 (license license:bsd-2)))
ff56e6ef
JL
11828
11829(define-public java-jboss-transaction-api-spec
11830 (package
11831 (name "java-jboss-transaction-api-spec")
11832 (version "1.2+1.1.1")
11833 (source (origin
11834 (method git-fetch)
11835 (uri (git-reference
11836 (url "https://github.com/jboss/jboss-transaction-api_spec")
11837 (commit "jboss-transaction-api_1.2_spec-1.1.1.Final")))
11838 (file-name (git-file-name name version))
11839 (sha256
11840 (base32
11841 "1xbfq5hvb86izflydxrqqv3k26c1ba2m0ap6m97shqrsdi9by4wy"))))
11842 (build-system ant-build-system)
11843 (arguments
11844 `(#:jar-name "java-jboss-transaction-api_spec.jar"
11845 #:source-dir "src/main/java"
11846 #:tests? #f)); no tests
11847 (inputs
11848 `(("java-cdi-api" ,java-cdi-api)
11849 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)))
11850 (home-page "https://github.com/jboss/jboss-transaction-api_spec")
11851 (synopsis "Generic transaction management API in Java")
11852 (description "Java-jboss-transaction-api-spec implements the Transactions
11853API. A transaction is a unit of work containing one or more operations
11854involving one or more shared resources having ACID (Atomicity, Consistency,
11855Isolation and Durability) properties.")
11856 ;; either gpl2 only with classpath exception or cddl.
11857 (license (list license:gpl2 license:cddl1.0))))