gnu: icedtea-6: Build with gcc-4.9.
[jackhill/guix/guix.git] / gnu / packages / java.scm
CommitLineData
0760e3a1 1;;; GNU Guix --- Functional package management for GNU
799c3c86 2;;; Copyright © 2015, 2016, 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
559239af 3;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
ea9e58ef
CZ
4;;; Copyright © 2016, 2017 Roel Janssen <roel@gnu.org>
5;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
a1a5ef20 6;;; Copyright © 2017, 2018 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>
f4548394 9;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
d0e9ded7
GB
10;;; Copyright © 2018 Gábor Boskovits <boskovits@gmail.com>
11;;; Copyright © 2018 Chris Marusich <cmmarusich@gmail.com>
0760e3a1
RW
12;;;
13;;; This file is part of GNU Guix.
14;;;
15;;; GNU Guix is free software; you can redistribute it and/or modify it
16;;; under the terms of the GNU General Public License as published by
17;;; the Free Software Foundation; either version 3 of the License, or (at
18;;; your option) any later version.
19;;;
20;;; GNU Guix is distributed in the hope that it will be useful, but
21;;; WITHOUT ANY WARRANTY; without even the implied warranty of
22;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23;;; GNU General Public License for more details.
24;;;
25;;; You should have received a copy of the GNU General Public License
26;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
27
28(define-module (gnu packages java)
29 #:use-module ((guix licenses) #:prefix license:)
30 #:use-module (guix packages)
31 #:use-module (guix download)
62c9bfaa 32 #:use-module (guix hg-download)
72885a4c 33 #:use-module (guix git-download)
78745d33 34 #:use-module (guix svn-download)
f6789047 35 #:use-module (guix utils)
068e476f 36 #:use-module (guix build-system ant)
0760e3a1 37 #:use-module (guix build-system gnu)
6a5829d9 38 #:use-module (guix build-system trivial)
0760e3a1
RW
39 #:use-module (gnu packages)
40 #:use-module (gnu packages attr)
41 #:use-module (gnu packages autotools)
42 #:use-module (gnu packages base)
43 #:use-module (gnu packages bash)
f21403e2 44 #:use-module (gnu packages certs)
0760e3a1
RW
45 #:use-module (gnu packages cpio)
46 #:use-module (gnu packages cups)
47 #:use-module (gnu packages compression)
48 #:use-module (gnu packages fontutils)
49 #:use-module (gnu packages gawk)
72885a4c 50 #:use-module (gnu packages gettext)
0760e3a1 51 #:use-module (gnu packages gcc)
8581c813 52 #:use-module (gnu packages gl)
0760e3a1
RW
53 #:use-module (gnu packages gnuzilla) ;nss
54 #:use-module (gnu packages ghostscript) ;lcms
55 #:use-module (gnu packages gnome)
3a69f5f2 56 #:use-module (gnu packages groovy)
0760e3a1 57 #:use-module (gnu packages gtk)
6a5829d9 58 #:use-module (gnu packages guile)
afb5858d 59 #:use-module (gnu packages icu4c)
0760e3a1 60 #:use-module (gnu packages image)
c4fd86f9 61 #:use-module (gnu packages libffi)
0760e3a1 62 #:use-module (gnu packages linux) ;alsa
2f0d0418 63 #:use-module (gnu packages maths)
bcb078a4 64 #:use-module (gnu packages onc-rpc)
5766984b 65 #:use-module (gnu packages web)
0760e3a1 66 #:use-module (gnu packages wget)
0760e3a1
RW
67 #:use-module (gnu packages pkg-config)
68 #:use-module (gnu packages perl)
c4fd86f9 69 #:use-module (gnu packages popt)
89e34644 70 #:use-module (gnu packages kerberos)
0760e3a1
RW
71 #:use-module (gnu packages xml)
72 #:use-module (gnu packages xorg)
f6789047 73 #:use-module (gnu packages texinfo)
2d15f601
RW
74 #:use-module ((srfi srfi-1) #:select (fold alist-delete))
75 #:use-module (srfi srfi-11)
76 #:use-module (ice-9 match))
0760e3a1 77
e1ae3587
RW
78\f
79;;;
80;;; Java bootstrap toolchain.
81;;;
82
83;; The Java bootstrap begins with Jikes, a Java compiler written in C++. We
269fb7d3
RW
84;; use it to build a simple version of GNU Classpath, the Java standard
85;; library. We chose version 0.93 because it is the last version that can be
86;; built with Jikes. With Jikes and this version of GNU Classpath we can
87;; build JamVM, a Java Virtual Machine. We build version 1.5.1 because it is
88;; the last version of JamVM that works with a version of GNU classpath that
89;; does not require ECJ. These three packages make up the bootstrap JDK.
90
91;; This is sufficient to build an older version of Ant, which is needed to
92;; build an older version of ECJ, an incremental Java compiler, both of which
93;; are written in Java.
e1ae3587 94;;
269fb7d3
RW
95;; ECJ is needed to build the latest release (0.99) and the development
96;; version of GNU Classpath. The development version of GNU Classpath has
97;; much more support for Java 1.6 than the latest release, but we need to
98;; build 0.99 first to get a working version of javah. ECJ, the development
99;; version of GNU Classpath, and the latest version of JamVM make up the
100;; second stage JDK with which we can build the OpenJDK with the Icedtea 1.x
101;; build framework. We then build the more recent JDKs Icedtea 2.x and
102;; Icedtea 3.x.
e1ae3587
RW
103
104(define jikes
105 (package
106 (name "jikes")
107 (version "1.22")
108 (source (origin
109 (method url-fetch)
110 (uri (string-append "mirror://sourceforge/jikes/Jikes/"
111 version "/jikes-" version ".tar.bz2"))
112 (sha256
113 (base32
114 "1qqldrp74pzpy5ly421srqn30qppmm9cvjiqdngk8hf47dv2rc0c"))))
115 (build-system gnu-build-system)
116 (home-page "http://jikes.sourceforge.net/")
117 (synopsis "Compiler for the Java language")
118 (description "Jikes is a compiler that translates Java source files as
119defined in The Java Language Specification into the bytecoded instruction set
120and binary format defined in The Java Virtual Machine Specification.")
121 (license license:ibmpl1.0)))
122
45f762ee
RW
123;; This is the last version of GNU Classpath that can be built without ECJ.
124(define classpath-bootstrap
2551fee8 125 (package
45f762ee
RW
126 (name "classpath")
127 (version "0.93")
2551fee8
RW
128 (source (origin
129 (method url-fetch)
45f762ee
RW
130 (uri (string-append "mirror://gnu/classpath/classpath-"
131 version ".tar.gz"))
2551fee8
RW
132 (sha256
133 (base32
bab9793f
EF
134 "0i99wf9xd3hw1sj2sazychb9prx8nadxh2clgvk3zlmb28v0jbfz"))
135 (patches (search-patches "classpath-aarch64-support.patch"))))
2551fee8
RW
136 (build-system gnu-build-system)
137 (arguments
138 `(#:configure-flags
45f762ee
RW
139 (list (string-append "JAVAC="
140 (assoc-ref %build-inputs "jikes")
141 "/bin/jikes")
2551fee8
RW
142 "--disable-Werror"
143 "--disable-gmp"
144 "--disable-gtk-peer"
45f762ee 145 "--disable-gconf-peer"
2551fee8
RW
146 "--disable-plugin"
147 "--disable-dssi"
148 "--disable-alsa"
45f762ee
RW
149 "--disable-gjdoc")
150 #:phases
151 (modify-phases %standard-phases
152 (add-after 'install 'install-data
153 (lambda _ (zero? (system* "make" "install-data")))))))
2551fee8
RW
154 (native-inputs
155 `(("jikes" ,jikes)
156 ("fastjar" ,fastjar)
45f762ee 157 ("libltdl" ,libltdl)
2551fee8 158 ("pkg-config" ,pkg-config)))
45f762ee
RW
159 (home-page "https://www.gnu.org/software/classpath/")
160 (synopsis "Essential libraries for Java")
161 (description "GNU Classpath is a project to create core class libraries
162for use with runtimes, compilers and tools for the Java programming
163language.")
164 ;; GPLv2 or later, with special linking exception.
165 (license license:gpl2+)))
57f6c50d 166
063629aa
RW
167;; This is the last version of JamVM that works with a version of GNU
168;; classpath that does not require ECJ.
169(define jamvm-1-bootstrap
57f6c50d 170 (package
063629aa
RW
171 (name "jamvm")
172 (version "1.5.1")
57f6c50d
RW
173 (source (origin
174 (method url-fetch)
063629aa
RW
175 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
176 "JamVM%20" version "/jamvm-"
177 version ".tar.gz"))
57f6c50d
RW
178 (sha256
179 (base32
063629aa 180 "06lhi03l3b0h48pc7x58bk9my2nrcf1flpmglvys3wyad6yraf36"))))
57f6c50d
RW
181 (build-system gnu-build-system)
182 (arguments
c4fd86f9 183 `(#:configure-flags
063629aa
RW
184 (list (string-append "--with-classpath-install-dir="
185 (assoc-ref %build-inputs "classpath")))))
57f6c50d 186 (inputs
063629aa 187 `(("classpath" ,classpath-bootstrap)
57f6c50d 188 ("jikes" ,jikes)
063629aa
RW
189 ("zlib" ,zlib)))
190 (home-page "http://jamvm.sourceforge.net/")
191 (synopsis "Small Java Virtual Machine")
192 (description "JamVM is a Java Virtual Machine conforming to the JVM
193specification edition 2 (blue book). It is extremely small. However, unlike
194other small VMs it supports the full spec, including object finalisation and
195JNI.")
196 (license license:gpl2+)))
2551fee8 197
5783bd77
RW
198(define ant-bootstrap
199 (package
200 (name "ant-bootstrap")
201 ;; The 1.10.x series requires Java 8. 1.9.0 and later use generics, which
202 ;; are not supported. The 1.8.x series is the last to use only features
ff4d9fdf
RW
203 ;; supported by Jikes.
204 (version "1.8.4")
5783bd77
RW
205 (source (origin
206 (method url-fetch)
207 (uri (string-append "http://archive.apache.org/dist/"
208 "ant/source/apache-ant-"
209 version "-src.tar.bz2"))
210 (sha256
211 (base32
ff4d9fdf 212 "1cg0lga887qz5iizh6mlkxp01lciymrhmp7wzxpl6zpnldxmzrjx"))))
5783bd77
RW
213 (build-system gnu-build-system)
214 (arguments
215 `(#:tests? #f ; no "check" target
216 #:phases
217 (modify-phases %standard-phases
d4fd4c3a 218 (delete 'bootstrap)
5783bd77
RW
219 (delete 'configure)
220 (replace 'build
221 (lambda* (#:key inputs #:allow-other-keys)
aa432388 222 (setenv "JAVA_HOME" (assoc-ref inputs "jamvm"))
5783bd77 223 (setenv "JAVACMD"
aa432388
RW
224 (string-append (assoc-ref inputs "jamvm")
225 "/bin/jamvm"))
5783bd77 226 (setenv "JAVAC"
aa432388
RW
227 (string-append (assoc-ref inputs "jikes")
228 "/bin/jikes"))
229 (setenv "CLASSPATH"
230 (string-append (assoc-ref inputs "jamvm")
231 "/lib/rt.jar"))
5783bd77 232
d4fd4c3a
RW
233 ;; Ant complains if this file doesn't exist.
234 (setenv "HOME" "/tmp")
235 (with-output-to-file "/tmp/.ant.properties"
236 (lambda _ (display "")))
5783bd77
RW
237
238 ;; Use jikes instead of javac for <javac ...> tags in build.xml
239 (setenv "ANT_OPTS" "-Dbuild.compiler=jikes")
240
241 ;; jikes produces lots of warnings, but they are not very
242 ;; interesting, so we silence them.
243 (setenv "$BOOTJAVAC_OPTS" "-nowarn")
244
d4fd4c3a
RW
245 ;; Without these JamVM options the build may freeze.
246 (substitute* "bootstrap.sh"
247 (("^\"\\$\\{JAVACMD\\}\" " m)
248 (string-append m "-Xnocompact -Xnoinlining ")))
249
5783bd77
RW
250 ;; Disable tests because we are bootstrapping and thus don't have
251 ;; any of the dependencies required to build and run the tests.
252 (substitute* "build.xml"
253 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
254 (zero? (system* "bash" "bootstrap.sh"
255 (string-append "-Ddist.dir="
256 (assoc-ref %outputs "out"))))))
257 (delete 'install))))
258 (native-inputs
259 `(("jikes" ,jikes)
aa432388 260 ("jamvm" ,jamvm-1-bootstrap)))
5783bd77
RW
261 (home-page "http://ant.apache.org")
262 (synopsis "Build tool for Java")
263 (description
264 "Ant is a platform-independent build tool for Java. It is similar to
265make but is implemented using the Java language, requires the Java platform,
266and is best suited to building Java projects. Ant uses XML to describe the
267build process and its dependencies, whereas Make uses Makefile format.")
268 (license license:asl2.0)))
269
5461721f
RW
270;; Version 3.2.2 is the last version without a dependency on a full-fledged
271;; compiler for Java 1.5.
272(define ecj-bootstrap
273 (package
274 (name "ecj-bootstrap")
275 (version "3.2.2")
276 (source (origin
277 (method url-fetch)
278 (uri (string-append "http://archive.eclipse.org/eclipse/"
279 "downloads/drops/R-" version
280 "-200702121330/ecjsrc.zip"))
281 (sha256
282 (base32
283 "05hj82kxd23qaglsjkaqcj944riisjha7acf7h3ljhrjyljx8307"))))
284 ;; It would be so much easier if we could use the ant-build-system, but we
285 ;; cannot as we don't have ant at this point. We use ecj for
286 ;; bootstrapping the JDK.
287 (build-system gnu-build-system)
288 (arguments
289 `(#:modules ((guix build gnu-build-system)
290 (guix build utils)
291 (srfi srfi-1))
292 #:tests? #f ; there are no tests
293 #:phases
294 (modify-phases %standard-phases
295 (replace 'configure
296 (lambda* (#:key inputs #:allow-other-keys)
297 (setenv "CLASSPATH"
298 (string-join
6c775dc6
RW
299 (cons (string-append (assoc-ref inputs "jamvm")
300 "/lib/rt.jar")
301 (find-files (string-append
302 (assoc-ref inputs "ant-bootstrap")
303 "/lib")
304 "\\.jar$"))
5461721f
RW
305 ":"))
306 #t))
307 (replace 'build
308 (lambda* (#:key inputs #:allow-other-keys)
309 ;; The unpack phase enters the "org" directory by mistake.
310 (chdir "..")
311
312 ;; Create a simple manifest to make ecj executable.
313 (with-output-to-file "manifest"
314 (lambda _
315 (display "Manifest-Version: 1.0
316Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n")))
317
318 ;; Compile it all!
6c775dc6 319 (and (zero? (apply system* "jikes"
5461721f
RW
320 (find-files "." "\\.java$")))
321 (zero? (system* "fastjar" "cvfm"
322 "ecj-bootstrap.jar" "manifest" ".")))))
323 (replace 'install
324 (lambda* (#:key outputs #:allow-other-keys)
325 (let ((share (string-append (assoc-ref outputs "out")
326 "/share/java/")))
327 (mkdir-p share)
328 (install-file "ecj-bootstrap.jar" share)
329 #t))))))
330 (native-inputs
331 `(("ant-bootstrap" ,ant-bootstrap)
332 ("unzip" ,unzip)
6c775dc6
RW
333 ("jikes" ,jikes)
334 ("jamvm" ,jamvm-1-bootstrap)
5461721f
RW
335 ("fastjar" ,fastjar)))
336 (home-page "https://eclipse.org")
337 (synopsis "Eclipse Java development tools core batch compiler")
338 (description "This package provides the Eclipse Java core batch compiler
339for bootstrapping purposes. The @dfn{Eclipse compiler for Java} (ecj) is a
340requirement for all GNU Classpath releases after version 0.93.")
341 (license license:epl1.0)))
342
6a5829d9
RW
343(define ecj-javac-wrapper
344 (package (inherit ecj-bootstrap)
345 (name "ecj-javac-wrapper")
346 (source #f)
347 (build-system trivial-build-system)
348 (arguments
349 `(#:modules ((guix build utils))
350 #:builder
c4f06c11 351 (begin
6a5829d9
RW
352 (use-modules (guix build utils))
353 (let* ((bin (string-append (assoc-ref %outputs "out") "/bin"))
354 (target (string-append bin "/javac"))
355 (guile (string-append (assoc-ref %build-inputs "guile")
356 "/bin/guile"))
357 (ecj (string-append (assoc-ref %build-inputs "ecj-bootstrap")
358 "/share/java/ecj-bootstrap.jar"))
c4f06c11
RW
359 (java (string-append (assoc-ref %build-inputs "jamvm")
360 "/bin/jamvm"))
361 (bootcp (let ((jvmlib (string-append (assoc-ref %build-inputs "classpath")
362 "/share/classpath")))
51602aac
RW
363 (string-append jvmlib "/glibj.zip:"
364 jvmlib "/tools.zip"))))
6a5829d9
RW
365 (mkdir-p bin)
366 (with-output-to-file target
367 (lambda _
368 (format #t "#!~a --no-auto-compile\n!#\n" guile)
369 (write
370 `(begin (use-modules (ice-9 match)
371 (ice-9 receive)
372 (ice-9 hash-table)
373 (srfi srfi-1)
374 (srfi srfi-26))
375 (define defaults
376 '(("-bootclasspath" ,bootcp)
377 ("-source" "1.5")
378 ("-target" "1.5")
379 ("-cp" ".")))
380 (define (main args)
381 (let ((classpath (getenv "CLASSPATH")))
382 (setenv "CLASSPATH"
c4f06c11
RW
383 (string-join (list ,ecj
384 ,(string-append (assoc-ref %build-inputs "jamvm")
385 "/lib/rt.jar")
386 (or classpath ""))
387 ":")))
6a5829d9
RW
388 (receive (vm-args other-args)
389 ;; Separate VM arguments from arguments to ECJ.
390 (partition (cut string-prefix? "-J" <>)
391 (fold (lambda (default acc)
392 (if (member (first default) acc)
393 acc (append default acc)))
394 args defaults))
395 (apply system* ,java
396 (append
ae0a5a7e 397 (list "-Xnocompact" "-Xnoinlining")
6a5829d9
RW
398 ;; Remove "-J" prefix
399 (map (cut string-drop <> 2) vm-args)
400 '("org.eclipse.jdt.internal.compiler.batch.Main")
401 (cons "-nowarn" other-args)))))
402 ;; Entry point
403 (let ((args (cdr (command-line))))
404 (if (null? args)
405 (format (current-error-port) "javac: no arguments given!\n")
406 (main args)))))))
407 (chmod target #o755)
408 #t))))
409 (native-inputs
410 `(("guile" ,guile-2.2)
411 ("ecj-bootstrap" ,ecj-bootstrap)
c4f06c11
RW
412 ("jamvm" ,jamvm-1-bootstrap)
413 ("classpath" ,classpath-bootstrap)))
6a5829d9
RW
414 (description "This package provides a wrapper around the @dfn{Eclipse
415compiler for Java} (ecj) with a command line interface that is compatible with
416the standard javac executable.")))
417
8778da03
RW
418;; The classpath-bootstrap was built without a virtual machine, so it does not
419;; provide a wrapper for javah. We cannot build the development version of
420;; Classpath without javah.
421(define classpath-0.99
422 (package (inherit classpath-bootstrap)
d3551e86
RW
423 (version "0.99")
424 (source (origin
425 (method url-fetch)
426 (uri (string-append "mirror://gnu/classpath/classpath-"
427 version ".tar.gz"))
428 (sha256
429 (base32
bab9793f
EF
430 "1j7cby4k66f1nvckm48xcmh352b1d1b33qk7l6hi7dp9i9zjjagr"))
431 (patches (search-patches "classpath-aarch64-support.patch"))))
d3551e86
RW
432 (arguments
433 `(#:configure-flags
434 (list (string-append "--with-ecj-jar="
435 (assoc-ref %build-inputs "ecj-bootstrap")
436 "/share/java/ecj-bootstrap.jar")
437 (string-append "JAVAC="
438 (assoc-ref %build-inputs "ecj-javac-wrapper")
439 "/bin/javac")
440 (string-append "JAVA="
8778da03
RW
441 (assoc-ref %build-inputs "jamvm")
442 "/bin/jamvm")
d3551e86
RW
443 "GCJ_JAVAC_TRUE=no"
444 "ac_cv_prog_java_works=yes" ; trust me
445 "--disable-Werror"
446 "--disable-gmp"
447 "--disable-gtk-peer"
448 "--disable-gconf-peer"
449 "--disable-plugin"
450 "--disable-dssi"
451 "--disable-alsa"
452 "--disable-gjdoc")
453 #:phases
454 (modify-phases %standard-phases
455 (add-after 'install 'install-data
456 (lambda _ (zero? (system* "make" "install-data")))))))
457 (native-inputs
458 `(("ecj-bootstrap" ,ecj-bootstrap)
459 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
460 ("fastjar" ,fastjar)
8778da03
RW
461 ("jamvm" ,jamvm-1-bootstrap)
462 ("classpath" ,classpath-bootstrap)
d3551e86 463 ("libltdl" ,libltdl)
8778da03 464 ("pkg-config" ,pkg-config)))))
d3551e86 465
c98d7a66
RW
466;; We need this because classpath-bootstrap does not provide all of the tools
467;; we need to build classpath-devel.
04d7cae2 468(define classpath-jamvm-wrappers
c98d7a66 469 (package (inherit classpath-0.99)
04d7cae2
RW
470 (name "classpath-jamvm-wrappers")
471 (source #f)
472 (build-system trivial-build-system)
473 (arguments
474 `(#:modules ((guix build utils))
475 #:builder
476 (begin
477 (use-modules (guix build utils))
478 (let* ((bash (assoc-ref %build-inputs "bash"))
479 (jamvm (assoc-ref %build-inputs "jamvm"))
480 (classpath (assoc-ref %build-inputs "classpath"))
481 (bin (string-append (assoc-ref %outputs "out")
482 "/bin/")))
483 (mkdir-p bin)
484 (for-each (lambda (tool)
485 (with-output-to-file (string-append bin tool)
486 (lambda _
487 (format #t "#!~a/bin/sh
40e3a197 488~a/bin/jamvm -Xnocompact -Xnoinlining -classpath ~a/share/classpath/tools.zip \
04d7cae2
RW
489gnu.classpath.tools.~a.~a $@"
490 bash jamvm classpath tool
491 (if (string=? "native2ascii" tool)
492 "Native2ASCII" "Main"))))
493 (chmod (string-append bin tool) #o755))
494 (list "javah"
495 "rmic"
496 "rmid"
497 "orbd"
498 "rmiregistry"
499 "native2ascii"))
500 #t))))
501 (native-inputs
502 `(("bash" ,bash)
c98d7a66
RW
503 ("jamvm" ,jamvm-1-bootstrap)
504 ("classpath" ,classpath-0.99)))
04d7cae2
RW
505 (inputs '())
506 (synopsis "Executables from GNU Classpath")
507 (description "This package provides wrappers around the tools provided by
508the GNU Classpath library. They are executed by the JamVM virtual
509machine.")))
510
72885a4c
RW
511;; The last release of GNU Classpath is 0.99 and it happened in 2012. Since
512;; then Classpath has gained much more support for Java 1.6.
513(define-public classpath-devel
514 (let ((commit "e7c13ee0cf2005206fbec0eca677f8cf66d5a103")
515 (revision "1"))
8778da03 516 (package (inherit classpath-bootstrap)
72885a4c
RW
517 (version (string-append "0.99-" revision "." (string-take commit 9)))
518 (source (origin
519 (method git-fetch)
520 (uri (git-reference
5f13bf09 521 (url "https://git.savannah.gnu.org/git/classpath.git")
72885a4c 522 (commit commit)))
51988e3a 523 (file-name (string-append "classpath-" version "-checkout"))
72885a4c
RW
524 (sha256
525 (base32
526 "1v2rww76ww322mpg3s12a1kkc6gkp31bm9gcxs532h0wq285fiw4"))))
527 (arguments
93c103ab
RW
528 `(#:make-flags
529 ;; Ensure that the initial heap size is smaller than the maximum
530 ;; size. By default only Xmx is set, which can lead to invalid
531 ;; memory settings on some machines with a lot of memory.
532 '("JAVAC_MEM_OPT=-J-Xms512M -J-Xmx768M")
533 #:configure-flags
72885a4c
RW
534 (list (string-append "--with-ecj-jar="
535 (assoc-ref %build-inputs "ecj-bootstrap")
536 "/share/java/ecj-bootstrap.jar")
93c103ab 537 (string-append "--with-javac="
72885a4c
RW
538 (assoc-ref %build-inputs "ecj-javac-wrapper")
539 "/bin/javac")
540 (string-append "JAVA="
541 (assoc-ref %build-inputs "jamvm")
542 "/bin/jamvm")
543 "GCJ_JAVAC_TRUE=no"
544 "ac_cv_prog_java_works=yes" ; trust me
545 "--disable-Werror"
546 "--disable-gmp"
547 "--disable-gtk-peer"
548 "--disable-gconf-peer"
549 "--disable-plugin"
550 "--disable-dssi"
551 "--disable-alsa"
552 "--disable-gjdoc")
553 #:phases
554 (modify-phases %standard-phases
2a69f48e
RW
555 ;; XXX The bootstrap phase executes autogen.sh, which fails after
556 ;; complaining about the lack of gettext.
557 (replace 'bootstrap
558 (lambda _ (invoke "autoreconf" "-vif")))
72885a4c
RW
559 (add-after 'unpack 'remove-unsupported-annotations
560 (lambda _
561 (substitute* (find-files "java" "\\.java$")
562 (("@Override") ""))
563 #t))
564 (add-after 'install 'install-data
565 (lambda _ (zero? (system* "make" "install-data")))))))
566 (native-inputs
567 `(("autoconf" ,autoconf)
568 ("automake" ,automake)
569 ("libtool" ,libtool)
570 ("gettext" ,gettext-minimal)
571 ("texinfo" ,texinfo)
572 ("classpath-jamvm-wrappers" ,classpath-jamvm-wrappers) ; for javah
573 ("ecj-bootstrap" ,ecj-bootstrap)
b5a0d427 574 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
72885a4c 575 ("fastjar" ,fastjar)
58d2b135 576 ("jamvm" ,jamvm-1-bootstrap)
72885a4c
RW
577 ("libltdl" ,libltdl)
578 ("pkg-config" ,pkg-config))))))
579
58d2b135
RW
580(define jamvm
581 (package (inherit jamvm-1-bootstrap)
582 (version "2.0.0")
583 (source (origin
584 (method url-fetch)
585 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
586 "JamVM%20" version "/jamvm-"
587 version ".tar.gz"))
588 (sha256
589 (base32
590 "1nl0zxz8y5x8gwsrm7n32bry4dx8x70p8z3s9jbdvs8avyb8whkn"))))
591 (build-system gnu-build-system)
592 (arguments
593 `(#:configure-flags
594 (list (string-append "--with-classpath-install-dir="
595 (assoc-ref %build-inputs "classpath")))))
8c6091e3
RW
596 (inputs
597 `(("classpath" ,classpath-devel)
b5a0d427 598 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
8c6091e3
RW
599 ("zlib" ,zlib)))))
600
b5a0d427
RW
601(define ecj-javac-wrapper-final
602 (package (inherit ecj-javac-wrapper)
1bf56c72
RW
603 (native-inputs
604 `(("guile" ,guile-2.2)
605 ("ecj-bootstrap" ,ecj-bootstrap)
606 ("jamvm" ,jamvm)
607 ("classpath" ,classpath-devel)))))
608
98419316 609;; The bootstrap JDK consisting of jamvm, classpath-devel,
b5a0d427
RW
610;; ecj-javac-wrapper-final cannot build Icedtea 2.x directly, because it's
611;; written in Java 7. It can, however, build the unmaintained Icedtea 1.x,
612;; which uses Java 6 only.
98419316
RW
613(define-public icedtea-6
614 (package
615 (name "icedtea")
616 (version "1.13.13")
617 (source (origin
618 (method url-fetch)
619 (uri (string-append
620 "http://icedtea.wildebeest.org/download/source/icedtea6-"
621 version ".tar.xz"))
622 (sha256
623 (base32
624 "0bg9sb4f7qbq77c0zf9m17p47ga0kf0r9622g9p12ysg26jd1ksg"))
625 (modules '((guix build utils)))
626 (snippet
6cbee49d
MW
627 '(begin
628 (substitute* "Makefile.in"
629 ;; do not leak information about the build host
630 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
631 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
632 #t))))
98419316
RW
633 (build-system gnu-build-system)
634 (outputs '("out" ; Java Runtime Environment
635 "jdk" ; Java Development Kit
636 "doc")) ; all documentation
637 (arguments
638 `(;; There are many failing tests and many are known to fail upstream.
639 #:tests? #f
640
641 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
642 ;; gremlin) doesn't support it yet, so skip this phase.
643 #:validate-runpath? #f
644
645 #:modules ((guix build utils)
646 (guix build gnu-build-system)
647 (srfi srfi-19))
648
649 #:configure-flags
650 `("--enable-bootstrap"
651 "--enable-nss"
652 "--without-rhino"
653 "--with-parallel-jobs"
654 "--disable-downloading"
655 "--disable-tests"
656 ,(string-append "--with-ecj="
657 (assoc-ref %build-inputs "ecj")
658 "/share/java/ecj-bootstrap.jar")
659 ,(string-append "--with-jar="
660 (assoc-ref %build-inputs "fastjar")
661 "/bin/fastjar")
662 ,(string-append "--with-jdk-home="
663 (assoc-ref %build-inputs "classpath"))
664 ,(string-append "--with-java="
665 (assoc-ref %build-inputs "jamvm")
666 "/bin/jamvm"))
667 #:phases
668 (modify-phases %standard-phases
669 (replace 'unpack
670 (lambda* (#:key source inputs #:allow-other-keys)
671 (and (zero? (system* "tar" "xvf" source))
672 (begin
673 (chdir (string-append "icedtea6-" ,version))
674 (mkdir "openjdk")
675 (copy-recursively (assoc-ref inputs "openjdk-src") "openjdk")
676 ;; The convenient OpenJDK source bundle is no longer
677 ;; available for download, so we have to take the sources
678 ;; from the Mercurial repositories and change the Makefile
679 ;; to avoid tests for the OpenJDK zip archive.
680 (with-directory-excursion "openjdk"
681 (for-each (lambda (part)
682 (mkdir part)
683 (copy-recursively
684 (assoc-ref inputs
685 (string-append part "-src"))
686 part))
687 '("jdk" "hotspot" "corba"
688 "langtools" "jaxp" "jaxws")))
689 (substitute* "Makefile.in"
690 (("echo \"ERROR: No up-to-date OpenJDK zip available\"; exit -1;")
691 "echo \"trust me\";")
692 ;; The contents of the bootstrap directory must be
693 ;; writeable but when copying from the store they are
694 ;; not.
695 (("mkdir -p lib/rt" line)
696 (string-append line "; chmod -R u+w $(BOOT_DIR)")))
697 (zero? (system* "chmod" "-R" "u+w" "openjdk"))
698 #t))))
699 (add-after 'unpack 'use-classpath
700 (lambda* (#:key inputs #:allow-other-keys)
b5a0d427
RW
701 (let ((jvmlib (assoc-ref inputs "classpath"))
702 (jamvm (assoc-ref inputs "jamvm")))
98419316
RW
703 ;; Classpath does not provide rt.jar.
704 (substitute* "Makefile.in"
705 (("\\$\\(SYSTEM_JDK_DIR\\)/jre/lib/rt.jar")
706 (string-append jvmlib "/share/classpath/glibj.zip")))
707 ;; Make sure we can find all classes.
708 (setenv "CLASSPATH"
709 (string-append jvmlib "/share/classpath/glibj.zip:"
b5a0d427
RW
710 jvmlib "/share/classpath/tools.zip:"
711 jamvm "/lib/rt.jar"))
98419316
RW
712 (setenv "JAVACFLAGS"
713 (string-append "-cp "
714 jvmlib "/share/classpath/glibj.zip:"
715 jvmlib "/share/classpath/tools.zip")))
716 #t))
717 (add-after 'unpack 'patch-patches
718 (lambda _
719 ;; shebang in patches so that they apply cleanly
720 (substitute* '("patches/jtreg-jrunscript.patch"
721 "patches/hotspot/hs23/drop_unlicensed_test.patch")
722 (("#!/bin/sh") (string-append "#!" (which "sh"))))
723 #t))
724 (add-after 'unpack 'patch-paths
725 (lambda* (#:key inputs #:allow-other-keys)
726 ;; buildtree.make generates shell scripts, so we need to replace
727 ;; the generated shebang
728 (substitute* '("openjdk/hotspot/make/linux/makefiles/buildtree.make")
729 (("/bin/sh") (which "bash")))
730
731 (let ((corebin (string-append
732 (assoc-ref inputs "coreutils") "/bin/"))
733 (binbin (string-append
734 (assoc-ref inputs "binutils") "/bin/"))
735 (grepbin (string-append
736 (assoc-ref inputs "grep") "/bin/")))
737 (substitute* '("openjdk/jdk/make/common/shared/Defs-linux.gmk"
738 "openjdk/corba/make/common/shared/Defs-linux.gmk")
739 (("UNIXCOMMAND_PATH = /bin/")
740 (string-append "UNIXCOMMAND_PATH = " corebin))
741 (("USRBIN_PATH = /usr/bin/")
742 (string-append "USRBIN_PATH = " corebin))
743 (("DEVTOOLS_PATH *= */usr/bin/")
744 (string-append "DEVTOOLS_PATH = " corebin))
745 (("COMPILER_PATH *= */usr/bin/")
746 (string-append "COMPILER_PATH = "
747 (assoc-ref inputs "gcc") "/bin/"))
748 (("DEF_OBJCOPY *=.*objcopy")
749 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
750
751 ;; fix path to alsa header
752 (substitute* "openjdk/jdk/make/common/shared/Sanity.gmk"
753 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
754 (string-append "ALSA_INCLUDE="
755 (assoc-ref inputs "alsa-lib")
756 "/include/alsa/version.h")))
757
758 ;; fix hard-coded utility paths
759 (substitute* '("openjdk/jdk/make/common/shared/Defs-utils.gmk"
760 "openjdk/corba/make/common/shared/Defs-utils.gmk")
761 (("ECHO *=.*echo")
762 (string-append "ECHO = " (which "echo")))
763 (("^GREP *=.*grep")
764 (string-append "GREP = " (which "grep")))
765 (("EGREP *=.*egrep")
766 (string-append "EGREP = " (which "egrep")))
767 (("CPIO *=.*cpio")
768 (string-append "CPIO = " (which "cpio")))
769 (("READELF *=.*readelf")
770 (string-append "READELF = " (which "readelf")))
771 (("^ *AR *=.*ar")
772 (string-append "AR = " (which "ar")))
773 (("^ *TAR *=.*tar")
774 (string-append "TAR = " (which "tar")))
775 (("AS *=.*as")
776 (string-append "AS = " (which "as")))
777 (("LD *=.*ld")
778 (string-append "LD = " (which "ld")))
779 (("STRIP *=.*strip")
780 (string-append "STRIP = " (which "strip")))
781 (("NM *=.*nm")
782 (string-append "NM = " (which "nm")))
783 (("^SH *=.*sh")
784 (string-append "SH = " (which "bash")))
785 (("^FIND *=.*find")
786 (string-append "FIND = " (which "find")))
787 (("LDD *=.*ldd")
788 (string-append "LDD = " (which "ldd")))
789 (("NAWK *=.*(n|g)awk")
790 (string-append "NAWK = " (which "gawk")))
791 (("XARGS *=.*xargs")
792 (string-append "XARGS = " (which "xargs")))
793 (("UNZIP *=.*unzip")
794 (string-append "UNZIP = " (which "unzip")))
795 (("ZIPEXE *=.*zip")
796 (string-append "ZIPEXE = " (which "zip")))
797 (("SED *=.*sed")
798 (string-append "SED = " (which "sed"))))
799
800 ;; Some of these timestamps cause problems as they are more than
801 ;; 10 years ago, failing the build process.
802 (substitute*
803 "openjdk/jdk/src/share/classes/java/util/CurrencyData.properties"
804 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
805 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
806 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
807 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY"))
808 #t)))
809 (add-before 'configure 'set-additional-paths
810 (lambda* (#:key inputs #:allow-other-keys)
811 (setenv "CPATH"
812 (string-append (assoc-ref inputs "libxrender")
813 "/include/X11/extensions" ":"
814 (assoc-ref inputs "libxtst")
815 "/include/X11/extensions" ":"
816 (assoc-ref inputs "libxinerama")
817 "/include/X11/extensions" ":"
818 (or (getenv "CPATH") "")))
819 (setenv "ALT_CUPS_HEADERS_PATH"
820 (string-append (assoc-ref inputs "cups")
821 "/include"))
822 (setenv "ALT_FREETYPE_HEADERS_PATH"
823 (string-append (assoc-ref inputs "freetype")
824 "/include"))
825 (setenv "ALT_FREETYPE_LIB_PATH"
826 (string-append (assoc-ref inputs "freetype")
827 "/lib"))
828 #t))
829 (replace 'install
830 (lambda* (#:key outputs #:allow-other-keys)
831 (let ((doc (string-append (assoc-ref outputs "doc")
832 "/share/doc/icedtea"))
833 (jre (assoc-ref outputs "out"))
834 (jdk (assoc-ref outputs "jdk")))
835 (copy-recursively "openjdk.build/docs" doc)
836 (copy-recursively "openjdk.build/j2re-image" jre)
837 (copy-recursively "openjdk.build/j2sdk-image" jdk))
838 #t)))))
839 (native-inputs
840 `(("ant" ,ant-bootstrap)
841 ("alsa-lib" ,alsa-lib)
842 ("attr" ,attr)
843 ("classpath" ,classpath-devel)
844 ("coreutils" ,coreutils)
845 ("cpio" ,cpio)
846 ("cups" ,cups)
847 ("ecj" ,ecj-bootstrap)
b5a0d427 848 ("ecj-javac" ,ecj-javac-wrapper-final)
98419316
RW
849 ("fastjar" ,fastjar)
850 ("fontconfig" ,fontconfig)
851 ("freetype" ,freetype)
bcb078a4 852 ("gcc" ,gcc-4.9) ; there's a segmentation fault when compiling with gcc-5 or gcc-7
98419316
RW
853 ("gtk" ,gtk+-2)
854 ("gawk" ,gawk)
855 ("giflib" ,giflib)
856 ("grep" ,grep)
857 ("jamvm" ,jamvm)
858 ("lcms" ,lcms)
859 ("libjpeg" ,libjpeg)
bcb078a4 860 ("libnsl" ,libnsl)
98419316
RW
861 ("libpng" ,libpng)
862 ("libtool" ,libtool)
863 ("libx11" ,libx11)
864 ("libxcomposite" ,libxcomposite)
865 ("libxi" ,libxi)
866 ("libxinerama" ,libxinerama)
867 ("libxrender" ,libxrender)
868 ("libxslt" ,libxslt) ;for xsltproc
869 ("libxt" ,libxt)
870 ("libxtst" ,libxtst)
871 ("mit-krb5" ,mit-krb5)
872 ("nss" ,nss)
873 ("nss-certs" ,nss-certs)
874 ("perl" ,perl)
875 ("pkg-config" ,pkg-config)
876 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
877 ("unzip" ,unzip)
878 ("wget" ,wget)
879 ("which" ,which)
880 ("zip" ,zip)
881 ("zlib" ,zlib)
882 ("openjdk-src"
883 ,(origin
884 (method hg-fetch)
885 (uri (hg-reference
886 (url "http://hg.openjdk.java.net/jdk6/jdk6/")
887 (changeset "jdk6-b41")))
888 (sha256
889 (base32
890 "14q47yfg586fs64w30g8mk92m5dkxsvr36zzh0ra99xk5x0x96mv"))))
891 ("jdk-src"
892 ,(origin
893 (method hg-fetch)
894 (uri (hg-reference
895 (url "http://hg.openjdk.java.net/jdk6/jdk6/jdk/")
896 (changeset "jdk6-b41")))
897 (sha256
898 (base32
899 "165824nhg1k1dx6zs9dny0j49rmk35jw5b13dmz8c77jfajml4v9"))))
900 ("hotspot-src"
901 ,(origin
902 (method hg-fetch)
903 (uri (hg-reference
904 (url "http://hg.openjdk.java.net/jdk6/jdk6/hotspot/")
905 (changeset "jdk6-b41")))
906 (sha256
907 (base32
908 "07lc1z4k5dj9nrc1wvwmpvxr3xgxrdkdh53xb95skk5ij49yagfd"))))
909 ("corba-src"
910 ,(origin
911 (method hg-fetch)
912 (uri (hg-reference
913 (url "http://hg.openjdk.java.net/jdk6/jdk6/corba/")
914 (changeset "jdk6-b41")))
915 (sha256
916 (base32
917 "1p9g1r9dnax2iwp7yb59qx7m4nmshqhwmrb2b8jj8zgbd9dl2i3q"))))
918 ("langtools-src"
919 ,(origin
920 (method hg-fetch)
921 (uri (hg-reference
922 (url "http://hg.openjdk.java.net/jdk6/jdk6/langtools/")
923 (changeset "jdk6-b41")))
924 (sha256
925 (base32
926 "1x52wd67fynbbd9ild6fb4wvba3f5hhwk03qdjfazd0a1qr37z3d"))))
927 ("jaxp-src"
928 ,(origin
929 (method hg-fetch)
930 (uri (hg-reference
931 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxp/")
932 (changeset "jdk6-b41")))
933 (sha256
934 (base32
935 "0shlqrvzpr4nrkmv215lbxnby63s3yvbdh1yxcayznsyqwa4nlxm"))))
936 ("jaxws-src"
937 ,(origin
938 (method hg-fetch)
939 (uri (hg-reference
940 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxws/")
941 (changeset "jdk6-b41")))
942 (sha256
943 (base32
944 "0835lkw8vib1xhp8lxnybhlvzdh699hbi4mclxanydjk63zbpxk0"))))))
945 (home-page "http://icedtea.classpath.org")
946 (synopsis "Java development kit")
947 (description
948 "This package provides the OpenJDK built with the IcedTea build harness.
949This version of the OpenJDK is no longer maintained and is only used for
950bootstrapping purposes.")
951 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
952 ;; same license as both GNU Classpath and OpenJDK.
953 (license license:gpl2+)))
954
a243e12a 955(define-public icedtea-7
7f6485e7 956 (let* ((version "2.6.13")
f6789047
RW
957 (drop (lambda (name hash)
958 (origin
959 (method url-fetch)
960 (uri (string-append
d30ce4a7 961 "http://icedtea.classpath.org/download/drops"
f6789047
RW
962 "/icedtea7/" version "/" name ".tar.bz2"))
963 (sha256 (base32 hash))))))
71053e14
RW
964 (package
965 (name "icedtea")
f6789047
RW
966 (version version)
967 (source (origin
968 (method url-fetch)
969 (uri (string-append
970 "http://icedtea.wildebeest.org/download/source/icedtea-"
971 version ".tar.xz"))
972 (sha256
973 (base32
7f6485e7 974 "1w331rdqx1dcx2xb0fmjmrkdc71xqn20fxsgw8by4xhiblh88khh"))
f6789047
RW
975 (modules '((guix build utils)))
976 (snippet
6cbee49d
MW
977 '(begin
978 (substitute* "Makefile.in"
979 ;; do not leak information about the build host
980 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
981 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
982 #t))))
71053e14
RW
983 (build-system gnu-build-system)
984 (outputs '("out" ; Java Runtime Environment
985 "jdk" ; Java Development Kit
986 "doc")) ; all documentation
f6789047
RW
987 (arguments
988 `(;; There are many test failures. Some are known to
989 ;; fail upstream, others relate to not having an X
990 ;; server running at test time, yet others are a
991 ;; complete mystery to me.
992
993 ;; hotspot: passed: 241; failed: 45; error: 2
994 ;; langtools: passed: 1,934; failed: 26
995 ;; jdk: unknown
996 #:tests? #f
71053e14
RW
997
998 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
999 ;; gremlin) doesn't support it yet, so skip this phase.
1000 #:validate-runpath? #f
1001
f6789047
RW
1002 ;; Apparently, the C locale is needed for some of the tests.
1003 #:locale "C"
71053e14
RW
1004
1005 #:modules ((guix build utils)
1006 (guix build gnu-build-system)
1007 (ice-9 match)
1008 (ice-9 popen)
71053e14
RW
1009 (srfi srfi-19)
1010 (srfi srfi-26))
1011
1012 #:configure-flags
e2098e2d
RW
1013 ;; TODO: package pcsc and sctp, and add to inputs
1014 `("--disable-system-pcsc"
1015 "--disable-system-sctp"
1016 "--enable-bootstrap"
1017 "--enable-nss"
1018 "--without-rhino"
1019 "--disable-downloading"
1020 "--disable-tests" ;they are run in the check phase instead
1021 "--with-openjdk-src-dir=./openjdk.src"
1022 ,(string-append "--with-jdk-home="
1023 (assoc-ref %build-inputs "jdk")))
71053e14
RW
1024
1025 #:phases
1026 (modify-phases %standard-phases
1027 (replace 'unpack
1028 (lambda* (#:key source inputs #:allow-other-keys)
1029 (let ((target (string-append "icedtea-" ,version))
1030 (unpack (lambda* (name #:optional dir)
1031 (let ((dir (or dir
1032 (string-drop-right name 5))))
1033 (mkdir dir)
1034 (zero? (system* "tar" "xvf"
1035 (assoc-ref inputs name)
1036 "-C" dir
1037 "--strip-components=1"))))))
1038 (mkdir target)
1039 (and
1040 (zero? (system* "tar" "xvf" source
1041 "-C" target "--strip-components=1"))
1042 (chdir target)
1043 (unpack "openjdk-src" "openjdk.src")
1044 (with-directory-excursion "openjdk.src"
1045 (for-each unpack
1046 (filter (cut string-suffix? "-drop" <>)
1047 (map (match-lambda
1048 ((name . _) name))
1049 inputs))))
1050 #t))))
1051 (add-after 'unpack 'fix-x11-extension-include-path
1052 (lambda* (#:key inputs #:allow-other-keys)
1053 (substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk"
1054 (((string-append "\\$\\(firstword \\$\\(wildcard "
1055 "\\$\\(OPENWIN_HOME\\)"
1056 "/include/X11/extensions\\).*$"))
1057 (string-append (assoc-ref inputs "libxrender")
1058 "/include/X11/extensions"
1059 " -I" (assoc-ref inputs "libxtst")
1060 "/include/X11/extensions"
1061 " -I" (assoc-ref inputs "libxinerama")
1062 "/include/X11/extensions"))
1063 (("\\$\\(wildcard /usr/include/X11/extensions\\)\\)") ""))
1064 #t))
1065 (add-after 'unpack 'patch-paths
1066 (lambda _
1067 ;; buildtree.make generates shell scripts, so we need to replace
1068 ;; the generated shebang
1069 (substitute* '("openjdk.src/hotspot/make/linux/makefiles/buildtree.make")
1070 (("/bin/sh") (which "bash")))
1071
1072 (let ((corebin (string-append
1073 (assoc-ref %build-inputs "coreutils") "/bin/"))
1074 (binbin (string-append
1075 (assoc-ref %build-inputs "binutils") "/bin/"))
1076 (grepbin (string-append
1077 (assoc-ref %build-inputs "grep") "/bin/")))
1078 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-linux.gmk"
1079 "openjdk.src/corba/make/common/shared/Defs-linux.gmk")
1080 (("UNIXCOMMAND_PATH = /bin/")
1081 (string-append "UNIXCOMMAND_PATH = " corebin))
1082 (("USRBIN_PATH = /usr/bin/")
1083 (string-append "USRBIN_PATH = " corebin))
1084 (("DEVTOOLS_PATH *= */usr/bin/")
1085 (string-append "DEVTOOLS_PATH = " corebin))
1086 (("COMPILER_PATH *= */usr/bin/")
1087 (string-append "COMPILER_PATH = "
1088 (assoc-ref %build-inputs "gcc") "/bin/"))
1089 (("DEF_OBJCOPY *=.*objcopy")
1090 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
1091
1092 ;; fix path to alsa header
1093 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1094 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1095 (string-append "ALSA_INCLUDE="
1096 (assoc-ref %build-inputs "alsa-lib")
1097 "/include/alsa/version.h")))
1098
1099 ;; fix hard-coded utility paths
1100 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-utils.gmk"
1101 "openjdk.src/corba/make/common/shared/Defs-utils.gmk")
1102 (("ECHO *=.*echo")
1103 (string-append "ECHO = " (which "echo")))
1104 (("^GREP *=.*grep")
1105 (string-append "GREP = " (which "grep")))
1106 (("EGREP *=.*egrep")
1107 (string-append "EGREP = " (which "egrep")))
1108 (("CPIO *=.*cpio")
1109 (string-append "CPIO = " (which "cpio")))
1110 (("READELF *=.*readelf")
1111 (string-append "READELF = " (which "readelf")))
1112 (("^ *AR *=.*ar")
1113 (string-append "AR = " (which "ar")))
1114 (("^ *TAR *=.*tar")
1115 (string-append "TAR = " (which "tar")))
1116 (("AS *=.*as")
1117 (string-append "AS = " (which "as")))
1118 (("LD *=.*ld")
1119 (string-append "LD = " (which "ld")))
1120 (("STRIP *=.*strip")
1121 (string-append "STRIP = " (which "strip")))
1122 (("NM *=.*nm")
1123 (string-append "NM = " (which "nm")))
1124 (("^SH *=.*sh")
1125 (string-append "SH = " (which "bash")))
1126 (("^FIND *=.*find")
1127 (string-append "FIND = " (which "find")))
1128 (("LDD *=.*ldd")
1129 (string-append "LDD = " (which "ldd")))
1130 (("NAWK *=.*(n|g)awk")
1131 (string-append "NAWK = " (which "gawk")))
1132 (("XARGS *=.*xargs")
1133 (string-append "XARGS = " (which "xargs")))
1134 (("UNZIP *=.*unzip")
1135 (string-append "UNZIP = " (which "unzip")))
1136 (("ZIPEXE *=.*zip")
1137 (string-append "ZIPEXE = " (which "zip")))
1138 (("SED *=.*sed")
1139 (string-append "SED = " (which "sed"))))
1140
1141 ;; Some of these timestamps cause problems as they are more than
1142 ;; 10 years ago, failing the build process.
1143 (substitute*
1144 "openjdk.src/jdk/src/share/classes/java/util/CurrencyData.properties"
1145 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
1146 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
1147 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
1148 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY")))
1149 #t))
1150 (add-before 'configure 'set-additional-paths
1151 (lambda* (#:key inputs #:allow-other-keys)
e2098e2d
RW
1152 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1153 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1154 (string-append "ALSA_INCLUDE="
1155 (assoc-ref inputs "alsa-lib")
1156 "/include/alsa/version.h")))
1157 (setenv "CC" "gcc")
1158 (setenv "CPATH"
1159 (string-append (assoc-ref inputs "libxcomposite")
1160 "/include/X11/extensions" ":"
1161 (assoc-ref inputs "libxrender")
1162 "/include/X11/extensions" ":"
1163 (assoc-ref inputs "libxtst")
1164 "/include/X11/extensions" ":"
1165 (assoc-ref inputs "libxinerama")
1166 "/include/X11/extensions" ":"
1167 (or (getenv "CPATH") "")))
1168 (setenv "ALT_OBJCOPY" (which "objcopy"))
1169 (setenv "ALT_CUPS_HEADERS_PATH"
1170 (string-append (assoc-ref inputs "cups")
1171 "/include"))
1172 (setenv "ALT_FREETYPE_HEADERS_PATH"
1173 (string-append (assoc-ref inputs "freetype")
1174 "/include"))
1175 (setenv "ALT_FREETYPE_LIB_PATH"
1176 (string-append (assoc-ref inputs "freetype")
1177 "/lib"))
71053e14
RW
1178 #t))
1179 (add-before 'check 'fix-test-framework
1180 (lambda _
1181 ;; Fix PATH in test environment
1182 (substitute* "test/jtreg/com/sun/javatest/regtest/Main.java"
1183 (("PATH=/bin:/usr/bin")
1184 (string-append "PATH=" (getenv "PATH"))))
1185 (substitute* "test/jtreg/com/sun/javatest/util/SysEnv.java"
1186 (("/usr/bin/env") (which "env")))
1187 (substitute* "openjdk.src/hotspot/test/test_env.sh"
1188 (("/bin/rm") (which "rm"))
1189 (("/bin/cp") (which "cp"))
1190 (("/bin/mv") (which "mv")))
1191 #t))
1192 (add-before 'check 'fix-hotspot-tests
1193 (lambda _
1194 (with-directory-excursion "openjdk.src/hotspot/test/"
1195 (substitute* "jprt.config"
1196 (("PATH=\"\\$\\{path4sdk\\}\"")
1197 (string-append "PATH=" (getenv "PATH")))
1198 (("make=/usr/bin/make")
1199 (string-append "make=" (which "make"))))
1200 (substitute* '("runtime/6626217/Test6626217.sh"
1201 "runtime/7110720/Test7110720.sh")
1202 (("/bin/rm") (which "rm"))
1203 (("/bin/cp") (which "cp"))
1204 (("/bin/mv") (which "mv"))))
1205 #t))
1206 (add-before 'check 'fix-jdk-tests
1207 (lambda _
1208 (with-directory-excursion "openjdk.src/jdk/test/"
1209 (substitute* "com/sun/jdi/JdbReadTwiceTest.sh"
1210 (("/bin/pwd") (which "pwd")))
1211 (substitute* "com/sun/jdi/ShellScaffold.sh"
1212 (("/bin/kill") (which "kill")))
1213 (substitute* "start-Xvfb.sh"
1214 ;;(("/usr/bin/X11/Xvfb") (which "Xvfb"))
1215 (("/usr/bin/nohup") (which "nohup")))
1216 (substitute* "javax/security/auth/Subject/doAs/Test.sh"
1217 (("/bin/rm") (which "rm")))
1218 (substitute* "tools/launcher/MultipleJRE.sh"
1219 (("echo \"#!/bin/sh\"")
1220 (string-append "echo \"#!" (which "rm") "\""))
1221 (("/usr/bin/zip") (which "zip")))
1222 (substitute* "com/sun/jdi/OnThrowTest.java"
1223 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1224 (substitute* "java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java"
1225 (("/usr/bin/uptime") (which "uptime")))
1226 (substitute* "java/lang/ProcessBuilder/Basic.java"
1227 (("/usr/bin/env") (which "env"))
1228 (("/bin/false") (which "false"))
1229 (("/bin/true") (which "true"))
1230 (("/bin/cp") (which "cp"))
1231 (("/bin/sh") (which "sh")))
1232 (substitute* "java/lang/ProcessBuilder/FeelingLucky.java"
1233 (("/bin/sh") (which "sh")))
1234 (substitute* "java/lang/ProcessBuilder/Zombies.java"
1235 (("/usr/bin/perl") (which "perl"))
1236 (("/bin/ps") (which "ps"))
1237 (("/bin/true") (which "true")))
1238 (substitute* "java/lang/Runtime/exec/ConcurrentRead.java"
1239 (("/usr/bin/tee") (which "tee")))
1240 (substitute* "java/lang/Runtime/exec/ExecWithDir.java"
1241 (("/bin/true") (which "true")))
1242 (substitute* "java/lang/Runtime/exec/ExecWithInput.java"
1243 (("/bin/cat") (which "cat")))
1244 (substitute* "java/lang/Runtime/exec/ExitValue.java"
1245 (("/bin/sh") (which "sh"))
1246 (("/bin/true") (which "true"))
1247 (("/bin/kill") (which "kill")))
1248 (substitute* "java/lang/Runtime/exec/LotsOfDestroys.java"
1249 (("/usr/bin/echo") (which "echo")))
1250 (substitute* "java/lang/Runtime/exec/LotsOfOutput.java"
1251 (("/usr/bin/cat") (which "cat")))
1252 (substitute* "java/lang/Runtime/exec/SleepyCat.java"
1253 (("/bin/cat") (which "cat"))
1254 (("/bin/sleep") (which "sleep"))
1255 (("/bin/sh") (which "sh")))
1256 (substitute* "java/lang/Runtime/exec/StreamsSurviveDestroy.java"
1257 (("/bin/cat") (which "cat")))
1258 (substitute* "java/rmi/activation/CommandEnvironment/SetChildEnv.java"
1259 (("/bin/chmod") (which "chmod")))
1260 (substitute* "java/util/zip/ZipFile/Assortment.java"
1261 (("/bin/sh") (which "sh"))))
1262 #t))
1263 (replace 'check
1264 (lambda _
1265 ;; The "make check-*" targets always return zero, so we need to
1266 ;; check for errors in the associated log files to determine
1267 ;; whether any tests have failed.
1268 (use-modules (ice-9 rdelim))
1269 (let* ((error-pattern (make-regexp "^(Error|FAILED):.*"))
1270 (checker (lambda (port)
1271 (let loop ()
1272 (let ((line (read-line port)))
1273 (cond
1274 ((eof-object? line) #t)
1275 ((regexp-exec error-pattern line) #f)
1276 (else (loop)))))))
1277 (run-test (lambda (test)
1278 (system* "make" test)
1279 (call-with-input-file
1280 (string-append "test/" test ".log")
1281 checker))))
1282 (or #t ; skip tests
1283 (and (run-test "check-hotspot")
1284 (run-test "check-langtools")
1285 (run-test "check-jdk"))))))
1286 (replace 'install
1287 (lambda* (#:key outputs #:allow-other-keys)
1288 (let ((doc (string-append (assoc-ref outputs "doc")
1289 "/share/doc/icedtea"))
1290 (jre (assoc-ref outputs "out"))
1291 (jdk (assoc-ref outputs "jdk")))
1292 (copy-recursively "openjdk.build/docs" doc)
1293 (copy-recursively "openjdk.build/j2re-image" jre)
1294 (copy-recursively "openjdk.build/j2sdk-image" jdk))
1295 #t))
491dc2fb
RJ
1296 ;; Some of the libraries in the lib/amd64 folder link to libjvm.so.
1297 ;; But that shared object is located in the server/ folder, so it
1298 ;; cannot be found. This phase creates a symbolic link in the
1299 ;; lib/amd64 folder so that the other libraries can find it.
1300 ;;
1301 ;; See:
1302 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1303 ;;
1304 ;; FIXME: Find the bug in the build system, so that this symlink is
1305 ;; not needed.
1306 (add-after 'install 'install-libjvm
1307 (lambda* (#:key inputs outputs #:allow-other-keys)
1308 (let* ((lib-path (string-append (assoc-ref outputs "out")
1309 "/lib/amd64")))
1310 (symlink (string-append lib-path "/server/libjvm.so")
1311 (string-append lib-path "/libjvm.so")))
1312 #t))
71053e14
RW
1313 ;; By default IcedTea only generates an empty keystore. In order to
1314 ;; be able to use certificates in Java programs we need to generate a
1315 ;; keystore from a set of certificates. For convenience we use the
1316 ;; certificates from the nss-certs package.
1317 (add-after 'install 'install-keystore
1318 (lambda* (#:key inputs outputs #:allow-other-keys)
1319 (let* ((keystore "cacerts")
1320 (certs-dir (string-append (assoc-ref inputs "nss-certs")
1321 "/etc/ssl/certs"))
1322 (keytool (string-append (assoc-ref outputs "jdk")
1323 "/bin/keytool")))
1324 (define (extract-cert file target)
1325 (call-with-input-file file
1326 (lambda (in)
1327 (call-with-output-file target
1328 (lambda (out)
1329 (let loop ((line (read-line in 'concat))
1330 (copying? #f))
1331 (cond
1332 ((eof-object? line) #t)
1333 ((string-prefix? "-----BEGIN" line)
1334 (display line out)
1335 (loop (read-line in 'concat) #t))
1336 ((string-prefix? "-----END" line)
1337 (display line out)
1338 #t)
1339 (else
1340 (when copying? (display line out))
1341 (loop (read-line in 'concat) copying?)))))))))
1342 (define (import-cert cert)
1343 (format #t "Importing certificate ~a\n" (basename cert))
1344 (let ((temp "tmpcert"))
1345 (extract-cert cert temp)
1346 (let ((port (open-pipe* OPEN_WRITE keytool
1347 "-import"
1348 "-alias" (basename cert)
1349 "-keystore" keystore
1350 "-storepass" "changeit"
1351 "-file" temp)))
1352 (display "yes\n" port)
1353 (when (not (zero? (status:exit-val (close-pipe port))))
1354 (format #t "failed to import ~a\n" cert)))
1355 (delete-file temp)))
1356
1357 ;; This is necessary because the certificate directory contains
1358 ;; files with non-ASCII characters in their names.
1359 (setlocale LC_ALL "en_US.utf8")
1360 (setenv "LC_ALL" "en_US.utf8")
1361
1362 (for-each import-cert (find-files certs-dir "\\.pem$"))
1363 (mkdir-p (string-append (assoc-ref outputs "out")
1364 "/lib/security"))
1365 (mkdir-p (string-append (assoc-ref outputs "jdk")
1366 "/jre/lib/security"))
1367
1368 ;; The cacerts files we are going to overwrite are chmod'ed as
1369 ;; read-only (444) in icedtea-8 (which derives from this
1370 ;; package). We have to change this so we can overwrite them.
1371 (chmod (string-append (assoc-ref outputs "out")
1372 "/lib/security/" keystore) #o644)
1373 (chmod (string-append (assoc-ref outputs "jdk")
1374 "/jre/lib/security/" keystore) #o644)
1375
1376 (install-file keystore
1377 (string-append (assoc-ref outputs "out")
1378 "/lib/security"))
1379 (install-file keystore
1380 (string-append (assoc-ref outputs "jdk")
1381 "/jre/lib/security"))
1382 #t))))))
f6789047 1383 (native-inputs
d9148890 1384 `(("openjdk-src"
f6789047 1385 ,(drop "openjdk"
7f6485e7 1386 "0l34ikyf62hbzlf9032alzkkqvf7bpmckz4gvirvph755w7gka8l"))
f6789047
RW
1387 ("corba-drop"
1388 ,(drop "corba"
7f6485e7 1389 "050gv2jbg1pi6qkn8w18bwpbklfa5b0kymjvan9pncddbj8m84fz"))
f6789047
RW
1390 ("jaxp-drop"
1391 ,(drop "jaxp"
7f6485e7 1392 "1k6yldwnxfzdg5926r1nlfv8d1r1j7rlp2nkz6gqh05vgyamnfhl"))
f6789047
RW
1393 ("jaxws-drop"
1394 ,(drop "jaxws"
7f6485e7 1395 "110j7jlz47x2gg6f7653x12mssan5kvj9l9h1m1c8c92drfxbqyk"))
f6789047
RW
1396 ("jdk-drop"
1397 ,(drop "jdk"
7f6485e7 1398 "0d1mca38ksxvdskp9im3pp7fdijhj1n3lwq9w13r9s4v3qyskgdd"))
f6789047
RW
1399 ("langtools-drop"
1400 ,(drop "langtools"
7f6485e7 1401 "0nq5236fzxn3p6x8cgncl56mzcmsj07q9gymysnws4c8byc6n0qj"))
f6789047
RW
1402 ("hotspot-drop"
1403 ,(drop "hotspot"
7f6485e7 1404 "17bdv39n4lh8l5737c96f3xgamx4y305m067p01cywgp7zaddqws"))
e2098e2d 1405 ("ant" ,ant-bootstrap)
71053e14 1406 ("attr" ,attr)
71053e14
RW
1407 ("coreutils" ,coreutils)
1408 ("diffutils" ,diffutils) ;for tests
1409 ("gawk" ,gawk)
1410 ("grep" ,grep)
1411 ("libtool" ,libtool)
1412 ("pkg-config" ,pkg-config)
1413 ("wget" ,wget)
1414 ("which" ,which)
1415 ("cpio" ,cpio)
1416 ("zip" ,zip)
1417 ("unzip" ,unzip)
1418 ("fastjar" ,fastjar)
1419 ("libxslt" ,libxslt) ;for xsltproc
1420 ("nss-certs" ,nss-certs)
1421 ("perl" ,perl)
1422 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
e2098e2d 1423 ("jdk" ,icedtea-6 "jdk")))
b711df02 1424 (inputs
71053e14
RW
1425 `(("alsa-lib" ,alsa-lib)
1426 ("cups" ,cups)
1427 ("libx11" ,libx11)
1428 ("libxcomposite" ,libxcomposite)
1429 ("libxt" ,libxt)
1430 ("libxtst" ,libxtst)
1431 ("libxi" ,libxi)
1432 ("libxinerama" ,libxinerama)
1433 ("libxrender" ,libxrender)
1434 ("libjpeg" ,libjpeg)
1435 ("libpng" ,libpng)
1436 ("mit-krb5" ,mit-krb5)
1437 ("nss" ,nss)
1438 ("giflib" ,giflib)
1439 ("fontconfig" ,fontconfig)
1440 ("freetype" ,freetype)
1441 ("lcms" ,lcms)
1442 ("zlib" ,zlib)
1443 ("gtk" ,gtk+-2)))
1444 (home-page "http://icedtea.classpath.org")
1445 (synopsis "Java development kit")
1446 (description
1447 "This package provides the Java development kit OpenJDK built with the
1448IcedTea build harness.")
1449 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1450 ;; same license as both GNU Classpath and OpenJDK.
1451 (license license:gpl2+))))
d2540f80 1452
349a3147 1453(define-public icedtea-8
1d97d8ff 1454 (let* ((version "3.7.0")
349a3147
RW
1455 (drop (lambda (name hash)
1456 (origin
1457 (method url-fetch)
1458 (uri (string-append
db531f73 1459 "http://icedtea.classpath.org/download/drops"
349a3147
RW
1460 "/icedtea8/" version "/" name ".tar.xz"))
1461 (sha256 (base32 hash))))))
1462 (package (inherit icedtea-7)
1d97d8ff 1463 (version "3.7.0")
349a3147
RW
1464 (source (origin
1465 (method url-fetch)
1466 (uri (string-append
1467 "http://icedtea.wildebeest.org/download/source/icedtea-"
1468 version ".tar.xz"))
1469 (sha256
1470 (base32
1d97d8ff 1471 "09yqzn8rpccs7cyv89hhy5zlznpgqw5x3jz0w1ccp0cz1vgs8l5w"))
349a3147
RW
1472 (modules '((guix build utils)))
1473 (snippet
0c729ef4 1474 '(begin
f2785bd6
RW
1475 (substitute* '("configure"
1476 "acinclude.m4")
0c729ef4
RW
1477 ;; Do not embed build time
1478 (("(DIST_ID=\"Custom build).*$" _ prefix)
1479 (string-append prefix "\"\n"))
1480 ;; Do not leak information about the build host
1481 (("DIST_NAME=\"\\$build_os\"")
1482 "DIST_NAME=\"guix\""))
1483 #t))))
349a3147 1484 (arguments
f2785bd6
RW
1485 `(#:imported-modules
1486 ((guix build ant-build-system)
1487 (guix build syscalls)
1488 ,@%gnu-build-system-modules)
1489 ,@(substitute-keyword-arguments (package-arguments icedtea-7)
1490 ((#:modules modules)
1491 `((guix build utils)
1492 (guix build gnu-build-system)
1493 ((guix build ant-build-system) #:prefix ant:)
1494 (ice-9 match)
1495 (ice-9 popen)
1496 (srfi srfi-19)
1497 (srfi srfi-26)))
1498 ((#:configure-flags flags)
1499 `(let ((jdk (assoc-ref %build-inputs "jdk")))
1500 `( ;;"--disable-bootstrap"
1501 "--enable-bootstrap"
1502 "--enable-nss"
1503 "--disable-downloading"
1504 "--disable-system-pcsc"
1505 "--disable-system-sctp"
1506 "--disable-tests" ;they are run in the check phase instead
1507 "--with-openjdk-src-dir=./openjdk.src"
1508 ,(string-append "--with-jdk-home=" jdk))))
1509 ((#:phases phases)
1510 `(modify-phases ,phases
1511 (delete 'fix-x11-extension-include-path)
1512 (delete 'patch-paths)
1513 (delete 'set-additional-paths)
1514 (delete 'patch-patches)
1515 ;; Prevent the keytool from recording the current time when
1516 ;; adding certificates at build time.
1517 (add-after 'unpack 'patch-keystore
1518 (lambda _
1519 (substitute* "openjdk.src/jdk/src/share/classes/sun/security/provider/JavaKeyStore.java"
1520 (("date = new Date\\(\\);")
1521 "\
1522date = (System.getenv(\"SOURCE_DATE_EPOCH\") != null) ?\
1523new Date(Long.parseLong(System.getenv(\"SOURCE_DATE_EPOCH\"))) :\
1524new Date();"))
1525 #t))
1526 (add-after 'unpack 'patch-jni-libs
1527 ;; Hardcode dynamically loaded libraries.
1528 (lambda _
1529 (let* ((library-path (search-path-as-string->list
1530 (getenv "LIBRARY_PATH")))
1531 (find-library (lambda (name)
1532 (search-path
1533 library-path
1534 (string-append "lib" name ".so")))))
1535 (for-each
1536 (lambda (file)
1537 (catch 'decoding-error
1538 (lambda ()
1539 (substitute* file
1540 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
1541 _ name version)
1542 (format #f "\"~a\"" (find-library name)))
1543 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
1544 (format #f "\"~a\"" (find-library name)))))
1545 (lambda _
1546 ;; Those are safe to skip.
1547 (format (current-error-port)
1548 "warning: failed to substitute: ~a~%"
1549 file))))
1550 (find-files "openjdk.src/jdk/src/solaris/native"
1551 "\\.c|\\.h"))
1552 #t)))
1553 (replace 'install
1554 (lambda* (#:key outputs #:allow-other-keys)
1555 (let ((doc (string-append (assoc-ref outputs "doc")
1556 "/share/doc/icedtea"))
1557 (jre (assoc-ref outputs "out"))
1558 (jdk (assoc-ref outputs "jdk")))
1559 (copy-recursively "openjdk.build/docs" doc)
1560 (copy-recursively "openjdk.build/images/j2re-image" jre)
1561 (copy-recursively "openjdk.build/images/j2sdk-image" jdk)
1562 ;; Install the nss.cfg file to JRE to enable SSL/TLS
1563 ;; support via NSS.
1564 (copy-file (string-append jdk "/jre/lib/security/nss.cfg")
1565 (string-append jre "/lib/security/nss.cfg"))
1566 #t)))
1567 (add-after 'install 'strip-jar-timestamps
1568 (assoc-ref ant:%standard-phases 'strip-jar-timestamps)))))))
349a3147
RW
1569 (native-inputs
1570 `(("jdk" ,icedtea-7 "jdk")
1571 ("openjdk-src"
1572 ,(drop "openjdk"
1d97d8ff 1573 "1mj6xgmw31i6qd30qi9dmv7160fbcfq5ikz1jwjihdg2793il19p"))
12eecbf0
LF
1574 ("aarch32-drop"
1575 ,(drop "aarch32"
1d97d8ff 1576 "1wb8k5zm40zld0986dvmlh5xh3gyixbg9h26sl662zy92amhmyyg"))
349a3147
RW
1577 ("corba-drop"
1578 ,(drop "corba"
1d97d8ff 1579 "11ma4zz0599cy70xd219v7a8vin7p96xrhhz3wsaw6cjhkzpagah"))
349a3147
RW
1580 ("jaxp-drop"
1581 ,(drop "jaxp"
1d97d8ff 1582 "14m1y0z0fbm5z5zjw3vnq85py8dma84bi3f9cw8rhdyc6skk8q4i"))
349a3147
RW
1583 ("jaxws-drop"
1584 ,(drop "jaxws"
1d97d8ff 1585 "09andnm6xaasnp963hgx42yiflifiljp9z7z85jrfyc5z8a5whmf"))
349a3147
RW
1586 ("jdk-drop"
1587 ,(drop "jdk"
1d97d8ff 1588 "0s6lcpc0zckz2fnq98aqf28nz9y3wbi41a3kyaqqa2abwbkm1zwl"))
349a3147
RW
1589 ("langtools-drop"
1590 ,(drop "langtools"
1d97d8ff 1591 "15wizy123vhk40chl1b4p552jf2pw2hdww0myf11qab425axz4nw"))
349a3147
RW
1592 ("hotspot-drop"
1593 ,(drop "hotspot"
1d97d8ff 1594 "1ciz1w9j0kz7s1dxdhyqq71nla9icyz6qvn0b9z2zgkklqa98qmm"))
349a3147
RW
1595 ("nashorn-drop"
1596 ,(drop "nashorn"
1d97d8ff 1597 "19pzl3ppaw8j6r5cnyp8qiw3hxijh3hdc46l39g5yfhdl4pr4hpa"))
fd34d4f4
LF
1598 ("shenandoah-drop"
1599 ,(drop "shenandoah"
1d97d8ff 1600 "0k33anxdzw1icn072wynfmmdjhsv50hay0j1sfkfxny12rb3vgdy"))
349a3147 1601 ,@(fold alist-delete (package-native-inputs icedtea-7)
e2098e2d 1602 '("jdk" "openjdk-src" "corba-drop" "jaxp-drop" "jaxws-drop"
349a3147
RW
1603 "jdk-drop" "langtools-drop" "hotspot-drop")))))))
1604
a243e12a 1605(define-public icedtea icedtea-7)
068e476f 1606
5490480c 1607\f
8bbd0408
RW
1608(define-public ant/java8
1609 (package (inherit ant-bootstrap)
1610 (name "ant")
1611 (version "1.10.1")
1612 (source (origin
1613 (method url-fetch)
1614 (uri (string-append "mirror://apache/ant/source/apache-ant-"
1615 version "-src.tar.gz"))
1616 (sha256
1617 (base32
1618 "10p3dh77lkzzzcy32dk9azljixzadp46fggjfbvgkl8mmb8cxxv8"))
1619 (modules '((guix build utils)))
1620 (snippet
1621 '(begin
1622 (for-each delete-file
1623 (find-files "lib/optional" "\\.jar$"))
1624 #t))))
1625 (arguments
1626 (substitute-keyword-arguments (package-arguments ant-bootstrap)
1627 ((#:phases phases)
1628 `(modify-phases ,phases
1629 (add-after 'unpack 'remove-scripts
1630 ;; Remove bat / cmd scripts for DOS as well as the antRun and runant
1631 ;; wrappers.
1632 (lambda _
1633 (for-each delete-file
1634 (find-files "src/script"
1635 "(.*\\.(bat|cmd)|runant.*|antRun.*)"))
1636 #t))
1637 (replace 'build
1638 (lambda* (#:key inputs outputs #:allow-other-keys)
1639 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
1640
1641 ;; Disable tests to avoid dependency on hamcrest-core, which needs
1642 ;; Ant to build. This is necessary in addition to disabling the
1643 ;; "check" phase, because the dependency on "test-jar" would always
1644 ;; result in the tests to be run.
1645 (substitute* "build.xml"
1646 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
1647 (zero? (system* "bash" "bootstrap.sh"
1648 (string-append "-Ddist.dir="
1649 (assoc-ref outputs "out"))))))))))
1650 (native-inputs
1651 `(("jdk" ,icedtea-8 "jdk")))))
1652
e441fc56
RW
1653;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x series
1654;; requires Java 8.
1655(define-public ant
1656 (package (inherit ant/java8)
1657 (version "1.9.9")
1658 (source (origin
1659 (method url-fetch)
1660 (uri (string-append "mirror://apache/ant/source/apache-ant-"
1661 version "-src.tar.gz"))
1662 (sha256
1663 (base32
1664 "1k28mka0m3isy9yr8gz84kz1f3f879rwaxrd44vdn9xbfwvwk86n"))))
1665 (native-inputs
1666 `(("jdk" ,icedtea-7 "jdk")))))
1667
9ce7ac99
RW
1668(define-public ant-apache-bcel
1669 (package
1670 (inherit ant/java8)
1671 (name "ant-apache-bcel")
1672 (arguments
1673 (substitute-keyword-arguments (package-arguments ant/java8)
1674 ((#:phases phases)
1675 `(modify-phases ,phases
1676 (add-after 'unpack 'link-bcel
1677 (lambda* (#:key inputs #:allow-other-keys)
1678 (for-each (lambda (file)
1679 (symlink file
1680 (string-append "lib/optional/"
1681 (basename file))))
1682 (find-files (assoc-ref inputs "java-commons-bcel")
1683 "\\.jar$"))
1684 #t))
1685 (add-after 'build 'install
1686 (lambda* (#:key outputs #:allow-other-keys)
1687 (let* ((out (assoc-ref outputs "out"))
1688 (share (string-append out "/share/java"))
1689 (bin (string-append out "/bin"))
1690 (lib (string-append out "/lib")))
1691 (mkdir-p share)
1692 (install-file (string-append lib "/ant-apache-bcel.jar") share)
1693 (delete-file-recursively bin)
1694 (delete-file-recursively lib)
1695 #t)))))))
1696 (inputs
1697 `(("java-commons-bcel" ,java-commons-bcel)
1698 ,@(package-inputs ant/java8)))))
1699
fa6c4213
RW
1700(define-public ant-junit
1701 (package
1702 (inherit ant/java8)
1703 (name "ant-junit")
1704 (arguments
1705 (substitute-keyword-arguments (package-arguments ant/java8)
1706 ((#:phases phases)
1707 `(modify-phases ,phases
1708 (add-after 'unpack 'link-junit
1709 (lambda* (#:key inputs #:allow-other-keys)
1710 (for-each (lambda (file)
1711 (symlink file
1712 (string-append "lib/optional/"
1713 (basename file))))
1714 (find-files (assoc-ref inputs "java-junit")
1715 "\\.jar$"))
1716 #t))
1717 (add-after 'build 'install
1718 (lambda* (#:key outputs #:allow-other-keys)
1719 (let* ((out (assoc-ref outputs "out"))
1720 (share (string-append out "/share/java"))
1721 (bin (string-append out "/bin"))
1722 (lib (string-append out "/lib")))
1723 (mkdir-p share)
1724 (install-file (string-append lib "/ant-junit.jar") share)
1725 (delete-file-recursively bin)
1726 (delete-file-recursively lib)
1727 #t)))))))
1728 (inputs
1729 `(("java-junit" ,java-junit)
1730 ,@(package-inputs ant/java8)))))
1731
fc6e2727
RW
1732(define-public clojure
1733 (let* ((remove-archives '(begin
1734 (for-each delete-file
1735 (find-files "." ".*\\.(jar|zip)"))
1736 #t))
1737 (submodule (lambda (prefix version hash)
1738 (origin
1739 (method url-fetch)
1740 (uri (string-append "https://github.com/clojure/"
1741 prefix version ".tar.gz"))
1742 (sha256 (base32 hash))
1743 (modules '((guix build utils)))
1744 (snippet remove-archives)))))
1745 (package
1746 (name "clojure")
1d47ea86 1747 (version "1.9.0")
fc6e2727
RW
1748 (source
1749 (origin
1750 (method url-fetch)
1751 (uri
1d47ea86
AV
1752 (string-append "https://github.com/clojure/clojure/archive/clojure-"
1753 version ".tar.gz"))
fc6e2727 1754 (sha256
1d47ea86 1755 (base32 "0xjbzcw45z32vsn9pifp7ndysjzqswp5ig0jkjpivigh2ckkdzha"))
fc6e2727
RW
1756 (modules '((guix build utils)))
1757 (snippet remove-archives)))
1758 (build-system ant-build-system)
1759 (arguments
1760 `(#:modules ((guix build ant-build-system)
1761 (guix build utils)
1762 (ice-9 ftw)
1763 (ice-9 regex)
1764 (srfi srfi-1)
1765 (srfi srfi-26))
1766 #:test-target "test"
1767 #:phases
1768 (modify-phases %standard-phases
1769 (add-after 'unpack 'unpack-submodule-sources
1770 (lambda* (#:key inputs #:allow-other-keys)
1771 (for-each
1772 (lambda (name)
1773 (mkdir-p name)
1774 (with-directory-excursion name
1775 (or (zero? (system* "tar"
1776 ;; Use xz for repacked tarball.
1777 "--xz"
1778 "--extract"
1779 "--verbose"
1780 "--file" (assoc-ref inputs name)
1781 "--strip-components=1"))
1782 (error "failed to unpack tarball" name)))
1783 (copy-recursively (string-append name "/src/main/clojure/")
1784 "src/clj/"))
1d47ea86
AV
1785 '("core-specs-alpha-src"
1786 "data-generators-src"
1787 "spec-alpha-src"
fc6e2727
RW
1788 "test-check-src"
1789 "test-generative-src"
1d47ea86 1790 "tools-namespace-src"))
fc6e2727
RW
1791 #t))
1792 ;; The javadoc target is not built by default.
1793 (add-after 'build 'build-doc
1794 (lambda _
1795 (zero? (system* "ant" "javadoc"))))
1796 ;; Needed since no install target is provided.
1797 (replace 'install
1798 (lambda* (#:key outputs #:allow-other-keys)
1799 (let ((java-dir (string-append (assoc-ref outputs "out")
1800 "/share/java/")))
1801 ;; Install versioned to avoid collisions.
1802 (install-file (string-append "clojure-" ,version ".jar")
1803 java-dir)
1804 #t)))
1805 ;; Needed since no install-doc target is provided.
1806 (add-after 'install 'install-doc
1807 (lambda* (#:key outputs #:allow-other-keys)
1808 (let ((doc-dir (string-append (assoc-ref outputs "out")
1809 "/share/doc/clojure-"
1810 ,version "/")))
1811 (copy-recursively "doc/clojure" doc-dir)
1812 (copy-recursively "target/javadoc/"
1813 (string-append doc-dir "javadoc/"))
1814 (for-each (cut install-file <> doc-dir)
1815 (filter (cut string-match
1816 ".*\\.(html|markdown|md|txt)"
1817 <>)
1818 (scandir "./")))
1819 #t))))))
1820 ;; The native-inputs below are needed to run the tests.
1821 (native-inputs
1d47ea86
AV
1822 `(("core-specs-alpha-src"
1823 ,(submodule "core.specs.alpha/archive/core.specs.alpha-"
1824 "0.1.24"
1825 "0v2a0svf1ar2y42ajxwsjr7zmm5j7pp2zwrd2jh3k7xzd1p9x1fv"))
1826 ("data-generators-src"
fc6e2727
RW
1827 ,(submodule "data.generators/archive/data.generators-"
1828 "0.1.2"
1829 "0kki093jp4ckwxzfnw8ylflrfqs8b1i1wi9iapmwcsy328dmgzp1"))
1d47ea86
AV
1830 ("spec-alpha-src"
1831 ,(submodule "spec.alpha/archive/spec.alpha-"
1832 "0.1.143"
1833 "00alf0347licdn773w2jarpllyrbl52qz4d8mw61anjksacxylzz"))
fc6e2727
RW
1834 ("test-check-src"
1835 ,(submodule "test.check/archive/test.check-"
1836 "0.9.0"
1837 "0p0mnyhr442bzkz0s4k5ra3i6l5lc7kp6ajaqkkyh4c2k5yck1md"))
1838 ("test-generative-src"
1839 ,(submodule "test.generative/archive/test.generative-"
1840 "0.5.2"
1841 "1pjafy1i7yblc7ixmcpfq1lfbyf3jaljvkgrajn70sws9xs7a9f8"))
1842 ("tools-namespace-src"
1843 ,(submodule "tools.namespace/archive/tools.namespace-"
1844 "0.2.11"
1d47ea86 1845 "10baak8v0hnwz2hr33bavshm7y49mmn9zsyyms1dwjz45p5ymhy0"))))
fc6e2727
RW
1846 (home-page "https://clojure.org/")
1847 (synopsis "Lisp dialect running on the JVM")
1848 (description "Clojure is a dynamic, general-purpose programming language,
1849combining the approachability and interactive development of a scripting
1850language with an efficient and robust infrastructure for multithreaded
1851programming. Clojure is a compiled language, yet remains completely dynamic
1852– every feature supported by Clojure is supported at runtime. Clojure
1853provides easy access to the Java frameworks, with optional type hints and type
1854inference, to ensure that calls to Java can avoid reflection.
1855
1856Clojure is a dialect of Lisp, and shares with Lisp the code-as-data philosophy
1857and a powerful macro system. Clojure is predominantly a functional programming
1858language, and features a rich set of immutable, persistent data structures.
1859When mutable state is needed, Clojure offers a software transactional memory
1860system and reactive Agent system that ensure clean, correct, multithreaded
1861designs.")
1862 ;; Clojure is licensed under EPL1.0
1863 ;; ASM bytecode manipulation library is licensed under BSD-3
1864 ;; Guava Murmur3 hash implementation is licensed under APL2.0
1865 ;; src/clj/repl.clj is licensed under CPL1.0
1866 ;;
1867 ;; See readme.html or readme.txt for details.
1868 (license (list license:epl1.0
1869 license:bsd-3
1870 license:asl2.0
1871 license:cpl1.0)))))
1872
fc8d100b
RW
1873(define-public javacc
1874 (package
1875 (name "javacc")
1876 (version "7.0.3")
1877 (source (origin
1878 (method url-fetch)
1879 (uri (string-append "https://github.com/javacc/javacc/"
1880 "archive/" version ".tar.gz"))
1881 (file-name (string-append "javacc-" version ".tar.gz"))
1882 (sha256
1883 (base32
1884 "111xc9mnmc5a6qz6x3xbhqc07y1lg2b996ggzw0hrblg42zya9xf"))))
1885 (build-system ant-build-system)
1886 (arguments
1887 `(#:test-target "test"
1888 #:phases
1889 (modify-phases %standard-phases
1890 (add-after 'unpack 'delete-bundled-libs
1891 (lambda _
1892 (delete-file-recursively "lib") #t))
1893 (replace 'install (install-jars "target")))))
1894 (home-page "https://javacc.org/")
1895 (synopsis "Java parser generator")
1896 (description "Java Compiler Compiler (JavaCC) is the most popular parser
1897generator for use with Java applications. A parser generator is a tool that
1898reads a grammar specification and converts it to a Java program that can
1899recognize matches to the grammar. In addition to the parser generator itself,
1900JavaCC provides other standard capabilities related to parser generation such
1901as tree building (via a tool called JJTree included with JavaCC), actions,
1902debugging, etc.")
1903 (license license:bsd-3)))
1904
6688c41e
RW
1905(define-public javacc-4
1906 (package (inherit javacc)
1907 (version "4.1")
1908 (source (origin
1909 (method git-fetch)
1910 (uri (git-reference
1911 (url "https://github.com/javacc/javacc.git")
1912 (commit "release_41")))
1913 (file-name (string-append "javacc-" version "-checkout"))
1914 (sha256
1915 (base32
1916 "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0"))))
1917 ;; Tests fail with
1918 ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60:
1919 ;; JAVACODE failed
1920 (arguments
1921 `(#:tests? #f
1922 #:phases
1923 (modify-phases %standard-phases
1924 (add-after 'unpack 'delete-bundled-libs
1925 (lambda _
1926 (delete-file-recursively "lib") #t))
1927 (replace 'install (install-jars "bin/lib")))))))
1928
c1cb8576
RW
1929;; This is the last 3.x release of ECJ
1930(define-public java-ecj-3
1931 (package
1932 (name "java-ecj")
1933 (version "3.8.2")
1934 (source (origin
1935 (method url-fetch)
1936 (uri (string-append "http://archive.eclipse.org/eclipse/"
1937 "downloads/drops/R-" version
1938 "-201301310800/ecjsrc-" version ".jar"))
1939 (sha256
1940 (base32
1941 "01mdj14jw11g1jfnki4fi8229p0c6zzckd38zqy2w4m3cjcvsx04"))))
1942 (build-system ant-build-system)
1943 (arguments
1944 `(#:tests? #f ; none included
1945 #:jdk ,icedtea-7 ; doesn't build with JDK8+
1946 #:make-flags (list "-f" "src/build.xml")
1947 #:build-target "build"
1948 #:phases
1949 (modify-phases %standard-phases
1950 (add-after 'unpack 'fix-manifest
1951 (lambda _
1952 ;; Record the main class to make ecj executable.
1953 (with-atomic-file-replacement "src/META-INF/MANIFEST.MF"
1954 (lambda (in out)
1955 (display "Manifest-Version: 1.0
1956Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
1957 out)))))
1958 (replace 'install (install-jars ".")))))
1959 (home-page "https://eclipse.org")
1960 (synopsis "Eclipse Java development tools core batch compiler")
1961 (description "This package provides the Eclipse Java core batch compiler.")
1962 (license license:epl1.0)))
1963
f201b18e
RW
1964;; This is needed for java-cisd-args4j
1965(define-public java-ecj-3.5
1966 (package (inherit java-ecj-3)
1967 (version "3.5.1")
1968 (source (origin
1969 (method url-fetch/zipbomb)
1970 (uri (string-append "http://archive.eclipse.org/eclipse/"
1971 "downloads/drops/R-" version
1972 "-200909170800/ecjsrc-" version ".zip"))
1973 (sha256
1974 (base32
1975 "1vnl2mavisc567bip736xzsvvbjif5279wc4a7pbdik5wlir8qr7"))))
1976 (build-system ant-build-system)
1977 (arguments
1978 `(#:tests? #f ; none included
1979 #:jdk ,icedtea-7 ; doesn't build with JDK8+
1980 #:build-target "build"
1981 #:phases
1982 (modify-phases %standard-phases
1983 (add-after 'unpack 'fix-manifest
1984 (lambda _
1985 ;; Record the main class to make ecj executable.
1986 (with-atomic-file-replacement "META-INF/MANIFEST.MF"
1987 (lambda (in out)
1988 (dump-port in out)
1989 (display "Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
1990 out)))))
1991 (replace 'install (install-jars ".")))))
1992 (native-inputs
1993 `(("unzip" ,unzip)))))
1994
30d55473
RW
1995(define-public java-cisd-base
1996 (let ((revision 38938)
1997 (base-version "14.12.0"))
1998 (package
1999 (name "java-cisd-base")
2000 (version (string-append base-version "-" (number->string revision)))
2001 (source (origin
2002 (method svn-fetch)
2003 (uri (svn-reference
2004 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2005 "base/tags/release/"
2006 (version-major+minor base-version)
2007 ".x/" base-version "/base/"))
2008 (revision revision)))
2009 (file-name (string-append "java-cisd-base-" version "-checkout"))
2010 (sha256
2011 (base32
2012 "1i5adyf7nzclb0wydgwa1az04qliid8035vpahaandmkmigbnxiy"))
2013 (modules '((guix build utils)))
2014 (snippet
2015 '(begin
2016 ;; Delete included gradle jar
2017 (delete-file-recursively "gradle/wrapper")
2018 ;; Delete pre-built native libraries
2019 (delete-file-recursively "libs")
2020 #t))))
2021 (build-system ant-build-system)
2022 (arguments
2023 `(#:make-flags '("-file" "build/build.xml")
2024 #:test-target "jar-test"
2025 #:jdk ,icedtea-8
2026 #:phases
2027 (modify-phases %standard-phases
2028 (add-after 'unpack 'unpack-build-resources
2029 (lambda* (#:key inputs #:allow-other-keys)
2030 (copy-recursively (assoc-ref inputs "build-resources")
2031 "../build_resources")
2032 #t))
2033 (add-after 'unpack-build-resources 'fix-dependencies
2034 (lambda* (#:key inputs #:allow-other-keys)
2035 (substitute* "build/build.xml"
2036 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2037 (string-append (assoc-ref inputs "java-testng")
2038 "/share/java/java-testng.jar"))
2039 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2040 (string-append (assoc-ref inputs "java-commons-lang")
2041 "/share/java/commons-lang-"
2042 ,(package-version java-commons-lang) ".jar"))
2043 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2044 (string-append (assoc-ref inputs "java-commons-io")
2045 "/share/java/commons-io-"
2046 ,(package-version java-commons-io)
2047 "-SNAPSHOT.jar"))
2048 ;; Remove dependency on svn
2049 (("<build-info.*") "")
2050 (("\\$\\{revision.number\\}")
2051 ,(number->string revision))
2052 (("\\$\\{version.number\\}") ,base-version))
2053 ;; Remove dependency on classycle
2054 (substitute* "../build_resources/ant/build-common.xml"
2055 (("<taskdef name=\"dependency-checker.*") "")
2056 (("classname=\"classycle.*") "")
2057 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2058 #t))
2059 ;; A few tests fail because of the lack of a proper /etc/groups and
2060 ;; /etc/passwd file in the build container.
2061 (add-after 'unpack 'disable-broken-tests
2062 (lambda _
2063 (substitute* "sourceTest/java/ch/systemsx/cisd/base/AllTests.java"
2064 (("Unix.isOperational\\(\\)") "false"))
2065 #t))
2066 ;; These decorators are almost useless and pull in an unpackaged
2067 ;; dependency.
2068 (add-after 'unpack 'remove-useless-decorators
2069 (lambda _
2070 (substitute* "source/java/ch/systemsx/cisd/base/unix/Unix.java"
2071 (("@Private") "")
2072 (("import ch.rinn.restrictions.Private;") ""))
2073 (substitute* "sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java"
2074 (("@Friend.*") "")
2075 (("import ch.rinn.restrictions.Friend;") ""))
2076 #t))
2077 (add-before 'configure 'build-native-code
2078 (lambda* (#:key inputs #:allow-other-keys)
2079 (let ((jdk (assoc-ref inputs "jdk"))
2080 (dir ,(match (%current-system)
2081 ("i686-linux"
2082 "i386-Linux")
2083 ((or "armhf-linux" "aarch64-linux")
2084 "arm-Linux")
2085 ((or "x86_64-linux")
2086 "amd64-Linux")
2087 (_ "unknown-Linux"))))
2088 (with-directory-excursion "source/c"
2089 (invoke "gcc" "-shared" "-O3" "-fPIC" "unix.c"
2090 (string-append "-I" jdk "/include")
2091 (string-append "-I" jdk "/include/linux")
2092 "-o" "libunix.so")
2093 (invoke "gcc" "-shared" "-O3" "-fPIC"
2094 "-DMACHINE_BYTE_ORDER=1"
2095 "copyCommon.c"
2096 "copyByteChar.c"
2097 "copyByteDouble.c"
2098 "copyByteFloat.c"
2099 "copyByteInt.c"
2100 "copyByteLong.c"
2101 "copyByteShort.c"
2102 (string-append "-I" jdk "/include")
2103 (string-append "-I" jdk "/include/linux")
2104 "-o" "libnativedata.so"))
2105 (install-file "source/c/libunix.so"
2106 (string-append "libs/native/unix/" dir))
2107 (install-file "source/c/libnativedata.so"
2108 (string-append "libs/native/nativedata/" dir))
2109 #t)))
2110 ;; In the "check" phase we only build the test executable.
2111 (add-after 'check 'run-tests
2112 (lambda _
2113 (invoke "java" "-jar" "targets/dist/sis-base-test.jar")
2114 (delete-file "targets/dist/sis-base-test.jar")
2115 #t))
2116 (replace 'install (install-jars "targets/dist")))))
2117 (native-inputs
2118 `(("jdk" ,icedtea-8)
2119 ("java-commons-lang" ,java-commons-lang)
2120 ("java-commons-io" ,java-commons-io)
2121 ("java-testng" ,java-testng)
2122 ("build-resources"
2123 ,(origin
2124 (method svn-fetch)
2125 (uri (svn-reference
2126 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2127 "base/tags/release/"
2128 (version-major+minor base-version)
2129 ".x/" base-version
2130 "/build_resources/"))
2131 (revision revision)))
2132 (sha256
2133 (base32
2134 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
2135 (home-page "http://svnsis.ethz.ch")
2136 (synopsis "Utility classes for libraries from ETH Zurich")
2137 (description "This library supplies some utility classes needed for
2138libraries from the SIS division at ETH Zurich like jHDF5.")
2139 ;; The C sources are under a non-copyleft license, which looks like a
2140 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
2141 (license (list license:asl2.0
2142 (license:non-copyleft "file://source/c/COPYING"))))))
2143
04ddca26
RW
2144(define-public java-cisd-args4j
2145 (let ((revision 39162)
2146 (base-version "9.11.2"))
2147 (package
2148 (name "java-cisd-args4j")
2149 (version (string-append base-version "-" (number->string revision)))
2150 (source (origin
2151 (method svn-fetch)
2152 (uri (svn-reference
2153 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2154 "args4j/tags/release/"
2155 (version-major+minor base-version)
2156 ".x/" base-version "/args4j/"))
2157 (revision revision)))
2158 (file-name (string-append "java-cisd-args4j-" version "-checkout"))
2159 (sha256
2160 (base32
2161 "0hhqznjaivq7ips7mkwas78z42s6djsm20rrs7g1zd59rcsakxn2"))))
2162 (build-system ant-build-system)
2163 (arguments
2164 `(#:make-flags '("-file" "build/build.xml")
2165 #:tests? #f ; there are no tests
2166 ;; There are weird build failures with JDK8, such as: "The type
2167 ;; java.io.ObjectInputStream cannot be resolved. It is indirectly
2168 ;; referenced from required .class files"
2169 #:jdk ,icedtea-7
2170 #:modules ((guix build ant-build-system)
2171 (guix build utils)
2172 (guix build java-utils)
2173 (sxml simple)
2174 (sxml transform)
2175 (sxml xpath))
2176 #:phases
2177 (modify-phases %standard-phases
2178 (add-after 'unpack 'unpack-build-resources
2179 (lambda* (#:key inputs #:allow-other-keys)
2180 (mkdir-p "../build_resources")
2181 (invoke "tar" "xf" (assoc-ref inputs "build-resources")
2182 "-C" "../build_resources"
2183 "--strip-components=1")
2184 (mkdir-p "../build_resources/lib")
2185 #t))
2186 (add-after 'unpack-build-resources 'fix-dependencies
2187 (lambda* (#:key inputs #:allow-other-keys)
2188 ;; FIXME: There should be a more convenient abstraction for
2189 ;; editing XML files.
2190 (with-directory-excursion "../build_resources/ant/"
2191 (chmod "build-common.xml" #o664)
2192 (call-with-output-file "build-common.xml.new"
2193 (lambda (port)
2194 (sxml->xml
2195 (pre-post-order
2196 (with-input-from-file "build-common.xml"
2197 (lambda _ (xml->sxml #:trim-whitespace? #t)))
2198 `(;; Remove dependency on classycle and custom ant tasks
2199 (taskdef . ,(lambda (tag . kids)
2200 (let ((name ((sxpath '(name *text*)) kids)))
2201 (if (or (member "build-info" name)
2202 (member "dependency-checker" name)
2203 (member "build-java-subprojects" name)
2204 (member "project-classpath" name))
2205 '() ; skip
2206 `(,tag ,@kids)))))
2207 (typedef . ,(lambda (tag . kids)
2208 (let ((name ((sxpath '(name *text*)) kids)))
2209 (if (member "recursive-jar" name)
2210 '() ; skip
2211 `(,tag ,@kids)))))
2212 (build-java-subprojects . ,(lambda _ '()))
2213 ;; Ignore everything else
2214 (*default* . ,(lambda (tag . kids) `(,tag ,@kids)))
2215 (*text* . ,(lambda (_ txt) txt))))
2216 port)))
2217 (rename-file "build-common.xml.new" "build-common.xml"))
2218 (substitute* "build/build.xml"
2219 (("\\$\\{lib\\}/cisd-base/cisd-base.jar")
2220 (string-append (assoc-ref inputs "java-cisd-base")
2221 "/share/java/sis-base.jar"))
2222 ;; Remove dependency on svn
2223 (("<build-info.*") "")
2224 (("\\$\\{revision.number\\}")
2225 ,(number->string revision))
2226 (("\\$\\{version.number\\}") ,base-version)
2227 ;; Don't use custom ant tasks.
2228 (("recursive-jar") "jar")
2229 (("<project-classpath.*") ""))
2230 #t))
2231 (replace 'install (install-jars "targets/dist")))))
2232 (inputs
2233 `(("java-cisd-base" ,java-cisd-base)))
2234 (native-inputs
2235 `(("ecj" ,java-ecj-3.5)
2236 ("build-resources"
2237 ,(origin
2238 (method svn-fetch)
2239 (uri (svn-reference
2240 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2241 "args4j/tags/release/"
2242 (version-major+minor base-version)
2243 ".x/" base-version
2244 "/build_resources/"))
2245 (revision revision)))
2246 (sha256
2247 (base32
2248 "056cam4k8pll7ass31sy6gwn8g8719njc41yf4l02b0342nilkyf"))
2249 (modules '((guix build utils)))
2250 ;; Delete bundled pre-built jars.
2251 (snippet
2252 '(begin (delete-file-recursively "lib/") #t))))))
2253 (home-page "http://svnsis.ethz.ch")
2254 (synopsis "Command line parser library")
2255 (description "This package provides a parser for command line arguments.")
2256 (license license:asl2.0))))
2257
2f0d0418
RW
2258(define-public java-cisd-jhdf5
2259 (let ((revision 39162)
2260 (base-version "14.12.6"))
2261 (package
2262 (name "java-cisd-jhdf5")
2263 (version (string-append base-version "-" (number->string revision)))
2264 (source (origin
2265 (method svn-fetch)
2266 (uri (svn-reference
2267 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2268 "jhdf5/tags/release/"
2269 (version-major+minor base-version)
2270 ".x/" base-version "/jhdf5/"))
2271 (revision revision)))
2272 (file-name (string-append "java-cisd-jhdf5-" version "-checkout"))
2273 (sha256
2274 (base32
2275 "13i17s2hn0q9drdqvp8csy7770p3hdbh9rp30ihln2ldkfawdmz0"))
2276 (modules '((guix build utils)))
2277 (snippet
2278 '(begin
2279 ;; Delete included gradle jar
2280 (delete-file-recursively "gradle/wrapper")
2281 ;; Delete pre-built native libraries
2282 (delete-file-recursively "libs")
2283 #t))))
2284 (build-system ant-build-system)
2285 (arguments
2286 `(#:make-flags '("-file" "build/build.xml")
2287 #:build-target "jar-all"
2288 #:test-target "jar-test"
2289 #:jdk ,icedtea-8
2290 #:phases
2291 (modify-phases %standard-phases
2292 ;; Don't erase results from the build phase when building tests.
2293 (add-after 'unpack 'separate-test-target-from-clean
2294 (lambda _
2295 (substitute* "build/build.xml"
2296 (("\"jar-test\" depends=\"clean, ")
2297 "\"jar-test\" depends=\""))
2298 #t))
2299 (add-after 'unpack 'unpack-build-resources
2300 (lambda* (#:key inputs #:allow-other-keys)
2301 (copy-recursively (assoc-ref inputs "build-resources")
2302 "../build_resources")
2303 (delete-file-recursively "../build_resources/lib/")
2304 (mkdir-p "../build_resources/lib")
2305 ;; Remove dependency on classycle
2306 (substitute* "../build_resources/ant/build-common.xml"
2307 (("<taskdef name=\"dependency-checker.*") "")
2308 (("classname=\"classycle.*") "")
2309 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2310 ;; Remove dependency on svn
2311 (substitute* "build/build.xml"
2312 (("<build-info.*") "")
2313 (("\\$\\{revision.number\\}")
2314 ,(number->string revision))
2315 (("\\$\\{version.number\\}") ,base-version))
2316 #t))
2317 (add-after 'unpack-build-resources 'fix-dependencies
2318 (lambda* (#:key inputs #:allow-other-keys)
2319 (substitute* "../build_resources/ant/build-common.xml"
2320 (("../libraries/testng/testng-jdk15.jar")
2321 (string-append (assoc-ref inputs "java-testng")
2322 "/share/java/java-testng.jar")))
2323 (substitute* "build/build.xml"
2324 (("\\$\\{lib\\}/sis-base/sis-base.jar")
2325 (string-append (assoc-ref inputs "java-cisd-base")
2326 "/share/java/sis-base.jar"))
2327 (("\\$\\{lib\\}/cisd-args4j/cisd-args4j.jar")
2328 (string-append (assoc-ref inputs "java-cisd-args4j")
2329 "/share/java/cisd-args4j.jar"))
2330 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2331 (string-append (assoc-ref inputs "java-commons-lang")
2332 "/share/java/commons-lang-"
2333 ,(package-version java-commons-lang) ".jar"))
2334 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2335 (string-append (assoc-ref inputs "java-commons-io")
2336 "/share/java/commons-io-"
2337 ,(package-version java-commons-io)
2338 "-SNAPSHOT.jar"))
2339 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2340 (string-append (assoc-ref inputs "java-testng")
2341 "/share/java/java-testng.jar"))
2342 (("\\$\\{lib\\}/junit4/junit.jar")
2343 (string-append (assoc-ref inputs "java-junit")
2344 "/share/java/junit.jar"))
2345 (("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar")
2346 (string-append (assoc-ref inputs "java-hamcrest-core")
2347 "/share/java/hamcrest-core.jar")))
2348 ;; Remove dependency on ch.rinn.restrictions
2349 (with-directory-excursion "source/java/ch/systemsx/cisd/hdf5/"
2350 (substitute* '("BitSetConversionUtils.java"
2351 "HDF5Utils.java")
2352 (("import ch.rinn.restrictions.Private;") "")
2353 (("@Private") "")))
2354 (with-directory-excursion "sourceTest/java/ch/systemsx/cisd/hdf5/"
2355 (substitute* '("BitSetConversionTest.java"
2356 "h5ar/HDF5ArchiverTest.java")
2357 (("import ch.rinn.restrictions.Friend;") "")
2358 (("@Friend.*") ""))
2359 ;; Remove leftovers from removing @Friend
2360 (substitute* "h5ar/HDF5ArchiverTest.java"
2361 (("\\{ HDF5Archiver.class, IdCache.class, LinkRecord.class \\}\\)")
2362 "")))
2363 #t))
2364 (add-before 'configure 'build-native-library
2365 (lambda* (#:key inputs #:allow-other-keys)
2366 (let ((jdk (assoc-ref inputs "jdk"))
2367 (hdf5 (assoc-ref inputs "hdf5"))
2368 (dir ,(match (%current-system)
2369 ("i686-linux"
2370 "i386-Linux")
2371 ((or "armhf-linux" "aarch64-linux")
2372 "arm-Linux")
2373 ((or "x86_64-linux")
2374 "amd64-Linux")
2375 (_ "unknown-Linux"))))
2376 (with-directory-excursion "source/c"
2377 (apply invoke `("gcc" "-shared" "-O3"
2378 "-fPIC"
2379 "-Wl,--exclude-libs,ALL"
2380 ,@(find-files "jhdf5" "\\.c$")
2381 ,@(find-files "hdf-java" "\\.c$")
2382 ,(string-append "-I" hdf5 "/include")
2383 ,(string-append "-I" jdk "/include")
2384 ,(string-append "-I" jdk "/include/linux")
2385 ,(string-append hdf5 "/lib/libhdf5.a")
2386 "-o" "libjhdf5.so" "-lz")))
2387 (install-file "source/c/libjhdf5.so"
2388 (string-append "libs/native/jhdf5/" dir))
2389 #t)))
2390 ;; In the "check" phase we only build the test executable.
2391 (add-after 'check 'run-tests
2392 (lambda _
2393 (invoke "java" "-jar" "targets/dist/sis-jhdf5-test.jar")
2394 (delete-file "targets/dist/sis-jhdf5-test.jar")
2395 #t))
2396 (replace 'install
2397 (install-jars "targets/dist")))))
2398 (inputs
2399 `(("java-cisd-base" ,java-cisd-base)
2400 ("java-cisd-args4j" ,java-cisd-args4j)
2401 ("java-commons-lang" ,java-commons-lang)
2402 ("java-commons-io" ,java-commons-io)
2403 ("hdf5" ,hdf5)
2404 ("zlib" ,zlib)))
2405 (native-inputs
2406 `(("jdk" ,icedtea-8)
2407 ("java-testng" ,java-testng)
2408 ("java-junit" ,java-junit)
2409 ("java-jmock" ,java-jmock)
2410 ("java-hamcrest-core" ,java-hamcrest-core)
2411 ("build-resources"
2412 ,(origin
2413 (method svn-fetch)
2414 (uri (svn-reference
2415 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2416 "jhdf5/tags/release/"
2417 (version-major+minor base-version)
2418 ".x/" base-version
2419 "/build_resources/"))
2420 (revision revision)))
2421 (sha256
2422 (base32
2423 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
2424 (home-page "https://wiki-bsse.ethz.ch/display/JHDF5/")
2425 (synopsis "Java binding for HDF5")
2426 (description "JHDF5 is a high-level API in Java for reading and writing
2427HDF5 files, building on the libraries provided by the HDF Group.")
2428 ;; The C sources are under a non-copyleft license, which looks like a
2429 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
2430 (license (list license:asl2.0
2431 (license:non-copyleft "file://source/c/COPYING"))))))
2432
218d093b
RW
2433(define-public java-classpathx-servletapi
2434 (package
2435 (name "java-classpathx-servletapi")
ae307724 2436 (version "3.0.1")
218d093b
RW
2437 (source (origin
2438 (method url-fetch)
2439 (uri (string-append "mirror://gnu/classpathx/servletapi/"
2440 "servletapi-" version ".tar.gz"))
2441 (sha256
2442 (base32
ae307724 2443 "07d8h051siga2f33fra72hk12sbq1bxa4jifjg0qj0vfazjjff0x"))))
218d093b
RW
2444 (build-system ant-build-system)
2445 (arguments
2446 `(#:tests? #f ; there is no test target
2447 #:build-target "compile"
218d093b 2448 #:make-flags
ae307724 2449 (list "-Dbuild.compiler=javac1.8"
218d093b
RW
2450 (string-append "-Ddist=" (assoc-ref %outputs "out")))
2451 #:phases
2452 (modify-phases %standard-phases
2453 (replace 'install
2454 (lambda* (#:key make-flags #:allow-other-keys)
2455 (zero? (apply system* `("ant" "dist" ,@make-flags))))))))
2456 (home-page "https://www.gnu.org/software/classpathx/")
2457 (synopsis "Java servlet API implementation")
2458 (description "This is the GNU servlet API distribution, part of the
2459ClasspathX project. It provides implementations of version 3.0 of the servlet
2460API and version 2.1 of the Java ServerPages API.")
2461 (license license:gpl3+)))
2462
5490480c
RW
2463(define-public java-swt
2464 (package
2465 (name "java-swt")
8710d4dd 2466 (version "4.7.1a")
5490480c
RW
2467 (source
2468 ;; The types of many variables and procedures differ in the sources
2469 ;; dependent on whether the target architecture is a 32-bit system or a
2470 ;; 64-bit system. Instead of patching the sources on demand in a build
2471 ;; phase we download either the 32-bit archive (which mostly uses "int"
2472 ;; types) or the 64-bit archive (which mostly uses "long" types).
8710d4dd
RW
2473 (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9")
2474 (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q")
5490480c
RW
2475 (file32 "x86")
2476 (file64 "x86_64"))
2477 (let-values (((hash file)
2478 (match (or (%current-target-system) (%current-system))
2479 ("x86_64-linux" (values hash64 file64))
2480 (_ (values hash32 file32)))))
2481 (origin
2482 (method url-fetch)
2483 (uri (string-append
8710d4dd
RW
2484 "http://download.eclipse.org/eclipse/downloads/drops4/"
2485 "R-" version "-201710090410/swt-" version
2486 "-gtk-linux-" file ".zip"))
5490480c
RW
2487 (sha256 (base32 hash))))))
2488 (build-system ant-build-system)
2489 (arguments
2490 `(#:jar-name "swt.jar"
8710d4dd 2491 #:jdk ,icedtea-8
5490480c
RW
2492 #:tests? #f ; no "check" target
2493 #:phases
2494 (modify-phases %standard-phases
2495 (replace 'unpack
2496 (lambda* (#:key source #:allow-other-keys)
2497 (and (mkdir "swt")
2498 (zero? (system* "unzip" source "-d" "swt"))
2499 (chdir "swt")
2500 (mkdir "src")
2501 (zero? (system* "unzip" "src.zip" "-d" "src")))))
2502 ;; The classpath contains invalid icecat jars. Since we don't need
2503 ;; anything other than the JDK on the classpath, we can simply unset
2504 ;; it.
2505 (add-after 'configure 'unset-classpath
2506 (lambda _ (unsetenv "CLASSPATH") #t))
2507 (add-before 'build 'build-native
2508 (lambda* (#:key inputs outputs #:allow-other-keys)
2509 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
2510 ;; Build shared libraries. Users of SWT have to set the system
2511 ;; property swt.library.path to the "lib" directory of this
2512 ;; package output.
2513 (mkdir-p lib)
2514 (setenv "OUTPUT_DIR" lib)
2515 (with-directory-excursion "src"
2516 (zero? (system* "bash" "build.sh"))))))
2517 (add-after 'install 'install-native
2518 (lambda* (#:key outputs #:allow-other-keys)
2519 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
2520 (for-each (lambda (file)
2521 (install-file file lib))
2522 (find-files "." "\\.so$"))
2523 #t))))))
2524 (inputs
8710d4dd 2525 `(("gtk" ,gtk+-2)
5490480c
RW
2526 ("libxtst" ,libxtst)
2527 ("libxt" ,libxt)
2528 ("mesa" ,mesa)
2529 ("glu" ,glu)))
2530 (native-inputs
2531 `(("pkg-config" ,pkg-config)
2532 ("unzip" ,unzip)))
2533 (home-page "https://www.eclipse.org/swt/")
2534 (synopsis "Widget toolkit for Java")
2535 (description
2536 "SWT is a widget toolkit for Java designed to provide efficient, portable
2537access to the user-interface facilities of the operating systems on which it
2538is implemented.")
2539 ;; SWT code is licensed under EPL1.0
2540 ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1
2541 ;; Cairo bindings contain code under MPL1.1
2542 ;; XULRunner 1.9 bindings contain code under MPL2.0
2543 (license (list
2544 license:epl1.0
2545 license:mpl1.1
2546 license:mpl2.0
2547 license:lgpl2.1+))))
2548
068e476f
RJ
2549(define-public java-xz
2550 (package
2551 (name "java-xz")
92966847 2552 (version "1.6")
068e476f
RJ
2553 (source (origin
2554 (method url-fetch)
2555 (uri (string-append "http://tukaani.org/xz/xz-java-" version ".zip"))
2556 (sha256
2557 (base32
92966847 2558 "1z3p1ri1gvl07inxn0agx44ck8n7wrzfmvkz8nbq3njn8r9wba8x"))))
068e476f
RJ
2559 (build-system ant-build-system)
2560 (arguments
2561 `(#:tests? #f ; There are no tests to run.
2562 #:jar-name ,(string-append "xz-" version ".jar")
2563 #:phases
2564 (modify-phases %standard-phases
2565 ;; The unpack phase enters the "maven" directory by accident.
2566 (add-after 'unpack 'chdir
2567 (lambda _ (chdir "..") #t)))))
2568 (native-inputs
2569 `(("unzip" ,unzip)))
d6ddc5ab 2570 (home-page "https://tukaani.org/xz/java.html")
068e476f
RJ
2571 (synopsis "Implementation of XZ data compression in pure Java")
2572 (description "This library aims to be a complete implementation of XZ data
2573compression in pure Java. Single-threaded streamed compression and
2574decompression and random access decompression have been fully implemented.")
2575 (license license:public-domain)))
04100c3b
RW
2576
2577;; java-hamcrest-core uses qdox version 1.12. We package this version instead
2578;; of the latest release.
2579(define-public java-qdox-1.12
2580 (package
2581 (name "java-qdox")
2582 (version "1.12.1")
2583 (source (origin
2584 (method url-fetch)
2585 (uri (string-append "http://central.maven.org/maven2/"
2586 "com/thoughtworks/qdox/qdox/" version
2587 "/qdox-" version "-sources.jar"))
2588 (sha256
2589 (base32
2590 "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl"))))
2591 (build-system ant-build-system)
2592 (arguments
2593 `(;; Tests require junit
2594 #:tests? #f
2595 #:jar-name "qdox.jar"
2596 #:phases
2597 (modify-phases %standard-phases
2598 (replace 'unpack
2599 (lambda* (#:key source #:allow-other-keys)
2600 (mkdir "src")
2601 (with-directory-excursion "src"
2602 (zero? (system* "jar" "-xf" source)))))
2603 ;; At this point we don't have junit, so we must remove the API
2604 ;; tests.
2605 (add-after 'unpack 'delete-tests
2606 (lambda _
2607 (delete-file-recursively "src/com/thoughtworks/qdox/junit")
2608 #t)))))
2609 (home-page "http://qdox.codehaus.org/")
2610 (synopsis "Parse definitions from Java source files")
2611 (description
2612 "QDox is a high speed, small footprint parser for extracting
2613class/interface/method definitions from source files complete with JavaDoc
b13cf17f 2614@code{@@tags}. It is designed to be used by active code generators or
04100c3b
RW
2615documentation tools.")
2616 (license license:asl2.0)))
e7e28510
RW
2617
2618(define-public java-jarjar
2619 (package
2620 (name "java-jarjar")
2621 (version "1.4")
2622 (source (origin
2623 (method url-fetch)
2624 (uri (string-append
2625 "https://storage.googleapis.com/google-code-archive-downloads/v2/"
2626 "code.google.com/jarjar/jarjar-src-" version ".zip"))
2627 (sha256
2628 (base32
2629 "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl"))))
2630 (build-system ant-build-system)
2631 (arguments
2632 `(;; Tests require junit, which ultimately depends on this package.
2633 #:tests? #f
2634 #:build-target "jar"
2635 #:phases
2636 (modify-phases %standard-phases
2637 (replace 'install
2638 (lambda* (#:key outputs #:allow-other-keys)
2639 (let ((target (string-append (assoc-ref outputs "out")
2640 "/share/java")))
2641 (install-file (string-append "dist/jarjar-" ,version ".jar")
2642 target))
2643 #t)))))
2644 (native-inputs
2645 `(("unzip" ,unzip)))
2646 (home-page "https://code.google.com/archive/p/jarjar/")
2647 (synopsis "Repackage Java libraries")
2648 (description
2649 "Jar Jar Links is a utility that makes it easy to repackage Java
2650libraries and embed them into your own distribution. Jar Jar Links includes
2651an Ant task that extends the built-in @code{jar} task.")
2652 (license license:asl2.0)))
87c31a21
RW
2653
2654(define-public java-hamcrest-core
2655 (package
2656 (name "java-hamcrest-core")
2657 (version "1.3")
2658 (source (origin
2659 (method url-fetch)
00672896
HG
2660 (uri (string-append "https://github.com/hamcrest/JavaHamcrest/"
2661 "archive/hamcrest-java-" version ".tar.gz"))
87c31a21
RW
2662 (sha256
2663 (base32
00672896 2664 "11g0s105fmwzijbv08lx8jlb521yravjmxnpgdx08fvg1kjivhva"))
87c31a21
RW
2665 (modules '((guix build utils)))
2666 (snippet
2667 '(begin
00672896
HG
2668 ;; Delete bundled thirds-party jar archives.
2669 (delete-file-recursively "lib")
87c31a21
RW
2670 #t))))
2671 (build-system ant-build-system)
2672 (arguments
2673 `(#:tests? #f ; Tests require junit
a8d3cb62
RW
2674 #:modules ((guix build ant-build-system)
2675 (guix build utils)
2676 (srfi srfi-1))
87c31a21 2677 #:make-flags (list (string-append "-Dversion=" ,version))
fae0b4ca 2678 #:test-target "unit-test"
87c31a21
RW
2679 #:build-target "core"
2680 #:phases
2681 (modify-phases %standard-phases
2682 ;; Disable unit tests, because they require junit, which requires
2683 ;; hamcrest-core. We also give a fixed value to the "Built-Date"
2684 ;; attribute from the manifest for reproducibility.
2685 (add-before 'configure 'patch-build.xml
2686 (lambda _
2687 (substitute* "build.xml"
2688 (("unit-test, ") "")
2689 (("\\$\\{build.timestamp\\}") "guix"))
2690 #t))
2691 ;; Java's "getMethods()" returns methods in an unpredictable order.
2692 ;; To make the output of the generated code deterministic we must
2693 ;; sort the array of methods.
2694 (add-after 'unpack 'make-method-order-deterministic
2695 (lambda _
2696 (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java"
2697 (("import java\\.util\\.Iterator;" line)
2698 (string-append line "\n"
2699 "import java.util.Arrays; import java.util.Comparator;"))
2700 (("allMethods = cls\\.getMethods\\(\\);" line)
2701 (string-append "_" line
2702 "
2703private Method[] getSortedMethods() {
2704 Arrays.sort(_allMethods, new Comparator<Method>() {
2705 @Override
2706 public int compare(Method a, Method b) {
2707 return a.toString().compareTo(b.toString());
2708 }
2709 });
2710 return _allMethods;
2711}
2712
2713private Method[] allMethods = getSortedMethods();")))))
2714 (add-before 'build 'do-not-use-bundled-qdox
2715 (lambda* (#:key inputs #:allow-other-keys)
2716 (substitute* "build.xml"
2717 (("lib/generator/qdox-1.12.jar")
2718 (string-append (assoc-ref inputs "java-qdox-1.12")
2719 "/share/java/qdox.jar")))
2720 #t))
fab959d3
HG
2721 ;; build.xml searches for .jar files in this directoy, which
2722 ;; we remove from the source archive.
2723 (add-before 'build 'create-dummy-directories
2724 (lambda _
2725 (mkdir-p "lib/integration")
2726 #t))
87c31a21
RW
2727 (replace 'install
2728 (lambda* (#:key outputs #:allow-other-keys)
a8d3cb62
RW
2729 (let* ((target (string-append (assoc-ref outputs "out")
2730 "/share/java/"))
2731 (version-suffix ,(string-append "-" version ".jar"))
2732 (install-without-version-suffix
2733 (lambda (jar)
2734 (copy-file jar
2735 (string-append target
2736 (basename jar version-suffix)
2737 ".jar")))))
2738 (mkdir-p target)
2739 (for-each
2740 install-without-version-suffix
2741 (find-files "build"
2742 (lambda (name _)
2743 (and (string-suffix? ".jar" name)
2744 (not (string-suffix? "-sources.jar" name)))))))
2745 #t)))))
87c31a21
RW
2746 (native-inputs
2747 `(("java-qdox-1.12" ,java-qdox-1.12)
2748 ("java-jarjar" ,java-jarjar)))
2749 (home-page "http://hamcrest.org/")
2750 (synopsis "Library of matchers for building test expressions")
2751 (description
2752 "This package provides a library of matcher objects (also known as
2753constraints or predicates) allowing @code{match} rules to be defined
2754declaratively, to be used in other frameworks. Typical scenarios include
2755testing frameworks, mocking libraries and UI validation rules.")
2756 (license license:bsd-2)))
d0184f44
RW
2757
2758(define-public java-junit
2759 (package
2760 (name "java-junit")
2761 (version "4.12")
2762 (source (origin
2763 (method url-fetch)
2764 (uri (string-append "https://github.com/junit-team/junit/"
2765 "archive/r" version ".tar.gz"))
2766 (file-name (string-append name "-" version ".tar.gz"))
2767 (sha256
2768 (base32
2769 "090dn5v1vs0b3acyaqc0gjf6p8lmd2h24wfzsbq7sly6b214anws"))
2770 (modules '((guix build utils)))
2771 (snippet
2772 '(begin
2773 ;; Delete bundled jar archives.
2774 (delete-file-recursively "lib")
2775 #t))))
2776 (build-system ant-build-system)
2777 (arguments
2778 `(#:tests? #f ; no tests
2779 #:jar-name "junit.jar"))
2780 (inputs
2781 `(("java-hamcrest-core" ,java-hamcrest-core)))
2782 (home-page "http://junit.org/")
2783 (synopsis "Test framework for Java")
2784 (description
2785 "JUnit is a simple framework to write repeatable tests for Java projects.
2786JUnit provides assertions for testing expected results, test fixtures for
2787sharing common test data, and test runners for running tests.")
2788 (license license:epl1.0)))
9fb20d01
RW
2789
2790(define-public java-plexus-utils
2791 (package
2792 (name "java-plexus-utils")
2793 (version "3.0.24")
2794 (source (origin
2795 (method url-fetch)
2796 (uri (string-append "https://github.com/codehaus-plexus/"
2797 "plexus-utils/archive/plexus-utils-"
2798 version ".tar.gz"))
2799 (sha256
2800 (base32
2801 "1mlwpc6fms24slygv5yvi6fi9hcha2fh0v73p5znpi78bg36i2js"))))
2802 (build-system ant-build-system)
2803 ;; FIXME: The default build.xml does not include a target to install
2804 ;; javadoc files.
2805 (arguments
2806 `(#:jar-name "plexus-utils.jar"
2807 #:source-dir "src/main"
2808 #:phases
2809 (modify-phases %standard-phases
2810 (add-after 'unpack 'fix-reference-to-/bin-and-/usr
2811 (lambda _
2812 (substitute* "src/main/java/org/codehaus/plexus/util/\
2813cli/shell/BourneShell.java"
2814 (("/bin/sh") (which "sh"))
2815 (("/usr/") (getcwd)))
2816 #t))
2817 (add-after 'unpack 'fix-or-disable-broken-tests
2818 (lambda _
2819 (with-directory-excursion "src/test/java/org/codehaus/plexus/util"
2820 (substitute* '("cli/CommandlineTest.java"
2821 "cli/shell/BourneShellTest.java")
2822 (("/bin/sh") (which "sh"))
2823 (("/bin/echo") (which "echo")))
2824
2825 ;; This test depends on MavenProjectStub, but we don't have
2826 ;; a package for Maven.
2827 (delete-file "introspection/ReflectionValueExtractorTest.java")
2828
2829 ;; FIXME: The command line tests fail, maybe because they use
2830 ;; absolute paths.
2831 (delete-file "cli/CommandlineTest.java"))
2832 #t)))))
2833 (native-inputs
2834 `(("java-junit" ,java-junit)))
2835 (home-page "http://codehaus-plexus.github.io/plexus-utils/")
2836 (synopsis "Common utilities for the Plexus framework")
2837 (description "This package provides various Java utility classes for the
2838Plexus framework to ease working with strings, files, command lines, XML and
2839more.")
2840 (license license:asl2.0)))
1e555562
HG
2841
2842(define-public java-plexus-interpolation
2843 (package
2844 (name "java-plexus-interpolation")
2845 (version "1.23")
2846 (source (origin
2847 (method url-fetch)
2848 (uri (string-append "https://github.com/codehaus-plexus/"
2849 "plexus-interpolation/archive/"
2850 "plexus-interpolation-" version ".tar.gz"))
2851 (sha256
2852 (base32
fd75eb6c 2853 "03377yzlx5q440m6sxxgv6a5qb8fl30zzcgxgc0hxk5qgl2z1jjn"))))
1e555562
HG
2854 (build-system ant-build-system)
2855 (arguments
2856 `(#:jar-name "plexus-interpolation.jar"
2857 #:source-dir "src/main"))
2858 (native-inputs
2859 `(("java-junit" ,java-junit)
2860 ("java-hamcrest-core" ,java-hamcrest-core)))
2861 (home-page "http://codehaus-plexus.github.io/plexus-interpolation/")
2862 (synopsis "Java components for interpolating ${} strings and the like")
2863 (description "Plexus interpolator is a modular, flexible interpolation
2864framework for the expression language style commonly seen in Maven, Plexus,
2865and other related projects.
2866
2867It has its foundation in the @code{org.codehaus.plexus.utils.interpolation}
2868package within @code{plexus-utils}, but has been separated in order to allow
2869these two libraries to vary independently of one another.")
2870 (license license:asl2.0)))
8f8ed9aa 2871
bb27eb0d
JL
2872(define-public java-plexus-classworlds
2873 (package
2874 (name "java-plexus-classworlds")
2875 (version "2.5.2")
2876 (source (origin
2877 (method url-fetch)
2878 (uri (string-append "https://github.com/codehaus-plexus/"
2879 "plexus-classworlds/archive/plexus-classworlds-"
2880 version ".tar.gz"))
2881 (sha256
2882 (base32
2883 "1qm4p0rl8d82lzhsiwnviw11jnq44s0gflg78zq152xyyr2xmh8g"))))
2884 (build-system ant-build-system)
2885 (arguments
2886 `(#:jar-name "plexus-classworlds.jar"
2887 #:source-dir "src/main"
2888 #:tests? #f));; FIXME: we need to generate some resources as in pom.xml
2889 (native-inputs
2890 `(("java-junit" ,java-junit)))
2891 (home-page "http://codehaus-plexus.github.io/plexus-classworlds/")
2892 (synopsis "Java class loader framework")
f4548394
TGR
2893 (description "Plexus classworlds replaces the native @code{ClassLoader}
2894mechanism of Java. It is especially useful for dynamic loading of application
bb27eb0d
JL
2895components.")
2896 (license license:asl2.0)))
2897
a7ad92ad 2898(define java-plexus-container-default-bootstrap
0726d4ea
JL
2899 (package
2900 (name "java-plexus-container-default-bootstrap")
2901 (version "1.7.1")
2902 (source (origin
2903 (method url-fetch)
2904 (uri (string-append "https://github.com/codehaus-plexus/plexus-containers"
2905 "/archive/plexus-containers-" version ".tar.gz"))
2906 (sha256
2907 (base32
2908 "0xw5g30qf4a83608rw9v2hv8pfsz7d69dkdhk6r0wia4q78hh1pc"))))
2909 (build-system ant-build-system)
2910 (arguments
2911 `(#:jar-name "container-default.jar"
2912 #:source-dir "plexus-container-default/src/main/java"
2913 #:test-dir "plexus-container-default/src/test"
2914 #:jdk ,icedtea-8
2915 #:tests? #f; requires plexus-archiver, which depends on this package
2916 #:phases
2917 (modify-phases %standard-phases
2918 (add-before 'build 'copy-resources
2919 (lambda _
2920 (copy-recursively
2921 "plexus-container-default/src/main/resources/"
2922 "build/classes")
2923 #t)))))
2924 (inputs
2925 `(("worldclass" ,java-plexus-classworlds)
2926 ("xbean" ,java-geronimo-xbean-reflect)
2927 ("utils" ,java-plexus-utils)
2928 ("junit" ,java-junit)
2929 ("guava" ,java-guava)))
2930 (home-page "https://github.com/codehaus-plexus/plexus-containers")
f4548394 2931 (synopsis "Inversion-of-control container")
0726d4ea 2932 (description "Plexus-default-container is Plexus' inversion-of-control
f4548394 2933(@dfn{IoC}) container. It is composed of its public API and its default
0726d4ea
JL
2934implementation.")
2935 (license license:asl2.0)))
2936
0858b9dc
JL
2937(define-public java-plexus-io
2938 (package
2939 (name "java-plexus-io")
2940 (version "3.0.0")
2941 (source (origin
2942 (method url-fetch)
2943 (uri (string-append "https://github.com/codehaus-plexus/plexus-io"
2944 "/archive/plexus-io-" version ".tar.gz"))
2945 (sha256
2946 (base32
2947 "0f2j41kihaymxkpbm55smpxjja235vad8cgz94frfy3ppcp021dw"))))
2948 (build-system ant-build-system)
2949 (arguments
2950 `(#:jar-name "plexus-io.jar"
2951 #:source-dir "src/main/java"
2952 #:test-dir "src/test"
2953 #:jdk ,icedtea-8
2954 #:phases
2955 (modify-phases %standard-phases
2956 (add-before 'build 'copy-resources
2957 (lambda _
2958 (mkdir-p "build/classes/META-INF/plexus")
2959 (copy-file "src/main/resources/META-INF/plexus/components.xml"
2960 "build/classes/META-INF/plexus/components.xml")
2961 #t)))))
2962 (inputs
2963 `(("utils" ,java-plexus-utils)
2964 ("commons-io" ,java-commons-io)
2965 ("java-jsr305" ,java-jsr305)))
2966 (native-inputs
2967 `(("junit" ,java-junit)
2968 ("hamcrest" ,java-hamcrest-core)
2969 ("guava" ,java-guava)
2970 ("classworlds" ,java-plexus-classworlds)
2971 ("xbean" ,java-geronimo-xbean-reflect)
2972 ("container-default" ,java-plexus-container-default-bootstrap)))
2973 (home-page "https://github.com/codehaus-plexus/plexus-io")
2974 (synopsis "I/O plexus components")
2975 (description "Plexus IO is a set of plexus components, which are designed
2976for use in I/O operations. This implementation using plexus components allows
2977reusing it in maven.")
2978 (license license:asl2.0)))
2979
b51df3ca
JL
2980(define-public java-plexus-archiver
2981 (package
2982 (name "java-plexus-archiver")
2983 (version "3.5")
2984 (source (origin
2985 (method url-fetch)
2986 (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver"
2987 "/archive/plexus-archiver-" version ".tar.gz"))
2988 (sha256
2989 (base32
2990 "0iv1j7khra6icqh3jndng3iipfmkc7l5jq2y802cm8r575v75pyv"))))
2991 (build-system ant-build-system)
2992 (arguments
2993 `(#:jar-name "plexus-archiver.jar"
2994 #:source-dir "src/main/java"
2995 #:jdk ,icedtea-8
2996 #:test-dir "src/test"
2997 #:test-exclude (list "**/Abstract*.java" "**/Base*.java")
2998 #:phases
2999 (modify-phases %standard-phases
3000 (add-before 'check 'remove-failing
3001 (lambda _
3002 ;; Requires an older version of plexus container
3003 (delete-file
3004 "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java")))
3005 (add-before 'build 'copy-resources
3006 (lambda _
3007 (mkdir-p "build/classes/META-INF/plexus")
3008 (copy-file "src/main/resources/META-INF/plexus/components.xml"
3009 "build/classes/META-INF/plexus/components.xml")
3010 #t)))))
3011 (inputs
3012 `(("utils" ,java-plexus-utils)
3013 ("commons-io" ,java-commons-io)
3014 ("snappy" ,java-iq80-snappy)
3015 ("io" ,java-plexus-io)
3016 ("compress" ,java-commons-compress)
3017 ("container-default" ,java-plexus-container-default-bootstrap)
3018 ("snappy" ,java-snappy)
3019 ("java-jsr305" ,java-jsr305)))
3020 (native-inputs
3021 `(("junit" ,java-junit)
3022 ("classworld" ,java-plexus-classworlds)
3023 ("xbean" ,java-geronimo-xbean-reflect)
3024 ("xz" ,java-tukaani-xz)
3025 ("guava" ,java-guava)))
3026 (home-page "https://github.com/codehaus-plexus/plexus-archiver")
3027 (synopsis "Archiver component of the Plexus project")
3028 (description "Plexus-archiver contains a component to deal with project
3029archives (jar).")
3030 (license license:asl2.0)))
3031
a0837294
JL
3032(define-public java-plexus-container-default
3033 (package
3034 (inherit java-plexus-container-default-bootstrap)
3035 (name "java-plexus-container-default")
3036 (arguments
3037 `(#:jar-name "container-default.jar"
3038 #:source-dir "plexus-container-default/src/main/java"
3039 #:test-dir "plexus-container-default/src/test"
3040 #:test-exclude (list ;"**/*Test.java"
3041 "**/Abstract*.java"
3042 ;; Requires plexus-hierarchy
3043 "**/PlexusHierarchyTest.java"
3044 ;; Failures
3045 "**/ComponentRealmCompositionTest.java"
3046 "**/PlexusContainerTest.java")
3047 #:jdk ,icedtea-8
3048 #:phases
3049 (modify-phases %standard-phases
3050 (add-before 'build 'copy-resources
3051 (lambda _
3052 (copy-recursively
3053 "plexus-container-default/src/main/resources/"
3054 "build/classes")
3055 #t))
3056 (add-before 'check 'fix-paths
3057 (lambda _
3058 (let ((dir "plexus-container-default/src/test/java/org/codehaus"))
3059 (substitute*
3060 (string-append
3061 dir "/plexus/component/composition/"
3062 "ComponentRealmCompositionTest.java")
3063 (("src/test") "plexus-container-default/src/test"))
3064 #t))))))
3065 (inputs
3066 `(("worldclass" ,java-plexus-classworlds)
3067 ("xbean" ,java-geronimo-xbean-reflect)
3068 ("utils" ,java-plexus-utils)
3069 ("junit" ,java-junit)
3070 ("guava" ,java-guava)))
3071 (native-inputs
3072 `(("archiver" ,java-plexus-archiver)
3073 ("hamcrest" ,java-hamcrest-core)))))
3074
3214afab
JL
3075(define-public java-plexus-component-annotations
3076 (package
3077 (inherit java-plexus-container-default)
3078 (name "java-plexus-component-annotations")
3079 (arguments
3080 `(#:jar-name "plexus-component-annotations.jar"
3081 #:source-dir "plexus-component-annotations/src/main/java"
3082 #:tests? #f)); no tests
3083 (inputs '())
3084 (native-inputs '())
3085 (synopsis "Plexus descriptors generator")
3086 (description "This package is a Maven plugin to generate Plexus descriptors
3087from source tags and class annotations.")))
3088
4f77ba17
JL
3089(define-public java-plexus-cipher
3090 (package
3091 (name "java-plexus-cipher")
3092 (version "1.7")
3093 (source (origin
3094 (method url-fetch)
3095 (uri (string-append "https://github.com/codehaus-plexus/plexus-cipher"
3096 "/archive/plexus-cipher-" version ".tar.gz"))
3097 (sha256
3098 (base32
3099 "1j3r8xzlxlk340snkjp6lk2ilkxlkn8qavsfiq01f43xmvv8ymk3"))))
3100 (build-system ant-build-system)
3101 (arguments
3102 `(#:jar-name "plexus-cipher.jar"
3103 #:source-dir "src/main/java"
3104 #:jdk ,icedtea-8
3105 #:tests? #f; FIXME: requires sisu-inject-bean
3106 #:phases
3107 (modify-phases %standard-phases
3108 (add-before 'build 'copy-resources
3109 (lambda _
3110 (copy-recursively "src/main/resources" "build/classes")
3111 (mkdir-p "build/classes/META-INF/sisu")
3112 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
3113 (lambda _
3114 (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
3115 #t)))))
3116 (inputs
3117 `(("java-cdi-api" ,java-cdi-api)
3118 ("java-javax-inject" ,java-javax-inject)))
3119 (home-page "https://github.com/sonatype/plexus-cipher")
3120 (synopsis "Encryption/decryption Component")
3121 (description "Plexus-cipher contains a component to deal with encryption
3122and decryption.")
3123 (license license:asl2.0)))
3124
239126d4
JL
3125(define-public java-plexus-compiler-api
3126 (package
3127 (name "java-plexus-compiler-api")
3128 (version "2.8.2")
3129 (source (origin
3130 (method url-fetch)
3131 (uri (string-append "https://github.com/codehaus-plexus/plexus-compiler"
3132 "/archive/plexus-compiler-" version ".tar.gz"))
3133 (sha256
3134 (base32
3135 "0g3x26pymcdnfnwv2a1i57pd5s26f5zqfi1rdy98z1bn01klx25k"))))
3136 (build-system ant-build-system)
3137 (arguments
3138 `(#:jar-name "plexus-compiler-api.jar"
3139 #:source-dir "plexus-compiler-api/src/main/java"
3140 #:jdk ,icedtea-8
3141 #:test-dir "plexus-compiler-api/src/test"))
3142 (inputs
3143 `(("java-plexus-container-default" ,java-plexus-container-default)
3144 ("java-plexus-util" ,java-plexus-utils)))
3145 (native-inputs
3146 `(("java-junit" ,java-junit)))
3147 (home-page "https://github.com/codehaus-plexus/plexus-compiler")
3148 (synopsis "Plexus Compilers component's API to manipulate compilers")
3149 (description "This package contains the API used by components to manipulate
3150compilers.")
3151 (license (list license:asl2.0
3152 license:expat))))
3153
f8a519fa
JL
3154(define-public java-plexus-compiler-javac
3155 (package
3156 (inherit java-plexus-compiler-api)
3157 (name "java-plexus-compiler-javac")
3158 (arguments
3159 `(#:jar-name "plexus-compiler-javac.jar"
3160 #:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java"
3161 #:jdk ,icedtea-8
3162 #:tests? #f; depends on compiler-test -> maven-core -> ... -> this package.
3163 #:test-dir "plexus-compilers/plexus-compiler-javac/src/test"))
3164 (inputs
3165 `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
3166 ("java-plexus-utils" ,java-plexus-utils)
3167 ("java-plexus-container-default" ,java-plexus-container-default)))
3168 (native-inputs
3169 `(("java-junit" ,java-junit)))
3170 (synopsis "Javac Compiler support for Plexus Compiler component")
3171 (description "This package contains the Javac Compiler support for Plexus
3172Compiler component.")))
3173
0aa85081
JL
3174(define-public java-plexus-sec-dispatcher
3175 (package
3176 (name "java-plexus-sec-dispatcher")
3177 (version "1.4") ;; Newest release listed at the Maven Central Repository.
3178 (source (origin
3179 ;; This project doesn't tag releases or publish tarballs, so we take
3180 ;; the "prepare release plexus-sec-dispatcher-1.4" git commit.
3181 (method url-fetch)
3182 (uri (string-append "https://github.com/sonatype/plexus-sec-dispatcher/"
3183 "archive/7db8f88048.tar.gz"))
3184 (sha256
3185 (base32
3186 "1smfrk4n7xbrsxpxcp2j4i0j8q86j73w0w6xg7qz83dp6dagdjgp"))
3187 (file-name (string-append name "-" version ".tar.gz"))))
3188 (arguments
3189 `(#:jar-name "plexus-sec-dispatcher.jar"
3190 #:source-dir "src/main/java"
3191 #:jdk ,icedtea-8
3192 #:phases
3193 (modify-phases %standard-phases
3194 (add-before 'build 'generate-models
3195 (lambda* (#:key inputs #:allow-other-keys)
3196 (define (modello-single-mode file version mode)
3197 (zero? (system* "java"
3198 "org.codehaus.modello.ModelloCli"
3199 file mode "src/main/java" version
3200 "false" "true")))
3201 (let ((file "src/main/mdo/settings-security.mdo"))
3202 (and
3203 (modello-single-mode file "1.0.0" "java")
3204 (modello-single-mode file "1.0.0" "xpp3-reader")
3205 (modello-single-mode file "1.0.0" "xpp3-writer")))))
3206 (add-before 'build 'generate-components.xml
3207 (lambda _
3208 (mkdir-p "build/classes/META-INF/plexus")
3209 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
3210 (lambda _
3211 (display
3212 "<component-set>\n
3213 <components>\n
3214 <component>\n
3215 <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n
3216 <role-hint>default</role-hint>\n
3217 <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n
3218 <description></description>\n
3219 <requirements>\n
3220 <requirement>\n
3221 <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n
3222 <field-name>_cipher</field-name>\n
3223 </requirement>\n
3224 <requirement>\n
3225 <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n
3226 <field-name>_decryptors</field-name>\n
3227 </requirement>\n
3228 </requirements>\n
3229 <configuration>\n
3230 <_configuration-file>~/.settings-security.xml</_configuration-file>\n
3231 </configuration>\n
3232 </component>\n
3233 </components>\n
3234</component-set>\n")))))
3235 (add-before 'check 'fix-paths
3236 (lambda _
3237 (copy-recursively "src/test/resources" "target"))))))
3238 (inputs
3239 `(("java-plexus-cipher" ,java-plexus-cipher)))
3240 (native-inputs
3241 `(("java-modello-core" ,java-modello-core)
3242 ;; for modello:
3243 ("java-plexus-container-default" ,java-plexus-container-default)
3244 ("java-plexus-classworlds" ,java-plexus-classworlds)
3245 ("java-plexus-utils" ,java-plexus-utils)
3246 ("java-guava" ,java-guava)
3247 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
3248 ("java-sisu-build-api" ,java-sisu-build-api)
3249 ;; modello plugins:
3250 ("java-modellop-plugins-java" ,java-modello-plugins-java)
3251 ("java-modellop-plugins-xml" ,java-modello-plugins-xml)
3252 ("java-modellop-plugins-xpp3" ,java-modello-plugins-xpp3)
3253 ;; for tests
3254 ("java-junit" ,java-junit)))
3255 (build-system ant-build-system)
3256 (home-page "https://github.com/sonatype/plexus-sec-dispatcher")
3257 (synopsis "Plexus Security Dispatcher Component")
3258 (description "This package is the Plexus Security Dispatcher Component.
3259This component decrypts a string passed to it.")
3260 (license license:asl2.0)))
3261
8f524749
JL
3262(define-public java-sisu-build-api
3263 (package
3264 (name "java-sisu-build-api")
3265 (version "0.0.7")
3266 (source (origin
3267 (method url-fetch)
3268 (uri (string-append "https://github.com/sonatype/sisu-build-api/"
3269 "archive/plexus-build-api-" version ".tar.gz"))
3270 (sha256
3271 (base32
3272 "1c3rrpma3x634xp2rm2p5iskfhzdyc7qfbhjzr70agrl1jwghgy2"))))
3273 (build-system ant-build-system)
3274 (arguments
3275 `(#:jar-name "sisu-build-api.jar"
3276 #:source-dir "src/main/java"
3277 #:jdk ,icedtea-8
3278 #:tests? #f; FIXME: how to run the tests?
3279 #:phases
3280 (modify-phases %standard-phases
3281 (add-before 'build 'copy-resources
3282 (lambda _
3283 (copy-recursively "src/main/resources" "build/classes")
3284 (substitute* (find-files "build/classes")
3285 (("\\$\\{project.version\\}") ,version))
3286 #t))
3287 (add-before 'build 'generate-plexus-compontent
3288 (lambda _
3289 (mkdir-p "build/classes/META-INF/plexus")
3290 ;; This file is required for plexus to inject this package.
3291 ;; FIXME: how is it generated?
3292 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
3293 (lambda _
3294 (display
3295 "<component-set>\n
3296 <components>\n
3297 <component>\n
3298 <role>org.sonatype.plexus.build.incremental.BuildContext</role>\n
3299 <role-hint>default</role-hint>\n
3300 <implementation>org.sonatype.plexus.build.incremental.DefaultBuildContext</implementation>\n
3301 <description>Filesystem based non-incremental build context implementation\n
3302which behaves as if all files were just created.</description>\n
3303 </component>\n
3304 </components>\n
3305</component-set>\n")))
3306 #t)))))
3307 (inputs
3308 `(("java-plexus-utils" ,java-plexus-utils)
3309 ("java-plexus-container-default" ,java-plexus-container-default)))
3310 (home-page "https://github.com/sonatype/sisu-build-api/")
3311 (synopsis "Base build API for maven")
3312 (description "This package contains the base build API for maven and
3313a default implementation of it. This API is about scanning files in a
3314project and determining what files need to be rebuilt.")
3315 (license license:asl2.0)))
3316
b26c8b61
JL
3317(define-public java-modello-core
3318 (package
3319 (name "java-modello-core")
3320 (version "1.9.1")
3321 (source (origin
3322 (method url-fetch)
3323 (uri (string-append "https://github.com/codehaus-plexus/modello"
3324 "/archive/modello-" version ".tar.gz"))
3325 (sha256
3326 (base32
3327 "0l2pvns8pmlrmjm3iknp7gpg3654y1m8qhy55b19sdwdchdcyxfh"))))
3328 (build-system ant-build-system)
3329 (arguments
3330 `(#:jar-name "modello-core.jar"
3331 #:source-dir "modello-core/src/main/java"
3332 #:test-dir "modello-core/src/test"
3333 #:main-class "org.codehaus.modello.ModelloCli"
3334 #:jdk ,icedtea-8
3335 #:phases
3336 (modify-phases %standard-phases
3337 (add-before 'build 'copy-resources
3338 (lambda _
3339 (mkdir-p "build/classes/META-INF/plexus")
3340 (copy-file "modello-core/src/main/resources/META-INF/plexus/components.xml"
3341 "build/classes/META-INF/plexus/components.xml")
3342 #t))
3343 (add-before 'check 'fix-tests
3344 (lambda _
3345 (with-directory-excursion "modello-core/src/test/java/org/codehaus"
3346 (substitute* '("modello/core/DefaultModelloCoreTest.java"
3347 "modello/core/io/ModelReaderTest.java")
3348 (("src/test") "modello-core/src/test")))
3349 #t)))))
3350 (inputs
3351 `(("java-plexus-utils" ,java-plexus-utils)
3352 ("java-plexus-container-default" ,java-plexus-container-default)
3353 ("java-sisu-build-api" ,java-sisu-build-api)))
3354 (native-inputs
3355 `(("java-junit" ,java-junit)
3356 ("java-plexus-classworlds" ,java-plexus-classworlds)
3357 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
3358 ("java-guava" ,java-guava)))
3359 (home-page "http://codehaus-plexus.github.io/modello/")
3360 (synopsis "Framework for code generation from a simple model")
3361 (description "Modello is a framework for code generation from a simple model.
3362
3363Modello generates code from a simple model format: based on a plugin
3364architecture, various types of code and descriptors can be generated from the
3365single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers,
3366XSD and documentation.")
3367 (license (list
3368 license:expat
3369 ;; Although this package uses only files licensed under expat,
3370 ;; other parts of the source are licensed under different
3371 ;; licenses. We include them to be inherited by other packages.
3372 license:asl2.0
3373 ;; Some files in modello-plugin-java are licensed under a
3374 ;; 5-clause BSD license.
3375 (license:non-copyleft
3376 (string-append "file:///modello-plugins/modello-plugin-java/"
3377 "src/main/java/org/codehaus/modello/plugin/"
3378 "java/javasource/JNaming.java"))))))
3379
fc620bef
JL
3380(define-public java-modello-plugins-java
3381 (package
3382 (inherit java-modello-core)
3383 (name "java-modello-plugins-java")
3384 (arguments
3385 `(#:jar-name "modello-plugins-java.jar"
3386 #:source-dir "modello-plugins/modello-plugin-java/src/main/java"
3387 #:test-dir "modello-plugins/modello-plugin-java/src/test"
3388 #:jdk ,icedtea-8
3389 #:tests? #f; requires maven-model, which depends on this package
3390 #:phases
3391 (modify-phases %standard-phases
3392 (add-before 'build 'copy-resources
3393 (lambda _
3394 (mkdir-p "build/classes")
3395 (copy-recursively "modello-plugins/modello-plugin-java/src/main/resources"
3396 "build/classes")
3397 #t)))))
3398 (inputs
3399 `(("java-modello-core" ,java-modello-core)
3400 ,@(package-inputs java-modello-core)))
3401 (synopsis "Modello Java Plugin")
3402 (description "Modello Java Plugin generates Java objects for the model.")))
3403
a0ce95ba
JL
3404(define-public java-modello-plugins-xml
3405 (package
3406 (inherit java-modello-core)
3407 (name "java-modello-plugins-xml")
3408 (arguments
3409 `(#:jar-name "modello-plugins-xml.jar"
3410 #:source-dir "modello-plugins/modello-plugin-xml/src/main/java"
3411 #:test-dir "modello-plugins/modello-plugin-xml/src/test"
3412 #:jdk ,icedtea-8
3413 #:phases
3414 (modify-phases %standard-phases
3415 (add-before 'build 'copy-resources
3416 (lambda _
3417 (mkdir-p "build/classes")
3418 (copy-recursively
3419 "modello-plugins/modello-plugin-xml/src/main/resources"
3420 "build/classes")
3421 #t))
3422 (add-before 'check 'fix-paths
3423 (lambda _
3424 (with-directory-excursion "modello-plugins/modello-plugin-xml/src/test"
3425 (substitute*
3426 "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java"
3427 (("src/test") "modello-plugins/modello-plugin-xml/src/test"))))))))
3428 (inputs
3429 `(("java-modello-core" ,java-modello-core)
3430 ("java-modello-plugins-java" ,java-modello-plugins-java)
3431 ,@(package-inputs java-modello-core)))
3432 (synopsis "Modello XML Plugin")
3433 (description "Modello XML Plugin contains shared code for every plugins
3434working on XML representation of the model.")))
3435
e4708560
JL
3436(define-public java-modello-test
3437 (package
3438 (inherit java-modello-core)
3439 (name "java-modello-test")
3440 (arguments
3441 `(#:jar-name "modello-test.jar"
3442 #:source-dir "modello-test/src/main/java"
3443 #:tests? #f; no tests
3444 #:jdk ,icedtea-8))
3445 (inputs
3446 `(("java-plexus-utils" ,java-plexus-utils)
3447 ("java-plexus-compiler-api" ,java-plexus-compiler-api)
3448 ("java-plexus-compiler-javac" ,java-plexus-compiler-javac)
3449 ("java-plexus-container-default" ,java-plexus-container-default)))
3450 (synopsis "Modello test package")
3451 (description "The modello test package contains the basis to create
3452Modello generator unit-tests, including sample models and xml files to test
3453every feature for every plugin.")))
3454
36607d3b
JL
3455(define-public java-modello-plugins-xpp3
3456 (package
3457 (inherit java-modello-core)
3458 (name "java-modello-plugins-xpp3")
3459 (arguments
3460 `(#:jar-name "modello-plugins-xpp3.jar"
3461 #:source-dir "modello-plugins/modello-plugin-xpp3/src/main/java"
3462 #:test-dir "modello-plugins/modello-plugin-xpp3/src/test"
3463 ;; One of the test dependencies is maven-model which depends on this package.
3464 #:tests? #f
3465 #:jdk ,icedtea-8
3466 #:phases
3467 (modify-phases %standard-phases
3468 (add-before 'build 'copy-resources
3469 (lambda _
3470 (mkdir-p "build/classes")
3471 (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources"
3472 "build/classes")
3473 #t)))))
3474 (inputs
3475 `(("java-modello-core" ,java-modello-core)
3476 ("java-modello-plugins-java" ,java-modello-plugins-java)
3477 ("java-modello-plugins-xml" ,java-modello-plugins-xml)
3478 ,@(package-inputs java-modello-core)))
3479 (native-inputs
3480 `(("java-xmlunit" ,java-xmlunit)
3481 ("java-modello-test" ,java-modello-test)
3482 ,@(package-native-inputs java-modello-core)))
3483 (synopsis "Modello XPP3 Plugin")
3484 (description "The modello XPP3 plugin generates XML readers and writers based
3485on the XPP3 API (XML Pull Parser).")))
3486
8f8ed9aa
RW
3487(define-public java-asm
3488 (package
3489 (name "java-asm")
d0e9ded7 3490 (version "6.0")
8f8ed9aa
RW
3491 (source (origin
3492 (method url-fetch)
3493 (uri (string-append "http://download.forge.ow2.org/asm/"
3494 "asm-" version ".tar.gz"))
3495 (sha256
3496 (base32
d0e9ded7 3497 "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00"))))
8f8ed9aa 3498 (build-system ant-build-system)
d0e9ded7
GB
3499 (propagated-inputs
3500 `(("java-aqute-bndlib" ,java-aqute-bndlib)))
8f8ed9aa
RW
3501 (arguments
3502 `(#:build-target "compile"
3503 ;; The tests require an old version of Janino, which no longer compiles
3504 ;; with the JDK7.
3505 #:tests? #f
d0e9ded7
GB
3506 #:make-flags
3507 (list
3508 ;; We don't need these extra ant tasks, but the build system asks us to
3509 ;; provide a path anyway.
3510 "-Dobjectweb.ant.tasks.path=dummy-path"
3511 ;; The java-aqute.bndlib JAR file will be put onto the classpath and
3512 ;; used during the build automatically by ant-build-system, but
3513 ;; java-asm's build.xml fails unless we provide something here.
3514 "-Dbiz.aQute.bnd.path=dummy-path")
8f8ed9aa
RW
3515 #:phases
3516 (modify-phases %standard-phases
3517 (add-before 'install 'build-jars
3518 (lambda* (#:key make-flags #:allow-other-keys)
3519 ;; We cannot use the "jar" target because it depends on a couple
3520 ;; of unpackaged, complicated tools.
3521 (mkdir "dist")
3522 (zero? (system* "jar"
3523 "-cf" (string-append "dist/asm-" ,version ".jar")
3524 "-C" "output/build/tmp" "."))))
3525 (replace 'install
3526 (install-jars "dist")))))
3527 (native-inputs
3528 `(("java-junit" ,java-junit)))
3529 (home-page "http://asm.ow2.org/")
3530 (synopsis "Very small and fast Java bytecode manipulation framework")
3531 (description "ASM is an all purpose Java bytecode manipulation and
3532analysis framework. It can be used to modify existing classes or dynamically
3533generate classes, directly in binary form. The provided common
3534transformations and analysis algorithms allow to easily assemble custom
3535complex transformations and code analysis tools.")
3536 (license license:bsd-3)))
607fe24a 3537
bfb4004d
GB
3538(define java-asm-bootstrap
3539 (package
3540 (inherit java-asm)
3541 (name "java-asm-bootstrap")
3542 (arguments
3543 (substitute-keyword-arguments (package-arguments java-asm)
3544 ((#:tests? _) #f)))
3545 (native-inputs `())
3546 (propagated-inputs
3547 `(("java-aqute-bndlib" ,java-aqute-bndlib-bootstrap)
3548 ("java-aqute-libg" ,java-aqute-libg-bootstrap)
3549 ,@(delete `("java-aqute-bndlib" ,java-aqute-bndlib)
3550 (delete `("java-aqute-libg", java-aqute-libg)
3551 (package-inputs java-asm)))))))
3552
607fe24a
RW
3553(define-public java-cglib
3554 (package
3555 (name "java-cglib")
3556 (version "3.2.4")
3557 (source (origin
3558 (method url-fetch)
3559 (uri (string-append
3560 "https://github.com/cglib/cglib/archive/RELEASE_"
3561 (string-map (lambda (c) (if (char=? c #\.) #\_ c)) version)
3562 ".tar.gz"))
3563 (file-name (string-append "cglib-" version ".tar.gz"))
3564 (sha256
3565 (base32
3566 "162dvd4fln76ai8prfharf66pn6r56p3sxx683j5vdyccrd5hi1q"))))
3567 (build-system ant-build-system)
3568 (arguments
3569 `(;; FIXME: tests fail because junit runs
3570 ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem
3571 ;; to describe a test at all.
3572 #:tests? #f
3573 #:jar-name "cglib.jar"
3574 #:phases
3575 (modify-phases %standard-phases
3576 (add-after 'unpack 'chdir
3577 (lambda _ (chdir "cglib") #t)))))
3578 (inputs
3579 `(("java-asm" ,java-asm)
3580 ("java-junit" ,java-junit)))
3581 (home-page "https://github.com/cglib/cglib/")
3582 (synopsis "Java byte code generation library")
3583 (description "The byte code generation library CGLIB is a high level API
3584to generate and transform Java byte code.")
3585 (license license:asl2.0)))
33e34bfe
RW
3586
3587(define-public java-objenesis
3588 (package
3589 (name "java-objenesis")
3590 (version "2.5.1")
3591 (source (origin
3592 (method url-fetch)
3593 (uri (string-append "https://github.com/easymock/objenesis/"
3594 "archive/" version ".tar.gz"))
3595 (file-name (string-append "objenesis-" version ".tar.gz"))
3596 (sha256
3597 (base32
3598 "1va5qz1i2wawwavhnxfzxnfgrcaflz9p1pg03irrjh4nd3rz8wh6"))))
3599 (build-system ant-build-system)
3600 (arguments
3601 `(#:jar-name "objenesis.jar"
3602 #:source-dir "main/src/"
3603 #:test-dir "main/src/test/"))
3604 (native-inputs
3605 `(("java-junit" ,java-junit)
3606 ("java-hamcrest-core" ,java-hamcrest-core)))
3607 (home-page "http://objenesis.org/")
3608 (synopsis "Bypass the constructor when creating an object")
3609 (description "Objenesis is a small Java library that serves one purpose:
3610to instantiate a new object of a particular class. It is common to see
3611restrictions in libraries stating that classes must require a default
3612constructor. Objenesis aims to overcome these restrictions by bypassing the
3613constructor on object instantiation.")
3614 (license license:asl2.0)))
ae589876
RW
3615
3616(define-public java-easymock
3617 (package
3618 (name "java-easymock")
3619 (version "3.4")
3620 (source (origin
3621 (method url-fetch)
3622 (uri (string-append "https://github.com/easymock/easymock/"
3623 "archive/easymock-" version ".tar.gz"))
3624 (sha256
3625 (base32
3626 "1yzg0kv256ndr57gpav46cyv4a1ns5sj722l50zpxk3j6sk9hnmi"))))
3627 (build-system ant-build-system)
3628 (arguments
3629 `(#:jar-name "easymock.jar"
3630 #:source-dir "core/src/main"
3631 #:test-dir "core/src/test"
3632 #:phases
3633 (modify-phases %standard-phases
3634 ;; FIXME: Android support requires the following packages to be
3635 ;; available: com.google.dexmaker.stock.ProxyBuilder
3636 (add-after 'unpack 'delete-android-support
3637 (lambda _
3638 (with-directory-excursion "core/src/main/java/org/easymock/internal"
3639 (substitute* "MocksControl.java"
3640 (("AndroidSupport.isAndroid\\(\\)") "false")
3641 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
3642 (delete-file "AndroidClassProxyFactory.java"))
3643 #t))
3644 (add-after 'unpack 'delete-broken-tests
3645 (lambda _
3646 (with-directory-excursion "core/src/test/java/org/easymock"
3647 ;; This test depends on dexmaker.
3648 (delete-file "tests2/ClassExtensionHelperTest.java")
3649
3650 ;; This is not a test.
3651 (delete-file "tests/BaseEasyMockRunnerTest.java")
3652
3653 ;; This test should be executed with a different runner...
3654 (delete-file "tests2/EasyMockAnnotationsTest.java")
3655 ;; ...but deleting it means that we also have to delete these
3656 ;; dependent files.
3657 (delete-file "tests2/EasyMockRunnerTest.java")
3658 (delete-file "tests2/EasyMockRuleTest.java")
3659
3660 ;; This test fails because the file "easymock.properties" does
3661 ;; not exist.
3662 (delete-file "tests2/EasyMockPropertiesTest.java"))
3663 #t)))))
3664 (inputs
3665 `(("java-asm" ,java-asm)
3666 ("java-cglib" ,java-cglib)
3667 ("java-objenesis" ,java-objenesis)))
3668 (native-inputs
3669 `(("java-junit" ,java-junit)
3670 ("java-hamcrest-core" ,java-hamcrest-core)))
3671 (home-page "http://easymock.org")
3672 (synopsis "Java library providing mock objects for unit tests")
3673 (description "EasyMock is a Java library that provides an easy way to use
3674mock objects in unit testing.")
3675 (license license:asl2.0)))
7aa37023 3676
f12ad6c7
RW
3677(define-public java-jmock-1
3678 (package
3679 (name "java-jmock")
3680 (version "1.2.0")
3681 (source (origin
3682 (method url-fetch)
3683 (uri (string-append "https://github.com/jmock-developers/"
3684 "jmock-library/archive/" version ".tar.gz"))
3685 (file-name (string-append "jmock-" version ".tar.gz"))
3686 (sha256
3687 (base32
3688 "0xmrlhq0fszldkbv281k9463mv496143vvmqwpxp62yzjvdkx9w0"))))
3689 (build-system ant-build-system)
3690 (arguments
3691 `(#:build-target "jars"
3692 #:test-target "run.tests"
3693 #:phases
3694 (modify-phases %standard-phases
3695 (replace 'install (install-jars "build")))))
3696 (home-page "http://www.jmock.org")
3697 (synopsis "Mock object library for test-driven development")
3698 (description "JMock is a library that supports test-driven development of
3699Java code with mock objects. Mock objects help you design and test the
3700interactions between the objects in your programs.
3701
3702The jMock library
3703
3704@itemize
3705@item makes it quick and easy to define mock objects
3706@item lets you precisely specify the interactions between
3707 your objects, reducing the brittleness of your tests
3708@item plugs into your favourite test framework
3709@item is easy to extend.
3710@end itemize\n")
3711 (license license:bsd-3)))
3712
045124ae
JL
3713(define-public java-jmock
3714 (package
3715 (inherit java-jmock-1)
3716 (name "java-jmock")
3717 (version "2.8.2")
3718 (source (origin
3719 (method url-fetch)
3720 (uri (string-append "https://github.com/jmock-developers/"
3721 "jmock-library/archive/" version ".tar.gz"))
3722 (file-name (string-append name "-" version ".tar.gz"))
3723 (sha256
3724 (base32
3725 "18650a9g8xffcsdb6w91pbswa7f40fp2sh6s3nclkclz5dbzq8f0"))))
3726 (inputs
3727 `(("java-hamcrest-all" ,java-hamcrest-all)
3728 ("java-asm" ,java-asm)
3729 ("java-bsh" ,java-bsh)
3730 ("java-junit" ,java-junit)))
3731 (native-inputs
3732 `(("cglib" ,java-cglib)))
3733 (arguments
3734 `(#:jar-name "java-jmock.jar"
3735 #:source-dir "jmock/src/main/java"
3736 #:test-dir "jmock/src/test"))))
3737
25436c6d
JL
3738(define-public java-jmock-junit4
3739 (package
3740 (inherit java-jmock)
3741 (name "java-jmock-junit4")
3742 (arguments
3743 `(#:jar-name "java-jmock-junit4.jar"
3744 #:source-dir "jmock-junit4/src/main/java"
3745 #:test-dir "jmock-junit4/src/test"))
3746 (inputs
3747 `(("java-hamcrest-all" ,java-hamcrest-all)
3748 ("java-asm" ,java-asm)
3749 ("java-bsh" ,java-bsh)
3750 ("java-jmock" ,java-jmock)
3751 ("java-jumit" ,java-junit)))))
3752
e84b899d
JL
3753(define-public java-jmock-legacy
3754 (package
3755 (inherit java-jmock)
3756 (name "java-jmock-legacy")
3757 (arguments
3758 `(#:jar-name "java-jmock-legacy.jar"
3759 #:source-dir "jmock-legacy/src/main/java"
3760 #:test-dir "jmock-legacy/src/test"
3761 #:phases
3762 (modify-phases %standard-phases
3763 (add-before 'check 'copy-tests
3764 (lambda _
3765 ;; This file is a dependancy of some tests
3766 (let ((file "org/jmock/test/acceptance/PackageProtectedType.java"))
3767 (copy-file (string-append "jmock/src/test/java/" file)
3768 (string-append "jmock-legacy/src/test/java/" file))
3769 #t))))))
3770 (inputs
3771 `(("java-hamcrest-all" ,java-hamcrest-all)
3772 ("java-objenesis" ,java-objenesis)
3773 ("java-cglib" ,java-cglib)
3774 ("java-jmock" ,java-jmock)
3775 ("java-asm" ,java-asm)
3776 ("java-bsh" ,java-bsh)
3777 ("java-junit" ,java-junit)))
3778 (native-inputs
3779 `(("java-jmock-junit4" ,java-jmock-junit4)))))
3780
439c59da
RW
3781(define-public java-hamcrest-all
3782 (package (inherit java-hamcrest-core)
3783 (name "java-hamcrest-all")
3784 (arguments
bfc007e1
RW
3785 `(#:jdk ,icedtea-8
3786 ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core)
3787 ((#:build-target _) "bigjar")
3788 ((#:phases phases)
3789 `(modify-phases ,phases
3790 ;; Some build targets override the classpath, so we need to patch
3791 ;; the build.xml to ensure that required dependencies are on the
3792 ;; classpath.
3793 (add-after 'unpack 'patch-classpath-for-integration
3794 (lambda* (#:key inputs #:allow-other-keys)
3795 (substitute* "build.xml"
3796 ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
3797 (string-join
3798 (cons line
3799 (append
3800 (find-files (assoc-ref inputs "java-junit") "\\.jar$")
3801 (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
3802 (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
3803 ";")))
3804 #t)))))))
439c59da
RW
3805 (inputs
3806 `(("java-junit" ,java-junit)
3807 ("java-jmock" ,java-jmock-1)
3808 ("java-easymock" ,java-easymock)
439c59da
RW
3809 ,@(package-inputs java-hamcrest-core)))))
3810
7aa37023
RW
3811(define-public java-jopt-simple
3812 (package
3813 (name "java-jopt-simple")
3814 (version "5.0.3")
3815 (source (origin
3816 (method url-fetch)
3817 (uri (string-append "http://repo1.maven.org/maven2/"
3818 "net/sf/jopt-simple/jopt-simple/"
3819 version "/jopt-simple-"
3820 version "-sources.jar"))
3821 (sha256
3822 (base32
3823 "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa"))))
3824 (build-system ant-build-system)
3825 (arguments
3826 `(#:tests? #f ; there are no tests
3827 #:jar-name "jopt-simple.jar"))
3828 (home-page "https://pholser.github.io/jopt-simple/")
3829 (synopsis "Java library for parsing command line options")
3830 (description "JOpt Simple is a Java library for parsing command line
3831options, such as those you might pass to an invocation of @code{javac}. In
3832the interest of striving for simplicity, as closely as possible JOpt Simple
3833attempts to honor the command line option syntaxes of POSIX @code{getopt} and
3834GNU @code{getopt_long}. It also aims to make option parser configuration and
3835retrieval of options and their arguments simple and expressive, without being
3836overly clever.")
3837 (license license:expat)))
840969e8
RW
3838
3839(define-public java-commons-math3
3840 (package
3841 (name "java-commons-math3")
3842 (version "3.6.1")
3843 (source (origin
3844 (method url-fetch)
3845 (uri (string-append "mirror://apache/commons/math/source/"
3846 "commons-math3-" version "-src.tar.gz"))
3847 (sha256
3848 (base32
3849 "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6"))))
3850 (build-system ant-build-system)
3851 (arguments
3852 `(#:build-target "jar"
3853 #:test-target "test"
3854 #:make-flags
3855 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
3856 (junit (assoc-ref %build-inputs "java-junit")))
3857 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
3858 (string-append "-Dhamcrest.jar=" hamcrest
3859 "/share/java/hamcrest-core.jar")))
3860 #:phases
3861 (modify-phases %standard-phases
3862 ;; We want to build the jar in the build phase and run the tests
3863 ;; later in a separate phase.
3864 (add-after 'unpack 'untangle-targets
3865 (lambda _
3866 (substitute* "build.xml"
3867 (("name=\"jar\" depends=\"test\"")
3868 "name=\"jar\" depends=\"compile\""))
3869 #t))
3870 ;; There is no install target.
3871 (replace 'install
3872 (install-jars "target")))))
3873 (native-inputs
3874 `(("java-junit" ,java-junit)
3875 ("java-hamcrest-core" ,java-hamcrest-core)))
3876 (home-page "http://commons.apache.org/math/")
3877 (synopsis "Apache Commons mathematics library")
3878 (description "Commons Math is a library of lightweight, self-contained
3879mathematics and statistics components addressing the most common problems not
3880available in the Java programming language or Commons Lang.")
3881 (license license:asl2.0)))
62c9bfaa
RW
3882
3883(define-public java-jmh
3884 (package
3885 (name "java-jmh")
3886 (version "1.17.5")
3887 (source (origin
3888 (method hg-fetch)
3889 (uri (hg-reference
3890 (url "http://hg.openjdk.java.net/code-tools/jmh/")
3891 (changeset version)))
3892 (file-name (string-append name "-" version "-checkout"))
3893 (sha256
3894 (base32
3895 "1fxyxhg9famwcg1prc4cgwb5wzyxqavn3cjm5vz8605xz7x5k084"))))
3896 (build-system ant-build-system)
3897 (arguments
3898 `(#:jar-name "jmh-core.jar"
3899 #:source-dir "jmh-core/src/main"
3900 #:test-dir "jmh-core/src/test"
3901 #:phases
3902 (modify-phases %standard-phases
3903 ;; This seems to be a bug in the JDK. It may not be necessary in
3904 ;; future versions of the JDK.
3905 (add-after 'unpack 'fix-bug
3906 (lambda _
3907 (with-directory-excursion
3908 "jmh-core/src/main/java/org/openjdk/jmh/runner/options"
3909 (substitute* '("IntegerValueConverter.java"
3910 "ThreadsValueConverter.java")
3911 (("public Class<Integer> valueType")
3912 "public Class<? extends Integer> valueType")))
3913 #t)))))
3914 (inputs
3915 `(("java-jopt-simple" ,java-jopt-simple)
3916 ("java-commons-math3" ,java-commons-math3)))
3917 (native-inputs
3918 `(("java-junit" ,java-junit)
3919 ("java-hamcrest-core" ,java-hamcrest-core)))
3920 (home-page "http://openjdk.java.net/projects/code-tools/jmh/")
3921 (synopsis "Benchmark harness for the JVM")
3922 (description "JMH is a Java harness for building, running, and analysing
3923nano/micro/milli/macro benchmarks written in Java and other languages
f4548394 3924targeting the JVM.")
62c9bfaa
RW
3925 ;; GPLv2 only
3926 (license license:gpl2)))
56ebb4e9
RW
3927
3928(define-public java-commons-collections4
3929 (package
3930 (name "java-commons-collections4")
3931 (version "4.1")
3932 (source (origin
3933 (method url-fetch)
3934 (uri (string-append "mirror://apache/commons/collections/source/"
3935 "commons-collections4-" version "-src.tar.gz"))
3936 (sha256
3937 (base32
3938 "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl"))))
3939 (build-system ant-build-system)
3940 (arguments
3941 `(#:test-target "test"
3942 #:make-flags
3943 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
3944 (junit (assoc-ref %build-inputs "java-junit"))
3945 (easymock (assoc-ref %build-inputs "java-easymock")))
3946 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
3947 (string-append "-Dhamcrest.jar=" hamcrest
3948 "/share/java/hamcrest-core.jar")
3949 (string-append "-Deasymock.jar=" easymock
3950 "/share/java/easymock.jar")))
3951 #:phases
3952 (modify-phases %standard-phases
3953 (replace 'install
3954 (install-jars "target")))))
3955 (native-inputs
3956 `(("java-junit" ,java-junit)
3957 ("java-hamcrest-core" ,java-hamcrest-core)
3958 ("java-easymock" ,java-easymock)))
3959 (home-page "http://commons.apache.org/collections/")
3960 (synopsis "Collections framework")
3961 (description "The Java Collections Framework is the recognised standard
3962for collection handling in Java. Commons-Collections seek to build upon the
3963JDK classes by providing new interfaces, implementations and utilities. There
3964are many features, including:
3965
3966@itemize
3967@item @code{Bag} interface for collections that have a number of copies of
3968 each object
3969@item @code{BidiMap} interface for maps that can be looked up from value to
3970 key as well and key to value
3971@item @code{MapIterator} interface to provide simple and quick iteration over
3972 maps
3973@item Transforming decorators that alter each object as it is added to the
3974 collection
3975@item Composite collections that make multiple collections look like one
3976@item Ordered maps and sets that retain the order elements are added in,
3977 including an LRU based map
3978@item Reference map that allows keys and/or values to be garbage collected
3979 under close control
3980@item Many comparator implementations
3981@item Many iterator implementations
3982@item Adapter classes from array and enumerations to collections
3983@item Utilities to test or create typical set-theory properties of collections
3984 such as union, intersection, and closure.
3985@end itemize\n")
3986 (license license:asl2.0)))
6af63e65 3987
229a9864
JL
3988(define-public java-commons-collections
3989 (package
3990 (inherit java-commons-collections4)
3991 (name "java-commons-collections")
3992 (version "3.2.2")
3993 (source (origin
3994 (method url-fetch)
3995 (uri (string-append "mirror://apache/commons/collections/source/"
3996 "commons-collections-" version "-src.tar.gz"))
3997 (sha256
3998 (base32
3999 "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387"))))
4000 (arguments
4001 (substitute-keyword-arguments (package-arguments java-commons-collections4)
4002 ((#:phases phases)
4003 `(modify-phases ,phases
4004 ;; The manifest is required by the build procedure
4005 (add-before 'build 'add-manifest
4006 (lambda _
4007 (mkdir-p "build/conf")
4008 (call-with-output-file "build/conf/MANIFEST.MF"
4009 (lambda (file)
4010 (format file "Manifest-Version: 1.0\n")))))
4011 (replace 'install
4012 (install-jars "build"))))))))
4013
5aa2f3f4
JL
4014(define java-commons-collections-test-classes
4015 (package
4016 (inherit java-commons-collections)
4017 (arguments
4018 `(#:jar-name "commons-collections-test-classes.jar"
4019 #:source-dir "src/test"
4020 #:tests? #f))
4021 (inputs
4022 `(("collection" ,java-commons-collections)))))
4023
4024(define-public java-commons-beanutils
4025 (package
4026 (name "java-commons-beanutils")
4027 (version "1.9.3")
4028 (source (origin
4029 (method url-fetch)
4030 (uri (string-append "mirror://apache/commons/beanutils/source/"
4031 "commons-beanutils-" version "-src.tar.gz"))
4032 (sha256
4033 (base32
4034 "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk"))))
4035 (build-system ant-build-system)
4036 (arguments
4037 `(#:test-target "test"
4038 #:tests? #f
4039 #:phases
4040 (modify-phases %standard-phases
4041 (replace 'install
4042 (lambda* (#:key outputs #:allow-other-keys)
4043 (rename-file (string-append "dist/commons-beanutils-" ,version
4044 "-SNAPSHOT.jar")
4045 "commons-beanutils.jar")
4046 (install-file "commons-beanutils.jar"
4047 (string-append (assoc-ref outputs "out") "/share/java/"))
4048 #t)))))
4049 (inputs
4050 `(("logging" ,java-commons-logging-minimal)
4051 ("collections" ,java-commons-collections)))
4052 (native-inputs
4053 `(("junit" ,java-junit)
4054 ("collections-test" ,java-commons-collections-test-classes)))
4055 (home-page "http://commons.apache.org/beanutils/")
4056 (synopsis "Dynamically set or get properties in Java")
4057 (description "BeanUtils provides a simplified interface to reflection and
4058introspection to set or get dynamically determined properties through their
4059setter and getter method.")
4060 (license license:asl2.0)))
4061
6af63e65
HG
4062(define-public java-commons-io
4063 (package
4064 (name "java-commons-io")
4065 (version "2.5")
4066 (source
4067 (origin
4068 (method url-fetch)
4069 (uri (string-append "mirror://apache/commons/io/source/"
4070 "commons-io-" version "-src.tar.gz"))
4071 (sha256
4072 (base32
4073 "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3"))))
4074 (build-system ant-build-system)
4075 (outputs '("out" "doc"))
4076 (arguments
4077 `(#:test-target "test"
4078 #:make-flags
4079 (list (string-append "-Djunit.jar="
4080 (assoc-ref %build-inputs "java-junit")
4081 "/share/java/junit.jar"))
4082 #:phases
4083 (modify-phases %standard-phases
4084 (add-after 'build 'build-javadoc ant-build-javadoc)
4085 (replace 'install (install-jars "target"))
4086 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4087 (native-inputs
4088 `(("java-junit" ,java-junit)
4089 ("java-hamcrest-core" ,java-hamcrest-core)))
4090 (home-page "http://commons.apache.org/io/")
4091 (synopsis "Common useful IO related classes")
4092 (description "Commons-IO contains utility classes, stream implementations,
4093file filters and endian classes.")
4094 (license license:asl2.0)))
d631b5f3
HG
4095
4096(define-public java-commons-lang
4097 (package
4098 (name "java-commons-lang")
4099 (version "2.6")
4100 (source
4101 (origin
4102 (method url-fetch)
4103 (uri (string-append "mirror://apache/commons/lang/source/"
4104 "commons-lang-" version "-src.tar.gz"))
4105 (sha256
4106 (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5"))))
4107 (build-system ant-build-system)
4108 (outputs '("out" "doc"))
4109 (arguments
4110 `(#:test-target "test"
e5a96113 4111 #:test-exclude (list "**/Abstract*.java" "**/Random*.java")
d631b5f3
HG
4112 #:phases
4113 (modify-phases %standard-phases
4114 (add-after 'build 'build-javadoc ant-build-javadoc)
4115 (add-before 'check 'disable-failing-test
4116 (lambda _
4117 ;; Disable a failing test
4118 (substitute* "src/test/java/org/apache/commons/lang/\
4119time/FastDateFormatTest.java"
4120 (("public void testFormat\\(\\)")
4121 "public void disabled_testFormat()"))
4122 #t))
4123 (replace 'install (install-jars "target"))
4124 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4125 (native-inputs
4126 `(("java-junit" ,java-junit)))
4127 (home-page "http://commons.apache.org/lang/")
4128 (synopsis "Extension of the java.lang package")
4129 (description "The Commons Lang components contains a set of Java classes
4130that provide helper methods for standard Java classes, especially those found
4131in the @code{java.lang} package in the Sun JDK. The following classes are
4132included:
4133
4134@itemize
4135@item StringUtils - Helper for @code{java.lang.String}.
4136@item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets
4137 of characters such as @code{[a-z]} and @code{[abcdez]}.
4138@item RandomStringUtils - Helper for creating randomised strings.
4139@item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
4140@item NumberRange - A range of numbers with an upper and lower bound.
4141@item ObjectUtils - Helper for @code{java.lang.Object}.
4142@item SerializationUtils - Helper for serializing objects.
4143@item SystemUtils - Utility class defining the Java system properties.
4144@item NestedException package - A sub-package for the creation of nested
4145 exceptions.
4146@item Enum package - A sub-package for the creation of enumerated types.
4147@item Builder package - A sub-package for the creation of @code{equals},
4148 @code{hashCode}, @code{compareTo} and @code{toString} methods.
4149@end itemize\n")
4150 (license license:asl2.0)))
82e18864
HG
4151
4152(define-public java-commons-lang3
4153 (package
4154 (name "java-commons-lang3")
4155 (version "3.4")
4156 (source
4157 (origin
4158 (method url-fetch)
4159 (uri (string-append "mirror://apache/commons/lang/source/"
4160 "commons-lang3-" version "-src.tar.gz"))
4161 (sha256
4162 (base32 "0xpshb9spjhplq5a7mr0y1bgfw8190ik4xj8f569xidfcki1d6kg"))))
4163 (build-system ant-build-system)
4164 (outputs '("out" "doc"))
4165 (arguments
4166 `(#:test-target "test"
4167 #:make-flags
4168 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-all"))
4169 (junit (assoc-ref %build-inputs "java-junit"))
4170 (easymock (assoc-ref %build-inputs "java-easymock"))
4171 (io (assoc-ref %build-inputs "java-commons-io")))
4172 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4173 (string-append "-Dhamcrest.jar=" hamcrest
4174 "/share/java/hamcrest-all.jar")
4175 (string-append "-Dcommons-io.jar=" io
4176 "/share/java/commons-io-"
4177 ,(package-version java-commons-io)
4178 "-SNAPSHOT.jar")
4179 (string-append "-Deasymock.jar=" easymock
4180 "/share/java/easymock.jar")))
4181 #:phases
4182 (modify-phases %standard-phases
4183 (add-after 'build 'build-javadoc ant-build-javadoc)
4184 (replace 'install (install-jars "target"))
4185 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4186 (native-inputs
4187 `(("java-junit" ,java-junit)
4188 ("java-commons-io" ,java-commons-io)
4189 ("java-hamcrest-all" ,java-hamcrest-all)
4190 ("java-easymock" ,java-easymock)))
4191 (home-page "http://commons.apache.org/lang/")
4192 (synopsis "Extension of the java.lang package")
4193 (description "The Commons Lang components contains a set of Java classes
4194that provide helper methods for standard Java classes, especially those found
4195in the @code{java.lang} package. The following classes are included:
4196
4197@itemize
4198@item StringUtils - Helper for @code{java.lang.String}.
4199@item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of
4200 characters such as @code{[a-z]} and @code{[abcdez]}.
4201@item RandomStringUtils - Helper for creating randomised strings.
4202@item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
4203@item NumberRange - A range of numbers with an upper and lower bound.
4204@item ObjectUtils - Helper for @code{java.lang.Object}.
4205@item SerializationUtils - Helper for serializing objects.
4206@item SystemUtils - Utility class defining the Java system properties.
4207@item NestedException package - A sub-package for the creation of nested
4208 exceptions.
4209@item Enum package - A sub-package for the creation of enumerated types.
4210@item Builder package - A sub-package for the creation of @code{equals},
4211 @code{hashCode}, @code{compareTo} and @code{toString} methods.
4212@end itemize\n")
4213 (license license:asl2.0)))
1c188f4e 4214
afb13a10
JL
4215(define-public java-commons-bsf
4216 (package
4217 (name "java-commons-bsf")
4218 (version "2.4.0")
4219 (source (origin
4220 (method url-fetch)
4221 (uri (string-append "mirror://apache/commons/bsf/source/bsf-src-"
4222 version ".tar.gz"))
4223 (sha256
4224 (base32
4225 "1sbamr8jl32p1jgf59nw0b2w9qivyg145954hm6ly54cfgsqrdas"))
4226 (modules '((guix build utils)))
4227 (snippet
4228 '(begin
4229 (for-each delete-file
4230 (find-files "." "\\.jar$"))
4231 #t))))
4232 (build-system ant-build-system)
4233 (arguments
4234 `(#:build-target "jar"
4235 #:tests? #f; No test file
4236 #:modules ((guix build ant-build-system)
4237 (guix build utils)
4238 (guix build java-utils)
4239 (sxml simple))
4240 #:phases
4241 (modify-phases %standard-phases
4242 (add-before 'build 'create-properties
4243 (lambda _
4244 ;; This file is missing from the distribution
4245 (call-with-output-file "build-properties.xml"
4246 (lambda (port)
4247 (sxml->xml
4248 `(project (@ (basedir ".") (name "build-properties") (default ""))
4249 (property (@ (name "project.name") (value "bsf")))
4250 (property (@ (name "source.level") (value "1.5")))
4251 (property (@ (name "build.lib") (value "build/jar")))
4252 (property (@ (name "src.dir") (value "src")))
4253 (property (@ (name "tests.dir") (value "src/org/apache/bsf/test")))
4254 (property (@ (name "build.tests") (value "build/test-classes")))
4255 (property (@ (name "build.dest") (value "build/classes"))))
4256 port)))))
4257 (replace 'install (install-jars "build")))))
4258 (native-inputs
4259 `(("java-junit" ,java-junit)))
4260 (inputs
4261 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
4262 (home-page "https://commons.apache.org/proper/commons-bsf")
4263 (synopsis "Bean Scripting Framework")
4264 (description "The Bean Scripting Framework (BSF) is a set of Java classes
4265which provides scripting language support within Java applications, and access
4266to Java objects and methods from scripting languages. BSF allows one to write
4267JSPs in languages other than Java while providing access to the Java class
4268library. In addition, BSF permits any Java application to be implemented in
4269part (or dynamically extended) by a language that is embedded within it. This
4270is achieved by providing an API that permits calling scripting language engines
4271from within Java, as well as an object registry that exposes Java objects to
4272these scripting language engines.")
4273 (license license:asl2.0)))
4274
66006fe5
JL
4275(define-public java-commons-jxpath
4276 (package
4277 (name "java-commons-jxpath")
4278 (version "1.3")
4279 (source (origin
4280 (method url-fetch)
4281 (uri (string-append "mirror://apache/commons/jxpath/source/"
4282 "commons-jxpath-" version "-src.tar.gz"))
4283 (sha256
4284 (base32
4285 "1rpgg31ayn9fwr4bfi2i1ij0npcg79ad2fv0w9hacvawsyc42cfs"))))
4286 (build-system ant-build-system)
4287 (arguments
4288 `(#:jar-name "commons-jxpath.jar"
4289 ;; tests require more dependencies, including mockrunner which depends on old software
4290 #:tests? #f
4291 #:source-dir "src/java"))
4292 (inputs
4293 `(("java-tomcat" ,java-tomcat)
4294 ("java-jdom" ,java-jdom)
4295 ("java-commons-beanutils" ,java-commons-beanutils)))
4296 (native-inputs
4297 `(("java-junit" ,java-junit)))
4298 (home-page "http://commons.apache.org/jxpath/")
4299 (synopsis "Simple interpreter of an expression language called XPath.")
4300 (description "The org.apache.commons.jxpath package defines a simple
4301interpreter of an expression language called XPath. JXPath applies XPath
4302expressions to graphs of objects of all kinds: JavaBeans, Maps, Servlet
4303contexts, DOM etc, including mixtures thereof.")
4304 (license license:asl2.0)))
4305
a1a5ef20
JL
4306(define-public java-jsr250
4307 (package
4308 (name "java-jsr250")
4309 (version "1.3")
4310 (source (origin
4311 (method url-fetch)
4312 (uri (string-append "https://repo1.maven.org/maven2/"
4313 "javax/annotation/javax.annotation-api/"
4314 version "/javax.annotation-api-"
4315 version "-sources.jar"))
4316 (sha256
4317 (base32
4318 "08clh8n4n9wfglf75qsqfjs6yf79f7x6hqx38cn856pksszv50kz"))))
4319 (build-system ant-build-system)
4320 (arguments
4321 `(#:tests? #f ; no tests included
4322 #:jdk ,icedtea-8
4323 #:jar-name "jsr250.jar"))
4324 (home-page "https://jcp.org/en/jsr/detail?id=250")
4325 (synopsis "Security-related annotations")
4326 (description "This package provides annotations for security. It provides
4327packages in the @code{javax.annotation} and @code{javax.annotation.security}
4328namespaces.")
4329 ;; either cddl or gpl2 only, with classpath exception
4330 (license (list license:cddl1.0
4331 license:gpl2))))
4332
0d4a0d60
RW
4333(define-public java-jsr305
4334 (package
4335 (name "java-jsr305")
4336 (version "3.0.1")
4337 (source (origin
4338 (method url-fetch)
4339 (uri (string-append "https://repo1.maven.org/maven2/"
4340 "com/google/code/findbugs/"
4341 "jsr305/" version "/jsr305-"
4342 version "-sources.jar"))
4343 (sha256
4344 (base32
4345 "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n"))))
4346 (build-system ant-build-system)
4347 (arguments
4348 `(#:tests? #f ; no tests included
4349 #:jar-name "jsr305.jar"))
4350 (home-page "http://findbugs.sourceforge.net/")
4351 (synopsis "Annotations for the static analyzer called findbugs")
4352 (description "This package provides annotations for the findbugs package.
4353It provides packages in the @code{javax.annotations} namespace.")
4354 (license license:asl2.0)))
4355
4f3e47ea
RW
4356(define-public java-guava
4357 (package
4358 (name "java-guava")
4359 ;; This is the last release of Guava that can be built with Java 7.
4360 (version "20.0")
4361 (source (origin
4362 (method url-fetch)
4363 (uri (string-append "https://github.com/google/guava/"
4364 "releases/download/v" version
4365 "/guava-" version "-sources.jar"))
4366 (sha256
4367 (base32
4368 "1gawrs5gi6j5hcfxdgpnfli75vb9pfi4sn09pnc8xacr669yajwr"))))
4369 (build-system ant-build-system)
4370 (arguments
4371 `(#:tests? #f ; no tests included
4372 #:jar-name "guava.jar"
4373 #:phases
4374 (modify-phases %standard-phases
4375 (add-after 'unpack 'trim-sources
4376 (lambda _
4377 (with-directory-excursion "src/com/google/common"
4378 ;; Remove annotations to avoid extra dependencies:
4379 ;; * "j2objc" annotations are used when converting Java to
4380 ;; Objective C;
4381 ;; * "errorprone" annotations catch common Java mistakes at
4382 ;; compile time;
4383 ;; * "IgnoreJRERequirement" is used for Android.
4384 (substitute* (find-files "." "\\.java$")
4385 (("import com.google.j2objc.*") "")
4386 (("import com.google.errorprone.annotation.*") "")
4387 (("import org.codehaus.mojo.animal_sniffer.*") "")
4388 (("@CanIgnoreReturnValue") "")
4389 (("@LazyInit") "")
4390 (("@WeakOuter") "")
4391 (("@RetainedWith") "")
4392 (("@Weak") "")
4393 (("@ForOverride") "")
4394 (("@J2ObjCIncompatible") "")
4395 (("@IgnoreJRERequirement") "")))
4396 #t)))))
4397 (inputs
4398 `(("java-jsr305" ,java-jsr305)))
4399 (home-page "https://github.com/google/guava")
4400 (synopsis "Google core libraries for Java")
4401 (description "Guava is a set of core libraries that includes new
4402collection types (such as multimap and multiset), immutable collections, a
4403graph library, functional types, an in-memory cache, and APIs/utilities for
4404concurrency, I/O, hashing, primitives, reflection, string processing, and much
4405more!")
4406 (license license:asl2.0)))
4407
af8f8281
RW
4408;; The java-commons-logging package provides adapters to many different
4409;; logging frameworks. To avoid an excessive dependency graph we try to build
4410;; it with only a minimal set of adapters.
4411(define-public java-commons-logging-minimal
4412 (package
4413 (name "java-commons-logging-minimal")
4414 (version "1.2")
4415 (source (origin
4416 (method url-fetch)
4417 (uri (string-append "mirror://apache/commons/logging/source/"
4418 "commons-logging-" version "-src.tar.gz"))
4419 (sha256
4420 (base32
4421 "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9"))))
4422 (build-system ant-build-system)
4423 (arguments
4424 `(#:tests? #f ; avoid dependency on logging frameworks
4425 #:jar-name "commons-logging-minimal.jar"
4426 #:phases
4427 (modify-phases %standard-phases
4428 (add-after 'unpack 'delete-adapters-and-tests
4429 (lambda _
4430 ;; Delete all adapters except for NoOpLog, SimpleLog, and
4431 ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl
4432 ;; is used by applications; SimpleLog is the only actually usable
4433 ;; implementation that does not depend on another logging
4434 ;; framework.
4435 (for-each
4436 (lambda (file)
4437 (delete-file (string-append
4438 "src/main/java/org/apache/commons/logging/impl/" file)))
4439 (list "Jdk13LumberjackLogger.java"
4440 "WeakHashtable.java"
4441 "Log4JLogger.java"
4442 "ServletContextCleaner.java"
4443 "Jdk14Logger.java"
4444 "AvalonLogger.java"
4445 "LogKitLogger.java"))
4446 (delete-file-recursively "src/test")
4447 #t)))))
4448 (home-page "http://commons.apache.org/logging/")
4449 (synopsis "Common API for logging implementations")
4450 (description "The Logging package is a thin bridge between different
4451logging implementations. A library that uses the commons-logging API can be
4452used with any logging implementation at runtime.")
4453 (license license:asl2.0)))
4454
90e65abe
RW
4455;; This is the last release of the 1.x series.
4456(define-public java-mockito-1
4457 (package
4458 (name "java-mockito")
4459 (version "1.10.19")
4460 (source (origin
4461 (method url-fetch)
4462 (uri (string-append "http://repo1.maven.org/maven2/"
4463 "org/mockito/mockito-core/" version
4464 "/mockito-core-" version "-sources.jar"))
4465 (sha256
4466 (base32
4467 "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc"))))
4468 (build-system ant-build-system)
4469 (arguments
4470 `(#:jar-name "mockito.jar"
4471 #:tests? #f ; no tests included
4472 ;; FIXME: patch-and-repack does not support jars, so we have to apply
4473 ;; patches in build phases.
4474 #:phases
4475 (modify-phases %standard-phases
4476 ;; Mockito was developed against a different version of hamcrest,
4477 ;; which does not require matcher implementations to provide an
4478 ;; implementation of the "describeMismatch" method. We add this
4479 ;; simple definition to pass the build with our version of hamcrest.
4480 (add-after 'unpack 'fix-hamcrest-build-error
4481 (lambda _
4482 (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java"
4483 (("public Matcher getActualMatcher\\(\\) .*" line)
4484 (string-append "
4485 public void describeMismatch(Object item, Description description) {
4486 actualMatcher.describeMismatch(item, description);
4487 }"
4488 line)))
4489 #t))
4490 ;; Mockito bundles cglib. We have a cglib package, so let's use
4491 ;; that instead.
4492 (add-after 'unpack 'use-system-libraries
4493 (lambda _
4494 (with-directory-excursion "src/org/mockito/internal/creation/cglib"
4495 (substitute* '("CGLIBHacker.java"
4496 "CglibMockMaker.java"
4497 "ClassImposterizer.java"
4498 "DelegatingMockitoMethodProxy.java"
4499 "MethodInterceptorFilter.java"
4500 "MockitoNamingPolicy.java"
4501 "SerializableMockitoMethodProxy.java"
4502 "SerializableNoOp.java")
4503 (("import org.mockito.cglib") "import net.sf.cglib")))
4504 #t)))))
4505 (inputs
4506 `(("java-junit" ,java-junit)
4507 ("java-objenesis" ,java-objenesis)
4508 ("java-cglib" ,java-cglib)
4509 ("java-hamcrest-core" ,java-hamcrest-core)))
4510 (home-page "http://mockito.org")
4511 (synopsis "Mockito is a mock library for Java")
4512 (description "Mockito is a mocking library for Java which lets you write
4513tests with a clean and simple API. It generates mocks using reflection, and
4514it records all mock invocations, including methods arguments.")
4515 (license license:asl2.0)))
4516
4f4d2e47
RW
4517(define-public java-httpcomponents-httpcore
4518 (package
4519 (name "java-httpcomponents-httpcore")
4520 (version "4.4.6")
4521 (source (origin
4522 (method url-fetch)
4523 (uri (string-append "mirror://apache//httpcomponents/httpcore/"
4524 "source/httpcomponents-core-"
4525 version "-src.tar.gz"))
4526 (sha256
4527 (base32
4528 "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy"))))
4529 (build-system ant-build-system)
4530 (arguments
4531 `(#:jar-name "httpcomponents-httpcore.jar"
4532 #:phases
4533 (modify-phases %standard-phases
4534 (add-after 'unpack 'chdir
4535 (lambda _ (chdir "httpcore") #t)))))
4536 (inputs
4537 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
4538 ("java-commons-lang3" ,java-commons-lang3)))
4539 (native-inputs
4540 `(("java-junit" ,java-junit)
4541 ("java-mockito" ,java-mockito-1)))
4542 (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html")
4543 (synopsis "Low level HTTP transport components")
4544 (description "HttpCore is a set of low level HTTP transport components
4545that can be used to build custom client and server side HTTP services with a
4546minimal footprint. HttpCore supports two I/O models: blocking I/O model based
4547on the classic Java I/O and non-blocking, event driven I/O model based on Java
4548NIO.
4549
4550This package provides the blocking I/O model library.")
4551 (license license:asl2.0)))
4552
3a068b43
RW
4553(define-public java-httpcomponents-httpcore-nio
4554 (package (inherit java-httpcomponents-httpcore)
4555 (name "java-httpcomponents-httpcore-nio")
4556 (arguments
4557 `(#:jar-name "httpcomponents-httpcore-nio.jar"
4558 #:phases
4559 (modify-phases %standard-phases
4560 (add-after 'unpack 'chdir
4561 (lambda _ (chdir "httpcore-nio") #t)))))
4562 (inputs
4563 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
4564 ("java-hamcrest-core" ,java-hamcrest-core)
4565 ,@(package-inputs java-httpcomponents-httpcore)))
4566 (description "HttpCore is a set of low level HTTP transport components
4567that can be used to build custom client and server side HTTP services with a
4568minimal footprint. HttpCore supports two I/O models: blocking I/O model based
4569on the classic Java I/O and non-blocking, event driven I/O model based on Java
4570NIO.
4571
4572This package provides the non-blocking I/O model library based on Java
4573NIO.")))
4574
e1dd78f6
RW
4575(define-public java-httpcomponents-httpcore-ab
4576 (package (inherit java-httpcomponents-httpcore)
4577 (name "java-httpcomponents-httpcore-ab")
4578 (arguments
4579 `(#:jar-name "httpcomponents-httpcore-ab.jar"
4580 #:phases
4581 (modify-phases %standard-phases
4582 (add-after 'unpack 'chdir
4583 (lambda _ (chdir "httpcore-ab") #t)))))
4584 (inputs
4585 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
4586 ("java-commons-cli" ,java-commons-cli)
4587 ("java-hamcrest-core" ,java-hamcrest-core)
4588 ,@(package-inputs java-httpcomponents-httpcore)))
4589 (synopsis "Apache HttpCore benchmarking tool")
4590 (description "This package provides the HttpCore benchmarking tool. It is
4591an Apache AB clone based on HttpCore.")))
4592
14a671d8
RW
4593(define-public java-httpcomponents-httpclient
4594 (package
4595 (name "java-httpcomponents-httpclient")
4596 (version "4.5.3")
4597 (source (origin
4598 (method url-fetch)
4599 (uri (string-append "mirror://apache/httpcomponents/httpclient/"
4600 "source/httpcomponents-client-"
4601 version "-src.tar.gz"))
4602 (sha256
4603 (base32
4604 "1428399s7qy3cim5wc6f3ks4gl9nf9vkjpfmnlap3jflif7g2pj1"))))
4605 (build-system ant-build-system)
4606 (arguments
4607 `(#:jar-name "httpcomponents-httpclient.jar"
4608 #:phases
4609 (modify-phases %standard-phases
4610 (add-after 'unpack 'chdir
4611 (lambda _ (chdir "httpclient") #t)))))
4612 (inputs
4613 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
4614 ("java-commons-codec" ,java-commons-codec)
4615 ("java-hamcrest-core" ,java-hamcrest-core)
4616 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
4617 ("java-mockito" ,java-mockito-1)
4618 ("java-junit" ,java-junit)))
4619 (home-page "https://hc.apache.org/httpcomponents-client-ga/")
4620 (synopsis "HTTP client library for Java")
4621 (description "Although the @code{java.net} package provides basic
4622functionality for accessing resources via HTTP, it doesn't provide the full
4623flexibility or functionality needed by many applications. @code{HttpClient}
4624seeks to fill this void by providing an efficient, up-to-date, and
4625feature-rich package implementing the client side of the most recent HTTP
4626standards and recommendations.")
4627 (license license:asl2.0)))
4628
cbce5de2
RW
4629(define-public java-httpcomponents-httpmime
4630 (package (inherit java-httpcomponents-httpclient)
4631 (name "java-httpcomponents-httpmime")
4632 (arguments
4633 `(#:jar-name "httpcomponents-httpmime.jar"
4634 #:phases
4635 (modify-phases %standard-phases
4636 (add-after 'unpack 'chdir
4637 (lambda _ (chdir "httpmime") #t)))))
4638 (inputs
4639 `(("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient)
4640 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
4641 ("java-junit" ,java-junit)
4642 ("java-hamcrest-core" ,java-hamcrest-core)))))
4643
4b34c21f
RW
4644(define-public java-commons-net
4645 (package
4646 (name "java-commons-net")
4647 (version "3.6")
4648 (source (origin
4649 (method url-fetch)
4650 (uri (string-append "mirror://apache/commons/net/source/"
4651 "commons-net-" version "-src.tar.gz"))
4652 (sha256
4653 (base32
4654 "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr"))))
4655 (build-system ant-build-system)
4656 (arguments
4657 `(;; FIXME: MainTest.java tries to read "examples.properties" (which
4658 ;; should be "resources/examples/examples.properties"), but gets "null"
4659 ;; instead.
4660 #:tests? #f
4661 #:jar-name "commons-net.jar"))
4662 (native-inputs
4663 `(("java-junit" ,java-junit)
4664 ("java-hamcrest-core" ,java-hamcrest-core)))
4665 (home-page "http://commons.apache.org/net/")
4666 (synopsis "Client library for many basic Internet protocols")
4667 (description "The Apache Commons Net library implements the client side of
4668many basic Internet protocols. The purpose of the library is to provide
4669fundamental protocol access, not higher-level abstractions.")
4670 (license license:asl2.0)))
4671
808cb58f
RW
4672(define-public java-jsch
4673 (package
4674 (name "java-jsch")
4675 (version "0.1.54")
4676 (source (origin
4677 (method url-fetch)
4678 (uri (string-append "mirror://sourceforge/jsch/jsch/"
4679 version "/jsch-" version ".zip"))
4680 (sha256
4681 (base32
4682 "029rdddyq1mh3ghryh3ki99kba1xkf1d1swjv2vi6lk6zzjy2wdb"))))
4683 (build-system ant-build-system)
4684 (arguments
4685 `(#:build-target "dist"
4686 #:tests? #f ; no tests included
4687 #:phases
4688 (modify-phases %standard-phases
4689 (replace 'install (install-jars "dist")))))
4690 (native-inputs
4691 `(("unzip" ,unzip)))
4692 (home-page "http://www.jcraft.com/jsch/")
4693 (synopsis "Pure Java implementation of SSH2")
4694 (description "JSch is a pure Java implementation of SSH2. JSch allows you
4695to connect to an SSH server and use port forwarding, X11 forwarding, file
4696transfer, etc., and you can integrate its functionality into your own Java
4697programs.")
4698 (license license:bsd-3)))
4699
a6244698
RW
4700(define-public java-commons-compress
4701 (package
4702 (name "java-commons-compress")
4703 (version "1.13")
4704 (source (origin
4705 (method url-fetch)
4706 (uri (string-append "mirror://apache/commons/compress/source/"
4707 "commons-compress-" version "-src.tar.gz"))
4708 (sha256
4709 (base32
4710 "1vjqvavrn0babffn1kciz6v52ibwq2vwhzlb95hazis3lgllnxc8"))))
4711 (build-system ant-build-system)
4712 (arguments
4713 `(#:jar-name "commons-compress.jar"
4714 #:phases
4715 (modify-phases %standard-phases
4716 (add-after 'unpack 'delete-bad-tests
4717 (lambda _
4718 (with-directory-excursion "src/test/java/org/apache/commons/compress/"
4719 ;; FIXME: These tests really should not fail. Maybe they are
4720 ;; indicative of problems with our Java packaging work.
4721
4722 ;; This test fails with a null pointer exception.
4723 (delete-file "archivers/sevenz/SevenZOutputFileTest.java")
4724 ;; This test fails to open test resources.
4725 (delete-file "archivers/zip/ExplodeSupportTest.java")
4726
4727 ;; FIXME: This test adds a dependency on powermock, which is hard to
4728 ;; package at this point.
4729 ;; https://github.com/powermock/powermock
4730 (delete-file "archivers/sevenz/SevenZNativeHeapTest.java"))
4731 #t)))))
4732 (inputs
4733 `(("java-junit" ,java-junit)
4734 ("java-hamcrest-core" ,java-hamcrest-core)
4735 ("java-mockito" ,java-mockito-1)
4736 ("java-xz" ,java-xz)))
4737 (home-page "https://commons.apache.org/proper/commons-compress/")
4738 (synopsis "Java library for working with compressed files")
4739 (description "The Apache Commons Compress library defines an API for
4740working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ,
4741Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.")
4742 (license license:asl2.0)))
4743
51263ff5
JL
4744(define-public java-commons-csv
4745 (package
4746 (name "java-commons-csv")
4747 (version "1.4")
4748 (source (origin
4749 (method url-fetch)
4750 (uri (string-append "mirror://apache/commons/csv/source/"
4751 "commons-csv-" version "-src.tar.gz"))
4752 (sha256
4753 (base32
4754 "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij"))))
4755 (build-system ant-build-system)
4756 (arguments
4757 `(#:jar-name "commons-csv.jar"
4758 #:source-dir "src/main/java"
4759 #:tests? #f)); FIXME: requires java-h2
4760 (inputs
4761 `(("java-hamcrest-core" ,java-hamcrest-core)
4762 ("java-commons-io" ,java-commons-io)
4763 ("java-commons-lang3" ,java-commons-lang3)
4764 ("junit" ,java-junit)))
4765 (home-page "https://commons.apache.org/proper/commons-csv/")
4766 (synopsis "Read and write CSV documents")
4767 (description "Commons CSV reads and writes files in variations of the Comma
4768Separated Value (CSV) format. The most common CSV formats are predefined in the
4769CSVFormat class:
4770
4771@itemize
4772@item Microsoft Excel
4773@item Informix UNLOAD
4774@item Informix UNLOAD CSV
4775@item MySQL
4776@item RFC 4180
4777@item TDF
4778@end itemize
4779
4780Custom formats can be created using a fluent style API.")
4781 (license license:asl2.0)))
4782
6ee6d0b5
RW
4783(define-public java-osgi-annotation
4784 (package
4785 (name "java-osgi-annotation")
4786 (version "6.0.0")
4787 (source (origin
4788 (method url-fetch)
4789 (uri (string-append "https://repo1.maven.org/maven2/"
4790 "org/osgi/org.osgi.annotation/" version "/"
4791 "org.osgi.annotation-" version "-sources.jar"))
4792 (sha256
4793 (base32
4794 "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w"))))
4795 (build-system ant-build-system)
4796 (arguments
4797 `(#:tests? #f ; no tests
4798 #:jar-name "osgi-annotation.jar"))
c353d014 4799 (home-page "https://www.osgi.org")
6ee6d0b5
RW
4800 (synopsis "Annotation module of OSGi framework")
4801 (description
4802 "OSGi, for Open Services Gateway initiative framework, is a module system
4803and service platform for the Java programming language. This package contains
4804the OSGi annotation module, providing additional services to help dynamic
4805components.")
4806 (license license:asl2.0)))
4807
37e2e5d4
RW
4808(define-public java-osgi-core
4809 (package
4810 (name "java-osgi-core")
4811 (version "6.0.0")
4812 (source (origin
4813 (method url-fetch)
4814 (uri (string-append "https://repo1.maven.org/maven2/"
4815 "org/osgi/org.osgi.core/" version "/"
4816 "org.osgi.core-" version "-sources.jar"))
4817 (sha256
4818 (base32
4819 "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv"))))
4820 (build-system ant-build-system)
4821 (arguments
4822 `(#:tests? #f ; no tests
4823 #:jar-name "osgi-core.jar"))
4824 (inputs
4825 `(("java-osgi-annotation" ,java-osgi-annotation)))
c353d014 4826 (home-page "https://www.osgi.org")
37e2e5d4
RW
4827 (synopsis "Core module of OSGi framework")
4828 (description
4829 "OSGi, for Open Services Gateway initiative framework, is a module system
4830and service platform for the Java programming language. This package contains
4831the OSGi Core module.")
4832 (license license:asl2.0)))
4833
8af92c8f
RW
4834(define-public java-osgi-service-event
4835 (package
4836 (name "java-osgi-service-event")
4837 (version "1.3.1")
4838 (source (origin
4839 (method url-fetch)
4840 (uri (string-append "https://repo1.maven.org/maven2/"
4841 "org/osgi/org.osgi.service.event/"
4842 version "/org.osgi.service.event-"
4843 version "-sources.jar"))
4844 (sha256
4845 (base32
4846 "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm"))))
4847 (build-system ant-build-system)
4848 (arguments
4849 `(#:tests? #f ; no tests
4850 #:jar-name "osgi-service-event.jar"))
4851 (inputs
4852 `(("java-osgi-annotation" ,java-osgi-annotation)
4853 ("java-osgi-core" ,java-osgi-core)))
c353d014 4854 (home-page "https://www.osgi.org")
8af92c8f
RW
4855 (synopsis "OSGi service event module")
4856 (description
4857 "OSGi, for Open Services Gateway initiative framework, is a module system
4858and service platform for the Java programming language. This package contains
4859the OSGi @code{org.osgi.service.event} module.")
4860 (license license:asl2.0)))
4861
674e93a0
RW
4862(define-public java-eclipse-osgi
4863 (package
4864 (name "java-eclipse-osgi")
4865 (version "3.11.3")
4866 (source (origin
4867 (method url-fetch)
4868 (uri (string-append "https://repo1.maven.org/maven2/"
4869 "org/eclipse/platform/org.eclipse.osgi/"
4870 version "/org.eclipse.osgi-"
4871 version "-sources.jar"))
4872 (sha256
4873 (base32
4874 "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b"))))
4875 (build-system ant-build-system)
4876 (arguments
4877 `(#:tests? #f ; no tests included
4878 #:jar-name "eclipse-equinox-osgi.jar"))
4879 (inputs
4880 `(("java-osgi-annotation" ,java-osgi-annotation)))
4881 (home-page "http://www.eclipse.org/equinox/")
4882 (synopsis "Eclipse Equinox OSGi framework")
4883 (description "This package provides an implementation of the OSGi Core
4884specification.")
4885 (license license:epl1.0)))
4886
81b55b1e
RW
4887(define-public java-eclipse-equinox-common
4888 (package
4889 (name "java-eclipse-equinox-common")
4890 (version "3.8.0")
4891 (source (origin
4892 (method url-fetch)
4893 (uri (string-append "https://repo1.maven.org/maven2/"
4894 "org/eclipse/platform/org.eclipse.equinox.common/"
4895 version "/org.eclipse.equinox.common-"
4896 version "-sources.jar"))
4897 (sha256
4898 (base32
4899 "12aazpkgw46r1qj0pr421jzwhbmsizd97r37krd7njnbrdgfzksc"))))
4900 (build-system ant-build-system)
4901 (arguments
4902 `(#:tests? #f ; no tests included
4903 #:jar-name "eclipse-equinox-common.jar"))
4904 (inputs
4905 `(("java-eclipse-osgi" ,java-eclipse-osgi)))
4906 (home-page "http://www.eclipse.org/equinox/")
4907 (synopsis "Common Eclipse runtime")
4908 (description "This package provides the common Eclipse runtime.")
4909 (license license:epl1.0)))
4910
90368ad9
RW
4911(define-public java-eclipse-core-jobs
4912 (package
4913 (name "java-eclipse-core-jobs")
4914 (version "3.8.0")
4915 (source (origin
4916 (method url-fetch)
4917 (uri (string-append "https://repo1.maven.org/maven2/"
4918 "org/eclipse/platform/org.eclipse.core.jobs/"
4919 version "/org.eclipse.core.jobs-"
4920 version "-sources.jar"))
4921 (sha256
4922 (base32
4923 "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b"))))
4924 (build-system ant-build-system)
4925 (arguments
4926 `(#:tests? #f ; no tests included
4927 #:jar-name "eclipse-core-jobs.jar"))
4928 (inputs
4929 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4930 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4931 (home-page "http://www.eclipse.org/equinox/")
4932 (synopsis "Eclipse jobs mechanism")
4933 (description "This package provides the Eclipse jobs mechanism.")
4934 (license license:epl1.0)))
4935
fbaf09eb
RW
4936(define-public java-eclipse-equinox-registry
4937 (package
4938 (name "java-eclipse-equinox-registry")
4939 (version "3.6.100")
4940 (source (origin
4941 (method url-fetch)
4942 (uri (string-append "https://repo1.maven.org/maven2/"
4943 "org/eclipse/platform/org.eclipse.equinox.registry/"
4944 version "/org.eclipse.equinox.registry-"
4945 version "-sources.jar"))
4946 (sha256
4947 (base32
4948 "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k"))))
4949 (build-system ant-build-system)
4950 (arguments
4951 `(#:tests? #f ; no tests included
4952 #:jar-name "eclipse-equinox-registry.jar"))
4953 (inputs
4954 `(("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
4955 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4956 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4957 (home-page "http://www.eclipse.org/equinox/")
4958 (synopsis "Eclipse extension registry support")
4959 (description "This package provides support for the Eclipse extension
4960registry.")
4961 (license license:epl1.0)))
4962
65214c87
RW
4963(define-public java-eclipse-equinox-app
4964 (package
4965 (name "java-eclipse-equinox-app")
4966 (version "1.3.400")
4967 (source (origin
4968 (method url-fetch)
4969 (uri (string-append "https://repo1.maven.org/maven2/"
4970 "org/eclipse/platform/org.eclipse.equinox.app/"
4971 version "/org.eclipse.equinox.app-"
4972 version "-sources.jar"))
4973 (sha256
4974 (base32
4975 "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab"))))
4976 (build-system ant-build-system)
4977 (arguments
4978 `(#:tests? #f ; no tests included
4979 #:jar-name "eclipse-equinox-app.jar"))
4980 (inputs
4981 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4982 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4983 ("java-eclipse-osgi" ,java-eclipse-osgi)
4984 ("java-osgi-service-event" ,java-osgi-service-event)))
4985 (home-page "http://www.eclipse.org/equinox/")
4986 (synopsis "Equinox application container")
4987 (description "This package provides the Equinox application container for
4988Eclipse.")
4989 (license license:epl1.0)))
4990
3f970214
RW
4991(define-public java-eclipse-equinox-preferences
4992 (package
4993 (name "java-eclipse-equinox-preferences")
4994 (version "3.6.1")
4995 (source (origin
4996 (method url-fetch)
4997 (uri (string-append "https://repo1.maven.org/maven2/"
4998 "org/eclipse/platform/org.eclipse.equinox.preferences/"
4999 version "/org.eclipse.equinox.preferences-"
5000 version "-sources.jar"))
5001 (sha256
5002 (base32
5003 "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2"))))
5004 (build-system ant-build-system)
5005 (arguments
5006 `(#:tests? #f ; no tests included
5007 #:jar-name "eclipse-equinox-preferences.jar"))
5008 (inputs
5009 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5010 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5011 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5012 (home-page "http://www.eclipse.org/equinox/")
5013 (synopsis "Eclipse preferences mechanism")
5014 (description "This package provides the Eclipse preferences mechanism with
5015the module @code{org.eclipse.equinox.preferences}.")
5016 (license license:epl1.0)))
5017
4ad3d4f3
RW
5018(define-public java-eclipse-core-contenttype
5019 (package
5020 (name "java-eclipse-core-contenttype")
5021 (version "3.5.100")
5022 (source (origin
5023 (method url-fetch)
5024 (uri (string-append "https://repo1.maven.org/maven2/"
5025 "org/eclipse/platform/org.eclipse.core.contenttype/"
5026 version "/org.eclipse.core.contenttype-"
5027 version "-sources.jar"))
5028 (sha256
5029 (base32
5030 "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi"))))
5031 (build-system ant-build-system)
5032 (arguments
5033 `(#:tests? #f ; no tests included
5034 #:jar-name "eclipse-core-contenttype.jar"))
5035 (inputs
5036 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5037 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5038 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5039 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5040 (home-page "http://www.eclipse.org/")
5041 (synopsis "Eclipse content mechanism")
5042 (description "This package provides the Eclipse content mechanism in the
5043@code{org.eclipse.core.contenttype} module.")
5044 (license license:epl1.0)))
5045
6a7f7e49
RW
5046(define-public java-eclipse-core-runtime
5047 (package
5048 (name "java-eclipse-core-runtime")
5049 (version "3.12.0")
5050 (source (origin
5051 (method url-fetch)
5052 (uri (string-append "https://repo1.maven.org/maven2/"
5053 "org/eclipse/platform/org.eclipse.core.runtime/"
5054 version "/org.eclipse.core.runtime-"
5055 version "-sources.jar"))
5056 (sha256
5057 (base32
5058 "16mkf8jgj35pgzms7w1gyfq0gfm4ixw6c5xbbxzdj1la56c758ya"))))
5059 (build-system ant-build-system)
5060 (arguments
5061 `(#:tests? #f ; no tests included
5062 #:jar-name "eclipse-core-runtime.jar"))
5063 (inputs
5064 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5065 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5066 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
5067 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5068 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5069 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5070 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5071 (home-page "https://www.eclipse.org/")
5072 (synopsis "Eclipse core runtime")
5073 (description "This package provides the Eclipse core runtime with the
5074module @code{org.eclipse.core.runtime}.")
5075 (license license:epl1.0)))
5076
b3806a15
RW
5077(define-public java-eclipse-core-filesystem
5078 (package
5079 (name "java-eclipse-core-filesystem")
5080 (version "1.6.1")
5081 (source (origin
5082 (method url-fetch)
5083 (uri (string-append "https://repo1.maven.org/maven2/"
5084 "org/eclipse/platform/org.eclipse.core.filesystem/"
5085 version "/org.eclipse.core.filesystem-"
5086 version "-sources.jar"))
5087 (sha256
5088 (base32
5089 "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj"))))
5090 (build-system ant-build-system)
5091 (arguments
5092 `(#:tests? #f ; no tests included
5093 #:jar-name "eclipse-core-filesystem.jar"))
5094 (inputs
5095 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5096 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5097 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5098 (home-page "https://www.eclipse.org/")
5099 (synopsis "Eclipse core file system")
5100 (description "This package provides the Eclipse core file system with the
5101module @code{org.eclipse.core.filesystem}.")
5102 (license license:epl1.0)))
5103
e96060de
RW
5104(define-public java-eclipse-core-expressions
5105 (package
5106 (name "java-eclipse-core-expressions")
5107 (version "3.5.100")
5108 (source (origin
5109 (method url-fetch)
5110 (uri (string-append "https://repo1.maven.org/maven2/"
5111 "org/eclipse/platform/org.eclipse.core.expressions/"
5112 version "/org.eclipse.core.expressions-"
5113 version "-sources.jar"))
5114 (sha256
5115 (base32
5116 "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f"))))
5117 (build-system ant-build-system)
5118 (arguments
5119 `(#:tests? #f ; no tests included
5120 #:jar-name "eclipse-core-expressions.jar"))
5121 (inputs
5122 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5123 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5124 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5125 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5126 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5127 (home-page "https://www.eclipse.org/")
5128 (synopsis "Eclipse core expression language")
5129 (description "This package provides the Eclipse core expression language
5130with the @code{org.eclipse.core.expressions} module.")
5131 (license license:epl1.0)))
5132
e8d0f7c8
RW
5133(define-public java-eclipse-core-variables
5134 (package
5135 (name "java-eclipse-core-variables")
5136 (version "3.3.0")
5137 (source (origin
5138 (method url-fetch)
5139 (uri (string-append "https://repo1.maven.org/maven2/"
5140 "org/eclipse/platform/org.eclipse.core.variables/"
5141 version "/org.eclipse.core.variables-"
5142 version "-sources.jar"))
5143 (sha256
5144 (base32
5145 "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy"))))
5146 (build-system ant-build-system)
5147 (arguments
5148 `(#:tests? #f ; no tests included
5149 #:jar-name "eclipse-core-variables.jar"))
5150 (inputs
5151 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5152 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5153 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5154 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5155 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5156 (home-page "https://www.eclipse.org/platform")
5157 (synopsis "Eclipse core variables")
5158 (description "This package provides the Eclipse core variables module
5159@code{org.eclipse.core.variables}.")
5160 (license license:epl1.0)))
5161
7c3d479e
RW
5162(define-public java-eclipse-ant-core
5163 (package
5164 (name "java-eclipse-ant-core")
5165 (version "3.4.100")
5166 (source (origin
5167 (method url-fetch)
5168 (uri (string-append "https://repo1.maven.org/maven2/"
5169 "org/eclipse/platform/org.eclipse.ant.core/"
5170 version "/org.eclipse.ant.core-"
5171 version "-sources.jar"))
5172 (sha256
5173 (base32
5174 "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7"))))
5175 (build-system ant-build-system)
5176 (arguments
5177 `(#:tests? #f ; no tests included
5178 #:jar-name "eclipse-ant-core.jar"))
5179 (inputs
5180 `(("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
5181 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5182 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5183 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5184 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5185 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5186 ("java-eclipse-core-variables" ,java-eclipse-core-variables)
5187 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5188 (home-page "https://www.eclipse.org/platform")
5189 (synopsis "Ant build tool core libraries")
5190 (description "This package provides the ant build tool core libraries with
5191the module @code{org.eclipse.ant.core}.")
5192 (license license:epl1.0)))
5193
6636f638
RW
5194(define-public java-eclipse-core-resources
5195 (package
5196 (name "java-eclipse-core-resources")
5197 (version "3.11.1")
5198 (source (origin
5199 (method url-fetch)
5200 (uri (string-append "https://repo1.maven.org/maven2/"
5201 "org/eclipse/platform/org.eclipse.core.resources/"
5202 version "/org.eclipse.core.resources-"
5203 version "-sources.jar"))
5204 (sha256
5205 (base32
5206 "1hrfxrll6cpcagfksk2na1ypvkcnsp0fk6n3vcsrn97qayf9mx9l"))))
5207 (build-system ant-build-system)
5208 (arguments
5209 `(#:tests? #f ; no tests included
5210 #:jar-name "eclipse-core-resources.jar"))
5211 (inputs
5212 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5213 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5214 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5215 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5216 ("java-eclipse-core-expressions" ,java-eclipse-core-expressions)
5217 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
5218 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5219 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5220 ("java-eclipse-ant-core" ,java-eclipse-ant-core)
5221 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5222 (home-page "https://www.eclipse.org/")
5223 (synopsis "Eclipse core resource management")
5224 (description "This package provides the Eclipse core resource management
5225module @code{org.eclipse.core.resources}.")
5226 (license license:epl1.0)))
5227
afb5858d
RW
5228(define-public java-eclipse-compare-core
5229 (package
5230 (name "java-eclipse-compare-core")
5231 (version "3.6.0")
5232 (source (origin
5233 (method url-fetch)
5234 (uri (string-append "https://repo1.maven.org/maven2/"
5235 "org/eclipse/platform/org.eclipse.compare.core/"
5236 version "/org.eclipse.compare.core-"
5237 version "-sources.jar"))
5238 (sha256
5239 (base32
5240 "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg"))))
5241 (build-system ant-build-system)
5242 (arguments
5243 `(#:tests? #f ; no tests included
5244 #:jar-name "eclipse-compare-core.jar"))
5245 (inputs
5246 `(("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5247 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5248 ("java-eclipse-osgi" ,java-eclipse-osgi)
5249 ("java-icu4j" ,java-icu4j)))
5250 (home-page "https://www.eclipse.org/")
5251 (synopsis "Eclipse core compare support")
5252 (description "This package provides the Eclipse core compare support
5253module @code{org.eclipse.compare.core}.")
5254 (license license:epl1.0)))
5255
1bb191fc
RW
5256(define-public java-eclipse-team-core
5257 (package
5258 (name "java-eclipse-team-core")
5259 (version "3.8.0")
5260 (source (origin
5261 (method url-fetch)
5262 (uri (string-append "https://repo1.maven.org/maven2/"
5263 "org/eclipse/platform/org.eclipse.team.core/"
5264 version "/org.eclipse.team.core-"
5265 version "-sources.jar"))
5266 (sha256
5267 (base32
5268 "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7"))))
5269 (build-system ant-build-system)
5270 (arguments
5271 `(#:tests? #f ; no tests included
5272 #:jar-name "eclipse-team-core.jar"))
5273 (inputs
5274 `(("java-eclipse-compare-core" ,java-eclipse-compare-core)
5275 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5276 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
5277 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5278 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
5279 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5280 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5281 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5282 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5283 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5284 (home-page "https://www.eclipse.org/platform")
5285 (synopsis "Eclipse team support core")
5286 (description "This package provides the Eclipse team support core module
5287@code{org.eclipse.team.core}.")
5288 (license license:epl1.0)))
5289
31342529
RW
5290(define-public java-eclipse-core-commands
5291 (package
5292 (name "java-eclipse-core-commands")
5293 (version "3.8.1")
5294 (source (origin
5295 (method url-fetch)
5296 (uri (string-append "https://repo1.maven.org/maven2/"
5297 "org/eclipse/platform/org.eclipse.core.commands/"
5298 version "/org.eclipse.core.commands-"
5299 version "-sources.jar"))
5300 (sha256
5301 (base32
5302 "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9"))))
5303 (build-system ant-build-system)
5304 (arguments
5305 `(#:tests? #f ; no tests included
5306 #:jar-name "eclipse-core-commands.jar"))
5307 (inputs
5308 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)))
5309 (home-page "https://www.eclipse.org/platform")
5310 (synopsis "Eclipse core commands")
5311 (description "This package provides Eclipse core commands in the module
5312@code{org.eclipse.core.commands}.")
5313 (license license:epl1.0)))
5314
bf96acf7
RW
5315(define-public java-eclipse-text
5316 (package
5317 (name "java-eclipse-text")
5318 (version "3.6.0")
5319 (source (origin
5320 (method url-fetch)
5321 (uri (string-append "https://repo1.maven.org/maven2/"
5322 "org/eclipse/platform/org.eclipse.text/"
5323 version "/org.eclipse.text-"
5324 version "-sources.jar"))
5325 (sha256
5326 (base32
5327 "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1"))))
5328 (build-system ant-build-system)
5329 (arguments
5330 `(#:tests? #f ; no tests included
5331 #:jar-name "eclipse-text.jar"
5332 #:phases
5333 (modify-phases %standard-phases
5334 ;; When creating a new category we must make sure that the new list
5335 ;; matches List<Position>. By default it seems to be too generic
5336 ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>.
5337 ;; Without this we get this error:
5338 ;;
5339 ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376:
5340 ;; error: method put in interface Map<K,V> cannot be applied to given types;
5341 ;; [javac] fPositions.put(category, new ArrayList<>());
5342 ;; [javac] ^
5343 ;; [javac] required: String,List<Position>
5344 ;; [javac] found: String,ArrayList<Object>
5345 ;; [javac] reason: actual argument ArrayList<Object> cannot be converted
5346 ;; to List<Position> by method invocation conversion
5347 ;; [javac] where K,V are type-variables:
5348 ;; [javac] K extends Object declared in interface Map
5349 ;; [javac] V extends Object declared in interface Map
5350 ;;
5351 ;; I don't know if this is a good fix. I suspect it is not, but it
5352 ;; seems to work.
5353 (add-after 'unpack 'fix-compilation-error
5354 (lambda _
5355 (substitute* "src/org/eclipse/jface/text/AbstractDocument.java"
5356 (("Positions.put\\(category, new ArrayList<>\\(\\)\\);")
5357 "Positions.put(category, new ArrayList<Position>());"))
5358 #t)))))
5359 (inputs
5360 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5361 ("java-eclipse-core-commands" ,java-eclipse-core-commands)
5362 ("java-icu4j" ,java-icu4j)))
5363 (home-page "http://www.eclipse.org/platform")
5364 (synopsis "Eclipse text library")
5365 (description "Platform Text is part of the Platform UI project and
5366provides the basic building blocks for text and text editors within Eclipse
5367and contributes the Eclipse default text editor.")
5368 (license license:epl1.0)))
5369
c24d11b7
RW
5370(define-public java-eclipse-jdt-core
5371 (package
5372 (name "java-eclipse-jdt-core")
5373 (version "3.12.3")
5374 (source (origin
5375 (method url-fetch)
5376 (uri (string-append "https://repo1.maven.org/maven2/"
5377 "org/eclipse/jdt/org.eclipse.jdt.core/"
5378 version "/org.eclipse.jdt.core-"
5379 version "-sources.jar"))
5380 (sha256
5381 (base32
5382 "191xw4lc7mjjkprh4ji5vnpjvr5r4zvbpwkriy4bvsjqrz35vh1j"))))
5383 (build-system ant-build-system)
5384 (arguments
5385 `(#:tests? #f ; no tests included
5386 #:jar-name "eclipse-jdt-core.jar"))
5387 (inputs
5388 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5389 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
5390 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5391 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
5392 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5393 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
5394 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5395 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5396 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5397 ("java-eclipse-osgi" ,java-eclipse-osgi)
5398 ("java-eclipse-text" ,java-eclipse-text)))
5399 (home-page "https://www.eclipse.org/jdt")
5400 (synopsis "Java development tools core libraries")
5401 (description "This package provides the core libraries of the Eclipse Java
5402development tools.")
5403 (license license:epl1.0)))
5404
a5cdcf6c
RW
5405(define-public java-javax-mail
5406 (package
5407 (name "java-javax-mail")
5408 (version "1.5.6")
5409 (source (origin
5410 (method url-fetch)
5411 (uri (string-append "https://repo1.maven.org/maven2/"
5412 "com/sun/mail/javax.mail/"
5413 version "/javax.mail-"
5414 version "-sources.jar"))
5415 (sha256
5416 (base32
5417 "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9"))))
5418 (build-system ant-build-system)
5419 (arguments
5420 `(#:tests? #f ; no tests
5421 #:jar-name "javax-mail.jar"))
5422 (home-page "https://javamail.java.net")
5423 (synopsis "Reference implementation of the JavaMail API")
5424 (description
5425 "This package provides versions of the JavaMail API implementation, IMAP,
5426SMTP, and POP3 service providers, some examples, and documentation for the
5427JavaMail API.")
5428 ;; GPLv2 only with "classpath exception".
5429 (license license:gpl2)))
5430
0e660c4d
RW
5431(define-public java-log4j-api
5432 (package
5433 (name "java-log4j-api")
5434 (version "2.4.1")
5435 (source (origin
5436 (method url-fetch)
5437 (uri (string-append "mirror://apache/logging/log4j/" version
5438 "/apache-log4j-" version "-src.tar.gz"))
5439 (sha256
5440 (base32
5441 "0j5p9gik0jysh37nlrckqbky12isy95cpwg2gv5fas1rcdqbraxd"))))
5442 (build-system ant-build-system)
5443 (arguments
5444 `(#:tests? #f ; tests require unpackaged software
5445 #:jar-name "log4j-api.jar"
5446 #:make-flags
5447 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
5448 "/share/java"))
5449 #:phases
5450 (modify-phases %standard-phases
5451 (add-after 'unpack 'enter-dir
5452 (lambda _ (chdir "log4j-api") #t))
5453 ;; FIXME: The tests require additional software that has not been
5454 ;; packaged yet, such as
5455 ;; * org.apache.maven
5456 ;; * org.apache.felix
5457 (add-after 'enter-dir 'delete-tests
5458 (lambda _ (delete-file-recursively "src/test") #t)))))
5459 (inputs
5460 `(("java-osgi-core" ,java-osgi-core)
5461 ("java-hamcrest-core" ,java-hamcrest-core)
5462 ("java-junit" ,java-junit)))
5463 (home-page "http://logging.apache.org/log4j/2.x/")
5464 (synopsis "API module of the Log4j logging framework for Java")
5465 (description
5466 "This package provides the API module of the Log4j logging framework for
5467Java.")
5468 (license license:asl2.0)))
5469
dfef4231
JL
5470(define-public java-log4j-core
5471 (package
5472 (inherit java-log4j-api)
5473 (name "java-log4j-core")
5474 (inputs
5475 `(("java-osgi-core" ,java-osgi-core)
5476 ("java-hamcrest-core" ,java-hamcrest-core)
5477 ("java-log4j-api" ,java-log4j-api)
5478 ("java-mail" ,java-mail)
5479 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
5480 ("java-lmax-disruptor" ,java-lmax-disruptor)
5481 ("java-kafka" ,java-kafka-clients)
5482 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
5483 ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
5484 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
5485 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
5486 ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml)
5487 ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml)
5488 ("java-commons-compress" ,java-commons-compress)
5489 ("java-commons-csv" ,java-commons-csv)
5490 ("java-jeromq" ,java-jeromq)
5491 ("java-junit" ,java-junit)))
5492 (native-inputs
5493 `(("hamcrest" ,java-hamcrest-all)
5494 ("java-commons-io" ,java-commons-io)
5495 ("java-commons-lang3" ,java-commons-lang3)
5496 ("slf4j" ,java-slf4j-api)))
5497 (arguments
5498 `(#:tests? #f ; tests require more dependencies
5499 #:test-dir "src/test"
5500 #:source-dir "src/main/java"
5501 #:jar-name "log4j-core.jar"
5502 #:jdk ,icedtea-8
5503 #:make-flags
5504 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
5505 "/share/java"))
5506 #:phases
5507 (modify-phases %standard-phases
5508 (add-after 'unpack 'enter-dir
5509 (lambda _ (chdir "log4j-core") #t)))))
5510 (synopsis "Core component of the Log4j framework")
5511 (description "This package provides the core component of the Log4j
5512logging framework for Java.")))
5513
2caf873e
JL
5514(define-public java-log4j-1.2-api
5515 (package
5516 (inherit java-log4j-api)
5517 (name "java-log4j-1.2-api")
5518 (arguments
5519 `(#:jar-name "java-log4j-1.2-api.jar"
5520 #:source-dir "log4j-1.2-api/src/main/java"
5521 #:jdk ,icedtea-8
5522 ;; Tests require maven-model (and other maven subprojects), which is a
5523 ;; cyclic dependency.
5524 #:tests? #f))
5525 (inputs
5526 `(("log4j-api" ,java-log4j-api)
5527 ("log4j-core" ,java-log4j-core)
5528 ("osgi-core" ,java-osgi-core)
5529 ("eclipse-osgi" ,java-eclipse-osgi)
5530 ("java-lmax-disruptor" ,java-lmax-disruptor)))))
5531
1c188f4e
HG
5532(define-public java-commons-cli
5533 (package
5534 (name "java-commons-cli")
37602dd8 5535 (version "1.4")
1c188f4e
HG
5536 (source (origin
5537 (method url-fetch)
5538 (uri (string-append "mirror://apache/commons/cli/source/"
5539 "commons-cli-" version "-src.tar.gz"))
5540 (sha256
5541 (base32
37602dd8 5542 "05hgi2z01fqz374y719gl1dxzqvzci5af071zm7vxrjg9vczipm1"))))
1c188f4e
HG
5543 (build-system ant-build-system)
5544 ;; TODO: javadoc
5545 (arguments
5546 `(#:jar-name "commons-cli.jar"))
5547 (native-inputs
5548 `(("java-junit" ,java-junit)
5549 ("java-hamcrest-core" ,java-hamcrest-core)))
5550 (home-page "http://commons.apache.org/cli/")
5551 (synopsis "Command line arguments and options parsing library")
5552 (description "The Apache Commons CLI library provides an API for parsing
5553command line options passed to programs. It is also able to print help
5554messages detailing the options available for a command line tool.
5555
5556Commons CLI supports different types of options:
5557
5558@itemize
5559@item POSIX like options (ie. tar -zxvf foo.tar.gz)
5560@item GNU like long options (ie. du --human-readable --max-depth=1)
5561@item Java like properties (ie. java -Djava.awt.headless=true Foo)
5562@item Short options with value attached (ie. gcc -O2 foo.c)
5563@item long options with single hyphen (ie. ant -projecthelp)
5564@end itemize
5565
5566This is a part of the Apache Commons Project.")
5567 (license license:asl2.0)))
0a8519bc
HG
5568
5569(define-public java-commons-codec
5570 (package
5571 (name "java-commons-codec")
5572 (version "1.10")
5573 (source (origin
5574 (method url-fetch)
5575 (uri (string-append "mirror://apache/commons/codec/source/"
5576 "commons-codec-" version "-src.tar.gz"))
5577 (sha256
5578 (base32
5579 "1w9qg30y4s0x8gnmr2fgj4lyplfn788jqxbcz27lf5kbr6n8xr65"))))
5580 (build-system ant-build-system)
5581 (outputs '("out" "doc"))
5582 (arguments
5583 `(#:test-target "test"
5584 #:make-flags
5585 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
5586 (junit (assoc-ref %build-inputs "java-junit")))
5587 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
5588 (string-append "-Dhamcrest.jar=" hamcrest
5589 "/share/java/hamcrest-core.jar")
5590 ;; Do not append version to jar.
5591 "-Dfinal.name=commons-codec"))
5592 #:phases
5593 (modify-phases %standard-phases
5594 (add-after 'build 'build-javadoc ant-build-javadoc)
5595 (replace 'install (install-jars "dist"))
5596 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
5597 (native-inputs
5598 `(("java-junit" ,java-junit)
5599 ("java-hamcrest-core" ,java-hamcrest-core)))
5600 (home-page "http://commons.apache.org/codec/")
5601 (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs")
5602 (description "The codec package contains simple encoder and decoders for
5603various formats such as Base64 and Hexadecimal. In addition to these widely
5604used encoders and decoders, the codec package also maintains a collection of
5605phonetic encoding utilities.
5606
5607This is a part of the Apache Commons Project.")
5608 (license license:asl2.0)))
7d91c1b9
HG
5609
5610(define-public java-commons-daemon
5611 (package
5612 (name "java-commons-daemon")
5613 (version "1.0.15")
5614 (source (origin
5615 (method url-fetch)
5616 (uri (string-append "mirror://apache/commons/daemon/source/"
5617 "commons-daemon-" version "-src.tar.gz"))
5618 (sha256
5619 (base32
5620 "0ci46kq8jpz084ccwq0mmkahcgsmh20ziclp2jf5i0djqv95gvhi"))))
5621 (build-system ant-build-system)
5622 (arguments
5623 `(#:test-target "test"
5624 #:phases
5625 (modify-phases %standard-phases
5626 (add-after 'build 'build-javadoc ant-build-javadoc)
5627 (replace 'install (install-jars "dist"))
5628 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
5629 (native-inputs
5630 `(("java-junit" ,java-junit)))
5631 (home-page "http://commons.apache.org/daemon/")
5632 (synopsis "Library to launch Java applications as daemons")
5633 (description "The Daemon package from Apache Commons can be used to
5634implement Java applications which can be launched as daemons. For example the
5635program will be notified about a shutdown so that it can perform cleanup tasks
5636before its process of execution is destroyed by the operation system.
5637
5638This package contains the Java library. You will also need the actual binary
5639for your architecture which is provided by the jsvc package.
5640
5641This is a part of the Apache Commons Project.")
5642 (license license:asl2.0)))
9f68e74a 5643
eb270ecf
RW
5644(define-public java-javaewah
5645 (package
5646 (name "java-javaewah")
5647 (version "1.1.6")
5648 (source (origin
5649 (method url-fetch)
5650 (uri (string-append "https://github.com/lemire/javaewah/"
5651 "archive/JavaEWAH-" version ".tar.gz"))
5652 (sha256
5653 (base32
5654 "1n7j1r1h24wlhwv9zdcj6yqjrhma2ixwyzm15l5vrv6yqjs6753b"))))
5655 (build-system ant-build-system)
5656 (arguments `(#:jar-name "javaewah.jar"))
5657 (inputs
5658 `(("java-junit" ,java-junit)
5659 ("java-hamcrest-core" ,java-hamcrest-core)))
5660 (home-page "https://github.com/lemire/javaewah")
5661 (synopsis "Compressed alternative to the Java @code{BitSet} class")
5662 (description "This is a word-aligned compressed variant of the Java
5663@code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like
5664compression scheme. It can be used to implement bitmap indexes.
5665
5666The goal of word-aligned compression is not to achieve the best compression,
5667but rather to improve query processing time. Hence, JavaEWAH tries to save CPU
5668cycles, maybe at the expense of storage. However, the EWAH scheme is always
5669more efficient storage-wise than an uncompressed bitmap (as implemented in the
5670@code{BitSet} class by Sun).")
5671 ;; GPL2.0 derivates are explicitly allowed.
5672 (license license:asl2.0)))
5673
f8e4d022
RW
5674(define-public java-slf4j-api
5675 (package
5676 (name "java-slf4j-api")
5677 (version "1.7.25")
5678 (source (origin
5679 (method url-fetch)
5680 (uri (string-append "https://www.slf4j.org/dist/slf4j-"
5681 version ".tar.gz"))
5682 (sha256
5683 (base32
5684 "13j51sgzmhhdrfa74gkal5zpip7r1440dh7zsi2c8bpb2zs1v8kb"))
5685 (modules '((guix build utils)))
5686 ;; Delete bundled jars.
5687 (snippet
5688 '(begin
5689 (for-each delete-file (find-files "." "\\.jar$"))
5690 #t))))
5691 (build-system ant-build-system)
5692 (arguments
dcf7a8a6 5693 `(#:jar-name "slf4j-api.jar"
f8e4d022 5694 #:source-dir "slf4j-api/src/main"
dcf7a8a6
JL
5695 #:test-dir "slf4j-api/src/test"
5696 #:phases
5697 (modify-phases %standard-phases
5698 (add-after 'build 'regenerate-jar
5699 (lambda _
5700 ;; pom.xml ignores these files in the jar creation process. If we don't,
5701 ;; we get the error "This code should have never made it into slf4j-api.jar"
5702 (delete-file-recursively "build/classes/org/slf4j/impl")
5703 (zero? (system* "jar" "-cf" "build/jar/slf4j-api.jar" "-C"
5704 "build/classes" "."))))
5705 (add-before 'check 'dont-test-abstract-classes
5706 (lambda _
5707 ;; abstract classes are not meant to be run with junit
5708 (substitute* "build.xml"
5709 (("<include name=\"\\*\\*/\\*Test.java\" />")
5710 (string-append "<include name=\"**/*Test.java\" />"
5711 "<exclude name=\"**/MultithreadedInitializationTest"
5712 ".java\" />"))))))))
f8e4d022
RW
5713 (inputs
5714 `(("java-junit" ,java-junit)
5715 ("java-hamcrest-core" ,java-hamcrest-core)))
5716 (home-page "https://www.slf4j.org/")
5717 (synopsis "Simple logging facade for Java")
5718 (description "The Simple Logging Facade for Java (SLF4J) serves as a
5719simple facade or abstraction for various logging
5720frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j})
5721allowing the end user to plug in the desired logging framework at deployment
5722time.")
5723 (license license:expat)))
5724
6d047cc4
GB
5725(define java-slf4j-api-bootstrap
5726 (package
5727 (inherit java-slf4j-api)
5728 (name "java-slf4j-api-bootstrap")
5729 (inputs `())
5730 (arguments
5731 (substitute-keyword-arguments (package-arguments java-slf4j-api)
5732 ((#:tests? _ #f) #f)))))
5733
88f256a1
TD
5734(define-public java-slf4j-simple
5735 (package
5736 (name "java-slf4j-simple")
5737 (version "1.7.25")
5738 (source (package-source java-slf4j-api))
5739 (build-system ant-build-system)
5740 (arguments
5741 `(#:jar-name "slf4j-simple.jar"
5742 #:source-dir "slf4j-simple/src/main"
5743 #:test-dir "slf4j-simple/src/test"
5744 #:phases
5745 (modify-phases %standard-phases
5746 ;; The tests need some test classes from slf4j-api
5747 (add-before 'check 'build-slf4j-api-test-helpers
5748 (lambda _
5749 ;; Add current dir to CLASSPATH ...
5750 (setenv "CLASSPATH"
5751 (string-append (getcwd) ":" (getenv "CLASSPATH")))
5752 ;; ... and build test helper classes here:
5753 (zero?
5754 (apply system*
5755 `("javac" "-d" "."
5756 ,@(find-files "slf4j-api/src/test" ".*\\.java")))))))))
5757 (inputs
5758 `(("java-junit" ,java-junit)
5759 ("java-hamcrest-core" ,java-hamcrest-core)
5760 ("java-slf4j-api" ,java-slf4j-api)))
5761 (home-page "https://www.slf4j.org/")
5762 (synopsis "Simple implementation of simple logging facade for Java")
5763 (description "SLF4J binding for the Simple implementation, which outputs
5764all events to System.err. Only messages of level INFO and higher are
5765printed.")
5766 (license license:expat)))
5767
9f68e74a
JL
5768(define-public antlr2
5769 (package
5770 (name "antlr2")
5771 (version "2.7.7")
5772 (source (origin
5773 (method url-fetch)
5774 (uri (string-append "http://www.antlr2.org/download/antlr-"
5775 version ".tar.gz"))
5776 (sha256
5777 (base32
5778 "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5"))
5779 (modules '((guix build utils)))
5780 (snippet
5781 '(begin
5782 (delete-file "antlr.jar")
5783 (substitute* "lib/cpp/antlr/CharScanner.hpp"
5784 (("#include <map>")
5785 (string-append
6d225e89
RW
5786 "#include <map>\n"
5787 "#define EOF (-1)\n"
5788 "#include <strings.h>")))
9f68e74a 5789 (substitute* "configure"
6d225e89
RW
5790 (("/bin/sh") "sh"))
5791 #t))))
9f68e74a
JL
5792 (build-system gnu-build-system)
5793 (arguments
6d225e89 5794 `(#:tests? #f ; no test target
3ad90395
RW
5795 #:imported-modules ((guix build ant-build-system)
5796 (guix build syscalls)
5797 ,@%gnu-build-system-modules)
5798 #:modules (((guix build ant-build-system) #:prefix ant:)
5799 (guix build gnu-build-system)
5800 (guix build utils))
9f68e74a
JL
5801 #:phases
5802 (modify-phases %standard-phases
5803 (add-after 'install 'strip-jar-timestamps
3ad90395 5804 (assoc-ref ant:%standard-phases 'strip-jar-timestamps))
9f68e74a
JL
5805 (add-after 'configure 'fix-bin-ls
5806 (lambda _
3ad90395
RW
5807 (substitute* (find-files "." "Makefile")
5808 (("/bin/ls") "ls"))
5809 #t)))))
9f68e74a
JL
5810 (native-inputs
5811 `(("which" ,which)
5812 ("zip" ,zip)
5813 ("java" ,icedtea "jdk")))
5814 (inputs
5815 `(("java" ,icedtea)))
5816 (home-page "http://www.antlr2.org")
5817 (synopsis "Framework for constructing recognizers, compilers, and translators")
5818 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
5819is a language tool that provides a framework for constructing recognizers,
5820compilers, and translators from grammatical descriptions containing Java, C#,
5821C++, or Python actions. ANTLR provides excellent support for tree construction,
5822tree walking, and translation.")
5823 (license license:public-domain)))
a0f15eff 5824
e44112e1 5825(define-public java-stringtemplate-3
a0f15eff 5826 (package
e44112e1 5827 (name "java-stringtemplate")
a0f15eff
JL
5828 (version "3.2.1")
5829 (source (origin
5830 (method url-fetch)
5831 (uri (string-append "https://github.com/antlr/website-st4/raw/"
5832 "gh-pages/download/stringtemplate-"
5833 version ".tar.gz"))
5834 (sha256
5835 (base32
5836 "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is"))))
5837 (build-system ant-build-system)
5838 (arguments
129d926d 5839 `(#:jar-name (string-append ,name "-" ,version ".jar")
2fcda6d2 5840 #:test-dir "test"
b101b4e8
RW
5841 #:modules ((guix build ant-build-system)
5842 (guix build utils)
5843 (srfi srfi-1))
a0f15eff
JL
5844 #:phases
5845 (modify-phases %standard-phases
2fcda6d2
RW
5846 (add-before 'check 'fix-tests
5847 (lambda _
5848 (substitute* "build.xml"
5849 (("\\$\\{test.home\\}/java")
5850 "${test.home}/org"))
5851 #t))
a0f15eff
JL
5852 (add-before 'build 'generate-grammar
5853 (lambda _
b101b4e8
RW
5854 (with-directory-excursion "src/org/antlr/stringtemplate/language/"
5855 (every (lambda (file)
5856 (format #t "~a\n" file)
5857 (zero? (system* "antlr" file)))
5858 '("template.g" "angle.bracket.template.g" "action.g"
5859 "eval.g" "group.g" "interface.g"))))))))
a0f15eff 5860 (native-inputs
2fcda6d2
RW
5861 `(("antlr" ,antlr2)
5862 ("java-junit" ,java-junit)))
a0f15eff
JL
5863 (home-page "http://www.stringtemplate.org")
5864 (synopsis "Template engine to generate formatted text output")
5865 (description "StringTemplate is a java template engine (with ports for C#,
5866Objective-C, JavaScript, Scala) for generating source code, web pages, emails,
5867or any other formatted text output. StringTemplate is particularly good at
5868code generators, multiple site skins, and internationalization / localization.
5869StringTemplate also powers ANTLR.")
5870 (license license:bsd-3)))
4ad8aed7
JL
5871
5872;; antlr3 is partially written using antlr3 grammar files. It also depends on
5873;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar
5874;; files and uses antlr3 at runtime. The latest version requires a recent version
5875;; of antlr3 at runtime.
5876;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3.
5877;; This version of ST4 is sufficient for the latest antlr3.
5878;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build
5879;; the latest ST4 with it. Then we build our final antlr3 that will be linked
5880;; against the latest ST4.
5881;; antlr3.3 still depends on antlr3 to generate some files, so we use an
5882;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses
5883;; only grammar files with the antlr2 syntax.
5884;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3.
5885
64b7efc0 5886(define-public java-stringtemplate
407df789 5887 (package (inherit java-stringtemplate-3)
64b7efc0 5888 (name "java-stringtemplate")
4ad8aed7
JL
5889 (version "4.0.8")
5890 (source (origin
5891 (method url-fetch)
5892 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/"
5893 version ".tar.gz"))
5894 (file-name (string-append name "-" version ".tar.gz"))
5895 (sha256
5896 (base32
5897 "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087"))))
5898 (build-system ant-build-system)
5899 (arguments
6db77c7c
RW
5900 `(#:jar-name (string-append ,name "-" ,version ".jar")
5901 #:tests? #f ; FIXME: tests fail for unknown reasons
5902 #:test-dir "test"
f4aa4cfe
RW
5903 #:modules ((guix build ant-build-system)
5904 (guix build utils)
5905 (srfi srfi-1))
4ad8aed7
JL
5906 #:phases
5907 (modify-phases %standard-phases
6db77c7c
RW
5908 (add-before 'check 'fix-test-target
5909 (lambda _
5910 (substitute* "build.xml"
5911 (("\\$\\{test.home\\}/java") "${test.home}/")
5912 (("\\*Test.java") "Test*.java"))
5913 #t))
4ad8aed7 5914 (add-before 'build 'generate-grammar
f4aa4cfe
RW
5915 (lambda _
5916 (with-directory-excursion "src/org/stringtemplate/v4/compiler/"
5917 (every (lambda (file)
5918 (format #t "~a\n" file)
5919 (zero? (system* "antlr3" file)))
5920 '("STParser.g" "Group.g" "CodeGenerator.g"))))))))
4ad8aed7
JL
5921 (inputs
5922 `(("antlr3" ,antlr3-bootstrap)
5923 ("antlr2" ,antlr2)
6db77c7c
RW
5924 ("java-stringtemplate" ,java-stringtemplate-3)
5925 ("java-junit" ,java-junit)))))
4ad8aed7 5926
1345eeb0 5927(define java-stringtemplate-4.0.6
64b7efc0 5928 (package (inherit java-stringtemplate)
1345eeb0 5929 (name "java-stringtemplate")
4ad8aed7
JL
5930 (version "4.0.6")
5931 (source (origin
5932 (method url-fetch)
5933 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-"
5934 version ".tar.gz"))
5935 (file-name (string-append name "-" version ".tar.gz"))
5936 (sha256
5937 (base32
5938 "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp"))))
5939 (inputs
5940 `(("antlr3" ,antlr3-3.3)
5941 ("antlr2" ,antlr2)
e44112e1 5942 ("java-stringtemplate" ,java-stringtemplate-3)))))
4ad8aed7
JL
5943
5944(define-public antlr3
5945 (package
5946 (name "antlr3")
5947 (version "3.5.2")
5948 (source (origin
5949 (method url-fetch)
5950 (uri (string-append "https://github.com/antlr/antlr3/archive/"
5951 version ".tar.gz"))
5952 (file-name (string-append name "-" version ".tar.gz"))
5953 (sha256
5954 (base32
fd75eb6c 5955 "0218v683081lg54z9hvjxinhxd4dqp870jx6n39gslm0bkyi4vd6"))))
4ad8aed7
JL
5956 (build-system ant-build-system)
5957 (arguments
5958 `(#:jar-name (string-append ,name "-" ,version ".jar")
5959 #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3"
5960 #:tests? #f
5961 #:phases
5962 (modify-phases %standard-phases
5963 (add-after 'install 'bin-install
5964 (lambda* (#:key inputs outputs #:allow-other-keys)
5965 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
5966 (bin (string-append (assoc-ref outputs "out") "/bin")))
5967 (mkdir-p bin)
5968 (with-output-to-file (string-append bin "/antlr3")
5969 (lambda _
5970 (display
5971 (string-append "#!" (which "sh") "\n"
5972 "java -cp " jar "/" ,name "-" ,version ".jar:"
5973 (string-concatenate
5974 (find-files (assoc-ref inputs "stringtemplate")
5975 ".*\\.jar"))
5976 ":"
5977 (string-concatenate
5978 (find-files (assoc-ref inputs "stringtemplate4")
5979 ".*\\.jar"))
5980 ":"
5981 (string-concatenate
5982 (find-files (string-append
5983 (assoc-ref inputs "antlr")
5984 "/lib")
5985 ".*\\.jar"))
5986 " org.antlr.Tool $*"))))
5987 (chmod (string-append bin "/antlr3") #o755))))
5988 (add-before 'build 'generate-grammar
5989 (lambda _
5990 (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/")
5991 (for-each (lambda (file)
5992 (display file)
5993 (newline)
5994 (system* "antlr3" file))
5995 '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g"
5996 "AssignTokenTypesWalker.g"
5997 "ActionTranslator.g" "TreeToNFAConverter.g"
5998 "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g"
5999 "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g"))
6000 (substitute* "ANTLRParser.java"
6001 (("public Object getTree") "public GrammarAST getTree"))
6002 (substitute* "ANTLRv3Parser.java"
6003 (("public Object getTree") "public CommonTree getTree"))
6004 (chdir "../../../../../java")
6005 (system* "antlr" "-o" "org/antlr/tool"
6006 "org/antlr/tool/serialize.g")
6007 (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java"
6008 (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*;
6009import org.antlr.grammar.v3.ANTLRTreePrinter;"))
6010 (substitute* "org/antlr/tool/ErrorManager.java"
6011 (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") ""))
6012 (chdir "../../../..")))
6013 (add-before 'build 'fix-build-xml
6014 (lambda _
6015 (substitute* "build.xml"
6016 (("<exec") "<copy todir=\"${classes.dir}\">
6017<fileset dir=\"tool/src/main/resources\">
6018<include name=\"**/*.stg\"/>
6019<include name=\"**/*.st\"/>
6020<include name=\"**/*.sti\"/>
6021<include name=\"**/STLexer.tokens\"/>
6022</fileset>
6023</copy><exec")))))))
6024 (native-inputs
6025 `(("antlr" ,antlr2)
6026 ("antlr3" ,antlr3-bootstrap)))
6027 (inputs
6028 `(("junit" ,java-junit)
e44112e1 6029 ("stringtemplate" ,java-stringtemplate-3)
64b7efc0 6030 ("stringtemplate4" ,java-stringtemplate)))
4ad8aed7 6031 (propagated-inputs
e44112e1 6032 `(("stringtemplate" ,java-stringtemplate-3)
4ad8aed7 6033 ("antlr" ,antlr2)
1345eeb0 6034 ("stringtemplate4" ,java-stringtemplate-4.0.6)))
4ad8aed7
JL
6035 (home-page "http://www.antlr3.org")
6036 (synopsis "Framework for constructing recognizers, compilers, and translators")
6037 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
6038is a language tool that provides a framework for constructing recognizers,
6039compilers, and translators from grammatical descriptions containing Java, C#,
6040C++, or Python actions. ANTLR provides excellent support for tree construction,
6041tree walking, and translation.")
6042 (license license:bsd-3)))
6043
6044(define antlr3-bootstrap
6045 (package
6046 (inherit antlr3)
6047 (name "antlr3-bootstrap")
6048 (native-inputs
6049 `(("antlr" ,antlr2)
6050 ("antlr3" ,antlr3-3.3)))
6051 (inputs
6052 `(("junit" ,java-junit)))))
6053
6054(define antlr3-3.3
6055 (package
6056 (inherit antlr3)
6057 (name "antlr3")
6058 (version "3.3")
6059 (source (origin
6060 (method url-fetch)
6061 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
6062 "gh-pages/download/antlr-"
6063 version ".tar.gz"))
6064 (sha256
6065 (base32
48c86220
GB
6066 "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m"))
6067 (patches
6068 (search-patches "antlr3-3_3-fix-java8-compilation.patch"))))
4ad8aed7
JL
6069 (arguments
6070 `(#:jar-name (string-append ,name "-" ,version ".jar")
a9540107
RW
6071 #:source-dir (string-join '("tool/src/main/java"
6072 "runtime/Java/src/main/java"
6073 "tool/src/main/antlr2"
6074 "tool/src/main/antlr3")
6075 ":")
6076 #:tests? #f ; FIXME: tests seem to require maven plugin
6077 #:modules ((guix build ant-build-system)
6078 (guix build utils)
6079 (srfi srfi-1))
4ad8aed7
JL
6080 #:phases
6081 (modify-phases %standard-phases
6082 (add-after 'install 'bin-install
6083 (lambda* (#:key inputs outputs #:allow-other-keys)
a9540107
RW
6084 (let* ((out (assoc-ref outputs "out"))
6085 (jar (string-append out "/share/java"))
6086 (bin (string-append out "/bin")))
4ad8aed7
JL
6087 (mkdir-p bin)
6088 (with-output-to-file (string-append bin "/antlr3")
6089 (lambda _
6090 (display
a9540107
RW
6091 (string-append
6092 "#!" (which "sh") "\n"
6093 "java -cp " jar "/antlr3-3.3.jar:"
6094 (string-join
6095 (append (find-files (assoc-ref inputs "java-stringtemplate")
6096 ".*\\.jar$")
6097 (find-files (string-append (assoc-ref inputs "antlr")
6098 "/lib")
6099 ".*\\.jar$"))
6100 ":")
6101 " org.antlr.Tool $*"))))
6102 (chmod (string-append bin "/antlr3") #o755)
6103 #t)))
4ad8aed7
JL
6104 (add-before 'build 'generate-grammar
6105 (lambda _
4ad8aed7
JL
6106 (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java"
6107 (("import org.antlr.grammar.v2.\\*;")
6108 "import org.antlr.grammar.v2.*;\n
6109import org.antlr.grammar.v2.TreeToNFAConverter;\n
6110import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n
a9540107
RW
6111import org.antlr.grammar.v2.ANTLRTreePrinter;"))
6112 (and
6113 (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/"
6114 (every (lambda (file)
6115 (format #t "~a\n" file)
6116 (zero? (system* "antlr" file)))
6117 '("antlr.g" "antlr.print.g" "assign.types.g"
6118 "buildnfa.g" "codegen.g" "define.g")))
6119 (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/"
6120 (every (lambda (file)
6121 (format #t "~a\n" file)
6122 (zero? (system* "antlr3" file)))
6123 '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g"
6124 "ANTLRv3Tree.g"))))))
4ad8aed7
JL
6125 (add-before 'build 'fix-build-xml
6126 (lambda _
6127 (substitute* "build.xml"
6128 (("<exec") "<copy todir=\"${classes.dir}\">
6129<fileset dir=\"tool/src/main/resources\">
6130<include name=\"**/*.stg\"/>
6131<include name=\"**/*.st\"/>
6132<include name=\"**/*.sti\"/>
6133<include name=\"**/STLexer.tokens\"/>
6134</fileset>
a9540107
RW
6135</copy><exec"))
6136 #t)))))
4ad8aed7
JL
6137 (native-inputs
6138 `(("antlr" ,antlr2)
6139 ("antlr3" ,antlr3-3.1)))
6140 (inputs
6141 `(("junit" ,java-junit)))
6142 (propagated-inputs
e44112e1 6143 `(("java-stringtemplate" ,java-stringtemplate-3)
4ad8aed7
JL
6144 ("antlr" ,antlr2)
6145 ("antlr3" ,antlr3-3.1)))))
6146
6147(define antlr3-3.1
6148 (package
6149 (inherit antlr3)
4ad8aed7
JL
6150 (version "3.1")
6151 (source (origin
6152 (method url-fetch)
6153 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
6154 "gh-pages/download/antlr-"
6155 version ".tar.gz"))
6156 (sha256
6157 (base32
4c763b4d
GB
6158 "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z"))
6159 (patches
6160 (search-patches "antlr3-3_1-fix-java8-compilation.patch"))))
4ad8aed7 6161 (arguments
ec32bc98 6162 `(#:jar-name (string-append "antlr3-" ,version ".jar")
4ad8aed7
JL
6163 #:source-dir "src:runtime/Java/src"
6164 #:tests? #f
6165 #:phases
6166 (modify-phases %standard-phases
6167 (add-after 'install 'bin-install
6168 (lambda* (#:key inputs outputs #:allow-other-keys)
6169 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
6170 (bin (string-append (assoc-ref outputs "out") "/bin")))
6171 (mkdir-p bin)
6172 (with-output-to-file (string-append bin "/antlr3")
6173 (lambda _
6174 (display
6175 (string-append "#!" (which "sh") "\n"
57e37764 6176 "java -cp " jar "/antlr3-3.1.jar:"
4ad8aed7
JL
6177 (string-concatenate
6178 (find-files (assoc-ref inputs "stringtemplate")
6179 ".*\\.jar"))
6180 ":"
6181 (string-concatenate
6182 (find-files (string-append
6183 (assoc-ref inputs "antlr")
6184 "/lib")
6185 ".*\\.jar"))
6186 " org.antlr.Tool $*"))))
6187 (chmod (string-append bin "/antlr3") #o755))))
6188 (add-before 'build 'generate-grammar
6189 (lambda _
6190 (let ((dir "src/org/antlr/tool/"))
6191 (for-each (lambda (file)
6192 (display file)
6193 (newline)
13f38d31 6194 (invoke "antlr" "-o" dir (string-append dir file)))
4ad8aed7
JL
6195 '("antlr.g" "antlr.print.g" "assign.types.g"
6196 "buildnfa.g" "define.g")))
6197 (format #t "codegen.g\n")
13f38d31
RW
6198 (invoke "antlr" "-o" "src/org/antlr/codegen"
6199 "src/org/antlr/codegen/codegen.g")
6200 #t))
4ad8aed7
JL
6201 (add-before 'build 'fix-build-xml
6202 (lambda _
6203 (substitute* "build.xml"
6204 (("<exec") "<copy todir=\"${classes.dir}\">
6205<fileset dir=\"src\">
6206<include name=\"**/*.stg\"/>
6207<include name=\"**/*.st\"/>
6208<include name=\"**/*.sti\"/>
6209<include name=\"**/STLexer.tokens\"/>
6210</fileset>
6211</copy><exec")))))))
6212 (native-inputs
6213 `(("antlr" ,antlr2)))
6214 (inputs
6215 `(("junit" ,java-junit)))
6216 (propagated-inputs
e44112e1 6217 `(("stringtemplate" ,java-stringtemplate-3)))))
d44bcd7a 6218
742242a5
GB
6219(define-public java-commons-cli-1.2
6220 ;; This is a bootstrap dependency for Maven2.
6221 (package
6222 (inherit java-commons-cli)
6223 (version "1.2")
6224 (source (origin
6225 (method url-fetch)
6226 (uri (string-append "mirror://apache/commons/cli/source/"
6227 "commons-cli-" version "-src.tar.gz"))
6228 (sha256
6229 (base32
6230 "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm"))))
6231 (arguments
6232 `(#:jar-name "commons-cli.jar"
6233 #:phases
6234 (modify-phases %standard-phases
6235 (add-before 'check 'fix-build-xml
6236 (lambda* (#:key inputs #:allow-other-keys)
6237 (substitute* "build.xml"
6238 (("dir=\"\\$\\{test.home\\}/java\"")
6239 "dir=\"${test.home}\""))
6240 #t)))))
6241 (native-inputs
6242 `(("java-junit" ,java-junit)))))
30deadee
JL
6243
6244(define-public java-microemulator-cldc
6245 (package
6246 (name "java-microemulator-cldc")
6247 (version "2.0.4")
6248 (source (origin
6249 (method url-fetch)
6250 (uri (string-append "https://github.com/barteo/microemu/archive/"
6251 "microemulator_"
6252 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
6253 version)
6254 ".tar.gz"))
6255 (file-name (string-append name "-" version ".tar.gz"))
6256 (sha256
6257 (base32
6258 "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll"))))
6259 (build-system ant-build-system)
6260 (arguments
6261 `(#:jar-name "microemulator-cldc.jar"
6262 #:source-dir "microemu-cldc/src/main/java"
6263 #:tests? #f)); Requires even older software
6264 (home-page "https://github.com/barteo/microemu")
6265 (synopsis "J2ME CLDC emulator")
6266 (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP
6267Emulator. It allows to demonstrate MIDlet based applications in web browser
6268applet and can be run as a standalone java application.")
6269 (license (list license:asl2.0
6270 ;; or altenatively:
6271 license:lgpl2.1+))))
8e2f3e5e
JL
6272
6273(define-public java-datanucleus-javax-persistence
6274 (package
6275 (name "java-datanucleus-javax-persistence")
6276 (version "2.2.0")
6277 (source (origin
6278 (method url-fetch)
6279 (uri (string-append "https://github.com/datanucleus/"
6280 "javax.persistence/archive/javax.persistence-"
6281 version "-release.tar.gz"))
6282 (sha256
6283 (base32
6284 "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx"))))
6285 (build-system ant-build-system)
6286 (arguments
6287 `(#:jar-name "java-datanucleus-javax-persistence.jar"
6288 #:jdk ,icedtea-8
6289 #:source-dir "src/main/java"
6290 #:tests? #f)); no tests
6291 (home-page "https://github.com/datanucleus/javax.persistence")
6292 (synopsis "JPA API")
6293 (description "This package contains a clean definition of JPA API intended
6294for use with DataNucleus JPA since the JCP haven't provided an official JPA API
6295jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification
6296used to generate this API.")
6297 (license (list license:edl1.0 license:epl1.0))))
3240ddbf
JL
6298
6299(define-public java-osgi-cmpn
6300 (package
6301 (name "java-osgi-cmpn")
6302 (version "6.0.0")
6303 (source (origin
6304 (method url-fetch)
6305 (uri (string-append "http://central.maven.org/maven2/"
6306 "org/osgi/osgi.cmpn/" version "/osgi.cmpn-"
6307 version "-sources.jar"))
6308 (sha256
6309 (base32
6310 "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys"))))
6311 (build-system ant-build-system)
6312 (arguments
6313 `(#:jar-name "osgi-cmpn.jar"
6314 #:tests? #f)); no tests
6315 (inputs
6316 `(("annotation" ,java-osgi-annotation)
6317 ("core" ,java-osgi-core)
6318 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
6319 ("microemulator" ,java-microemulator-cldc)
6320 ("servlet" ,java-classpathx-servletapi)))
c353d014 6321 (home-page "https://www.osgi.org")
3240ddbf
JL
6322 (synopsis "Compendium specification module of OSGi framework")
6323 (description
6324 "OSGi, for Open Services Gateway initiative framework, is a module system
6325and service platform for the Java programming language. This package contains
6326the compendium specification module, providing interfaces and classes for use
6327in compiling bundles.")
6328 (license license:asl2.0)))
747c7574
JL
6329
6330(define-public java-osgi-service-component-annotations
6331 (package
6332 (name "java-osgi-service-component-annotations")
6333 (version "1.3.0")
6334 (source (origin
6335 (method url-fetch)
6336 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6337 "org.osgi.service.component.annotations/"
6338 version "/org.osgi.service.component.annotations-"
6339 version "-sources.jar"))
6340 (sha256
6341 (base32
6342 "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0"))))
6343 (build-system ant-build-system)
6344 (arguments
6345 `(#:jar-name "osgi-service-component-annotations.jar"
6346 #:tests? #f)); no tests
6347 (inputs
6348 `(("annotation" ,java-osgi-annotation)))
c353d014 6349 (home-page "https://www.osgi.org")
747c7574
JL
6350 (synopsis "Support annotations for osgi-service-component")
6351 (description
6352 "OSGi, for Open Services Gateway initiative framework, is a module system
6353and service platform for the Java programming language. This package contains
6354the support annotations for osgi-service-component.")
6355 (license license:asl2.0)))
999b5fb4
JL
6356
6357(define-public java-osgi-dto
6358 (package
6359 (name "java-osgi-dto")
6360 (version "1.0.0")
6361 (source (origin
6362 (method url-fetch)
6363 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6364 "org.osgi.dto/" version "/org.osgi.dto-"
6365 version "-sources.jar"))
6366 (sha256
6367 (base32
6368 "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr"))))
6369 (build-system ant-build-system)
6370 (arguments
6371 `(#:jar-name "osgi-dto.jar"
6372 #:tests? #f)); no tests
6373 (inputs
6374 `(("annotation" ,java-osgi-annotation)))
c353d014 6375 (home-page "https://www.osgi.org")
999b5fb4
JL
6376 (synopsis "Data Transfer Objects")
6377 (description
6378 "OSGi, for Open Services Gateway initiative framework, is a module system
6379and service platform for the Java programming language. This package contains
6380the Data Transfer Objects. It is easily serializable having only public fields
6381of primitive types and their wrapper classes, Strings, and DTOs. List, Set,
6382Map and array aggregates may also be used. The aggregates must only hold
6383objects of the listed types or aggregates.")
6384 (license license:asl2.0)))
c304ce6a
JL
6385
6386(define-public java-osgi-resource
6387 (package
6388 (name "java-osgi-resource")
6389 (version "1.0.0")
6390 (source (origin
6391 (method url-fetch)
6392 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6393 "org.osgi.resource/"
6394 version "/org.osgi.resource-"
6395 version "-sources.jar"))
6396 (sha256
6397 (base32
6398 "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d"))))
6399 (build-system ant-build-system)
6400 (arguments
6401 `(#:jar-name "osgi-resource.jar"
6402 #:tests? #f)); no tests
6403 (inputs
6404 `(("annotation" ,java-osgi-annotation)
6405 ("dto" ,java-osgi-dto)))
c353d014 6406 (home-page "https://www.osgi.org")
c304ce6a
JL
6407 (synopsis "OSGI Resource")
6408 (description
6409 "OSGi, for Open Services Gateway initiative framework, is a module system
6410and service platform for the Java programming language. This package contains
6411the definition of common types in osgi packages.")
6412 (license license:asl2.0)))
c2b14516
JL
6413
6414(define-public java-osgi-namespace-contract
6415 (package
6416 (name "java-osgi-namespace-contract")
6417 (version "1.0.0")
6418 (source (origin
6419 (method url-fetch)
6420 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6421 "org.osgi.namespace.contract/"
6422 version "/org.osgi.namespace.contract-"
6423 version "-sources.jar"))
6424 (sha256
6425 (base32
6426 "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36"))))
6427 (build-system ant-build-system)
6428 (inputs
6429 `(("resource" ,java-osgi-resource)
6430 ("annotation" ,java-osgi-annotation)))
6431 (arguments
6432 `(#:jar-name "osgi-namespace-contract.jar"
6433 #:tests? #f)); no tests
c353d014 6434 (home-page "https://www.osgi.org")
c2b14516
JL
6435 (synopsis "Contract Capability and Requirement Namespace")
6436 (description
6437 "OSGi, for Open Services Gateway initiative framework, is a module system
6438and service platform for the Java programming language. This package contains
6439the names for the attributes and directives for a namespace with contracts.")
6440 (license license:asl2.0)))
f809c963
JL
6441
6442(define-public java-osgi-namespace-extender
6443 (package
6444 (name "java-osgi-namespace-extender")
6445 (version "1.0.1")
6446 (source (origin
6447 (method url-fetch)
6448 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6449 "org.osgi.namespace.extender/"
6450 version "/org.osgi.namespace.extender-"
6451 version "-sources.jar"))
6452 (sha256
6453 (base32
6454 "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz"))))
6455 (build-system ant-build-system)
6456 (inputs
6457 `(("resource" ,java-osgi-resource)
6458 ("annotation" ,java-osgi-annotation)))
6459 (arguments
6460 `(#:jar-name "osgi-namespace-extendent.jar"
6461 #:tests? #f)); no tests
c353d014 6462 (home-page "https://www.osgi.org")
f809c963
JL
6463 (synopsis "Extender Capability and Requirement Namespace")
6464 (description
6465 "OSGi, for Open Services Gateway initiative framework, is a module system
6466and service platform for the Java programming language. This package contains
b784962d
JL
6467the names for the attributes and directives for an extender namespace.")
6468 (license license:asl2.0)))
6469
6470(define-public java-osgi-namespace-service
6471 (package
6472 (name "java-osgi-namespace-service")
6473 (version "1.0.0")
6474 (source (origin
6475 (method url-fetch)
6476 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6477 "org.osgi.namespace.service/"
6478 version "/org.osgi.namespace.service-"
6479 version "-sources.jar"))
6480 (sha256
6481 (base32
6482 "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8"))))
6483 (build-system ant-build-system)
6484 (inputs
6485 `(("resource" ,java-osgi-resource)
6486 ("annotation" ,java-osgi-annotation)))
6487 (arguments
6488 `(#:jar-name "osgi-namespace-service.jar"
6489 #:tests? #f)); no tests
c353d014 6490 (home-page "https://www.osgi.org")
b784962d
JL
6491 (synopsis "Service Capability and Requirement Namespace")
6492 (description
6493 "OSGi, for Open Services Gateway initiative framework, is a module system
6494and service platform for the Java programming language. This package contains
6495the names for the attributes and directives for a service namespace.")
f809c963 6496 (license license:asl2.0)))
0f0c5218
JL
6497
6498(define-public java-osgi-util-function
6499 (package
6500 (name "java-osgi-util-function")
6501 (version "1.0.0")
6502 (source (origin
6503 (method url-fetch)
6504 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6505 "org.osgi.util.function/"
6506 version "/org.osgi.util.function-"
6507 version "-sources.jar"))
6508 (sha256
6509 (base32
6510 "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x"))))
6511 (build-system ant-build-system)
6512 (arguments
6513 `(#:jar-name "osgi-util-function.jar"
6514 #:tests? #f)); no tests
6515 (inputs
6516 `(("annotation" ,java-osgi-annotation)))
c353d014 6517 (home-page "https://www.osgi.org")
0f0c5218
JL
6518 (synopsis "OSGI Util Function")
6519 (description
6520 "OSGi, for Open Services Gateway initiative framework, is a module system
6521and service platform for the Java programming language. This package contains
6522an interface for a function that accepts a single argument and produces a result.")
6523 (license license:asl2.0)))
27103135
JL
6524
6525(define-public java-osgi-util-promise
6526 (package
6527 (name "java-osgi-util-promise")
6528 (version "1.0.0")
6529 (source (origin
6530 (method url-fetch)
6531 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6532 "org.osgi.util.promise/"
6533 version "/org.osgi.util.promise-"
6534 version "-sources.jar"))
6535 (sha256
6536 (base32
6537 "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c"))))
6538 (build-system ant-build-system)
6539 (arguments
6540 `(#:jar-name "osgi-util-promise.jar"
6541 #:tests? #f)); no tests
6542 (inputs
6543 `(("annotation" ,java-osgi-annotation)
6544 ("function" ,java-osgi-util-function)))
c353d014 6545 (home-page "https://www.osgi.org")
27103135
JL
6546 (synopsis "Promise of a value")
6547 (description
6548 "OSGi, for Open Services Gateway initiative framework, is a module system
6549and service platform for the Java programming language. This package contains
6550an interface and utilitary classes for promises. A Promise represents a future
6551value. It handles the interactions for asynchronous processing.")
6552 (license license:asl2.0)))
2b1fdb2b
JL
6553
6554(define-public java-osgi-service-metatype-annotations
6555 (package
6556 (name "java-osgi-service-metatype-annotations")
6557 (version "1.3.0")
6558 (source (origin
6559 (method url-fetch)
6560 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6561 "org.osgi.service.metatype.annotations/"
6562 version "/org.osgi.service.metatype.annotations-"
6563 version "-sources.jar"))
6564 (sha256
6565 (base32
6566 "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6"))))
6567 (build-system ant-build-system)
6568 (arguments
6569 `(#:jar-name "osgi-service-metatype-annotations.jar"
6570 #:tests? #f)); no tests
6571 (inputs
6572 `(("annotation" ,java-osgi-annotation)))
c353d014 6573 (home-page "https://www.osgi.org")
2b1fdb2b
JL
6574 (synopsis "Support annotations for metatype")
6575 (description
6576 "OSGi, for Open Services Gateway initiative framework, is a module system
6577and service platform for the Java programming language. This package contains
6578the support annotations for metatype.")
6579 (license license:asl2.0)))
a13acfbe
JL
6580
6581(define-public java-osgi-service-repository
6582 (package
6583 (name "java-osgi-service-repository")
6584 (version "1.1.0")
6585 (source (origin
6586 (method url-fetch)
6587 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6588 "org.osgi.service.repository/"
6589 version "/org.osgi.service.repository-"
6590 version "-sources.jar"))
6591 (sha256
6592 (base32
6593 "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n"))))
6594 (build-system ant-build-system)
6595 (arguments
6596 `(#:jar-name "osgi-service-repository.jar"
6597 #:tests? #f)); no tests
6598 (inputs
6599 `(("annotation" ,java-osgi-annotation)
6600 ("promise" ,java-osgi-util-promise)
6601 ("resource" ,java-osgi-resource)))
c353d014 6602 (home-page "https://www.osgi.org")
a13acfbe
JL
6603 (synopsis "OSGI service repository")
6604 (description
6605 "OSGi, for Open Services Gateway initiative framework, is a module system
6606and service platform for the Java programming language. This package contains
6607a repository service that contains resources.")
6608 (license license:asl2.0)))
dfd91541
JL
6609
6610(define-public java-osgi-framework
6611 (package
6612 (name "java-osgi-framework")
6613 (version "1.8.0")
6614 (source (origin
6615 (method url-fetch)
6616 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6617 "org.osgi.framework/" version "/org.osgi.framework-"
6618 version "-sources.jar"))
6619 (sha256
6620 (base32
6621 "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s"))))
6622 (build-system ant-build-system)
6623 (arguments
6624 `(#:jar-name "osgi-framework.jar"
6625 #:tests? #f)); no tests
6626 (inputs
6627 `(("annotation" ,java-osgi-annotation)
6628 ("resource" ,java-osgi-resource)
6629 ("dto" ,java-osgi-dto)))
c353d014 6630 (home-page "https://www.osgi.org")
dfd91541
JL
6631 (synopsis "OSGi framework")
6632 (description
6633 "OSGi, for Open Services Gateway initiative framework, is a module system
6634and service platform for the Java programming language.")
6635 (license license:asl2.0)))
98c9f16c
JL
6636
6637(define-public java-osgi-service-log
6638 (package
6639 (name "java-osgi-service-log")
6640 (version "1.3.0")
6641 (source (origin
6642 (method url-fetch)
6643 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6644 "org.osgi.service.log/"
6645 version "/org.osgi.service.log-"
6646 version "-sources.jar"))
6647 (sha256
6648 (base32
6649 "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0"))))
6650 (build-system ant-build-system)
6651 (arguments
6652 `(#:jar-name "osgi-service-log.jar"
6653 #:tests? #f)); no tests
6654 (inputs
6655 `(("java-osgi-framework" ,java-osgi-framework)))
c353d014 6656 (home-page "https://www.osgi.org")
98c9f16c
JL
6657 (synopsis "Provides methods for bundles to write messages to the log")
6658 (description
6659 "OSGi, for Open Services Gateway initiative framework, is a module system
6660and service platform for the Java programming language. This package contains
6661the log service.")
6662 (license license:asl2.0)))
dd76d44b
JL
6663
6664(define-public java-osgi-service-jdbc
6665 (package
6666 (name "java-osgi-service-jdbc")
6667 (version "1.0.0")
6668 (source (origin
6669 (method url-fetch)
6670 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6671 "org.osgi.service.jdbc/"
6672 version "/org.osgi.service.jdbc-"
6673 version "-sources.jar"))
6674 (sha256
6675 (base32
6676 "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz"))))
6677 (build-system ant-build-system)
6678 (arguments
6679 `(#:jar-name "osgi-service-jdbc.jar"
6680 #:tests? #f)); no tests
c353d014 6681 (home-page "https://www.osgi.org")
dd76d44b
JL
6682 (synopsis "Factory for JDBC connection factories")
6683 (description
6684 "OSGi, for Open Services Gateway initiative framework, is a module system
6685and service platform for the Java programming language. This package contains
6686a factory for JDBC connection factories. There are 3 preferred connection
6687factories for getting JDBC connections:
6688
6689@itemize
6690@item @code{javax.sql.DataSource};
6691@item @code{javax.sql.ConnectionPoolDataSource};
6692@item @code{javax.sql.XADataSource}.
6693@end itemize")
6694 (license license:asl2.0)))
291d3f22
JL
6695
6696(define-public java-osgi-service-resolver
6697 (package
6698 (name "java-osgi-service-resolver")
6699 (version "1.0.1")
6700 (source (origin
6701 (method url-fetch)
6702 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6703 "org.osgi.service.resolver/"
6704 version "/org.osgi.service.resolver-"
6705 version "-sources.jar"))
6706 (sha256
6707 (base32
6708 "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd"))))
6709 (build-system ant-build-system)
6710 (arguments
6711 `(#:jar-name "osgi-service-resolver.jar"
6712 #:tests? #f)); no tests
6713 (inputs
6714 `(("annotation" ,java-osgi-annotation)
6715 ("resource" ,java-osgi-resource)))
c353d014 6716 (home-page "https://www.osgi.org")
291d3f22
JL
6717 (synopsis "OSGI Resolver service")
6718 (description
6719 "OSGi, for Open Services Gateway initiative framework, is a module system
6720and service platform for the Java programming language. This package contains
6721a resolver service that resolves the specified resources in the context supplied
6722by the caller.")
6723 (license license:asl2.0)))
1884bb81
JL
6724
6725(define-public java-osgi-util-tracker
6726 (package
6727 (name "java-osgi-util-tracker")
6728 (version "1.5.1")
6729 (source (origin
6730 (method url-fetch)
6731 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6732 "org.osgi.util.tracker/"
6733 version "/org.osgi.util.tracker-"
6734 version "-sources.jar"))
6735 (sha256
6736 (base32
6737 "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz"))))
6738 (build-system ant-build-system)
6739 (arguments
6740 `(#:jar-name "osgi-util-tracker.jar"
6741 #:tests? #f)); no tests
6742 (inputs
6743 `(("framework" ,java-osgi-framework)
6744 ("annotation" ,java-osgi-annotation)))
c353d014 6745 (home-page "https://www.osgi.org")
1884bb81
JL
6746 (synopsis "Bundle tracking")
6747 (description
6748 "OSGi, for Open Services Gateway initiative framework, is a module system
6749and service platform for the Java programming language. This package contains
6750bundle tracking utility classes.")
6751 (license license:asl2.0)))
fb9c48b8
JL
6752
6753(define-public java-osgi-service-cm
6754 (package
6755 (name "java-osgi-service-cm")
6756 (version "1.5.0")
6757 (source (origin
6758 (method url-fetch)
6759 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6760 "org.osgi.service.cm/"
6761 version "/org.osgi.service.cm-"
6762 version "-sources.jar"))
6763 (sha256
6764 (base32
6765 "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6"))))
6766 (build-system ant-build-system)
6767 (arguments
6768 `(#:jar-name "osgi-service-cm.jar"
6769 #:tests? #f)); no tests
6770 (inputs
6771 `(("framework" ,java-osgi-framework)
6772 ("annotation" ,java-osgi-annotation)))
c353d014 6773 (home-page "https://www.osgi.org")
fb9c48b8
JL
6774 (synopsis "OSGI Configuration Management")
6775 (description
6776 "OSGi, for Open Services Gateway initiative framework, is a module system
6777and service platform for the Java programming language. This package contains
6778utility classes for the configuration of services.")
6779 (license license:asl2.0)))
500aac75
JL
6780
6781(define-public java-osgi-service-packageadmin
6782 (package
6783 (name "java-osgi-service-packageadmin")
6784 (version "1.2.0")
6785 (source (origin
6786 (method url-fetch)
6787 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6788 "org.osgi.service.packageadmin/"
6789 version "/org.osgi.service.packageadmin-"
6790 version "-sources.jar"))
6791 (sha256
6792 (base32
6793 "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52"))))
6794 (build-system ant-build-system)
6795 (arguments
6796 `(#:jar-name "osgi-service-packageadmin.jar"
6797 #:tests? #f)); no tests
6798 (inputs
6799 `(("framework" ,java-osgi-framework)))
c353d014 6800 (home-page "https://www.osgi.org")
500aac75
JL
6801 (synopsis "OSGI Package Administration")
6802 (description
6803 "OSGi, for Open Services Gateway initiative framework, is a module system
6804and service platform for the Java programming language. This package contains
6805the packageadmin service.")
6806 (license license:asl2.0)))
77a4f1ae
JL
6807
6808(define-public java-ops4j-base-lang
6809 (package
6810 (name "java-ops4j-base-lang")
6811 (version "1.5.0")
6812 (source (origin
6813 (method url-fetch)
6814 (uri (string-append "https://github.com/ops4j/org.ops4j.base/"
6815 "archive/base-" version ".tar.gz"))
6816 (sha256
6817 (base32
6818 "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw"))))
6819 (build-system ant-build-system)
6820 (arguments
6821 `(#:jar-name "java-ops4j-base-lang.jar"
6822 #:source-dir "ops4j-base-lang/src/main/java"
6823 #:tests? #f; no tests
6824 #:phases
6825 (modify-phases %standard-phases
6826 (add-before 'build 'add-test-file
6827 (lambda _
6828 ;; That file is required by a test in ops4j-pax-exam-core-spi
6829 (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang")
6830 (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties"
6831 (lambda _
6832 (display
6833 (string-append
6834 "version=" ,version "\n"
6835 "groupId=org.ops4j.base"
6836 "artifactId=ops4j-base-lang\n")))))))))
6837 (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview")
6838 (synopsis "Utility classes and extensions to be used in OPS4J projects")
6839 (description "OPS4J stands for Open Participation Software for Java. This
6840package contains utilities and extensions related to @code{java.lang}.")
6841 (license license:asl2.0)))
b2353495
JL
6842
6843(define-public java-ops4j-base-monitors
6844 (package
6845 (inherit java-ops4j-base-lang)
6846 (name "java-ops4j-base-monitors")
6847 (arguments
6848 `(#:jar-name "java-ops4j-base-monitors.jar"
6849 #:source-dir "ops4j-base-monitors/src/main/java"
6850 #:tests? #f)); no tests
6851 (inputs
6852 `(("lang" ,java-ops4j-base-lang)))
6853 (description "OPS4J stands for Open Participation Software for Java. This
6854package contains utilities and extensions related to monitoring.")))
322d349a
JL
6855
6856(define-public java-ops4j-base-io
6857 (package
6858 (inherit java-ops4j-base-lang)
6859 (name "java-ops4j-base-io")
6860 (arguments
6861 `(#:jar-name "java-ops4j-base-io.jar"
6862 #:source-dir "ops4j-base-io/src/main/java"
6863 #:test-dir "ops4j-base-io/src/test"
6864 #:test-exclude
6865 (list "**/ListerTest.java")))
6866 (inputs
6867 `(("lang" ,java-ops4j-base-monitors)
6868 ("lang" ,java-ops4j-base-lang)))
6869 (native-inputs
6870 `(("junit" ,java-junit)
6871 ("hamcrest" ,java-hamcrest-core)))
6872 (description "OPS4J stands for Open Participation Software for Java. This
6873package contains utilities and extensions related to handling streams and files.")))
559919c1
JL
6874
6875(define-public java-ops4j-base-util
6876 (package
6877 (inherit java-ops4j-base-lang)
6878 (name "java-ops4j-base-util")
6879 (arguments
6880 `(#:jar-name "java-ops4j-base-util.jar"
6881 #:source-dir "ops4j-base-util/src/main/java"
6882 #:test-dir "ops4j-base-util/src/test"))
6883 (inputs
6884 `(("lang" ,java-ops4j-base-lang)))
6885 (native-inputs
6886 `(("junit" ,java-junit)))
6887 (description "OPS4J stands for Open Participation Software for Java. This
6888package contains utilities and extensions related to environment, i18n and
6889mime types.")))
60dcec7a
JL
6890
6891(define-public java-ops4j-base-util-property
6892 (package
6893 (inherit java-ops4j-base-lang)
6894 (name "java-ops4j-base-util-property")
6895 (arguments
6896 `(#:jar-name "java-ops4j-base-util-property.jar"
6897 #:source-dir "ops4j-base-util-property/src/main/java"
6898 #:tests? #f)); no tests
6899 (inputs
6900 `(("lang" ,java-ops4j-base-lang)
6901 ("util" ,java-ops4j-base-util)))
6902 (description "OPS4J stands for Open Participation Software for Java. This
6903package contains utilities and extensions related to resolving properties from
6904different sources.")))
0edf8cf0
JL
6905
6906(define-public java-ops4j-base-store
6907 (package
6908 (inherit java-ops4j-base-lang)
6909 (name "java-ops4j-base-store")
6910 (arguments
6911 `(#:jar-name "java-ops4j-base-store.jar"
6912 #:source-dir "ops4j-base-store/src/main/java"
6913 #:tests? #f)); no tests
6914 (inputs
6915 `(("lang" ,java-ops4j-base-lang)
6916 ("slf4j" ,java-slf4j-api)
6917 ("io" ,java-ops4j-base-io)))
6918 (description "OPS4J stands for Open Participation Software for Java. This
6919package contains utilities for storing and retrieving data from an
6920@code{InputStream}.")))
214fcd8a
JL
6921
6922(define-public java-ops4j-base-spi
6923 (package
6924 (inherit java-ops4j-base-lang)
6925 (name "java-ops4j-base-spi")
6926 (arguments
6927 `(#:jar-name "java-ops4j-base-spi.jar"
6928 #:source-dir "ops4j-base-spi/src/main/java"
6929 #:test-dir "ops4j-base-spi/src/test"))
6930 (native-inputs
6931 `(("junit" ,java-junit)
6932 ("hamcrest" ,java-hamcrest-core)))
6933 (description "OPS4J stands for Open Participation Software for Java. This
6934package contains utilities for obtaining services via the Java SE 6
6935@code{ServiceLoader}.")))
e1edf42e
JL
6936
6937(define-public java-aqute-bnd-annotation
6938 (package
6939 (name "java-aqute-bnd-annotation")
2cac8891 6940 (version "3.5.0")
e1edf42e
JL
6941 (source (origin
6942 (method url-fetch)
6943 (uri (string-append "https://github.com/bndtools/bnd/archive/"
6944 version ".REL.tar.gz"))
6945 (file-name (string-append name "-" version ".tar.gz"))
6946 (sha256
6947 (base32
2cac8891 6948 "1ggyiq0as0f6cz333a0dh98j72kmvv5pf2s47v9554yh905lfqdl"))))
e1edf42e
JL
6949 (build-system ant-build-system)
6950 (arguments
6951 `(#:jar-name "java-aqute-bnd-annotation.jar"
6952 #:source-dir "biz.aQute.bnd.annotation/src"
6953 #:tests? #f)); empty test dir
6954 (home-page "http://bnd.bndtools.org/")
6955 (synopsis "Tools for OSGi")
6956 (description "Bnd is a swiss army knife for OSGi, it creates manifest
6957headers based on analyzing the class code, it verifies the project settings,
6958it manages project dependencies, gives diffs jars, and much more.")
6959 (license license:asl2.0)))
60ba2978
JL
6960
6961(define-public java-aqute-libg
6962 (package
6963 (inherit java-aqute-bnd-annotation)
6964 (name "java-aqute-libg")
6965 (arguments
6966 `(#:jar-name "java-aqute-libg.jar"
6967 #:source-dir "aQute.libg/src"
6968 #:tests? #f)); FIXME: tests are in "aQute.libg/test", not in a java directory
6969 (inputs
6970 `(("slf4j" ,java-slf4j-api)
6971 ("osgi-annot" ,java-osgi-annotation)
6972 ("java-osgi-cmpn" ,java-osgi-cmpn)
6973 ("osgi" ,java-osgi-core)))))
5f26a131 6974
288a5959
GB
6975(define java-aqute-libg-bootstrap
6976 (package
6977 (inherit java-aqute-libg)
6978 (name "java-aqute-libg-bootstrap")
6979 (inputs
6980 `(("slf4j-bootstrap" ,java-slf4j-api-bootstrap)
6981 ,@(delete `("slf4j" ,java-slf4j-api)
6982 (package-inputs java-aqute-libg))))))
6983
5f26a131
JL
6984(define-public java-aqute-bndlib
6985 (package
6986 (inherit java-aqute-bnd-annotation)
6987 (name "java-aqute-bndlib")
6988 (arguments
6989 `(#:jar-name "java-bndlib.jar"
6990 #:source-dir "biz.aQute.bndlib/src"
6991 #:tests? #f)); no tests
6992 (inputs
6993 `(("slf4j" ,java-slf4j-api)
6994 ("osgi-annot" ,java-osgi-annotation)
6995 ("java-aqute-libg" ,java-aqute-libg)
6996 ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation)
6997 ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations)
6998 ("java-osgi-service-repository" ,java-osgi-service-repository)
6999 ("java-osgi-service-log" ,java-osgi-service-log)
7000 ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations)
7001 ("java-osgi-namespace-contract" ,java-osgi-namespace-contract)
7002 ("java-osgi-namespace-extender" ,java-osgi-namespace-extender)
7003 ("java-osgi-namespace-service" ,java-osgi-namespace-service)
7004 ("promise" ,java-osgi-util-promise)
7005 ("osgi" ,java-osgi-core)))))
25aef81d 7006
869803aa
GB
7007(define java-aqute-bndlib-bootstrap
7008 (package
7009 (inherit java-aqute-bndlib)
7010 (name "java-aqute-bndlib-bootstrap")
7011 (inputs
7012 `(("slf4j-bootstrap" ,java-slf4j-api-bootstrap)
7013 ("java-aqute-libg-bootstrap" ,java-aqute-libg-bootstrap)
7014 ,@(delete `("slf4j" ,java-slf4j-api)
7015 (delete `("java-aqute-libg" ,java-aqute-libg)
7016 (package-inputs java-aqute-bndlib)))))))
7017
25aef81d
JL
7018(define-public java-ops4j-pax-tinybundles
7019 (package
7020 (name "java-ops4j-pax-tinybundles")
7021 (version "2.1.1")
7022 (source (origin
7023 (method url-fetch)
7024 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/"
7025 "archive/tinybundles-" version ".tar.gz"))
7026 (sha256
7027 (base32
7028 "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871"))))
7029 (arguments
7030 `(#:jar-name "java-ops4j-pax-tinybundles.jar"
7031 #:source-dir "src/main/java"
7032 #:test-exclude
7033 ;; Abstract base classes for other tests
7034 (list "**/BndTest.java" "**/CoreTest.java")
7035 #:phases
7036 (modify-phases %standard-phases
7037 (add-before 'check 'fix-version
7038 (lambda _
7039 ;; This test has a reference to an old version of bndlib we are not
7040 ;; packaging. It uses the version referenced in pom.xml. We replace
7041 ;; it with our own version.
7042 (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
0f277802
GB
7043 (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*")
7044 ,(package-version java-aqute-bndlib))))))))
25aef81d
JL
7045 (inputs
7046 `(("lang" ,java-ops4j-base-lang)
7047 ("io" ,java-ops4j-base-io)
7048 ("store" ,java-ops4j-base-store)
7049 ("slf4j" ,java-slf4j-api)
7050 ("libg" ,java-aqute-libg)
7051 ("bndlib" ,java-aqute-bndlib)))
7052 (native-inputs
7053 `(("junit" ,java-junit)
7054 ("hamcrest" ,java-hamcrest-core)
7055 ("log4j" ,java-log4j-api)
7056 ("bndannotation" ,java-aqute-bnd-annotation)
7057 ("framework" ,java-osgi-framework)))
7058 (build-system ant-build-system)
7059 (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles")
7060 (synopsis "Java APIs to create OSGi related artifacts")
7061 (description "Tinybundles is all about creating OSGi related artifacts like
7062Bundles, Fragments and Deployment Packages with Java Api. It is very convinient
7063to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the
7064other hand, this library can be a foundation of real end user tools that need
7065to create those artifacts.")
7066 (license license:asl2.0)))
e179add0
JL
7067
7068(define-public java-ops4j-pax-exam-core
7069 (package
7070 (name "java-ops4j-pax-exam-core")
7071 (version "4.11.0")
7072 (source (origin
7073 (method url-fetch)
7074 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/"
7075 "archive/exam-reactor-" version ".tar.gz"))
7076 (sha256
7077 (base32
7078 "08mzw8nkah3rj3vznlplnawspxhp61zgvb44ifqa1rni1cvbms2g"))))
7079 (arguments
7080 `(#:jar-name "java-ops4j-pax-exam-core.jar"
7081 #:source-dir "core/pax-exam/src/main/java"
7082 #:test-dir "core/pax-exam/src/test"))
7083 (inputs
7084 `(("slf4j" ,java-slf4j-api)
7085 ("lang" ,java-ops4j-base-lang)
7086 ("io" ,java-ops4j-base-io)
7087 ("util-property" ,java-ops4j-base-util-property)
7088 ("util-store" ,java-ops4j-base-store)
7089 ("java-osgi-core" ,java-osgi-core)))
7090 (native-inputs
7091 `(("junit" ,java-junit)
7092 ("hamcrest" ,java-hamcrest-core)))
7093 (build-system ant-build-system)
7094 (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview")
7095 (synopsis "In-Container Testing for OSGi, Java EE and CDI")
7096 (description "Pax Exam creates OSGi bundles for testing purposes. It lets
7097the user take control of the OSGi framework, the test framework (e.g. JUnit) and
7098the system under test at the same time.")
7099 (license license:asl2.0)))
7a7c2b75
JL
7100
7101(define-public java-ops4j-pax-exam-core-spi
7102 (package
7103 (inherit java-ops4j-pax-exam-core)
7104 (name "java-ops4j-pax-exam-core-spi")
7105 (arguments
7106 `(#:jar-name "java-ops4j-pax-exam-spi.jar"
7107 #:source-dir "src/main/java"
7108 #:test-exclude
7109 (list
7110 ;; Abstract base class, not a test
7111 "**/BaseStagedReactorTest.java"
7112 ;; Depends on org.mortbay.jetty.testwars:test-war-dump
7113 "**/WarBuilderTest.java")
7114 #:phases
7115 (modify-phases %standard-phases
7116 (add-before 'configure 'chdir
7117 (lambda _
7118 ;; Tests assume we are in this directory
7119 (chdir "core/pax-exam-spi")))
7120 (add-before 'check 'fix-tests
7121 (lambda _
7122 ;; One test checks that this file is present.
7123 (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi")
7124 (with-output-to-file
7125 "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties"
7126 (lambda _
7127 (display
7128 (string-append "artifactId = pax-exam-spi\n"
7129 "version = " ,(package-version java-ops4j-pax-exam-core-spi)))))
7130 ;; Maven puts compilation results in the target directory, while we
7131 ;; put them in the build directory.
7132 (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java"
7133 "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java"
7134 "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java")
7135 (("target") "build"))
7136 ;; One test is expected to fail, but it doesn't throw the expected exception
7137 (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java"
7138 (("AssertionError") "IllegalArgumentException")))))))
7139 (inputs
7140 `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core)
7141 ("lang" ,java-ops4j-base-lang)
7142 ("monitors" ,java-ops4j-base-monitors)
7143 ("store" ,java-ops4j-base-store)
7144 ("io" ,java-ops4j-base-io)
7145 ("spi" ,java-ops4j-base-spi)
7146 ("osgi" ,java-osgi-core)
7147 ("slf4j" ,java-slf4j-api)
7148 ("tinybundles" ,java-ops4j-pax-tinybundles)))
7149 (native-inputs
7150 `(("mockito" ,java-mockito-1)
7151 ("junit" ,java-junit)
7152 ("hamcrest" ,java-hamcrest-core)
7153 ("cglib" ,java-cglib)
7154 ("objenesis" ,java-objenesis)
7155 ("asm" ,java-asm)))))
4496d77f
JL
7156
7157(define-public java-ops4j-pax-exam-core-junit
7158 (package
7159 (inherit java-ops4j-pax-exam-core)
7160 (name "java-ops4j-pax-exam-core-junit")
7161 (arguments
7162 `(#:jar-name "ops4j-pax-exam-core-junit.jar"
7163 #:source-dir "drivers/pax-exam-junit4/src/main/java"
7164 #:tests? #f)); no tests
7165 (inputs
7166 `(("junit" ,java-junit)
7167 ("slf4j" ,java-slf4j-api)
7168 ("core" ,java-ops4j-pax-exam-core)
7169 ("spi" ,java-ops4j-pax-exam-core-spi)))
7170 (native-inputs '())))
cb05f60d
JL
7171
7172(define-public java-fasterxml-jackson-annotations
7173 (package
7174 (name "java-fasterxml-jackson-annotations")
93dceea4 7175 (version "2.9.4")
cb05f60d
JL
7176 (source (origin
7177 (method url-fetch)
7178 (uri (string-append "https://github.com/FasterXML/"
7179 "jackson-annotations/archive/"
7180 "jackson-annotations-" version ".tar.gz"))
7181 (sha256
7182 (base32
93dceea4 7183 "0mr95xd0da6a4g95zvrl1ryk5n5zv2rc696w3xnsr5hxk2gicfc4"))))
cb05f60d
JL
7184 (build-system ant-build-system)
7185 (arguments
7186 `(#:jar-name "jackson-annotations.jar"
7187 #:source-dir "src/main/java"
7188 #:test-dir "src/test"))
7189 (native-inputs
7190 `(("junit" ,java-junit)))
7191 (home-page "https://github.com/FasterXML/jackson-annotations")
7192 (synopsis "General purpose annotations for the Jackson Data Processor")
7193 (description "This package contains general purpose annotations for the
7194Jackson Data Processor, used on value and handler types. The only annotations
7195not included are ones that require dependency to the Databind package.")
7196 (license license:asl2.0)))
0b5481df
JL
7197
7198(define-public java-fasterxml-jackson-core
7199 (package
7200 (name "java-fasterxml-jackson-core")
38a0fc38 7201 (version "2.9.4")
0b5481df
JL
7202 (source (origin
7203 (method url-fetch)
7204 (uri (string-append "https://github.com/FasterXML/"
7205 "jackson-core/archive/"
7206 "jackson-core-" version ".tar.gz"))
7207 (sha256
7208 (base32
38a0fc38 7209 "159hsnk17jr1gyzkf01cxvsn45srnk37g949r7364qlsr527gjgd"))))
0b5481df
JL
7210 (build-system ant-build-system)
7211 (arguments
7212 `(#:jar-name "jackson-core.jar"
7213 #:source-dir "src/main/java"
7214 #:test-dir "src/test"
7215 #:test-exclude
7216 (list
7217 ;; Expected failure. pom.xml excludes these
7218 "**/failing/**"
7219 ;; Base classes that have no constructor for junit
7220 "**/BaseTest.java"
7221 "**/ConcurrencyReadTest.java"
7222 "**/ManualCharAccessTest.java"
7223 "**/ManualCharAccessTest.java"
7224 "**/TrailingCommasTest.java"
7225 "**/AsyncMissingValuesInObjectTest.java"
7226 "**/AsyncMissingValuesInArrayTest.java")
7227 #:phases
7228 (modify-phases %standard-phases
7229 (add-before 'configure 'generate-PackageVersion.java
7230 (lambda _
7231 (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java")
7232 (in (string-append out ".in")))
7233 (copy-file in out)
7234 (substitute* out
7235 (("@package@") "com.fasterxml.jackson.core.json")
7236 (("@projectversion@") ,version)
7237 (("@projectgroupid@") "com.fasterxml.jackson.core")
7238 (("@projectartifactid@") "jackson-core")))))
7239 (add-before 'build 'copy-resources
7240 (lambda _
7241 (copy-recursively "src/main/resources"
7242 "build/classes")))
7243 (add-before 'check 'copy-test-resources
7244 (lambda _
7245 (copy-recursively "src/test/resources"
7246 "build/test-classes"))))))
7247 (native-inputs
7248 `(("junit" ,java-junit)
7249 ("hamcrest" ,java-hamcrest-core)))
7250 (home-page "https://github.com/FasterXML/jackson-core")
7251 (synopsis "")
7252 (description "")
7253 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
f234c7a0
JL
7254
7255(define-public java-fasterxml-jackson-databind
7256 (package
7257 (name "java-fasterxml-jackson-databind")
3c1edff5 7258 (version "2.9.4")
f234c7a0
JL
7259 (source (origin
7260 (method url-fetch)
7261 (uri (string-append "https://github.com/FasterXML/"
7262 "jackson-databind/archive/"
7263 "jackson-databind-" version ".tar.gz"))
7264 (sha256
7265 (base32
3c1edff5 7266 "1zd2cw4z6kdkbx8za96xh9pyicv2a2l7y0rkcx2fqd8hv6d47s08"))))
f234c7a0
JL
7267 (build-system ant-build-system)
7268 (arguments
7269 `(#:jar-name "jackson-databind.jar"
7270 #:source-dir "src/main/java"
7271 #:tests? #f; requires javax.measures for which I can't find a free implementation
7272 #:phases
7273 (modify-phases %standard-phases
7274 (add-before 'configure 'generate-PackageVersion.java
7275 (lambda _
7276 (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java")
7277 (in (string-append out ".in")))
7278 (copy-file in out)
7279 (substitute* out
7280 (("@package@") "com.fasterxml.jackson.databind.cfg")
7281 (("@projectversion@") ,version)
7282 (("@projectgroupid@") "com.fasterxml.jackson.databind")
7283 (("@projectartifactid@") "jackson-databind")))))
7284 (add-before 'build 'copy-resources
7285 (lambda _
7286 (copy-recursively "src/main/resources" "build/classes"))))))
7287 (inputs
7288 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7289 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)))
7290 (home-page "https://github.com/FasterXML/jackson-databind")
7291 (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor")
7292 (description "This package contains the general-purpose data-binding
7293functionality and tree-model for Jackson Data Processor. It builds on core
7294streaming parser/generator package, and uses Jackson Annotations for
7295configuration.")
7296 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
d57d8b89
JL
7297
7298(define-public java-fasterxml-jackson-modules-base-jaxb
7299 (package
7300 (name "java-fasterxml-jackson-modules-base-jaxb")
07207211 7301 (version "2.9.4")
d57d8b89
JL
7302 (source (origin
7303 (method url-fetch)
7304 (uri (string-append "https://github.com/FasterXML/"
7305 "jackson-modules-base/archive/"
7306 "jackson-modules-base-" version ".tar.gz"))
7307 (sha256
7308 (base32
07207211 7309 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
d57d8b89
JL
7310 (build-system ant-build-system)
7311 (arguments
7312 `(#:jar-name "jackson-modules-base-jaxb.jar"
7313 #:source-dir "jaxb/src/main/java"
7314 #:test-dir "jaxb/src/test"
7315 #:test-exclude
7316 ;; Base class for tests
7317 (list "**/BaseJaxbTest.java")
7318 #:phases
7319 (modify-phases %standard-phases
7320 (add-before 'configure 'generate-PackageVersion.java
7321 (lambda _
7322 (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/"
7323 "jackson/module/jaxb/PackageVersion.java"))
7324 (in (string-append out ".in")))
7325 (copy-file in out)
7326 (substitute* out
7327 (("@package@") "com.fasterxml.jackson.module.jaxb")
7328 (("@projectversion@") ,version)
7329 (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb")
7330 (("@projectartifactid@") "jackson-module-jaxb")))))
7331 (add-before 'build 'copy-resources
7332 (lambda _
7333 (copy-recursively "jaxb/src/main/resources" "build/classes"))))))
7334 (inputs
7335 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7336 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
7337 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
7338 (native-inputs
7339 `(("java-junit" ,java-junit)))
7340 (home-page "https://github.com/FasterXML/jackson-modules-base")
7341 (synopsis "Jaxb annotations jackson module")
7342 (description "This package is the jaxb annotations module for jackson.")
7343 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
0f296d37
JL
7344
7345(define-public java-snakeyaml
7346 (package
7347 (name "java-snakeyaml")
7348 (version "1.18")
7349 (source (origin
7350 (method url-fetch)
7351 (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
7352 version ".tar.gz"))
307856cd 7353 (file-name (string-append name "-" version ".tar.gz"))
0f296d37
JL
7354 (sha256
7355 (base32
7356 "0rf5ha6w0waz50jz2479jsrbgmd0dnx0gs337m126j5z7zlmg7mg"))))
7357 (build-system ant-build-system)
7358 (arguments
7359 `(#:jar-name "java-snakeyaml.jar"
7360 #:source-dir "src/main/java"
7361 ;; Tests require velocity, a cyclic dependency, and
7362 ;; java-spring-framework-context which is not packaged.
7363 #:tests? #f))
7364 (home-page "https://bitbucket.org/asomov/snakeyaml")
7365 (synopsis "YAML processor")
7366 (description "SnakeYAML is a YAML processor for the Java Virtual Machine.")
7367 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
087c8fd2
JL
7368
7369(define-public java-fasterxml-jackson-dataformat-yaml
7370 (package
7371 (name "java-fasterxml-jackson-dataformat-yaml")
1f2be88f 7372 (version "2.9.4")
087c8fd2
JL
7373 (source (origin
7374 (method url-fetch)
7375 (uri (string-append "https://github.com/FasterXML/"
7376 "jackson-dataformats-text/archive/"
7377 "jackson-dataformats-text-" version ".tar.gz"))
7378 (sha256
7379 (base32
1f2be88f 7380 "1hikl06khaxbg439avf442qifcadap8w0lx13f0nnhp2vh3dkbz7"))))
087c8fd2
JL
7381 (build-system ant-build-system)
7382 (arguments
7383 `(#:jar-name "jackson-dataformat-yaml.jar"
7384 #:source-dir "yaml/src/main/java"
7385 #:test-dir "yaml/src/test"
7386 #:test-exclude (list "**/failing/**.java")
7387 #:phases
7388 (modify-phases %standard-phases
7389 (add-before 'configure 'generate-PackageVersion.java
7390 (lambda _
7391 (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java")
7392 (in (string-append out ".in")))
7393 (copy-file in out)
7394 (substitute* out
7395 (("@package@") "com.fasterxml.jackson.dataformat.yaml")
7396 (("@projectversion@") ,version)
7397 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml")
7398 (("@projectartifactid@") "jackson-dataformat-yaml"))))))))
7399 (inputs
7400 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7401 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
7402 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
7403 ("java-snakeyaml" ,java-snakeyaml)))
7404 (native-inputs
7405 `(("junit" ,java-junit)
7406 ("hamcrest" ,java-hamcrest-core)
7407 ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi)
7408 ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit)
7409 ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core)))
7410 (home-page "https://github.com/FasterXML/jackson-dataformats-text")
7411 (synopsis "Yaml backend for Jackson")
7412 (description "Dataformat backends are used to support format alternatives
7413to JSON, supported by default. This is done by sub-classing Jackson core
7414abstractions.")
7415 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
6fd07b98
JL
7416
7417(define-public java-stax2-api
7418 (package
7419 (name "java-stax2-api")
7420 (version "4.0.0")
7421 (source (origin
7422 (method url-fetch)
7423 (uri (string-append "https://github.com/FasterXML/stax2-api/archive/"
7424 "stax2-api-" version ".tar.gz"))
7425 (sha256
7426 (base32
7427 "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq"))))
7428 (build-system ant-build-system)
7429 (arguments
7430 `(#:jar-name "java-stax2-api.jar"
7431 #:source-dir "src/main/java"
7432 #:tests? #f)); no tests
7433 (home-page "https://github.com/FasterXML/stax2-api")
7434 (synopsis "Stax2 API")
7435 (description "Stax2 API is an extension to basic Stax 1.0 API that adds
7436significant new functionalities, such as full-featured bi-direction validation
7437interface and high-performance Typed Access API.")
7438 (license license:bsd-2)))
40f193f3
JL
7439
7440(define-public java-woodstox-core
7441 (package
7442 (name "java-woodstox-core")
7443 (version "5.0.3")
7444 (source (origin
7445 (method url-fetch)
7446 (uri (string-append "https://github.com/FasterXML/woodstox/archive/"
7447 "woodstox-core-" version ".tar.gz"))
7448 (sha256
7449 (base32
7450 "1i7pdgb8jbw6gdy5kmm0l6rz109n2ns92pqalpyp24vb8vlvdfd4"))))
7451 (build-system ant-build-system)
7452 (arguments
7453 `(#:jar-name "woodstox.jar"
7454 #:test-exclude
7455 (list "**/Base*.java" "failing/**")
7456 #:phases
7457 (modify-phases %standard-phases
7458 (add-before 'build 'remove-msv-dep
7459 (lambda _
7460 ;; we don't need osgi, and it depends on msv
7461 (delete-file-recursively "src/main/java/com/ctc/wstx/osgi")
7462 ;; msv's latest release is from 2011 and we don't need it
7463 (delete-file-recursively "src/main/java/com/ctc/wstx/msv")
7464 (delete-file-recursively "src/test/java/wstxtest/osgi")
7465 (delete-file-recursively "src/test/java/wstxtest/msv")))
7466 (add-before 'build 'copy-resources
7467 (lambda _
7468 (copy-recursively "src/main/resources" "build/classes"))))))
7469 (inputs
7470 `(("stax2" ,java-stax2-api)))
7471 (native-inputs
7472 `(("junit" ,java-junit)))
7473 (home-page "https://github.com/FasterXML/woodstox")
7474 (synopsis "Stax XML API implementation")
7475 (description "Woodstox is a stax XML API implementation.")
7476 (license license:asl2.0)))
262a4d33
JL
7477
7478(define-public java-fasterxml-jackson-dataformat-xml
7479 (package
7480 (name "java-fasterxml-jackson-dataformat-xml")
f3bbe029 7481 (version "2.9.4")
262a4d33
JL
7482 (source (origin
7483 (method url-fetch)
7484 (uri (string-append "https://github.com/FasterXML/"
7485 "jackson-dataformat-xml/archive/"
7486 "jackson-dataformat-xml-" version ".tar.gz"))
7487 (sha256
7488 (base32
f3bbe029 7489 "111fkkl90w31jbf30kgj82qdcxlw4sxppki7i198liw0ck1jcavq"))))
262a4d33
JL
7490 (build-system ant-build-system)
7491 (arguments
7492 `(#:jar-name "jackson-dataformat-xml.jar"
7493 #:source-dir "src/main/java"
7494 #:test-exclude
7495 (list "**/failing/**")
7496 #:phases
7497 (modify-phases %standard-phases
7498 (add-before 'configure 'generate-PackageVersion.java
7499 (lambda _
7500 (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java")
7501 (in (string-append out ".in")))
7502 (copy-file in out)
7503 (newline)
7504 (substitute* out
7505 (("@package@") "com.fasterxml.jackson.dataformat.xml")
7506 (("@projectversion@") ,version)
7507 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml")
7508 (("@projectartifactid@") "jackson-dataformat-xml")))))
7509 (add-before 'build 'copy-resources
7510 (lambda _
7511 (copy-recursively "src/main/resources" "build/classes"))))))
7512 (inputs
7513 `(("jackson-annotations" ,java-fasterxml-jackson-annotations)
7514 ("jackson-core" ,java-fasterxml-jackson-core)
7515 ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb)
7516 ("jackson-databind" ,java-fasterxml-jackson-databind)
7517 ("stax2-api" ,java-stax2-api)
7518 ("woodstox" ,java-woodstox-core)))
7519 (native-inputs
7520 `(("junit" ,java-junit)
7521 ("hamcrest" ,java-hamcrest-core)))
7522 (home-page "https://github.com/FasterXML/jackson-dataformat-xml")
7523 (synopsis "Read and write XML")
7524 (description "This package contains Jackson extension component for reading
7525and writing XML encoded data.
7526
7527Further, the goal is to emulate how JAXB data-binding works with \"Code-first\"
7528approach (that is, no support is added for \"Schema-first\" approach). Support
7529for JAXB annotations is provided by JAXB annotation module; this module
7530provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator},
7531@code{JsonFactory}) as well as small number of higher level overrides needed to
7532make data-binding work.")
7533 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
90a127c7
JL
7534
7535(define-public java-hdrhistogram
7536 (package
7537 (name "java-hdrhistogram")
7538 (version "2.1.9")
7539 (source (origin
7540 (method url-fetch)
7541 (uri (string-append "https://github.com/HdrHistogram/HdrHistogram/"
7542 "archive/HdrHistogram-" version ".tar.gz"))
7543 (sha256
7544 (base32
7545 "1sicbmc3sr42nw93qbkb26q9rn33ag33k6k77phjc3j5h5gjffqv"))))
7546 (build-system ant-build-system)
7547 (arguments
7548 `(#:jar-name "java-hdrhistogram.jar"
7549 #:source-dir "src/main/java"
7550 #:phases
7551 (modify-phases %standard-phases
7552 (add-before 'configure 'set-version
7553 (lambda _
7554 (let* ((version-java "src/main/java/org/HdrHistogram/Version.java")
7555 (template (string-append version-java ".template")))
7556 (copy-file template version-java)
7557 (substitute* version-java
7558 (("\\$VERSION\\$") ,version)
7559 (("\\$BUILD_TIME\\$") "0"))
7560 #t))))))
7561 (native-inputs
7562 `(("junit" ,java-junit)
7563 ("hamcrest" ,java-hamcrest-core)))
7564 (home-page "https://hdrhistogram.github.io/HdrHistogram")
7565 (synopsis "High dynamic range histogram")
7566 (description "Hdrhistogram allows to create histograms that support
7567recording and analyzing sampled data value counts across a configurable integer
7568value range with configurable value precision within the range. Value precision
7569is expressed as the number of significant digits in the value recording, and
7570provides control over value quantization behavior across the value range and
7571the subsequent value resolution at any given level.")
7572 (license license:public-domain)))
5d104a27 7573
c5ff11dc
RW
7574(define-public java-cofoja
7575 (package
7576 (name "java-cofoja")
7577 (version "1.3")
7578 (source (origin
7579 (method git-fetch)
7580 (uri (git-reference
7581 (url "https://github.com/nhatminhle/cofoja.git")
7582 (commit (string-append "v" version))))
7583 (file-name (string-append "java-cofoja-" version "-checkout"))
7584 (sha256
7585 (base32
7586 "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w"))))
7587 (build-system ant-build-system)
7588 (arguments
7589 `(#:build-target "dist"
7590 #:test-target "test"
7591 #:jdk ,icedtea-8
7592 #:make-flags
7593 (list "-Ddist.dir=dist")
7594 #:modules ((guix build ant-build-system)
7595 (guix build java-utils)
7596 (guix build utils)
7597 (srfi srfi-1)
7598 (ice-9 match))
7599 #:phases
7600 (modify-phases %standard-phases
7601 ;; The bulid system ignores the class path the ant-build-system sets
7602 ;; up and instead expects to find all dependencies in the "lib"
7603 ;; directory.
7604 (add-after 'unpack 'create-libdir
7605 (lambda* (#:key inputs #:allow-other-keys)
7606 (mkdir-p "lib")
7607 (for-each
7608 (lambda (file)
7609 (let ((target (string-append "lib/" (basename file))))
7610 (unless (file-exists? target)
7611 (symlink file target))))
7612 (append-map (match-lambda
7613 ((label . dir)
7614 (find-files dir "\\.jar$")))
7615 inputs))
7616 #t))
7617 (replace 'install (install-jars "dist")))))
7618 (inputs
7619 `(("java-asm" ,java-asm)))
7620 (native-inputs
7621 `(("java-junit" ,java-junit)))
7622 (home-page "https://github.com/nhatminhle/cofoja")
7623 (synopsis "Contracts for Java")
7624 (description "Contracts for Java, or Cofoja for short, is a contract
7625programming framework and test tool for Java, which uses annotation processing
7626and bytecode instrumentation to provide run-time checking. (In particular,
7627this is not a static analysis tool.)")
7628 (license license:lgpl3+)))
7629
5d104a27
JL
7630(define-public java-aopalliance
7631 (package
7632 (name "java-aopalliance")
7633 (version "1.0")
7634 (source (origin
7635 (method git-fetch)
7636 ;; Note: this git repository is not official, but contains the
7637 ;; source code that is in the CVS repository. Downloading the
7638 ;; tarball from sourceforge is undeterministic, and the cvs download
7639 ;; fails.
7640 (uri (git-reference
7641 (url "https://github.com/hoverruan/aopalliance")
7642 (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0")))
7643 (file-name (string-append name "-" version))
7644 (sha256
7645 (base32
7646 "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr"))))
7647 (build-system ant-build-system)
7648 (arguments
7649 `(#:jar-name "java-aopalliance.jar"
7650 #:jdk ,icedtea-8
7651 #:tests? #f; no tests
7652 #:source-dir "aopalliance/src/main"))
7653 (home-page "http://aopalliance.sourceforge.net")
7654 (synopsis "Aspect-Oriented Programming")
7655 (description "The AOP Alliance project is a joint project between several
7656software engineering people who are interested in Aspect-Oriented Programming
7657(AOP) and Java.")
7658 (license license:public-domain)))
454536e0
JL
7659
7660(define-public java-javax-inject
7661 (package
7662 (name "java-javax-inject")
7663 (version "tck-1")
7664 (source (origin
7665 (method url-fetch)
7666 (uri (string-append "https://github.com/javax-inject/javax-inject/"
7667 "archive/javax.inject-" version ".tar.gz"))
7668 (sha256
7669 (base32
7670 "1ydrlvh2r7vr1g7lhjwy3w2dggpj9h6pix1lakkkgdywb365n6g0"))))
7671 (build-system ant-build-system)
7672 (arguments
7673 `(#:jar-name "java-javax-inject.jar"
7674 #:jdk ,icedtea-8
7675 #:tests? #f)); no tests
7676 (home-page "http://github.com/javax-inject/javax-inject")
7677 (synopsis "JSR-330: Dependency Injection for Java")
7678 (description "This package specifies a means for obtaining objects in such
7679a way as to maximize reusability, testability and maintainability compared to
7680traditional approaches such as constructors, factories, and service locators
7681(e.g., JNDI). This process, known as dependency injection, is beneficial to
7682most nontrivial applications.
7683
7684Many types depend on other types. For example, a @var{Stopwatch} might depend
7685on a @var{TimeSource}. The types on which a type depends are known as its
7686dependencies. The process of finding an instance of a dependency to use at run
7687time is known as resolving the dependency. If no such instance can be found,
7688the dependency is said to be unsatisfied, and the application is broken.")
7689 (license license:asl2.0)))
5766984b
JL
7690
7691(define-public java-guice
7692 (package
7693 (name "java-guice")
7694 (version "4.1")
7695 (source (origin
7696 (method url-fetch)
7697 (uri (string-append "https://github.com/google/guice/archive/"
7698 version ".tar.gz"))
7699 (file-name (string-append name "-" version ".tar.gz"))
7700 (sha256
7701 (base32
7702 "0dwmqjzlavb144ywqqglj3h68hqszkff8ai0a42hyb5il0qh4rbp"))))
7703 (build-system ant-build-system)
7704 (arguments
7705 `(#:jar-name "java-guice.jar"
7706 #:jdk ,icedtea-8
7707 #:tests? #f; FIXME: tests are not in a java sub directory
7708 #:source-dir "core/src"))
7709 (inputs
7710 `(("guava" ,java-guava)
7711 ("java-cglib" ,java-cglib)
7712 ("java-aopalliance" ,java-aopalliance)
7713 ("java-javax-inject" ,java-javax-inject)
7714 ("java-asm" ,java-asm)))
7715 (home-page "https://github.com/google/guice")
7716 (synopsis "Lightweight dependency injection framework")
7717 (description "Guice is a lightweight dependency injection framework fo
7718Java 6 and above.")
7719 (license license:asl2.0)))
ec4e8ad7
JL
7720
7721(define-public java-guice-servlet
7722 (package
7723 (inherit java-guice)
7724 (name "java-guice-servlet")
7725 (arguments
7726 `(#:jar-name "guice-servlet.jar"
7727 #:source-dir "extensions/servlet/src/"
7728 #:jdk ,icedtea-8
7729 #:tests? #f)); FIXME: not in a java subdir
7730 (inputs
7731 `(("guice" ,java-guice)
7732 ("servlet" ,java-tomcat)
7733 ,@(package-inputs java-guice)))))
b12fe1e5
JL
7734
7735(define-public java-assertj
7736 (package
7737 (name "java-assertj")
7738 (version "3.8.0")
7739 (source (origin
7740 (method url-fetch)
7741 (uri (string-append "https://github.com/joel-costigliola/"
7742 "assertj-core/archive/"
7743 "assertj-core-" version ".tar.gz"))
7744 (sha256
7745 (base32
7746 "1kf124fxskf548rklkg86294w2x6ajqrff94rrhyqns31danqkfz"))))
7747 (build-system ant-build-system)
7748 (arguments
7749 `(#:jar-name "java-assertj.jar"
7750 #:jdk ,icedtea-8
7751 #:source-dir "src/main/java"
7752 #:tests? #f)); depends on tng-junit which depends on assertj
7753 (inputs
7754 `(("cglib" ,java-cglib)
7755 ("junit" ,java-junit)
7756 ("hamcrest" ,java-hamcrest-core)))
7757 (native-inputs
7758 `(("mockito" ,java-mockito-1)))
7759 (home-page "https://joel-costigliola.github.io/assertj/index.html")
7760 (synopsis "Fluent assertions for java")
7761 (description "AssertJ core is a Java library that provides a fluent
7762interface for writing assertions. Its main goal is to improve test code
7763readability and make maintenance of tests easier.")
7764 (license license:asl2.0)))
6768e0a7
JL
7765
7766(define-public java-jboss-javassist
7767 (package
7768 (name "java-jboss-javassist")
7769 (version "3.21.0")
7770 (source (origin
7771 (method url-fetch)
7772 (uri (string-append "https://github.com/jboss-javassist/javassist/"
7773 "archive/rel_"
7774 (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)
7775 "_ga.tar.gz"))
7776 (sha256
7777 (base32
7778 "10lpcr3sbf7y6fq6fc2h2ik7rqrivwcy4747bg0kxhwszil3cfmf"))))
7779 (build-system ant-build-system)
7780 (arguments
7781 `(#:jar-name "java-jboss-javassist.jar"
7782 #:jdk ,icedtea-8
7783 #:source-dir "src/main"
7784 #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3
7785 #:phases
7786 (modify-phases %standard-phases
7787 (add-before 'configure 'remove-binary
7788 (lambda _
7789 (delete-file "javassist.jar")
7790 #t)))))
7791 (native-inputs
7792 `(("junit" ,java-junit)))
7793 (home-page "https://github.com/jboss-javassist/javassist")
7794 (synopsis "Java bytecode engineering toolkit")
7795 (description "Javassist (JAVA programming ASSISTant) makes Java bytecode
7796manipulation simple. It is a class library for editing bytecodes in Java; it
7797enables Java programs to define a new class at runtime and to modify a class
7798file when the JVM loads it.")
7799 (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl.
a6dd06d0
JL
7800
7801(define-public java-jcommander
7802 (package
7803 (name "java-jcommander")
7804 (version "1.71")
7805 (source (origin
7806 (method url-fetch)
7807 (uri (string-append "https://github.com/cbeust/jcommander/archive/"
7808 version ".tar.gz"))
7809 (file-name (string-append name "-" version ".tar.gz"))
7810 (sha256
7811 (base32
7812 "1f5k2ckay6qjc3d3w3d7bc0p3cx3c7n6p6zxvw1kibqdr0q98wlx"))))
7813 (build-system ant-build-system)
7814 (arguments
7815 `(#:jar-name "java-jcommander.jar"
7816 #:jdk ,icedtea-8
7817 #:tests? #f; requires testng which depends on jcommander
7818 #:source-dir "src/main/java"))
7819 (home-page "http://jcommander.org")
7820 (synopsis "Command line parameters parser")
7821 (description "JCommander is a very small Java framework that makes it
7822trivial to parse command line parameters. Parameters are declared with
7823annotations.")
7824 (license license:asl2.0)))
11bc385b
JL
7825
7826(define-public java-bsh
7827 (package
7828 (name "java-bsh")
7829 (version "2.0b6")
7830 (source (origin
7831 (method url-fetch)
7832 (uri (string-append "https://github.com/beanshell/beanshell/archive/"
7833 version ".tar.gz"))
7834 (file-name (string-append name "-" version ".tar.gz"))
7835 (sha256
7836 (base32
7837 "1bawkxk6jyc75hxvzkpz689h73cn3f222m0ar3nvb0dal2b85kfv"))))
7838 (build-system ant-build-system)
7839 (arguments
7840 `(#:build-target "jarall"
7841 #:test-target "junit-tests-all"
7842 #:phases
7843 (modify-phases %standard-phases
7844 (replace 'install
7845 (lambda* (#:key outputs #:allow-other-keys)
7846 (let ((share (string-append (assoc-ref outputs "out") "/share/java")))
7847 (mkdir-p share)
7848 (copy-file "dist/bsh-2.0b6.jar" (string-append share "/bsh-2.0b6.jar"))
7849 #t))))))
7850 (home-page "http://beanshell.org/")
7851 (synopsis "Lightweight Scripting for Java")
7852 (description "BeanShell is a small, free, embeddable Java source
7853interpreter with object scripting language features, written in Java.
7854BeanShell dynamically executes standard Java syntax and extends it with common
7855scripting conveniences such as loose types, commands, and method closures like
7856those in Perl and JavaScript.")
7857 (license license:asl2.0)))
7a343e97
JL
7858
7859(define-public java-fest-util
7860 (package
7861 (name "java-fest-util")
7862 (version "1.2.5")
7863 (source (origin
7864 (method url-fetch)
7865 (uri (string-append "https://github.com/alexruiz/fest-util/"
7866 "archive/fest-util-" version ".tar.gz"))
7867 (sha256
7868 (base32
7869 "05g6hljz5mdaakk8d7g32klbhz9bdwp3qlj6rdaggdidxs3x1sb8"))))
7870 (build-system ant-build-system)
7871 (arguments
7872 `(#:jar-name "java-fest-util.jar"
7873 #:source-dir "src/main/java"))
7874 (native-inputs
7875 `(("junit" ,java-junit)
7876 ("hamcrest" ,java-hamcrest-core)))
7877 (home-page "https://github.com/alexruiz/fest-util")
7878 (synopsis "FEST common utilities")
7879 (description "Common utilities used in all FEST module.")
7880 (license license:asl2.0)))
3c6c8358
JL
7881
7882(define-public java-fest-test
7883 (package
7884 (name "java-fest-test")
7885 (version "2.1.0")
7886 (source (origin
7887 (method url-fetch)
7888 (uri (string-append "https://github.com/alexruiz/fest-test/"
7889 "archive/fest-test-" version ".tar.gz"))
7890 (sha256
7891 (base32
7892 "1rxfbw6l9vc65iy1x3fb617qc6y4w2k430pgf1mfbxfdlxbm0f7g"))))
7893 (build-system ant-build-system)
7894 (arguments
7895 `(#:jar-name "java-fest-test.jar"
7896 #:source-dir "src/main/java"
7897 #:tests? #f)); no tests
7898 (inputs
7899 `(("junit" ,java-junit)))
7900 (home-page "https://github.com/alexruiz/fest-test")
7901 (synopsis "Common FEST testing infrastructure")
7902 (description "Fest-test contains the common FEST testing infrastructure.")
7903 (license license:asl2.0)))
ca98e448
JL
7904
7905(define-public java-fest-assert
7906 (package
7907 (name "java-fest-assert")
7908 (version "2.0M10")
7909 (source (origin
7910 (method url-fetch)
7911 (uri (string-append "https://github.com/alexruiz/fest-assert-2.x/"
7912 "archive/fest-assert-core-" version ".tar.gz"))
7913 (sha256
7914 (base32
7915 "1bi0iqavikzww6rxvz5jyg7y6bflv95s6ibryxx0xfcxrrw6i5lw"))))
7916 (build-system ant-build-system)
7917 (arguments
7918 `(#:jar-name "java-fest-assert.jar"
7919 #:source-dir "src/main/java"
7920 #:test-exclude
7921 (list
7922 "**/Abstract*.java"
7923 "**/*BaseTest.java"
7924 ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses
7925 "**/MessageFormatter_format_Test.java"
7926 "**/internal/*/*_assert*_Test.java")))
7927 (inputs
7928 `(("java-fest-util" ,java-fest-util)))
7929 (native-inputs
7930 `(("java-junit" ,java-junit)
7931 ("java-fest-test" ,java-fest-test)
7932 ("java-hamcrest-core" ,java-hamcrest-core)
7933 ("java-mockito" ,java-mockito-1)
7934 ("java-cglib" ,java-cglib)
7935 ("java-objenesis" ,java-objenesis)
7936 ("java-asm" ,java-asm)))
7937 (home-page "https://github.com/alexruiz/fest-assert-2.x")
7938 (synopsis "FEST fluent assertions")
7939 (description "FEST-Assert provides a fluent interface for assertions.")
7940 (license license:asl2.0)))
0442d897
JL
7941
7942(define-public java-testng
7943 (package
7944 (name "java-testng")
3422e10e 7945 (version "6.14.3")
0442d897 7946 (source (origin
36b39d16
RW
7947 (method git-fetch)
7948 (uri (git-reference
7949 (url "https://github.com/cbeust/testng.git")
7950 (commit version)))
7951 (file-name (string-append name "-" version "-checkout"))
0442d897
JL
7952 (sha256
7953 (base32
3422e10e 7954 "0y6vq30i5g276kw0v2bhbvci22ijg7ax49ap2611yqlhbs4d6dqv"))))
0442d897
JL
7955 (build-system ant-build-system)
7956 (arguments
7957 `(#:jdk ,icedtea-8; java.util.function
7958 #:jar-name "java-testng.jar"
7959 #:source-dir "src/main/java"
7960 #:phases
7961 (modify-phases %standard-phases
36b39d16
RW
7962 ;; FIXME: I don't know why these tests fail
7963 (add-after 'unpack 'delete-failing-tests
7964 (lambda _
7965 (substitute* "src/test/resources/testng.xml"
7966 (("<class name=\"test.configuration.github1625.TestRunnerIssue1625\"/>") "")
7967 (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") ""))
7968 #t))
7969 ;; We don't have groovy
7970 (add-after 'unpack 'delete-groovy-tests
7971 (lambda _
7972 (delete-file-recursively "src/test/java/test/dependent/issue1648/")
7973 (substitute* "src/test/resources/testng.xml"
7974 (("<class name=\"test.dependent.issue1648.TestRunner\"/>") ""))
7975 #t))
0442d897
JL
7976 (add-before 'build 'copy-resources
7977 (lambda _
7978 (copy-recursively "src/main/resources" "build/classes")
7979 #t))
7980 (add-before 'check 'copy-test-resources
7981 (lambda _
7982 (copy-recursively "src/test/resources" "build/test-classes")
7983 #t))
7984 (replace 'check
7985 (lambda _
7986 (system* "ant" "compile-tests")
7987 ;; we don't have groovy
7988 (substitute* "src/test/resources/testng.xml"
7989 (("<class name=\"test.groovy.GroovyTest\" />") ""))
7990 (zero? (system* "java" "-cp" (string-append (getenv "CLASSPATH")
7991 ":build/classes"
7992 ":build/test-classes")
7993 "-Dtest.resources.dir=src/test/resources"
7994 "org.testng.TestNG" "src/test/resources/testng.xml")))))))
7995 (propagated-inputs
7996 `(("junit" ,java-junit)
7997 ("java-jsr305" ,java-jsr305)
7998 ("java-bsh" ,java-bsh)
7999 ("java-jcommander" ,java-jcommander)
8000 ("java-guice" ,java-guice)
8001 ("snakeyaml" ,java-snakeyaml)))
8002 (native-inputs
8003 `(("guava" ,java-guava)
8004 ("java-javax-inject" ,java-javax-inject)
8005 ("java-hamcrest" ,java-hamcrest-all)
8006 ("java-assertj" ,java-assertj)
36b39d16 8007 ("java-mockito" ,java-mockito-1)
0442d897
JL
8008 ("cglib" ,java-cglib)
8009 ("asm" ,java-asm)
8010 ("aopalliance" ,java-aopalliance)))
8011 (home-page "http://testng.org")
8012 (synopsis "Testing framework")
8013 (description "TestNG is a testing framework inspired from JUnit and NUnit
8014but introducing some new functionalities that make it more powerful and easier
8015to use.")
8016 (license license:asl2.0)))
1717a7de
JL
8017
8018(define-public java-jnacl
3e87923a
RW
8019 (let ((commit "094e819afdd63ea81a499b3bcb42a271006bebd9")
8020 (revision "2"))
8021 (package
8022 (name "java-jnacl")
8023 (version (string-append "0.1.0-" revision "." (string-take commit 7)))
8024 (source (origin
8025 (method git-fetch)
8026 (uri (git-reference
8027 (url "https://github.com/neilalexander/jnacl.git")
8028 (commit commit)))
6c34ad73 8029 (file-name (git-file-name name version))
3e87923a
RW
8030 (sha256
8031 (base32
8032 "1d6g6xhn83byv5943n7935wwjsk0ibk0qdvqgr699qqgqqmwisbb"))))
8033 (build-system ant-build-system)
8034 (arguments
8c7d32e0 8035 `(#:jar-name "jnacl.jar"
3e87923a
RW
8036 #:source-dir "src/main/java"
8037 #:jdk ,icedtea-8
8038 #:phases
8039 (modify-phases %standard-phases
8040 (add-before 'build 'fix-tests
8041 (lambda _
8042 (substitute* '("src/test/java/com/neilalexander/jnacl/NaClTest.java"
8043 "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java")
8044 (("assertions.Assertions") "assertions.api.Assertions"))
8045 #t))
8046 (replace 'check
8047 (lambda _
8048 (invoke "ant" "compile-tests")
8049 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8050 ":build/classes"
8051 ":build/test-classes")
8052 "org.testng.TestNG" "-testclass"
8053 "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class")
8054 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8055 ":build/classes"
8056 ":build/test-classes")
8057 "org.testng.TestNG" "-testclass"
8058 "build/test-classes/com/neilalexander/jnacl/NaClTest.class")
8059 #t)))))
8060 (native-inputs
8061 `(("java-testng" ,java-testng)
8062 ("java-fest-util" ,java-fest-util)
8063 ("java-fest-assert" ,java-fest-assert)))
8064 (home-page "https://github.com/neilalexander/jnacl")
8065 (synopsis "Java implementation of NaCl")
8066 (description "Pure Java implementation of the NaCl: Networking and
1717a7de 8067Cryptography library.")
3e87923a 8068 (license license:bsd-2))))
eaf3cb7a
JL
8069
8070(define-public java-mvel2
8071 (package
8072 (name "java-mvel2")
8073 (version "2.3.1")
8074 (source (origin
8075 (method url-fetch)
8076 (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-"
8077 version ".Final.tar.gz"))
8078 (sha256
8079 (base32
8080 "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z"))))
8081 (build-system ant-build-system)
8082 (arguments
8083 `(#:jar-name "mvel2.jar"
8084 #:source-dir "src/main/java"
8085 #:test-exclude
8086 (list "**/Abstract*.java"
8087 ;; Base class with no tests
8088 "**/MVELThreadTest.java")
8089 #:phases
8090 (modify-phases %standard-phases
8091 (add-after 'install 'install-bin
8092 (lambda* (#:key outputs #:allow-other-keys)
8093 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
8094 (mkdir-p bin)
8095 (with-output-to-file (string-append bin "/mvel2")
8096 (lambda _
8097 (display
8098 (string-append
8099 "#!" (which "bash") "\n"
8100 "if [ \"$#\" -ne \"2\" ]; then\n"
8101 "echo 'Usage: mvel2 <script> <out.dir>'\n"
8102 "exit\n"
8103 "fi\n"
8104 "java -Dout.dir=$2 -cp " (getenv "CLASSPATH")
8105 ":" (assoc-ref outputs "out") "/share/java/mvel2.jar"
8106 " org.mvel2.sh.Main $1"))))
8107 (chmod (string-append bin "/mvel2") #o755))
8108 #t)))))
8109 (native-inputs
8110 `(("junit" ,java-junit)
8111 ("hamcrest" ,java-hamcrest-core)))
8112 (home-page "https://github.com/mvel/mvel")
8113 (synopsis "MVFLEX Expression Language")
8114 (description "MVEL has largely been inspired by Java syntax, but has some
8115fundamental differences aimed at making it more efficient as an expression
8116language, such as operators that directly support collection, array and string
8117matching, as well as regular expressions. MVEL is used to evaluate expressions
8118written using Java syntax.
8119
8120In addition to the expression language, MVEL serves as a templating language for
8121configuration and string construction.")
8122 (license license:asl2.0)))
d54d7d31 8123
9e325e8c
RW
8124(define-public java-commons-jexl-2
8125 (package
8126 (name "java-commons-jexl")
8127 (version "2.1.1")
8128 (source (origin
8129 (method url-fetch)
8130 (uri (string-append "mirror://apache/commons/jexl/source/"
8131 "commons-jexl-" version "-src.tar.gz"))
8132 (sha256
8133 (base32
8134 "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz"))))
8135 (build-system ant-build-system)
8136 (arguments
8137 `(#:jar-name "commons-jexl-2.jar"
8138 #:jdk ,icedtea-8
8139 #:source-dir "src/main/java"
8140 #:phases
8141 (modify-phases %standard-phases
8142 (add-before 'check 'disable-broken-tests
8143 (lambda* (#:key inputs #:allow-other-keys)
8144 (with-directory-excursion "src/test/java/org/apache/commons/jexl2/"
8145 (substitute* "ArithmeticTest.java"
8146 (("asserter.assertExpression\\(\"3 / 0\"") "//")
8147 (("asserter.assertExpression\\(\"imanull") "//"))
8148 ;; This test fails with "ambiguous method invocation"
8149 (delete-file "CacheTest.java")
8150 ;; This test doesn't have access to the temp directory
8151 (substitute* "ClassCreatorTest.java"
8152 (("java.io.tmpdir") "user.dir"))
8153 ;; This test fails in trying to detect whether it can run.
8154 (substitute* "ClassCreator.java"
8155 (("boolean canRun =.*") "boolean canRun = false;\n"))
8156 ;; ...and these tests depend on it.
8157 (delete-file "scripting/JexlScriptEngineOptionalTest.java")
8158 (delete-file "scripting/JexlScriptEngineTest.java"))
8159 #t))
8160 (add-before 'build 'run-javacc
8161 (lambda _
8162 (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/"
080d0b60
RW
8163 (invoke "java" "jjtree" "Parser.jjt")
8164 (invoke "java" "javacc" "Parser.jj"))
8165 #t)))))
9e325e8c
RW
8166 (inputs
8167 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
8168 (native-inputs
8169 `(("java-junit" ,java-junit)
8170 ("java-hamcrest-core" ,java-hamcrest-core)
8171 ("javacc" ,javacc-4)))
8172 (home-page "https://commons.apache.org/proper/commons-jexl/")
8173 (synopsis "Java Expression Language ")
8174 (description "JEXL is a library intended to facilitate the implementation
8175of dynamic and scripting features in applications and frameworks written in
8176Java. JEXL implements an Expression Language based on some extensions to the
8177JSTL Expression Language supporting most of the constructs seen in
8178shell-script or ECMAScript. Its goal is to expose scripting features usable
8179by technical operatives or consultants working with enterprise platforms.")
8180 (license license:asl2.0)))
8181
d54d7d31
JL
8182(define-public java-lz4
8183 (package
8184 (name "java-lz4")
8185 (version "1.4.0")
8186 (source (origin
8187 (method url-fetch)
8188 (uri (string-append "https://github.com/lz4/lz4-java/archive/"
8189 version ".tar.gz"))
8190 (file-name (string-append name "-" version ".tar.gz"))
8191 (sha256
8192 (base32
8193 "096dm57p2lzqk28n0j2p52x2j3cvnsd2dfqn43n7vbwrkjsy7y54"))))
8194 (build-system ant-build-system)
8195 (arguments
8196 `(#:jar-name "lz4.jar"
8197 #:jdk ,icedtea-8
8198 #:source-dir "src/java:src/java-unsafe"
8199 #:tests? #f; FIXME: requires more dependencies
8200 #:phases
8201 (modify-phases %standard-phases
8202 (add-before 'configure 'generate-source
8203 (lambda _
8204 (with-directory-excursion "src/build/source_templates"
1b6bc516
RW
8205 (invoke "mvel2" "../gen_sources.mvel" "../../java"))
8206 #t)))))
d54d7d31
JL
8207 (native-inputs
8208 `(("mvel" ,java-mvel2)))
8209 (home-page "https://jpountz.github.io/lz4-java")
8210 (synopsis "Compression algorithm")
8211 (description "LZ4 - Java is a Java port of the popular lz4 compression
8212algorithms and xxHash hashing algorithm.")
8213 (license license:asl2.0)))
62315865 8214
50d70a72 8215(define-public java-bouncycastle
62315865 8216 (package
50d70a72
JL
8217 (name "java-bouncycastle")
8218 (version "1.59")
62315865
JL
8219 (source (origin
8220 (method url-fetch)
50d70a72
JL
8221 (uri (string-append "https://github.com/bcgit/bc-java/archive/r"
8222 (substring version 0 1) "rv"
8223 (substring version 2 4) ".tar.gz"))
62315865
JL
8224 (sha256
8225 (base32
50d70a72
JL
8226 "1bwl499whlbq896w18idqw2dkp8v0wp0npv9g71i5fgf8xjh0k3q"))
8227 (modules '((guix build utils)))
8228 (snippet
8229 '(begin
8230 (for-each delete-file
8231 (find-files "." "\\.jar$"))
8232 #t))))
62315865
JL
8233 (build-system ant-build-system)
8234 (arguments
50d70a72 8235 `(#:jdk ,icedtea-8
62315865
JL
8236 #:phases
8237 (modify-phases %standard-phases
50d70a72 8238 (replace 'build
62315865 8239 (lambda _
50d70a72
JL
8240 (invoke "ant" "-f" "ant/jdk15+.xml" "build-provider")
8241 (invoke "ant" "-f" "ant/jdk15+.xml" "build")
8242 #t))
8243 (replace 'check
31208367 8244 (lambda _
50d70a72
JL
8245 (invoke "ant" "-f" "ant/jdk15+.xml" "test")))
8246 (replace 'install
8247 (install-jars "build/artifacts/jdk1.5/jars")))))
8248 (inputs
8249 `(("java-javax-mail" ,java-javax-mail)))
31208367
JL
8250 (native-inputs
8251 `(("unzip" ,unzip)
50d70a72
JL
8252 ("junit" ,java-junit)
8253 ("java-native-access" ,java-native-access)
8254 ("java-native-access-platform" ,java-native-access-platform)))
31208367
JL
8255 (home-page "https://www.bouncycastle.org")
8256 (synopsis "Cryptographic library")
50d70a72
JL
8257 (description "Bouncy Castle is a cryptographic library for the Java
8258programming language.")
31208367 8259 (license license:expat)))
a53d9ac0
JL
8260
8261(define-public java-lmax-disruptor
8262 (package
8263 (name "java-lmax-disruptor")
8264 (version "3.3.7")
8265 (source (origin
8266 (method url-fetch)
8267 (uri (string-append "https://github.com/LMAX-Exchange/disruptor/"
8268 "archive/" version ".tar.gz"))
8269 (file-name (string-append name "-" version ".tar.gz"))
8270 (sha256
8271 (base32
8272 "17da2gwj5abnlsfgn2xqjk5lgzbg4vkb0hdv2dvc8r2fx4bi7w3g"))))
8273 (build-system ant-build-system)
8274 (arguments
8275 `(#:jar-name "java-lmax-disruptor.jar"
8276 #:jdk ,icedtea-8
8277 #:tests? #f)); tests hang
8278 (inputs
8279 `(("junit" ,java-junit)
8280 ("java-hdrhistogram" ,java-hdrhistogram)
8281 ("java-jmock" ,java-jmock)
8282 ("java-jmock-legacy" ,java-jmock-legacy)
8283 ("java-jmock-junit4" ,java-jmock-junit4)
8284 ("java-hamcrest-all" ,java-hamcrest-all)))
8285 (native-inputs
8286 `(("cglib" ,java-cglib)
8287 ("objenesis" ,java-objenesis)
8288 ("asm" ,java-asm)))
8289 (home-page "https://www.lmax.com/disruptor")
8290 (synopsis "High performance inter-thread communication")
8291 (description "LMAX Disruptor is a software pattern and software component
8292for high performance inter-thread communication that avoids the need for
8293message queues or resource locking.")
8294 (license license:asl2.0)))
5619556b 8295
5e3abfc8
RW
8296(define-public java-commons-bcel
8297 (package
8298 (name "java-commons-bcel")
8299 (version "6.1")
8300 (source (origin
8301 (method url-fetch)
8302 (uri (string-append "mirror://apache/commons/bcel/source/bcel-"
8303 version "-src.tar.gz"))
8304 (sha256
8305 (base32
8306 "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy"))))
8307 (build-system ant-build-system)
8308 (arguments
8309 `(#:jar-name "bcel.jar"
8310 #:jdk ,icedtea-8
8311 #:source-dir "src/main/java"
8312 #:test-dir "src/test/java"
8313 ;; FIXME: Tests require the unpackaged jna.
8314 #:tests? #f))
8315 (home-page "https://commons.apache.org/proper/commons-bcel/")
8316 (synopsis "Byte code engineering library")
8317 (description "The Byte Code Engineering Library (Apache Commons BCEL) is
8318intended to give users a convenient way to analyze, create, and
8319manipulate (binary) Java class files. Classes are represented by objects
8320which contain all the symbolic information of the given class: methods, fields
8321and byte code instructions, in particular.
8322
8323Such objects can be read from an existing file, be transformed by a
8324program (e.g. a class loader at run-time) and written to a file again. An
8325even more interesting application is the creation of classes from scratch at
8326run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful
8327if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format
8328of Java @code{.class} files.")
8329 (license license:asl2.0)))
8330
5619556b
JL
8331(define-public java-xerial-core
8332 (package
8333 (name "java-xerial-core")
8334 (version "2.1")
8335 (source (origin
8336 (method url-fetch)
8337 (uri (string-append "https://github.com/xerial/xerial-java/archive/"
8338 version ".tar.gz"))
8339 (file-name (string-append name "-" version ".tar.gz"))
8340 (sha256
8341 (base32
8342 "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d"))))
8343 (build-system ant-build-system)
8344 (arguments
8345 `(#:jar-name "xerial-core.jar"
8346 #:source-dir "xerial-core/src/main/java"
8347 #:test-dir "xerial-core/src/test"
8348 #:phases
8349 (modify-phases %standard-phases
8350 (add-before 'build 'copy-resources
8351 (lambda _
8352 (copy-recursively "xerial-core/src/main/resources"
8353 "build/classes")
8354 #t)))))
8355 (native-inputs
8356 `(("junit" ,java-junit)
8357 ("hamcrest" ,java-hamcrest-core)))
8358 (home-page "https://github.com/xerial/xerial-java")
f4548394 8359 (synopsis "Data management libraries for Java")
5619556b 8360 (description "Xerial is a set of data management libraries for the Java
f4548394 8361programming language. The ultimate goal of the Xerial project is to manage
5619556b
JL
8362everything as database, including class objects, text format data, data
8363streams, etc.")
8364 (license license:asl2.0)))
8d6a4815
JL
8365
8366(define-public java-powermock-reflect
8367 (package
8368 (name "java-powermock-reflect")
8369 (version "1.7.3")
8370 (source (origin
8371 (method url-fetch)
8372 (uri (string-append "https://github.com/powermock/powermock/"
8373 "archive/powermock-" version ".tar.gz"))
8374 (file-name (string-append name "-" version ".tar.gz"))
8375 (sha256
8376 (base32
8377 "0sbgi5vqq7k72wzcdjb20s370vyd4hsbnx71pzb8ishml3gy7fwy"))
8378 (patches
8379 (search-patches "java-powermock-fix-java-files.patch"))))
8380 (build-system ant-build-system)
8381 (arguments
8382 `(#:jar-name "java-powermock-reflect.jar"
8383 #:jdk ,icedtea-8
8384 #:source-dir "powermock-reflect/src/main/java"
8385 #:test-dir "powermock-reflect/src/test"))
8386 (inputs
8387 `(("java-objenesis" ,java-objenesis)))
8388 (native-inputs
8389 `(("junit" ,java-junit)
8390 ("cglib" ,java-cglib)
8391 ("asm" ,java-asm)
8392 ("hamcrest" ,java-hamcrest-core)
8393 ("assertj" ,java-assertj)))
8394 (home-page "https://github.com/powermock/powermock")
8395 (synopsis "Mock library extension framework")
8396 (description "PowerMock is a framework that extends other mock libraries
8397such as EasyMock with more powerful capabilities. PowerMock uses a custom
8398classloader and bytecode manipulation to enable mocking of static methods,
8399constructors, final classes and methods, private methods, removal of static
8400initializers and more. By using a custom classloader no changes need to be
8401done to the IDE or continuous integration servers which simplifies adoption.")
8402 (license license:asl2.0)))
d4a4d5da
JL
8403
8404(define-public java-powermock-core
8405 (package
8406 (inherit java-powermock-reflect)
8407 (name "java-powermock-core")
8408 (arguments
8409 `(#:jar-name "java-powermock-core.jar"
8410 #:source-dir "powermock-core/src/main/java"
8411 #:test-dir "powermock-core/src/test"
8412 #:tests? #f; requires powermock-api
59e0021c
JL
8413 #:jdk ,icedtea-8
8414 #:phases
8415 (modify-phases %standard-phases
8416 (add-before 'build 'copy-resources
8417 (lambda _
8418 (copy-recursively "powermock-core/src/main/resources"
8419 "build/classes"))))))
d4a4d5da
JL
8420 (inputs
8421 `(("reflect" ,java-powermock-reflect)
8422 ("javassist" ,java-jboss-javassist)))
8423 (native-inputs
8424 `(("junit" ,java-junit)
8425 ("assertj" ,java-assertj)
8426 ("mockito" ,java-mockito-1)))))
2d5d65d7
JL
8427
8428(define-public java-powermock-api-support
8429 (package
8430 (inherit java-powermock-reflect)
8431 (name "java-powermock-api-support")
8432 (build-system ant-build-system)
8433 (arguments
8434 `(#:jar-name "java-powermock-api-support.jar"
8435 #:jdk ,icedtea-8
8436 #:source-dir "powermock-api/powermock-api-support/src/main/java"
8437 #:tests? #f)); no tests
8438 (inputs
8439 `(("core" ,java-powermock-core)
8440 ("reflect" ,java-powermock-reflect)))))
6c21d46c
JL
8441
8442(define-public java-powermock-modules-junit4-common
8443 (package
8444 (inherit java-powermock-reflect)
8445 (name "java-powermock-modules-junit4-common")
8446 (build-system ant-build-system)
8447 (arguments
8448 `(#:jar-name "java-powermock-modules-junit4-common.jar"
8449 #:jdk ,icedtea-8
8450 #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java"
8451 #:test-dir "powermock-modules/powermock-module-junit4-common/src/test"))
8452 (inputs
8453 `(("core" ,java-powermock-core)
8454 ("easymock" ,java-easymock)
8455 ("reflect" ,java-powermock-reflect)
8456 ("hamcrest" ,java-hamcrest-core)
8457 ("cglib" ,java-cglib)))))
33db1681
JL
8458
8459(define-public java-powermock-modules-junit4
8460 (package
8461 (inherit java-powermock-reflect)
8462 (name "java-powermock-modules-junit4")
8463 (build-system ant-build-system)
8464 (arguments
8465 `(#:jar-name "java-powermock-modules-junit4.jar"
8466 #:jdk ,icedtea-8
8467 #:source-dir "powermock-modules/powermock-module-junit4/src/main/java"
1124683d
JL
8468 #:test-dir "powermock-modules/powermock-module-junit4/src/test"
8469 #:phases
8470 (modify-phases %standard-phases
8471 (add-before 'build 'fix-junit-detection
8472 (lambda _
8473 ;; Our junit version is 4.12-SNAPSHOT
8474 (substitute* (find-files "powermock-modules/powermock-module-junit4"
8475 "PowerMockJUnit4MethodValidator.java")
8476 (("4.12") "4.12-SNAPSHOT")))))))
33db1681
JL
8477 (inputs
8478 `(("core" ,java-powermock-core)
8479 ("reflect" ,java-powermock-reflect)
8480 ("common" ,java-powermock-modules-junit4-common)
8481 ("cglib" ,java-cglib)))
8482 (native-inputs
8483 `(("easymock" ,java-easymock)
8484 ("hamcrest" ,java-hamcrest-core)
8485 ("objenesis" ,java-objenesis)
8486 ("asm" ,java-asm)
8487 ("junit" ,java-junit)))))
4d508975
JL
8488
8489(define-public java-powermock-api-easymock
8490 (package
8491 (inherit java-powermock-reflect)
8492 (name "java-powermock-api-easymock")
8493 (build-system ant-build-system)
8494 (arguments
8495 `(#:jar-name "java-powermock-api-easymock.jar"
8496 #:jdk ,icedtea-8
8497 #:source-dir "powermock-api/powermock-api-easymock/src/main/java"
8498 #:tests? #f; no tests
8499 #:phases
8500 (modify-phases %standard-phases
8501 (add-before 'build 'fix-file
8502 (lambda _
8503 ;; FIXME: This looks wrong, but it fixes a build error.
8504 (with-directory-excursion "powermock-api/powermock-api-easymock"
8505 (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java"
8506 (("classLoader instanceof MockClassLoader") "false")
8507 (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";")))
8508 #t)))))
8509 (inputs
8510 `(("core" ,java-powermock-core)
8511 ("easymock" ,java-easymock)
8512 ("reflect" ,java-powermock-reflect)
8513 ("support" ,java-powermock-api-support)
8514 ("cglib" ,java-cglib)))))
5fb3e822
JL
8515
8516(define-public java-jboss-jms-api-spec
8517 (package
8518 (name "java-jboss-jms-api-spec")
8519 (version "2.0")
8520 (source (origin
8521 (method url-fetch)
8522 (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/"
8523 "archive/jboss-jms-api_" version
8524 "_spec-1.0.1.Final.tar.gz"))
8525 (sha256
8526 (base32
8527 "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m"))))
8528 (build-system ant-build-system)
8529 (arguments
8530 `(#:jar-name "java-jboss-jms-api_spec.jar"
8531 #:jdk ,icedtea-8
8532 #:source-dir "."
8533 #:tests? #f)); no tests
8534 (home-page "https://github.com/jboss/jboss-jms-api_spec")
8535 (synopsis "Java Message Service API specification")
8536 (description "Java Message Service (JMS) API is used to send messages
8537messages between two or more clients. It is a messaging standard that allows
8538application components to create, send, receive, and read messages.")
8539 ; either gpl2 only with GPL Classpath Exception, or cddl.
8540 (license (list license:gpl2 license:cddl1.0))))
3ff47c66
JL
8541
8542(define-public java-mail
8543 (package
8544 (name "java-mail")
8545 (version "1.6.0")
8546 (source (origin
8547 (method url-fetch)
8548 (uri (string-append "https://github.com/javaee/javamail/archive/"
8549 "JAVAMAIL-1_6_0.tar.gz"))
8550 (sha256
8551 (base32
8552 "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92"))))
8553 (build-system ant-build-system)
8554 (arguments
8555 `(#:jar-name "java-mail.jar"
8556 #:jdk ,icedtea-8
8557 #:source-dir "mail/src/main/java"
8558 #:test-dir "mail/src/test"
8559 #:test-exclude
8560 (list "**/CollectorFormatterTest.java"
8561 "**/CompactFormatterTest.java"
8562 "**/DurationFilterTest.java"
8563 "**/MailHandlerTest.java"
8564 "**/GetLocalAddressTest.java"
8565 ;; FIXME: both end with:
8566 ;; java.lang.ClassNotFoundException:
8567 ;; javax.mail.internet.MimeMultipartParseTest
8568 "**/MimeMultipartParseTest.java"
8569 "**/SearchTermSerializationTest.java")
8570 #:phases
8571 (modify-phases %standard-phases
8572 (add-before 'configure 'move-version.java
8573 (lambda _
8574 (copy-file "mail/src/main/resources/javax/mail/Version.java"
218d1dde
RW
8575 "mail/src/main/java/javax/mail/Version.java")
8576 #t))
3ff47c66
JL
8577 (add-before 'build 'copy-resources
8578 (lambda _
8579 (copy-recursively "mail/src/main/resources/META-INF"
8580 "build/classes/META-INF")
8581 #t)))))
8582 (native-inputs
8583 `(("junit" ,java-junit)
8584 ("hamcrest" ,java-hamcrest-core)))
8585 (home-page "https://javaee.github.io/javamail/")
8586 (synopsis "Mail-related functionnalities in Java")
8587 (description "The JavaMail API provides a platform-independent and
8588protocol-independent framework to build mail and messaging applications.")
8589 ;; General Public License Version 2 only ("GPL") or the Common Development
8590 ;; and Distribution License("CDDL")
8591 (license (list license:cddl1.1
8592 license:gpl2)))); with classpath exception
217b20e4
JL
8593
8594(define-public java-jeromq
8595 (package
8596 (name "java-jeromq")
4aa0a1df 8597 (version "0.4.3")
217b20e4 8598 (source (origin
4aa0a1df
RW
8599 (method git-fetch)
8600 (uri (git-reference
8601 (url "https://github.com/zeromq/jeromq.git")
8602 (commit (string-append "v" version))))
8603 (file-name (string-append name "-" version "-checkout"))
217b20e4
JL
8604 (sha256
8605 (base32
594bd3a0
GB
8606 "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj"))
8607 (patches (search-patches "java-jeromq-fix-tests.patch"))))
217b20e4
JL
8608 (build-system ant-build-system)
8609 (arguments
8610 `(#:jar-name "java-jeromq.jar"
8611 #:source-dir "src/main/java"
8612 #:jdk ,icedtea-8
8613 #:test-exclude
8614 (list
8615 "**/Abstract*.java"
8616 ;; Requires network
8617 "**/ZBeaconTest.java"
8618 ;; Failures
4aa0a1df 8619 "**/DealerSpecTest.java"
217b20e4 8620 "**/CustomDecoderTest.java"
594bd3a0
GB
8621 "**/CustomEncoderTest.java"
8622 "**/ConnectRidTest.java"
8623 "**/ReqSpecTest.java"
8624 "**/PushPullSpecTest.java"
8625 "**/PubSubHwmTest.java"
8626 "**/RouterSpecTest.java"
8627 "**/ProxyTest.java")))
217b20e4
JL
8628 (inputs
8629 `(("java-jnacl" ,java-jnacl)))
8630 (native-inputs
8631 `(("java-hamcrest-core" ,java-hamcrest-core)
8632 ("junit" ,java-junit)))
8633 (home-page "http://zeromq.org/bindings:java")
8634 (synopsis "Java binding for 0MQ")
8635 (description "Jeromq provides the java bindings for 0MQ.")
8636 (license license:mpl2.0)))
46c6905a
JL
8637
8638(define-public java-kafka-clients
8639 (package
8640 (name "java-kafka-clients")
8641 (version "1.0.0")
8642 (source (origin
8643 (method url-fetch)
8644 (uri (string-append "mirror://apache/kafka/" version "/kafka-"
8645 version "-src.tgz"))
8646 (sha256
8647 (base32
8648 "1yxmnsmliwm7671q5yy9bl4jdqyyn00n26cggz9brwczx80w1vfq"))))
8649 (build-system ant-build-system)
8650 (arguments
8651 `(#:jar-name "java-kafka-clients.jar"
8652 #:jdk ,icedtea-8
8653 #:source-dir "clients/src/main/java"
8654 #:test-dir "clients/src/test"
8655 #:test-exclude
8656 (list
8657 ;; This file does not contain a class
8658 "**/IntegrationTest.java"
8659 ;; Requires network
8660 "**/ClientUtilsTest.java"
8661 ;; End with errors that seem related to our powermock
8662 "**/KafkaProducerTest.java"
8663 "**/BufferPoolTest.java")))
8664 (inputs
8665 `(("java-slf4j-api" ,java-slf4j-api)
8666 ("java-lz4" ,java-lz4)))
8667 (native-inputs
8668 `(("junit" ,java-junit)
8669 ("hamcrest" ,java-hamcrest-all)
8670 ("objenesis" ,java-objenesis)
8671 ("asm" ,java-asm)
8672 ("cglib" ,java-cglib)
8673 ("javassist" ,java-jboss-javassist)
8674 ("snappy" ,java-snappy)
8675 ("easymock" ,java-easymock)
8676 ("powermock" ,java-powermock-core)
8677 ("powermock-easymock" ,java-powermock-api-easymock)
8678 ("powermock-junit4-common" ,java-powermock-modules-junit4-common)
8679 ("powermock-junit4" ,java-powermock-modules-junit4)
8680 ("powermock-support" ,java-powermock-api-support)
50d70a72 8681 ("java-bouncycastle" ,java-bouncycastle)))
46c6905a
JL
8682 (home-page "https://kafka.apache.org")
8683 (synopsis "Distributed streaming platform")
8684 (description "Kafka is a distributed streaming platform, which means:
8685@itemize
8686@item it can publish and subscribe to streams of records;
8687@item it can store streams of records in a fault-tolerant way;
8688@item it can process streams of records as they occur.
8689@end itemize")
8690 ;; Either cddl or gpl2 only.
8691 (license (list license:cddl1.1; actually cddl1.1
8692 license:gpl2)))); with classpath exception
0b54e190
JL
8693
8694(define-public java-jdom
8695 (package
8696 (name "java-jdom")
8697 (version "1.1.3")
8698 (source (origin
8699 (method url-fetch)
8700 (uri (string-append "http://jdom.org/dist/binary/archive/jdom-"
8701 version ".tar.gz"))
8702 (sha256
8703 (base32
8704 "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl"))))
8705 (build-system ant-build-system)
8706 (arguments
8707 `(#:build-target "package"
8708 #:tests? #f; tests are run as part of the build process
8709 #:phases
8710 (modify-phases %standard-phases
8711 (replace 'install
8712 (install-jars "build")))))
8713 (home-page "http://jdom.org/")
8714 (synopsis "Access, manipulate, and output XML data")
8715 (description "Java-based solution for accessing, manipulating, and
8716outputting XML data from Java code.")
8717 (license license:bsd-4)))
78745d33
JL
8718
8719(define-public java-geronimo-xbean-reflect
8720 (package
8721 (name "java-geronimo-xbean-reflect")
8722 (version "4.5")
8723 (source (origin
8724 (method svn-fetch)
8725 (uri (svn-reference
8726 (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/")
8727 (revision 1807396)))
8728 (file-name (string-append name "-" version))
8729 (sha256
8730 (base32
8731 "18q3i6jgm6rkw8aysfgihgywrdc5nvijrwnslmi3ww497jvri6ja"))))
8732 (build-system ant-build-system)
8733 (arguments
8734 `(#:jar-name "geronimo-xbean-reflect.jar"
8735 #:source-dir "xbean-reflect/src/main/java"
8736 #:test-dir "xbean-reflect/src/test"
8737 #:jdk ,icedtea-8
8738 #:test-exclude
8739 (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java"
8740 "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java"
8741 "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java")
8742 #:phases
8743 (modify-phases %standard-phases
8744 (add-before 'build 'fix-source
8745 (lambda _
8746 (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/"))
8747 ;; org.apache.xbean.asm6 is actually repackaged java-asm
8748 (substitute* (string-append dir "XbeanAsmParameterNameLoader.java")
8749 (("org.apache.xbean.asm5") "org.objectweb.asm"))
8750 #t))))))
8751 (inputs
8752 `(("asm" ,java-asm)
8753 ("log4j" ,java-log4j-api)
8754 ("log4j-1.2" ,java-log4j-1.2-api)
8755 ("log4j-core" ,java-log4j-core)
8756 ("logging" ,java-commons-logging-minimal)))
8757 (native-inputs
8758 `(("junit" ,java-junit)))
8759 (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/")
8760 (synopsis "Dependency injection helper")
8761 (description "Xbean-reflect provides very flexible ways to create objects
8762and graphs of objects for dependency injection frameworks")
8763 (license license:asl2.0)))
09c44196 8764
3fda539b
JL
8765(define-public java-geronimo-xbean-bundleutils
8766 (package
8767 (inherit java-geronimo-xbean-reflect)
8768 (name "java-geronimo-xbean-bundleutils")
8769 (arguments
8770 `(#:jar-name "geronimo-xbean-bundleutils.jar"
8771 #:source-dir "xbean-bundleutils/src/main/java"
8772 #:test-dir "xbean-bundleutils/src/test"
8773 #:phases
8774 (modify-phases %standard-phases
8775 (add-before 'build 'fix-java
8776 (lambda _
8777 ;; We use a more recent version of osgi, so this file requires
8778 ;; more interface method implementations.
8779 (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java"
8780 (("import org.osgi.framework.ServiceRegistration;")
8781 "import org.osgi.framework.ServiceRegistration;
8782import org.osgi.framework.ServiceFactory;
8783import java.util.Collection;
8784import org.osgi.framework.ServiceObjects;")
8785 (("public Bundle getBundle\\(\\)")
8786 "@Override
8787public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) {
8788 throw new UnsupportedOperationException();
8789}
8790@Override
8791public <S> ServiceRegistration<S> registerService(Class<S> clazz,
8792 ServiceFactory<S> factory, Dictionary<String, ?> properties) {
8793 throw new UnsupportedOperationException();
8794}
8795public Bundle getBundle()"))
8796 #t)))))
8797 (inputs
8798 `(("java-slf4j" ,java-slf4j-api)
8799 ("java-asm" ,java-asm)
8800 ("java-osgi-framework" ,java-osgi-framework)
8801 ("java-eclipse-osgi" ,java-eclipse-osgi)
8802 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)))))
0cb9ce32
JL
8803
8804(define-public java-geronimo-xbean-asm-util
8805 (package
8806 (inherit java-geronimo-xbean-reflect)
8807 (name "java-geronimo-xbean-asm-util")
8808 (arguments
8809 `(#:jar-name "geronimo-xbean-asm-util.jar"
8810 #:source-dir "xbean-asm-util/src/main/java"
8811 #:tests? #f)); no tests
8812 (inputs
8813 `(("java-asm" ,java-asm)))
8814 (native-inputs '())))
8d510f65
JL
8815
8816(define-public java-geronimo-xbean-finder
8817 (package
8818 (inherit java-geronimo-xbean-reflect)
8819 (name "java-geronimo-xbean-finder")
8820 (arguments
8821 `(#:jar-name "geronimo-xbean-finder.jar"
8822 #:source-dir "xbean-finder/src/main/java"
8823 #:test-dir "xbean-finder/src/test"))
8824 (inputs
8825 `(("java-slf4j-api" ,java-slf4j-api)
8826 ("java-asm" ,java-asm)
8827 ("java-geronimo-xbean-bundleutils" ,java-geronimo-xbean-bundleutils)
8828 ("java-geronimo-xbean-asm-util" ,java-geronimo-xbean-asm-util)
8829 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)
8830 ("java-osgi-framework" ,java-osgi-framework)))
8831 (native-inputs
8832 `(("java-junit" ,java-junit)
8833 ("java-hamcrest-core" ,java-hamcrest-core)))))
3fda539b 8834
09c44196
JL
8835(define-public java-gson
8836 (package
8837 (name "java-gson")
8838 (version "2.8.2")
8839 (source (origin
8840 (method url-fetch)
8841 (uri (string-append "https://github.com/google/gson/archive/"
8842 "gson-parent-" version ".tar.gz"))
8843 (sha256
8844 (base32
8845 "1j4qnp7v046q0k48c4kyf69sxaasx2h949d3cqwsm3kzxms3x0f9"))))
8846 (build-system ant-build-system)
8847 (arguments
8848 `(#:jar-name "gson.jar"
8849 #:source-dir "gson/src/main/java"
8850 #:test-dir "gson/src/test"))
8851 (native-inputs
8852 `(("java-junit" ,java-junit)
8853 ("java-hamcrest-core" ,java-hamcrest-core)))
8854 (home-page "https://github.com/google/gson")
8855 (synopsis "Java serialization/deserialization library from/to JSON")
8856 (description "Gson is a Java library that can be used to convert Java
8857Objects into their JSON representation. It can also be used to convert a JSON
8858string to an equivalent Java object. Gson can work with arbitrary Java objects
8859including pre-existing objects that you do not have source-code of.")
8860 (license license:asl2.0)))
335aa20b
JL
8861
8862(define-public java-hawtjni
8863 (package
8864 (name "java-hawtjni")
8865 (version "1.15")
8866 (source (origin
8867 (method url-fetch)
8868 (uri (string-append "https://github.com/fusesource/hawtjni/archive/"
8869 "hawtjni-project-" version ".tar.gz"))
8870 (sha256
8871 (base32
8872 "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g"))))
8873 (build-system ant-build-system)
8874 (arguments
8875 `(#:jar-name "hawtjni.jar"
8876 #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java"
8877 #:tests? #f; no tests
8878 #:phases
8879 (modify-phases %standard-phases
8880 (add-before 'build 'build-native
8881 (lambda* (#:key inputs #:allow-other-keys)
6338ea9a
RW
8882 (let ((include (string-append "-I" (assoc-ref inputs "jdk") "/include/linux")))
8883 (with-directory-excursion "hawtjni-generator/src/main/resources/"
8884 (invoke "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o"
8885 "-fPIC" "-O2" include)
8886 (invoke "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o"
8887 "-fPIC" "-O2" include)
8888 (invoke "gcc" "-o" "libhawtjni.so" "-shared"
8889 "hawtjni.o" "hawtjni-callback.o")))
8890 #t))
335aa20b
JL
8891 (add-after 'install 'install-native
8892 (lambda* (#:key outputs #:allow-other-keys)
8893 (let* ((out (assoc-ref outputs "out"))
8894 (lib (string-append out "/lib"))
8895 (inc (string-append out "/include")))
335aa20b 8896 (with-directory-excursion "hawtjni-generator/src/main/resources/"
6338ea9a
RW
8897 (install-file "libhawtjni.so" lib)
8898 (install-file "hawtjni.h" inc)))
335aa20b
JL
8899 #t)))))
8900 (inputs
8901 `(("java-commons-cli" ,java-commons-cli)
8902 ("java-asm" ,java-asm)
8903 ("java-geronimo-xbean-finder" ,java-geronimo-xbean-finder)))
8904 (home-page "https://fusesource.github.io/hawtjni/")
8905 (synopsis "JNI code generator")
8906 (description "HawtJNI is a code generator that produces the JNI code needed
8907to implement Java native methods. It is based on the jnigen code generator
8908that is part of the SWT Tools project.")
8909 (license license:asl2.0)))
d0c62afa
JL
8910
8911(define-public java-jansi-native
8912 (package
8913 (name "java-jansi-native")
8914 (version "1.7")
8915 (source (origin
8916 (method url-fetch)
8917 (uri (string-append "https://github.com/fusesource/jansi-native/"
8918 "archive/jansi-native-" version ".tar.gz"))
8919 (sha256
8920 (base32
8921 "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf"))))
8922 (build-system ant-build-system)
8923 (arguments
8924 `(#:jar-name "jansi-native.jar"
8925 #:source-dir "src/main/java"
8926 #:tests? #f; no tests
8927 #:phases
8928 (modify-phases %standard-phases
8929 (add-before 'build 'build-native
8930 (lambda* (#:key inputs #:allow-other-keys)
8931 ;; there are more required files for windows in windows/
8932 (with-directory-excursion "src/main/native-package/src"
8933 (substitute* "jansi_ttyname.c"
8934 (("#include \"jansi_.*") ""))
e85c1bf6
RW
8935 (invoke "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o"
8936 (string-append "-I" (assoc-ref inputs "java-hawtjni")
8937 "/include")
8938 (string-append "-I" (assoc-ref inputs "jdk")
8939 "/include/linux")
8940 "-fPIC" "-O2")
8941 (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o")
8942 #t)))
d0c62afa
JL
8943 (add-before 'build 'install-native
8944 (lambda _
8945 (let ((dir (string-append "build/classes/META-INF/native/"
8946 ,(match (%current-system)
8947 ((or "i686-linux" "armhf-linux")
8948 "linux32")
8949 ((or "x86_64-linux" "aarch64-linux")
8950 "linux64")))))
8951 (install-file "src/main/native-package/src/libjansi.so" dir))
8952 #t))
8953 (add-after 'install 'install-native
8954 (lambda* (#:key outputs #:allow-other-keys)
d0c62afa
JL
8955 (install-file "src/main/native-package/src/jansi.h"
8956 (string-append (assoc-ref outputs "out") "/include"))
8957 #t)))))
8958 (inputs
8959 `(("java-hawtjni" ,java-hawtjni)))
8960 (home-page "https://fusesource.github.io/jansi/")
8961 (synopsis "Native library for jansi")
3d6925ef
RW
8962 (description "This package provides the native library for jansi, a small
8963Java library that allows you to use ANSI escape sequences to format your
8964console output.")
d0c62afa 8965 (license license:asl2.0)))
a87ea1ad
JL
8966
8967(define-public java-jansi
8968 (package
8969 (name "java-jansi")
8970 (version "1.16")
8971 (source (origin
8972 (method url-fetch)
8973 (uri (string-append "https://github.com/fusesource/jansi/archive/"
8974 "jansi-project-" version ".tar.gz"))
8975 (sha256
8976 (base32
8977 "11kh3144i3fzp21dpy8zg52mjmsr214k7km9p8ly0rqk2px0qq2z"))))
8978 (build-system ant-build-system)
8979 (arguments
8980 `(#:jar-name "jansi.jar"
8981 #:source-dir "jansi/src/main/java"
8982 #:test-dir "jansi/src/test"
8983 #:phases
8984 (modify-phases %standard-phases
8985 (add-after 'check 'clear-term
8986 (lambda _
8987 (zero? (system* "echo" "-e" "\\e[0m")))))))
8988 (inputs
8989 `(("java-jansi-native" ,java-jansi-native)))
8990 (native-inputs
8991 `(("java-junit" ,java-junit)
8992 ("java-hamcrest-core" ,java-hamcrest-core)))
8993 (home-page "https://fusesource.github.io/jansi/")
8994 (synopsis "Portable ANSI escape sequences")
8995 (description "Jansi is a Java library that allows you to use ANSI escape
8996sequences to format your console output which works on every platform.")
8997 (license license:asl2.0)))
cc061329
JL
8998
8999(define-public java-jboss-el-api-spec
9000 (package
9001 (name "java-jboss-el-api-spec")
9002 (version "3.0")
9003 (source (origin
9004 (method url-fetch)
9005 (uri (string-append "https://github.com/jboss/jboss-el-api_spec/"
9006 "archive/jboss-el-api_" version
9007 "_spec-1.0.7.Final.tar.gz"))
9008 (sha256
9009 (base32
9010 "1j45ljxalwlibxl7g7iv952sjxkw275m8vyxxij8l6wdd5pf0pdh"))))
9011 (build-system ant-build-system)
9012 (arguments
9013 `(#:jar-name "java-jboss-el-api_spec.jar"
9014 #:jdk ,icedtea-8))
9015 (inputs
9016 `(("java-junit" ,java-junit)))
9017 (home-page "https://github.com/jboss/jboss-el-api_spec")
9018 (synopsis "JSR-341 expression language 3.0 API")
9019 (description "This package contains an implementation of the JSR-341
9020specification for the expression language 3.0. It implements an expression
9021language inspired by ECMAScript and XPath. This language is used with
9022JavaServer Pages (JSP).")
9023 ;; Either GPL2 only or CDDL.
9024 (license (list license:gpl2 license:cddl1.1))))
cc03a786
JL
9025
9026(define-public java-jboss-interceptors-api-spec
9027 (package
9028 (name "java-jboss-interceptors-api-spec")
9029 (version "1.2")
9030 (source (origin
9031 (method url-fetch)
9032 (uri (string-append "https://github.com/jboss/jboss-interceptors-api_spec/"
9033 "archive/jboss-interceptors-api_" version
9034 "_spec-1.0.0.Final.tar.gz"))
9035 (sha256
9036 (base32
9037 "0wv8x0jp9a5qxlrgkhb5jdk2gr6vi87b4j4kjb8ryxiy9gn8g51z"))))
9038 (build-system ant-build-system)
9039 (arguments
9040 `(#:jar-name "java-jboss-interceptors-api_spec.jar"
9041 #:jdk ,icedtea-8
9042 #:source-dir "."
9043 #:tests? #f)); no tests
9044 (home-page "https://github.com/jboss/jboss-interceptors-api_spec")
9045 (synopsis "Interceptors 1.2 API classes from JSR 318")
9046 (description "Java-jboss-interceptors-api-spec implements the Interceptors
9047API. Interceptors are used to interpose on business method invocations and
9048specific events.")
9049 ;; Either GPL2 only or CDDL.
9050 (license (list license:gpl2 license:cddl1.1))))
a10a451c
JL
9051
9052(define-public java-cdi-api
9053 (package
9054 (name "java-cdi-api")
9055 (version "2.0")
9056 (source (origin
9057 (method url-fetch)
9058 (uri (string-append "https://github.com/cdi-spec/cdi/archive/"
9059 version ".tar.gz"))
9060 (file-name (string-append name "-" version ".tar.gz"))
9061 (sha256
9062 (base32
9063 "1iv8b8bp07c5kmqic14jsr868vycjv4qv02lf3pkgp9z21mnfg5y"))))
9064 (build-system ant-build-system)
9065 (arguments
9066 `(#:source-dir "api/src/main/java"
9067 #:jar-name "java-cdi-api.jar"
9068 #:test-dir "api/src/test"
9069 #:jdk ,icedtea-8
9070 #:tests? #f)); Tests fail because we don't have a CDI provider yet
9071 (inputs
9072 `(("java-javax-inject" ,java-javax-inject)
9073 ("java-jboss-el-api-spec" ,java-jboss-el-api-spec)
9074 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)))
9075 (native-inputs
9076 `(("java-testng" ,java-testng)
9077 ("java-hamcrest-core" ,java-hamcrest-core)))
9078 (home-page "http://cdi-spec.org/")
9079 (synopsis "Contexts and Dependency Injection APIs")
9080 (description "Java-cdi-api contains the required APIs for Contexts and
9081Dependency Injection (CDI).")
9082 (license license:asl2.0)))
d57fd728
JL
9083
9084(define-public java-joda-convert
9085 (package
9086 (name "java-joda-convert")
9087 (version "1.9.2")
9088 (source (origin
9089 (method url-fetch)
9090 (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v"
9091 version ".tar.gz"))
9092 (file-name (string-append name "-" version ".tar.gz"))
9093 (sha256
9094 (base32
9095 "0vp346xz7dh9br4q7xazhc7hvzf76a6hf95fki9bg67q5jr0kjh7"))))
9096 (build-system ant-build-system)
9097 (arguments
9098 `(#:jar-name (string-append ,name "-" ,version ".jar")
9099 #:source-dir "src/main/java"
9100 #:test-include (list "**/Test*.java")
9101 ;; Contains only interfaces and base classes (no test)
9102 #:test-exclude (list "**/test*/**.java")))
9103 (inputs
9104 `(("java-guava" ,java-guava)))
9105 (native-inputs
9106 `(("java-junit" ,java-junit)
9107 ("java-hamcrest-core" ,java-hamcrest-core)))
9108 (home-page "http://www.joda.org/joda-convert/")
9109 (synopsis "Conversion between Objects and Strings")
9110 (description "Joda-Convert provides a small set of classes to aid
9111conversion between Objects and Strings. It is not intended to tackle the
9112wider problem of Object to Object transformation.")
9113 (license license:asl2.0)))
0158ea8a
JL
9114
9115(define-public java-joda-time
9116 (package
9117 (name "java-joda-time")
9118 (version "2.9.9")
9119 (source (origin
9120 (method url-fetch)
9121 (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v"
9122 version ".tar.gz"))
9123 (file-name (string-append name "-" version ".tar.gz"))
9124 (sha256
9125 (base32
9126 "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1"))))
9127 (build-system ant-build-system)
9128 (arguments
9129 `(#:jar-name "java-joda-time.jar"
9130 #:source-dir "src/main/java"
9131 #:test-include (list "**/Test*.java")
9132 ;; There is no runnable test in these files
9133 #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java")
9134 #:phases
9135 (modify-phases %standard-phases
9136 (add-after 'build 'build-resources
9137 (lambda _
9138 (mkdir-p "build/classes/org/joda/time/tz/data")
9139 (mkdir-p "build/classes/org/joda/time/format")
6d0368eb
JL
9140 ;; This will produce the following exception:
9141 ;; java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap"
9142 ;; which is normal, because it doesn't exist yet. It still generates
9143 ;; the same file as in the binary one can find on maven.
9144 (invoke "java" "-cp"
9145 (string-append "build/classes:" (getenv "CLASSPATH"))
9146 "org.joda.time.tz.ZoneInfoCompiler"
9147 "-src" "src/main/java/org/joda/time/tz/src"
9148 "-dst" "build/classes/org/joda/time/tz/data"
9149 "africa" "antarctica" "asia" "australasia"
9150 "europe" "northamerica" "southamerica"
9151 "pacificnew" "etcetera" "backward" "systemv")
0158ea8a
JL
9152 (for-each (lambda (f)
9153 (copy-file f (string-append
9154 "build/classes/org/joda/time/format/"
9155 (basename f))))
9156 (find-files "src/main/java/org/joda/time/format" ".*.properties"))
9157 #t))
9158 (add-before 'install 'regenerate-jar
9159 (lambda _
9160 ;; We need to regenerate the jar file to add generated data.
9161 (delete-file "build/jar/java-joda-time.jar")
6d0368eb 9162 (invoke "ant" "jar")))
0158ea8a
JL
9163 (add-before 'check 'copy-test-resources
9164 (lambda _
9165 (mkdir-p "build/test-classes/org/joda/time/tz/data")
9166 (copy-file "src/test/resources/tzdata/ZoneInfoMap"
9167 "build/test-classes/org/joda/time/tz/data/ZoneInfoMap")
9168 (copy-recursively "src/test/resources" "build/test-classes")
9169 #t)))))
9170 (inputs
9171 `(("java-joda-convert" ,java-joda-convert)))
9172 (native-inputs
9173 `(("java-junit" ,java-junit)
9174 ("java-hamcrest-core" ,java-hamcrest-core)
9175 ("tzdata" ,tzdata)))
9176 (home-page "http://www.joda.org/joda-time/")
9177 (synopsis "Replacement for the Java date and time classes")
9178 (description "Joda-Time is a replacement for the Java date and time
9179classes prior to Java SE 8.")
9180 (license license:asl2.0)))
6d0368eb
JL
9181
9182(define-public java-xerces
9183 (package
9184 (name "java-xerces")
9185 (version "2.11.0")
9186 (source
9187 (origin
9188 (method url-fetch)
9189 (uri (string-append "mirror://apache/xerces/j/source/"
9190 "Xerces-J-src." version ".tar.gz"))
9191 (sha256
9192 (base32 "1006igwy2lqrmjvdk64v8dg6qbk9c29pm8xxx7r87n0vnpvmx6pm"))
9193 (patches (search-patches
9194 "java-xerces-xjavac_taskdef.patch"
9195 "java-xerces-build_dont_unzip.patch"
9196 "java-xerces-bootclasspath.patch"))))
9197 (build-system ant-build-system)
9198 (arguments
9199 `(#:tests? #f;; Test files are not present
9200 #:test-target "test"
9201 #:jdk ,icedtea-8
9202 #:phases
9203 (modify-phases %standard-phases
9204 (add-after 'unpack 'create-build.properties
9205 (lambda* (#:key inputs #:allow-other-keys)
9206 (let ((jaxp (assoc-ref inputs "java-jaxp"))
9207 (resolver (assoc-ref inputs "java-apache-xml-commons-resolver")))
9208 (with-output-to-file "build.properties"
9209 (lambda _
9210 (format #t
9211 "jar.jaxp = ~a/share/java/jaxp.jar~@
9212 jar.apis-ext = ~a/share/java/jaxp.jar~@
9213 jar.resolver = ~a/share/java/xml-resolver.jar~%"
9214 jaxp jaxp resolver)))
9215 ;; Make xerces use our version of jaxp in tests
9216 (substitute* "build.xml"
9217 (("xml-apis.jar")
9218 (string-append jaxp "/share/java/jaxp.jar"))
9219 (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}")
9220 "${jar.apis}")))
9221 #t))
9222 (replace 'install (install-jars "build")))))
9223 (inputs
9224 `(("java-apache-xml-commons-resolver" ,java-apache-xml-commons-resolver)
9225 ("java-jaxp" ,java-jaxp)))
9226 (home-page "https://xerces.apache.org/xerces2-j/")
9227 (synopsis "Validating XML parser for Java with DOM level 3 support")
9228 (description "The Xerces2 Java parser is the reference implementation of
9229XNI, the Xerces Native Interface, and also a fully conforming XML Schema
9230processor.
9231
9232Xerces2-J supports the following standards and APIs:
9233
9234@itemize
9235@item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation
9236@item Namespaces in XML Recommendation
9237@item Document Object Model (DOM) Level 2 Core, Events, and Traversal and
9238 Range Recommendations
9239@item Simple API for XML (SAX) 2.0.1 Core and Extension
9240@item Java APIs for XML Processing (JAXP) 1.2.01
9241@item XML Schema 1.0 Structures and Datatypes Recommendations
9242@item Experimental implementation of the Document Object Model (DOM) Level 3
9243 Core and Load/Save Working Drafts
9244@item Provides a partial implementation of the XML Inclusions (XInclude) W3C
9245 Candidate Recommendation
9246@end itemize
9247
9248Xerces is now able to parse documents written according to the XML 1.1
9249Candidate Recommendation, except that it does not yet provide an option to
9250enable normalization checking as described in section 2.13 of this
9251specification. It also handles namespaces according to the XML Namespaces 1.1
9252Candidate Recommendation, and will correctly serialize XML 1.1 documents if
9253the DOM level 3 load/save API's are in use.")
9254 (license license:asl2.0)))
e06bf428
JL
9255
9256(define-public java-jline
9257 (package
9258 (name "java-jline")
9259 (version "1.0")
9260 (source (origin
9261 (method url-fetch)
9262 (uri (string-append "https://github.com/jline/jline1/archive/jline-"
9263 version ".tar.gz"))
9264 (sha256
9265 (base32
9266 "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir"))))
9267 (build-system ant-build-system)
9268 (arguments
9269 `(#:jar-name "jline.jar"
9270 #:source-dir "src/main/java"
9271 #:test-dir "src/test"
9272 #:phases
9273 (modify-phases %standard-phases
9274 (add-before 'build 'copy-resources
9275 (lambda _
9276 (copy-recursively "src/main/resources" "build/classes")
9277 #t)))))
9278 (native-inputs
9279 `(("java-junit" ,java-junit)))
9280 (home-page "https://jline.github.io")
9281 (synopsis "Console input handling library")
9282 (description "JLine is a Java library for handling console input. It is
9283similar in functionality to BSD editline and GNU readline but with additional
9284features that bring it on par with the Z shell line editor.")
9285 (license license:bsd-3)))
7ac4f054 9286
49d74311
JL
9287(define-public java-jline-2
9288 (package
9289 (inherit java-jline)
9290 (version "2.14.5")
9291 (source (origin
9292 (method url-fetch)
9293 (uri (string-append "https://github.com/jline/jline2/archive/jline-"
9294 version ".tar.gz"))
9295 (sha256
9296 (base32
9297 "1c6qa26mf0viw8hg4jnv72s7i1qb1gh1l8rrzcdvqhqhx82rkdlf"))))
9298 (arguments
9299 `(#:jdk ,icedtea-8
9300 ,@(package-arguments java-jline)))
9301 (inputs
9302 `(("java-jansi" ,java-jansi)
9303 ("java-jansi-native" ,java-jansi-native)))
9304 (native-inputs
9305 `(("java-powermock-modules-junit4" ,java-powermock-modules-junit4)
9306 ("java-powermock-modules-junit4-common" ,java-powermock-modules-junit4-common)
9307 ("java-powermock-api-easymock" ,java-powermock-api-easymock)
9308 ("java-powermock-api-support" ,java-powermock-api-support)
9309 ("java-powermock-core" ,java-powermock-core)
9310 ("java-powermock-reflect" ,java-powermock-reflect)
9311 ("java-easymock" ,java-easymock)
9312 ("java-jboss-javassist" ,java-jboss-javassist)
9313 ("java-objenesis" ,java-objenesis)
9314 ("java-asm" ,java-asm)
9315 ("java-hamcrest-core" ,java-hamcrest-core)
9316 ("java-cglib" ,java-cglib)
9317 ("java-junit" ,java-junit)
9318 ("java-hawtjni" ,java-hawtjni)))))
9319
7ac4f054
JL
9320(define-public java-xmlunit
9321 (package
9322 (name "java-xmlunit")
9323 (version "2.5.1")
9324 (source (origin
9325 (method url-fetch)
9326 (uri (string-append "https://github.com/xmlunit/xmlunit/archive/v"
9327 version ".tar.gz"))
9328 (file-name (string-append name "-" version ".tar.gz"))
9329 (sha256
9330 (base32
9331 "035rivlnmwhfqj0fzviciv0bkh1h95ps1iwnh2kjcvdbk5nccm4z"))))
9332 (build-system ant-build-system)
9333 (arguments
9334 `(#:jar-name "java-xmlunit.jar"
9335 #:source-dir "xmlunit-core/src/main/java"
9336 #:test-dir "xmlunit-core/src/test"
9337 #:phases
9338 (modify-phases %standard-phases
9339 (add-before 'check 'copy-test-resources
9340 (lambda* (#:key inputs #:allow-other-keys)
9341 (copy-recursively (assoc-ref inputs "resources") "../test-resources")
9342 #t)))))
9343 (native-inputs
9344 `(("java-junit" ,java-junit)
9345 ("java-mockito-1" ,java-mockito-1)
9346 ("java-hamcrest-all" ,java-hamcrest-all)
9347 ("java-objenesis" ,java-objenesis)
9348 ("java-asm" ,java-asm)
9349 ("java-cglib" ,java-cglib)
9350 ("resources"
9351 ,(origin
9352 (method git-fetch)
9353 (uri (git-reference
9354 (url "https://github.com/xmlunit/test-resources.git")
9355 (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec")))
9356 (file-name "java-xmlunit-test-resources")
9357 (sha256
9358 (base32
9359 "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr"))))))
9360 (home-page "http://www.xmlunit.org/")
9361 (synopsis "XML output testing")
9362 (description "XMLUnit provides you with the tools to verify the XML you
9363emit is the one you want to create. It provides helpers to validate against
9364an XML Schema, assert the values of XPath queries or compare XML documents
9365against expected outcomes.")
9366 (license license:asl2.0)))
73a1f10a
JL
9367
9368(define-public java-xmlunit-legacy
9369 (package
9370 (inherit java-xmlunit)
9371 (name "java-xmlunit-legacy")
9372 (arguments
9373 `(#:jar-name "java-xmlunit-legacy.jar"
9374 #:source-dir "xmlunit-legacy/src/main/java"
9375 #:test-dir "xmlunit-legacy/src/test"))
9376 (inputs
9377 `(("java-xmlunit" ,java-xmlunit)
9378 ("java-junit" ,java-junit)))
9379 (native-inputs
9380 `(("java-mockito-1" ,java-mockito-1)))))
93abc975
RW
9381
9382(define-public java-openchart2
9383 (package
9384 (name "java-openchart2")
9385 (version "1.4.3")
9386 (source (origin
9387 (method url-fetch)
9388 (uri (string-append "http://download.approximatrix.com/openchart2/"
9389 "openchart2-" version ".source.zip"))
9390 (sha256
9391 (base32
9392 "1xq96zm5r02n1blja0072jmmsifmxc40lbyfbnmcnr6mw42frh4g"))))
9393 (build-system ant-build-system)
9394 (arguments
9395 `(#:test-target "test"
9396 #:phases
9397 (modify-phases %standard-phases
9398 (add-after 'unpack 'fix-junit-errors
9399 (lambda _
9400 (with-directory-excursion "unittest/src/com/approximatrix/charting/"
9401 (substitute* '("coordsystem/ticklocator/NumericXTickLocatorTest.java"
9402 "coordsystem/ticklocator/NumericYTickLocatorTest.java"
9403 "coordsystem/ticklocator/ObjectXTickLocatorTest.java"
9404 "model/DefaultChartDataModelConstraintsTest.java"
9405 "model/MultiScatterDataModelConstraintsTest.java"
9406 "model/threedimensional/DotPlotDataModelConstraintsTest.java")
9407 (("(assertEquals[^;]+);" before _)
9408 (string-append (string-drop-right before 2) ", 1E-6);"))))
9409 #t))
9410 (replace 'install (install-jars ".")))))
9411 (native-inputs
9412 `(("unzip" ,unzip)
9413 ("java-junit" ,java-junit)
9414 ("java-hamcrest-core" ,java-hamcrest-core)))
9415 (home-page "http://approximatrix.com/products/openchart2/")
9416 (synopsis "Simple plotting for Java")
9417 (description "Openchart2 provides a simple, yet powerful, interface for
9418Java programmers to create two-dimensional charts and plots. The library
9419features an assortment of graph styles, including advanced scatter plots, bar
9420graphs, and pie charts.")
9421 (license license:lgpl2.1+)))
5f5b31c6
JL
9422
9423(define-public java-commons-httpclient
9424 (package
9425 (name "java-commons-httpclient")
9426 (version "3.1")
9427 (source (origin
9428 (method url-fetch)
9429 (uri (string-append "https://archive.apache.org/dist/httpcomponents/"
9430 "commons-httpclient/source/commons-httpclient-"
9431 version "-src.tar.gz"))
9432 (sha256
9433 (base32
9434 "1wlpn3cfy3d4inxy6g7wxcsa8p7sshn6aldk9y4ia3lb879rd97r"))))
9435 (build-system ant-build-system)
9436 (arguments
9437 `(#:build-target "compile"
9438 #:test-target "test"
9439 #:tests? #f; requires junit-textui (junit 3)
9440 #:phases
9441 (modify-phases %standard-phases
9442 (add-before 'build 'fix-accent
9443 (lambda _
9444 (for-each (lambda (file)
9445 (with-fluids ((%default-port-encoding "ISO-8859-1"))
9446 (substitute* file
9447 (("\\* @author Ortwin .*") "* @author Ortwin Glueck\n"))))
9448 '("src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java"
9449 "src/examples/TrivialApp.java" "src/examples/ClientApp.java"
9450 "src/test/org/apache/commons/httpclient/TestHttps.java"
9451 "src/test/org/apache/commons/httpclient/TestURIUtil2.java"))))
9452 (replace 'install
9453 (lambda* (#:key outputs #:allow-other-keys)
9454 (invoke "ant" "dist"
9455 (string-append "-Ddist.home=" (assoc-ref outputs "out")
9456 "/share/java"))
9457 #t)))))
9458 (propagated-inputs
9459 `(("java-commons-logging" ,java-commons-logging-minimal)
9460 ("java-commons-codec" ,java-commons-codec)))
9461 (home-page "https://hc.apache.org")
9462 (synopsis "HTTP/1.1 compliant HTTP agent implementation")
9463 (description "This package contains an HTTP/1.1 compliant HTTP agent
9464implementation. It also provides reusable components for client-side
9465authentication, HTTP state management, and HTTP connection management.")
9466 (license license:asl2.0)))
5fe981dc
JL
9467
9468(define-public java-commons-vfs
9469 (package
9470 (name "java-commons-vfs")
9471 (version "2.2")
9472 (source (origin
9473 (method url-fetch)
9474 (uri (string-append "mirror://apache/commons/vfs/source/"
9475 "commons-vfs2-distribution-" version "-src.tar.gz"))
9476 (file-name (string-append name "-" version ".tar.gz"))
9477 (sha256
9478 (base32
9479 "1cnq1iaghbp4cslpnvwbp83i5v234x87irssqynhwpfgw7caf1s3"))
9480 (modules '((guix build utils)))
9481 (snippet
9482 '(begin
9483 (for-each delete-file
9484 (find-files "." "\\.jar$"))
9485 #t))))
9486 (build-system ant-build-system)
9487 (arguments
9488 `(#:jar-name "commons-vfs.jar"
9489 #:source-dir "commons-vfs2/src/main/java"
9490 #:test-dir "commons-vfs2/src/test"
9491 ; FIXME: tests depend on many things: apache sshd, hadoop, ftpserver, ...
9492 #:tests? #f
9493 #:phases
9494 (modify-phases %standard-phases
9495 (add-before 'build 'remove-hadoop-and-webdav
9496 ; Remove these files as they are not required and depend on difficult
9497 ; packages.
9498 (lambda _
9499 (for-each delete-file-recursively
9500 '("commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/webdav"
9501 "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs")))))))
9502 (inputs
9503 `(("java-commons-collections4" ,java-commons-collections4)
9504 ("java-commons-compress" ,java-commons-compress)
9505 ("java-commons-httpclient" ,java-commons-httpclient)
9506 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
9507 ("java-commons-net" ,java-commons-net)
9508 ("java-jsch" ,java-jsch)))
9509 (home-page "http://commons.apache.org/proper/commons-vfs/")
9510 (synopsis "Java filesystem library")
9511 (description "Commons VFS provides a single API for accessing various
9512different file systems. It presents a uniform view of the files from various
9513different sources, such as the files on local disk, on an HTTP server, or
9514inside a Zip archive.")
9515 (license license:asl2.0)))
f7b512c0
JL
9516
9517(define-public java-jakarta-oro
9518 (package
9519 (name "java-jakarta-oro")
9520 (version "2.0.8")
9521 (source (origin
9522 (method url-fetch)
9523 (uri (string-append "https://archive.apache.org/dist/jakarta/oro/"
9524 "jakarta-oro-" version ".tar.gz"))
9525 (sha256
9526 (base32
9527 "0rpmnsskiwmsy8r0sckz5n5dbvh3vkxx8hpm177c754r8xy3qksc"))
9528 (modules '((guix build utils)))
9529 (snippet
9530 `(begin
9531 (delete-file (string-append "jakarta-oro-" ,version ".jar"))
9532 #t))))
9533 (build-system ant-build-system)
9534 (arguments
9535 `(#:build-target "package"
9536 #:tests? #f; tests are run as part of the build process
9537 #:phases
9538 (modify-phases %standard-phases
9539 (replace 'install
9540 (install-jars ,(string-append "jakarta-oro-" version))))))
9541 (home-page "https://jakarta.apache.org/oro/")
9542 (synopsis "Text-processing for Java")
9543 (description "The Jakarta-ORO Java classes are a set of text-processing
9544Java classes that provide Perl5 compatible regular expressions, AWK-like
9545regular expressions, glob expressions, and utility classes for performing
9546substitutions, splits, filtering filenames, etc. This library is the successor
9547of the OROMatcher, AwkTools, PerlTools, and TextTools libraries originally
9548from ORO, Inc.")
9549 (license license:asl1.1)))
a970288c
JL
9550
9551(define-public java-native-access
9552 (package
9553 (name "java-native-access")
9554 (version "4.5.1")
9555 (source (origin
9556 (method url-fetch)
9557 (uri (string-append "https://github.com/java-native-access/jna/"
9558 "archive/" version ".tar.gz"))
9559 (file-name (string-append name "-" version ".tar.gz"))
9560 (sha256
9561 (base32
9562 "0zrpzkib6b905i018a9pqlzkqinphywr6y4jwv6mwp63jjqvqkd9"))
9563 (modules '((guix build utils)))
9564 (snippet
9565 `(begin
9566 (for-each delete-file (find-files "." ".*.jar"))
9567 (delete-file-recursively "native/libffi")
9568 (delete-file-recursively "dist")
9569 #t))))
9570 (build-system ant-build-system)
9571 (arguments
9572 `(#:tests? #f; FIXME: tests require reflections.jar
9573 #:test-target "test"
9574 #:make-flags (list "-Ddynlink.native=true")
9575 #:phases
9576 (modify-phases %standard-phases
9577 (add-before 'build 'fix-build.xml
9578 (lambda* (#:key inputs #:allow-other-keys)
9579 (substitute* "build.xml"
9580 ;; Since we removed the bundled ant.jar, give the correct path
9581 (("lib/ant.jar") (string-append (assoc-ref inputs "ant") "/lib/ant.jar"))
9582 ;; We removed generated native libraries. We can only rebuild one
9583 ;; so don't fail if we can't find a native library for another architecture.
9584 (("zipfileset") "zipfileset erroronmissingarchive=\"false\""))
9585 ;; Copy test dependencies
9586 (copy-file (string-append (assoc-ref inputs "java-junit")
9587 "/share/java/junit.jar")
9588 "lib/junit.jar")
9589 (copy-file (string-append (assoc-ref inputs "java-hamcrest-core")
9590 "/share/java/hamcrest-core.jar")
9591 "lib/hamcrest-core.jar")
9592 ;; FIXME: once reflections.jar is built, copy it to lib/test.
9593 #t))
9594 (add-before 'build 'build-native
9595 (lambda _
9596 (invoke "ant" "-Ddynlink.native=true" "native")
9597 #t))
9598 (replace 'install
9599 (install-jars "build")))))
9600 (inputs
9601 `(("libffi" ,libffi)
9602 ("libx11" ,libx11)
9603 ("libxt" ,libxt)))
9604 (native-inputs
9605 `(("java-junit" ,java-junit)
9606 ("java-hamcrest-core" ,java-hamcrest-core)))
9607 (home-page "https://github.com/java-native-access/jna")
9608 (synopsis "Access to native shared libraries from Java")
9609 (description "JNA provides Java programs easy access to native shared
9610libraries without writing anything but Java code - no JNI or native code is
9611required. JNA allows you to call directly into native functions using natural
9612Java method invocation.")
9613 ;; Java Native Access project (JNA) is dual-licensed under 2
9614 ;; alternative Free licenses: LGPL 2.1 or later and Apache License 2.0.
9615 (license (list
9616 license:asl2.0
9617 license:lgpl2.1+))))
cfb55cfc
JL
9618
9619(define-public java-native-access-platform
9620 (package
9621 (inherit java-native-access)
9622 (name "java-native-access-platform")
9623 (arguments
9624 `(#:test-target "test"
9625 #:tests? #f; require jna-test.jar
9626 #:phases
9627 (modify-phases %standard-phases
9628 (add-before 'build 'chdir
9629 (lambda _
9630 (chdir "contrib/platform")
9631 #t))
9632 (add-after 'chdir 'fix-ant
9633 (lambda* (#:key inputs #:allow-other-keys)
9634 (substitute* "nbproject/project.properties"
9635 (("../../build/jna.jar")
9636 (string-append (assoc-ref inputs "java-native-access")
9637 "/share/java/jna.jar"))
9638 (("../../lib/hamcrest-core-.*.jar")
9639 (string-append (assoc-ref inputs "java-hamcrest-core")
9640 "/share/java/hamcrest-core.jar"))
9641 (("../../lib/junit.jar")
9642 (string-append (assoc-ref inputs "java-junit")
9643 "/share/java/junit.jar")))
9644 #t))
9645 (replace 'install
9646 (install-jars "dist")))))
9647 (inputs
9648 `(("java-native-access" ,java-native-access)))
9649 (synopsis "Cross-platform mappings for jna")
9650 (description "java-native-access-platfrom has cross-platform mappings
9651and mappings for a number of commonly used platform functions, including a
9652large number of Win32 mappings as well as a set of utility classes that
9653simplify native access.")))
470674a5
JL
9654
9655(define-public java-jsch-agentproxy-core
9656 (package
9657 (name "java-jsch-agentproxy-core")
9658 (version "0.0.8")
9659 (source (origin
9660 (method url-fetch)
9661 (uri (string-append "https://github.com/ymnk/jsch-agent-proxy/archive/"
9662 version ".tar.gz"))
9663 (file-name (string-append name "-" version ".tar.gz"))
9664 (sha256
9665 (base32
9666 "02iqg6jbc1kxvfzqcg6wy9ygqxfm82bw5rf6vnswqy4y572niz4q"))))
9667 (build-system ant-build-system)
9668 (arguments
9669 `(#:jar-name "jsch-agentproxy-core.jar"
9670 #:source-dir "jsch-agent-proxy-core/src/main/java"
9671 #:tests? #f)); no tests
9672 (home-page "https://github.com/ymnk/jsch-agent-proxy")
f1d79c97 9673 (synopsis "Core component of the proxy to ssh-agent and Pageant in Java")
470674a5
JL
9674 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
9675and Pageant included Putty. It will be easily integrated into JSch, and users
9676will be allowed to use these programs for authentication.")
9677 (license license:bsd-3)))
f1d79c97
JL
9678
9679(define-public java-jsch-agentproxy-sshagent
9680 (package
9681 (inherit java-jsch-agentproxy-core)
9682 (name "java-jsch-agentproxy-sshagent")
9683 (arguments
9684 `(#:jar-name "jsch-agentproxy-sshagent.jar"
9685 #:source-dir "jsch-agent-proxy-sshagent/src/main/java"
9686 #:tests? #f)); no tests
9687 (inputs
9688 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
9689 (synopsis "Proxy to ssh-agent")
9690 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
9691and Pageant included in Putty. This component contains the code for a proxy to
9692ssh-agent.")))
f438e638
JL
9693
9694(define-public java-jsch-agentproxy-usocket-jna
9695 (package
9696 (inherit java-jsch-agentproxy-core)
9697 (name "java-jsch-agentproxy-usocket-jna")
9698 (arguments
9699 `(#:jar-name "jsch-agentproxy-usocket-jna.jar"
9700 #:source-dir "jsch-agent-proxy-usocket-jna/src/main/java"
9701 #:tests? #f)); no tests
9702 (inputs
9703 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
9704 ("java-native-access" ,java-native-access)))
9705 (synopsis "USocketFactory implementation using JNA")
9706 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
9707and Pageant included in Putty. This component contains an implementation of
9708USocketFactory using @dfn{JNA} (Java Native Access).")))
475225e3
JL
9709
9710(define-public java-jsch-agentproxy-pageant
9711 (package
9712 (inherit java-jsch-agentproxy-core)
9713 (name "java-jsch-agentproxy-pageant")
9714 (arguments
9715 `(#:jar-name "jsch-agentproxy-pageant.jar"
9716 #:source-dir "jsch-agent-proxy-pageant/src/main/java"
9717 #:tests? #f)); no tests
9718 (inputs
9719 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
9720 ("java-native-access" ,java-native-access)
9721 ("java-native-access-platform" ,java-native-access-platform)))
9722 (synopsis "Proxy to pageant")
9723 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
9724and Pageant included in Putty. This component contains the code for a proxy to
9725pageant.")))
96d6d9c7
JL
9726
9727(define-public java-jsch-agentproxy-usocket-nc
9728 (package
9729 (inherit java-jsch-agentproxy-core)
9730 (name "java-jsch-agentproxy-usocket-nc")
9731 (arguments
9732 `(#:jar-name "jsch-agentproxy-usocket-nc.jar"
9733 #:source-dir "jsch-agent-proxy-usocket-nc/src/main/java"
9734 #:tests? #f)); no tests
9735 (inputs
9736 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
9737 (synopsis "USocketFactory implementation using netcat")
9738 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
9739and Pageant included in Putty. This component contains an implementation of
9740USocketFactory using netcat.")))
5a46b17b
JL
9741
9742(define-public java-jsch-agentproxy-connector-factory
9743 (package
9744 (inherit java-jsch-agentproxy-core)
9745 (name "java-jsch-agentproxy-connector-factory")
9746 (arguments
9747 `(#:jar-name "jsch-agentproxy-connector-factory.jar"
9748 #:source-dir "jsch-agent-proxy-connector-factory/src/main/java"
9749 #:tests? #f)); no tests
9750 (inputs
9751 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
9752 ("java-jsch-agentproxy-sshagent" ,java-jsch-agentproxy-sshagent)
9753 ("java-jsch-agentproxy-usocket-jna" ,java-jsch-agentproxy-usocket-jna)
9754 ("java-jsch-agentproxy-pageant" ,java-jsch-agentproxy-pageant)
9755 ("java-jsch-agentproxy-usocket-nc" ,java-jsch-agentproxy-usocket-nc)))
9756 (synopsis "Connector factory for jsch agent proxy")
9757 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
9758and Pageant included in Putty. This component contains a connector factory.")))
b0fbf596
JL
9759
9760(define-public java-jsch-agentproxy-jsch
9761 (package
9762 (inherit java-jsch-agentproxy-core)
9763 (name "java-jsch-agentproxy-jsch")
9764 (arguments
9765 `(#:jar-name "jsch-agentproxy-jsch.jar"
9766 #:source-dir "jsch-agent-proxy-jsch/src/main/java"
9767 #:tests? #f)); no tests
9768 (inputs
9769 `(("java-jsch" ,java-jsch)
9770 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
9771 (synopsis "JSch integration library for agentproxy")
9772 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
9773and Pageant included in Putty. This component contains a library to use
9774jsch-agent-proxy with JSch.")))
f1f4a4f0
JL
9775
9776(define-public java-apache-ivy
9777 (package
9778 (name "java-apache-ivy")
9779 (version "2.4.0")
9780 (source (origin
9781 (method url-fetch)
9782 (uri (string-append "mirror://apache//ant/ivy/" version
9783 "/apache-ivy-" version "-src.tar.gz"))
9784 (sha256
9785 (base32
9786 "1xkfn57g2m7l6y0xdq75x5rnrgk52m9jx2xah70g3ggl8750hbr0"))
9787 (patches
9788 (search-patches
9789 "java-apache-ivy-port-to-latest-bouncycastle.patch"))))
9790 (build-system ant-build-system)
9791 (arguments
9792 `(#:jar-name "ivy.jar"
9793 #:tests? #f
9794 #:phases
9795 (modify-phases %standard-phases
9796 (add-before 'build 'remove-example
9797 (lambda _
9798 (delete-file-recursively "src/example")
9799 #t))
9800 (add-before 'build 'copy-resources
9801 (lambda _
9802 (with-directory-excursion "src/java"
9803 (for-each (lambda (file)
9804 (install-file file (string-append "../../build/classes/" (dirname file))))
9805 (append
9806 (find-files "." ".*.css")
9807 (find-files "." ".*.ent")
9808 (find-files "." ".*.html")
9809 (find-files "." ".*.properties")
9810 (find-files "." ".*.xsd")
9811 (find-files "." ".*.xsl")
9812 (find-files "." ".*.xml"))))))
9813 (add-before 'build 'fix-vfs
9814 (lambda _
9815 (substitute*
9816 '("src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java"
9817 "src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java")
9818 (("import org.apache.commons.vfs") "import org.apache.commons.vfs2"))
9819 #t))
9820 (add-before 'install 'copy-manifest
9821 (lambda _
9822 (install-file "META-INF/MANIFEST.MF" "build/classes/META-INF")
9823 #t))
9824 (add-before 'install 'repack
9825 (lambda _
9826 (invoke "jar" "-cmf" "build/classes/META-INF/MANIFEST.MF" "build/jar/ivy.jar"
9827 "-C" "build/classes" ".")
9828 #t))
9829 (add-after 'install 'install-bin
9830 (lambda* (#:key outputs #:allow-other-keys)
9831 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
9832 (ivy (string-append bin "/ivy"))
9833 (jar (string-append (assoc-ref outputs "out") "/share/java/ivy.jar")))
9834 (mkdir-p bin)
9835 (with-output-to-file ivy
9836 (lambda _
9837 (display (string-append
9838 "#!" (which "sh") "\n"
9839 "if [[ -z $CLASSPATH ]]; then\n"
9840 " cp=\"" (getenv "CLASSPATH") ":" jar "\"\n"
9841 "else\n"
9842 " cp=\"" (getenv "CLASSPATH") ":" jar ":$CLASSPATH\"\n"
9843 "fi\n"
9844 (which "java") " -cp $cp org.apache.ivy.Main $@\n"))))
9845 (chmod ivy #o755)
9846 #t))))))
9847 (inputs
9848 `(("java-bouncycastle" ,java-bouncycastle)
9849 ("java-commons-cli" ,java-commons-cli)
9850 ("java-commons-collections" ,java-commons-collections)
9851 ("java-commons-httpclient" ,java-commons-httpclient)
9852 ("java-commons-lang" ,java-commons-lang)
9853 ("java-commons-vfs" ,java-commons-vfs)
9854 ("java-jakarta-oro" ,java-jakarta-oro)
9855 ("java-jsch" ,java-jsch)
9856 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
9857 ("java-jsch-agentproxy-connector-factory" ,java-jsch-agentproxy-connector-factory)
9858 ("java-jsch-agentproxy-jsch" ,java-jsch-agentproxy-jsch)
9859 ("java-junit" ,java-junit)))
9860 (home-page "https://ant.apache.org/ivy")
9861 (synopsis "Dependency manager for the Java programming language")
9862 (description "Ivy is a tool for managing (recording, tracking, resolving
9863and reporting) project dependencies. It is characterized by the following:
9864
9865@itemize
9866@item flexibility and configurability - Ivy is essentially process agnostic
9867 and is not tied to any methodology or structure. Instead it provides the
9868 necessary flexibility and configurability to be adapted to a broad range
9869 of dependency management and build processes.
9870@item tight integration with Apache Ant - while available as a standalone tool,
9871 Ivy works particularly well with Apache Ant providing a number of
9872 powerful Ant tasks ranging from dependency resolution to dependency
9873 reporting and publication.
9874@end itemize")
9875 (license license:asl2.0)))
1a1810f5
JL
9876
9877(define-public java-eclipse-sisu-inject
9878 (package
9879 (name "java-eclipse-sisu-inject")
9880 (version "0.3.3")
9881 (source (origin
9882 (method url-fetch)
9883 (uri (string-append "https://github.com/eclipse/sisu.inject/"
9884 "archive/releases/" version ".tar.gz"))
9885 (sha256
9886 (base32
9887 "11rg6yw5nl13i65xsp4jxxgr341qcnnaan48p767h28kb07s0ajn"))))
9888 (build-system ant-build-system)
9889 (arguments
9890 `(#:jar-name "eclipse-sisu-inject.jar"
9891 #:source-dir "org.eclipse.sisu.inject/src"
9892 #:jdk ,icedtea-8
9893 #:tests? #f)); no tests
9894 (inputs
9895 `(("java-guice" ,java-guice)
9896 ("java-guice-servlet" ,java-guice-servlet)
9897 ("java-javax-inject" ,java-javax-inject)
9898 ("java-tomcat" ,java-tomcat)
9899 ("java-junit" ,java-junit)
9900 ("java-slf4j-api" ,java-slf4j-api)
9901 ("java-jsr305" ,java-jsr305)
9902 ("java-jsr250" ,java-jsr250)
9903 ("java-cdi-api" ,java-cdi-api)
9904 ("java-osgi-framework" ,java-osgi-framework)
9905 ("java-osgi-util-tracker" ,java-osgi-util-tracker)
9906 ("java-testng" ,java-testng)))
9907 (home-page "https://www.eclipse.org/sisu/")
9908 (synopsis "Classpath scanning, auto-binding, and dynamic auto-wiring")
9909 (description "Sisu is a modular JSR330-based container that supports
9910classpath scanning, auto-binding, and dynamic auto-wiring. Sisu uses
9911Google-Guice to perform dependency injection and provide the core JSR330
9912support, but removes the need to write explicit bindings in Guice modules.
9913Integration with other containers via the Eclipse Extension Registry and the
9914OSGi Service Registry is a goal of this project.")
9915 (license license:epl1.0)))
7049dea1
JL
9916
9917(define-public java-eclipse-sisu-plexus
9918 (package
9919 (name "java-eclipse-sisu-plexus")
9920 (version "0.3.3")
9921 (source (origin
9922 (method url-fetch)
9923 (uri (string-append "https://github.com/eclipse/sisu.plexus/"
9924 "archive/releases/" version ".tar.gz"))
9925 (sha256
9926 (base32
9927 "0lbj7nxy5j0z71k407zbb82icfqh7midrfk0fb3fa3jzdjz0d9d9"))
9928 (modules '((guix build utils)))
9929 (snippet
9930 '(begin
9931 (for-each delete-file (find-files "." ".*.jar"))
9932 (rename-file "org.eclipse.sisu.plexus.tests/src"
9933 "org.eclipse.sisu.plexus.tests/java")
9934 #t))))
9935 (build-system ant-build-system)
9936 (arguments
9937 `(#:jar-name "eclipse-sisu-plexus.jar"
9938 #:source-dir "org.eclipse.sisu.plexus/src"
9939 #:test-dir "org.eclipse.sisu.plexus.tests"
9940 #:test-exclude
9941 (list
9942 ;; This test fails probably because we can't generate the necessary
9943 ;; meta-inf files.
9944 "**/PlexusLoggingTest.*"
9945 ;; FIXME: This test fails because of some injection error
9946 "**/PlexusRequirementTest.*")
9947 #:jdk ,icedtea-8
9948 #:phases
9949 (modify-phases %standard-phases
9950 (add-before 'build 'copy-resources
9951 (lambda _
9952 (install-file "org.eclipse.sisu.plexus/META-INF/plexus/components.xml"
9953 "build/classes/META-INF/plexus")
9954 #t))
9955 (add-before 'check 'build-test-jar
9956 (lambda _
9957 (with-directory-excursion "org.eclipse.sisu.plexus.tests/resources/component-jar/src/main/"
9958 (mkdir "build")
9959 (with-directory-excursion "java"
9960 (apply invoke "javac" "-cp"
9961 (string-append (getenv "CLASSPATH")
9962 ":../../../../../build/classes")
9963 (find-files "." ".*.java"))
9964 (for-each (lambda (file) (install-file file (string-append "../build/" file)))
9965 (find-files "." ".*.jar")))
9966 (mkdir-p "build/META-INF/plexus")
9967 (copy-file "resources/META-INF/plexus/components.xml"
9968 "build/META-INF/plexus/components.xml")
9969 (with-directory-excursion "build"
9970 (invoke "jar" "cf" "../../../component-jar-0.1.jar" ".")))
9971 (with-directory-excursion "org.eclipse.sisu.plexus.tests/"
9972 (copy-recursively "META-INF" "../build/test-classes/META-INF")
9973 (substitute* "java/org/eclipse/sisu/plexus/DefaultPlexusContainerTest.java"
9974 (("resources/component-jar")
9975 "org.eclipse.sisu.plexus.tests/resources/component-jar")))
9976 #t)))))
9977 (inputs
9978 `(("java-plexus-classworlds" ,java-plexus-classworlds)
9979 ("java-plexus-util" ,java-plexus-utils)
9980 ("java-plexus-component-annotations" ,java-plexus-component-annotations)
9981 ("java-osgi-framework" ,java-osgi-framework)
9982 ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)
9983 ("java-guice" ,java-guice)
9984 ("java-javax-inject" ,java-javax-inject)
9985 ("java-slf4j-api" ,java-slf4j-api)
9986 ("java-junit" ,java-junit)))
9987 (native-inputs
9988 `(("java-guava" ,java-guava)
9989 ("java-aopalliance" ,java-aopalliance)
9990 ("java-cglib" ,java-cglib)
9991 ("java-asm" ,java-asm)))
9992 (home-page "https://www.eclipse.org/sisu/")
9993 (synopsis "Plexus support for the sisu container")
9994 (description "Sisu is a modular JSR330-based container that supports
9995classpath scanning, auto-binding, and dynamic auto-wiring. This package
9996adds Plexus support to the Sisu-Inject container.")
9997 (license license:epl1.0)))
3fa18fe7
JL
9998
9999(define-public java-commons-compiler
10000 (package
10001 (name "java-commons-compiler")
10002 (version "3.0.8")
10003 (source (origin
10004 (method git-fetch)
10005 (uri (git-reference
10006 (url "https://github.com/janino-compiler/janino")
10007 (commit "91aa95686d1e4ca3b16a984a03a38686572331b2")))
10008 (file-name (string-append name "-" version))
10009 (sha256
10010 (base32
10011 "04hfdl59sgh20qkxzgnibvs8f9hy6n7znxwpk611y5d89977y62r"))
10012 (modules '((guix build utils)))
10013 (snippet
10014 '(begin
10015 (for-each delete-file
10016 (find-files "." "\\.jar$"))
10017 #t))))
10018 (build-system ant-build-system)
10019 (arguments
10020 `(#:jar-name "commons-compiler.jar"
10021 #:source-dir "commons-compiler/src/main"
10022 #:tests? #f)); no tests
10023 (home-page "https://github.com/janino-compiler/janino")
10024 (synopsis "Java compiler")
10025 (description "Commons-compiler contains an API for janino, including the
10026@code{IExpressionEvaluator}, @code{IScriptEvaluator}, @code{IClassBodyEvaluator}
10027and @code{ISimpleCompiler} interfaces.")
10028 (license license:bsd-3)))
3402e651
JL
10029
10030(define-public java-janino
10031 (package
10032 (inherit java-commons-compiler)
10033 (name "java-janino")
10034 (arguments
10035 `(#:jar-name "janino.jar"
10036 #:source-dir "src/main/java"
10037 #:phases
10038 (modify-phases %standard-phases
10039 (add-before 'configure 'chdir
10040 (lambda _
10041 (chdir "janino"))))))
10042 (inputs
10043 `(("java-commons-compiler" ,java-commons-compiler)))
10044 (native-inputs
10045 `(("java-junit" ,java-junit)
10046 ("java-hamcrest-core" ,java-hamcrest-core)))
10047 (description "Janino is a Java compiler. Janino can compile a set of
10048source files to a set of class files like @code{javac}, but also compile a
10049Java expression, block, class body or source file in memory, load the bytecode
10050and execute it directly in the same JVM. @code{janino} can also be used for
10051static code analysis or code manipulation.")))
7d8207a4
JL
10052
10053(define-public java-logback-core
10054 (package
10055 (name "java-logback-core")
10056 (version "1.2.3")
10057 (source (origin
10058 (method url-fetch)
10059 (uri (string-append "https://github.com/qos-ch/logback/archive/v_"
10060 version ".tar.gz"))
10061 (sha256
10062 (base32
10063 "1x6ga74yfgm94cfx98gybakbrlilx8i2gn6dx13l40kasmys06mi"))
10064 (modules '((guix build utils)))
10065 (snippet
10066 '(delete-file-recursively "logback-access/lib"))))
10067 (build-system ant-build-system)
10068 (arguments
10069 `(#:jar-name "logback.jar"
10070 #:source-dir "src/main/java"
10071 #:test-dir "src/test"
10072 #:test-exclude
10073 ;; These tests fail with Unable to set MockitoNamingPolicy on cglib generator
10074 ;; which creates FastClasses
10075 (list "**/AllCoreTest.*"
10076 "**/AutoFlushingObjectWriterTest.*"
10077 "**/PackageTest.*"
10078 "**/ResilientOutputStreamTest.*"
10079 ;; And we still don't want to run abstract classes
10080 "**/Abstract*.*")
10081 #:phases
10082 (modify-phases %standard-phases
10083 (add-before 'configure 'chdir
10084 (lambda _
10085 (chdir "logback-core")
10086 #t)))))
10087 (inputs
10088 `(("java-javax-mail" ,java-javax-mail)
10089 ("java-tomcat" ,java-tomcat)
10090 ("java-commons-compiler" ,java-commons-compiler)
10091 ("java-janino" ,java-janino)))
10092 (native-inputs
10093 `(("java-junit" ,java-junit)
10094 ("java-hamcrest-core" ,java-hamcrest-core)
10095 ("java-mockito-1" ,java-mockito-1)
10096 ("java-cglib" ,java-cglib)
10097 ("java-asm" ,java-asm)
10098 ("java-objenesis" ,java-objenesis)
10099 ("java-joda-time" ,java-joda-time)))
10100 (home-page "https://logback.qos.ch")
10101 (synopsis "Logging for java")
10102 (description "Logback is intended as a successor to the popular log4j project.
10103This module lays the groundwork for the other two modules.")
10104 ;; Either epl1.0 or lgpl2.1
10105 (license (list license:epl1.0
10106 license:lgpl2.1))))
3a69f5f2
JL
10107
10108(define-public java-logback-classic
10109 (package
10110 (inherit java-logback-core)
10111 (name "java-logback-classic")
10112 (arguments
10113 `(#:jar-name "logback-classic.jar"
10114 #:source-dir "src/main/java"
10115 #:test-dir "src/test"
10116 #:tests? #f; tests require more packages: h2, greenmail, hsql, subethamail, slf4j, log4j, felix
10117 #:jdk ,icedtea-8
10118 #:phases
10119 (modify-phases %standard-phases
10120 (add-before 'configure 'chdir
10121 (lambda _
10122 (chdir "logback-classic")
10123 #t))
10124 (replace 'build
10125 (lambda* (#:key inputs #:allow-other-keys)
10126 (mkdir-p "build/classes")
10127 (setenv "CLASSPATH"
10128 (string-join
10129 (apply append (map (lambda (input)
10130 (find-files (assoc-ref inputs input)
10131 ".*.jar"))
10132 '("java-logback-core" "java-slf4j-api"
10133 "java-commons-compiler" "java-tomcat"
10134 "groovy")))
10135 ":"))
10136 (apply invoke "groovyc" "-d" "build/classes" "-j"
10137 (find-files "src/main/" ".*\\.(groovy|java)$"))
10138 (invoke "ant" "jar")
10139 #t)))))
10140 (inputs
10141 `(("java-logback-core" ,java-logback-core)
10142 ("java-slf4j-api" ,java-slf4j-api)
10143 ,@(package-inputs java-logback-core)))
10144 (native-inputs
10145 `(("groovy" ,groovy)))
10146 (description "Logback is intended as a successor to the popular log4j project.
10147This module can be assimilated to a significantly improved version of log4j.
10148Moreover, @code{logback-classic} natively implements the slf4j API so that you
10149can readily switch back and forth between logback and other logging frameworks
10150such as log4j or @code{java.util.logging} (JUL).")))