gnu: Replace uses of 'libjpeg' with 'libjpeg-turbo'.
[jackhill/guix/guix.git] / gnu / packages / java.scm
CommitLineData
0760e3a1 1;;; GNU Guix --- Functional package management for GNU
84b226c2 2;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
559239af 3;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
ea9e58ef 4;;; Copyright © 2016, 2017 Roel Janssen <roel@gnu.org>
717b6ba6 5;;; Copyright © 2017, 2019 Carlo Zancanaro <carlo@zancanaro.id.au>
da655b1e 6;;; Copyright © 2017, 2018, 2019 Julien Lepiller <julien@lepiller.eu>
88f256a1 7;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
1d47ea86 8;;; Copyright © 2016, 2017, 2018 Alex Vong <alexvong1995@gmail.com>
1c8ba10a 9;;; Copyright © 2017, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
0bc11cc7 10;;; Copyright © 2018, 2019 Gábor Boskovits <boskovits@gmail.com>
d0e9ded7 11;;; Copyright © 2018 Chris Marusich <cmmarusich@gmail.com>
3560a2cd 12;;; Copyright © 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
44bac44c 13;;; Copyright © 2019 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
0760e3a1
RW
14;;;
15;;; This file is part of GNU Guix.
16;;;
17;;; GNU Guix is free software; you can redistribute it and/or modify it
18;;; under the terms of the GNU General Public License as published by
19;;; the Free Software Foundation; either version 3 of the License, or (at
20;;; your option) any later version.
21;;;
22;;; GNU Guix is distributed in the hope that it will be useful, but
23;;; WITHOUT ANY WARRANTY; without even the implied warranty of
24;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25;;; GNU General Public License for more details.
26;;;
27;;; You should have received a copy of the GNU General Public License
28;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
29
30(define-module (gnu packages java)
31 #:use-module ((guix licenses) #:prefix license:)
32 #:use-module (guix packages)
33 #:use-module (guix download)
62c9bfaa 34 #:use-module (guix hg-download)
72885a4c 35 #:use-module (guix git-download)
78745d33 36 #:use-module (guix svn-download)
f6789047 37 #:use-module (guix utils)
068e476f 38 #:use-module (guix build-system ant)
0760e3a1 39 #:use-module (guix build-system gnu)
6a5829d9 40 #:use-module (guix build-system trivial)
0760e3a1
RW
41 #:use-module (gnu packages)
42 #:use-module (gnu packages attr)
43 #:use-module (gnu packages autotools)
44 #:use-module (gnu packages base)
45 #:use-module (gnu packages bash)
f21403e2 46 #:use-module (gnu packages certs)
0760e3a1
RW
47 #:use-module (gnu packages cpio)
48 #:use-module (gnu packages cups)
49 #:use-module (gnu packages compression)
dd741059 50 #:use-module (gnu packages elf)
0760e3a1
RW
51 #:use-module (gnu packages fontutils)
52 #:use-module (gnu packages gawk)
72885a4c 53 #:use-module (gnu packages gettext)
0760e3a1 54 #:use-module (gnu packages gcc)
8581c813 55 #:use-module (gnu packages gl)
0760e3a1
RW
56 #:use-module (gnu packages ghostscript) ;lcms
57 #:use-module (gnu packages gnome)
3a69f5f2 58 #:use-module (gnu packages groovy)
0760e3a1 59 #:use-module (gnu packages gtk)
6a5829d9 60 #:use-module (gnu packages guile)
afb5858d 61 #:use-module (gnu packages icu4c)
0760e3a1 62 #:use-module (gnu packages image)
24155bf4 63 #:use-module (gnu packages java-compression)
c4fd86f9 64 #:use-module (gnu packages libffi)
0760e3a1 65 #:use-module (gnu packages linux) ;alsa
2f0d0418 66 #:use-module (gnu packages maths)
aff0cce9 67 #:use-module (gnu packages nss)
bcb078a4 68 #:use-module (gnu packages onc-rpc)
5766984b 69 #:use-module (gnu packages web)
0760e3a1 70 #:use-module (gnu packages wget)
0760e3a1
RW
71 #:use-module (gnu packages pkg-config)
72 #:use-module (gnu packages perl)
c4fd86f9 73 #:use-module (gnu packages popt)
89e34644 74 #:use-module (gnu packages kerberos)
0760e3a1
RW
75 #:use-module (gnu packages xml)
76 #:use-module (gnu packages xorg)
f6789047 77 #:use-module (gnu packages texinfo)
2d15f601
RW
78 #:use-module ((srfi srfi-1) #:select (fold alist-delete))
79 #:use-module (srfi srfi-11)
80 #:use-module (ice-9 match))
0760e3a1 81
e1ae3587
RW
82\f
83;;;
84;;; Java bootstrap toolchain.
85;;;
86
87;; The Java bootstrap begins with Jikes, a Java compiler written in C++. We
269fb7d3
RW
88;; use it to build a simple version of GNU Classpath, the Java standard
89;; library. We chose version 0.93 because it is the last version that can be
90;; built with Jikes. With Jikes and this version of GNU Classpath we can
91;; build JamVM, a Java Virtual Machine. We build version 1.5.1 because it is
92;; the last version of JamVM that works with a version of GNU classpath that
93;; does not require ECJ. These three packages make up the bootstrap JDK.
94
95;; This is sufficient to build an older version of Ant, which is needed to
96;; build an older version of ECJ, an incremental Java compiler, both of which
97;; are written in Java.
e1ae3587 98;;
269fb7d3
RW
99;; ECJ is needed to build the latest release (0.99) and the development
100;; version of GNU Classpath. The development version of GNU Classpath has
101;; much more support for Java 1.6 than the latest release, but we need to
102;; build 0.99 first to get a working version of javah. ECJ, the development
103;; version of GNU Classpath, and the latest version of JamVM make up the
104;; second stage JDK with which we can build the OpenJDK with the Icedtea 1.x
105;; build framework. We then build the more recent JDKs Icedtea 2.x and
106;; Icedtea 3.x.
e1ae3587
RW
107
108(define jikes
109 (package
110 (name "jikes")
111 (version "1.22")
112 (source (origin
113 (method url-fetch)
114 (uri (string-append "mirror://sourceforge/jikes/Jikes/"
115 version "/jikes-" version ".tar.bz2"))
116 (sha256
117 (base32
118 "1qqldrp74pzpy5ly421srqn30qppmm9cvjiqdngk8hf47dv2rc0c"))))
119 (build-system gnu-build-system)
120 (home-page "http://jikes.sourceforge.net/")
121 (synopsis "Compiler for the Java language")
122 (description "Jikes is a compiler that translates Java source files as
123defined in The Java Language Specification into the bytecoded instruction set
124and binary format defined in The Java Virtual Machine Specification.")
125 (license license:ibmpl1.0)))
126
45f762ee
RW
127;; This is the last version of GNU Classpath that can be built without ECJ.
128(define classpath-bootstrap
2551fee8 129 (package
45f762ee
RW
130 (name "classpath")
131 (version "0.93")
2551fee8
RW
132 (source (origin
133 (method url-fetch)
45f762ee
RW
134 (uri (string-append "mirror://gnu/classpath/classpath-"
135 version ".tar.gz"))
2551fee8
RW
136 (sha256
137 (base32
bab9793f
EF
138 "0i99wf9xd3hw1sj2sazychb9prx8nadxh2clgvk3zlmb28v0jbfz"))
139 (patches (search-patches "classpath-aarch64-support.patch"))))
2551fee8
RW
140 (build-system gnu-build-system)
141 (arguments
142 `(#:configure-flags
45f762ee
RW
143 (list (string-append "JAVAC="
144 (assoc-ref %build-inputs "jikes")
145 "/bin/jikes")
2551fee8
RW
146 "--disable-Werror"
147 "--disable-gmp"
148 "--disable-gtk-peer"
45f762ee 149 "--disable-gconf-peer"
2551fee8
RW
150 "--disable-plugin"
151 "--disable-dssi"
152 "--disable-alsa"
45f762ee
RW
153 "--disable-gjdoc")
154 #:phases
155 (modify-phases %standard-phases
4fb59c9e
RW
156 ;; XXX: This introduces a memory leak as we remove a call to free up
157 ;; memory for the file name string. This was necessary because of a
158 ;; runtime error that would have prevented us from building
159 ;; ant-bootstrap later. See https://issues.guix.gnu.org/issue/36685
160 ;; for the gnarly details.
161 (add-after 'unpack 'remove-call-to-free
162 (lambda _
163 (substitute* "native/jni/java-io/java_io_VMFile.c"
164 (("result = cpio_isFileExists.*" m)
165 (string-append m "\n//")))
166 #t))
45f762ee 167 (add-after 'install 'install-data
0c66a4eb 168 (lambda _ (invoke "make" "install-data"))))))
2551fee8
RW
169 (native-inputs
170 `(("jikes" ,jikes)
171 ("fastjar" ,fastjar)
45f762ee 172 ("libltdl" ,libltdl)
2551fee8 173 ("pkg-config" ,pkg-config)))
45f762ee
RW
174 (home-page "https://www.gnu.org/software/classpath/")
175 (synopsis "Essential libraries for Java")
176 (description "GNU Classpath is a project to create core class libraries
177for use with runtimes, compilers and tools for the Java programming
178language.")
179 ;; GPLv2 or later, with special linking exception.
180 (license license:gpl2+)))
57f6c50d 181
063629aa
RW
182;; This is the last version of JamVM that works with a version of GNU
183;; classpath that does not require ECJ.
184(define jamvm-1-bootstrap
57f6c50d 185 (package
063629aa
RW
186 (name "jamvm")
187 (version "1.5.1")
57f6c50d
RW
188 (source (origin
189 (method url-fetch)
063629aa
RW
190 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
191 "JamVM%20" version "/jamvm-"
192 version ".tar.gz"))
64b2efc1 193 (patches (search-patches "jamvm-arm.patch"))
57f6c50d
RW
194 (sha256
195 (base32
cff1e095
196 "06lhi03l3b0h48pc7x58bk9my2nrcf1flpmglvys3wyad6yraf36"))
197 (snippet
198 '(begin
199 ;; Remove precompiled software.
200 (delete-file "lib/classes.zip")
201 #t))))
57f6c50d
RW
202 (build-system gnu-build-system)
203 (arguments
c4fd86f9 204 `(#:configure-flags
063629aa 205 (list (string-append "--with-classpath-install-dir="
fc37b4af
RW
206 (assoc-ref %build-inputs "classpath"))
207 "--disable-int-caching"
208 "--enable-runtime-reloc-checks"
209 "--enable-ffi")))
57f6c50d 210 (inputs
063629aa 211 `(("classpath" ,classpath-bootstrap)
57f6c50d 212 ("jikes" ,jikes)
fc37b4af 213 ("libffi" ,libffi)
cff1e095 214 ("zip" ,zip)
063629aa 215 ("zlib" ,zlib)))
22bd735a
RW
216 ;; When built with a recent GCC and glibc the configure step of icedtea-6
217 ;; fails with an invalid instruction error.
218 (native-inputs
219 `(("gcc" ,gcc-5)
220 ("libc" ,glibc-2.28)))
063629aa
RW
221 (home-page "http://jamvm.sourceforge.net/")
222 (synopsis "Small Java Virtual Machine")
223 (description "JamVM is a Java Virtual Machine conforming to the JVM
224specification edition 2 (blue book). It is extremely small. However, unlike
225other small VMs it supports the full spec, including object finalisation and
226JNI.")
227 (license license:gpl2+)))
2551fee8 228
5783bd77
RW
229(define ant-bootstrap
230 (package
231 (name "ant-bootstrap")
232 ;; The 1.10.x series requires Java 8. 1.9.0 and later use generics, which
233 ;; are not supported. The 1.8.x series is the last to use only features
ff4d9fdf
RW
234 ;; supported by Jikes.
235 (version "1.8.4")
5783bd77
RW
236 (source (origin
237 (method url-fetch)
238 (uri (string-append "http://archive.apache.org/dist/"
239 "ant/source/apache-ant-"
240 version "-src.tar.bz2"))
241 (sha256
242 (base32
ff4d9fdf 243 "1cg0lga887qz5iizh6mlkxp01lciymrhmp7wzxpl6zpnldxmzrjx"))))
5783bd77
RW
244 (build-system gnu-build-system)
245 (arguments
cded3a75
GB
246 `(#:imported-modules ((guix build syscalls)
247 ,@%gnu-build-system-modules)
248 #:modules ((srfi srfi-1)
249 (guix build gnu-build-system)
250 (guix build utils)
251 (guix build syscalls))
252 #:tests? #f ; no "check" target
5783bd77
RW
253 #:phases
254 (modify-phases %standard-phases
d4fd4c3a 255 (delete 'bootstrap)
5783bd77
RW
256 (delete 'configure)
257 (replace 'build
258 (lambda* (#:key inputs #:allow-other-keys)
aa432388 259 (setenv "JAVA_HOME" (assoc-ref inputs "jamvm"))
5783bd77 260 (setenv "JAVACMD"
aa432388
RW
261 (string-append (assoc-ref inputs "jamvm")
262 "/bin/jamvm"))
5783bd77 263 (setenv "JAVAC"
aa432388
RW
264 (string-append (assoc-ref inputs "jikes")
265 "/bin/jikes"))
266 (setenv "CLASSPATH"
267 (string-append (assoc-ref inputs "jamvm")
268 "/lib/rt.jar"))
5783bd77 269
d4fd4c3a
RW
270 ;; Ant complains if this file doesn't exist.
271 (setenv "HOME" "/tmp")
272 (with-output-to-file "/tmp/.ant.properties"
273 (lambda _ (display "")))
5783bd77
RW
274
275 ;; Use jikes instead of javac for <javac ...> tags in build.xml
276 (setenv "ANT_OPTS" "-Dbuild.compiler=jikes")
277
278 ;; jikes produces lots of warnings, but they are not very
279 ;; interesting, so we silence them.
280 (setenv "$BOOTJAVAC_OPTS" "-nowarn")
281
d4fd4c3a
RW
282 ;; Without these JamVM options the build may freeze.
283 (substitute* "bootstrap.sh"
284 (("^\"\\$\\{JAVACMD\\}\" " m)
a495998b
EF
285 ,@(if (string-prefix? "armhf" (or (%current-system)
286 (%current-target-system)))
287 `((string-append m "-Xnocompact "))
288 `((string-append m "-Xnocompact -Xnoinlining ")))))
d4fd4c3a 289
5783bd77
RW
290 ;; Disable tests because we are bootstrapping and thus don't have
291 ;; any of the dependencies required to build and run the tests.
292 (substitute* "build.xml"
293 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
8e14634a
EF
294 (invoke "bash" "bootstrap.sh"
295 (string-append "-Ddist.dir="
296 (assoc-ref %outputs "out")))))
cded3a75
GB
297 (add-after 'build 'strip-jar-timestamps ;based on ant-build-system
298 (lambda* (#:key outputs #:allow-other-keys)
299 (define (repack-archive jar)
300 (let* ((dir (mkdtemp! "jar-contents.XXXXXX"))
301 (manifest (string-append dir "/META-INF/MANIFESTS.MF")))
302 (with-directory-excursion dir
303 (invoke "unzip" jar))
304 (delete-file jar)
305 ;; XXX: copied from (gnu build install)
306 (for-each (lambda (file)
307 (let ((s (lstat file)))
308 (unless (eq? (stat:type s) 'symlink)
309 (utime file 0 0 0 0))))
310 (find-files dir #:directories? #t))
311 ;; It is important that the manifest appears first.
312 (with-directory-excursion dir
313 (let* ((files (find-files "." ".*" #:directories? #t))
314 ;; To ensure that the reference scanner can
315 ;; detect all store references in the jars
316 ;; we disable compression with the "-0" option.
317 (command (if (file-exists? manifest)
318 `("zip" "-0" "-X" ,jar ,manifest
319 ,@files)
320 `("zip" "-0" "-X" ,jar ,@files))))
321 (apply invoke command)))))
322 (for-each repack-archive
323 (find-files
324 (string-append (assoc-ref %outputs "out") "/lib")
325 "\\.jar$"))
326 #t))
5783bd77
RW
327 (delete 'install))))
328 (native-inputs
329 `(("jikes" ,jikes)
cded3a75
GB
330 ("jamvm" ,jamvm-1-bootstrap)
331 ("unzip" ,unzip)
b42b5afd 332 ("zip" ,zip)))
5783bd77
RW
333 (home-page "http://ant.apache.org")
334 (synopsis "Build tool for Java")
335 (description
336 "Ant is a platform-independent build tool for Java. It is similar to
337make but is implemented using the Java language, requires the Java platform,
338and is best suited to building Java projects. Ant uses XML to describe the
339build process and its dependencies, whereas Make uses Makefile format.")
340 (license license:asl2.0)))
341
5461721f
RW
342;; Version 3.2.2 is the last version without a dependency on a full-fledged
343;; compiler for Java 1.5.
344(define ecj-bootstrap
345 (package
346 (name "ecj-bootstrap")
347 (version "3.2.2")
348 (source (origin
349 (method url-fetch)
350 (uri (string-append "http://archive.eclipse.org/eclipse/"
351 "downloads/drops/R-" version
352 "-200702121330/ecjsrc.zip"))
353 (sha256
354 (base32
355 "05hj82kxd23qaglsjkaqcj944riisjha7acf7h3ljhrjyljx8307"))))
356 ;; It would be so much easier if we could use the ant-build-system, but we
357 ;; cannot as we don't have ant at this point. We use ecj for
358 ;; bootstrapping the JDK.
359 (build-system gnu-build-system)
360 (arguments
361 `(#:modules ((guix build gnu-build-system)
362 (guix build utils)
363 (srfi srfi-1))
364 #:tests? #f ; there are no tests
365 #:phases
366 (modify-phases %standard-phases
367 (replace 'configure
368 (lambda* (#:key inputs #:allow-other-keys)
369 (setenv "CLASSPATH"
370 (string-join
6c775dc6
RW
371 (cons (string-append (assoc-ref inputs "jamvm")
372 "/lib/rt.jar")
373 (find-files (string-append
374 (assoc-ref inputs "ant-bootstrap")
375 "/lib")
376 "\\.jar$"))
5461721f
RW
377 ":"))
378 #t))
379 (replace 'build
380 (lambda* (#:key inputs #:allow-other-keys)
381 ;; The unpack phase enters the "org" directory by mistake.
382 (chdir "..")
383
384 ;; Create a simple manifest to make ecj executable.
385 (with-output-to-file "manifest"
386 (lambda _
387 (display "Manifest-Version: 1.0
388Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n")))
389
390 ;; Compile it all!
0b302a16
EF
391 (and (apply invoke "jikes"
392 (find-files "." "\\.java$"))
393 (invoke "fastjar" "cvfm"
394 "ecj-bootstrap.jar" "manifest" "."))))
5461721f
RW
395 (replace 'install
396 (lambda* (#:key outputs #:allow-other-keys)
397 (let ((share (string-append (assoc-ref outputs "out")
398 "/share/java/")))
399 (mkdir-p share)
400 (install-file "ecj-bootstrap.jar" share)
401 #t))))))
402 (native-inputs
403 `(("ant-bootstrap" ,ant-bootstrap)
404 ("unzip" ,unzip)
6c775dc6
RW
405 ("jikes" ,jikes)
406 ("jamvm" ,jamvm-1-bootstrap)
5461721f
RW
407 ("fastjar" ,fastjar)))
408 (home-page "https://eclipse.org")
409 (synopsis "Eclipse Java development tools core batch compiler")
410 (description "This package provides the Eclipse Java core batch compiler
411for bootstrapping purposes. The @dfn{Eclipse compiler for Java} (ecj) is a
412requirement for all GNU Classpath releases after version 0.93.")
413 (license license:epl1.0)))
414
6a5829d9
RW
415(define ecj-javac-wrapper
416 (package (inherit ecj-bootstrap)
417 (name "ecj-javac-wrapper")
418 (source #f)
419 (build-system trivial-build-system)
420 (arguments
421 `(#:modules ((guix build utils))
422 #:builder
c4f06c11 423 (begin
6a5829d9
RW
424 (use-modules (guix build utils))
425 (let* ((bin (string-append (assoc-ref %outputs "out") "/bin"))
426 (target (string-append bin "/javac"))
427 (guile (string-append (assoc-ref %build-inputs "guile")
428 "/bin/guile"))
429 (ecj (string-append (assoc-ref %build-inputs "ecj-bootstrap")
430 "/share/java/ecj-bootstrap.jar"))
c4f06c11
RW
431 (java (string-append (assoc-ref %build-inputs "jamvm")
432 "/bin/jamvm"))
433 (bootcp (let ((jvmlib (string-append (assoc-ref %build-inputs "classpath")
434 "/share/classpath")))
51602aac
RW
435 (string-append jvmlib "/glibj.zip:"
436 jvmlib "/tools.zip"))))
6a5829d9
RW
437 (mkdir-p bin)
438 (with-output-to-file target
439 (lambda _
440 (format #t "#!~a --no-auto-compile\n!#\n" guile)
441 (write
442 `(begin (use-modules (ice-9 match)
443 (ice-9 receive)
444 (ice-9 hash-table)
445 (srfi srfi-1)
446 (srfi srfi-26))
447 (define defaults
448 '(("-bootclasspath" ,bootcp)
449 ("-source" "1.5")
450 ("-target" "1.5")
451 ("-cp" ".")))
452 (define (main args)
453 (let ((classpath (getenv "CLASSPATH")))
454 (setenv "CLASSPATH"
c4f06c11
RW
455 (string-join (list ,ecj
456 ,(string-append (assoc-ref %build-inputs "jamvm")
457 "/lib/rt.jar")
458 (or classpath ""))
459 ":")))
6a5829d9
RW
460 (receive (vm-args other-args)
461 ;; Separate VM arguments from arguments to ECJ.
462 (partition (cut string-prefix? "-J" <>)
463 (fold (lambda (default acc)
464 (if (member (first default) acc)
465 acc (append default acc)))
466 args defaults))
467 (apply system* ,java
468 (append
469 ;; Remove "-J" prefix
470 (map (cut string-drop <> 2) vm-args)
471 '("org.eclipse.jdt.internal.compiler.batch.Main")
472 (cons "-nowarn" other-args)))))
473 ;; Entry point
474 (let ((args (cdr (command-line))))
475 (if (null? args)
476 (format (current-error-port) "javac: no arguments given!\n")
477 (main args)))))))
478 (chmod target #o755)
479 #t))))
480 (native-inputs
481 `(("guile" ,guile-2.2)
482 ("ecj-bootstrap" ,ecj-bootstrap)
c4f06c11
RW
483 ("jamvm" ,jamvm-1-bootstrap)
484 ("classpath" ,classpath-bootstrap)))
6a5829d9
RW
485 (description "This package provides a wrapper around the @dfn{Eclipse
486compiler for Java} (ecj) with a command line interface that is compatible with
487the standard javac executable.")))
488
8778da03
RW
489;; The classpath-bootstrap was built without a virtual machine, so it does not
490;; provide a wrapper for javah. We cannot build the development version of
491;; Classpath without javah.
492(define classpath-0.99
493 (package (inherit classpath-bootstrap)
d3551e86
RW
494 (version "0.99")
495 (source (origin
496 (method url-fetch)
497 (uri (string-append "mirror://gnu/classpath/classpath-"
498 version ".tar.gz"))
499 (sha256
500 (base32
bab9793f
EF
501 "1j7cby4k66f1nvckm48xcmh352b1d1b33qk7l6hi7dp9i9zjjagr"))
502 (patches (search-patches "classpath-aarch64-support.patch"))))
d3551e86
RW
503 (arguments
504 `(#:configure-flags
505 (list (string-append "--with-ecj-jar="
506 (assoc-ref %build-inputs "ecj-bootstrap")
507 "/share/java/ecj-bootstrap.jar")
508 (string-append "JAVAC="
509 (assoc-ref %build-inputs "ecj-javac-wrapper")
510 "/bin/javac")
511 (string-append "JAVA="
8778da03
RW
512 (assoc-ref %build-inputs "jamvm")
513 "/bin/jamvm")
d3551e86
RW
514 "GCJ_JAVAC_TRUE=no"
515 "ac_cv_prog_java_works=yes" ; trust me
516 "--disable-Werror"
517 "--disable-gmp"
518 "--disable-gtk-peer"
519 "--disable-gconf-peer"
520 "--disable-plugin"
521 "--disable-dssi"
522 "--disable-alsa"
523 "--disable-gjdoc")
524 #:phases
525 (modify-phases %standard-phases
526 (add-after 'install 'install-data
15a59c21 527 (lambda _ (invoke "make" "install-data"))))))
d3551e86
RW
528 (native-inputs
529 `(("ecj-bootstrap" ,ecj-bootstrap)
530 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
531 ("fastjar" ,fastjar)
8778da03
RW
532 ("jamvm" ,jamvm-1-bootstrap)
533 ("classpath" ,classpath-bootstrap)
d3551e86 534 ("libltdl" ,libltdl)
8778da03 535 ("pkg-config" ,pkg-config)))))
d3551e86 536
c98d7a66
RW
537;; We need this because classpath-bootstrap does not provide all of the tools
538;; we need to build classpath-devel.
04d7cae2 539(define classpath-jamvm-wrappers
c98d7a66 540 (package (inherit classpath-0.99)
04d7cae2
RW
541 (name "classpath-jamvm-wrappers")
542 (source #f)
543 (build-system trivial-build-system)
544 (arguments
545 `(#:modules ((guix build utils))
546 #:builder
547 (begin
548 (use-modules (guix build utils))
549 (let* ((bash (assoc-ref %build-inputs "bash"))
550 (jamvm (assoc-ref %build-inputs "jamvm"))
551 (classpath (assoc-ref %build-inputs "classpath"))
552 (bin (string-append (assoc-ref %outputs "out")
553 "/bin/")))
554 (mkdir-p bin)
555 (for-each (lambda (tool)
556 (with-output-to-file (string-append bin tool)
557 (lambda _
e3ec1258
EF
558 ,@(if (string-prefix? "armhf" (or (%current-system)
559 (%current-target-system)))
560 `((format #t "#!~a/bin/sh
561~a/bin/jamvm -Xnocompact -classpath ~a/share/classpath/tools.zip \
562gnu.classpath.tools.~a.~a $@"
563 bash jamvm classpath tool
564 (if (string=? "native2ascii" tool)
565 "Native2ASCII" "Main")))
566 `((format #t "#!~a/bin/sh
40e3a197 567~a/bin/jamvm -Xnocompact -Xnoinlining -classpath ~a/share/classpath/tools.zip \
04d7cae2
RW
568gnu.classpath.tools.~a.~a $@"
569 bash jamvm classpath tool
570 (if (string=? "native2ascii" tool)
e3ec1258 571 "Native2ASCII" "Main"))))))
04d7cae2
RW
572 (chmod (string-append bin tool) #o755))
573 (list "javah"
574 "rmic"
575 "rmid"
576 "orbd"
577 "rmiregistry"
578 "native2ascii"))
579 #t))))
580 (native-inputs
581 `(("bash" ,bash)
c98d7a66
RW
582 ("jamvm" ,jamvm-1-bootstrap)
583 ("classpath" ,classpath-0.99)))
04d7cae2
RW
584 (inputs '())
585 (synopsis "Executables from GNU Classpath")
586 (description "This package provides wrappers around the tools provided by
587the GNU Classpath library. They are executed by the JamVM virtual
588machine.")))
589
72885a4c
RW
590;; The last release of GNU Classpath is 0.99 and it happened in 2012. Since
591;; then Classpath has gained much more support for Java 1.6.
592(define-public classpath-devel
593 (let ((commit "e7c13ee0cf2005206fbec0eca677f8cf66d5a103")
594 (revision "1"))
8778da03 595 (package (inherit classpath-bootstrap)
72885a4c
RW
596 (version (string-append "0.99-" revision "." (string-take commit 9)))
597 (source (origin
598 (method git-fetch)
599 (uri (git-reference
5f13bf09 600 (url "https://git.savannah.gnu.org/git/classpath.git")
72885a4c 601 (commit commit)))
51988e3a 602 (file-name (string-append "classpath-" version "-checkout"))
72885a4c
RW
603 (sha256
604 (base32
605 "1v2rww76ww322mpg3s12a1kkc6gkp31bm9gcxs532h0wq285fiw4"))))
606 (arguments
93c103ab
RW
607 `(#:make-flags
608 ;; Ensure that the initial heap size is smaller than the maximum
609 ;; size. By default only Xmx is set, which can lead to invalid
610 ;; memory settings on some machines with a lot of memory.
611 '("JAVAC_MEM_OPT=-J-Xms512M -J-Xmx768M")
612 #:configure-flags
72885a4c
RW
613 (list (string-append "--with-ecj-jar="
614 (assoc-ref %build-inputs "ecj-bootstrap")
615 "/share/java/ecj-bootstrap.jar")
93c103ab 616 (string-append "--with-javac="
72885a4c
RW
617 (assoc-ref %build-inputs "ecj-javac-wrapper")
618 "/bin/javac")
619 (string-append "JAVA="
620 (assoc-ref %build-inputs "jamvm")
621 "/bin/jamvm")
622 "GCJ_JAVAC_TRUE=no"
623 "ac_cv_prog_java_works=yes" ; trust me
624 "--disable-Werror"
625 "--disable-gmp"
626 "--disable-gtk-peer"
627 "--disable-gconf-peer"
628 "--disable-plugin"
629 "--disable-dssi"
630 "--disable-alsa"
631 "--disable-gjdoc")
632 #:phases
633 (modify-phases %standard-phases
2a69f48e
RW
634 ;; XXX The bootstrap phase executes autogen.sh, which fails after
635 ;; complaining about the lack of gettext.
636 (replace 'bootstrap
637 (lambda _ (invoke "autoreconf" "-vif")))
72885a4c
RW
638 (add-after 'unpack 'remove-unsupported-annotations
639 (lambda _
640 (substitute* (find-files "java" "\\.java$")
641 (("@Override") ""))
642 #t))
643 (add-after 'install 'install-data
4c65eb43 644 (lambda _ (invoke "make" "install-data"))))))
72885a4c
RW
645 (native-inputs
646 `(("autoconf" ,autoconf)
647 ("automake" ,automake)
648 ("libtool" ,libtool)
649 ("gettext" ,gettext-minimal)
650 ("texinfo" ,texinfo)
651 ("classpath-jamvm-wrappers" ,classpath-jamvm-wrappers) ; for javah
652 ("ecj-bootstrap" ,ecj-bootstrap)
b5a0d427 653 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
72885a4c 654 ("fastjar" ,fastjar)
58d2b135 655 ("jamvm" ,jamvm-1-bootstrap)
72885a4c
RW
656 ("libltdl" ,libltdl)
657 ("pkg-config" ,pkg-config))))))
658
58d2b135
RW
659(define jamvm
660 (package (inherit jamvm-1-bootstrap)
661 (version "2.0.0")
662 (source (origin
663 (method url-fetch)
664 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
665 "JamVM%20" version "/jamvm-"
666 version ".tar.gz"))
667 (sha256
668 (base32
cff1e095
669 "1nl0zxz8y5x8gwsrm7n32bry4dx8x70p8z3s9jbdvs8avyb8whkn"))
670 (snippet
671 '(begin
672 ;; Remove precompiled software.
673 (delete-file "src/classlib/gnuclasspath/lib/classes.zip")
674 #t))))
58d2b135
RW
675 (build-system gnu-build-system)
676 (arguments
677 `(#:configure-flags
678 (list (string-append "--with-classpath-install-dir="
679 (assoc-ref %build-inputs "classpath")))))
8c6091e3
RW
680 (inputs
681 `(("classpath" ,classpath-devel)
b5a0d427 682 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
cff1e095 683 ("zip" ,zip)
8c6091e3
RW
684 ("zlib" ,zlib)))))
685
b5a0d427
RW
686(define ecj-javac-wrapper-final
687 (package (inherit ecj-javac-wrapper)
1bf56c72
RW
688 (native-inputs
689 `(("guile" ,guile-2.2)
690 ("ecj-bootstrap" ,ecj-bootstrap)
691 ("jamvm" ,jamvm)
692 ("classpath" ,classpath-devel)))))
693
98419316 694;; The bootstrap JDK consisting of jamvm, classpath-devel,
b5a0d427
RW
695;; ecj-javac-wrapper-final cannot build Icedtea 2.x directly, because it's
696;; written in Java 7. It can, however, build the unmaintained Icedtea 1.x,
697;; which uses Java 6 only.
98419316
RW
698(define-public icedtea-6
699 (package
700 (name "icedtea")
701 (version "1.13.13")
702 (source (origin
703 (method url-fetch)
704 (uri (string-append
705 "http://icedtea.wildebeest.org/download/source/icedtea6-"
706 version ".tar.xz"))
707 (sha256
708 (base32
709 "0bg9sb4f7qbq77c0zf9m17p47ga0kf0r9622g9p12ysg26jd1ksg"))
710 (modules '((guix build utils)))
711 (snippet
6cbee49d
MW
712 '(begin
713 (substitute* "Makefile.in"
714 ;; do not leak information about the build host
715 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
716 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
717 #t))))
98419316
RW
718 (build-system gnu-build-system)
719 (outputs '("out" ; Java Runtime Environment
720 "jdk" ; Java Development Kit
721 "doc")) ; all documentation
722 (arguments
723 `(;; There are many failing tests and many are known to fail upstream.
724 #:tests? #f
725
726 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
727 ;; gremlin) doesn't support it yet, so skip this phase.
728 #:validate-runpath? #f
729
730 #:modules ((guix build utils)
731 (guix build gnu-build-system)
732 (srfi srfi-19))
733
734 #:configure-flags
735 `("--enable-bootstrap"
736 "--enable-nss"
737 "--without-rhino"
738 "--with-parallel-jobs"
739 "--disable-downloading"
740 "--disable-tests"
741 ,(string-append "--with-ecj="
742 (assoc-ref %build-inputs "ecj")
743 "/share/java/ecj-bootstrap.jar")
744 ,(string-append "--with-jar="
745 (assoc-ref %build-inputs "fastjar")
746 "/bin/fastjar")
747 ,(string-append "--with-jdk-home="
748 (assoc-ref %build-inputs "classpath"))
749 ,(string-append "--with-java="
750 (assoc-ref %build-inputs "jamvm")
751 "/bin/jamvm"))
752 #:phases
753 (modify-phases %standard-phases
754 (replace 'unpack
755 (lambda* (#:key source inputs #:allow-other-keys)
2c8ac364
MW
756 (invoke "tar" "xvf" source)
757 (chdir (string-append "icedtea6-" ,version))
758 (mkdir "openjdk")
759 (copy-recursively (assoc-ref inputs "openjdk-src") "openjdk")
760 ;; The convenient OpenJDK source bundle is no longer
761 ;; available for download, so we have to take the sources
762 ;; from the Mercurial repositories and change the Makefile
763 ;; to avoid tests for the OpenJDK zip archive.
764 (with-directory-excursion "openjdk"
765 (for-each (lambda (part)
766 (mkdir part)
767 (copy-recursively
768 (assoc-ref inputs
769 (string-append part "-src"))
770 part))
873325b0 771 '("jdk" "corba"
2c8ac364 772 "langtools" "jaxp" "jaxws")))
873325b0
MB
773 (with-directory-excursion "openjdk"
774 (invoke "tar" "xvf" (assoc-ref inputs "hotspot-src"))
775 (rename-file "hg-checkout" "hotspot"))
306c1e61
RW
776 (substitute* "patches/freetypeversion.patch"
777 (("REQUIRED_FREETYPE_VERSION = 2.2.1")
778 "REQUIRED_FREETYPE_VERSION = 2.10.1"))
2c8ac364
MW
779 (substitute* "Makefile.in"
780 (("echo \"ERROR: No up-to-date OpenJDK zip available\"; exit -1;")
781 "echo \"trust me\";")
782 ;; The contents of the bootstrap directory must be
783 ;; writeable but when copying from the store they are
784 ;; not.
785 (("mkdir -p lib/rt" line)
786 (string-append line "; chmod -R u+w $(BOOT_DIR)")))
787 (invoke "chmod" "-R" "u+w" "openjdk")))
98419316
RW
788 (add-after 'unpack 'use-classpath
789 (lambda* (#:key inputs #:allow-other-keys)
b5a0d427
RW
790 (let ((jvmlib (assoc-ref inputs "classpath"))
791 (jamvm (assoc-ref inputs "jamvm")))
98419316
RW
792 ;; Classpath does not provide rt.jar.
793 (substitute* "Makefile.in"
794 (("\\$\\(SYSTEM_JDK_DIR\\)/jre/lib/rt.jar")
795 (string-append jvmlib "/share/classpath/glibj.zip")))
796 ;; Make sure we can find all classes.
797 (setenv "CLASSPATH"
798 (string-append jvmlib "/share/classpath/glibj.zip:"
b5a0d427
RW
799 jvmlib "/share/classpath/tools.zip:"
800 jamvm "/lib/rt.jar"))
98419316
RW
801 (setenv "JAVACFLAGS"
802 (string-append "-cp "
803 jvmlib "/share/classpath/glibj.zip:"
804 jvmlib "/share/classpath/tools.zip")))
805 #t))
806 (add-after 'unpack 'patch-patches
807 (lambda _
808 ;; shebang in patches so that they apply cleanly
809 (substitute* '("patches/jtreg-jrunscript.patch"
810 "patches/hotspot/hs23/drop_unlicensed_test.patch")
811 (("#!/bin/sh") (string-append "#!" (which "sh"))))
812 #t))
813 (add-after 'unpack 'patch-paths
814 (lambda* (#:key inputs #:allow-other-keys)
815 ;; buildtree.make generates shell scripts, so we need to replace
816 ;; the generated shebang
817 (substitute* '("openjdk/hotspot/make/linux/makefiles/buildtree.make")
818 (("/bin/sh") (which "bash")))
819
820 (let ((corebin (string-append
821 (assoc-ref inputs "coreutils") "/bin/"))
822 (binbin (string-append
823 (assoc-ref inputs "binutils") "/bin/"))
824 (grepbin (string-append
825 (assoc-ref inputs "grep") "/bin/")))
826 (substitute* '("openjdk/jdk/make/common/shared/Defs-linux.gmk"
827 "openjdk/corba/make/common/shared/Defs-linux.gmk")
828 (("UNIXCOMMAND_PATH = /bin/")
829 (string-append "UNIXCOMMAND_PATH = " corebin))
830 (("USRBIN_PATH = /usr/bin/")
831 (string-append "USRBIN_PATH = " corebin))
832 (("DEVTOOLS_PATH *= */usr/bin/")
833 (string-append "DEVTOOLS_PATH = " corebin))
834 (("COMPILER_PATH *= */usr/bin/")
835 (string-append "COMPILER_PATH = "
836 (assoc-ref inputs "gcc") "/bin/"))
837 (("DEF_OBJCOPY *=.*objcopy")
838 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
839
840 ;; fix path to alsa header
841 (substitute* "openjdk/jdk/make/common/shared/Sanity.gmk"
842 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
843 (string-append "ALSA_INCLUDE="
844 (assoc-ref inputs "alsa-lib")
845 "/include/alsa/version.h")))
846
847 ;; fix hard-coded utility paths
848 (substitute* '("openjdk/jdk/make/common/shared/Defs-utils.gmk"
849 "openjdk/corba/make/common/shared/Defs-utils.gmk")
850 (("ECHO *=.*echo")
851 (string-append "ECHO = " (which "echo")))
852 (("^GREP *=.*grep")
853 (string-append "GREP = " (which "grep")))
854 (("EGREP *=.*egrep")
855 (string-append "EGREP = " (which "egrep")))
856 (("CPIO *=.*cpio")
857 (string-append "CPIO = " (which "cpio")))
858 (("READELF *=.*readelf")
859 (string-append "READELF = " (which "readelf")))
860 (("^ *AR *=.*ar")
861 (string-append "AR = " (which "ar")))
862 (("^ *TAR *=.*tar")
863 (string-append "TAR = " (which "tar")))
864 (("AS *=.*as")
865 (string-append "AS = " (which "as")))
866 (("LD *=.*ld")
867 (string-append "LD = " (which "ld")))
868 (("STRIP *=.*strip")
869 (string-append "STRIP = " (which "strip")))
870 (("NM *=.*nm")
871 (string-append "NM = " (which "nm")))
872 (("^SH *=.*sh")
873 (string-append "SH = " (which "bash")))
874 (("^FIND *=.*find")
875 (string-append "FIND = " (which "find")))
876 (("LDD *=.*ldd")
877 (string-append "LDD = " (which "ldd")))
878 (("NAWK *=.*(n|g)awk")
879 (string-append "NAWK = " (which "gawk")))
880 (("XARGS *=.*xargs")
881 (string-append "XARGS = " (which "xargs")))
882 (("UNZIP *=.*unzip")
883 (string-append "UNZIP = " (which "unzip")))
884 (("ZIPEXE *=.*zip")
885 (string-append "ZIPEXE = " (which "zip")))
886 (("SED *=.*sed")
887 (string-append "SED = " (which "sed"))))
888
889 ;; Some of these timestamps cause problems as they are more than
890 ;; 10 years ago, failing the build process.
891 (substitute*
892 "openjdk/jdk/src/share/classes/java/util/CurrencyData.properties"
893 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
894 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
895 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
896 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY"))
897 #t)))
898 (add-before 'configure 'set-additional-paths
899 (lambda* (#:key inputs #:allow-other-keys)
900 (setenv "CPATH"
901 (string-append (assoc-ref inputs "libxrender")
902 "/include/X11/extensions" ":"
903 (assoc-ref inputs "libxtst")
904 "/include/X11/extensions" ":"
905 (assoc-ref inputs "libxinerama")
906 "/include/X11/extensions" ":"
907 (or (getenv "CPATH") "")))
908 (setenv "ALT_CUPS_HEADERS_PATH"
909 (string-append (assoc-ref inputs "cups")
910 "/include"))
911 (setenv "ALT_FREETYPE_HEADERS_PATH"
912 (string-append (assoc-ref inputs "freetype")
913 "/include"))
914 (setenv "ALT_FREETYPE_LIB_PATH"
915 (string-append (assoc-ref inputs "freetype")
916 "/lib"))
917 #t))
0bc11cc7
GB
918 (add-before 'build 'disable-os-version-check
919 ;; allow build on linux major version change
920 (lambda _
921 (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok")
922 #t))
98419316
RW
923 (replace 'install
924 (lambda* (#:key outputs #:allow-other-keys)
925 (let ((doc (string-append (assoc-ref outputs "doc")
926 "/share/doc/icedtea"))
927 (jre (assoc-ref outputs "out"))
928 (jdk (assoc-ref outputs "jdk")))
929 (copy-recursively "openjdk.build/docs" doc)
930 (copy-recursively "openjdk.build/j2re-image" jre)
931 (copy-recursively "openjdk.build/j2sdk-image" jdk))
932 #t)))))
933 (native-inputs
934 `(("ant" ,ant-bootstrap)
935 ("alsa-lib" ,alsa-lib)
936 ("attr" ,attr)
937 ("classpath" ,classpath-devel)
938 ("coreutils" ,coreutils)
939 ("cpio" ,cpio)
940 ("cups" ,cups)
941 ("ecj" ,ecj-bootstrap)
b5a0d427 942 ("ecj-javac" ,ecj-javac-wrapper-final)
98419316
RW
943 ("fastjar" ,fastjar)
944 ("fontconfig" ,fontconfig)
945 ("freetype" ,freetype)
946 ("gtk" ,gtk+-2)
947 ("gawk" ,gawk)
948 ("giflib" ,giflib)
949 ("grep" ,grep)
950 ("jamvm" ,jamvm)
951 ("lcms" ,lcms)
4bd428a7 952 ("libjpeg" ,libjpeg-turbo)
bcb078a4 953 ("libnsl" ,libnsl)
98419316
RW
954 ("libpng" ,libpng)
955 ("libtool" ,libtool)
956 ("libx11" ,libx11)
957 ("libxcomposite" ,libxcomposite)
958 ("libxi" ,libxi)
959 ("libxinerama" ,libxinerama)
960 ("libxrender" ,libxrender)
961 ("libxslt" ,libxslt) ;for xsltproc
962 ("libxt" ,libxt)
963 ("libxtst" ,libxtst)
964 ("mit-krb5" ,mit-krb5)
965 ("nss" ,nss)
966 ("nss-certs" ,nss-certs)
967 ("perl" ,perl)
968 ("pkg-config" ,pkg-config)
969 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
970 ("unzip" ,unzip)
971 ("wget" ,wget)
972 ("which" ,which)
973 ("zip" ,zip)
974 ("zlib" ,zlib)
975 ("openjdk-src"
976 ,(origin
977 (method hg-fetch)
978 (uri (hg-reference
979 (url "http://hg.openjdk.java.net/jdk6/jdk6/")
980 (changeset "jdk6-b41")))
981 (sha256
982 (base32
983 "14q47yfg586fs64w30g8mk92m5dkxsvr36zzh0ra99xk5x0x96mv"))))
984 ("jdk-src"
985 ,(origin
986 (method hg-fetch)
987 (uri (hg-reference
988 (url "http://hg.openjdk.java.net/jdk6/jdk6/jdk/")
989 (changeset "jdk6-b41")))
990 (sha256
991 (base32
992 "165824nhg1k1dx6zs9dny0j49rmk35jw5b13dmz8c77jfajml4v9"))))
993 ("hotspot-src"
994 ,(origin
995 (method hg-fetch)
996 (uri (hg-reference
997 (url "http://hg.openjdk.java.net/jdk6/jdk6/hotspot/")
998 (changeset "jdk6-b41")))
999 (sha256
1000 (base32
1cdff8cd
GB
1001 "07lc1z4k5dj9nrc1wvwmpvxr3xgxrdkdh53xb95skk5ij49yagfd"))
1002 (patches
1003 (search-patches "icedtea-6-hotspot-gcc-segfault-workaround.patch"))))
98419316
RW
1004 ("corba-src"
1005 ,(origin
1006 (method hg-fetch)
1007 (uri (hg-reference
1008 (url "http://hg.openjdk.java.net/jdk6/jdk6/corba/")
1009 (changeset "jdk6-b41")))
1010 (sha256
1011 (base32
1012 "1p9g1r9dnax2iwp7yb59qx7m4nmshqhwmrb2b8jj8zgbd9dl2i3q"))))
1013 ("langtools-src"
1014 ,(origin
1015 (method hg-fetch)
1016 (uri (hg-reference
1017 (url "http://hg.openjdk.java.net/jdk6/jdk6/langtools/")
1018 (changeset "jdk6-b41")))
1019 (sha256
1020 (base32
1021 "1x52wd67fynbbd9ild6fb4wvba3f5hhwk03qdjfazd0a1qr37z3d"))))
1022 ("jaxp-src"
1023 ,(origin
1024 (method hg-fetch)
1025 (uri (hg-reference
1026 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxp/")
1027 (changeset "jdk6-b41")))
1028 (sha256
1029 (base32
1030 "0shlqrvzpr4nrkmv215lbxnby63s3yvbdh1yxcayznsyqwa4nlxm"))))
1031 ("jaxws-src"
1032 ,(origin
1033 (method hg-fetch)
1034 (uri (hg-reference
1035 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxws/")
1036 (changeset "jdk6-b41")))
1037 (sha256
1038 (base32
1039 "0835lkw8vib1xhp8lxnybhlvzdh699hbi4mclxanydjk63zbpxk0"))))))
1040 (home-page "http://icedtea.classpath.org")
1041 (synopsis "Java development kit")
1042 (description
1043 "This package provides the OpenJDK built with the IcedTea build harness.
1044This version of the OpenJDK is no longer maintained and is only used for
1045bootstrapping purposes.")
1046 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1047 ;; same license as both GNU Classpath and OpenJDK.
1048 (license license:gpl2+)))
1049
a243e12a 1050(define-public icedtea-7
7f6485e7 1051 (let* ((version "2.6.13")
f6789047
RW
1052 (drop (lambda (name hash)
1053 (origin
1054 (method url-fetch)
1055 (uri (string-append
d30ce4a7 1056 "http://icedtea.classpath.org/download/drops"
f6789047
RW
1057 "/icedtea7/" version "/" name ".tar.bz2"))
1058 (sha256 (base32 hash))))))
71053e14
RW
1059 (package
1060 (name "icedtea")
f6789047
RW
1061 (version version)
1062 (source (origin
1063 (method url-fetch)
1064 (uri (string-append
1065 "http://icedtea.wildebeest.org/download/source/icedtea-"
1066 version ".tar.xz"))
1067 (sha256
1068 (base32
7f6485e7 1069 "1w331rdqx1dcx2xb0fmjmrkdc71xqn20fxsgw8by4xhiblh88khh"))
f6789047
RW
1070 (modules '((guix build utils)))
1071 (snippet
6cbee49d
MW
1072 '(begin
1073 (substitute* "Makefile.in"
1074 ;; do not leak information about the build host
1075 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
1076 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
1077 #t))))
71053e14
RW
1078 (build-system gnu-build-system)
1079 (outputs '("out" ; Java Runtime Environment
1080 "jdk" ; Java Development Kit
1081 "doc")) ; all documentation
f6789047
RW
1082 (arguments
1083 `(;; There are many test failures. Some are known to
1084 ;; fail upstream, others relate to not having an X
1085 ;; server running at test time, yet others are a
1086 ;; complete mystery to me.
1087
1088 ;; hotspot: passed: 241; failed: 45; error: 2
1089 ;; langtools: passed: 1,934; failed: 26
1090 ;; jdk: unknown
1091 #:tests? #f
71053e14
RW
1092
1093 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
1094 ;; gremlin) doesn't support it yet, so skip this phase.
1095 #:validate-runpath? #f
1096
f6789047
RW
1097 ;; Apparently, the C locale is needed for some of the tests.
1098 #:locale "C"
71053e14
RW
1099
1100 #:modules ((guix build utils)
1101 (guix build gnu-build-system)
1102 (ice-9 match)
1103 (ice-9 popen)
71053e14
RW
1104 (srfi srfi-19)
1105 (srfi srfi-26))
1106
1107 #:configure-flags
e2098e2d
RW
1108 ;; TODO: package pcsc and sctp, and add to inputs
1109 `("--disable-system-pcsc"
1110 "--disable-system-sctp"
1111 "--enable-bootstrap"
1112 "--enable-nss"
1113 "--without-rhino"
1114 "--disable-downloading"
1115 "--disable-tests" ;they are run in the check phase instead
1116 "--with-openjdk-src-dir=./openjdk.src"
1117 ,(string-append "--with-jdk-home="
1118 (assoc-ref %build-inputs "jdk")))
71053e14
RW
1119
1120 #:phases
1121 (modify-phases %standard-phases
1122 (replace 'unpack
1123 (lambda* (#:key source inputs #:allow-other-keys)
1124 (let ((target (string-append "icedtea-" ,version))
1125 (unpack (lambda* (name #:optional dir)
1126 (let ((dir (or dir
1127 (string-drop-right name 5))))
1128 (mkdir dir)
2c8ac364
MW
1129 (invoke "tar" "xvf"
1130 (assoc-ref inputs name)
1131 "-C" dir
1132 "--strip-components=1")))))
71053e14 1133 (mkdir target)
2c8ac364
MW
1134 (invoke "tar" "xvf" source
1135 "-C" target "--strip-components=1")
1136 (chdir target)
1137 (unpack "openjdk-src" "openjdk.src")
1138 (with-directory-excursion "openjdk.src"
1139 (for-each unpack
1140 (filter (cut string-suffix? "-drop" <>)
1141 (map (match-lambda
1142 ((name . _) name))
1143 inputs))))
1144 #t)))
6b7e09ae
RW
1145 (add-after 'unpack 'patch-bitrot
1146 (lambda _
1147 (substitute* '("patches/boot/revert-6973616.patch"
1148 "openjdk.src/jdk/make/common/shared/Defs-versions.gmk")
1149 (("REQUIRED_FREETYPE_VERSION = 2.2.1")
1150 "REQUIRED_FREETYPE_VERSION = 2.10.1"))
1151 ;; As of attr 2.4.48 this header is no longer
1152 ;; included. It is provided by the libc instead.
1153 (substitute* '("configure"
1154 "openjdk.src/jdk/src/solaris/native/sun/nio/fs/LinuxNativeDispatcher.c")
1155 (("attr/xattr.h") "sys/xattr.h"))
1156 #t))
71053e14
RW
1157 (add-after 'unpack 'fix-x11-extension-include-path
1158 (lambda* (#:key inputs #:allow-other-keys)
1159 (substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk"
1160 (((string-append "\\$\\(firstword \\$\\(wildcard "
1161 "\\$\\(OPENWIN_HOME\\)"
1162 "/include/X11/extensions\\).*$"))
1163 (string-append (assoc-ref inputs "libxrender")
1164 "/include/X11/extensions"
1165 " -I" (assoc-ref inputs "libxtst")
1166 "/include/X11/extensions"
1167 " -I" (assoc-ref inputs "libxinerama")
1168 "/include/X11/extensions"))
1169 (("\\$\\(wildcard /usr/include/X11/extensions\\)\\)") ""))
1170 #t))
1171 (add-after 'unpack 'patch-paths
1172 (lambda _
1173 ;; buildtree.make generates shell scripts, so we need to replace
1174 ;; the generated shebang
1175 (substitute* '("openjdk.src/hotspot/make/linux/makefiles/buildtree.make")
1176 (("/bin/sh") (which "bash")))
1177
1178 (let ((corebin (string-append
1179 (assoc-ref %build-inputs "coreutils") "/bin/"))
1180 (binbin (string-append
1181 (assoc-ref %build-inputs "binutils") "/bin/"))
1182 (grepbin (string-append
1183 (assoc-ref %build-inputs "grep") "/bin/")))
1184 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-linux.gmk"
1185 "openjdk.src/corba/make/common/shared/Defs-linux.gmk")
1186 (("UNIXCOMMAND_PATH = /bin/")
1187 (string-append "UNIXCOMMAND_PATH = " corebin))
1188 (("USRBIN_PATH = /usr/bin/")
1189 (string-append "USRBIN_PATH = " corebin))
1190 (("DEVTOOLS_PATH *= */usr/bin/")
1191 (string-append "DEVTOOLS_PATH = " corebin))
1192 (("COMPILER_PATH *= */usr/bin/")
1193 (string-append "COMPILER_PATH = "
1194 (assoc-ref %build-inputs "gcc") "/bin/"))
1195 (("DEF_OBJCOPY *=.*objcopy")
1196 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
1197
1198 ;; fix path to alsa header
1199 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1200 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1201 (string-append "ALSA_INCLUDE="
1202 (assoc-ref %build-inputs "alsa-lib")
1203 "/include/alsa/version.h")))
1204
1205 ;; fix hard-coded utility paths
1206 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-utils.gmk"
1207 "openjdk.src/corba/make/common/shared/Defs-utils.gmk")
1208 (("ECHO *=.*echo")
1209 (string-append "ECHO = " (which "echo")))
1210 (("^GREP *=.*grep")
1211 (string-append "GREP = " (which "grep")))
1212 (("EGREP *=.*egrep")
1213 (string-append "EGREP = " (which "egrep")))
1214 (("CPIO *=.*cpio")
1215 (string-append "CPIO = " (which "cpio")))
1216 (("READELF *=.*readelf")
1217 (string-append "READELF = " (which "readelf")))
1218 (("^ *AR *=.*ar")
1219 (string-append "AR = " (which "ar")))
1220 (("^ *TAR *=.*tar")
1221 (string-append "TAR = " (which "tar")))
1222 (("AS *=.*as")
1223 (string-append "AS = " (which "as")))
1224 (("LD *=.*ld")
1225 (string-append "LD = " (which "ld")))
1226 (("STRIP *=.*strip")
1227 (string-append "STRIP = " (which "strip")))
1228 (("NM *=.*nm")
1229 (string-append "NM = " (which "nm")))
1230 (("^SH *=.*sh")
1231 (string-append "SH = " (which "bash")))
1232 (("^FIND *=.*find")
1233 (string-append "FIND = " (which "find")))
1234 (("LDD *=.*ldd")
1235 (string-append "LDD = " (which "ldd")))
1236 (("NAWK *=.*(n|g)awk")
1237 (string-append "NAWK = " (which "gawk")))
1238 (("XARGS *=.*xargs")
1239 (string-append "XARGS = " (which "xargs")))
1240 (("UNZIP *=.*unzip")
1241 (string-append "UNZIP = " (which "unzip")))
1242 (("ZIPEXE *=.*zip")
1243 (string-append "ZIPEXE = " (which "zip")))
1244 (("SED *=.*sed")
1245 (string-append "SED = " (which "sed"))))
1246
1247 ;; Some of these timestamps cause problems as they are more than
1248 ;; 10 years ago, failing the build process.
1249 (substitute*
1250 "openjdk.src/jdk/src/share/classes/java/util/CurrencyData.properties"
1251 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
1252 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
1253 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
1254 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY")))
1255 #t))
1256 (add-before 'configure 'set-additional-paths
1257 (lambda* (#:key inputs #:allow-other-keys)
e2098e2d
RW
1258 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1259 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1260 (string-append "ALSA_INCLUDE="
1261 (assoc-ref inputs "alsa-lib")
1262 "/include/alsa/version.h")))
1263 (setenv "CC" "gcc")
1264 (setenv "CPATH"
1265 (string-append (assoc-ref inputs "libxcomposite")
1266 "/include/X11/extensions" ":"
1267 (assoc-ref inputs "libxrender")
1268 "/include/X11/extensions" ":"
1269 (assoc-ref inputs "libxtst")
1270 "/include/X11/extensions" ":"
1271 (assoc-ref inputs "libxinerama")
1272 "/include/X11/extensions" ":"
1273 (or (getenv "CPATH") "")))
1274 (setenv "ALT_OBJCOPY" (which "objcopy"))
1275 (setenv "ALT_CUPS_HEADERS_PATH"
1276 (string-append (assoc-ref inputs "cups")
1277 "/include"))
1278 (setenv "ALT_FREETYPE_HEADERS_PATH"
1279 (string-append (assoc-ref inputs "freetype")
1280 "/include"))
1281 (setenv "ALT_FREETYPE_LIB_PATH"
1282 (string-append (assoc-ref inputs "freetype")
1283 "/lib"))
71053e14 1284 #t))
59199e1a
GB
1285 (add-before 'build 'disable-os-version-check
1286 ;; allow build on linux major version change
1287 (lambda _
1288 (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok")
1289 #t))
71053e14
RW
1290 (add-before 'check 'fix-test-framework
1291 (lambda _
1292 ;; Fix PATH in test environment
1293 (substitute* "test/jtreg/com/sun/javatest/regtest/Main.java"
1294 (("PATH=/bin:/usr/bin")
1295 (string-append "PATH=" (getenv "PATH"))))
1296 (substitute* "test/jtreg/com/sun/javatest/util/SysEnv.java"
1297 (("/usr/bin/env") (which "env")))
1298 (substitute* "openjdk.src/hotspot/test/test_env.sh"
1299 (("/bin/rm") (which "rm"))
1300 (("/bin/cp") (which "cp"))
1301 (("/bin/mv") (which "mv")))
1302 #t))
1303 (add-before 'check 'fix-hotspot-tests
1304 (lambda _
1305 (with-directory-excursion "openjdk.src/hotspot/test/"
1306 (substitute* "jprt.config"
1307 (("PATH=\"\\$\\{path4sdk\\}\"")
1308 (string-append "PATH=" (getenv "PATH")))
1309 (("make=/usr/bin/make")
1310 (string-append "make=" (which "make"))))
1311 (substitute* '("runtime/6626217/Test6626217.sh"
1312 "runtime/7110720/Test7110720.sh")
1313 (("/bin/rm") (which "rm"))
1314 (("/bin/cp") (which "cp"))
1315 (("/bin/mv") (which "mv"))))
1316 #t))
1317 (add-before 'check 'fix-jdk-tests
1318 (lambda _
1319 (with-directory-excursion "openjdk.src/jdk/test/"
1320 (substitute* "com/sun/jdi/JdbReadTwiceTest.sh"
1321 (("/bin/pwd") (which "pwd")))
1322 (substitute* "com/sun/jdi/ShellScaffold.sh"
1323 (("/bin/kill") (which "kill")))
1324 (substitute* "start-Xvfb.sh"
1325 ;;(("/usr/bin/X11/Xvfb") (which "Xvfb"))
1326 (("/usr/bin/nohup") (which "nohup")))
1327 (substitute* "javax/security/auth/Subject/doAs/Test.sh"
1328 (("/bin/rm") (which "rm")))
1329 (substitute* "tools/launcher/MultipleJRE.sh"
1330 (("echo \"#!/bin/sh\"")
1331 (string-append "echo \"#!" (which "rm") "\""))
1332 (("/usr/bin/zip") (which "zip")))
1333 (substitute* "com/sun/jdi/OnThrowTest.java"
1334 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1335 (substitute* "java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java"
1336 (("/usr/bin/uptime") (which "uptime")))
1337 (substitute* "java/lang/ProcessBuilder/Basic.java"
1338 (("/usr/bin/env") (which "env"))
1339 (("/bin/false") (which "false"))
1340 (("/bin/true") (which "true"))
1341 (("/bin/cp") (which "cp"))
1342 (("/bin/sh") (which "sh")))
1343 (substitute* "java/lang/ProcessBuilder/FeelingLucky.java"
1344 (("/bin/sh") (which "sh")))
1345 (substitute* "java/lang/ProcessBuilder/Zombies.java"
1346 (("/usr/bin/perl") (which "perl"))
1347 (("/bin/ps") (which "ps"))
1348 (("/bin/true") (which "true")))
1349 (substitute* "java/lang/Runtime/exec/ConcurrentRead.java"
1350 (("/usr/bin/tee") (which "tee")))
1351 (substitute* "java/lang/Runtime/exec/ExecWithDir.java"
1352 (("/bin/true") (which "true")))
1353 (substitute* "java/lang/Runtime/exec/ExecWithInput.java"
1354 (("/bin/cat") (which "cat")))
1355 (substitute* "java/lang/Runtime/exec/ExitValue.java"
1356 (("/bin/sh") (which "sh"))
1357 (("/bin/true") (which "true"))
1358 (("/bin/kill") (which "kill")))
1359 (substitute* "java/lang/Runtime/exec/LotsOfDestroys.java"
1360 (("/usr/bin/echo") (which "echo")))
1361 (substitute* "java/lang/Runtime/exec/LotsOfOutput.java"
1362 (("/usr/bin/cat") (which "cat")))
1363 (substitute* "java/lang/Runtime/exec/SleepyCat.java"
1364 (("/bin/cat") (which "cat"))
1365 (("/bin/sleep") (which "sleep"))
1366 (("/bin/sh") (which "sh")))
1367 (substitute* "java/lang/Runtime/exec/StreamsSurviveDestroy.java"
1368 (("/bin/cat") (which "cat")))
1369 (substitute* "java/rmi/activation/CommandEnvironment/SetChildEnv.java"
1370 (("/bin/chmod") (which "chmod")))
1371 (substitute* "java/util/zip/ZipFile/Assortment.java"
1372 (("/bin/sh") (which "sh"))))
1373 #t))
1374 (replace 'check
1375 (lambda _
1376 ;; The "make check-*" targets always return zero, so we need to
1377 ;; check for errors in the associated log files to determine
1378 ;; whether any tests have failed.
1379 (use-modules (ice-9 rdelim))
1380 (let* ((error-pattern (make-regexp "^(Error|FAILED):.*"))
1381 (checker (lambda (port)
1382 (let loop ()
1383 (let ((line (read-line port)))
1384 (cond
1385 ((eof-object? line) #t)
2c8ac364
MW
1386 ((regexp-exec error-pattern line)
1387 (error "test failed"))
71053e14
RW
1388 (else (loop)))))))
1389 (run-test (lambda (test)
2c8ac364 1390 (invoke "make" test)
71053e14
RW
1391 (call-with-input-file
1392 (string-append "test/" test ".log")
1393 checker))))
2c8ac364
MW
1394 (when #f ; skip tests
1395 (run-test "check-hotspot")
1396 (run-test "check-langtools")
fa41a089
MW
1397 (run-test "check-jdk"))
1398 #t)))
71053e14
RW
1399 (replace 'install
1400 (lambda* (#:key outputs #:allow-other-keys)
1401 (let ((doc (string-append (assoc-ref outputs "doc")
1402 "/share/doc/icedtea"))
1403 (jre (assoc-ref outputs "out"))
1404 (jdk (assoc-ref outputs "jdk")))
1405 (copy-recursively "openjdk.build/docs" doc)
1406 (copy-recursively "openjdk.build/j2re-image" jre)
1407 (copy-recursively "openjdk.build/j2sdk-image" jdk))
1408 #t))
491dc2fb
RJ
1409 ;; Some of the libraries in the lib/amd64 folder link to libjvm.so.
1410 ;; But that shared object is located in the server/ folder, so it
1411 ;; cannot be found. This phase creates a symbolic link in the
1412 ;; lib/amd64 folder so that the other libraries can find it.
1413 ;;
1414 ;; See:
1415 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1416 ;;
1417 ;; FIXME: Find the bug in the build system, so that this symlink is
1418 ;; not needed.
1419 (add-after 'install 'install-libjvm
1420 (lambda* (#:key inputs outputs #:allow-other-keys)
1421 (let* ((lib-path (string-append (assoc-ref outputs "out")
d3e22bcc
LC
1422 ;; See 'INSTALL_ARCH_DIR' in
1423 ;; 'configure'.
1b6f99ea
RW
1424 ,(match (%current-system)
1425 ("i686-linux"
048d21a8 1426 "/lib/i386")
1b6f99ea 1427 ("x86_64-linux"
048d21a8 1428 "/lib/amd64")
d3e22bcc 1429 ("armhf-linux"
048d21a8 1430 "/lib/arm")
d3e22bcc 1431 ("aarch64-linux"
41763008
EF
1432 "/lib/aarch64")
1433 ;; We need a catch-all, dropping
1434 ;; '-linux' works in most cases.
1435 (_
1436 (string-append
1437 "/lib/"
1438 (string-drop-right
1439 (%current-system) 6)))))))
491dc2fb
RJ
1440 (symlink (string-append lib-path "/server/libjvm.so")
1441 (string-append lib-path "/libjvm.so")))
1442 #t))
71053e14
RW
1443 ;; By default IcedTea only generates an empty keystore. In order to
1444 ;; be able to use certificates in Java programs we need to generate a
1445 ;; keystore from a set of certificates. For convenience we use the
1446 ;; certificates from the nss-certs package.
1447 (add-after 'install 'install-keystore
1448 (lambda* (#:key inputs outputs #:allow-other-keys)
1449 (let* ((keystore "cacerts")
1450 (certs-dir (string-append (assoc-ref inputs "nss-certs")
1451 "/etc/ssl/certs"))
1452 (keytool (string-append (assoc-ref outputs "jdk")
1453 "/bin/keytool")))
1454 (define (extract-cert file target)
1455 (call-with-input-file file
1456 (lambda (in)
1457 (call-with-output-file target
1458 (lambda (out)
1459 (let loop ((line (read-line in 'concat))
1460 (copying? #f))
1461 (cond
1462 ((eof-object? line) #t)
1463 ((string-prefix? "-----BEGIN" line)
1464 (display line out)
1465 (loop (read-line in 'concat) #t))
1466 ((string-prefix? "-----END" line)
1467 (display line out)
1468 #t)
1469 (else
1470 (when copying? (display line out))
1471 (loop (read-line in 'concat) copying?)))))))))
1472 (define (import-cert cert)
1473 (format #t "Importing certificate ~a\n" (basename cert))
1474 (let ((temp "tmpcert"))
1475 (extract-cert cert temp)
1476 (let ((port (open-pipe* OPEN_WRITE keytool
1477 "-import"
1478 "-alias" (basename cert)
1479 "-keystore" keystore
1480 "-storepass" "changeit"
1481 "-file" temp)))
1482 (display "yes\n" port)
1483 (when (not (zero? (status:exit-val (close-pipe port))))
1484 (format #t "failed to import ~a\n" cert)))
1485 (delete-file temp)))
1486
1487 ;; This is necessary because the certificate directory contains
1488 ;; files with non-ASCII characters in their names.
1489 (setlocale LC_ALL "en_US.utf8")
1490 (setenv "LC_ALL" "en_US.utf8")
1491
1492 (for-each import-cert (find-files certs-dir "\\.pem$"))
1493 (mkdir-p (string-append (assoc-ref outputs "out")
1494 "/lib/security"))
1495 (mkdir-p (string-append (assoc-ref outputs "jdk")
1496 "/jre/lib/security"))
1497
1498 ;; The cacerts files we are going to overwrite are chmod'ed as
1499 ;; read-only (444) in icedtea-8 (which derives from this
1500 ;; package). We have to change this so we can overwrite them.
1501 (chmod (string-append (assoc-ref outputs "out")
1502 "/lib/security/" keystore) #o644)
1503 (chmod (string-append (assoc-ref outputs "jdk")
1504 "/jre/lib/security/" keystore) #o644)
1505
1506 (install-file keystore
1507 (string-append (assoc-ref outputs "out")
1508 "/lib/security"))
1509 (install-file keystore
1510 (string-append (assoc-ref outputs "jdk")
1511 "/jre/lib/security"))
1512 #t))))))
f6789047 1513 (native-inputs
d9148890 1514 `(("openjdk-src"
f6789047 1515 ,(drop "openjdk"
7f6485e7 1516 "0l34ikyf62hbzlf9032alzkkqvf7bpmckz4gvirvph755w7gka8l"))
f6789047
RW
1517 ("corba-drop"
1518 ,(drop "corba"
7f6485e7 1519 "050gv2jbg1pi6qkn8w18bwpbklfa5b0kymjvan9pncddbj8m84fz"))
f6789047
RW
1520 ("jaxp-drop"
1521 ,(drop "jaxp"
7f6485e7 1522 "1k6yldwnxfzdg5926r1nlfv8d1r1j7rlp2nkz6gqh05vgyamnfhl"))
f6789047
RW
1523 ("jaxws-drop"
1524 ,(drop "jaxws"
7f6485e7 1525 "110j7jlz47x2gg6f7653x12mssan5kvj9l9h1m1c8c92drfxbqyk"))
f6789047
RW
1526 ("jdk-drop"
1527 ,(drop "jdk"
7f6485e7 1528 "0d1mca38ksxvdskp9im3pp7fdijhj1n3lwq9w13r9s4v3qyskgdd"))
f6789047
RW
1529 ("langtools-drop"
1530 ,(drop "langtools"
7f6485e7 1531 "0nq5236fzxn3p6x8cgncl56mzcmsj07q9gymysnws4c8byc6n0qj"))
f6789047 1532 ("hotspot-drop"
db024183
GB
1533 ,(origin
1534 (method url-fetch)
1535 (uri (string-append
1536 "http://icedtea.classpath.org/downloads/drops"
1537 "/icedtea7/" version "/hotspot.tar.bz2"))
1538 (sha256
1539 (base32
1540 "17bdv39n4lh8l5737c96f3xgamx4y305m067p01cywgp7zaddqws"))
1541 (patches (search-patches
1542 "icedtea-7-hotspot-gcc-segfault-workaround.patch"))))
e2098e2d 1543 ("ant" ,ant-bootstrap)
71053e14 1544 ("attr" ,attr)
71053e14
RW
1545 ("coreutils" ,coreutils)
1546 ("diffutils" ,diffutils) ;for tests
1547 ("gawk" ,gawk)
1548 ("grep" ,grep)
1549 ("libtool" ,libtool)
1550 ("pkg-config" ,pkg-config)
1551 ("wget" ,wget)
1552 ("which" ,which)
1553 ("cpio" ,cpio)
1554 ("zip" ,zip)
1555 ("unzip" ,unzip)
1556 ("fastjar" ,fastjar)
1557 ("libxslt" ,libxslt) ;for xsltproc
1558 ("nss-certs" ,nss-certs)
1559 ("perl" ,perl)
1560 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
e2098e2d 1561 ("jdk" ,icedtea-6 "jdk")))
b711df02 1562 (inputs
71053e14
RW
1563 `(("alsa-lib" ,alsa-lib)
1564 ("cups" ,cups)
1565 ("libx11" ,libx11)
1566 ("libxcomposite" ,libxcomposite)
1567 ("libxt" ,libxt)
1568 ("libxtst" ,libxtst)
1569 ("libxi" ,libxi)
1570 ("libxinerama" ,libxinerama)
1571 ("libxrender" ,libxrender)
4bd428a7 1572 ("libjpeg" ,libjpeg-turbo)
71053e14
RW
1573 ("libpng" ,libpng)
1574 ("mit-krb5" ,mit-krb5)
1575 ("nss" ,nss)
1576 ("giflib" ,giflib)
1577 ("fontconfig" ,fontconfig)
1578 ("freetype" ,freetype)
1579 ("lcms" ,lcms)
1580 ("zlib" ,zlib)
1581 ("gtk" ,gtk+-2)))
1582 (home-page "http://icedtea.classpath.org")
1583 (synopsis "Java development kit")
1584 (description
1585 "This package provides the Java development kit OpenJDK built with the
1586IcedTea build harness.")
d3e22bcc
LC
1587
1588 ;; 'configure' lists "mips" and "mipsel", but not "mips64el'.
1589 (supported-systems (delete "mips64el-linux" %supported-systems))
1590
71053e14
RW
1591 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1592 ;; same license as both GNU Classpath and OpenJDK.
1593 (license license:gpl2+))))
d2540f80 1594
349a3147 1595(define-public icedtea-8
1d97d8ff 1596 (let* ((version "3.7.0")
349a3147
RW
1597 (drop (lambda (name hash)
1598 (origin
1599 (method url-fetch)
1600 (uri (string-append
db531f73 1601 "http://icedtea.classpath.org/download/drops"
349a3147
RW
1602 "/icedtea8/" version "/" name ".tar.xz"))
1603 (sha256 (base32 hash))))))
1604 (package (inherit icedtea-7)
1d97d8ff 1605 (version "3.7.0")
349a3147
RW
1606 (source (origin
1607 (method url-fetch)
1608 (uri (string-append
1609 "http://icedtea.wildebeest.org/download/source/icedtea-"
1610 version ".tar.xz"))
1611 (sha256
1612 (base32
1d97d8ff 1613 "09yqzn8rpccs7cyv89hhy5zlznpgqw5x3jz0w1ccp0cz1vgs8l5w"))
349a3147
RW
1614 (modules '((guix build utils)))
1615 (snippet
0c729ef4 1616 '(begin
f2785bd6
RW
1617 (substitute* '("configure"
1618 "acinclude.m4")
0c729ef4
RW
1619 ;; Do not embed build time
1620 (("(DIST_ID=\"Custom build).*$" _ prefix)
1621 (string-append prefix "\"\n"))
1622 ;; Do not leak information about the build host
1623 (("DIST_NAME=\"\\$build_os\"")
1624 "DIST_NAME=\"guix\""))
1625 #t))))
349a3147 1626 (arguments
f2785bd6
RW
1627 `(#:imported-modules
1628 ((guix build ant-build-system)
1629 (guix build syscalls)
1630 ,@%gnu-build-system-modules)
1631 ,@(substitute-keyword-arguments (package-arguments icedtea-7)
1632 ((#:modules modules)
1633 `((guix build utils)
1634 (guix build gnu-build-system)
1635 ((guix build ant-build-system) #:prefix ant:)
1636 (ice-9 match)
1637 (ice-9 popen)
1638 (srfi srfi-19)
1639 (srfi srfi-26)))
1640 ((#:configure-flags flags)
1641 `(let ((jdk (assoc-ref %build-inputs "jdk")))
1642 `( ;;"--disable-bootstrap"
1643 "--enable-bootstrap"
1644 "--enable-nss"
1645 "--disable-downloading"
1646 "--disable-system-pcsc"
1647 "--disable-system-sctp"
1648 "--disable-tests" ;they are run in the check phase instead
1649 "--with-openjdk-src-dir=./openjdk.src"
1650 ,(string-append "--with-jdk-home=" jdk))))
1651 ((#:phases phases)
1652 `(modify-phases ,phases
1653 (delete 'fix-x11-extension-include-path)
1654 (delete 'patch-paths)
1655 (delete 'set-additional-paths)
1656 (delete 'patch-patches)
6b7e09ae 1657 (delete 'patch-bitrot)
f2785bd6
RW
1658 ;; Prevent the keytool from recording the current time when
1659 ;; adding certificates at build time.
1660 (add-after 'unpack 'patch-keystore
1661 (lambda _
1662 (substitute* "openjdk.src/jdk/src/share/classes/sun/security/provider/JavaKeyStore.java"
1663 (("date = new Date\\(\\);")
1664 "\
1665date = (System.getenv(\"SOURCE_DATE_EPOCH\") != null) ?\
1666new Date(Long.parseLong(System.getenv(\"SOURCE_DATE_EPOCH\"))) :\
1667new Date();"))
1668 #t))
1669 (add-after 'unpack 'patch-jni-libs
1670 ;; Hardcode dynamically loaded libraries.
1671 (lambda _
1672 (let* ((library-path (search-path-as-string->list
1673 (getenv "LIBRARY_PATH")))
1674 (find-library (lambda (name)
1675 (search-path
1676 library-path
1677 (string-append "lib" name ".so")))))
1678 (for-each
1679 (lambda (file)
1680 (catch 'decoding-error
1681 (lambda ()
1682 (substitute* file
1683 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
1684 _ name version)
1685 (format #f "\"~a\"" (find-library name)))
1686 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
1687 (format #f "\"~a\"" (find-library name)))))
1688 (lambda _
1689 ;; Those are safe to skip.
1690 (format (current-error-port)
1691 "warning: failed to substitute: ~a~%"
1692 file))))
1693 (find-files "openjdk.src/jdk/src/solaris/native"
1694 "\\.c|\\.h"))
1695 #t)))
1696 (replace 'install
1697 (lambda* (#:key outputs #:allow-other-keys)
1698 (let ((doc (string-append (assoc-ref outputs "doc")
1699 "/share/doc/icedtea"))
1700 (jre (assoc-ref outputs "out"))
1701 (jdk (assoc-ref outputs "jdk")))
1702 (copy-recursively "openjdk.build/docs" doc)
1703 (copy-recursively "openjdk.build/images/j2re-image" jre)
1704 (copy-recursively "openjdk.build/images/j2sdk-image" jdk)
1705 ;; Install the nss.cfg file to JRE to enable SSL/TLS
1706 ;; support via NSS.
1707 (copy-file (string-append jdk "/jre/lib/security/nss.cfg")
1708 (string-append jre "/lib/security/nss.cfg"))
1709 #t)))
1710 (add-after 'install 'strip-jar-timestamps
1711 (assoc-ref ant:%standard-phases 'strip-jar-timestamps)))))))
349a3147
RW
1712 (native-inputs
1713 `(("jdk" ,icedtea-7 "jdk")
1714 ("openjdk-src"
1715 ,(drop "openjdk"
1d97d8ff 1716 "1mj6xgmw31i6qd30qi9dmv7160fbcfq5ikz1jwjihdg2793il19p"))
12eecbf0
LF
1717 ("aarch32-drop"
1718 ,(drop "aarch32"
1d97d8ff 1719 "1wb8k5zm40zld0986dvmlh5xh3gyixbg9h26sl662zy92amhmyyg"))
349a3147
RW
1720 ("corba-drop"
1721 ,(drop "corba"
1d97d8ff 1722 "11ma4zz0599cy70xd219v7a8vin7p96xrhhz3wsaw6cjhkzpagah"))
349a3147
RW
1723 ("jaxp-drop"
1724 ,(drop "jaxp"
1d97d8ff 1725 "14m1y0z0fbm5z5zjw3vnq85py8dma84bi3f9cw8rhdyc6skk8q4i"))
349a3147
RW
1726 ("jaxws-drop"
1727 ,(drop "jaxws"
1d97d8ff 1728 "09andnm6xaasnp963hgx42yiflifiljp9z7z85jrfyc5z8a5whmf"))
349a3147
RW
1729 ("jdk-drop"
1730 ,(drop "jdk"
1d97d8ff 1731 "0s6lcpc0zckz2fnq98aqf28nz9y3wbi41a3kyaqqa2abwbkm1zwl"))
349a3147
RW
1732 ("langtools-drop"
1733 ,(drop "langtools"
1d97d8ff 1734 "15wizy123vhk40chl1b4p552jf2pw2hdww0myf11qab425axz4nw"))
349a3147 1735 ("hotspot-drop"
673135df
GB
1736 ,(origin
1737 (method url-fetch)
1738 (uri (string-append
1739 "http://icedtea.classpath.org/download/drops"
1740 "/icedtea8/" version "/hotspot.tar.xz"))
1741 (sha256
1742 (base32
1743 "1ciz1w9j0kz7s1dxdhyqq71nla9icyz6qvn0b9z2zgkklqa98qmm"))
1744 (patches (search-patches
1745 "icedtea-7-hotspot-gcc-segfault-workaround.patch"))))
349a3147
RW
1746 ("nashorn-drop"
1747 ,(drop "nashorn"
1d97d8ff 1748 "19pzl3ppaw8j6r5cnyp8qiw3hxijh3hdc46l39g5yfhdl4pr4hpa"))
fd34d4f4
LF
1749 ("shenandoah-drop"
1750 ,(drop "shenandoah"
1d97d8ff 1751 "0k33anxdzw1icn072wynfmmdjhsv50hay0j1sfkfxny12rb3vgdy"))
349a3147 1752 ,@(fold alist-delete (package-native-inputs icedtea-7)
e2098e2d 1753 '("jdk" "openjdk-src" "corba-drop" "jaxp-drop" "jaxws-drop"
349a3147
RW
1754 "jdk-drop" "langtools-drop" "hotspot-drop")))))))
1755
dd741059
JL
1756(define-public openjdk9
1757 (package
1758 (name "openjdk")
1759 (version "9.181")
1760 (source (origin
1761 (method url-fetch)
1762 (uri "https://hg.openjdk.java.net/jdk/jdk/archive/3cc80be736f2.tar.bz2")
1763 (file-name (string-append name "-" version ".tar.bz2"))
1764 (sha256
1765 (base32
1766 "01ihmyf7k5z17wbr7xig7y40l9f01d5zjgkcmawn1102hw5kchpq"))
1767 (modules '((guix build utils)))
1768 (snippet
1769 `(begin
1770 (for-each delete-file (find-files "." ".*.bin$"))
1771 (for-each delete-file (find-files "." ".*.exe$"))
1772 (for-each delete-file (find-files "." ".*.jar$"))
1773 #t))))
1774 (build-system gnu-build-system)
1775 (outputs '("out" "jdk" "doc"))
1776 (arguments
1777 `(#:tests? #f; require jtreg
1778 #:imported-modules
1779 ((guix build syscalls)
1780 ,@%gnu-build-system-modules)
1781 #:phases
1782 (modify-phases %standard-phases
1783 (add-after 'patch-source-shebangs 'fix-java-shebangs
1784 (lambda _
1785 ;; This file was "fixed" by patch-source-shebangs, but it requires
1786 ;; this exact first line.
1787 (substitute* "jdk/make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1788 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
1789 #t))
1790 (replace 'configure
1791 (lambda* (#:key inputs outputs #:allow-other-keys)
1792 ;; TODO: unbundle libpng and lcms
1793 (invoke "bash" "./configure"
1794 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
1795 "--disable-freetype-bundling"
1796 "--disable-warnings-as-errors"
1797 "--disable-hotspot-gtest"
1798 "--with-giflib=system"
1799 "--with-libjpeg=system"
1800 (string-append "--prefix=" (assoc-ref outputs "out")))
1801 #t))
1802 (replace 'build
1803 (lambda _
1804 (with-output-to-file ".src-rev"
1805 (lambda _
1806 (display ,version)))
1807 (setenv "GUIX_LD_WRAPPER_ALLOW_IMPURITIES" "yes")
1808 (invoke "make" "all")
1809 #t))
1810 ;; Some of the libraries in the lib/ folder link to libjvm.so.
1811 ;; But that shared object is located in the server/ folder, so it
1812 ;; cannot be found. This phase creates a symbolic link in the
1813 ;; lib/ folder so that the other libraries can find it.
1814 ;;
1815 ;; See:
1816 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1817 ;;
1818 ;; FIXME: Find the bug in the build system, so that this symlink is
1819 ;; not needed.
1820 (add-after 'install 'install-libjvm
1821 (lambda* (#:key inputs outputs #:allow-other-keys)
1822 (let* ((lib-out (string-append (assoc-ref outputs "out")
1823 "/lib"))
1824 (lib-jdk (string-append (assoc-ref outputs "jdk")
1825 "/lib")))
1826 (symlink (string-append lib-jdk "/server/libjvm.so")
1827 (string-append lib-jdk "/libjvm.so"))
1828 (symlink (string-append lib-out "/server/libjvm.so")
1829 (string-append lib-out "/libjvm.so")))
1830 #t))
1831 (replace 'install
1832 (lambda* (#:key outputs #:allow-other-keys)
1833 (let ((out (assoc-ref outputs "out"))
1834 (jdk (assoc-ref outputs "jdk"))
1835 (doc (assoc-ref outputs "doc"))
1836 (images (car (find-files "build" ".*-server-release"
1837 #:directories? #t))))
1838 (copy-recursively (string-append images "/images/jdk") jdk)
1839 (copy-recursively (string-append images "/images/jre") out)
1840 (copy-recursively (string-append images "/images/docs") doc))
1841 #t))
1842 (add-after 'install 'strip-zip-timestamps
1843 (lambda* (#:key outputs #:allow-other-keys)
1844 (use-modules (guix build syscalls))
1845 (for-each (lambda (zip)
1846 (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
1847 (with-directory-excursion dir
1848 (invoke "unzip" zip))
1849 (delete-file zip)
1850 (for-each (lambda (file)
1851 (let ((s (lstat file)))
1852 (unless (eq? (stat:type s) 'symlink)
1853 (format #t "reset ~a~%" file)
1854 (utime file 0 0 0 0))))
1855 (find-files dir #:directories? #t))
1856 (with-directory-excursion dir
1857 (let ((files (find-files "." ".*" #:directories? #t)))
1858 (apply invoke "zip" "-0" "-X" zip files)))))
1859 (find-files (assoc-ref outputs "doc") ".*.zip$"))
1860 #t)))))
1861 (inputs
1862 `(("alsa-lib" ,alsa-lib)
1863 ("cups" ,cups)
1864 ("fontconfig" ,fontconfig)
1865 ("freetype" ,freetype)
1866 ("giflib" ,giflib)
1867 ("lcms" ,lcms)
1868 ("libelf" ,libelf)
4bd428a7 1869 ("libjpeg" ,libjpeg-turbo)
dd741059
JL
1870 ("libice" ,libice)
1871 ("libpng" ,libpng)
1872 ("libx11" ,libx11)
1873 ("libxcomposite" ,libxcomposite)
1874 ("libxi" ,libxi)
1875 ("libxinerama" ,libxinerama)
1876 ("libxrender" ,libxrender)
1877 ("libxt" ,libxt)
1878 ("libxtst" ,libxtst)))
1879 (native-inputs
1880 `(("icedtea-8" ,icedtea-8)
1881 ("icedtea-8:jdk" ,icedtea-8 "jdk")
1882 ("unzip" ,unzip)
1883 ("which" ,which)
1884 ("zip" ,zip)))
1885 (home-page "https://openjdk.java.net/projects/jdk9/")
1886 (synopsis "Java development kit")
1887 (description
1888 "This package provides the Java development kit OpenJDK.")
1889 (license license:gpl2+)))
1890
16b89ecc
JL
1891(define-public openjdk10
1892 (package
1893 (inherit openjdk9)
1894 (name "openjdk")
1895 (version "10.46")
1896 (source (origin
1897 (method url-fetch)
1898 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/6fa770f9f8ab.tar.bz2")
1899 (file-name (string-append name "-" version ".tar.bz2"))
1900 (sha256
1901 (base32
1902 "0zywq2203b4hx4jms9vbwvjcj1d3k2v3qpx4s33729fkpmid97r4"))
accb5c31
GB
1903 (patches (search-patches
1904 "openjdk-10-idlj-reproducibility.patch"))
16b89ecc
JL
1905 (modules '((guix build utils)))
1906 (snippet
1907 `(begin
1908 (for-each delete-file (find-files "." ".*.bin$"))
1909 (for-each delete-file (find-files "." ".*.exe$"))
1910 (for-each delete-file (find-files "." ".*.jar$"))
1911 #t))))
1912 (arguments
1913 (substitute-keyword-arguments (package-arguments openjdk9)
1914 ((#:phases phases)
1915 `(modify-phases ,phases
1916 (replace 'fix-java-shebangs
1917 (lambda _
1918 ;; This file was "fixed" by patch-source-shebangs, but it requires
1919 ;; this exact first line.
1920 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1921 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
1922 #t))
1923 (replace 'configure
1924 (lambda* (#:key inputs outputs #:allow-other-keys)
1925 (invoke "bash" "./configure"
1926 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
1927 "--disable-freetype-bundling"
1928 "--disable-warnings-as-errors"
1929 "--disable-hotspot-gtest"
1930 "--with-giflib=system"
1931 "--with-libjpeg=system"
1932 "--with-native-debug-symbols=zipped"
1933 (string-append "--prefix=" (assoc-ref outputs "out")))
1934 #t))))))
1935 (native-inputs
1936 `(("openjdk9" ,openjdk9)
1937 ("openjdk9:jdk" ,openjdk9 "jdk")
1938 ("unzip" ,unzip)
1939 ("which" ,which)
1940 ("zip" ,zip)))))
1941
95bc85b7
GB
1942(define-public openjdk11
1943 (package
1944 (name "openjdk")
1945 (version "11.28")
1946 (source (origin
1947 (method url-fetch)
1948 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/76072a077ee1.tar.bz2")
1949 (file-name (string-append name "-" version ".tar.bz2"))
1950 (sha256
1951 (base32
1952 "0v705w1s9lrqalzahir78pk397rkk9gfvzq821yv8h3xha0bqi6w"))
1953 (modules '((guix build utils)))
1954 (snippet
1955 `(begin
1956 (for-each delete-file (find-files "." ".*.bin$"))
1957 (for-each delete-file (find-files "." ".*.exe$"))
1958 (for-each delete-file (find-files "." ".*.jar$"))
1959 #t))))
1960 (build-system gnu-build-system)
1961 (outputs '("out" "jdk" "doc"))
1962 (arguments
1963 `(#:imported-modules
1964 ((guix build syscalls)
1965 (ice-9 binary-ports)
1966 (rnrs bytevectors)
1967 ,@%gnu-build-system-modules)
1968 #:tests? #f; requires jtreg
1969 ;; TODO package jtreg
1970 ;; disable parallel builds, as the openjdk build system does not like -j
1971 #:parallel-build? #f
1972 #:parallel-tests? #f
1973 ;; reenable parallel builds and tests by adding the flags manually
1974 #:make-flags (list (string-append "JOBS=" (number->string (parallel-job-count))))
1975 #:configure-flags
1976 `("--disable-option-checking" ; --enable-fast-install default flag errors otherwise
1977 "--disable-warnings-as-errors"
1978 ;; make validate-runpath pass, see: http://issues.guix.info/issue/32894
1979 "--with-native-debug-symbols=zipped"
1980 ;; do not use the bundled libraries
1981 "--with-giflib=system"
1982 "--with-lcms=system"
1983 "--with-libjpeg=system"
1984 "--with-libpng=system"
70d23edf 1985 "--with-version-pre="
95bc85b7
GB
1986 ;; allow the build system to locate the system freetype
1987 ,(string-append "--with-freetype-include="
1988 (assoc-ref %build-inputs "freetype") "/include")
1989 ,(string-append "--with-freetype-lib="
1990 (assoc-ref %build-inputs "freetype") "/lib"))
1991 ;; TODO
1992 #:phases
1993 (modify-phases %standard-phases
1994 (add-after 'patch-source-shebangs 'fix-java-shebangs
1995 (lambda _
1996 ;; This file was "fixed" by patch-source-shebangs, but it requires
1997 ;; this exact first line.
1998 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1999 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
2000 #t))
2001 (replace 'build
2002 (lambda _
2003 (with-output-to-file ".src-rev"
2004 (lambda _
2005 (display ,version)))
2006 (setenv "GUIX_LD_WRAPPER_ALLOW_IMPURITIES" "yes")
2007 (invoke "make" "all")
2008 #t))
2009 ;; jdk 11 does not build jre by default any more
2010 ;; building it anyways
2011 ;; for further information see:
2012 ;; https://github.com/AdoptOpenJDK/openjdk-build/issues/356
2013 (add-after 'build 'build-jre
2014 (lambda _
2015 (invoke "make" "legacy-jre-image")
2016 #t))
2017 (replace 'install
2018 (lambda* (#:key outputs #:allow-other-keys)
2019 (let ((out (assoc-ref outputs "out"))
2020 (jdk (assoc-ref outputs "jdk"))
2021 (doc (assoc-ref outputs "doc"))
2022 (images (car (find-files "build" ".*-server-release"
2023 #:directories? #t))))
2024 (copy-recursively (string-append images "/images/jdk") jdk)
2025 (copy-recursively (string-append images "/images/jre") out)
2026 (copy-recursively (string-append images "/images/docs") doc))
2027 #t))
2028 ;; Some of the libraries in the lib/ folder link to libjvm.so.
2029 ;; But that shared object is located in the server/ folder, so it
2030 ;; cannot be found. This phase creates a symbolic link in the
2031 ;; lib/ folder so that the other libraries can find it.
2032 ;;
2033 ;; See:
2034 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
2035 ;;
2036 ;; FIXME: Find the bug in the build system, so that this symlink is
2037 ;; not needed.
2038 (add-after 'install 'install-libjvm
2039 (lambda* (#:key inputs outputs #:allow-other-keys)
2040 (let* ((lib-out (string-append (assoc-ref outputs "out")
2041 "/lib"))
2042 (lib-jdk (string-append (assoc-ref outputs "jdk")
2043 "/lib")))
2044 (symlink (string-append lib-jdk "/server/libjvm.so")
2045 (string-append lib-jdk "/libjvm.so"))
2046 (symlink (string-append lib-out "/server/libjvm.so")
2047 (string-append lib-out "/libjvm.so")))
2048 #t))
2049 (add-after 'install 'strip-character-data-timestamps
2050 (lambda* (#:key outputs #:allow-other-keys)
2051 (use-modules (guix build syscalls))
2052 (let ((archive (string-append
2053 (assoc-ref outputs "jdk") "/lib/src.zip"))
2054 (dir (mkdtemp! "zip-contents.XXXXXX")))
2055 (with-directory-excursion dir
2056 (invoke "unzip" archive))
2057 (delete-file archive)
2058 (with-directory-excursion dir
2059 (let ((char-data-files (find-files "." "CharacterData.*")))
2060 (for-each (lambda (file)
2061 (substitute* file
2062 (((string-append "This file was generated "
2063 "AUTOMATICALLY from a template "
2064 "file.*"))
2065 (string-append "This file was generated "
2066 "AUTOMATICALLY from a template "
2067 "file"))))
2068 char-data-files)))
2069 (with-directory-excursion dir
2070 (let ((files (find-files "." ".*" #:directories? #t)))
2071 (apply invoke "zip" "-0" "-X" archive files))))))
2072 (add-after 'strip-character-data-timestamps 'strip-archive-timestamps
2073 (lambda* (#:key outputs #:allow-other-keys)
2074 (use-modules (guix build syscalls)
2075 (ice-9 binary-ports)
2076 (rnrs bytevectors))
2077 (letrec ((repack-archive
2078 (lambda (archive)
2079 (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
2080 (with-directory-excursion dir
2081 (invoke "unzip" archive))
2082 (delete-file archive)
2083 (for-each (compose repack-archive canonicalize-path)
2084 (find-files dir "(ct.sym|.*.jar)$"))
2085 (let ((reset-file-timestamp
2086 (lambda (file)
2087 (let ((s (lstat file)))
2088 (unless (eq? (stat:type s) 'symlink)
2089 (format #t "reset ~a~%" file)
2090 (utime file 0 0 0 0))))))
2091 (for-each reset-file-timestamp
2092 (find-files dir #:directories? #t)))
2093 (with-directory-excursion dir
2094 (let ((files (find-files "." ".*" #:directories? #t)))
2095 (apply invoke "zip" "-0" "-X" archive files)))))))
2096 (for-each repack-archive
2097 (find-files (assoc-ref outputs "doc") ".*.zip$"))
2098 (for-each repack-archive
2099 (find-files (assoc-ref outputs "jdk")
2100 ".*.(zip|jar|diz)$"))
2101 (repack-archive (string-append (assoc-ref outputs "jdk") "/lib/ct.sym"))
2102 (let ((repack-jmod
2103 (lambda (file-name)
2104 (call-with-input-file file-name
2105 (lambda (file)
2106 (let ((header #vu8(#x4a #x4d #x01 #x00)))
2107 (if (equal? (get-bytevector-n
2108 file (bytevector-length header))
2109 header)
2110 (let* ((header-length (bytevector-length header))
2111 (temp-file (mkstemp!
2112 (string-copy
2113 "temp-file.XXXXXX")))
2114 (temp-filename (port-filename temp-file))
2115 (content-length
2116 (- (stat:size (stat file))
2117 header-length)))
2118 (sendfile temp-file file content-length header-length)
2119 (delete-file file-name)
2120 (close-port temp-file)
2121 (repack-archive (canonicalize-path temp-filename))
2122 (call-with-output-file file-name
2123 (lambda (file)
2124 (put-bytevector file header)
2125 (call-with-input-file temp-filename
2126 (lambda (temp-file)
2127 (sendfile
2128 file temp-file
2129 (stat:size (stat temp-file)) 0)))))))))))))
2130 (for-each repack-jmod
2131 (find-files (assoc-ref outputs "jdk") ".*.jmod$")))
2132 #t)))
2133 (add-after 'install 'remove-timestamp-from-api-summary
2134 (lambda* (#:key outputs #:allow-other-keys)
2135 (substitute* (string-append (assoc-ref outputs "doc")
2136 "/api/overview-summary.html")
2137 (("Generated by javadoc \\(11-internal\\).*$")
2138 "Generated by javadoc (11-internal) -->\n"))
2139 #t)))))
2140 (inputs
2141 `(("alsa-lib" ,alsa-lib)
2142 ("cups" ,cups)
2143 ("fontconfig" ,fontconfig)
2144 ("freetype" ,freetype)
2145 ("giflib" ,giflib)
2146 ("lcms" ,lcms)
4bd428a7 2147 ("libjpeg" ,libjpeg-turbo)
95bc85b7
GB
2148 ("libpng" ,libpng)
2149 ("libx11" ,libx11)
2150 ("libxext" ,libxext)
2151 ("libxrender" ,libxrender)
2152 ("libxt" ,libxt)
2153 ("libxtst" ,libxtst)))
2154 (native-inputs
2155 `(("autoconf" ,autoconf)
2156 ("openjdk10" ,openjdk10)
2157 ("openjdk10:jdk" ,openjdk10 "jdk")
2158 ("pkg-config" ,pkg-config)
2159 ("unzip" ,unzip)
2160 ("which" ,which)
2161 ("zip" ,zip)))
2162 (home-page "https://openjdk.java.net/projects/jdk/11/")
2163 (synopsis "Java development kit")
2164 (description
2165 "This package provides the Java development kit OpenJDK.")
2166 (license license:gpl2+)))
2167
64dc8e9e
GB
2168(define-public openjdk12
2169 (package
2170 (inherit openjdk11)
2171 (name "openjdk")
2172 (version "12.33")
2173 (source (origin
2174 (method url-fetch)
2175 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/0276cba45aac.tar.bz2")
2176 (file-name (string-append name "-" version ".tar.bz2"))
2177 (sha256
2178 (base32
2179 "0mbhdrk12b6878kby0flnbak7444dlpm0ihlmf92vk59y1c02bc2"))
2180 (modules '((guix build utils)))
2181 (snippet
2182 `(begin
2183 (for-each delete-file (find-files "." ".*.bin$"))
2184 (for-each delete-file (find-files "." ".*.exe$"))
2185 (for-each delete-file (find-files "." ".*.jar$"))
2186 #t))))
2187 (inputs
2188 `(("alsa-lib" ,alsa-lib)
2189 ("cups" ,cups)
2190 ("fontconfig" ,fontconfig)
2191 ("freetype" ,freetype)
2192 ("giflib" ,giflib)
2193 ("lcms" ,lcms)
4bd428a7 2194 ("libjpeg" ,libjpeg-turbo)
64dc8e9e
GB
2195 ("libpng" ,libpng)
2196 ("libx11" ,libx11)
2197 ("libxext" ,libxext)
2198 ("libxrandr" ,libxrandr)
2199 ("libxrender" ,libxrender)
2200 ("libxt" ,libxt)
2201 ("libxtst" ,libxtst)))
2202 (native-inputs
2203 `(("autoconf" ,autoconf)
2204 ("openjdk11" ,openjdk11)
2205 ("openjdk11:jdk" ,openjdk11 "jdk")
2206 ("pkg-config" ,pkg-config)
2207 ("unzip" ,unzip)
2208 ("which" ,which)
2209 ("zip" ,zip)))
2210 (home-page "https://openjdk.java.net/projects/jdk/12")))
2211
33aa65e0 2212(define-public icedtea icedtea-8)
068e476f 2213
5490480c 2214\f
8bbd0408
RW
2215(define-public ant/java8
2216 (package (inherit ant-bootstrap)
2217 (name "ant")
2218 (version "1.10.1")
2219 (source (origin
2220 (method url-fetch)
2221 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2222 version "-src.tar.gz"))
2223 (sha256
2224 (base32
2225 "10p3dh77lkzzzcy32dk9azljixzadp46fggjfbvgkl8mmb8cxxv8"))
2226 (modules '((guix build utils)))
2227 (snippet
2228 '(begin
2229 (for-each delete-file
2230 (find-files "lib/optional" "\\.jar$"))
2231 #t))))
2232 (arguments
2233 (substitute-keyword-arguments (package-arguments ant-bootstrap)
2234 ((#:phases phases)
2235 `(modify-phases ,phases
2236 (add-after 'unpack 'remove-scripts
2237 ;; Remove bat / cmd scripts for DOS as well as the antRun and runant
2238 ;; wrappers.
2239 (lambda _
2240 (for-each delete-file
2241 (find-files "src/script"
2242 "(.*\\.(bat|cmd)|runant.*|antRun.*)"))
2243 #t))
2244 (replace 'build
2245 (lambda* (#:key inputs outputs #:allow-other-keys)
2246 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
2247
2248 ;; Disable tests to avoid dependency on hamcrest-core, which needs
2249 ;; Ant to build. This is necessary in addition to disabling the
2250 ;; "check" phase, because the dependency on "test-jar" would always
2251 ;; result in the tests to be run.
2252 (substitute* "build.xml"
2253 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
2c8ac364
MW
2254 (invoke "bash" "bootstrap.sh"
2255 (string-append "-Ddist.dir="
2256 (assoc-ref outputs "out")))))))))
8bbd0408 2257 (native-inputs
1c7ef07e
GB
2258 `(("jdk" ,icedtea-8 "jdk")
2259 ("zip" ,zip)
2260 ("unzip" ,unzip)))))
8bbd0408 2261
e441fc56
RW
2262;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x series
2263;; requires Java 8.
2264(define-public ant
2265 (package (inherit ant/java8)
2266 (version "1.9.9")
2267 (source (origin
2268 (method url-fetch)
2269 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2270 version "-src.tar.gz"))
2271 (sha256
2272 (base32
2273 "1k28mka0m3isy9yr8gz84kz1f3f879rwaxrd44vdn9xbfwvwk86n"))))
2274 (native-inputs
3b6ba18b
GB
2275 `(("jdk" ,icedtea-7 "jdk")
2276 ("zip" ,zip)
2277 ("unzip" ,unzip)))))
e441fc56 2278
9ce7ac99
RW
2279(define-public ant-apache-bcel
2280 (package
2281 (inherit ant/java8)
2282 (name "ant-apache-bcel")
2283 (arguments
2284 (substitute-keyword-arguments (package-arguments ant/java8)
2285 ((#:phases phases)
2286 `(modify-phases ,phases
2287 (add-after 'unpack 'link-bcel
2288 (lambda* (#:key inputs #:allow-other-keys)
2289 (for-each (lambda (file)
2290 (symlink file
2291 (string-append "lib/optional/"
2292 (basename file))))
2293 (find-files (assoc-ref inputs "java-commons-bcel")
2294 "\\.jar$"))
2295 #t))
2296 (add-after 'build 'install
2297 (lambda* (#:key outputs #:allow-other-keys)
2298 (let* ((out (assoc-ref outputs "out"))
2299 (share (string-append out "/share/java"))
2300 (bin (string-append out "/bin"))
2301 (lib (string-append out "/lib")))
2302 (mkdir-p share)
2303 (install-file (string-append lib "/ant-apache-bcel.jar") share)
2304 (delete-file-recursively bin)
2305 (delete-file-recursively lib)
2306 #t)))))))
2307 (inputs
2308 `(("java-commons-bcel" ,java-commons-bcel)
2309 ,@(package-inputs ant/java8)))))
2310
fa6c4213
RW
2311(define-public ant-junit
2312 (package
2313 (inherit ant/java8)
2314 (name "ant-junit")
2315 (arguments
2316 (substitute-keyword-arguments (package-arguments ant/java8)
2317 ((#:phases phases)
2318 `(modify-phases ,phases
2319 (add-after 'unpack 'link-junit
2320 (lambda* (#:key inputs #:allow-other-keys)
2321 (for-each (lambda (file)
2322 (symlink file
2323 (string-append "lib/optional/"
2324 (basename file))))
2325 (find-files (assoc-ref inputs "java-junit")
2326 "\\.jar$"))
2327 #t))
2328 (add-after 'build 'install
2329 (lambda* (#:key outputs #:allow-other-keys)
2330 (let* ((out (assoc-ref outputs "out"))
2331 (share (string-append out "/share/java"))
2332 (bin (string-append out "/bin"))
2333 (lib (string-append out "/lib")))
2334 (mkdir-p share)
2335 (install-file (string-append lib "/ant-junit.jar") share)
2336 (delete-file-recursively bin)
2337 (delete-file-recursively lib)
2338 #t)))))))
2339 (inputs
2340 `(("java-junit" ,java-junit)
2341 ,@(package-inputs ant/java8)))))
2342
7214fbd2
JL
2343(define-public java-openjfx-build
2344 (package
2345 (name "java-openjfx-build")
2346 ;; This is a java-8 version
2347 (version "8.202")
2348 (source (origin
2349 (method hg-fetch)
2350 (uri (hg-reference
2351 (url "http://hg.openjdk.java.net/openjfx/8u-dev/rt")
2352 (changeset (string-append
2353 (string-join (string-split version #\.) "u")
2354 "-ga"))))
2355 (file-name (string-append name "-" version "-checkout"))
2356 (sha256
2357 (base32
2358 "0yg38mwpivswccv9n96k06x3iv82i4px1a9xg9l8dswzwmfj259f"))))
2359 (build-system ant-build-system)
2360 (arguments
2361 `(#:jar-name "java-openjfx.jar"
2362 #:source-dir "buildSrc/src/main/java"
2363 #:test-dir "buildSrc/src/test"
2364 #:phases
2365 (modify-phases %standard-phases
2366 (add-before 'configure 'generate-jsl-parser
2367 (lambda _
2368 (invoke "antlr3" "-o"
2369 "buildSrc/src/main/java/com/sun/scenario/effect/compiler"
2370 "buildSrc/src/main/antlr/JSL.g"))))))
2371 (inputs
2372 `(("antlr3" ,antlr3)
2373 ("java-stringtemplate" ,java-stringtemplate)))
2374 (native-inputs
2375 `(("java-junit" ,java-junit)
2376 ("java-hamcrest-core" ,java-hamcrest-core)))
2377 (home-page "https://openjfx.io")
2378 (synopsis "Graphical application toolkit in Java")
2379 (description "OpenJFX is a client application platform for desktop,
2380mobile and embedded systems built on Java. Its goal is to produce a
2381modern, efficient, and fully featured toolkit for developing rich client
2382applications. This package contains base classes for the OpenJFX
2383distribution and helper classes for building other parts of the
2384distribution.")
2385 (license license:gpl2))) ;gpl2 only, with classpath exception
2386
46f05439
JL
2387(define-public java-openjfx-base
2388 (package (inherit java-openjfx-build)
2389 (name "java-openjfx-base")
2390 (arguments
2391 `(#:jar-name "java-openjfx-base.jar"
2392 #:source-dir "modules/base/src/main/java:modules/base/src/main/java8:modules/base/src/main/version-info"
2393 #:test-dir "modules/base/src/test"
2394 #:phases
2395 (modify-phases %standard-phases
2396 (add-before 'check 'remove-empty-file
2397 (lambda _
2398 (with-directory-excursion "modules/base/src/test/java"
2399 ;; These files are completely commented, but junit expects them to
2400 ;; contain a class, so tests fail.
2401 (delete-file
2402 "com/sun/javafx/property/adapter/PropertyDescriptorTest.java")
2403 (delete-file
2404 "com/sun/javafx/property/adapter/ReadOnlyPropertyDescriptorTest.java")
2405 (delete-file "javafx/beans/property/PropertiesTest.java")
2406 (delete-file
2407 "javafx/beans/property/adapter/ReadOnlyJavaBeanPropertyBuilder_General_Test.java")
2408 ;; This one fails
2409 (delete-file "com/sun/javafx/runtime/VersionInfoTest.java"))
2410 #t)))))
2411 (propagated-inputs
2412 `(("java-openjfx-build" ,java-openjfx-build)))
2413 (description "OpenJFX is a client application platform for desktop,
2414mobile and embedded systems built on Java. Its goal is to produce a
2415modern, efficient, and fully featured toolkit for developing rich client
2416applications. This package contains base classes for the OpenJFX
2417distribution.")))
36f73d70
JL
2418
2419(define-public java-openjfx-graphics
2420 (package (inherit java-openjfx-build)
2421 (name "java-openjfx-graphics")
2422 (arguments
2423 `(#:jar-name "java-openjfx-graphics.jar"
2424 #:source-dir "modules/graphics/src/main/java"
2425 #:tests? #f; require X
2426 #:test-dir "modules/graphics/src/test"))
2427 (propagated-inputs
2428 `(("java-openjfx-base" ,java-openjfx-base)
2429 ("java-swt" ,java-swt)))
2430 (description "OpenJFX is a client application platform for desktop,
2431mobile and embedded systems built on Java. Its goal is to produce a
2432modern, efficient, and fully featured toolkit for developing rich client
2433applications. This package contains graphics-related classes for the
2434OpenJFX distribution.")))
68a13319
JL
2435
2436(define-public java-openjfx-media
2437 (package (inherit java-openjfx-build)
2438 (name "java-openjfx-media")
2439 (propagated-inputs
2440 `(("java-openjxf-graphics" ,java-openjfx-graphics)))
2441 (arguments
2442 `(#:jar-name "java-openjfx-media.jar"
2443 #:source-dir "modules/media/src/main/java"
2444 #:tests? #f)); no tests
2445 (description "OpenJFX is a client application platform for desktop,
2446mobile and embedded systems built on Java. Its goal is to produce a
2447modern, efficient, and fully featured toolkit for developing rich client
2448applications. This package contains media-related classes for the
2449OpenJFX distribution.")))
46f05439 2450
53fb0476 2451(define-public javacc-4
fc8d100b
RW
2452 (package
2453 (name "javacc")
53fb0476 2454 (version "4.1")
fc8d100b 2455 (source (origin
53fb0476
AV
2456 (method git-fetch)
2457 (uri (git-reference
2458 (url "https://github.com/javacc/javacc.git")
2459 (commit "release_41")))
2460 (file-name (string-append "javacc-" version "-checkout"))
fc8d100b
RW
2461 (sha256
2462 (base32
6662d65f
AV
2463 "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0"))
2464 (modules '((guix build utils)))
2465 ;; delete bundled jars
2466 (snippet '(begin (delete-file-recursively "lib") #t))))
fc8d100b 2467 (build-system ant-build-system)
53fb0476
AV
2468 ;; Tests fail with
2469 ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60:
2470 ;; JAVACODE failed
fc8d100b 2471 (arguments
53fb0476 2472 `(#:tests? #f
fc8d100b
RW
2473 #:phases
2474 (modify-phases %standard-phases
6662d65f
AV
2475 ;; Delete tests to avoid build failure (we don't run them anyway).
2476 (add-after 'unpack 'delete-tests
fc8d100b 2477 (lambda _
6662d65f
AV
2478 (for-each delete-file
2479 '("src/org/javacc/JavaCCTestCase.java"
2480 "src/org/javacc/parser/ExpansionTest.java"
2481 "src/org/javacc/parser/OptionsTest.java"
2482 "src/org/javacc/jjtree/JJTreeOptionsTest.java"))
2483 (for-each delete-file-recursively
2484 '("src/org/javacc/parser/test"
2485 "src/org/javacc/jjdoc/test"))
2486 #t))
53fb0476 2487 (replace 'install (install-jars "bin/lib")))))
fc8d100b
RW
2488 (home-page "https://javacc.org/")
2489 (synopsis "Java parser generator")
2490 (description "Java Compiler Compiler (JavaCC) is the most popular parser
2491generator for use with Java applications. A parser generator is a tool that
2492reads a grammar specification and converts it to a Java program that can
2493recognize matches to the grammar. In addition to the parser generator itself,
2494JavaCC provides other standard capabilities related to parser generation such
2495as tree building (via a tool called JJTree included with JavaCC), actions,
2496debugging, etc.")
2497 (license license:bsd-3)))
2498
53fb0476
AV
2499(define-public javacc
2500 (package
2501 (inherit javacc-4)
6b66e470 2502 (version "7.0.4")
ebf8048d
TGR
2503 (source
2504 (origin
2505 (method git-fetch)
2506 (uri (git-reference
2507 (url "https://github.com/javacc/javacc.git")
2508 (commit version)))
2509 (file-name (git-file-name "javacc" version))
2510 (sha256
2511 (base32 "18kkak3gda93gr25jrgy6q00g0jr8i24ri2wk4kybz1v234fxx9i"))
2512 (modules '((guix build utils)))
2513 ;; Delete bundled jars.
2514 (snippet '(begin (for-each delete-file-recursively
2515 '("bootstrap" "lib"))
2516 #t))))
6688c41e 2517 (arguments
6b66e470 2518 `(#:make-flags ; bootstrap from javacc-4
33428d12
AV
2519 (list (string-append "-Dbootstrap-jar="
2520 (assoc-ref %build-inputs "javacc")
2521 "/share/java/javacc.jar"))
2522 #:test-target "test"
6688c41e
RW
2523 #:phases
2524 (modify-phases %standard-phases
16fdf2f5
JL
2525 (replace 'install (install-jars "target"))
2526 (add-after 'install 'install-bin
2527 (lambda* (#:key outputs inputs #:allow-other-keys)
2528 (let* ((out (assoc-ref outputs "out"))
2529 (dir (string-append out "/share/java"))
2530 (bin (string-append out "/bin"))
2531 (javacc (string-append bin "/javacc")))
2532 (mkdir-p bin)
2533 (with-output-to-file javacc
2534 (lambda _
2535 (display
2536 (string-append "#!/bin/sh\n"
2537 (assoc-ref inputs "jdk") "/bin/java"
2538 " -cp " dir "/javacc.jar" " `basename $0`" " $*"))))
2539 (chmod javacc #o755)
2540 ;; symlink to different names to affect the first argument and
2541 ;; change the behavior of the jar file.
2542 (symlink javacc (string-append bin "/jjdoc"))
2543 (symlink javacc (string-append bin "/jjtree"))
2544 #t))))))
2545
33428d12
AV
2546 (native-inputs
2547 `(("javacc" ,javacc-4)))))
6688c41e 2548
c1cb8576
RW
2549;; This is the last 3.x release of ECJ
2550(define-public java-ecj-3
2551 (package
2552 (name "java-ecj")
2553 (version "3.8.2")
2554 (source (origin
2555 (method url-fetch)
2556 (uri (string-append "http://archive.eclipse.org/eclipse/"
2557 "downloads/drops/R-" version
2558 "-201301310800/ecjsrc-" version ".jar"))
2559 (sha256
2560 (base32
2561 "01mdj14jw11g1jfnki4fi8229p0c6zzckd38zqy2w4m3cjcvsx04"))))
2562 (build-system ant-build-system)
2563 (arguments
2564 `(#:tests? #f ; none included
2565 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2566 #:make-flags (list "-f" "src/build.xml")
2567 #:build-target "build"
2568 #:phases
2569 (modify-phases %standard-phases
2570 (add-after 'unpack 'fix-manifest
2571 (lambda _
2572 ;; Record the main class to make ecj executable.
2573 (with-atomic-file-replacement "src/META-INF/MANIFEST.MF"
2574 (lambda (in out)
2575 (display "Manifest-Version: 1.0
2576Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2c8ac364
MW
2577 out)))
2578 #t))
c1cb8576
RW
2579 (replace 'install (install-jars ".")))))
2580 (home-page "https://eclipse.org")
2581 (synopsis "Eclipse Java development tools core batch compiler")
2582 (description "This package provides the Eclipse Java core batch compiler.")
2583 (license license:epl1.0)))
2584
f201b18e
RW
2585;; This is needed for java-cisd-args4j
2586(define-public java-ecj-3.5
2587 (package (inherit java-ecj-3)
2588 (version "3.5.1")
2589 (source (origin
2590 (method url-fetch/zipbomb)
2591 (uri (string-append "http://archive.eclipse.org/eclipse/"
2592 "downloads/drops/R-" version
2593 "-200909170800/ecjsrc-" version ".zip"))
2594 (sha256
2595 (base32
2596 "1vnl2mavisc567bip736xzsvvbjif5279wc4a7pbdik5wlir8qr7"))))
2597 (build-system ant-build-system)
2598 (arguments
2599 `(#:tests? #f ; none included
2600 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2601 #:build-target "build"
2602 #:phases
2603 (modify-phases %standard-phases
2604 (add-after 'unpack 'fix-manifest
2605 (lambda _
2606 ;; Record the main class to make ecj executable.
2607 (with-atomic-file-replacement "META-INF/MANIFEST.MF"
2608 (lambda (in out)
2609 (dump-port in out)
2610 (display "Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2c8ac364
MW
2611 out)))
2612 #t))
f201b18e
RW
2613 (replace 'install (install-jars ".")))))
2614 (native-inputs
2615 `(("unzip" ,unzip)))))
2616
bc3497a5
BH
2617(define-public java-ecj
2618 (package (inherit java-ecj-3)
2619 (version "4.6.3")
2620 (source
2621 (origin
2622 (method url-fetch)
2623 (uri (string-append
2624 "http://archive.eclipse.org/eclipse/downloads/drops4/R-"
2625 version
2626 "-201703010400/ecjsrc-"
2627 version
2628 ".jar"))
2629 (sha256
2630 (base32
2631 "11cfgsdgznja1pvlxkjbqykxd7pcd5655vkm7s44xmahmap15gpl"))))
2632 (arguments
2633 `(#:tests? #f ; none included
2634 #:build-target "build"
2635 #:phases
2636 (modify-phases %standard-phases
2637 (add-after 'unpack 'fix-build.xml
2638 (lambda _
2639 (substitute* "src/build.xml"
2640 (("^.*MANIFEST.*$")
2641 ""))
2642 #t))
2643 (add-after 'unpack 'fix-prop
2644 (lambda _
2645 (substitute* "src/build.xml"
2646 (("^.*properties.*$")
2647 "<include name=\"**/*.properties\"/>
2648 <include name=\"**/*.props\"/>"))
2649 #t))
2650 (add-before 'build 'chdir
2651 (lambda _
2652 (chdir "src")
2653 #t))
2654 (replace 'install (install-jars ".")))))))
2655
30d55473
RW
2656(define-public java-cisd-base
2657 (let ((revision 38938)
2658 (base-version "14.12.0"))
2659 (package
2660 (name "java-cisd-base")
2661 (version (string-append base-version "-" (number->string revision)))
2662 (source (origin
2663 (method svn-fetch)
2664 (uri (svn-reference
2665 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2666 "base/tags/release/"
2667 (version-major+minor base-version)
2668 ".x/" base-version "/base/"))
2669 (revision revision)))
2670 (file-name (string-append "java-cisd-base-" version "-checkout"))
2671 (sha256
2672 (base32
2673 "1i5adyf7nzclb0wydgwa1az04qliid8035vpahaandmkmigbnxiy"))
2674 (modules '((guix build utils)))
2675 (snippet
2676 '(begin
2677 ;; Delete included gradle jar
2678 (delete-file-recursively "gradle/wrapper")
2679 ;; Delete pre-built native libraries
2680 (delete-file-recursively "libs")
2681 #t))))
2682 (build-system ant-build-system)
2683 (arguments
2684 `(#:make-flags '("-file" "build/build.xml")
2685 #:test-target "jar-test"
2686 #:jdk ,icedtea-8
2687 #:phases
2688 (modify-phases %standard-phases
2689 (add-after 'unpack 'unpack-build-resources
2690 (lambda* (#:key inputs #:allow-other-keys)
2691 (copy-recursively (assoc-ref inputs "build-resources")
2692 "../build_resources")
2693 #t))
2694 (add-after 'unpack-build-resources 'fix-dependencies
2695 (lambda* (#:key inputs #:allow-other-keys)
2696 (substitute* "build/build.xml"
2697 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2698 (string-append (assoc-ref inputs "java-testng")
2699 "/share/java/java-testng.jar"))
2700 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2701 (string-append (assoc-ref inputs "java-commons-lang")
2702 "/share/java/commons-lang-"
2703 ,(package-version java-commons-lang) ".jar"))
2704 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2705 (string-append (assoc-ref inputs "java-commons-io")
2706 "/share/java/commons-io-"
2707 ,(package-version java-commons-io)
2708 "-SNAPSHOT.jar"))
2709 ;; Remove dependency on svn
2710 (("<build-info.*") "")
2711 (("\\$\\{revision.number\\}")
2712 ,(number->string revision))
2713 (("\\$\\{version.number\\}") ,base-version))
2714 ;; Remove dependency on classycle
2715 (substitute* "../build_resources/ant/build-common.xml"
2716 (("<taskdef name=\"dependency-checker.*") "")
2717 (("classname=\"classycle.*") "")
2718 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2719 #t))
2720 ;; A few tests fail because of the lack of a proper /etc/groups and
2721 ;; /etc/passwd file in the build container.
2722 (add-after 'unpack 'disable-broken-tests
2723 (lambda _
2724 (substitute* "sourceTest/java/ch/systemsx/cisd/base/AllTests.java"
2725 (("Unix.isOperational\\(\\)") "false"))
2726 #t))
2727 ;; These decorators are almost useless and pull in an unpackaged
2728 ;; dependency.
2729 (add-after 'unpack 'remove-useless-decorators
2730 (lambda _
2731 (substitute* "source/java/ch/systemsx/cisd/base/unix/Unix.java"
2732 (("@Private") "")
2733 (("import ch.rinn.restrictions.Private;") ""))
2734 (substitute* "sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java"
2735 (("@Friend.*") "")
2736 (("import ch.rinn.restrictions.Friend;") ""))
2737 #t))
2738 (add-before 'configure 'build-native-code
2739 (lambda* (#:key inputs #:allow-other-keys)
2740 (let ((jdk (assoc-ref inputs "jdk"))
2741 (dir ,(match (%current-system)
2742 ("i686-linux"
2743 "i386-Linux")
2744 ((or "armhf-linux" "aarch64-linux")
2745 "arm-Linux")
2746 ((or "x86_64-linux")
2747 "amd64-Linux")
2748 (_ "unknown-Linux"))))
2749 (with-directory-excursion "source/c"
2750 (invoke "gcc" "-shared" "-O3" "-fPIC" "unix.c"
2751 (string-append "-I" jdk "/include")
2752 (string-append "-I" jdk "/include/linux")
2753 "-o" "libunix.so")
2754 (invoke "gcc" "-shared" "-O3" "-fPIC"
2755 "-DMACHINE_BYTE_ORDER=1"
2756 "copyCommon.c"
2757 "copyByteChar.c"
2758 "copyByteDouble.c"
2759 "copyByteFloat.c"
2760 "copyByteInt.c"
2761 "copyByteLong.c"
2762 "copyByteShort.c"
2763 (string-append "-I" jdk "/include")
2764 (string-append "-I" jdk "/include/linux")
2765 "-o" "libnativedata.so"))
2766 (install-file "source/c/libunix.so"
2767 (string-append "libs/native/unix/" dir))
2768 (install-file "source/c/libnativedata.so"
2769 (string-append "libs/native/nativedata/" dir))
2770 #t)))
2771 ;; In the "check" phase we only build the test executable.
2772 (add-after 'check 'run-tests
2773 (lambda _
2774 (invoke "java" "-jar" "targets/dist/sis-base-test.jar")
2775 (delete-file "targets/dist/sis-base-test.jar")
2776 #t))
2777 (replace 'install (install-jars "targets/dist")))))
2778 (native-inputs
2779 `(("jdk" ,icedtea-8)
2780 ("java-commons-lang" ,java-commons-lang)
2781 ("java-commons-io" ,java-commons-io)
2782 ("java-testng" ,java-testng)
2783 ("build-resources"
2784 ,(origin
2785 (method svn-fetch)
2786 (uri (svn-reference
2787 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2788 "base/tags/release/"
2789 (version-major+minor base-version)
2790 ".x/" base-version
2791 "/build_resources/"))
2792 (revision revision)))
2793 (sha256
2794 (base32
2795 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
2796 (home-page "http://svnsis.ethz.ch")
2797 (synopsis "Utility classes for libraries from ETH Zurich")
2798 (description "This library supplies some utility classes needed for
2799libraries from the SIS division at ETH Zurich like jHDF5.")
2800 ;; The C sources are under a non-copyleft license, which looks like a
2801 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
2802 (license (list license:asl2.0
2803 (license:non-copyleft "file://source/c/COPYING"))))))
2804
04ddca26
RW
2805(define-public java-cisd-args4j
2806 (let ((revision 39162)
2807 (base-version "9.11.2"))
2808 (package
2809 (name "java-cisd-args4j")
2810 (version (string-append base-version "-" (number->string revision)))
2811 (source (origin
2812 (method svn-fetch)
2813 (uri (svn-reference
2814 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2815 "args4j/tags/release/"
2816 (version-major+minor base-version)
2817 ".x/" base-version "/args4j/"))
2818 (revision revision)))
2819 (file-name (string-append "java-cisd-args4j-" version "-checkout"))
2820 (sha256
2821 (base32
2822 "0hhqznjaivq7ips7mkwas78z42s6djsm20rrs7g1zd59rcsakxn2"))))
2823 (build-system ant-build-system)
2824 (arguments
2825 `(#:make-flags '("-file" "build/build.xml")
2826 #:tests? #f ; there are no tests
2827 ;; There are weird build failures with JDK8, such as: "The type
2828 ;; java.io.ObjectInputStream cannot be resolved. It is indirectly
2829 ;; referenced from required .class files"
2830 #:jdk ,icedtea-7
2831 #:modules ((guix build ant-build-system)
2832 (guix build utils)
2833 (guix build java-utils)
2834 (sxml simple)
2835 (sxml transform)
2836 (sxml xpath))
2837 #:phases
2838 (modify-phases %standard-phases
2839 (add-after 'unpack 'unpack-build-resources
2840 (lambda* (#:key inputs #:allow-other-keys)
2841 (mkdir-p "../build_resources")
2842 (invoke "tar" "xf" (assoc-ref inputs "build-resources")
2843 "-C" "../build_resources"
2844 "--strip-components=1")
2845 (mkdir-p "../build_resources/lib")
2846 #t))
2847 (add-after 'unpack-build-resources 'fix-dependencies
2848 (lambda* (#:key inputs #:allow-other-keys)
2849 ;; FIXME: There should be a more convenient abstraction for
2850 ;; editing XML files.
2851 (with-directory-excursion "../build_resources/ant/"
2852 (chmod "build-common.xml" #o664)
2853 (call-with-output-file "build-common.xml.new"
2854 (lambda (port)
2855 (sxml->xml
2856 (pre-post-order
2857 (with-input-from-file "build-common.xml"
2858 (lambda _ (xml->sxml #:trim-whitespace? #t)))
2859 `(;; Remove dependency on classycle and custom ant tasks
2860 (taskdef . ,(lambda (tag . kids)
2861 (let ((name ((sxpath '(name *text*)) kids)))
2862 (if (or (member "build-info" name)
2863 (member "dependency-checker" name)
2864 (member "build-java-subprojects" name)
2865 (member "project-classpath" name))
2866 '() ; skip
2867 `(,tag ,@kids)))))
2868 (typedef . ,(lambda (tag . kids)
2869 (let ((name ((sxpath '(name *text*)) kids)))
2870 (if (member "recursive-jar" name)
2871 '() ; skip
2872 `(,tag ,@kids)))))
2873 (build-java-subprojects . ,(lambda _ '()))
2874 ;; Ignore everything else
2875 (*default* . ,(lambda (tag . kids) `(,tag ,@kids)))
2876 (*text* . ,(lambda (_ txt) txt))))
2877 port)))
2878 (rename-file "build-common.xml.new" "build-common.xml"))
2879 (substitute* "build/build.xml"
2880 (("\\$\\{lib\\}/cisd-base/cisd-base.jar")
2881 (string-append (assoc-ref inputs "java-cisd-base")
2882 "/share/java/sis-base.jar"))
2883 ;; Remove dependency on svn
2884 (("<build-info.*") "")
2885 (("\\$\\{revision.number\\}")
2886 ,(number->string revision))
2887 (("\\$\\{version.number\\}") ,base-version)
2888 ;; Don't use custom ant tasks.
2889 (("recursive-jar") "jar")
2890 (("<project-classpath.*") ""))
2891 #t))
2892 (replace 'install (install-jars "targets/dist")))))
2893 (inputs
2894 `(("java-cisd-base" ,java-cisd-base)))
2895 (native-inputs
2896 `(("ecj" ,java-ecj-3.5)
2897 ("build-resources"
2898 ,(origin
2899 (method svn-fetch)
2900 (uri (svn-reference
2901 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2902 "args4j/tags/release/"
2903 (version-major+minor base-version)
2904 ".x/" base-version
2905 "/build_resources/"))
2906 (revision revision)))
2907 (sha256
2908 (base32
2909 "056cam4k8pll7ass31sy6gwn8g8719njc41yf4l02b0342nilkyf"))
2910 (modules '((guix build utils)))
2911 ;; Delete bundled pre-built jars.
2912 (snippet
2913 '(begin (delete-file-recursively "lib/") #t))))))
2914 (home-page "http://svnsis.ethz.ch")
2915 (synopsis "Command line parser library")
2916 (description "This package provides a parser for command line arguments.")
2917 (license license:asl2.0))))
2918
2f0d0418
RW
2919(define-public java-cisd-jhdf5
2920 (let ((revision 39162)
2921 (base-version "14.12.6"))
2922 (package
2923 (name "java-cisd-jhdf5")
2924 (version (string-append base-version "-" (number->string revision)))
2925 (source (origin
2926 (method svn-fetch)
2927 (uri (svn-reference
2928 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2929 "jhdf5/tags/release/"
2930 (version-major+minor base-version)
2931 ".x/" base-version "/jhdf5/"))
2932 (revision revision)))
2933 (file-name (string-append "java-cisd-jhdf5-" version "-checkout"))
2934 (sha256
2935 (base32
2936 "13i17s2hn0q9drdqvp8csy7770p3hdbh9rp30ihln2ldkfawdmz0"))
2937 (modules '((guix build utils)))
2938 (snippet
2939 '(begin
2940 ;; Delete included gradle jar
2941 (delete-file-recursively "gradle/wrapper")
2942 ;; Delete pre-built native libraries
2943 (delete-file-recursively "libs")
2944 #t))))
2945 (build-system ant-build-system)
2946 (arguments
2947 `(#:make-flags '("-file" "build/build.xml")
2948 #:build-target "jar-all"
2949 #:test-target "jar-test"
2950 #:jdk ,icedtea-8
2951 #:phases
2952 (modify-phases %standard-phases
1ed386fc
RW
2953 ;; FIXME: this build phase fails.
2954 (delete 'generate-jar-indices)
2f0d0418
RW
2955 ;; Don't erase results from the build phase when building tests.
2956 (add-after 'unpack 'separate-test-target-from-clean
2957 (lambda _
2958 (substitute* "build/build.xml"
2959 (("\"jar-test\" depends=\"clean, ")
2960 "\"jar-test\" depends=\""))
2961 #t))
2962 (add-after 'unpack 'unpack-build-resources
2963 (lambda* (#:key inputs #:allow-other-keys)
2964 (copy-recursively (assoc-ref inputs "build-resources")
2965 "../build_resources")
2966 (delete-file-recursively "../build_resources/lib/")
2967 (mkdir-p "../build_resources/lib")
2968 ;; Remove dependency on classycle
2969 (substitute* "../build_resources/ant/build-common.xml"
2970 (("<taskdef name=\"dependency-checker.*") "")
2971 (("classname=\"classycle.*") "")
2972 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2973 ;; Remove dependency on svn
2974 (substitute* "build/build.xml"
2975 (("<build-info.*") "")
2976 (("\\$\\{revision.number\\}")
2977 ,(number->string revision))
2978 (("\\$\\{version.number\\}") ,base-version))
2979 #t))
2980 (add-after 'unpack-build-resources 'fix-dependencies
2981 (lambda* (#:key inputs #:allow-other-keys)
2982 (substitute* "../build_resources/ant/build-common.xml"
2983 (("../libraries/testng/testng-jdk15.jar")
2984 (string-append (assoc-ref inputs "java-testng")
2985 "/share/java/java-testng.jar")))
2986 (substitute* "build/build.xml"
2987 (("\\$\\{lib\\}/sis-base/sis-base.jar")
2988 (string-append (assoc-ref inputs "java-cisd-base")
2989 "/share/java/sis-base.jar"))
2990 (("\\$\\{lib\\}/cisd-args4j/cisd-args4j.jar")
2991 (string-append (assoc-ref inputs "java-cisd-args4j")
2992 "/share/java/cisd-args4j.jar"))
2993 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2994 (string-append (assoc-ref inputs "java-commons-lang")
2995 "/share/java/commons-lang-"
2996 ,(package-version java-commons-lang) ".jar"))
2997 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2998 (string-append (assoc-ref inputs "java-commons-io")
2999 "/share/java/commons-io-"
3000 ,(package-version java-commons-io)
3001 "-SNAPSHOT.jar"))
3002 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
3003 (string-append (assoc-ref inputs "java-testng")
3004 "/share/java/java-testng.jar"))
3005 (("\\$\\{lib\\}/junit4/junit.jar")
3006 (string-append (assoc-ref inputs "java-junit")
3007 "/share/java/junit.jar"))
3008 (("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar")
3009 (string-append (assoc-ref inputs "java-hamcrest-core")
3010 "/share/java/hamcrest-core.jar")))
3011 ;; Remove dependency on ch.rinn.restrictions
3012 (with-directory-excursion "source/java/ch/systemsx/cisd/hdf5/"
3013 (substitute* '("BitSetConversionUtils.java"
3014 "HDF5Utils.java")
3015 (("import ch.rinn.restrictions.Private;") "")
3016 (("@Private") "")))
3017 (with-directory-excursion "sourceTest/java/ch/systemsx/cisd/hdf5/"
3018 (substitute* '("BitSetConversionTest.java"
3019 "h5ar/HDF5ArchiverTest.java")
3020 (("import ch.rinn.restrictions.Friend;") "")
3021 (("@Friend.*") ""))
3022 ;; Remove leftovers from removing @Friend
3023 (substitute* "h5ar/HDF5ArchiverTest.java"
3024 (("\\{ HDF5Archiver.class, IdCache.class, LinkRecord.class \\}\\)")
3025 "")))
3026 #t))
3027 (add-before 'configure 'build-native-library
3028 (lambda* (#:key inputs #:allow-other-keys)
3029 (let ((jdk (assoc-ref inputs "jdk"))
3030 (hdf5 (assoc-ref inputs "hdf5"))
3031 (dir ,(match (%current-system)
3032 ("i686-linux"
3033 "i386-Linux")
3034 ((or "armhf-linux" "aarch64-linux")
3035 "arm-Linux")
3036 ((or "x86_64-linux")
3037 "amd64-Linux")
3038 (_ "unknown-Linux"))))
3039 (with-directory-excursion "source/c"
3040 (apply invoke `("gcc" "-shared" "-O3"
3041 "-fPIC"
3042 "-Wl,--exclude-libs,ALL"
3043 ,@(find-files "jhdf5" "\\.c$")
3044 ,@(find-files "hdf-java" "\\.c$")
3045 ,(string-append "-I" hdf5 "/include")
3046 ,(string-append "-I" jdk "/include")
3047 ,(string-append "-I" jdk "/include/linux")
3048 ,(string-append hdf5 "/lib/libhdf5.a")
3049 "-o" "libjhdf5.so" "-lz")))
3050 (install-file "source/c/libjhdf5.so"
3051 (string-append "libs/native/jhdf5/" dir))
3052 #t)))
3053 ;; In the "check" phase we only build the test executable.
3054 (add-after 'check 'run-tests
3055 (lambda _
3056 (invoke "java" "-jar" "targets/dist/sis-jhdf5-test.jar")
3057 (delete-file "targets/dist/sis-jhdf5-test.jar")
3058 #t))
3059 (replace 'install
3060 (install-jars "targets/dist")))))
3061 (inputs
3062 `(("java-cisd-base" ,java-cisd-base)
3063 ("java-cisd-args4j" ,java-cisd-args4j)
3064 ("java-commons-lang" ,java-commons-lang)
3065 ("java-commons-io" ,java-commons-io)
3066 ("hdf5" ,hdf5)
3067 ("zlib" ,zlib)))
3068 (native-inputs
3069 `(("jdk" ,icedtea-8)
3070 ("java-testng" ,java-testng)
3071 ("java-junit" ,java-junit)
3072 ("java-jmock" ,java-jmock)
3073 ("java-hamcrest-core" ,java-hamcrest-core)
3074 ("build-resources"
3075 ,(origin
3076 (method svn-fetch)
3077 (uri (svn-reference
3078 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3079 "jhdf5/tags/release/"
3080 (version-major+minor base-version)
3081 ".x/" base-version
3082 "/build_resources/"))
3083 (revision revision)))
3084 (sha256
3085 (base32
3086 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
3087 (home-page "https://wiki-bsse.ethz.ch/display/JHDF5/")
3088 (synopsis "Java binding for HDF5")
3089 (description "JHDF5 is a high-level API in Java for reading and writing
3090HDF5 files, building on the libraries provided by the HDF Group.")
3091 ;; The C sources are under a non-copyleft license, which looks like a
3092 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
3093 (license (list license:asl2.0
3094 (license:non-copyleft "file://source/c/COPYING"))))))
3095
218d093b
RW
3096(define-public java-classpathx-servletapi
3097 (package
3098 (name "java-classpathx-servletapi")
ae307724 3099 (version "3.0.1")
218d093b
RW
3100 (source (origin
3101 (method url-fetch)
3102 (uri (string-append "mirror://gnu/classpathx/servletapi/"
3103 "servletapi-" version ".tar.gz"))
3104 (sha256
3105 (base32
ae307724 3106 "07d8h051siga2f33fra72hk12sbq1bxa4jifjg0qj0vfazjjff0x"))))
218d093b
RW
3107 (build-system ant-build-system)
3108 (arguments
3109 `(#:tests? #f ; there is no test target
3110 #:build-target "compile"
218d093b 3111 #:make-flags
ae307724 3112 (list "-Dbuild.compiler=javac1.8"
218d093b
RW
3113 (string-append "-Ddist=" (assoc-ref %outputs "out")))
3114 #:phases
3115 (modify-phases %standard-phases
3116 (replace 'install
3117 (lambda* (#:key make-flags #:allow-other-keys)
2c8ac364 3118 (apply invoke `("ant" "dist" ,@make-flags)))))))
218d093b
RW
3119 (home-page "https://www.gnu.org/software/classpathx/")
3120 (synopsis "Java servlet API implementation")
3121 (description "This is the GNU servlet API distribution, part of the
3122ClasspathX project. It provides implementations of version 3.0 of the servlet
3123API and version 2.1 of the Java ServerPages API.")
3124 (license license:gpl3+)))
3125
10d62a88
BH
3126(define-public java-javaee-servletapi
3127 (package
3128 (name "java-javaee-servletapi")
3129 (version "3.1.0")
44bac44c
BH
3130 (source (origin
3131 (method git-fetch)
3132 (uri (git-reference
3133 (url "https://github.com/javaee/servlet-spec.git")
3134 (commit version)))
3135 (file-name (git-file-name name version))
3136 (sha256
3137 (base32
3138 "0s03lj8w5an70lkqbjycgfrfk0kc07vbfav91jzk87gh3awf9ksl"))))
10d62a88
BH
3139 (build-system ant-build-system)
3140 (arguments
3141 `(#:jar-name "javax-servletapi.jar"
3142 ;; no tests
3143 #:tests? #f
8ea8d607
BH
3144 #:source-dir "src/main/java"
3145 #:phases
3146 (modify-phases %standard-phases
3147 (add-before 'build 'copy-resources
3148 (lambda _
3149 (mkdir-p "build/classes/javax/servlet/http")
3150 (let ((from-prefix "src/main/java/javax/servlet/")
3151 (to-prefix "build/classes/javax/servlet/"))
3152 (for-each (lambda (f)
3153 (copy-file (string-append from-prefix f)
3154 (string-append to-prefix f)))
3155 (list "LocalStrings_ja.properties"
3156 "LocalStrings.properties"
3157 "LocalStrings_fr.properties"
3158 "http/LocalStrings_es.properties"
3159 "http/LocalStrings_ja.properties"
3160 "http/LocalStrings.properties"
3161 "http/LocalStrings_fr.properties")))
3162 #t)))))
10d62a88
BH
3163 (native-inputs
3164 `(("unzip" ,unzip)))
3165 (home-page "https://javaee.github.io/servlet-spec/")
3166 (synopsis "Java servlet API")
3167 (description "Java Servlet is the foundation web specification in the
3168Java Enterprise Platform. Developers can build web applications using the
3169Servlet API to interact with the request/response workflow. This project
3170provides information on the continued development of the Java Servlet
3171specification.")
3172 ;; Main code is dual-licensed by Oracle under either GLP2 or CDDL 1.1.
3173 ;; Some files are licensed under ASL 2.0.
3174 (license (list license:asl2.0 license:gpl2 license:cddl1.1))))
3175
5490480c
RW
3176(define-public java-swt
3177 (package
3178 (name "java-swt")
8710d4dd 3179 (version "4.7.1a")
5490480c
RW
3180 (source
3181 ;; The types of many variables and procedures differ in the sources
3182 ;; dependent on whether the target architecture is a 32-bit system or a
3183 ;; 64-bit system. Instead of patching the sources on demand in a build
3184 ;; phase we download either the 32-bit archive (which mostly uses "int"
3185 ;; types) or the 64-bit archive (which mostly uses "long" types).
8710d4dd
RW
3186 (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9")
3187 (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q")
5490480c
RW
3188 (file32 "x86")
3189 (file64 "x86_64"))
3190 (let-values (((hash file)
3191 (match (or (%current-target-system) (%current-system))
3192 ("x86_64-linux" (values hash64 file64))
3193 (_ (values hash32 file32)))))
3194 (origin
3195 (method url-fetch)
3196 (uri (string-append
8710d4dd
RW
3197 "http://download.eclipse.org/eclipse/downloads/drops4/"
3198 "R-" version "-201710090410/swt-" version
3199 "-gtk-linux-" file ".zip"))
5490480c
RW
3200 (sha256 (base32 hash))))))
3201 (build-system ant-build-system)
3202 (arguments
3203 `(#:jar-name "swt.jar"
8710d4dd 3204 #:jdk ,icedtea-8
5490480c
RW
3205 #:tests? #f ; no "check" target
3206 #:phases
3207 (modify-phases %standard-phases
3208 (replace 'unpack
3209 (lambda* (#:key source #:allow-other-keys)
2c8ac364
MW
3210 (mkdir "swt")
3211 (invoke "unzip" source "-d" "swt")
3212 (chdir "swt")
3213 (mkdir "src")
3214 (invoke "unzip" "src.zip" "-d" "src")))
5490480c
RW
3215 ;; The classpath contains invalid icecat jars. Since we don't need
3216 ;; anything other than the JDK on the classpath, we can simply unset
3217 ;; it.
3218 (add-after 'configure 'unset-classpath
3219 (lambda _ (unsetenv "CLASSPATH") #t))
3220 (add-before 'build 'build-native
3221 (lambda* (#:key inputs outputs #:allow-other-keys)
3222 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3223 ;; Build shared libraries. Users of SWT have to set the system
3224 ;; property swt.library.path to the "lib" directory of this
3225 ;; package output.
3226 (mkdir-p lib)
3227 (setenv "OUTPUT_DIR" lib)
3228 (with-directory-excursion "src"
2c8ac364 3229 (invoke "bash" "build.sh")))))
5490480c
RW
3230 (add-after 'install 'install-native
3231 (lambda* (#:key outputs #:allow-other-keys)
3232 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3233 (for-each (lambda (file)
3234 (install-file file lib))
3235 (find-files "." "\\.so$"))
3236 #t))))))
3237 (inputs
8710d4dd 3238 `(("gtk" ,gtk+-2)
5490480c
RW
3239 ("libxtst" ,libxtst)
3240 ("libxt" ,libxt)
3241 ("mesa" ,mesa)
3242 ("glu" ,glu)))
3243 (native-inputs
3244 `(("pkg-config" ,pkg-config)
3245 ("unzip" ,unzip)))
3246 (home-page "https://www.eclipse.org/swt/")
3247 (synopsis "Widget toolkit for Java")
3248 (description
3249 "SWT is a widget toolkit for Java designed to provide efficient, portable
3250access to the user-interface facilities of the operating systems on which it
3251is implemented.")
3252 ;; SWT code is licensed under EPL1.0
3253 ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1
3254 ;; Cairo bindings contain code under MPL1.1
3255 ;; XULRunner 1.9 bindings contain code under MPL2.0
3256 (license (list
3257 license:epl1.0
3258 license:mpl1.1
3259 license:mpl2.0
3260 license:lgpl2.1+))))
3261
068e476f
RJ
3262(define-public java-xz
3263 (package
3264 (name "java-xz")
92966847 3265 (version "1.6")
068e476f
RJ
3266 (source (origin
3267 (method url-fetch)
3268 (uri (string-append "http://tukaani.org/xz/xz-java-" version ".zip"))
3269 (sha256
3270 (base32
92966847 3271 "1z3p1ri1gvl07inxn0agx44ck8n7wrzfmvkz8nbq3njn8r9wba8x"))))
068e476f
RJ
3272 (build-system ant-build-system)
3273 (arguments
3274 `(#:tests? #f ; There are no tests to run.
3275 #:jar-name ,(string-append "xz-" version ".jar")
3276 #:phases
3277 (modify-phases %standard-phases
3278 ;; The unpack phase enters the "maven" directory by accident.
3279 (add-after 'unpack 'chdir
3280 (lambda _ (chdir "..") #t)))))
3281 (native-inputs
3282 `(("unzip" ,unzip)))
d6ddc5ab 3283 (home-page "https://tukaani.org/xz/java.html")
068e476f
RJ
3284 (synopsis "Implementation of XZ data compression in pure Java")
3285 (description "This library aims to be a complete implementation of XZ data
3286compression in pure Java. Single-threaded streamed compression and
3287decompression and random access decompression have been fully implemented.")
3288 (license license:public-domain)))
04100c3b
RW
3289
3290;; java-hamcrest-core uses qdox version 1.12. We package this version instead
3291;; of the latest release.
3292(define-public java-qdox-1.12
3293 (package
3294 (name "java-qdox")
3295 (version "1.12.1")
3296 (source (origin
3297 (method url-fetch)
3298 (uri (string-append "http://central.maven.org/maven2/"
3299 "com/thoughtworks/qdox/qdox/" version
3300 "/qdox-" version "-sources.jar"))
3301 (sha256
3302 (base32
3303 "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl"))))
3304 (build-system ant-build-system)
3305 (arguments
3306 `(;; Tests require junit
3307 #:tests? #f
3308 #:jar-name "qdox.jar"
3309 #:phases
3310 (modify-phases %standard-phases
3311 (replace 'unpack
3312 (lambda* (#:key source #:allow-other-keys)
3313 (mkdir "src")
3314 (with-directory-excursion "src"
2c8ac364 3315 (invoke "jar" "-xf" source))))
04100c3b
RW
3316 ;; At this point we don't have junit, so we must remove the API
3317 ;; tests.
3318 (add-after 'unpack 'delete-tests
3319 (lambda _
3320 (delete-file-recursively "src/com/thoughtworks/qdox/junit")
3321 #t)))))
3322 (home-page "http://qdox.codehaus.org/")
3323 (synopsis "Parse definitions from Java source files")
3324 (description
3325 "QDox is a high speed, small footprint parser for extracting
3326class/interface/method definitions from source files complete with JavaDoc
b13cf17f 3327@code{@@tags}. It is designed to be used by active code generators or
04100c3b
RW
3328documentation tools.")
3329 (license license:asl2.0)))
e7e28510
RW
3330
3331(define-public java-jarjar
3332 (package
3333 (name "java-jarjar")
3334 (version "1.4")
3335 (source (origin
3336 (method url-fetch)
3337 (uri (string-append
3338 "https://storage.googleapis.com/google-code-archive-downloads/v2/"
3339 "code.google.com/jarjar/jarjar-src-" version ".zip"))
3340 (sha256
3341 (base32
88aa75e9
GB
3342 "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl"))
3343 (modules '((guix build utils)))
3344 (snippet
3345 '(begin
3346 ;; Delete bundled thirds-party jar archives.
3347 ;; TODO: unbundle maven-plugin-api.
3348 (delete-file "lib/asm-4.0.jar")
3349 (delete-file "lib/asm-commons-4.0.jar")
3350 (delete-file "lib/junit-4.8.1.jar")
3351 #t))))
e7e28510
RW
3352 (build-system ant-build-system)
3353 (arguments
3354 `(;; Tests require junit, which ultimately depends on this package.
3355 #:tests? #f
3356 #:build-target "jar"
3357 #:phases
3358 (modify-phases %standard-phases
88aa75e9
GB
3359 (add-before 'build 'do-not-use-bundled-asm
3360 (lambda* (#:key inputs #:allow-other-keys)
3361 (substitute* "build.xml"
3362 (("<path id=\"path.build\">")
3363 (string-append "<path id=\"path.build\"><fileset dir=\""
3364 (assoc-ref inputs "java-asm-bootstrap")
3365 "/share/java\" includes=\"**/*.jar\"/>"))
3366 (("<zipfileset src=\"lib/asm-4.0.jar\"/>") "")
3367 (("lib/asm-commons-4.0.jar")
3368 (string-append (assoc-ref inputs "java-asm-bootstrap")
3369 "/share/java/asm-6.0.jar"))
3370 (("<include name=\"org/objectweb/asm/commons/Remap\\*\\.class\"/>")
3371 (string-append "<include name=\"org/objectweb/asm/"
3372 "commons/Remap*.class\"/>"
3373 "<include name=\"org/objectweb/asm/*.class\"/>"
3374 "<include name=\"org/objectweb/asm/"
3375 "signature/*.class\"/>"
3376 "<include name=\"org/objectweb/asm/"
3377 "commons/SignatureRemapper.class\"/>")))
3378 #t))
e7e28510
RW
3379 (replace 'install
3380 (lambda* (#:key outputs #:allow-other-keys)
3381 (let ((target (string-append (assoc-ref outputs "out")
3382 "/share/java")))
3383 (install-file (string-append "dist/jarjar-" ,version ".jar")
3384 target))
3385 #t)))))
88aa75e9
GB
3386 (inputs
3387 `(("java-asm-bootstrap" ,java-asm-bootstrap)))
e7e28510
RW
3388 (native-inputs
3389 `(("unzip" ,unzip)))
3390 (home-page "https://code.google.com/archive/p/jarjar/")
3391 (synopsis "Repackage Java libraries")
3392 (description
3393 "Jar Jar Links is a utility that makes it easy to repackage Java
3394libraries and embed them into your own distribution. Jar Jar Links includes
3395an Ant task that extends the built-in @code{jar} task.")
3396 (license license:asl2.0)))
87c31a21
RW
3397
3398(define-public java-hamcrest-core
3399 (package
3400 (name "java-hamcrest-core")
3401 (version "1.3")
3402 (source (origin
3403 (method url-fetch)
00672896
HG
3404 (uri (string-append "https://github.com/hamcrest/JavaHamcrest/"
3405 "archive/hamcrest-java-" version ".tar.gz"))
87c31a21
RW
3406 (sha256
3407 (base32
00672896 3408 "11g0s105fmwzijbv08lx8jlb521yravjmxnpgdx08fvg1kjivhva"))
87c31a21
RW
3409 (modules '((guix build utils)))
3410 (snippet
3411 '(begin
00672896
HG
3412 ;; Delete bundled thirds-party jar archives.
3413 (delete-file-recursively "lib")
87c31a21
RW
3414 #t))))
3415 (build-system ant-build-system)
3416 (arguments
3417 `(#:tests? #f ; Tests require junit
a8d3cb62
RW
3418 #:modules ((guix build ant-build-system)
3419 (guix build utils)
3420 (srfi srfi-1))
87c31a21 3421 #:make-flags (list (string-append "-Dversion=" ,version))
fae0b4ca 3422 #:test-target "unit-test"
87c31a21
RW
3423 #:build-target "core"
3424 #:phases
3425 (modify-phases %standard-phases
3426 ;; Disable unit tests, because they require junit, which requires
3427 ;; hamcrest-core. We also give a fixed value to the "Built-Date"
3428 ;; attribute from the manifest for reproducibility.
3429 (add-before 'configure 'patch-build.xml
3430 (lambda _
3431 (substitute* "build.xml"
3432 (("unit-test, ") "")
3433 (("\\$\\{build.timestamp\\}") "guix"))
3434 #t))
3435 ;; Java's "getMethods()" returns methods in an unpredictable order.
3436 ;; To make the output of the generated code deterministic we must
3437 ;; sort the array of methods.
3438 (add-after 'unpack 'make-method-order-deterministic
3439 (lambda _
3440 (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java"
3441 (("import java\\.util\\.Iterator;" line)
3442 (string-append line "\n"
3443 "import java.util.Arrays; import java.util.Comparator;"))
3444 (("allMethods = cls\\.getMethods\\(\\);" line)
3445 (string-append "_" line
3446 "
3447private Method[] getSortedMethods() {
3448 Arrays.sort(_allMethods, new Comparator<Method>() {
3449 @Override
3450 public int compare(Method a, Method b) {
3451 return a.toString().compareTo(b.toString());
3452 }
3453 });
3454 return _allMethods;
3455}
3456
2c8ac364
MW
3457private Method[] allMethods = getSortedMethods();")))
3458 #t))
87c31a21
RW
3459 (add-before 'build 'do-not-use-bundled-qdox
3460 (lambda* (#:key inputs #:allow-other-keys)
3461 (substitute* "build.xml"
3462 (("lib/generator/qdox-1.12.jar")
3463 (string-append (assoc-ref inputs "java-qdox-1.12")
3464 "/share/java/qdox.jar")))
3465 #t))
fab959d3
HG
3466 ;; build.xml searches for .jar files in this directoy, which
3467 ;; we remove from the source archive.
3468 (add-before 'build 'create-dummy-directories
3469 (lambda _
3470 (mkdir-p "lib/integration")
3471 #t))
87c31a21
RW
3472 (replace 'install
3473 (lambda* (#:key outputs #:allow-other-keys)
a8d3cb62
RW
3474 (let* ((target (string-append (assoc-ref outputs "out")
3475 "/share/java/"))
3476 (version-suffix ,(string-append "-" version ".jar"))
3477 (install-without-version-suffix
3478 (lambda (jar)
3479 (copy-file jar
3480 (string-append target
3481 (basename jar version-suffix)
3482 ".jar")))))
3483 (mkdir-p target)
3484 (for-each
3485 install-without-version-suffix
3486 (find-files "build"
3487 (lambda (name _)
3488 (and (string-suffix? ".jar" name)
3489 (not (string-suffix? "-sources.jar" name)))))))
3490 #t)))))
87c31a21
RW
3491 (native-inputs
3492 `(("java-qdox-1.12" ,java-qdox-1.12)
3493 ("java-jarjar" ,java-jarjar)))
3494 (home-page "http://hamcrest.org/")
3495 (synopsis "Library of matchers for building test expressions")
3496 (description
3497 "This package provides a library of matcher objects (also known as
3498constraints or predicates) allowing @code{match} rules to be defined
3499declaratively, to be used in other frameworks. Typical scenarios include
3500testing frameworks, mocking libraries and UI validation rules.")
3501 (license license:bsd-2)))
d0184f44
RW
3502
3503(define-public java-junit
3504 (package
3505 (name "java-junit")
3506 (version "4.12")
3507 (source (origin
3508 (method url-fetch)
3509 (uri (string-append "https://github.com/junit-team/junit/"
3510 "archive/r" version ".tar.gz"))
3511 (file-name (string-append name "-" version ".tar.gz"))
3512 (sha256
3513 (base32
3514 "090dn5v1vs0b3acyaqc0gjf6p8lmd2h24wfzsbq7sly6b214anws"))
3515 (modules '((guix build utils)))
3516 (snippet
3517 '(begin
3518 ;; Delete bundled jar archives.
3519 (delete-file-recursively "lib")
3520 #t))))
3521 (build-system ant-build-system)
3522 (arguments
3523 `(#:tests? #f ; no tests
3524 #:jar-name "junit.jar"))
3525 (inputs
3526 `(("java-hamcrest-core" ,java-hamcrest-core)))
3527 (home-page "http://junit.org/")
3528 (synopsis "Test framework for Java")
3529 (description
3530 "JUnit is a simple framework to write repeatable tests for Java projects.
3531JUnit provides assertions for testing expected results, test fixtures for
3532sharing common test data, and test runners for running tests.")
3533 (license license:epl1.0)))
9fb20d01
RW
3534
3535(define-public java-plexus-utils
3536 (package
3537 (name "java-plexus-utils")
0cd8efcc 3538 (version "3.2.0")
9fb20d01
RW
3539 (source (origin
3540 (method url-fetch)
3541 (uri (string-append "https://github.com/codehaus-plexus/"
3542 "plexus-utils/archive/plexus-utils-"
3543 version ".tar.gz"))
3544 (sha256
3545 (base32
0cd8efcc 3546 "1ihfigar20lvk4pinii7dq05i173xphhw4iyrk6gjfy04m01j2lz"))))
9fb20d01
RW
3547 (build-system ant-build-system)
3548 ;; FIXME: The default build.xml does not include a target to install
3549 ;; javadoc files.
3550 (arguments
3551 `(#:jar-name "plexus-utils.jar"
3552 #:source-dir "src/main"
3553 #:phases
3554 (modify-phases %standard-phases
3555 (add-after 'unpack 'fix-reference-to-/bin-and-/usr
3556 (lambda _
3557 (substitute* "src/main/java/org/codehaus/plexus/util/\
3558cli/shell/BourneShell.java"
3559 (("/bin/sh") (which "sh"))
3560 (("/usr/") (getcwd)))
3561 #t))
3562 (add-after 'unpack 'fix-or-disable-broken-tests
3563 (lambda _
3564 (with-directory-excursion "src/test/java/org/codehaus/plexus/util"
3565 (substitute* '("cli/CommandlineTest.java"
3566 "cli/shell/BourneShellTest.java")
3567 (("/bin/sh") (which "sh"))
3568 (("/bin/echo") (which "echo")))
3569
3570 ;; This test depends on MavenProjectStub, but we don't have
3571 ;; a package for Maven.
3572 (delete-file "introspection/ReflectionValueExtractorTest.java")
3573
3574 ;; FIXME: The command line tests fail, maybe because they use
3575 ;; absolute paths.
3576 (delete-file "cli/CommandlineTest.java"))
3577 #t)))))
3578 (native-inputs
0cd8efcc
JL
3579 `(("java-hamcrest-core" ,java-hamcrest-core)
3580 ("java-junit" ,java-junit)))
9fb20d01
RW
3581 (home-page "http://codehaus-plexus.github.io/plexus-utils/")
3582 (synopsis "Common utilities for the Plexus framework")
3583 (description "This package provides various Java utility classes for the
3584Plexus framework to ease working with strings, files, command lines, XML and
3585more.")
3586 (license license:asl2.0)))
1e555562
HG
3587
3588(define-public java-plexus-interpolation
3589 (package
3590 (name "java-plexus-interpolation")
3591 (version "1.23")
3592 (source (origin
3593 (method url-fetch)
3594 (uri (string-append "https://github.com/codehaus-plexus/"
3595 "plexus-interpolation/archive/"
3596 "plexus-interpolation-" version ".tar.gz"))
3597 (sha256
3598 (base32
fd75eb6c 3599 "03377yzlx5q440m6sxxgv6a5qb8fl30zzcgxgc0hxk5qgl2z1jjn"))))
1e555562
HG
3600 (build-system ant-build-system)
3601 (arguments
3602 `(#:jar-name "plexus-interpolation.jar"
3603 #:source-dir "src/main"))
3604 (native-inputs
3605 `(("java-junit" ,java-junit)
3606 ("java-hamcrest-core" ,java-hamcrest-core)))
3607 (home-page "http://codehaus-plexus.github.io/plexus-interpolation/")
3608 (synopsis "Java components for interpolating ${} strings and the like")
3609 (description "Plexus interpolator is a modular, flexible interpolation
3610framework for the expression language style commonly seen in Maven, Plexus,
3611and other related projects.
3612
3613It has its foundation in the @code{org.codehaus.plexus.utils.interpolation}
3614package within @code{plexus-utils}, but has been separated in order to allow
3615these two libraries to vary independently of one another.")
3616 (license license:asl2.0)))
8f8ed9aa 3617
bb27eb0d
JL
3618(define-public java-plexus-classworlds
3619 (package
3620 (name "java-plexus-classworlds")
3621 (version "2.5.2")
3622 (source (origin
3623 (method url-fetch)
3624 (uri (string-append "https://github.com/codehaus-plexus/"
3625 "plexus-classworlds/archive/plexus-classworlds-"
3626 version ".tar.gz"))
3627 (sha256
3628 (base32
3629 "1qm4p0rl8d82lzhsiwnviw11jnq44s0gflg78zq152xyyr2xmh8g"))))
3630 (build-system ant-build-system)
3631 (arguments
3632 `(#:jar-name "plexus-classworlds.jar"
3633 #:source-dir "src/main"
3634 #:tests? #f));; FIXME: we need to generate some resources as in pom.xml
3635 (native-inputs
3636 `(("java-junit" ,java-junit)))
3637 (home-page "http://codehaus-plexus.github.io/plexus-classworlds/")
3638 (synopsis "Java class loader framework")
f4548394
TGR
3639 (description "Plexus classworlds replaces the native @code{ClassLoader}
3640mechanism of Java. It is especially useful for dynamic loading of application
bb27eb0d
JL
3641components.")
3642 (license license:asl2.0)))
3643
a7ad92ad 3644(define java-plexus-container-default-bootstrap
0726d4ea
JL
3645 (package
3646 (name "java-plexus-container-default-bootstrap")
3647 (version "1.7.1")
3648 (source (origin
3649 (method url-fetch)
3650 (uri (string-append "https://github.com/codehaus-plexus/plexus-containers"
3651 "/archive/plexus-containers-" version ".tar.gz"))
3652 (sha256
3653 (base32
3654 "0xw5g30qf4a83608rw9v2hv8pfsz7d69dkdhk6r0wia4q78hh1pc"))))
3655 (build-system ant-build-system)
3656 (arguments
3657 `(#:jar-name "container-default.jar"
3658 #:source-dir "plexus-container-default/src/main/java"
3659 #:test-dir "plexus-container-default/src/test"
3660 #:jdk ,icedtea-8
3661 #:tests? #f; requires plexus-archiver, which depends on this package
3662 #:phases
3663 (modify-phases %standard-phases
3664 (add-before 'build 'copy-resources
3665 (lambda _
3666 (copy-recursively
3667 "plexus-container-default/src/main/resources/"
3668 "build/classes")
3669 #t)))))
3670 (inputs
3671 `(("worldclass" ,java-plexus-classworlds)
3672 ("xbean" ,java-geronimo-xbean-reflect)
3673 ("utils" ,java-plexus-utils)
3674 ("junit" ,java-junit)
3675 ("guava" ,java-guava)))
3676 (home-page "https://github.com/codehaus-plexus/plexus-containers")
f4548394 3677 (synopsis "Inversion-of-control container")
0726d4ea 3678 (description "Plexus-default-container is Plexus' inversion-of-control
f4548394 3679(@dfn{IoC}) container. It is composed of its public API and its default
0726d4ea
JL
3680implementation.")
3681 (license license:asl2.0)))
3682
0858b9dc
JL
3683(define-public java-plexus-io
3684 (package
3685 (name "java-plexus-io")
3686 (version "3.0.0")
3687 (source (origin
3688 (method url-fetch)
3689 (uri (string-append "https://github.com/codehaus-plexus/plexus-io"
3690 "/archive/plexus-io-" version ".tar.gz"))
3691 (sha256
3692 (base32
3693 "0f2j41kihaymxkpbm55smpxjja235vad8cgz94frfy3ppcp021dw"))))
3694 (build-system ant-build-system)
3695 (arguments
3696 `(#:jar-name "plexus-io.jar"
3697 #:source-dir "src/main/java"
3698 #:test-dir "src/test"
3699 #:jdk ,icedtea-8
3700 #:phases
3701 (modify-phases %standard-phases
3702 (add-before 'build 'copy-resources
3703 (lambda _
3704 (mkdir-p "build/classes/META-INF/plexus")
3705 (copy-file "src/main/resources/META-INF/plexus/components.xml"
3706 "build/classes/META-INF/plexus/components.xml")
3707 #t)))))
3708 (inputs
3709 `(("utils" ,java-plexus-utils)
3710 ("commons-io" ,java-commons-io)
3711 ("java-jsr305" ,java-jsr305)))
3712 (native-inputs
3713 `(("junit" ,java-junit)
3714 ("hamcrest" ,java-hamcrest-core)
3715 ("guava" ,java-guava)
3716 ("classworlds" ,java-plexus-classworlds)
3717 ("xbean" ,java-geronimo-xbean-reflect)
3718 ("container-default" ,java-plexus-container-default-bootstrap)))
3719 (home-page "https://github.com/codehaus-plexus/plexus-io")
3720 (synopsis "I/O plexus components")
3721 (description "Plexus IO is a set of plexus components, which are designed
3722for use in I/O operations. This implementation using plexus components allows
3723reusing it in maven.")
3724 (license license:asl2.0)))
3725
b51df3ca
JL
3726(define-public java-plexus-archiver
3727 (package
3728 (name "java-plexus-archiver")
6f737ae6 3729 (version "4.1.0")
b51df3ca
JL
3730 (source (origin
3731 (method url-fetch)
3732 (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver"
3733 "/archive/plexus-archiver-" version ".tar.gz"))
3734 (sha256
3735 (base32
6f737ae6 3736 "0ry6i92gli0mvdmfih2vgs0lkf9yvx18h2ajxim66yg6yipnp0hg"))))
b51df3ca
JL
3737 (build-system ant-build-system)
3738 (arguments
3739 `(#:jar-name "plexus-archiver.jar"
3740 #:source-dir "src/main/java"
3741 #:jdk ,icedtea-8
3742 #:test-dir "src/test"
3743 #:test-exclude (list "**/Abstract*.java" "**/Base*.java")
3744 #:phases
3745 (modify-phases %standard-phases
3746 (add-before 'check 'remove-failing
3747 (lambda _
3748 ;; Requires an older version of plexus container
3749 (delete-file
2c8ac364
MW
3750 "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java")
3751 #t))
6f737ae6
JL
3752 (add-before 'check 'fix-test-building
3753 (lambda _
3754 (substitute* "build.xml"
3755 (("srcdir=\"src/test\"") "srcdir=\"src/test/java\""))
3756 #t))
b51df3ca
JL
3757 (add-before 'build 'copy-resources
3758 (lambda _
3759 (mkdir-p "build/classes/META-INF/plexus")
3760 (copy-file "src/main/resources/META-INF/plexus/components.xml"
3761 "build/classes/META-INF/plexus/components.xml")
3762 #t)))))
3763 (inputs
3764 `(("utils" ,java-plexus-utils)
3765 ("commons-io" ,java-commons-io)
3766 ("snappy" ,java-iq80-snappy)
3767 ("io" ,java-plexus-io)
3768 ("compress" ,java-commons-compress)
3769 ("container-default" ,java-plexus-container-default-bootstrap)
3770 ("snappy" ,java-snappy)
3771 ("java-jsr305" ,java-jsr305)))
3772 (native-inputs
6f737ae6
JL
3773 `(("java-hamcrest-core" ,java-hamcrest-core)
3774 ("junit" ,java-junit)
b51df3ca
JL
3775 ("classworld" ,java-plexus-classworlds)
3776 ("xbean" ,java-geronimo-xbean-reflect)
3777 ("xz" ,java-tukaani-xz)
3778 ("guava" ,java-guava)))
3779 (home-page "https://github.com/codehaus-plexus/plexus-archiver")
3780 (synopsis "Archiver component of the Plexus project")
3781 (description "Plexus-archiver contains a component to deal with project
3782archives (jar).")
3783 (license license:asl2.0)))
3784
a0837294
JL
3785(define-public java-plexus-container-default
3786 (package
3787 (inherit java-plexus-container-default-bootstrap)
3788 (name "java-plexus-container-default")
3789 (arguments
3790 `(#:jar-name "container-default.jar"
3791 #:source-dir "plexus-container-default/src/main/java"
3792 #:test-dir "plexus-container-default/src/test"
3793 #:test-exclude (list ;"**/*Test.java"
3794 "**/Abstract*.java"
3795 ;; Requires plexus-hierarchy
3796 "**/PlexusHierarchyTest.java"
3797 ;; Failures
3798 "**/ComponentRealmCompositionTest.java"
3799 "**/PlexusContainerTest.java")
3800 #:jdk ,icedtea-8
3801 #:phases
3802 (modify-phases %standard-phases
3803 (add-before 'build 'copy-resources
3804 (lambda _
3805 (copy-recursively
3806 "plexus-container-default/src/main/resources/"
3807 "build/classes")
3808 #t))
3809 (add-before 'check 'fix-paths
3810 (lambda _
3811 (let ((dir "plexus-container-default/src/test/java/org/codehaus"))
3812 (substitute*
3813 (string-append
3814 dir "/plexus/component/composition/"
3815 "ComponentRealmCompositionTest.java")
3816 (("src/test") "plexus-container-default/src/test"))
3817 #t))))))
3818 (inputs
3819 `(("worldclass" ,java-plexus-classworlds)
3820 ("xbean" ,java-geronimo-xbean-reflect)
3821 ("utils" ,java-plexus-utils)
3822 ("junit" ,java-junit)
3823 ("guava" ,java-guava)))
3824 (native-inputs
3825 `(("archiver" ,java-plexus-archiver)
3826 ("hamcrest" ,java-hamcrest-core)))))
3827
3214afab
JL
3828(define-public java-plexus-component-annotations
3829 (package
3830 (inherit java-plexus-container-default)
3831 (name "java-plexus-component-annotations")
3832 (arguments
3833 `(#:jar-name "plexus-component-annotations.jar"
3834 #:source-dir "plexus-component-annotations/src/main/java"
3835 #:tests? #f)); no tests
3836 (inputs '())
3837 (native-inputs '())
3838 (synopsis "Plexus descriptors generator")
3839 (description "This package is a Maven plugin to generate Plexus descriptors
3840from source tags and class annotations.")))
3841
4f77ba17
JL
3842(define-public java-plexus-cipher
3843 (package
3844 (name "java-plexus-cipher")
3845 (version "1.7")
3846 (source (origin
3847 (method url-fetch)
3848 (uri (string-append "https://github.com/codehaus-plexus/plexus-cipher"
3849 "/archive/plexus-cipher-" version ".tar.gz"))
3850 (sha256
3851 (base32
3852 "1j3r8xzlxlk340snkjp6lk2ilkxlkn8qavsfiq01f43xmvv8ymk3"))))
3853 (build-system ant-build-system)
3854 (arguments
3855 `(#:jar-name "plexus-cipher.jar"
3856 #:source-dir "src/main/java"
3857 #:jdk ,icedtea-8
3858 #:tests? #f; FIXME: requires sisu-inject-bean
3859 #:phases
3860 (modify-phases %standard-phases
3861 (add-before 'build 'copy-resources
3862 (lambda _
3863 (copy-recursively "src/main/resources" "build/classes")
3864 (mkdir-p "build/classes/META-INF/sisu")
3865 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
3866 (lambda _
3867 (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
3868 #t)))))
3869 (inputs
3870 `(("java-cdi-api" ,java-cdi-api)
3871 ("java-javax-inject" ,java-javax-inject)))
3872 (home-page "https://github.com/sonatype/plexus-cipher")
3873 (synopsis "Encryption/decryption Component")
3874 (description "Plexus-cipher contains a component to deal with encryption
3875and decryption.")
3876 (license license:asl2.0)))
3877
239126d4
JL
3878(define-public java-plexus-compiler-api
3879 (package
3880 (name "java-plexus-compiler-api")
a70182b0 3881 (version "2.8.4")
239126d4
JL
3882 (source (origin
3883 (method url-fetch)
3884 (uri (string-append "https://github.com/codehaus-plexus/plexus-compiler"
3885 "/archive/plexus-compiler-" version ".tar.gz"))
3886 (sha256
3887 (base32
a70182b0 3888 "09vmxs0807wsd26nbrwwj5l8ycmzazqycj52l7w6wjvkryywi69h"))))
239126d4
JL
3889 (build-system ant-build-system)
3890 (arguments
3891 `(#:jar-name "plexus-compiler-api.jar"
3892 #:source-dir "plexus-compiler-api/src/main/java"
3893 #:jdk ,icedtea-8
3894 #:test-dir "plexus-compiler-api/src/test"))
3895 (inputs
3896 `(("java-plexus-container-default" ,java-plexus-container-default)
3897 ("java-plexus-util" ,java-plexus-utils)))
3898 (native-inputs
3899 `(("java-junit" ,java-junit)))
3900 (home-page "https://github.com/codehaus-plexus/plexus-compiler")
3901 (synopsis "Plexus Compilers component's API to manipulate compilers")
3902 (description "This package contains the API used by components to manipulate
3903compilers.")
3904 (license (list license:asl2.0
3905 license:expat))))
3906
f8a519fa
JL
3907(define-public java-plexus-compiler-javac
3908 (package
3909 (inherit java-plexus-compiler-api)
3910 (name "java-plexus-compiler-javac")
3911 (arguments
3912 `(#:jar-name "plexus-compiler-javac.jar"
3913 #:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java"
3914 #:jdk ,icedtea-8
3915 #:tests? #f; depends on compiler-test -> maven-core -> ... -> this package.
3916 #:test-dir "plexus-compilers/plexus-compiler-javac/src/test"))
3917 (inputs
3918 `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
3919 ("java-plexus-utils" ,java-plexus-utils)
3920 ("java-plexus-container-default" ,java-plexus-container-default)))
3921 (native-inputs
3922 `(("java-junit" ,java-junit)))
3923 (synopsis "Javac Compiler support for Plexus Compiler component")
3924 (description "This package contains the Javac Compiler support for Plexus
3925Compiler component.")))
3926
0aa85081
JL
3927(define-public java-plexus-sec-dispatcher
3928 (package
3929 (name "java-plexus-sec-dispatcher")
3930 (version "1.4") ;; Newest release listed at the Maven Central Repository.
3931 (source (origin
3932 ;; This project doesn't tag releases or publish tarballs, so we take
3933 ;; the "prepare release plexus-sec-dispatcher-1.4" git commit.
3934 (method url-fetch)
3935 (uri (string-append "https://github.com/sonatype/plexus-sec-dispatcher/"
3936 "archive/7db8f88048.tar.gz"))
3937 (sha256
3938 (base32
3939 "1smfrk4n7xbrsxpxcp2j4i0j8q86j73w0w6xg7qz83dp6dagdjgp"))
3940 (file-name (string-append name "-" version ".tar.gz"))))
3941 (arguments
3942 `(#:jar-name "plexus-sec-dispatcher.jar"
3943 #:source-dir "src/main/java"
3944 #:jdk ,icedtea-8
3945 #:phases
3946 (modify-phases %standard-phases
3947 (add-before 'build 'generate-models
3948 (lambda* (#:key inputs #:allow-other-keys)
3949 (define (modello-single-mode file version mode)
2c8ac364
MW
3950 (invoke "java"
3951 "org.codehaus.modello.ModelloCli"
3952 file mode "src/main/java" version
3953 "false" "true"))
0aa85081 3954 (let ((file "src/main/mdo/settings-security.mdo"))
0aa85081
JL
3955 (modello-single-mode file "1.0.0" "java")
3956 (modello-single-mode file "1.0.0" "xpp3-reader")
2c8ac364
MW
3957 (modello-single-mode file "1.0.0" "xpp3-writer"))
3958 #t))
0aa85081
JL
3959 (add-before 'build 'generate-components.xml
3960 (lambda _
3961 (mkdir-p "build/classes/META-INF/plexus")
3962 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
3963 (lambda _
3964 (display
3965 "<component-set>\n
3966 <components>\n
3967 <component>\n
3968 <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n
3969 <role-hint>default</role-hint>\n
3970 <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n
3971 <description></description>\n
3972 <requirements>\n
3973 <requirement>\n
3974 <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n
3975 <field-name>_cipher</field-name>\n
3976 </requirement>\n
3977 <requirement>\n
3978 <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n
3979 <field-name>_decryptors</field-name>\n
3980 </requirement>\n
3981 </requirements>\n
3982 <configuration>\n
3983 <_configuration-file>~/.settings-security.xml</_configuration-file>\n
3984 </configuration>\n
3985 </component>\n
3986 </components>\n
2c8ac364
MW
3987</component-set>\n")))
3988 #t))
0aa85081
JL
3989 (add-before 'check 'fix-paths
3990 (lambda _
2c8ac364
MW
3991 (copy-recursively "src/test/resources" "target")
3992 #t)))))
0aa85081
JL
3993 (inputs
3994 `(("java-plexus-cipher" ,java-plexus-cipher)))
3995 (native-inputs
3996 `(("java-modello-core" ,java-modello-core)
3997 ;; for modello:
3998 ("java-plexus-container-default" ,java-plexus-container-default)
3999 ("java-plexus-classworlds" ,java-plexus-classworlds)
4000 ("java-plexus-utils" ,java-plexus-utils)
4001 ("java-guava" ,java-guava)
4002 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4003 ("java-sisu-build-api" ,java-sisu-build-api)
4004 ;; modello plugins:
4005 ("java-modellop-plugins-java" ,java-modello-plugins-java)
4006 ("java-modellop-plugins-xml" ,java-modello-plugins-xml)
4007 ("java-modellop-plugins-xpp3" ,java-modello-plugins-xpp3)
4008 ;; for tests
4009 ("java-junit" ,java-junit)))
4010 (build-system ant-build-system)
4011 (home-page "https://github.com/sonatype/plexus-sec-dispatcher")
4012 (synopsis "Plexus Security Dispatcher Component")
4013 (description "This package is the Plexus Security Dispatcher Component.
4014This component decrypts a string passed to it.")
4015 (license license:asl2.0)))
4016
7d65489f
JL
4017(define-public java-plexus-cli
4018 (package
4019 (name "java-plexus-cli")
4020 (version "1.7")
4021 (source (origin
4022 (method git-fetch)
4023 (uri (git-reference
4024 (url "https://github.com/sonatype/plexus-cli")
4025 (commit "a776afa6bca84e5107bedb69440329cdb24ed645")))
4026 (file-name (string-append name "-" version))
4027 (sha256
4028 (base32
4029 "0xjrlay605rypv3zd7y24vlwf0039bil3n2cqw54r1ddpysq46vx"))))
4030 (build-system ant-build-system)
4031 (arguments
4032 `(#:jar-name "plexus-cli.jar"
4033 #:source-dir "src/main/java"
4034 #:jdk ,icedtea-8
4035 #:test-dir "src/test"))
4036 (inputs
4037 `(("java-commons-cli" ,java-commons-cli)
4038 ("java-plexus-container-default" ,java-plexus-container-default)
4039 ("java-plexus-classworlds" ,java-plexus-classworlds)))
4040 (native-inputs
4041 `(("java-plexus-utils" ,java-plexus-utils)
4042 ("java-junit" ,java-junit)
4043 ("java-guava" ,java-guava)))
4044 (home-page "https://codehaus-plexus.github.io/plexus-cli")
4045 (synopsis "CLI building library for plexus")
4046 (description "This package is a library to help creating CLI around
4047Plexus components.")
4048 (license license:asl2.0)))
4049
8f524749
JL
4050(define-public java-sisu-build-api
4051 (package
4052 (name "java-sisu-build-api")
4053 (version "0.0.7")
4054 (source (origin
4055 (method url-fetch)
4056 (uri (string-append "https://github.com/sonatype/sisu-build-api/"
4057 "archive/plexus-build-api-" version ".tar.gz"))
4058 (sha256
4059 (base32
4060 "1c3rrpma3x634xp2rm2p5iskfhzdyc7qfbhjzr70agrl1jwghgy2"))))
4061 (build-system ant-build-system)
4062 (arguments
4063 `(#:jar-name "sisu-build-api.jar"
4064 #:source-dir "src/main/java"
4065 #:jdk ,icedtea-8
4066 #:tests? #f; FIXME: how to run the tests?
4067 #:phases
4068 (modify-phases %standard-phases
4069 (add-before 'build 'copy-resources
4070 (lambda _
4071 (copy-recursively "src/main/resources" "build/classes")
4072 (substitute* (find-files "build/classes")
4073 (("\\$\\{project.version\\}") ,version))
4074 #t))
4075 (add-before 'build 'generate-plexus-compontent
4076 (lambda _
4077 (mkdir-p "build/classes/META-INF/plexus")
4078 ;; This file is required for plexus to inject this package.
4079 ;; FIXME: how is it generated?
4080 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
4081 (lambda _
4082 (display
4083 "<component-set>\n
4084 <components>\n
4085 <component>\n
4086 <role>org.sonatype.plexus.build.incremental.BuildContext</role>\n
4087 <role-hint>default</role-hint>\n
4088 <implementation>org.sonatype.plexus.build.incremental.DefaultBuildContext</implementation>\n
4089 <description>Filesystem based non-incremental build context implementation\n
4090which behaves as if all files were just created.</description>\n
4091 </component>\n
4092 </components>\n
4093</component-set>\n")))
4094 #t)))))
4095 (inputs
4096 `(("java-plexus-utils" ,java-plexus-utils)
4097 ("java-plexus-container-default" ,java-plexus-container-default)))
4098 (home-page "https://github.com/sonatype/sisu-build-api/")
4099 (synopsis "Base build API for maven")
4100 (description "This package contains the base build API for maven and
4101a default implementation of it. This API is about scanning files in a
4102project and determining what files need to be rebuilt.")
4103 (license license:asl2.0)))
4104
b26c8b61
JL
4105(define-public java-modello-core
4106 (package
4107 (name "java-modello-core")
4108 (version "1.9.1")
4109 (source (origin
4110 (method url-fetch)
4111 (uri (string-append "https://github.com/codehaus-plexus/modello"
4112 "/archive/modello-" version ".tar.gz"))
4113 (sha256
4114 (base32
4115 "0l2pvns8pmlrmjm3iknp7gpg3654y1m8qhy55b19sdwdchdcyxfh"))))
4116 (build-system ant-build-system)
4117 (arguments
4118 `(#:jar-name "modello-core.jar"
4119 #:source-dir "modello-core/src/main/java"
4120 #:test-dir "modello-core/src/test"
4121 #:main-class "org.codehaus.modello.ModelloCli"
4122 #:jdk ,icedtea-8
4123 #:phases
4124 (modify-phases %standard-phases
4125 (add-before 'build 'copy-resources
4126 (lambda _
4127 (mkdir-p "build/classes/META-INF/plexus")
4128 (copy-file "modello-core/src/main/resources/META-INF/plexus/components.xml"
4129 "build/classes/META-INF/plexus/components.xml")
4130 #t))
4131 (add-before 'check 'fix-tests
4132 (lambda _
4133 (with-directory-excursion "modello-core/src/test/java/org/codehaus"
4134 (substitute* '("modello/core/DefaultModelloCoreTest.java"
4135 "modello/core/io/ModelReaderTest.java")
4136 (("src/test") "modello-core/src/test")))
4137 #t)))))
4138 (inputs
4139 `(("java-plexus-utils" ,java-plexus-utils)
4140 ("java-plexus-container-default" ,java-plexus-container-default)
4141 ("java-sisu-build-api" ,java-sisu-build-api)))
4142 (native-inputs
4143 `(("java-junit" ,java-junit)
4144 ("java-plexus-classworlds" ,java-plexus-classworlds)
4145 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4146 ("java-guava" ,java-guava)))
4147 (home-page "http://codehaus-plexus.github.io/modello/")
4148 (synopsis "Framework for code generation from a simple model")
4149 (description "Modello is a framework for code generation from a simple model.
4150
4151Modello generates code from a simple model format: based on a plugin
4152architecture, various types of code and descriptors can be generated from the
4153single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers,
4154XSD and documentation.")
4155 (license (list
4156 license:expat
4157 ;; Although this package uses only files licensed under expat,
4158 ;; other parts of the source are licensed under different
4159 ;; licenses. We include them to be inherited by other packages.
4160 license:asl2.0
4161 ;; Some files in modello-plugin-java are licensed under a
4162 ;; 5-clause BSD license.
4163 (license:non-copyleft
4164 (string-append "file:///modello-plugins/modello-plugin-java/"
4165 "src/main/java/org/codehaus/modello/plugin/"
4166 "java/javasource/JNaming.java"))))))
4167
fc620bef
JL
4168(define-public java-modello-plugins-java
4169 (package
4170 (inherit java-modello-core)
4171 (name "java-modello-plugins-java")
4172 (arguments
4173 `(#:jar-name "modello-plugins-java.jar"
4174 #:source-dir "modello-plugins/modello-plugin-java/src/main/java"
4175 #:test-dir "modello-plugins/modello-plugin-java/src/test"
4176 #:jdk ,icedtea-8
4177 #:tests? #f; requires maven-model, which depends on this package
4178 #:phases
4179 (modify-phases %standard-phases
4180 (add-before 'build 'copy-resources
4181 (lambda _
4182 (mkdir-p "build/classes")
4183 (copy-recursively "modello-plugins/modello-plugin-java/src/main/resources"
4184 "build/classes")
4185 #t)))))
4186 (inputs
4187 `(("java-modello-core" ,java-modello-core)
4188 ,@(package-inputs java-modello-core)))
4189 (synopsis "Modello Java Plugin")
4190 (description "Modello Java Plugin generates Java objects for the model.")))
4191
a0ce95ba
JL
4192(define-public java-modello-plugins-xml
4193 (package
4194 (inherit java-modello-core)
4195 (name "java-modello-plugins-xml")
4196 (arguments
4197 `(#:jar-name "modello-plugins-xml.jar"
4198 #:source-dir "modello-plugins/modello-plugin-xml/src/main/java"
4199 #:test-dir "modello-plugins/modello-plugin-xml/src/test"
4200 #:jdk ,icedtea-8
4201 #:phases
4202 (modify-phases %standard-phases
4203 (add-before 'build 'copy-resources
4204 (lambda _
4205 (mkdir-p "build/classes")
4206 (copy-recursively
4207 "modello-plugins/modello-plugin-xml/src/main/resources"
4208 "build/classes")
4209 #t))
4210 (add-before 'check 'fix-paths
4211 (lambda _
4212 (with-directory-excursion "modello-plugins/modello-plugin-xml/src/test"
4213 (substitute*
4214 "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java"
2c8ac364
MW
4215 (("src/test") "modello-plugins/modello-plugin-xml/src/test")))
4216 #t)))))
a0ce95ba
JL
4217 (inputs
4218 `(("java-modello-core" ,java-modello-core)
4219 ("java-modello-plugins-java" ,java-modello-plugins-java)
4220 ,@(package-inputs java-modello-core)))
4221 (synopsis "Modello XML Plugin")
4222 (description "Modello XML Plugin contains shared code for every plugins
4223working on XML representation of the model.")))
4224
e4708560
JL
4225(define-public java-modello-test
4226 (package
4227 (inherit java-modello-core)
4228 (name "java-modello-test")
4229 (arguments
4230 `(#:jar-name "modello-test.jar"
4231 #:source-dir "modello-test/src/main/java"
4232 #:tests? #f; no tests
4233 #:jdk ,icedtea-8))
4234 (inputs
4235 `(("java-plexus-utils" ,java-plexus-utils)
4236 ("java-plexus-compiler-api" ,java-plexus-compiler-api)
4237 ("java-plexus-compiler-javac" ,java-plexus-compiler-javac)
4238 ("java-plexus-container-default" ,java-plexus-container-default)))
4239 (synopsis "Modello test package")
4240 (description "The modello test package contains the basis to create
4241Modello generator unit-tests, including sample models and xml files to test
4242every feature for every plugin.")))
4243
36607d3b
JL
4244(define-public java-modello-plugins-xpp3
4245 (package
4246 (inherit java-modello-core)
4247 (name "java-modello-plugins-xpp3")
4248 (arguments
4249 `(#:jar-name "modello-plugins-xpp3.jar"
4250 #:source-dir "modello-plugins/modello-plugin-xpp3/src/main/java"
4251 #:test-dir "modello-plugins/modello-plugin-xpp3/src/test"
4252 ;; One of the test dependencies is maven-model which depends on this package.
4253 #:tests? #f
4254 #:jdk ,icedtea-8
4255 #:phases
4256 (modify-phases %standard-phases
4257 (add-before 'build 'copy-resources
4258 (lambda _
4259 (mkdir-p "build/classes")
4260 (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources"
4261 "build/classes")
4262 #t)))))
4263 (inputs
4264 `(("java-modello-core" ,java-modello-core)
4265 ("java-modello-plugins-java" ,java-modello-plugins-java)
4266 ("java-modello-plugins-xml" ,java-modello-plugins-xml)
4267 ,@(package-inputs java-modello-core)))
4268 (native-inputs
4269 `(("java-xmlunit" ,java-xmlunit)
4270 ("java-modello-test" ,java-modello-test)
4271 ,@(package-native-inputs java-modello-core)))
4272 (synopsis "Modello XPP3 Plugin")
4273 (description "The modello XPP3 plugin generates XML readers and writers based
4274on the XPP3 API (XML Pull Parser).")))
4275
8f8ed9aa
RW
4276(define-public java-asm
4277 (package
4278 (name "java-asm")
d0e9ded7 4279 (version "6.0")
8f8ed9aa
RW
4280 (source (origin
4281 (method url-fetch)
4282 (uri (string-append "http://download.forge.ow2.org/asm/"
4283 "asm-" version ".tar.gz"))
4284 (sha256
4285 (base32
d0e9ded7 4286 "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00"))))
8f8ed9aa 4287 (build-system ant-build-system)
d0e9ded7 4288 (propagated-inputs
9d216017
GB
4289 `(("java-aqute-bndlib" ,java-aqute-bndlib)
4290 ("java-aqute-libg" ,java-aqute-libg)))
8f8ed9aa
RW
4291 (arguments
4292 `(#:build-target "compile"
4293 ;; The tests require an old version of Janino, which no longer compiles
4294 ;; with the JDK7.
4295 #:tests? #f
d0e9ded7
GB
4296 #:make-flags
4297 (list
4298 ;; We don't need these extra ant tasks, but the build system asks us to
4299 ;; provide a path anyway.
4300 "-Dobjectweb.ant.tasks.path=dummy-path"
4301 ;; The java-aqute.bndlib JAR file will be put onto the classpath and
4302 ;; used during the build automatically by ant-build-system, but
4303 ;; java-asm's build.xml fails unless we provide something here.
4304 "-Dbiz.aQute.bnd.path=dummy-path")
8f8ed9aa
RW
4305 #:phases
4306 (modify-phases %standard-phases
4307 (add-before 'install 'build-jars
4308 (lambda* (#:key make-flags #:allow-other-keys)
4309 ;; We cannot use the "jar" target because it depends on a couple
4310 ;; of unpackaged, complicated tools.
4311 (mkdir "dist")
2c8ac364
MW
4312 (invoke "jar"
4313 "-cf" (string-append "dist/asm-" ,version ".jar")
4314 "-C" "output/build/tmp" ".")))
8f8ed9aa
RW
4315 (replace 'install
4316 (install-jars "dist")))))
4317 (native-inputs
4318 `(("java-junit" ,java-junit)))
4319 (home-page "http://asm.ow2.org/")
4320 (synopsis "Very small and fast Java bytecode manipulation framework")
4321 (description "ASM is an all purpose Java bytecode manipulation and
4322analysis framework. It can be used to modify existing classes or dynamically
4323generate classes, directly in binary form. The provided common
4324transformations and analysis algorithms allow to easily assemble custom
4325complex transformations and code analysis tools.")
4326 (license license:bsd-3)))
607fe24a 4327
bfb4004d
GB
4328(define java-asm-bootstrap
4329 (package
4330 (inherit java-asm)
4331 (name "java-asm-bootstrap")
4332 (arguments
4333 (substitute-keyword-arguments (package-arguments java-asm)
4334 ((#:tests? _) #f)))
4335 (native-inputs `())
4336 (propagated-inputs
4337 `(("java-aqute-bndlib" ,java-aqute-bndlib-bootstrap)
4338 ("java-aqute-libg" ,java-aqute-libg-bootstrap)
4339 ,@(delete `("java-aqute-bndlib" ,java-aqute-bndlib)
de99ba7e 4340 (delete `("java-aqute-libg" ,java-aqute-libg)
bfb4004d
GB
4341 (package-inputs java-asm)))))))
4342
607fe24a
RW
4343(define-public java-cglib
4344 (package
4345 (name "java-cglib")
4346 (version "3.2.4")
5c44505b
TGR
4347 (source
4348 (origin
4349 (method git-fetch)
4350 (uri (git-reference
4351 (url "https://github.com/cglib/cglib.git")
4352 (commit (string-append
4353 "RELEASE_"
4354 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
4355 version)))))
4356 (file-name (git-file-name name version))
4357 (sha256
4358 (base32 "186451jms2zfp47yd8kxd77az2cqal1my2br7klgyp8fpl4qfg8v"))))
607fe24a
RW
4359 (build-system ant-build-system)
4360 (arguments
4361 `(;; FIXME: tests fail because junit runs
4362 ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem
4363 ;; to describe a test at all.
4364 #:tests? #f
4365 #:jar-name "cglib.jar"
4366 #:phases
4367 (modify-phases %standard-phases
4368 (add-after 'unpack 'chdir
4369 (lambda _ (chdir "cglib") #t)))))
4370 (inputs
4371 `(("java-asm" ,java-asm)
4372 ("java-junit" ,java-junit)))
4373 (home-page "https://github.com/cglib/cglib/")
4374 (synopsis "Java byte code generation library")
4375 (description "The byte code generation library CGLIB is a high level API
4376to generate and transform Java byte code.")
4377 (license license:asl2.0)))
33e34bfe
RW
4378
4379(define-public java-objenesis
4380 (package
4381 (name "java-objenesis")
4382 (version "2.5.1")
4383 (source (origin
4384 (method url-fetch)
4385 (uri (string-append "https://github.com/easymock/objenesis/"
4386 "archive/" version ".tar.gz"))
4387 (file-name (string-append "objenesis-" version ".tar.gz"))
4388 (sha256
4389 (base32
4390 "1va5qz1i2wawwavhnxfzxnfgrcaflz9p1pg03irrjh4nd3rz8wh6"))))
4391 (build-system ant-build-system)
4392 (arguments
4393 `(#:jar-name "objenesis.jar"
4394 #:source-dir "main/src/"
4395 #:test-dir "main/src/test/"))
4396 (native-inputs
4397 `(("java-junit" ,java-junit)
4398 ("java-hamcrest-core" ,java-hamcrest-core)))
4399 (home-page "http://objenesis.org/")
4400 (synopsis "Bypass the constructor when creating an object")
4401 (description "Objenesis is a small Java library that serves one purpose:
4402to instantiate a new object of a particular class. It is common to see
4403restrictions in libraries stating that classes must require a default
4404constructor. Objenesis aims to overcome these restrictions by bypassing the
4405constructor on object instantiation.")
4406 (license license:asl2.0)))
ae589876
RW
4407
4408(define-public java-easymock
4409 (package
4410 (name "java-easymock")
4411 (version "3.4")
4412 (source (origin
4413 (method url-fetch)
4414 (uri (string-append "https://github.com/easymock/easymock/"
4415 "archive/easymock-" version ".tar.gz"))
4416 (sha256
4417 (base32
4418 "1yzg0kv256ndr57gpav46cyv4a1ns5sj722l50zpxk3j6sk9hnmi"))))
4419 (build-system ant-build-system)
4420 (arguments
4421 `(#:jar-name "easymock.jar"
4422 #:source-dir "core/src/main"
4423 #:test-dir "core/src/test"
4424 #:phases
4425 (modify-phases %standard-phases
4426 ;; FIXME: Android support requires the following packages to be
4427 ;; available: com.google.dexmaker.stock.ProxyBuilder
4428 (add-after 'unpack 'delete-android-support
4429 (lambda _
4430 (with-directory-excursion "core/src/main/java/org/easymock/internal"
4431 (substitute* "MocksControl.java"
4432 (("AndroidSupport.isAndroid\\(\\)") "false")
4433 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
4434 (delete-file "AndroidClassProxyFactory.java"))
4435 #t))
4436 (add-after 'unpack 'delete-broken-tests
4437 (lambda _
4438 (with-directory-excursion "core/src/test/java/org/easymock"
4439 ;; This test depends on dexmaker.
4440 (delete-file "tests2/ClassExtensionHelperTest.java")
4441
4442 ;; This is not a test.
4443 (delete-file "tests/BaseEasyMockRunnerTest.java")
4444
4445 ;; This test should be executed with a different runner...
4446 (delete-file "tests2/EasyMockAnnotationsTest.java")
4447 ;; ...but deleting it means that we also have to delete these
4448 ;; dependent files.
4449 (delete-file "tests2/EasyMockRunnerTest.java")
4450 (delete-file "tests2/EasyMockRuleTest.java")
4451
4452 ;; This test fails because the file "easymock.properties" does
4453 ;; not exist.
4454 (delete-file "tests2/EasyMockPropertiesTest.java"))
4455 #t)))))
4456 (inputs
4457 `(("java-asm" ,java-asm)
4458 ("java-cglib" ,java-cglib)
4459 ("java-objenesis" ,java-objenesis)))
4460 (native-inputs
4461 `(("java-junit" ,java-junit)
4462 ("java-hamcrest-core" ,java-hamcrest-core)))
4463 (home-page "http://easymock.org")
4464 (synopsis "Java library providing mock objects for unit tests")
4465 (description "EasyMock is a Java library that provides an easy way to use
4466mock objects in unit testing.")
4467 (license license:asl2.0)))
7aa37023 4468
f12ad6c7
RW
4469(define-public java-jmock-1
4470 (package
4471 (name "java-jmock")
4472 (version "1.2.0")
4473 (source (origin
4474 (method url-fetch)
4475 (uri (string-append "https://github.com/jmock-developers/"
4476 "jmock-library/archive/" version ".tar.gz"))
4477 (file-name (string-append "jmock-" version ".tar.gz"))
4478 (sha256
4479 (base32
4480 "0xmrlhq0fszldkbv281k9463mv496143vvmqwpxp62yzjvdkx9w0"))))
4481 (build-system ant-build-system)
4482 (arguments
4483 `(#:build-target "jars"
4484 #:test-target "run.tests"
4485 #:phases
4486 (modify-phases %standard-phases
4487 (replace 'install (install-jars "build")))))
4488 (home-page "http://www.jmock.org")
4489 (synopsis "Mock object library for test-driven development")
4490 (description "JMock is a library that supports test-driven development of
4491Java code with mock objects. Mock objects help you design and test the
4492interactions between the objects in your programs.
4493
4494The jMock library
4495
4496@itemize
4497@item makes it quick and easy to define mock objects
4498@item lets you precisely specify the interactions between
4499 your objects, reducing the brittleness of your tests
4500@item plugs into your favourite test framework
4501@item is easy to extend.
4502@end itemize\n")
4503 (license license:bsd-3)))
4504
045124ae
JL
4505(define-public java-jmock
4506 (package
4507 (inherit java-jmock-1)
4508 (name "java-jmock")
4509 (version "2.8.2")
4510 (source (origin
4511 (method url-fetch)
4512 (uri (string-append "https://github.com/jmock-developers/"
4513 "jmock-library/archive/" version ".tar.gz"))
4514 (file-name (string-append name "-" version ".tar.gz"))
4515 (sha256
4516 (base32
4517 "18650a9g8xffcsdb6w91pbswa7f40fp2sh6s3nclkclz5dbzq8f0"))))
4518 (inputs
4519 `(("java-hamcrest-all" ,java-hamcrest-all)
4520 ("java-asm" ,java-asm)
4521 ("java-bsh" ,java-bsh)
4522 ("java-junit" ,java-junit)))
4523 (native-inputs
4524 `(("cglib" ,java-cglib)))
4525 (arguments
4526 `(#:jar-name "java-jmock.jar"
4527 #:source-dir "jmock/src/main/java"
4528 #:test-dir "jmock/src/test"))))
4529
25436c6d
JL
4530(define-public java-jmock-junit4
4531 (package
4532 (inherit java-jmock)
4533 (name "java-jmock-junit4")
4534 (arguments
4535 `(#:jar-name "java-jmock-junit4.jar"
4536 #:source-dir "jmock-junit4/src/main/java"
4537 #:test-dir "jmock-junit4/src/test"))
4538 (inputs
4539 `(("java-hamcrest-all" ,java-hamcrest-all)
4540 ("java-asm" ,java-asm)
4541 ("java-bsh" ,java-bsh)
4542 ("java-jmock" ,java-jmock)
4543 ("java-jumit" ,java-junit)))))
4544
e84b899d
JL
4545(define-public java-jmock-legacy
4546 (package
4547 (inherit java-jmock)
4548 (name "java-jmock-legacy")
4549 (arguments
4550 `(#:jar-name "java-jmock-legacy.jar"
4551 #:source-dir "jmock-legacy/src/main/java"
4552 #:test-dir "jmock-legacy/src/test"
4553 #:phases
4554 (modify-phases %standard-phases
4555 (add-before 'check 'copy-tests
4556 (lambda _
4557 ;; This file is a dependancy of some tests
4558 (let ((file "org/jmock/test/acceptance/PackageProtectedType.java"))
4559 (copy-file (string-append "jmock/src/test/java/" file)
4560 (string-append "jmock-legacy/src/test/java/" file))
4561 #t))))))
4562 (inputs
4563 `(("java-hamcrest-all" ,java-hamcrest-all)
4564 ("java-objenesis" ,java-objenesis)
4565 ("java-cglib" ,java-cglib)
4566 ("java-jmock" ,java-jmock)
4567 ("java-asm" ,java-asm)
4568 ("java-bsh" ,java-bsh)
4569 ("java-junit" ,java-junit)))
4570 (native-inputs
4571 `(("java-jmock-junit4" ,java-jmock-junit4)))))
4572
439c59da
RW
4573(define-public java-hamcrest-all
4574 (package (inherit java-hamcrest-core)
4575 (name "java-hamcrest-all")
4576 (arguments
bfc007e1
RW
4577 `(#:jdk ,icedtea-8
4578 ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core)
4579 ((#:build-target _) "bigjar")
4580 ((#:phases phases)
4581 `(modify-phases ,phases
4582 ;; Some build targets override the classpath, so we need to patch
4583 ;; the build.xml to ensure that required dependencies are on the
4584 ;; classpath.
4585 (add-after 'unpack 'patch-classpath-for-integration
4586 (lambda* (#:key inputs #:allow-other-keys)
4587 (substitute* "build.xml"
4588 ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
4589 (string-join
4590 (cons line
4591 (append
4592 (find-files (assoc-ref inputs "java-junit") "\\.jar$")
4593 (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
4594 (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
2cc63e6f
RW
4595 ";"))
4596 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
4597 (string-append (assoc-ref inputs "java-hamcrest-core")
4598 "/share/java/hamcrest-core.jar")))
bfc007e1 4599 #t)))))))
439c59da
RW
4600 (inputs
4601 `(("java-junit" ,java-junit)
4602 ("java-jmock" ,java-jmock-1)
2cc63e6f
RW
4603 ;; This is necessary because of what seems to be a race condition.
4604 ;; This package would sometimes fail to build because hamcrest-core.jar
4605 ;; could not be found, even though it is built as part of this package.
4606 ;; Adding java-hamcrest-core appears to fix this problem. See
4607 ;; https://debbugs.gnu.org/31390 for more information.
4608 ("java-hamcrest-core" ,java-hamcrest-core)
439c59da 4609 ("java-easymock" ,java-easymock)
439c59da
RW
4610 ,@(package-inputs java-hamcrest-core)))))
4611
7aa37023
RW
4612(define-public java-jopt-simple
4613 (package
4614 (name "java-jopt-simple")
4615 (version "5.0.3")
4616 (source (origin
4617 (method url-fetch)
4618 (uri (string-append "http://repo1.maven.org/maven2/"
4619 "net/sf/jopt-simple/jopt-simple/"
4620 version "/jopt-simple-"
4621 version "-sources.jar"))
4622 (sha256
4623 (base32
4624 "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa"))))
4625 (build-system ant-build-system)
4626 (arguments
4627 `(#:tests? #f ; there are no tests
4628 #:jar-name "jopt-simple.jar"))
4629 (home-page "https://pholser.github.io/jopt-simple/")
4630 (synopsis "Java library for parsing command line options")
4631 (description "JOpt Simple is a Java library for parsing command line
4632options, such as those you might pass to an invocation of @code{javac}. In
4633the interest of striving for simplicity, as closely as possible JOpt Simple
4634attempts to honor the command line option syntaxes of POSIX @code{getopt} and
4635GNU @code{getopt_long}. It also aims to make option parser configuration and
4636retrieval of options and their arguments simple and expressive, without being
4637overly clever.")
4638 (license license:expat)))
840969e8
RW
4639
4640(define-public java-commons-math3
4641 (package
4642 (name "java-commons-math3")
4643 (version "3.6.1")
4644 (source (origin
4645 (method url-fetch)
4646 (uri (string-append "mirror://apache/commons/math/source/"
4647 "commons-math3-" version "-src.tar.gz"))
4648 (sha256
4649 (base32
4650 "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6"))))
4651 (build-system ant-build-system)
4652 (arguments
4653 `(#:build-target "jar"
4654 #:test-target "test"
4655 #:make-flags
4656 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
4657 (junit (assoc-ref %build-inputs "java-junit")))
4658 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4659 (string-append "-Dhamcrest.jar=" hamcrest
4660 "/share/java/hamcrest-core.jar")))
4661 #:phases
4662 (modify-phases %standard-phases
4663 ;; We want to build the jar in the build phase and run the tests
4664 ;; later in a separate phase.
4665 (add-after 'unpack 'untangle-targets
4666 (lambda _
4667 (substitute* "build.xml"
4668 (("name=\"jar\" depends=\"test\"")
4669 "name=\"jar\" depends=\"compile\""))
4670 #t))
4671 ;; There is no install target.
4672 (replace 'install
4673 (install-jars "target")))))
4674 (native-inputs
4675 `(("java-junit" ,java-junit)
4676 ("java-hamcrest-core" ,java-hamcrest-core)))
4677 (home-page "http://commons.apache.org/math/")
4678 (synopsis "Apache Commons mathematics library")
4679 (description "Commons Math is a library of lightweight, self-contained
4680mathematics and statistics components addressing the most common problems not
4681available in the Java programming language or Commons Lang.")
4682 (license license:asl2.0)))
62c9bfaa
RW
4683
4684(define-public java-jmh
4685 (package
4686 (name "java-jmh")
4687 (version "1.17.5")
4688 (source (origin
4689 (method hg-fetch)
4690 (uri (hg-reference
4691 (url "http://hg.openjdk.java.net/code-tools/jmh/")
4692 (changeset version)))
4693 (file-name (string-append name "-" version "-checkout"))
4694 (sha256
4695 (base32
4696 "1fxyxhg9famwcg1prc4cgwb5wzyxqavn3cjm5vz8605xz7x5k084"))))
4697 (build-system ant-build-system)
4698 (arguments
4699 `(#:jar-name "jmh-core.jar"
4700 #:source-dir "jmh-core/src/main"
4701 #:test-dir "jmh-core/src/test"
4702 #:phases
4703 (modify-phases %standard-phases
4704 ;; This seems to be a bug in the JDK. It may not be necessary in
4705 ;; future versions of the JDK.
4706 (add-after 'unpack 'fix-bug
4707 (lambda _
4708 (with-directory-excursion
4709 "jmh-core/src/main/java/org/openjdk/jmh/runner/options"
4710 (substitute* '("IntegerValueConverter.java"
4711 "ThreadsValueConverter.java")
4712 (("public Class<Integer> valueType")
4713 "public Class<? extends Integer> valueType")))
4714 #t)))))
4715 (inputs
4716 `(("java-jopt-simple" ,java-jopt-simple)
4717 ("java-commons-math3" ,java-commons-math3)))
4718 (native-inputs
4719 `(("java-junit" ,java-junit)
4720 ("java-hamcrest-core" ,java-hamcrest-core)))
4721 (home-page "http://openjdk.java.net/projects/code-tools/jmh/")
4722 (synopsis "Benchmark harness for the JVM")
4723 (description "JMH is a Java harness for building, running, and analysing
4724nano/micro/milli/macro benchmarks written in Java and other languages
f4548394 4725targeting the JVM.")
62c9bfaa
RW
4726 ;; GPLv2 only
4727 (license license:gpl2)))
56ebb4e9
RW
4728
4729(define-public java-commons-collections4
4730 (package
4731 (name "java-commons-collections4")
4732 (version "4.1")
4733 (source (origin
4734 (method url-fetch)
4735 (uri (string-append "mirror://apache/commons/collections/source/"
4736 "commons-collections4-" version "-src.tar.gz"))
4737 (sha256
4738 (base32
4739 "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl"))))
4740 (build-system ant-build-system)
4741 (arguments
4742 `(#:test-target "test"
4743 #:make-flags
4744 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
4745 (junit (assoc-ref %build-inputs "java-junit"))
4746 (easymock (assoc-ref %build-inputs "java-easymock")))
4747 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4748 (string-append "-Dhamcrest.jar=" hamcrest
4749 "/share/java/hamcrest-core.jar")
4750 (string-append "-Deasymock.jar=" easymock
4751 "/share/java/easymock.jar")))
4752 #:phases
4753 (modify-phases %standard-phases
4754 (replace 'install
4755 (install-jars "target")))))
4756 (native-inputs
4757 `(("java-junit" ,java-junit)
4758 ("java-hamcrest-core" ,java-hamcrest-core)
4759 ("java-easymock" ,java-easymock)))
4760 (home-page "http://commons.apache.org/collections/")
4761 (synopsis "Collections framework")
4762 (description "The Java Collections Framework is the recognised standard
4763for collection handling in Java. Commons-Collections seek to build upon the
4764JDK classes by providing new interfaces, implementations and utilities. There
4765are many features, including:
4766
4767@itemize
4768@item @code{Bag} interface for collections that have a number of copies of
4769 each object
4770@item @code{BidiMap} interface for maps that can be looked up from value to
4771 key as well and key to value
4772@item @code{MapIterator} interface to provide simple and quick iteration over
4773 maps
4774@item Transforming decorators that alter each object as it is added to the
4775 collection
4776@item Composite collections that make multiple collections look like one
4777@item Ordered maps and sets that retain the order elements are added in,
4778 including an LRU based map
4779@item Reference map that allows keys and/or values to be garbage collected
4780 under close control
4781@item Many comparator implementations
4782@item Many iterator implementations
4783@item Adapter classes from array and enumerations to collections
4784@item Utilities to test or create typical set-theory properties of collections
4785 such as union, intersection, and closure.
4786@end itemize\n")
4787 (license license:asl2.0)))
6af63e65 4788
229a9864
JL
4789(define-public java-commons-collections
4790 (package
4791 (inherit java-commons-collections4)
4792 (name "java-commons-collections")
4793 (version "3.2.2")
4794 (source (origin
4795 (method url-fetch)
4796 (uri (string-append "mirror://apache/commons/collections/source/"
4797 "commons-collections-" version "-src.tar.gz"))
4798 (sha256
4799 (base32
7c7323e4
GB
4800 "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387"))
4801 (patches
4802 (search-patches "java-commons-collections-fix-java8.patch"))))
229a9864
JL
4803 (arguments
4804 (substitute-keyword-arguments (package-arguments java-commons-collections4)
4805 ((#:phases phases)
4806 `(modify-phases ,phases
4807 ;; The manifest is required by the build procedure
4808 (add-before 'build 'add-manifest
4809 (lambda _
4810 (mkdir-p "build/conf")
4811 (call-with-output-file "build/conf/MANIFEST.MF"
4812 (lambda (file)
2c8ac364
MW
4813 (format file "Manifest-Version: 1.0\n")))
4814 #t))
229a9864
JL
4815 (replace 'install
4816 (install-jars "build"))))))))
4817
5aa2f3f4
JL
4818(define java-commons-collections-test-classes
4819 (package
4820 (inherit java-commons-collections)
4821 (arguments
4822 `(#:jar-name "commons-collections-test-classes.jar"
4823 #:source-dir "src/test"
4824 #:tests? #f))
4825 (inputs
4826 `(("collection" ,java-commons-collections)))))
4827
4828(define-public java-commons-beanutils
4829 (package
4830 (name "java-commons-beanutils")
4831 (version "1.9.3")
4832 (source (origin
4833 (method url-fetch)
4834 (uri (string-append "mirror://apache/commons/beanutils/source/"
4835 "commons-beanutils-" version "-src.tar.gz"))
4836 (sha256
4837 (base32
4838 "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk"))))
4839 (build-system ant-build-system)
4840 (arguments
4841 `(#:test-target "test"
4842 #:tests? #f
4843 #:phases
4844 (modify-phases %standard-phases
4845 (replace 'install
4846 (lambda* (#:key outputs #:allow-other-keys)
4847 (rename-file (string-append "dist/commons-beanutils-" ,version
4848 "-SNAPSHOT.jar")
4849 "commons-beanutils.jar")
4850 (install-file "commons-beanutils.jar"
4851 (string-append (assoc-ref outputs "out") "/share/java/"))
4852 #t)))))
4853 (inputs
4854 `(("logging" ,java-commons-logging-minimal)
4855 ("collections" ,java-commons-collections)))
4856 (native-inputs
4857 `(("junit" ,java-junit)
4858 ("collections-test" ,java-commons-collections-test-classes)))
4859 (home-page "http://commons.apache.org/beanutils/")
4860 (synopsis "Dynamically set or get properties in Java")
4861 (description "BeanUtils provides a simplified interface to reflection and
4862introspection to set or get dynamically determined properties through their
4863setter and getter method.")
4864 (license license:asl2.0)))
4865
6af63e65
HG
4866(define-public java-commons-io
4867 (package
4868 (name "java-commons-io")
4869 (version "2.5")
4870 (source
4871 (origin
4872 (method url-fetch)
4873 (uri (string-append "mirror://apache/commons/io/source/"
4874 "commons-io-" version "-src.tar.gz"))
4875 (sha256
4876 (base32
4877 "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3"))))
4878 (build-system ant-build-system)
4879 (outputs '("out" "doc"))
4880 (arguments
4881 `(#:test-target "test"
4882 #:make-flags
4883 (list (string-append "-Djunit.jar="
4884 (assoc-ref %build-inputs "java-junit")
4885 "/share/java/junit.jar"))
4886 #:phases
4887 (modify-phases %standard-phases
4888 (add-after 'build 'build-javadoc ant-build-javadoc)
4889 (replace 'install (install-jars "target"))
4890 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4891 (native-inputs
4892 `(("java-junit" ,java-junit)
4893 ("java-hamcrest-core" ,java-hamcrest-core)))
4894 (home-page "http://commons.apache.org/io/")
4895 (synopsis "Common useful IO related classes")
4896 (description "Commons-IO contains utility classes, stream implementations,
4897file filters and endian classes.")
4898 (license license:asl2.0)))
d631b5f3 4899
46f9022c
DM
4900(define-public java-commons-exec-1.1
4901 (package
4902 (name "java-commons-exec")
4903 (version "1.1")
4904 (source
4905 (origin
4906 (method url-fetch)
4907 (uri (string-append "mirror://apache/commons/exec/source/"
4908 "commons-exec-" version "-src.tar.gz"))
4909 (sha256
4910 (base32
4911 "025dk8xgj10lxwwwqp0hng2rn7fr4vcirxzydqzx9k4dim667alk"))))
4912 (build-system ant-build-system)
4913 (arguments
4914 `(#:test-target "test"
4915 #:make-flags
4916 (list (string-append "-Dmaven.junit.jar="
4917 (assoc-ref %build-inputs "java-junit")
4918 "/share/java/junit.jar"))
4919 #:phases
4920 (modify-phases %standard-phases
4921 (add-before 'build 'delete-network-tests
4922 (lambda _
4923 (delete-file "src/test/java/org/apache/commons/exec/DefaultExecutorTest.java")
4924 (substitute* "src/test/java/org/apache/commons/exec/TestRunner.java"
4925 (("suite\\.addTestSuite\\(DefaultExecutorTest\\.class\\);") ""))
4926 #t))
4927 ;; The "build" phase automatically tests.
4928 (delete 'check)
4929 (replace 'install (install-jars "target")))))
4930 (native-inputs
4931 `(("java-junit" ,java-junit)))
4932 (home-page "http://commons.apache.org/proper/commons-exec/")
4933 (synopsis "Common program execution related classes")
4934 (description "Commons-Exec simplifies executing external processes.")
4935 (license license:asl2.0)))
4936
4937(define-public java-commons-exec
4938 (package
4939 (inherit java-commons-exec-1.1)
4940 (version "1.3")
4941 (source
4942 (origin
4943 (method url-fetch)
4944 (uri (string-append "mirror://apache/commons/exec/source/"
4945 "commons-exec-" version "-src.tar.gz"))
4946 (sha256
4947 (base32
4948 "17yb4h6f8l49c5iyyvda4z2nmw0bxrx857nrwmsr7mmpb7x441yv"))))
4949 (arguments
4950 `(#:test-target "test"
4951 #:make-flags
4952 (list (string-append "-Dmaven.junit.jar="
4953 (assoc-ref %build-inputs "java-junit")
4954 "/share/java/junit.jar")
4955 "-Dmaven.compiler.source=1.7"
4956 "-Dmaven.compiler.target=1.7")
4957 #:phases
4958 (modify-phases %standard-phases
4959 (add-before 'build 'delete-network-tests
4960 (lambda* (#:key inputs #:allow-other-keys)
4961 ;; This test hangs indefinitely.
4962 (delete-file "src/test/java/org/apache/commons/exec/issues/Exec60Test.java")
4963 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec41Test.java"
4964 (("ping -c 10 127.0.0.1") "sleep 10"))
4965 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec49Test.java"
4966 (("/bin/ls") "ls"))
4967 (call-with-output-file "src/test/scripts/ping.sh"
4968 (lambda (port)
4969 (format port "#!~a/bin/sh\nsleep $1\n"
4970 (assoc-ref inputs "bash"))))
4971 #t))
4972 ;; The "build" phase automatically tests.
4973 (delete 'check)
4974 (replace 'install (install-jars "target")))))
4975 (native-inputs
4976 `(("java-junit" ,java-junit)
4977 ("java-hamcrest-core" ,java-hamcrest-core)))))
4978
d631b5f3
HG
4979(define-public java-commons-lang
4980 (package
4981 (name "java-commons-lang")
4982 (version "2.6")
4983 (source
4984 (origin
4985 (method url-fetch)
4986 (uri (string-append "mirror://apache/commons/lang/source/"
4987 "commons-lang-" version "-src.tar.gz"))
4988 (sha256
4989 (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5"))))
4990 (build-system ant-build-system)
4991 (outputs '("out" "doc"))
4992 (arguments
4993 `(#:test-target "test"
e5a96113 4994 #:test-exclude (list "**/Abstract*.java" "**/Random*.java")
d631b5f3
HG
4995 #:phases
4996 (modify-phases %standard-phases
4997 (add-after 'build 'build-javadoc ant-build-javadoc)
4998 (add-before 'check 'disable-failing-test
4999 (lambda _
5000 ;; Disable a failing test
5001 (substitute* "src/test/java/org/apache/commons/lang/\
5002time/FastDateFormatTest.java"
5003 (("public void testFormat\\(\\)")
5004 "public void disabled_testFormat()"))
5005 #t))
5006 (replace 'install (install-jars "target"))
5007 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
5008 (native-inputs
5009 `(("java-junit" ,java-junit)))
5010 (home-page "http://commons.apache.org/lang/")
5011 (synopsis "Extension of the java.lang package")
5012 (description "The Commons Lang components contains a set of Java classes
5013that provide helper methods for standard Java classes, especially those found
5014in the @code{java.lang} package in the Sun JDK. The following classes are
5015included:
5016
5017@itemize
5018@item StringUtils - Helper for @code{java.lang.String}.
5019@item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets
5020 of characters such as @code{[a-z]} and @code{[abcdez]}.
5021@item RandomStringUtils - Helper for creating randomised strings.
5022@item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
5023@item NumberRange - A range of numbers with an upper and lower bound.
5024@item ObjectUtils - Helper for @code{java.lang.Object}.
5025@item SerializationUtils - Helper for serializing objects.
5026@item SystemUtils - Utility class defining the Java system properties.
5027@item NestedException package - A sub-package for the creation of nested
5028 exceptions.
5029@item Enum package - A sub-package for the creation of enumerated types.
5030@item Builder package - A sub-package for the creation of @code{equals},
5031 @code{hashCode}, @code{compareTo} and @code{toString} methods.
5032@end itemize\n")
5033 (license license:asl2.0)))
82e18864
HG
5034
5035(define-public java-commons-lang3
5036 (package
5037 (name "java-commons-lang3")
5038 (version "3.4")
5039 (source
5040 (origin
5041 (method url-fetch)
5042 (uri (string-append "mirror://apache/commons/lang/source/"
5043 "commons-lang3-" version "-src.tar.gz"))
5044 (sha256
5045 (base32 "0xpshb9spjhplq5a7mr0y1bgfw8190ik4xj8f569xidfcki1d6kg"))))
5046 (build-system ant-build-system)
5047 (outputs '("out" "doc"))
5048 (arguments
5049 `(#:test-target "test"
5050 #:make-flags
5051 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-all"))
5052 (junit (assoc-ref %build-inputs "java-junit"))
5053 (easymock (assoc-ref %build-inputs "java-easymock"))
5054 (io (assoc-ref %build-inputs "java-commons-io")))
5055 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
5056 (string-append "-Dhamcrest.jar=" hamcrest
5057 "/share/java/hamcrest-all.jar")
5058 (string-append "-Dcommons-io.jar=" io
5059 "/share/java/commons-io-"
5060 ,(package-version java-commons-io)
5061 "-SNAPSHOT.jar")
5062 (string-append "-Deasymock.jar=" easymock
5063 "/share/java/easymock.jar")))
5064 #:phases
5065 (modify-phases %standard-phases
5066 (add-after 'build 'build-javadoc ant-build-javadoc)
5067 (replace 'install (install-jars "target"))
5068 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
5069 (native-inputs
5070 `(("java-junit" ,java-junit)
5071 ("java-commons-io" ,java-commons-io)
5072 ("java-hamcrest-all" ,java-hamcrest-all)
5073 ("java-easymock" ,java-easymock)))
5074 (home-page "http://commons.apache.org/lang/")
5075 (synopsis "Extension of the java.lang package")
5076 (description "The Commons Lang components contains a set of Java classes
5077that provide helper methods for standard Java classes, especially those found
5078in the @code{java.lang} package. The following classes are included:
5079
5080@itemize
5081@item StringUtils - Helper for @code{java.lang.String}.
5082@item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of
5083 characters such as @code{[a-z]} and @code{[abcdez]}.
5084@item RandomStringUtils - Helper for creating randomised strings.
5085@item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
5086@item NumberRange - A range of numbers with an upper and lower bound.
5087@item ObjectUtils - Helper for @code{java.lang.Object}.
5088@item SerializationUtils - Helper for serializing objects.
5089@item SystemUtils - Utility class defining the Java system properties.
5090@item NestedException package - A sub-package for the creation of nested
5091 exceptions.
5092@item Enum package - A sub-package for the creation of enumerated types.
5093@item Builder package - A sub-package for the creation of @code{equals},
5094 @code{hashCode}, @code{compareTo} and @code{toString} methods.
5095@end itemize\n")
5096 (license license:asl2.0)))
1c188f4e 5097
afb13a10
JL
5098(define-public java-commons-bsf
5099 (package
5100 (name "java-commons-bsf")
5101 (version "2.4.0")
5102 (source (origin
5103 (method url-fetch)
5104 (uri (string-append "mirror://apache/commons/bsf/source/bsf-src-"
5105 version ".tar.gz"))
5106 (sha256
5107 (base32
5108 "1sbamr8jl32p1jgf59nw0b2w9qivyg145954hm6ly54cfgsqrdas"))
5109 (modules '((guix build utils)))
5110 (snippet
5111 '(begin
5112 (for-each delete-file
5113 (find-files "." "\\.jar$"))
5114 #t))))
5115 (build-system ant-build-system)
5116 (arguments
5117 `(#:build-target "jar"
5118 #:tests? #f; No test file
5119 #:modules ((guix build ant-build-system)
5120 (guix build utils)
5121 (guix build java-utils)
5122 (sxml simple))
5123 #:phases
5124 (modify-phases %standard-phases
5125 (add-before 'build 'create-properties
5126 (lambda _
5127 ;; This file is missing from the distribution
5128 (call-with-output-file "build-properties.xml"
5129 (lambda (port)
5130 (sxml->xml
5131 `(project (@ (basedir ".") (name "build-properties") (default ""))
5132 (property (@ (name "project.name") (value "bsf")))
5133 (property (@ (name "source.level") (value "1.5")))
5134 (property (@ (name "build.lib") (value "build/jar")))
5135 (property (@ (name "src.dir") (value "src")))
5136 (property (@ (name "tests.dir") (value "src/org/apache/bsf/test")))
5137 (property (@ (name "build.tests") (value "build/test-classes")))
5138 (property (@ (name "build.dest") (value "build/classes"))))
2c8ac364
MW
5139 port)))
5140 #t))
afb13a10
JL
5141 (replace 'install (install-jars "build")))))
5142 (native-inputs
5143 `(("java-junit" ,java-junit)))
5144 (inputs
5145 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
5146 (home-page "https://commons.apache.org/proper/commons-bsf")
5147 (synopsis "Bean Scripting Framework")
5148 (description "The Bean Scripting Framework (BSF) is a set of Java classes
5149which provides scripting language support within Java applications, and access
5150to Java objects and methods from scripting languages. BSF allows one to write
5151JSPs in languages other than Java while providing access to the Java class
5152library. In addition, BSF permits any Java application to be implemented in
5153part (or dynamically extended) by a language that is embedded within it. This
5154is achieved by providing an API that permits calling scripting language engines
5155from within Java, as well as an object registry that exposes Java objects to
5156these scripting language engines.")
5157 (license license:asl2.0)))
5158
66006fe5
JL
5159(define-public java-commons-jxpath
5160 (package
5161 (name "java-commons-jxpath")
5162 (version "1.3")
5163 (source (origin
5164 (method url-fetch)
5165 (uri (string-append "mirror://apache/commons/jxpath/source/"
5166 "commons-jxpath-" version "-src.tar.gz"))
5167 (sha256
5168 (base32
5169 "1rpgg31ayn9fwr4bfi2i1ij0npcg79ad2fv0w9hacvawsyc42cfs"))))
5170 (build-system ant-build-system)
5171 (arguments
5172 `(#:jar-name "commons-jxpath.jar"
5173 ;; tests require more dependencies, including mockrunner which depends on old software
5174 #:tests? #f
5175 #:source-dir "src/java"))
5176 (inputs
10eddaca 5177 `(("servlet" ,java-classpathx-servletapi)
66006fe5
JL
5178 ("java-jdom" ,java-jdom)
5179 ("java-commons-beanutils" ,java-commons-beanutils)))
5180 (native-inputs
5181 `(("java-junit" ,java-junit)))
5182 (home-page "http://commons.apache.org/jxpath/")
5183 (synopsis "Simple interpreter of an expression language called XPath.")
5184 (description "The org.apache.commons.jxpath package defines a simple
5185interpreter of an expression language called XPath. JXPath applies XPath
5186expressions to graphs of objects of all kinds: JavaBeans, Maps, Servlet
5187contexts, DOM etc, including mixtures thereof.")
5188 (license license:asl2.0)))
5189
b635d272
JL
5190(define-public java-commons-pool
5191 (package
5192 (name "java-commons-pool")
5193 (version "2.6.2")
5194 (source (origin
5195 (method url-fetch)
5196 (uri (string-append "mirror://apache/commons/pool/source/"
5197 "commons-pool2-" version "-src.tar.gz"))
5198 (sha256
5199 (base32
5200 "1fi1hgqmq01bs6azbj3sfswxzadp2r8sjjfiq6ryilz1m50kvrv6"))))
5201 (arguments
5202 `(#:jar-name "common-pool.jar"
5203 #:source-dir "src/main/java"
5204 #:test-exclude
5205 (list "**/PerformanceTest.java")))
5206 (build-system ant-build-system)
5207 (inputs
5208 `(("java-cglib" ,java-cglib)))
5209 (native-inputs
5210 `(("java-junit" ,java-junit)
5211 ("java-hamcrest-core" ,java-hamcrest-core)
5212 ("java-asm" ,java-asm)
5213 ("java-objenesis" ,java-objenesis)))
5214 (home-page "https://commons.apache.org/proper/commons-pool/")
5215 (synopsis "Object-pooling API in Java")
5216 (description "The commons-pool package provides an object-pooling API
5217and a number of object pool implementations. This package defines a
5218handful of pooling interfaces and some base classes that may be useful when
5219creating new pool implementations.")
5220 (license license:asl2.0)))
5221
f31ea164
JL
5222(define-public java-commons-dbcp
5223 (package
5224 (name "java-commons-dbcp")
5225 (version "2.6.0")
5226 (source (origin
5227 (method url-fetch)
5228 (uri (string-append "mirror://apache/commons/dbcp/source/"
5229 "commons-dbcp2-" version "-src.tar.gz"))
5230 (sha256
5231 (base32
5232 "0axbvcbnf2l70fc3ybrlp3siw2w4ka9mia2pnx4py8gz54cpw3rc"))))
5233 (arguments
5234 `(#:source-dir "src/main/java"
5235 #:jar-name "java-commons-dbcp.jar"
5236 #:tests? #f)); requires apache-geronimo
5237 (inputs
5238 `(("java-commons-pool" ,java-commons-pool)
5239 ("java-commons-logging" ,java-commons-logging-minimal)
5240 ("java-jboss-transaction-api-spec" ,java-jboss-transaction-api-spec)))
5241 (native-inputs
5242 `(("java-junit" ,java-junit)))
5243 (build-system ant-build-system)
5244 (home-page "https://commons.apache.org/proper/commons-dbcp/")
5245 (synopsis "Database Connection Pool for Java")
5246 (description "Commons-dbcp allows you to share a pool of database
5247connections between users. Creating a new connection for each user can be
5248time consuming and even unfeasible when the number of simultaneous users is
5249very large. This package provides a way to share a poole of connections to
5250reduce that load.")
5251 (license license:asl2.0)))
5252
934b83e4
JL
5253(define-public java-commons-jcs
5254 (package
5255 (name "java-commons-jcs")
5256 (version "2.2.1")
5257 (source (origin
5258 (method url-fetch)
5259 (uri (string-append "mirror://apache/commons/jcs/source/"
5260 "commons-jcs-dist-" version "-src.tar.gz"))
5261 (sha256
5262 (base32
5263 "0syhq2npjbrl0azqfjm0gvash1qd5qjy4qmysxcrqjsk0nf9fa1q"))))
5264 (build-system ant-build-system)
5265 (arguments
5266 `(#:jar-name "commons-jcs.jar"
5267 #:source-dir "commons-jcs-core/src/main/java"
5268 #:test-dir "commons-jcs-core/src/test"
5269 #:tests? #f; requires hsqldb
5270 #:phases
5271 (modify-phases %standard-phases
5272 (add-before 'build 'prepare
5273 (lambda _
5274 (with-directory-excursion
5275 "commons-jcs-core/src/main/java/org/apache/commons/jcs"
5276 (substitute*
5277 "auxiliary/disk/jdbc/dsfactory/SharedPoolDataSourceFactory.java"
5278 (("commons.dbcp") "commons.dbcp2")
5279 ((".*\\.setMaxActive.*") ""))
5280 ;;; Remove dependency on velocity-tools
5281 (delete-file "admin/servlet/JCSAdminServlet.java"))
5282 #t)))))
5283 (propagated-inputs
5284 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
5285 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
5286 ("java-commons-httpclient" ,java-commons-httpclient)
5287 ("java-commons-dbcp" ,java-commons-dbcp)))
5288 (native-inputs
5289 `(("java-junit" ,java-junit)))
5290 (home-page "https://commons.apache.org/proper/commons-jcs/")
5291 (synopsis "Distributed caching system in Java")
5292 (description "JCS is a distributed caching system written in Java. It
5293is intended to speed up applications by providing a means to manage cached
5294data of various dynamic natures. Like any caching system, JCS is most useful
5295for high read, low put applications. Latency times drop sharply and
5296bottlenecks move away from the database in an effectively cached system.")
5297 (license license:asl2.0)))
5298
a1a5ef20
JL
5299(define-public java-jsr250
5300 (package
5301 (name "java-jsr250")
5302 (version "1.3")
5303 (source (origin
5304 (method url-fetch)
5305 (uri (string-append "https://repo1.maven.org/maven2/"
5306 "javax/annotation/javax.annotation-api/"
5307 version "/javax.annotation-api-"
5308 version "-sources.jar"))
5309 (sha256
5310 (base32
5311 "08clh8n4n9wfglf75qsqfjs6yf79f7x6hqx38cn856pksszv50kz"))))
5312 (build-system ant-build-system)
5313 (arguments
5314 `(#:tests? #f ; no tests included
5315 #:jdk ,icedtea-8
5316 #:jar-name "jsr250.jar"))
5317 (home-page "https://jcp.org/en/jsr/detail?id=250")
5318 (synopsis "Security-related annotations")
5319 (description "This package provides annotations for security. It provides
5320packages in the @code{javax.annotation} and @code{javax.annotation.security}
5321namespaces.")
5322 ;; either cddl or gpl2 only, with classpath exception
5323 (license (list license:cddl1.0
5324 license:gpl2))))
5325
0d4a0d60
RW
5326(define-public java-jsr305
5327 (package
5328 (name "java-jsr305")
5329 (version "3.0.1")
5330 (source (origin
5331 (method url-fetch)
5332 (uri (string-append "https://repo1.maven.org/maven2/"
5333 "com/google/code/findbugs/"
5334 "jsr305/" version "/jsr305-"
5335 version "-sources.jar"))
5336 (sha256
5337 (base32
5338 "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n"))))
5339 (build-system ant-build-system)
5340 (arguments
5341 `(#:tests? #f ; no tests included
5342 #:jar-name "jsr305.jar"))
5343 (home-page "http://findbugs.sourceforge.net/")
5344 (synopsis "Annotations for the static analyzer called findbugs")
5345 (description "This package provides annotations for the findbugs package.
5346It provides packages in the @code{javax.annotations} namespace.")
5347 (license license:asl2.0)))
5348
4f3e47ea
RW
5349(define-public java-guava
5350 (package
5351 (name "java-guava")
5352 ;; This is the last release of Guava that can be built with Java 7.
5353 (version "20.0")
5354 (source (origin
5355 (method url-fetch)
5356 (uri (string-append "https://github.com/google/guava/"
5357 "releases/download/v" version
5358 "/guava-" version "-sources.jar"))
5359 (sha256
5360 (base32
5361 "1gawrs5gi6j5hcfxdgpnfli75vb9pfi4sn09pnc8xacr669yajwr"))))
5362 (build-system ant-build-system)
5363 (arguments
5364 `(#:tests? #f ; no tests included
5365 #:jar-name "guava.jar"
5366 #:phases
5367 (modify-phases %standard-phases
5368 (add-after 'unpack 'trim-sources
5369 (lambda _
5370 (with-directory-excursion "src/com/google/common"
5371 ;; Remove annotations to avoid extra dependencies:
5372 ;; * "j2objc" annotations are used when converting Java to
5373 ;; Objective C;
5374 ;; * "errorprone" annotations catch common Java mistakes at
5375 ;; compile time;
5376 ;; * "IgnoreJRERequirement" is used for Android.
5377 (substitute* (find-files "." "\\.java$")
5378 (("import com.google.j2objc.*") "")
5379 (("import com.google.errorprone.annotation.*") "")
5380 (("import org.codehaus.mojo.animal_sniffer.*") "")
5381 (("@CanIgnoreReturnValue") "")
5382 (("@LazyInit") "")
5383 (("@WeakOuter") "")
5384 (("@RetainedWith") "")
5385 (("@Weak") "")
5386 (("@ForOverride") "")
5387 (("@J2ObjCIncompatible") "")
5388 (("@IgnoreJRERequirement") "")))
5389 #t)))))
5390 (inputs
5391 `(("java-jsr305" ,java-jsr305)))
5392 (home-page "https://github.com/google/guava")
5393 (synopsis "Google core libraries for Java")
5394 (description "Guava is a set of core libraries that includes new
5395collection types (such as multimap and multiset), immutable collections, a
5396graph library, functional types, an in-memory cache, and APIs/utilities for
5397concurrency, I/O, hashing, primitives, reflection, string processing, and much
5398more!")
5399 (license license:asl2.0)))
5400
af8f8281
RW
5401;; The java-commons-logging package provides adapters to many different
5402;; logging frameworks. To avoid an excessive dependency graph we try to build
5403;; it with only a minimal set of adapters.
5404(define-public java-commons-logging-minimal
5405 (package
5406 (name "java-commons-logging-minimal")
5407 (version "1.2")
5408 (source (origin
5409 (method url-fetch)
5410 (uri (string-append "mirror://apache/commons/logging/source/"
5411 "commons-logging-" version "-src.tar.gz"))
5412 (sha256
5413 (base32
5414 "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9"))))
5415 (build-system ant-build-system)
5416 (arguments
5417 `(#:tests? #f ; avoid dependency on logging frameworks
5418 #:jar-name "commons-logging-minimal.jar"
5419 #:phases
5420 (modify-phases %standard-phases
5421 (add-after 'unpack 'delete-adapters-and-tests
5422 (lambda _
5423 ;; Delete all adapters except for NoOpLog, SimpleLog, and
5424 ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl
5425 ;; is used by applications; SimpleLog is the only actually usable
5426 ;; implementation that does not depend on another logging
5427 ;; framework.
5428 (for-each
5429 (lambda (file)
5430 (delete-file (string-append
5431 "src/main/java/org/apache/commons/logging/impl/" file)))
5432 (list "Jdk13LumberjackLogger.java"
5433 "WeakHashtable.java"
5434 "Log4JLogger.java"
5435 "ServletContextCleaner.java"
5436 "Jdk14Logger.java"
5437 "AvalonLogger.java"
5438 "LogKitLogger.java"))
5439 (delete-file-recursively "src/test")
5440 #t)))))
5441 (home-page "http://commons.apache.org/logging/")
5442 (synopsis "Common API for logging implementations")
5443 (description "The Logging package is a thin bridge between different
5444logging implementations. A library that uses the commons-logging API can be
5445used with any logging implementation at runtime.")
5446 (license license:asl2.0)))
5447
90e65abe
RW
5448;; This is the last release of the 1.x series.
5449(define-public java-mockito-1
5450 (package
5451 (name "java-mockito")
5452 (version "1.10.19")
5453 (source (origin
5454 (method url-fetch)
5455 (uri (string-append "http://repo1.maven.org/maven2/"
5456 "org/mockito/mockito-core/" version
5457 "/mockito-core-" version "-sources.jar"))
5458 (sha256
5459 (base32
5460 "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc"))))
5461 (build-system ant-build-system)
5462 (arguments
5463 `(#:jar-name "mockito.jar"
5464 #:tests? #f ; no tests included
5465 ;; FIXME: patch-and-repack does not support jars, so we have to apply
5466 ;; patches in build phases.
5467 #:phases
5468 (modify-phases %standard-phases
5469 ;; Mockito was developed against a different version of hamcrest,
5470 ;; which does not require matcher implementations to provide an
5471 ;; implementation of the "describeMismatch" method. We add this
5472 ;; simple definition to pass the build with our version of hamcrest.
5473 (add-after 'unpack 'fix-hamcrest-build-error
5474 (lambda _
5475 (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java"
5476 (("public Matcher getActualMatcher\\(\\) .*" line)
5477 (string-append "
5478 public void describeMismatch(Object item, Description description) {
5479 actualMatcher.describeMismatch(item, description);
5480 }"
5481 line)))
5482 #t))
5483 ;; Mockito bundles cglib. We have a cglib package, so let's use
5484 ;; that instead.
5485 (add-after 'unpack 'use-system-libraries
5486 (lambda _
5487 (with-directory-excursion "src/org/mockito/internal/creation/cglib"
5488 (substitute* '("CGLIBHacker.java"
5489 "CglibMockMaker.java"
5490 "ClassImposterizer.java"
5491 "DelegatingMockitoMethodProxy.java"
5492 "MethodInterceptorFilter.java"
5493 "MockitoNamingPolicy.java"
5494 "SerializableMockitoMethodProxy.java"
5495 "SerializableNoOp.java")
5496 (("import org.mockito.cglib") "import net.sf.cglib")))
5497 #t)))))
5498 (inputs
5499 `(("java-junit" ,java-junit)
5500 ("java-objenesis" ,java-objenesis)
5501 ("java-cglib" ,java-cglib)
5502 ("java-hamcrest-core" ,java-hamcrest-core)))
5503 (home-page "http://mockito.org")
5504 (synopsis "Mockito is a mock library for Java")
5505 (description "Mockito is a mocking library for Java which lets you write
5506tests with a clean and simple API. It generates mocks using reflection, and
5507it records all mock invocations, including methods arguments.")
5508 (license license:asl2.0)))
5509
4f4d2e47
RW
5510(define-public java-httpcomponents-httpcore
5511 (package
5512 (name "java-httpcomponents-httpcore")
5513 (version "4.4.6")
5514 (source (origin
5515 (method url-fetch)
5516 (uri (string-append "mirror://apache//httpcomponents/httpcore/"
5517 "source/httpcomponents-core-"
5518 version "-src.tar.gz"))
5519 (sha256
5520 (base32
5521 "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy"))))
5522 (build-system ant-build-system)
5523 (arguments
5524 `(#:jar-name "httpcomponents-httpcore.jar"
5525 #:phases
5526 (modify-phases %standard-phases
5527 (add-after 'unpack 'chdir
5528 (lambda _ (chdir "httpcore") #t)))))
5529 (inputs
5530 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
5531 ("java-commons-lang3" ,java-commons-lang3)))
5532 (native-inputs
5533 `(("java-junit" ,java-junit)
5534 ("java-mockito" ,java-mockito-1)))
5535 (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html")
5536 (synopsis "Low level HTTP transport components")
5537 (description "HttpCore is a set of low level HTTP transport components
5538that can be used to build custom client and server side HTTP services with a
5539minimal footprint. HttpCore supports two I/O models: blocking I/O model based
5540on the classic Java I/O and non-blocking, event driven I/O model based on Java
5541NIO.
5542
5543This package provides the blocking I/O model library.")
5544 (license license:asl2.0)))
5545
3a068b43
RW
5546(define-public java-httpcomponents-httpcore-nio
5547 (package (inherit java-httpcomponents-httpcore)
5548 (name "java-httpcomponents-httpcore-nio")
5549 (arguments
5550 `(#:jar-name "httpcomponents-httpcore-nio.jar"
5551 #:phases
5552 (modify-phases %standard-phases
5553 (add-after 'unpack 'chdir
5554 (lambda _ (chdir "httpcore-nio") #t)))))
5555 (inputs
5556 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5557 ("java-hamcrest-core" ,java-hamcrest-core)
5558 ,@(package-inputs java-httpcomponents-httpcore)))
5559 (description "HttpCore is a set of low level HTTP transport components
5560that can be used to build custom client and server side HTTP services with a
5561minimal footprint. HttpCore supports two I/O models: blocking I/O model based
5562on the classic Java I/O and non-blocking, event driven I/O model based on Java
5563NIO.
5564
5565This package provides the non-blocking I/O model library based on Java
5566NIO.")))
5567
e1dd78f6
RW
5568(define-public java-httpcomponents-httpcore-ab
5569 (package (inherit java-httpcomponents-httpcore)
5570 (name "java-httpcomponents-httpcore-ab")
5571 (arguments
5572 `(#:jar-name "httpcomponents-httpcore-ab.jar"
5573 #:phases
5574 (modify-phases %standard-phases
5575 (add-after 'unpack 'chdir
5576 (lambda _ (chdir "httpcore-ab") #t)))))
5577 (inputs
5578 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5579 ("java-commons-cli" ,java-commons-cli)
5580 ("java-hamcrest-core" ,java-hamcrest-core)
5581 ,@(package-inputs java-httpcomponents-httpcore)))
5582 (synopsis "Apache HttpCore benchmarking tool")
5583 (description "This package provides the HttpCore benchmarking tool. It is
5584an Apache AB clone based on HttpCore.")))
5585
14a671d8
RW
5586(define-public java-httpcomponents-httpclient
5587 (package
5588 (name "java-httpcomponents-httpclient")
5589 (version "4.5.3")
5590 (source (origin
5591 (method url-fetch)
5592 (uri (string-append "mirror://apache/httpcomponents/httpclient/"
5593 "source/httpcomponents-client-"
5594 version "-src.tar.gz"))
5595 (sha256
5596 (base32
5597 "1428399s7qy3cim5wc6f3ks4gl9nf9vkjpfmnlap3jflif7g2pj1"))))
5598 (build-system ant-build-system)
5599 (arguments
5600 `(#:jar-name "httpcomponents-httpclient.jar"
5601 #:phases
5602 (modify-phases %standard-phases
5603 (add-after 'unpack 'chdir
5604 (lambda _ (chdir "httpclient") #t)))))
5605 (inputs
5606 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
5607 ("java-commons-codec" ,java-commons-codec)
5608 ("java-hamcrest-core" ,java-hamcrest-core)
5609 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5610 ("java-mockito" ,java-mockito-1)
5611 ("java-junit" ,java-junit)))
5612 (home-page "https://hc.apache.org/httpcomponents-client-ga/")
5613 (synopsis "HTTP client library for Java")
5614 (description "Although the @code{java.net} package provides basic
5615functionality for accessing resources via HTTP, it doesn't provide the full
5616flexibility or functionality needed by many applications. @code{HttpClient}
5617seeks to fill this void by providing an efficient, up-to-date, and
5618feature-rich package implementing the client side of the most recent HTTP
5619standards and recommendations.")
5620 (license license:asl2.0)))
5621
cbce5de2
RW
5622(define-public java-httpcomponents-httpmime
5623 (package (inherit java-httpcomponents-httpclient)
5624 (name "java-httpcomponents-httpmime")
5625 (arguments
5626 `(#:jar-name "httpcomponents-httpmime.jar"
5627 #:phases
5628 (modify-phases %standard-phases
5629 (add-after 'unpack 'chdir
5630 (lambda _ (chdir "httpmime") #t)))))
5631 (inputs
5632 `(("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient)
5633 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5634 ("java-junit" ,java-junit)
5635 ("java-hamcrest-core" ,java-hamcrest-core)))))
5636
4b34c21f
RW
5637(define-public java-commons-net
5638 (package
5639 (name "java-commons-net")
5640 (version "3.6")
5641 (source (origin
5642 (method url-fetch)
5643 (uri (string-append "mirror://apache/commons/net/source/"
5644 "commons-net-" version "-src.tar.gz"))
5645 (sha256
5646 (base32
5647 "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr"))))
5648 (build-system ant-build-system)
5649 (arguments
5650 `(;; FIXME: MainTest.java tries to read "examples.properties" (which
5651 ;; should be "resources/examples/examples.properties"), but gets "null"
5652 ;; instead.
5653 #:tests? #f
5654 #:jar-name "commons-net.jar"))
5655 (native-inputs
5656 `(("java-junit" ,java-junit)
5657 ("java-hamcrest-core" ,java-hamcrest-core)))
5658 (home-page "http://commons.apache.org/net/")
5659 (synopsis "Client library for many basic Internet protocols")
5660 (description "The Apache Commons Net library implements the client side of
5661many basic Internet protocols. The purpose of the library is to provide
5662fundamental protocol access, not higher-level abstractions.")
5663 (license license:asl2.0)))
5664
808cb58f
RW
5665(define-public java-jsch
5666 (package
5667 (name "java-jsch")
1c8ba10a 5668 (version "0.1.55")
808cb58f
RW
5669 (source (origin
5670 (method url-fetch)
5671 (uri (string-append "mirror://sourceforge/jsch/jsch/"
5672 version "/jsch-" version ".zip"))
5673 (sha256
5674 (base32
1c8ba10a 5675 "1lxyjwvmwa723wcf3bqn816hkvc03vz4xhbsi7bvfhrz2rpgcfq6"))))
808cb58f
RW
5676 (build-system ant-build-system)
5677 (arguments
5678 `(#:build-target "dist"
1c8ba10a 5679 #:tests? #f ; no tests included
808cb58f
RW
5680 #:phases
5681 (modify-phases %standard-phases
5682 (replace 'install (install-jars "dist")))))
5683 (native-inputs
5684 `(("unzip" ,unzip)))
5685 (home-page "http://www.jcraft.com/jsch/")
5686 (synopsis "Pure Java implementation of SSH2")
5687 (description "JSch is a pure Java implementation of SSH2. JSch allows you
5688to connect to an SSH server and use port forwarding, X11 forwarding, file
5689transfer, etc., and you can integrate its functionality into your own Java
5690programs.")
5691 (license license:bsd-3)))
5692
a6244698
RW
5693(define-public java-commons-compress
5694 (package
5695 (name "java-commons-compress")
5696 (version "1.13")
5697 (source (origin
5698 (method url-fetch)
5699 (uri (string-append "mirror://apache/commons/compress/source/"
5700 "commons-compress-" version "-src.tar.gz"))
5701 (sha256
5702 (base32
5703 "1vjqvavrn0babffn1kciz6v52ibwq2vwhzlb95hazis3lgllnxc8"))))
5704 (build-system ant-build-system)
5705 (arguments
5706 `(#:jar-name "commons-compress.jar"
5707 #:phases
5708 (modify-phases %standard-phases
5709 (add-after 'unpack 'delete-bad-tests
5710 (lambda _
5711 (with-directory-excursion "src/test/java/org/apache/commons/compress/"
5712 ;; FIXME: These tests really should not fail. Maybe they are
5713 ;; indicative of problems with our Java packaging work.
5714
5715 ;; This test fails with a null pointer exception.
5716 (delete-file "archivers/sevenz/SevenZOutputFileTest.java")
5717 ;; This test fails to open test resources.
5718 (delete-file "archivers/zip/ExplodeSupportTest.java")
5719
5720 ;; FIXME: This test adds a dependency on powermock, which is hard to
5721 ;; package at this point.
5722 ;; https://github.com/powermock/powermock
5723 (delete-file "archivers/sevenz/SevenZNativeHeapTest.java"))
5724 #t)))))
5725 (inputs
5726 `(("java-junit" ,java-junit)
5727 ("java-hamcrest-core" ,java-hamcrest-core)
5728 ("java-mockito" ,java-mockito-1)
5729 ("java-xz" ,java-xz)))
5730 (home-page "https://commons.apache.org/proper/commons-compress/")
5731 (synopsis "Java library for working with compressed files")
5732 (description "The Apache Commons Compress library defines an API for
5733working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ,
5734Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.")
5735 (license license:asl2.0)))
5736
51263ff5
JL
5737(define-public java-commons-csv
5738 (package
5739 (name "java-commons-csv")
5740 (version "1.4")
5741 (source (origin
5742 (method url-fetch)
5743 (uri (string-append "mirror://apache/commons/csv/source/"
5744 "commons-csv-" version "-src.tar.gz"))
5745 (sha256
5746 (base32
5747 "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij"))))
5748 (build-system ant-build-system)
5749 (arguments
5750 `(#:jar-name "commons-csv.jar"
5751 #:source-dir "src/main/java"
5752 #:tests? #f)); FIXME: requires java-h2
5753 (inputs
5754 `(("java-hamcrest-core" ,java-hamcrest-core)
5755 ("java-commons-io" ,java-commons-io)
5756 ("java-commons-lang3" ,java-commons-lang3)
5757 ("junit" ,java-junit)))
5758 (home-page "https://commons.apache.org/proper/commons-csv/")
5759 (synopsis "Read and write CSV documents")
5760 (description "Commons CSV reads and writes files in variations of the Comma
5761Separated Value (CSV) format. The most common CSV formats are predefined in the
5762CSVFormat class:
5763
5764@itemize
5765@item Microsoft Excel
5766@item Informix UNLOAD
5767@item Informix UNLOAD CSV
5768@item MySQL
5769@item RFC 4180
5770@item TDF
5771@end itemize
5772
5773Custom formats can be created using a fluent style API.")
5774 (license license:asl2.0)))
5775
6ee6d0b5
RW
5776(define-public java-osgi-annotation
5777 (package
5778 (name "java-osgi-annotation")
5779 (version "6.0.0")
5780 (source (origin
5781 (method url-fetch)
5782 (uri (string-append "https://repo1.maven.org/maven2/"
5783 "org/osgi/org.osgi.annotation/" version "/"
5784 "org.osgi.annotation-" version "-sources.jar"))
5785 (sha256
5786 (base32
5787 "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w"))))
5788 (build-system ant-build-system)
5789 (arguments
5790 `(#:tests? #f ; no tests
5791 #:jar-name "osgi-annotation.jar"))
c353d014 5792 (home-page "https://www.osgi.org")
6ee6d0b5
RW
5793 (synopsis "Annotation module of OSGi framework")
5794 (description
5795 "OSGi, for Open Services Gateway initiative framework, is a module system
5796and service platform for the Java programming language. This package contains
5797the OSGi annotation module, providing additional services to help dynamic
5798components.")
5799 (license license:asl2.0)))
5800
37e2e5d4
RW
5801(define-public java-osgi-core
5802 (package
5803 (name "java-osgi-core")
5804 (version "6.0.0")
5805 (source (origin
5806 (method url-fetch)
5807 (uri (string-append "https://repo1.maven.org/maven2/"
5808 "org/osgi/org.osgi.core/" version "/"
5809 "org.osgi.core-" version "-sources.jar"))
5810 (sha256
5811 (base32
5812 "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv"))))
5813 (build-system ant-build-system)
5814 (arguments
5815 `(#:tests? #f ; no tests
5816 #:jar-name "osgi-core.jar"))
5817 (inputs
5818 `(("java-osgi-annotation" ,java-osgi-annotation)))
c353d014 5819 (home-page "https://www.osgi.org")
37e2e5d4
RW
5820 (synopsis "Core module of OSGi framework")
5821 (description
5822 "OSGi, for Open Services Gateway initiative framework, is a module system
5823and service platform for the Java programming language. This package contains
5824the OSGi Core module.")
5825 (license license:asl2.0)))
5826
8af92c8f
RW
5827(define-public java-osgi-service-event
5828 (package
5829 (name "java-osgi-service-event")
5830 (version "1.3.1")
5831 (source (origin
5832 (method url-fetch)
5833 (uri (string-append "https://repo1.maven.org/maven2/"
5834 "org/osgi/org.osgi.service.event/"
5835 version "/org.osgi.service.event-"
5836 version "-sources.jar"))
5837 (sha256
5838 (base32
5839 "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm"))))
5840 (build-system ant-build-system)
5841 (arguments
5842 `(#:tests? #f ; no tests
5843 #:jar-name "osgi-service-event.jar"))
5844 (inputs
5845 `(("java-osgi-annotation" ,java-osgi-annotation)
5846 ("java-osgi-core" ,java-osgi-core)))
c353d014 5847 (home-page "https://www.osgi.org")
8af92c8f
RW
5848 (synopsis "OSGi service event module")
5849 (description
5850 "OSGi, for Open Services Gateway initiative framework, is a module system
5851and service platform for the Java programming language. This package contains
5852the OSGi @code{org.osgi.service.event} module.")
5853 (license license:asl2.0)))
5854
674e93a0
RW
5855(define-public java-eclipse-osgi
5856 (package
5857 (name "java-eclipse-osgi")
5858 (version "3.11.3")
5859 (source (origin
5860 (method url-fetch)
5861 (uri (string-append "https://repo1.maven.org/maven2/"
5862 "org/eclipse/platform/org.eclipse.osgi/"
5863 version "/org.eclipse.osgi-"
5864 version "-sources.jar"))
5865 (sha256
5866 (base32
5867 "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b"))))
5868 (build-system ant-build-system)
5869 (arguments
5870 `(#:tests? #f ; no tests included
5871 #:jar-name "eclipse-equinox-osgi.jar"))
5872 (inputs
5873 `(("java-osgi-annotation" ,java-osgi-annotation)))
5874 (home-page "http://www.eclipse.org/equinox/")
5875 (synopsis "Eclipse Equinox OSGi framework")
5876 (description "This package provides an implementation of the OSGi Core
5877specification.")
5878 (license license:epl1.0)))
5879
81b55b1e
RW
5880(define-public java-eclipse-equinox-common
5881 (package
5882 (name "java-eclipse-equinox-common")
e40e3792 5883 (version "3.10.200")
81b55b1e
RW
5884 (source (origin
5885 (method url-fetch)
5886 (uri (string-append "https://repo1.maven.org/maven2/"
5887 "org/eclipse/platform/org.eclipse.equinox.common/"
5888 version "/org.eclipse.equinox.common-"
5889 version "-sources.jar"))
5890 (sha256
5891 (base32
e40e3792 5892 "1yn8ij6xsljlf35sr2l7wvyvc0ss4n1rv0ry5zkgb49dj4hyrqrj"))))
81b55b1e
RW
5893 (build-system ant-build-system)
5894 (arguments
5895 `(#:tests? #f ; no tests included
5896 #:jar-name "eclipse-equinox-common.jar"))
5897 (inputs
5898 `(("java-eclipse-osgi" ,java-eclipse-osgi)))
5899 (home-page "http://www.eclipse.org/equinox/")
5900 (synopsis "Common Eclipse runtime")
5901 (description "This package provides the common Eclipse runtime.")
5902 (license license:epl1.0)))
5903
90368ad9
RW
5904(define-public java-eclipse-core-jobs
5905 (package
5906 (name "java-eclipse-core-jobs")
5907 (version "3.8.0")
5908 (source (origin
5909 (method url-fetch)
5910 (uri (string-append "https://repo1.maven.org/maven2/"
5911 "org/eclipse/platform/org.eclipse.core.jobs/"
5912 version "/org.eclipse.core.jobs-"
5913 version "-sources.jar"))
5914 (sha256
5915 (base32
5916 "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b"))))
5917 (build-system ant-build-system)
5918 (arguments
5919 `(#:tests? #f ; no tests included
5920 #:jar-name "eclipse-core-jobs.jar"))
5921 (inputs
5922 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5923 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5924 (home-page "http://www.eclipse.org/equinox/")
5925 (synopsis "Eclipse jobs mechanism")
5926 (description "This package provides the Eclipse jobs mechanism.")
5927 (license license:epl1.0)))
5928
fbaf09eb
RW
5929(define-public java-eclipse-equinox-registry
5930 (package
5931 (name "java-eclipse-equinox-registry")
5932 (version "3.6.100")
5933 (source (origin
5934 (method url-fetch)
5935 (uri (string-append "https://repo1.maven.org/maven2/"
5936 "org/eclipse/platform/org.eclipse.equinox.registry/"
5937 version "/org.eclipse.equinox.registry-"
5938 version "-sources.jar"))
5939 (sha256
5940 (base32
5941 "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k"))))
5942 (build-system ant-build-system)
5943 (arguments
5944 `(#:tests? #f ; no tests included
5945 #:jar-name "eclipse-equinox-registry.jar"))
5946 (inputs
5947 `(("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5948 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5949 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5950 (home-page "http://www.eclipse.org/equinox/")
5951 (synopsis "Eclipse extension registry support")
5952 (description "This package provides support for the Eclipse extension
5953registry.")
5954 (license license:epl1.0)))
5955
65214c87
RW
5956(define-public java-eclipse-equinox-app
5957 (package
5958 (name "java-eclipse-equinox-app")
5959 (version "1.3.400")
5960 (source (origin
5961 (method url-fetch)
5962 (uri (string-append "https://repo1.maven.org/maven2/"
5963 "org/eclipse/platform/org.eclipse.equinox.app/"
5964 version "/org.eclipse.equinox.app-"
5965 version "-sources.jar"))
5966 (sha256
5967 (base32
5968 "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab"))))
5969 (build-system ant-build-system)
5970 (arguments
5971 `(#:tests? #f ; no tests included
5972 #:jar-name "eclipse-equinox-app.jar"))
5973 (inputs
5974 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5975 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5976 ("java-eclipse-osgi" ,java-eclipse-osgi)
5977 ("java-osgi-service-event" ,java-osgi-service-event)))
5978 (home-page "http://www.eclipse.org/equinox/")
5979 (synopsis "Equinox application container")
5980 (description "This package provides the Equinox application container for
5981Eclipse.")
5982 (license license:epl1.0)))
5983
3f970214
RW
5984(define-public java-eclipse-equinox-preferences
5985 (package
5986 (name "java-eclipse-equinox-preferences")
5987 (version "3.6.1")
5988 (source (origin
5989 (method url-fetch)
5990 (uri (string-append "https://repo1.maven.org/maven2/"
5991 "org/eclipse/platform/org.eclipse.equinox.preferences/"
5992 version "/org.eclipse.equinox.preferences-"
5993 version "-sources.jar"))
5994 (sha256
5995 (base32
5996 "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2"))))
5997 (build-system ant-build-system)
5998 (arguments
5999 `(#:tests? #f ; no tests included
6000 #:jar-name "eclipse-equinox-preferences.jar"))
6001 (inputs
6002 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6003 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6004 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6005 (home-page "http://www.eclipse.org/equinox/")
6006 (synopsis "Eclipse preferences mechanism")
6007 (description "This package provides the Eclipse preferences mechanism with
6008the module @code{org.eclipse.equinox.preferences}.")
6009 (license license:epl1.0)))
6010
4ad3d4f3
RW
6011(define-public java-eclipse-core-contenttype
6012 (package
6013 (name "java-eclipse-core-contenttype")
6014 (version "3.5.100")
6015 (source (origin
6016 (method url-fetch)
6017 (uri (string-append "https://repo1.maven.org/maven2/"
6018 "org/eclipse/platform/org.eclipse.core.contenttype/"
6019 version "/org.eclipse.core.contenttype-"
6020 version "-sources.jar"))
6021 (sha256
6022 (base32
6023 "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi"))))
6024 (build-system ant-build-system)
6025 (arguments
6026 `(#:tests? #f ; no tests included
6027 #:jar-name "eclipse-core-contenttype.jar"))
6028 (inputs
6029 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6030 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6031 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6032 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6033 (home-page "http://www.eclipse.org/")
6034 (synopsis "Eclipse content mechanism")
6035 (description "This package provides the Eclipse content mechanism in the
6036@code{org.eclipse.core.contenttype} module.")
6037 (license license:epl1.0)))
6038
6a7f7e49
RW
6039(define-public java-eclipse-core-runtime
6040 (package
6041 (name "java-eclipse-core-runtime")
4fa9b6e6 6042 (version "3.15.100")
6a7f7e49
RW
6043 (source (origin
6044 (method url-fetch)
6045 (uri (string-append "https://repo1.maven.org/maven2/"
6046 "org/eclipse/platform/org.eclipse.core.runtime/"
6047 version "/org.eclipse.core.runtime-"
6048 version "-sources.jar"))
6049 (sha256
6050 (base32
4fa9b6e6 6051 "0l8xayacsbjvz5hypx2fv47vpw2n4dspamcfb3hx30x9hj8vmg7r"))))
6a7f7e49
RW
6052 (build-system ant-build-system)
6053 (arguments
6054 `(#:tests? #f ; no tests included
6055 #:jar-name "eclipse-core-runtime.jar"))
6056 (inputs
6057 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6058 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6059 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
6060 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6061 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6062 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6063 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6064 (home-page "https://www.eclipse.org/")
6065 (synopsis "Eclipse core runtime")
6066 (description "This package provides the Eclipse core runtime with the
6067module @code{org.eclipse.core.runtime}.")
6068 (license license:epl1.0)))
6069
b3806a15
RW
6070(define-public java-eclipse-core-filesystem
6071 (package
6072 (name "java-eclipse-core-filesystem")
6073 (version "1.6.1")
6074 (source (origin
6075 (method url-fetch)
6076 (uri (string-append "https://repo1.maven.org/maven2/"
6077 "org/eclipse/platform/org.eclipse.core.filesystem/"
6078 version "/org.eclipse.core.filesystem-"
6079 version "-sources.jar"))
6080 (sha256
6081 (base32
6082 "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj"))))
6083 (build-system ant-build-system)
6084 (arguments
6085 `(#:tests? #f ; no tests included
6086 #:jar-name "eclipse-core-filesystem.jar"))
6087 (inputs
6088 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6089 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6090 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6091 (home-page "https://www.eclipse.org/")
6092 (synopsis "Eclipse core file system")
6093 (description "This package provides the Eclipse core file system with the
6094module @code{org.eclipse.core.filesystem}.")
6095 (license license:epl1.0)))
6096
e96060de
RW
6097(define-public java-eclipse-core-expressions
6098 (package
6099 (name "java-eclipse-core-expressions")
6100 (version "3.5.100")
6101 (source (origin
6102 (method url-fetch)
6103 (uri (string-append "https://repo1.maven.org/maven2/"
6104 "org/eclipse/platform/org.eclipse.core.expressions/"
6105 version "/org.eclipse.core.expressions-"
6106 version "-sources.jar"))
6107 (sha256
6108 (base32
6109 "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f"))))
6110 (build-system ant-build-system)
6111 (arguments
6112 `(#:tests? #f ; no tests included
6113 #:jar-name "eclipse-core-expressions.jar"))
6114 (inputs
6115 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6116 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6117 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6118 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6119 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6120 (home-page "https://www.eclipse.org/")
6121 (synopsis "Eclipse core expression language")
6122 (description "This package provides the Eclipse core expression language
6123with the @code{org.eclipse.core.expressions} module.")
6124 (license license:epl1.0)))
6125
e8d0f7c8
RW
6126(define-public java-eclipse-core-variables
6127 (package
6128 (name "java-eclipse-core-variables")
6129 (version "3.3.0")
6130 (source (origin
6131 (method url-fetch)
6132 (uri (string-append "https://repo1.maven.org/maven2/"
6133 "org/eclipse/platform/org.eclipse.core.variables/"
6134 version "/org.eclipse.core.variables-"
6135 version "-sources.jar"))
6136 (sha256
6137 (base32
6138 "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy"))))
6139 (build-system ant-build-system)
6140 (arguments
6141 `(#:tests? #f ; no tests included
6142 #:jar-name "eclipse-core-variables.jar"))
6143 (inputs
6144 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6145 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6146 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6147 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6148 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6149 (home-page "https://www.eclipse.org/platform")
6150 (synopsis "Eclipse core variables")
6151 (description "This package provides the Eclipse core variables module
6152@code{org.eclipse.core.variables}.")
6153 (license license:epl1.0)))
6154
7c3d479e
RW
6155(define-public java-eclipse-ant-core
6156 (package
6157 (name "java-eclipse-ant-core")
6158 (version "3.4.100")
6159 (source (origin
6160 (method url-fetch)
6161 (uri (string-append "https://repo1.maven.org/maven2/"
6162 "org/eclipse/platform/org.eclipse.ant.core/"
6163 version "/org.eclipse.ant.core-"
6164 version "-sources.jar"))
6165 (sha256
6166 (base32
6167 "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7"))))
6168 (build-system ant-build-system)
6169 (arguments
6170 `(#:tests? #f ; no tests included
6171 #:jar-name "eclipse-ant-core.jar"))
6172 (inputs
6173 `(("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
6174 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6175 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6176 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6177 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6178 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6179 ("java-eclipse-core-variables" ,java-eclipse-core-variables)
6180 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6181 (home-page "https://www.eclipse.org/platform")
6182 (synopsis "Ant build tool core libraries")
6183 (description "This package provides the ant build tool core libraries with
6184the module @code{org.eclipse.ant.core}.")
6185 (license license:epl1.0)))
6186
6636f638
RW
6187(define-public java-eclipse-core-resources
6188 (package
6189 (name "java-eclipse-core-resources")
c8427a5e 6190 (version "3.13.200")
6636f638
RW
6191 (source (origin
6192 (method url-fetch)
6193 (uri (string-append "https://repo1.maven.org/maven2/"
6194 "org/eclipse/platform/org.eclipse.core.resources/"
6195 version "/org.eclipse.core.resources-"
6196 version "-sources.jar"))
6197 (sha256
6198 (base32
c8427a5e 6199 "1sn3b6ky72hkvxcgf9b2jkpbdh3y8lbhi9xxwv1dsiddpkkq91hs"))))
6636f638
RW
6200 (build-system ant-build-system)
6201 (arguments
6202 `(#:tests? #f ; no tests included
6203 #:jar-name "eclipse-core-resources.jar"))
6204 (inputs
6205 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6206 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6207 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6208 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6209 ("java-eclipse-core-expressions" ,java-eclipse-core-expressions)
6210 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
6211 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6212 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6213 ("java-eclipse-ant-core" ,java-eclipse-ant-core)
6214 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6215 (home-page "https://www.eclipse.org/")
6216 (synopsis "Eclipse core resource management")
6217 (description "This package provides the Eclipse core resource management
6218module @code{org.eclipse.core.resources}.")
6219 (license license:epl1.0)))
6220
afb5858d
RW
6221(define-public java-eclipse-compare-core
6222 (package
6223 (name "java-eclipse-compare-core")
6224 (version "3.6.0")
6225 (source (origin
6226 (method url-fetch)
6227 (uri (string-append "https://repo1.maven.org/maven2/"
6228 "org/eclipse/platform/org.eclipse.compare.core/"
6229 version "/org.eclipse.compare.core-"
6230 version "-sources.jar"))
6231 (sha256
6232 (base32
6233 "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg"))))
6234 (build-system ant-build-system)
6235 (arguments
6236 `(#:tests? #f ; no tests included
6237 #:jar-name "eclipse-compare-core.jar"))
6238 (inputs
6239 `(("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6240 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6241 ("java-eclipse-osgi" ,java-eclipse-osgi)
6242 ("java-icu4j" ,java-icu4j)))
6243 (home-page "https://www.eclipse.org/")
6244 (synopsis "Eclipse core compare support")
6245 (description "This package provides the Eclipse core compare support
6246module @code{org.eclipse.compare.core}.")
6247 (license license:epl1.0)))
6248
1bb191fc
RW
6249(define-public java-eclipse-team-core
6250 (package
6251 (name "java-eclipse-team-core")
6252 (version "3.8.0")
6253 (source (origin
6254 (method url-fetch)
6255 (uri (string-append "https://repo1.maven.org/maven2/"
6256 "org/eclipse/platform/org.eclipse.team.core/"
6257 version "/org.eclipse.team.core-"
6258 version "-sources.jar"))
6259 (sha256
6260 (base32
6261 "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7"))))
6262 (build-system ant-build-system)
6263 (arguments
6264 `(#:tests? #f ; no tests included
6265 #:jar-name "eclipse-team-core.jar"))
6266 (inputs
6267 `(("java-eclipse-compare-core" ,java-eclipse-compare-core)
6268 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6269 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
6270 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6271 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
6272 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6273 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6274 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6275 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6276 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6277 (home-page "https://www.eclipse.org/platform")
6278 (synopsis "Eclipse team support core")
6279 (description "This package provides the Eclipse team support core module
6280@code{org.eclipse.team.core}.")
6281 (license license:epl1.0)))
6282
31342529
RW
6283(define-public java-eclipse-core-commands
6284 (package
6285 (name "java-eclipse-core-commands")
6286 (version "3.8.1")
6287 (source (origin
6288 (method url-fetch)
6289 (uri (string-append "https://repo1.maven.org/maven2/"
6290 "org/eclipse/platform/org.eclipse.core.commands/"
6291 version "/org.eclipse.core.commands-"
6292 version "-sources.jar"))
6293 (sha256
6294 (base32
6295 "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9"))))
6296 (build-system ant-build-system)
6297 (arguments
6298 `(#:tests? #f ; no tests included
6299 #:jar-name "eclipse-core-commands.jar"))
6300 (inputs
6301 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)))
6302 (home-page "https://www.eclipse.org/platform")
6303 (synopsis "Eclipse core commands")
6304 (description "This package provides Eclipse core commands in the module
6305@code{org.eclipse.core.commands}.")
6306 (license license:epl1.0)))
6307
bf96acf7
RW
6308(define-public java-eclipse-text
6309 (package
6310 (name "java-eclipse-text")
6311 (version "3.6.0")
6312 (source (origin
6313 (method url-fetch)
6314 (uri (string-append "https://repo1.maven.org/maven2/"
6315 "org/eclipse/platform/org.eclipse.text/"
6316 version "/org.eclipse.text-"
6317 version "-sources.jar"))
6318 (sha256
6319 (base32
6320 "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1"))))
6321 (build-system ant-build-system)
6322 (arguments
6323 `(#:tests? #f ; no tests included
6324 #:jar-name "eclipse-text.jar"
6325 #:phases
6326 (modify-phases %standard-phases
6327 ;; When creating a new category we must make sure that the new list
6328 ;; matches List<Position>. By default it seems to be too generic
6329 ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>.
6330 ;; Without this we get this error:
6331 ;;
6332 ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376:
6333 ;; error: method put in interface Map<K,V> cannot be applied to given types;
6334 ;; [javac] fPositions.put(category, new ArrayList<>());
6335 ;; [javac] ^
6336 ;; [javac] required: String,List<Position>
6337 ;; [javac] found: String,ArrayList<Object>
6338 ;; [javac] reason: actual argument ArrayList<Object> cannot be converted
6339 ;; to List<Position> by method invocation conversion
6340 ;; [javac] where K,V are type-variables:
6341 ;; [javac] K extends Object declared in interface Map
6342 ;; [javac] V extends Object declared in interface Map
6343 ;;
6344 ;; I don't know if this is a good fix. I suspect it is not, but it
6345 ;; seems to work.
6346 (add-after 'unpack 'fix-compilation-error
6347 (lambda _
6348 (substitute* "src/org/eclipse/jface/text/AbstractDocument.java"
6349 (("Positions.put\\(category, new ArrayList<>\\(\\)\\);")
6350 "Positions.put(category, new ArrayList<Position>());"))
6351 #t)))))
6352 (inputs
6353 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6354 ("java-eclipse-core-commands" ,java-eclipse-core-commands)
6355 ("java-icu4j" ,java-icu4j)))
6356 (home-page "http://www.eclipse.org/platform")
6357 (synopsis "Eclipse text library")
6358 (description "Platform Text is part of the Platform UI project and
6359provides the basic building blocks for text and text editors within Eclipse
6360and contributes the Eclipse default text editor.")
6361 (license license:epl1.0)))
6362
c24d11b7
RW
6363(define-public java-eclipse-jdt-core
6364 (package
6365 (name "java-eclipse-jdt-core")
43d6776b 6366 (version "3.16.0")
c24d11b7
RW
6367 (source (origin
6368 (method url-fetch)
6369 (uri (string-append "https://repo1.maven.org/maven2/"
6370 "org/eclipse/jdt/org.eclipse.jdt.core/"
6371 version "/org.eclipse.jdt.core-"
6372 version "-sources.jar"))
6373 (sha256
6374 (base32
43d6776b 6375 "1g560yr9v2kzv34gc2m3ifpgnj7krcdd6h4gd4z83pwqacwkfz0k"))))
c24d11b7
RW
6376 (build-system ant-build-system)
6377 (arguments
6378 `(#:tests? #f ; no tests included
84b226c2
RW
6379 #:jar-name "eclipse-jdt-core.jar"
6380 #:phases
6381 (modify-phases %standard-phases
6382 (add-after 'unpack 'move-sources
6383 (lambda _
6384 (with-directory-excursion "src/jdtCompilerAdaptersrc/"
6385 (for-each (lambda (file)
6386 (install-file file (string-append "../" (dirname file))))
6387 (find-files "." ".*")))
6388 (delete-file-recursively "src/jdtCompilerAdaptersrc/")
6389 #t))
6390 (add-before 'build 'copy-resources
6391 (lambda _
6392 (with-directory-excursion "src"
6393 (for-each (lambda (file)
6394 (install-file file (string-append "../build/classes/" (dirname file))))
6395 (find-files "." ".*.(props|properties|rsc)")))
6396 #t)))))
c24d11b7
RW
6397 (inputs
6398 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6399 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
6400 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6401 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
6402 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6403 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
6404 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6405 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6406 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6407 ("java-eclipse-osgi" ,java-eclipse-osgi)
6408 ("java-eclipse-text" ,java-eclipse-text)))
6409 (home-page "https://www.eclipse.org/jdt")
6410 (synopsis "Java development tools core libraries")
6411 (description "This package provides the core libraries of the Eclipse Java
6412development tools.")
6413 (license license:epl1.0)))
6414
74c2339f
RW
6415(define-public java-eclipse-jdt-compiler-apt
6416 (package
6417 (name "java-eclipse-jdt-compiler-apt")
6418 (version "1.3.400")
6419 (source (origin
6420 (method url-fetch)
6421 (uri (string-append "https://repo1.maven.org/maven2/"
6422 "org/eclipse/jdt/org.eclipse.jdt.compiler.apt/"
6423 version "/org.eclipse.jdt.compiler.apt-"
6424 version "-sources.jar"))
6425 (sha256
6426 (base32
6427 "1s285k9p2ixdqrknb40jbbvw682n9a7l5lqpn583a8pvlzg2l6r8"))))
6428 (build-system ant-build-system)
6429 (arguments
6430 `(#:tests? #f ; no tests included
6431 #:jar-name "eclipse-jdt-compiler-apt.jar"
6432 #:jdk ,openjdk11))
6433 (inputs
6434 `(("java-eclipse-jdt-core" ,java-eclipse-jdt-core)))
6435 (home-page "https://www.eclipse.org/jdt/apt/")
6436 (synopsis "Annotation processing tool")
6437 (description "APT stands for Annotation Processing Tool. APT provides a
6438means for generating files and compiling new Java classes based on annotations
6439found in your source code.")
6440 (license license:epl2.0)))
6441
a5cdcf6c
RW
6442(define-public java-javax-mail
6443 (package
6444 (name "java-javax-mail")
6445 (version "1.5.6")
6446 (source (origin
6447 (method url-fetch)
6448 (uri (string-append "https://repo1.maven.org/maven2/"
6449 "com/sun/mail/javax.mail/"
6450 version "/javax.mail-"
6451 version "-sources.jar"))
6452 (sha256
6453 (base32
6454 "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9"))))
6455 (build-system ant-build-system)
6456 (arguments
6457 `(#:tests? #f ; no tests
6458 #:jar-name "javax-mail.jar"))
6459 (home-page "https://javamail.java.net")
6460 (synopsis "Reference implementation of the JavaMail API")
6461 (description
6462 "This package provides versions of the JavaMail API implementation, IMAP,
6463SMTP, and POP3 service providers, some examples, and documentation for the
6464JavaMail API.")
6465 ;; GPLv2 only with "classpath exception".
6466 (license license:gpl2)))
6467
0e660c4d
RW
6468(define-public java-log4j-api
6469 (package
6470 (name "java-log4j-api")
6471 (version "2.4.1")
6472 (source (origin
6473 (method url-fetch)
6474 (uri (string-append "mirror://apache/logging/log4j/" version
6475 "/apache-log4j-" version "-src.tar.gz"))
6476 (sha256
6477 (base32
6478 "0j5p9gik0jysh37nlrckqbky12isy95cpwg2gv5fas1rcdqbraxd"))))
6479 (build-system ant-build-system)
6480 (arguments
6481 `(#:tests? #f ; tests require unpackaged software
6482 #:jar-name "log4j-api.jar"
6483 #:make-flags
6484 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
6485 "/share/java"))
6486 #:phases
6487 (modify-phases %standard-phases
6488 (add-after 'unpack 'enter-dir
6489 (lambda _ (chdir "log4j-api") #t))
6490 ;; FIXME: The tests require additional software that has not been
6491 ;; packaged yet, such as
6492 ;; * org.apache.maven
6493 ;; * org.apache.felix
6494 (add-after 'enter-dir 'delete-tests
6495 (lambda _ (delete-file-recursively "src/test") #t)))))
6496 (inputs
6497 `(("java-osgi-core" ,java-osgi-core)
6498 ("java-hamcrest-core" ,java-hamcrest-core)
6499 ("java-junit" ,java-junit)))
6500 (home-page "http://logging.apache.org/log4j/2.x/")
6501 (synopsis "API module of the Log4j logging framework for Java")
6502 (description
6503 "This package provides the API module of the Log4j logging framework for
6504Java.")
6505 (license license:asl2.0)))
6506
dfef4231
JL
6507(define-public java-log4j-core
6508 (package
6509 (inherit java-log4j-api)
6510 (name "java-log4j-core")
6511 (inputs
6512 `(("java-osgi-core" ,java-osgi-core)
6513 ("java-hamcrest-core" ,java-hamcrest-core)
6514 ("java-log4j-api" ,java-log4j-api)
6515 ("java-mail" ,java-mail)
6516 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
6517 ("java-lmax-disruptor" ,java-lmax-disruptor)
6518 ("java-kafka" ,java-kafka-clients)
6519 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
6520 ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
6521 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
6522 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
6523 ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml)
6524 ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml)
6525 ("java-commons-compress" ,java-commons-compress)
6526 ("java-commons-csv" ,java-commons-csv)
6527 ("java-jeromq" ,java-jeromq)
6528 ("java-junit" ,java-junit)))
6529 (native-inputs
6530 `(("hamcrest" ,java-hamcrest-all)
6531 ("java-commons-io" ,java-commons-io)
6532 ("java-commons-lang3" ,java-commons-lang3)
6533 ("slf4j" ,java-slf4j-api)))
6534 (arguments
6535 `(#:tests? #f ; tests require more dependencies
6536 #:test-dir "src/test"
6537 #:source-dir "src/main/java"
6538 #:jar-name "log4j-core.jar"
6539 #:jdk ,icedtea-8
6540 #:make-flags
6541 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
6542 "/share/java"))
6543 #:phases
6544 (modify-phases %standard-phases
6545 (add-after 'unpack 'enter-dir
6546 (lambda _ (chdir "log4j-core") #t)))))
6547 (synopsis "Core component of the Log4j framework")
6548 (description "This package provides the core component of the Log4j
6549logging framework for Java.")))
6550
2caf873e
JL
6551(define-public java-log4j-1.2-api
6552 (package
6553 (inherit java-log4j-api)
6554 (name "java-log4j-1.2-api")
6555 (arguments
6556 `(#:jar-name "java-log4j-1.2-api.jar"
6557 #:source-dir "log4j-1.2-api/src/main/java"
6558 #:jdk ,icedtea-8
6559 ;; Tests require maven-model (and other maven subprojects), which is a
6560 ;; cyclic dependency.
6561 #:tests? #f))
6562 (inputs
6563 `(("log4j-api" ,java-log4j-api)
6564 ("log4j-core" ,java-log4j-core)
6565 ("osgi-core" ,java-osgi-core)
6566 ("eclipse-osgi" ,java-eclipse-osgi)
6567 ("java-lmax-disruptor" ,java-lmax-disruptor)))))
6568
1c188f4e
HG
6569(define-public java-commons-cli
6570 (package
6571 (name "java-commons-cli")
37602dd8 6572 (version "1.4")
1c188f4e
HG
6573 (source (origin
6574 (method url-fetch)
6575 (uri (string-append "mirror://apache/commons/cli/source/"
6576 "commons-cli-" version "-src.tar.gz"))
6577 (sha256
6578 (base32
37602dd8 6579 "05hgi2z01fqz374y719gl1dxzqvzci5af071zm7vxrjg9vczipm1"))))
1c188f4e
HG
6580 (build-system ant-build-system)
6581 ;; TODO: javadoc
6582 (arguments
6583 `(#:jar-name "commons-cli.jar"))
6584 (native-inputs
6585 `(("java-junit" ,java-junit)
6586 ("java-hamcrest-core" ,java-hamcrest-core)))
6587 (home-page "http://commons.apache.org/cli/")
6588 (synopsis "Command line arguments and options parsing library")
6589 (description "The Apache Commons CLI library provides an API for parsing
6590command line options passed to programs. It is also able to print help
6591messages detailing the options available for a command line tool.
6592
6593Commons CLI supports different types of options:
6594
6595@itemize
6596@item POSIX like options (ie. tar -zxvf foo.tar.gz)
6597@item GNU like long options (ie. du --human-readable --max-depth=1)
6598@item Java like properties (ie. java -Djava.awt.headless=true Foo)
6599@item Short options with value attached (ie. gcc -O2 foo.c)
6600@item long options with single hyphen (ie. ant -projecthelp)
6601@end itemize
6602
6603This is a part of the Apache Commons Project.")
6604 (license license:asl2.0)))
0a8519bc
HG
6605
6606(define-public java-commons-codec
6607 (package
6608 (name "java-commons-codec")
6609 (version "1.10")
6610 (source (origin
6611 (method url-fetch)
6612 (uri (string-append "mirror://apache/commons/codec/source/"
6613 "commons-codec-" version "-src.tar.gz"))
6614 (sha256
6615 (base32
6616 "1w9qg30y4s0x8gnmr2fgj4lyplfn788jqxbcz27lf5kbr6n8xr65"))))
6617 (build-system ant-build-system)
6618 (outputs '("out" "doc"))
6619 (arguments
6620 `(#:test-target "test"
6621 #:make-flags
6622 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
6623 (junit (assoc-ref %build-inputs "java-junit")))
6624 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
6625 (string-append "-Dhamcrest.jar=" hamcrest
6626 "/share/java/hamcrest-core.jar")
6627 ;; Do not append version to jar.
6628 "-Dfinal.name=commons-codec"))
6629 #:phases
6630 (modify-phases %standard-phases
6631 (add-after 'build 'build-javadoc ant-build-javadoc)
6632 (replace 'install (install-jars "dist"))
6633 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
6634 (native-inputs
6635 `(("java-junit" ,java-junit)
6636 ("java-hamcrest-core" ,java-hamcrest-core)))
6637 (home-page "http://commons.apache.org/codec/")
6638 (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs")
6639 (description "The codec package contains simple encoder and decoders for
6640various formats such as Base64 and Hexadecimal. In addition to these widely
6641used encoders and decoders, the codec package also maintains a collection of
6642phonetic encoding utilities.
6643
6644This is a part of the Apache Commons Project.")
6645 (license license:asl2.0)))
7d91c1b9
HG
6646
6647(define-public java-commons-daemon
6648 (package
6649 (name "java-commons-daemon")
b503ae3d 6650 (version "1.1.0")
7d91c1b9
HG
6651 (source (origin
6652 (method url-fetch)
6653 (uri (string-append "mirror://apache/commons/daemon/source/"
6654 "commons-daemon-" version "-src.tar.gz"))
6655 (sha256
6656 (base32
b503ae3d 6657 "141gkhfzv5v3pdhic6y4ardq2dhsa3v36j8wmmhy6f8mac48fp7n"))))
7d91c1b9
HG
6658 (build-system ant-build-system)
6659 (arguments
6660 `(#:test-target "test"
6661 #:phases
6662 (modify-phases %standard-phases
6663 (add-after 'build 'build-javadoc ant-build-javadoc)
6664 (replace 'install (install-jars "dist"))
6665 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
6666 (native-inputs
6667 `(("java-junit" ,java-junit)))
6668 (home-page "http://commons.apache.org/daemon/")
6669 (synopsis "Library to launch Java applications as daemons")
6670 (description "The Daemon package from Apache Commons can be used to
6671implement Java applications which can be launched as daemons. For example the
6672program will be notified about a shutdown so that it can perform cleanup tasks
6673before its process of execution is destroyed by the operation system.
6674
6675This package contains the Java library. You will also need the actual binary
6676for your architecture which is provided by the jsvc package.
6677
6678This is a part of the Apache Commons Project.")
6679 (license license:asl2.0)))
9f68e74a 6680
eb270ecf
RW
6681(define-public java-javaewah
6682 (package
6683 (name "java-javaewah")
6684 (version "1.1.6")
6685 (source (origin
6686 (method url-fetch)
6687 (uri (string-append "https://github.com/lemire/javaewah/"
6688 "archive/JavaEWAH-" version ".tar.gz"))
6689 (sha256
6690 (base32
6691 "1n7j1r1h24wlhwv9zdcj6yqjrhma2ixwyzm15l5vrv6yqjs6753b"))))
6692 (build-system ant-build-system)
6693 (arguments `(#:jar-name "javaewah.jar"))
6694 (inputs
6695 `(("java-junit" ,java-junit)
6696 ("java-hamcrest-core" ,java-hamcrest-core)))
6697 (home-page "https://github.com/lemire/javaewah")
6698 (synopsis "Compressed alternative to the Java @code{BitSet} class")
6699 (description "This is a word-aligned compressed variant of the Java
6700@code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like
6701compression scheme. It can be used to implement bitmap indexes.
6702
6703The goal of word-aligned compression is not to achieve the best compression,
6704but rather to improve query processing time. Hence, JavaEWAH tries to save CPU
6705cycles, maybe at the expense of storage. However, the EWAH scheme is always
6706more efficient storage-wise than an uncompressed bitmap (as implemented in the
6707@code{BitSet} class by Sun).")
6708 ;; GPL2.0 derivates are explicitly allowed.
6709 (license license:asl2.0)))
6710
f8e4d022
RW
6711(define-public java-slf4j-api
6712 (package
6713 (name "java-slf4j-api")
6714 (version "1.7.25")
6715 (source (origin
6716 (method url-fetch)
6717 (uri (string-append "https://www.slf4j.org/dist/slf4j-"
6718 version ".tar.gz"))
6719 (sha256
6720 (base32
6721 "13j51sgzmhhdrfa74gkal5zpip7r1440dh7zsi2c8bpb2zs1v8kb"))
6722 (modules '((guix build utils)))
6723 ;; Delete bundled jars.
6724 (snippet
6725 '(begin
6726 (for-each delete-file (find-files "." "\\.jar$"))
6727 #t))))
6728 (build-system ant-build-system)
6729 (arguments
dcf7a8a6 6730 `(#:jar-name "slf4j-api.jar"
f8e4d022 6731 #:source-dir "slf4j-api/src/main"
dcf7a8a6
JL
6732 #:test-dir "slf4j-api/src/test"
6733 #:phases
6734 (modify-phases %standard-phases
6735 (add-after 'build 'regenerate-jar
6736 (lambda _
6737 ;; pom.xml ignores these files in the jar creation process. If we don't,
6738 ;; we get the error "This code should have never made it into slf4j-api.jar"
6739 (delete-file-recursively "build/classes/org/slf4j/impl")
2c8ac364
MW
6740 (invoke "jar" "-cf" "build/jar/slf4j-api.jar" "-C"
6741 "build/classes" ".")))
dcf7a8a6
JL
6742 (add-before 'check 'dont-test-abstract-classes
6743 (lambda _
6744 ;; abstract classes are not meant to be run with junit
6745 (substitute* "build.xml"
6746 (("<include name=\"\\*\\*/\\*Test.java\" />")
6747 (string-append "<include name=\"**/*Test.java\" />"
6748 "<exclude name=\"**/MultithreadedInitializationTest"
2c8ac364
MW
6749 ".java\" />")))
6750 #t)))))
f8e4d022
RW
6751 (inputs
6752 `(("java-junit" ,java-junit)
6753 ("java-hamcrest-core" ,java-hamcrest-core)))
6754 (home-page "https://www.slf4j.org/")
6755 (synopsis "Simple logging facade for Java")
6756 (description "The Simple Logging Facade for Java (SLF4J) serves as a
6757simple facade or abstraction for various logging
6758frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j})
6759allowing the end user to plug in the desired logging framework at deployment
6760time.")
6761 (license license:expat)))
6762
6d047cc4
GB
6763(define java-slf4j-api-bootstrap
6764 (package
6765 (inherit java-slf4j-api)
6766 (name "java-slf4j-api-bootstrap")
6767 (inputs `())
6768 (arguments
6769 (substitute-keyword-arguments (package-arguments java-slf4j-api)
6770 ((#:tests? _ #f) #f)))))
6771
88f256a1
TD
6772(define-public java-slf4j-simple
6773 (package
6774 (name "java-slf4j-simple")
6775 (version "1.7.25")
6776 (source (package-source java-slf4j-api))
6777 (build-system ant-build-system)
6778 (arguments
6779 `(#:jar-name "slf4j-simple.jar"
6780 #:source-dir "slf4j-simple/src/main"
6781 #:test-dir "slf4j-simple/src/test"
6782 #:phases
6783 (modify-phases %standard-phases
6784 ;; The tests need some test classes from slf4j-api
6785 (add-before 'check 'build-slf4j-api-test-helpers
6786 (lambda _
6787 ;; Add current dir to CLASSPATH ...
6788 (setenv "CLASSPATH"
6789 (string-append (getcwd) ":" (getenv "CLASSPATH")))
6790 ;; ... and build test helper classes here:
2c8ac364
MW
6791 (apply invoke
6792 `("javac" "-d" "."
6793 ,@(find-files "slf4j-api/src/test" ".*\\.java"))))))))
88f256a1
TD
6794 (inputs
6795 `(("java-junit" ,java-junit)
6796 ("java-hamcrest-core" ,java-hamcrest-core)
6797 ("java-slf4j-api" ,java-slf4j-api)))
6798 (home-page "https://www.slf4j.org/")
6799 (synopsis "Simple implementation of simple logging facade for Java")
6800 (description "SLF4J binding for the Simple implementation, which outputs
6801all events to System.err. Only messages of level INFO and higher are
6802printed.")
6803 (license license:expat)))
6804
9f68e74a
JL
6805(define-public antlr2
6806 (package
6807 (name "antlr2")
6808 (version "2.7.7")
6809 (source (origin
6810 (method url-fetch)
7420c1ee 6811 (uri (string-append "https://www.antlr2.org/download/antlr-"
9f68e74a
JL
6812 version ".tar.gz"))
6813 (sha256
6814 (base32
6815 "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5"))
6816 (modules '((guix build utils)))
6817 (snippet
6818 '(begin
6819 (delete-file "antlr.jar")
6820 (substitute* "lib/cpp/antlr/CharScanner.hpp"
6821 (("#include <map>")
6822 (string-append
6d225e89
RW
6823 "#include <map>\n"
6824 "#define EOF (-1)\n"
6825 "#include <strings.h>")))
9f68e74a 6826 (substitute* "configure"
6d225e89
RW
6827 (("/bin/sh") "sh"))
6828 #t))))
9f68e74a
JL
6829 (build-system gnu-build-system)
6830 (arguments
6d225e89 6831 `(#:tests? #f ; no test target
3ad90395
RW
6832 #:imported-modules ((guix build ant-build-system)
6833 (guix build syscalls)
6834 ,@%gnu-build-system-modules)
6835 #:modules (((guix build ant-build-system) #:prefix ant:)
6836 (guix build gnu-build-system)
6837 (guix build utils))
9f68e74a
JL
6838 #:phases
6839 (modify-phases %standard-phases
6840 (add-after 'install 'strip-jar-timestamps
3ad90395 6841 (assoc-ref ant:%standard-phases 'strip-jar-timestamps))
79f6fc0d
JL
6842 (add-before 'configure 'fix-timestamp
6843 (lambda _
6844 (substitute* "configure"
6845 (("^TIMESTAMP.*") "TIMESTAMP=19700101\n"))
6846 #t))
9f68e74a
JL
6847 (add-after 'configure 'fix-bin-ls
6848 (lambda _
3ad90395
RW
6849 (substitute* (find-files "." "Makefile")
6850 (("/bin/ls") "ls"))
6851 #t)))))
9f68e74a
JL
6852 (native-inputs
6853 `(("which" ,which)
6854 ("zip" ,zip)
6855 ("java" ,icedtea "jdk")))
6856 (inputs
6857 `(("java" ,icedtea)))
7420c1ee 6858 (home-page "https://www.antlr2.org")
9f68e74a
JL
6859 (synopsis "Framework for constructing recognizers, compilers, and translators")
6860 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
6861is a language tool that provides a framework for constructing recognizers,
6862compilers, and translators from grammatical descriptions containing Java, C#,
6863C++, or Python actions. ANTLR provides excellent support for tree construction,
6864tree walking, and translation.")
6865 (license license:public-domain)))
a0f15eff 6866
e44112e1 6867(define-public java-stringtemplate-3
a0f15eff 6868 (package
e44112e1 6869 (name "java-stringtemplate")
a0f15eff
JL
6870 (version "3.2.1")
6871 (source (origin
6872 (method url-fetch)
6873 (uri (string-append "https://github.com/antlr/website-st4/raw/"
6874 "gh-pages/download/stringtemplate-"
6875 version ".tar.gz"))
6876 (sha256
6877 (base32
6878 "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is"))))
6879 (build-system ant-build-system)
6880 (arguments
129d926d 6881 `(#:jar-name (string-append ,name "-" ,version ".jar")
2fcda6d2 6882 #:test-dir "test"
b101b4e8
RW
6883 #:modules ((guix build ant-build-system)
6884 (guix build utils)
6885 (srfi srfi-1))
a0f15eff
JL
6886 #:phases
6887 (modify-phases %standard-phases
2fcda6d2
RW
6888 (add-before 'check 'fix-tests
6889 (lambda _
6890 (substitute* "build.xml"
6891 (("\\$\\{test.home\\}/java")
6892 "${test.home}/org"))
6893 #t))
a0f15eff
JL
6894 (add-before 'build 'generate-grammar
6895 (lambda _
b101b4e8 6896 (with-directory-excursion "src/org/antlr/stringtemplate/language/"
2c8ac364
MW
6897 (for-each (lambda (file)
6898 (format #t "~a\n" file)
6899 (invoke "antlr" file))
6900 '("template.g" "angle.bracket.template.g" "action.g"
6901 "eval.g" "group.g" "interface.g")))
6902 #t)))))
a0f15eff 6903 (native-inputs
2fcda6d2
RW
6904 `(("antlr" ,antlr2)
6905 ("java-junit" ,java-junit)))
a0f15eff
JL
6906 (home-page "http://www.stringtemplate.org")
6907 (synopsis "Template engine to generate formatted text output")
6908 (description "StringTemplate is a java template engine (with ports for C#,
6909Objective-C, JavaScript, Scala) for generating source code, web pages, emails,
6910or any other formatted text output. StringTemplate is particularly good at
6911code generators, multiple site skins, and internationalization / localization.
6912StringTemplate also powers ANTLR.")
6913 (license license:bsd-3)))
4ad8aed7
JL
6914
6915;; antlr3 is partially written using antlr3 grammar files. It also depends on
6916;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar
6917;; files and uses antlr3 at runtime. The latest version requires a recent version
6918;; of antlr3 at runtime.
6919;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3.
6920;; This version of ST4 is sufficient for the latest antlr3.
6921;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build
6922;; the latest ST4 with it. Then we build our final antlr3 that will be linked
6923;; against the latest ST4.
6924;; antlr3.3 still depends on antlr3 to generate some files, so we use an
6925;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses
6926;; only grammar files with the antlr2 syntax.
6927;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3.
6928
64b7efc0 6929(define-public java-stringtemplate
407df789 6930 (package (inherit java-stringtemplate-3)
64b7efc0 6931 (name "java-stringtemplate")
4ad8aed7
JL
6932 (version "4.0.8")
6933 (source (origin
6934 (method url-fetch)
6935 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/"
6936 version ".tar.gz"))
6937 (file-name (string-append name "-" version ".tar.gz"))
6938 (sha256
6939 (base32
6940 "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087"))))
6941 (build-system ant-build-system)
6942 (arguments
6db77c7c
RW
6943 `(#:jar-name (string-append ,name "-" ,version ".jar")
6944 #:tests? #f ; FIXME: tests fail for unknown reasons
6945 #:test-dir "test"
f4aa4cfe
RW
6946 #:modules ((guix build ant-build-system)
6947 (guix build utils)
6948 (srfi srfi-1))
4ad8aed7
JL
6949 #:phases
6950 (modify-phases %standard-phases
6db77c7c
RW
6951 (add-before 'check 'fix-test-target
6952 (lambda _
6953 (substitute* "build.xml"
6954 (("\\$\\{test.home\\}/java") "${test.home}/")
6955 (("\\*Test.java") "Test*.java"))
6956 #t))
4ad8aed7 6957 (add-before 'build 'generate-grammar
f4aa4cfe
RW
6958 (lambda _
6959 (with-directory-excursion "src/org/stringtemplate/v4/compiler/"
2c8ac364
MW
6960 (for-each (lambda (file)
6961 (format #t "~a\n" file)
6962 (invoke "antlr3" file))
6963 '("STParser.g" "Group.g" "CodeGenerator.g")))
6964 #t)))))
4ad8aed7
JL
6965 (inputs
6966 `(("antlr3" ,antlr3-bootstrap)
6967 ("antlr2" ,antlr2)
6db77c7c
RW
6968 ("java-stringtemplate" ,java-stringtemplate-3)
6969 ("java-junit" ,java-junit)))))
4ad8aed7 6970
1345eeb0 6971(define java-stringtemplate-4.0.6
64b7efc0 6972 (package (inherit java-stringtemplate)
1345eeb0 6973 (name "java-stringtemplate")
4ad8aed7
JL
6974 (version "4.0.6")
6975 (source (origin
6976 (method url-fetch)
6977 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-"
6978 version ".tar.gz"))
6979 (file-name (string-append name "-" version ".tar.gz"))
6980 (sha256
6981 (base32
6982 "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp"))))
6983 (inputs
6984 `(("antlr3" ,antlr3-3.3)
6985 ("antlr2" ,antlr2)
e44112e1 6986 ("java-stringtemplate" ,java-stringtemplate-3)))))
4ad8aed7
JL
6987
6988(define-public antlr3
6989 (package
6990 (name "antlr3")
6991 (version "3.5.2")
6992 (source (origin
6993 (method url-fetch)
6994 (uri (string-append "https://github.com/antlr/antlr3/archive/"
6995 version ".tar.gz"))
6996 (file-name (string-append name "-" version ".tar.gz"))
6997 (sha256
6998 (base32
fd75eb6c 6999 "0218v683081lg54z9hvjxinhxd4dqp870jx6n39gslm0bkyi4vd6"))))
4ad8aed7
JL
7000 (build-system ant-build-system)
7001 (arguments
7002 `(#:jar-name (string-append ,name "-" ,version ".jar")
7003 #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3"
7004 #:tests? #f
7005 #:phases
7006 (modify-phases %standard-phases
7007 (add-after 'install 'bin-install
7008 (lambda* (#:key inputs outputs #:allow-other-keys)
7009 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
7010 (bin (string-append (assoc-ref outputs "out") "/bin")))
7011 (mkdir-p bin)
7012 (with-output-to-file (string-append bin "/antlr3")
7013 (lambda _
7014 (display
7015 (string-append "#!" (which "sh") "\n"
7016 "java -cp " jar "/" ,name "-" ,version ".jar:"
7017 (string-concatenate
7018 (find-files (assoc-ref inputs "stringtemplate")
7019 ".*\\.jar"))
7020 ":"
7021 (string-concatenate
7022 (find-files (assoc-ref inputs "stringtemplate4")
7023 ".*\\.jar"))
7024 ":"
7025 (string-concatenate
7026 (find-files (string-append
7027 (assoc-ref inputs "antlr")
7028 "/lib")
7029 ".*\\.jar"))
7030 " org.antlr.Tool $*"))))
2c8ac364
MW
7031 (chmod (string-append bin "/antlr3") #o755))
7032 #t))
4ad8aed7
JL
7033 (add-before 'build 'generate-grammar
7034 (lambda _
7035 (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/")
7036 (for-each (lambda (file)
7037 (display file)
7038 (newline)
2c8ac364 7039 (invoke "antlr3" file))
4ad8aed7
JL
7040 '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g"
7041 "AssignTokenTypesWalker.g"
7042 "ActionTranslator.g" "TreeToNFAConverter.g"
7043 "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g"
7044 "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g"))
7045 (substitute* "ANTLRParser.java"
7046 (("public Object getTree") "public GrammarAST getTree"))
7047 (substitute* "ANTLRv3Parser.java"
7048 (("public Object getTree") "public CommonTree getTree"))
7049 (chdir "../../../../../java")
4ad8aed7
JL
7050 (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java"
7051 (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*;
7052import org.antlr.grammar.v3.ANTLRTreePrinter;"))
7053 (substitute* "org/antlr/tool/ErrorManager.java"
7054 (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") ""))
2c8ac364
MW
7055 (chdir "../../../..")
7056 #t))
4ad8aed7
JL
7057 (add-before 'build 'fix-build-xml
7058 (lambda _
7059 (substitute* "build.xml"
570f3b63
JL
7060 (("target name=\"compile\">")
7061 "target name=\"compile\">
7062<copy todir=\"${classes.dir}\">
4ad8aed7
JL
7063<fileset dir=\"tool/src/main/resources\">
7064<include name=\"**/*.stg\"/>
7065<include name=\"**/*.st\"/>
7066<include name=\"**/*.sti\"/>
7067<include name=\"**/STLexer.tokens\"/>
7068</fileset>
570f3b63 7069</copy>"))
2c8ac364 7070 #t)))))
4ad8aed7
JL
7071 (native-inputs
7072 `(("antlr" ,antlr2)
7073 ("antlr3" ,antlr3-bootstrap)))
7074 (inputs
7075 `(("junit" ,java-junit)
e44112e1 7076 ("stringtemplate" ,java-stringtemplate-3)
64b7efc0 7077 ("stringtemplate4" ,java-stringtemplate)))
4ad8aed7 7078 (propagated-inputs
e44112e1 7079 `(("stringtemplate" ,java-stringtemplate-3)
4ad8aed7 7080 ("antlr" ,antlr2)
1345eeb0 7081 ("stringtemplate4" ,java-stringtemplate-4.0.6)))
a264250b 7082 (home-page "https://www.antlr3.org")
4ad8aed7
JL
7083 (synopsis "Framework for constructing recognizers, compilers, and translators")
7084 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
7085is a language tool that provides a framework for constructing recognizers,
7086compilers, and translators from grammatical descriptions containing Java, C#,
7087C++, or Python actions. ANTLR provides excellent support for tree construction,
7088tree walking, and translation.")
7089 (license license:bsd-3)))
7090
7091(define antlr3-bootstrap
7092 (package
7093 (inherit antlr3)
7094 (name "antlr3-bootstrap")
7095 (native-inputs
7096 `(("antlr" ,antlr2)
7097 ("antlr3" ,antlr3-3.3)))
7098 (inputs
7099 `(("junit" ,java-junit)))))
7100
7101(define antlr3-3.3
7102 (package
7103 (inherit antlr3)
7104 (name "antlr3")
7105 (version "3.3")
7106 (source (origin
7107 (method url-fetch)
7108 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
7109 "gh-pages/download/antlr-"
7110 version ".tar.gz"))
7111 (sha256
7112 (base32
48c86220
GB
7113 "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m"))
7114 (patches
7115 (search-patches "antlr3-3_3-fix-java8-compilation.patch"))))
4ad8aed7
JL
7116 (arguments
7117 `(#:jar-name (string-append ,name "-" ,version ".jar")
a9540107
RW
7118 #:source-dir (string-join '("tool/src/main/java"
7119 "runtime/Java/src/main/java"
7120 "tool/src/main/antlr2"
7121 "tool/src/main/antlr3")
7122 ":")
7123 #:tests? #f ; FIXME: tests seem to require maven plugin
7124 #:modules ((guix build ant-build-system)
7125 (guix build utils)
7126 (srfi srfi-1))
4ad8aed7
JL
7127 #:phases
7128 (modify-phases %standard-phases
7129 (add-after 'install 'bin-install
7130 (lambda* (#:key inputs outputs #:allow-other-keys)
a9540107
RW
7131 (let* ((out (assoc-ref outputs "out"))
7132 (jar (string-append out "/share/java"))
7133 (bin (string-append out "/bin")))
4ad8aed7
JL
7134 (mkdir-p bin)
7135 (with-output-to-file (string-append bin "/antlr3")
7136 (lambda _
7137 (display
a9540107
RW
7138 (string-append
7139 "#!" (which "sh") "\n"
7140 "java -cp " jar "/antlr3-3.3.jar:"
7141 (string-join
7142 (append (find-files (assoc-ref inputs "java-stringtemplate")
7143 ".*\\.jar$")
7144 (find-files (string-append (assoc-ref inputs "antlr")
7145 "/lib")
7146 ".*\\.jar$"))
7147 ":")
7148 " org.antlr.Tool $*"))))
7149 (chmod (string-append bin "/antlr3") #o755)
7150 #t)))
4ad8aed7
JL
7151 (add-before 'build 'generate-grammar
7152 (lambda _
4ad8aed7
JL
7153 (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java"
7154 (("import org.antlr.grammar.v2.\\*;")
7155 "import org.antlr.grammar.v2.*;\n
7156import org.antlr.grammar.v2.TreeToNFAConverter;\n
7157import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n
a9540107 7158import org.antlr.grammar.v2.ANTLRTreePrinter;"))
2c8ac364
MW
7159 (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/"
7160 (for-each (lambda (file)
7161 (format #t "~a\n" file)
7162 (invoke "antlr" file))
7163 '("antlr.g" "antlr.print.g" "assign.types.g"
7164 "buildnfa.g" "codegen.g" "define.g")))
7165 (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/"
7166 (for-each (lambda (file)
7167 (format #t "~a\n" file)
7168 (invoke "antlr3" file))
7169 '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g"
7170 "ANTLRv3Tree.g")))
7171 #t))
4ad8aed7
JL
7172 (add-before 'build 'fix-build-xml
7173 (lambda _
7174 (substitute* "build.xml"
570f3b63
JL
7175 (("target name=\"compile\">")
7176 "target name=\"compile\">
7177<copy todir=\"${classes.dir}\">
4ad8aed7
JL
7178<fileset dir=\"tool/src/main/resources\">
7179<include name=\"**/*.stg\"/>
7180<include name=\"**/*.st\"/>
7181<include name=\"**/*.sti\"/>
7182<include name=\"**/STLexer.tokens\"/>
7183</fileset>
570f3b63 7184</copy>"))
a9540107 7185 #t)))))
4ad8aed7
JL
7186 (native-inputs
7187 `(("antlr" ,antlr2)
7188 ("antlr3" ,antlr3-3.1)))
7189 (inputs
7190 `(("junit" ,java-junit)))
7191 (propagated-inputs
e44112e1 7192 `(("java-stringtemplate" ,java-stringtemplate-3)
4ad8aed7
JL
7193 ("antlr" ,antlr2)
7194 ("antlr3" ,antlr3-3.1)))))
7195
570f3b63 7196(define-public antlr3-3.1
4ad8aed7
JL
7197 (package
7198 (inherit antlr3)
4ad8aed7
JL
7199 (version "3.1")
7200 (source (origin
7201 (method url-fetch)
7202 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
7203 "gh-pages/download/antlr-"
7204 version ".tar.gz"))
7205 (sha256
7206 (base32
4c763b4d
GB
7207 "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z"))
7208 (patches
7209 (search-patches "antlr3-3_1-fix-java8-compilation.patch"))))
4ad8aed7 7210 (arguments
ec32bc98 7211 `(#:jar-name (string-append "antlr3-" ,version ".jar")
4ad8aed7
JL
7212 #:source-dir "src:runtime/Java/src"
7213 #:tests? #f
7214 #:phases
7215 (modify-phases %standard-phases
7216 (add-after 'install 'bin-install
7217 (lambda* (#:key inputs outputs #:allow-other-keys)
7218 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
7219 (bin (string-append (assoc-ref outputs "out") "/bin")))
7220 (mkdir-p bin)
7221 (with-output-to-file (string-append bin "/antlr3")
7222 (lambda _
7223 (display
7224 (string-append "#!" (which "sh") "\n"
57e37764 7225 "java -cp " jar "/antlr3-3.1.jar:"
4ad8aed7
JL
7226 (string-concatenate
7227 (find-files (assoc-ref inputs "stringtemplate")
7228 ".*\\.jar"))
7229 ":"
7230 (string-concatenate
7231 (find-files (string-append
7232 (assoc-ref inputs "antlr")
7233 "/lib")
7234 ".*\\.jar"))
7235 " org.antlr.Tool $*"))))
2c8ac364
MW
7236 (chmod (string-append bin "/antlr3") #o755))
7237 #t))
4ad8aed7
JL
7238 (add-before 'build 'generate-grammar
7239 (lambda _
7240 (let ((dir "src/org/antlr/tool/"))
7241 (for-each (lambda (file)
7242 (display file)
7243 (newline)
13f38d31 7244 (invoke "antlr" "-o" dir (string-append dir file)))
4ad8aed7
JL
7245 '("antlr.g" "antlr.print.g" "assign.types.g"
7246 "buildnfa.g" "define.g")))
7247 (format #t "codegen.g\n")
13f38d31
RW
7248 (invoke "antlr" "-o" "src/org/antlr/codegen"
7249 "src/org/antlr/codegen/codegen.g")
7250 #t))
4ad8aed7
JL
7251 (add-before 'build 'fix-build-xml
7252 (lambda _
7253 (substitute* "build.xml"
570f3b63
JL
7254 (("target name=\"compile\">")
7255 "target name=\"compile\">
7256<copy todir=\"${classes.dir}\">
4ad8aed7
JL
7257<fileset dir=\"src\">
7258<include name=\"**/*.stg\"/>
7259<include name=\"**/*.st\"/>
7260<include name=\"**/*.sti\"/>
7261<include name=\"**/STLexer.tokens\"/>
7262</fileset>
570f3b63 7263</copy>"))
2c8ac364 7264 #t)))))
4ad8aed7
JL
7265 (native-inputs
7266 `(("antlr" ,antlr2)))
7267 (inputs
7268 `(("junit" ,java-junit)))
7269 (propagated-inputs
e44112e1 7270 `(("stringtemplate" ,java-stringtemplate-3)))))
d44bcd7a 7271
742242a5
GB
7272(define-public java-commons-cli-1.2
7273 ;; This is a bootstrap dependency for Maven2.
7274 (package
7275 (inherit java-commons-cli)
7276 (version "1.2")
7277 (source (origin
7278 (method url-fetch)
7279 (uri (string-append "mirror://apache/commons/cli/source/"
7280 "commons-cli-" version "-src.tar.gz"))
7281 (sha256
7282 (base32
7283 "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm"))))
7284 (arguments
7285 `(#:jar-name "commons-cli.jar"
7286 #:phases
7287 (modify-phases %standard-phases
7288 (add-before 'check 'fix-build-xml
7289 (lambda* (#:key inputs #:allow-other-keys)
7290 (substitute* "build.xml"
7291 (("dir=\"\\$\\{test.home\\}/java\"")
7292 "dir=\"${test.home}\""))
7293 #t)))))
7294 (native-inputs
7295 `(("java-junit" ,java-junit)))))
30deadee
JL
7296
7297(define-public java-microemulator-cldc
7298 (package
7299 (name "java-microemulator-cldc")
7300 (version "2.0.4")
7301 (source (origin
7302 (method url-fetch)
7303 (uri (string-append "https://github.com/barteo/microemu/archive/"
7304 "microemulator_"
7305 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
7306 version)
7307 ".tar.gz"))
7308 (file-name (string-append name "-" version ".tar.gz"))
7309 (sha256
7310 (base32
7311 "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll"))))
7312 (build-system ant-build-system)
7313 (arguments
7314 `(#:jar-name "microemulator-cldc.jar"
7315 #:source-dir "microemu-cldc/src/main/java"
7316 #:tests? #f)); Requires even older software
7317 (home-page "https://github.com/barteo/microemu")
7318 (synopsis "J2ME CLDC emulator")
7319 (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP
7320Emulator. It allows to demonstrate MIDlet based applications in web browser
7321applet and can be run as a standalone java application.")
7322 (license (list license:asl2.0
7323 ;; or altenatively:
7324 license:lgpl2.1+))))
8e2f3e5e
JL
7325
7326(define-public java-datanucleus-javax-persistence
7327 (package
7328 (name "java-datanucleus-javax-persistence")
7329 (version "2.2.0")
7330 (source (origin
7331 (method url-fetch)
7332 (uri (string-append "https://github.com/datanucleus/"
7333 "javax.persistence/archive/javax.persistence-"
7334 version "-release.tar.gz"))
7335 (sha256
7336 (base32
7337 "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx"))))
7338 (build-system ant-build-system)
7339 (arguments
7340 `(#:jar-name "java-datanucleus-javax-persistence.jar"
7341 #:jdk ,icedtea-8
7342 #:source-dir "src/main/java"
7343 #:tests? #f)); no tests
7344 (home-page "https://github.com/datanucleus/javax.persistence")
7345 (synopsis "JPA API")
7346 (description "This package contains a clean definition of JPA API intended
7347for use with DataNucleus JPA since the JCP haven't provided an official JPA API
7348jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification
7349used to generate this API.")
7350 (license (list license:edl1.0 license:epl1.0))))
3240ddbf
JL
7351
7352(define-public java-osgi-cmpn
7353 (package
7354 (name "java-osgi-cmpn")
7355 (version "6.0.0")
7356 (source (origin
7357 (method url-fetch)
7358 (uri (string-append "http://central.maven.org/maven2/"
7359 "org/osgi/osgi.cmpn/" version "/osgi.cmpn-"
7360 version "-sources.jar"))
7361 (sha256
7362 (base32
7363 "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys"))))
7364 (build-system ant-build-system)
7365 (arguments
7366 `(#:jar-name "osgi-cmpn.jar"
7367 #:tests? #f)); no tests
7368 (inputs
7369 `(("annotation" ,java-osgi-annotation)
7370 ("core" ,java-osgi-core)
7371 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
7372 ("microemulator" ,java-microemulator-cldc)
7373 ("servlet" ,java-classpathx-servletapi)))
c353d014 7374 (home-page "https://www.osgi.org")
3240ddbf
JL
7375 (synopsis "Compendium specification module of OSGi framework")
7376 (description
7377 "OSGi, for Open Services Gateway initiative framework, is a module system
7378and service platform for the Java programming language. This package contains
7379the compendium specification module, providing interfaces and classes for use
7380in compiling bundles.")
7381 (license license:asl2.0)))
747c7574
JL
7382
7383(define-public java-osgi-service-component-annotations
7384 (package
7385 (name "java-osgi-service-component-annotations")
7386 (version "1.3.0")
7387 (source (origin
7388 (method url-fetch)
7389 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7390 "org.osgi.service.component.annotations/"
7391 version "/org.osgi.service.component.annotations-"
7392 version "-sources.jar"))
7393 (sha256
7394 (base32
7395 "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0"))))
7396 (build-system ant-build-system)
7397 (arguments
7398 `(#:jar-name "osgi-service-component-annotations.jar"
7399 #:tests? #f)); no tests
7400 (inputs
7401 `(("annotation" ,java-osgi-annotation)))
c353d014 7402 (home-page "https://www.osgi.org")
747c7574
JL
7403 (synopsis "Support annotations for osgi-service-component")
7404 (description
7405 "OSGi, for Open Services Gateway initiative framework, is a module system
7406and service platform for the Java programming language. This package contains
7407the support annotations for osgi-service-component.")
7408 (license license:asl2.0)))
999b5fb4
JL
7409
7410(define-public java-osgi-dto
7411 (package
7412 (name "java-osgi-dto")
7413 (version "1.0.0")
7414 (source (origin
7415 (method url-fetch)
7416 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7417 "org.osgi.dto/" version "/org.osgi.dto-"
7418 version "-sources.jar"))
7419 (sha256
7420 (base32
7421 "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr"))))
7422 (build-system ant-build-system)
7423 (arguments
7424 `(#:jar-name "osgi-dto.jar"
7425 #:tests? #f)); no tests
7426 (inputs
7427 `(("annotation" ,java-osgi-annotation)))
c353d014 7428 (home-page "https://www.osgi.org")
999b5fb4
JL
7429 (synopsis "Data Transfer Objects")
7430 (description
7431 "OSGi, for Open Services Gateway initiative framework, is a module system
7432and service platform for the Java programming language. This package contains
7433the Data Transfer Objects. It is easily serializable having only public fields
7434of primitive types and their wrapper classes, Strings, and DTOs. List, Set,
7435Map and array aggregates may also be used. The aggregates must only hold
7436objects of the listed types or aggregates.")
7437 (license license:asl2.0)))
c304ce6a
JL
7438
7439(define-public java-osgi-resource
7440 (package
7441 (name "java-osgi-resource")
7442 (version "1.0.0")
7443 (source (origin
7444 (method url-fetch)
7445 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7446 "org.osgi.resource/"
7447 version "/org.osgi.resource-"
7448 version "-sources.jar"))
7449 (sha256
7450 (base32
7451 "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d"))))
7452 (build-system ant-build-system)
7453 (arguments
7454 `(#:jar-name "osgi-resource.jar"
7455 #:tests? #f)); no tests
7456 (inputs
7457 `(("annotation" ,java-osgi-annotation)
7458 ("dto" ,java-osgi-dto)))
c353d014 7459 (home-page "https://www.osgi.org")
c304ce6a
JL
7460 (synopsis "OSGI Resource")
7461 (description
7462 "OSGi, for Open Services Gateway initiative framework, is a module system
7463and service platform for the Java programming language. This package contains
7464the definition of common types in osgi packages.")
7465 (license license:asl2.0)))
c2b14516
JL
7466
7467(define-public java-osgi-namespace-contract
7468 (package
7469 (name "java-osgi-namespace-contract")
7470 (version "1.0.0")
7471 (source (origin
7472 (method url-fetch)
7473 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7474 "org.osgi.namespace.contract/"
7475 version "/org.osgi.namespace.contract-"
7476 version "-sources.jar"))
7477 (sha256
7478 (base32
7479 "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36"))))
7480 (build-system ant-build-system)
7481 (inputs
7482 `(("resource" ,java-osgi-resource)
7483 ("annotation" ,java-osgi-annotation)))
7484 (arguments
7485 `(#:jar-name "osgi-namespace-contract.jar"
7486 #:tests? #f)); no tests
c353d014 7487 (home-page "https://www.osgi.org")
c2b14516
JL
7488 (synopsis "Contract Capability and Requirement Namespace")
7489 (description
7490 "OSGi, for Open Services Gateway initiative framework, is a module system
7491and service platform for the Java programming language. This package contains
7492the names for the attributes and directives for a namespace with contracts.")
7493 (license license:asl2.0)))
f809c963
JL
7494
7495(define-public java-osgi-namespace-extender
7496 (package
7497 (name "java-osgi-namespace-extender")
7498 (version "1.0.1")
7499 (source (origin
7500 (method url-fetch)
7501 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7502 "org.osgi.namespace.extender/"
7503 version "/org.osgi.namespace.extender-"
7504 version "-sources.jar"))
7505 (sha256
7506 (base32
7507 "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz"))))
7508 (build-system ant-build-system)
7509 (inputs
7510 `(("resource" ,java-osgi-resource)
7511 ("annotation" ,java-osgi-annotation)))
7512 (arguments
7513 `(#:jar-name "osgi-namespace-extendent.jar"
7514 #:tests? #f)); no tests
c353d014 7515 (home-page "https://www.osgi.org")
f809c963
JL
7516 (synopsis "Extender Capability and Requirement Namespace")
7517 (description
7518 "OSGi, for Open Services Gateway initiative framework, is a module system
7519and service platform for the Java programming language. This package contains
b784962d
JL
7520the names for the attributes and directives for an extender namespace.")
7521 (license license:asl2.0)))
7522
7523(define-public java-osgi-namespace-service
7524 (package
7525 (name "java-osgi-namespace-service")
7526 (version "1.0.0")
7527 (source (origin
7528 (method url-fetch)
7529 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7530 "org.osgi.namespace.service/"
7531 version "/org.osgi.namespace.service-"
7532 version "-sources.jar"))
7533 (sha256
7534 (base32
7535 "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8"))))
7536 (build-system ant-build-system)
7537 (inputs
7538 `(("resource" ,java-osgi-resource)
7539 ("annotation" ,java-osgi-annotation)))
7540 (arguments
7541 `(#:jar-name "osgi-namespace-service.jar"
7542 #:tests? #f)); no tests
c353d014 7543 (home-page "https://www.osgi.org")
b784962d
JL
7544 (synopsis "Service Capability and Requirement Namespace")
7545 (description
7546 "OSGi, for Open Services Gateway initiative framework, is a module system
7547and service platform for the Java programming language. This package contains
7548the names for the attributes and directives for a service namespace.")
f809c963 7549 (license license:asl2.0)))
0f0c5218
JL
7550
7551(define-public java-osgi-util-function
7552 (package
7553 (name "java-osgi-util-function")
7554 (version "1.0.0")
7555 (source (origin
7556 (method url-fetch)
7557 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7558 "org.osgi.util.function/"
7559 version "/org.osgi.util.function-"
7560 version "-sources.jar"))
7561 (sha256
7562 (base32
7563 "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x"))))
7564 (build-system ant-build-system)
7565 (arguments
7566 `(#:jar-name "osgi-util-function.jar"
7567 #:tests? #f)); no tests
7568 (inputs
7569 `(("annotation" ,java-osgi-annotation)))
c353d014 7570 (home-page "https://www.osgi.org")
0f0c5218
JL
7571 (synopsis "OSGI Util Function")
7572 (description
7573 "OSGi, for Open Services Gateway initiative framework, is a module system
7574and service platform for the Java programming language. This package contains
7575an interface for a function that accepts a single argument and produces a result.")
7576 (license license:asl2.0)))
27103135
JL
7577
7578(define-public java-osgi-util-promise
7579 (package
7580 (name "java-osgi-util-promise")
7581 (version "1.0.0")
7582 (source (origin
7583 (method url-fetch)
7584 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7585 "org.osgi.util.promise/"
7586 version "/org.osgi.util.promise-"
7587 version "-sources.jar"))
7588 (sha256
7589 (base32
7590 "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c"))))
7591 (build-system ant-build-system)
7592 (arguments
7593 `(#:jar-name "osgi-util-promise.jar"
7594 #:tests? #f)); no tests
7595 (inputs
7596 `(("annotation" ,java-osgi-annotation)
7597 ("function" ,java-osgi-util-function)))
c353d014 7598 (home-page "https://www.osgi.org")
27103135
JL
7599 (synopsis "Promise of a value")
7600 (description
7601 "OSGi, for Open Services Gateway initiative framework, is a module system
7602and service platform for the Java programming language. This package contains
7603an interface and utilitary classes for promises. A Promise represents a future
7604value. It handles the interactions for asynchronous processing.")
7605 (license license:asl2.0)))
2b1fdb2b
JL
7606
7607(define-public java-osgi-service-metatype-annotations
7608 (package
7609 (name "java-osgi-service-metatype-annotations")
7610 (version "1.3.0")
7611 (source (origin
7612 (method url-fetch)
7613 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7614 "org.osgi.service.metatype.annotations/"
7615 version "/org.osgi.service.metatype.annotations-"
7616 version "-sources.jar"))
7617 (sha256
7618 (base32
7619 "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6"))))
7620 (build-system ant-build-system)
7621 (arguments
7622 `(#:jar-name "osgi-service-metatype-annotations.jar"
7623 #:tests? #f)); no tests
7624 (inputs
7625 `(("annotation" ,java-osgi-annotation)))
c353d014 7626 (home-page "https://www.osgi.org")
2b1fdb2b
JL
7627 (synopsis "Support annotations for metatype")
7628 (description
7629 "OSGi, for Open Services Gateway initiative framework, is a module system
7630and service platform for the Java programming language. This package contains
7631the support annotations for metatype.")
7632 (license license:asl2.0)))
a13acfbe
JL
7633
7634(define-public java-osgi-service-repository
7635 (package
7636 (name "java-osgi-service-repository")
7637 (version "1.1.0")
7638 (source (origin
7639 (method url-fetch)
7640 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7641 "org.osgi.service.repository/"
7642 version "/org.osgi.service.repository-"
7643 version "-sources.jar"))
7644 (sha256
7645 (base32
7646 "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n"))))
7647 (build-system ant-build-system)
7648 (arguments
7649 `(#:jar-name "osgi-service-repository.jar"
7650 #:tests? #f)); no tests
7651 (inputs
7652 `(("annotation" ,java-osgi-annotation)
7653 ("promise" ,java-osgi-util-promise)
7654 ("resource" ,java-osgi-resource)))
c353d014 7655 (home-page "https://www.osgi.org")
a13acfbe
JL
7656 (synopsis "OSGI service repository")
7657 (description
7658 "OSGi, for Open Services Gateway initiative framework, is a module system
7659and service platform for the Java programming language. This package contains
7660a repository service that contains resources.")
7661 (license license:asl2.0)))
dfd91541
JL
7662
7663(define-public java-osgi-framework
7664 (package
7665 (name "java-osgi-framework")
7666 (version "1.8.0")
7667 (source (origin
7668 (method url-fetch)
7669 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7670 "org.osgi.framework/" version "/org.osgi.framework-"
7671 version "-sources.jar"))
7672 (sha256
7673 (base32
7674 "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s"))))
7675 (build-system ant-build-system)
7676 (arguments
7677 `(#:jar-name "osgi-framework.jar"
7678 #:tests? #f)); no tests
7679 (inputs
7680 `(("annotation" ,java-osgi-annotation)
7681 ("resource" ,java-osgi-resource)
7682 ("dto" ,java-osgi-dto)))
c353d014 7683 (home-page "https://www.osgi.org")
dfd91541
JL
7684 (synopsis "OSGi framework")
7685 (description
7686 "OSGi, for Open Services Gateway initiative framework, is a module system
7687and service platform for the Java programming language.")
7688 (license license:asl2.0)))
98c9f16c
JL
7689
7690(define-public java-osgi-service-log
7691 (package
7692 (name "java-osgi-service-log")
7693 (version "1.3.0")
7694 (source (origin
7695 (method url-fetch)
7696 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7697 "org.osgi.service.log/"
7698 version "/org.osgi.service.log-"
7699 version "-sources.jar"))
7700 (sha256
7701 (base32
7702 "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0"))))
7703 (build-system ant-build-system)
7704 (arguments
7705 `(#:jar-name "osgi-service-log.jar"
7706 #:tests? #f)); no tests
7707 (inputs
7708 `(("java-osgi-framework" ,java-osgi-framework)))
c353d014 7709 (home-page "https://www.osgi.org")
98c9f16c
JL
7710 (synopsis "Provides methods for bundles to write messages to the log")
7711 (description
7712 "OSGi, for Open Services Gateway initiative framework, is a module system
7713and service platform for the Java programming language. This package contains
7714the log service.")
7715 (license license:asl2.0)))
dd76d44b
JL
7716
7717(define-public java-osgi-service-jdbc
7718 (package
7719 (name "java-osgi-service-jdbc")
7720 (version "1.0.0")
7721 (source (origin
7722 (method url-fetch)
7723 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7724 "org.osgi.service.jdbc/"
7725 version "/org.osgi.service.jdbc-"
7726 version "-sources.jar"))
7727 (sha256
7728 (base32
7729 "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz"))))
7730 (build-system ant-build-system)
7731 (arguments
7732 `(#:jar-name "osgi-service-jdbc.jar"
7733 #:tests? #f)); no tests
c353d014 7734 (home-page "https://www.osgi.org")
dd76d44b
JL
7735 (synopsis "Factory for JDBC connection factories")
7736 (description
7737 "OSGi, for Open Services Gateway initiative framework, is a module system
7738and service platform for the Java programming language. This package contains
7739a factory for JDBC connection factories. There are 3 preferred connection
7740factories for getting JDBC connections:
7741
7742@itemize
7743@item @code{javax.sql.DataSource};
7744@item @code{javax.sql.ConnectionPoolDataSource};
7745@item @code{javax.sql.XADataSource}.
7746@end itemize")
7747 (license license:asl2.0)))
291d3f22
JL
7748
7749(define-public java-osgi-service-resolver
7750 (package
7751 (name "java-osgi-service-resolver")
7752 (version "1.0.1")
7753 (source (origin
7754 (method url-fetch)
7755 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7756 "org.osgi.service.resolver/"
7757 version "/org.osgi.service.resolver-"
7758 version "-sources.jar"))
7759 (sha256
7760 (base32
7761 "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd"))))
7762 (build-system ant-build-system)
7763 (arguments
7764 `(#:jar-name "osgi-service-resolver.jar"
7765 #:tests? #f)); no tests
7766 (inputs
7767 `(("annotation" ,java-osgi-annotation)
7768 ("resource" ,java-osgi-resource)))
c353d014 7769 (home-page "https://www.osgi.org")
291d3f22
JL
7770 (synopsis "OSGI Resolver service")
7771 (description
7772 "OSGi, for Open Services Gateway initiative framework, is a module system
7773and service platform for the Java programming language. This package contains
7774a resolver service that resolves the specified resources in the context supplied
7775by the caller.")
7776 (license license:asl2.0)))
1884bb81
JL
7777
7778(define-public java-osgi-util-tracker
7779 (package
7780 (name "java-osgi-util-tracker")
7781 (version "1.5.1")
7782 (source (origin
7783 (method url-fetch)
7784 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7785 "org.osgi.util.tracker/"
7786 version "/org.osgi.util.tracker-"
7787 version "-sources.jar"))
7788 (sha256
7789 (base32
7790 "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz"))))
7791 (build-system ant-build-system)
7792 (arguments
7793 `(#:jar-name "osgi-util-tracker.jar"
7794 #:tests? #f)); no tests
7795 (inputs
7796 `(("framework" ,java-osgi-framework)
7797 ("annotation" ,java-osgi-annotation)))
c353d014 7798 (home-page "https://www.osgi.org")
1884bb81
JL
7799 (synopsis "Bundle tracking")
7800 (description
7801 "OSGi, for Open Services Gateway initiative framework, is a module system
7802and service platform for the Java programming language. This package contains
7803bundle tracking utility classes.")
7804 (license license:asl2.0)))
fb9c48b8
JL
7805
7806(define-public java-osgi-service-cm
7807 (package
7808 (name "java-osgi-service-cm")
7809 (version "1.5.0")
7810 (source (origin
7811 (method url-fetch)
7812 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7813 "org.osgi.service.cm/"
7814 version "/org.osgi.service.cm-"
7815 version "-sources.jar"))
7816 (sha256
7817 (base32
7818 "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6"))))
7819 (build-system ant-build-system)
7820 (arguments
7821 `(#:jar-name "osgi-service-cm.jar"
7822 #:tests? #f)); no tests
7823 (inputs
7824 `(("framework" ,java-osgi-framework)
7825 ("annotation" ,java-osgi-annotation)))
c353d014 7826 (home-page "https://www.osgi.org")
fb9c48b8
JL
7827 (synopsis "OSGI Configuration Management")
7828 (description
7829 "OSGi, for Open Services Gateway initiative framework, is a module system
7830and service platform for the Java programming language. This package contains
7831utility classes for the configuration of services.")
7832 (license license:asl2.0)))
500aac75
JL
7833
7834(define-public java-osgi-service-packageadmin
7835 (package
7836 (name "java-osgi-service-packageadmin")
7837 (version "1.2.0")
7838 (source (origin
7839 (method url-fetch)
7840 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7841 "org.osgi.service.packageadmin/"
7842 version "/org.osgi.service.packageadmin-"
7843 version "-sources.jar"))
7844 (sha256
7845 (base32
7846 "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52"))))
7847 (build-system ant-build-system)
7848 (arguments
7849 `(#:jar-name "osgi-service-packageadmin.jar"
7850 #:tests? #f)); no tests
7851 (inputs
7852 `(("framework" ,java-osgi-framework)))
c353d014 7853 (home-page "https://www.osgi.org")
500aac75
JL
7854 (synopsis "OSGI Package Administration")
7855 (description
7856 "OSGi, for Open Services Gateway initiative framework, is a module system
7857and service platform for the Java programming language. This package contains
7858the packageadmin service.")
7859 (license license:asl2.0)))
77a4f1ae
JL
7860
7861(define-public java-ops4j-base-lang
7862 (package
7863 (name "java-ops4j-base-lang")
7864 (version "1.5.0")
7865 (source (origin
7866 (method url-fetch)
7867 (uri (string-append "https://github.com/ops4j/org.ops4j.base/"
7868 "archive/base-" version ".tar.gz"))
7869 (sha256
7870 (base32
7871 "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw"))))
7872 (build-system ant-build-system)
7873 (arguments
7874 `(#:jar-name "java-ops4j-base-lang.jar"
7875 #:source-dir "ops4j-base-lang/src/main/java"
7876 #:tests? #f; no tests
7877 #:phases
7878 (modify-phases %standard-phases
7879 (add-before 'build 'add-test-file
7880 (lambda _
7881 ;; That file is required by a test in ops4j-pax-exam-core-spi
7882 (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang")
7883 (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties"
7884 (lambda _
7885 (display
7886 (string-append
7887 "version=" ,version "\n"
7888 "groupId=org.ops4j.base"
2c8ac364
MW
7889 "artifactId=ops4j-base-lang\n"))))
7890 #t)))))
77a4f1ae
JL
7891 (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview")
7892 (synopsis "Utility classes and extensions to be used in OPS4J projects")
7893 (description "OPS4J stands for Open Participation Software for Java. This
7894package contains utilities and extensions related to @code{java.lang}.")
7895 (license license:asl2.0)))
b2353495
JL
7896
7897(define-public java-ops4j-base-monitors
7898 (package
7899 (inherit java-ops4j-base-lang)
7900 (name "java-ops4j-base-monitors")
7901 (arguments
7902 `(#:jar-name "java-ops4j-base-monitors.jar"
7903 #:source-dir "ops4j-base-monitors/src/main/java"
7904 #:tests? #f)); no tests
7905 (inputs
7906 `(("lang" ,java-ops4j-base-lang)))
7907 (description "OPS4J stands for Open Participation Software for Java. This
7908package contains utilities and extensions related to monitoring.")))
322d349a
JL
7909
7910(define-public java-ops4j-base-io
7911 (package
7912 (inherit java-ops4j-base-lang)
7913 (name "java-ops4j-base-io")
7914 (arguments
7915 `(#:jar-name "java-ops4j-base-io.jar"
7916 #:source-dir "ops4j-base-io/src/main/java"
7917 #:test-dir "ops4j-base-io/src/test"
7918 #:test-exclude
7919 (list "**/ListerTest.java")))
7920 (inputs
7921 `(("lang" ,java-ops4j-base-monitors)
7922 ("lang" ,java-ops4j-base-lang)))
7923 (native-inputs
7924 `(("junit" ,java-junit)
7925 ("hamcrest" ,java-hamcrest-core)))
7926 (description "OPS4J stands for Open Participation Software for Java. This
7927package contains utilities and extensions related to handling streams and files.")))
559919c1
JL
7928
7929(define-public java-ops4j-base-util
7930 (package
7931 (inherit java-ops4j-base-lang)
7932 (name "java-ops4j-base-util")
7933 (arguments
7934 `(#:jar-name "java-ops4j-base-util.jar"
7935 #:source-dir "ops4j-base-util/src/main/java"
7936 #:test-dir "ops4j-base-util/src/test"))
7937 (inputs
7938 `(("lang" ,java-ops4j-base-lang)))
7939 (native-inputs
7940 `(("junit" ,java-junit)))
7941 (description "OPS4J stands for Open Participation Software for Java. This
7942package contains utilities and extensions related to environment, i18n and
7943mime types.")))
60dcec7a
JL
7944
7945(define-public java-ops4j-base-util-property
7946 (package
7947 (inherit java-ops4j-base-lang)
7948 (name "java-ops4j-base-util-property")
7949 (arguments
7950 `(#:jar-name "java-ops4j-base-util-property.jar"
7951 #:source-dir "ops4j-base-util-property/src/main/java"
7952 #:tests? #f)); no tests
7953 (inputs
7954 `(("lang" ,java-ops4j-base-lang)
7955 ("util" ,java-ops4j-base-util)))
7956 (description "OPS4J stands for Open Participation Software for Java. This
7957package contains utilities and extensions related to resolving properties from
7958different sources.")))
0edf8cf0
JL
7959
7960(define-public java-ops4j-base-store
7961 (package
7962 (inherit java-ops4j-base-lang)
7963 (name "java-ops4j-base-store")
7964 (arguments
7965 `(#:jar-name "java-ops4j-base-store.jar"
7966 #:source-dir "ops4j-base-store/src/main/java"
7967 #:tests? #f)); no tests
7968 (inputs
7969 `(("lang" ,java-ops4j-base-lang)
7970 ("slf4j" ,java-slf4j-api)
7971 ("io" ,java-ops4j-base-io)))
7972 (description "OPS4J stands for Open Participation Software for Java. This
7973package contains utilities for storing and retrieving data from an
7974@code{InputStream}.")))
214fcd8a
JL
7975
7976(define-public java-ops4j-base-spi
7977 (package
7978 (inherit java-ops4j-base-lang)
7979 (name "java-ops4j-base-spi")
7980 (arguments
7981 `(#:jar-name "java-ops4j-base-spi.jar"
7982 #:source-dir "ops4j-base-spi/src/main/java"
7983 #:test-dir "ops4j-base-spi/src/test"))
7984 (native-inputs
7985 `(("junit" ,java-junit)
7986 ("hamcrest" ,java-hamcrest-core)))
7987 (description "OPS4J stands for Open Participation Software for Java. This
7988package contains utilities for obtaining services via the Java SE 6
7989@code{ServiceLoader}.")))
e1edf42e
JL
7990
7991(define-public java-aqute-bnd-annotation
7992 (package
7993 (name "java-aqute-bnd-annotation")
2cac8891 7994 (version "3.5.0")
e1edf42e
JL
7995 (source (origin
7996 (method url-fetch)
7997 (uri (string-append "https://github.com/bndtools/bnd/archive/"
7998 version ".REL.tar.gz"))
7999 (file-name (string-append name "-" version ".tar.gz"))
8000 (sha256
8001 (base32
2cac8891 8002 "1ggyiq0as0f6cz333a0dh98j72kmvv5pf2s47v9554yh905lfqdl"))))
e1edf42e
JL
8003 (build-system ant-build-system)
8004 (arguments
8005 `(#:jar-name "java-aqute-bnd-annotation.jar"
8006 #:source-dir "biz.aQute.bnd.annotation/src"
8007 #:tests? #f)); empty test dir
8008 (home-page "http://bnd.bndtools.org/")
8009 (synopsis "Tools for OSGi")
8010 (description "Bnd is a swiss army knife for OSGi, it creates manifest
8011headers based on analyzing the class code, it verifies the project settings,
8012it manages project dependencies, gives diffs jars, and much more.")
8013 (license license:asl2.0)))
60ba2978
JL
8014
8015(define-public java-aqute-libg
8016 (package
8017 (inherit java-aqute-bnd-annotation)
8018 (name "java-aqute-libg")
8019 (arguments
8020 `(#:jar-name "java-aqute-libg.jar"
78754995
GB
8021 ;; The build fails when source/target more recent than 1.7. This
8022 ;; is a known issue. See: https://github.com/bndtools/bnd/issues/1327
8023 ;;
8024 ;; It is closed as won't fix. There is no way to change the source
8025 ;; so that it works on 1.8, and still works on 1.6, the upstream
8026 ;; target. It work fine on 1.7, so we use 1.7.
8027 #:make-flags (list "-Dant.build.javac.source=1.7"
8028 "-Dant.build.javac.target=1.7")
2ab089b7
GB
8029 #:phases
8030 (modify-phases %standard-phases
8031 (add-before 'configure 'chdir
8032 ;; Change to aQute.libg directory, so that the relative
8033 ;; paths in the tests aren't broken.
8034 (lambda _
8035 (chdir "aQute.libg")
8036 #t))
8037 (add-before 'check 'create-test-directory
8038 ;; Copy the test directory to test/java, since that's where
8039 ;; ant-build-system's default project in build.xml expects to find
8040 ;; the test classes. Leave a copy in the original place to not
8041 ;; break paths in tests.
8042 (lambda _
8043 (mkdir "src/test")
8044 (copy-recursively "test" "src/test/java")
8045 #t)))))
60ba2978
JL
8046 (inputs
8047 `(("slf4j" ,java-slf4j-api)
8048 ("osgi-annot" ,java-osgi-annotation)
8049 ("java-osgi-cmpn" ,java-osgi-cmpn)
2ab089b7
GB
8050 ("osgi" ,java-osgi-core)))
8051 (native-inputs
8052 `(("hamcrest" ,java-hamcrest-core)
8053 ("java-junit" ,java-junit)))))
5f26a131 8054
288a5959
GB
8055(define java-aqute-libg-bootstrap
8056 (package
8057 (inherit java-aqute-libg)
8058 (name "java-aqute-libg-bootstrap")
aca7dcdd
GB
8059 (arguments
8060 ;; Disable tests, at this stage of bootstrap we have no test frameworks.
3785ccd2
GB
8061 (substitute-keyword-arguments (package-arguments java-aqute-libg)
8062 ((#:tests? _ #f) #f)))
288a5959
GB
8063 (inputs
8064 `(("slf4j-bootstrap" ,java-slf4j-api-bootstrap)
8065 ,@(delete `("slf4j" ,java-slf4j-api)
aca7dcdd
GB
8066 (package-inputs java-aqute-libg))))
8067 (native-inputs '())))
288a5959 8068
5f26a131
JL
8069(define-public java-aqute-bndlib
8070 (package
8071 (inherit java-aqute-bnd-annotation)
8072 (name "java-aqute-bndlib")
8073 (arguments
8074 `(#:jar-name "java-bndlib.jar"
8075 #:source-dir "biz.aQute.bndlib/src"
8076 #:tests? #f)); no tests
8077 (inputs
8078 `(("slf4j" ,java-slf4j-api)
8079 ("osgi-annot" ,java-osgi-annotation)
8080 ("java-aqute-libg" ,java-aqute-libg)
8081 ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation)
8082 ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations)
8083 ("java-osgi-service-repository" ,java-osgi-service-repository)
8084 ("java-osgi-service-log" ,java-osgi-service-log)
8085 ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations)
8086 ("java-osgi-namespace-contract" ,java-osgi-namespace-contract)
8087 ("java-osgi-namespace-extender" ,java-osgi-namespace-extender)
8088 ("java-osgi-namespace-service" ,java-osgi-namespace-service)
8089 ("promise" ,java-osgi-util-promise)
8090 ("osgi" ,java-osgi-core)))))
25aef81d 8091
869803aa
GB
8092(define java-aqute-bndlib-bootstrap
8093 (package
8094 (inherit java-aqute-bndlib)
8095 (name "java-aqute-bndlib-bootstrap")
8096 (inputs
8097 `(("slf4j-bootstrap" ,java-slf4j-api-bootstrap)
8098 ("java-aqute-libg-bootstrap" ,java-aqute-libg-bootstrap)
8099 ,@(delete `("slf4j" ,java-slf4j-api)
8100 (delete `("java-aqute-libg" ,java-aqute-libg)
8101 (package-inputs java-aqute-bndlib)))))))
8102
25aef81d
JL
8103(define-public java-ops4j-pax-tinybundles
8104 (package
8105 (name "java-ops4j-pax-tinybundles")
8106 (version "2.1.1")
8107 (source (origin
8108 (method url-fetch)
8109 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/"
8110 "archive/tinybundles-" version ".tar.gz"))
8111 (sha256
8112 (base32
8113 "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871"))))
8114 (arguments
8115 `(#:jar-name "java-ops4j-pax-tinybundles.jar"
8116 #:source-dir "src/main/java"
8117 #:test-exclude
8118 ;; Abstract base classes for other tests
8119 (list "**/BndTest.java" "**/CoreTest.java")
8120 #:phases
8121 (modify-phases %standard-phases
8122 (add-before 'check 'fix-version
8123 (lambda _
8124 ;; This test has a reference to an old version of bndlib we are not
8125 ;; packaging. It uses the version referenced in pom.xml. We replace
8126 ;; it with our own version.
8127 (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
0f277802 8128 (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*")
2c8ac364
MW
8129 ,(package-version java-aqute-bndlib)))
8130 #t)))))
25aef81d
JL
8131 (inputs
8132 `(("lang" ,java-ops4j-base-lang)
8133 ("io" ,java-ops4j-base-io)
8134 ("store" ,java-ops4j-base-store)
8135 ("slf4j" ,java-slf4j-api)
8136 ("libg" ,java-aqute-libg)
8137 ("bndlib" ,java-aqute-bndlib)))
8138 (native-inputs
8139 `(("junit" ,java-junit)
8140 ("hamcrest" ,java-hamcrest-core)
8141 ("log4j" ,java-log4j-api)
8142 ("bndannotation" ,java-aqute-bnd-annotation)
8143 ("framework" ,java-osgi-framework)))
8144 (build-system ant-build-system)
8145 (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles")
8146 (synopsis "Java APIs to create OSGi related artifacts")
8147 (description "Tinybundles is all about creating OSGi related artifacts like
6fa0914a 8148Bundles, Fragments and Deployment Packages with Java Api. It is very convenient
25aef81d
JL
8149to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the
8150other hand, this library can be a foundation of real end user tools that need
8151to create those artifacts.")
8152 (license license:asl2.0)))
e179add0
JL
8153
8154(define-public java-ops4j-pax-exam-core
8155 (package
8156 (name "java-ops4j-pax-exam-core")
8157 (version "4.11.0")
8158 (source (origin
8159 (method url-fetch)
8160 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/"
8161 "archive/exam-reactor-" version ".tar.gz"))
8162 (sha256
8163 (base32
8164 "08mzw8nkah3rj3vznlplnawspxhp61zgvb44ifqa1rni1cvbms2g"))))
8165 (arguments
8166 `(#:jar-name "java-ops4j-pax-exam-core.jar"
8167 #:source-dir "core/pax-exam/src/main/java"
8168 #:test-dir "core/pax-exam/src/test"))
8169 (inputs
8170 `(("slf4j" ,java-slf4j-api)
8171 ("lang" ,java-ops4j-base-lang)
8172 ("io" ,java-ops4j-base-io)
8173 ("util-property" ,java-ops4j-base-util-property)
8174 ("util-store" ,java-ops4j-base-store)
8175 ("java-osgi-core" ,java-osgi-core)))
8176 (native-inputs
8177 `(("junit" ,java-junit)
8178 ("hamcrest" ,java-hamcrest-core)))
8179 (build-system ant-build-system)
8180 (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview")
8181 (synopsis "In-Container Testing for OSGi, Java EE and CDI")
8182 (description "Pax Exam creates OSGi bundles for testing purposes. It lets
8183the user take control of the OSGi framework, the test framework (e.g. JUnit) and
8184the system under test at the same time.")
8185 (license license:asl2.0)))
7a7c2b75
JL
8186
8187(define-public java-ops4j-pax-exam-core-spi
8188 (package
8189 (inherit java-ops4j-pax-exam-core)
8190 (name "java-ops4j-pax-exam-core-spi")
8191 (arguments
8192 `(#:jar-name "java-ops4j-pax-exam-spi.jar"
8193 #:source-dir "src/main/java"
8194 #:test-exclude
8195 (list
8196 ;; Abstract base class, not a test
8197 "**/BaseStagedReactorTest.java"
8198 ;; Depends on org.mortbay.jetty.testwars:test-war-dump
8199 "**/WarBuilderTest.java")
8200 #:phases
8201 (modify-phases %standard-phases
8202 (add-before 'configure 'chdir
8203 (lambda _
8204 ;; Tests assume we are in this directory
2c8ac364
MW
8205 (chdir "core/pax-exam-spi")
8206 #t))
7a7c2b75
JL
8207 (add-before 'check 'fix-tests
8208 (lambda _
8209 ;; One test checks that this file is present.
8210 (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi")
8211 (with-output-to-file
8212 "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties"
8213 (lambda _
8214 (display
8215 (string-append "artifactId = pax-exam-spi\n"
8216 "version = " ,(package-version java-ops4j-pax-exam-core-spi)))))
8217 ;; Maven puts compilation results in the target directory, while we
8218 ;; put them in the build directory.
8219 (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java"
8220 "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java"
8221 "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java")
8222 (("target") "build"))
8223 ;; One test is expected to fail, but it doesn't throw the expected exception
8224 (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java"
2c8ac364
MW
8225 (("AssertionError") "IllegalArgumentException"))
8226 #t)))))
7a7c2b75
JL
8227 (inputs
8228 `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core)
8229 ("lang" ,java-ops4j-base-lang)
8230 ("monitors" ,java-ops4j-base-monitors)
8231 ("store" ,java-ops4j-base-store)
8232 ("io" ,java-ops4j-base-io)
8233 ("spi" ,java-ops4j-base-spi)
8234 ("osgi" ,java-osgi-core)
8235 ("slf4j" ,java-slf4j-api)
8236 ("tinybundles" ,java-ops4j-pax-tinybundles)))
8237 (native-inputs
8238 `(("mockito" ,java-mockito-1)
8239 ("junit" ,java-junit)
8240 ("hamcrest" ,java-hamcrest-core)
8241 ("cglib" ,java-cglib)
8242 ("objenesis" ,java-objenesis)
8243 ("asm" ,java-asm)))))
4496d77f
JL
8244
8245(define-public java-ops4j-pax-exam-core-junit
8246 (package
8247 (inherit java-ops4j-pax-exam-core)
8248 (name "java-ops4j-pax-exam-core-junit")
8249 (arguments
8250 `(#:jar-name "ops4j-pax-exam-core-junit.jar"
8251 #:source-dir "drivers/pax-exam-junit4/src/main/java"
8252 #:tests? #f)); no tests
8253 (inputs
8254 `(("junit" ,java-junit)
8255 ("slf4j" ,java-slf4j-api)
8256 ("core" ,java-ops4j-pax-exam-core)
8257 ("spi" ,java-ops4j-pax-exam-core-spi)))
8258 (native-inputs '())))
cb05f60d
JL
8259
8260(define-public java-fasterxml-jackson-annotations
8261 (package
8262 (name "java-fasterxml-jackson-annotations")
93dceea4 8263 (version "2.9.4")
cb05f60d
JL
8264 (source (origin
8265 (method url-fetch)
8266 (uri (string-append "https://github.com/FasterXML/"
8267 "jackson-annotations/archive/"
8268 "jackson-annotations-" version ".tar.gz"))
8269 (sha256
8270 (base32
93dceea4 8271 "0mr95xd0da6a4g95zvrl1ryk5n5zv2rc696w3xnsr5hxk2gicfc4"))))
cb05f60d
JL
8272 (build-system ant-build-system)
8273 (arguments
8274 `(#:jar-name "jackson-annotations.jar"
8275 #:source-dir "src/main/java"
8276 #:test-dir "src/test"))
8277 (native-inputs
8278 `(("junit" ,java-junit)))
8279 (home-page "https://github.com/FasterXML/jackson-annotations")
8280 (synopsis "General purpose annotations for the Jackson Data Processor")
8281 (description "This package contains general purpose annotations for the
8282Jackson Data Processor, used on value and handler types. The only annotations
8283not included are ones that require dependency to the Databind package.")
8284 (license license:asl2.0)))
0b5481df
JL
8285
8286(define-public java-fasterxml-jackson-core
8287 (package
8288 (name "java-fasterxml-jackson-core")
38a0fc38 8289 (version "2.9.4")
0b5481df
JL
8290 (source (origin
8291 (method url-fetch)
8292 (uri (string-append "https://github.com/FasterXML/"
8293 "jackson-core/archive/"
8294 "jackson-core-" version ".tar.gz"))
8295 (sha256
8296 (base32
38a0fc38 8297 "159hsnk17jr1gyzkf01cxvsn45srnk37g949r7364qlsr527gjgd"))))
0b5481df
JL
8298 (build-system ant-build-system)
8299 (arguments
8300 `(#:jar-name "jackson-core.jar"
8301 #:source-dir "src/main/java"
8302 #:test-dir "src/test"
8303 #:test-exclude
8304 (list
8305 ;; Expected failure. pom.xml excludes these
8306 "**/failing/**"
8307 ;; Base classes that have no constructor for junit
8308 "**/BaseTest.java"
8309 "**/ConcurrencyReadTest.java"
8310 "**/ManualCharAccessTest.java"
8311 "**/ManualCharAccessTest.java"
8312 "**/TrailingCommasTest.java"
8313 "**/AsyncMissingValuesInObjectTest.java"
8314 "**/AsyncMissingValuesInArrayTest.java")
8315 #:phases
8316 (modify-phases %standard-phases
8317 (add-before 'configure 'generate-PackageVersion.java
8318 (lambda _
8319 (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java")
8320 (in (string-append out ".in")))
8321 (copy-file in out)
8322 (substitute* out
8323 (("@package@") "com.fasterxml.jackson.core.json")
8324 (("@projectversion@") ,version)
8325 (("@projectgroupid@") "com.fasterxml.jackson.core")
2c8ac364
MW
8326 (("@projectartifactid@") "jackson-core")))
8327 #t))
0b5481df
JL
8328 (add-before 'build 'copy-resources
8329 (lambda _
8330 (copy-recursively "src/main/resources"
2c8ac364
MW
8331 "build/classes")
8332 #t))
0b5481df
JL
8333 (add-before 'check 'copy-test-resources
8334 (lambda _
8335 (copy-recursively "src/test/resources"
2c8ac364
MW
8336 "build/test-classes")
8337 #t)))))
0b5481df
JL
8338 (native-inputs
8339 `(("junit" ,java-junit)
8340 ("hamcrest" ,java-hamcrest-core)))
8341 (home-page "https://github.com/FasterXML/jackson-core")
8342 (synopsis "")
8343 (description "")
8344 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
f234c7a0
JL
8345
8346(define-public java-fasterxml-jackson-databind
8347 (package
8348 (name "java-fasterxml-jackson-databind")
3c1edff5 8349 (version "2.9.4")
f234c7a0
JL
8350 (source (origin
8351 (method url-fetch)
8352 (uri (string-append "https://github.com/FasterXML/"
8353 "jackson-databind/archive/"
8354 "jackson-databind-" version ".tar.gz"))
8355 (sha256
8356 (base32
3c1edff5 8357 "1zd2cw4z6kdkbx8za96xh9pyicv2a2l7y0rkcx2fqd8hv6d47s08"))))
f234c7a0
JL
8358 (build-system ant-build-system)
8359 (arguments
8360 `(#:jar-name "jackson-databind.jar"
8361 #:source-dir "src/main/java"
8362 #:tests? #f; requires javax.measures for which I can't find a free implementation
8363 #:phases
8364 (modify-phases %standard-phases
8365 (add-before 'configure 'generate-PackageVersion.java
8366 (lambda _
8367 (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java")
8368 (in (string-append out ".in")))
8369 (copy-file in out)
8370 (substitute* out
8371 (("@package@") "com.fasterxml.jackson.databind.cfg")
8372 (("@projectversion@") ,version)
8373 (("@projectgroupid@") "com.fasterxml.jackson.databind")
2c8ac364
MW
8374 (("@projectartifactid@") "jackson-databind")))
8375 #t))
f234c7a0
JL
8376 (add-before 'build 'copy-resources
8377 (lambda _
2c8ac364
MW
8378 (copy-recursively "src/main/resources" "build/classes")
8379 #t)))))
f234c7a0
JL
8380 (inputs
8381 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
8382 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)))
8383 (home-page "https://github.com/FasterXML/jackson-databind")
8384 (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor")
8385 (description "This package contains the general-purpose data-binding
8386functionality and tree-model for Jackson Data Processor. It builds on core
8387streaming parser/generator package, and uses Jackson Annotations for
8388configuration.")
8389 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
d57d8b89
JL
8390
8391(define-public java-fasterxml-jackson-modules-base-jaxb
8392 (package
8393 (name "java-fasterxml-jackson-modules-base-jaxb")
07207211 8394 (version "2.9.4")
d57d8b89
JL
8395 (source (origin
8396 (method url-fetch)
8397 (uri (string-append "https://github.com/FasterXML/"
8398 "jackson-modules-base/archive/"
8399 "jackson-modules-base-" version ".tar.gz"))
8400 (sha256
8401 (base32
07207211 8402 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
d57d8b89
JL
8403 (build-system ant-build-system)
8404 (arguments
8405 `(#:jar-name "jackson-modules-base-jaxb.jar"
8406 #:source-dir "jaxb/src/main/java"
8407 #:test-dir "jaxb/src/test"
8408 #:test-exclude
8409 ;; Base class for tests
8410 (list "**/BaseJaxbTest.java")
8411 #:phases
8412 (modify-phases %standard-phases
8413 (add-before 'configure 'generate-PackageVersion.java
8414 (lambda _
8415 (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/"
8416 "jackson/module/jaxb/PackageVersion.java"))
8417 (in (string-append out ".in")))
8418 (copy-file in out)
8419 (substitute* out
8420 (("@package@") "com.fasterxml.jackson.module.jaxb")
8421 (("@projectversion@") ,version)
8422 (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb")
2c8ac364
MW
8423 (("@projectartifactid@") "jackson-module-jaxb")))
8424 #t))
d57d8b89
JL
8425 (add-before 'build 'copy-resources
8426 (lambda _
2c8ac364
MW
8427 (copy-recursively "jaxb/src/main/resources" "build/classes")
8428 #t)))))
d57d8b89
JL
8429 (inputs
8430 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
8431 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
8432 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
8433 (native-inputs
8434 `(("java-junit" ,java-junit)))
8435 (home-page "https://github.com/FasterXML/jackson-modules-base")
8436 (synopsis "Jaxb annotations jackson module")
8437 (description "This package is the jaxb annotations module for jackson.")
8438 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
0f296d37 8439
5165fb40
DM
8440(define-public java-fasterxml-jackson-modules-base-mrbean
8441 (package
8442 (name "java-fasterxml-jackson-modules-base-mrbean")
8443 (version "2.9.4")
8444 (source (origin
8445 (method url-fetch)
8446 (uri (string-append "https://github.com/FasterXML/"
8447 "jackson-modules-base/archive/"
8448 "jackson-modules-base-" version ".tar.gz"))
8449 (sha256
8450 (base32
8451 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
8452 (build-system ant-build-system)
8453 (arguments
8454 `(#:jar-name "jackson-modules-base-mrbean.jar"
8455 #:source-dir "mrbean/src/main/java"
8456 #:test-dir "mrbean/src/test"
8457 #:test-exclude
8458 ;; Base class for tests
8459 (list "**/BaseTest.java")
8460 #:phases
8461 (modify-phases %standard-phases
8462 (add-before 'configure 'generate-PackageVersion.java
8463 (lambda _
8464 (let* ((out (string-append "mrbean/src/main/java/com/fasterxml/"
8465 "jackson/module/mrbean/PackageVersion.java"))
8466 (in (string-append out ".in")))
8467 (copy-file in out)
8468 (substitute* out
8469 (("@package@") "com.fasterxml.jackson.module.mrbean")
8470 (("@projectversion@") ,version)
8471 (("@projectgroupid@") "com.fasterxml.jackson.module.mrbean")
8472 (("@projectartifactid@") "jackson-module-mrbean")))
8473 #t)))))
8474 (inputs
8475 `(("java-asm" ,java-asm)
8476 ("java-fasterxml-jackson-annotations"
8477 ,java-fasterxml-jackson-annotations)
8478 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
8479 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
8480 (native-inputs
8481 `(("java-junit" ,java-junit)))
8482 (home-page "https://github.com/FasterXML/jackson-modules-base")
8483 (synopsis "POJO type materialization for Java")
8484 (description "This package implements POJO type materialization.
8485Databinders can construct implementation classes for Java interfaces as part
8486of deserialization.")
8487 (license license:asl2.0)))
8488
0f296d37
JL
8489(define-public java-snakeyaml
8490 (package
8491 (name "java-snakeyaml")
8492 (version "1.18")
8493 (source (origin
8494 (method url-fetch)
8495 (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
8496 version ".tar.gz"))
307856cd 8497 (file-name (string-append name "-" version ".tar.gz"))
0f296d37
JL
8498 (sha256
8499 (base32
8500 "0rf5ha6w0waz50jz2479jsrbgmd0dnx0gs337m126j5z7zlmg7mg"))))
8501 (build-system ant-build-system)
8502 (arguments
8503 `(#:jar-name "java-snakeyaml.jar"
8504 #:source-dir "src/main/java"
8505 ;; Tests require velocity, a cyclic dependency, and
8506 ;; java-spring-framework-context which is not packaged.
8507 #:tests? #f))
8508 (home-page "https://bitbucket.org/asomov/snakeyaml")
8509 (synopsis "YAML processor")
8510 (description "SnakeYAML is a YAML processor for the Java Virtual Machine.")
8511 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
087c8fd2
JL
8512
8513(define-public java-fasterxml-jackson-dataformat-yaml
8514 (package
8515 (name "java-fasterxml-jackson-dataformat-yaml")
1f2be88f 8516 (version "2.9.4")
087c8fd2
JL
8517 (source (origin
8518 (method url-fetch)
8519 (uri (string-append "https://github.com/FasterXML/"
8520 "jackson-dataformats-text/archive/"
8521 "jackson-dataformats-text-" version ".tar.gz"))
8522 (sha256
8523 (base32
1f2be88f 8524 "1hikl06khaxbg439avf442qifcadap8w0lx13f0nnhp2vh3dkbz7"))))
087c8fd2
JL
8525 (build-system ant-build-system)
8526 (arguments
8527 `(#:jar-name "jackson-dataformat-yaml.jar"
8528 #:source-dir "yaml/src/main/java"
8529 #:test-dir "yaml/src/test"
8530 #:test-exclude (list "**/failing/**.java")
8531 #:phases
8532 (modify-phases %standard-phases
8533 (add-before 'configure 'generate-PackageVersion.java
8534 (lambda _
8535 (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java")
8536 (in (string-append out ".in")))
8537 (copy-file in out)
8538 (substitute* out
8539 (("@package@") "com.fasterxml.jackson.dataformat.yaml")
8540 (("@projectversion@") ,version)
8541 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml")
2c8ac364
MW
8542 (("@projectartifactid@") "jackson-dataformat-yaml")))
8543 #t)))))
087c8fd2
JL
8544 (inputs
8545 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
8546 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
8547 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
8548 ("java-snakeyaml" ,java-snakeyaml)))
8549 (native-inputs
8550 `(("junit" ,java-junit)
8551 ("hamcrest" ,java-hamcrest-core)
8552 ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi)
8553 ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit)
8554 ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core)))
8555 (home-page "https://github.com/FasterXML/jackson-dataformats-text")
8556 (synopsis "Yaml backend for Jackson")
8557 (description "Dataformat backends are used to support format alternatives
8558to JSON, supported by default. This is done by sub-classing Jackson core
8559abstractions.")
8560 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
6fd07b98
JL
8561
8562(define-public java-stax2-api
8563 (package
8564 (name "java-stax2-api")
8565 (version "4.0.0")
8566 (source (origin
8567 (method url-fetch)
8568 (uri (string-append "https://github.com/FasterXML/stax2-api/archive/"
8569 "stax2-api-" version ".tar.gz"))
8570 (sha256
8571 (base32
8572 "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq"))))
8573 (build-system ant-build-system)
8574 (arguments
8575 `(#:jar-name "java-stax2-api.jar"
8576 #:source-dir "src/main/java"
8577 #:tests? #f)); no tests
8578 (home-page "https://github.com/FasterXML/stax2-api")
8579 (synopsis "Stax2 API")
8580 (description "Stax2 API is an extension to basic Stax 1.0 API that adds
8581significant new functionalities, such as full-featured bi-direction validation
8582interface and high-performance Typed Access API.")
8583 (license license:bsd-2)))
40f193f3
JL
8584
8585(define-public java-woodstox-core
8586 (package
8587 (name "java-woodstox-core")
8588 (version "5.0.3")
8589 (source (origin
8590 (method url-fetch)
8591 (uri (string-append "https://github.com/FasterXML/woodstox/archive/"
8592 "woodstox-core-" version ".tar.gz"))
8593 (sha256
8594 (base32
8595 "1i7pdgb8jbw6gdy5kmm0l6rz109n2ns92pqalpyp24vb8vlvdfd4"))))
8596 (build-system ant-build-system)
8597 (arguments
8598 `(#:jar-name "woodstox.jar"
8599 #:test-exclude
8600 (list "**/Base*.java" "failing/**")
8601 #:phases
8602 (modify-phases %standard-phases
8603 (add-before 'build 'remove-msv-dep
8604 (lambda _
8605 ;; we don't need osgi, and it depends on msv
8606 (delete-file-recursively "src/main/java/com/ctc/wstx/osgi")
8607 ;; msv's latest release is from 2011 and we don't need it
8608 (delete-file-recursively "src/main/java/com/ctc/wstx/msv")
8609 (delete-file-recursively "src/test/java/wstxtest/osgi")
2c8ac364
MW
8610 (delete-file-recursively "src/test/java/wstxtest/msv")
8611 #t))
40f193f3
JL
8612 (add-before 'build 'copy-resources
8613 (lambda _
2c8ac364
MW
8614 (copy-recursively "src/main/resources" "build/classes")
8615 #t)))))
40f193f3
JL
8616 (inputs
8617 `(("stax2" ,java-stax2-api)))
8618 (native-inputs
8619 `(("junit" ,java-junit)))
8620 (home-page "https://github.com/FasterXML/woodstox")
8621 (synopsis "Stax XML API implementation")
8622 (description "Woodstox is a stax XML API implementation.")
8623 (license license:asl2.0)))
262a4d33
JL
8624
8625(define-public java-fasterxml-jackson-dataformat-xml
8626 (package
8627 (name "java-fasterxml-jackson-dataformat-xml")
f3bbe029 8628 (version "2.9.4")
262a4d33
JL
8629 (source (origin
8630 (method url-fetch)
8631 (uri (string-append "https://github.com/FasterXML/"
8632 "jackson-dataformat-xml/archive/"
8633 "jackson-dataformat-xml-" version ".tar.gz"))
8634 (sha256
8635 (base32
f3bbe029 8636 "111fkkl90w31jbf30kgj82qdcxlw4sxppki7i198liw0ck1jcavq"))))
262a4d33
JL
8637 (build-system ant-build-system)
8638 (arguments
8639 `(#:jar-name "jackson-dataformat-xml.jar"
8640 #:source-dir "src/main/java"
8641 #:test-exclude
8642 (list "**/failing/**")
8643 #:phases
8644 (modify-phases %standard-phases
8645 (add-before 'configure 'generate-PackageVersion.java
8646 (lambda _
8647 (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java")
8648 (in (string-append out ".in")))
8649 (copy-file in out)
8650 (newline)
8651 (substitute* out
8652 (("@package@") "com.fasterxml.jackson.dataformat.xml")
8653 (("@projectversion@") ,version)
8654 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml")
2c8ac364
MW
8655 (("@projectartifactid@") "jackson-dataformat-xml")))
8656 #t))
262a4d33
JL
8657 (add-before 'build 'copy-resources
8658 (lambda _
2c8ac364
MW
8659 (copy-recursively "src/main/resources" "build/classes")
8660 #t)))))
262a4d33
JL
8661 (inputs
8662 `(("jackson-annotations" ,java-fasterxml-jackson-annotations)
8663 ("jackson-core" ,java-fasterxml-jackson-core)
8664 ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb)
8665 ("jackson-databind" ,java-fasterxml-jackson-databind)
8666 ("stax2-api" ,java-stax2-api)
8667 ("woodstox" ,java-woodstox-core)))
8668 (native-inputs
8669 `(("junit" ,java-junit)
8670 ("hamcrest" ,java-hamcrest-core)))
8671 (home-page "https://github.com/FasterXML/jackson-dataformat-xml")
8672 (synopsis "Read and write XML")
8673 (description "This package contains Jackson extension component for reading
8674and writing XML encoded data.
8675
8676Further, the goal is to emulate how JAXB data-binding works with \"Code-first\"
8677approach (that is, no support is added for \"Schema-first\" approach). Support
8678for JAXB annotations is provided by JAXB annotation module; this module
8679provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator},
8680@code{JsonFactory}) as well as small number of higher level overrides needed to
8681make data-binding work.")
8682 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
90a127c7
JL
8683
8684(define-public java-hdrhistogram
8685 (package
8686 (name "java-hdrhistogram")
8687 (version "2.1.9")
8688 (source (origin
8689 (method url-fetch)
8690 (uri (string-append "https://github.com/HdrHistogram/HdrHistogram/"
8691 "archive/HdrHistogram-" version ".tar.gz"))
8692 (sha256
8693 (base32
8694 "1sicbmc3sr42nw93qbkb26q9rn33ag33k6k77phjc3j5h5gjffqv"))))
8695 (build-system ant-build-system)
8696 (arguments
8697 `(#:jar-name "java-hdrhistogram.jar"
8698 #:source-dir "src/main/java"
8699 #:phases
8700 (modify-phases %standard-phases
8701 (add-before 'configure 'set-version
8702 (lambda _
8703 (let* ((version-java "src/main/java/org/HdrHistogram/Version.java")
8704 (template (string-append version-java ".template")))
8705 (copy-file template version-java)
8706 (substitute* version-java
8707 (("\\$VERSION\\$") ,version)
8708 (("\\$BUILD_TIME\\$") "0"))
8709 #t))))))
8710 (native-inputs
8711 `(("junit" ,java-junit)
8712 ("hamcrest" ,java-hamcrest-core)))
8713 (home-page "https://hdrhistogram.github.io/HdrHistogram")
8714 (synopsis "High dynamic range histogram")
8715 (description "Hdrhistogram allows to create histograms that support
8716recording and analyzing sampled data value counts across a configurable integer
8717value range with configurable value precision within the range. Value precision
8718is expressed as the number of significant digits in the value recording, and
8719provides control over value quantization behavior across the value range and
8720the subsequent value resolution at any given level.")
8721 (license license:public-domain)))
5d104a27 8722
c5ff11dc
RW
8723(define-public java-cofoja
8724 (package
8725 (name "java-cofoja")
8726 (version "1.3")
8727 (source (origin
8728 (method git-fetch)
8729 (uri (git-reference
8730 (url "https://github.com/nhatminhle/cofoja.git")
8731 (commit (string-append "v" version))))
8732 (file-name (string-append "java-cofoja-" version "-checkout"))
8733 (sha256
8734 (base32
8735 "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w"))))
8736 (build-system ant-build-system)
8737 (arguments
8738 `(#:build-target "dist"
8739 #:test-target "test"
8740 #:jdk ,icedtea-8
8741 #:make-flags
8742 (list "-Ddist.dir=dist")
8743 #:modules ((guix build ant-build-system)
8744 (guix build java-utils)
8745 (guix build utils)
8746 (srfi srfi-1)
8747 (ice-9 match))
8748 #:phases
8749 (modify-phases %standard-phases
8750 ;; The bulid system ignores the class path the ant-build-system sets
8751 ;; up and instead expects to find all dependencies in the "lib"
8752 ;; directory.
8753 (add-after 'unpack 'create-libdir
8754 (lambda* (#:key inputs #:allow-other-keys)
8755 (mkdir-p "lib")
8756 (for-each
8757 (lambda (file)
8758 (let ((target (string-append "lib/" (basename file))))
8759 (unless (file-exists? target)
8760 (symlink file target))))
8761 (append-map (match-lambda
8762 ((label . dir)
8763 (find-files dir "\\.jar$")))
8764 inputs))
8765 #t))
8766 (replace 'install (install-jars "dist")))))
8767 (inputs
8768 `(("java-asm" ,java-asm)))
8769 (native-inputs
8770 `(("java-junit" ,java-junit)))
8771 (home-page "https://github.com/nhatminhle/cofoja")
8772 (synopsis "Contracts for Java")
8773 (description "Contracts for Java, or Cofoja for short, is a contract
8774programming framework and test tool for Java, which uses annotation processing
8775and bytecode instrumentation to provide run-time checking. (In particular,
8776this is not a static analysis tool.)")
8777 (license license:lgpl3+)))
8778
5d104a27
JL
8779(define-public java-aopalliance
8780 (package
8781 (name "java-aopalliance")
8782 (version "1.0")
8783 (source (origin
8784 (method git-fetch)
8785 ;; Note: this git repository is not official, but contains the
8786 ;; source code that is in the CVS repository. Downloading the
8787 ;; tarball from sourceforge is undeterministic, and the cvs download
8788 ;; fails.
8789 (uri (git-reference
8790 (url "https://github.com/hoverruan/aopalliance")
8791 (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0")))
8792 (file-name (string-append name "-" version))
8793 (sha256
8794 (base32
8795 "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr"))))
8796 (build-system ant-build-system)
8797 (arguments
8798 `(#:jar-name "java-aopalliance.jar"
8799 #:jdk ,icedtea-8
8800 #:tests? #f; no tests
8801 #:source-dir "aopalliance/src/main"))
8802 (home-page "http://aopalliance.sourceforge.net")
8803 (synopsis "Aspect-Oriented Programming")
8804 (description "The AOP Alliance project is a joint project between several
8805software engineering people who are interested in Aspect-Oriented Programming
8806(AOP) and Java.")
8807 (license license:public-domain)))
454536e0
JL
8808
8809(define-public java-javax-inject
8810 (package
8811 (name "java-javax-inject")
8812 (version "tck-1")
8813 (source (origin
8814 (method url-fetch)
8815 (uri (string-append "https://github.com/javax-inject/javax-inject/"
8816 "archive/javax.inject-" version ".tar.gz"))
8817 (sha256
8818 (base32
8819 "1ydrlvh2r7vr1g7lhjwy3w2dggpj9h6pix1lakkkgdywb365n6g0"))))
8820 (build-system ant-build-system)
8821 (arguments
8822 `(#:jar-name "java-javax-inject.jar"
8823 #:jdk ,icedtea-8
8824 #:tests? #f)); no tests
8825 (home-page "http://github.com/javax-inject/javax-inject")
8826 (synopsis "JSR-330: Dependency Injection for Java")
8827 (description "This package specifies a means for obtaining objects in such
8828a way as to maximize reusability, testability and maintainability compared to
8829traditional approaches such as constructors, factories, and service locators
8830(e.g., JNDI). This process, known as dependency injection, is beneficial to
8831most nontrivial applications.
8832
8833Many types depend on other types. For example, a @var{Stopwatch} might depend
8834on a @var{TimeSource}. The types on which a type depends are known as its
8835dependencies. The process of finding an instance of a dependency to use at run
8836time is known as resolving the dependency. If no such instance can be found,
8837the dependency is said to be unsatisfied, and the application is broken.")
8838 (license license:asl2.0)))
5766984b
JL
8839
8840(define-public java-guice
8841 (package
8842 (name "java-guice")
8843 (version "4.1")
8844 (source (origin
8845 (method url-fetch)
8846 (uri (string-append "https://github.com/google/guice/archive/"
8847 version ".tar.gz"))
8848 (file-name (string-append name "-" version ".tar.gz"))
9936ffe7
BH
8849 (modules '((guix build utils)))
8850 (snippet
8851 `(begin
8852 (for-each delete-file (find-files "." ".*.jar"))))
5766984b
JL
8853 (sha256
8854 (base32
8855 "0dwmqjzlavb144ywqqglj3h68hqszkff8ai0a42hyb5il0qh4rbp"))))
8856 (build-system ant-build-system)
8857 (arguments
8858 `(#:jar-name "java-guice.jar"
8859 #:jdk ,icedtea-8
8860 #:tests? #f; FIXME: tests are not in a java sub directory
8861 #:source-dir "core/src"))
8862 (inputs
8863 `(("guava" ,java-guava)
8864 ("java-cglib" ,java-cglib)
8865 ("java-aopalliance" ,java-aopalliance)
8866 ("java-javax-inject" ,java-javax-inject)
8867 ("java-asm" ,java-asm)))
8868 (home-page "https://github.com/google/guice")
8869 (synopsis "Lightweight dependency injection framework")
8870 (description "Guice is a lightweight dependency injection framework fo
8871Java 6 and above.")
8872 (license license:asl2.0)))
ec4e8ad7
JL
8873
8874(define-public java-guice-servlet
8875 (package
8876 (inherit java-guice)
8877 (name "java-guice-servlet")
8878 (arguments
8879 `(#:jar-name "guice-servlet.jar"
8880 #:source-dir "extensions/servlet/src/"
8881 #:jdk ,icedtea-8
8882 #:tests? #f)); FIXME: not in a java subdir
8883 (inputs
8884 `(("guice" ,java-guice)
10eddaca 8885 ("servlet" ,java-classpathx-servletapi)
ec4e8ad7 8886 ,@(package-inputs java-guice)))))
b12fe1e5
JL
8887
8888(define-public java-assertj
8889 (package
8890 (name "java-assertj")
8891 (version "3.8.0")
8892 (source (origin
8893 (method url-fetch)
8894 (uri (string-append "https://github.com/joel-costigliola/"
8895 "assertj-core/archive/"
8896 "assertj-core-" version ".tar.gz"))
8897 (sha256
8898 (base32
8899 "1kf124fxskf548rklkg86294w2x6ajqrff94rrhyqns31danqkfz"))))
8900 (build-system ant-build-system)
8901 (arguments
8902 `(#:jar-name "java-assertj.jar"
8903 #:jdk ,icedtea-8
8904 #:source-dir "src/main/java"
8905 #:tests? #f)); depends on tng-junit which depends on assertj
8906 (inputs
8907 `(("cglib" ,java-cglib)
8908 ("junit" ,java-junit)
8909 ("hamcrest" ,java-hamcrest-core)))
8910 (native-inputs
8911 `(("mockito" ,java-mockito-1)))
8912 (home-page "https://joel-costigliola.github.io/assertj/index.html")
8913 (synopsis "Fluent assertions for java")
8914 (description "AssertJ core is a Java library that provides a fluent
8915interface for writing assertions. Its main goal is to improve test code
8916readability and make maintenance of tests easier.")
8917 (license license:asl2.0)))
6768e0a7
JL
8918
8919(define-public java-jboss-javassist
8920 (package
8921 (name "java-jboss-javassist")
8922 (version "3.21.0")
8923 (source (origin
8924 (method url-fetch)
8925 (uri (string-append "https://github.com/jboss-javassist/javassist/"
8926 "archive/rel_"
8927 (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)
8928 "_ga.tar.gz"))
8929 (sha256
8930 (base32
8931 "10lpcr3sbf7y6fq6fc2h2ik7rqrivwcy4747bg0kxhwszil3cfmf"))))
8932 (build-system ant-build-system)
8933 (arguments
8934 `(#:jar-name "java-jboss-javassist.jar"
8935 #:jdk ,icedtea-8
8936 #:source-dir "src/main"
8937 #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3
8938 #:phases
8939 (modify-phases %standard-phases
8940 (add-before 'configure 'remove-binary
8941 (lambda _
8942 (delete-file "javassist.jar")
8943 #t)))))
8944 (native-inputs
8945 `(("junit" ,java-junit)))
8946 (home-page "https://github.com/jboss-javassist/javassist")
8947 (synopsis "Java bytecode engineering toolkit")
8948 (description "Javassist (JAVA programming ASSISTant) makes Java bytecode
8949manipulation simple. It is a class library for editing bytecodes in Java; it
8950enables Java programs to define a new class at runtime and to modify a class
8951file when the JVM loads it.")
8952 (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl.
a6dd06d0
JL
8953
8954(define-public java-jcommander
8955 (package
8956 (name "java-jcommander")
8957 (version "1.71")
8958 (source (origin
8959 (method url-fetch)
8960 (uri (string-append "https://github.com/cbeust/jcommander/archive/"
8961 version ".tar.gz"))
8962 (file-name (string-append name "-" version ".tar.gz"))
8963 (sha256
8964 (base32
8965 "1f5k2ckay6qjc3d3w3d7bc0p3cx3c7n6p6zxvw1kibqdr0q98wlx"))))
8966 (build-system ant-build-system)
8967 (arguments
8968 `(#:jar-name "java-jcommander.jar"
8969 #:jdk ,icedtea-8
8970 #:tests? #f; requires testng which depends on jcommander
8971 #:source-dir "src/main/java"))
dcfdc908 8972 (home-page "https://jcommander.org")
a6dd06d0
JL
8973 (synopsis "Command line parameters parser")
8974 (description "JCommander is a very small Java framework that makes it
8975trivial to parse command line parameters. Parameters are declared with
8976annotations.")
8977 (license license:asl2.0)))
11bc385b
JL
8978
8979(define-public java-bsh
8980 (package
8981 (name "java-bsh")
8982 (version "2.0b6")
8983 (source (origin
8984 (method url-fetch)
8985 (uri (string-append "https://github.com/beanshell/beanshell/archive/"
8986 version ".tar.gz"))
8987 (file-name (string-append name "-" version ".tar.gz"))
8988 (sha256
8989 (base32
8990 "1bawkxk6jyc75hxvzkpz689h73cn3f222m0ar3nvb0dal2b85kfv"))))
8991 (build-system ant-build-system)
8992 (arguments
8993 `(#:build-target "jarall"
8994 #:test-target "junit-tests-all"
8995 #:phases
8996 (modify-phases %standard-phases
8997 (replace 'install
8998 (lambda* (#:key outputs #:allow-other-keys)
8999 (let ((share (string-append (assoc-ref outputs "out") "/share/java")))
9000 (mkdir-p share)
9001 (copy-file "dist/bsh-2.0b6.jar" (string-append share "/bsh-2.0b6.jar"))
9002 #t))))))
9003 (home-page "http://beanshell.org/")
9004 (synopsis "Lightweight Scripting for Java")
9005 (description "BeanShell is a small, free, embeddable Java source
9006interpreter with object scripting language features, written in Java.
9007BeanShell dynamically executes standard Java syntax and extends it with common
9008scripting conveniences such as loose types, commands, and method closures like
9009those in Perl and JavaScript.")
9010 (license license:asl2.0)))
7a343e97
JL
9011
9012(define-public java-fest-util
9013 (package
9014 (name "java-fest-util")
9015 (version "1.2.5")
9016 (source (origin
9017 (method url-fetch)
9018 (uri (string-append "https://github.com/alexruiz/fest-util/"
9019 "archive/fest-util-" version ".tar.gz"))
9020 (sha256
9021 (base32
9022 "05g6hljz5mdaakk8d7g32klbhz9bdwp3qlj6rdaggdidxs3x1sb8"))))
9023 (build-system ant-build-system)
9024 (arguments
9025 `(#:jar-name "java-fest-util.jar"
9026 #:source-dir "src/main/java"))
9027 (native-inputs
9028 `(("junit" ,java-junit)
9029 ("hamcrest" ,java-hamcrest-core)))
9030 (home-page "https://github.com/alexruiz/fest-util")
9031 (synopsis "FEST common utilities")
9032 (description "Common utilities used in all FEST module.")
9033 (license license:asl2.0)))
3c6c8358
JL
9034
9035(define-public java-fest-test
9036 (package
9037 (name "java-fest-test")
9038 (version "2.1.0")
9039 (source (origin
9040 (method url-fetch)
9041 (uri (string-append "https://github.com/alexruiz/fest-test/"
9042 "archive/fest-test-" version ".tar.gz"))
9043 (sha256
9044 (base32
9045 "1rxfbw6l9vc65iy1x3fb617qc6y4w2k430pgf1mfbxfdlxbm0f7g"))))
9046 (build-system ant-build-system)
9047 (arguments
9048 `(#:jar-name "java-fest-test.jar"
9049 #:source-dir "src/main/java"
9050 #:tests? #f)); no tests
9051 (inputs
9052 `(("junit" ,java-junit)))
9053 (home-page "https://github.com/alexruiz/fest-test")
9054 (synopsis "Common FEST testing infrastructure")
9055 (description "Fest-test contains the common FEST testing infrastructure.")
9056 (license license:asl2.0)))
ca98e448
JL
9057
9058(define-public java-fest-assert
9059 (package
9060 (name "java-fest-assert")
9061 (version "2.0M10")
9062 (source (origin
9063 (method url-fetch)
9064 (uri (string-append "https://github.com/alexruiz/fest-assert-2.x/"
9065 "archive/fest-assert-core-" version ".tar.gz"))
9066 (sha256
9067 (base32
9068 "1bi0iqavikzww6rxvz5jyg7y6bflv95s6ibryxx0xfcxrrw6i5lw"))))
9069 (build-system ant-build-system)
9070 (arguments
9071 `(#:jar-name "java-fest-assert.jar"
9072 #:source-dir "src/main/java"
9073 #:test-exclude
9074 (list
9075 "**/Abstract*.java"
9076 "**/*BaseTest.java"
9077 ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses
9078 "**/MessageFormatter_format_Test.java"
9079 "**/internal/*/*_assert*_Test.java")))
9080 (inputs
9081 `(("java-fest-util" ,java-fest-util)))
9082 (native-inputs
9083 `(("java-junit" ,java-junit)
9084 ("java-fest-test" ,java-fest-test)
9085 ("java-hamcrest-core" ,java-hamcrest-core)
9086 ("java-mockito" ,java-mockito-1)
9087 ("java-cglib" ,java-cglib)
9088 ("java-objenesis" ,java-objenesis)
9089 ("java-asm" ,java-asm)))
9090 (home-page "https://github.com/alexruiz/fest-assert-2.x")
9091 (synopsis "FEST fluent assertions")
9092 (description "FEST-Assert provides a fluent interface for assertions.")
9093 (license license:asl2.0)))
0442d897
JL
9094
9095(define-public java-testng
9096 (package
9097 (name "java-testng")
3422e10e 9098 (version "6.14.3")
0442d897 9099 (source (origin
36b39d16
RW
9100 (method git-fetch)
9101 (uri (git-reference
9102 (url "https://github.com/cbeust/testng.git")
9103 (commit version)))
9104 (file-name (string-append name "-" version "-checkout"))
0442d897
JL
9105 (sha256
9106 (base32
3422e10e 9107 "0y6vq30i5g276kw0v2bhbvci22ijg7ax49ap2611yqlhbs4d6dqv"))))
0442d897
JL
9108 (build-system ant-build-system)
9109 (arguments
9110 `(#:jdk ,icedtea-8; java.util.function
9111 #:jar-name "java-testng.jar"
9112 #:source-dir "src/main/java"
9113 #:phases
9114 (modify-phases %standard-phases
36b39d16
RW
9115 ;; FIXME: I don't know why these tests fail
9116 (add-after 'unpack 'delete-failing-tests
9117 (lambda _
9118 (substitute* "src/test/resources/testng.xml"
9119 (("<class name=\"test.configuration.github1625.TestRunnerIssue1625\"/>") "")
9120 (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") ""))
9121 #t))
9122 ;; We don't have groovy
9123 (add-after 'unpack 'delete-groovy-tests
9124 (lambda _
9125 (delete-file-recursively "src/test/java/test/dependent/issue1648/")
9126 (substitute* "src/test/resources/testng.xml"
9127 (("<class name=\"test.dependent.issue1648.TestRunner\"/>") ""))
9128 #t))
0442d897
JL
9129 (add-before 'build 'copy-resources
9130 (lambda _
9131 (copy-recursively "src/main/resources" "build/classes")
9132 #t))
9133 (add-before 'check 'copy-test-resources
9134 (lambda _
9135 (copy-recursively "src/test/resources" "build/test-classes")
9136 #t))
9137 (replace 'check
9138 (lambda _
2c8ac364 9139 (invoke "ant" "compile-tests")
0442d897
JL
9140 ;; we don't have groovy
9141 (substitute* "src/test/resources/testng.xml"
9142 (("<class name=\"test.groovy.GroovyTest\" />") ""))
2c8ac364
MW
9143 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
9144 ":build/classes"
9145 ":build/test-classes")
9146 "-Dtest.resources.dir=src/test/resources"
9147 "org.testng.TestNG" "src/test/resources/testng.xml"))))))
0442d897
JL
9148 (propagated-inputs
9149 `(("junit" ,java-junit)
9150 ("java-jsr305" ,java-jsr305)
9151 ("java-bsh" ,java-bsh)
9152 ("java-jcommander" ,java-jcommander)
9153 ("java-guice" ,java-guice)
9154 ("snakeyaml" ,java-snakeyaml)))
9155 (native-inputs
9156 `(("guava" ,java-guava)
9157 ("java-javax-inject" ,java-javax-inject)
9158 ("java-hamcrest" ,java-hamcrest-all)
9159 ("java-assertj" ,java-assertj)
36b39d16 9160 ("java-mockito" ,java-mockito-1)
0442d897
JL
9161 ("cglib" ,java-cglib)
9162 ("asm" ,java-asm)
9163 ("aopalliance" ,java-aopalliance)))
9164 (home-page "http://testng.org")
9165 (synopsis "Testing framework")
9166 (description "TestNG is a testing framework inspired from JUnit and NUnit
9167but introducing some new functionalities that make it more powerful and easier
9168to use.")
9169 (license license:asl2.0)))
1717a7de
JL
9170
9171(define-public java-jnacl
3e87923a
RW
9172 (let ((commit "094e819afdd63ea81a499b3bcb42a271006bebd9")
9173 (revision "2"))
9174 (package
9175 (name "java-jnacl")
9176 (version (string-append "0.1.0-" revision "." (string-take commit 7)))
9177 (source (origin
9178 (method git-fetch)
9179 (uri (git-reference
9180 (url "https://github.com/neilalexander/jnacl.git")
9181 (commit commit)))
6c34ad73 9182 (file-name (git-file-name name version))
3e87923a
RW
9183 (sha256
9184 (base32
9185 "1d6g6xhn83byv5943n7935wwjsk0ibk0qdvqgr699qqgqqmwisbb"))))
9186 (build-system ant-build-system)
9187 (arguments
8c7d32e0 9188 `(#:jar-name "jnacl.jar"
3e87923a
RW
9189 #:source-dir "src/main/java"
9190 #:jdk ,icedtea-8
9191 #:phases
9192 (modify-phases %standard-phases
9193 (add-before 'build 'fix-tests
9194 (lambda _
9195 (substitute* '("src/test/java/com/neilalexander/jnacl/NaClTest.java"
9196 "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java")
9197 (("assertions.Assertions") "assertions.api.Assertions"))
9198 #t))
9199 (replace 'check
9200 (lambda _
9201 (invoke "ant" "compile-tests")
9202 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
9203 ":build/classes"
9204 ":build/test-classes")
9205 "org.testng.TestNG" "-testclass"
9206 "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class")
9207 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
9208 ":build/classes"
9209 ":build/test-classes")
9210 "org.testng.TestNG" "-testclass"
2c8ac364 9211 "build/test-classes/com/neilalexander/jnacl/NaClTest.class"))))))
3e87923a
RW
9212 (native-inputs
9213 `(("java-testng" ,java-testng)
9214 ("java-fest-util" ,java-fest-util)
9215 ("java-fest-assert" ,java-fest-assert)))
9216 (home-page "https://github.com/neilalexander/jnacl")
9217 (synopsis "Java implementation of NaCl")
9218 (description "Pure Java implementation of the NaCl: Networking and
1717a7de 9219Cryptography library.")
3e87923a 9220 (license license:bsd-2))))
eaf3cb7a
JL
9221
9222(define-public java-mvel2
9223 (package
9224 (name "java-mvel2")
9225 (version "2.3.1")
9226 (source (origin
9227 (method url-fetch)
9228 (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-"
9229 version ".Final.tar.gz"))
9230 (sha256
9231 (base32
9232 "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z"))))
9233 (build-system ant-build-system)
9234 (arguments
9235 `(#:jar-name "mvel2.jar"
9236 #:source-dir "src/main/java"
9237 #:test-exclude
9238 (list "**/Abstract*.java"
9239 ;; Base class with no tests
9240 "**/MVELThreadTest.java")
9241 #:phases
9242 (modify-phases %standard-phases
9243 (add-after 'install 'install-bin
9244 (lambda* (#:key outputs #:allow-other-keys)
9245 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
9246 (mkdir-p bin)
9247 (with-output-to-file (string-append bin "/mvel2")
9248 (lambda _
9249 (display
9250 (string-append
9251 "#!" (which "bash") "\n"
9252 "if [ \"$#\" -ne \"2\" ]; then\n"
9253 "echo 'Usage: mvel2 <script> <out.dir>'\n"
9254 "exit\n"
9255 "fi\n"
9256 "java -Dout.dir=$2 -cp " (getenv "CLASSPATH")
9257 ":" (assoc-ref outputs "out") "/share/java/mvel2.jar"
9258 " org.mvel2.sh.Main $1"))))
9259 (chmod (string-append bin "/mvel2") #o755))
9260 #t)))))
9261 (native-inputs
9262 `(("junit" ,java-junit)
9263 ("hamcrest" ,java-hamcrest-core)))
9264 (home-page "https://github.com/mvel/mvel")
9265 (synopsis "MVFLEX Expression Language")
9266 (description "MVEL has largely been inspired by Java syntax, but has some
9267fundamental differences aimed at making it more efficient as an expression
9268language, such as operators that directly support collection, array and string
9269matching, as well as regular expressions. MVEL is used to evaluate expressions
9270written using Java syntax.
9271
9272In addition to the expression language, MVEL serves as a templating language for
9273configuration and string construction.")
9274 (license license:asl2.0)))
d54d7d31 9275
9e325e8c
RW
9276(define-public java-commons-jexl-2
9277 (package
9278 (name "java-commons-jexl")
9279 (version "2.1.1")
9280 (source (origin
9281 (method url-fetch)
9282 (uri (string-append "mirror://apache/commons/jexl/source/"
9283 "commons-jexl-" version "-src.tar.gz"))
9284 (sha256
9285 (base32
9286 "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz"))))
9287 (build-system ant-build-system)
9288 (arguments
9289 `(#:jar-name "commons-jexl-2.jar"
9290 #:jdk ,icedtea-8
9291 #:source-dir "src/main/java"
9292 #:phases
9293 (modify-phases %standard-phases
9294 (add-before 'check 'disable-broken-tests
9295 (lambda* (#:key inputs #:allow-other-keys)
9296 (with-directory-excursion "src/test/java/org/apache/commons/jexl2/"
9297 (substitute* "ArithmeticTest.java"
9298 (("asserter.assertExpression\\(\"3 / 0\"") "//")
9299 (("asserter.assertExpression\\(\"imanull") "//"))
9300 ;; This test fails with "ambiguous method invocation"
9301 (delete-file "CacheTest.java")
9302 ;; This test doesn't have access to the temp directory
9303 (substitute* "ClassCreatorTest.java"
9304 (("java.io.tmpdir") "user.dir"))
9305 ;; This test fails in trying to detect whether it can run.
9306 (substitute* "ClassCreator.java"
9307 (("boolean canRun =.*") "boolean canRun = false;\n"))
9308 ;; ...and these tests depend on it.
9309 (delete-file "scripting/JexlScriptEngineOptionalTest.java")
9310 (delete-file "scripting/JexlScriptEngineTest.java"))
9311 #t))
9312 (add-before 'build 'run-javacc
9313 (lambda _
9314 (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/"
080d0b60
RW
9315 (invoke "java" "jjtree" "Parser.jjt")
9316 (invoke "java" "javacc" "Parser.jj"))
9317 #t)))))
9e325e8c
RW
9318 (inputs
9319 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
9320 (native-inputs
9321 `(("java-junit" ,java-junit)
9322 ("java-hamcrest-core" ,java-hamcrest-core)
9323 ("javacc" ,javacc-4)))
9324 (home-page "https://commons.apache.org/proper/commons-jexl/")
9325 (synopsis "Java Expression Language ")
9326 (description "JEXL is a library intended to facilitate the implementation
9327of dynamic and scripting features in applications and frameworks written in
9328Java. JEXL implements an Expression Language based on some extensions to the
9329JSTL Expression Language supporting most of the constructs seen in
9330shell-script or ECMAScript. Its goal is to expose scripting features usable
9331by technical operatives or consultants working with enterprise platforms.")
9332 (license license:asl2.0)))
9333
d54d7d31
JL
9334(define-public java-lz4
9335 (package
9336 (name "java-lz4")
9337 (version "1.4.0")
9338 (source (origin
9339 (method url-fetch)
9340 (uri (string-append "https://github.com/lz4/lz4-java/archive/"
9341 version ".tar.gz"))
9342 (file-name (string-append name "-" version ".tar.gz"))
9343 (sha256
9344 (base32
9345 "096dm57p2lzqk28n0j2p52x2j3cvnsd2dfqn43n7vbwrkjsy7y54"))))
9346 (build-system ant-build-system)
9347 (arguments
9348 `(#:jar-name "lz4.jar"
9349 #:jdk ,icedtea-8
9350 #:source-dir "src/java:src/java-unsafe"
9351 #:tests? #f; FIXME: requires more dependencies
9352 #:phases
9353 (modify-phases %standard-phases
9354 (add-before 'configure 'generate-source
9355 (lambda _
9356 (with-directory-excursion "src/build/source_templates"
1b6bc516
RW
9357 (invoke "mvel2" "../gen_sources.mvel" "../../java"))
9358 #t)))))
d54d7d31
JL
9359 (native-inputs
9360 `(("mvel" ,java-mvel2)))
9361 (home-page "https://jpountz.github.io/lz4-java")
9362 (synopsis "Compression algorithm")
9363 (description "LZ4 - Java is a Java port of the popular lz4 compression
9364algorithms and xxHash hashing algorithm.")
9365 (license license:asl2.0)))
62315865 9366
50d70a72 9367(define-public java-bouncycastle
62315865 9368 (package
50d70a72 9369 (name "java-bouncycastle")
248a9e16 9370 (version "1.60")
62315865
JL
9371 (source (origin
9372 (method url-fetch)
50d70a72 9373 (uri (string-append "https://github.com/bcgit/bc-java/archive/r"
248a9e16 9374 (substring version 0 1) "v"
50d70a72 9375 (substring version 2 4) ".tar.gz"))
62315865
JL
9376 (sha256
9377 (base32
248a9e16 9378 "0v434513y708qc87k4xz13p2kzydc736lk3ks67df9mg11s7hchv"))
50d70a72
JL
9379 (modules '((guix build utils)))
9380 (snippet
9381 '(begin
9382 (for-each delete-file
9383 (find-files "." "\\.jar$"))
9384 #t))))
62315865
JL
9385 (build-system ant-build-system)
9386 (arguments
50d70a72 9387 `(#:jdk ,icedtea-8
0c68f7fd 9388 #:tests? #f
62315865
JL
9389 #:phases
9390 (modify-phases %standard-phases
50d70a72 9391 (replace 'build
62315865 9392 (lambda _
50d70a72 9393 (invoke "ant" "-f" "ant/jdk15+.xml" "build-provider")
2c8ac364 9394 (invoke "ant" "-f" "ant/jdk15+.xml" "build")))
0c68f7fd
RW
9395 ;; FIXME: the tests freeze.
9396 ;; (replace 'check
9397 ;; (lambda _
9398 ;; (invoke "ant" "-f" "ant/jdk15+.xml" "test")))
50d70a72
JL
9399 (replace 'install
9400 (install-jars "build/artifacts/jdk1.5/jars")))))
9401 (inputs
9402 `(("java-javax-mail" ,java-javax-mail)))
31208367
JL
9403 (native-inputs
9404 `(("unzip" ,unzip)
50d70a72
JL
9405 ("junit" ,java-junit)
9406 ("java-native-access" ,java-native-access)
9407 ("java-native-access-platform" ,java-native-access-platform)))
31208367
JL
9408 (home-page "https://www.bouncycastle.org")
9409 (synopsis "Cryptographic library")
50d70a72
JL
9410 (description "Bouncy Castle is a cryptographic library for the Java
9411programming language.")
31208367 9412 (license license:expat)))
a53d9ac0
JL
9413
9414(define-public java-lmax-disruptor
9415 (package
9416 (name "java-lmax-disruptor")
9417 (version "3.3.7")
9418 (source (origin
9419 (method url-fetch)
9420 (uri (string-append "https://github.com/LMAX-Exchange/disruptor/"
9421 "archive/" version ".tar.gz"))
9422 (file-name (string-append name "-" version ".tar.gz"))
9423 (sha256
9424 (base32
9425 "17da2gwj5abnlsfgn2xqjk5lgzbg4vkb0hdv2dvc8r2fx4bi7w3g"))))
9426 (build-system ant-build-system)
9427 (arguments
9428 `(#:jar-name "java-lmax-disruptor.jar"
9429 #:jdk ,icedtea-8
9430 #:tests? #f)); tests hang
9431 (inputs
9432 `(("junit" ,java-junit)
9433 ("java-hdrhistogram" ,java-hdrhistogram)
9434 ("java-jmock" ,java-jmock)
9435 ("java-jmock-legacy" ,java-jmock-legacy)
9436 ("java-jmock-junit4" ,java-jmock-junit4)
9437 ("java-hamcrest-all" ,java-hamcrest-all)))
9438 (native-inputs
9439 `(("cglib" ,java-cglib)
9440 ("objenesis" ,java-objenesis)
9441 ("asm" ,java-asm)))
9442 (home-page "https://www.lmax.com/disruptor")
9443 (synopsis "High performance inter-thread communication")
9444 (description "LMAX Disruptor is a software pattern and software component
9445for high performance inter-thread communication that avoids the need for
9446message queues or resource locking.")
9447 (license license:asl2.0)))
5619556b 9448
5e3abfc8
RW
9449(define-public java-commons-bcel
9450 (package
9451 (name "java-commons-bcel")
9452 (version "6.1")
9453 (source (origin
9454 (method url-fetch)
9455 (uri (string-append "mirror://apache/commons/bcel/source/bcel-"
9456 version "-src.tar.gz"))
9457 (sha256
9458 (base32
9459 "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy"))))
9460 (build-system ant-build-system)
9461 (arguments
9462 `(#:jar-name "bcel.jar"
9463 #:jdk ,icedtea-8
9464 #:source-dir "src/main/java"
9465 #:test-dir "src/test/java"
9466 ;; FIXME: Tests require the unpackaged jna.
9467 #:tests? #f))
9468 (home-page "https://commons.apache.org/proper/commons-bcel/")
9469 (synopsis "Byte code engineering library")
9470 (description "The Byte Code Engineering Library (Apache Commons BCEL) is
9471intended to give users a convenient way to analyze, create, and
9472manipulate (binary) Java class files. Classes are represented by objects
9473which contain all the symbolic information of the given class: methods, fields
9474and byte code instructions, in particular.
9475
9476Such objects can be read from an existing file, be transformed by a
9477program (e.g. a class loader at run-time) and written to a file again. An
9478even more interesting application is the creation of classes from scratch at
9479run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful
9480if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format
9481of Java @code{.class} files.")
9482 (license license:asl2.0)))
9483
5619556b
JL
9484(define-public java-xerial-core
9485 (package
9486 (name "java-xerial-core")
9487 (version "2.1")
9488 (source (origin
9489 (method url-fetch)
9490 (uri (string-append "https://github.com/xerial/xerial-java/archive/"
9491 version ".tar.gz"))
9492 (file-name (string-append name "-" version ".tar.gz"))
9493 (sha256
9494 (base32
9495 "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d"))))
9496 (build-system ant-build-system)
9497 (arguments
9498 `(#:jar-name "xerial-core.jar"
9499 #:source-dir "xerial-core/src/main/java"
9500 #:test-dir "xerial-core/src/test"
9501 #:phases
9502 (modify-phases %standard-phases
9503 (add-before 'build 'copy-resources
9504 (lambda _
9505 (copy-recursively "xerial-core/src/main/resources"
9506 "build/classes")
9507 #t)))))
9508 (native-inputs
9509 `(("junit" ,java-junit)
9510 ("hamcrest" ,java-hamcrest-core)))
9511 (home-page "https://github.com/xerial/xerial-java")
f4548394 9512 (synopsis "Data management libraries for Java")
5619556b 9513 (description "Xerial is a set of data management libraries for the Java
f4548394 9514programming language. The ultimate goal of the Xerial project is to manage
5619556b
JL
9515everything as database, including class objects, text format data, data
9516streams, etc.")
9517 (license license:asl2.0)))
8d6a4815
JL
9518
9519(define-public java-powermock-reflect
9520 (package
9521 (name "java-powermock-reflect")
9522 (version "1.7.3")
9523 (source (origin
9524 (method url-fetch)
9525 (uri (string-append "https://github.com/powermock/powermock/"
9526 "archive/powermock-" version ".tar.gz"))
9527 (file-name (string-append name "-" version ".tar.gz"))
9528 (sha256
9529 (base32
9530 "0sbgi5vqq7k72wzcdjb20s370vyd4hsbnx71pzb8ishml3gy7fwy"))
9531 (patches
9532 (search-patches "java-powermock-fix-java-files.patch"))))
9533 (build-system ant-build-system)
9534 (arguments
9535 `(#:jar-name "java-powermock-reflect.jar"
9536 #:jdk ,icedtea-8
9537 #:source-dir "powermock-reflect/src/main/java"
9538 #:test-dir "powermock-reflect/src/test"))
9539 (inputs
9540 `(("java-objenesis" ,java-objenesis)))
9541 (native-inputs
9542 `(("junit" ,java-junit)
9543 ("cglib" ,java-cglib)
9544 ("asm" ,java-asm)
9545 ("hamcrest" ,java-hamcrest-core)
9546 ("assertj" ,java-assertj)))
9547 (home-page "https://github.com/powermock/powermock")
9548 (synopsis "Mock library extension framework")
9549 (description "PowerMock is a framework that extends other mock libraries
9550such as EasyMock with more powerful capabilities. PowerMock uses a custom
9551classloader and bytecode manipulation to enable mocking of static methods,
9552constructors, final classes and methods, private methods, removal of static
9553initializers and more. By using a custom classloader no changes need to be
9554done to the IDE or continuous integration servers which simplifies adoption.")
9555 (license license:asl2.0)))
d4a4d5da
JL
9556
9557(define-public java-powermock-core
9558 (package
9559 (inherit java-powermock-reflect)
9560 (name "java-powermock-core")
9561 (arguments
9562 `(#:jar-name "java-powermock-core.jar"
9563 #:source-dir "powermock-core/src/main/java"
9564 #:test-dir "powermock-core/src/test"
9565 #:tests? #f; requires powermock-api
59e0021c
JL
9566 #:jdk ,icedtea-8
9567 #:phases
9568 (modify-phases %standard-phases
9569 (add-before 'build 'copy-resources
9570 (lambda _
9571 (copy-recursively "powermock-core/src/main/resources"
2c8ac364
MW
9572 "build/classes")
9573 #t)))))
d4a4d5da
JL
9574 (inputs
9575 `(("reflect" ,java-powermock-reflect)
9576 ("javassist" ,java-jboss-javassist)))
9577 (native-inputs
9578 `(("junit" ,java-junit)
9579 ("assertj" ,java-assertj)
9580 ("mockito" ,java-mockito-1)))))
2d5d65d7
JL
9581
9582(define-public java-powermock-api-support
9583 (package
9584 (inherit java-powermock-reflect)
9585 (name "java-powermock-api-support")
9586 (build-system ant-build-system)
9587 (arguments
9588 `(#:jar-name "java-powermock-api-support.jar"
9589 #:jdk ,icedtea-8
9590 #:source-dir "powermock-api/powermock-api-support/src/main/java"
9591 #:tests? #f)); no tests
9592 (inputs
9593 `(("core" ,java-powermock-core)
9594 ("reflect" ,java-powermock-reflect)))))
6c21d46c
JL
9595
9596(define-public java-powermock-modules-junit4-common
9597 (package
9598 (inherit java-powermock-reflect)
9599 (name "java-powermock-modules-junit4-common")
9600 (build-system ant-build-system)
9601 (arguments
9602 `(#:jar-name "java-powermock-modules-junit4-common.jar"
9603 #:jdk ,icedtea-8
9604 #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java"
9605 #:test-dir "powermock-modules/powermock-module-junit4-common/src/test"))
9606 (inputs
9607 `(("core" ,java-powermock-core)
9608 ("easymock" ,java-easymock)
9609 ("reflect" ,java-powermock-reflect)
9610 ("hamcrest" ,java-hamcrest-core)
9611 ("cglib" ,java-cglib)))))
33db1681
JL
9612
9613(define-public java-powermock-modules-junit4
9614 (package
9615 (inherit java-powermock-reflect)
9616 (name "java-powermock-modules-junit4")
9617 (build-system ant-build-system)
9618 (arguments
9619 `(#:jar-name "java-powermock-modules-junit4.jar"
9620 #:jdk ,icedtea-8
9621 #:source-dir "powermock-modules/powermock-module-junit4/src/main/java"
1124683d
JL
9622 #:test-dir "powermock-modules/powermock-module-junit4/src/test"
9623 #:phases
9624 (modify-phases %standard-phases
9625 (add-before 'build 'fix-junit-detection
9626 (lambda _
9627 ;; Our junit version is 4.12-SNAPSHOT
9628 (substitute* (find-files "powermock-modules/powermock-module-junit4"
9629 "PowerMockJUnit4MethodValidator.java")
2c8ac364
MW
9630 (("4.12") "4.12-SNAPSHOT"))
9631 #t)))))
33db1681
JL
9632 (inputs
9633 `(("core" ,java-powermock-core)
9634 ("reflect" ,java-powermock-reflect)
9635 ("common" ,java-powermock-modules-junit4-common)
9636 ("cglib" ,java-cglib)))
9637 (native-inputs
9638 `(("easymock" ,java-easymock)
9639 ("hamcrest" ,java-hamcrest-core)
9640 ("objenesis" ,java-objenesis)
9641 ("asm" ,java-asm)
9642 ("junit" ,java-junit)))))
4d508975
JL
9643
9644(define-public java-powermock-api-easymock
9645 (package
9646 (inherit java-powermock-reflect)
9647 (name "java-powermock-api-easymock")
9648 (build-system ant-build-system)
9649 (arguments
9650 `(#:jar-name "java-powermock-api-easymock.jar"
9651 #:jdk ,icedtea-8
9652 #:source-dir "powermock-api/powermock-api-easymock/src/main/java"
9653 #:tests? #f; no tests
9654 #:phases
9655 (modify-phases %standard-phases
9656 (add-before 'build 'fix-file
9657 (lambda _
9658 ;; FIXME: This looks wrong, but it fixes a build error.
9659 (with-directory-excursion "powermock-api/powermock-api-easymock"
9660 (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java"
9661 (("classLoader instanceof MockClassLoader") "false")
9662 (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";")))
9663 #t)))))
9664 (inputs
9665 `(("core" ,java-powermock-core)
9666 ("easymock" ,java-easymock)
9667 ("reflect" ,java-powermock-reflect)
9668 ("support" ,java-powermock-api-support)
9669 ("cglib" ,java-cglib)))))
5fb3e822
JL
9670
9671(define-public java-jboss-jms-api-spec
9672 (package
9673 (name "java-jboss-jms-api-spec")
9674 (version "2.0")
9675 (source (origin
9676 (method url-fetch)
9677 (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/"
9678 "archive/jboss-jms-api_" version
9679 "_spec-1.0.1.Final.tar.gz"))
9680 (sha256
9681 (base32
9682 "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m"))))
9683 (build-system ant-build-system)
9684 (arguments
9685 `(#:jar-name "java-jboss-jms-api_spec.jar"
9686 #:jdk ,icedtea-8
9687 #:source-dir "."
9688 #:tests? #f)); no tests
9689 (home-page "https://github.com/jboss/jboss-jms-api_spec")
9690 (synopsis "Java Message Service API specification")
9691 (description "Java Message Service (JMS) API is used to send messages
9692messages between two or more clients. It is a messaging standard that allows
9693application components to create, send, receive, and read messages.")
9694 ; either gpl2 only with GPL Classpath Exception, or cddl.
9695 (license (list license:gpl2 license:cddl1.0))))
3ff47c66
JL
9696
9697(define-public java-mail
9698 (package
9699 (name "java-mail")
9700 (version "1.6.0")
9701 (source (origin
9702 (method url-fetch)
9703 (uri (string-append "https://github.com/javaee/javamail/archive/"
9704 "JAVAMAIL-1_6_0.tar.gz"))
9705 (sha256
9706 (base32
9707 "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92"))))
9708 (build-system ant-build-system)
9709 (arguments
9710 `(#:jar-name "java-mail.jar"
9711 #:jdk ,icedtea-8
9712 #:source-dir "mail/src/main/java"
9713 #:test-dir "mail/src/test"
9714 #:test-exclude
9715 (list "**/CollectorFormatterTest.java"
9716 "**/CompactFormatterTest.java"
9717 "**/DurationFilterTest.java"
9718 "**/MailHandlerTest.java"
9719 "**/GetLocalAddressTest.java"
9720 ;; FIXME: both end with:
9721 ;; java.lang.ClassNotFoundException:
9722 ;; javax.mail.internet.MimeMultipartParseTest
9723 "**/MimeMultipartParseTest.java"
9724 "**/SearchTermSerializationTest.java")
9725 #:phases
9726 (modify-phases %standard-phases
9727 (add-before 'configure 'move-version.java
9728 (lambda _
9729 (copy-file "mail/src/main/resources/javax/mail/Version.java"
218d1dde
RW
9730 "mail/src/main/java/javax/mail/Version.java")
9731 #t))
3ff47c66
JL
9732 (add-before 'build 'copy-resources
9733 (lambda _
9734 (copy-recursively "mail/src/main/resources/META-INF"
9735 "build/classes/META-INF")
9736 #t)))))
9737 (native-inputs
9738 `(("junit" ,java-junit)
9739 ("hamcrest" ,java-hamcrest-core)))
9740 (home-page "https://javaee.github.io/javamail/")
9741 (synopsis "Mail-related functionnalities in Java")
9742 (description "The JavaMail API provides a platform-independent and
9743protocol-independent framework to build mail and messaging applications.")
9744 ;; General Public License Version 2 only ("GPL") or the Common Development
9745 ;; and Distribution License("CDDL")
9746 (license (list license:cddl1.1
9747 license:gpl2)))); with classpath exception
217b20e4
JL
9748
9749(define-public java-jeromq
9750 (package
9751 (name "java-jeromq")
4aa0a1df 9752 (version "0.4.3")
217b20e4 9753 (source (origin
4aa0a1df
RW
9754 (method git-fetch)
9755 (uri (git-reference
9756 (url "https://github.com/zeromq/jeromq.git")
9757 (commit (string-append "v" version))))
9758 (file-name (string-append name "-" version "-checkout"))
217b20e4
JL
9759 (sha256
9760 (base32
594bd3a0
GB
9761 "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj"))
9762 (patches (search-patches "java-jeromq-fix-tests.patch"))))
217b20e4
JL
9763 (build-system ant-build-system)
9764 (arguments
9765 `(#:jar-name "java-jeromq.jar"
9766 #:source-dir "src/main/java"
9767 #:jdk ,icedtea-8
9768 #:test-exclude
9769 (list
9770 "**/Abstract*.java"
9771 ;; Requires network
9772 "**/ZBeaconTest.java"
9773 ;; Failures
4aa0a1df 9774 "**/DealerSpecTest.java"
217b20e4 9775 "**/CustomDecoderTest.java"
594bd3a0
GB
9776 "**/CustomEncoderTest.java"
9777 "**/ConnectRidTest.java"
9778 "**/ReqSpecTest.java"
9779 "**/PushPullSpecTest.java"
9780 "**/PubSubHwmTest.java"
9781 "**/RouterSpecTest.java"
9782 "**/ProxyTest.java")))
217b20e4
JL
9783 (inputs
9784 `(("java-jnacl" ,java-jnacl)))
9785 (native-inputs
9786 `(("java-hamcrest-core" ,java-hamcrest-core)
9787 ("junit" ,java-junit)))
9788 (home-page "http://zeromq.org/bindings:java")
9789 (synopsis "Java binding for 0MQ")
9790 (description "Jeromq provides the java bindings for 0MQ.")
9791 (license license:mpl2.0)))
46c6905a
JL
9792
9793(define-public java-kafka-clients
9794 (package
9795 (name "java-kafka-clients")
9796 (version "1.0.0")
9797 (source (origin
9798 (method url-fetch)
9799 (uri (string-append "mirror://apache/kafka/" version "/kafka-"
9800 version "-src.tgz"))
9801 (sha256
9802 (base32
9803 "1yxmnsmliwm7671q5yy9bl4jdqyyn00n26cggz9brwczx80w1vfq"))))
9804 (build-system ant-build-system)
9805 (arguments
9806 `(#:jar-name "java-kafka-clients.jar"
9807 #:jdk ,icedtea-8
9808 #:source-dir "clients/src/main/java"
9809 #:test-dir "clients/src/test"
9810 #:test-exclude
9811 (list
9812 ;; This file does not contain a class
9813 "**/IntegrationTest.java"
9814 ;; Requires network
9815 "**/ClientUtilsTest.java"
9816 ;; End with errors that seem related to our powermock
9817 "**/KafkaProducerTest.java"
9818 "**/BufferPoolTest.java")))
9819 (inputs
9820 `(("java-slf4j-api" ,java-slf4j-api)
9821 ("java-lz4" ,java-lz4)))
9822 (native-inputs
9823 `(("junit" ,java-junit)
9824 ("hamcrest" ,java-hamcrest-all)
9825 ("objenesis" ,java-objenesis)
9826 ("asm" ,java-asm)
9827 ("cglib" ,java-cglib)
9828 ("javassist" ,java-jboss-javassist)
9829 ("snappy" ,java-snappy)
9830 ("easymock" ,java-easymock)
9831 ("powermock" ,java-powermock-core)
9832 ("powermock-easymock" ,java-powermock-api-easymock)
9833 ("powermock-junit4-common" ,java-powermock-modules-junit4-common)
9834 ("powermock-junit4" ,java-powermock-modules-junit4)
9835 ("powermock-support" ,java-powermock-api-support)
50d70a72 9836 ("java-bouncycastle" ,java-bouncycastle)))
46c6905a
JL
9837 (home-page "https://kafka.apache.org")
9838 (synopsis "Distributed streaming platform")
9839 (description "Kafka is a distributed streaming platform, which means:
9840@itemize
9841@item it can publish and subscribe to streams of records;
9842@item it can store streams of records in a fault-tolerant way;
9843@item it can process streams of records as they occur.
9844@end itemize")
9845 ;; Either cddl or gpl2 only.
9846 (license (list license:cddl1.1; actually cddl1.1
9847 license:gpl2)))); with classpath exception
0b54e190
JL
9848
9849(define-public java-jdom
9850 (package
9851 (name "java-jdom")
9852 (version "1.1.3")
9853 (source (origin
9854 (method url-fetch)
9855 (uri (string-append "http://jdom.org/dist/binary/archive/jdom-"
9856 version ".tar.gz"))
9857 (sha256
9858 (base32
9859 "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl"))))
9860 (build-system ant-build-system)
9861 (arguments
9862 `(#:build-target "package"
9863 #:tests? #f; tests are run as part of the build process
9864 #:phases
9865 (modify-phases %standard-phases
9866 (replace 'install
9867 (install-jars "build")))))
9868 (home-page "http://jdom.org/")
9869 (synopsis "Access, manipulate, and output XML data")
9870 (description "Java-based solution for accessing, manipulating, and
9871outputting XML data from Java code.")
9872 (license license:bsd-4)))
78745d33
JL
9873
9874(define-public java-geronimo-xbean-reflect
9875 (package
9876 (name "java-geronimo-xbean-reflect")
9877 (version "4.5")
9878 (source (origin
9879 (method svn-fetch)
9880 (uri (svn-reference
9881 (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/")
9882 (revision 1807396)))
9883 (file-name (string-append name "-" version))
9884 (sha256
9885 (base32
9886 "18q3i6jgm6rkw8aysfgihgywrdc5nvijrwnslmi3ww497jvri6ja"))))
9887 (build-system ant-build-system)
9888 (arguments
9889 `(#:jar-name "geronimo-xbean-reflect.jar"
9890 #:source-dir "xbean-reflect/src/main/java"
9891 #:test-dir "xbean-reflect/src/test"
9892 #:jdk ,icedtea-8
9893 #:test-exclude
9894 (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java"
9895 "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java"
9896 "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java")
9897 #:phases
9898 (modify-phases %standard-phases
9899 (add-before 'build 'fix-source
9900 (lambda _
9901 (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/"))
9902 ;; org.apache.xbean.asm6 is actually repackaged java-asm
9903 (substitute* (string-append dir "XbeanAsmParameterNameLoader.java")
9904 (("org.apache.xbean.asm5") "org.objectweb.asm"))
9905 #t))))))
9906 (inputs
9907 `(("asm" ,java-asm)
9908 ("log4j" ,java-log4j-api)
9909 ("log4j-1.2" ,java-log4j-1.2-api)
9910 ("log4j-core" ,java-log4j-core)
9911 ("logging" ,java-commons-logging-minimal)))
9912 (native-inputs
9913 `(("junit" ,java-junit)))
9914 (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/")
9915 (synopsis "Dependency injection helper")
9916 (description "Xbean-reflect provides very flexible ways to create objects
9917and graphs of objects for dependency injection frameworks")
9918 (license license:asl2.0)))
09c44196 9919
3fda539b
JL
9920(define-public java-geronimo-xbean-bundleutils
9921 (package
9922 (inherit java-geronimo-xbean-reflect)
9923 (name "java-geronimo-xbean-bundleutils")
9924 (arguments
9925 `(#:jar-name "geronimo-xbean-bundleutils.jar"
9926 #:source-dir "xbean-bundleutils/src/main/java"
9927 #:test-dir "xbean-bundleutils/src/test"
9928 #:phases
9929 (modify-phases %standard-phases
9930 (add-before 'build 'fix-java
9931 (lambda _
9932 ;; We use a more recent version of osgi, so this file requires
9933 ;; more interface method implementations.
9934 (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java"
9935 (("import org.osgi.framework.ServiceRegistration;")
9936 "import org.osgi.framework.ServiceRegistration;
9937import org.osgi.framework.ServiceFactory;
9938import java.util.Collection;
9939import org.osgi.framework.ServiceObjects;")
9940 (("public Bundle getBundle\\(\\)")
9941 "@Override
9942public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) {
9943 throw new UnsupportedOperationException();
9944}
9945@Override
9946public <S> ServiceRegistration<S> registerService(Class<S> clazz,
9947 ServiceFactory<S> factory, Dictionary<String, ?> properties) {
9948 throw new UnsupportedOperationException();
9949}
9950public Bundle getBundle()"))
9951 #t)))))
9952 (inputs
9953 `(("java-slf4j" ,java-slf4j-api)
9954 ("java-asm" ,java-asm)
9955 ("java-osgi-framework" ,java-osgi-framework)
9956 ("java-eclipse-osgi" ,java-eclipse-osgi)
9957 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)))))
0cb9ce32
JL
9958
9959(define-public java-geronimo-xbean-asm-util
9960 (package
9961 (inherit java-geronimo-xbean-reflect)
9962 (name "java-geronimo-xbean-asm-util")
9963 (arguments
9964 `(#:jar-name "geronimo-xbean-asm-util.jar"
9965 #:source-dir "xbean-asm-util/src/main/java"
9966 #:tests? #f)); no tests
9967 (inputs
9968 `(("java-asm" ,java-asm)))
9969 (native-inputs '())))
8d510f65
JL
9970
9971(define-public java-geronimo-xbean-finder
9972 (package
9973 (inherit java-geronimo-xbean-reflect)
9974 (name "java-geronimo-xbean-finder")
9975 (arguments
9976 `(#:jar-name "geronimo-xbean-finder.jar"
9977 #:source-dir "xbean-finder/src/main/java"
9978 #:test-dir "xbean-finder/src/test"))
9979 (inputs
9980 `(("java-slf4j-api" ,java-slf4j-api)
9981 ("java-asm" ,java-asm)
9982 ("java-geronimo-xbean-bundleutils" ,java-geronimo-xbean-bundleutils)
9983 ("java-geronimo-xbean-asm-util" ,java-geronimo-xbean-asm-util)
9984 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)
9985 ("java-osgi-framework" ,java-osgi-framework)))
9986 (native-inputs
9987 `(("java-junit" ,java-junit)
9988 ("java-hamcrest-core" ,java-hamcrest-core)))))
3fda539b 9989
09c44196
JL
9990(define-public java-gson
9991 (package
9992 (name "java-gson")
9993 (version "2.8.2")
9994 (source (origin
9995 (method url-fetch)
9996 (uri (string-append "https://github.com/google/gson/archive/"
9997 "gson-parent-" version ".tar.gz"))
9998 (sha256
9999 (base32
10000 "1j4qnp7v046q0k48c4kyf69sxaasx2h949d3cqwsm3kzxms3x0f9"))))
10001 (build-system ant-build-system)
10002 (arguments
10003 `(#:jar-name "gson.jar"
10004 #:source-dir "gson/src/main/java"
10005 #:test-dir "gson/src/test"))
10006 (native-inputs
10007 `(("java-junit" ,java-junit)
10008 ("java-hamcrest-core" ,java-hamcrest-core)))
10009 (home-page "https://github.com/google/gson")
10010 (synopsis "Java serialization/deserialization library from/to JSON")
10011 (description "Gson is a Java library that can be used to convert Java
10012Objects into their JSON representation. It can also be used to convert a JSON
10013string to an equivalent Java object. Gson can work with arbitrary Java objects
10014including pre-existing objects that you do not have source-code of.")
10015 (license license:asl2.0)))
335aa20b
JL
10016
10017(define-public java-hawtjni
10018 (package
10019 (name "java-hawtjni")
10020 (version "1.15")
10021 (source (origin
10022 (method url-fetch)
10023 (uri (string-append "https://github.com/fusesource/hawtjni/archive/"
10024 "hawtjni-project-" version ".tar.gz"))
10025 (sha256
10026 (base32
10027 "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g"))))
10028 (build-system ant-build-system)
10029 (arguments
10030 `(#:jar-name "hawtjni.jar"
10031 #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java"
10032 #:tests? #f; no tests
10033 #:phases
10034 (modify-phases %standard-phases
10035 (add-before 'build 'build-native
10036 (lambda* (#:key inputs #:allow-other-keys)
6338ea9a
RW
10037 (let ((include (string-append "-I" (assoc-ref inputs "jdk") "/include/linux")))
10038 (with-directory-excursion "hawtjni-generator/src/main/resources/"
10039 (invoke "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o"
10040 "-fPIC" "-O2" include)
10041 (invoke "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o"
10042 "-fPIC" "-O2" include)
10043 (invoke "gcc" "-o" "libhawtjni.so" "-shared"
10044 "hawtjni.o" "hawtjni-callback.o")))
10045 #t))
335aa20b
JL
10046 (add-after 'install 'install-native
10047 (lambda* (#:key outputs #:allow-other-keys)
10048 (let* ((out (assoc-ref outputs "out"))
10049 (lib (string-append out "/lib"))
10050 (inc (string-append out "/include")))
335aa20b 10051 (with-directory-excursion "hawtjni-generator/src/main/resources/"
6338ea9a
RW
10052 (install-file "libhawtjni.so" lib)
10053 (install-file "hawtjni.h" inc)))
335aa20b
JL
10054 #t)))))
10055 (inputs
10056 `(("java-commons-cli" ,java-commons-cli)
10057 ("java-asm" ,java-asm)
10058 ("java-geronimo-xbean-finder" ,java-geronimo-xbean-finder)))
10059 (home-page "https://fusesource.github.io/hawtjni/")
10060 (synopsis "JNI code generator")
10061 (description "HawtJNI is a code generator that produces the JNI code needed
10062to implement Java native methods. It is based on the jnigen code generator
10063that is part of the SWT Tools project.")
10064 (license license:asl2.0)))
d0c62afa
JL
10065
10066(define-public java-jansi-native
10067 (package
10068 (name "java-jansi-native")
10069 (version "1.7")
10070 (source (origin
10071 (method url-fetch)
10072 (uri (string-append "https://github.com/fusesource/jansi-native/"
10073 "archive/jansi-native-" version ".tar.gz"))
10074 (sha256
10075 (base32
10076 "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf"))))
10077 (build-system ant-build-system)
10078 (arguments
10079 `(#:jar-name "jansi-native.jar"
10080 #:source-dir "src/main/java"
10081 #:tests? #f; no tests
10082 #:phases
10083 (modify-phases %standard-phases
10084 (add-before 'build 'build-native
10085 (lambda* (#:key inputs #:allow-other-keys)
10086 ;; there are more required files for windows in windows/
10087 (with-directory-excursion "src/main/native-package/src"
10088 (substitute* "jansi_ttyname.c"
10089 (("#include \"jansi_.*") ""))
e85c1bf6
RW
10090 (invoke "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o"
10091 (string-append "-I" (assoc-ref inputs "java-hawtjni")
10092 "/include")
10093 (string-append "-I" (assoc-ref inputs "jdk")
10094 "/include/linux")
10095 "-fPIC" "-O2")
2c8ac364 10096 (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o"))))
d0c62afa
JL
10097 (add-before 'build 'install-native
10098 (lambda _
10099 (let ((dir (string-append "build/classes/META-INF/native/"
10100 ,(match (%current-system)
10101 ((or "i686-linux" "armhf-linux")
10102 "linux32")
3c4103c8
LC
10103 ((or "x86_64-linux" "aarch64-linux"
10104 "mips64el-linux")
d0c62afa
JL
10105 "linux64")))))
10106 (install-file "src/main/native-package/src/libjansi.so" dir))
10107 #t))
10108 (add-after 'install 'install-native
10109 (lambda* (#:key outputs #:allow-other-keys)
d0c62afa
JL
10110 (install-file "src/main/native-package/src/jansi.h"
10111 (string-append (assoc-ref outputs "out") "/include"))
10112 #t)))))
10113 (inputs
10114 `(("java-hawtjni" ,java-hawtjni)))
10115 (home-page "https://fusesource.github.io/jansi/")
10116 (synopsis "Native library for jansi")
3d6925ef
RW
10117 (description "This package provides the native library for jansi, a small
10118Java library that allows you to use ANSI escape sequences to format your
10119console output.")
d0c62afa 10120 (license license:asl2.0)))
a87ea1ad
JL
10121
10122(define-public java-jansi
10123 (package
10124 (name "java-jansi")
10125 (version "1.16")
10126 (source (origin
10127 (method url-fetch)
10128 (uri (string-append "https://github.com/fusesource/jansi/archive/"
10129 "jansi-project-" version ".tar.gz"))
10130 (sha256
10131 (base32
10132 "11kh3144i3fzp21dpy8zg52mjmsr214k7km9p8ly0rqk2px0qq2z"))))
10133 (build-system ant-build-system)
10134 (arguments
10135 `(#:jar-name "jansi.jar"
10136 #:source-dir "jansi/src/main/java"
10137 #:test-dir "jansi/src/test"
10138 #:phases
10139 (modify-phases %standard-phases
10140 (add-after 'check 'clear-term
10141 (lambda _
2c8ac364 10142 (invoke "echo" "-e" "\\e[0m"))))))
a87ea1ad
JL
10143 (inputs
10144 `(("java-jansi-native" ,java-jansi-native)))
10145 (native-inputs
10146 `(("java-junit" ,java-junit)
10147 ("java-hamcrest-core" ,java-hamcrest-core)))
10148 (home-page "https://fusesource.github.io/jansi/")
10149 (synopsis "Portable ANSI escape sequences")
10150 (description "Jansi is a Java library that allows you to use ANSI escape
10151sequences to format your console output which works on every platform.")
10152 (license license:asl2.0)))
cc061329
JL
10153
10154(define-public java-jboss-el-api-spec
10155 (package
10156 (name "java-jboss-el-api-spec")
10157 (version "3.0")
10158 (source (origin
10159 (method url-fetch)
10160 (uri (string-append "https://github.com/jboss/jboss-el-api_spec/"
10161 "archive/jboss-el-api_" version
10162 "_spec-1.0.7.Final.tar.gz"))
10163 (sha256
10164 (base32
10165 "1j45ljxalwlibxl7g7iv952sjxkw275m8vyxxij8l6wdd5pf0pdh"))))
10166 (build-system ant-build-system)
10167 (arguments
10168 `(#:jar-name "java-jboss-el-api_spec.jar"
10169 #:jdk ,icedtea-8))
10170 (inputs
10171 `(("java-junit" ,java-junit)))
10172 (home-page "https://github.com/jboss/jboss-el-api_spec")
10173 (synopsis "JSR-341 expression language 3.0 API")
10174 (description "This package contains an implementation of the JSR-341
10175specification for the expression language 3.0. It implements an expression
10176language inspired by ECMAScript and XPath. This language is used with
10177JavaServer Pages (JSP).")
10178 ;; Either GPL2 only or CDDL.
10179 (license (list license:gpl2 license:cddl1.1))))
cc03a786
JL
10180
10181(define-public java-jboss-interceptors-api-spec
10182 (package
10183 (name "java-jboss-interceptors-api-spec")
10184 (version "1.2")
10185 (source (origin
10186 (method url-fetch)
10187 (uri (string-append "https://github.com/jboss/jboss-interceptors-api_spec/"
10188 "archive/jboss-interceptors-api_" version
10189 "_spec-1.0.0.Final.tar.gz"))
10190 (sha256
10191 (base32
10192 "0wv8x0jp9a5qxlrgkhb5jdk2gr6vi87b4j4kjb8ryxiy9gn8g51z"))))
10193 (build-system ant-build-system)
10194 (arguments
10195 `(#:jar-name "java-jboss-interceptors-api_spec.jar"
10196 #:jdk ,icedtea-8
10197 #:source-dir "."
10198 #:tests? #f)); no tests
10199 (home-page "https://github.com/jboss/jboss-interceptors-api_spec")
10200 (synopsis "Interceptors 1.2 API classes from JSR 318")
10201 (description "Java-jboss-interceptors-api-spec implements the Interceptors
10202API. Interceptors are used to interpose on business method invocations and
10203specific events.")
10204 ;; Either GPL2 only or CDDL.
10205 (license (list license:gpl2 license:cddl1.1))))
a10a451c
JL
10206
10207(define-public java-cdi-api
10208 (package
10209 (name "java-cdi-api")
10210 (version "2.0")
10211 (source (origin
10212 (method url-fetch)
10213 (uri (string-append "https://github.com/cdi-spec/cdi/archive/"
10214 version ".tar.gz"))
10215 (file-name (string-append name "-" version ".tar.gz"))
10216 (sha256
10217 (base32
10218 "1iv8b8bp07c5kmqic14jsr868vycjv4qv02lf3pkgp9z21mnfg5y"))))
10219 (build-system ant-build-system)
10220 (arguments
10221 `(#:source-dir "api/src/main/java"
10222 #:jar-name "java-cdi-api.jar"
10223 #:test-dir "api/src/test"
10224 #:jdk ,icedtea-8
10225 #:tests? #f)); Tests fail because we don't have a CDI provider yet
10226 (inputs
10227 `(("java-javax-inject" ,java-javax-inject)
10228 ("java-jboss-el-api-spec" ,java-jboss-el-api-spec)
10229 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)))
10230 (native-inputs
10231 `(("java-testng" ,java-testng)
10232 ("java-hamcrest-core" ,java-hamcrest-core)))
10233 (home-page "http://cdi-spec.org/")
10234 (synopsis "Contexts and Dependency Injection APIs")
10235 (description "Java-cdi-api contains the required APIs for Contexts and
10236Dependency Injection (CDI).")
10237 (license license:asl2.0)))
d57fd728
JL
10238
10239(define-public java-joda-convert
10240 (package
10241 (name "java-joda-convert")
10242 (version "1.9.2")
10243 (source (origin
10244 (method url-fetch)
10245 (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v"
10246 version ".tar.gz"))
10247 (file-name (string-append name "-" version ".tar.gz"))
10248 (sha256
10249 (base32
10250 "0vp346xz7dh9br4q7xazhc7hvzf76a6hf95fki9bg67q5jr0kjh7"))))
10251 (build-system ant-build-system)
10252 (arguments
10253 `(#:jar-name (string-append ,name "-" ,version ".jar")
10254 #:source-dir "src/main/java"
10255 #:test-include (list "**/Test*.java")
10256 ;; Contains only interfaces and base classes (no test)
10257 #:test-exclude (list "**/test*/**.java")))
10258 (inputs
10259 `(("java-guava" ,java-guava)))
10260 (native-inputs
10261 `(("java-junit" ,java-junit)
10262 ("java-hamcrest-core" ,java-hamcrest-core)))
10263 (home-page "http://www.joda.org/joda-convert/")
10264 (synopsis "Conversion between Objects and Strings")
10265 (description "Joda-Convert provides a small set of classes to aid
10266conversion between Objects and Strings. It is not intended to tackle the
10267wider problem of Object to Object transformation.")
10268 (license license:asl2.0)))
0158ea8a
JL
10269
10270(define-public java-joda-time
10271 (package
10272 (name "java-joda-time")
10273 (version "2.9.9")
10274 (source (origin
10275 (method url-fetch)
10276 (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v"
10277 version ".tar.gz"))
10278 (file-name (string-append name "-" version ".tar.gz"))
10279 (sha256
10280 (base32
10281 "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1"))))
10282 (build-system ant-build-system)
10283 (arguments
10284 `(#:jar-name "java-joda-time.jar"
10285 #:source-dir "src/main/java"
10286 #:test-include (list "**/Test*.java")
10287 ;; There is no runnable test in these files
10288 #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java")
10289 #:phases
10290 (modify-phases %standard-phases
10291 (add-after 'build 'build-resources
10292 (lambda _
10293 (mkdir-p "build/classes/org/joda/time/tz/data")
10294 (mkdir-p "build/classes/org/joda/time/format")
6d0368eb
JL
10295 ;; This will produce the following exception:
10296 ;; java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap"
10297 ;; which is normal, because it doesn't exist yet. It still generates
10298 ;; the same file as in the binary one can find on maven.
10299 (invoke "java" "-cp"
10300 (string-append "build/classes:" (getenv "CLASSPATH"))
10301 "org.joda.time.tz.ZoneInfoCompiler"
10302 "-src" "src/main/java/org/joda/time/tz/src"
10303 "-dst" "build/classes/org/joda/time/tz/data"
10304 "africa" "antarctica" "asia" "australasia"
10305 "europe" "northamerica" "southamerica"
10306 "pacificnew" "etcetera" "backward" "systemv")
0158ea8a
JL
10307 (for-each (lambda (f)
10308 (copy-file f (string-append
10309 "build/classes/org/joda/time/format/"
10310 (basename f))))
10311 (find-files "src/main/java/org/joda/time/format" ".*.properties"))
10312 #t))
10313 (add-before 'install 'regenerate-jar
10314 (lambda _
10315 ;; We need to regenerate the jar file to add generated data.
10316 (delete-file "build/jar/java-joda-time.jar")
6d0368eb 10317 (invoke "ant" "jar")))
0158ea8a
JL
10318 (add-before 'check 'copy-test-resources
10319 (lambda _
10320 (mkdir-p "build/test-classes/org/joda/time/tz/data")
10321 (copy-file "src/test/resources/tzdata/ZoneInfoMap"
10322 "build/test-classes/org/joda/time/tz/data/ZoneInfoMap")
10323 (copy-recursively "src/test/resources" "build/test-classes")
10324 #t)))))
10325 (inputs
10326 `(("java-joda-convert" ,java-joda-convert)))
10327 (native-inputs
10328 `(("java-junit" ,java-junit)
10329 ("java-hamcrest-core" ,java-hamcrest-core)
10330 ("tzdata" ,tzdata)))
10331 (home-page "http://www.joda.org/joda-time/")
10332 (synopsis "Replacement for the Java date and time classes")
10333 (description "Joda-Time is a replacement for the Java date and time
10334classes prior to Java SE 8.")
10335 (license license:asl2.0)))
6d0368eb
JL
10336
10337(define-public java-xerces
10338 (package
10339 (name "java-xerces")
10340 (version "2.11.0")
10341 (source
10342 (origin
10343 (method url-fetch)
10344 (uri (string-append "mirror://apache/xerces/j/source/"
10345 "Xerces-J-src." version ".tar.gz"))
10346 (sha256
10347 (base32 "1006igwy2lqrmjvdk64v8dg6qbk9c29pm8xxx7r87n0vnpvmx6pm"))
10348 (patches (search-patches
10349 "java-xerces-xjavac_taskdef.patch"
10350 "java-xerces-build_dont_unzip.patch"
10351 "java-xerces-bootclasspath.patch"))))
10352 (build-system ant-build-system)
10353 (arguments
10354 `(#:tests? #f;; Test files are not present
10355 #:test-target "test"
10356 #:jdk ,icedtea-8
10357 #:phases
10358 (modify-phases %standard-phases
10359 (add-after 'unpack 'create-build.properties
10360 (lambda* (#:key inputs #:allow-other-keys)
10361 (let ((jaxp (assoc-ref inputs "java-jaxp"))
10362 (resolver (assoc-ref inputs "java-apache-xml-commons-resolver")))
10363 (with-output-to-file "build.properties"
10364 (lambda _
10365 (format #t
10366 "jar.jaxp = ~a/share/java/jaxp.jar~@
10367 jar.apis-ext = ~a/share/java/jaxp.jar~@
10368 jar.resolver = ~a/share/java/xml-resolver.jar~%"
10369 jaxp jaxp resolver)))
10370 ;; Make xerces use our version of jaxp in tests
10371 (substitute* "build.xml"
10372 (("xml-apis.jar")
10373 (string-append jaxp "/share/java/jaxp.jar"))
10374 (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}")
10375 "${jar.apis}")))
10376 #t))
10377 (replace 'install (install-jars "build")))))
10378 (inputs
10379 `(("java-apache-xml-commons-resolver" ,java-apache-xml-commons-resolver)
10380 ("java-jaxp" ,java-jaxp)))
10381 (home-page "https://xerces.apache.org/xerces2-j/")
10382 (synopsis "Validating XML parser for Java with DOM level 3 support")
10383 (description "The Xerces2 Java parser is the reference implementation of
10384XNI, the Xerces Native Interface, and also a fully conforming XML Schema
10385processor.
10386
10387Xerces2-J supports the following standards and APIs:
10388
10389@itemize
10390@item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation
10391@item Namespaces in XML Recommendation
10392@item Document Object Model (DOM) Level 2 Core, Events, and Traversal and
10393 Range Recommendations
10394@item Simple API for XML (SAX) 2.0.1 Core and Extension
10395@item Java APIs for XML Processing (JAXP) 1.2.01
10396@item XML Schema 1.0 Structures and Datatypes Recommendations
10397@item Experimental implementation of the Document Object Model (DOM) Level 3
10398 Core and Load/Save Working Drafts
10399@item Provides a partial implementation of the XML Inclusions (XInclude) W3C
10400 Candidate Recommendation
10401@end itemize
10402
10403Xerces is now able to parse documents written according to the XML 1.1
10404Candidate Recommendation, except that it does not yet provide an option to
10405enable normalization checking as described in section 2.13 of this
10406specification. It also handles namespaces according to the XML Namespaces 1.1
10407Candidate Recommendation, and will correctly serialize XML 1.1 documents if
10408the DOM level 3 load/save API's are in use.")
10409 (license license:asl2.0)))
e06bf428 10410
ae6922ed
DM
10411(define-public java-jakarta-regexp
10412 (package
10413 (name "java-jakarta-regexp")
10414 (version "1.5")
10415 (source
10416 (origin
10417 (method url-fetch)
10418 (uri (string-append
10419 "https://archive.apache.org/dist/jakarta/regexp/jakarta-regexp-"
10420 version ".tar.gz"))
10421 (sha256
10422 (base32
10423 "0zg9rmyif48dck0cv6ynpxv23mmcsx265am1fnnxss7brgw0ms3r"))))
10424 (build-system ant-build-system)
10425 (arguments
10426 `(#:test-target "test"
10427 #:phases
10428 (modify-phases %standard-phases
10429 (replace 'install
10430 (lambda* (#:key outputs #:allow-other-keys)
10431 (let* ((out (assoc-ref outputs "out"))
10432 (out-share (string-append out "/share/java")))
10433 (mkdir-p out-share)
10434 (for-each (lambda (name)
10435 (install-file name out-share))
10436 (find-files "build" "^jakarta-regexp-.*\\.jar$"))
10437 #t))))))
10438 (home-page "https://attic.apache.org/projects/jakarta-regexp.html")
10439 (synopsis "Regular expression parser generator for Java.")
10440 (description "@code{jakarta-regexp} is an old regular expression parser
10441generator for Java.")
10442 (license license:asl2.0)))
10443
e06bf428
JL
10444(define-public java-jline
10445 (package
10446 (name "java-jline")
10447 (version "1.0")
10448 (source (origin
10449 (method url-fetch)
10450 (uri (string-append "https://github.com/jline/jline1/archive/jline-"
10451 version ".tar.gz"))
10452 (sha256
10453 (base32
10454 "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir"))))
10455 (build-system ant-build-system)
10456 (arguments
10457 `(#:jar-name "jline.jar"
10458 #:source-dir "src/main/java"
10459 #:test-dir "src/test"
10460 #:phases
10461 (modify-phases %standard-phases
10462 (add-before 'build 'copy-resources
10463 (lambda _
10464 (copy-recursively "src/main/resources" "build/classes")
10465 #t)))))
10466 (native-inputs
10467 `(("java-junit" ,java-junit)))
10468 (home-page "https://jline.github.io")
10469 (synopsis "Console input handling library")
10470 (description "JLine is a Java library for handling console input. It is
10471similar in functionality to BSD editline and GNU readline but with additional
10472features that bring it on par with the Z shell line editor.")
10473 (license license:bsd-3)))
7ac4f054 10474
49d74311
JL
10475(define-public java-jline-2
10476 (package
10477 (inherit java-jline)
10478 (version "2.14.5")
10479 (source (origin
10480 (method url-fetch)
10481 (uri (string-append "https://github.com/jline/jline2/archive/jline-"
10482 version ".tar.gz"))
10483 (sha256
10484 (base32
10485 "1c6qa26mf0viw8hg4jnv72s7i1qb1gh1l8rrzcdvqhqhx82rkdlf"))))
10486 (arguments
10487 `(#:jdk ,icedtea-8
10488 ,@(package-arguments java-jline)))
10489 (inputs
10490 `(("java-jansi" ,java-jansi)
10491 ("java-jansi-native" ,java-jansi-native)))
10492 (native-inputs
10493 `(("java-powermock-modules-junit4" ,java-powermock-modules-junit4)
10494 ("java-powermock-modules-junit4-common" ,java-powermock-modules-junit4-common)
10495 ("java-powermock-api-easymock" ,java-powermock-api-easymock)
10496 ("java-powermock-api-support" ,java-powermock-api-support)
10497 ("java-powermock-core" ,java-powermock-core)
10498 ("java-powermock-reflect" ,java-powermock-reflect)
10499 ("java-easymock" ,java-easymock)
10500 ("java-jboss-javassist" ,java-jboss-javassist)
10501 ("java-objenesis" ,java-objenesis)
10502 ("java-asm" ,java-asm)
10503 ("java-hamcrest-core" ,java-hamcrest-core)
10504 ("java-cglib" ,java-cglib)
10505 ("java-junit" ,java-junit)
10506 ("java-hawtjni" ,java-hawtjni)))))
10507
7ac4f054
JL
10508(define-public java-xmlunit
10509 (package
10510 (name "java-xmlunit")
10511 (version "2.5.1")
10512 (source (origin
10513 (method url-fetch)
10514 (uri (string-append "https://github.com/xmlunit/xmlunit/archive/v"
10515 version ".tar.gz"))
10516 (file-name (string-append name "-" version ".tar.gz"))
10517 (sha256
10518 (base32
10519 "035rivlnmwhfqj0fzviciv0bkh1h95ps1iwnh2kjcvdbk5nccm4z"))))
10520 (build-system ant-build-system)
10521 (arguments
10522 `(#:jar-name "java-xmlunit.jar"
10523 #:source-dir "xmlunit-core/src/main/java"
10524 #:test-dir "xmlunit-core/src/test"
10525 #:phases
10526 (modify-phases %standard-phases
10527 (add-before 'check 'copy-test-resources
10528 (lambda* (#:key inputs #:allow-other-keys)
10529 (copy-recursively (assoc-ref inputs "resources") "../test-resources")
10530 #t)))))
10531 (native-inputs
10532 `(("java-junit" ,java-junit)
10533 ("java-mockito-1" ,java-mockito-1)
10534 ("java-hamcrest-all" ,java-hamcrest-all)
10535 ("java-objenesis" ,java-objenesis)
10536 ("java-asm" ,java-asm)
10537 ("java-cglib" ,java-cglib)
10538 ("resources"
10539 ,(origin
10540 (method git-fetch)
10541 (uri (git-reference
10542 (url "https://github.com/xmlunit/test-resources.git")
10543 (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec")))
10544 (file-name "java-xmlunit-test-resources")
10545 (sha256
10546 (base32
10547 "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr"))))))
10548 (home-page "http://www.xmlunit.org/")
10549 (synopsis "XML output testing")
10550 (description "XMLUnit provides you with the tools to verify the XML you
10551emit is the one you want to create. It provides helpers to validate against
10552an XML Schema, assert the values of XPath queries or compare XML documents
10553against expected outcomes.")
10554 (license license:asl2.0)))
73a1f10a
JL
10555
10556(define-public java-xmlunit-legacy
10557 (package
10558 (inherit java-xmlunit)
10559 (name "java-xmlunit-legacy")
10560 (arguments
10561 `(#:jar-name "java-xmlunit-legacy.jar"
10562 #:source-dir "xmlunit-legacy/src/main/java"
10563 #:test-dir "xmlunit-legacy/src/test"))
10564 (inputs
10565 `(("java-xmlunit" ,java-xmlunit)
10566 ("java-junit" ,java-junit)))
10567 (native-inputs
10568 `(("java-mockito-1" ,java-mockito-1)))))
93abc975 10569
f5cc5ead
JL
10570(define-public java-xmlunit-matchers
10571 (package
10572 (inherit java-xmlunit)
10573 (name "java-xmlunit-matchers")
10574 (arguments
10575 `(#:jar-name "java-xmlunit-matchers.jar"
10576 #:source-dir "xmlunit-matchers/src/main/java"
10577 #:test-dir "xmlunit-matchers/src/test"
10578 #:test-exclude
10579 ;; Cannot open xsd for http://www.xmlunit.org/test-support/Book.xsd
10580 (list "**/ValidationMatcherTest.java")
10581 #:phases
10582 (modify-phases %standard-phases
10583 (add-before 'build 'copy-test-class
10584 (lambda _
10585 (copy-file "xmlunit-core/src/test/java/org/xmlunit/TestResources.java"
10586 "xmlunit-matchers/src/test/java/org/xmlunit/TestResources.java")
10587 #t))
10588 (add-before 'build 'fix-test-resources-path
10589 (lambda _
10590 (substitute* (find-files "xmlunit-matchers/src/test" ".*.java")
10591 (("../test-resources") "test-resources"))
10592 #t))
10593 (add-before 'check 'copy-test-resources
10594 (lambda* (#:key inputs #:allow-other-keys)
10595 (copy-recursively (assoc-ref inputs "resources") "test-resources")
10596 #t)))))
10597 (inputs
10598 `(("java-xmlunit" ,java-xmlunit)
10599 ("java-junit" ,java-junit)))))
10600
93abc975
RW
10601(define-public java-openchart2
10602 (package
10603 (name "java-openchart2")
10604 (version "1.4.3")
10605 (source (origin
10606 (method url-fetch)
10607 (uri (string-append "http://download.approximatrix.com/openchart2/"
10608 "openchart2-" version ".source.zip"))
10609 (sha256
10610 (base32
10611 "1xq96zm5r02n1blja0072jmmsifmxc40lbyfbnmcnr6mw42frh4g"))))
10612 (build-system ant-build-system)
10613 (arguments
10614 `(#:test-target "test"
10615 #:phases
10616 (modify-phases %standard-phases
10617 (add-after 'unpack 'fix-junit-errors
10618 (lambda _
10619 (with-directory-excursion "unittest/src/com/approximatrix/charting/"
10620 (substitute* '("coordsystem/ticklocator/NumericXTickLocatorTest.java"
10621 "coordsystem/ticklocator/NumericYTickLocatorTest.java"
10622 "coordsystem/ticklocator/ObjectXTickLocatorTest.java"
10623 "model/DefaultChartDataModelConstraintsTest.java"
10624 "model/MultiScatterDataModelConstraintsTest.java"
10625 "model/threedimensional/DotPlotDataModelConstraintsTest.java")
10626 (("(assertEquals[^;]+);" before _)
10627 (string-append (string-drop-right before 2) ", 1E-6);"))))
10628 #t))
10629 (replace 'install (install-jars ".")))))
10630 (native-inputs
10631 `(("unzip" ,unzip)
10632 ("java-junit" ,java-junit)
10633 ("java-hamcrest-core" ,java-hamcrest-core)))
10634 (home-page "http://approximatrix.com/products/openchart2/")
10635 (synopsis "Simple plotting for Java")
10636 (description "Openchart2 provides a simple, yet powerful, interface for
10637Java programmers to create two-dimensional charts and plots. The library
10638features an assortment of graph styles, including advanced scatter plots, bar
10639graphs, and pie charts.")
10640 (license license:lgpl2.1+)))
5f5b31c6
JL
10641
10642(define-public java-commons-httpclient
10643 (package
10644 (name "java-commons-httpclient")
10645 (version "3.1")
10646 (source (origin
10647 (method url-fetch)
10648 (uri (string-append "https://archive.apache.org/dist/httpcomponents/"
10649 "commons-httpclient/source/commons-httpclient-"
10650 version "-src.tar.gz"))
10651 (sha256
10652 (base32
10653 "1wlpn3cfy3d4inxy6g7wxcsa8p7sshn6aldk9y4ia3lb879rd97r"))))
10654 (build-system ant-build-system)
10655 (arguments
10656 `(#:build-target "compile"
10657 #:test-target "test"
10658 #:tests? #f; requires junit-textui (junit 3)
10659 #:phases
10660 (modify-phases %standard-phases
10661 (add-before 'build 'fix-accent
10662 (lambda _
10663 (for-each (lambda (file)
10664 (with-fluids ((%default-port-encoding "ISO-8859-1"))
10665 (substitute* file
10666 (("\\* @author Ortwin .*") "* @author Ortwin Glueck\n"))))
10667 '("src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java"
10668 "src/examples/TrivialApp.java" "src/examples/ClientApp.java"
10669 "src/test/org/apache/commons/httpclient/TestHttps.java"
2c8ac364
MW
10670 "src/test/org/apache/commons/httpclient/TestURIUtil2.java"))
10671 #t))
5f5b31c6
JL
10672 (replace 'install
10673 (lambda* (#:key outputs #:allow-other-keys)
10674 (invoke "ant" "dist"
10675 (string-append "-Ddist.home=" (assoc-ref outputs "out")
10676 "/share/java"))
10677 #t)))))
10678 (propagated-inputs
10679 `(("java-commons-logging" ,java-commons-logging-minimal)
10680 ("java-commons-codec" ,java-commons-codec)))
10681 (home-page "https://hc.apache.org")
10682 (synopsis "HTTP/1.1 compliant HTTP agent implementation")
10683 (description "This package contains an HTTP/1.1 compliant HTTP agent
10684implementation. It also provides reusable components for client-side
10685authentication, HTTP state management, and HTTP connection management.")
10686 (license license:asl2.0)))
5fe981dc
JL
10687
10688(define-public java-commons-vfs
10689 (package
10690 (name "java-commons-vfs")
10691 (version "2.2")
10692 (source (origin
10693 (method url-fetch)
10694 (uri (string-append "mirror://apache/commons/vfs/source/"
10695 "commons-vfs2-distribution-" version "-src.tar.gz"))
10696 (file-name (string-append name "-" version ".tar.gz"))
10697 (sha256
10698 (base32
10699 "1cnq1iaghbp4cslpnvwbp83i5v234x87irssqynhwpfgw7caf1s3"))
10700 (modules '((guix build utils)))
10701 (snippet
10702 '(begin
10703 (for-each delete-file
10704 (find-files "." "\\.jar$"))
10705 #t))))
10706 (build-system ant-build-system)
10707 (arguments
10708 `(#:jar-name "commons-vfs.jar"
10709 #:source-dir "commons-vfs2/src/main/java"
10710 #:test-dir "commons-vfs2/src/test"
10711 ; FIXME: tests depend on many things: apache sshd, hadoop, ftpserver, ...
10712 #:tests? #f
10713 #:phases
10714 (modify-phases %standard-phases
10715 (add-before 'build 'remove-hadoop-and-webdav
10716 ; Remove these files as they are not required and depend on difficult
10717 ; packages.
10718 (lambda _
10719 (for-each delete-file-recursively
10720 '("commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/webdav"
2c8ac364
MW
10721 "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs"))
10722 #t)))))
5fe981dc
JL
10723 (inputs
10724 `(("java-commons-collections4" ,java-commons-collections4)
10725 ("java-commons-compress" ,java-commons-compress)
10726 ("java-commons-httpclient" ,java-commons-httpclient)
10727 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
10728 ("java-commons-net" ,java-commons-net)
10729 ("java-jsch" ,java-jsch)))
10730 (home-page "http://commons.apache.org/proper/commons-vfs/")
52beae7b 10731 (synopsis "Java file system library")
5fe981dc
JL
10732 (description "Commons VFS provides a single API for accessing various
10733different file systems. It presents a uniform view of the files from various
10734different sources, such as the files on local disk, on an HTTP server, or
10735inside a Zip archive.")
10736 (license license:asl2.0)))
f7b512c0
JL
10737
10738(define-public java-jakarta-oro
10739 (package
10740 (name "java-jakarta-oro")
10741 (version "2.0.8")
10742 (source (origin
10743 (method url-fetch)
10744 (uri (string-append "https://archive.apache.org/dist/jakarta/oro/"
10745 "jakarta-oro-" version ".tar.gz"))
10746 (sha256
10747 (base32
10748 "0rpmnsskiwmsy8r0sckz5n5dbvh3vkxx8hpm177c754r8xy3qksc"))
10749 (modules '((guix build utils)))
10750 (snippet
10751 `(begin
10752 (delete-file (string-append "jakarta-oro-" ,version ".jar"))
10753 #t))))
10754 (build-system ant-build-system)
10755 (arguments
10756 `(#:build-target "package"
10757 #:tests? #f; tests are run as part of the build process
10758 #:phases
10759 (modify-phases %standard-phases
10760 (replace 'install
10761 (install-jars ,(string-append "jakarta-oro-" version))))))
10762 (home-page "https://jakarta.apache.org/oro/")
10763 (synopsis "Text-processing for Java")
10764 (description "The Jakarta-ORO Java classes are a set of text-processing
10765Java classes that provide Perl5 compatible regular expressions, AWK-like
10766regular expressions, glob expressions, and utility classes for performing
10767substitutions, splits, filtering filenames, etc. This library is the successor
10768of the OROMatcher, AwkTools, PerlTools, and TextTools libraries originally
10769from ORO, Inc.")
10770 (license license:asl1.1)))
a970288c
JL
10771
10772(define-public java-native-access
10773 (package
10774 (name "java-native-access")
10775 (version "4.5.1")
10776 (source (origin
10777 (method url-fetch)
10778 (uri (string-append "https://github.com/java-native-access/jna/"
10779 "archive/" version ".tar.gz"))
10780 (file-name (string-append name "-" version ".tar.gz"))
10781 (sha256
10782 (base32
10783 "0zrpzkib6b905i018a9pqlzkqinphywr6y4jwv6mwp63jjqvqkd9"))
10784 (modules '((guix build utils)))
10785 (snippet
10786 `(begin
10787 (for-each delete-file (find-files "." ".*.jar"))
10788 (delete-file-recursively "native/libffi")
10789 (delete-file-recursively "dist")
10790 #t))))
10791 (build-system ant-build-system)
10792 (arguments
10793 `(#:tests? #f; FIXME: tests require reflections.jar
10794 #:test-target "test"
10795 #:make-flags (list "-Ddynlink.native=true")
10796 #:phases
10797 (modify-phases %standard-phases
10798 (add-before 'build 'fix-build.xml
10799 (lambda* (#:key inputs #:allow-other-keys)
10800 (substitute* "build.xml"
10801 ;; Since we removed the bundled ant.jar, give the correct path
10802 (("lib/ant.jar") (string-append (assoc-ref inputs "ant") "/lib/ant.jar"))
10803 ;; We removed generated native libraries. We can only rebuild one
10804 ;; so don't fail if we can't find a native library for another architecture.
10805 (("zipfileset") "zipfileset erroronmissingarchive=\"false\""))
10806 ;; Copy test dependencies
10807 (copy-file (string-append (assoc-ref inputs "java-junit")
10808 "/share/java/junit.jar")
10809 "lib/junit.jar")
10810 (copy-file (string-append (assoc-ref inputs "java-hamcrest-core")
10811 "/share/java/hamcrest-core.jar")
10812 "lib/hamcrest-core.jar")
10813 ;; FIXME: once reflections.jar is built, copy it to lib/test.
10814 #t))
10815 (add-before 'build 'build-native
10816 (lambda _
10817 (invoke "ant" "-Ddynlink.native=true" "native")
10818 #t))
10819 (replace 'install
10820 (install-jars "build")))))
10821 (inputs
10822 `(("libffi" ,libffi)
10823 ("libx11" ,libx11)
10824 ("libxt" ,libxt)))
10825 (native-inputs
10826 `(("java-junit" ,java-junit)
10827 ("java-hamcrest-core" ,java-hamcrest-core)))
10828 (home-page "https://github.com/java-native-access/jna")
10829 (synopsis "Access to native shared libraries from Java")
10830 (description "JNA provides Java programs easy access to native shared
10831libraries without writing anything but Java code - no JNI or native code is
10832required. JNA allows you to call directly into native functions using natural
10833Java method invocation.")
10834 ;; Java Native Access project (JNA) is dual-licensed under 2
10835 ;; alternative Free licenses: LGPL 2.1 or later and Apache License 2.0.
10836 (license (list
10837 license:asl2.0
10838 license:lgpl2.1+))))
cfb55cfc
JL
10839
10840(define-public java-native-access-platform
10841 (package
10842 (inherit java-native-access)
10843 (name "java-native-access-platform")
10844 (arguments
10845 `(#:test-target "test"
10846 #:tests? #f; require jna-test.jar
10847 #:phases
10848 (modify-phases %standard-phases
10849 (add-before 'build 'chdir
10850 (lambda _
10851 (chdir "contrib/platform")
10852 #t))
10853 (add-after 'chdir 'fix-ant
10854 (lambda* (#:key inputs #:allow-other-keys)
10855 (substitute* "nbproject/project.properties"
10856 (("../../build/jna.jar")
10857 (string-append (assoc-ref inputs "java-native-access")
10858 "/share/java/jna.jar"))
10859 (("../../lib/hamcrest-core-.*.jar")
10860 (string-append (assoc-ref inputs "java-hamcrest-core")
10861 "/share/java/hamcrest-core.jar"))
10862 (("../../lib/junit.jar")
10863 (string-append (assoc-ref inputs "java-junit")
10864 "/share/java/junit.jar")))
10865 #t))
10866 (replace 'install
10867 (install-jars "dist")))))
10868 (inputs
10869 `(("java-native-access" ,java-native-access)))
10870 (synopsis "Cross-platform mappings for jna")
10871 (description "java-native-access-platfrom has cross-platform mappings
10872and mappings for a number of commonly used platform functions, including a
10873large number of Win32 mappings as well as a set of utility classes that
10874simplify native access.")))
470674a5
JL
10875
10876(define-public java-jsch-agentproxy-core
10877 (package
10878 (name "java-jsch-agentproxy-core")
10879 (version "0.0.8")
10880 (source (origin
10881 (method url-fetch)
10882 (uri (string-append "https://github.com/ymnk/jsch-agent-proxy/archive/"
10883 version ".tar.gz"))
10884 (file-name (string-append name "-" version ".tar.gz"))
10885 (sha256
10886 (base32
10887 "02iqg6jbc1kxvfzqcg6wy9ygqxfm82bw5rf6vnswqy4y572niz4q"))))
10888 (build-system ant-build-system)
10889 (arguments
10890 `(#:jar-name "jsch-agentproxy-core.jar"
10891 #:source-dir "jsch-agent-proxy-core/src/main/java"
10892 #:tests? #f)); no tests
10893 (home-page "https://github.com/ymnk/jsch-agent-proxy")
f1d79c97 10894 (synopsis "Core component of the proxy to ssh-agent and Pageant in Java")
470674a5
JL
10895 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10896and Pageant included Putty. It will be easily integrated into JSch, and users
10897will be allowed to use these programs for authentication.")
10898 (license license:bsd-3)))
f1d79c97
JL
10899
10900(define-public java-jsch-agentproxy-sshagent
10901 (package
10902 (inherit java-jsch-agentproxy-core)
10903 (name "java-jsch-agentproxy-sshagent")
10904 (arguments
10905 `(#:jar-name "jsch-agentproxy-sshagent.jar"
10906 #:source-dir "jsch-agent-proxy-sshagent/src/main/java"
10907 #:tests? #f)); no tests
10908 (inputs
10909 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
10910 (synopsis "Proxy to ssh-agent")
10911 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10912and Pageant included in Putty. This component contains the code for a proxy to
10913ssh-agent.")))
f438e638
JL
10914
10915(define-public java-jsch-agentproxy-usocket-jna
10916 (package
10917 (inherit java-jsch-agentproxy-core)
10918 (name "java-jsch-agentproxy-usocket-jna")
10919 (arguments
10920 `(#:jar-name "jsch-agentproxy-usocket-jna.jar"
10921 #:source-dir "jsch-agent-proxy-usocket-jna/src/main/java"
10922 #:tests? #f)); no tests
10923 (inputs
10924 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10925 ("java-native-access" ,java-native-access)))
10926 (synopsis "USocketFactory implementation using JNA")
10927 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10928and Pageant included in Putty. This component contains an implementation of
10929USocketFactory using @dfn{JNA} (Java Native Access).")))
475225e3
JL
10930
10931(define-public java-jsch-agentproxy-pageant
10932 (package
10933 (inherit java-jsch-agentproxy-core)
10934 (name "java-jsch-agentproxy-pageant")
10935 (arguments
10936 `(#:jar-name "jsch-agentproxy-pageant.jar"
10937 #:source-dir "jsch-agent-proxy-pageant/src/main/java"
10938 #:tests? #f)); no tests
10939 (inputs
10940 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10941 ("java-native-access" ,java-native-access)
10942 ("java-native-access-platform" ,java-native-access-platform)))
10943 (synopsis "Proxy to pageant")
10944 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10945and Pageant included in Putty. This component contains the code for a proxy to
10946pageant.")))
96d6d9c7
JL
10947
10948(define-public java-jsch-agentproxy-usocket-nc
10949 (package
10950 (inherit java-jsch-agentproxy-core)
10951 (name "java-jsch-agentproxy-usocket-nc")
10952 (arguments
10953 `(#:jar-name "jsch-agentproxy-usocket-nc.jar"
10954 #:source-dir "jsch-agent-proxy-usocket-nc/src/main/java"
10955 #:tests? #f)); no tests
10956 (inputs
10957 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
10958 (synopsis "USocketFactory implementation using netcat")
10959 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10960and Pageant included in Putty. This component contains an implementation of
10961USocketFactory using netcat.")))
5a46b17b
JL
10962
10963(define-public java-jsch-agentproxy-connector-factory
10964 (package
10965 (inherit java-jsch-agentproxy-core)
10966 (name "java-jsch-agentproxy-connector-factory")
10967 (arguments
10968 `(#:jar-name "jsch-agentproxy-connector-factory.jar"
10969 #:source-dir "jsch-agent-proxy-connector-factory/src/main/java"
10970 #:tests? #f)); no tests
10971 (inputs
10972 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10973 ("java-jsch-agentproxy-sshagent" ,java-jsch-agentproxy-sshagent)
10974 ("java-jsch-agentproxy-usocket-jna" ,java-jsch-agentproxy-usocket-jna)
10975 ("java-jsch-agentproxy-pageant" ,java-jsch-agentproxy-pageant)
10976 ("java-jsch-agentproxy-usocket-nc" ,java-jsch-agentproxy-usocket-nc)))
10977 (synopsis "Connector factory for jsch agent proxy")
10978 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10979and Pageant included in Putty. This component contains a connector factory.")))
b0fbf596
JL
10980
10981(define-public java-jsch-agentproxy-jsch
10982 (package
10983 (inherit java-jsch-agentproxy-core)
10984 (name "java-jsch-agentproxy-jsch")
10985 (arguments
10986 `(#:jar-name "jsch-agentproxy-jsch.jar"
10987 #:source-dir "jsch-agent-proxy-jsch/src/main/java"
10988 #:tests? #f)); no tests
10989 (inputs
10990 `(("java-jsch" ,java-jsch)
10991 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
10992 (synopsis "JSch integration library for agentproxy")
10993 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10994and Pageant included in Putty. This component contains a library to use
10995jsch-agent-proxy with JSch.")))
f1f4a4f0
JL
10996
10997(define-public java-apache-ivy
10998 (package
10999 (name "java-apache-ivy")
11000 (version "2.4.0")
11001 (source (origin
11002 (method url-fetch)
11003 (uri (string-append "mirror://apache//ant/ivy/" version
11004 "/apache-ivy-" version "-src.tar.gz"))
11005 (sha256
11006 (base32
11007 "1xkfn57g2m7l6y0xdq75x5rnrgk52m9jx2xah70g3ggl8750hbr0"))
11008 (patches
11009 (search-patches
11010 "java-apache-ivy-port-to-latest-bouncycastle.patch"))))
11011 (build-system ant-build-system)
11012 (arguments
11013 `(#:jar-name "ivy.jar"
11014 #:tests? #f
11015 #:phases
11016 (modify-phases %standard-phases
11017 (add-before 'build 'remove-example
11018 (lambda _
11019 (delete-file-recursively "src/example")
11020 #t))
11021 (add-before 'build 'copy-resources
11022 (lambda _
11023 (with-directory-excursion "src/java"
11024 (for-each (lambda (file)
11025 (install-file file (string-append "../../build/classes/" (dirname file))))
11026 (append
11027 (find-files "." ".*.css")
11028 (find-files "." ".*.ent")
11029 (find-files "." ".*.html")
11030 (find-files "." ".*.properties")
11031 (find-files "." ".*.xsd")
11032 (find-files "." ".*.xsl")
2c8ac364
MW
11033 (find-files "." ".*.xml"))))
11034 #t))
f1f4a4f0
JL
11035 (add-before 'build 'fix-vfs
11036 (lambda _
11037 (substitute*
11038 '("src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java"
11039 "src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java")
11040 (("import org.apache.commons.vfs") "import org.apache.commons.vfs2"))
11041 #t))
11042 (add-before 'install 'copy-manifest
11043 (lambda _
11044 (install-file "META-INF/MANIFEST.MF" "build/classes/META-INF")
11045 #t))
11046 (add-before 'install 'repack
11047 (lambda _
11048 (invoke "jar" "-cmf" "build/classes/META-INF/MANIFEST.MF" "build/jar/ivy.jar"
2c8ac364 11049 "-C" "build/classes" ".")))
f1f4a4f0
JL
11050 (add-after 'install 'install-bin
11051 (lambda* (#:key outputs #:allow-other-keys)
11052 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
11053 (ivy (string-append bin "/ivy"))
11054 (jar (string-append (assoc-ref outputs "out") "/share/java/ivy.jar")))
11055 (mkdir-p bin)
11056 (with-output-to-file ivy
11057 (lambda _
11058 (display (string-append
11059 "#!" (which "sh") "\n"
11060 "if [[ -z $CLASSPATH ]]; then\n"
11061 " cp=\"" (getenv "CLASSPATH") ":" jar "\"\n"
11062 "else\n"
11063 " cp=\"" (getenv "CLASSPATH") ":" jar ":$CLASSPATH\"\n"
11064 "fi\n"
11065 (which "java") " -cp $cp org.apache.ivy.Main $@\n"))))
11066 (chmod ivy #o755)
11067 #t))))))
11068 (inputs
11069 `(("java-bouncycastle" ,java-bouncycastle)
11070 ("java-commons-cli" ,java-commons-cli)
11071 ("java-commons-collections" ,java-commons-collections)
11072 ("java-commons-httpclient" ,java-commons-httpclient)
11073 ("java-commons-lang" ,java-commons-lang)
11074 ("java-commons-vfs" ,java-commons-vfs)
11075 ("java-jakarta-oro" ,java-jakarta-oro)
11076 ("java-jsch" ,java-jsch)
11077 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
11078 ("java-jsch-agentproxy-connector-factory" ,java-jsch-agentproxy-connector-factory)
11079 ("java-jsch-agentproxy-jsch" ,java-jsch-agentproxy-jsch)
11080 ("java-junit" ,java-junit)))
11081 (home-page "https://ant.apache.org/ivy")
11082 (synopsis "Dependency manager for the Java programming language")
11083 (description "Ivy is a tool for managing (recording, tracking, resolving
11084and reporting) project dependencies. It is characterized by the following:
11085
11086@itemize
11087@item flexibility and configurability - Ivy is essentially process agnostic
11088 and is not tied to any methodology or structure. Instead it provides the
11089 necessary flexibility and configurability to be adapted to a broad range
11090 of dependency management and build processes.
11091@item tight integration with Apache Ant - while available as a standalone tool,
11092 Ivy works particularly well with Apache Ant providing a number of
11093 powerful Ant tasks ranging from dependency resolution to dependency
11094 reporting and publication.
11095@end itemize")
11096 (license license:asl2.0)))
1a1810f5
JL
11097
11098(define-public java-eclipse-sisu-inject
11099 (package
11100 (name "java-eclipse-sisu-inject")
11101 (version "0.3.3")
11102 (source (origin
ae69b39e
BH
11103 (method git-fetch)
11104 (uri (git-reference
11105 (url "https://github.com/eclipse/sisu.inject/")
11106 (commit "releases/0.3.3")))
11107 (file-name (git-file-name name version))
1a1810f5
JL
11108 (sha256
11109 (base32
ae69b39e 11110 "0gibc9x0bw0f4ls086fx73610fcspz9g2as7kcpcfhvl5znysvg7"))))
1a1810f5
JL
11111 (build-system ant-build-system)
11112 (arguments
11113 `(#:jar-name "eclipse-sisu-inject.jar"
11114 #:source-dir "org.eclipse.sisu.inject/src"
11115 #:jdk ,icedtea-8
11116 #:tests? #f)); no tests
11117 (inputs
11118 `(("java-guice" ,java-guice)
11119 ("java-guice-servlet" ,java-guice-servlet)
11120 ("java-javax-inject" ,java-javax-inject)
4b472f6a 11121 ("java-javaee-servletapi" ,java-javaee-servletapi)
1a1810f5
JL
11122 ("java-junit" ,java-junit)
11123 ("java-slf4j-api" ,java-slf4j-api)
11124 ("java-jsr305" ,java-jsr305)
11125 ("java-jsr250" ,java-jsr250)
11126 ("java-cdi-api" ,java-cdi-api)
11127 ("java-osgi-framework" ,java-osgi-framework)
11128 ("java-osgi-util-tracker" ,java-osgi-util-tracker)
11129 ("java-testng" ,java-testng)))
11130 (home-page "https://www.eclipse.org/sisu/")
11131 (synopsis "Classpath scanning, auto-binding, and dynamic auto-wiring")
11132 (description "Sisu is a modular JSR330-based container that supports
11133classpath scanning, auto-binding, and dynamic auto-wiring. Sisu uses
11134Google-Guice to perform dependency injection and provide the core JSR330
11135support, but removes the need to write explicit bindings in Guice modules.
11136Integration with other containers via the Eclipse Extension Registry and the
11137OSGi Service Registry is a goal of this project.")
11138 (license license:epl1.0)))
7049dea1
JL
11139
11140(define-public java-eclipse-sisu-plexus
11141 (package
11142 (name "java-eclipse-sisu-plexus")
e0c0b078 11143 (version "0.3.4")
7049dea1 11144 (source (origin
3560a2cd
EF
11145 (method git-fetch)
11146 (uri (git-reference
11147 (url "https://github.com/eclipse/sisu.plexus.git")
11148 (commit (string-append "releases/" version))))
11149 (file-name (git-file-name name version))
7049dea1
JL
11150 (sha256
11151 (base32
e0c0b078 11152 "17mjlajnsqnk07cc58h1qpxrif85yb2m2y0pyba48yjjgikk8r9f"))
7049dea1
JL
11153 (modules '((guix build utils)))
11154 (snippet
11155 '(begin
11156 (for-each delete-file (find-files "." ".*.jar"))
11157 (rename-file "org.eclipse.sisu.plexus.tests/src"
11158 "org.eclipse.sisu.plexus.tests/java")
11159 #t))))
11160 (build-system ant-build-system)
11161 (arguments
11162 `(#:jar-name "eclipse-sisu-plexus.jar"
11163 #:source-dir "org.eclipse.sisu.plexus/src"
11164 #:test-dir "org.eclipse.sisu.plexus.tests"
11165 #:test-exclude
11166 (list
11167 ;; This test fails probably because we can't generate the necessary
11168 ;; meta-inf files.
11169 "**/PlexusLoggingTest.*"
11170 ;; FIXME: This test fails because of some injection error
11171 "**/PlexusRequirementTest.*")
11172 #:jdk ,icedtea-8
11173 #:phases
11174 (modify-phases %standard-phases
11175 (add-before 'build 'copy-resources
11176 (lambda _
11177 (install-file "org.eclipse.sisu.plexus/META-INF/plexus/components.xml"
11178 "build/classes/META-INF/plexus")
11179 #t))
11180 (add-before 'check 'build-test-jar
11181 (lambda _
11182 (with-directory-excursion "org.eclipse.sisu.plexus.tests/resources/component-jar/src/main/"
11183 (mkdir "build")
11184 (with-directory-excursion "java"
11185 (apply invoke "javac" "-cp"
11186 (string-append (getenv "CLASSPATH")
11187 ":../../../../../build/classes")
11188 (find-files "." ".*.java"))
11189 (for-each (lambda (file) (install-file file (string-append "../build/" file)))
11190 (find-files "." ".*.jar")))
11191 (mkdir-p "build/META-INF/plexus")
11192 (copy-file "resources/META-INF/plexus/components.xml"
11193 "build/META-INF/plexus/components.xml")
11194 (with-directory-excursion "build"
11195 (invoke "jar" "cf" "../../../component-jar-0.1.jar" ".")))
11196 (with-directory-excursion "org.eclipse.sisu.plexus.tests/"
11197 (copy-recursively "META-INF" "../build/test-classes/META-INF")
11198 (substitute* "java/org/eclipse/sisu/plexus/DefaultPlexusContainerTest.java"
11199 (("resources/component-jar")
11200 "org.eclipse.sisu.plexus.tests/resources/component-jar")))
11201 #t)))))
11202 (inputs
11203 `(("java-plexus-classworlds" ,java-plexus-classworlds)
11204 ("java-plexus-util" ,java-plexus-utils)
11205 ("java-plexus-component-annotations" ,java-plexus-component-annotations)
11206 ("java-osgi-framework" ,java-osgi-framework)
11207 ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)
11208 ("java-guice" ,java-guice)
11209 ("java-javax-inject" ,java-javax-inject)
11210 ("java-slf4j-api" ,java-slf4j-api)
11211 ("java-junit" ,java-junit)))
11212 (native-inputs
11213 `(("java-guava" ,java-guava)
11214 ("java-aopalliance" ,java-aopalliance)
11215 ("java-cglib" ,java-cglib)
11216 ("java-asm" ,java-asm)))
11217 (home-page "https://www.eclipse.org/sisu/")
11218 (synopsis "Plexus support for the sisu container")
11219 (description "Sisu is a modular JSR330-based container that supports
11220classpath scanning, auto-binding, and dynamic auto-wiring. This package
11221adds Plexus support to the Sisu-Inject container.")
11222 (license license:epl1.0)))
3fa18fe7
JL
11223
11224(define-public java-commons-compiler
11225 (package
11226 (name "java-commons-compiler")
11227 (version "3.0.8")
11228 (source (origin
11229 (method git-fetch)
11230 (uri (git-reference
11231 (url "https://github.com/janino-compiler/janino")
11232 (commit "91aa95686d1e4ca3b16a984a03a38686572331b2")))
11233 (file-name (string-append name "-" version))
11234 (sha256
11235 (base32
11236 "04hfdl59sgh20qkxzgnibvs8f9hy6n7znxwpk611y5d89977y62r"))
11237 (modules '((guix build utils)))
11238 (snippet
11239 '(begin
11240 (for-each delete-file
11241 (find-files "." "\\.jar$"))
11242 #t))))
11243 (build-system ant-build-system)
11244 (arguments
11245 `(#:jar-name "commons-compiler.jar"
11246 #:source-dir "commons-compiler/src/main"
11247 #:tests? #f)); no tests
11248 (home-page "https://github.com/janino-compiler/janino")
11249 (synopsis "Java compiler")
11250 (description "Commons-compiler contains an API for janino, including the
11251@code{IExpressionEvaluator}, @code{IScriptEvaluator}, @code{IClassBodyEvaluator}
11252and @code{ISimpleCompiler} interfaces.")
11253 (license license:bsd-3)))
3402e651
JL
11254
11255(define-public java-janino
11256 (package
11257 (inherit java-commons-compiler)
11258 (name "java-janino")
11259 (arguments
11260 `(#:jar-name "janino.jar"
11261 #:source-dir "src/main/java"
11262 #:phases
11263 (modify-phases %standard-phases
11264 (add-before 'configure 'chdir
11265 (lambda _
2c8ac364
MW
11266 (chdir "janino")
11267 #t)))))
3402e651
JL
11268 (inputs
11269 `(("java-commons-compiler" ,java-commons-compiler)))
11270 (native-inputs
11271 `(("java-junit" ,java-junit)
11272 ("java-hamcrest-core" ,java-hamcrest-core)))
11273 (description "Janino is a Java compiler. Janino can compile a set of
11274source files to a set of class files like @code{javac}, but also compile a
11275Java expression, block, class body or source file in memory, load the bytecode
11276and execute it directly in the same JVM. @code{janino} can also be used for
11277static code analysis or code manipulation.")))
7d8207a4
JL
11278
11279(define-public java-logback-core
11280 (package
11281 (name "java-logback-core")
11282 (version "1.2.3")
11283 (source (origin
11284 (method url-fetch)
11285 (uri (string-append "https://github.com/qos-ch/logback/archive/v_"
11286 version ".tar.gz"))
b1ccd2a1 11287 (file-name (string-append name "-" version ".tar.gz"))
7d8207a4
JL
11288 (sha256
11289 (base32
11290 "1x6ga74yfgm94cfx98gybakbrlilx8i2gn6dx13l40kasmys06mi"))
11291 (modules '((guix build utils)))
11292 (snippet
2c8ac364
MW
11293 '(begin
11294 (delete-file-recursively "logback-access/lib")
11295 #t))))
7d8207a4
JL
11296 (build-system ant-build-system)
11297 (arguments
11298 `(#:jar-name "logback.jar"
11299 #:source-dir "src/main/java"
11300 #:test-dir "src/test"
11301 #:test-exclude
11302 ;; These tests fail with Unable to set MockitoNamingPolicy on cglib generator
11303 ;; which creates FastClasses
11304 (list "**/AllCoreTest.*"
11305 "**/AutoFlushingObjectWriterTest.*"
11306 "**/PackageTest.*"
11307 "**/ResilientOutputStreamTest.*"
11308 ;; And we still don't want to run abstract classes
11309 "**/Abstract*.*")
11310 #:phases
11311 (modify-phases %standard-phases
11312 (add-before 'configure 'chdir
11313 (lambda _
11314 (chdir "logback-core")
11315 #t)))))
11316 (inputs
11317 `(("java-javax-mail" ,java-javax-mail)
4b472f6a 11318 ("servlet" ,java-javaee-servletapi)
7d8207a4
JL
11319 ("java-commons-compiler" ,java-commons-compiler)
11320 ("java-janino" ,java-janino)))
11321 (native-inputs
11322 `(("java-junit" ,java-junit)
11323 ("java-hamcrest-core" ,java-hamcrest-core)
11324 ("java-mockito-1" ,java-mockito-1)
11325 ("java-cglib" ,java-cglib)
11326 ("java-asm" ,java-asm)
11327 ("java-objenesis" ,java-objenesis)
11328 ("java-joda-time" ,java-joda-time)))
11329 (home-page "https://logback.qos.ch")
11330 (synopsis "Logging for java")
11331 (description "Logback is intended as a successor to the popular log4j project.
11332This module lays the groundwork for the other two modules.")
11333 ;; Either epl1.0 or lgpl2.1
11334 (license (list license:epl1.0
11335 license:lgpl2.1))))
3a69f5f2
JL
11336
11337(define-public java-logback-classic
11338 (package
11339 (inherit java-logback-core)
11340 (name "java-logback-classic")
11341 (arguments
11342 `(#:jar-name "logback-classic.jar"
11343 #:source-dir "src/main/java"
11344 #:test-dir "src/test"
11345 #:tests? #f; tests require more packages: h2, greenmail, hsql, subethamail, slf4j, log4j, felix
11346 #:jdk ,icedtea-8
11347 #:phases
11348 (modify-phases %standard-phases
11349 (add-before 'configure 'chdir
11350 (lambda _
11351 (chdir "logback-classic")
11352 #t))
11353 (replace 'build
11354 (lambda* (#:key inputs #:allow-other-keys)
11355 (mkdir-p "build/classes")
11356 (setenv "CLASSPATH"
11357 (string-join
11358 (apply append (map (lambda (input)
11359 (find-files (assoc-ref inputs input)
11360 ".*.jar"))
11361 '("java-logback-core" "java-slf4j-api"
4b472f6a 11362 "java-commons-compiler" "servlet"
3a69f5f2
JL
11363 "groovy")))
11364 ":"))
11365 (apply invoke "groovyc" "-d" "build/classes" "-j"
11366 (find-files "src/main/" ".*\\.(groovy|java)$"))
11367 (invoke "ant" "jar")
11368 #t)))))
11369 (inputs
11370 `(("java-logback-core" ,java-logback-core)
11371 ("java-slf4j-api" ,java-slf4j-api)
11372 ,@(package-inputs java-logback-core)))
11373 (native-inputs
11374 `(("groovy" ,groovy)))
11375 (description "Logback is intended as a successor to the popular log4j project.
11376This module can be assimilated to a significantly improved version of log4j.
11377Moreover, @code{logback-classic} natively implements the slf4j API so that you
11378can readily switch back and forth between logback and other logging frameworks
11379such as log4j or @code{java.util.logging} (JUL).")))
ab621bf1
JL
11380
11381(define-public java-qdox
11382 (package
11383 (name "java-qdox")
11384 ; Newer version exists, but this version is required by java-plexus-component-metadata
11385 (version "2.0-M2")
11386 (source (origin
11387 (method url-fetch)
11388 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
11389 ;; Older releases at https://github.com/codehaus/qdox/
11390 ;; Note: The release at maven is pre-generated. The release at
11391 ;; github requires jflex.
11392 (uri (string-append "http://central.maven.org/maven2/"
11393 "com/thoughtworks/qdox/qdox/" version
11394 "/qdox-" version "-sources.jar"))
11395 (sha256
11396 (base32
11397 "10xxrcaicq6axszcr2jpygisa4ch4sinyx5q7kqqxv4lknrmxp5x"))))
11398 (build-system ant-build-system)
11399 (arguments
11400 `(#:jar-name "qdox.jar"
11401 #:tests? #f)); no tests
11402 (home-page "http://qdox.codehaus.org/")
11403 (synopsis "Parse definitions from Java source files")
11404 (description "QDox is a high speed, small footprint parser for extracting
11405class/interface/method definitions from source files complete with JavaDoc
11406@code{@@tags}. It is designed to be used by active code generators or
11407documentation tools.")
11408 (license license:asl2.0)))
c786dff0
LC
11409
11410(define-public java-jgit
11411 (package
11412 (name "java-jgit")
11413 (version "4.7.0.201704051617-r")
11414 (source (origin
11415 (method url-fetch)
11416 (uri (string-append "https://repo1.maven.org/maven2/"
11417 "org/eclipse/jgit/org.eclipse.jgit/"
11418 version "/org.eclipse.jgit-"
11419 version "-sources.jar"))
11420 (sha256
11421 (base32
11422 "13ii4jn02ynzq6i7gsyi21k2i94jpc85wf6bcm31q4cyvzv0mk4k"))))
11423 (build-system ant-build-system)
11424 (arguments
11425 `(#:tests? #f ; There are no tests to run.
11426 #:jar-name "jgit.jar"
11427 ;; JGit must be built with a JDK supporting Java 8.
11428 #:jdk ,icedtea-8
11429 ;; Target our older default JDK.
11430 #:make-flags (list "-Dtarget=1.7")
11431 #:phases
11432 (modify-phases %standard-phases
11433 ;; The jar file generated by the default build.xml does not include
11434 ;; the text properties files, so we need to add them.
11435 (add-after 'build 'add-properties
11436 (lambda* (#:key jar-name #:allow-other-keys)
11437 (with-directory-excursion "src"
11438 (apply invoke "jar" "-uf"
11439 (string-append "../build/jar/" jar-name)
11440 (find-files "." "\\.properties$")))
11441 #t)))))
11442 (inputs
11443 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
11444 ("java-javaewah" ,java-javaewah)
11445 ("java-jsch" ,java-jsch)
11446 ("java-slf4j-api" ,java-slf4j-api)))
11447 (home-page "https://eclipse.org/jgit/")
11448 (synopsis "Java library implementing the Git version control system")
11449 (description "JGit is a lightweight, pure Java library implementing the
11450Git version control system, providing repository access routines, support for
11451network protocols, and core version control algorithms.")
11452 (license license:edl1.0)))
11453
11454;; For axoloti. This package can still be built with icedtea-7, which is
11455;; currently used as the default JDK.
11456(define-public java-jgit-4.2
11457 (package (inherit java-jgit)
11458 (version "4.2.0.201601211800-r")
11459 (source (origin
11460 (method url-fetch)
11461 (uri (string-append "https://repo1.maven.org/maven2/"
11462 "org/eclipse/jgit/org.eclipse.jgit/"
11463 version "/org.eclipse.jgit-"
11464 version "-sources.jar"))
11465 (sha256
11466 (base32
11467 "15gm537iivhnzlkjym4x3wn5jqdjdragsw9pdpzqqg21nrc817mm"))))
11468 (build-system ant-build-system)
11469 (arguments
11470 (substitute-keyword-arguments (package-arguments java-jgit)
11471 ;; Build for default JDK.
11472 ((#:jdk _) icedtea-7)
11473 ((#:phases phases)
11474 `(modify-phases ,phases
11475 (add-after 'unpack 'use-latest-javaewah-API
11476 (lambda _
11477 (substitute* "src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java"
11478 (("wordinbits") "WORD_IN_BITS"))
11479 #t))))))
11480 (inputs
11481 `(("java-javaewah" ,java-javaewah)
11482 ("java-jsch" ,java-jsch)
11483 ("java-slf4j-api" ,java-slf4j-api)))))
717b6ba6
CZ
11484
11485(define-public abcl
11486 (package
11487 (name "abcl")
514001e9 11488 (version "1.6.0")
717b6ba6
CZ
11489 (source
11490 (origin
11491 (method url-fetch)
11492 (uri (string-append "https://abcl.org/releases/"
11493 version "/abcl-src-" version ".tar.gz"))
11494 (sha256
11495 (base32
514001e9 11496 "0hvbcsffr8n2xwdixc8wyw1bfl9fxn2gyy0c4nma7j9zbn0wwgw9"))
717b6ba6
CZ
11497 (patches
11498 (search-patches
11499 "abcl-fix-build-xml.patch"))))
11500 (build-system ant-build-system)
11501 (native-inputs
11502 `(("java-junit" ,java-junit)))
11503 (arguments
11504 `(#:build-target "abcl.jar"
11505 #:test-target "abcl.test"
11506 #:phases
11507 (modify-phases %standard-phases
11508 (replace 'install
11509 (lambda* (#:key outputs #:allow-other-keys)
11510 (let ((share (string-append (assoc-ref outputs "out")
11511 "/share/java/"))
11512 (bin (string-append (assoc-ref outputs "out")
11513 "/bin/")))
11514 (mkdir-p share)
11515 (install-file "dist/abcl.jar" share)
11516 (install-file "dist/abcl-contrib.jar" share)
11517 (mkdir-p bin)
11518 (with-output-to-file (string-append bin "abcl")
11519 (lambda _
11520 (let ((classpath (string-append
11521 share "abcl.jar"
11522 ":"
11523 share "abcl-contrib.jar")))
11524 (display (string-append
11525 "#!" (which "sh") "\n"
11526 "if [[ -z $CLASSPATH ]]; then\n"
11527 " cp=\"" classpath "\"\n"
11528 "else\n"
11529 " cp=\"" classpath ":$CLASSPATH\"\n"
11530 "fi\n"
11531 "exec " (which "java")
11532 " -cp $cp org.armedbear.lisp.Main $@\n")))))
11533 (chmod (string-append bin "abcl") #o755)
11534 #t))))))
11535 (home-page "https://abcl.org/")
11536 (synopsis "Common Lisp Implementation on the JVM")
11537 (description
11538 "@dfn{Armed Bear Common Lisp} (ABCL) is a full implementation of the Common
11539Lisp language featuring both an interpreter and a compiler, running in the
11540JVM. It supports JSR-223 (Java scripting API): it can be a scripting engine
11541in any Java application. Additionally, it can be used to implement (parts of)
11542the application using Java to Lisp integration APIs.")
11543 (license (list license:gpl2+
11544 ;; named-readtables is released under 3 clause BSD
11545 license:bsd-3
11546 ;; jfli is released under CPL 1.0
11547 license:cpl1.0))))
da655b1e
JL
11548
11549(define-public java-jsonp-api
11550 (package
11551 (name "java-jsonp-api")
11552 (version "1.1.5")
11553 (source (origin
11554 (method git-fetch)
11555 (uri (git-reference
11556 (url "https://github.com/eclipse-ee4j/jsonp")
11557 (commit (string-append version "-RELEASE"))))
11558 (file-name (git-file-name name version))
11559 (sha256
11560 (base32
11561 "0nxq16lrx7i87hgyj5rzcwilvr67h0i299gygfn8f5vs4n7n59vy"))))
11562 (build-system ant-build-system)
11563 (arguments
11564 `(#:jar-name "jsonp-api.jar"
11565 #:tests? #f
11566 #:source-dir "api/src/main/java"
11567 #:test-dir "api/src/test"))
11568 (home-page "https://eclipse-ee4j.github.io/jsonp/")
11569 (synopsis "JSON Processing in Java")
11570 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
11571parse, generate, transform and query) JSON messages. It produces and
11572consumes JSON text in a streaming fashion (similar to StAX API for XML)
11573and allows to build a Java object model for JSON text using API classes
11574(similar to DOM API for XML).")
11575 ;; either gpl2 only with classpath exception, or epl2.0.
11576 (license (list license:gpl2
11577 license:epl2.0))))
d45f73c9
JL
11578
11579(define-public java-jsonp-impl
11580 (package
11581 (inherit java-jsonp-api)
11582 (name "java-jsonp-impl")
11583 (arguments
11584 `(#:jar-name "jsonp-impl.jar"
11585 #:tests? #f
11586 #:source-dir "impl/src/main/java"
11587 #:test-dir "impl/src/test"))
11588 (propagated-inputs
11589 `(("java-jsonp-api" ,java-jsonp-api)))
11590 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
11591parse, generate, transform and query) JSON messages. This package contains
11592a reference implementation of that API.")))
357f4564
JL
11593
11594(define-public java-xmp
11595 (package
11596 (name "java-xmp")
11597 (version "5.1.3")
11598 (source (origin
11599 (method url-fetch)
11600 (uri (string-append "http://download.macromedia.com/pub/developer"
11601 "/xmp/sdk/XMPCoreJava-" version ".zip"))
11602 (sha256
11603 (base32
11604 "14nai2mmsg7l5ya2y5mx4w4lr1az3sk2fjz6hiy4zdrsavgvl1g7"))))
11605 (build-system ant-build-system)
11606 (arguments
11607 `(#:build-target "build"
11608 #:tests? #f; no tests
11609 #:phases
11610 (modify-phases %standard-phases
11611 (add-after 'unpack 'chdir
11612 (lambda _
11613 (chdir "XMPCore")
11614 #t))
11615 (add-before 'build 'fix-timestamp
11616 (lambda _
11617 (substitute* "build.xml"
11618 (("\\$\\{BuildDate\\}") "1970 Jan 01 00:00:00-GMT"))
11619 #t))
11620 (replace 'install
11621 (install-jars "."))
11622 (add-after 'install 'install-doc
11623 (lambda* (#:key outputs #:allow-other-keys)
11624 (copy-recursively
11625 "docs"
11626 (string-append (assoc-ref outputs "out") "/share/doc/java-xmp"))
11627 #t)))))
11628 (native-inputs
11629 `(("unzip" ,unzip)))
11630 (home-page "https://www.adobe.com/devnet/xmp.html")
11631 (synopsis "Extensible Metadat Platform (XMP) support in Java")
11632 (description "Adobe's Extensible Metadata Platform (XMP) is a labeling
11633technology that allows you to embed data about a file, known as metadata,
11634into the file itself. The XMP Toolkit for Java is based on the C++ XMPCore
11635library and the API is similar.")
11636 (license license:bsd-3)))
a005c63a
JL
11637
11638(define-public java-metadata-extractor
11639 (package
11640 (name "java-metadata-extractor")
11641 (version "2.11.0")
11642 (source (origin
11643 (method git-fetch)
11644 (uri (git-reference
11645 (url "https://github.com/drewnoakes/metadata-extractor")
11646 (commit version)))
11647 (file-name (git-file-name name version))
11648 (sha256
11649 (base32
11650 "06yrq0swrl1r40yjbk5kqzjxr04jlkq9lfi711jvfgjf5kp2qinj"))))
11651 (build-system ant-build-system)
11652 (arguments
11653 `(#:jar-name "metadata-extractor.jar"
11654 #:source-dir "Source"
11655 #:test-dir "Tests"
11656 #:phases
11657 (modify-phases %standard-phases
11658 (add-before 'check 'fix-test-dir
11659 (lambda _
11660 (substitute* "build.xml"
11661 (("/java\">") "\">"))
11662 #t)))))
11663 (propagated-inputs
11664 `(("java-xmp" ,java-xmp)))
11665 (native-inputs
11666 `(("java-hamcrest-core" ,java-hamcrest-core)
11667 ("java-junit" ,java-junit)))
11668 (home-page "https://github.com/drewnoakes/metadata-extractor")
11669 (synopsis "Extract metadata from image and video files")
11670 (description "Metadata-extractor is a straightforward Java library for
11671reading metadata from image files. It is able to read metadata in Exif,
11672IPTC, XMP, ICC and more formats.")
11673 (license license:asl2.0)))
0dd6089d
JL
11674
11675(define-public java-svg-salamander
11676 (package
11677 (name "java-svg-salamander")
11678 (version "1.1.2")
11679 (source (origin
11680 (method git-fetch)
11681 (uri (git-reference
11682 (url "https://github.com/blackears/svgSalamander")
11683 (commit (string-append "v" version))))
11684 (file-name (git-file-name name version))
11685 (sha256
11686 (base32
11687 "1zv3kjdkf6iqf02x6ln76254y634j2ji448y706a65lsbfjmmicf"))
11688 (modules '((guix build utils)))
11689 (snippet
58c3a4f5
BH
11690 '(begin
11691 (for-each delete-file (find-files "." ".*.jar"))
11692 #t))
0dd6089d
JL
11693 (patches
11694 (search-patches "java-svg-salamander-Fix-non-det.patch"))))
11695 (build-system ant-build-system)
11696 (arguments
11697 `(#:tests? #f; no tests
11698 #:phases
11699 (modify-phases %standard-phases
11700 (add-after 'unpack 'chdir
11701 (lambda _
11702 (chdir "svg-core")
11703 #t))
11704 (add-before 'build 'copy-jars
11705 (lambda* (#:key inputs #:allow-other-keys)
11706 (copy-file (car (find-files (assoc-ref inputs "javacc") "\\.jar$"))
11707 "../libraries/javacc.jar")
11708 (copy-file (car (find-files (assoc-ref inputs "ant") "ant\\.jar$"))
11709 "../libraries/ant.jar")
11710 #t))
11711 (replace 'install
11712 (install-jars "dist")))))
11713 (native-inputs
11714 `(("javacc" ,javacc)))
11715 (home-page "https://github.com/blackears/svgSalamander")
11716 (synopsis "SVG engine for Java")
11717 (description "SVG Salamander is an SVG engine for Java that's designed
11718to be small, fast, and allow programmers to use it with a minimum of fuss.
11719It's in particular targeted for making it easy to integrate SVG into Java
11720games and making it much easier for artists to design 2D game content - from
11721rich interactive menus to charts and graphcs to complex animations.")
11722 (license license:bsd-2)))
ff56e6ef
JL
11723
11724(define-public java-jboss-transaction-api-spec
11725 (package
11726 (name "java-jboss-transaction-api-spec")
11727 (version "1.2+1.1.1")
11728 (source (origin
11729 (method git-fetch)
11730 (uri (git-reference
11731 (url "https://github.com/jboss/jboss-transaction-api_spec")
11732 (commit "jboss-transaction-api_1.2_spec-1.1.1.Final")))
11733 (file-name (git-file-name name version))
11734 (sha256
11735 (base32
11736 "1xbfq5hvb86izflydxrqqv3k26c1ba2m0ap6m97shqrsdi9by4wy"))))
11737 (build-system ant-build-system)
11738 (arguments
11739 `(#:jar-name "java-jboss-transaction-api_spec.jar"
11740 #:source-dir "src/main/java"
11741 #:tests? #f)); no tests
11742 (inputs
11743 `(("java-cdi-api" ,java-cdi-api)
11744 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)))
11745 (home-page "https://github.com/jboss/jboss-transaction-api_spec")
11746 (synopsis "Generic transaction management API in Java")
11747 (description "Java-jboss-transaction-api-spec implements the Transactions
11748API. A transaction is a unit of work containing one or more operations
11749involving one or more shared resources having ACID (Atomicity, Consistency,
11750Isolation and Durability) properties.")
11751 ;; either gpl2 only with classpath exception or cddl.
11752 (license (list license:gpl2 license:cddl1.0))))