gnu: Add libwhich.
[jackhill/guix/guix.git] / gnu / packages / java.scm
CommitLineData
0760e3a1 1;;; GNU Guix --- Functional package management for GNU
84b226c2 2;;; Copyright © 2015, 2016, 2017, 2018, 2019 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
1811 (for-each delete-file (find-files "." ".*.bin$"))
1812 (for-each delete-file (find-files "." ".*.exe$"))
1813 (for-each delete-file (find-files "." ".*.jar$"))
1814 #t))))
1815 (build-system gnu-build-system)
1816 (outputs '("out" "jdk" "doc"))
1817 (arguments
1818 `(#:tests? #f; require jtreg
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))
1843 (replace 'build
1844 (lambda _
1845 (with-output-to-file ".src-rev"
1846 (lambda _
1847 (display ,version)))
1848 (setenv "GUIX_LD_WRAPPER_ALLOW_IMPURITIES" "yes")
1849 (invoke "make" "all")
1850 #t))
1851 ;; Some of the libraries in the lib/ folder link to libjvm.so.
1852 ;; But that shared object is located in the server/ folder, so it
1853 ;; cannot be found. This phase creates a symbolic link in the
1854 ;; lib/ folder so that the other libraries can find it.
1855 ;;
1856 ;; See:
1857 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1858 ;;
1859 ;; FIXME: Find the bug in the build system, so that this symlink is
1860 ;; not needed.
1861 (add-after 'install 'install-libjvm
1862 (lambda* (#:key inputs outputs #:allow-other-keys)
1863 (let* ((lib-out (string-append (assoc-ref outputs "out")
1864 "/lib"))
1865 (lib-jdk (string-append (assoc-ref outputs "jdk")
1866 "/lib")))
1867 (symlink (string-append lib-jdk "/server/libjvm.so")
1868 (string-append lib-jdk "/libjvm.so"))
1869 (symlink (string-append lib-out "/server/libjvm.so")
1870 (string-append lib-out "/libjvm.so")))
1871 #t))
1872 (replace 'install
1873 (lambda* (#:key outputs #:allow-other-keys)
1874 (let ((out (assoc-ref outputs "out"))
1875 (jdk (assoc-ref outputs "jdk"))
1876 (doc (assoc-ref outputs "doc"))
1877 (images (car (find-files "build" ".*-server-release"
1878 #:directories? #t))))
1879 (copy-recursively (string-append images "/images/jdk") jdk)
1880 (copy-recursively (string-append images "/images/jre") out)
1881 (copy-recursively (string-append images "/images/docs") doc))
1882 #t))
1883 (add-after 'install 'strip-zip-timestamps
1884 (lambda* (#:key outputs #:allow-other-keys)
1885 (use-modules (guix build syscalls))
1886 (for-each (lambda (zip)
1887 (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
1888 (with-directory-excursion dir
1889 (invoke "unzip" zip))
1890 (delete-file zip)
1891 (for-each (lambda (file)
1892 (let ((s (lstat file)))
1893 (unless (eq? (stat:type s) 'symlink)
1894 (format #t "reset ~a~%" file)
1895 (utime file 0 0 0 0))))
1896 (find-files dir #:directories? #t))
1897 (with-directory-excursion dir
1898 (let ((files (find-files "." ".*" #:directories? #t)))
1899 (apply invoke "zip" "-0" "-X" zip files)))))
1900 (find-files (assoc-ref outputs "doc") ".*.zip$"))
1901 #t)))))
1902 (inputs
1903 `(("alsa-lib" ,alsa-lib)
1904 ("cups" ,cups)
1905 ("fontconfig" ,fontconfig)
1906 ("freetype" ,freetype)
1907 ("giflib" ,giflib)
1908 ("lcms" ,lcms)
1909 ("libelf" ,libelf)
4bd428a7 1910 ("libjpeg" ,libjpeg-turbo)
dd741059
JL
1911 ("libice" ,libice)
1912 ("libpng" ,libpng)
1913 ("libx11" ,libx11)
1914 ("libxcomposite" ,libxcomposite)
1915 ("libxi" ,libxi)
1916 ("libxinerama" ,libxinerama)
1917 ("libxrender" ,libxrender)
1918 ("libxt" ,libxt)
1919 ("libxtst" ,libxtst)))
1920 (native-inputs
1921 `(("icedtea-8" ,icedtea-8)
1922 ("icedtea-8:jdk" ,icedtea-8 "jdk")
5fd0c288
MB
1923 ;; XXX: The build system is not particularly parallel safe and
1924 ;; fails with newer versions of GNU Make.
1925 ("make@4.2" ,gnu-make-4.2)
dd741059
JL
1926 ("unzip" ,unzip)
1927 ("which" ,which)
1928 ("zip" ,zip)))
1929 (home-page "https://openjdk.java.net/projects/jdk9/")
1930 (synopsis "Java development kit")
1931 (description
1932 "This package provides the Java development kit OpenJDK.")
1933 (license license:gpl2+)))
1934
16b89ecc
JL
1935(define-public openjdk10
1936 (package
1937 (inherit openjdk9)
1938 (name "openjdk")
1939 (version "10.46")
1940 (source (origin
1941 (method url-fetch)
1942 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/6fa770f9f8ab.tar.bz2")
1943 (file-name (string-append name "-" version ".tar.bz2"))
1944 (sha256
1945 (base32
1946 "0zywq2203b4hx4jms9vbwvjcj1d3k2v3qpx4s33729fkpmid97r4"))
accb5c31
GB
1947 (patches (search-patches
1948 "openjdk-10-idlj-reproducibility.patch"))
16b89ecc
JL
1949 (modules '((guix build utils)))
1950 (snippet
1951 `(begin
1952 (for-each delete-file (find-files "." ".*.bin$"))
1953 (for-each delete-file (find-files "." ".*.exe$"))
1954 (for-each delete-file (find-files "." ".*.jar$"))
1955 #t))))
1956 (arguments
1957 (substitute-keyword-arguments (package-arguments openjdk9)
1958 ((#:phases phases)
1959 `(modify-phases ,phases
1960 (replace 'fix-java-shebangs
1961 (lambda _
1962 ;; This file was "fixed" by patch-source-shebangs, but it requires
1963 ;; this exact first line.
1964 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1965 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
1966 #t))
1967 (replace 'configure
1968 (lambda* (#:key inputs outputs #:allow-other-keys)
1969 (invoke "bash" "./configure"
1970 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
1971 "--disable-freetype-bundling"
1972 "--disable-warnings-as-errors"
1973 "--disable-hotspot-gtest"
1974 "--with-giflib=system"
1975 "--with-libjpeg=system"
1976 "--with-native-debug-symbols=zipped"
1977 (string-append "--prefix=" (assoc-ref outputs "out")))
1978 #t))))))
1979 (native-inputs
1980 `(("openjdk9" ,openjdk9)
1981 ("openjdk9:jdk" ,openjdk9 "jdk")
5fd0c288 1982 ("make@4.2" ,gnu-make-4.2)
16b89ecc
JL
1983 ("unzip" ,unzip)
1984 ("which" ,which)
1985 ("zip" ,zip)))))
1986
95bc85b7
GB
1987(define-public openjdk11
1988 (package
1989 (name "openjdk")
1990 (version "11.28")
1991 (source (origin
1992 (method url-fetch)
1993 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/76072a077ee1.tar.bz2")
1994 (file-name (string-append name "-" version ".tar.bz2"))
1995 (sha256
1996 (base32
1997 "0v705w1s9lrqalzahir78pk397rkk9gfvzq821yv8h3xha0bqi6w"))
1998 (modules '((guix build utils)))
1999 (snippet
2000 `(begin
2001 (for-each delete-file (find-files "." ".*.bin$"))
2002 (for-each delete-file (find-files "." ".*.exe$"))
2003 (for-each delete-file (find-files "." ".*.jar$"))
2004 #t))))
2005 (build-system gnu-build-system)
2006 (outputs '("out" "jdk" "doc"))
2007 (arguments
2008 `(#:imported-modules
2009 ((guix build syscalls)
2010 (ice-9 binary-ports)
2011 (rnrs bytevectors)
2012 ,@%gnu-build-system-modules)
2013 #:tests? #f; requires jtreg
2014 ;; TODO package jtreg
2015 ;; disable parallel builds, as the openjdk build system does not like -j
2016 #:parallel-build? #f
2017 #:parallel-tests? #f
2018 ;; reenable parallel builds and tests by adding the flags manually
2019 #:make-flags (list (string-append "JOBS=" (number->string (parallel-job-count))))
2020 #:configure-flags
2021 `("--disable-option-checking" ; --enable-fast-install default flag errors otherwise
2022 "--disable-warnings-as-errors"
2023 ;; make validate-runpath pass, see: http://issues.guix.info/issue/32894
2024 "--with-native-debug-symbols=zipped"
2025 ;; do not use the bundled libraries
2026 "--with-giflib=system"
2027 "--with-lcms=system"
2028 "--with-libjpeg=system"
2029 "--with-libpng=system"
70d23edf 2030 "--with-version-pre="
95bc85b7
GB
2031 ;; allow the build system to locate the system freetype
2032 ,(string-append "--with-freetype-include="
2033 (assoc-ref %build-inputs "freetype") "/include")
2034 ,(string-append "--with-freetype-lib="
2035 (assoc-ref %build-inputs "freetype") "/lib"))
2036 ;; TODO
2037 #:phases
2038 (modify-phases %standard-phases
2039 (add-after 'patch-source-shebangs 'fix-java-shebangs
2040 (lambda _
2041 ;; This file was "fixed" by patch-source-shebangs, but it requires
2042 ;; this exact first line.
2043 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
2044 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
2045 #t))
2046 (replace 'build
2047 (lambda _
2048 (with-output-to-file ".src-rev"
2049 (lambda _
2050 (display ,version)))
2051 (setenv "GUIX_LD_WRAPPER_ALLOW_IMPURITIES" "yes")
2052 (invoke "make" "all")
2053 #t))
2054 ;; jdk 11 does not build jre by default any more
2055 ;; building it anyways
2056 ;; for further information see:
2057 ;; https://github.com/AdoptOpenJDK/openjdk-build/issues/356
2058 (add-after 'build 'build-jre
2059 (lambda _
2060 (invoke "make" "legacy-jre-image")
2061 #t))
2062 (replace 'install
2063 (lambda* (#:key outputs #:allow-other-keys)
2064 (let ((out (assoc-ref outputs "out"))
2065 (jdk (assoc-ref outputs "jdk"))
2066 (doc (assoc-ref outputs "doc"))
2067 (images (car (find-files "build" ".*-server-release"
2068 #:directories? #t))))
2069 (copy-recursively (string-append images "/images/jdk") jdk)
2070 (copy-recursively (string-append images "/images/jre") out)
2071 (copy-recursively (string-append images "/images/docs") doc))
2072 #t))
2073 ;; Some of the libraries in the lib/ folder link to libjvm.so.
2074 ;; But that shared object is located in the server/ folder, so it
2075 ;; cannot be found. This phase creates a symbolic link in the
2076 ;; lib/ folder so that the other libraries can find it.
2077 ;;
2078 ;; See:
2079 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
2080 ;;
2081 ;; FIXME: Find the bug in the build system, so that this symlink is
2082 ;; not needed.
2083 (add-after 'install 'install-libjvm
2084 (lambda* (#:key inputs outputs #:allow-other-keys)
2085 (let* ((lib-out (string-append (assoc-ref outputs "out")
2086 "/lib"))
2087 (lib-jdk (string-append (assoc-ref outputs "jdk")
2088 "/lib")))
2089 (symlink (string-append lib-jdk "/server/libjvm.so")
2090 (string-append lib-jdk "/libjvm.so"))
2091 (symlink (string-append lib-out "/server/libjvm.so")
2092 (string-append lib-out "/libjvm.so")))
2093 #t))
2094 (add-after 'install 'strip-character-data-timestamps
2095 (lambda* (#:key outputs #:allow-other-keys)
2096 (use-modules (guix build syscalls))
2097 (let ((archive (string-append
2098 (assoc-ref outputs "jdk") "/lib/src.zip"))
2099 (dir (mkdtemp! "zip-contents.XXXXXX")))
2100 (with-directory-excursion dir
2101 (invoke "unzip" archive))
2102 (delete-file archive)
2103 (with-directory-excursion dir
2104 (let ((char-data-files (find-files "." "CharacterData.*")))
2105 (for-each (lambda (file)
2106 (substitute* file
2107 (((string-append "This file was generated "
2108 "AUTOMATICALLY from a template "
2109 "file.*"))
2110 (string-append "This file was generated "
2111 "AUTOMATICALLY from a template "
2112 "file"))))
2113 char-data-files)))
2114 (with-directory-excursion dir
2115 (let ((files (find-files "." ".*" #:directories? #t)))
2116 (apply invoke "zip" "-0" "-X" archive files))))))
2117 (add-after 'strip-character-data-timestamps 'strip-archive-timestamps
2118 (lambda* (#:key outputs #:allow-other-keys)
2119 (use-modules (guix build syscalls)
2120 (ice-9 binary-ports)
2121 (rnrs bytevectors))
2122 (letrec ((repack-archive
2123 (lambda (archive)
2124 (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
2125 (with-directory-excursion dir
2126 (invoke "unzip" archive))
2127 (delete-file archive)
2128 (for-each (compose repack-archive canonicalize-path)
2129 (find-files dir "(ct.sym|.*.jar)$"))
2130 (let ((reset-file-timestamp
2131 (lambda (file)
2132 (let ((s (lstat file)))
2133 (unless (eq? (stat:type s) 'symlink)
2134 (format #t "reset ~a~%" file)
2135 (utime file 0 0 0 0))))))
2136 (for-each reset-file-timestamp
2137 (find-files dir #:directories? #t)))
2138 (with-directory-excursion dir
2139 (let ((files (find-files "." ".*" #:directories? #t)))
2140 (apply invoke "zip" "-0" "-X" archive files)))))))
2141 (for-each repack-archive
2142 (find-files (assoc-ref outputs "doc") ".*.zip$"))
2143 (for-each repack-archive
2144 (find-files (assoc-ref outputs "jdk")
2145 ".*.(zip|jar|diz)$"))
2146 (repack-archive (string-append (assoc-ref outputs "jdk") "/lib/ct.sym"))
2147 (let ((repack-jmod
2148 (lambda (file-name)
2149 (call-with-input-file file-name
2150 (lambda (file)
2151 (let ((header #vu8(#x4a #x4d #x01 #x00)))
2152 (if (equal? (get-bytevector-n
2153 file (bytevector-length header))
2154 header)
2155 (let* ((header-length (bytevector-length header))
2156 (temp-file (mkstemp!
2157 (string-copy
2158 "temp-file.XXXXXX")))
2159 (temp-filename (port-filename temp-file))
2160 (content-length
2161 (- (stat:size (stat file))
2162 header-length)))
2163 (sendfile temp-file file content-length header-length)
2164 (delete-file file-name)
2165 (close-port temp-file)
2166 (repack-archive (canonicalize-path temp-filename))
2167 (call-with-output-file file-name
2168 (lambda (file)
2169 (put-bytevector file header)
2170 (call-with-input-file temp-filename
2171 (lambda (temp-file)
2172 (sendfile
2173 file temp-file
2174 (stat:size (stat temp-file)) 0)))))))))))))
2175 (for-each repack-jmod
2176 (find-files (assoc-ref outputs "jdk") ".*.jmod$")))
2177 #t)))
2178 (add-after 'install 'remove-timestamp-from-api-summary
2179 (lambda* (#:key outputs #:allow-other-keys)
2180 (substitute* (string-append (assoc-ref outputs "doc")
2181 "/api/overview-summary.html")
2182 (("Generated by javadoc \\(11-internal\\).*$")
2183 "Generated by javadoc (11-internal) -->\n"))
2184 #t)))))
2185 (inputs
2186 `(("alsa-lib" ,alsa-lib)
2187 ("cups" ,cups)
2188 ("fontconfig" ,fontconfig)
2189 ("freetype" ,freetype)
2190 ("giflib" ,giflib)
2191 ("lcms" ,lcms)
4bd428a7 2192 ("libjpeg" ,libjpeg-turbo)
95bc85b7
GB
2193 ("libpng" ,libpng)
2194 ("libx11" ,libx11)
2195 ("libxext" ,libxext)
2196 ("libxrender" ,libxrender)
2197 ("libxt" ,libxt)
2198 ("libxtst" ,libxtst)))
2199 (native-inputs
2200 `(("autoconf" ,autoconf)
2201 ("openjdk10" ,openjdk10)
2202 ("openjdk10:jdk" ,openjdk10 "jdk")
5fd0c288 2203 ("make" ,gnu-make-4.2)
95bc85b7
GB
2204 ("pkg-config" ,pkg-config)
2205 ("unzip" ,unzip)
2206 ("which" ,which)
2207 ("zip" ,zip)))
2208 (home-page "https://openjdk.java.net/projects/jdk/11/")
2209 (synopsis "Java development kit")
2210 (description
2211 "This package provides the Java development kit OpenJDK.")
2212 (license license:gpl2+)))
2213
64dc8e9e
GB
2214(define-public openjdk12
2215 (package
2216 (inherit openjdk11)
2217 (name "openjdk")
2218 (version "12.33")
2219 (source (origin
2220 (method url-fetch)
2221 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/0276cba45aac.tar.bz2")
2222 (file-name (string-append name "-" version ".tar.bz2"))
2223 (sha256
2224 (base32
2225 "0mbhdrk12b6878kby0flnbak7444dlpm0ihlmf92vk59y1c02bc2"))
2226 (modules '((guix build utils)))
2227 (snippet
2228 `(begin
2229 (for-each delete-file (find-files "." ".*.bin$"))
2230 (for-each delete-file (find-files "." ".*.exe$"))
2231 (for-each delete-file (find-files "." ".*.jar$"))
2232 #t))))
2233 (inputs
2234 `(("alsa-lib" ,alsa-lib)
2235 ("cups" ,cups)
2236 ("fontconfig" ,fontconfig)
2237 ("freetype" ,freetype)
2238 ("giflib" ,giflib)
2239 ("lcms" ,lcms)
4bd428a7 2240 ("libjpeg" ,libjpeg-turbo)
64dc8e9e
GB
2241 ("libpng" ,libpng)
2242 ("libx11" ,libx11)
2243 ("libxext" ,libxext)
2244 ("libxrandr" ,libxrandr)
2245 ("libxrender" ,libxrender)
2246 ("libxt" ,libxt)
2247 ("libxtst" ,libxtst)))
2248 (native-inputs
2249 `(("autoconf" ,autoconf)
2250 ("openjdk11" ,openjdk11)
2251 ("openjdk11:jdk" ,openjdk11 "jdk")
5fd0c288 2252 ("make@4.2" ,gnu-make-4.2)
64dc8e9e
GB
2253 ("pkg-config" ,pkg-config)
2254 ("unzip" ,unzip)
2255 ("which" ,which)
2256 ("zip" ,zip)))
2257 (home-page "https://openjdk.java.net/projects/jdk/12")))
2258
33aa65e0 2259(define-public icedtea icedtea-8)
068e476f 2260
5490480c 2261\f
8bbd0408
RW
2262(define-public ant/java8
2263 (package (inherit ant-bootstrap)
2264 (name "ant")
2265 (version "1.10.1")
2266 (source (origin
2267 (method url-fetch)
2268 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2269 version "-src.tar.gz"))
2270 (sha256
2271 (base32
2272 "10p3dh77lkzzzcy32dk9azljixzadp46fggjfbvgkl8mmb8cxxv8"))
2273 (modules '((guix build utils)))
2274 (snippet
2275 '(begin
2276 (for-each delete-file
2277 (find-files "lib/optional" "\\.jar$"))
2278 #t))))
2279 (arguments
2280 (substitute-keyword-arguments (package-arguments ant-bootstrap)
2281 ((#:phases phases)
2282 `(modify-phases ,phases
2283 (add-after 'unpack 'remove-scripts
2284 ;; Remove bat / cmd scripts for DOS as well as the antRun and runant
2285 ;; wrappers.
2286 (lambda _
2287 (for-each delete-file
2288 (find-files "src/script"
2289 "(.*\\.(bat|cmd)|runant.*|antRun.*)"))
2290 #t))
2291 (replace 'build
2292 (lambda* (#:key inputs outputs #:allow-other-keys)
2293 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
2294
2295 ;; Disable tests to avoid dependency on hamcrest-core, which needs
2296 ;; Ant to build. This is necessary in addition to disabling the
2297 ;; "check" phase, because the dependency on "test-jar" would always
2298 ;; result in the tests to be run.
2299 (substitute* "build.xml"
2300 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
2c8ac364
MW
2301 (invoke "bash" "bootstrap.sh"
2302 (string-append "-Ddist.dir="
2303 (assoc-ref outputs "out")))))))))
8bbd0408 2304 (native-inputs
1c7ef07e
GB
2305 `(("jdk" ,icedtea-8 "jdk")
2306 ("zip" ,zip)
2307 ("unzip" ,unzip)))))
8bbd0408 2308
e441fc56
RW
2309;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x series
2310;; requires Java 8.
2311(define-public ant
2312 (package (inherit ant/java8)
2313 (version "1.9.9")
2314 (source (origin
2315 (method url-fetch)
2316 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2317 version "-src.tar.gz"))
2318 (sha256
2319 (base32
2320 "1k28mka0m3isy9yr8gz84kz1f3f879rwaxrd44vdn9xbfwvwk86n"))))
2321 (native-inputs
3b6ba18b
GB
2322 `(("jdk" ,icedtea-7 "jdk")
2323 ("zip" ,zip)
2324 ("unzip" ,unzip)))))
e441fc56 2325
9ce7ac99
RW
2326(define-public ant-apache-bcel
2327 (package
2328 (inherit ant/java8)
2329 (name "ant-apache-bcel")
2330 (arguments
2331 (substitute-keyword-arguments (package-arguments ant/java8)
2332 ((#:phases phases)
2333 `(modify-phases ,phases
2334 (add-after 'unpack 'link-bcel
2335 (lambda* (#:key inputs #:allow-other-keys)
2336 (for-each (lambda (file)
2337 (symlink file
2338 (string-append "lib/optional/"
2339 (basename file))))
2340 (find-files (assoc-ref inputs "java-commons-bcel")
2341 "\\.jar$"))
2342 #t))
2343 (add-after 'build 'install
2344 (lambda* (#:key outputs #:allow-other-keys)
2345 (let* ((out (assoc-ref outputs "out"))
2346 (share (string-append out "/share/java"))
2347 (bin (string-append out "/bin"))
2348 (lib (string-append out "/lib")))
2349 (mkdir-p share)
2350 (install-file (string-append lib "/ant-apache-bcel.jar") share)
2351 (delete-file-recursively bin)
2352 (delete-file-recursively lib)
2353 #t)))))))
2354 (inputs
2355 `(("java-commons-bcel" ,java-commons-bcel)
2356 ,@(package-inputs ant/java8)))))
2357
fa6c4213
RW
2358(define-public ant-junit
2359 (package
2360 (inherit ant/java8)
2361 (name "ant-junit")
2362 (arguments
2363 (substitute-keyword-arguments (package-arguments ant/java8)
2364 ((#:phases phases)
2365 `(modify-phases ,phases
2366 (add-after 'unpack 'link-junit
2367 (lambda* (#:key inputs #:allow-other-keys)
2368 (for-each (lambda (file)
2369 (symlink file
2370 (string-append "lib/optional/"
2371 (basename file))))
2372 (find-files (assoc-ref inputs "java-junit")
2373 "\\.jar$"))
2374 #t))
2375 (add-after 'build 'install
2376 (lambda* (#:key outputs #:allow-other-keys)
2377 (let* ((out (assoc-ref outputs "out"))
2378 (share (string-append out "/share/java"))
2379 (bin (string-append out "/bin"))
2380 (lib (string-append out "/lib")))
2381 (mkdir-p share)
2382 (install-file (string-append lib "/ant-junit.jar") share)
2383 (delete-file-recursively bin)
2384 (delete-file-recursively lib)
2385 #t)))))))
2386 (inputs
2387 `(("java-junit" ,java-junit)
2388 ,@(package-inputs ant/java8)))))
2389
7214fbd2
JL
2390(define-public java-openjfx-build
2391 (package
2392 (name "java-openjfx-build")
2393 ;; This is a java-8 version
2394 (version "8.202")
2395 (source (origin
2396 (method hg-fetch)
2397 (uri (hg-reference
2398 (url "http://hg.openjdk.java.net/openjfx/8u-dev/rt")
2399 (changeset (string-append
2400 (string-join (string-split version #\.) "u")
2401 "-ga"))))
2402 (file-name (string-append name "-" version "-checkout"))
2c2b1ef8
BH
2403 (modules '((guix build utils)))
2404 (snippet
2405 '(begin
2406 ;; Delete included gradle jar
2407 (delete-file-recursively "gradle/wrapper")
2408 #t))
7214fbd2
JL
2409 (sha256
2410 (base32
2411 "0yg38mwpivswccv9n96k06x3iv82i4px1a9xg9l8dswzwmfj259f"))))
2412 (build-system ant-build-system)
2413 (arguments
2414 `(#:jar-name "java-openjfx.jar"
2415 #:source-dir "buildSrc/src/main/java"
2416 #:test-dir "buildSrc/src/test"
2417 #:phases
2418 (modify-phases %standard-phases
2419 (add-before 'configure 'generate-jsl-parser
2420 (lambda _
2421 (invoke "antlr3" "-o"
2422 "buildSrc/src/main/java/com/sun/scenario/effect/compiler"
2423 "buildSrc/src/main/antlr/JSL.g"))))))
2424 (inputs
2425 `(("antlr3" ,antlr3)
2426 ("java-stringtemplate" ,java-stringtemplate)))
2427 (native-inputs
2428 `(("java-junit" ,java-junit)
2429 ("java-hamcrest-core" ,java-hamcrest-core)))
2430 (home-page "https://openjfx.io")
2431 (synopsis "Graphical application toolkit in Java")
2432 (description "OpenJFX is a client application platform for desktop,
2433mobile and embedded systems built on Java. Its goal is to produce a
2434modern, efficient, and fully featured toolkit for developing rich client
2435applications. This package contains base classes for the OpenJFX
2436distribution and helper classes for building other parts of the
2437distribution.")
2438 (license license:gpl2))) ;gpl2 only, with classpath exception
2439
46f05439
JL
2440(define-public java-openjfx-base
2441 (package (inherit java-openjfx-build)
2442 (name "java-openjfx-base")
2443 (arguments
2444 `(#:jar-name "java-openjfx-base.jar"
2445 #:source-dir "modules/base/src/main/java:modules/base/src/main/java8:modules/base/src/main/version-info"
2446 #:test-dir "modules/base/src/test"
2447 #:phases
2448 (modify-phases %standard-phases
2449 (add-before 'check 'remove-empty-file
2450 (lambda _
2451 (with-directory-excursion "modules/base/src/test/java"
2452 ;; These files are completely commented, but junit expects them to
2453 ;; contain a class, so tests fail.
2454 (delete-file
2455 "com/sun/javafx/property/adapter/PropertyDescriptorTest.java")
2456 (delete-file
2457 "com/sun/javafx/property/adapter/ReadOnlyPropertyDescriptorTest.java")
2458 (delete-file "javafx/beans/property/PropertiesTest.java")
2459 (delete-file
2460 "javafx/beans/property/adapter/ReadOnlyJavaBeanPropertyBuilder_General_Test.java")
2461 ;; This one fails
2462 (delete-file "com/sun/javafx/runtime/VersionInfoTest.java"))
2463 #t)))))
2464 (propagated-inputs
2465 `(("java-openjfx-build" ,java-openjfx-build)))
2466 (description "OpenJFX is a client application platform for desktop,
2467mobile and embedded systems built on Java. Its goal is to produce a
2468modern, efficient, and fully featured toolkit for developing rich client
2469applications. This package contains base classes for the OpenJFX
2470distribution.")))
36f73d70
JL
2471
2472(define-public java-openjfx-graphics
2473 (package (inherit java-openjfx-build)
2474 (name "java-openjfx-graphics")
2475 (arguments
2476 `(#:jar-name "java-openjfx-graphics.jar"
2477 #:source-dir "modules/graphics/src/main/java"
2478 #:tests? #f; require X
2479 #:test-dir "modules/graphics/src/test"))
2480 (propagated-inputs
2481 `(("java-openjfx-base" ,java-openjfx-base)
2482 ("java-swt" ,java-swt)))
2483 (description "OpenJFX is a client application platform for desktop,
2484mobile and embedded systems built on Java. Its goal is to produce a
2485modern, efficient, and fully featured toolkit for developing rich client
2486applications. This package contains graphics-related classes for the
2487OpenJFX distribution.")))
68a13319
JL
2488
2489(define-public java-openjfx-media
2490 (package (inherit java-openjfx-build)
2491 (name "java-openjfx-media")
2492 (propagated-inputs
2493 `(("java-openjxf-graphics" ,java-openjfx-graphics)))
2494 (arguments
2495 `(#:jar-name "java-openjfx-media.jar"
2496 #:source-dir "modules/media/src/main/java"
2497 #:tests? #f)); no tests
2498 (description "OpenJFX is a client application platform for desktop,
2499mobile and embedded systems built on Java. Its goal is to produce a
2500modern, efficient, and fully featured toolkit for developing rich client
2501applications. This package contains media-related classes for the
2502OpenJFX distribution.")))
46f05439 2503
53fb0476 2504(define-public javacc-4
fc8d100b
RW
2505 (package
2506 (name "javacc")
53fb0476 2507 (version "4.1")
fc8d100b 2508 (source (origin
53fb0476
AV
2509 (method git-fetch)
2510 (uri (git-reference
2511 (url "https://github.com/javacc/javacc.git")
2512 (commit "release_41")))
2513 (file-name (string-append "javacc-" version "-checkout"))
fc8d100b
RW
2514 (sha256
2515 (base32
6662d65f
AV
2516 "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0"))
2517 (modules '((guix build utils)))
2518 ;; delete bundled jars
2519 (snippet '(begin (delete-file-recursively "lib") #t))))
fc8d100b 2520 (build-system ant-build-system)
53fb0476
AV
2521 ;; Tests fail with
2522 ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60:
2523 ;; JAVACODE failed
fc8d100b 2524 (arguments
53fb0476 2525 `(#:tests? #f
fc8d100b
RW
2526 #:phases
2527 (modify-phases %standard-phases
6662d65f
AV
2528 ;; Delete tests to avoid build failure (we don't run them anyway).
2529 (add-after 'unpack 'delete-tests
fc8d100b 2530 (lambda _
6662d65f
AV
2531 (for-each delete-file
2532 '("src/org/javacc/JavaCCTestCase.java"
2533 "src/org/javacc/parser/ExpansionTest.java"
2534 "src/org/javacc/parser/OptionsTest.java"
2535 "src/org/javacc/jjtree/JJTreeOptionsTest.java"))
2536 (for-each delete-file-recursively
2537 '("src/org/javacc/parser/test"
2538 "src/org/javacc/jjdoc/test"))
2539 #t))
53fb0476 2540 (replace 'install (install-jars "bin/lib")))))
fc8d100b
RW
2541 (home-page "https://javacc.org/")
2542 (synopsis "Java parser generator")
2543 (description "Java Compiler Compiler (JavaCC) is the most popular parser
2544generator for use with Java applications. A parser generator is a tool that
2545reads a grammar specification and converts it to a Java program that can
2546recognize matches to the grammar. In addition to the parser generator itself,
2547JavaCC provides other standard capabilities related to parser generation such
2548as tree building (via a tool called JJTree included with JavaCC), actions,
2549debugging, etc.")
2550 (license license:bsd-3)))
2551
53fb0476
AV
2552(define-public javacc
2553 (package
2554 (inherit javacc-4)
6b66e470 2555 (version "7.0.4")
ebf8048d
TGR
2556 (source
2557 (origin
2558 (method git-fetch)
2559 (uri (git-reference
2560 (url "https://github.com/javacc/javacc.git")
2561 (commit version)))
2562 (file-name (git-file-name "javacc" version))
2563 (sha256
2564 (base32 "18kkak3gda93gr25jrgy6q00g0jr8i24ri2wk4kybz1v234fxx9i"))
2565 (modules '((guix build utils)))
2566 ;; Delete bundled jars.
2567 (snippet '(begin (for-each delete-file-recursively
2568 '("bootstrap" "lib"))
2569 #t))))
6688c41e 2570 (arguments
6b66e470 2571 `(#:make-flags ; bootstrap from javacc-4
33428d12
AV
2572 (list (string-append "-Dbootstrap-jar="
2573 (assoc-ref %build-inputs "javacc")
2574 "/share/java/javacc.jar"))
2575 #:test-target "test"
6688c41e
RW
2576 #:phases
2577 (modify-phases %standard-phases
16fdf2f5
JL
2578 (replace 'install (install-jars "target"))
2579 (add-after 'install 'install-bin
2580 (lambda* (#:key outputs inputs #:allow-other-keys)
2581 (let* ((out (assoc-ref outputs "out"))
2582 (dir (string-append out "/share/java"))
2583 (bin (string-append out "/bin"))
2584 (javacc (string-append bin "/javacc")))
2585 (mkdir-p bin)
2586 (with-output-to-file javacc
2587 (lambda _
2588 (display
2589 (string-append "#!/bin/sh\n"
2590 (assoc-ref inputs "jdk") "/bin/java"
2591 " -cp " dir "/javacc.jar" " `basename $0`" " $*"))))
2592 (chmod javacc #o755)
2593 ;; symlink to different names to affect the first argument and
2594 ;; change the behavior of the jar file.
2595 (symlink javacc (string-append bin "/jjdoc"))
2596 (symlink javacc (string-append bin "/jjtree"))
2597 #t))))))
2598
33428d12
AV
2599 (native-inputs
2600 `(("javacc" ,javacc-4)))))
6688c41e 2601
c1cb8576
RW
2602;; This is the last 3.x release of ECJ
2603(define-public java-ecj-3
2604 (package
2605 (name "java-ecj")
2606 (version "3.8.2")
2607 (source (origin
2608 (method url-fetch)
2609 (uri (string-append "http://archive.eclipse.org/eclipse/"
2610 "downloads/drops/R-" version
2611 "-201301310800/ecjsrc-" version ".jar"))
2612 (sha256
2613 (base32
2614 "01mdj14jw11g1jfnki4fi8229p0c6zzckd38zqy2w4m3cjcvsx04"))))
2615 (build-system ant-build-system)
2616 (arguments
2617 `(#:tests? #f ; none included
2618 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2619 #:make-flags (list "-f" "src/build.xml")
2620 #:build-target "build"
2621 #:phases
2622 (modify-phases %standard-phases
2623 (add-after 'unpack 'fix-manifest
2624 (lambda _
2625 ;; Record the main class to make ecj executable.
2626 (with-atomic-file-replacement "src/META-INF/MANIFEST.MF"
2627 (lambda (in out)
2628 (display "Manifest-Version: 1.0
2629Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2c8ac364
MW
2630 out)))
2631 #t))
c1cb8576
RW
2632 (replace 'install (install-jars ".")))))
2633 (home-page "https://eclipse.org")
2634 (synopsis "Eclipse Java development tools core batch compiler")
2635 (description "This package provides the Eclipse Java core batch compiler.")
2636 (license license:epl1.0)))
2637
f201b18e
RW
2638;; This is needed for java-cisd-args4j
2639(define-public java-ecj-3.5
2640 (package (inherit java-ecj-3)
2641 (version "3.5.1")
2642 (source (origin
2643 (method url-fetch/zipbomb)
2644 (uri (string-append "http://archive.eclipse.org/eclipse/"
2645 "downloads/drops/R-" version
2646 "-200909170800/ecjsrc-" version ".zip"))
2647 (sha256
2648 (base32
2649 "1vnl2mavisc567bip736xzsvvbjif5279wc4a7pbdik5wlir8qr7"))))
2650 (build-system ant-build-system)
2651 (arguments
2652 `(#:tests? #f ; none included
2653 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2654 #:build-target "build"
2655 #:phases
2656 (modify-phases %standard-phases
2657 (add-after 'unpack 'fix-manifest
2658 (lambda _
2659 ;; Record the main class to make ecj executable.
2660 (with-atomic-file-replacement "META-INF/MANIFEST.MF"
2661 (lambda (in out)
2662 (dump-port in out)
2663 (display "Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2c8ac364
MW
2664 out)))
2665 #t))
f201b18e
RW
2666 (replace 'install (install-jars ".")))))
2667 (native-inputs
2668 `(("unzip" ,unzip)))))
2669
bc3497a5
BH
2670(define-public java-ecj
2671 (package (inherit java-ecj-3)
2672 (version "4.6.3")
2673 (source
2674 (origin
2675 (method url-fetch)
2676 (uri (string-append
2677 "http://archive.eclipse.org/eclipse/downloads/drops4/R-"
2678 version
2679 "-201703010400/ecjsrc-"
2680 version
2681 ".jar"))
2682 (sha256
2683 (base32
2684 "11cfgsdgznja1pvlxkjbqykxd7pcd5655vkm7s44xmahmap15gpl"))))
2685 (arguments
2686 `(#:tests? #f ; none included
2687 #:build-target "build"
2688 #:phases
2689 (modify-phases %standard-phases
2690 (add-after 'unpack 'fix-build.xml
2691 (lambda _
2692 (substitute* "src/build.xml"
2693 (("^.*MANIFEST.*$")
2694 ""))
2695 #t))
2696 (add-after 'unpack 'fix-prop
2697 (lambda _
2698 (substitute* "src/build.xml"
2699 (("^.*properties.*$")
2700 "<include name=\"**/*.properties\"/>
2701 <include name=\"**/*.props\"/>"))
2702 #t))
2703 (add-before 'build 'chdir
2704 (lambda _
2705 (chdir "src")
2706 #t))
2707 (replace 'install (install-jars ".")))))))
2708
30d55473
RW
2709(define-public java-cisd-base
2710 (let ((revision 38938)
2711 (base-version "14.12.0"))
2712 (package
2713 (name "java-cisd-base")
2714 (version (string-append base-version "-" (number->string revision)))
2715 (source (origin
2716 (method svn-fetch)
2717 (uri (svn-reference
2718 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2719 "base/tags/release/"
2720 (version-major+minor base-version)
2721 ".x/" base-version "/base/"))
2722 (revision revision)))
2723 (file-name (string-append "java-cisd-base-" version "-checkout"))
2724 (sha256
2725 (base32
2726 "1i5adyf7nzclb0wydgwa1az04qliid8035vpahaandmkmigbnxiy"))
2727 (modules '((guix build utils)))
2728 (snippet
2729 '(begin
2730 ;; Delete included gradle jar
2731 (delete-file-recursively "gradle/wrapper")
2732 ;; Delete pre-built native libraries
2733 (delete-file-recursively "libs")
2734 #t))))
2735 (build-system ant-build-system)
2736 (arguments
2737 `(#:make-flags '("-file" "build/build.xml")
2738 #:test-target "jar-test"
2739 #:jdk ,icedtea-8
2740 #:phases
2741 (modify-phases %standard-phases
2742 (add-after 'unpack 'unpack-build-resources
2743 (lambda* (#:key inputs #:allow-other-keys)
2744 (copy-recursively (assoc-ref inputs "build-resources")
2745 "../build_resources")
2746 #t))
2747 (add-after 'unpack-build-resources 'fix-dependencies
2748 (lambda* (#:key inputs #:allow-other-keys)
2749 (substitute* "build/build.xml"
2750 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2751 (string-append (assoc-ref inputs "java-testng")
2752 "/share/java/java-testng.jar"))
2753 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2754 (string-append (assoc-ref inputs "java-commons-lang")
2755 "/share/java/commons-lang-"
2756 ,(package-version java-commons-lang) ".jar"))
2757 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2758 (string-append (assoc-ref inputs "java-commons-io")
2759 "/share/java/commons-io-"
2760 ,(package-version java-commons-io)
2761 "-SNAPSHOT.jar"))
2762 ;; Remove dependency on svn
2763 (("<build-info.*") "")
2764 (("\\$\\{revision.number\\}")
2765 ,(number->string revision))
2766 (("\\$\\{version.number\\}") ,base-version))
2767 ;; Remove dependency on classycle
2768 (substitute* "../build_resources/ant/build-common.xml"
2769 (("<taskdef name=\"dependency-checker.*") "")
2770 (("classname=\"classycle.*") "")
2771 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2772 #t))
2773 ;; A few tests fail because of the lack of a proper /etc/groups and
2774 ;; /etc/passwd file in the build container.
2775 (add-after 'unpack 'disable-broken-tests
2776 (lambda _
2777 (substitute* "sourceTest/java/ch/systemsx/cisd/base/AllTests.java"
2778 (("Unix.isOperational\\(\\)") "false"))
2779 #t))
2780 ;; These decorators are almost useless and pull in an unpackaged
2781 ;; dependency.
2782 (add-after 'unpack 'remove-useless-decorators
2783 (lambda _
2784 (substitute* "source/java/ch/systemsx/cisd/base/unix/Unix.java"
2785 (("@Private") "")
2786 (("import ch.rinn.restrictions.Private;") ""))
2787 (substitute* "sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java"
2788 (("@Friend.*") "")
2789 (("import ch.rinn.restrictions.Friend;") ""))
2790 #t))
2791 (add-before 'configure 'build-native-code
2792 (lambda* (#:key inputs #:allow-other-keys)
2793 (let ((jdk (assoc-ref inputs "jdk"))
2794 (dir ,(match (%current-system)
2795 ("i686-linux"
2796 "i386-Linux")
2797 ((or "armhf-linux" "aarch64-linux")
2798 "arm-Linux")
2799 ((or "x86_64-linux")
2800 "amd64-Linux")
2801 (_ "unknown-Linux"))))
2802 (with-directory-excursion "source/c"
2803 (invoke "gcc" "-shared" "-O3" "-fPIC" "unix.c"
2804 (string-append "-I" jdk "/include")
2805 (string-append "-I" jdk "/include/linux")
2806 "-o" "libunix.so")
2807 (invoke "gcc" "-shared" "-O3" "-fPIC"
2808 "-DMACHINE_BYTE_ORDER=1"
2809 "copyCommon.c"
2810 "copyByteChar.c"
2811 "copyByteDouble.c"
2812 "copyByteFloat.c"
2813 "copyByteInt.c"
2814 "copyByteLong.c"
2815 "copyByteShort.c"
2816 (string-append "-I" jdk "/include")
2817 (string-append "-I" jdk "/include/linux")
2818 "-o" "libnativedata.so"))
2819 (install-file "source/c/libunix.so"
2820 (string-append "libs/native/unix/" dir))
2821 (install-file "source/c/libnativedata.so"
2822 (string-append "libs/native/nativedata/" dir))
2823 #t)))
2824 ;; In the "check" phase we only build the test executable.
2825 (add-after 'check 'run-tests
2826 (lambda _
2827 (invoke "java" "-jar" "targets/dist/sis-base-test.jar")
2828 (delete-file "targets/dist/sis-base-test.jar")
2829 #t))
2830 (replace 'install (install-jars "targets/dist")))))
2831 (native-inputs
2832 `(("jdk" ,icedtea-8)
2833 ("java-commons-lang" ,java-commons-lang)
2834 ("java-commons-io" ,java-commons-io)
2835 ("java-testng" ,java-testng)
2836 ("build-resources"
2837 ,(origin
2838 (method svn-fetch)
2839 (uri (svn-reference
2840 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2841 "base/tags/release/"
2842 (version-major+minor base-version)
2843 ".x/" base-version
2844 "/build_resources/"))
2845 (revision revision)))
2846 (sha256
2847 (base32
2848 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
2849 (home-page "http://svnsis.ethz.ch")
2850 (synopsis "Utility classes for libraries from ETH Zurich")
2851 (description "This library supplies some utility classes needed for
2852libraries from the SIS division at ETH Zurich like jHDF5.")
2853 ;; The C sources are under a non-copyleft license, which looks like a
2854 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
2855 (license (list license:asl2.0
2856 (license:non-copyleft "file://source/c/COPYING"))))))
2857
04ddca26
RW
2858(define-public java-cisd-args4j
2859 (let ((revision 39162)
2860 (base-version "9.11.2"))
2861 (package
2862 (name "java-cisd-args4j")
2863 (version (string-append base-version "-" (number->string revision)))
2864 (source (origin
2865 (method svn-fetch)
2866 (uri (svn-reference
2867 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2868 "args4j/tags/release/"
2869 (version-major+minor base-version)
2870 ".x/" base-version "/args4j/"))
2871 (revision revision)))
2872 (file-name (string-append "java-cisd-args4j-" version "-checkout"))
2873 (sha256
2874 (base32
2875 "0hhqznjaivq7ips7mkwas78z42s6djsm20rrs7g1zd59rcsakxn2"))))
2876 (build-system ant-build-system)
2877 (arguments
2878 `(#:make-flags '("-file" "build/build.xml")
2879 #:tests? #f ; there are no tests
2880 ;; There are weird build failures with JDK8, such as: "The type
2881 ;; java.io.ObjectInputStream cannot be resolved. It is indirectly
2882 ;; referenced from required .class files"
2883 #:jdk ,icedtea-7
2884 #:modules ((guix build ant-build-system)
2885 (guix build utils)
2886 (guix build java-utils)
2887 (sxml simple)
2888 (sxml transform)
2889 (sxml xpath))
2890 #:phases
2891 (modify-phases %standard-phases
2892 (add-after 'unpack 'unpack-build-resources
2893 (lambda* (#:key inputs #:allow-other-keys)
2894 (mkdir-p "../build_resources")
2895 (invoke "tar" "xf" (assoc-ref inputs "build-resources")
2896 "-C" "../build_resources"
2897 "--strip-components=1")
2898 (mkdir-p "../build_resources/lib")
2899 #t))
2900 (add-after 'unpack-build-resources 'fix-dependencies
2901 (lambda* (#:key inputs #:allow-other-keys)
2902 ;; FIXME: There should be a more convenient abstraction for
2903 ;; editing XML files.
2904 (with-directory-excursion "../build_resources/ant/"
2905 (chmod "build-common.xml" #o664)
2906 (call-with-output-file "build-common.xml.new"
2907 (lambda (port)
2908 (sxml->xml
2909 (pre-post-order
2910 (with-input-from-file "build-common.xml"
2911 (lambda _ (xml->sxml #:trim-whitespace? #t)))
2912 `(;; Remove dependency on classycle and custom ant tasks
2913 (taskdef . ,(lambda (tag . kids)
2914 (let ((name ((sxpath '(name *text*)) kids)))
2915 (if (or (member "build-info" name)
2916 (member "dependency-checker" name)
2917 (member "build-java-subprojects" name)
2918 (member "project-classpath" name))
2919 '() ; skip
2920 `(,tag ,@kids)))))
2921 (typedef . ,(lambda (tag . kids)
2922 (let ((name ((sxpath '(name *text*)) kids)))
2923 (if (member "recursive-jar" name)
2924 '() ; skip
2925 `(,tag ,@kids)))))
2926 (build-java-subprojects . ,(lambda _ '()))
2927 ;; Ignore everything else
2928 (*default* . ,(lambda (tag . kids) `(,tag ,@kids)))
2929 (*text* . ,(lambda (_ txt) txt))))
2930 port)))
2931 (rename-file "build-common.xml.new" "build-common.xml"))
2932 (substitute* "build/build.xml"
2933 (("\\$\\{lib\\}/cisd-base/cisd-base.jar")
2934 (string-append (assoc-ref inputs "java-cisd-base")
2935 "/share/java/sis-base.jar"))
2936 ;; Remove dependency on svn
2937 (("<build-info.*") "")
2938 (("\\$\\{revision.number\\}")
2939 ,(number->string revision))
2940 (("\\$\\{version.number\\}") ,base-version)
2941 ;; Don't use custom ant tasks.
2942 (("recursive-jar") "jar")
2943 (("<project-classpath.*") ""))
2944 #t))
2945 (replace 'install (install-jars "targets/dist")))))
2946 (inputs
2947 `(("java-cisd-base" ,java-cisd-base)))
2948 (native-inputs
2949 `(("ecj" ,java-ecj-3.5)
2950 ("build-resources"
2951 ,(origin
2952 (method svn-fetch)
2953 (uri (svn-reference
2954 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2955 "args4j/tags/release/"
2956 (version-major+minor base-version)
2957 ".x/" base-version
2958 "/build_resources/"))
2959 (revision revision)))
2960 (sha256
2961 (base32
2962 "056cam4k8pll7ass31sy6gwn8g8719njc41yf4l02b0342nilkyf"))
2963 (modules '((guix build utils)))
2964 ;; Delete bundled pre-built jars.
2965 (snippet
2966 '(begin (delete-file-recursively "lib/") #t))))))
2967 (home-page "http://svnsis.ethz.ch")
2968 (synopsis "Command line parser library")
2969 (description "This package provides a parser for command line arguments.")
2970 (license license:asl2.0))))
2971
2f0d0418
RW
2972(define-public java-cisd-jhdf5
2973 (let ((revision 39162)
2974 (base-version "14.12.6"))
2975 (package
2976 (name "java-cisd-jhdf5")
2977 (version (string-append base-version "-" (number->string revision)))
2978 (source (origin
2979 (method svn-fetch)
2980 (uri (svn-reference
2981 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2982 "jhdf5/tags/release/"
2983 (version-major+minor base-version)
2984 ".x/" base-version "/jhdf5/"))
2985 (revision revision)))
2986 (file-name (string-append "java-cisd-jhdf5-" version "-checkout"))
2987 (sha256
2988 (base32
2989 "13i17s2hn0q9drdqvp8csy7770p3hdbh9rp30ihln2ldkfawdmz0"))
2990 (modules '((guix build utils)))
2991 (snippet
2992 '(begin
2993 ;; Delete included gradle jar
2994 (delete-file-recursively "gradle/wrapper")
2995 ;; Delete pre-built native libraries
2996 (delete-file-recursively "libs")
2997 #t))))
2998 (build-system ant-build-system)
2999 (arguments
3000 `(#:make-flags '("-file" "build/build.xml")
3001 #:build-target "jar-all"
3002 #:test-target "jar-test"
3003 #:jdk ,icedtea-8
3004 #:phases
3005 (modify-phases %standard-phases
1ed386fc
RW
3006 ;; FIXME: this build phase fails.
3007 (delete 'generate-jar-indices)
2f0d0418
RW
3008 ;; Don't erase results from the build phase when building tests.
3009 (add-after 'unpack 'separate-test-target-from-clean
3010 (lambda _
3011 (substitute* "build/build.xml"
3012 (("\"jar-test\" depends=\"clean, ")
3013 "\"jar-test\" depends=\""))
3014 #t))
3015 (add-after 'unpack 'unpack-build-resources
3016 (lambda* (#:key inputs #:allow-other-keys)
3017 (copy-recursively (assoc-ref inputs "build-resources")
3018 "../build_resources")
3019 (delete-file-recursively "../build_resources/lib/")
3020 (mkdir-p "../build_resources/lib")
3021 ;; Remove dependency on classycle
3022 (substitute* "../build_resources/ant/build-common.xml"
3023 (("<taskdef name=\"dependency-checker.*") "")
3024 (("classname=\"classycle.*") "")
3025 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
3026 ;; Remove dependency on svn
3027 (substitute* "build/build.xml"
3028 (("<build-info.*") "")
3029 (("\\$\\{revision.number\\}")
3030 ,(number->string revision))
3031 (("\\$\\{version.number\\}") ,base-version))
3032 #t))
3033 (add-after 'unpack-build-resources 'fix-dependencies
3034 (lambda* (#:key inputs #:allow-other-keys)
3035 (substitute* "../build_resources/ant/build-common.xml"
3036 (("../libraries/testng/testng-jdk15.jar")
3037 (string-append (assoc-ref inputs "java-testng")
3038 "/share/java/java-testng.jar")))
3039 (substitute* "build/build.xml"
3040 (("\\$\\{lib\\}/sis-base/sis-base.jar")
3041 (string-append (assoc-ref inputs "java-cisd-base")
3042 "/share/java/sis-base.jar"))
3043 (("\\$\\{lib\\}/cisd-args4j/cisd-args4j.jar")
3044 (string-append (assoc-ref inputs "java-cisd-args4j")
3045 "/share/java/cisd-args4j.jar"))
3046 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
3047 (string-append (assoc-ref inputs "java-commons-lang")
3048 "/share/java/commons-lang-"
3049 ,(package-version java-commons-lang) ".jar"))
3050 (("\\$\\{lib\\}/commons-io/commons-io.jar")
3051 (string-append (assoc-ref inputs "java-commons-io")
3052 "/share/java/commons-io-"
3053 ,(package-version java-commons-io)
3054 "-SNAPSHOT.jar"))
3055 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
3056 (string-append (assoc-ref inputs "java-testng")
3057 "/share/java/java-testng.jar"))
3058 (("\\$\\{lib\\}/junit4/junit.jar")
3059 (string-append (assoc-ref inputs "java-junit")
3060 "/share/java/junit.jar"))
3061 (("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar")
3062 (string-append (assoc-ref inputs "java-hamcrest-core")
3063 "/share/java/hamcrest-core.jar")))
3064 ;; Remove dependency on ch.rinn.restrictions
3065 (with-directory-excursion "source/java/ch/systemsx/cisd/hdf5/"
3066 (substitute* '("BitSetConversionUtils.java"
3067 "HDF5Utils.java")
3068 (("import ch.rinn.restrictions.Private;") "")
3069 (("@Private") "")))
3070 (with-directory-excursion "sourceTest/java/ch/systemsx/cisd/hdf5/"
3071 (substitute* '("BitSetConversionTest.java"
3072 "h5ar/HDF5ArchiverTest.java")
3073 (("import ch.rinn.restrictions.Friend;") "")
3074 (("@Friend.*") ""))
3075 ;; Remove leftovers from removing @Friend
3076 (substitute* "h5ar/HDF5ArchiverTest.java"
3077 (("\\{ HDF5Archiver.class, IdCache.class, LinkRecord.class \\}\\)")
3078 "")))
3079 #t))
3080 (add-before 'configure 'build-native-library
3081 (lambda* (#:key inputs #:allow-other-keys)
3082 (let ((jdk (assoc-ref inputs "jdk"))
3083 (hdf5 (assoc-ref inputs "hdf5"))
3084 (dir ,(match (%current-system)
3085 ("i686-linux"
3086 "i386-Linux")
3087 ((or "armhf-linux" "aarch64-linux")
3088 "arm-Linux")
3089 ((or "x86_64-linux")
3090 "amd64-Linux")
3091 (_ "unknown-Linux"))))
3092 (with-directory-excursion "source/c"
3093 (apply invoke `("gcc" "-shared" "-O3"
3094 "-fPIC"
3095 "-Wl,--exclude-libs,ALL"
3096 ,@(find-files "jhdf5" "\\.c$")
3097 ,@(find-files "hdf-java" "\\.c$")
3098 ,(string-append "-I" hdf5 "/include")
3099 ,(string-append "-I" jdk "/include")
3100 ,(string-append "-I" jdk "/include/linux")
3101 ,(string-append hdf5 "/lib/libhdf5.a")
3102 "-o" "libjhdf5.so" "-lz")))
3103 (install-file "source/c/libjhdf5.so"
3104 (string-append "libs/native/jhdf5/" dir))
3105 #t)))
3106 ;; In the "check" phase we only build the test executable.
3107 (add-after 'check 'run-tests
3108 (lambda _
3109 (invoke "java" "-jar" "targets/dist/sis-jhdf5-test.jar")
3110 (delete-file "targets/dist/sis-jhdf5-test.jar")
3111 #t))
3112 (replace 'install
3113 (install-jars "targets/dist")))))
3114 (inputs
3115 `(("java-cisd-base" ,java-cisd-base)
3116 ("java-cisd-args4j" ,java-cisd-args4j)
3117 ("java-commons-lang" ,java-commons-lang)
3118 ("java-commons-io" ,java-commons-io)
3119 ("hdf5" ,hdf5)
3120 ("zlib" ,zlib)))
3121 (native-inputs
3122 `(("jdk" ,icedtea-8)
3123 ("java-testng" ,java-testng)
3124 ("java-junit" ,java-junit)
3125 ("java-jmock" ,java-jmock)
3126 ("java-hamcrest-core" ,java-hamcrest-core)
3127 ("build-resources"
3128 ,(origin
3129 (method svn-fetch)
3130 (uri (svn-reference
3131 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3132 "jhdf5/tags/release/"
3133 (version-major+minor base-version)
3134 ".x/" base-version
3135 "/build_resources/"))
3136 (revision revision)))
3137 (sha256
3138 (base32
3139 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
3140 (home-page "https://wiki-bsse.ethz.ch/display/JHDF5/")
3141 (synopsis "Java binding for HDF5")
3142 (description "JHDF5 is a high-level API in Java for reading and writing
3143HDF5 files, building on the libraries provided by the HDF Group.")
3144 ;; The C sources are under a non-copyleft license, which looks like a
3145 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
3146 (license (list license:asl2.0
3147 (license:non-copyleft "file://source/c/COPYING"))))))
3148
218d093b
RW
3149(define-public java-classpathx-servletapi
3150 (package
3151 (name "java-classpathx-servletapi")
ae307724 3152 (version "3.0.1")
218d093b
RW
3153 (source (origin
3154 (method url-fetch)
3155 (uri (string-append "mirror://gnu/classpathx/servletapi/"
3156 "servletapi-" version ".tar.gz"))
3157 (sha256
3158 (base32
ae307724 3159 "07d8h051siga2f33fra72hk12sbq1bxa4jifjg0qj0vfazjjff0x"))))
218d093b
RW
3160 (build-system ant-build-system)
3161 (arguments
3162 `(#:tests? #f ; there is no test target
3163 #:build-target "compile"
218d093b 3164 #:make-flags
ae307724 3165 (list "-Dbuild.compiler=javac1.8"
218d093b
RW
3166 (string-append "-Ddist=" (assoc-ref %outputs "out")))
3167 #:phases
3168 (modify-phases %standard-phases
3169 (replace 'install
3170 (lambda* (#:key make-flags #:allow-other-keys)
2c8ac364 3171 (apply invoke `("ant" "dist" ,@make-flags)))))))
218d093b
RW
3172 (home-page "https://www.gnu.org/software/classpathx/")
3173 (synopsis "Java servlet API implementation")
3174 (description "This is the GNU servlet API distribution, part of the
3175ClasspathX project. It provides implementations of version 3.0 of the servlet
3176API and version 2.1 of the Java ServerPages API.")
3177 (license license:gpl3+)))
3178
10d62a88
BH
3179(define-public java-javaee-servletapi
3180 (package
3181 (name "java-javaee-servletapi")
3182 (version "3.1.0")
44bac44c
BH
3183 (source (origin
3184 (method git-fetch)
3185 (uri (git-reference
3186 (url "https://github.com/javaee/servlet-spec.git")
3187 (commit version)))
3188 (file-name (git-file-name name version))
3189 (sha256
3190 (base32
3191 "0s03lj8w5an70lkqbjycgfrfk0kc07vbfav91jzk87gh3awf9ksl"))))
10d62a88
BH
3192 (build-system ant-build-system)
3193 (arguments
3194 `(#:jar-name "javax-servletapi.jar"
3195 ;; no tests
3196 #:tests? #f
8ea8d607
BH
3197 #:source-dir "src/main/java"
3198 #:phases
3199 (modify-phases %standard-phases
3200 (add-before 'build 'copy-resources
3201 (lambda _
3202 (mkdir-p "build/classes/javax/servlet/http")
3203 (let ((from-prefix "src/main/java/javax/servlet/")
3204 (to-prefix "build/classes/javax/servlet/"))
3205 (for-each (lambda (f)
3206 (copy-file (string-append from-prefix f)
3207 (string-append to-prefix f)))
3208 (list "LocalStrings_ja.properties"
3209 "LocalStrings.properties"
3210 "LocalStrings_fr.properties"
3211 "http/LocalStrings_es.properties"
3212 "http/LocalStrings_ja.properties"
3213 "http/LocalStrings.properties"
3214 "http/LocalStrings_fr.properties")))
3215 #t)))))
10d62a88
BH
3216 (native-inputs
3217 `(("unzip" ,unzip)))
3218 (home-page "https://javaee.github.io/servlet-spec/")
3219 (synopsis "Java servlet API")
3220 (description "Java Servlet is the foundation web specification in the
3221Java Enterprise Platform. Developers can build web applications using the
3222Servlet API to interact with the request/response workflow. This project
3223provides information on the continued development of the Java Servlet
3224specification.")
3225 ;; Main code is dual-licensed by Oracle under either GLP2 or CDDL 1.1.
3226 ;; Some files are licensed under ASL 2.0.
3227 (license (list license:asl2.0 license:gpl2 license:cddl1.1))))
3228
5490480c
RW
3229(define-public java-swt
3230 (package
3231 (name "java-swt")
8710d4dd 3232 (version "4.7.1a")
5490480c
RW
3233 (source
3234 ;; The types of many variables and procedures differ in the sources
3235 ;; dependent on whether the target architecture is a 32-bit system or a
3236 ;; 64-bit system. Instead of patching the sources on demand in a build
3237 ;; phase we download either the 32-bit archive (which mostly uses "int"
3238 ;; types) or the 64-bit archive (which mostly uses "long" types).
8710d4dd
RW
3239 (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9")
3240 (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q")
5490480c
RW
3241 (file32 "x86")
3242 (file64 "x86_64"))
3243 (let-values (((hash file)
3244 (match (or (%current-target-system) (%current-system))
3245 ("x86_64-linux" (values hash64 file64))
3246 (_ (values hash32 file32)))))
3247 (origin
3248 (method url-fetch)
3249 (uri (string-append
8710d4dd
RW
3250 "http://download.eclipse.org/eclipse/downloads/drops4/"
3251 "R-" version "-201710090410/swt-" version
3252 "-gtk-linux-" file ".zip"))
5490480c
RW
3253 (sha256 (base32 hash))))))
3254 (build-system ant-build-system)
3255 (arguments
3256 `(#:jar-name "swt.jar"
8710d4dd 3257 #:jdk ,icedtea-8
5490480c
RW
3258 #:tests? #f ; no "check" target
3259 #:phases
3260 (modify-phases %standard-phases
3261 (replace 'unpack
3262 (lambda* (#:key source #:allow-other-keys)
2c8ac364
MW
3263 (mkdir "swt")
3264 (invoke "unzip" source "-d" "swt")
3265 (chdir "swt")
3266 (mkdir "src")
3267 (invoke "unzip" "src.zip" "-d" "src")))
5490480c
RW
3268 ;; The classpath contains invalid icecat jars. Since we don't need
3269 ;; anything other than the JDK on the classpath, we can simply unset
3270 ;; it.
3271 (add-after 'configure 'unset-classpath
3272 (lambda _ (unsetenv "CLASSPATH") #t))
3273 (add-before 'build 'build-native
3274 (lambda* (#:key inputs outputs #:allow-other-keys)
3275 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3276 ;; Build shared libraries. Users of SWT have to set the system
3277 ;; property swt.library.path to the "lib" directory of this
3278 ;; package output.
3279 (mkdir-p lib)
3280 (setenv "OUTPUT_DIR" lib)
3281 (with-directory-excursion "src"
2c8ac364 3282 (invoke "bash" "build.sh")))))
5490480c
RW
3283 (add-after 'install 'install-native
3284 (lambda* (#:key outputs #:allow-other-keys)
3285 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3286 (for-each (lambda (file)
3287 (install-file file lib))
3288 (find-files "." "\\.so$"))
3289 #t))))))
3290 (inputs
8710d4dd 3291 `(("gtk" ,gtk+-2)
5490480c
RW
3292 ("libxtst" ,libxtst)
3293 ("libxt" ,libxt)
3294 ("mesa" ,mesa)
3295 ("glu" ,glu)))
3296 (native-inputs
3297 `(("pkg-config" ,pkg-config)
3298 ("unzip" ,unzip)))
3299 (home-page "https://www.eclipse.org/swt/")
3300 (synopsis "Widget toolkit for Java")
3301 (description
3302 "SWT is a widget toolkit for Java designed to provide efficient, portable
3303access to the user-interface facilities of the operating systems on which it
3304is implemented.")
3305 ;; SWT code is licensed under EPL1.0
3306 ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1
3307 ;; Cairo bindings contain code under MPL1.1
3308 ;; XULRunner 1.9 bindings contain code under MPL2.0
3309 (license (list
3310 license:epl1.0
3311 license:mpl1.1
3312 license:mpl2.0
3313 license:lgpl2.1+))))
3314
068e476f
RJ
3315(define-public java-xz
3316 (package
3317 (name "java-xz")
92966847 3318 (version "1.6")
068e476f
RJ
3319 (source (origin
3320 (method url-fetch)
3321 (uri (string-append "http://tukaani.org/xz/xz-java-" version ".zip"))
3322 (sha256
3323 (base32
92966847 3324 "1z3p1ri1gvl07inxn0agx44ck8n7wrzfmvkz8nbq3njn8r9wba8x"))))
068e476f
RJ
3325 (build-system ant-build-system)
3326 (arguments
3327 `(#:tests? #f ; There are no tests to run.
3328 #:jar-name ,(string-append "xz-" version ".jar")
3329 #:phases
3330 (modify-phases %standard-phases
3331 ;; The unpack phase enters the "maven" directory by accident.
3332 (add-after 'unpack 'chdir
3333 (lambda _ (chdir "..") #t)))))
3334 (native-inputs
3335 `(("unzip" ,unzip)))
d6ddc5ab 3336 (home-page "https://tukaani.org/xz/java.html")
068e476f
RJ
3337 (synopsis "Implementation of XZ data compression in pure Java")
3338 (description "This library aims to be a complete implementation of XZ data
3339compression in pure Java. Single-threaded streamed compression and
3340decompression and random access decompression have been fully implemented.")
3341 (license license:public-domain)))
04100c3b
RW
3342
3343;; java-hamcrest-core uses qdox version 1.12. We package this version instead
3344;; of the latest release.
3345(define-public java-qdox-1.12
3346 (package
3347 (name "java-qdox")
3348 (version "1.12.1")
3349 (source (origin
3350 (method url-fetch)
3344bc49 3351 (uri (string-append "https://repo1.maven.org/maven2/"
04100c3b
RW
3352 "com/thoughtworks/qdox/qdox/" version
3353 "/qdox-" version "-sources.jar"))
3354 (sha256
3355 (base32
3356 "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl"))))
3357 (build-system ant-build-system)
3358 (arguments
3359 `(;; Tests require junit
3360 #:tests? #f
3361 #:jar-name "qdox.jar"
3362 #:phases
3363 (modify-phases %standard-phases
3364 (replace 'unpack
3365 (lambda* (#:key source #:allow-other-keys)
3366 (mkdir "src")
3367 (with-directory-excursion "src"
2c8ac364 3368 (invoke "jar" "-xf" source))))
04100c3b
RW
3369 ;; At this point we don't have junit, so we must remove the API
3370 ;; tests.
3371 (add-after 'unpack 'delete-tests
3372 (lambda _
3373 (delete-file-recursively "src/com/thoughtworks/qdox/junit")
3374 #t)))))
3344bc49 3375 (home-page "https://github.com/codehaus/qdox")
04100c3b
RW
3376 (synopsis "Parse definitions from Java source files")
3377 (description
3378 "QDox is a high speed, small footprint parser for extracting
3379class/interface/method definitions from source files complete with JavaDoc
b13cf17f 3380@code{@@tags}. It is designed to be used by active code generators or
04100c3b
RW
3381documentation tools.")
3382 (license license:asl2.0)))
e7e28510 3383
5281ba17
BH
3384(define-public java-qdox
3385 (package
3386 (name "java-qdox")
3387 ; Newer version exists, but this version is required by java-plexus-component-metadata
3388 (version "2.0-M2")
3389 (source (origin
3390 (method url-fetch)
3391 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
3392 ;; Older releases at https://github.com/codehaus/qdox/
3393 ;; Note: The release at maven is pre-generated. The release at
3394 ;; github requires jflex.
3395 (uri (string-append "https://repo1.maven.org/maven2/"
3396 "com/thoughtworks/qdox/qdox/" version
3397 "/qdox-" version "-sources.jar"))
3398 (sha256
3399 (base32
3400 "10xxrcaicq6axszcr2jpygisa4ch4sinyx5q7kqqxv4lknrmxp5x"))))
3401 (build-system ant-build-system)
3402 (arguments
3403 `(#:jar-name "qdox.jar"
3404 #:tests? #f)); no tests
3405 (home-page "https://github.com/codehaus/qdox")
3406 (synopsis "Parse definitions from Java source files")
3407 (description "QDox is a high speed, small footprint parser for extracting
3408class/interface/method definitions from source files complete with JavaDoc
3409@code{@@tags}. It is designed to be used by active code generators or
3410documentation tools.")
3411 (license license:asl2.0)))
3412
e7e28510
RW
3413(define-public java-jarjar
3414 (package
3415 (name "java-jarjar")
3416 (version "1.4")
3417 (source (origin
3418 (method url-fetch)
3419 (uri (string-append
3420 "https://storage.googleapis.com/google-code-archive-downloads/v2/"
3421 "code.google.com/jarjar/jarjar-src-" version ".zip"))
3422 (sha256
3423 (base32
88aa75e9
GB
3424 "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl"))
3425 (modules '((guix build utils)))
3426 (snippet
3427 '(begin
3428 ;; Delete bundled thirds-party jar archives.
3429 ;; TODO: unbundle maven-plugin-api.
3430 (delete-file "lib/asm-4.0.jar")
3431 (delete-file "lib/asm-commons-4.0.jar")
3432 (delete-file "lib/junit-4.8.1.jar")
3433 #t))))
e7e28510
RW
3434 (build-system ant-build-system)
3435 (arguments
3436 `(;; Tests require junit, which ultimately depends on this package.
3437 #:tests? #f
3438 #:build-target "jar"
3439 #:phases
3440 (modify-phases %standard-phases
88aa75e9
GB
3441 (add-before 'build 'do-not-use-bundled-asm
3442 (lambda* (#:key inputs #:allow-other-keys)
3443 (substitute* "build.xml"
3444 (("<path id=\"path.build\">")
3445 (string-append "<path id=\"path.build\"><fileset dir=\""
3446 (assoc-ref inputs "java-asm-bootstrap")
3447 "/share/java\" includes=\"**/*.jar\"/>"))
3448 (("<zipfileset src=\"lib/asm-4.0.jar\"/>") "")
3449 (("lib/asm-commons-4.0.jar")
3450 (string-append (assoc-ref inputs "java-asm-bootstrap")
3451 "/share/java/asm-6.0.jar"))
3452 (("<include name=\"org/objectweb/asm/commons/Remap\\*\\.class\"/>")
3453 (string-append "<include name=\"org/objectweb/asm/"
3454 "commons/Remap*.class\"/>"
3455 "<include name=\"org/objectweb/asm/*.class\"/>"
3456 "<include name=\"org/objectweb/asm/"
3457 "signature/*.class\"/>"
3458 "<include name=\"org/objectweb/asm/"
3459 "commons/SignatureRemapper.class\"/>")))
3460 #t))
e7e28510
RW
3461 (replace 'install
3462 (lambda* (#:key outputs #:allow-other-keys)
3463 (let ((target (string-append (assoc-ref outputs "out")
3464 "/share/java")))
3465 (install-file (string-append "dist/jarjar-" ,version ".jar")
3466 target))
3467 #t)))))
88aa75e9
GB
3468 (inputs
3469 `(("java-asm-bootstrap" ,java-asm-bootstrap)))
e7e28510
RW
3470 (native-inputs
3471 `(("unzip" ,unzip)))
3472 (home-page "https://code.google.com/archive/p/jarjar/")
3473 (synopsis "Repackage Java libraries")
3474 (description
3475 "Jar Jar Links is a utility that makes it easy to repackage Java
3476libraries and embed them into your own distribution. Jar Jar Links includes
3477an Ant task that extends the built-in @code{jar} task.")
3478 (license license:asl2.0)))
87c31a21
RW
3479
3480(define-public java-hamcrest-core
3481 (package
3482 (name "java-hamcrest-core")
3483 (version "1.3")
3484 (source (origin
2703d573
EF
3485 (method git-fetch)
3486 (uri (git-reference
3487 (url "https://github.com/hamcrest/JavaHamcrest/")
3488 (commit (string-append "hamcrest-java-" version))))
3489 (file-name (git-file-name name version))
87c31a21
RW
3490 (sha256
3491 (base32
2703d573 3492 "16fxxkrd31ahqvcaby30jgh3z1i0zxh51m24hxgz0z2agxj6bc63"))
87c31a21
RW
3493 (modules '((guix build utils)))
3494 (snippet
3495 '(begin
00672896
HG
3496 ;; Delete bundled thirds-party jar archives.
3497 (delete-file-recursively "lib")
87c31a21
RW
3498 #t))))
3499 (build-system ant-build-system)
3500 (arguments
3501 `(#:tests? #f ; Tests require junit
a8d3cb62
RW
3502 #:modules ((guix build ant-build-system)
3503 (guix build utils)
3504 (srfi srfi-1))
87c31a21 3505 #:make-flags (list (string-append "-Dversion=" ,version))
fae0b4ca 3506 #:test-target "unit-test"
87c31a21
RW
3507 #:build-target "core"
3508 #:phases
3509 (modify-phases %standard-phases
3510 ;; Disable unit tests, because they require junit, which requires
3511 ;; hamcrest-core. We also give a fixed value to the "Built-Date"
3512 ;; attribute from the manifest for reproducibility.
3513 (add-before 'configure 'patch-build.xml
3514 (lambda _
3515 (substitute* "build.xml"
3516 (("unit-test, ") "")
3517 (("\\$\\{build.timestamp\\}") "guix"))
3518 #t))
3519 ;; Java's "getMethods()" returns methods in an unpredictable order.
3520 ;; To make the output of the generated code deterministic we must
3521 ;; sort the array of methods.
3522 (add-after 'unpack 'make-method-order-deterministic
3523 (lambda _
3524 (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java"
3525 (("import java\\.util\\.Iterator;" line)
3526 (string-append line "\n"
3527 "import java.util.Arrays; import java.util.Comparator;"))
3528 (("allMethods = cls\\.getMethods\\(\\);" line)
3529 (string-append "_" line
3530 "
3531private Method[] getSortedMethods() {
3532 Arrays.sort(_allMethods, new Comparator<Method>() {
3533 @Override
3534 public int compare(Method a, Method b) {
3535 return a.toString().compareTo(b.toString());
3536 }
3537 });
3538 return _allMethods;
3539}
3540
2c8ac364
MW
3541private Method[] allMethods = getSortedMethods();")))
3542 #t))
87c31a21
RW
3543 (add-before 'build 'do-not-use-bundled-qdox
3544 (lambda* (#:key inputs #:allow-other-keys)
3545 (substitute* "build.xml"
3546 (("lib/generator/qdox-1.12.jar")
3547 (string-append (assoc-ref inputs "java-qdox-1.12")
3548 "/share/java/qdox.jar")))
3549 #t))
fab959d3
HG
3550 ;; build.xml searches for .jar files in this directoy, which
3551 ;; we remove from the source archive.
3552 (add-before 'build 'create-dummy-directories
3553 (lambda _
3554 (mkdir-p "lib/integration")
3555 #t))
87c31a21
RW
3556 (replace 'install
3557 (lambda* (#:key outputs #:allow-other-keys)
a8d3cb62
RW
3558 (let* ((target (string-append (assoc-ref outputs "out")
3559 "/share/java/"))
3560 (version-suffix ,(string-append "-" version ".jar"))
3561 (install-without-version-suffix
3562 (lambda (jar)
3563 (copy-file jar
3564 (string-append target
3565 (basename jar version-suffix)
3566 ".jar")))))
3567 (mkdir-p target)
3568 (for-each
3569 install-without-version-suffix
3570 (find-files "build"
3571 (lambda (name _)
3572 (and (string-suffix? ".jar" name)
3573 (not (string-suffix? "-sources.jar" name)))))))
3574 #t)))))
87c31a21
RW
3575 (native-inputs
3576 `(("java-qdox-1.12" ,java-qdox-1.12)
3577 ("java-jarjar" ,java-jarjar)))
3578 (home-page "http://hamcrest.org/")
3579 (synopsis "Library of matchers for building test expressions")
3580 (description
3581 "This package provides a library of matcher objects (also known as
3582constraints or predicates) allowing @code{match} rules to be defined
3583declaratively, to be used in other frameworks. Typical scenarios include
3584testing frameworks, mocking libraries and UI validation rules.")
3585 (license license:bsd-2)))
d0184f44
RW
3586
3587(define-public java-junit
3588 (package
3589 (name "java-junit")
3590 (version "4.12")
3591 (source (origin
42c1c59e
EF
3592 (method git-fetch)
3593 (uri (git-reference
3594 (url "https://github.com/junit-team/junit/")
3595 (commit (string-append "r" version))))
3596 (file-name (git-file-name name version))
d0184f44
RW
3597 (sha256
3598 (base32
42c1c59e 3599 "1j8avi91px1z8rjc89cfikwrvfifdmmsarwiyrcnr59ynvpz0v8h"))
d0184f44
RW
3600 (modules '((guix build utils)))
3601 (snippet
3602 '(begin
3603 ;; Delete bundled jar archives.
3604 (delete-file-recursively "lib")
3605 #t))))
3606 (build-system ant-build-system)
3607 (arguments
3608 `(#:tests? #f ; no tests
3609 #:jar-name "junit.jar"))
3610 (inputs
3611 `(("java-hamcrest-core" ,java-hamcrest-core)))
42c1c59e 3612 (home-page "https://junit.org/junit4/")
d0184f44
RW
3613 (synopsis "Test framework for Java")
3614 (description
3615 "JUnit is a simple framework to write repeatable tests for Java projects.
3616JUnit provides assertions for testing expected results, test fixtures for
3617sharing common test data, and test runners for running tests.")
3618 (license license:epl1.0)))
9fb20d01
RW
3619
3620(define-public java-plexus-utils
3621 (package
3622 (name "java-plexus-utils")
0cd8efcc 3623 (version "3.2.0")
9fb20d01 3624 (source (origin
c53badd4
EF
3625 (method git-fetch)
3626 (uri (git-reference
3627 (url "https://github.com/codehaus-plexus/plexus-utils")
3628 (commit (string-append "plexus-utils-" version))))
3629 (file-name (git-file-name name version))
9fb20d01
RW
3630 (sha256
3631 (base32
c53badd4 3632 "1mlx7xrq7lgqjqcpg7y4hi1ghavf28vvk3har82037dqx61n0f15"))))
9fb20d01
RW
3633 (build-system ant-build-system)
3634 ;; FIXME: The default build.xml does not include a target to install
3635 ;; javadoc files.
3636 (arguments
3637 `(#:jar-name "plexus-utils.jar"
3638 #:source-dir "src/main"
3639 #:phases
3640 (modify-phases %standard-phases
3641 (add-after 'unpack 'fix-reference-to-/bin-and-/usr
3642 (lambda _
3643 (substitute* "src/main/java/org/codehaus/plexus/util/\
3644cli/shell/BourneShell.java"
3645 (("/bin/sh") (which "sh"))
3646 (("/usr/") (getcwd)))
3647 #t))
3648 (add-after 'unpack 'fix-or-disable-broken-tests
3649 (lambda _
3650 (with-directory-excursion "src/test/java/org/codehaus/plexus/util"
3651 (substitute* '("cli/CommandlineTest.java"
3652 "cli/shell/BourneShellTest.java")
3653 (("/bin/sh") (which "sh"))
3654 (("/bin/echo") (which "echo")))
3655
3656 ;; This test depends on MavenProjectStub, but we don't have
3657 ;; a package for Maven.
3658 (delete-file "introspection/ReflectionValueExtractorTest.java")
3659
3660 ;; FIXME: The command line tests fail, maybe because they use
3661 ;; absolute paths.
3662 (delete-file "cli/CommandlineTest.java"))
3663 #t)))))
3664 (native-inputs
0cd8efcc
JL
3665 `(("java-hamcrest-core" ,java-hamcrest-core)
3666 ("java-junit" ,java-junit)))
1b4d40cf 3667 (home-page "https://codehaus-plexus.github.io/plexus-utils/")
9fb20d01
RW
3668 (synopsis "Common utilities for the Plexus framework")
3669 (description "This package provides various Java utility classes for the
3670Plexus framework to ease working with strings, files, command lines, XML and
3671more.")
3672 (license license:asl2.0)))
1e555562
HG
3673
3674(define-public java-plexus-interpolation
3675 (package
3676 (name "java-plexus-interpolation")
3677 (version "1.23")
3678 (source (origin
c4b67ba3
EF
3679 (method git-fetch)
3680 (uri (git-reference
3681 (url "https://github.com/codehaus-plexus/plexus-interpolation")
3682 (commit (string-append "plexus-interpolation-" version))))
3683 (file-name (git-file-name name version))
1e555562
HG
3684 (sha256
3685 (base32
c4b67ba3 3686 "005hxxg1adv71a96lz4vp65bk3v1pi76j4c45z29xzizclib16vl"))))
1e555562
HG
3687 (build-system ant-build-system)
3688 (arguments
3689 `(#:jar-name "plexus-interpolation.jar"
3690 #:source-dir "src/main"))
3691 (native-inputs
3692 `(("java-junit" ,java-junit)
3693 ("java-hamcrest-core" ,java-hamcrest-core)))
35e74723 3694 (home-page "https://codehaus-plexus.github.io/plexus-interpolation/")
1e555562
HG
3695 (synopsis "Java components for interpolating ${} strings and the like")
3696 (description "Plexus interpolator is a modular, flexible interpolation
3697framework for the expression language style commonly seen in Maven, Plexus,
3698and other related projects.
3699
3700It has its foundation in the @code{org.codehaus.plexus.utils.interpolation}
3701package within @code{plexus-utils}, but has been separated in order to allow
3702these two libraries to vary independently of one another.")
3703 (license license:asl2.0)))
8f8ed9aa 3704
bb27eb0d
JL
3705(define-public java-plexus-classworlds
3706 (package
3707 (name "java-plexus-classworlds")
3708 (version "2.5.2")
3709 (source (origin
9520b2b1
EF
3710 (method git-fetch)
3711 (uri (git-reference
3712 (url "https://github.com/codehaus-plexus/plexus-classworlds")
3713 (commit (string-append "plexus-classworlds-" version))))
3714 (file-name (git-file-name name version))
bb27eb0d
JL
3715 (sha256
3716 (base32
9520b2b1 3717 "1iv8x55fbni2hg4l7pdpbwfq75xmvq1f25g6nxma8rcdpihsh13r"))))
bb27eb0d
JL
3718 (build-system ant-build-system)
3719 (arguments
3720 `(#:jar-name "plexus-classworlds.jar"
3721 #:source-dir "src/main"
3722 #:tests? #f));; FIXME: we need to generate some resources as in pom.xml
3723 (native-inputs
3724 `(("java-junit" ,java-junit)))
268dc472 3725 (home-page "https://codehaus-plexus.github.io/plexus-classworlds/")
bb27eb0d 3726 (synopsis "Java class loader framework")
f4548394
TGR
3727 (description "Plexus classworlds replaces the native @code{ClassLoader}
3728mechanism of Java. It is especially useful for dynamic loading of application
bb27eb0d
JL
3729components.")
3730 (license license:asl2.0)))
3731
a7ad92ad 3732(define java-plexus-container-default-bootstrap
0726d4ea
JL
3733 (package
3734 (name "java-plexus-container-default-bootstrap")
3735 (version "1.7.1")
3736 (source (origin
3a26ea3a
EF
3737 (method git-fetch)
3738 (uri (git-reference
3739 (url "https://github.com/codehaus-plexus/plexus-containers")
3740 (commit (string-append "plexus-containers-" version))))
3741 (file-name (git-file-name name version))
0726d4ea
JL
3742 (sha256
3743 (base32
3a26ea3a 3744 "1316hrp5vqfv0aw7miq2fp0wwy833h66h502h29vnh5sxj27x228"))))
0726d4ea
JL
3745 (build-system ant-build-system)
3746 (arguments
3747 `(#:jar-name "container-default.jar"
3748 #:source-dir "plexus-container-default/src/main/java"
3749 #:test-dir "plexus-container-default/src/test"
3750 #:jdk ,icedtea-8
3751 #:tests? #f; requires plexus-archiver, which depends on this package
3752 #:phases
3753 (modify-phases %standard-phases
3754 (add-before 'build 'copy-resources
3755 (lambda _
3756 (copy-recursively
3757 "plexus-container-default/src/main/resources/"
3758 "build/classes")
3759 #t)))))
3760 (inputs
3761 `(("worldclass" ,java-plexus-classworlds)
3762 ("xbean" ,java-geronimo-xbean-reflect)
3763 ("utils" ,java-plexus-utils)
3764 ("junit" ,java-junit)
3765 ("guava" ,java-guava)))
3766 (home-page "https://github.com/codehaus-plexus/plexus-containers")
f4548394 3767 (synopsis "Inversion-of-control container")
0726d4ea 3768 (description "Plexus-default-container is Plexus' inversion-of-control
f4548394 3769(@dfn{IoC}) container. It is composed of its public API and its default
0726d4ea
JL
3770implementation.")
3771 (license license:asl2.0)))
3772
0858b9dc
JL
3773(define-public java-plexus-io
3774 (package
3775 (name "java-plexus-io")
3776 (version "3.0.0")
3777 (source (origin
48fe942c
EF
3778 (method git-fetch)
3779 (uri (git-reference
3780 (url "https://github.com/codehaus-plexus/plexus-io")
3781 (commit (string-append "plexus-io-" version))))
3782 (file-name (git-file-name name version))
0858b9dc
JL
3783 (sha256
3784 (base32
48fe942c 3785 "1h4q9l2j9sfbscvxpnyy2hazi0r83h3am86y4r959wrl1b24xxwd"))))
0858b9dc
JL
3786 (build-system ant-build-system)
3787 (arguments
3788 `(#:jar-name "plexus-io.jar"
3789 #:source-dir "src/main/java"
3790 #:test-dir "src/test"
3791 #:jdk ,icedtea-8
3792 #:phases
3793 (modify-phases %standard-phases
3794 (add-before 'build 'copy-resources
3795 (lambda _
3796 (mkdir-p "build/classes/META-INF/plexus")
3797 (copy-file "src/main/resources/META-INF/plexus/components.xml"
3798 "build/classes/META-INF/plexus/components.xml")
3799 #t)))))
3800 (inputs
3801 `(("utils" ,java-plexus-utils)
3802 ("commons-io" ,java-commons-io)
3803 ("java-jsr305" ,java-jsr305)))
3804 (native-inputs
3805 `(("junit" ,java-junit)
3806 ("hamcrest" ,java-hamcrest-core)
3807 ("guava" ,java-guava)
3808 ("classworlds" ,java-plexus-classworlds)
3809 ("xbean" ,java-geronimo-xbean-reflect)
3810 ("container-default" ,java-plexus-container-default-bootstrap)))
3811 (home-page "https://github.com/codehaus-plexus/plexus-io")
3812 (synopsis "I/O plexus components")
3813 (description "Plexus IO is a set of plexus components, which are designed
3814for use in I/O operations. This implementation using plexus components allows
3815reusing it in maven.")
3816 (license license:asl2.0)))
3817
b51df3ca
JL
3818(define-public java-plexus-archiver
3819 (package
3820 (name "java-plexus-archiver")
6f737ae6 3821 (version "4.1.0")
b51df3ca
JL
3822 (source (origin
3823 (method url-fetch)
3824 (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver"
3825 "/archive/plexus-archiver-" version ".tar.gz"))
3826 (sha256
3827 (base32
6f737ae6 3828 "0ry6i92gli0mvdmfih2vgs0lkf9yvx18h2ajxim66yg6yipnp0hg"))))
b51df3ca
JL
3829 (build-system ant-build-system)
3830 (arguments
3831 `(#:jar-name "plexus-archiver.jar"
3832 #:source-dir "src/main/java"
3833 #:jdk ,icedtea-8
3834 #:test-dir "src/test"
3835 #:test-exclude (list "**/Abstract*.java" "**/Base*.java")
3836 #:phases
3837 (modify-phases %standard-phases
3838 (add-before 'check 'remove-failing
3839 (lambda _
3840 ;; Requires an older version of plexus container
3841 (delete-file
2c8ac364
MW
3842 "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java")
3843 #t))
6f737ae6
JL
3844 (add-before 'check 'fix-test-building
3845 (lambda _
3846 (substitute* "build.xml"
3847 (("srcdir=\"src/test\"") "srcdir=\"src/test/java\""))
3848 #t))
b51df3ca
JL
3849 (add-before 'build 'copy-resources
3850 (lambda _
3851 (mkdir-p "build/classes/META-INF/plexus")
3852 (copy-file "src/main/resources/META-INF/plexus/components.xml"
3853 "build/classes/META-INF/plexus/components.xml")
3854 #t)))))
3855 (inputs
3856 `(("utils" ,java-plexus-utils)
3857 ("commons-io" ,java-commons-io)
3858 ("snappy" ,java-iq80-snappy)
3859 ("io" ,java-plexus-io)
3860 ("compress" ,java-commons-compress)
3861 ("container-default" ,java-plexus-container-default-bootstrap)
3862 ("snappy" ,java-snappy)
3863 ("java-jsr305" ,java-jsr305)))
3864 (native-inputs
6f737ae6
JL
3865 `(("java-hamcrest-core" ,java-hamcrest-core)
3866 ("junit" ,java-junit)
b51df3ca
JL
3867 ("classworld" ,java-plexus-classworlds)
3868 ("xbean" ,java-geronimo-xbean-reflect)
3869 ("xz" ,java-tukaani-xz)
3870 ("guava" ,java-guava)))
3871 (home-page "https://github.com/codehaus-plexus/plexus-archiver")
3872 (synopsis "Archiver component of the Plexus project")
3873 (description "Plexus-archiver contains a component to deal with project
3874archives (jar).")
3875 (license license:asl2.0)))
3876
a0837294
JL
3877(define-public java-plexus-container-default
3878 (package
3879 (inherit java-plexus-container-default-bootstrap)
3880 (name "java-plexus-container-default")
3881 (arguments
3882 `(#:jar-name "container-default.jar"
3883 #:source-dir "plexus-container-default/src/main/java"
3884 #:test-dir "plexus-container-default/src/test"
3885 #:test-exclude (list ;"**/*Test.java"
3886 "**/Abstract*.java"
3887 ;; Requires plexus-hierarchy
3888 "**/PlexusHierarchyTest.java"
3889 ;; Failures
3890 "**/ComponentRealmCompositionTest.java"
3891 "**/PlexusContainerTest.java")
3892 #:jdk ,icedtea-8
3893 #:phases
3894 (modify-phases %standard-phases
3895 (add-before 'build 'copy-resources
3896 (lambda _
3897 (copy-recursively
3898 "plexus-container-default/src/main/resources/"
3899 "build/classes")
3900 #t))
3901 (add-before 'check 'fix-paths
3902 (lambda _
3903 (let ((dir "plexus-container-default/src/test/java/org/codehaus"))
3904 (substitute*
3905 (string-append
3906 dir "/plexus/component/composition/"
3907 "ComponentRealmCompositionTest.java")
3908 (("src/test") "plexus-container-default/src/test"))
3909 #t))))))
3910 (inputs
3911 `(("worldclass" ,java-plexus-classworlds)
3912 ("xbean" ,java-geronimo-xbean-reflect)
3913 ("utils" ,java-plexus-utils)
3914 ("junit" ,java-junit)
3915 ("guava" ,java-guava)))
3916 (native-inputs
3917 `(("archiver" ,java-plexus-archiver)
3918 ("hamcrest" ,java-hamcrest-core)))))
3919
3214afab
JL
3920(define-public java-plexus-component-annotations
3921 (package
3922 (inherit java-plexus-container-default)
3923 (name "java-plexus-component-annotations")
3924 (arguments
3925 `(#:jar-name "plexus-component-annotations.jar"
3926 #:source-dir "plexus-component-annotations/src/main/java"
3927 #:tests? #f)); no tests
3928 (inputs '())
3929 (native-inputs '())
3930 (synopsis "Plexus descriptors generator")
3931 (description "This package is a Maven plugin to generate Plexus descriptors
3932from source tags and class annotations.")))
3933
4f77ba17
JL
3934(define-public java-plexus-cipher
3935 (package
3936 (name "java-plexus-cipher")
3937 (version "1.7")
3938 (source (origin
d0e64613
EF
3939 (method git-fetch)
3940 (uri (git-reference
3941 (url "https://github.com/codehaus-plexus/plexus-cipher")
3942 (commit (string-append "plexus-cipher-" version))))
3943 (file-name (git-file-name name version))
4f77ba17
JL
3944 (sha256
3945 (base32
d0e64613 3946 "0m638nzlxbmnbcj5cwdpgs326ab584yv0k803zlx37r6iqwvf6b0"))))
4f77ba17
JL
3947 (build-system ant-build-system)
3948 (arguments
3949 `(#:jar-name "plexus-cipher.jar"
3950 #:source-dir "src/main/java"
3951 #:jdk ,icedtea-8
3952 #:tests? #f; FIXME: requires sisu-inject-bean
3953 #:phases
3954 (modify-phases %standard-phases
3955 (add-before 'build 'copy-resources
3956 (lambda _
3957 (copy-recursively "src/main/resources" "build/classes")
3958 (mkdir-p "build/classes/META-INF/sisu")
3959 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
3960 (lambda _
3961 (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
3962 #t)))))
3963 (inputs
3964 `(("java-cdi-api" ,java-cdi-api)
3965 ("java-javax-inject" ,java-javax-inject)))
3966 (home-page "https://github.com/sonatype/plexus-cipher")
3967 (synopsis "Encryption/decryption Component")
3968 (description "Plexus-cipher contains a component to deal with encryption
3969and decryption.")
3970 (license license:asl2.0)))
3971
239126d4
JL
3972(define-public java-plexus-compiler-api
3973 (package
3974 (name "java-plexus-compiler-api")
a70182b0 3975 (version "2.8.4")
239126d4 3976 (source (origin
5723137a
EF
3977 (method git-fetch)
3978 (uri (git-reference
3979 (url "https://github.com/codehaus-plexus/plexus-compiler")
3980 (commit (string-append "plexus-compiler-" version))))
3981 (file-name (git-file-name name version))
239126d4
JL
3982 (sha256
3983 (base32
5723137a 3984 "1nq1gnn3s6z1j29gmi1hqbklsmm8b1lmnafb0191914f95mn18gk"))))
239126d4
JL
3985 (build-system ant-build-system)
3986 (arguments
3987 `(#:jar-name "plexus-compiler-api.jar"
3988 #:source-dir "plexus-compiler-api/src/main/java"
3989 #:jdk ,icedtea-8
3990 #:test-dir "plexus-compiler-api/src/test"))
3991 (inputs
3992 `(("java-plexus-container-default" ,java-plexus-container-default)
3993 ("java-plexus-util" ,java-plexus-utils)))
3994 (native-inputs
3995 `(("java-junit" ,java-junit)))
3996 (home-page "https://github.com/codehaus-plexus/plexus-compiler")
3997 (synopsis "Plexus Compilers component's API to manipulate compilers")
3998 (description "This package contains the API used by components to manipulate
3999compilers.")
4000 (license (list license:asl2.0
4001 license:expat))))
4002
f8a519fa
JL
4003(define-public java-plexus-compiler-javac
4004 (package
4005 (inherit java-plexus-compiler-api)
4006 (name "java-plexus-compiler-javac")
4007 (arguments
4008 `(#:jar-name "plexus-compiler-javac.jar"
4009 #:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java"
4010 #:jdk ,icedtea-8
4011 #:tests? #f; depends on compiler-test -> maven-core -> ... -> this package.
4012 #:test-dir "plexus-compilers/plexus-compiler-javac/src/test"))
4013 (inputs
4014 `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
4015 ("java-plexus-utils" ,java-plexus-utils)
4016 ("java-plexus-container-default" ,java-plexus-container-default)))
4017 (native-inputs
4018 `(("java-junit" ,java-junit)))
4019 (synopsis "Javac Compiler support for Plexus Compiler component")
4020 (description "This package contains the Javac Compiler support for Plexus
4021Compiler component.")))
4022
0aa85081
JL
4023(define-public java-plexus-sec-dispatcher
4024 (package
4025 (name "java-plexus-sec-dispatcher")
4026 (version "1.4") ;; Newest release listed at the Maven Central Repository.
4027 (source (origin
4028 ;; This project doesn't tag releases or publish tarballs, so we take
4029 ;; the "prepare release plexus-sec-dispatcher-1.4" git commit.
d9e356a8
EF
4030 (method git-fetch)
4031 (uri (git-reference
4032 (url "https://github.com/sonatype/plexus-sec-dispatcher/")
4033 (commit "7db8f880486e192a1c5ea9544e01e756c3d49d0f")))
0aa85081
JL
4034 (sha256
4035 (base32
d9e356a8
EF
4036 "1ng4yliy4cqpjr4fxxjbpwyk1wkch5f8vblm1kvwf328s4gibszs"))
4037 (file-name (git-file-name name version))))
0aa85081
JL
4038 (arguments
4039 `(#:jar-name "plexus-sec-dispatcher.jar"
4040 #:source-dir "src/main/java"
4041 #:jdk ,icedtea-8
4042 #:phases
4043 (modify-phases %standard-phases
4044 (add-before 'build 'generate-models
4045 (lambda* (#:key inputs #:allow-other-keys)
4046 (define (modello-single-mode file version mode)
2c8ac364
MW
4047 (invoke "java"
4048 "org.codehaus.modello.ModelloCli"
4049 file mode "src/main/java" version
4050 "false" "true"))
0aa85081 4051 (let ((file "src/main/mdo/settings-security.mdo"))
0aa85081
JL
4052 (modello-single-mode file "1.0.0" "java")
4053 (modello-single-mode file "1.0.0" "xpp3-reader")
2c8ac364
MW
4054 (modello-single-mode file "1.0.0" "xpp3-writer"))
4055 #t))
0aa85081
JL
4056 (add-before 'build 'generate-components.xml
4057 (lambda _
4058 (mkdir-p "build/classes/META-INF/plexus")
4059 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
4060 (lambda _
4061 (display
4062 "<component-set>\n
4063 <components>\n
4064 <component>\n
4065 <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n
4066 <role-hint>default</role-hint>\n
4067 <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n
4068 <description></description>\n
4069 <requirements>\n
4070 <requirement>\n
4071 <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n
4072 <field-name>_cipher</field-name>\n
4073 </requirement>\n
4074 <requirement>\n
4075 <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n
4076 <field-name>_decryptors</field-name>\n
4077 </requirement>\n
4078 </requirements>\n
4079 <configuration>\n
4080 <_configuration-file>~/.settings-security.xml</_configuration-file>\n
4081 </configuration>\n
4082 </component>\n
4083 </components>\n
2c8ac364
MW
4084</component-set>\n")))
4085 #t))
0aa85081
JL
4086 (add-before 'check 'fix-paths
4087 (lambda _
2c8ac364
MW
4088 (copy-recursively "src/test/resources" "target")
4089 #t)))))
0aa85081
JL
4090 (inputs
4091 `(("java-plexus-cipher" ,java-plexus-cipher)))
4092 (native-inputs
4093 `(("java-modello-core" ,java-modello-core)
4094 ;; for modello:
4095 ("java-plexus-container-default" ,java-plexus-container-default)
4096 ("java-plexus-classworlds" ,java-plexus-classworlds)
4097 ("java-plexus-utils" ,java-plexus-utils)
4098 ("java-guava" ,java-guava)
4099 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4100 ("java-sisu-build-api" ,java-sisu-build-api)
4101 ;; modello plugins:
4102 ("java-modellop-plugins-java" ,java-modello-plugins-java)
4103 ("java-modellop-plugins-xml" ,java-modello-plugins-xml)
4104 ("java-modellop-plugins-xpp3" ,java-modello-plugins-xpp3)
4105 ;; for tests
4106 ("java-junit" ,java-junit)))
4107 (build-system ant-build-system)
4108 (home-page "https://github.com/sonatype/plexus-sec-dispatcher")
4109 (synopsis "Plexus Security Dispatcher Component")
4110 (description "This package is the Plexus Security Dispatcher Component.
4111This component decrypts a string passed to it.")
4112 (license license:asl2.0)))
4113
7d65489f
JL
4114(define-public java-plexus-cli
4115 (package
4116 (name "java-plexus-cli")
4117 (version "1.7")
4118 (source (origin
4119 (method git-fetch)
4120 (uri (git-reference
4121 (url "https://github.com/sonatype/plexus-cli")
4122 (commit "a776afa6bca84e5107bedb69440329cdb24ed645")))
4123 (file-name (string-append name "-" version))
4124 (sha256
4125 (base32
4126 "0xjrlay605rypv3zd7y24vlwf0039bil3n2cqw54r1ddpysq46vx"))))
4127 (build-system ant-build-system)
4128 (arguments
4129 `(#:jar-name "plexus-cli.jar"
4130 #:source-dir "src/main/java"
4131 #:jdk ,icedtea-8
4132 #:test-dir "src/test"))
4133 (inputs
4134 `(("java-commons-cli" ,java-commons-cli)
4135 ("java-plexus-container-default" ,java-plexus-container-default)
4136 ("java-plexus-classworlds" ,java-plexus-classworlds)))
4137 (native-inputs
4138 `(("java-plexus-utils" ,java-plexus-utils)
4139 ("java-junit" ,java-junit)
4140 ("java-guava" ,java-guava)))
4141 (home-page "https://codehaus-plexus.github.io/plexus-cli")
4142 (synopsis "CLI building library for plexus")
4143 (description "This package is a library to help creating CLI around
4144Plexus components.")
4145 (license license:asl2.0)))
4146
8f524749
JL
4147(define-public java-sisu-build-api
4148 (package
4149 (name "java-sisu-build-api")
4150 (version "0.0.7")
4151 (source (origin
16c62763
EF
4152 (method git-fetch)
4153 (uri (git-reference
4154 (url "https://github.com/sonatype/sisu-build-api")
4155 (commit (string-append "plexus-build-api-" version))))
4156 (file-name (git-file-name name version))
8f524749
JL
4157 (sha256
4158 (base32
16c62763 4159 "1d5w6c58gkx30d51v7qwv1xrhc0ly76848gihmgshj19yf6yhca0"))))
8f524749
JL
4160 (build-system ant-build-system)
4161 (arguments
4162 `(#:jar-name "sisu-build-api.jar"
4163 #:source-dir "src/main/java"
4164 #:jdk ,icedtea-8
4165 #:tests? #f; FIXME: how to run the tests?
4166 #:phases
4167 (modify-phases %standard-phases
4168 (add-before 'build 'copy-resources
4169 (lambda _
4170 (copy-recursively "src/main/resources" "build/classes")
4171 (substitute* (find-files "build/classes")
4172 (("\\$\\{project.version\\}") ,version))
4173 #t))
4174 (add-before 'build 'generate-plexus-compontent
4175 (lambda _
4176 (mkdir-p "build/classes/META-INF/plexus")
4177 ;; This file is required for plexus to inject this package.
4178 ;; FIXME: how is it generated?
4179 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
4180 (lambda _
4181 (display
4182 "<component-set>\n
4183 <components>\n
4184 <component>\n
4185 <role>org.sonatype.plexus.build.incremental.BuildContext</role>\n
4186 <role-hint>default</role-hint>\n
4187 <implementation>org.sonatype.plexus.build.incremental.DefaultBuildContext</implementation>\n
4188 <description>Filesystem based non-incremental build context implementation\n
4189which behaves as if all files were just created.</description>\n
4190 </component>\n
4191 </components>\n
4192</component-set>\n")))
4193 #t)))))
4194 (inputs
4195 `(("java-plexus-utils" ,java-plexus-utils)
4196 ("java-plexus-container-default" ,java-plexus-container-default)))
4197 (home-page "https://github.com/sonatype/sisu-build-api/")
4198 (synopsis "Base build API for maven")
4199 (description "This package contains the base build API for maven and
4200a default implementation of it. This API is about scanning files in a
4201project and determining what files need to be rebuilt.")
4202 (license license:asl2.0)))
4203
b26c8b61
JL
4204(define-public java-modello-core
4205 (package
4206 (name "java-modello-core")
4207 (version "1.9.1")
4208 (source (origin
df9487c5
EF
4209 (method git-fetch)
4210 (uri (git-reference
4211 (url "https://github.com/codehaus-plexus/modello")
4212 (commit (string-append "modello-" version))))
4213 (file-name (git-file-name name version))
b26c8b61
JL
4214 (sha256
4215 (base32
df9487c5 4216 "1di6ni42aqllpdvkpyfcw70352vr2i8wf6hd5nhd9kmqjb5dj5j4"))))
b26c8b61
JL
4217 (build-system ant-build-system)
4218 (arguments
4219 `(#:jar-name "modello-core.jar"
4220 #:source-dir "modello-core/src/main/java"
4221 #:test-dir "modello-core/src/test"
4222 #:main-class "org.codehaus.modello.ModelloCli"
4223 #:jdk ,icedtea-8
4224 #:phases
4225 (modify-phases %standard-phases
4226 (add-before 'build 'copy-resources
4227 (lambda _
4228 (mkdir-p "build/classes/META-INF/plexus")
4229 (copy-file "modello-core/src/main/resources/META-INF/plexus/components.xml"
4230 "build/classes/META-INF/plexus/components.xml")
4231 #t))
4232 (add-before 'check 'fix-tests
4233 (lambda _
4234 (with-directory-excursion "modello-core/src/test/java/org/codehaus"
4235 (substitute* '("modello/core/DefaultModelloCoreTest.java"
4236 "modello/core/io/ModelReaderTest.java")
4237 (("src/test") "modello-core/src/test")))
4238 #t)))))
4239 (inputs
4240 `(("java-plexus-utils" ,java-plexus-utils)
4241 ("java-plexus-container-default" ,java-plexus-container-default)
4242 ("java-sisu-build-api" ,java-sisu-build-api)))
4243 (native-inputs
4244 `(("java-junit" ,java-junit)
4245 ("java-plexus-classworlds" ,java-plexus-classworlds)
4246 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4247 ("java-guava" ,java-guava)))
7942a129 4248 (home-page "https://codehaus-plexus.github.io/modello/")
b26c8b61
JL
4249 (synopsis "Framework for code generation from a simple model")
4250 (description "Modello is a framework for code generation from a simple model.
4251
4252Modello generates code from a simple model format: based on a plugin
4253architecture, various types of code and descriptors can be generated from the
4254single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers,
4255XSD and documentation.")
4256 (license (list
4257 license:expat
4258 ;; Although this package uses only files licensed under expat,
4259 ;; other parts of the source are licensed under different
4260 ;; licenses. We include them to be inherited by other packages.
4261 license:asl2.0
4262 ;; Some files in modello-plugin-java are licensed under a
4263 ;; 5-clause BSD license.
4264 (license:non-copyleft
4265 (string-append "file:///modello-plugins/modello-plugin-java/"
4266 "src/main/java/org/codehaus/modello/plugin/"
4267 "java/javasource/JNaming.java"))))))
4268
fc620bef
JL
4269(define-public java-modello-plugins-java
4270 (package
4271 (inherit java-modello-core)
4272 (name "java-modello-plugins-java")
4273 (arguments
4274 `(#:jar-name "modello-plugins-java.jar"
4275 #:source-dir "modello-plugins/modello-plugin-java/src/main/java"
4276 #:test-dir "modello-plugins/modello-plugin-java/src/test"
4277 #:jdk ,icedtea-8
4278 #:tests? #f; requires maven-model, which depends on this package
4279 #:phases
4280 (modify-phases %standard-phases
4281 (add-before 'build 'copy-resources
4282 (lambda _
4283 (mkdir-p "build/classes")
4284 (copy-recursively "modello-plugins/modello-plugin-java/src/main/resources"
4285 "build/classes")
4286 #t)))))
4287 (inputs
4288 `(("java-modello-core" ,java-modello-core)
4289 ,@(package-inputs java-modello-core)))
4290 (synopsis "Modello Java Plugin")
4291 (description "Modello Java Plugin generates Java objects for the model.")))
4292
a0ce95ba
JL
4293(define-public java-modello-plugins-xml
4294 (package
4295 (inherit java-modello-core)
4296 (name "java-modello-plugins-xml")
4297 (arguments
4298 `(#:jar-name "modello-plugins-xml.jar"
4299 #:source-dir "modello-plugins/modello-plugin-xml/src/main/java"
4300 #:test-dir "modello-plugins/modello-plugin-xml/src/test"
4301 #:jdk ,icedtea-8
4302 #:phases
4303 (modify-phases %standard-phases
4304 (add-before 'build 'copy-resources
4305 (lambda _
4306 (mkdir-p "build/classes")
4307 (copy-recursively
4308 "modello-plugins/modello-plugin-xml/src/main/resources"
4309 "build/classes")
4310 #t))
4311 (add-before 'check 'fix-paths
4312 (lambda _
4313 (with-directory-excursion "modello-plugins/modello-plugin-xml/src/test"
4314 (substitute*
4315 "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java"
2c8ac364
MW
4316 (("src/test") "modello-plugins/modello-plugin-xml/src/test")))
4317 #t)))))
a0ce95ba
JL
4318 (inputs
4319 `(("java-modello-core" ,java-modello-core)
4320 ("java-modello-plugins-java" ,java-modello-plugins-java)
4321 ,@(package-inputs java-modello-core)))
4322 (synopsis "Modello XML Plugin")
4323 (description "Modello XML Plugin contains shared code for every plugins
4324working on XML representation of the model.")))
4325
e4708560
JL
4326(define-public java-modello-test
4327 (package
4328 (inherit java-modello-core)
4329 (name "java-modello-test")
4330 (arguments
4331 `(#:jar-name "modello-test.jar"
4332 #:source-dir "modello-test/src/main/java"
4333 #:tests? #f; no tests
4334 #:jdk ,icedtea-8))
4335 (inputs
4336 `(("java-plexus-utils" ,java-plexus-utils)
4337 ("java-plexus-compiler-api" ,java-plexus-compiler-api)
4338 ("java-plexus-compiler-javac" ,java-plexus-compiler-javac)
4339 ("java-plexus-container-default" ,java-plexus-container-default)))
4340 (synopsis "Modello test package")
4341 (description "The modello test package contains the basis to create
4342Modello generator unit-tests, including sample models and xml files to test
4343every feature for every plugin.")))
4344
36607d3b
JL
4345(define-public java-modello-plugins-xpp3
4346 (package
4347 (inherit java-modello-core)
4348 (name "java-modello-plugins-xpp3")
4349 (arguments
4350 `(#:jar-name "modello-plugins-xpp3.jar"
4351 #:source-dir "modello-plugins/modello-plugin-xpp3/src/main/java"
4352 #:test-dir "modello-plugins/modello-plugin-xpp3/src/test"
4353 ;; One of the test dependencies is maven-model which depends on this package.
4354 #:tests? #f
4355 #:jdk ,icedtea-8
4356 #:phases
4357 (modify-phases %standard-phases
4358 (add-before 'build 'copy-resources
4359 (lambda _
4360 (mkdir-p "build/classes")
4361 (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources"
4362 "build/classes")
4363 #t)))))
4364 (inputs
4365 `(("java-modello-core" ,java-modello-core)
4366 ("java-modello-plugins-java" ,java-modello-plugins-java)
4367 ("java-modello-plugins-xml" ,java-modello-plugins-xml)
4368 ,@(package-inputs java-modello-core)))
4369 (native-inputs
4370 `(("java-xmlunit" ,java-xmlunit)
4371 ("java-modello-test" ,java-modello-test)
4372 ,@(package-native-inputs java-modello-core)))
4373 (synopsis "Modello XPP3 Plugin")
4374 (description "The modello XPP3 plugin generates XML readers and writers based
4375on the XPP3 API (XML Pull Parser).")))
4376
8f8ed9aa
RW
4377(define-public java-asm
4378 (package
4379 (name "java-asm")
d0e9ded7 4380 (version "6.0")
8f8ed9aa
RW
4381 (source (origin
4382 (method url-fetch)
654f997d 4383 (uri (string-append "https://download.forge.ow2.org/asm/"
8f8ed9aa
RW
4384 "asm-" version ".tar.gz"))
4385 (sha256
4386 (base32
d0e9ded7 4387 "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00"))))
8f8ed9aa 4388 (build-system ant-build-system)
d0e9ded7 4389 (propagated-inputs
9d216017
GB
4390 `(("java-aqute-bndlib" ,java-aqute-bndlib)
4391 ("java-aqute-libg" ,java-aqute-libg)))
8f8ed9aa
RW
4392 (arguments
4393 `(#:build-target "compile"
4394 ;; The tests require an old version of Janino, which no longer compiles
4395 ;; with the JDK7.
4396 #:tests? #f
d0e9ded7
GB
4397 #:make-flags
4398 (list
4399 ;; We don't need these extra ant tasks, but the build system asks us to
4400 ;; provide a path anyway.
4401 "-Dobjectweb.ant.tasks.path=dummy-path"
4402 ;; The java-aqute.bndlib JAR file will be put onto the classpath and
4403 ;; used during the build automatically by ant-build-system, but
4404 ;; java-asm's build.xml fails unless we provide something here.
4405 "-Dbiz.aQute.bnd.path=dummy-path")
8f8ed9aa
RW
4406 #:phases
4407 (modify-phases %standard-phases
4408 (add-before 'install 'build-jars
4409 (lambda* (#:key make-flags #:allow-other-keys)
4410 ;; We cannot use the "jar" target because it depends on a couple
4411 ;; of unpackaged, complicated tools.
4412 (mkdir "dist")
2c8ac364
MW
4413 (invoke "jar"
4414 "-cf" (string-append "dist/asm-" ,version ".jar")
4415 "-C" "output/build/tmp" ".")))
8f8ed9aa
RW
4416 (replace 'install
4417 (install-jars "dist")))))
4418 (native-inputs
4419 `(("java-junit" ,java-junit)))
1e4ae551 4420 (home-page "https://asm.ow2.io/")
8f8ed9aa
RW
4421 (synopsis "Very small and fast Java bytecode manipulation framework")
4422 (description "ASM is an all purpose Java bytecode manipulation and
4423analysis framework. It can be used to modify existing classes or dynamically
4424generate classes, directly in binary form. The provided common
a4cb4d17 4425transformations and analysis algorithms allow easily assembling custom
8f8ed9aa
RW
4426complex transformations and code analysis tools.")
4427 (license license:bsd-3)))
607fe24a 4428
bfb4004d
GB
4429(define java-asm-bootstrap
4430 (package
4431 (inherit java-asm)
4432 (name "java-asm-bootstrap")
4433 (arguments
4434 (substitute-keyword-arguments (package-arguments java-asm)
4435 ((#:tests? _) #f)))
4436 (native-inputs `())
4437 (propagated-inputs
4438 `(("java-aqute-bndlib" ,java-aqute-bndlib-bootstrap)
4439 ("java-aqute-libg" ,java-aqute-libg-bootstrap)
4440 ,@(delete `("java-aqute-bndlib" ,java-aqute-bndlib)
de99ba7e 4441 (delete `("java-aqute-libg" ,java-aqute-libg)
bfb4004d
GB
4442 (package-inputs java-asm)))))))
4443
607fe24a
RW
4444(define-public java-cglib
4445 (package
4446 (name "java-cglib")
4447 (version "3.2.4")
5c44505b
TGR
4448 (source
4449 (origin
4450 (method git-fetch)
4451 (uri (git-reference
4452 (url "https://github.com/cglib/cglib.git")
4453 (commit (string-append
4454 "RELEASE_"
4455 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
4456 version)))))
4457 (file-name (git-file-name name version))
4458 (sha256
4459 (base32 "186451jms2zfp47yd8kxd77az2cqal1my2br7klgyp8fpl4qfg8v"))))
607fe24a
RW
4460 (build-system ant-build-system)
4461 (arguments
4462 `(;; FIXME: tests fail because junit runs
4463 ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem
4464 ;; to describe a test at all.
4465 #:tests? #f
4466 #:jar-name "cglib.jar"
4467 #:phases
4468 (modify-phases %standard-phases
4469 (add-after 'unpack 'chdir
4470 (lambda _ (chdir "cglib") #t)))))
4471 (inputs
4472 `(("java-asm" ,java-asm)
4473 ("java-junit" ,java-junit)))
4474 (home-page "https://github.com/cglib/cglib/")
4475 (synopsis "Java byte code generation library")
4476 (description "The byte code generation library CGLIB is a high level API
4477to generate and transform Java byte code.")
4478 (license license:asl2.0)))
33e34bfe
RW
4479
4480(define-public java-objenesis
4481 (package
4482 (name "java-objenesis")
4483 (version "2.5.1")
4484 (source (origin
3dc7a8ce
EF
4485 (method git-fetch)
4486 (uri (git-reference
4487 (url "https://github.com/easymock/objenesis")
4488 (commit version)))
4489 (file-name (git-file-name name version))
33e34bfe
RW
4490 (sha256
4491 (base32
3dc7a8ce 4492 "054yi200wj00x6dp1sxfrwgndwywadsbn8d8ij1j0v45j9g2vdya"))))
33e34bfe
RW
4493 (build-system ant-build-system)
4494 (arguments
4495 `(#:jar-name "objenesis.jar"
4496 #:source-dir "main/src/"
4497 #:test-dir "main/src/test/"))
4498 (native-inputs
4499 `(("java-junit" ,java-junit)
4500 ("java-hamcrest-core" ,java-hamcrest-core)))
4501 (home-page "http://objenesis.org/")
4502 (synopsis "Bypass the constructor when creating an object")
4503 (description "Objenesis is a small Java library that serves one purpose:
4504to instantiate a new object of a particular class. It is common to see
4505restrictions in libraries stating that classes must require a default
4506constructor. Objenesis aims to overcome these restrictions by bypassing the
4507constructor on object instantiation.")
4508 (license license:asl2.0)))
ae589876
RW
4509
4510(define-public java-easymock
4511 (package
4512 (name "java-easymock")
4513 (version "3.4")
4514 (source (origin
7cf90f64
EF
4515 (method git-fetch)
4516 (uri (git-reference
4517 (url "https://github.com/easymock/easymock/")
4518 (commit (string-append "easymock-" version))))
4519 (file-name (git-file-name name version))
ae589876
RW
4520 (sha256
4521 (base32
7cf90f64 4522 "02vybm8hc0i0n9sp2f2iiqn54zwqhq835f76wc6b2m7819z5a8dq"))))
ae589876
RW
4523 (build-system ant-build-system)
4524 (arguments
4525 `(#:jar-name "easymock.jar"
4526 #:source-dir "core/src/main"
4527 #:test-dir "core/src/test"
4528 #:phases
4529 (modify-phases %standard-phases
4530 ;; FIXME: Android support requires the following packages to be
4531 ;; available: com.google.dexmaker.stock.ProxyBuilder
4532 (add-after 'unpack 'delete-android-support
4533 (lambda _
4534 (with-directory-excursion "core/src/main/java/org/easymock/internal"
4535 (substitute* "MocksControl.java"
4536 (("AndroidSupport.isAndroid\\(\\)") "false")
4537 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
4538 (delete-file "AndroidClassProxyFactory.java"))
4539 #t))
4540 (add-after 'unpack 'delete-broken-tests
4541 (lambda _
4542 (with-directory-excursion "core/src/test/java/org/easymock"
4543 ;; This test depends on dexmaker.
4544 (delete-file "tests2/ClassExtensionHelperTest.java")
4545
4546 ;; This is not a test.
4547 (delete-file "tests/BaseEasyMockRunnerTest.java")
4548
4549 ;; This test should be executed with a different runner...
4550 (delete-file "tests2/EasyMockAnnotationsTest.java")
4551 ;; ...but deleting it means that we also have to delete these
4552 ;; dependent files.
4553 (delete-file "tests2/EasyMockRunnerTest.java")
4554 (delete-file "tests2/EasyMockRuleTest.java")
4555
4556 ;; This test fails because the file "easymock.properties" does
4557 ;; not exist.
4558 (delete-file "tests2/EasyMockPropertiesTest.java"))
4559 #t)))))
4560 (inputs
4561 `(("java-asm" ,java-asm)
4562 ("java-cglib" ,java-cglib)
4563 ("java-objenesis" ,java-objenesis)))
4564 (native-inputs
4565 `(("java-junit" ,java-junit)
4566 ("java-hamcrest-core" ,java-hamcrest-core)))
7cf90f64 4567 (home-page "https://easymock.org/")
ae589876
RW
4568 (synopsis "Java library providing mock objects for unit tests")
4569 (description "EasyMock is a Java library that provides an easy way to use
4570mock objects in unit testing.")
4571 (license license:asl2.0)))
7aa37023 4572
f12ad6c7
RW
4573(define-public java-jmock-1
4574 (package
4575 (name "java-jmock")
4576 (version "1.2.0")
4577 (source (origin
7cf26f24
EF
4578 (method git-fetch)
4579 (uri (git-reference
4580 (url "https://github.com/jmock-developers/jmock-library")
4581 (commit version)))
4582 (file-name (git-file-name name version))
f12ad6c7
RW
4583 (sha256
4584 (base32
7cf26f24 4585 "0lkga995xd9b9mmzxmcd301hlw83p1h78nibh7djlx7wydscr85z"))))
f12ad6c7
RW
4586 (build-system ant-build-system)
4587 (arguments
4588 `(#:build-target "jars"
4589 #:test-target "run.tests"
4590 #:phases
4591 (modify-phases %standard-phases
4592 (replace 'install (install-jars "build")))))
7cf26f24 4593 (home-page "http://jmock.org/")
f12ad6c7
RW
4594 (synopsis "Mock object library for test-driven development")
4595 (description "JMock is a library that supports test-driven development of
4596Java code with mock objects. Mock objects help you design and test the
4597interactions between the objects in your programs.
4598
4599The jMock library
4600
4601@itemize
4602@item makes it quick and easy to define mock objects
4603@item lets you precisely specify the interactions between
4604 your objects, reducing the brittleness of your tests
4605@item plugs into your favourite test framework
4606@item is easy to extend.
4607@end itemize\n")
4608 (license license:bsd-3)))
4609
045124ae
JL
4610(define-public java-jmock
4611 (package
4612 (inherit java-jmock-1)
4613 (name "java-jmock")
4614 (version "2.8.2")
4615 (source (origin
242af295
EF
4616 (method git-fetch)
4617 (uri (git-reference
4618 (url "https://github.com/jmock-developers/jmock-library")
4619 (commit version)))
4620 (file-name (git-file-name name version))
045124ae
JL
4621 (sha256
4622 (base32
242af295 4623 "12b7l22g3nrjvf2dzcw3z03fpd2chrgp0d8xkvn8w55rwb57pax6"))))
045124ae
JL
4624 (inputs
4625 `(("java-hamcrest-all" ,java-hamcrest-all)
4626 ("java-asm" ,java-asm)
4627 ("java-bsh" ,java-bsh)
4628 ("java-junit" ,java-junit)))
4629 (native-inputs
4630 `(("cglib" ,java-cglib)))
4631 (arguments
4632 `(#:jar-name "java-jmock.jar"
4633 #:source-dir "jmock/src/main/java"
4634 #:test-dir "jmock/src/test"))))
4635
25436c6d
JL
4636(define-public java-jmock-junit4
4637 (package
4638 (inherit java-jmock)
4639 (name "java-jmock-junit4")
4640 (arguments
4641 `(#:jar-name "java-jmock-junit4.jar"
4642 #:source-dir "jmock-junit4/src/main/java"
4643 #:test-dir "jmock-junit4/src/test"))
4644 (inputs
4645 `(("java-hamcrest-all" ,java-hamcrest-all)
4646 ("java-asm" ,java-asm)
4647 ("java-bsh" ,java-bsh)
4648 ("java-jmock" ,java-jmock)
4649 ("java-jumit" ,java-junit)))))
4650
e84b899d
JL
4651(define-public java-jmock-legacy
4652 (package
4653 (inherit java-jmock)
4654 (name "java-jmock-legacy")
4655 (arguments
4656 `(#:jar-name "java-jmock-legacy.jar"
4657 #:source-dir "jmock-legacy/src/main/java"
4658 #:test-dir "jmock-legacy/src/test"
4659 #:phases
4660 (modify-phases %standard-phases
4661 (add-before 'check 'copy-tests
4662 (lambda _
4663 ;; This file is a dependancy of some tests
4664 (let ((file "org/jmock/test/acceptance/PackageProtectedType.java"))
4665 (copy-file (string-append "jmock/src/test/java/" file)
4666 (string-append "jmock-legacy/src/test/java/" file))
4667 #t))))))
4668 (inputs
4669 `(("java-hamcrest-all" ,java-hamcrest-all)
4670 ("java-objenesis" ,java-objenesis)
4671 ("java-cglib" ,java-cglib)
4672 ("java-jmock" ,java-jmock)
4673 ("java-asm" ,java-asm)
4674 ("java-bsh" ,java-bsh)
4675 ("java-junit" ,java-junit)))
4676 (native-inputs
4677 `(("java-jmock-junit4" ,java-jmock-junit4)))))
4678
439c59da
RW
4679(define-public java-hamcrest-all
4680 (package (inherit java-hamcrest-core)
4681 (name "java-hamcrest-all")
4682 (arguments
bfc007e1
RW
4683 `(#:jdk ,icedtea-8
4684 ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core)
4685 ((#:build-target _) "bigjar")
4686 ((#:phases phases)
4687 `(modify-phases ,phases
4688 ;; Some build targets override the classpath, so we need to patch
4689 ;; the build.xml to ensure that required dependencies are on the
4690 ;; classpath.
4691 (add-after 'unpack 'patch-classpath-for-integration
4692 (lambda* (#:key inputs #:allow-other-keys)
4693 (substitute* "build.xml"
4694 ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
4695 (string-join
4696 (cons line
4697 (append
4698 (find-files (assoc-ref inputs "java-junit") "\\.jar$")
4699 (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
4700 (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
2cc63e6f
RW
4701 ";"))
4702 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
4703 (string-append (assoc-ref inputs "java-hamcrest-core")
4704 "/share/java/hamcrest-core.jar")))
bfc007e1 4705 #t)))))))
439c59da
RW
4706 (inputs
4707 `(("java-junit" ,java-junit)
4708 ("java-jmock" ,java-jmock-1)
2cc63e6f
RW
4709 ;; This is necessary because of what seems to be a race condition.
4710 ;; This package would sometimes fail to build because hamcrest-core.jar
4711 ;; could not be found, even though it is built as part of this package.
4712 ;; Adding java-hamcrest-core appears to fix this problem. See
4713 ;; https://debbugs.gnu.org/31390 for more information.
4714 ("java-hamcrest-core" ,java-hamcrest-core)
439c59da 4715 ("java-easymock" ,java-easymock)
439c59da
RW
4716 ,@(package-inputs java-hamcrest-core)))))
4717
7aa37023
RW
4718(define-public java-jopt-simple
4719 (package
4720 (name "java-jopt-simple")
4721 (version "5.0.3")
4722 (source (origin
4723 (method url-fetch)
4724 (uri (string-append "http://repo1.maven.org/maven2/"
4725 "net/sf/jopt-simple/jopt-simple/"
4726 version "/jopt-simple-"
4727 version "-sources.jar"))
4728 (sha256
4729 (base32
4730 "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa"))))
4731 (build-system ant-build-system)
4732 (arguments
4733 `(#:tests? #f ; there are no tests
4734 #:jar-name "jopt-simple.jar"))
4735 (home-page "https://pholser.github.io/jopt-simple/")
4736 (synopsis "Java library for parsing command line options")
4737 (description "JOpt Simple is a Java library for parsing command line
4738options, such as those you might pass to an invocation of @code{javac}. In
4739the interest of striving for simplicity, as closely as possible JOpt Simple
4740attempts to honor the command line option syntaxes of POSIX @code{getopt} and
4741GNU @code{getopt_long}. It also aims to make option parser configuration and
4742retrieval of options and their arguments simple and expressive, without being
4743overly clever.")
4744 (license license:expat)))
840969e8
RW
4745
4746(define-public java-commons-math3
4747 (package
4748 (name "java-commons-math3")
4749 (version "3.6.1")
4750 (source (origin
4751 (method url-fetch)
4752 (uri (string-append "mirror://apache/commons/math/source/"
4753 "commons-math3-" version "-src.tar.gz"))
4754 (sha256
4755 (base32
4756 "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6"))))
4757 (build-system ant-build-system)
4758 (arguments
4759 `(#:build-target "jar"
4760 #:test-target "test"
4761 #:make-flags
4762 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
4763 (junit (assoc-ref %build-inputs "java-junit")))
4764 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4765 (string-append "-Dhamcrest.jar=" hamcrest
4766 "/share/java/hamcrest-core.jar")))
4767 #:phases
4768 (modify-phases %standard-phases
4769 ;; We want to build the jar in the build phase and run the tests
4770 ;; later in a separate phase.
4771 (add-after 'unpack 'untangle-targets
4772 (lambda _
4773 (substitute* "build.xml"
4774 (("name=\"jar\" depends=\"test\"")
4775 "name=\"jar\" depends=\"compile\""))
4776 #t))
4777 ;; There is no install target.
4778 (replace 'install
4779 (install-jars "target")))))
4780 (native-inputs
4781 `(("java-junit" ,java-junit)
4782 ("java-hamcrest-core" ,java-hamcrest-core)))
4f236f84 4783 (home-page "https://commons.apache.org/math/")
840969e8
RW
4784 (synopsis "Apache Commons mathematics library")
4785 (description "Commons Math is a library of lightweight, self-contained
4786mathematics and statistics components addressing the most common problems not
4787available in the Java programming language or Commons Lang.")
4788 (license license:asl2.0)))
62c9bfaa
RW
4789
4790(define-public java-jmh
4791 (package
4792 (name "java-jmh")
4793 (version "1.17.5")
4794 (source (origin
4795 (method hg-fetch)
4796 (uri (hg-reference
4797 (url "http://hg.openjdk.java.net/code-tools/jmh/")
4798 (changeset version)))
4799 (file-name (string-append name "-" version "-checkout"))
4800 (sha256
4801 (base32
4802 "1fxyxhg9famwcg1prc4cgwb5wzyxqavn3cjm5vz8605xz7x5k084"))))
4803 (build-system ant-build-system)
4804 (arguments
4805 `(#:jar-name "jmh-core.jar"
4806 #:source-dir "jmh-core/src/main"
4807 #:test-dir "jmh-core/src/test"
4808 #:phases
4809 (modify-phases %standard-phases
4810 ;; This seems to be a bug in the JDK. It may not be necessary in
4811 ;; future versions of the JDK.
4812 (add-after 'unpack 'fix-bug
4813 (lambda _
4814 (with-directory-excursion
4815 "jmh-core/src/main/java/org/openjdk/jmh/runner/options"
4816 (substitute* '("IntegerValueConverter.java"
4817 "ThreadsValueConverter.java")
4818 (("public Class<Integer> valueType")
4819 "public Class<? extends Integer> valueType")))
4820 #t)))))
4821 (inputs
4822 `(("java-jopt-simple" ,java-jopt-simple)
4823 ("java-commons-math3" ,java-commons-math3)))
4824 (native-inputs
4825 `(("java-junit" ,java-junit)
4826 ("java-hamcrest-core" ,java-hamcrest-core)))
e799400d 4827 (home-page "https://openjdk.java.net/projects/code-tools/jmh/")
62c9bfaa
RW
4828 (synopsis "Benchmark harness for the JVM")
4829 (description "JMH is a Java harness for building, running, and analysing
4830nano/micro/milli/macro benchmarks written in Java and other languages
f4548394 4831targeting the JVM.")
62c9bfaa
RW
4832 ;; GPLv2 only
4833 (license license:gpl2)))
56ebb4e9
RW
4834
4835(define-public java-commons-collections4
4836 (package
4837 (name "java-commons-collections4")
4838 (version "4.1")
4839 (source (origin
4840 (method url-fetch)
4841 (uri (string-append "mirror://apache/commons/collections/source/"
4842 "commons-collections4-" version "-src.tar.gz"))
4843 (sha256
4844 (base32
4845 "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl"))))
4846 (build-system ant-build-system)
4847 (arguments
4848 `(#:test-target "test"
4849 #:make-flags
4850 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
4851 (junit (assoc-ref %build-inputs "java-junit"))
4852 (easymock (assoc-ref %build-inputs "java-easymock")))
4853 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4854 (string-append "-Dhamcrest.jar=" hamcrest
4855 "/share/java/hamcrest-core.jar")
4856 (string-append "-Deasymock.jar=" easymock
4857 "/share/java/easymock.jar")))
4858 #:phases
4859 (modify-phases %standard-phases
4860 (replace 'install
4861 (install-jars "target")))))
4862 (native-inputs
4863 `(("java-junit" ,java-junit)
4864 ("java-hamcrest-core" ,java-hamcrest-core)
4865 ("java-easymock" ,java-easymock)))
21e207d2 4866 (home-page "https://commons.apache.org/collections/")
56ebb4e9
RW
4867 (synopsis "Collections framework")
4868 (description "The Java Collections Framework is the recognised standard
4869for collection handling in Java. Commons-Collections seek to build upon the
4870JDK classes by providing new interfaces, implementations and utilities. There
4871are many features, including:
4872
4873@itemize
4874@item @code{Bag} interface for collections that have a number of copies of
4875 each object
4876@item @code{BidiMap} interface for maps that can be looked up from value to
4877 key as well and key to value
4878@item @code{MapIterator} interface to provide simple and quick iteration over
4879 maps
4880@item Transforming decorators that alter each object as it is added to the
4881 collection
4882@item Composite collections that make multiple collections look like one
4883@item Ordered maps and sets that retain the order elements are added in,
4884 including an LRU based map
4885@item Reference map that allows keys and/or values to be garbage collected
4886 under close control
4887@item Many comparator implementations
4888@item Many iterator implementations
4889@item Adapter classes from array and enumerations to collections
4890@item Utilities to test or create typical set-theory properties of collections
4891 such as union, intersection, and closure.
4892@end itemize\n")
4893 (license license:asl2.0)))
6af63e65 4894
229a9864
JL
4895(define-public java-commons-collections
4896 (package
4897 (inherit java-commons-collections4)
4898 (name "java-commons-collections")
4899 (version "3.2.2")
4900 (source (origin
4901 (method url-fetch)
4902 (uri (string-append "mirror://apache/commons/collections/source/"
4903 "commons-collections-" version "-src.tar.gz"))
4904 (sha256
4905 (base32
7c7323e4
GB
4906 "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387"))
4907 (patches
4908 (search-patches "java-commons-collections-fix-java8.patch"))))
229a9864
JL
4909 (arguments
4910 (substitute-keyword-arguments (package-arguments java-commons-collections4)
4911 ((#:phases phases)
4912 `(modify-phases ,phases
4913 ;; The manifest is required by the build procedure
4914 (add-before 'build 'add-manifest
4915 (lambda _
4916 (mkdir-p "build/conf")
4917 (call-with-output-file "build/conf/MANIFEST.MF"
4918 (lambda (file)
2c8ac364
MW
4919 (format file "Manifest-Version: 1.0\n")))
4920 #t))
229a9864
JL
4921 (replace 'install
4922 (install-jars "build"))))))))
4923
5aa2f3f4
JL
4924(define java-commons-collections-test-classes
4925 (package
4926 (inherit java-commons-collections)
4927 (arguments
4928 `(#:jar-name "commons-collections-test-classes.jar"
4929 #:source-dir "src/test"
4930 #:tests? #f))
4931 (inputs
4932 `(("collection" ,java-commons-collections)))))
4933
4934(define-public java-commons-beanutils
4935 (package
4936 (name "java-commons-beanutils")
4937 (version "1.9.3")
4938 (source (origin
4939 (method url-fetch)
4940 (uri (string-append "mirror://apache/commons/beanutils/source/"
4941 "commons-beanutils-" version "-src.tar.gz"))
4942 (sha256
4943 (base32
4944 "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk"))))
4945 (build-system ant-build-system)
4946 (arguments
4947 `(#:test-target "test"
4948 #:tests? #f
4949 #:phases
4950 (modify-phases %standard-phases
4951 (replace 'install
4952 (lambda* (#:key outputs #:allow-other-keys)
4953 (rename-file (string-append "dist/commons-beanutils-" ,version
4954 "-SNAPSHOT.jar")
4955 "commons-beanutils.jar")
4956 (install-file "commons-beanutils.jar"
4957 (string-append (assoc-ref outputs "out") "/share/java/"))
4958 #t)))))
4959 (inputs
4960 `(("logging" ,java-commons-logging-minimal)
4961 ("collections" ,java-commons-collections)))
4962 (native-inputs
4963 `(("junit" ,java-junit)
4964 ("collections-test" ,java-commons-collections-test-classes)))
4f236f84 4965 (home-page "https://commons.apache.org/beanutils/")
5aa2f3f4
JL
4966 (synopsis "Dynamically set or get properties in Java")
4967 (description "BeanUtils provides a simplified interface to reflection and
4968introspection to set or get dynamically determined properties through their
4969setter and getter method.")
4970 (license license:asl2.0)))
4971
6af63e65
HG
4972(define-public java-commons-io
4973 (package
4974 (name "java-commons-io")
4975 (version "2.5")
4976 (source
4977 (origin
4978 (method url-fetch)
4979 (uri (string-append "mirror://apache/commons/io/source/"
4980 "commons-io-" version "-src.tar.gz"))
4981 (sha256
4982 (base32
4983 "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3"))))
4984 (build-system ant-build-system)
4985 (outputs '("out" "doc"))
4986 (arguments
4987 `(#:test-target "test"
4988 #:make-flags
4989 (list (string-append "-Djunit.jar="
4990 (assoc-ref %build-inputs "java-junit")
4991 "/share/java/junit.jar"))
4992 #:phases
4993 (modify-phases %standard-phases
4994 (add-after 'build 'build-javadoc ant-build-javadoc)
4995 (replace 'install (install-jars "target"))
4996 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4997 (native-inputs
4998 `(("java-junit" ,java-junit)
4999 ("java-hamcrest-core" ,java-hamcrest-core)))
4f236f84 5000 (home-page "https://commons.apache.org/io/")
6af63e65
HG
5001 (synopsis "Common useful IO related classes")
5002 (description "Commons-IO contains utility classes, stream implementations,
5003file filters and endian classes.")
5004 (license license:asl2.0)))
d631b5f3 5005
46f9022c
DM
5006(define-public java-commons-exec-1.1
5007 (package
5008 (name "java-commons-exec")
5009 (version "1.1")
5010 (source
5011 (origin
5012 (method url-fetch)
5013 (uri (string-append "mirror://apache/commons/exec/source/"
5014 "commons-exec-" version "-src.tar.gz"))
5015 (sha256
5016 (base32
5017 "025dk8xgj10lxwwwqp0hng2rn7fr4vcirxzydqzx9k4dim667alk"))))
5018 (build-system ant-build-system)
5019 (arguments
5020 `(#:test-target "test"
5021 #:make-flags
5022 (list (string-append "-Dmaven.junit.jar="
5023 (assoc-ref %build-inputs "java-junit")
5024 "/share/java/junit.jar"))
5025 #:phases
5026 (modify-phases %standard-phases
5027 (add-before 'build 'delete-network-tests
5028 (lambda _
5029 (delete-file "src/test/java/org/apache/commons/exec/DefaultExecutorTest.java")
5030 (substitute* "src/test/java/org/apache/commons/exec/TestRunner.java"
5031 (("suite\\.addTestSuite\\(DefaultExecutorTest\\.class\\);") ""))
5032 #t))
5033 ;; The "build" phase automatically tests.
5034 (delete 'check)
5035 (replace 'install (install-jars "target")))))
5036 (native-inputs
5037 `(("java-junit" ,java-junit)))
31b85761 5038 (home-page "https://commons.apache.org/proper/commons-exec/")
46f9022c
DM
5039 (synopsis "Common program execution related classes")
5040 (description "Commons-Exec simplifies executing external processes.")
5041 (license license:asl2.0)))
5042
5043(define-public java-commons-exec
5044 (package
5045 (inherit java-commons-exec-1.1)
5046 (version "1.3")
5047 (source
5048 (origin
5049 (method url-fetch)
5050 (uri (string-append "mirror://apache/commons/exec/source/"
5051 "commons-exec-" version "-src.tar.gz"))
5052 (sha256
5053 (base32
5054 "17yb4h6f8l49c5iyyvda4z2nmw0bxrx857nrwmsr7mmpb7x441yv"))))
5055 (arguments
5056 `(#:test-target "test"
5057 #:make-flags
5058 (list (string-append "-Dmaven.junit.jar="
5059 (assoc-ref %build-inputs "java-junit")
5060 "/share/java/junit.jar")
5061 "-Dmaven.compiler.source=1.7"
5062 "-Dmaven.compiler.target=1.7")
5063 #:phases
5064 (modify-phases %standard-phases
5065 (add-before 'build 'delete-network-tests
5066 (lambda* (#:key inputs #:allow-other-keys)
5067 ;; This test hangs indefinitely.
5068 (delete-file "src/test/java/org/apache/commons/exec/issues/Exec60Test.java")
5069 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec41Test.java"
5070 (("ping -c 10 127.0.0.1") "sleep 10"))
5071 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec49Test.java"
5072 (("/bin/ls") "ls"))
5073 (call-with-output-file "src/test/scripts/ping.sh"
5074 (lambda (port)
5075 (format port "#!~a/bin/sh\nsleep $1\n"
5076 (assoc-ref inputs "bash"))))
5077 #t))
5078 ;; The "build" phase automatically tests.
5079 (delete 'check)
5080 (replace 'install (install-jars "target")))))
5081 (native-inputs
5082 `(("java-junit" ,java-junit)
5083 ("java-hamcrest-core" ,java-hamcrest-core)))))
5084
d631b5f3
HG
5085(define-public java-commons-lang
5086 (package
5087 (name "java-commons-lang")
5088 (version "2.6")
5089 (source
5090 (origin
5091 (method url-fetch)
5092 (uri (string-append "mirror://apache/commons/lang/source/"
5093 "commons-lang-" version "-src.tar.gz"))
5094 (sha256
5095 (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5"))))
5096 (build-system ant-build-system)
5097 (outputs '("out" "doc"))
5098 (arguments
5099 `(#:test-target "test"
e5a96113 5100 #:test-exclude (list "**/Abstract*.java" "**/Random*.java")
d631b5f3
HG
5101 #:phases
5102 (modify-phases %standard-phases
5103 (add-after 'build 'build-javadoc ant-build-javadoc)
5104 (add-before 'check 'disable-failing-test
5105 (lambda _
5106 ;; Disable a failing test
5107 (substitute* "src/test/java/org/apache/commons/lang/\
5108time/FastDateFormatTest.java"
5109 (("public void testFormat\\(\\)")
5110 "public void disabled_testFormat()"))
5111 #t))
5112 (replace 'install (install-jars "target"))
5113 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
5114 (native-inputs
5115 `(("java-junit" ,java-junit)))
4f236f84 5116 (home-page "https://commons.apache.org/lang/")
d631b5f3
HG
5117 (synopsis "Extension of the java.lang package")
5118 (description "The Commons Lang components contains a set of Java classes
5119that provide helper methods for standard Java classes, especially those found
5120in the @code{java.lang} package in the Sun JDK. The following classes are
5121included:
5122
5123@itemize
5124@item StringUtils - Helper for @code{java.lang.String}.
5125@item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets
5126 of characters such as @code{[a-z]} and @code{[abcdez]}.
5127@item RandomStringUtils - Helper for creating randomised strings.
5128@item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
5129@item NumberRange - A range of numbers with an upper and lower bound.
5130@item ObjectUtils - Helper for @code{java.lang.Object}.
5131@item SerializationUtils - Helper for serializing objects.
5132@item SystemUtils - Utility class defining the Java system properties.
5133@item NestedException package - A sub-package for the creation of nested
5134 exceptions.
5135@item Enum package - A sub-package for the creation of enumerated types.
5136@item Builder package - A sub-package for the creation of @code{equals},
5137 @code{hashCode}, @code{compareTo} and @code{toString} methods.
5138@end itemize\n")
5139 (license license:asl2.0)))
82e18864
HG
5140
5141(define-public java-commons-lang3
5142 (package
5143 (name "java-commons-lang3")
5144 (version "3.4")
5145 (source
5146 (origin
5147 (method url-fetch)
5148 (uri (string-append "mirror://apache/commons/lang/source/"
5149 "commons-lang3-" version "-src.tar.gz"))
5150 (sha256
5151 (base32 "0xpshb9spjhplq5a7mr0y1bgfw8190ik4xj8f569xidfcki1d6kg"))))
5152 (build-system ant-build-system)
5153 (outputs '("out" "doc"))
5154 (arguments
5155 `(#:test-target "test"
5156 #:make-flags
5157 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-all"))
5158 (junit (assoc-ref %build-inputs "java-junit"))
5159 (easymock (assoc-ref %build-inputs "java-easymock"))
5160 (io (assoc-ref %build-inputs "java-commons-io")))
5161 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
5162 (string-append "-Dhamcrest.jar=" hamcrest
5163 "/share/java/hamcrest-all.jar")
5164 (string-append "-Dcommons-io.jar=" io
5165 "/share/java/commons-io-"
5166 ,(package-version java-commons-io)
5167 "-SNAPSHOT.jar")
5168 (string-append "-Deasymock.jar=" easymock
5169 "/share/java/easymock.jar")))
5170 #:phases
5171 (modify-phases %standard-phases
5172 (add-after 'build 'build-javadoc ant-build-javadoc)
5173 (replace 'install (install-jars "target"))
5174 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
5175 (native-inputs
5176 `(("java-junit" ,java-junit)
5177 ("java-commons-io" ,java-commons-io)
5178 ("java-hamcrest-all" ,java-hamcrest-all)
5179 ("java-easymock" ,java-easymock)))
4f236f84 5180 (home-page "https://commons.apache.org/lang/")
82e18864
HG
5181 (synopsis "Extension of the java.lang package")
5182 (description "The Commons Lang components contains a set of Java classes
5183that provide helper methods for standard Java classes, especially those found
5184in the @code{java.lang} package. The following classes are included:
5185
5186@itemize
5187@item StringUtils - Helper for @code{java.lang.String}.
5188@item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of
5189 characters such as @code{[a-z]} and @code{[abcdez]}.
5190@item RandomStringUtils - Helper for creating randomised strings.
5191@item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
5192@item NumberRange - A range of numbers with an upper and lower bound.
5193@item ObjectUtils - Helper for @code{java.lang.Object}.
5194@item SerializationUtils - Helper for serializing objects.
5195@item SystemUtils - Utility class defining the Java system properties.
5196@item NestedException package - A sub-package for the creation of nested
5197 exceptions.
5198@item Enum package - A sub-package for the creation of enumerated types.
5199@item Builder package - A sub-package for the creation of @code{equals},
5200 @code{hashCode}, @code{compareTo} and @code{toString} methods.
5201@end itemize\n")
5202 (license license:asl2.0)))
1c188f4e 5203
afb13a10
JL
5204(define-public java-commons-bsf
5205 (package
5206 (name "java-commons-bsf")
5207 (version "2.4.0")
5208 (source (origin
5209 (method url-fetch)
5210 (uri (string-append "mirror://apache/commons/bsf/source/bsf-src-"
5211 version ".tar.gz"))
5212 (sha256
5213 (base32
5214 "1sbamr8jl32p1jgf59nw0b2w9qivyg145954hm6ly54cfgsqrdas"))
5215 (modules '((guix build utils)))
5216 (snippet
5217 '(begin
5218 (for-each delete-file
5219 (find-files "." "\\.jar$"))
5220 #t))))
5221 (build-system ant-build-system)
5222 (arguments
5223 `(#:build-target "jar"
5224 #:tests? #f; No test file
5225 #:modules ((guix build ant-build-system)
5226 (guix build utils)
5227 (guix build java-utils)
5228 (sxml simple))
5229 #:phases
5230 (modify-phases %standard-phases
5231 (add-before 'build 'create-properties
5232 (lambda _
5233 ;; This file is missing from the distribution
5234 (call-with-output-file "build-properties.xml"
5235 (lambda (port)
5236 (sxml->xml
5237 `(project (@ (basedir ".") (name "build-properties") (default ""))
5238 (property (@ (name "project.name") (value "bsf")))
5239 (property (@ (name "source.level") (value "1.5")))
5240 (property (@ (name "build.lib") (value "build/jar")))
5241 (property (@ (name "src.dir") (value "src")))
5242 (property (@ (name "tests.dir") (value "src/org/apache/bsf/test")))
5243 (property (@ (name "build.tests") (value "build/test-classes")))
5244 (property (@ (name "build.dest") (value "build/classes"))))
2c8ac364
MW
5245 port)))
5246 #t))
afb13a10
JL
5247 (replace 'install (install-jars "build")))))
5248 (native-inputs
5249 `(("java-junit" ,java-junit)))
5250 (inputs
5251 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
5252 (home-page "https://commons.apache.org/proper/commons-bsf")
5253 (synopsis "Bean Scripting Framework")
5254 (description "The Bean Scripting Framework (BSF) is a set of Java classes
5255which provides scripting language support within Java applications, and access
5256to Java objects and methods from scripting languages. BSF allows one to write
5257JSPs in languages other than Java while providing access to the Java class
5258library. In addition, BSF permits any Java application to be implemented in
5259part (or dynamically extended) by a language that is embedded within it. This
5260is achieved by providing an API that permits calling scripting language engines
5261from within Java, as well as an object registry that exposes Java objects to
5262these scripting language engines.")
5263 (license license:asl2.0)))
5264
66006fe5
JL
5265(define-public java-commons-jxpath
5266 (package
5267 (name "java-commons-jxpath")
5268 (version "1.3")
5269 (source (origin
5270 (method url-fetch)
5271 (uri (string-append "mirror://apache/commons/jxpath/source/"
5272 "commons-jxpath-" version "-src.tar.gz"))
5273 (sha256
5274 (base32
5275 "1rpgg31ayn9fwr4bfi2i1ij0npcg79ad2fv0w9hacvawsyc42cfs"))))
5276 (build-system ant-build-system)
5277 (arguments
5278 `(#:jar-name "commons-jxpath.jar"
5279 ;; tests require more dependencies, including mockrunner which depends on old software
5280 #:tests? #f
5281 #:source-dir "src/java"))
5282 (inputs
10eddaca 5283 `(("servlet" ,java-classpathx-servletapi)
66006fe5
JL
5284 ("java-jdom" ,java-jdom)
5285 ("java-commons-beanutils" ,java-commons-beanutils)))
5286 (native-inputs
5287 `(("java-junit" ,java-junit)))
4f236f84 5288 (home-page "https://commons.apache.org/jxpath/")
66006fe5
JL
5289 (synopsis "Simple interpreter of an expression language called XPath.")
5290 (description "The org.apache.commons.jxpath package defines a simple
5291interpreter of an expression language called XPath. JXPath applies XPath
5292expressions to graphs of objects of all kinds: JavaBeans, Maps, Servlet
5293contexts, DOM etc, including mixtures thereof.")
5294 (license license:asl2.0)))
5295
b635d272
JL
5296(define-public java-commons-pool
5297 (package
5298 (name "java-commons-pool")
5299 (version "2.6.2")
5300 (source (origin
5301 (method url-fetch)
5302 (uri (string-append "mirror://apache/commons/pool/source/"
5303 "commons-pool2-" version "-src.tar.gz"))
5304 (sha256
5305 (base32
5306 "1fi1hgqmq01bs6azbj3sfswxzadp2r8sjjfiq6ryilz1m50kvrv6"))))
5307 (arguments
5308 `(#:jar-name "common-pool.jar"
5309 #:source-dir "src/main/java"
5310 #:test-exclude
5311 (list "**/PerformanceTest.java")))
5312 (build-system ant-build-system)
5313 (inputs
5314 `(("java-cglib" ,java-cglib)))
5315 (native-inputs
5316 `(("java-junit" ,java-junit)
5317 ("java-hamcrest-core" ,java-hamcrest-core)
5318 ("java-asm" ,java-asm)
5319 ("java-objenesis" ,java-objenesis)))
5320 (home-page "https://commons.apache.org/proper/commons-pool/")
5321 (synopsis "Object-pooling API in Java")
5322 (description "The commons-pool package provides an object-pooling API
5323and a number of object pool implementations. This package defines a
5324handful of pooling interfaces and some base classes that may be useful when
5325creating new pool implementations.")
5326 (license license:asl2.0)))
5327
f31ea164
JL
5328(define-public java-commons-dbcp
5329 (package
5330 (name "java-commons-dbcp")
5331 (version "2.6.0")
5332 (source (origin
5333 (method url-fetch)
5334 (uri (string-append "mirror://apache/commons/dbcp/source/"
5335 "commons-dbcp2-" version "-src.tar.gz"))
5336 (sha256
5337 (base32
5338 "0axbvcbnf2l70fc3ybrlp3siw2w4ka9mia2pnx4py8gz54cpw3rc"))))
5339 (arguments
5340 `(#:source-dir "src/main/java"
5341 #:jar-name "java-commons-dbcp.jar"
5342 #:tests? #f)); requires apache-geronimo
5343 (inputs
5344 `(("java-commons-pool" ,java-commons-pool)
5345 ("java-commons-logging" ,java-commons-logging-minimal)
5346 ("java-jboss-transaction-api-spec" ,java-jboss-transaction-api-spec)))
5347 (native-inputs
5348 `(("java-junit" ,java-junit)))
5349 (build-system ant-build-system)
5350 (home-page "https://commons.apache.org/proper/commons-dbcp/")
5351 (synopsis "Database Connection Pool for Java")
5352 (description "Commons-dbcp allows you to share a pool of database
5353connections between users. Creating a new connection for each user can be
5354time consuming and even unfeasible when the number of simultaneous users is
5355very large. This package provides a way to share a poole of connections to
5356reduce that load.")
5357 (license license:asl2.0)))
5358
934b83e4
JL
5359(define-public java-commons-jcs
5360 (package
5361 (name "java-commons-jcs")
5362 (version "2.2.1")
5363 (source (origin
5364 (method url-fetch)
5365 (uri (string-append "mirror://apache/commons/jcs/source/"
5366 "commons-jcs-dist-" version "-src.tar.gz"))
5367 (sha256
5368 (base32
5369 "0syhq2npjbrl0azqfjm0gvash1qd5qjy4qmysxcrqjsk0nf9fa1q"))))
5370 (build-system ant-build-system)
5371 (arguments
5372 `(#:jar-name "commons-jcs.jar"
5373 #:source-dir "commons-jcs-core/src/main/java"
5374 #:test-dir "commons-jcs-core/src/test"
5375 #:tests? #f; requires hsqldb
5376 #:phases
5377 (modify-phases %standard-phases
5378 (add-before 'build 'prepare
5379 (lambda _
5380 (with-directory-excursion
5381 "commons-jcs-core/src/main/java/org/apache/commons/jcs"
5382 (substitute*
5383 "auxiliary/disk/jdbc/dsfactory/SharedPoolDataSourceFactory.java"
5384 (("commons.dbcp") "commons.dbcp2")
5385 ((".*\\.setMaxActive.*") ""))
5386 ;;; Remove dependency on velocity-tools
5387 (delete-file "admin/servlet/JCSAdminServlet.java"))
5388 #t)))))
5389 (propagated-inputs
5390 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
5391 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
5392 ("java-commons-httpclient" ,java-commons-httpclient)
5393 ("java-commons-dbcp" ,java-commons-dbcp)))
5394 (native-inputs
5395 `(("java-junit" ,java-junit)))
5396 (home-page "https://commons.apache.org/proper/commons-jcs/")
5397 (synopsis "Distributed caching system in Java")
5398 (description "JCS is a distributed caching system written in Java. It
5399is intended to speed up applications by providing a means to manage cached
5400data of various dynamic natures. Like any caching system, JCS is most useful
5401for high read, low put applications. Latency times drop sharply and
5402bottlenecks move away from the database in an effectively cached system.")
5403 (license license:asl2.0)))
5404
a1a5ef20
JL
5405(define-public java-jsr250
5406 (package
5407 (name "java-jsr250")
5408 (version "1.3")
5409 (source (origin
5410 (method url-fetch)
5411 (uri (string-append "https://repo1.maven.org/maven2/"
5412 "javax/annotation/javax.annotation-api/"
5413 version "/javax.annotation-api-"
5414 version "-sources.jar"))
5415 (sha256
5416 (base32
5417 "08clh8n4n9wfglf75qsqfjs6yf79f7x6hqx38cn856pksszv50kz"))))
5418 (build-system ant-build-system)
5419 (arguments
5420 `(#:tests? #f ; no tests included
5421 #:jdk ,icedtea-8
5422 #:jar-name "jsr250.jar"))
5423 (home-page "https://jcp.org/en/jsr/detail?id=250")
5424 (synopsis "Security-related annotations")
5425 (description "This package provides annotations for security. It provides
5426packages in the @code{javax.annotation} and @code{javax.annotation.security}
5427namespaces.")
5428 ;; either cddl or gpl2 only, with classpath exception
5429 (license (list license:cddl1.0
5430 license:gpl2))))
5431
0d4a0d60
RW
5432(define-public java-jsr305
5433 (package
5434 (name "java-jsr305")
5435 (version "3.0.1")
5436 (source (origin
5437 (method url-fetch)
5438 (uri (string-append "https://repo1.maven.org/maven2/"
5439 "com/google/code/findbugs/"
5440 "jsr305/" version "/jsr305-"
5441 version "-sources.jar"))
5442 (sha256
5443 (base32
5444 "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n"))))
5445 (build-system ant-build-system)
5446 (arguments
5447 `(#:tests? #f ; no tests included
5448 #:jar-name "jsr305.jar"))
5449 (home-page "http://findbugs.sourceforge.net/")
5450 (synopsis "Annotations for the static analyzer called findbugs")
5451 (description "This package provides annotations for the findbugs package.
5452It provides packages in the @code{javax.annotations} namespace.")
5453 (license license:asl2.0)))
5454
4f3e47ea
RW
5455(define-public java-guava
5456 (package
5457 (name "java-guava")
5458 ;; This is the last release of Guava that can be built with Java 7.
5459 (version "20.0")
5460 (source (origin
5461 (method url-fetch)
5462 (uri (string-append "https://github.com/google/guava/"
5463 "releases/download/v" version
5464 "/guava-" version "-sources.jar"))
5465 (sha256
5466 (base32
5467 "1gawrs5gi6j5hcfxdgpnfli75vb9pfi4sn09pnc8xacr669yajwr"))))
5468 (build-system ant-build-system)
5469 (arguments
5470 `(#:tests? #f ; no tests included
5471 #:jar-name "guava.jar"
5472 #:phases
5473 (modify-phases %standard-phases
5474 (add-after 'unpack 'trim-sources
5475 (lambda _
5476 (with-directory-excursion "src/com/google/common"
5477 ;; Remove annotations to avoid extra dependencies:
5478 ;; * "j2objc" annotations are used when converting Java to
5479 ;; Objective C;
5480 ;; * "errorprone" annotations catch common Java mistakes at
5481 ;; compile time;
5482 ;; * "IgnoreJRERequirement" is used for Android.
5483 (substitute* (find-files "." "\\.java$")
5484 (("import com.google.j2objc.*") "")
5485 (("import com.google.errorprone.annotation.*") "")
5486 (("import org.codehaus.mojo.animal_sniffer.*") "")
5487 (("@CanIgnoreReturnValue") "")
5488 (("@LazyInit") "")
5489 (("@WeakOuter") "")
5490 (("@RetainedWith") "")
5491 (("@Weak") "")
5492 (("@ForOverride") "")
5493 (("@J2ObjCIncompatible") "")
5494 (("@IgnoreJRERequirement") "")))
5495 #t)))))
5496 (inputs
5497 `(("java-jsr305" ,java-jsr305)))
5498 (home-page "https://github.com/google/guava")
5499 (synopsis "Google core libraries for Java")
5500 (description "Guava is a set of core libraries that includes new
5501collection types (such as multimap and multiset), immutable collections, a
5502graph library, functional types, an in-memory cache, and APIs/utilities for
5503concurrency, I/O, hashing, primitives, reflection, string processing, and much
5504more!")
5505 (license license:asl2.0)))
5506
af8f8281
RW
5507;; The java-commons-logging package provides adapters to many different
5508;; logging frameworks. To avoid an excessive dependency graph we try to build
5509;; it with only a minimal set of adapters.
5510(define-public java-commons-logging-minimal
5511 (package
5512 (name "java-commons-logging-minimal")
5513 (version "1.2")
5514 (source (origin
5515 (method url-fetch)
5516 (uri (string-append "mirror://apache/commons/logging/source/"
5517 "commons-logging-" version "-src.tar.gz"))
5518 (sha256
5519 (base32
5520 "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9"))))
5521 (build-system ant-build-system)
5522 (arguments
5523 `(#:tests? #f ; avoid dependency on logging frameworks
5524 #:jar-name "commons-logging-minimal.jar"
5525 #:phases
5526 (modify-phases %standard-phases
5527 (add-after 'unpack 'delete-adapters-and-tests
5528 (lambda _
5529 ;; Delete all adapters except for NoOpLog, SimpleLog, and
5530 ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl
5531 ;; is used by applications; SimpleLog is the only actually usable
5532 ;; implementation that does not depend on another logging
5533 ;; framework.
5534 (for-each
5535 (lambda (file)
5536 (delete-file (string-append
5537 "src/main/java/org/apache/commons/logging/impl/" file)))
5538 (list "Jdk13LumberjackLogger.java"
5539 "WeakHashtable.java"
5540 "Log4JLogger.java"
5541 "ServletContextCleaner.java"
5542 "Jdk14Logger.java"
5543 "AvalonLogger.java"
5544 "LogKitLogger.java"))
5545 (delete-file-recursively "src/test")
5546 #t)))))
4f236f84 5547 (home-page "https://commons.apache.org/logging/")
af8f8281
RW
5548 (synopsis "Common API for logging implementations")
5549 (description "The Logging package is a thin bridge between different
5550logging implementations. A library that uses the commons-logging API can be
5551used with any logging implementation at runtime.")
5552 (license license:asl2.0)))
5553
90e65abe
RW
5554;; This is the last release of the 1.x series.
5555(define-public java-mockito-1
5556 (package
5557 (name "java-mockito")
5558 (version "1.10.19")
5559 (source (origin
5560 (method url-fetch)
5561 (uri (string-append "http://repo1.maven.org/maven2/"
5562 "org/mockito/mockito-core/" version
5563 "/mockito-core-" version "-sources.jar"))
5564 (sha256
5565 (base32
5566 "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc"))))
5567 (build-system ant-build-system)
5568 (arguments
5569 `(#:jar-name "mockito.jar"
5570 #:tests? #f ; no tests included
5571 ;; FIXME: patch-and-repack does not support jars, so we have to apply
5572 ;; patches in build phases.
5573 #:phases
5574 (modify-phases %standard-phases
5575 ;; Mockito was developed against a different version of hamcrest,
5576 ;; which does not require matcher implementations to provide an
5577 ;; implementation of the "describeMismatch" method. We add this
5578 ;; simple definition to pass the build with our version of hamcrest.
5579 (add-after 'unpack 'fix-hamcrest-build-error
5580 (lambda _
5581 (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java"
5582 (("public Matcher getActualMatcher\\(\\) .*" line)
5583 (string-append "
5584 public void describeMismatch(Object item, Description description) {
5585 actualMatcher.describeMismatch(item, description);
5586 }"
5587 line)))
5588 #t))
5589 ;; Mockito bundles cglib. We have a cglib package, so let's use
5590 ;; that instead.
5591 (add-after 'unpack 'use-system-libraries
5592 (lambda _
5593 (with-directory-excursion "src/org/mockito/internal/creation/cglib"
5594 (substitute* '("CGLIBHacker.java"
5595 "CglibMockMaker.java"
5596 "ClassImposterizer.java"
5597 "DelegatingMockitoMethodProxy.java"
5598 "MethodInterceptorFilter.java"
5599 "MockitoNamingPolicy.java"
5600 "SerializableMockitoMethodProxy.java"
5601 "SerializableNoOp.java")
5602 (("import org.mockito.cglib") "import net.sf.cglib")))
5603 #t)))))
5604 (inputs
5605 `(("java-junit" ,java-junit)
5606 ("java-objenesis" ,java-objenesis)
5607 ("java-cglib" ,java-cglib)
5608 ("java-hamcrest-core" ,java-hamcrest-core)))
5609 (home-page "http://mockito.org")
5610 (synopsis "Mockito is a mock library for Java")
5611 (description "Mockito is a mocking library for Java which lets you write
5612tests with a clean and simple API. It generates mocks using reflection, and
5613it records all mock invocations, including methods arguments.")
5614 (license license:asl2.0)))
5615
4f4d2e47
RW
5616(define-public java-httpcomponents-httpcore
5617 (package
5618 (name "java-httpcomponents-httpcore")
5619 (version "4.4.6")
5620 (source (origin
5621 (method url-fetch)
5622 (uri (string-append "mirror://apache//httpcomponents/httpcore/"
5623 "source/httpcomponents-core-"
5624 version "-src.tar.gz"))
5625 (sha256
5626 (base32
5627 "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy"))))
5628 (build-system ant-build-system)
5629 (arguments
5630 `(#:jar-name "httpcomponents-httpcore.jar"
5631 #:phases
5632 (modify-phases %standard-phases
5633 (add-after 'unpack 'chdir
5634 (lambda _ (chdir "httpcore") #t)))))
5635 (inputs
5636 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
5637 ("java-commons-lang3" ,java-commons-lang3)))
5638 (native-inputs
5639 `(("java-junit" ,java-junit)
5640 ("java-mockito" ,java-mockito-1)))
5641 (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html")
5642 (synopsis "Low level HTTP transport components")
5643 (description "HttpCore is a set of low level HTTP transport components
5644that can be used to build custom client and server side HTTP services with a
5645minimal footprint. HttpCore supports two I/O models: blocking I/O model based
5646on the classic Java I/O and non-blocking, event driven I/O model based on Java
5647NIO.
5648
5649This package provides the blocking I/O model library.")
5650 (license license:asl2.0)))
5651
3a068b43
RW
5652(define-public java-httpcomponents-httpcore-nio
5653 (package (inherit java-httpcomponents-httpcore)
5654 (name "java-httpcomponents-httpcore-nio")
5655 (arguments
5656 `(#:jar-name "httpcomponents-httpcore-nio.jar"
5657 #:phases
5658 (modify-phases %standard-phases
5659 (add-after 'unpack 'chdir
5660 (lambda _ (chdir "httpcore-nio") #t)))))
5661 (inputs
5662 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5663 ("java-hamcrest-core" ,java-hamcrest-core)
5664 ,@(package-inputs java-httpcomponents-httpcore)))
5665 (description "HttpCore is a set of low level HTTP transport components
5666that can be used to build custom client and server side HTTP services with a
5667minimal footprint. HttpCore supports two I/O models: blocking I/O model based
5668on the classic Java I/O and non-blocking, event driven I/O model based on Java
5669NIO.
5670
5671This package provides the non-blocking I/O model library based on Java
5672NIO.")))
5673
e1dd78f6
RW
5674(define-public java-httpcomponents-httpcore-ab
5675 (package (inherit java-httpcomponents-httpcore)
5676 (name "java-httpcomponents-httpcore-ab")
5677 (arguments
5678 `(#:jar-name "httpcomponents-httpcore-ab.jar"
5679 #:phases
5680 (modify-phases %standard-phases
5681 (add-after 'unpack 'chdir
5682 (lambda _ (chdir "httpcore-ab") #t)))))
5683 (inputs
5684 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5685 ("java-commons-cli" ,java-commons-cli)
5686 ("java-hamcrest-core" ,java-hamcrest-core)
5687 ,@(package-inputs java-httpcomponents-httpcore)))
5688 (synopsis "Apache HttpCore benchmarking tool")
5689 (description "This package provides the HttpCore benchmarking tool. It is
5690an Apache AB clone based on HttpCore.")))
5691
14a671d8
RW
5692(define-public java-httpcomponents-httpclient
5693 (package
5694 (name "java-httpcomponents-httpclient")
5695 (version "4.5.3")
5696 (source (origin
5697 (method url-fetch)
5698 (uri (string-append "mirror://apache/httpcomponents/httpclient/"
5699 "source/httpcomponents-client-"
5700 version "-src.tar.gz"))
5701 (sha256
5702 (base32
5703 "1428399s7qy3cim5wc6f3ks4gl9nf9vkjpfmnlap3jflif7g2pj1"))))
5704 (build-system ant-build-system)
5705 (arguments
5706 `(#:jar-name "httpcomponents-httpclient.jar"
5707 #:phases
5708 (modify-phases %standard-phases
5709 (add-after 'unpack 'chdir
5710 (lambda _ (chdir "httpclient") #t)))))
5711 (inputs
5712 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
5713 ("java-commons-codec" ,java-commons-codec)
5714 ("java-hamcrest-core" ,java-hamcrest-core)
5715 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5716 ("java-mockito" ,java-mockito-1)
5717 ("java-junit" ,java-junit)))
5718 (home-page "https://hc.apache.org/httpcomponents-client-ga/")
5719 (synopsis "HTTP client library for Java")
5720 (description "Although the @code{java.net} package provides basic
5721functionality for accessing resources via HTTP, it doesn't provide the full
5722flexibility or functionality needed by many applications. @code{HttpClient}
5723seeks to fill this void by providing an efficient, up-to-date, and
5724feature-rich package implementing the client side of the most recent HTTP
5725standards and recommendations.")
5726 (license license:asl2.0)))
5727
cbce5de2
RW
5728(define-public java-httpcomponents-httpmime
5729 (package (inherit java-httpcomponents-httpclient)
5730 (name "java-httpcomponents-httpmime")
5731 (arguments
5732 `(#:jar-name "httpcomponents-httpmime.jar"
5733 #:phases
5734 (modify-phases %standard-phases
5735 (add-after 'unpack 'chdir
5736 (lambda _ (chdir "httpmime") #t)))))
5737 (inputs
5738 `(("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient)
5739 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5740 ("java-junit" ,java-junit)
5741 ("java-hamcrest-core" ,java-hamcrest-core)))))
5742
4b34c21f
RW
5743(define-public java-commons-net
5744 (package
5745 (name "java-commons-net")
5746 (version "3.6")
5747 (source (origin
5748 (method url-fetch)
5749 (uri (string-append "mirror://apache/commons/net/source/"
5750 "commons-net-" version "-src.tar.gz"))
5751 (sha256
5752 (base32
5753 "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr"))))
5754 (build-system ant-build-system)
5755 (arguments
5756 `(;; FIXME: MainTest.java tries to read "examples.properties" (which
5757 ;; should be "resources/examples/examples.properties"), but gets "null"
5758 ;; instead.
5759 #:tests? #f
5760 #:jar-name "commons-net.jar"))
5761 (native-inputs
5762 `(("java-junit" ,java-junit)
5763 ("java-hamcrest-core" ,java-hamcrest-core)))
4f236f84 5764 (home-page "https://commons.apache.org/net/")
4b34c21f
RW
5765 (synopsis "Client library for many basic Internet protocols")
5766 (description "The Apache Commons Net library implements the client side of
5767many basic Internet protocols. The purpose of the library is to provide
5768fundamental protocol access, not higher-level abstractions.")
5769 (license license:asl2.0)))
5770
808cb58f
RW
5771(define-public java-jsch
5772 (package
5773 (name "java-jsch")
1c8ba10a 5774 (version "0.1.55")
808cb58f
RW
5775 (source (origin
5776 (method url-fetch)
5777 (uri (string-append "mirror://sourceforge/jsch/jsch/"
5778 version "/jsch-" version ".zip"))
5779 (sha256
5780 (base32
1c8ba10a 5781 "1lxyjwvmwa723wcf3bqn816hkvc03vz4xhbsi7bvfhrz2rpgcfq6"))))
808cb58f
RW
5782 (build-system ant-build-system)
5783 (arguments
5784 `(#:build-target "dist"
1c8ba10a 5785 #:tests? #f ; no tests included
808cb58f
RW
5786 #:phases
5787 (modify-phases %standard-phases
5788 (replace 'install (install-jars "dist")))))
5789 (native-inputs
5790 `(("unzip" ,unzip)))
5791 (home-page "http://www.jcraft.com/jsch/")
5792 (synopsis "Pure Java implementation of SSH2")
5793 (description "JSch is a pure Java implementation of SSH2. JSch allows you
5794to connect to an SSH server and use port forwarding, X11 forwarding, file
5795transfer, etc., and you can integrate its functionality into your own Java
5796programs.")
5797 (license license:bsd-3)))
5798
a6244698
RW
5799(define-public java-commons-compress
5800 (package
5801 (name "java-commons-compress")
5802 (version "1.13")
5803 (source (origin
5804 (method url-fetch)
5805 (uri (string-append "mirror://apache/commons/compress/source/"
5806 "commons-compress-" version "-src.tar.gz"))
5807 (sha256
5808 (base32
5809 "1vjqvavrn0babffn1kciz6v52ibwq2vwhzlb95hazis3lgllnxc8"))))
5810 (build-system ant-build-system)
5811 (arguments
5812 `(#:jar-name "commons-compress.jar"
5813 #:phases
5814 (modify-phases %standard-phases
5815 (add-after 'unpack 'delete-bad-tests
5816 (lambda _
5817 (with-directory-excursion "src/test/java/org/apache/commons/compress/"
5818 ;; FIXME: These tests really should not fail. Maybe they are
5819 ;; indicative of problems with our Java packaging work.
5820
5821 ;; This test fails with a null pointer exception.
5822 (delete-file "archivers/sevenz/SevenZOutputFileTest.java")
5823 ;; This test fails to open test resources.
5824 (delete-file "archivers/zip/ExplodeSupportTest.java")
5825
5826 ;; FIXME: This test adds a dependency on powermock, which is hard to
5827 ;; package at this point.
5828 ;; https://github.com/powermock/powermock
5829 (delete-file "archivers/sevenz/SevenZNativeHeapTest.java"))
5830 #t)))))
5831 (inputs
5832 `(("java-junit" ,java-junit)
5833 ("java-hamcrest-core" ,java-hamcrest-core)
5834 ("java-mockito" ,java-mockito-1)
5835 ("java-xz" ,java-xz)))
5836 (home-page "https://commons.apache.org/proper/commons-compress/")
5837 (synopsis "Java library for working with compressed files")
5838 (description "The Apache Commons Compress library defines an API for
5839working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ,
5840Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.")
5841 (license license:asl2.0)))
5842
51263ff5
JL
5843(define-public java-commons-csv
5844 (package
5845 (name "java-commons-csv")
5846 (version "1.4")
5847 (source (origin
5848 (method url-fetch)
5849 (uri (string-append "mirror://apache/commons/csv/source/"
5850 "commons-csv-" version "-src.tar.gz"))
5851 (sha256
5852 (base32
5853 "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij"))))
5854 (build-system ant-build-system)
5855 (arguments
5856 `(#:jar-name "commons-csv.jar"
5857 #:source-dir "src/main/java"
5858 #:tests? #f)); FIXME: requires java-h2
5859 (inputs
5860 `(("java-hamcrest-core" ,java-hamcrest-core)
5861 ("java-commons-io" ,java-commons-io)
5862 ("java-commons-lang3" ,java-commons-lang3)
5863 ("junit" ,java-junit)))
5864 (home-page "https://commons.apache.org/proper/commons-csv/")
5865 (synopsis "Read and write CSV documents")
5866 (description "Commons CSV reads and writes files in variations of the Comma
5867Separated Value (CSV) format. The most common CSV formats are predefined in the
5868CSVFormat class:
5869
5870@itemize
5871@item Microsoft Excel
5872@item Informix UNLOAD
5873@item Informix UNLOAD CSV
5874@item MySQL
5875@item RFC 4180
5876@item TDF
5877@end itemize
5878
5879Custom formats can be created using a fluent style API.")
5880 (license license:asl2.0)))
5881
6ee6d0b5
RW
5882(define-public java-osgi-annotation
5883 (package
5884 (name "java-osgi-annotation")
5885 (version "6.0.0")
5886 (source (origin
5887 (method url-fetch)
5888 (uri (string-append "https://repo1.maven.org/maven2/"
5889 "org/osgi/org.osgi.annotation/" version "/"
5890 "org.osgi.annotation-" version "-sources.jar"))
5891 (sha256
5892 (base32
5893 "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w"))))
5894 (build-system ant-build-system)
5895 (arguments
5896 `(#:tests? #f ; no tests
5897 #:jar-name "osgi-annotation.jar"))
c353d014 5898 (home-page "https://www.osgi.org")
6ee6d0b5
RW
5899 (synopsis "Annotation module of OSGi framework")
5900 (description
5901 "OSGi, for Open Services Gateway initiative framework, is a module system
5902and service platform for the Java programming language. This package contains
5903the OSGi annotation module, providing additional services to help dynamic
5904components.")
5905 (license license:asl2.0)))
5906
37e2e5d4
RW
5907(define-public java-osgi-core
5908 (package
5909 (name "java-osgi-core")
5910 (version "6.0.0")
5911 (source (origin
5912 (method url-fetch)
5913 (uri (string-append "https://repo1.maven.org/maven2/"
5914 "org/osgi/org.osgi.core/" version "/"
5915 "org.osgi.core-" version "-sources.jar"))
5916 (sha256
5917 (base32
5918 "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv"))))
5919 (build-system ant-build-system)
5920 (arguments
5921 `(#:tests? #f ; no tests
5922 #:jar-name "osgi-core.jar"))
5923 (inputs
5924 `(("java-osgi-annotation" ,java-osgi-annotation)))
c353d014 5925 (home-page "https://www.osgi.org")
37e2e5d4
RW
5926 (synopsis "Core module of OSGi framework")
5927 (description
5928 "OSGi, for Open Services Gateway initiative framework, is a module system
5929and service platform for the Java programming language. This package contains
5930the OSGi Core module.")
5931 (license license:asl2.0)))
5932
8af92c8f
RW
5933(define-public java-osgi-service-event
5934 (package
5935 (name "java-osgi-service-event")
5936 (version "1.3.1")
5937 (source (origin
5938 (method url-fetch)
5939 (uri (string-append "https://repo1.maven.org/maven2/"
5940 "org/osgi/org.osgi.service.event/"
5941 version "/org.osgi.service.event-"
5942 version "-sources.jar"))
5943 (sha256
5944 (base32
5945 "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm"))))
5946 (build-system ant-build-system)
5947 (arguments
5948 `(#:tests? #f ; no tests
5949 #:jar-name "osgi-service-event.jar"))
5950 (inputs
5951 `(("java-osgi-annotation" ,java-osgi-annotation)
5952 ("java-osgi-core" ,java-osgi-core)))
c353d014 5953 (home-page "https://www.osgi.org")
8af92c8f
RW
5954 (synopsis "OSGi service event module")
5955 (description
5956 "OSGi, for Open Services Gateway initiative framework, is a module system
5957and service platform for the Java programming language. This package contains
5958the OSGi @code{org.osgi.service.event} module.")
5959 (license license:asl2.0)))
5960
674e93a0
RW
5961(define-public java-eclipse-osgi
5962 (package
5963 (name "java-eclipse-osgi")
5964 (version "3.11.3")
5965 (source (origin
5966 (method url-fetch)
5967 (uri (string-append "https://repo1.maven.org/maven2/"
5968 "org/eclipse/platform/org.eclipse.osgi/"
5969 version "/org.eclipse.osgi-"
5970 version "-sources.jar"))
5971 (sha256
5972 (base32
5973 "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b"))))
5974 (build-system ant-build-system)
5975 (arguments
5976 `(#:tests? #f ; no tests included
5977 #:jar-name "eclipse-equinox-osgi.jar"))
5978 (inputs
5979 `(("java-osgi-annotation" ,java-osgi-annotation)))
5980 (home-page "http://www.eclipse.org/equinox/")
5981 (synopsis "Eclipse Equinox OSGi framework")
5982 (description "This package provides an implementation of the OSGi Core
5983specification.")
5984 (license license:epl1.0)))
5985
81b55b1e
RW
5986(define-public java-eclipse-equinox-common
5987 (package
5988 (name "java-eclipse-equinox-common")
e40e3792 5989 (version "3.10.200")
81b55b1e
RW
5990 (source (origin
5991 (method url-fetch)
5992 (uri (string-append "https://repo1.maven.org/maven2/"
5993 "org/eclipse/platform/org.eclipse.equinox.common/"
5994 version "/org.eclipse.equinox.common-"
5995 version "-sources.jar"))
5996 (sha256
5997 (base32
e40e3792 5998 "1yn8ij6xsljlf35sr2l7wvyvc0ss4n1rv0ry5zkgb49dj4hyrqrj"))))
81b55b1e
RW
5999 (build-system ant-build-system)
6000 (arguments
6001 `(#:tests? #f ; no tests included
6002 #:jar-name "eclipse-equinox-common.jar"))
6003 (inputs
6004 `(("java-eclipse-osgi" ,java-eclipse-osgi)))
6005 (home-page "http://www.eclipse.org/equinox/")
6006 (synopsis "Common Eclipse runtime")
6007 (description "This package provides the common Eclipse runtime.")
6008 (license license:epl1.0)))
6009
90368ad9
RW
6010(define-public java-eclipse-core-jobs
6011 (package
6012 (name "java-eclipse-core-jobs")
6013 (version "3.8.0")
6014 (source (origin
6015 (method url-fetch)
6016 (uri (string-append "https://repo1.maven.org/maven2/"
6017 "org/eclipse/platform/org.eclipse.core.jobs/"
6018 version "/org.eclipse.core.jobs-"
6019 version "-sources.jar"))
6020 (sha256
6021 (base32
6022 "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b"))))
6023 (build-system ant-build-system)
6024 (arguments
6025 `(#:tests? #f ; no tests included
6026 #:jar-name "eclipse-core-jobs.jar"))
6027 (inputs
6028 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6029 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6030 (home-page "http://www.eclipse.org/equinox/")
6031 (synopsis "Eclipse jobs mechanism")
6032 (description "This package provides the Eclipse jobs mechanism.")
6033 (license license:epl1.0)))
6034
fbaf09eb
RW
6035(define-public java-eclipse-equinox-registry
6036 (package
6037 (name "java-eclipse-equinox-registry")
6038 (version "3.6.100")
6039 (source (origin
6040 (method url-fetch)
6041 (uri (string-append "https://repo1.maven.org/maven2/"
6042 "org/eclipse/platform/org.eclipse.equinox.registry/"
6043 version "/org.eclipse.equinox.registry-"
6044 version "-sources.jar"))
6045 (sha256
6046 (base32
6047 "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k"))))
6048 (build-system ant-build-system)
6049 (arguments
6050 `(#:tests? #f ; no tests included
6051 #:jar-name "eclipse-equinox-registry.jar"))
6052 (inputs
6053 `(("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6054 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6055 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6056 (home-page "http://www.eclipse.org/equinox/")
6057 (synopsis "Eclipse extension registry support")
6058 (description "This package provides support for the Eclipse extension
6059registry.")
6060 (license license:epl1.0)))
6061
65214c87
RW
6062(define-public java-eclipse-equinox-app
6063 (package
6064 (name "java-eclipse-equinox-app")
6065 (version "1.3.400")
6066 (source (origin
6067 (method url-fetch)
6068 (uri (string-append "https://repo1.maven.org/maven2/"
6069 "org/eclipse/platform/org.eclipse.equinox.app/"
6070 version "/org.eclipse.equinox.app-"
6071 version "-sources.jar"))
6072 (sha256
6073 (base32
6074 "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab"))))
6075 (build-system ant-build-system)
6076 (arguments
6077 `(#:tests? #f ; no tests included
6078 #:jar-name "eclipse-equinox-app.jar"))
6079 (inputs
6080 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6081 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6082 ("java-eclipse-osgi" ,java-eclipse-osgi)
6083 ("java-osgi-service-event" ,java-osgi-service-event)))
6084 (home-page "http://www.eclipse.org/equinox/")
6085 (synopsis "Equinox application container")
6086 (description "This package provides the Equinox application container for
6087Eclipse.")
6088 (license license:epl1.0)))
6089
3f970214
RW
6090(define-public java-eclipse-equinox-preferences
6091 (package
6092 (name "java-eclipse-equinox-preferences")
6093 (version "3.6.1")
6094 (source (origin
6095 (method url-fetch)
6096 (uri (string-append "https://repo1.maven.org/maven2/"
6097 "org/eclipse/platform/org.eclipse.equinox.preferences/"
6098 version "/org.eclipse.equinox.preferences-"
6099 version "-sources.jar"))
6100 (sha256
6101 (base32
6102 "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2"))))
6103 (build-system ant-build-system)
6104 (arguments
6105 `(#:tests? #f ; no tests included
6106 #:jar-name "eclipse-equinox-preferences.jar"))
6107 (inputs
6108 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6109 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6110 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6111 (home-page "http://www.eclipse.org/equinox/")
6112 (synopsis "Eclipse preferences mechanism")
6113 (description "This package provides the Eclipse preferences mechanism with
6114the module @code{org.eclipse.equinox.preferences}.")
6115 (license license:epl1.0)))
6116
4ad3d4f3
RW
6117(define-public java-eclipse-core-contenttype
6118 (package
6119 (name "java-eclipse-core-contenttype")
6120 (version "3.5.100")
6121 (source (origin
6122 (method url-fetch)
6123 (uri (string-append "https://repo1.maven.org/maven2/"
6124 "org/eclipse/platform/org.eclipse.core.contenttype/"
6125 version "/org.eclipse.core.contenttype-"
6126 version "-sources.jar"))
6127 (sha256
6128 (base32
6129 "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi"))))
6130 (build-system ant-build-system)
6131 (arguments
6132 `(#:tests? #f ; no tests included
6133 #:jar-name "eclipse-core-contenttype.jar"))
6134 (inputs
6135 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6136 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6137 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6138 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6139 (home-page "http://www.eclipse.org/")
6140 (synopsis "Eclipse content mechanism")
6141 (description "This package provides the Eclipse content mechanism in the
6142@code{org.eclipse.core.contenttype} module.")
6143 (license license:epl1.0)))
6144
6a7f7e49
RW
6145(define-public java-eclipse-core-runtime
6146 (package
6147 (name "java-eclipse-core-runtime")
4fa9b6e6 6148 (version "3.15.100")
6a7f7e49
RW
6149 (source (origin
6150 (method url-fetch)
6151 (uri (string-append "https://repo1.maven.org/maven2/"
6152 "org/eclipse/platform/org.eclipse.core.runtime/"
6153 version "/org.eclipse.core.runtime-"
6154 version "-sources.jar"))
6155 (sha256
6156 (base32
4fa9b6e6 6157 "0l8xayacsbjvz5hypx2fv47vpw2n4dspamcfb3hx30x9hj8vmg7r"))))
6a7f7e49
RW
6158 (build-system ant-build-system)
6159 (arguments
6160 `(#:tests? #f ; no tests included
6161 #:jar-name "eclipse-core-runtime.jar"))
6162 (inputs
6163 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6164 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6165 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
6166 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6167 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6168 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6169 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6170 (home-page "https://www.eclipse.org/")
6171 (synopsis "Eclipse core runtime")
6172 (description "This package provides the Eclipse core runtime with the
6173module @code{org.eclipse.core.runtime}.")
6174 (license license:epl1.0)))
6175
b3806a15
RW
6176(define-public java-eclipse-core-filesystem
6177 (package
6178 (name "java-eclipse-core-filesystem")
6179 (version "1.6.1")
6180 (source (origin
6181 (method url-fetch)
6182 (uri (string-append "https://repo1.maven.org/maven2/"
6183 "org/eclipse/platform/org.eclipse.core.filesystem/"
6184 version "/org.eclipse.core.filesystem-"
6185 version "-sources.jar"))
6186 (sha256
6187 (base32
6188 "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj"))))
6189 (build-system ant-build-system)
6190 (arguments
6191 `(#:tests? #f ; no tests included
6192 #:jar-name "eclipse-core-filesystem.jar"))
6193 (inputs
6194 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6195 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6196 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6197 (home-page "https://www.eclipse.org/")
6198 (synopsis "Eclipse core file system")
6199 (description "This package provides the Eclipse core file system with the
6200module @code{org.eclipse.core.filesystem}.")
6201 (license license:epl1.0)))
6202
e96060de
RW
6203(define-public java-eclipse-core-expressions
6204 (package
6205 (name "java-eclipse-core-expressions")
6206 (version "3.5.100")
6207 (source (origin
6208 (method url-fetch)
6209 (uri (string-append "https://repo1.maven.org/maven2/"
6210 "org/eclipse/platform/org.eclipse.core.expressions/"
6211 version "/org.eclipse.core.expressions-"
6212 version "-sources.jar"))
6213 (sha256
6214 (base32
6215 "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f"))))
6216 (build-system ant-build-system)
6217 (arguments
6218 `(#:tests? #f ; no tests included
6219 #:jar-name "eclipse-core-expressions.jar"))
6220 (inputs
6221 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6222 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6223 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6224 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6225 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6226 (home-page "https://www.eclipse.org/")
6227 (synopsis "Eclipse core expression language")
6228 (description "This package provides the Eclipse core expression language
6229with the @code{org.eclipse.core.expressions} module.")
6230 (license license:epl1.0)))
6231
e8d0f7c8
RW
6232(define-public java-eclipse-core-variables
6233 (package
6234 (name "java-eclipse-core-variables")
6235 (version "3.3.0")
6236 (source (origin
6237 (method url-fetch)
6238 (uri (string-append "https://repo1.maven.org/maven2/"
6239 "org/eclipse/platform/org.eclipse.core.variables/"
6240 version "/org.eclipse.core.variables-"
6241 version "-sources.jar"))
6242 (sha256
6243 (base32
6244 "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy"))))
6245 (build-system ant-build-system)
6246 (arguments
6247 `(#:tests? #f ; no tests included
6248 #:jar-name "eclipse-core-variables.jar"))
6249 (inputs
6250 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6251 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6252 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6253 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6254 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6255 (home-page "https://www.eclipse.org/platform")
6256 (synopsis "Eclipse core variables")
6257 (description "This package provides the Eclipse core variables module
6258@code{org.eclipse.core.variables}.")
6259 (license license:epl1.0)))
6260
7c3d479e
RW
6261(define-public java-eclipse-ant-core
6262 (package
6263 (name "java-eclipse-ant-core")
6264 (version "3.4.100")
6265 (source (origin
6266 (method url-fetch)
6267 (uri (string-append "https://repo1.maven.org/maven2/"
6268 "org/eclipse/platform/org.eclipse.ant.core/"
6269 version "/org.eclipse.ant.core-"
6270 version "-sources.jar"))
6271 (sha256
6272 (base32
6273 "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7"))))
6274 (build-system ant-build-system)
6275 (arguments
6276 `(#:tests? #f ; no tests included
6277 #:jar-name "eclipse-ant-core.jar"))
6278 (inputs
6279 `(("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
6280 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6281 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6282 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6283 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6284 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6285 ("java-eclipse-core-variables" ,java-eclipse-core-variables)
6286 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6287 (home-page "https://www.eclipse.org/platform")
6288 (synopsis "Ant build tool core libraries")
6289 (description "This package provides the ant build tool core libraries with
6290the module @code{org.eclipse.ant.core}.")
6291 (license license:epl1.0)))
6292
6636f638
RW
6293(define-public java-eclipse-core-resources
6294 (package
6295 (name "java-eclipse-core-resources")
c8427a5e 6296 (version "3.13.200")
6636f638
RW
6297 (source (origin
6298 (method url-fetch)
6299 (uri (string-append "https://repo1.maven.org/maven2/"
6300 "org/eclipse/platform/org.eclipse.core.resources/"
6301 version "/org.eclipse.core.resources-"
6302 version "-sources.jar"))
6303 (sha256
6304 (base32
c8427a5e 6305 "1sn3b6ky72hkvxcgf9b2jkpbdh3y8lbhi9xxwv1dsiddpkkq91hs"))))
6636f638
RW
6306 (build-system ant-build-system)
6307 (arguments
6308 `(#:tests? #f ; no tests included
6309 #:jar-name "eclipse-core-resources.jar"))
6310 (inputs
6311 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6312 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6313 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6314 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6315 ("java-eclipse-core-expressions" ,java-eclipse-core-expressions)
6316 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
6317 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6318 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6319 ("java-eclipse-ant-core" ,java-eclipse-ant-core)
6320 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6321 (home-page "https://www.eclipse.org/")
6322 (synopsis "Eclipse core resource management")
6323 (description "This package provides the Eclipse core resource management
6324module @code{org.eclipse.core.resources}.")
6325 (license license:epl1.0)))
6326
afb5858d
RW
6327(define-public java-eclipse-compare-core
6328 (package
6329 (name "java-eclipse-compare-core")
6330 (version "3.6.0")
6331 (source (origin
6332 (method url-fetch)
6333 (uri (string-append "https://repo1.maven.org/maven2/"
6334 "org/eclipse/platform/org.eclipse.compare.core/"
6335 version "/org.eclipse.compare.core-"
6336 version "-sources.jar"))
6337 (sha256
6338 (base32
6339 "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg"))))
6340 (build-system ant-build-system)
6341 (arguments
6342 `(#:tests? #f ; no tests included
6343 #:jar-name "eclipse-compare-core.jar"))
6344 (inputs
6345 `(("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6346 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6347 ("java-eclipse-osgi" ,java-eclipse-osgi)
6348 ("java-icu4j" ,java-icu4j)))
6349 (home-page "https://www.eclipse.org/")
6350 (synopsis "Eclipse core compare support")
6351 (description "This package provides the Eclipse core compare support
6352module @code{org.eclipse.compare.core}.")
6353 (license license:epl1.0)))
6354
1bb191fc
RW
6355(define-public java-eclipse-team-core
6356 (package
6357 (name "java-eclipse-team-core")
6358 (version "3.8.0")
6359 (source (origin
6360 (method url-fetch)
6361 (uri (string-append "https://repo1.maven.org/maven2/"
6362 "org/eclipse/platform/org.eclipse.team.core/"
6363 version "/org.eclipse.team.core-"
6364 version "-sources.jar"))
6365 (sha256
6366 (base32
6367 "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7"))))
6368 (build-system ant-build-system)
6369 (arguments
6370 `(#:tests? #f ; no tests included
6371 #:jar-name "eclipse-team-core.jar"))
6372 (inputs
6373 `(("java-eclipse-compare-core" ,java-eclipse-compare-core)
6374 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6375 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
6376 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6377 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
6378 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6379 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6380 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6381 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6382 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6383 (home-page "https://www.eclipse.org/platform")
6384 (synopsis "Eclipse team support core")
6385 (description "This package provides the Eclipse team support core module
6386@code{org.eclipse.team.core}.")
6387 (license license:epl1.0)))
6388
31342529
RW
6389(define-public java-eclipse-core-commands
6390 (package
6391 (name "java-eclipse-core-commands")
6392 (version "3.8.1")
6393 (source (origin
6394 (method url-fetch)
6395 (uri (string-append "https://repo1.maven.org/maven2/"
6396 "org/eclipse/platform/org.eclipse.core.commands/"
6397 version "/org.eclipse.core.commands-"
6398 version "-sources.jar"))
6399 (sha256
6400 (base32
6401 "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9"))))
6402 (build-system ant-build-system)
6403 (arguments
6404 `(#:tests? #f ; no tests included
6405 #:jar-name "eclipse-core-commands.jar"))
6406 (inputs
6407 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)))
6408 (home-page "https://www.eclipse.org/platform")
6409 (synopsis "Eclipse core commands")
6410 (description "This package provides Eclipse core commands in the module
6411@code{org.eclipse.core.commands}.")
6412 (license license:epl1.0)))
6413
bf96acf7
RW
6414(define-public java-eclipse-text
6415 (package
6416 (name "java-eclipse-text")
6417 (version "3.6.0")
6418 (source (origin
6419 (method url-fetch)
6420 (uri (string-append "https://repo1.maven.org/maven2/"
6421 "org/eclipse/platform/org.eclipse.text/"
6422 version "/org.eclipse.text-"
6423 version "-sources.jar"))
6424 (sha256
6425 (base32
6426 "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1"))))
6427 (build-system ant-build-system)
6428 (arguments
6429 `(#:tests? #f ; no tests included
6430 #:jar-name "eclipse-text.jar"
6431 #:phases
6432 (modify-phases %standard-phases
6433 ;; When creating a new category we must make sure that the new list
6434 ;; matches List<Position>. By default it seems to be too generic
6435 ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>.
6436 ;; Without this we get this error:
6437 ;;
6438 ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376:
6439 ;; error: method put in interface Map<K,V> cannot be applied to given types;
6440 ;; [javac] fPositions.put(category, new ArrayList<>());
6441 ;; [javac] ^
6442 ;; [javac] required: String,List<Position>
6443 ;; [javac] found: String,ArrayList<Object>
6444 ;; [javac] reason: actual argument ArrayList<Object> cannot be converted
6445 ;; to List<Position> by method invocation conversion
6446 ;; [javac] where K,V are type-variables:
6447 ;; [javac] K extends Object declared in interface Map
6448 ;; [javac] V extends Object declared in interface Map
6449 ;;
6450 ;; I don't know if this is a good fix. I suspect it is not, but it
6451 ;; seems to work.
6452 (add-after 'unpack 'fix-compilation-error
6453 (lambda _
6454 (substitute* "src/org/eclipse/jface/text/AbstractDocument.java"
6455 (("Positions.put\\(category, new ArrayList<>\\(\\)\\);")
6456 "Positions.put(category, new ArrayList<Position>());"))
6457 #t)))))
6458 (inputs
6459 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6460 ("java-eclipse-core-commands" ,java-eclipse-core-commands)
6461 ("java-icu4j" ,java-icu4j)))
6462 (home-page "http://www.eclipse.org/platform")
6463 (synopsis "Eclipse text library")
6464 (description "Platform Text is part of the Platform UI project and
6465provides the basic building blocks for text and text editors within Eclipse
6466and contributes the Eclipse default text editor.")
6467 (license license:epl1.0)))
6468
c24d11b7
RW
6469(define-public java-eclipse-jdt-core
6470 (package
6471 (name "java-eclipse-jdt-core")
43d6776b 6472 (version "3.16.0")
c24d11b7
RW
6473 (source (origin
6474 (method url-fetch)
6475 (uri (string-append "https://repo1.maven.org/maven2/"
6476 "org/eclipse/jdt/org.eclipse.jdt.core/"
6477 version "/org.eclipse.jdt.core-"
6478 version "-sources.jar"))
6479 (sha256
6480 (base32
43d6776b 6481 "1g560yr9v2kzv34gc2m3ifpgnj7krcdd6h4gd4z83pwqacwkfz0k"))))
c24d11b7
RW
6482 (build-system ant-build-system)
6483 (arguments
6484 `(#:tests? #f ; no tests included
84b226c2
RW
6485 #:jar-name "eclipse-jdt-core.jar"
6486 #:phases
6487 (modify-phases %standard-phases
6488 (add-after 'unpack 'move-sources
6489 (lambda _
6490 (with-directory-excursion "src/jdtCompilerAdaptersrc/"
6491 (for-each (lambda (file)
6492 (install-file file (string-append "../" (dirname file))))
6493 (find-files "." ".*")))
6494 (delete-file-recursively "src/jdtCompilerAdaptersrc/")
6495 #t))
6496 (add-before 'build 'copy-resources
6497 (lambda _
6498 (with-directory-excursion "src"
6499 (for-each (lambda (file)
6500 (install-file file (string-append "../build/classes/" (dirname file))))
6501 (find-files "." ".*.(props|properties|rsc)")))
6502 #t)))))
c24d11b7
RW
6503 (inputs
6504 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6505 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
6506 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6507 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
6508 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6509 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
6510 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6511 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6512 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6513 ("java-eclipse-osgi" ,java-eclipse-osgi)
6514 ("java-eclipse-text" ,java-eclipse-text)))
6515 (home-page "https://www.eclipse.org/jdt")
6516 (synopsis "Java development tools core libraries")
6517 (description "This package provides the core libraries of the Eclipse Java
6518development tools.")
6519 (license license:epl1.0)))
6520
74c2339f
RW
6521(define-public java-eclipse-jdt-compiler-apt
6522 (package
6523 (name "java-eclipse-jdt-compiler-apt")
6524 (version "1.3.400")
6525 (source (origin
6526 (method url-fetch)
6527 (uri (string-append "https://repo1.maven.org/maven2/"
6528 "org/eclipse/jdt/org.eclipse.jdt.compiler.apt/"
6529 version "/org.eclipse.jdt.compiler.apt-"
6530 version "-sources.jar"))
6531 (sha256
6532 (base32
6533 "1s285k9p2ixdqrknb40jbbvw682n9a7l5lqpn583a8pvlzg2l6r8"))))
6534 (build-system ant-build-system)
6535 (arguments
6536 `(#:tests? #f ; no tests included
6537 #:jar-name "eclipse-jdt-compiler-apt.jar"
6538 #:jdk ,openjdk11))
6539 (inputs
6540 `(("java-eclipse-jdt-core" ,java-eclipse-jdt-core)))
6541 (home-page "https://www.eclipse.org/jdt/apt/")
6542 (synopsis "Annotation processing tool")
6543 (description "APT stands for Annotation Processing Tool. APT provides a
6544means for generating files and compiling new Java classes based on annotations
6545found in your source code.")
6546 (license license:epl2.0)))
6547
a5cdcf6c
RW
6548(define-public java-javax-mail
6549 (package
6550 (name "java-javax-mail")
6551 (version "1.5.6")
6552 (source (origin
6553 (method url-fetch)
6554 (uri (string-append "https://repo1.maven.org/maven2/"
6555 "com/sun/mail/javax.mail/"
6556 version "/javax.mail-"
6557 version "-sources.jar"))
6558 (sha256
6559 (base32
6560 "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9"))))
6561 (build-system ant-build-system)
6562 (arguments
6563 `(#:tests? #f ; no tests
6564 #:jar-name "javax-mail.jar"))
6565 (home-page "https://javamail.java.net")
6566 (synopsis "Reference implementation of the JavaMail API")
6567 (description
6568 "This package provides versions of the JavaMail API implementation, IMAP,
6569SMTP, and POP3 service providers, some examples, and documentation for the
6570JavaMail API.")
6571 ;; GPLv2 only with "classpath exception".
6572 (license license:gpl2)))
6573
0e660c4d
RW
6574(define-public java-log4j-api
6575 (package
6576 (name "java-log4j-api")
6577 (version "2.4.1")
6578 (source (origin
6579 (method url-fetch)
6580 (uri (string-append "mirror://apache/logging/log4j/" version
6581 "/apache-log4j-" version "-src.tar.gz"))
6582 (sha256
6583 (base32
6584 "0j5p9gik0jysh37nlrckqbky12isy95cpwg2gv5fas1rcdqbraxd"))))
6585 (build-system ant-build-system)
6586 (arguments
6587 `(#:tests? #f ; tests require unpackaged software
6588 #:jar-name "log4j-api.jar"
6589 #:make-flags
6590 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
6591 "/share/java"))
6592 #:phases
6593 (modify-phases %standard-phases
6594 (add-after 'unpack 'enter-dir
6595 (lambda _ (chdir "log4j-api") #t))
6596 ;; FIXME: The tests require additional software that has not been
6597 ;; packaged yet, such as
6598 ;; * org.apache.maven
6599 ;; * org.apache.felix
6600 (add-after 'enter-dir 'delete-tests
6601 (lambda _ (delete-file-recursively "src/test") #t)))))
6602 (inputs
6603 `(("java-osgi-core" ,java-osgi-core)
6604 ("java-hamcrest-core" ,java-hamcrest-core)
6605 ("java-junit" ,java-junit)))
4d1ddb51 6606 (home-page "https://logging.apache.org/log4j/2.x/")
0e660c4d
RW
6607 (synopsis "API module of the Log4j logging framework for Java")
6608 (description
6609 "This package provides the API module of the Log4j logging framework for
6610Java.")
6611 (license license:asl2.0)))
6612
dfef4231
JL
6613(define-public java-log4j-core
6614 (package
6615 (inherit java-log4j-api)
6616 (name "java-log4j-core")
6617 (inputs
6618 `(("java-osgi-core" ,java-osgi-core)
6619 ("java-hamcrest-core" ,java-hamcrest-core)
6620 ("java-log4j-api" ,java-log4j-api)
6621 ("java-mail" ,java-mail)
6622 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
6623 ("java-lmax-disruptor" ,java-lmax-disruptor)
6624 ("java-kafka" ,java-kafka-clients)
6625 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
6626 ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
6627 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
6628 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
6629 ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml)
6630 ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml)
6631 ("java-commons-compress" ,java-commons-compress)
6632 ("java-commons-csv" ,java-commons-csv)
6633 ("java-jeromq" ,java-jeromq)
6634 ("java-junit" ,java-junit)))
6635 (native-inputs
6636 `(("hamcrest" ,java-hamcrest-all)
6637 ("java-commons-io" ,java-commons-io)
6638 ("java-commons-lang3" ,java-commons-lang3)
6639 ("slf4j" ,java-slf4j-api)))
6640 (arguments
6641 `(#:tests? #f ; tests require more dependencies
6642 #:test-dir "src/test"
6643 #:source-dir "src/main/java"
6644 #:jar-name "log4j-core.jar"
6645 #:jdk ,icedtea-8
6646 #:make-flags
6647 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
6648 "/share/java"))
6649 #:phases
6650 (modify-phases %standard-phases
6651 (add-after 'unpack 'enter-dir
6652 (lambda _ (chdir "log4j-core") #t)))))
6653 (synopsis "Core component of the Log4j framework")
6654 (description "This package provides the core component of the Log4j
6655logging framework for Java.")))
6656
2caf873e
JL
6657(define-public java-log4j-1.2-api
6658 (package
6659 (inherit java-log4j-api)
6660 (name "java-log4j-1.2-api")
6661 (arguments
6662 `(#:jar-name "java-log4j-1.2-api.jar"
6663 #:source-dir "log4j-1.2-api/src/main/java"
6664 #:jdk ,icedtea-8
6665 ;; Tests require maven-model (and other maven subprojects), which is a
6666 ;; cyclic dependency.
6667 #:tests? #f))
6668 (inputs
6669 `(("log4j-api" ,java-log4j-api)
6670 ("log4j-core" ,java-log4j-core)
6671 ("osgi-core" ,java-osgi-core)
6672 ("eclipse-osgi" ,java-eclipse-osgi)
6673 ("java-lmax-disruptor" ,java-lmax-disruptor)))))
6674
1c188f4e
HG
6675(define-public java-commons-cli
6676 (package
6677 (name "java-commons-cli")
37602dd8 6678 (version "1.4")
1c188f4e
HG
6679 (source (origin
6680 (method url-fetch)
6681 (uri (string-append "mirror://apache/commons/cli/source/"
6682 "commons-cli-" version "-src.tar.gz"))
6683 (sha256
6684 (base32
37602dd8 6685 "05hgi2z01fqz374y719gl1dxzqvzci5af071zm7vxrjg9vczipm1"))))
1c188f4e
HG
6686 (build-system ant-build-system)
6687 ;; TODO: javadoc
6688 (arguments
6689 `(#:jar-name "commons-cli.jar"))
6690 (native-inputs
6691 `(("java-junit" ,java-junit)
6692 ("java-hamcrest-core" ,java-hamcrest-core)))
1b3a6038 6693 (home-page "https://commons.apache.org/cli/")
1c188f4e
HG
6694 (synopsis "Command line arguments and options parsing library")
6695 (description "The Apache Commons CLI library provides an API for parsing
6696command line options passed to programs. It is also able to print help
6697messages detailing the options available for a command line tool.
6698
6699Commons CLI supports different types of options:
6700
6701@itemize
6702@item POSIX like options (ie. tar -zxvf foo.tar.gz)
6703@item GNU like long options (ie. du --human-readable --max-depth=1)
6704@item Java like properties (ie. java -Djava.awt.headless=true Foo)
6705@item Short options with value attached (ie. gcc -O2 foo.c)
6706@item long options with single hyphen (ie. ant -projecthelp)
6707@end itemize
6708
6709This is a part of the Apache Commons Project.")
6710 (license license:asl2.0)))
0a8519bc
HG
6711
6712(define-public java-commons-codec
6713 (package
6714 (name "java-commons-codec")
6715 (version "1.10")
6716 (source (origin
6717 (method url-fetch)
6718 (uri (string-append "mirror://apache/commons/codec/source/"
6719 "commons-codec-" version "-src.tar.gz"))
6720 (sha256
6721 (base32
6722 "1w9qg30y4s0x8gnmr2fgj4lyplfn788jqxbcz27lf5kbr6n8xr65"))))
6723 (build-system ant-build-system)
6724 (outputs '("out" "doc"))
6725 (arguments
6726 `(#:test-target "test"
6727 #:make-flags
6728 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
6729 (junit (assoc-ref %build-inputs "java-junit")))
6730 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
6731 (string-append "-Dhamcrest.jar=" hamcrest
6732 "/share/java/hamcrest-core.jar")
6733 ;; Do not append version to jar.
6734 "-Dfinal.name=commons-codec"))
6735 #:phases
6736 (modify-phases %standard-phases
6737 (add-after 'build 'build-javadoc ant-build-javadoc)
6738 (replace 'install (install-jars "dist"))
6739 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
6740 (native-inputs
6741 `(("java-junit" ,java-junit)
6742 ("java-hamcrest-core" ,java-hamcrest-core)))
77e1fe31 6743 (home-page "https://commons.apache.org/codec/")
0a8519bc
HG
6744 (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs")
6745 (description "The codec package contains simple encoder and decoders for
6746various formats such as Base64 and Hexadecimal. In addition to these widely
6747used encoders and decoders, the codec package also maintains a collection of
6748phonetic encoding utilities.
6749
6750This is a part of the Apache Commons Project.")
6751 (license license:asl2.0)))
7d91c1b9
HG
6752
6753(define-public java-commons-daemon
6754 (package
6755 (name "java-commons-daemon")
b503ae3d 6756 (version "1.1.0")
7d91c1b9
HG
6757 (source (origin
6758 (method url-fetch)
6759 (uri (string-append "mirror://apache/commons/daemon/source/"
6760 "commons-daemon-" version "-src.tar.gz"))
6761 (sha256
6762 (base32
b503ae3d 6763 "141gkhfzv5v3pdhic6y4ardq2dhsa3v36j8wmmhy6f8mac48fp7n"))))
7d91c1b9
HG
6764 (build-system ant-build-system)
6765 (arguments
6766 `(#:test-target "test"
6767 #:phases
6768 (modify-phases %standard-phases
6769 (add-after 'build 'build-javadoc ant-build-javadoc)
6770 (replace 'install (install-jars "dist"))
6771 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
6772 (native-inputs
6773 `(("java-junit" ,java-junit)))
4f236f84 6774 (home-page "https://commons.apache.org/daemon/")
7d91c1b9
HG
6775 (synopsis "Library to launch Java applications as daemons")
6776 (description "The Daemon package from Apache Commons can be used to
6777implement Java applications which can be launched as daemons. For example the
6778program will be notified about a shutdown so that it can perform cleanup tasks
6779before its process of execution is destroyed by the operation system.
6780
6781This package contains the Java library. You will also need the actual binary
6782for your architecture which is provided by the jsvc package.
6783
6784This is a part of the Apache Commons Project.")
6785 (license license:asl2.0)))
9f68e74a 6786
eb270ecf
RW
6787(define-public java-javaewah
6788 (package
6789 (name "java-javaewah")
6790 (version "1.1.6")
6791 (source (origin
2876b233
EF
6792 (method git-fetch)
6793 (uri (git-reference
6794 (url "https://github.com/lemire/javaewah/")
6795 (commit (string-append "JavaEWAH-" version))))
6796 (file-name (git-file-name name version))
eb270ecf
RW
6797 (sha256
6798 (base32
2876b233 6799 "1m8qcb1py76v7avbjjrkvyy6fhr5dk2ywy73gbsxqry04gkm2nhw"))))
eb270ecf
RW
6800 (build-system ant-build-system)
6801 (arguments `(#:jar-name "javaewah.jar"))
6802 (inputs
6803 `(("java-junit" ,java-junit)
6804 ("java-hamcrest-core" ,java-hamcrest-core)))
6805 (home-page "https://github.com/lemire/javaewah")
6806 (synopsis "Compressed alternative to the Java @code{BitSet} class")
6807 (description "This is a word-aligned compressed variant of the Java
6808@code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like
6809compression scheme. It can be used to implement bitmap indexes.
6810
6811The goal of word-aligned compression is not to achieve the best compression,
2876b233 6812but rather to improve query processing time. Hence, JavaEWAH tries to save CPU
eb270ecf
RW
6813cycles, maybe at the expense of storage. However, the EWAH scheme is always
6814more efficient storage-wise than an uncompressed bitmap (as implemented in the
6815@code{BitSet} class by Sun).")
6816 ;; GPL2.0 derivates are explicitly allowed.
6817 (license license:asl2.0)))
6818
f8e4d022
RW
6819(define-public java-slf4j-api
6820 (package
6821 (name "java-slf4j-api")
6822 (version "1.7.25")
6823 (source (origin
6824 (method url-fetch)
6825 (uri (string-append "https://www.slf4j.org/dist/slf4j-"
6826 version ".tar.gz"))
6827 (sha256
6828 (base32
6829 "13j51sgzmhhdrfa74gkal5zpip7r1440dh7zsi2c8bpb2zs1v8kb"))
6830 (modules '((guix build utils)))
6831 ;; Delete bundled jars.
6832 (snippet
6833 '(begin
6834 (for-each delete-file (find-files "." "\\.jar$"))
6835 #t))))
6836 (build-system ant-build-system)
6837 (arguments
dcf7a8a6 6838 `(#:jar-name "slf4j-api.jar"
f8e4d022 6839 #:source-dir "slf4j-api/src/main"
dcf7a8a6
JL
6840 #:test-dir "slf4j-api/src/test"
6841 #:phases
6842 (modify-phases %standard-phases
6843 (add-after 'build 'regenerate-jar
6844 (lambda _
6845 ;; pom.xml ignores these files in the jar creation process. If we don't,
6846 ;; we get the error "This code should have never made it into slf4j-api.jar"
6847 (delete-file-recursively "build/classes/org/slf4j/impl")
2c8ac364
MW
6848 (invoke "jar" "-cf" "build/jar/slf4j-api.jar" "-C"
6849 "build/classes" ".")))
dcf7a8a6
JL
6850 (add-before 'check 'dont-test-abstract-classes
6851 (lambda _
6852 ;; abstract classes are not meant to be run with junit
6853 (substitute* "build.xml"
6854 (("<include name=\"\\*\\*/\\*Test.java\" />")
6855 (string-append "<include name=\"**/*Test.java\" />"
6856 "<exclude name=\"**/MultithreadedInitializationTest"
2c8ac364
MW
6857 ".java\" />")))
6858 #t)))))
f8e4d022
RW
6859 (inputs
6860 `(("java-junit" ,java-junit)
6861 ("java-hamcrest-core" ,java-hamcrest-core)))
6862 (home-page "https://www.slf4j.org/")
6863 (synopsis "Simple logging facade for Java")
6864 (description "The Simple Logging Facade for Java (SLF4J) serves as a
6865simple facade or abstraction for various logging
6866frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j})
6867allowing the end user to plug in the desired logging framework at deployment
6868time.")
6869 (license license:expat)))
6870
6d047cc4
GB
6871(define java-slf4j-api-bootstrap
6872 (package
6873 (inherit java-slf4j-api)
6874 (name "java-slf4j-api-bootstrap")
6875 (inputs `())
6876 (arguments
6877 (substitute-keyword-arguments (package-arguments java-slf4j-api)
6878 ((#:tests? _ #f) #f)))))
6879
88f256a1
TD
6880(define-public java-slf4j-simple
6881 (package
6882 (name "java-slf4j-simple")
6883 (version "1.7.25")
6884 (source (package-source java-slf4j-api))
6885 (build-system ant-build-system)
6886 (arguments
6887 `(#:jar-name "slf4j-simple.jar"
6888 #:source-dir "slf4j-simple/src/main"
6889 #:test-dir "slf4j-simple/src/test"
6890 #:phases
6891 (modify-phases %standard-phases
6892 ;; The tests need some test classes from slf4j-api
6893 (add-before 'check 'build-slf4j-api-test-helpers
6894 (lambda _
6895 ;; Add current dir to CLASSPATH ...
6896 (setenv "CLASSPATH"
6897 (string-append (getcwd) ":" (getenv "CLASSPATH")))
6898 ;; ... and build test helper classes here:
2c8ac364
MW
6899 (apply invoke
6900 `("javac" "-d" "."
6901 ,@(find-files "slf4j-api/src/test" ".*\\.java"))))))))
88f256a1
TD
6902 (inputs
6903 `(("java-junit" ,java-junit)
6904 ("java-hamcrest-core" ,java-hamcrest-core)
6905 ("java-slf4j-api" ,java-slf4j-api)))
6906 (home-page "https://www.slf4j.org/")
6907 (synopsis "Simple implementation of simple logging facade for Java")
6908 (description "SLF4J binding for the Simple implementation, which outputs
6909all events to System.err. Only messages of level INFO and higher are
6910printed.")
6911 (license license:expat)))
6912
9f68e74a
JL
6913(define-public antlr2
6914 (package
6915 (name "antlr2")
6916 (version "2.7.7")
6917 (source (origin
6918 (method url-fetch)
7420c1ee 6919 (uri (string-append "https://www.antlr2.org/download/antlr-"
9f68e74a
JL
6920 version ".tar.gz"))
6921 (sha256
6922 (base32
6923 "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5"))
6924 (modules '((guix build utils)))
6925 (snippet
6926 '(begin
6927 (delete-file "antlr.jar")
6928 (substitute* "lib/cpp/antlr/CharScanner.hpp"
6929 (("#include <map>")
6930 (string-append
6d225e89
RW
6931 "#include <map>\n"
6932 "#define EOF (-1)\n"
6933 "#include <strings.h>")))
9f68e74a 6934 (substitute* "configure"
6d225e89
RW
6935 (("/bin/sh") "sh"))
6936 #t))))
9f68e74a
JL
6937 (build-system gnu-build-system)
6938 (arguments
6d225e89 6939 `(#:tests? #f ; no test target
3ad90395
RW
6940 #:imported-modules ((guix build ant-build-system)
6941 (guix build syscalls)
6942 ,@%gnu-build-system-modules)
6943 #:modules (((guix build ant-build-system) #:prefix ant:)
6944 (guix build gnu-build-system)
6945 (guix build utils))
9f68e74a
JL
6946 #:phases
6947 (modify-phases %standard-phases
6948 (add-after 'install 'strip-jar-timestamps
3ad90395 6949 (assoc-ref ant:%standard-phases 'strip-jar-timestamps))
79f6fc0d
JL
6950 (add-before 'configure 'fix-timestamp
6951 (lambda _
6952 (substitute* "configure"
6953 (("^TIMESTAMP.*") "TIMESTAMP=19700101\n"))
6954 #t))
9f68e74a
JL
6955 (add-after 'configure 'fix-bin-ls
6956 (lambda _
3ad90395
RW
6957 (substitute* (find-files "." "Makefile")
6958 (("/bin/ls") "ls"))
6959 #t)))))
9f68e74a
JL
6960 (native-inputs
6961 `(("which" ,which)
6962 ("zip" ,zip)
6963 ("java" ,icedtea "jdk")))
6964 (inputs
6965 `(("java" ,icedtea)))
7420c1ee 6966 (home-page "https://www.antlr2.org")
9f68e74a
JL
6967 (synopsis "Framework for constructing recognizers, compilers, and translators")
6968 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
6969is a language tool that provides a framework for constructing recognizers,
6970compilers, and translators from grammatical descriptions containing Java, C#,
6971C++, or Python actions. ANTLR provides excellent support for tree construction,
6972tree walking, and translation.")
6973 (license license:public-domain)))
a0f15eff 6974
e44112e1 6975(define-public java-stringtemplate-3
a0f15eff 6976 (package
e44112e1 6977 (name "java-stringtemplate")
a0f15eff
JL
6978 (version "3.2.1")
6979 (source (origin
6980 (method url-fetch)
6981 (uri (string-append "https://github.com/antlr/website-st4/raw/"
6982 "gh-pages/download/stringtemplate-"
6983 version ".tar.gz"))
6984 (sha256
6985 (base32
6986 "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is"))))
6987 (build-system ant-build-system)
6988 (arguments
129d926d 6989 `(#:jar-name (string-append ,name "-" ,version ".jar")
2fcda6d2 6990 #:test-dir "test"
b101b4e8
RW
6991 #:modules ((guix build ant-build-system)
6992 (guix build utils)
6993 (srfi srfi-1))
a0f15eff
JL
6994 #:phases
6995 (modify-phases %standard-phases
2fcda6d2
RW
6996 (add-before 'check 'fix-tests
6997 (lambda _
6998 (substitute* "build.xml"
6999 (("\\$\\{test.home\\}/java")
7000 "${test.home}/org"))
7001 #t))
a0f15eff
JL
7002 (add-before 'build 'generate-grammar
7003 (lambda _
b101b4e8 7004 (with-directory-excursion "src/org/antlr/stringtemplate/language/"
2c8ac364
MW
7005 (for-each (lambda (file)
7006 (format #t "~a\n" file)
7007 (invoke "antlr" file))
7008 '("template.g" "angle.bracket.template.g" "action.g"
7009 "eval.g" "group.g" "interface.g")))
7010 #t)))))
a0f15eff 7011 (native-inputs
2fcda6d2
RW
7012 `(("antlr" ,antlr2)
7013 ("java-junit" ,java-junit)))
ba11a8bd 7014 (home-page "https://www.stringtemplate.org")
a0f15eff
JL
7015 (synopsis "Template engine to generate formatted text output")
7016 (description "StringTemplate is a java template engine (with ports for C#,
7017Objective-C, JavaScript, Scala) for generating source code, web pages, emails,
7018or any other formatted text output. StringTemplate is particularly good at
7019code generators, multiple site skins, and internationalization / localization.
7020StringTemplate also powers ANTLR.")
7021 (license license:bsd-3)))
4ad8aed7
JL
7022
7023;; antlr3 is partially written using antlr3 grammar files. It also depends on
7024;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar
7025;; files and uses antlr3 at runtime. The latest version requires a recent version
7026;; of antlr3 at runtime.
7027;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3.
7028;; This version of ST4 is sufficient for the latest antlr3.
7029;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build
7030;; the latest ST4 with it. Then we build our final antlr3 that will be linked
7031;; against the latest ST4.
7032;; antlr3.3 still depends on antlr3 to generate some files, so we use an
7033;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses
7034;; only grammar files with the antlr2 syntax.
7035;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3.
7036
64b7efc0 7037(define-public java-stringtemplate
407df789 7038 (package (inherit java-stringtemplate-3)
64b7efc0 7039 (name "java-stringtemplate")
4ad8aed7
JL
7040 (version "4.0.8")
7041 (source (origin
7042 (method url-fetch)
7043 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/"
7044 version ".tar.gz"))
7045 (file-name (string-append name "-" version ".tar.gz"))
7046 (sha256
7047 (base32
7048 "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087"))))
7049 (build-system ant-build-system)
7050 (arguments
6db77c7c
RW
7051 `(#:jar-name (string-append ,name "-" ,version ".jar")
7052 #:tests? #f ; FIXME: tests fail for unknown reasons
7053 #:test-dir "test"
f4aa4cfe
RW
7054 #:modules ((guix build ant-build-system)
7055 (guix build utils)
7056 (srfi srfi-1))
4ad8aed7
JL
7057 #:phases
7058 (modify-phases %standard-phases
6db77c7c
RW
7059 (add-before 'check 'fix-test-target
7060 (lambda _
7061 (substitute* "build.xml"
7062 (("\\$\\{test.home\\}/java") "${test.home}/")
7063 (("\\*Test.java") "Test*.java"))
7064 #t))
4ad8aed7 7065 (add-before 'build 'generate-grammar
f4aa4cfe
RW
7066 (lambda _
7067 (with-directory-excursion "src/org/stringtemplate/v4/compiler/"
2c8ac364
MW
7068 (for-each (lambda (file)
7069 (format #t "~a\n" file)
7070 (invoke "antlr3" file))
7071 '("STParser.g" "Group.g" "CodeGenerator.g")))
7072 #t)))))
4ad8aed7
JL
7073 (inputs
7074 `(("antlr3" ,antlr3-bootstrap)
7075 ("antlr2" ,antlr2)
6db77c7c
RW
7076 ("java-stringtemplate" ,java-stringtemplate-3)
7077 ("java-junit" ,java-junit)))))
4ad8aed7 7078
1345eeb0 7079(define java-stringtemplate-4.0.6
64b7efc0 7080 (package (inherit java-stringtemplate)
1345eeb0 7081 (name "java-stringtemplate")
4ad8aed7
JL
7082 (version "4.0.6")
7083 (source (origin
7084 (method url-fetch)
7085 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-"
7086 version ".tar.gz"))
7087 (file-name (string-append name "-" version ".tar.gz"))
7088 (sha256
7089 (base32
7090 "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp"))))
7091 (inputs
7092 `(("antlr3" ,antlr3-3.3)
7093 ("antlr2" ,antlr2)
e44112e1 7094 ("java-stringtemplate" ,java-stringtemplate-3)))))
4ad8aed7
JL
7095
7096(define-public antlr3
7097 (package
7098 (name "antlr3")
7099 (version "3.5.2")
7100 (source (origin
043ee597
EF
7101 (method git-fetch)
7102 (uri (git-reference
7103 (url "https://github.com/antlr/antlr3")
7104 (commit version)))
7105 (file-name (git-file-name name version))
4ad8aed7
JL
7106 (sha256
7107 (base32
043ee597 7108 "0cafavrjmzqhklghrk8c2jqxkdwxgzskm20pbrfd3r41cn00dpnf"))))
4ad8aed7
JL
7109 (build-system ant-build-system)
7110 (arguments
7111 `(#:jar-name (string-append ,name "-" ,version ".jar")
7112 #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3"
7113 #:tests? #f
7114 #:phases
7115 (modify-phases %standard-phases
7116 (add-after 'install 'bin-install
7117 (lambda* (#:key inputs outputs #:allow-other-keys)
7118 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
7119 (bin (string-append (assoc-ref outputs "out") "/bin")))
7120 (mkdir-p bin)
7121 (with-output-to-file (string-append bin "/antlr3")
7122 (lambda _
7123 (display
7124 (string-append "#!" (which "sh") "\n"
7125 "java -cp " jar "/" ,name "-" ,version ".jar:"
7126 (string-concatenate
7127 (find-files (assoc-ref inputs "stringtemplate")
7128 ".*\\.jar"))
7129 ":"
7130 (string-concatenate
7131 (find-files (assoc-ref inputs "stringtemplate4")
7132 ".*\\.jar"))
7133 ":"
7134 (string-concatenate
7135 (find-files (string-append
7136 (assoc-ref inputs "antlr")
7137 "/lib")
7138 ".*\\.jar"))
7139 " org.antlr.Tool $*"))))
2c8ac364
MW
7140 (chmod (string-append bin "/antlr3") #o755))
7141 #t))
4ad8aed7
JL
7142 (add-before 'build 'generate-grammar
7143 (lambda _
7144 (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/")
7145 (for-each (lambda (file)
7146 (display file)
7147 (newline)
2c8ac364 7148 (invoke "antlr3" file))
4ad8aed7
JL
7149 '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g"
7150 "AssignTokenTypesWalker.g"
7151 "ActionTranslator.g" "TreeToNFAConverter.g"
7152 "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g"
7153 "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g"))
7154 (substitute* "ANTLRParser.java"
7155 (("public Object getTree") "public GrammarAST getTree"))
7156 (substitute* "ANTLRv3Parser.java"
7157 (("public Object getTree") "public CommonTree getTree"))
7158 (chdir "../../../../../java")
4ad8aed7
JL
7159 (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java"
7160 (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*;
7161import org.antlr.grammar.v3.ANTLRTreePrinter;"))
7162 (substitute* "org/antlr/tool/ErrorManager.java"
7163 (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") ""))
2c8ac364
MW
7164 (chdir "../../../..")
7165 #t))
4ad8aed7
JL
7166 (add-before 'build 'fix-build-xml
7167 (lambda _
7168 (substitute* "build.xml"
570f3b63
JL
7169 (("target name=\"compile\">")
7170 "target name=\"compile\">
7171<copy todir=\"${classes.dir}\">
4ad8aed7
JL
7172<fileset dir=\"tool/src/main/resources\">
7173<include name=\"**/*.stg\"/>
7174<include name=\"**/*.st\"/>
7175<include name=\"**/*.sti\"/>
7176<include name=\"**/STLexer.tokens\"/>
7177</fileset>
570f3b63 7178</copy>"))
2c8ac364 7179 #t)))))
4ad8aed7
JL
7180 (native-inputs
7181 `(("antlr" ,antlr2)
7182 ("antlr3" ,antlr3-bootstrap)))
7183 (inputs
7184 `(("junit" ,java-junit)
e44112e1 7185 ("stringtemplate" ,java-stringtemplate-3)
64b7efc0 7186 ("stringtemplate4" ,java-stringtemplate)))
4ad8aed7 7187 (propagated-inputs
e44112e1 7188 `(("stringtemplate" ,java-stringtemplate-3)
4ad8aed7 7189 ("antlr" ,antlr2)
1345eeb0 7190 ("stringtemplate4" ,java-stringtemplate-4.0.6)))
a264250b 7191 (home-page "https://www.antlr3.org")
4ad8aed7
JL
7192 (synopsis "Framework for constructing recognizers, compilers, and translators")
7193 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
7194is a language tool that provides a framework for constructing recognizers,
7195compilers, and translators from grammatical descriptions containing Java, C#,
7196C++, or Python actions. ANTLR provides excellent support for tree construction,
7197tree walking, and translation.")
7198 (license license:bsd-3)))
7199
7200(define antlr3-bootstrap
7201 (package
7202 (inherit antlr3)
7203 (name "antlr3-bootstrap")
7204 (native-inputs
7205 `(("antlr" ,antlr2)
7206 ("antlr3" ,antlr3-3.3)))
7207 (inputs
7208 `(("junit" ,java-junit)))))
7209
011f9412 7210(define-public antlr3-3.3
4ad8aed7
JL
7211 (package
7212 (inherit antlr3)
7213 (name "antlr3")
7214 (version "3.3")
7215 (source (origin
7216 (method url-fetch)
7217 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
7218 "gh-pages/download/antlr-"
7219 version ".tar.gz"))
7220 (sha256
7221 (base32
48c86220
GB
7222 "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m"))
7223 (patches
7224 (search-patches "antlr3-3_3-fix-java8-compilation.patch"))))
4ad8aed7
JL
7225 (arguments
7226 `(#:jar-name (string-append ,name "-" ,version ".jar")
a9540107
RW
7227 #:source-dir (string-join '("tool/src/main/java"
7228 "runtime/Java/src/main/java"
7229 "tool/src/main/antlr2"
7230 "tool/src/main/antlr3")
7231 ":")
7232 #:tests? #f ; FIXME: tests seem to require maven plugin
7233 #:modules ((guix build ant-build-system)
7234 (guix build utils)
7235 (srfi srfi-1))
4ad8aed7
JL
7236 #:phases
7237 (modify-phases %standard-phases
7238 (add-after 'install 'bin-install
7239 (lambda* (#:key inputs outputs #:allow-other-keys)
a9540107
RW
7240 (let* ((out (assoc-ref outputs "out"))
7241 (jar (string-append out "/share/java"))
7242 (bin (string-append out "/bin")))
4ad8aed7
JL
7243 (mkdir-p bin)
7244 (with-output-to-file (string-append bin "/antlr3")
7245 (lambda _
7246 (display
a9540107
RW
7247 (string-append
7248 "#!" (which "sh") "\n"
7249 "java -cp " jar "/antlr3-3.3.jar:"
7250 (string-join
7251 (append (find-files (assoc-ref inputs "java-stringtemplate")
7252 ".*\\.jar$")
7253 (find-files (string-append (assoc-ref inputs "antlr")
7254 "/lib")
7255 ".*\\.jar$"))
7256 ":")
7257 " org.antlr.Tool $*"))))
7258 (chmod (string-append bin "/antlr3") #o755)
7259 #t)))
4ad8aed7
JL
7260 (add-before 'build 'generate-grammar
7261 (lambda _
4ad8aed7
JL
7262 (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java"
7263 (("import org.antlr.grammar.v2.\\*;")
7264 "import org.antlr.grammar.v2.*;\n
7265import org.antlr.grammar.v2.TreeToNFAConverter;\n
7266import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n
a9540107 7267import org.antlr.grammar.v2.ANTLRTreePrinter;"))
2c8ac364
MW
7268 (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/"
7269 (for-each (lambda (file)
7270 (format #t "~a\n" file)
7271 (invoke "antlr" file))
7272 '("antlr.g" "antlr.print.g" "assign.types.g"
7273 "buildnfa.g" "codegen.g" "define.g")))
7274 (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/"
7275 (for-each (lambda (file)
7276 (format #t "~a\n" file)
7277 (invoke "antlr3" file))
7278 '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g"
7279 "ANTLRv3Tree.g")))
7280 #t))
4ad8aed7
JL
7281 (add-before 'build 'fix-build-xml
7282 (lambda _
7283 (substitute* "build.xml"
570f3b63
JL
7284 (("target name=\"compile\">")
7285 "target name=\"compile\">
7286<copy todir=\"${classes.dir}\">
4ad8aed7
JL
7287<fileset dir=\"tool/src/main/resources\">
7288<include name=\"**/*.stg\"/>
7289<include name=\"**/*.st\"/>
7290<include name=\"**/*.sti\"/>
7291<include name=\"**/STLexer.tokens\"/>
7292</fileset>
570f3b63 7293</copy>"))
a9540107 7294 #t)))))
4ad8aed7
JL
7295 (native-inputs
7296 `(("antlr" ,antlr2)
7297 ("antlr3" ,antlr3-3.1)))
7298 (inputs
7299 `(("junit" ,java-junit)))
7300 (propagated-inputs
e44112e1 7301 `(("java-stringtemplate" ,java-stringtemplate-3)
4ad8aed7
JL
7302 ("antlr" ,antlr2)
7303 ("antlr3" ,antlr3-3.1)))))
7304
570f3b63 7305(define-public antlr3-3.1
4ad8aed7
JL
7306 (package
7307 (inherit antlr3)
4ad8aed7
JL
7308 (version "3.1")
7309 (source (origin
7310 (method url-fetch)
7311 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
7312 "gh-pages/download/antlr-"
7313 version ".tar.gz"))
7314 (sha256
7315 (base32
4c763b4d
GB
7316 "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z"))
7317 (patches
7318 (search-patches "antlr3-3_1-fix-java8-compilation.patch"))))
4ad8aed7 7319 (arguments
ec32bc98 7320 `(#:jar-name (string-append "antlr3-" ,version ".jar")
4ad8aed7
JL
7321 #:source-dir "src:runtime/Java/src"
7322 #:tests? #f
7323 #:phases
7324 (modify-phases %standard-phases
7325 (add-after 'install 'bin-install
7326 (lambda* (#:key inputs outputs #:allow-other-keys)
7327 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
7328 (bin (string-append (assoc-ref outputs "out") "/bin")))
7329 (mkdir-p bin)
7330 (with-output-to-file (string-append bin "/antlr3")
7331 (lambda _
7332 (display
7333 (string-append "#!" (which "sh") "\n"
57e37764 7334 "java -cp " jar "/antlr3-3.1.jar:"
4ad8aed7
JL
7335 (string-concatenate
7336 (find-files (assoc-ref inputs "stringtemplate")
7337 ".*\\.jar"))
7338 ":"
7339 (string-concatenate
7340 (find-files (string-append
7341 (assoc-ref inputs "antlr")
7342 "/lib")
7343 ".*\\.jar"))
7344 " org.antlr.Tool $*"))))
2c8ac364
MW
7345 (chmod (string-append bin "/antlr3") #o755))
7346 #t))
4ad8aed7
JL
7347 (add-before 'build 'generate-grammar
7348 (lambda _
7349 (let ((dir "src/org/antlr/tool/"))
7350 (for-each (lambda (file)
7351 (display file)
7352 (newline)
13f38d31 7353 (invoke "antlr" "-o" dir (string-append dir file)))
4ad8aed7
JL
7354 '("antlr.g" "antlr.print.g" "assign.types.g"
7355 "buildnfa.g" "define.g")))
7356 (format #t "codegen.g\n")
13f38d31
RW
7357 (invoke "antlr" "-o" "src/org/antlr/codegen"
7358 "src/org/antlr/codegen/codegen.g")
7359 #t))
4ad8aed7
JL
7360 (add-before 'build 'fix-build-xml
7361 (lambda _
7362 (substitute* "build.xml"
570f3b63
JL
7363 (("target name=\"compile\">")
7364 "target name=\"compile\">
7365<copy todir=\"${classes.dir}\">
4ad8aed7
JL
7366<fileset dir=\"src\">
7367<include name=\"**/*.stg\"/>
7368<include name=\"**/*.st\"/>
7369<include name=\"**/*.sti\"/>
7370<include name=\"**/STLexer.tokens\"/>
7371</fileset>
570f3b63 7372</copy>"))
2c8ac364 7373 #t)))))
4ad8aed7
JL
7374 (native-inputs
7375 `(("antlr" ,antlr2)))
7376 (inputs
7377 `(("junit" ,java-junit)))
7378 (propagated-inputs
e44112e1 7379 `(("stringtemplate" ,java-stringtemplate-3)))))
d44bcd7a 7380
742242a5
GB
7381(define-public java-commons-cli-1.2
7382 ;; This is a bootstrap dependency for Maven2.
7383 (package
7384 (inherit java-commons-cli)
7385 (version "1.2")
7386 (source (origin
7387 (method url-fetch)
7388 (uri (string-append "mirror://apache/commons/cli/source/"
7389 "commons-cli-" version "-src.tar.gz"))
7390 (sha256
7391 (base32
7392 "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm"))))
7393 (arguments
7394 `(#:jar-name "commons-cli.jar"
7395 #:phases
7396 (modify-phases %standard-phases
7397 (add-before 'check 'fix-build-xml
7398 (lambda* (#:key inputs #:allow-other-keys)
7399 (substitute* "build.xml"
7400 (("dir=\"\\$\\{test.home\\}/java\"")
7401 "dir=\"${test.home}\""))
7402 #t)))))
7403 (native-inputs
7404 `(("java-junit" ,java-junit)))))
30deadee
JL
7405
7406(define-public java-microemulator-cldc
7407 (package
7408 (name "java-microemulator-cldc")
7409 (version "2.0.4")
7410 (source (origin
7411 (method url-fetch)
7412 (uri (string-append "https://github.com/barteo/microemu/archive/"
7413 "microemulator_"
7414 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
7415 version)
7416 ".tar.gz"))
7417 (file-name (string-append name "-" version ".tar.gz"))
7418 (sha256
7419 (base32
7420 "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll"))))
7421 (build-system ant-build-system)
7422 (arguments
7423 `(#:jar-name "microemulator-cldc.jar"
7424 #:source-dir "microemu-cldc/src/main/java"
7425 #:tests? #f)); Requires even older software
7426 (home-page "https://github.com/barteo/microemu")
7427 (synopsis "J2ME CLDC emulator")
7428 (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP
60738bdc 7429Emulator. It demonstrates MIDlet based applications in web browser
30deadee
JL
7430applet and can be run as a standalone java application.")
7431 (license (list license:asl2.0
7432 ;; or altenatively:
7433 license:lgpl2.1+))))
8e2f3e5e
JL
7434
7435(define-public java-datanucleus-javax-persistence
7436 (package
7437 (name "java-datanucleus-javax-persistence")
7438 (version "2.2.0")
7439 (source (origin
7440 (method url-fetch)
7441 (uri (string-append "https://github.com/datanucleus/"
7442 "javax.persistence/archive/javax.persistence-"
7443 version "-release.tar.gz"))
7444 (sha256
7445 (base32
7446 "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx"))))
7447 (build-system ant-build-system)
7448 (arguments
7449 `(#:jar-name "java-datanucleus-javax-persistence.jar"
7450 #:jdk ,icedtea-8
7451 #:source-dir "src/main/java"
7452 #:tests? #f)); no tests
7453 (home-page "https://github.com/datanucleus/javax.persistence")
7454 (synopsis "JPA API")
7455 (description "This package contains a clean definition of JPA API intended
7456for use with DataNucleus JPA since the JCP haven't provided an official JPA API
7457jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification
7458used to generate this API.")
7459 (license (list license:edl1.0 license:epl1.0))))
3240ddbf
JL
7460
7461(define-public java-osgi-cmpn
7462 (package
7463 (name "java-osgi-cmpn")
7464 (version "6.0.0")
7465 (source (origin
7466 (method url-fetch)
7779ad50 7467 (uri (string-append "https://repo1.maven.org/maven2/"
3240ddbf
JL
7468 "org/osgi/osgi.cmpn/" version "/osgi.cmpn-"
7469 version "-sources.jar"))
7470 (sha256
7471 (base32
7472 "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys"))))
7473 (build-system ant-build-system)
7474 (arguments
7475 `(#:jar-name "osgi-cmpn.jar"
7476 #:tests? #f)); no tests
7477 (inputs
7478 `(("annotation" ,java-osgi-annotation)
7479 ("core" ,java-osgi-core)
7480 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
7481 ("microemulator" ,java-microemulator-cldc)
7482 ("servlet" ,java-classpathx-servletapi)))
c353d014 7483 (home-page "https://www.osgi.org")
3240ddbf
JL
7484 (synopsis "Compendium specification module of OSGi framework")
7485 (description
7486 "OSGi, for Open Services Gateway initiative framework, is a module system
7487and service platform for the Java programming language. This package contains
7488the compendium specification module, providing interfaces and classes for use
7489in compiling bundles.")
7490 (license license:asl2.0)))
747c7574
JL
7491
7492(define-public java-osgi-service-component-annotations
7493 (package
7494 (name "java-osgi-service-component-annotations")
7495 (version "1.3.0")
7496 (source (origin
7497 (method url-fetch)
fa315559 7498 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
747c7574
JL
7499 "org.osgi.service.component.annotations/"
7500 version "/org.osgi.service.component.annotations-"
7501 version "-sources.jar"))
7502 (sha256
7503 (base32
7504 "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0"))))
7505 (build-system ant-build-system)
7506 (arguments
7507 `(#:jar-name "osgi-service-component-annotations.jar"
7508 #:tests? #f)); no tests
7509 (inputs
7510 `(("annotation" ,java-osgi-annotation)))
c353d014 7511 (home-page "https://www.osgi.org")
747c7574
JL
7512 (synopsis "Support annotations for osgi-service-component")
7513 (description
7514 "OSGi, for Open Services Gateway initiative framework, is a module system
7515and service platform for the Java programming language. This package contains
7516the support annotations for osgi-service-component.")
7517 (license license:asl2.0)))
999b5fb4
JL
7518
7519(define-public java-osgi-dto
7520 (package
7521 (name "java-osgi-dto")
7522 (version "1.0.0")
7523 (source (origin
7524 (method url-fetch)
fc1c5dbd 7525 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
999b5fb4
JL
7526 "org.osgi.dto/" version "/org.osgi.dto-"
7527 version "-sources.jar"))
7528 (sha256
7529 (base32
7530 "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr"))))
7531 (build-system ant-build-system)
7532 (arguments
7533 `(#:jar-name "osgi-dto.jar"
7534 #:tests? #f)); no tests
7535 (inputs
7536 `(("annotation" ,java-osgi-annotation)))
c353d014 7537 (home-page "https://www.osgi.org")
999b5fb4
JL
7538 (synopsis "Data Transfer Objects")
7539 (description
7540 "OSGi, for Open Services Gateway initiative framework, is a module system
7541and service platform for the Java programming language. This package contains
7542the Data Transfer Objects. It is easily serializable having only public fields
7543of primitive types and their wrapper classes, Strings, and DTOs. List, Set,
7544Map and array aggregates may also be used. The aggregates must only hold
7545objects of the listed types or aggregates.")
7546 (license license:asl2.0)))
c304ce6a
JL
7547
7548(define-public java-osgi-resource
7549 (package
7550 (name "java-osgi-resource")
7551 (version "1.0.0")
7552 (source (origin
7553 (method url-fetch)
1f2643fa 7554 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
c304ce6a
JL
7555 "org.osgi.resource/"
7556 version "/org.osgi.resource-"
7557 version "-sources.jar"))
7558 (sha256
7559 (base32
7560 "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d"))))
7561 (build-system ant-build-system)
7562 (arguments
7563 `(#:jar-name "osgi-resource.jar"
7564 #:tests? #f)); no tests
7565 (inputs
7566 `(("annotation" ,java-osgi-annotation)
7567 ("dto" ,java-osgi-dto)))
c353d014 7568 (home-page "https://www.osgi.org")
c304ce6a
JL
7569 (synopsis "OSGI Resource")
7570 (description
7571 "OSGi, for Open Services Gateway initiative framework, is a module system
7572and service platform for the Java programming language. This package contains
7573the definition of common types in osgi packages.")
7574 (license license:asl2.0)))
c2b14516
JL
7575
7576(define-public java-osgi-namespace-contract
7577 (package
7578 (name "java-osgi-namespace-contract")
7579 (version "1.0.0")
7580 (source (origin
7581 (method url-fetch)
60f5ab0b 7582 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
c2b14516
JL
7583 "org.osgi.namespace.contract/"
7584 version "/org.osgi.namespace.contract-"
7585 version "-sources.jar"))
7586 (sha256
7587 (base32
7588 "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36"))))
7589 (build-system ant-build-system)
7590 (inputs
7591 `(("resource" ,java-osgi-resource)
7592 ("annotation" ,java-osgi-annotation)))
7593 (arguments
7594 `(#:jar-name "osgi-namespace-contract.jar"
7595 #:tests? #f)); no tests
c353d014 7596 (home-page "https://www.osgi.org")
c2b14516
JL
7597 (synopsis "Contract Capability and Requirement Namespace")
7598 (description
7599 "OSGi, for Open Services Gateway initiative framework, is a module system
7600and service platform for the Java programming language. This package contains
7601the names for the attributes and directives for a namespace with contracts.")
7602 (license license:asl2.0)))
f809c963
JL
7603
7604(define-public java-osgi-namespace-extender
7605 (package
7606 (name "java-osgi-namespace-extender")
7607 (version "1.0.1")
7608 (source (origin
7609 (method url-fetch)
fccce661 7610 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
f809c963
JL
7611 "org.osgi.namespace.extender/"
7612 version "/org.osgi.namespace.extender-"
7613 version "-sources.jar"))
7614 (sha256
7615 (base32
7616 "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz"))))
7617 (build-system ant-build-system)
7618 (inputs
7619 `(("resource" ,java-osgi-resource)
7620 ("annotation" ,java-osgi-annotation)))
7621 (arguments
7622 `(#:jar-name "osgi-namespace-extendent.jar"
7623 #:tests? #f)); no tests
c353d014 7624 (home-page "https://www.osgi.org")
f809c963
JL
7625 (synopsis "Extender Capability and Requirement Namespace")
7626 (description
7627 "OSGi, for Open Services Gateway initiative framework, is a module system
7628and service platform for the Java programming language. This package contains
b784962d
JL
7629the names for the attributes and directives for an extender namespace.")
7630 (license license:asl2.0)))
7631
7632(define-public java-osgi-namespace-service
7633 (package
7634 (name "java-osgi-namespace-service")
7635 (version "1.0.0")
7636 (source (origin
7637 (method url-fetch)
ec4ba417 7638 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
b784962d
JL
7639 "org.osgi.namespace.service/"
7640 version "/org.osgi.namespace.service-"
7641 version "-sources.jar"))
7642 (sha256
7643 (base32
7644 "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8"))))
7645 (build-system ant-build-system)
7646 (inputs
7647 `(("resource" ,java-osgi-resource)
7648 ("annotation" ,java-osgi-annotation)))
7649 (arguments
7650 `(#:jar-name "osgi-namespace-service.jar"
7651 #:tests? #f)); no tests
c353d014 7652 (home-page "https://www.osgi.org")
b784962d
JL
7653 (synopsis "Service Capability and Requirement Namespace")
7654 (description
7655 "OSGi, for Open Services Gateway initiative framework, is a module system
7656and service platform for the Java programming language. This package contains
7657the names for the attributes and directives for a service namespace.")
f809c963 7658 (license license:asl2.0)))
0f0c5218
JL
7659
7660(define-public java-osgi-util-function
7661 (package
7662 (name "java-osgi-util-function")
7663 (version "1.0.0")
7664 (source (origin
7665 (method url-fetch)
43be0299 7666 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
0f0c5218
JL
7667 "org.osgi.util.function/"
7668 version "/org.osgi.util.function-"
7669 version "-sources.jar"))
7670 (sha256
7671 (base32
7672 "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x"))))
7673 (build-system ant-build-system)
7674 (arguments
7675 `(#:jar-name "osgi-util-function.jar"
7676 #:tests? #f)); no tests
7677 (inputs
7678 `(("annotation" ,java-osgi-annotation)))
c353d014 7679 (home-page "https://www.osgi.org")
0f0c5218
JL
7680 (synopsis "OSGI Util Function")
7681 (description
7682 "OSGi, for Open Services Gateway initiative framework, is a module system
7683and service platform for the Java programming language. This package contains
7684an interface for a function that accepts a single argument and produces a result.")
7685 (license license:asl2.0)))
27103135
JL
7686
7687(define-public java-osgi-util-promise
7688 (package
7689 (name "java-osgi-util-promise")
7690 (version "1.0.0")
7691 (source (origin
7692 (method url-fetch)
c962e6c4 7693 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
27103135
JL
7694 "org.osgi.util.promise/"
7695 version "/org.osgi.util.promise-"
7696 version "-sources.jar"))
7697 (sha256
7698 (base32
7699 "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c"))))
7700 (build-system ant-build-system)
7701 (arguments
7702 `(#:jar-name "osgi-util-promise.jar"
7703 #:tests? #f)); no tests
7704 (inputs
7705 `(("annotation" ,java-osgi-annotation)
7706 ("function" ,java-osgi-util-function)))
c353d014 7707 (home-page "https://www.osgi.org")
27103135
JL
7708 (synopsis "Promise of a value")
7709 (description
7710 "OSGi, for Open Services Gateway initiative framework, is a module system
7711and service platform for the Java programming language. This package contains
7712an interface and utilitary classes for promises. A Promise represents a future
7713value. It handles the interactions for asynchronous processing.")
7714 (license license:asl2.0)))
2b1fdb2b
JL
7715
7716(define-public java-osgi-service-metatype-annotations
7717 (package
7718 (name "java-osgi-service-metatype-annotations")
7719 (version "1.3.0")
7720 (source (origin
7721 (method url-fetch)
98b1985f 7722 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
2b1fdb2b
JL
7723 "org.osgi.service.metatype.annotations/"
7724 version "/org.osgi.service.metatype.annotations-"
7725 version "-sources.jar"))
7726 (sha256
7727 (base32
7728 "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6"))))
7729 (build-system ant-build-system)
7730 (arguments
7731 `(#:jar-name "osgi-service-metatype-annotations.jar"
7732 #:tests? #f)); no tests
7733 (inputs
7734 `(("annotation" ,java-osgi-annotation)))
c353d014 7735 (home-page "https://www.osgi.org")
2b1fdb2b
JL
7736 (synopsis "Support annotations for metatype")
7737 (description
7738 "OSGi, for Open Services Gateway initiative framework, is a module system
7739and service platform for the Java programming language. This package contains
7740the support annotations for metatype.")
7741 (license license:asl2.0)))
a13acfbe
JL
7742
7743(define-public java-osgi-service-repository
7744 (package
7745 (name "java-osgi-service-repository")
7746 (version "1.1.0")
7747 (source (origin
7748 (method url-fetch)
7a5c5017 7749 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
a13acfbe
JL
7750 "org.osgi.service.repository/"
7751 version "/org.osgi.service.repository-"
7752 version "-sources.jar"))
7753 (sha256
7754 (base32
7755 "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n"))))
7756 (build-system ant-build-system)
7757 (arguments
7758 `(#:jar-name "osgi-service-repository.jar"
7759 #:tests? #f)); no tests
7760 (inputs
7761 `(("annotation" ,java-osgi-annotation)
7762 ("promise" ,java-osgi-util-promise)
7763 ("resource" ,java-osgi-resource)))
c353d014 7764 (home-page "https://www.osgi.org")
a13acfbe
JL
7765 (synopsis "OSGI service repository")
7766 (description
7767 "OSGi, for Open Services Gateway initiative framework, is a module system
7768and service platform for the Java programming language. This package contains
7769a repository service that contains resources.")
7770 (license license:asl2.0)))
dfd91541
JL
7771
7772(define-public java-osgi-framework
7773 (package
7774 (name "java-osgi-framework")
7775 (version "1.8.0")
7776 (source (origin
7777 (method url-fetch)
05662561 7778 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
dfd91541
JL
7779 "org.osgi.framework/" version "/org.osgi.framework-"
7780 version "-sources.jar"))
7781 (sha256
7782 (base32
7783 "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s"))))
7784 (build-system ant-build-system)
7785 (arguments
7786 `(#:jar-name "osgi-framework.jar"
7787 #:tests? #f)); no tests
7788 (inputs
7789 `(("annotation" ,java-osgi-annotation)
7790 ("resource" ,java-osgi-resource)
7791 ("dto" ,java-osgi-dto)))
c353d014 7792 (home-page "https://www.osgi.org")
dfd91541
JL
7793 (synopsis "OSGi framework")
7794 (description
7795 "OSGi, for Open Services Gateway initiative framework, is a module system
7796and service platform for the Java programming language.")
7797 (license license:asl2.0)))
98c9f16c
JL
7798
7799(define-public java-osgi-service-log
7800 (package
7801 (name "java-osgi-service-log")
7802 (version "1.3.0")
7803 (source (origin
7804 (method url-fetch)
9b0bf25c 7805 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
98c9f16c
JL
7806 "org.osgi.service.log/"
7807 version "/org.osgi.service.log-"
7808 version "-sources.jar"))
7809 (sha256
7810 (base32
7811 "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0"))))
7812 (build-system ant-build-system)
7813 (arguments
7814 `(#:jar-name "osgi-service-log.jar"
7815 #:tests? #f)); no tests
7816 (inputs
7817 `(("java-osgi-framework" ,java-osgi-framework)))
c353d014 7818 (home-page "https://www.osgi.org")
98c9f16c
JL
7819 (synopsis "Provides methods for bundles to write messages to the log")
7820 (description
7821 "OSGi, for Open Services Gateway initiative framework, is a module system
7822and service platform for the Java programming language. This package contains
7823the log service.")
7824 (license license:asl2.0)))
dd76d44b
JL
7825
7826(define-public java-osgi-service-jdbc
7827 (package
7828 (name "java-osgi-service-jdbc")
7829 (version "1.0.0")
7830 (source (origin
7831 (method url-fetch)
4a6a7b2d 7832 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
dd76d44b
JL
7833 "org.osgi.service.jdbc/"
7834 version "/org.osgi.service.jdbc-"
7835 version "-sources.jar"))
7836 (sha256
7837 (base32
7838 "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz"))))
7839 (build-system ant-build-system)
7840 (arguments
7841 `(#:jar-name "osgi-service-jdbc.jar"
7842 #:tests? #f)); no tests
c353d014 7843 (home-page "https://www.osgi.org")
dd76d44b
JL
7844 (synopsis "Factory for JDBC connection factories")
7845 (description
7846 "OSGi, for Open Services Gateway initiative framework, is a module system
7847and service platform for the Java programming language. This package contains
7848a factory for JDBC connection factories. There are 3 preferred connection
7849factories for getting JDBC connections:
7850
7851@itemize
7852@item @code{javax.sql.DataSource};
7853@item @code{javax.sql.ConnectionPoolDataSource};
7854@item @code{javax.sql.XADataSource}.
7855@end itemize")
7856 (license license:asl2.0)))
291d3f22
JL
7857
7858(define-public java-osgi-service-resolver
7859 (package
7860 (name "java-osgi-service-resolver")
7861 (version "1.0.1")
7862 (source (origin
7863 (method url-fetch)
b787534b 7864 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
291d3f22
JL
7865 "org.osgi.service.resolver/"
7866 version "/org.osgi.service.resolver-"
7867 version "-sources.jar"))
7868 (sha256
7869 (base32
7870 "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd"))))
7871 (build-system ant-build-system)
7872 (arguments
7873 `(#:jar-name "osgi-service-resolver.jar"
7874 #:tests? #f)); no tests
7875 (inputs
7876 `(("annotation" ,java-osgi-annotation)
7877 ("resource" ,java-osgi-resource)))
c353d014 7878 (home-page "https://www.osgi.org")
291d3f22
JL
7879 (synopsis "OSGI Resolver service")
7880 (description
7881 "OSGi, for Open Services Gateway initiative framework, is a module system
7882and service platform for the Java programming language. This package contains
7883a resolver service that resolves the specified resources in the context supplied
7884by the caller.")
7885 (license license:asl2.0)))
1884bb81
JL
7886
7887(define-public java-osgi-util-tracker
7888 (package
7889 (name "java-osgi-util-tracker")
7890 (version "1.5.1")
7891 (source (origin
7892 (method url-fetch)
e0695da9 7893 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
1884bb81
JL
7894 "org.osgi.util.tracker/"
7895 version "/org.osgi.util.tracker-"
7896 version "-sources.jar"))
7897 (sha256
7898 (base32
7899 "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz"))))
7900 (build-system ant-build-system)
7901 (arguments
7902 `(#:jar-name "osgi-util-tracker.jar"
7903 #:tests? #f)); no tests
7904 (inputs
7905 `(("framework" ,java-osgi-framework)
7906 ("annotation" ,java-osgi-annotation)))
c353d014 7907 (home-page "https://www.osgi.org")
1884bb81
JL
7908 (synopsis "Bundle tracking")
7909 (description
7910 "OSGi, for Open Services Gateway initiative framework, is a module system
7911and service platform for the Java programming language. This package contains
7912bundle tracking utility classes.")
7913 (license license:asl2.0)))
fb9c48b8
JL
7914
7915(define-public java-osgi-service-cm
7916 (package
7917 (name "java-osgi-service-cm")
7918 (version "1.5.0")
7919 (source (origin
7920 (method url-fetch)
f8f2fefb 7921 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
fb9c48b8
JL
7922 "org.osgi.service.cm/"
7923 version "/org.osgi.service.cm-"
7924 version "-sources.jar"))
7925 (sha256
7926 (base32
7927 "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6"))))
7928 (build-system ant-build-system)
7929 (arguments
7930 `(#:jar-name "osgi-service-cm.jar"
7931 #:tests? #f)); no tests
7932 (inputs
7933 `(("framework" ,java-osgi-framework)
7934 ("annotation" ,java-osgi-annotation)))
c353d014 7935 (home-page "https://www.osgi.org")
fb9c48b8
JL
7936 (synopsis "OSGI Configuration Management")
7937 (description
7938 "OSGi, for Open Services Gateway initiative framework, is a module system
7939and service platform for the Java programming language. This package contains
7940utility classes for the configuration of services.")
7941 (license license:asl2.0)))
500aac75
JL
7942
7943(define-public java-osgi-service-packageadmin
7944 (package
7945 (name "java-osgi-service-packageadmin")
7946 (version "1.2.0")
7947 (source (origin
7948 (method url-fetch)
839e3e89 7949 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
500aac75
JL
7950 "org.osgi.service.packageadmin/"
7951 version "/org.osgi.service.packageadmin-"
7952 version "-sources.jar"))
7953 (sha256
7954 (base32
7955 "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52"))))
7956 (build-system ant-build-system)
7957 (arguments
7958 `(#:jar-name "osgi-service-packageadmin.jar"
7959 #:tests? #f)); no tests
7960 (inputs
7961 `(("framework" ,java-osgi-framework)))
c353d014 7962 (home-page "https://www.osgi.org")
500aac75
JL
7963 (synopsis "OSGI Package Administration")
7964 (description
7965 "OSGi, for Open Services Gateway initiative framework, is a module system
7966and service platform for the Java programming language. This package contains
7967the packageadmin service.")
7968 (license license:asl2.0)))
77a4f1ae
JL
7969
7970(define-public java-ops4j-base-lang
7971 (package
7972 (name "java-ops4j-base-lang")
7973 (version "1.5.0")
7974 (source (origin
7975 (method url-fetch)
7976 (uri (string-append "https://github.com/ops4j/org.ops4j.base/"
7977 "archive/base-" version ".tar.gz"))
7978 (sha256
7979 (base32
7980 "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw"))))
7981 (build-system ant-build-system)
7982 (arguments
7983 `(#:jar-name "java-ops4j-base-lang.jar"
7984 #:source-dir "ops4j-base-lang/src/main/java"
7985 #:tests? #f; no tests
7986 #:phases
7987 (modify-phases %standard-phases
7988 (add-before 'build 'add-test-file
7989 (lambda _
7990 ;; That file is required by a test in ops4j-pax-exam-core-spi
7991 (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang")
7992 (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties"
7993 (lambda _
7994 (display
7995 (string-append
7996 "version=" ,version "\n"
7997 "groupId=org.ops4j.base"
2c8ac364
MW
7998 "artifactId=ops4j-base-lang\n"))))
7999 #t)))))
77a4f1ae
JL
8000 (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview")
8001 (synopsis "Utility classes and extensions to be used in OPS4J projects")
8002 (description "OPS4J stands for Open Participation Software for Java. This
8003package contains utilities and extensions related to @code{java.lang}.")
8004 (license license:asl2.0)))
b2353495
JL
8005
8006(define-public java-ops4j-base-monitors
8007 (package
8008 (inherit java-ops4j-base-lang)
8009 (name "java-ops4j-base-monitors")
8010 (arguments
8011 `(#:jar-name "java-ops4j-base-monitors.jar"
8012 #:source-dir "ops4j-base-monitors/src/main/java"
8013 #:tests? #f)); no tests
8014 (inputs
8015 `(("lang" ,java-ops4j-base-lang)))
8016 (description "OPS4J stands for Open Participation Software for Java. This
8017package contains utilities and extensions related to monitoring.")))
322d349a
JL
8018
8019(define-public java-ops4j-base-io
8020 (package
8021 (inherit java-ops4j-base-lang)
8022 (name "java-ops4j-base-io")
8023 (arguments
8024 `(#:jar-name "java-ops4j-base-io.jar"
8025 #:source-dir "ops4j-base-io/src/main/java"
8026 #:test-dir "ops4j-base-io/src/test"
8027 #:test-exclude
8028 (list "**/ListerTest.java")))
8029 (inputs
8030 `(("lang" ,java-ops4j-base-monitors)
8031 ("lang" ,java-ops4j-base-lang)))
8032 (native-inputs
8033 `(("junit" ,java-junit)
8034 ("hamcrest" ,java-hamcrest-core)))
8035 (description "OPS4J stands for Open Participation Software for Java. This
8036package contains utilities and extensions related to handling streams and files.")))
559919c1
JL
8037
8038(define-public java-ops4j-base-util
8039 (package
8040 (inherit java-ops4j-base-lang)
8041 (name "java-ops4j-base-util")
8042 (arguments
8043 `(#:jar-name "java-ops4j-base-util.jar"
8044 #:source-dir "ops4j-base-util/src/main/java"
8045 #:test-dir "ops4j-base-util/src/test"))
8046 (inputs
8047 `(("lang" ,java-ops4j-base-lang)))
8048 (native-inputs
8049 `(("junit" ,java-junit)))
8050 (description "OPS4J stands for Open Participation Software for Java. This
8051package contains utilities and extensions related to environment, i18n and
8052mime types.")))
60dcec7a
JL
8053
8054(define-public java-ops4j-base-util-property
8055 (package
8056 (inherit java-ops4j-base-lang)
8057 (name "java-ops4j-base-util-property")
8058 (arguments
8059 `(#:jar-name "java-ops4j-base-util-property.jar"
8060 #:source-dir "ops4j-base-util-property/src/main/java"
8061 #:tests? #f)); no tests
8062 (inputs
8063 `(("lang" ,java-ops4j-base-lang)
8064 ("util" ,java-ops4j-base-util)))
8065 (description "OPS4J stands for Open Participation Software for Java. This
8066package contains utilities and extensions related to resolving properties from
8067different sources.")))
0edf8cf0
JL
8068
8069(define-public java-ops4j-base-store
8070 (package
8071 (inherit java-ops4j-base-lang)
8072 (name "java-ops4j-base-store")
8073 (arguments
8074 `(#:jar-name "java-ops4j-base-store.jar"
8075 #:source-dir "ops4j-base-store/src/main/java"
8076 #:tests? #f)); no tests
8077 (inputs
8078 `(("lang" ,java-ops4j-base-lang)
8079 ("slf4j" ,java-slf4j-api)
8080 ("io" ,java-ops4j-base-io)))
8081 (description "OPS4J stands for Open Participation Software for Java. This
8082package contains utilities for storing and retrieving data from an
8083@code{InputStream}.")))
214fcd8a
JL
8084
8085(define-public java-ops4j-base-spi
8086 (package
8087 (inherit java-ops4j-base-lang)
8088 (name "java-ops4j-base-spi")
8089 (arguments
8090 `(#:jar-name "java-ops4j-base-spi.jar"
8091 #:source-dir "ops4j-base-spi/src/main/java"
8092 #:test-dir "ops4j-base-spi/src/test"))
8093 (native-inputs
8094 `(("junit" ,java-junit)
8095 ("hamcrest" ,java-hamcrest-core)))
8096 (description "OPS4J stands for Open Participation Software for Java. This
8097package contains utilities for obtaining services via the Java SE 6
8098@code{ServiceLoader}.")))
e1edf42e
JL
8099
8100(define-public java-aqute-bnd-annotation
8101 (package
8102 (name "java-aqute-bnd-annotation")
2cac8891 8103 (version "3.5.0")
e1edf42e
JL
8104 (source (origin
8105 (method url-fetch)
8106 (uri (string-append "https://github.com/bndtools/bnd/archive/"
8107 version ".REL.tar.gz"))
8108 (file-name (string-append name "-" version ".tar.gz"))
8109 (sha256
8110 (base32
2cac8891 8111 "1ggyiq0as0f6cz333a0dh98j72kmvv5pf2s47v9554yh905lfqdl"))))
e1edf42e
JL
8112 (build-system ant-build-system)
8113 (arguments
8114 `(#:jar-name "java-aqute-bnd-annotation.jar"
8115 #:source-dir "biz.aQute.bnd.annotation/src"
8116 #:tests? #f)); empty test dir
27c0eade 8117 (home-page "https://bnd.bndtools.org/")
e1edf42e
JL
8118 (synopsis "Tools for OSGi")
8119 (description "Bnd is a swiss army knife for OSGi, it creates manifest
8120headers based on analyzing the class code, it verifies the project settings,
8121it manages project dependencies, gives diffs jars, and much more.")
8122 (license license:asl2.0)))
60ba2978
JL
8123
8124(define-public java-aqute-libg
8125 (package
8126 (inherit java-aqute-bnd-annotation)
8127 (name "java-aqute-libg")
8128 (arguments
8129 `(#:jar-name "java-aqute-libg.jar"
78754995
GB
8130 ;; The build fails when source/target more recent than 1.7. This
8131 ;; is a known issue. See: https://github.com/bndtools/bnd/issues/1327
8132 ;;
8133 ;; It is closed as won't fix. There is no way to change the source
8134 ;; so that it works on 1.8, and still works on 1.6, the upstream
8135 ;; target. It work fine on 1.7, so we use 1.7.
8136 #:make-flags (list "-Dant.build.javac.source=1.7"
8137 "-Dant.build.javac.target=1.7")
2ab089b7
GB
8138 #:phases
8139 (modify-phases %standard-phases
8140 (add-before 'configure 'chdir
8141 ;; Change to aQute.libg directory, so that the relative
8142 ;; paths in the tests aren't broken.
8143 (lambda _
8144 (chdir "aQute.libg")
8145 #t))
8146 (add-before 'check 'create-test-directory
8147 ;; Copy the test directory to test/java, since that's where
8148 ;; ant-build-system's default project in build.xml expects to find
8149 ;; the test classes. Leave a copy in the original place to not
8150 ;; break paths in tests.
8151 (lambda _
8152 (mkdir "src/test")
8153 (copy-recursively "test" "src/test/java")
8154 #t)))))
60ba2978
JL
8155 (inputs
8156 `(("slf4j" ,java-slf4j-api)
8157 ("osgi-annot" ,java-osgi-annotation)
8158 ("java-osgi-cmpn" ,java-osgi-cmpn)
2ab089b7
GB
8159 ("osgi" ,java-osgi-core)))
8160 (native-inputs
8161 `(("hamcrest" ,java-hamcrest-core)
8162 ("java-junit" ,java-junit)))))
5f26a131 8163
288a5959
GB
8164(define java-aqute-libg-bootstrap
8165 (package
8166 (inherit java-aqute-libg)
8167 (name "java-aqute-libg-bootstrap")
aca7dcdd
GB
8168 (arguments
8169 ;; Disable tests, at this stage of bootstrap we have no test frameworks.
3785ccd2
GB
8170 (substitute-keyword-arguments (package-arguments java-aqute-libg)
8171 ((#:tests? _ #f) #f)))
288a5959
GB
8172 (inputs
8173 `(("slf4j-bootstrap" ,java-slf4j-api-bootstrap)
8174 ,@(delete `("slf4j" ,java-slf4j-api)
aca7dcdd
GB
8175 (package-inputs java-aqute-libg))))
8176 (native-inputs '())))
288a5959 8177
5f26a131
JL
8178(define-public java-aqute-bndlib
8179 (package
8180 (inherit java-aqute-bnd-annotation)
8181 (name "java-aqute-bndlib")
8182 (arguments
8183 `(#:jar-name "java-bndlib.jar"
8184 #:source-dir "biz.aQute.bndlib/src"
8185 #:tests? #f)); no tests
8186 (inputs
8187 `(("slf4j" ,java-slf4j-api)
8188 ("osgi-annot" ,java-osgi-annotation)
8189 ("java-aqute-libg" ,java-aqute-libg)
8190 ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation)
8191 ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations)
8192 ("java-osgi-service-repository" ,java-osgi-service-repository)
8193 ("java-osgi-service-log" ,java-osgi-service-log)
8194 ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations)
8195 ("java-osgi-namespace-contract" ,java-osgi-namespace-contract)
8196 ("java-osgi-namespace-extender" ,java-osgi-namespace-extender)
8197 ("java-osgi-namespace-service" ,java-osgi-namespace-service)
8198 ("promise" ,java-osgi-util-promise)
8199 ("osgi" ,java-osgi-core)))))
25aef81d 8200
869803aa
GB
8201(define java-aqute-bndlib-bootstrap
8202 (package
8203 (inherit java-aqute-bndlib)
8204 (name "java-aqute-bndlib-bootstrap")
8205 (inputs
8206 `(("slf4j-bootstrap" ,java-slf4j-api-bootstrap)
8207 ("java-aqute-libg-bootstrap" ,java-aqute-libg-bootstrap)
8208 ,@(delete `("slf4j" ,java-slf4j-api)
8209 (delete `("java-aqute-libg" ,java-aqute-libg)
8210 (package-inputs java-aqute-bndlib)))))))
8211
25aef81d
JL
8212(define-public java-ops4j-pax-tinybundles
8213 (package
8214 (name "java-ops4j-pax-tinybundles")
8215 (version "2.1.1")
8216 (source (origin
8217 (method url-fetch)
8218 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/"
8219 "archive/tinybundles-" version ".tar.gz"))
8220 (sha256
8221 (base32
8222 "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871"))))
8223 (arguments
8224 `(#:jar-name "java-ops4j-pax-tinybundles.jar"
8225 #:source-dir "src/main/java"
8226 #:test-exclude
8227 ;; Abstract base classes for other tests
8228 (list "**/BndTest.java" "**/CoreTest.java")
8229 #:phases
8230 (modify-phases %standard-phases
8231 (add-before 'check 'fix-version
8232 (lambda _
8233 ;; This test has a reference to an old version of bndlib we are not
8234 ;; packaging. It uses the version referenced in pom.xml. We replace
8235 ;; it with our own version.
8236 (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
0f277802 8237 (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*")
2c8ac364
MW
8238 ,(package-version java-aqute-bndlib)))
8239 #t)))))
25aef81d
JL
8240 (inputs
8241 `(("lang" ,java-ops4j-base-lang)
8242 ("io" ,java-ops4j-base-io)
8243 ("store" ,java-ops4j-base-store)
8244 ("slf4j" ,java-slf4j-api)
8245 ("libg" ,java-aqute-libg)
8246 ("bndlib" ,java-aqute-bndlib)))
8247 (native-inputs
8248 `(("junit" ,java-junit)
8249 ("hamcrest" ,java-hamcrest-core)
8250 ("log4j" ,java-log4j-api)
8251 ("bndannotation" ,java-aqute-bnd-annotation)
8252 ("framework" ,java-osgi-framework)))
8253 (build-system ant-build-system)
8254 (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles")
8255 (synopsis "Java APIs to create OSGi related artifacts")
8256 (description "Tinybundles is all about creating OSGi related artifacts like
6fa0914a 8257Bundles, Fragments and Deployment Packages with Java Api. It is very convenient
25aef81d
JL
8258to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the
8259other hand, this library can be a foundation of real end user tools that need
8260to create those artifacts.")
8261 (license license:asl2.0)))
e179add0
JL
8262
8263(define-public java-ops4j-pax-exam-core
8264 (package
8265 (name "java-ops4j-pax-exam-core")
8266 (version "4.11.0")
8267 (source (origin
8268 (method url-fetch)
8269 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/"
8270 "archive/exam-reactor-" version ".tar.gz"))
8271 (sha256
8272 (base32
8273 "08mzw8nkah3rj3vznlplnawspxhp61zgvb44ifqa1rni1cvbms2g"))))
8274 (arguments
8275 `(#:jar-name "java-ops4j-pax-exam-core.jar"
8276 #:source-dir "core/pax-exam/src/main/java"
8277 #:test-dir "core/pax-exam/src/test"))
8278 (inputs
8279 `(("slf4j" ,java-slf4j-api)
8280 ("lang" ,java-ops4j-base-lang)
8281 ("io" ,java-ops4j-base-io)
8282 ("util-property" ,java-ops4j-base-util-property)
8283 ("util-store" ,java-ops4j-base-store)
8284 ("java-osgi-core" ,java-osgi-core)))
8285 (native-inputs
8286 `(("junit" ,java-junit)
8287 ("hamcrest" ,java-hamcrest-core)))
8288 (build-system ant-build-system)
8289 (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview")
8290 (synopsis "In-Container Testing for OSGi, Java EE and CDI")
8291 (description "Pax Exam creates OSGi bundles for testing purposes. It lets
8292the user take control of the OSGi framework, the test framework (e.g. JUnit) and
8293the system under test at the same time.")
8294 (license license:asl2.0)))
7a7c2b75
JL
8295
8296(define-public java-ops4j-pax-exam-core-spi
8297 (package
8298 (inherit java-ops4j-pax-exam-core)
8299 (name "java-ops4j-pax-exam-core-spi")
8300 (arguments
8301 `(#:jar-name "java-ops4j-pax-exam-spi.jar"
8302 #:source-dir "src/main/java"
8303 #:test-exclude
8304 (list
8305 ;; Abstract base class, not a test
8306 "**/BaseStagedReactorTest.java"
8307 ;; Depends on org.mortbay.jetty.testwars:test-war-dump
8308 "**/WarBuilderTest.java")
8309 #:phases
8310 (modify-phases %standard-phases
8311 (add-before 'configure 'chdir
8312 (lambda _
8313 ;; Tests assume we are in this directory
2c8ac364
MW
8314 (chdir "core/pax-exam-spi")
8315 #t))
7a7c2b75
JL
8316 (add-before 'check 'fix-tests
8317 (lambda _
8318 ;; One test checks that this file is present.
8319 (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi")
8320 (with-output-to-file
8321 "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties"
8322 (lambda _
8323 (display
8324 (string-append "artifactId = pax-exam-spi\n"
8325 "version = " ,(package-version java-ops4j-pax-exam-core-spi)))))
8326 ;; Maven puts compilation results in the target directory, while we
8327 ;; put them in the build directory.
8328 (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java"
8329 "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java"
8330 "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java")
8331 (("target") "build"))
8332 ;; One test is expected to fail, but it doesn't throw the expected exception
8333 (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java"
2c8ac364
MW
8334 (("AssertionError") "IllegalArgumentException"))
8335 #t)))))
7a7c2b75
JL
8336 (inputs
8337 `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core)
8338 ("lang" ,java-ops4j-base-lang)
8339 ("monitors" ,java-ops4j-base-monitors)
8340 ("store" ,java-ops4j-base-store)
8341 ("io" ,java-ops4j-base-io)
8342 ("spi" ,java-ops4j-base-spi)
8343 ("osgi" ,java-osgi-core)
8344 ("slf4j" ,java-slf4j-api)
8345 ("tinybundles" ,java-ops4j-pax-tinybundles)))
8346 (native-inputs
8347 `(("mockito" ,java-mockito-1)
8348 ("junit" ,java-junit)
8349 ("hamcrest" ,java-hamcrest-core)
8350 ("cglib" ,java-cglib)
8351 ("objenesis" ,java-objenesis)
8352 ("asm" ,java-asm)))))
4496d77f
JL
8353
8354(define-public java-ops4j-pax-exam-core-junit
8355 (package
8356 (inherit java-ops4j-pax-exam-core)
8357 (name "java-ops4j-pax-exam-core-junit")
8358 (arguments
8359 `(#:jar-name "ops4j-pax-exam-core-junit.jar"
8360 #:source-dir "drivers/pax-exam-junit4/src/main/java"
8361 #:tests? #f)); no tests
8362 (inputs
8363 `(("junit" ,java-junit)
8364 ("slf4j" ,java-slf4j-api)
8365 ("core" ,java-ops4j-pax-exam-core)
8366 ("spi" ,java-ops4j-pax-exam-core-spi)))
8367 (native-inputs '())))
cb05f60d
JL
8368
8369(define-public java-fasterxml-jackson-annotations
8370 (package
8371 (name "java-fasterxml-jackson-annotations")
93dceea4 8372 (version "2.9.4")
cb05f60d
JL
8373 (source (origin
8374 (method url-fetch)
8375 (uri (string-append "https://github.com/FasterXML/"
8376 "jackson-annotations/archive/"
8377 "jackson-annotations-" version ".tar.gz"))
8378 (sha256
8379 (base32
93dceea4 8380 "0mr95xd0da6a4g95zvrl1ryk5n5zv2rc696w3xnsr5hxk2gicfc4"))))
cb05f60d
JL
8381 (build-system ant-build-system)
8382 (arguments
8383 `(#:jar-name "jackson-annotations.jar"
8384 #:source-dir "src/main/java"
8385 #:test-dir "src/test"))
8386 (native-inputs
8387 `(("junit" ,java-junit)))
8388 (home-page "https://github.com/FasterXML/jackson-annotations")
8389 (synopsis "General purpose annotations for the Jackson Data Processor")
8390 (description "This package contains general purpose annotations for the
8391Jackson Data Processor, used on value and handler types. The only annotations
8392not included are ones that require dependency to the Databind package.")
8393 (license license:asl2.0)))
0b5481df
JL
8394
8395(define-public java-fasterxml-jackson-core
8396 (package
8397 (name "java-fasterxml-jackson-core")
38a0fc38 8398 (version "2.9.4")
0b5481df
JL
8399 (source (origin
8400 (method url-fetch)
8401 (uri (string-append "https://github.com/FasterXML/"
8402 "jackson-core/archive/"
8403 "jackson-core-" version ".tar.gz"))
8404 (sha256
8405 (base32
38a0fc38 8406 "159hsnk17jr1gyzkf01cxvsn45srnk37g949r7364qlsr527gjgd"))))
0b5481df
JL
8407 (build-system ant-build-system)
8408 (arguments
8409 `(#:jar-name "jackson-core.jar"
8410 #:source-dir "src/main/java"
8411 #:test-dir "src/test"
8412 #:test-exclude
8413 (list
8414 ;; Expected failure. pom.xml excludes these
8415 "**/failing/**"
8416 ;; Base classes that have no constructor for junit
8417 "**/BaseTest.java"
8418 "**/ConcurrencyReadTest.java"
8419 "**/ManualCharAccessTest.java"
8420 "**/ManualCharAccessTest.java"
8421 "**/TrailingCommasTest.java"
8422 "**/AsyncMissingValuesInObjectTest.java"
8423 "**/AsyncMissingValuesInArrayTest.java")
8424 #:phases
8425 (modify-phases %standard-phases
8426 (add-before 'configure 'generate-PackageVersion.java
8427 (lambda _
8428 (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java")
8429 (in (string-append out ".in")))
8430 (copy-file in out)
8431 (substitute* out
8432 (("@package@") "com.fasterxml.jackson.core.json")
8433 (("@projectversion@") ,version)
8434 (("@projectgroupid@") "com.fasterxml.jackson.core")
2c8ac364
MW
8435 (("@projectartifactid@") "jackson-core")))
8436 #t))
0b5481df
JL
8437 (add-before 'build 'copy-resources
8438 (lambda _
8439 (copy-recursively "src/main/resources"
2c8ac364
MW
8440 "build/classes")
8441 #t))
0b5481df
JL
8442 (add-before 'check 'copy-test-resources
8443 (lambda _
8444 (copy-recursively "src/test/resources"
2c8ac364
MW
8445 "build/test-classes")
8446 #t)))))
0b5481df
JL
8447 (native-inputs
8448 `(("junit" ,java-junit)
8449 ("hamcrest" ,java-hamcrest-core)))
8450 (home-page "https://github.com/FasterXML/jackson-core")
8451 (synopsis "")
8452 (description "")
8453 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
f234c7a0
JL
8454
8455(define-public java-fasterxml-jackson-databind
8456 (package
8457 (name "java-fasterxml-jackson-databind")
3c1edff5 8458 (version "2.9.4")
f234c7a0
JL
8459 (source (origin
8460 (method url-fetch)
8461 (uri (string-append "https://github.com/FasterXML/"
8462 "jackson-databind/archive/"
8463 "jackson-databind-" version ".tar.gz"))
8464 (sha256
8465 (base32
3c1edff5 8466 "1zd2cw4z6kdkbx8za96xh9pyicv2a2l7y0rkcx2fqd8hv6d47s08"))))
f234c7a0
JL
8467 (build-system ant-build-system)
8468 (arguments
8469 `(#:jar-name "jackson-databind.jar"
8470 #:source-dir "src/main/java"
8471 #:tests? #f; requires javax.measures for which I can't find a free implementation
8472 #:phases
8473 (modify-phases %standard-phases
8474 (add-before 'configure 'generate-PackageVersion.java
8475 (lambda _
8476 (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java")
8477 (in (string-append out ".in")))
8478 (copy-file in out)
8479 (substitute* out
8480 (("@package@") "com.fasterxml.jackson.databind.cfg")
8481 (("@projectversion@") ,version)
8482 (("@projectgroupid@") "com.fasterxml.jackson.databind")
2c8ac364
MW
8483 (("@projectartifactid@") "jackson-databind")))
8484 #t))
f234c7a0
JL
8485 (add-before 'build 'copy-resources
8486 (lambda _
2c8ac364
MW
8487 (copy-recursively "src/main/resources" "build/classes")
8488 #t)))))
f234c7a0
JL
8489 (inputs
8490 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
8491 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)))
8492 (home-page "https://github.com/FasterXML/jackson-databind")
8493 (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor")
8494 (description "This package contains the general-purpose data-binding
8495functionality and tree-model for Jackson Data Processor. It builds on core
8496streaming parser/generator package, and uses Jackson Annotations for
8497configuration.")
8498 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
d57d8b89
JL
8499
8500(define-public java-fasterxml-jackson-modules-base-jaxb
8501 (package
8502 (name "java-fasterxml-jackson-modules-base-jaxb")
07207211 8503 (version "2.9.4")
d57d8b89
JL
8504 (source (origin
8505 (method url-fetch)
8506 (uri (string-append "https://github.com/FasterXML/"
8507 "jackson-modules-base/archive/"
8508 "jackson-modules-base-" version ".tar.gz"))
8509 (sha256
8510 (base32
07207211 8511 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
d57d8b89
JL
8512 (build-system ant-build-system)
8513 (arguments
8514 `(#:jar-name "jackson-modules-base-jaxb.jar"
8515 #:source-dir "jaxb/src/main/java"
8516 #:test-dir "jaxb/src/test"
8517 #:test-exclude
8518 ;; Base class for tests
8519 (list "**/BaseJaxbTest.java")
8520 #:phases
8521 (modify-phases %standard-phases
8522 (add-before 'configure 'generate-PackageVersion.java
8523 (lambda _
8524 (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/"
8525 "jackson/module/jaxb/PackageVersion.java"))
8526 (in (string-append out ".in")))
8527 (copy-file in out)
8528 (substitute* out
8529 (("@package@") "com.fasterxml.jackson.module.jaxb")
8530 (("@projectversion@") ,version)
8531 (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb")
2c8ac364
MW
8532 (("@projectartifactid@") "jackson-module-jaxb")))
8533 #t))
d57d8b89
JL
8534 (add-before 'build 'copy-resources
8535 (lambda _
2c8ac364
MW
8536 (copy-recursively "jaxb/src/main/resources" "build/classes")
8537 #t)))))
d57d8b89
JL
8538 (inputs
8539 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
8540 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
8541 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
8542 (native-inputs
8543 `(("java-junit" ,java-junit)))
8544 (home-page "https://github.com/FasterXML/jackson-modules-base")
8545 (synopsis "Jaxb annotations jackson module")
8546 (description "This package is the jaxb annotations module for jackson.")
8547 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
0f296d37 8548
5165fb40
DM
8549(define-public java-fasterxml-jackson-modules-base-mrbean
8550 (package
8551 (name "java-fasterxml-jackson-modules-base-mrbean")
8552 (version "2.9.4")
8553 (source (origin
8554 (method url-fetch)
8555 (uri (string-append "https://github.com/FasterXML/"
8556 "jackson-modules-base/archive/"
8557 "jackson-modules-base-" version ".tar.gz"))
8558 (sha256
8559 (base32
8560 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
8561 (build-system ant-build-system)
8562 (arguments
8563 `(#:jar-name "jackson-modules-base-mrbean.jar"
8564 #:source-dir "mrbean/src/main/java"
8565 #:test-dir "mrbean/src/test"
8566 #:test-exclude
8567 ;; Base class for tests
8568 (list "**/BaseTest.java")
8569 #:phases
8570 (modify-phases %standard-phases
8571 (add-before 'configure 'generate-PackageVersion.java
8572 (lambda _
8573 (let* ((out (string-append "mrbean/src/main/java/com/fasterxml/"
8574 "jackson/module/mrbean/PackageVersion.java"))
8575 (in (string-append out ".in")))
8576 (copy-file in out)
8577 (substitute* out
8578 (("@package@") "com.fasterxml.jackson.module.mrbean")
8579 (("@projectversion@") ,version)
8580 (("@projectgroupid@") "com.fasterxml.jackson.module.mrbean")
8581 (("@projectartifactid@") "jackson-module-mrbean")))
8582 #t)))))
8583 (inputs
8584 `(("java-asm" ,java-asm)
8585 ("java-fasterxml-jackson-annotations"
8586 ,java-fasterxml-jackson-annotations)
8587 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
8588 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
8589 (native-inputs
8590 `(("java-junit" ,java-junit)))
8591 (home-page "https://github.com/FasterXML/jackson-modules-base")
8592 (synopsis "POJO type materialization for Java")
8593 (description "This package implements POJO type materialization.
8594Databinders can construct implementation classes for Java interfaces as part
8595of deserialization.")
8596 (license license:asl2.0)))
8597
0f296d37
JL
8598(define-public java-snakeyaml
8599 (package
8600 (name "java-snakeyaml")
8601 (version "1.18")
8602 (source (origin
8603 (method url-fetch)
8604 (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
8605 version ".tar.gz"))
307856cd 8606 (file-name (string-append name "-" version ".tar.gz"))
0f296d37
JL
8607 (sha256
8608 (base32
b19f155c 8609 "0474cqcv46zgv9bhms2vgawakq1vyj0hp3h3f1bfys46msia90bh"))))
0f296d37
JL
8610 (build-system ant-build-system)
8611 (arguments
8612 `(#:jar-name "java-snakeyaml.jar"
8613 #:source-dir "src/main/java"
8614 ;; Tests require velocity, a cyclic dependency, and
8615 ;; java-spring-framework-context which is not packaged.
8616 #:tests? #f))
8617 (home-page "https://bitbucket.org/asomov/snakeyaml")
8618 (synopsis "YAML processor")
8619 (description "SnakeYAML is a YAML processor for the Java Virtual Machine.")
8620 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
087c8fd2
JL
8621
8622(define-public java-fasterxml-jackson-dataformat-yaml
8623 (package
8624 (name "java-fasterxml-jackson-dataformat-yaml")
1f2be88f 8625 (version "2.9.4")
087c8fd2
JL
8626 (source (origin
8627 (method url-fetch)
8628 (uri (string-append "https://github.com/FasterXML/"
8629 "jackson-dataformats-text/archive/"
8630 "jackson-dataformats-text-" version ".tar.gz"))
8631 (sha256
8632 (base32
1f2be88f 8633 "1hikl06khaxbg439avf442qifcadap8w0lx13f0nnhp2vh3dkbz7"))))
087c8fd2
JL
8634 (build-system ant-build-system)
8635 (arguments
8636 `(#:jar-name "jackson-dataformat-yaml.jar"
8637 #:source-dir "yaml/src/main/java"
8638 #:test-dir "yaml/src/test"
8639 #:test-exclude (list "**/failing/**.java")
8640 #:phases
8641 (modify-phases %standard-phases
8642 (add-before 'configure 'generate-PackageVersion.java
8643 (lambda _
8644 (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java")
8645 (in (string-append out ".in")))
8646 (copy-file in out)
8647 (substitute* out
8648 (("@package@") "com.fasterxml.jackson.dataformat.yaml")
8649 (("@projectversion@") ,version)
8650 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml")
2c8ac364
MW
8651 (("@projectartifactid@") "jackson-dataformat-yaml")))
8652 #t)))))
087c8fd2
JL
8653 (inputs
8654 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
8655 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
8656 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
8657 ("java-snakeyaml" ,java-snakeyaml)))
8658 (native-inputs
8659 `(("junit" ,java-junit)
8660 ("hamcrest" ,java-hamcrest-core)
8661 ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi)
8662 ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit)
8663 ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core)))
8664 (home-page "https://github.com/FasterXML/jackson-dataformats-text")
8665 (synopsis "Yaml backend for Jackson")
8666 (description "Dataformat backends are used to support format alternatives
8667to JSON, supported by default. This is done by sub-classing Jackson core
8668abstractions.")
8669 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
6fd07b98
JL
8670
8671(define-public java-stax2-api
8672 (package
8673 (name "java-stax2-api")
8674 (version "4.0.0")
8675 (source (origin
8676 (method url-fetch)
8677 (uri (string-append "https://github.com/FasterXML/stax2-api/archive/"
8678 "stax2-api-" version ".tar.gz"))
8679 (sha256
8680 (base32
8681 "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq"))))
8682 (build-system ant-build-system)
8683 (arguments
8684 `(#:jar-name "java-stax2-api.jar"
8685 #:source-dir "src/main/java"
8686 #:tests? #f)); no tests
8687 (home-page "https://github.com/FasterXML/stax2-api")
8688 (synopsis "Stax2 API")
8689 (description "Stax2 API is an extension to basic Stax 1.0 API that adds
8690significant new functionalities, such as full-featured bi-direction validation
8691interface and high-performance Typed Access API.")
8692 (license license:bsd-2)))
40f193f3
JL
8693
8694(define-public java-woodstox-core
8695 (package
8696 (name "java-woodstox-core")
8697 (version "5.0.3")
8698 (source (origin
8699 (method url-fetch)
8700 (uri (string-append "https://github.com/FasterXML/woodstox/archive/"
8701 "woodstox-core-" version ".tar.gz"))
8702 (sha256
8703 (base32
8704 "1i7pdgb8jbw6gdy5kmm0l6rz109n2ns92pqalpyp24vb8vlvdfd4"))))
8705 (build-system ant-build-system)
8706 (arguments
8707 `(#:jar-name "woodstox.jar"
8708 #:test-exclude
8709 (list "**/Base*.java" "failing/**")
8710 #:phases
8711 (modify-phases %standard-phases
8712 (add-before 'build 'remove-msv-dep
8713 (lambda _
8714 ;; we don't need osgi, and it depends on msv
8715 (delete-file-recursively "src/main/java/com/ctc/wstx/osgi")
8716 ;; msv's latest release is from 2011 and we don't need it
8717 (delete-file-recursively "src/main/java/com/ctc/wstx/msv")
8718 (delete-file-recursively "src/test/java/wstxtest/osgi")
2c8ac364
MW
8719 (delete-file-recursively "src/test/java/wstxtest/msv")
8720 #t))
40f193f3
JL
8721 (add-before 'build 'copy-resources
8722 (lambda _
2c8ac364
MW
8723 (copy-recursively "src/main/resources" "build/classes")
8724 #t)))))
40f193f3
JL
8725 (inputs
8726 `(("stax2" ,java-stax2-api)))
8727 (native-inputs
8728 `(("junit" ,java-junit)))
8729 (home-page "https://github.com/FasterXML/woodstox")
8730 (synopsis "Stax XML API implementation")
8731 (description "Woodstox is a stax XML API implementation.")
8732 (license license:asl2.0)))
262a4d33
JL
8733
8734(define-public java-fasterxml-jackson-dataformat-xml
8735 (package
8736 (name "java-fasterxml-jackson-dataformat-xml")
f3bbe029 8737 (version "2.9.4")
262a4d33
JL
8738 (source (origin
8739 (method url-fetch)
8740 (uri (string-append "https://github.com/FasterXML/"
8741 "jackson-dataformat-xml/archive/"
8742 "jackson-dataformat-xml-" version ".tar.gz"))
8743 (sha256
8744 (base32
f3bbe029 8745 "111fkkl90w31jbf30kgj82qdcxlw4sxppki7i198liw0ck1jcavq"))))
262a4d33
JL
8746 (build-system ant-build-system)
8747 (arguments
8748 `(#:jar-name "jackson-dataformat-xml.jar"
8749 #:source-dir "src/main/java"
8750 #:test-exclude
8751 (list "**/failing/**")
8752 #:phases
8753 (modify-phases %standard-phases
8754 (add-before 'configure 'generate-PackageVersion.java
8755 (lambda _
8756 (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java")
8757 (in (string-append out ".in")))
8758 (copy-file in out)
8759 (newline)
8760 (substitute* out
8761 (("@package@") "com.fasterxml.jackson.dataformat.xml")
8762 (("@projectversion@") ,version)
8763 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml")
2c8ac364
MW
8764 (("@projectartifactid@") "jackson-dataformat-xml")))
8765 #t))
262a4d33
JL
8766 (add-before 'build 'copy-resources
8767 (lambda _
2c8ac364
MW
8768 (copy-recursively "src/main/resources" "build/classes")
8769 #t)))))
262a4d33
JL
8770 (inputs
8771 `(("jackson-annotations" ,java-fasterxml-jackson-annotations)
8772 ("jackson-core" ,java-fasterxml-jackson-core)
8773 ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb)
8774 ("jackson-databind" ,java-fasterxml-jackson-databind)
8775 ("stax2-api" ,java-stax2-api)
8776 ("woodstox" ,java-woodstox-core)))
8777 (native-inputs
8778 `(("junit" ,java-junit)
8779 ("hamcrest" ,java-hamcrest-core)))
8780 (home-page "https://github.com/FasterXML/jackson-dataformat-xml")
8781 (synopsis "Read and write XML")
8782 (description "This package contains Jackson extension component for reading
8783and writing XML encoded data.
8784
8785Further, the goal is to emulate how JAXB data-binding works with \"Code-first\"
8786approach (that is, no support is added for \"Schema-first\" approach). Support
8787for JAXB annotations is provided by JAXB annotation module; this module
8788provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator},
8789@code{JsonFactory}) as well as small number of higher level overrides needed to
8790make data-binding work.")
8791 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
90a127c7
JL
8792
8793(define-public java-hdrhistogram
8794 (package
8795 (name "java-hdrhistogram")
8796 (version "2.1.9")
8797 (source (origin
8798 (method url-fetch)
8799 (uri (string-append "https://github.com/HdrHistogram/HdrHistogram/"
8800 "archive/HdrHistogram-" version ".tar.gz"))
8801 (sha256
8802 (base32
8803 "1sicbmc3sr42nw93qbkb26q9rn33ag33k6k77phjc3j5h5gjffqv"))))
8804 (build-system ant-build-system)
8805 (arguments
8806 `(#:jar-name "java-hdrhistogram.jar"
8807 #:source-dir "src/main/java"
8808 #:phases
8809 (modify-phases %standard-phases
8810 (add-before 'configure 'set-version
8811 (lambda _
8812 (let* ((version-java "src/main/java/org/HdrHistogram/Version.java")
8813 (template (string-append version-java ".template")))
8814 (copy-file template version-java)
8815 (substitute* version-java
8816 (("\\$VERSION\\$") ,version)
8817 (("\\$BUILD_TIME\\$") "0"))
8818 #t))))))
8819 (native-inputs
8820 `(("junit" ,java-junit)
8821 ("hamcrest" ,java-hamcrest-core)))
8822 (home-page "https://hdrhistogram.github.io/HdrHistogram")
8823 (synopsis "High dynamic range histogram")
61fa3c67 8824 (description "Hdrhistogram creates histograms that support
90a127c7
JL
8825recording and analyzing sampled data value counts across a configurable integer
8826value range with configurable value precision within the range. Value precision
8827is expressed as the number of significant digits in the value recording, and
8828provides control over value quantization behavior across the value range and
8829the subsequent value resolution at any given level.")
8830 (license license:public-domain)))
5d104a27 8831
c5ff11dc
RW
8832(define-public java-cofoja
8833 (package
8834 (name "java-cofoja")
8835 (version "1.3")
8836 (source (origin
8837 (method git-fetch)
8838 (uri (git-reference
8839 (url "https://github.com/nhatminhle/cofoja.git")
8840 (commit (string-append "v" version))))
8841 (file-name (string-append "java-cofoja-" version "-checkout"))
8842 (sha256
8843 (base32
8844 "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w"))))
8845 (build-system ant-build-system)
8846 (arguments
8847 `(#:build-target "dist"
8848 #:test-target "test"
8849 #:jdk ,icedtea-8
8850 #:make-flags
8851 (list "-Ddist.dir=dist")
8852 #:modules ((guix build ant-build-system)
8853 (guix build java-utils)
8854 (guix build utils)
8855 (srfi srfi-1)
8856 (ice-9 match))
8857 #:phases
8858 (modify-phases %standard-phases
8859 ;; The bulid system ignores the class path the ant-build-system sets
8860 ;; up and instead expects to find all dependencies in the "lib"
8861 ;; directory.
8862 (add-after 'unpack 'create-libdir
8863 (lambda* (#:key inputs #:allow-other-keys)
8864 (mkdir-p "lib")
8865 (for-each
8866 (lambda (file)
8867 (let ((target (string-append "lib/" (basename file))))
8868 (unless (file-exists? target)
8869 (symlink file target))))
8870 (append-map (match-lambda
8871 ((label . dir)
8872 (find-files dir "\\.jar$")))
8873 inputs))
8874 #t))
8875 (replace 'install (install-jars "dist")))))
8876 (inputs
8877 `(("java-asm" ,java-asm)))
8878 (native-inputs
8879 `(("java-junit" ,java-junit)))
8880 (home-page "https://github.com/nhatminhle/cofoja")
8881 (synopsis "Contracts for Java")
8882 (description "Contracts for Java, or Cofoja for short, is a contract
8883programming framework and test tool for Java, which uses annotation processing
8884and bytecode instrumentation to provide run-time checking. (In particular,
8885this is not a static analysis tool.)")
8886 (license license:lgpl3+)))
8887
5d104a27
JL
8888(define-public java-aopalliance
8889 (package
8890 (name "java-aopalliance")
8891 (version "1.0")
8892 (source (origin
8893 (method git-fetch)
8894 ;; Note: this git repository is not official, but contains the
8895 ;; source code that is in the CVS repository. Downloading the
8896 ;; tarball from sourceforge is undeterministic, and the cvs download
8897 ;; fails.
8898 (uri (git-reference
8899 (url "https://github.com/hoverruan/aopalliance")
8900 (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0")))
8901 (file-name (string-append name "-" version))
8902 (sha256
8903 (base32
8904 "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr"))))
8905 (build-system ant-build-system)
8906 (arguments
8907 `(#:jar-name "java-aopalliance.jar"
8908 #:jdk ,icedtea-8
8909 #:tests? #f; no tests
8910 #:source-dir "aopalliance/src/main"))
8911 (home-page "http://aopalliance.sourceforge.net")
8912 (synopsis "Aspect-Oriented Programming")
8913 (description "The AOP Alliance project is a joint project between several
8914software engineering people who are interested in Aspect-Oriented Programming
8915(AOP) and Java.")
8916 (license license:public-domain)))
454536e0
JL
8917
8918(define-public java-javax-inject
8919 (package
8920 (name "java-javax-inject")
8921 (version "tck-1")
8922 (source (origin
8923 (method url-fetch)
8924 (uri (string-append "https://github.com/javax-inject/javax-inject/"
8925 "archive/javax.inject-" version ".tar.gz"))
8926 (sha256
8927 (base32
8928 "1ydrlvh2r7vr1g7lhjwy3w2dggpj9h6pix1lakkkgdywb365n6g0"))))
8929 (build-system ant-build-system)
8930 (arguments
8931 `(#:jar-name "java-javax-inject.jar"
8932 #:jdk ,icedtea-8
8933 #:tests? #f)); no tests
8934 (home-page "http://github.com/javax-inject/javax-inject")
8935 (synopsis "JSR-330: Dependency Injection for Java")
8936 (description "This package specifies a means for obtaining objects in such
8937a way as to maximize reusability, testability and maintainability compared to
8938traditional approaches such as constructors, factories, and service locators
8939(e.g., JNDI). This process, known as dependency injection, is beneficial to
8940most nontrivial applications.
8941
8942Many types depend on other types. For example, a @var{Stopwatch} might depend
8943on a @var{TimeSource}. The types on which a type depends are known as its
8944dependencies. The process of finding an instance of a dependency to use at run
8945time is known as resolving the dependency. If no such instance can be found,
8946the dependency is said to be unsatisfied, and the application is broken.")
8947 (license license:asl2.0)))
5766984b
JL
8948
8949(define-public java-guice
8950 (package
8951 (name "java-guice")
8952 (version "4.1")
8953 (source (origin
8954 (method url-fetch)
8955 (uri (string-append "https://github.com/google/guice/archive/"
8956 version ".tar.gz"))
8957 (file-name (string-append name "-" version ".tar.gz"))
9936ffe7
BH
8958 (modules '((guix build utils)))
8959 (snippet
8960 `(begin
8961 (for-each delete-file (find-files "." ".*.jar"))))
5766984b
JL
8962 (sha256
8963 (base32
8964 "0dwmqjzlavb144ywqqglj3h68hqszkff8ai0a42hyb5il0qh4rbp"))))
8965 (build-system ant-build-system)
8966 (arguments
8967 `(#:jar-name "java-guice.jar"
8968 #:jdk ,icedtea-8
8969 #:tests? #f; FIXME: tests are not in a java sub directory
8970 #:source-dir "core/src"))
8971 (inputs
8972 `(("guava" ,java-guava)
8973 ("java-cglib" ,java-cglib)
8974 ("java-aopalliance" ,java-aopalliance)
8975 ("java-javax-inject" ,java-javax-inject)
8976 ("java-asm" ,java-asm)))
8977 (home-page "https://github.com/google/guice")
8978 (synopsis "Lightweight dependency injection framework")
8979 (description "Guice is a lightweight dependency injection framework fo
8980Java 6 and above.")
8981 (license license:asl2.0)))
ec4e8ad7
JL
8982
8983(define-public java-guice-servlet
8984 (package
8985 (inherit java-guice)
8986 (name "java-guice-servlet")
8987 (arguments
8988 `(#:jar-name "guice-servlet.jar"
8989 #:source-dir "extensions/servlet/src/"
8990 #:jdk ,icedtea-8
8991 #:tests? #f)); FIXME: not in a java subdir
8992 (inputs
8993 `(("guice" ,java-guice)
10eddaca 8994 ("servlet" ,java-classpathx-servletapi)
ec4e8ad7 8995 ,@(package-inputs java-guice)))))
b12fe1e5
JL
8996
8997(define-public java-assertj
8998 (package
8999 (name "java-assertj")
9000 (version "3.8.0")
9001 (source (origin
9002 (method url-fetch)
9003 (uri (string-append "https://github.com/joel-costigliola/"
9004 "assertj-core/archive/"
9005 "assertj-core-" version ".tar.gz"))
9006 (sha256
9007 (base32
9008 "1kf124fxskf548rklkg86294w2x6ajqrff94rrhyqns31danqkfz"))))
9009 (build-system ant-build-system)
9010 (arguments
9011 `(#:jar-name "java-assertj.jar"
9012 #:jdk ,icedtea-8
9013 #:source-dir "src/main/java"
9014 #:tests? #f)); depends on tng-junit which depends on assertj
9015 (inputs
9016 `(("cglib" ,java-cglib)
9017 ("junit" ,java-junit)
9018 ("hamcrest" ,java-hamcrest-core)))
9019 (native-inputs
9020 `(("mockito" ,java-mockito-1)))
9021 (home-page "https://joel-costigliola.github.io/assertj/index.html")
9022 (synopsis "Fluent assertions for java")
9023 (description "AssertJ core is a Java library that provides a fluent
9024interface for writing assertions. Its main goal is to improve test code
9025readability and make maintenance of tests easier.")
9026 (license license:asl2.0)))
6768e0a7
JL
9027
9028(define-public java-jboss-javassist
9029 (package
9030 (name "java-jboss-javassist")
9031 (version "3.21.0")
9032 (source (origin
9033 (method url-fetch)
9034 (uri (string-append "https://github.com/jboss-javassist/javassist/"
9035 "archive/rel_"
9036 (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)
9037 "_ga.tar.gz"))
9038 (sha256
9039 (base32
9040 "10lpcr3sbf7y6fq6fc2h2ik7rqrivwcy4747bg0kxhwszil3cfmf"))))
9041 (build-system ant-build-system)
9042 (arguments
9043 `(#:jar-name "java-jboss-javassist.jar"
9044 #:jdk ,icedtea-8
9045 #:source-dir "src/main"
9046 #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3
9047 #:phases
9048 (modify-phases %standard-phases
9049 (add-before 'configure 'remove-binary
9050 (lambda _
9051 (delete-file "javassist.jar")
9052 #t)))))
9053 (native-inputs
9054 `(("junit" ,java-junit)))
9055 (home-page "https://github.com/jboss-javassist/javassist")
9056 (synopsis "Java bytecode engineering toolkit")
9057 (description "Javassist (JAVA programming ASSISTant) makes Java bytecode
9058manipulation simple. It is a class library for editing bytecodes in Java; it
9059enables Java programs to define a new class at runtime and to modify a class
9060file when the JVM loads it.")
9061 (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl.
a6dd06d0
JL
9062
9063(define-public java-jcommander
9064 (package
9065 (name "java-jcommander")
9066 (version "1.71")
9067 (source (origin
9068 (method url-fetch)
9069 (uri (string-append "https://github.com/cbeust/jcommander/archive/"
9070 version ".tar.gz"))
9071 (file-name (string-append name "-" version ".tar.gz"))
9072 (sha256
9073 (base32
9074 "1f5k2ckay6qjc3d3w3d7bc0p3cx3c7n6p6zxvw1kibqdr0q98wlx"))))
9075 (build-system ant-build-system)
9076 (arguments
9077 `(#:jar-name "java-jcommander.jar"
9078 #:jdk ,icedtea-8
9079 #:tests? #f; requires testng which depends on jcommander
9080 #:source-dir "src/main/java"))
dcfdc908 9081 (home-page "https://jcommander.org")
a6dd06d0
JL
9082 (synopsis "Command line parameters parser")
9083 (description "JCommander is a very small Java framework that makes it
9084trivial to parse command line parameters. Parameters are declared with
9085annotations.")
9086 (license license:asl2.0)))
11bc385b
JL
9087
9088(define-public java-bsh
9089 (package
9090 (name "java-bsh")
9091 (version "2.0b6")
9092 (source (origin
9093 (method url-fetch)
9094 (uri (string-append "https://github.com/beanshell/beanshell/archive/"
9095 version ".tar.gz"))
9096 (file-name (string-append name "-" version ".tar.gz"))
9097 (sha256
9098 (base32
9099 "1bawkxk6jyc75hxvzkpz689h73cn3f222m0ar3nvb0dal2b85kfv"))))
9100 (build-system ant-build-system)
9101 (arguments
9102 `(#:build-target "jarall"
9103 #:test-target "junit-tests-all"
9104 #:phases
9105 (modify-phases %standard-phases
9106 (replace 'install
9107 (lambda* (#:key outputs #:allow-other-keys)
9108 (let ((share (string-append (assoc-ref outputs "out") "/share/java")))
9109 (mkdir-p share)
9110 (copy-file "dist/bsh-2.0b6.jar" (string-append share "/bsh-2.0b6.jar"))
9111 #t))))))
9112 (home-page "http://beanshell.org/")
9113 (synopsis "Lightweight Scripting for Java")
9114 (description "BeanShell is a small, free, embeddable Java source
9115interpreter with object scripting language features, written in Java.
9116BeanShell dynamically executes standard Java syntax and extends it with common
9117scripting conveniences such as loose types, commands, and method closures like
9118those in Perl and JavaScript.")
9119 (license license:asl2.0)))
7a343e97
JL
9120
9121(define-public java-fest-util
9122 (package
9123 (name "java-fest-util")
9124 (version "1.2.5")
9125 (source (origin
00f3190d
EF
9126 (method git-fetch)
9127 (uri (git-reference
9128 (url "https://github.com/alexruiz/fest-util/")
9129 (commit (string-append "fest-util-" version))))
9130 (file-name (git-file-name name version))
7a343e97
JL
9131 (sha256
9132 (base32
00f3190d 9133 "02kgal7v85snyyvcsxvn4qphid455f4smh2wri1il8d9asw0djbz"))))
7a343e97
JL
9134 (build-system ant-build-system)
9135 (arguments
9136 `(#:jar-name "java-fest-util.jar"
9137 #:source-dir "src/main/java"))
9138 (native-inputs
9139 `(("junit" ,java-junit)
9140 ("hamcrest" ,java-hamcrest-core)))
9141 (home-page "https://github.com/alexruiz/fest-util")
9142 (synopsis "FEST common utilities")
9143 (description "Common utilities used in all FEST module.")
9144 (license license:asl2.0)))
3c6c8358
JL
9145
9146(define-public java-fest-test
9147 (package
9148 (name "java-fest-test")
9149 (version "2.1.0")
9150 (source (origin
79e74008
EF
9151 (method git-fetch)
9152 (uri (git-reference
9153 (url "https://github.com/alexruiz/fest-test/")
9154 (commit (string-append "fest-test-" version))))
9155 (file-name (git-file-name name version))
3c6c8358
JL
9156 (sha256
9157 (base32
79e74008 9158 "0mg1d2jfh7kbx2c40dchbjr6d8pv59snsyb13mfxsr7xk5n69qbn"))))
3c6c8358
JL
9159 (build-system ant-build-system)
9160 (arguments
9161 `(#:jar-name "java-fest-test.jar"
9162 #:source-dir "src/main/java"
9163 #:tests? #f)); no tests
9164 (inputs
9165 `(("junit" ,java-junit)))
9166 (home-page "https://github.com/alexruiz/fest-test")
9167 (synopsis "Common FEST testing infrastructure")
9168 (description "Fest-test contains the common FEST testing infrastructure.")
9169 (license license:asl2.0)))
ca98e448
JL
9170
9171(define-public java-fest-assert
9172 (package
9173 (name "java-fest-assert")
9174 (version "2.0M10")
9175 (source (origin
e9917c69
EF
9176 (method git-fetch)
9177 (uri (git-reference
9178 (url "https://github.com/alexruiz/fest-assert-2.x/")
9179 (commit (string-append "fest-assert-core-" version))))
9180 (file-name (git-file-name name version))
ca98e448
JL
9181 (sha256
9182 (base32
e9917c69 9183 "1cp8zzyag3s85fz2w68sda9zzaal1y5f9wl8g72wkm12an40w6by"))))
ca98e448
JL
9184 (build-system ant-build-system)
9185 (arguments
9186 `(#:jar-name "java-fest-assert.jar"
9187 #:source-dir "src/main/java"
9188 #:test-exclude
9189 (list
9190 "**/Abstract*.java"
9191 "**/*BaseTest.java"
9192 ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses
9193 "**/MessageFormatter_format_Test.java"
9194 "**/internal/*/*_assert*_Test.java")))
9195 (inputs
9196 `(("java-fest-util" ,java-fest-util)))
9197 (native-inputs
9198 `(("java-junit" ,java-junit)
9199 ("java-fest-test" ,java-fest-test)
9200 ("java-hamcrest-core" ,java-hamcrest-core)
9201 ("java-mockito" ,java-mockito-1)
9202 ("java-cglib" ,java-cglib)
9203 ("java-objenesis" ,java-objenesis)
9204 ("java-asm" ,java-asm)))
9205 (home-page "https://github.com/alexruiz/fest-assert-2.x")
9206 (synopsis "FEST fluent assertions")
9207 (description "FEST-Assert provides a fluent interface for assertions.")
9208 (license license:asl2.0)))
0442d897
JL
9209
9210(define-public java-testng
9211 (package
9212 (name "java-testng")
3422e10e 9213 (version "6.14.3")
0442d897 9214 (source (origin
36b39d16
RW
9215 (method git-fetch)
9216 (uri (git-reference
9217 (url "https://github.com/cbeust/testng.git")
9218 (commit version)))
9219 (file-name (string-append name "-" version "-checkout"))
0442d897
JL
9220 (sha256
9221 (base32
3422e10e 9222 "0y6vq30i5g276kw0v2bhbvci22ijg7ax49ap2611yqlhbs4d6dqv"))))
0442d897
JL
9223 (build-system ant-build-system)
9224 (arguments
9225 `(#:jdk ,icedtea-8; java.util.function
9226 #:jar-name "java-testng.jar"
9227 #:source-dir "src/main/java"
9228 #:phases
9229 (modify-phases %standard-phases
36b39d16
RW
9230 ;; FIXME: I don't know why these tests fail
9231 (add-after 'unpack 'delete-failing-tests
9232 (lambda _
9233 (substitute* "src/test/resources/testng.xml"
9234 (("<class name=\"test.configuration.github1625.TestRunnerIssue1625\"/>") "")
9235 (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") ""))
9236 #t))
9237 ;; We don't have groovy
9238 (add-after 'unpack 'delete-groovy-tests
9239 (lambda _
9240 (delete-file-recursively "src/test/java/test/dependent/issue1648/")
9241 (substitute* "src/test/resources/testng.xml"
9242 (("<class name=\"test.dependent.issue1648.TestRunner\"/>") ""))
9243 #t))
0442d897
JL
9244 (add-before 'build 'copy-resources
9245 (lambda _
9246 (copy-recursively "src/main/resources" "build/classes")
9247 #t))
9248 (add-before 'check 'copy-test-resources
9249 (lambda _
9250 (copy-recursively "src/test/resources" "build/test-classes")
9251 #t))
9252 (replace 'check
9253 (lambda _
2c8ac364 9254 (invoke "ant" "compile-tests")
0442d897
JL
9255 ;; we don't have groovy
9256 (substitute* "src/test/resources/testng.xml"
9257 (("<class name=\"test.groovy.GroovyTest\" />") ""))
2c8ac364
MW
9258 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
9259 ":build/classes"
9260 ":build/test-classes")
9261 "-Dtest.resources.dir=src/test/resources"
9262 "org.testng.TestNG" "src/test/resources/testng.xml"))))))
0442d897
JL
9263 (propagated-inputs
9264 `(("junit" ,java-junit)
9265 ("java-jsr305" ,java-jsr305)
9266 ("java-bsh" ,java-bsh)
9267 ("java-jcommander" ,java-jcommander)
9268 ("java-guice" ,java-guice)
9269 ("snakeyaml" ,java-snakeyaml)))
9270 (native-inputs
9271 `(("guava" ,java-guava)
9272 ("java-javax-inject" ,java-javax-inject)
9273 ("java-hamcrest" ,java-hamcrest-all)
9274 ("java-assertj" ,java-assertj)
36b39d16 9275 ("java-mockito" ,java-mockito-1)
0442d897
JL
9276 ("cglib" ,java-cglib)
9277 ("asm" ,java-asm)
9278 ("aopalliance" ,java-aopalliance)))
c9010605 9279 (home-page "https://testng.org")
0442d897
JL
9280 (synopsis "Testing framework")
9281 (description "TestNG is a testing framework inspired from JUnit and NUnit
9282but introducing some new functionalities that make it more powerful and easier
9283to use.")
9284 (license license:asl2.0)))
1717a7de
JL
9285
9286(define-public java-jnacl
3e87923a
RW
9287 (let ((commit "094e819afdd63ea81a499b3bcb42a271006bebd9")
9288 (revision "2"))
9289 (package
9290 (name "java-jnacl")
9291 (version (string-append "0.1.0-" revision "." (string-take commit 7)))
9292 (source (origin
9293 (method git-fetch)
9294 (uri (git-reference
9295 (url "https://github.com/neilalexander/jnacl.git")
9296 (commit commit)))
6c34ad73 9297 (file-name (git-file-name name version))
3e87923a
RW
9298 (sha256
9299 (base32
9300 "1d6g6xhn83byv5943n7935wwjsk0ibk0qdvqgr699qqgqqmwisbb"))))
9301 (build-system ant-build-system)
9302 (arguments
8c7d32e0 9303 `(#:jar-name "jnacl.jar"
3e87923a
RW
9304 #:source-dir "src/main/java"
9305 #:jdk ,icedtea-8
9306 #:phases
9307 (modify-phases %standard-phases
9308 (add-before 'build 'fix-tests
9309 (lambda _
9310 (substitute* '("src/test/java/com/neilalexander/jnacl/NaClTest.java"
9311 "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java")
9312 (("assertions.Assertions") "assertions.api.Assertions"))
9313 #t))
9314 (replace 'check
9315 (lambda _
9316 (invoke "ant" "compile-tests")
9317 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
9318 ":build/classes"
9319 ":build/test-classes")
9320 "org.testng.TestNG" "-testclass"
9321 "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class")
9322 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
9323 ":build/classes"
9324 ":build/test-classes")
9325 "org.testng.TestNG" "-testclass"
2c8ac364 9326 "build/test-classes/com/neilalexander/jnacl/NaClTest.class"))))))
3e87923a
RW
9327 (native-inputs
9328 `(("java-testng" ,java-testng)
9329 ("java-fest-util" ,java-fest-util)
9330 ("java-fest-assert" ,java-fest-assert)))
9331 (home-page "https://github.com/neilalexander/jnacl")
9332 (synopsis "Java implementation of NaCl")
9333 (description "Pure Java implementation of the NaCl: Networking and
1717a7de 9334Cryptography library.")
3e87923a 9335 (license license:bsd-2))))
eaf3cb7a
JL
9336
9337(define-public java-mvel2
9338 (package
9339 (name "java-mvel2")
9340 (version "2.3.1")
9341 (source (origin
9342 (method url-fetch)
9343 (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-"
9344 version ".Final.tar.gz"))
9345 (sha256
9346 (base32
9347 "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z"))))
9348 (build-system ant-build-system)
9349 (arguments
9350 `(#:jar-name "mvel2.jar"
9351 #:source-dir "src/main/java"
9352 #:test-exclude
9353 (list "**/Abstract*.java"
9354 ;; Base class with no tests
9355 "**/MVELThreadTest.java")
9356 #:phases
9357 (modify-phases %standard-phases
9358 (add-after 'install 'install-bin
9359 (lambda* (#:key outputs #:allow-other-keys)
9360 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
9361 (mkdir-p bin)
9362 (with-output-to-file (string-append bin "/mvel2")
9363 (lambda _
9364 (display
9365 (string-append
9366 "#!" (which "bash") "\n"
9367 "if [ \"$#\" -ne \"2\" ]; then\n"
9368 "echo 'Usage: mvel2 <script> <out.dir>'\n"
9369 "exit\n"
9370 "fi\n"
9371 "java -Dout.dir=$2 -cp " (getenv "CLASSPATH")
9372 ":" (assoc-ref outputs "out") "/share/java/mvel2.jar"
9373 " org.mvel2.sh.Main $1"))))
9374 (chmod (string-append bin "/mvel2") #o755))
9375 #t)))))
9376 (native-inputs
9377 `(("junit" ,java-junit)
9378 ("hamcrest" ,java-hamcrest-core)))
9379 (home-page "https://github.com/mvel/mvel")
9380 (synopsis "MVFLEX Expression Language")
9381 (description "MVEL has largely been inspired by Java syntax, but has some
9382fundamental differences aimed at making it more efficient as an expression
9383language, such as operators that directly support collection, array and string
9384matching, as well as regular expressions. MVEL is used to evaluate expressions
9385written using Java syntax.
9386
9387In addition to the expression language, MVEL serves as a templating language for
9388configuration and string construction.")
9389 (license license:asl2.0)))
d54d7d31 9390
9e325e8c
RW
9391(define-public java-commons-jexl-2
9392 (package
9393 (name "java-commons-jexl")
9394 (version "2.1.1")
9395 (source (origin
9396 (method url-fetch)
9397 (uri (string-append "mirror://apache/commons/jexl/source/"
9398 "commons-jexl-" version "-src.tar.gz"))
9399 (sha256
9400 (base32
9401 "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz"))))
9402 (build-system ant-build-system)
9403 (arguments
9404 `(#:jar-name "commons-jexl-2.jar"
9405 #:jdk ,icedtea-8
9406 #:source-dir "src/main/java"
9407 #:phases
9408 (modify-phases %standard-phases
9409 (add-before 'check 'disable-broken-tests
9410 (lambda* (#:key inputs #:allow-other-keys)
9411 (with-directory-excursion "src/test/java/org/apache/commons/jexl2/"
9412 (substitute* "ArithmeticTest.java"
9413 (("asserter.assertExpression\\(\"3 / 0\"") "//")
9414 (("asserter.assertExpression\\(\"imanull") "//"))
9415 ;; This test fails with "ambiguous method invocation"
9416 (delete-file "CacheTest.java")
9417 ;; This test doesn't have access to the temp directory
9418 (substitute* "ClassCreatorTest.java"
9419 (("java.io.tmpdir") "user.dir"))
9420 ;; This test fails in trying to detect whether it can run.
9421 (substitute* "ClassCreator.java"
9422 (("boolean canRun =.*") "boolean canRun = false;\n"))
9423 ;; ...and these tests depend on it.
9424 (delete-file "scripting/JexlScriptEngineOptionalTest.java")
9425 (delete-file "scripting/JexlScriptEngineTest.java"))
9426 #t))
9427 (add-before 'build 'run-javacc
9428 (lambda _
9429 (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/"
080d0b60
RW
9430 (invoke "java" "jjtree" "Parser.jjt")
9431 (invoke "java" "javacc" "Parser.jj"))
9432 #t)))))
9e325e8c
RW
9433 (inputs
9434 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
9435 (native-inputs
9436 `(("java-junit" ,java-junit)
9437 ("java-hamcrest-core" ,java-hamcrest-core)
9438 ("javacc" ,javacc-4)))
9439 (home-page "https://commons.apache.org/proper/commons-jexl/")
9440 (synopsis "Java Expression Language ")
9441 (description "JEXL is a library intended to facilitate the implementation
9442of dynamic and scripting features in applications and frameworks written in
9443Java. JEXL implements an Expression Language based on some extensions to the
9444JSTL Expression Language supporting most of the constructs seen in
9445shell-script or ECMAScript. Its goal is to expose scripting features usable
9446by technical operatives or consultants working with enterprise platforms.")
9447 (license license:asl2.0)))
9448
d54d7d31
JL
9449(define-public java-lz4
9450 (package
9451 (name "java-lz4")
9452 (version "1.4.0")
9453 (source (origin
6632fc28
EF
9454 (method git-fetch)
9455 (uri (git-reference
9456 (url "https://github.com/lz4/lz4-java")
9457 (commit version)))
9458 (file-name (git-file-name name version))
d54d7d31
JL
9459 (sha256
9460 (base32
6632fc28 9461 "0ydjakhv3cz34mfvv14qrh2ksdxifgjwwagjy7r46qr3f68hnf6y"))))
d54d7d31
JL
9462 (build-system ant-build-system)
9463 (arguments
9464 `(#:jar-name "lz4.jar"
9465 #:jdk ,icedtea-8
9466 #:source-dir "src/java:src/java-unsafe"
9467 #:tests? #f; FIXME: requires more dependencies
9468 #:phases
9469 (modify-phases %standard-phases
6632fc28
EF
9470 (add-after 'unpack 'make-files-writable
9471 (lambda _
9472 (for-each make-file-writable (find-files "."))
9473 #t))
d54d7d31
JL
9474 (add-before 'configure 'generate-source
9475 (lambda _
9476 (with-directory-excursion "src/build/source_templates"
1b6bc516
RW
9477 (invoke "mvel2" "../gen_sources.mvel" "../../java"))
9478 #t)))))
d54d7d31
JL
9479 (native-inputs
9480 `(("mvel" ,java-mvel2)))
9481 (home-page "https://jpountz.github.io/lz4-java")
9482 (synopsis "Compression algorithm")
9483 (description "LZ4 - Java is a Java port of the popular lz4 compression
9484algorithms and xxHash hashing algorithm.")
9485 (license license:asl2.0)))
62315865 9486
50d70a72 9487(define-public java-bouncycastle
62315865 9488 (package
50d70a72 9489 (name "java-bouncycastle")
248a9e16 9490 (version "1.60")
62315865 9491 (source (origin
a8f01c45
EF
9492 (method git-fetch)
9493 (uri (git-reference
9494 (url "http://git.bouncycastle.org/repositories/bc-java")
9495 ;(url "https://github.com/bcgit/bc-java")
9496 (commit (string-append "r1rv" (substring version 2 4)))))
9497 (file-name (git-file-name name version))
62315865
JL
9498 (sha256
9499 (base32
a8f01c45 9500 "1m921a1ac2dl797ffzg3d4j97ch308f25spb4jgsj3npfmmys5gb"))
50d70a72
JL
9501 (modules '((guix build utils)))
9502 (snippet
9503 '(begin
9504 (for-each delete-file
9505 (find-files "." "\\.jar$"))
9506 #t))))
62315865
JL
9507 (build-system ant-build-system)
9508 (arguments
50d70a72 9509 `(#:jdk ,icedtea-8
0c68f7fd 9510 #:tests? #f
62315865
JL
9511 #:phases
9512 (modify-phases %standard-phases
50d70a72 9513 (replace 'build
62315865 9514 (lambda _
50d70a72 9515 (invoke "ant" "-f" "ant/jdk15+.xml" "build-provider")
2c8ac364 9516 (invoke "ant" "-f" "ant/jdk15+.xml" "build")))
0c68f7fd
RW
9517 ;; FIXME: the tests freeze.
9518 ;; (replace 'check
9519 ;; (lambda _
9520 ;; (invoke "ant" "-f" "ant/jdk15+.xml" "test")))
50d70a72
JL
9521 (replace 'install
9522 (install-jars "build/artifacts/jdk1.5/jars")))))
9523 (inputs
9524 `(("java-javax-mail" ,java-javax-mail)))
31208367
JL
9525 (native-inputs
9526 `(("unzip" ,unzip)
50d70a72
JL
9527 ("junit" ,java-junit)
9528 ("java-native-access" ,java-native-access)
9529 ("java-native-access-platform" ,java-native-access-platform)))
31208367
JL
9530 (home-page "https://www.bouncycastle.org")
9531 (synopsis "Cryptographic library")
50d70a72
JL
9532 (description "Bouncy Castle is a cryptographic library for the Java
9533programming language.")
31208367 9534 (license license:expat)))
a53d9ac0
JL
9535
9536(define-public java-lmax-disruptor
9537 (package
9538 (name "java-lmax-disruptor")
9539 (version "3.3.7")
9540 (source (origin
9541 (method url-fetch)
9542 (uri (string-append "https://github.com/LMAX-Exchange/disruptor/"
9543 "archive/" version ".tar.gz"))
9544 (file-name (string-append name "-" version ".tar.gz"))
9545 (sha256
9546 (base32
9547 "17da2gwj5abnlsfgn2xqjk5lgzbg4vkb0hdv2dvc8r2fx4bi7w3g"))))
9548 (build-system ant-build-system)
9549 (arguments
9550 `(#:jar-name "java-lmax-disruptor.jar"
9551 #:jdk ,icedtea-8
9552 #:tests? #f)); tests hang
9553 (inputs
9554 `(("junit" ,java-junit)
9555 ("java-hdrhistogram" ,java-hdrhistogram)
9556 ("java-jmock" ,java-jmock)
9557 ("java-jmock-legacy" ,java-jmock-legacy)
9558 ("java-jmock-junit4" ,java-jmock-junit4)
9559 ("java-hamcrest-all" ,java-hamcrest-all)))
9560 (native-inputs
9561 `(("cglib" ,java-cglib)
9562 ("objenesis" ,java-objenesis)
9563 ("asm" ,java-asm)))
9564 (home-page "https://www.lmax.com/disruptor")
9565 (synopsis "High performance inter-thread communication")
9566 (description "LMAX Disruptor is a software pattern and software component
9567for high performance inter-thread communication that avoids the need for
9568message queues or resource locking.")
9569 (license license:asl2.0)))
5619556b 9570
5e3abfc8
RW
9571(define-public java-commons-bcel
9572 (package
9573 (name "java-commons-bcel")
9574 (version "6.1")
9575 (source (origin
9576 (method url-fetch)
9577 (uri (string-append "mirror://apache/commons/bcel/source/bcel-"
9578 version "-src.tar.gz"))
9579 (sha256
9580 (base32
9581 "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy"))))
9582 (build-system ant-build-system)
9583 (arguments
9584 `(#:jar-name "bcel.jar"
9585 #:jdk ,icedtea-8
9586 #:source-dir "src/main/java"
9587 #:test-dir "src/test/java"
9588 ;; FIXME: Tests require the unpackaged jna.
9589 #:tests? #f))
9590 (home-page "https://commons.apache.org/proper/commons-bcel/")
9591 (synopsis "Byte code engineering library")
9592 (description "The Byte Code Engineering Library (Apache Commons BCEL) is
9593intended to give users a convenient way to analyze, create, and
9594manipulate (binary) Java class files. Classes are represented by objects
9595which contain all the symbolic information of the given class: methods, fields
9596and byte code instructions, in particular.
9597
9598Such objects can be read from an existing file, be transformed by a
9599program (e.g. a class loader at run-time) and written to a file again. An
9600even more interesting application is the creation of classes from scratch at
9601run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful
9602if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format
9603of Java @code{.class} files.")
9604 (license license:asl2.0)))
9605
5619556b
JL
9606(define-public java-xerial-core
9607 (package
9608 (name "java-xerial-core")
9609 (version "2.1")
9610 (source (origin
9611 (method url-fetch)
9612 (uri (string-append "https://github.com/xerial/xerial-java/archive/"
9613 version ".tar.gz"))
9614 (file-name (string-append name "-" version ".tar.gz"))
9615 (sha256
9616 (base32
9617 "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d"))))
9618 (build-system ant-build-system)
9619 (arguments
9620 `(#:jar-name "xerial-core.jar"
9621 #:source-dir "xerial-core/src/main/java"
9622 #:test-dir "xerial-core/src/test"
9623 #:phases
9624 (modify-phases %standard-phases
9625 (add-before 'build 'copy-resources
9626 (lambda _
9627 (copy-recursively "xerial-core/src/main/resources"
9628 "build/classes")
9629 #t)))))
9630 (native-inputs
9631 `(("junit" ,java-junit)
9632 ("hamcrest" ,java-hamcrest-core)))
9633 (home-page "https://github.com/xerial/xerial-java")
f4548394 9634 (synopsis "Data management libraries for Java")
5619556b 9635 (description "Xerial is a set of data management libraries for the Java
f4548394 9636programming language. The ultimate goal of the Xerial project is to manage
5619556b
JL
9637everything as database, including class objects, text format data, data
9638streams, etc.")
9639 (license license:asl2.0)))
8d6a4815
JL
9640
9641(define-public java-powermock-reflect
9642 (package
9643 (name "java-powermock-reflect")
9644 (version "1.7.3")
9645 (source (origin
9646 (method url-fetch)
9647 (uri (string-append "https://github.com/powermock/powermock/"
9648 "archive/powermock-" version ".tar.gz"))
9649 (file-name (string-append name "-" version ".tar.gz"))
9650 (sha256
9651 (base32
9652 "0sbgi5vqq7k72wzcdjb20s370vyd4hsbnx71pzb8ishml3gy7fwy"))
9653 (patches
9654 (search-patches "java-powermock-fix-java-files.patch"))))
9655 (build-system ant-build-system)
9656 (arguments
9657 `(#:jar-name "java-powermock-reflect.jar"
9658 #:jdk ,icedtea-8
9659 #:source-dir "powermock-reflect/src/main/java"
9660 #:test-dir "powermock-reflect/src/test"))
9661 (inputs
9662 `(("java-objenesis" ,java-objenesis)))
9663 (native-inputs
9664 `(("junit" ,java-junit)
9665 ("cglib" ,java-cglib)
9666 ("asm" ,java-asm)
9667 ("hamcrest" ,java-hamcrest-core)
9668 ("assertj" ,java-assertj)))
9669 (home-page "https://github.com/powermock/powermock")
9670 (synopsis "Mock library extension framework")
9671 (description "PowerMock is a framework that extends other mock libraries
9672such as EasyMock with more powerful capabilities. PowerMock uses a custom
9673classloader and bytecode manipulation to enable mocking of static methods,
9674constructors, final classes and methods, private methods, removal of static
9675initializers and more. By using a custom classloader no changes need to be
9676done to the IDE or continuous integration servers which simplifies adoption.")
9677 (license license:asl2.0)))
d4a4d5da
JL
9678
9679(define-public java-powermock-core
9680 (package
9681 (inherit java-powermock-reflect)
9682 (name "java-powermock-core")
9683 (arguments
9684 `(#:jar-name "java-powermock-core.jar"
9685 #:source-dir "powermock-core/src/main/java"
9686 #:test-dir "powermock-core/src/test"
9687 #:tests? #f; requires powermock-api
59e0021c
JL
9688 #:jdk ,icedtea-8
9689 #:phases
9690 (modify-phases %standard-phases
9691 (add-before 'build 'copy-resources
9692 (lambda _
9693 (copy-recursively "powermock-core/src/main/resources"
2c8ac364
MW
9694 "build/classes")
9695 #t)))))
d4a4d5da
JL
9696 (inputs
9697 `(("reflect" ,java-powermock-reflect)
9698 ("javassist" ,java-jboss-javassist)))
9699 (native-inputs
9700 `(("junit" ,java-junit)
9701 ("assertj" ,java-assertj)
9702 ("mockito" ,java-mockito-1)))))
2d5d65d7
JL
9703
9704(define-public java-powermock-api-support
9705 (package
9706 (inherit java-powermock-reflect)
9707 (name "java-powermock-api-support")
9708 (build-system ant-build-system)
9709 (arguments
9710 `(#:jar-name "java-powermock-api-support.jar"
9711 #:jdk ,icedtea-8
9712 #:source-dir "powermock-api/powermock-api-support/src/main/java"
9713 #:tests? #f)); no tests
9714 (inputs
9715 `(("core" ,java-powermock-core)
9716 ("reflect" ,java-powermock-reflect)))))
6c21d46c
JL
9717
9718(define-public java-powermock-modules-junit4-common
9719 (package
9720 (inherit java-powermock-reflect)
9721 (name "java-powermock-modules-junit4-common")
9722 (build-system ant-build-system)
9723 (arguments
9724 `(#:jar-name "java-powermock-modules-junit4-common.jar"
9725 #:jdk ,icedtea-8
9726 #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java"
9727 #:test-dir "powermock-modules/powermock-module-junit4-common/src/test"))
9728 (inputs
9729 `(("core" ,java-powermock-core)
9730 ("easymock" ,java-easymock)
9731 ("reflect" ,java-powermock-reflect)
9732 ("hamcrest" ,java-hamcrest-core)
9733 ("cglib" ,java-cglib)))))
33db1681
JL
9734
9735(define-public java-powermock-modules-junit4
9736 (package
9737 (inherit java-powermock-reflect)
9738 (name "java-powermock-modules-junit4")
9739 (build-system ant-build-system)
9740 (arguments
9741 `(#:jar-name "java-powermock-modules-junit4.jar"
9742 #:jdk ,icedtea-8
9743 #:source-dir "powermock-modules/powermock-module-junit4/src/main/java"
1124683d
JL
9744 #:test-dir "powermock-modules/powermock-module-junit4/src/test"
9745 #:phases
9746 (modify-phases %standard-phases
9747 (add-before 'build 'fix-junit-detection
9748 (lambda _
9749 ;; Our junit version is 4.12-SNAPSHOT
9750 (substitute* (find-files "powermock-modules/powermock-module-junit4"
9751 "PowerMockJUnit4MethodValidator.java")
2c8ac364
MW
9752 (("4.12") "4.12-SNAPSHOT"))
9753 #t)))))
33db1681
JL
9754 (inputs
9755 `(("core" ,java-powermock-core)
9756 ("reflect" ,java-powermock-reflect)
9757 ("common" ,java-powermock-modules-junit4-common)
9758 ("cglib" ,java-cglib)))
9759 (native-inputs
9760 `(("easymock" ,java-easymock)
9761 ("hamcrest" ,java-hamcrest-core)
9762 ("objenesis" ,java-objenesis)
9763 ("asm" ,java-asm)
9764 ("junit" ,java-junit)))))
4d508975
JL
9765
9766(define-public java-powermock-api-easymock
9767 (package
9768 (inherit java-powermock-reflect)
9769 (name "java-powermock-api-easymock")
9770 (build-system ant-build-system)
9771 (arguments
9772 `(#:jar-name "java-powermock-api-easymock.jar"
9773 #:jdk ,icedtea-8
9774 #:source-dir "powermock-api/powermock-api-easymock/src/main/java"
9775 #:tests? #f; no tests
9776 #:phases
9777 (modify-phases %standard-phases
9778 (add-before 'build 'fix-file
9779 (lambda _
9780 ;; FIXME: This looks wrong, but it fixes a build error.
9781 (with-directory-excursion "powermock-api/powermock-api-easymock"
9782 (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java"
9783 (("classLoader instanceof MockClassLoader") "false")
9784 (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";")))
9785 #t)))))
9786 (inputs
9787 `(("core" ,java-powermock-core)
9788 ("easymock" ,java-easymock)
9789 ("reflect" ,java-powermock-reflect)
9790 ("support" ,java-powermock-api-support)
9791 ("cglib" ,java-cglib)))))
5fb3e822
JL
9792
9793(define-public java-jboss-jms-api-spec
9794 (package
9795 (name "java-jboss-jms-api-spec")
9796 (version "2.0")
9797 (source (origin
9798 (method url-fetch)
9799 (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/"
9800 "archive/jboss-jms-api_" version
9801 "_spec-1.0.1.Final.tar.gz"))
9802 (sha256
9803 (base32
9804 "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m"))))
9805 (build-system ant-build-system)
9806 (arguments
9807 `(#:jar-name "java-jboss-jms-api_spec.jar"
9808 #:jdk ,icedtea-8
9809 #:source-dir "."
9810 #:tests? #f)); no tests
9811 (home-page "https://github.com/jboss/jboss-jms-api_spec")
9812 (synopsis "Java Message Service API specification")
9813 (description "Java Message Service (JMS) API is used to send messages
9814messages between two or more clients. It is a messaging standard that allows
9815application components to create, send, receive, and read messages.")
9816 ; either gpl2 only with GPL Classpath Exception, or cddl.
9817 (license (list license:gpl2 license:cddl1.0))))
3ff47c66
JL
9818
9819(define-public java-mail
9820 (package
9821 (name "java-mail")
9822 (version "1.6.0")
9823 (source (origin
9824 (method url-fetch)
9825 (uri (string-append "https://github.com/javaee/javamail/archive/"
9826 "JAVAMAIL-1_6_0.tar.gz"))
9827 (sha256
9828 (base32
9829 "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92"))))
9830 (build-system ant-build-system)
9831 (arguments
9832 `(#:jar-name "java-mail.jar"
9833 #:jdk ,icedtea-8
9834 #:source-dir "mail/src/main/java"
9835 #:test-dir "mail/src/test"
9836 #:test-exclude
9837 (list "**/CollectorFormatterTest.java"
9838 "**/CompactFormatterTest.java"
9839 "**/DurationFilterTest.java"
9840 "**/MailHandlerTest.java"
9841 "**/GetLocalAddressTest.java"
9842 ;; FIXME: both end with:
9843 ;; java.lang.ClassNotFoundException:
9844 ;; javax.mail.internet.MimeMultipartParseTest
9845 "**/MimeMultipartParseTest.java"
9846 "**/SearchTermSerializationTest.java")
9847 #:phases
9848 (modify-phases %standard-phases
9849 (add-before 'configure 'move-version.java
9850 (lambda _
9851 (copy-file "mail/src/main/resources/javax/mail/Version.java"
218d1dde
RW
9852 "mail/src/main/java/javax/mail/Version.java")
9853 #t))
3ff47c66
JL
9854 (add-before 'build 'copy-resources
9855 (lambda _
9856 (copy-recursively "mail/src/main/resources/META-INF"
9857 "build/classes/META-INF")
9858 #t)))))
9859 (native-inputs
9860 `(("junit" ,java-junit)
9861 ("hamcrest" ,java-hamcrest-core)))
9862 (home-page "https://javaee.github.io/javamail/")
9863 (synopsis "Mail-related functionnalities in Java")
9864 (description "The JavaMail API provides a platform-independent and
9865protocol-independent framework to build mail and messaging applications.")
9866 ;; General Public License Version 2 only ("GPL") or the Common Development
9867 ;; and Distribution License("CDDL")
9868 (license (list license:cddl1.1
9869 license:gpl2)))); with classpath exception
217b20e4
JL
9870
9871(define-public java-jeromq
9872 (package
9873 (name "java-jeromq")
4aa0a1df 9874 (version "0.4.3")
217b20e4 9875 (source (origin
4aa0a1df
RW
9876 (method git-fetch)
9877 (uri (git-reference
9878 (url "https://github.com/zeromq/jeromq.git")
9879 (commit (string-append "v" version))))
9880 (file-name (string-append name "-" version "-checkout"))
217b20e4
JL
9881 (sha256
9882 (base32
594bd3a0
GB
9883 "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj"))
9884 (patches (search-patches "java-jeromq-fix-tests.patch"))))
217b20e4
JL
9885 (build-system ant-build-system)
9886 (arguments
9887 `(#:jar-name "java-jeromq.jar"
9888 #:source-dir "src/main/java"
9889 #:jdk ,icedtea-8
9890 #:test-exclude
9891 (list
9892 "**/Abstract*.java"
9893 ;; Requires network
9894 "**/ZBeaconTest.java"
9895 ;; Failures
4aa0a1df 9896 "**/DealerSpecTest.java"
217b20e4 9897 "**/CustomDecoderTest.java"
594bd3a0
GB
9898 "**/CustomEncoderTest.java"
9899 "**/ConnectRidTest.java"
9900 "**/ReqSpecTest.java"
9901 "**/PushPullSpecTest.java"
9902 "**/PubSubHwmTest.java"
9903 "**/RouterSpecTest.java"
9904 "**/ProxyTest.java")))
217b20e4
JL
9905 (inputs
9906 `(("java-jnacl" ,java-jnacl)))
9907 (native-inputs
9908 `(("java-hamcrest-core" ,java-hamcrest-core)
9909 ("junit" ,java-junit)))
9910 (home-page "http://zeromq.org/bindings:java")
9911 (synopsis "Java binding for 0MQ")
9912 (description "Jeromq provides the java bindings for 0MQ.")
9913 (license license:mpl2.0)))
46c6905a
JL
9914
9915(define-public java-kafka-clients
9916 (package
9917 (name "java-kafka-clients")
9918 (version "1.0.0")
9919 (source (origin
9920 (method url-fetch)
9921 (uri (string-append "mirror://apache/kafka/" version "/kafka-"
9922 version "-src.tgz"))
9923 (sha256
9924 (base32
9925 "1yxmnsmliwm7671q5yy9bl4jdqyyn00n26cggz9brwczx80w1vfq"))))
9926 (build-system ant-build-system)
9927 (arguments
9928 `(#:jar-name "java-kafka-clients.jar"
9929 #:jdk ,icedtea-8
9930 #:source-dir "clients/src/main/java"
9931 #:test-dir "clients/src/test"
9932 #:test-exclude
9933 (list
9934 ;; This file does not contain a class
9935 "**/IntegrationTest.java"
9936 ;; Requires network
9937 "**/ClientUtilsTest.java"
9938 ;; End with errors that seem related to our powermock
9939 "**/KafkaProducerTest.java"
9940 "**/BufferPoolTest.java")))
9941 (inputs
9942 `(("java-slf4j-api" ,java-slf4j-api)
9943 ("java-lz4" ,java-lz4)))
9944 (native-inputs
9945 `(("junit" ,java-junit)
9946 ("hamcrest" ,java-hamcrest-all)
9947 ("objenesis" ,java-objenesis)
9948 ("asm" ,java-asm)
9949 ("cglib" ,java-cglib)
9950 ("javassist" ,java-jboss-javassist)
9951 ("snappy" ,java-snappy)
9952 ("easymock" ,java-easymock)
9953 ("powermock" ,java-powermock-core)
9954 ("powermock-easymock" ,java-powermock-api-easymock)
9955 ("powermock-junit4-common" ,java-powermock-modules-junit4-common)
9956 ("powermock-junit4" ,java-powermock-modules-junit4)
9957 ("powermock-support" ,java-powermock-api-support)
50d70a72 9958 ("java-bouncycastle" ,java-bouncycastle)))
46c6905a
JL
9959 (home-page "https://kafka.apache.org")
9960 (synopsis "Distributed streaming platform")
9961 (description "Kafka is a distributed streaming platform, which means:
9962@itemize
9963@item it can publish and subscribe to streams of records;
9964@item it can store streams of records in a fault-tolerant way;
9965@item it can process streams of records as they occur.
9966@end itemize")
9967 ;; Either cddl or gpl2 only.
9968 (license (list license:cddl1.1; actually cddl1.1
9969 license:gpl2)))); with classpath exception
0b54e190
JL
9970
9971(define-public java-jdom
9972 (package
9973 (name "java-jdom")
9974 (version "1.1.3")
9975 (source (origin
9976 (method url-fetch)
9977 (uri (string-append "http://jdom.org/dist/binary/archive/jdom-"
9978 version ".tar.gz"))
9979 (sha256
9980 (base32
9981 "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl"))))
9982 (build-system ant-build-system)
9983 (arguments
9984 `(#:build-target "package"
9985 #:tests? #f; tests are run as part of the build process
9986 #:phases
9987 (modify-phases %standard-phases
9988 (replace 'install
9989 (install-jars "build")))))
9990 (home-page "http://jdom.org/")
9991 (synopsis "Access, manipulate, and output XML data")
9992 (description "Java-based solution for accessing, manipulating, and
9993outputting XML data from Java code.")
9994 (license license:bsd-4)))
78745d33
JL
9995
9996(define-public java-geronimo-xbean-reflect
9997 (package
9998 (name "java-geronimo-xbean-reflect")
9999 (version "4.5")
10000 (source (origin
10001 (method svn-fetch)
10002 (uri (svn-reference
10003 (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/")
10004 (revision 1807396)))
10005 (file-name (string-append name "-" version))
10006 (sha256
10007 (base32
10008 "18q3i6jgm6rkw8aysfgihgywrdc5nvijrwnslmi3ww497jvri6ja"))))
10009 (build-system ant-build-system)
10010 (arguments
10011 `(#:jar-name "geronimo-xbean-reflect.jar"
10012 #:source-dir "xbean-reflect/src/main/java"
10013 #:test-dir "xbean-reflect/src/test"
10014 #:jdk ,icedtea-8
10015 #:test-exclude
10016 (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java"
10017 "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java"
10018 "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java")
10019 #:phases
10020 (modify-phases %standard-phases
10021 (add-before 'build 'fix-source
10022 (lambda _
10023 (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/"))
10024 ;; org.apache.xbean.asm6 is actually repackaged java-asm
10025 (substitute* (string-append dir "XbeanAsmParameterNameLoader.java")
10026 (("org.apache.xbean.asm5") "org.objectweb.asm"))
10027 #t))))))
10028 (inputs
10029 `(("asm" ,java-asm)
10030 ("log4j" ,java-log4j-api)
10031 ("log4j-1.2" ,java-log4j-1.2-api)
10032 ("log4j-core" ,java-log4j-core)
10033 ("logging" ,java-commons-logging-minimal)))
10034 (native-inputs
10035 `(("junit" ,java-junit)))
10036 (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/")
10037 (synopsis "Dependency injection helper")
10038 (description "Xbean-reflect provides very flexible ways to create objects
10039and graphs of objects for dependency injection frameworks")
10040 (license license:asl2.0)))
09c44196 10041
3fda539b
JL
10042(define-public java-geronimo-xbean-bundleutils
10043 (package
10044 (inherit java-geronimo-xbean-reflect)
10045 (name "java-geronimo-xbean-bundleutils")
10046 (arguments
10047 `(#:jar-name "geronimo-xbean-bundleutils.jar"
10048 #:source-dir "xbean-bundleutils/src/main/java"
10049 #:test-dir "xbean-bundleutils/src/test"
10050 #:phases
10051 (modify-phases %standard-phases
10052 (add-before 'build 'fix-java
10053 (lambda _
10054 ;; We use a more recent version of osgi, so this file requires
10055 ;; more interface method implementations.
10056 (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java"
10057 (("import org.osgi.framework.ServiceRegistration;")
10058 "import org.osgi.framework.ServiceRegistration;
10059import org.osgi.framework.ServiceFactory;
10060import java.util.Collection;
10061import org.osgi.framework.ServiceObjects;")
10062 (("public Bundle getBundle\\(\\)")
10063 "@Override
10064public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) {
10065 throw new UnsupportedOperationException();
10066}
10067@Override
10068public <S> ServiceRegistration<S> registerService(Class<S> clazz,
10069 ServiceFactory<S> factory, Dictionary<String, ?> properties) {
10070 throw new UnsupportedOperationException();
10071}
10072public Bundle getBundle()"))
10073 #t)))))
10074 (inputs
10075 `(("java-slf4j" ,java-slf4j-api)
10076 ("java-asm" ,java-asm)
10077 ("java-osgi-framework" ,java-osgi-framework)
10078 ("java-eclipse-osgi" ,java-eclipse-osgi)
10079 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)))))
0cb9ce32
JL
10080
10081(define-public java-geronimo-xbean-asm-util
10082 (package
10083 (inherit java-geronimo-xbean-reflect)
10084 (name "java-geronimo-xbean-asm-util")
10085 (arguments
10086 `(#:jar-name "geronimo-xbean-asm-util.jar"
10087 #:source-dir "xbean-asm-util/src/main/java"
10088 #:tests? #f)); no tests
10089 (inputs
10090 `(("java-asm" ,java-asm)))
10091 (native-inputs '())))
8d510f65
JL
10092
10093(define-public java-geronimo-xbean-finder
10094 (package
10095 (inherit java-geronimo-xbean-reflect)
10096 (name "java-geronimo-xbean-finder")
10097 (arguments
10098 `(#:jar-name "geronimo-xbean-finder.jar"
10099 #:source-dir "xbean-finder/src/main/java"
10100 #:test-dir "xbean-finder/src/test"))
10101 (inputs
10102 `(("java-slf4j-api" ,java-slf4j-api)
10103 ("java-asm" ,java-asm)
10104 ("java-geronimo-xbean-bundleutils" ,java-geronimo-xbean-bundleutils)
10105 ("java-geronimo-xbean-asm-util" ,java-geronimo-xbean-asm-util)
10106 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)
10107 ("java-osgi-framework" ,java-osgi-framework)))
10108 (native-inputs
10109 `(("java-junit" ,java-junit)
10110 ("java-hamcrest-core" ,java-hamcrest-core)))))
3fda539b 10111
09c44196
JL
10112(define-public java-gson
10113 (package
10114 (name "java-gson")
10115 (version "2.8.2")
10116 (source (origin
10117 (method url-fetch)
10118 (uri (string-append "https://github.com/google/gson/archive/"
10119 "gson-parent-" version ".tar.gz"))
10120 (sha256
10121 (base32
10122 "1j4qnp7v046q0k48c4kyf69sxaasx2h949d3cqwsm3kzxms3x0f9"))))
10123 (build-system ant-build-system)
10124 (arguments
10125 `(#:jar-name "gson.jar"
10126 #:source-dir "gson/src/main/java"
10127 #:test-dir "gson/src/test"))
10128 (native-inputs
10129 `(("java-junit" ,java-junit)
10130 ("java-hamcrest-core" ,java-hamcrest-core)))
10131 (home-page "https://github.com/google/gson")
10132 (synopsis "Java serialization/deserialization library from/to JSON")
10133 (description "Gson is a Java library that can be used to convert Java
10134Objects into their JSON representation. It can also be used to convert a JSON
10135string to an equivalent Java object. Gson can work with arbitrary Java objects
10136including pre-existing objects that you do not have source-code of.")
10137 (license license:asl2.0)))
335aa20b
JL
10138
10139(define-public java-hawtjni
10140 (package
10141 (name "java-hawtjni")
10142 (version "1.15")
10143 (source (origin
10144 (method url-fetch)
10145 (uri (string-append "https://github.com/fusesource/hawtjni/archive/"
10146 "hawtjni-project-" version ".tar.gz"))
10147 (sha256
10148 (base32
10149 "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g"))))
10150 (build-system ant-build-system)
10151 (arguments
10152 `(#:jar-name "hawtjni.jar"
10153 #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java"
10154 #:tests? #f; no tests
10155 #:phases
10156 (modify-phases %standard-phases
10157 (add-before 'build 'build-native
10158 (lambda* (#:key inputs #:allow-other-keys)
6338ea9a
RW
10159 (let ((include (string-append "-I" (assoc-ref inputs "jdk") "/include/linux")))
10160 (with-directory-excursion "hawtjni-generator/src/main/resources/"
10161 (invoke "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o"
10162 "-fPIC" "-O2" include)
10163 (invoke "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o"
10164 "-fPIC" "-O2" include)
10165 (invoke "gcc" "-o" "libhawtjni.so" "-shared"
10166 "hawtjni.o" "hawtjni-callback.o")))
10167 #t))
335aa20b
JL
10168 (add-after 'install 'install-native
10169 (lambda* (#:key outputs #:allow-other-keys)
10170 (let* ((out (assoc-ref outputs "out"))
10171 (lib (string-append out "/lib"))
10172 (inc (string-append out "/include")))
335aa20b 10173 (with-directory-excursion "hawtjni-generator/src/main/resources/"
6338ea9a
RW
10174 (install-file "libhawtjni.so" lib)
10175 (install-file "hawtjni.h" inc)))
335aa20b
JL
10176 #t)))))
10177 (inputs
10178 `(("java-commons-cli" ,java-commons-cli)
10179 ("java-asm" ,java-asm)
10180 ("java-geronimo-xbean-finder" ,java-geronimo-xbean-finder)))
10181 (home-page "https://fusesource.github.io/hawtjni/")
10182 (synopsis "JNI code generator")
10183 (description "HawtJNI is a code generator that produces the JNI code needed
10184to implement Java native methods. It is based on the jnigen code generator
10185that is part of the SWT Tools project.")
10186 (license license:asl2.0)))
d0c62afa
JL
10187
10188(define-public java-jansi-native
10189 (package
10190 (name "java-jansi-native")
10191 (version "1.7")
10192 (source (origin
10193 (method url-fetch)
10194 (uri (string-append "https://github.com/fusesource/jansi-native/"
10195 "archive/jansi-native-" version ".tar.gz"))
10196 (sha256
10197 (base32
10198 "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf"))))
10199 (build-system ant-build-system)
10200 (arguments
10201 `(#:jar-name "jansi-native.jar"
10202 #:source-dir "src/main/java"
10203 #:tests? #f; no tests
10204 #:phases
10205 (modify-phases %standard-phases
10206 (add-before 'build 'build-native
10207 (lambda* (#:key inputs #:allow-other-keys)
10208 ;; there are more required files for windows in windows/
10209 (with-directory-excursion "src/main/native-package/src"
10210 (substitute* "jansi_ttyname.c"
10211 (("#include \"jansi_.*") ""))
e85c1bf6
RW
10212 (invoke "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o"
10213 (string-append "-I" (assoc-ref inputs "java-hawtjni")
10214 "/include")
10215 (string-append "-I" (assoc-ref inputs "jdk")
10216 "/include/linux")
10217 "-fPIC" "-O2")
2c8ac364 10218 (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o"))))
d0c62afa
JL
10219 (add-before 'build 'install-native
10220 (lambda _
10221 (let ((dir (string-append "build/classes/META-INF/native/"
10222 ,(match (%current-system)
10223 ((or "i686-linux" "armhf-linux")
10224 "linux32")
3c4103c8
LC
10225 ((or "x86_64-linux" "aarch64-linux"
10226 "mips64el-linux")
9820d6ed
JN
10227 "linux64")
10228 (_ "unknown-kernel")))))
d0c62afa
JL
10229 (install-file "src/main/native-package/src/libjansi.so" dir))
10230 #t))
10231 (add-after 'install 'install-native
10232 (lambda* (#:key outputs #:allow-other-keys)
d0c62afa
JL
10233 (install-file "src/main/native-package/src/jansi.h"
10234 (string-append (assoc-ref outputs "out") "/include"))
10235 #t)))))
10236 (inputs
10237 `(("java-hawtjni" ,java-hawtjni)))
10238 (home-page "https://fusesource.github.io/jansi/")
10239 (synopsis "Native library for jansi")
3d6925ef
RW
10240 (description "This package provides the native library for jansi, a small
10241Java library that allows you to use ANSI escape sequences to format your
10242console output.")
d0c62afa 10243 (license license:asl2.0)))
a87ea1ad
JL
10244
10245(define-public java-jansi
10246 (package
10247 (name "java-jansi")
10248 (version "1.16")
10249 (source (origin
10250 (method url-fetch)
10251 (uri (string-append "https://github.com/fusesource/jansi/archive/"
10252 "jansi-project-" version ".tar.gz"))
10253 (sha256
10254 (base32
10255 "11kh3144i3fzp21dpy8zg52mjmsr214k7km9p8ly0rqk2px0qq2z"))))
10256 (build-system ant-build-system)
10257 (arguments
10258 `(#:jar-name "jansi.jar"
10259 #:source-dir "jansi/src/main/java"
10260 #:test-dir "jansi/src/test"
10261 #:phases
10262 (modify-phases %standard-phases
10263 (add-after 'check 'clear-term
10264 (lambda _
2c8ac364 10265 (invoke "echo" "-e" "\\e[0m"))))))
a87ea1ad
JL
10266 (inputs
10267 `(("java-jansi-native" ,java-jansi-native)))
10268 (native-inputs
10269 `(("java-junit" ,java-junit)
10270 ("java-hamcrest-core" ,java-hamcrest-core)))
10271 (home-page "https://fusesource.github.io/jansi/")
10272 (synopsis "Portable ANSI escape sequences")
10273 (description "Jansi is a Java library that allows you to use ANSI escape
10274sequences to format your console output which works on every platform.")
10275 (license license:asl2.0)))
cc061329
JL
10276
10277(define-public java-jboss-el-api-spec
10278 (package
10279 (name "java-jboss-el-api-spec")
10280 (version "3.0")
10281 (source (origin
10282 (method url-fetch)
10283 (uri (string-append "https://github.com/jboss/jboss-el-api_spec/"
10284 "archive/jboss-el-api_" version
10285 "_spec-1.0.7.Final.tar.gz"))
10286 (sha256
10287 (base32
10288 "1j45ljxalwlibxl7g7iv952sjxkw275m8vyxxij8l6wdd5pf0pdh"))))
10289 (build-system ant-build-system)
10290 (arguments
10291 `(#:jar-name "java-jboss-el-api_spec.jar"
10292 #:jdk ,icedtea-8))
10293 (inputs
10294 `(("java-junit" ,java-junit)))
10295 (home-page "https://github.com/jboss/jboss-el-api_spec")
10296 (synopsis "JSR-341 expression language 3.0 API")
10297 (description "This package contains an implementation of the JSR-341
10298specification for the expression language 3.0. It implements an expression
10299language inspired by ECMAScript and XPath. This language is used with
10300JavaServer Pages (JSP).")
10301 ;; Either GPL2 only or CDDL.
10302 (license (list license:gpl2 license:cddl1.1))))
cc03a786
JL
10303
10304(define-public java-jboss-interceptors-api-spec
10305 (package
10306 (name "java-jboss-interceptors-api-spec")
10307 (version "1.2")
10308 (source (origin
10309 (method url-fetch)
10310 (uri (string-append "https://github.com/jboss/jboss-interceptors-api_spec/"
10311 "archive/jboss-interceptors-api_" version
10312 "_spec-1.0.0.Final.tar.gz"))
10313 (sha256
10314 (base32
10315 "0wv8x0jp9a5qxlrgkhb5jdk2gr6vi87b4j4kjb8ryxiy9gn8g51z"))))
10316 (build-system ant-build-system)
10317 (arguments
10318 `(#:jar-name "java-jboss-interceptors-api_spec.jar"
10319 #:jdk ,icedtea-8
10320 #:source-dir "."
10321 #:tests? #f)); no tests
10322 (home-page "https://github.com/jboss/jboss-interceptors-api_spec")
10323 (synopsis "Interceptors 1.2 API classes from JSR 318")
10324 (description "Java-jboss-interceptors-api-spec implements the Interceptors
10325API. Interceptors are used to interpose on business method invocations and
10326specific events.")
10327 ;; Either GPL2 only or CDDL.
10328 (license (list license:gpl2 license:cddl1.1))))
a10a451c
JL
10329
10330(define-public java-cdi-api
10331 (package
10332 (name "java-cdi-api")
10333 (version "2.0")
10334 (source (origin
10335 (method url-fetch)
10336 (uri (string-append "https://github.com/cdi-spec/cdi/archive/"
10337 version ".tar.gz"))
10338 (file-name (string-append name "-" version ".tar.gz"))
10339 (sha256
10340 (base32
10341 "1iv8b8bp07c5kmqic14jsr868vycjv4qv02lf3pkgp9z21mnfg5y"))))
10342 (build-system ant-build-system)
10343 (arguments
10344 `(#:source-dir "api/src/main/java"
10345 #:jar-name "java-cdi-api.jar"
10346 #:test-dir "api/src/test"
10347 #:jdk ,icedtea-8
10348 #:tests? #f)); Tests fail because we don't have a CDI provider yet
10349 (inputs
10350 `(("java-javax-inject" ,java-javax-inject)
10351 ("java-jboss-el-api-spec" ,java-jboss-el-api-spec)
10352 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)))
10353 (native-inputs
10354 `(("java-testng" ,java-testng)
10355 ("java-hamcrest-core" ,java-hamcrest-core)))
10356 (home-page "http://cdi-spec.org/")
10357 (synopsis "Contexts and Dependency Injection APIs")
10358 (description "Java-cdi-api contains the required APIs for Contexts and
10359Dependency Injection (CDI).")
10360 (license license:asl2.0)))
d57fd728
JL
10361
10362(define-public java-joda-convert
10363 (package
10364 (name "java-joda-convert")
10365 (version "1.9.2")
10366 (source (origin
10367 (method url-fetch)
10368 (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v"
10369 version ".tar.gz"))
10370 (file-name (string-append name "-" version ".tar.gz"))
10371 (sha256
10372 (base32
10373 "0vp346xz7dh9br4q7xazhc7hvzf76a6hf95fki9bg67q5jr0kjh7"))))
10374 (build-system ant-build-system)
10375 (arguments
10376 `(#:jar-name (string-append ,name "-" ,version ".jar")
10377 #:source-dir "src/main/java"
10378 #:test-include (list "**/Test*.java")
10379 ;; Contains only interfaces and base classes (no test)
10380 #:test-exclude (list "**/test*/**.java")))
10381 (inputs
10382 `(("java-guava" ,java-guava)))
10383 (native-inputs
10384 `(("java-junit" ,java-junit)
10385 ("java-hamcrest-core" ,java-hamcrest-core)))
c82ddf33 10386 (home-page "https://www.joda.org/joda-convert/")
d57fd728
JL
10387 (synopsis "Conversion between Objects and Strings")
10388 (description "Joda-Convert provides a small set of classes to aid
10389conversion between Objects and Strings. It is not intended to tackle the
10390wider problem of Object to Object transformation.")
10391 (license license:asl2.0)))
0158ea8a
JL
10392
10393(define-public java-joda-time
10394 (package
10395 (name "java-joda-time")
10396 (version "2.9.9")
10397 (source (origin
10398 (method url-fetch)
10399 (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v"
10400 version ".tar.gz"))
10401 (file-name (string-append name "-" version ".tar.gz"))
10402 (sha256
10403 (base32
10404 "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1"))))
10405 (build-system ant-build-system)
10406 (arguments
10407 `(#:jar-name "java-joda-time.jar"
10408 #:source-dir "src/main/java"
10409 #:test-include (list "**/Test*.java")
10410 ;; There is no runnable test in these files
10411 #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java")
10412 #:phases
10413 (modify-phases %standard-phases
10414 (add-after 'build 'build-resources
10415 (lambda _
10416 (mkdir-p "build/classes/org/joda/time/tz/data")
10417 (mkdir-p "build/classes/org/joda/time/format")
6d0368eb
JL
10418 ;; This will produce the following exception:
10419 ;; java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap"
10420 ;; which is normal, because it doesn't exist yet. It still generates
10421 ;; the same file as in the binary one can find on maven.
10422 (invoke "java" "-cp"
10423 (string-append "build/classes:" (getenv "CLASSPATH"))
10424 "org.joda.time.tz.ZoneInfoCompiler"
10425 "-src" "src/main/java/org/joda/time/tz/src"
10426 "-dst" "build/classes/org/joda/time/tz/data"
10427 "africa" "antarctica" "asia" "australasia"
10428 "europe" "northamerica" "southamerica"
10429 "pacificnew" "etcetera" "backward" "systemv")
0158ea8a
JL
10430 (for-each (lambda (f)
10431 (copy-file f (string-append
10432 "build/classes/org/joda/time/format/"
10433 (basename f))))
10434 (find-files "src/main/java/org/joda/time/format" ".*.properties"))
10435 #t))
10436 (add-before 'install 'regenerate-jar
10437 (lambda _
10438 ;; We need to regenerate the jar file to add generated data.
10439 (delete-file "build/jar/java-joda-time.jar")
6d0368eb 10440 (invoke "ant" "jar")))
0158ea8a
JL
10441 (add-before 'check 'copy-test-resources
10442 (lambda _
10443 (mkdir-p "build/test-classes/org/joda/time/tz/data")
10444 (copy-file "src/test/resources/tzdata/ZoneInfoMap"
10445 "build/test-classes/org/joda/time/tz/data/ZoneInfoMap")
10446 (copy-recursively "src/test/resources" "build/test-classes")
10447 #t)))))
10448 (inputs
10449 `(("java-joda-convert" ,java-joda-convert)))
10450 (native-inputs
10451 `(("java-junit" ,java-junit)
10452 ("java-hamcrest-core" ,java-hamcrest-core)
10453 ("tzdata" ,tzdata)))
14544d2f 10454 (home-page "https://www.joda.org/joda-time/")
0158ea8a
JL
10455 (synopsis "Replacement for the Java date and time classes")
10456 (description "Joda-Time is a replacement for the Java date and time
10457classes prior to Java SE 8.")
10458 (license license:asl2.0)))
6d0368eb
JL
10459
10460(define-public java-xerces
10461 (package
10462 (name "java-xerces")
10463 (version "2.11.0")
10464 (source
10465 (origin
10466 (method url-fetch)
10467 (uri (string-append "mirror://apache/xerces/j/source/"
10468 "Xerces-J-src." version ".tar.gz"))
10469 (sha256
10470 (base32 "1006igwy2lqrmjvdk64v8dg6qbk9c29pm8xxx7r87n0vnpvmx6pm"))
10471 (patches (search-patches
10472 "java-xerces-xjavac_taskdef.patch"
10473 "java-xerces-build_dont_unzip.patch"
10474 "java-xerces-bootclasspath.patch"))))
10475 (build-system ant-build-system)
10476 (arguments
10477 `(#:tests? #f;; Test files are not present
10478 #:test-target "test"
10479 #:jdk ,icedtea-8
10480 #:phases
10481 (modify-phases %standard-phases
10482 (add-after 'unpack 'create-build.properties
10483 (lambda* (#:key inputs #:allow-other-keys)
10484 (let ((jaxp (assoc-ref inputs "java-jaxp"))
10485 (resolver (assoc-ref inputs "java-apache-xml-commons-resolver")))
10486 (with-output-to-file "build.properties"
10487 (lambda _
10488 (format #t
10489 "jar.jaxp = ~a/share/java/jaxp.jar~@
10490 jar.apis-ext = ~a/share/java/jaxp.jar~@
10491 jar.resolver = ~a/share/java/xml-resolver.jar~%"
10492 jaxp jaxp resolver)))
10493 ;; Make xerces use our version of jaxp in tests
10494 (substitute* "build.xml"
10495 (("xml-apis.jar")
10496 (string-append jaxp "/share/java/jaxp.jar"))
10497 (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}")
10498 "${jar.apis}")))
10499 #t))
10500 (replace 'install (install-jars "build")))))
10501 (inputs
10502 `(("java-apache-xml-commons-resolver" ,java-apache-xml-commons-resolver)
10503 ("java-jaxp" ,java-jaxp)))
10504 (home-page "https://xerces.apache.org/xerces2-j/")
10505 (synopsis "Validating XML parser for Java with DOM level 3 support")
10506 (description "The Xerces2 Java parser is the reference implementation of
10507XNI, the Xerces Native Interface, and also a fully conforming XML Schema
10508processor.
10509
10510Xerces2-J supports the following standards and APIs:
10511
10512@itemize
10513@item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation
10514@item Namespaces in XML Recommendation
10515@item Document Object Model (DOM) Level 2 Core, Events, and Traversal and
10516 Range Recommendations
10517@item Simple API for XML (SAX) 2.0.1 Core and Extension
10518@item Java APIs for XML Processing (JAXP) 1.2.01
10519@item XML Schema 1.0 Structures and Datatypes Recommendations
10520@item Experimental implementation of the Document Object Model (DOM) Level 3
10521 Core and Load/Save Working Drafts
10522@item Provides a partial implementation of the XML Inclusions (XInclude) W3C
10523 Candidate Recommendation
10524@end itemize
10525
10526Xerces is now able to parse documents written according to the XML 1.1
10527Candidate Recommendation, except that it does not yet provide an option to
10528enable normalization checking as described in section 2.13 of this
10529specification. It also handles namespaces according to the XML Namespaces 1.1
10530Candidate Recommendation, and will correctly serialize XML 1.1 documents if
10531the DOM level 3 load/save API's are in use.")
10532 (license license:asl2.0)))
e06bf428 10533
ae6922ed
DM
10534(define-public java-jakarta-regexp
10535 (package
10536 (name "java-jakarta-regexp")
10537 (version "1.5")
10538 (source
10539 (origin
10540 (method url-fetch)
10541 (uri (string-append
10542 "https://archive.apache.org/dist/jakarta/regexp/jakarta-regexp-"
10543 version ".tar.gz"))
10544 (sha256
10545 (base32
10546 "0zg9rmyif48dck0cv6ynpxv23mmcsx265am1fnnxss7brgw0ms3r"))))
10547 (build-system ant-build-system)
10548 (arguments
10549 `(#:test-target "test"
10550 #:phases
10551 (modify-phases %standard-phases
10552 (replace 'install
10553 (lambda* (#:key outputs #:allow-other-keys)
10554 (let* ((out (assoc-ref outputs "out"))
10555 (out-share (string-append out "/share/java")))
10556 (mkdir-p out-share)
10557 (for-each (lambda (name)
10558 (install-file name out-share))
10559 (find-files "build" "^jakarta-regexp-.*\\.jar$"))
10560 #t))))))
10561 (home-page "https://attic.apache.org/projects/jakarta-regexp.html")
10562 (synopsis "Regular expression parser generator for Java.")
10563 (description "@code{jakarta-regexp} is an old regular expression parser
10564generator for Java.")
10565 (license license:asl2.0)))
10566
e06bf428
JL
10567(define-public java-jline
10568 (package
10569 (name "java-jline")
10570 (version "1.0")
10571 (source (origin
10572 (method url-fetch)
10573 (uri (string-append "https://github.com/jline/jline1/archive/jline-"
10574 version ".tar.gz"))
10575 (sha256
10576 (base32
10577 "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir"))))
10578 (build-system ant-build-system)
10579 (arguments
10580 `(#:jar-name "jline.jar"
10581 #:source-dir "src/main/java"
10582 #:test-dir "src/test"
10583 #:phases
10584 (modify-phases %standard-phases
10585 (add-before 'build 'copy-resources
10586 (lambda _
10587 (copy-recursively "src/main/resources" "build/classes")
10588 #t)))))
10589 (native-inputs
10590 `(("java-junit" ,java-junit)))
10591 (home-page "https://jline.github.io")
10592 (synopsis "Console input handling library")
10593 (description "JLine is a Java library for handling console input. It is
10594similar in functionality to BSD editline and GNU readline but with additional
10595features that bring it on par with the Z shell line editor.")
10596 (license license:bsd-3)))
7ac4f054 10597
49d74311
JL
10598(define-public java-jline-2
10599 (package
10600 (inherit java-jline)
10601 (version "2.14.5")
10602 (source (origin
10603 (method url-fetch)
10604 (uri (string-append "https://github.com/jline/jline2/archive/jline-"
10605 version ".tar.gz"))
10606 (sha256
10607 (base32
10608 "1c6qa26mf0viw8hg4jnv72s7i1qb1gh1l8rrzcdvqhqhx82rkdlf"))))
10609 (arguments
10610 `(#:jdk ,icedtea-8
10611 ,@(package-arguments java-jline)))
10612 (inputs
10613 `(("java-jansi" ,java-jansi)
10614 ("java-jansi-native" ,java-jansi-native)))
10615 (native-inputs
10616 `(("java-powermock-modules-junit4" ,java-powermock-modules-junit4)
10617 ("java-powermock-modules-junit4-common" ,java-powermock-modules-junit4-common)
10618 ("java-powermock-api-easymock" ,java-powermock-api-easymock)
10619 ("java-powermock-api-support" ,java-powermock-api-support)
10620 ("java-powermock-core" ,java-powermock-core)
10621 ("java-powermock-reflect" ,java-powermock-reflect)
10622 ("java-easymock" ,java-easymock)
10623 ("java-jboss-javassist" ,java-jboss-javassist)
10624 ("java-objenesis" ,java-objenesis)
10625 ("java-asm" ,java-asm)
10626 ("java-hamcrest-core" ,java-hamcrest-core)
10627 ("java-cglib" ,java-cglib)
10628 ("java-junit" ,java-junit)
10629 ("java-hawtjni" ,java-hawtjni)))))
10630
7ac4f054
JL
10631(define-public java-xmlunit
10632 (package
10633 (name "java-xmlunit")
10634 (version "2.5.1")
10635 (source (origin
10636 (method url-fetch)
10637 (uri (string-append "https://github.com/xmlunit/xmlunit/archive/v"
10638 version ".tar.gz"))
10639 (file-name (string-append name "-" version ".tar.gz"))
10640 (sha256
10641 (base32
10642 "035rivlnmwhfqj0fzviciv0bkh1h95ps1iwnh2kjcvdbk5nccm4z"))))
10643 (build-system ant-build-system)
10644 (arguments
10645 `(#:jar-name "java-xmlunit.jar"
10646 #:source-dir "xmlunit-core/src/main/java"
10647 #:test-dir "xmlunit-core/src/test"
10648 #:phases
10649 (modify-phases %standard-phases
10650 (add-before 'check 'copy-test-resources
10651 (lambda* (#:key inputs #:allow-other-keys)
10652 (copy-recursively (assoc-ref inputs "resources") "../test-resources")
10653 #t)))))
10654 (native-inputs
10655 `(("java-junit" ,java-junit)
10656 ("java-mockito-1" ,java-mockito-1)
10657 ("java-hamcrest-all" ,java-hamcrest-all)
10658 ("java-objenesis" ,java-objenesis)
10659 ("java-asm" ,java-asm)
10660 ("java-cglib" ,java-cglib)
10661 ("resources"
10662 ,(origin
10663 (method git-fetch)
10664 (uri (git-reference
10665 (url "https://github.com/xmlunit/test-resources.git")
10666 (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec")))
10667 (file-name "java-xmlunit-test-resources")
10668 (sha256
10669 (base32
10670 "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr"))))))
10671 (home-page "http://www.xmlunit.org/")
10672 (synopsis "XML output testing")
10673 (description "XMLUnit provides you with the tools to verify the XML you
10674emit is the one you want to create. It provides helpers to validate against
10675an XML Schema, assert the values of XPath queries or compare XML documents
10676against expected outcomes.")
10677 (license license:asl2.0)))
73a1f10a
JL
10678
10679(define-public java-xmlunit-legacy
10680 (package
10681 (inherit java-xmlunit)
10682 (name "java-xmlunit-legacy")
10683 (arguments
10684 `(#:jar-name "java-xmlunit-legacy.jar"
10685 #:source-dir "xmlunit-legacy/src/main/java"
10686 #:test-dir "xmlunit-legacy/src/test"))
10687 (inputs
10688 `(("java-xmlunit" ,java-xmlunit)
10689 ("java-junit" ,java-junit)))
10690 (native-inputs
10691 `(("java-mockito-1" ,java-mockito-1)))))
93abc975 10692
f5cc5ead
JL
10693(define-public java-xmlunit-matchers
10694 (package
10695 (inherit java-xmlunit)
10696 (name "java-xmlunit-matchers")
10697 (arguments
10698 `(#:jar-name "java-xmlunit-matchers.jar"
10699 #:source-dir "xmlunit-matchers/src/main/java"
10700 #:test-dir "xmlunit-matchers/src/test"
10701 #:test-exclude
10702 ;; Cannot open xsd for http://www.xmlunit.org/test-support/Book.xsd
10703 (list "**/ValidationMatcherTest.java")
10704 #:phases
10705 (modify-phases %standard-phases
10706 (add-before 'build 'copy-test-class
10707 (lambda _
10708 (copy-file "xmlunit-core/src/test/java/org/xmlunit/TestResources.java"
10709 "xmlunit-matchers/src/test/java/org/xmlunit/TestResources.java")
10710 #t))
10711 (add-before 'build 'fix-test-resources-path
10712 (lambda _
10713 (substitute* (find-files "xmlunit-matchers/src/test" ".*.java")
10714 (("../test-resources") "test-resources"))
10715 #t))
10716 (add-before 'check 'copy-test-resources
10717 (lambda* (#:key inputs #:allow-other-keys)
10718 (copy-recursively (assoc-ref inputs "resources") "test-resources")
10719 #t)))))
10720 (inputs
10721 `(("java-xmlunit" ,java-xmlunit)
10722 ("java-junit" ,java-junit)))))
10723
93abc975
RW
10724(define-public java-openchart2
10725 (package
10726 (name "java-openchart2")
10727 (version "1.4.3")
10728 (source (origin
10729 (method url-fetch)
10730 (uri (string-append "http://download.approximatrix.com/openchart2/"
10731 "openchart2-" version ".source.zip"))
10732 (sha256
10733 (base32
10734 "1xq96zm5r02n1blja0072jmmsifmxc40lbyfbnmcnr6mw42frh4g"))))
10735 (build-system ant-build-system)
10736 (arguments
10737 `(#:test-target "test"
10738 #:phases
10739 (modify-phases %standard-phases
10740 (add-after 'unpack 'fix-junit-errors
10741 (lambda _
10742 (with-directory-excursion "unittest/src/com/approximatrix/charting/"
10743 (substitute* '("coordsystem/ticklocator/NumericXTickLocatorTest.java"
10744 "coordsystem/ticklocator/NumericYTickLocatorTest.java"
10745 "coordsystem/ticklocator/ObjectXTickLocatorTest.java"
10746 "model/DefaultChartDataModelConstraintsTest.java"
10747 "model/MultiScatterDataModelConstraintsTest.java"
10748 "model/threedimensional/DotPlotDataModelConstraintsTest.java")
10749 (("(assertEquals[^;]+);" before _)
10750 (string-append (string-drop-right before 2) ", 1E-6);"))))
10751 #t))
10752 (replace 'install (install-jars ".")))))
10753 (native-inputs
10754 `(("unzip" ,unzip)
10755 ("java-junit" ,java-junit)
10756 ("java-hamcrest-core" ,java-hamcrest-core)))
a809d632 10757 (home-page "https://approximatrix.com/products/openchart2/")
93abc975
RW
10758 (synopsis "Simple plotting for Java")
10759 (description "Openchart2 provides a simple, yet powerful, interface for
10760Java programmers to create two-dimensional charts and plots. The library
10761features an assortment of graph styles, including advanced scatter plots, bar
10762graphs, and pie charts.")
10763 (license license:lgpl2.1+)))
5f5b31c6
JL
10764
10765(define-public java-commons-httpclient
10766 (package
10767 (name "java-commons-httpclient")
10768 (version "3.1")
10769 (source (origin
10770 (method url-fetch)
10771 (uri (string-append "https://archive.apache.org/dist/httpcomponents/"
10772 "commons-httpclient/source/commons-httpclient-"
10773 version "-src.tar.gz"))
10774 (sha256
10775 (base32
10776 "1wlpn3cfy3d4inxy6g7wxcsa8p7sshn6aldk9y4ia3lb879rd97r"))))
10777 (build-system ant-build-system)
10778 (arguments
10779 `(#:build-target "compile"
10780 #:test-target "test"
10781 #:tests? #f; requires junit-textui (junit 3)
10782 #:phases
10783 (modify-phases %standard-phases
10784 (add-before 'build 'fix-accent
10785 (lambda _
10786 (for-each (lambda (file)
10787 (with-fluids ((%default-port-encoding "ISO-8859-1"))
10788 (substitute* file
10789 (("\\* @author Ortwin .*") "* @author Ortwin Glueck\n"))))
10790 '("src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java"
10791 "src/examples/TrivialApp.java" "src/examples/ClientApp.java"
10792 "src/test/org/apache/commons/httpclient/TestHttps.java"
2c8ac364
MW
10793 "src/test/org/apache/commons/httpclient/TestURIUtil2.java"))
10794 #t))
5f5b31c6
JL
10795 (replace 'install
10796 (lambda* (#:key outputs #:allow-other-keys)
10797 (invoke "ant" "dist"
10798 (string-append "-Ddist.home=" (assoc-ref outputs "out")
10799 "/share/java"))
10800 #t)))))
10801 (propagated-inputs
10802 `(("java-commons-logging" ,java-commons-logging-minimal)
10803 ("java-commons-codec" ,java-commons-codec)))
10804 (home-page "https://hc.apache.org")
10805 (synopsis "HTTP/1.1 compliant HTTP agent implementation")
10806 (description "This package contains an HTTP/1.1 compliant HTTP agent
10807implementation. It also provides reusable components for client-side
10808authentication, HTTP state management, and HTTP connection management.")
10809 (license license:asl2.0)))
5fe981dc
JL
10810
10811(define-public java-commons-vfs
10812 (package
10813 (name "java-commons-vfs")
10814 (version "2.2")
10815 (source (origin
10816 (method url-fetch)
10817 (uri (string-append "mirror://apache/commons/vfs/source/"
10818 "commons-vfs2-distribution-" version "-src.tar.gz"))
10819 (file-name (string-append name "-" version ".tar.gz"))
10820 (sha256
10821 (base32
10822 "1cnq1iaghbp4cslpnvwbp83i5v234x87irssqynhwpfgw7caf1s3"))
10823 (modules '((guix build utils)))
10824 (snippet
10825 '(begin
10826 (for-each delete-file
10827 (find-files "." "\\.jar$"))
10828 #t))))
10829 (build-system ant-build-system)
10830 (arguments
10831 `(#:jar-name "commons-vfs.jar"
10832 #:source-dir "commons-vfs2/src/main/java"
10833 #:test-dir "commons-vfs2/src/test"
10834 ; FIXME: tests depend on many things: apache sshd, hadoop, ftpserver, ...
10835 #:tests? #f
10836 #:phases
10837 (modify-phases %standard-phases
10838 (add-before 'build 'remove-hadoop-and-webdav
10839 ; Remove these files as they are not required and depend on difficult
10840 ; packages.
10841 (lambda _
10842 (for-each delete-file-recursively
10843 '("commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/webdav"
2c8ac364
MW
10844 "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs"))
10845 #t)))))
5fe981dc
JL
10846 (inputs
10847 `(("java-commons-collections4" ,java-commons-collections4)
10848 ("java-commons-compress" ,java-commons-compress)
10849 ("java-commons-httpclient" ,java-commons-httpclient)
10850 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
10851 ("java-commons-net" ,java-commons-net)
10852 ("java-jsch" ,java-jsch)))
4f236f84 10853 (home-page "https://commons.apache.org/proper/commons-vfs/")
52beae7b 10854 (synopsis "Java file system library")
5fe981dc
JL
10855 (description "Commons VFS provides a single API for accessing various
10856different file systems. It presents a uniform view of the files from various
10857different sources, such as the files on local disk, on an HTTP server, or
10858inside a Zip archive.")
10859 (license license:asl2.0)))
f7b512c0
JL
10860
10861(define-public java-jakarta-oro
10862 (package
10863 (name "java-jakarta-oro")
10864 (version "2.0.8")
10865 (source (origin
10866 (method url-fetch)
10867 (uri (string-append "https://archive.apache.org/dist/jakarta/oro/"
10868 "jakarta-oro-" version ".tar.gz"))
10869 (sha256
10870 (base32
10871 "0rpmnsskiwmsy8r0sckz5n5dbvh3vkxx8hpm177c754r8xy3qksc"))
10872 (modules '((guix build utils)))
10873 (snippet
10874 `(begin
10875 (delete-file (string-append "jakarta-oro-" ,version ".jar"))
10876 #t))))
10877 (build-system ant-build-system)
10878 (arguments
10879 `(#:build-target "package"
10880 #:tests? #f; tests are run as part of the build process
10881 #:phases
10882 (modify-phases %standard-phases
10883 (replace 'install
10884 (install-jars ,(string-append "jakarta-oro-" version))))))
10885 (home-page "https://jakarta.apache.org/oro/")
10886 (synopsis "Text-processing for Java")
10887 (description "The Jakarta-ORO Java classes are a set of text-processing
10888Java classes that provide Perl5 compatible regular expressions, AWK-like
10889regular expressions, glob expressions, and utility classes for performing
10890substitutions, splits, filtering filenames, etc. This library is the successor
10891of the OROMatcher, AwkTools, PerlTools, and TextTools libraries originally
10892from ORO, Inc.")
10893 (license license:asl1.1)))
a970288c
JL
10894
10895(define-public java-native-access
10896 (package
10897 (name "java-native-access")
10898 (version "4.5.1")
10899 (source (origin
10900 (method url-fetch)
10901 (uri (string-append "https://github.com/java-native-access/jna/"
10902 "archive/" version ".tar.gz"))
10903 (file-name (string-append name "-" version ".tar.gz"))
10904 (sha256
10905 (base32
10906 "0zrpzkib6b905i018a9pqlzkqinphywr6y4jwv6mwp63jjqvqkd9"))
10907 (modules '((guix build utils)))
10908 (snippet
10909 `(begin
10910 (for-each delete-file (find-files "." ".*.jar"))
10911 (delete-file-recursively "native/libffi")
10912 (delete-file-recursively "dist")
10913 #t))))
10914 (build-system ant-build-system)
10915 (arguments
10916 `(#:tests? #f; FIXME: tests require reflections.jar
10917 #:test-target "test"
10918 #:make-flags (list "-Ddynlink.native=true")
10919 #:phases
10920 (modify-phases %standard-phases
10921 (add-before 'build 'fix-build.xml
10922 (lambda* (#:key inputs #:allow-other-keys)
10923 (substitute* "build.xml"
10924 ;; Since we removed the bundled ant.jar, give the correct path
10925 (("lib/ant.jar") (string-append (assoc-ref inputs "ant") "/lib/ant.jar"))
10926 ;; We removed generated native libraries. We can only rebuild one
10927 ;; so don't fail if we can't find a native library for another architecture.
10928 (("zipfileset") "zipfileset erroronmissingarchive=\"false\""))
10929 ;; Copy test dependencies
10930 (copy-file (string-append (assoc-ref inputs "java-junit")
10931 "/share/java/junit.jar")
10932 "lib/junit.jar")
10933 (copy-file (string-append (assoc-ref inputs "java-hamcrest-core")
10934 "/share/java/hamcrest-core.jar")
10935 "lib/hamcrest-core.jar")
10936 ;; FIXME: once reflections.jar is built, copy it to lib/test.
10937 #t))
10938 (add-before 'build 'build-native
10939 (lambda _
10940 (invoke "ant" "-Ddynlink.native=true" "native")
10941 #t))
10942 (replace 'install
10943 (install-jars "build")))))
10944 (inputs
10945 `(("libffi" ,libffi)
10946 ("libx11" ,libx11)
10947 ("libxt" ,libxt)))
10948 (native-inputs
10949 `(("java-junit" ,java-junit)
10950 ("java-hamcrest-core" ,java-hamcrest-core)))
10951 (home-page "https://github.com/java-native-access/jna")
10952 (synopsis "Access to native shared libraries from Java")
10953 (description "JNA provides Java programs easy access to native shared
10954libraries without writing anything but Java code - no JNI or native code is
10955required. JNA allows you to call directly into native functions using natural
10956Java method invocation.")
10957 ;; Java Native Access project (JNA) is dual-licensed under 2
10958 ;; alternative Free licenses: LGPL 2.1 or later and Apache License 2.0.
10959 (license (list
10960 license:asl2.0
10961 license:lgpl2.1+))))
cfb55cfc
JL
10962
10963(define-public java-native-access-platform
10964 (package
10965 (inherit java-native-access)
10966 (name "java-native-access-platform")
10967 (arguments
10968 `(#:test-target "test"
10969 #:tests? #f; require jna-test.jar
10970 #:phases
10971 (modify-phases %standard-phases
10972 (add-before 'build 'chdir
10973 (lambda _
10974 (chdir "contrib/platform")
10975 #t))
10976 (add-after 'chdir 'fix-ant
10977 (lambda* (#:key inputs #:allow-other-keys)
10978 (substitute* "nbproject/project.properties"
10979 (("../../build/jna.jar")
10980 (string-append (assoc-ref inputs "java-native-access")
10981 "/share/java/jna.jar"))
10982 (("../../lib/hamcrest-core-.*.jar")
10983 (string-append (assoc-ref inputs "java-hamcrest-core")
10984 "/share/java/hamcrest-core.jar"))
10985 (("../../lib/junit.jar")
10986 (string-append (assoc-ref inputs "java-junit")
10987 "/share/java/junit.jar")))
10988 #t))
10989 (replace 'install
10990 (install-jars "dist")))))
10991 (inputs
10992 `(("java-native-access" ,java-native-access)))
10993 (synopsis "Cross-platform mappings for jna")
10994 (description "java-native-access-platfrom has cross-platform mappings
10995and mappings for a number of commonly used platform functions, including a
10996large number of Win32 mappings as well as a set of utility classes that
10997simplify native access.")))
470674a5
JL
10998
10999(define-public java-jsch-agentproxy-core
11000 (package
11001 (name "java-jsch-agentproxy-core")
11002 (version "0.0.8")
11003 (source (origin
11004 (method url-fetch)
11005 (uri (string-append "https://github.com/ymnk/jsch-agent-proxy/archive/"
11006 version ".tar.gz"))
11007 (file-name (string-append name "-" version ".tar.gz"))
11008 (sha256
11009 (base32
11010 "02iqg6jbc1kxvfzqcg6wy9ygqxfm82bw5rf6vnswqy4y572niz4q"))))
11011 (build-system ant-build-system)
11012 (arguments
11013 `(#:jar-name "jsch-agentproxy-core.jar"
11014 #:source-dir "jsch-agent-proxy-core/src/main/java"
11015 #:tests? #f)); no tests
11016 (home-page "https://github.com/ymnk/jsch-agent-proxy")
f1d79c97 11017 (synopsis "Core component of the proxy to ssh-agent and Pageant in Java")
470674a5
JL
11018 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
11019and Pageant included Putty. It will be easily integrated into JSch, and users
11020will be allowed to use these programs for authentication.")
11021 (license license:bsd-3)))
f1d79c97
JL
11022
11023(define-public java-jsch-agentproxy-sshagent
11024 (package
11025 (inherit java-jsch-agentproxy-core)
11026 (name "java-jsch-agentproxy-sshagent")
11027 (arguments
11028 `(#:jar-name "jsch-agentproxy-sshagent.jar"
11029 #:source-dir "jsch-agent-proxy-sshagent/src/main/java"
11030 #:tests? #f)); no tests
11031 (inputs
11032 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
11033 (synopsis "Proxy to ssh-agent")
11034 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
11035and Pageant included in Putty. This component contains the code for a proxy to
11036ssh-agent.")))
f438e638
JL
11037
11038(define-public java-jsch-agentproxy-usocket-jna
11039 (package
11040 (inherit java-jsch-agentproxy-core)
11041 (name "java-jsch-agentproxy-usocket-jna")
11042 (arguments
11043 `(#:jar-name "jsch-agentproxy-usocket-jna.jar"
11044 #:source-dir "jsch-agent-proxy-usocket-jna/src/main/java"
11045 #:tests? #f)); no tests
11046 (inputs
11047 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
11048 ("java-native-access" ,java-native-access)))
11049 (synopsis "USocketFactory implementation using JNA")
11050 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
11051and Pageant included in Putty. This component contains an implementation of
11052USocketFactory using @dfn{JNA} (Java Native Access).")))
475225e3
JL
11053
11054(define-public java-jsch-agentproxy-pageant
11055 (package
11056 (inherit java-jsch-agentproxy-core)
11057 (name "java-jsch-agentproxy-pageant")
11058 (arguments
11059 `(#:jar-name "jsch-agentproxy-pageant.jar"
11060 #:source-dir "jsch-agent-proxy-pageant/src/main/java"
11061 #:tests? #f)); no tests
11062 (inputs
11063 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
11064 ("java-native-access" ,java-native-access)
11065 ("java-native-access-platform" ,java-native-access-platform)))
11066 (synopsis "Proxy to pageant")
11067 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
11068and Pageant included in Putty. This component contains the code for a proxy to
11069pageant.")))
96d6d9c7
JL
11070
11071(define-public java-jsch-agentproxy-usocket-nc
11072 (package
11073 (inherit java-jsch-agentproxy-core)
11074 (name "java-jsch-agentproxy-usocket-nc")
11075 (arguments
11076 `(#:jar-name "jsch-agentproxy-usocket-nc.jar"
11077 #:source-dir "jsch-agent-proxy-usocket-nc/src/main/java"
11078 #:tests? #f)); no tests
11079 (inputs
11080 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
11081 (synopsis "USocketFactory implementation using netcat")
11082 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
11083and Pageant included in Putty. This component contains an implementation of
11084USocketFactory using netcat.")))
5a46b17b
JL
11085
11086(define-public java-jsch-agentproxy-connector-factory
11087 (package
11088 (inherit java-jsch-agentproxy-core)
11089 (name "java-jsch-agentproxy-connector-factory")
11090 (arguments
11091 `(#:jar-name "jsch-agentproxy-connector-factory.jar"
11092 #:source-dir "jsch-agent-proxy-connector-factory/src/main/java"
11093 #:tests? #f)); no tests
11094 (inputs
11095 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
11096 ("java-jsch-agentproxy-sshagent" ,java-jsch-agentproxy-sshagent)
11097 ("java-jsch-agentproxy-usocket-jna" ,java-jsch-agentproxy-usocket-jna)
11098 ("java-jsch-agentproxy-pageant" ,java-jsch-agentproxy-pageant)
11099 ("java-jsch-agentproxy-usocket-nc" ,java-jsch-agentproxy-usocket-nc)))
11100 (synopsis "Connector factory for jsch agent proxy")
11101 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
11102and Pageant included in Putty. This component contains a connector factory.")))
b0fbf596
JL
11103
11104(define-public java-jsch-agentproxy-jsch
11105 (package
11106 (inherit java-jsch-agentproxy-core)
11107 (name "java-jsch-agentproxy-jsch")
11108 (arguments
11109 `(#:jar-name "jsch-agentproxy-jsch.jar"
11110 #:source-dir "jsch-agent-proxy-jsch/src/main/java"
11111 #:tests? #f)); no tests
11112 (inputs
11113 `(("java-jsch" ,java-jsch)
11114 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
11115 (synopsis "JSch integration library for agentproxy")
11116 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
11117and Pageant included in Putty. This component contains a library to use
11118jsch-agent-proxy with JSch.")))
f1f4a4f0
JL
11119
11120(define-public java-apache-ivy
11121 (package
11122 (name "java-apache-ivy")
11123 (version "2.4.0")
11124 (source (origin
11125 (method url-fetch)
11126 (uri (string-append "mirror://apache//ant/ivy/" version
11127 "/apache-ivy-" version "-src.tar.gz"))
11128 (sha256
11129 (base32
11130 "1xkfn57g2m7l6y0xdq75x5rnrgk52m9jx2xah70g3ggl8750hbr0"))
11131 (patches
11132 (search-patches
11133 "java-apache-ivy-port-to-latest-bouncycastle.patch"))))
11134 (build-system ant-build-system)
11135 (arguments
11136 `(#:jar-name "ivy.jar"
11137 #:tests? #f
11138 #:phases
11139 (modify-phases %standard-phases
11140 (add-before 'build 'remove-example
11141 (lambda _
11142 (delete-file-recursively "src/example")
11143 #t))
11144 (add-before 'build 'copy-resources
11145 (lambda _
11146 (with-directory-excursion "src/java"
11147 (for-each (lambda (file)
11148 (install-file file (string-append "../../build/classes/" (dirname file))))
11149 (append
11150 (find-files "." ".*.css")
11151 (find-files "." ".*.ent")
11152 (find-files "." ".*.html")
11153 (find-files "." ".*.properties")
11154 (find-files "." ".*.xsd")
11155 (find-files "." ".*.xsl")
2c8ac364
MW
11156 (find-files "." ".*.xml"))))
11157 #t))
f1f4a4f0
JL
11158 (add-before 'build 'fix-vfs
11159 (lambda _
11160 (substitute*
11161 '("src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java"
11162 "src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java")
11163 (("import org.apache.commons.vfs") "import org.apache.commons.vfs2"))
11164 #t))
11165 (add-before 'install 'copy-manifest
11166 (lambda _
11167 (install-file "META-INF/MANIFEST.MF" "build/classes/META-INF")
11168 #t))
11169 (add-before 'install 'repack
11170 (lambda _
11171 (invoke "jar" "-cmf" "build/classes/META-INF/MANIFEST.MF" "build/jar/ivy.jar"
2c8ac364 11172 "-C" "build/classes" ".")))
f1f4a4f0
JL
11173 (add-after 'install 'install-bin
11174 (lambda* (#:key outputs #:allow-other-keys)
11175 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
11176 (ivy (string-append bin "/ivy"))
11177 (jar (string-append (assoc-ref outputs "out") "/share/java/ivy.jar")))
11178 (mkdir-p bin)
11179 (with-output-to-file ivy
11180 (lambda _
11181 (display (string-append
11182 "#!" (which "sh") "\n"
11183 "if [[ -z $CLASSPATH ]]; then\n"
11184 " cp=\"" (getenv "CLASSPATH") ":" jar "\"\n"
11185 "else\n"
11186 " cp=\"" (getenv "CLASSPATH") ":" jar ":$CLASSPATH\"\n"
11187 "fi\n"
11188 (which "java") " -cp $cp org.apache.ivy.Main $@\n"))))
11189 (chmod ivy #o755)
11190 #t))))))
11191 (inputs
11192 `(("java-bouncycastle" ,java-bouncycastle)
11193 ("java-commons-cli" ,java-commons-cli)
11194 ("java-commons-collections" ,java-commons-collections)
11195 ("java-commons-httpclient" ,java-commons-httpclient)
11196 ("java-commons-lang" ,java-commons-lang)
11197 ("java-commons-vfs" ,java-commons-vfs)
11198 ("java-jakarta-oro" ,java-jakarta-oro)
11199 ("java-jsch" ,java-jsch)
11200 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
11201 ("java-jsch-agentproxy-connector-factory" ,java-jsch-agentproxy-connector-factory)
11202 ("java-jsch-agentproxy-jsch" ,java-jsch-agentproxy-jsch)
11203 ("java-junit" ,java-junit)))
11204 (home-page "https://ant.apache.org/ivy")
11205 (synopsis "Dependency manager for the Java programming language")
11206 (description "Ivy is a tool for managing (recording, tracking, resolving
11207and reporting) project dependencies. It is characterized by the following:
11208
11209@itemize
11210@item flexibility and configurability - Ivy is essentially process agnostic
11211 and is not tied to any methodology or structure. Instead it provides the
11212 necessary flexibility and configurability to be adapted to a broad range
11213 of dependency management and build processes.
11214@item tight integration with Apache Ant - while available as a standalone tool,
11215 Ivy works particularly well with Apache Ant providing a number of
11216 powerful Ant tasks ranging from dependency resolution to dependency
11217 reporting and publication.
11218@end itemize")
11219 (license license:asl2.0)))
1a1810f5
JL
11220
11221(define-public java-eclipse-sisu-inject
11222 (package
11223 (name "java-eclipse-sisu-inject")
11224 (version "0.3.3")
11225 (source (origin
ae69b39e
BH
11226 (method git-fetch)
11227 (uri (git-reference
11228 (url "https://github.com/eclipse/sisu.inject/")
11229 (commit "releases/0.3.3")))
11230 (file-name (git-file-name name version))
1a1810f5
JL
11231 (sha256
11232 (base32
ae69b39e 11233 "0gibc9x0bw0f4ls086fx73610fcspz9g2as7kcpcfhvl5znysvg7"))))
1a1810f5
JL
11234 (build-system ant-build-system)
11235 (arguments
11236 `(#:jar-name "eclipse-sisu-inject.jar"
11237 #:source-dir "org.eclipse.sisu.inject/src"
11238 #:jdk ,icedtea-8
11239 #:tests? #f)); no tests
11240 (inputs
11241 `(("java-guice" ,java-guice)
11242 ("java-guice-servlet" ,java-guice-servlet)
11243 ("java-javax-inject" ,java-javax-inject)
4b472f6a 11244 ("java-javaee-servletapi" ,java-javaee-servletapi)
1a1810f5
JL
11245 ("java-junit" ,java-junit)
11246 ("java-slf4j-api" ,java-slf4j-api)
11247 ("java-jsr305" ,java-jsr305)
11248 ("java-jsr250" ,java-jsr250)
11249 ("java-cdi-api" ,java-cdi-api)
11250 ("java-osgi-framework" ,java-osgi-framework)
11251 ("java-osgi-util-tracker" ,java-osgi-util-tracker)
11252 ("java-testng" ,java-testng)))
11253 (home-page "https://www.eclipse.org/sisu/")
11254 (synopsis "Classpath scanning, auto-binding, and dynamic auto-wiring")
11255 (description "Sisu is a modular JSR330-based container that supports
11256classpath scanning, auto-binding, and dynamic auto-wiring. Sisu uses
11257Google-Guice to perform dependency injection and provide the core JSR330
11258support, but removes the need to write explicit bindings in Guice modules.
11259Integration with other containers via the Eclipse Extension Registry and the
11260OSGi Service Registry is a goal of this project.")
11261 (license license:epl1.0)))
7049dea1
JL
11262
11263(define-public java-eclipse-sisu-plexus
11264 (package
11265 (name "java-eclipse-sisu-plexus")
e0c0b078 11266 (version "0.3.4")
7049dea1 11267 (source (origin
3560a2cd
EF
11268 (method git-fetch)
11269 (uri (git-reference
11270 (url "https://github.com/eclipse/sisu.plexus.git")
11271 (commit (string-append "releases/" version))))
11272 (file-name (git-file-name name version))
7049dea1
JL
11273 (sha256
11274 (base32
e0c0b078 11275 "17mjlajnsqnk07cc58h1qpxrif85yb2m2y0pyba48yjjgikk8r9f"))
7049dea1
JL
11276 (modules '((guix build utils)))
11277 (snippet
11278 '(begin
11279 (for-each delete-file (find-files "." ".*.jar"))
11280 (rename-file "org.eclipse.sisu.plexus.tests/src"
11281 "org.eclipse.sisu.plexus.tests/java")
11282 #t))))
11283 (build-system ant-build-system)
11284 (arguments
11285 `(#:jar-name "eclipse-sisu-plexus.jar"
11286 #:source-dir "org.eclipse.sisu.plexus/src"
11287 #:test-dir "org.eclipse.sisu.plexus.tests"
11288 #:test-exclude
11289 (list
11290 ;; This test fails probably because we can't generate the necessary
11291 ;; meta-inf files.
11292 "**/PlexusLoggingTest.*"
11293 ;; FIXME: This test fails because of some injection error
11294 "**/PlexusRequirementTest.*")
11295 #:jdk ,icedtea-8
11296 #:phases
11297 (modify-phases %standard-phases
11298 (add-before 'build 'copy-resources
11299 (lambda _
11300 (install-file "org.eclipse.sisu.plexus/META-INF/plexus/components.xml"
11301 "build/classes/META-INF/plexus")
11302 #t))
11303 (add-before 'check 'build-test-jar
11304 (lambda _
11305 (with-directory-excursion "org.eclipse.sisu.plexus.tests/resources/component-jar/src/main/"
11306 (mkdir "build")
11307 (with-directory-excursion "java"
11308 (apply invoke "javac" "-cp"
11309 (string-append (getenv "CLASSPATH")
11310 ":../../../../../build/classes")
11311 (find-files "." ".*.java"))
11312 (for-each (lambda (file) (install-file file (string-append "../build/" file)))
11313 (find-files "." ".*.jar")))
11314 (mkdir-p "build/META-INF/plexus")
11315 (copy-file "resources/META-INF/plexus/components.xml"
11316 "build/META-INF/plexus/components.xml")
11317 (with-directory-excursion "build"
11318 (invoke "jar" "cf" "../../../component-jar-0.1.jar" ".")))
11319 (with-directory-excursion "org.eclipse.sisu.plexus.tests/"
11320 (copy-recursively "META-INF" "../build/test-classes/META-INF")
11321 (substitute* "java/org/eclipse/sisu/plexus/DefaultPlexusContainerTest.java"
11322 (("resources/component-jar")
11323 "org.eclipse.sisu.plexus.tests/resources/component-jar")))
11324 #t)))))
11325 (inputs
11326 `(("java-plexus-classworlds" ,java-plexus-classworlds)
11327 ("java-plexus-util" ,java-plexus-utils)
11328 ("java-plexus-component-annotations" ,java-plexus-component-annotations)
11329 ("java-osgi-framework" ,java-osgi-framework)
11330 ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)
11331 ("java-guice" ,java-guice)
11332 ("java-javax-inject" ,java-javax-inject)
11333 ("java-slf4j-api" ,java-slf4j-api)
11334 ("java-junit" ,java-junit)))
11335 (native-inputs
11336 `(("java-guava" ,java-guava)
11337 ("java-aopalliance" ,java-aopalliance)
11338 ("java-cglib" ,java-cglib)
11339 ("java-asm" ,java-asm)))
11340 (home-page "https://www.eclipse.org/sisu/")
11341 (synopsis "Plexus support for the sisu container")
11342 (description "Sisu is a modular JSR330-based container that supports
11343classpath scanning, auto-binding, and dynamic auto-wiring. This package
11344adds Plexus support to the Sisu-Inject container.")
11345 (license license:epl1.0)))
3fa18fe7
JL
11346
11347(define-public java-commons-compiler
11348 (package
11349 (name "java-commons-compiler")
11350 (version "3.0.8")
11351 (source (origin
11352 (method git-fetch)
11353 (uri (git-reference
11354 (url "https://github.com/janino-compiler/janino")
11355 (commit "91aa95686d1e4ca3b16a984a03a38686572331b2")))
11356 (file-name (string-append name "-" version))
11357 (sha256
11358 (base32
11359 "04hfdl59sgh20qkxzgnibvs8f9hy6n7znxwpk611y5d89977y62r"))
11360 (modules '((guix build utils)))
11361 (snippet
11362 '(begin
11363 (for-each delete-file
11364 (find-files "." "\\.jar$"))
11365 #t))))
11366 (build-system ant-build-system)
11367 (arguments
11368 `(#:jar-name "commons-compiler.jar"
11369 #:source-dir "commons-compiler/src/main"
11370 #:tests? #f)); no tests
11371 (home-page "https://github.com/janino-compiler/janino")
11372 (synopsis "Java compiler")
11373 (description "Commons-compiler contains an API for janino, including the
11374@code{IExpressionEvaluator}, @code{IScriptEvaluator}, @code{IClassBodyEvaluator}
11375and @code{ISimpleCompiler} interfaces.")
11376 (license license:bsd-3)))
3402e651
JL
11377
11378(define-public java-janino
11379 (package
11380 (inherit java-commons-compiler)
11381 (name "java-janino")
11382 (arguments
11383 `(#:jar-name "janino.jar"
11384 #:source-dir "src/main/java"
11385 #:phases
11386 (modify-phases %standard-phases
11387 (add-before 'configure 'chdir
11388 (lambda _
2c8ac364
MW
11389 (chdir "janino")
11390 #t)))))
3402e651
JL
11391 (inputs
11392 `(("java-commons-compiler" ,java-commons-compiler)))
11393 (native-inputs
11394 `(("java-junit" ,java-junit)
11395 ("java-hamcrest-core" ,java-hamcrest-core)))
11396 (description "Janino is a Java compiler. Janino can compile a set of
11397source files to a set of class files like @code{javac}, but also compile a
11398Java expression, block, class body or source file in memory, load the bytecode
11399and execute it directly in the same JVM. @code{janino} can also be used for
11400static code analysis or code manipulation.")))
7d8207a4
JL
11401
11402(define-public java-logback-core
11403 (package
11404 (name "java-logback-core")
11405 (version "1.2.3")
11406 (source (origin
11407 (method url-fetch)
11408 (uri (string-append "https://github.com/qos-ch/logback/archive/v_"
11409 version ".tar.gz"))
b1ccd2a1 11410 (file-name (string-append name "-" version ".tar.gz"))
7d8207a4
JL
11411 (sha256
11412 (base32
11413 "1x6ga74yfgm94cfx98gybakbrlilx8i2gn6dx13l40kasmys06mi"))
11414 (modules '((guix build utils)))
11415 (snippet
2c8ac364
MW
11416 '(begin
11417 (delete-file-recursively "logback-access/lib")
11418 #t))))
7d8207a4
JL
11419 (build-system ant-build-system)
11420 (arguments
11421 `(#:jar-name "logback.jar"
11422 #:source-dir "src/main/java"
11423 #:test-dir "src/test"
11424 #:test-exclude
11425 ;; These tests fail with Unable to set MockitoNamingPolicy on cglib generator
11426 ;; which creates FastClasses
11427 (list "**/AllCoreTest.*"
11428 "**/AutoFlushingObjectWriterTest.*"
11429 "**/PackageTest.*"
11430 "**/ResilientOutputStreamTest.*"
11431 ;; And we still don't want to run abstract classes
11432 "**/Abstract*.*")
11433 #:phases
11434 (modify-phases %standard-phases
11435 (add-before 'configure 'chdir
11436 (lambda _
11437 (chdir "logback-core")
11438 #t)))))
11439 (inputs
11440 `(("java-javax-mail" ,java-javax-mail)
4b472f6a 11441 ("servlet" ,java-javaee-servletapi)
7d8207a4
JL
11442 ("java-commons-compiler" ,java-commons-compiler)
11443 ("java-janino" ,java-janino)))
11444 (native-inputs
11445 `(("java-junit" ,java-junit)
11446 ("java-hamcrest-core" ,java-hamcrest-core)
11447 ("java-mockito-1" ,java-mockito-1)
11448 ("java-cglib" ,java-cglib)
11449 ("java-asm" ,java-asm)
11450 ("java-objenesis" ,java-objenesis)
11451 ("java-joda-time" ,java-joda-time)))
11452 (home-page "https://logback.qos.ch")
11453 (synopsis "Logging for java")
11454 (description "Logback is intended as a successor to the popular log4j project.
11455This module lays the groundwork for the other two modules.")
11456 ;; Either epl1.0 or lgpl2.1
11457 (license (list license:epl1.0
11458 license:lgpl2.1))))
3a69f5f2
JL
11459
11460(define-public java-logback-classic
11461 (package
11462 (inherit java-logback-core)
11463 (name "java-logback-classic")
11464 (arguments
11465 `(#:jar-name "logback-classic.jar"
11466 #:source-dir "src/main/java"
11467 #:test-dir "src/test"
11468 #:tests? #f; tests require more packages: h2, greenmail, hsql, subethamail, slf4j, log4j, felix
11469 #:jdk ,icedtea-8
11470 #:phases
11471 (modify-phases %standard-phases
11472 (add-before 'configure 'chdir
11473 (lambda _
11474 (chdir "logback-classic")
11475 #t))
11476 (replace 'build
11477 (lambda* (#:key inputs #:allow-other-keys)
11478 (mkdir-p "build/classes")
11479 (setenv "CLASSPATH"
11480 (string-join
11481 (apply append (map (lambda (input)
11482 (find-files (assoc-ref inputs input)
11483 ".*.jar"))
11484 '("java-logback-core" "java-slf4j-api"
4b472f6a 11485 "java-commons-compiler" "servlet"
3a69f5f2
JL
11486 "groovy")))
11487 ":"))
11488 (apply invoke "groovyc" "-d" "build/classes" "-j"
11489 (find-files "src/main/" ".*\\.(groovy|java)$"))
11490 (invoke "ant" "jar")
11491 #t)))))
11492 (inputs
11493 `(("java-logback-core" ,java-logback-core)
11494 ("java-slf4j-api" ,java-slf4j-api)
11495 ,@(package-inputs java-logback-core)))
11496 (native-inputs
11497 `(("groovy" ,groovy)))
11498 (description "Logback is intended as a successor to the popular log4j project.
11499This module can be assimilated to a significantly improved version of log4j.
11500Moreover, @code{logback-classic} natively implements the slf4j API so that you
11501can readily switch back and forth between logback and other logging frameworks
11502such as log4j or @code{java.util.logging} (JUL).")))
ab621bf1 11503
c786dff0
LC
11504(define-public java-jgit
11505 (package
11506 (name "java-jgit")
11507 (version "4.7.0.201704051617-r")
11508 (source (origin
11509 (method url-fetch)
11510 (uri (string-append "https://repo1.maven.org/maven2/"
11511 "org/eclipse/jgit/org.eclipse.jgit/"
11512 version "/org.eclipse.jgit-"
11513 version "-sources.jar"))
11514 (sha256
11515 (base32
11516 "13ii4jn02ynzq6i7gsyi21k2i94jpc85wf6bcm31q4cyvzv0mk4k"))))
11517 (build-system ant-build-system)
11518 (arguments
11519 `(#:tests? #f ; There are no tests to run.
11520 #:jar-name "jgit.jar"
11521 ;; JGit must be built with a JDK supporting Java 8.
11522 #:jdk ,icedtea-8
11523 ;; Target our older default JDK.
11524 #:make-flags (list "-Dtarget=1.7")
11525 #:phases
11526 (modify-phases %standard-phases
11527 ;; The jar file generated by the default build.xml does not include
11528 ;; the text properties files, so we need to add them.
11529 (add-after 'build 'add-properties
11530 (lambda* (#:key jar-name #:allow-other-keys)
11531 (with-directory-excursion "src"
11532 (apply invoke "jar" "-uf"
11533 (string-append "../build/jar/" jar-name)
11534 (find-files "." "\\.properties$")))
11535 #t)))))
11536 (inputs
11537 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
11538 ("java-javaewah" ,java-javaewah)
11539 ("java-jsch" ,java-jsch)
11540 ("java-slf4j-api" ,java-slf4j-api)))
11541 (home-page "https://eclipse.org/jgit/")
11542 (synopsis "Java library implementing the Git version control system")
11543 (description "JGit is a lightweight, pure Java library implementing the
11544Git version control system, providing repository access routines, support for
11545network protocols, and core version control algorithms.")
11546 (license license:edl1.0)))
11547
11548;; For axoloti. This package can still be built with icedtea-7, which is
11549;; currently used as the default JDK.
11550(define-public java-jgit-4.2
11551 (package (inherit java-jgit)
11552 (version "4.2.0.201601211800-r")
11553 (source (origin
11554 (method url-fetch)
11555 (uri (string-append "https://repo1.maven.org/maven2/"
11556 "org/eclipse/jgit/org.eclipse.jgit/"
11557 version "/org.eclipse.jgit-"
11558 version "-sources.jar"))
11559 (sha256
11560 (base32
11561 "15gm537iivhnzlkjym4x3wn5jqdjdragsw9pdpzqqg21nrc817mm"))))
11562 (build-system ant-build-system)
11563 (arguments
11564 (substitute-keyword-arguments (package-arguments java-jgit)
11565 ;; Build for default JDK.
11566 ((#:jdk _) icedtea-7)
11567 ((#:phases phases)
11568 `(modify-phases ,phases
11569 (add-after 'unpack 'use-latest-javaewah-API
11570 (lambda _
11571 (substitute* "src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java"
11572 (("wordinbits") "WORD_IN_BITS"))
11573 #t))))))
11574 (inputs
11575 `(("java-javaewah" ,java-javaewah)
11576 ("java-jsch" ,java-jsch)
11577 ("java-slf4j-api" ,java-slf4j-api)))))
717b6ba6
CZ
11578
11579(define-public abcl
11580 (package
11581 (name "abcl")
514001e9 11582 (version "1.6.0")
717b6ba6
CZ
11583 (source
11584 (origin
11585 (method url-fetch)
11586 (uri (string-append "https://abcl.org/releases/"
11587 version "/abcl-src-" version ".tar.gz"))
11588 (sha256
11589 (base32
514001e9 11590 "0hvbcsffr8n2xwdixc8wyw1bfl9fxn2gyy0c4nma7j9zbn0wwgw9"))
717b6ba6
CZ
11591 (patches
11592 (search-patches
11593 "abcl-fix-build-xml.patch"))))
11594 (build-system ant-build-system)
11595 (native-inputs
11596 `(("java-junit" ,java-junit)))
11597 (arguments
11598 `(#:build-target "abcl.jar"
11599 #:test-target "abcl.test"
11600 #:phases
11601 (modify-phases %standard-phases
11602 (replace 'install
11603 (lambda* (#:key outputs #:allow-other-keys)
11604 (let ((share (string-append (assoc-ref outputs "out")
11605 "/share/java/"))
11606 (bin (string-append (assoc-ref outputs "out")
11607 "/bin/")))
11608 (mkdir-p share)
11609 (install-file "dist/abcl.jar" share)
11610 (install-file "dist/abcl-contrib.jar" share)
11611 (mkdir-p bin)
11612 (with-output-to-file (string-append bin "abcl")
11613 (lambda _
11614 (let ((classpath (string-append
11615 share "abcl.jar"
11616 ":"
11617 share "abcl-contrib.jar")))
11618 (display (string-append
11619 "#!" (which "sh") "\n"
11620 "if [[ -z $CLASSPATH ]]; then\n"
11621 " cp=\"" classpath "\"\n"
11622 "else\n"
11623 " cp=\"" classpath ":$CLASSPATH\"\n"
11624 "fi\n"
11625 "exec " (which "java")
11626 " -cp $cp org.armedbear.lisp.Main $@\n")))))
11627 (chmod (string-append bin "abcl") #o755)
11628 #t))))))
11629 (home-page "https://abcl.org/")
11630 (synopsis "Common Lisp Implementation on the JVM")
11631 (description
11632 "@dfn{Armed Bear Common Lisp} (ABCL) is a full implementation of the Common
11633Lisp language featuring both an interpreter and a compiler, running in the
11634JVM. It supports JSR-223 (Java scripting API): it can be a scripting engine
11635in any Java application. Additionally, it can be used to implement (parts of)
11636the application using Java to Lisp integration APIs.")
11637 (license (list license:gpl2+
11638 ;; named-readtables is released under 3 clause BSD
11639 license:bsd-3
11640 ;; jfli is released under CPL 1.0
11641 license:cpl1.0))))
da655b1e
JL
11642
11643(define-public java-jsonp-api
11644 (package
11645 (name "java-jsonp-api")
83c4c502 11646 (version "1.1.6")
da655b1e
JL
11647 (source (origin
11648 (method git-fetch)
11649 (uri (git-reference
11650 (url "https://github.com/eclipse-ee4j/jsonp")
83c4c502 11651 (commit (string-append "1.1-" version "-RELEASE"))))
da655b1e
JL
11652 (file-name (git-file-name name version))
11653 (sha256
11654 (base32
83c4c502 11655 "0zrj03hkr3jdmqlb4ipjr37cqpp2q2814qpmxi7srlwpdqs0ibgc"))))
da655b1e
JL
11656 (build-system ant-build-system)
11657 (arguments
11658 `(#:jar-name "jsonp-api.jar"
11659 #:tests? #f
11660 #:source-dir "api/src/main/java"
11661 #:test-dir "api/src/test"))
11662 (home-page "https://eclipse-ee4j.github.io/jsonp/")
11663 (synopsis "JSON Processing in Java")
11664 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
11665parse, generate, transform and query) JSON messages. It produces and
11666consumes JSON text in a streaming fashion (similar to StAX API for XML)
44a057a1 11667and allows building a Java object model for JSON text using API classes
da655b1e
JL
11668(similar to DOM API for XML).")
11669 ;; either gpl2 only with classpath exception, or epl2.0.
11670 (license (list license:gpl2
11671 license:epl2.0))))
d45f73c9
JL
11672
11673(define-public java-jsonp-impl
11674 (package
11675 (inherit java-jsonp-api)
11676 (name "java-jsonp-impl")
11677 (arguments
11678 `(#:jar-name "jsonp-impl.jar"
11679 #:tests? #f
11680 #:source-dir "impl/src/main/java"
83c4c502
JL
11681 #:test-dir "impl/src/test"
11682 #:phases
11683 (modify-phases %standard-phases
11684 (add-before 'build 'copy-resources
11685 (lambda _
11686 (copy-recursively
11687 "impl/src/main/resources/"
11688 "build/classes")
11689 #t)))))
d45f73c9
JL
11690 (propagated-inputs
11691 `(("java-jsonp-api" ,java-jsonp-api)))
11692 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
11693parse, generate, transform and query) JSON messages. This package contains
11694a reference implementation of that API.")))
357f4564
JL
11695
11696(define-public java-xmp
11697 (package
11698 (name "java-xmp")
11699 (version "5.1.3")
11700 (source (origin
11701 (method url-fetch)
11702 (uri (string-append "http://download.macromedia.com/pub/developer"
11703 "/xmp/sdk/XMPCoreJava-" version ".zip"))
11704 (sha256
11705 (base32
11706 "14nai2mmsg7l5ya2y5mx4w4lr1az3sk2fjz6hiy4zdrsavgvl1g7"))))
11707 (build-system ant-build-system)
11708 (arguments
11709 `(#:build-target "build"
11710 #:tests? #f; no tests
11711 #:phases
11712 (modify-phases %standard-phases
11713 (add-after 'unpack 'chdir
11714 (lambda _
11715 (chdir "XMPCore")
11716 #t))
11717 (add-before 'build 'fix-timestamp
11718 (lambda _
11719 (substitute* "build.xml"
11720 (("\\$\\{BuildDate\\}") "1970 Jan 01 00:00:00-GMT"))
11721 #t))
11722 (replace 'install
11723 (install-jars "."))
11724 (add-after 'install 'install-doc
11725 (lambda* (#:key outputs #:allow-other-keys)
11726 (copy-recursively
11727 "docs"
11728 (string-append (assoc-ref outputs "out") "/share/doc/java-xmp"))
11729 #t)))))
11730 (native-inputs
11731 `(("unzip" ,unzip)))
11732 (home-page "https://www.adobe.com/devnet/xmp.html")
11733 (synopsis "Extensible Metadat Platform (XMP) support in Java")
11734 (description "Adobe's Extensible Metadata Platform (XMP) is a labeling
11735technology that allows you to embed data about a file, known as metadata,
11736into the file itself. The XMP Toolkit for Java is based on the C++ XMPCore
11737library and the API is similar.")
11738 (license license:bsd-3)))
a005c63a
JL
11739
11740(define-public java-metadata-extractor
11741 (package
11742 (name "java-metadata-extractor")
11743 (version "2.11.0")
11744 (source (origin
11745 (method git-fetch)
11746 (uri (git-reference
11747 (url "https://github.com/drewnoakes/metadata-extractor")
11748 (commit version)))
11749 (file-name (git-file-name name version))
11750 (sha256
11751 (base32
11752 "06yrq0swrl1r40yjbk5kqzjxr04jlkq9lfi711jvfgjf5kp2qinj"))))
11753 (build-system ant-build-system)
11754 (arguments
11755 `(#:jar-name "metadata-extractor.jar"
11756 #:source-dir "Source"
11757 #:test-dir "Tests"
11758 #:phases
11759 (modify-phases %standard-phases
11760 (add-before 'check 'fix-test-dir
11761 (lambda _
11762 (substitute* "build.xml"
11763 (("/java\">") "\">"))
11764 #t)))))
11765 (propagated-inputs
11766 `(("java-xmp" ,java-xmp)))
11767 (native-inputs
11768 `(("java-hamcrest-core" ,java-hamcrest-core)
11769 ("java-junit" ,java-junit)))
11770 (home-page "https://github.com/drewnoakes/metadata-extractor")
11771 (synopsis "Extract metadata from image and video files")
11772 (description "Metadata-extractor is a straightforward Java library for
11773reading metadata from image files. It is able to read metadata in Exif,
11774IPTC, XMP, ICC and more formats.")
11775 (license license:asl2.0)))
0dd6089d
JL
11776
11777(define-public java-svg-salamander
11778 (package
11779 (name "java-svg-salamander")
11780 (version "1.1.2")
11781 (source (origin
11782 (method git-fetch)
11783 (uri (git-reference
11784 (url "https://github.com/blackears/svgSalamander")
11785 (commit (string-append "v" version))))
11786 (file-name (git-file-name name version))
11787 (sha256
11788 (base32
11789 "1zv3kjdkf6iqf02x6ln76254y634j2ji448y706a65lsbfjmmicf"))
11790 (modules '((guix build utils)))
11791 (snippet
58c3a4f5
BH
11792 '(begin
11793 (for-each delete-file (find-files "." ".*.jar"))
11794 #t))
0dd6089d
JL
11795 (patches
11796 (search-patches "java-svg-salamander-Fix-non-det.patch"))))
11797 (build-system ant-build-system)
11798 (arguments
11799 `(#:tests? #f; no tests
11800 #:phases
11801 (modify-phases %standard-phases
11802 (add-after 'unpack 'chdir
11803 (lambda _
11804 (chdir "svg-core")
11805 #t))
11806 (add-before 'build 'copy-jars
11807 (lambda* (#:key inputs #:allow-other-keys)
11808 (copy-file (car (find-files (assoc-ref inputs "javacc") "\\.jar$"))
11809 "../libraries/javacc.jar")
11810 (copy-file (car (find-files (assoc-ref inputs "ant") "ant\\.jar$"))
11811 "../libraries/ant.jar")
11812 #t))
11813 (replace 'install
11814 (install-jars "dist")))))
11815 (native-inputs
11816 `(("javacc" ,javacc)))
11817 (home-page "https://github.com/blackears/svgSalamander")
11818 (synopsis "SVG engine for Java")
11819 (description "SVG Salamander is an SVG engine for Java that's designed
11820to be small, fast, and allow programmers to use it with a minimum of fuss.
11821It's in particular targeted for making it easy to integrate SVG into Java
11822games and making it much easier for artists to design 2D game content - from
11823rich interactive menus to charts and graphcs to complex animations.")
11824 (license license:bsd-2)))
ff56e6ef
JL
11825
11826(define-public java-jboss-transaction-api-spec
11827 (package
11828 (name "java-jboss-transaction-api-spec")
11829 (version "1.2+1.1.1")
11830 (source (origin
11831 (method git-fetch)
11832 (uri (git-reference
11833 (url "https://github.com/jboss/jboss-transaction-api_spec")
11834 (commit "jboss-transaction-api_1.2_spec-1.1.1.Final")))
11835 (file-name (git-file-name name version))
11836 (sha256
11837 (base32
11838 "1xbfq5hvb86izflydxrqqv3k26c1ba2m0ap6m97shqrsdi9by4wy"))))
11839 (build-system ant-build-system)
11840 (arguments
11841 `(#:jar-name "java-jboss-transaction-api_spec.jar"
11842 #:source-dir "src/main/java"
11843 #:tests? #f)); no tests
11844 (inputs
11845 `(("java-cdi-api" ,java-cdi-api)
11846 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)))
11847 (home-page "https://github.com/jboss/jboss-transaction-api_spec")
11848 (synopsis "Generic transaction management API in Java")
11849 (description "Java-jboss-transaction-api-spec implements the Transactions
11850API. A transaction is a unit of work containing one or more operations
11851involving one or more shared resources having ACID (Atomicity, Consistency,
11852Isolation and Durability) properties.")
11853 ;; either gpl2 only with classpath exception or cddl.
11854 (license (list license:gpl2 license:cddl1.0))))