gnu: java-asm: Download using https.
[jackhill/guix/guix.git] / gnu / packages / java.scm
CommitLineData
0760e3a1 1;;; GNU Guix --- Functional package management for GNU
84b226c2 2;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
559239af 3;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
ea9e58ef 4;;; Copyright © 2016, 2017 Roel Janssen <roel@gnu.org>
717b6ba6 5;;; Copyright © 2017, 2019 Carlo Zancanaro <carlo@zancanaro.id.au>
da655b1e 6;;; Copyright © 2017, 2018, 2019 Julien Lepiller <julien@lepiller.eu>
88f256a1 7;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
1d47ea86 8;;; Copyright © 2016, 2017, 2018 Alex Vong <alexvong1995@gmail.com>
1c8ba10a 9;;; Copyright © 2017, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
0bc11cc7 10;;; Copyright © 2018, 2019 Gábor Boskovits <boskovits@gmail.com>
d0e9ded7 11;;; Copyright © 2018 Chris Marusich <cmmarusich@gmail.com>
2703d573 12;;; Copyright © 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
60f5ab0b 13;;; Copyright © 2019, 2020 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
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)))
0b1d71b2 333 (home-page "https://ant.apache.org")
5783bd77
RW
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)
952 ("libjpeg" ,libjpeg)
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)
1572 ("libjpeg" ,libjpeg)
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)
1869 ("libjpeg" ,libjpeg)
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)
2147 ("libjpeg" ,libjpeg)
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)
2194 ("libjpeg" ,libjpeg)
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"))
2c2b1ef8
BH
2356 (modules '((guix build utils)))
2357 (snippet
2358 '(begin
2359 ;; Delete included gradle jar
2360 (delete-file-recursively "gradle/wrapper")
2361 #t))
7214fbd2
JL
2362 (sha256
2363 (base32
2364 "0yg38mwpivswccv9n96k06x3iv82i4px1a9xg9l8dswzwmfj259f"))))
2365 (build-system ant-build-system)
2366 (arguments
2367 `(#:jar-name "java-openjfx.jar"
2368 #:source-dir "buildSrc/src/main/java"
2369 #:test-dir "buildSrc/src/test"
2370 #:phases
2371 (modify-phases %standard-phases
2372 (add-before 'configure 'generate-jsl-parser
2373 (lambda _
2374 (invoke "antlr3" "-o"
2375 "buildSrc/src/main/java/com/sun/scenario/effect/compiler"
2376 "buildSrc/src/main/antlr/JSL.g"))))))
2377 (inputs
2378 `(("antlr3" ,antlr3)
2379 ("java-stringtemplate" ,java-stringtemplate)))
2380 (native-inputs
2381 `(("java-junit" ,java-junit)
2382 ("java-hamcrest-core" ,java-hamcrest-core)))
2383 (home-page "https://openjfx.io")
2384 (synopsis "Graphical application toolkit in Java")
2385 (description "OpenJFX is a client application platform for desktop,
2386mobile and embedded systems built on Java. Its goal is to produce a
2387modern, efficient, and fully featured toolkit for developing rich client
2388applications. This package contains base classes for the OpenJFX
2389distribution and helper classes for building other parts of the
2390distribution.")
2391 (license license:gpl2))) ;gpl2 only, with classpath exception
2392
46f05439
JL
2393(define-public java-openjfx-base
2394 (package (inherit java-openjfx-build)
2395 (name "java-openjfx-base")
2396 (arguments
2397 `(#:jar-name "java-openjfx-base.jar"
2398 #:source-dir "modules/base/src/main/java:modules/base/src/main/java8:modules/base/src/main/version-info"
2399 #:test-dir "modules/base/src/test"
2400 #:phases
2401 (modify-phases %standard-phases
2402 (add-before 'check 'remove-empty-file
2403 (lambda _
2404 (with-directory-excursion "modules/base/src/test/java"
2405 ;; These files are completely commented, but junit expects them to
2406 ;; contain a class, so tests fail.
2407 (delete-file
2408 "com/sun/javafx/property/adapter/PropertyDescriptorTest.java")
2409 (delete-file
2410 "com/sun/javafx/property/adapter/ReadOnlyPropertyDescriptorTest.java")
2411 (delete-file "javafx/beans/property/PropertiesTest.java")
2412 (delete-file
2413 "javafx/beans/property/adapter/ReadOnlyJavaBeanPropertyBuilder_General_Test.java")
2414 ;; This one fails
2415 (delete-file "com/sun/javafx/runtime/VersionInfoTest.java"))
2416 #t)))))
2417 (propagated-inputs
2418 `(("java-openjfx-build" ,java-openjfx-build)))
2419 (description "OpenJFX is a client application platform for desktop,
2420mobile and embedded systems built on Java. Its goal is to produce a
2421modern, efficient, and fully featured toolkit for developing rich client
2422applications. This package contains base classes for the OpenJFX
2423distribution.")))
36f73d70
JL
2424
2425(define-public java-openjfx-graphics
2426 (package (inherit java-openjfx-build)
2427 (name "java-openjfx-graphics")
2428 (arguments
2429 `(#:jar-name "java-openjfx-graphics.jar"
2430 #:source-dir "modules/graphics/src/main/java"
2431 #:tests? #f; require X
2432 #:test-dir "modules/graphics/src/test"))
2433 (propagated-inputs
2434 `(("java-openjfx-base" ,java-openjfx-base)
2435 ("java-swt" ,java-swt)))
2436 (description "OpenJFX is a client application platform for desktop,
2437mobile and embedded systems built on Java. Its goal is to produce a
2438modern, efficient, and fully featured toolkit for developing rich client
2439applications. This package contains graphics-related classes for the
2440OpenJFX distribution.")))
68a13319
JL
2441
2442(define-public java-openjfx-media
2443 (package (inherit java-openjfx-build)
2444 (name "java-openjfx-media")
2445 (propagated-inputs
2446 `(("java-openjxf-graphics" ,java-openjfx-graphics)))
2447 (arguments
2448 `(#:jar-name "java-openjfx-media.jar"
2449 #:source-dir "modules/media/src/main/java"
2450 #:tests? #f)); no tests
2451 (description "OpenJFX is a client application platform for desktop,
2452mobile and embedded systems built on Java. Its goal is to produce a
2453modern, efficient, and fully featured toolkit for developing rich client
2454applications. This package contains media-related classes for the
2455OpenJFX distribution.")))
46f05439 2456
53fb0476 2457(define-public javacc-4
fc8d100b
RW
2458 (package
2459 (name "javacc")
53fb0476 2460 (version "4.1")
fc8d100b 2461 (source (origin
53fb0476
AV
2462 (method git-fetch)
2463 (uri (git-reference
2464 (url "https://github.com/javacc/javacc.git")
2465 (commit "release_41")))
2466 (file-name (string-append "javacc-" version "-checkout"))
fc8d100b
RW
2467 (sha256
2468 (base32
6662d65f
AV
2469 "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0"))
2470 (modules '((guix build utils)))
2471 ;; delete bundled jars
2472 (snippet '(begin (delete-file-recursively "lib") #t))))
fc8d100b 2473 (build-system ant-build-system)
53fb0476
AV
2474 ;; Tests fail with
2475 ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60:
2476 ;; JAVACODE failed
fc8d100b 2477 (arguments
53fb0476 2478 `(#:tests? #f
fc8d100b
RW
2479 #:phases
2480 (modify-phases %standard-phases
6662d65f
AV
2481 ;; Delete tests to avoid build failure (we don't run them anyway).
2482 (add-after 'unpack 'delete-tests
fc8d100b 2483 (lambda _
6662d65f
AV
2484 (for-each delete-file
2485 '("src/org/javacc/JavaCCTestCase.java"
2486 "src/org/javacc/parser/ExpansionTest.java"
2487 "src/org/javacc/parser/OptionsTest.java"
2488 "src/org/javacc/jjtree/JJTreeOptionsTest.java"))
2489 (for-each delete-file-recursively
2490 '("src/org/javacc/parser/test"
2491 "src/org/javacc/jjdoc/test"))
2492 #t))
53fb0476 2493 (replace 'install (install-jars "bin/lib")))))
fc8d100b
RW
2494 (home-page "https://javacc.org/")
2495 (synopsis "Java parser generator")
2496 (description "Java Compiler Compiler (JavaCC) is the most popular parser
2497generator for use with Java applications. A parser generator is a tool that
2498reads a grammar specification and converts it to a Java program that can
2499recognize matches to the grammar. In addition to the parser generator itself,
2500JavaCC provides other standard capabilities related to parser generation such
2501as tree building (via a tool called JJTree included with JavaCC), actions,
2502debugging, etc.")
2503 (license license:bsd-3)))
2504
53fb0476
AV
2505(define-public javacc
2506 (package
2507 (inherit javacc-4)
6b66e470 2508 (version "7.0.4")
ebf8048d
TGR
2509 (source
2510 (origin
2511 (method git-fetch)
2512 (uri (git-reference
2513 (url "https://github.com/javacc/javacc.git")
2514 (commit version)))
2515 (file-name (git-file-name "javacc" version))
2516 (sha256
2517 (base32 "18kkak3gda93gr25jrgy6q00g0jr8i24ri2wk4kybz1v234fxx9i"))
2518 (modules '((guix build utils)))
2519 ;; Delete bundled jars.
2520 (snippet '(begin (for-each delete-file-recursively
2521 '("bootstrap" "lib"))
2522 #t))))
6688c41e 2523 (arguments
6b66e470 2524 `(#:make-flags ; bootstrap from javacc-4
33428d12
AV
2525 (list (string-append "-Dbootstrap-jar="
2526 (assoc-ref %build-inputs "javacc")
2527 "/share/java/javacc.jar"))
2528 #:test-target "test"
6688c41e
RW
2529 #:phases
2530 (modify-phases %standard-phases
16fdf2f5
JL
2531 (replace 'install (install-jars "target"))
2532 (add-after 'install 'install-bin
2533 (lambda* (#:key outputs inputs #:allow-other-keys)
2534 (let* ((out (assoc-ref outputs "out"))
2535 (dir (string-append out "/share/java"))
2536 (bin (string-append out "/bin"))
2537 (javacc (string-append bin "/javacc")))
2538 (mkdir-p bin)
2539 (with-output-to-file javacc
2540 (lambda _
2541 (display
2542 (string-append "#!/bin/sh\n"
2543 (assoc-ref inputs "jdk") "/bin/java"
2544 " -cp " dir "/javacc.jar" " `basename $0`" " $*"))))
2545 (chmod javacc #o755)
2546 ;; symlink to different names to affect the first argument and
2547 ;; change the behavior of the jar file.
2548 (symlink javacc (string-append bin "/jjdoc"))
2549 (symlink javacc (string-append bin "/jjtree"))
2550 #t))))))
2551
33428d12
AV
2552 (native-inputs
2553 `(("javacc" ,javacc-4)))))
6688c41e 2554
c1cb8576
RW
2555;; This is the last 3.x release of ECJ
2556(define-public java-ecj-3
2557 (package
2558 (name "java-ecj")
2559 (version "3.8.2")
2560 (source (origin
2561 (method url-fetch)
2562 (uri (string-append "http://archive.eclipse.org/eclipse/"
2563 "downloads/drops/R-" version
2564 "-201301310800/ecjsrc-" version ".jar"))
2565 (sha256
2566 (base32
2567 "01mdj14jw11g1jfnki4fi8229p0c6zzckd38zqy2w4m3cjcvsx04"))))
2568 (build-system ant-build-system)
2569 (arguments
2570 `(#:tests? #f ; none included
2571 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2572 #:make-flags (list "-f" "src/build.xml")
2573 #:build-target "build"
2574 #:phases
2575 (modify-phases %standard-phases
2576 (add-after 'unpack 'fix-manifest
2577 (lambda _
2578 ;; Record the main class to make ecj executable.
2579 (with-atomic-file-replacement "src/META-INF/MANIFEST.MF"
2580 (lambda (in out)
2581 (display "Manifest-Version: 1.0
2582Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2c8ac364
MW
2583 out)))
2584 #t))
c1cb8576
RW
2585 (replace 'install (install-jars ".")))))
2586 (home-page "https://eclipse.org")
2587 (synopsis "Eclipse Java development tools core batch compiler")
2588 (description "This package provides the Eclipse Java core batch compiler.")
2589 (license license:epl1.0)))
2590
f201b18e
RW
2591;; This is needed for java-cisd-args4j
2592(define-public java-ecj-3.5
2593 (package (inherit java-ecj-3)
2594 (version "3.5.1")
2595 (source (origin
2596 (method url-fetch/zipbomb)
2597 (uri (string-append "http://archive.eclipse.org/eclipse/"
2598 "downloads/drops/R-" version
2599 "-200909170800/ecjsrc-" version ".zip"))
2600 (sha256
2601 (base32
2602 "1vnl2mavisc567bip736xzsvvbjif5279wc4a7pbdik5wlir8qr7"))))
2603 (build-system ant-build-system)
2604 (arguments
2605 `(#:tests? #f ; none included
2606 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2607 #:build-target "build"
2608 #:phases
2609 (modify-phases %standard-phases
2610 (add-after 'unpack 'fix-manifest
2611 (lambda _
2612 ;; Record the main class to make ecj executable.
2613 (with-atomic-file-replacement "META-INF/MANIFEST.MF"
2614 (lambda (in out)
2615 (dump-port in out)
2616 (display "Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2c8ac364
MW
2617 out)))
2618 #t))
f201b18e
RW
2619 (replace 'install (install-jars ".")))))
2620 (native-inputs
2621 `(("unzip" ,unzip)))))
2622
bc3497a5
BH
2623(define-public java-ecj
2624 (package (inherit java-ecj-3)
2625 (version "4.6.3")
2626 (source
2627 (origin
2628 (method url-fetch)
2629 (uri (string-append
2630 "http://archive.eclipse.org/eclipse/downloads/drops4/R-"
2631 version
2632 "-201703010400/ecjsrc-"
2633 version
2634 ".jar"))
2635 (sha256
2636 (base32
2637 "11cfgsdgznja1pvlxkjbqykxd7pcd5655vkm7s44xmahmap15gpl"))))
2638 (arguments
2639 `(#:tests? #f ; none included
2640 #:build-target "build"
2641 #:phases
2642 (modify-phases %standard-phases
2643 (add-after 'unpack 'fix-build.xml
2644 (lambda _
2645 (substitute* "src/build.xml"
2646 (("^.*MANIFEST.*$")
2647 ""))
2648 #t))
2649 (add-after 'unpack 'fix-prop
2650 (lambda _
2651 (substitute* "src/build.xml"
2652 (("^.*properties.*$")
2653 "<include name=\"**/*.properties\"/>
2654 <include name=\"**/*.props\"/>"))
2655 #t))
2656 (add-before 'build 'chdir
2657 (lambda _
2658 (chdir "src")
2659 #t))
2660 (replace 'install (install-jars ".")))))))
2661
30d55473
RW
2662(define-public java-cisd-base
2663 (let ((revision 38938)
2664 (base-version "14.12.0"))
2665 (package
2666 (name "java-cisd-base")
2667 (version (string-append base-version "-" (number->string revision)))
2668 (source (origin
2669 (method svn-fetch)
2670 (uri (svn-reference
2671 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2672 "base/tags/release/"
2673 (version-major+minor base-version)
2674 ".x/" base-version "/base/"))
2675 (revision revision)))
2676 (file-name (string-append "java-cisd-base-" version "-checkout"))
2677 (sha256
2678 (base32
2679 "1i5adyf7nzclb0wydgwa1az04qliid8035vpahaandmkmigbnxiy"))
2680 (modules '((guix build utils)))
2681 (snippet
2682 '(begin
2683 ;; Delete included gradle jar
2684 (delete-file-recursively "gradle/wrapper")
2685 ;; Delete pre-built native libraries
2686 (delete-file-recursively "libs")
2687 #t))))
2688 (build-system ant-build-system)
2689 (arguments
2690 `(#:make-flags '("-file" "build/build.xml")
2691 #:test-target "jar-test"
2692 #:jdk ,icedtea-8
2693 #:phases
2694 (modify-phases %standard-phases
2695 (add-after 'unpack 'unpack-build-resources
2696 (lambda* (#:key inputs #:allow-other-keys)
2697 (copy-recursively (assoc-ref inputs "build-resources")
2698 "../build_resources")
2699 #t))
2700 (add-after 'unpack-build-resources 'fix-dependencies
2701 (lambda* (#:key inputs #:allow-other-keys)
2702 (substitute* "build/build.xml"
2703 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2704 (string-append (assoc-ref inputs "java-testng")
2705 "/share/java/java-testng.jar"))
2706 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2707 (string-append (assoc-ref inputs "java-commons-lang")
2708 "/share/java/commons-lang-"
2709 ,(package-version java-commons-lang) ".jar"))
2710 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2711 (string-append (assoc-ref inputs "java-commons-io")
2712 "/share/java/commons-io-"
2713 ,(package-version java-commons-io)
2714 "-SNAPSHOT.jar"))
2715 ;; Remove dependency on svn
2716 (("<build-info.*") "")
2717 (("\\$\\{revision.number\\}")
2718 ,(number->string revision))
2719 (("\\$\\{version.number\\}") ,base-version))
2720 ;; Remove dependency on classycle
2721 (substitute* "../build_resources/ant/build-common.xml"
2722 (("<taskdef name=\"dependency-checker.*") "")
2723 (("classname=\"classycle.*") "")
2724 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2725 #t))
2726 ;; A few tests fail because of the lack of a proper /etc/groups and
2727 ;; /etc/passwd file in the build container.
2728 (add-after 'unpack 'disable-broken-tests
2729 (lambda _
2730 (substitute* "sourceTest/java/ch/systemsx/cisd/base/AllTests.java"
2731 (("Unix.isOperational\\(\\)") "false"))
2732 #t))
2733 ;; These decorators are almost useless and pull in an unpackaged
2734 ;; dependency.
2735 (add-after 'unpack 'remove-useless-decorators
2736 (lambda _
2737 (substitute* "source/java/ch/systemsx/cisd/base/unix/Unix.java"
2738 (("@Private") "")
2739 (("import ch.rinn.restrictions.Private;") ""))
2740 (substitute* "sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java"
2741 (("@Friend.*") "")
2742 (("import ch.rinn.restrictions.Friend;") ""))
2743 #t))
2744 (add-before 'configure 'build-native-code
2745 (lambda* (#:key inputs #:allow-other-keys)
2746 (let ((jdk (assoc-ref inputs "jdk"))
2747 (dir ,(match (%current-system)
2748 ("i686-linux"
2749 "i386-Linux")
2750 ((or "armhf-linux" "aarch64-linux")
2751 "arm-Linux")
2752 ((or "x86_64-linux")
2753 "amd64-Linux")
2754 (_ "unknown-Linux"))))
2755 (with-directory-excursion "source/c"
2756 (invoke "gcc" "-shared" "-O3" "-fPIC" "unix.c"
2757 (string-append "-I" jdk "/include")
2758 (string-append "-I" jdk "/include/linux")
2759 "-o" "libunix.so")
2760 (invoke "gcc" "-shared" "-O3" "-fPIC"
2761 "-DMACHINE_BYTE_ORDER=1"
2762 "copyCommon.c"
2763 "copyByteChar.c"
2764 "copyByteDouble.c"
2765 "copyByteFloat.c"
2766 "copyByteInt.c"
2767 "copyByteLong.c"
2768 "copyByteShort.c"
2769 (string-append "-I" jdk "/include")
2770 (string-append "-I" jdk "/include/linux")
2771 "-o" "libnativedata.so"))
2772 (install-file "source/c/libunix.so"
2773 (string-append "libs/native/unix/" dir))
2774 (install-file "source/c/libnativedata.so"
2775 (string-append "libs/native/nativedata/" dir))
2776 #t)))
2777 ;; In the "check" phase we only build the test executable.
2778 (add-after 'check 'run-tests
2779 (lambda _
2780 (invoke "java" "-jar" "targets/dist/sis-base-test.jar")
2781 (delete-file "targets/dist/sis-base-test.jar")
2782 #t))
2783 (replace 'install (install-jars "targets/dist")))))
2784 (native-inputs
2785 `(("jdk" ,icedtea-8)
2786 ("java-commons-lang" ,java-commons-lang)
2787 ("java-commons-io" ,java-commons-io)
2788 ("java-testng" ,java-testng)
2789 ("build-resources"
2790 ,(origin
2791 (method svn-fetch)
2792 (uri (svn-reference
2793 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2794 "base/tags/release/"
2795 (version-major+minor base-version)
2796 ".x/" base-version
2797 "/build_resources/"))
2798 (revision revision)))
2799 (sha256
2800 (base32
2801 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
2802 (home-page "http://svnsis.ethz.ch")
2803 (synopsis "Utility classes for libraries from ETH Zurich")
2804 (description "This library supplies some utility classes needed for
2805libraries from the SIS division at ETH Zurich like jHDF5.")
2806 ;; The C sources are under a non-copyleft license, which looks like a
2807 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
2808 (license (list license:asl2.0
2809 (license:non-copyleft "file://source/c/COPYING"))))))
2810
04ddca26
RW
2811(define-public java-cisd-args4j
2812 (let ((revision 39162)
2813 (base-version "9.11.2"))
2814 (package
2815 (name "java-cisd-args4j")
2816 (version (string-append base-version "-" (number->string revision)))
2817 (source (origin
2818 (method svn-fetch)
2819 (uri (svn-reference
2820 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2821 "args4j/tags/release/"
2822 (version-major+minor base-version)
2823 ".x/" base-version "/args4j/"))
2824 (revision revision)))
2825 (file-name (string-append "java-cisd-args4j-" version "-checkout"))
2826 (sha256
2827 (base32
2828 "0hhqznjaivq7ips7mkwas78z42s6djsm20rrs7g1zd59rcsakxn2"))))
2829 (build-system ant-build-system)
2830 (arguments
2831 `(#:make-flags '("-file" "build/build.xml")
2832 #:tests? #f ; there are no tests
2833 ;; There are weird build failures with JDK8, such as: "The type
2834 ;; java.io.ObjectInputStream cannot be resolved. It is indirectly
2835 ;; referenced from required .class files"
2836 #:jdk ,icedtea-7
2837 #:modules ((guix build ant-build-system)
2838 (guix build utils)
2839 (guix build java-utils)
2840 (sxml simple)
2841 (sxml transform)
2842 (sxml xpath))
2843 #:phases
2844 (modify-phases %standard-phases
2845 (add-after 'unpack 'unpack-build-resources
2846 (lambda* (#:key inputs #:allow-other-keys)
2847 (mkdir-p "../build_resources")
2848 (invoke "tar" "xf" (assoc-ref inputs "build-resources")
2849 "-C" "../build_resources"
2850 "--strip-components=1")
2851 (mkdir-p "../build_resources/lib")
2852 #t))
2853 (add-after 'unpack-build-resources 'fix-dependencies
2854 (lambda* (#:key inputs #:allow-other-keys)
2855 ;; FIXME: There should be a more convenient abstraction for
2856 ;; editing XML files.
2857 (with-directory-excursion "../build_resources/ant/"
2858 (chmod "build-common.xml" #o664)
2859 (call-with-output-file "build-common.xml.new"
2860 (lambda (port)
2861 (sxml->xml
2862 (pre-post-order
2863 (with-input-from-file "build-common.xml"
2864 (lambda _ (xml->sxml #:trim-whitespace? #t)))
2865 `(;; Remove dependency on classycle and custom ant tasks
2866 (taskdef . ,(lambda (tag . kids)
2867 (let ((name ((sxpath '(name *text*)) kids)))
2868 (if (or (member "build-info" name)
2869 (member "dependency-checker" name)
2870 (member "build-java-subprojects" name)
2871 (member "project-classpath" name))
2872 '() ; skip
2873 `(,tag ,@kids)))))
2874 (typedef . ,(lambda (tag . kids)
2875 (let ((name ((sxpath '(name *text*)) kids)))
2876 (if (member "recursive-jar" name)
2877 '() ; skip
2878 `(,tag ,@kids)))))
2879 (build-java-subprojects . ,(lambda _ '()))
2880 ;; Ignore everything else
2881 (*default* . ,(lambda (tag . kids) `(,tag ,@kids)))
2882 (*text* . ,(lambda (_ txt) txt))))
2883 port)))
2884 (rename-file "build-common.xml.new" "build-common.xml"))
2885 (substitute* "build/build.xml"
2886 (("\\$\\{lib\\}/cisd-base/cisd-base.jar")
2887 (string-append (assoc-ref inputs "java-cisd-base")
2888 "/share/java/sis-base.jar"))
2889 ;; Remove dependency on svn
2890 (("<build-info.*") "")
2891 (("\\$\\{revision.number\\}")
2892 ,(number->string revision))
2893 (("\\$\\{version.number\\}") ,base-version)
2894 ;; Don't use custom ant tasks.
2895 (("recursive-jar") "jar")
2896 (("<project-classpath.*") ""))
2897 #t))
2898 (replace 'install (install-jars "targets/dist")))))
2899 (inputs
2900 `(("java-cisd-base" ,java-cisd-base)))
2901 (native-inputs
2902 `(("ecj" ,java-ecj-3.5)
2903 ("build-resources"
2904 ,(origin
2905 (method svn-fetch)
2906 (uri (svn-reference
2907 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2908 "args4j/tags/release/"
2909 (version-major+minor base-version)
2910 ".x/" base-version
2911 "/build_resources/"))
2912 (revision revision)))
2913 (sha256
2914 (base32
2915 "056cam4k8pll7ass31sy6gwn8g8719njc41yf4l02b0342nilkyf"))
2916 (modules '((guix build utils)))
2917 ;; Delete bundled pre-built jars.
2918 (snippet
2919 '(begin (delete-file-recursively "lib/") #t))))))
2920 (home-page "http://svnsis.ethz.ch")
2921 (synopsis "Command line parser library")
2922 (description "This package provides a parser for command line arguments.")
2923 (license license:asl2.0))))
2924
2f0d0418
RW
2925(define-public java-cisd-jhdf5
2926 (let ((revision 39162)
2927 (base-version "14.12.6"))
2928 (package
2929 (name "java-cisd-jhdf5")
2930 (version (string-append base-version "-" (number->string revision)))
2931 (source (origin
2932 (method svn-fetch)
2933 (uri (svn-reference
2934 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2935 "jhdf5/tags/release/"
2936 (version-major+minor base-version)
2937 ".x/" base-version "/jhdf5/"))
2938 (revision revision)))
2939 (file-name (string-append "java-cisd-jhdf5-" version "-checkout"))
2940 (sha256
2941 (base32
2942 "13i17s2hn0q9drdqvp8csy7770p3hdbh9rp30ihln2ldkfawdmz0"))
2943 (modules '((guix build utils)))
2944 (snippet
2945 '(begin
2946 ;; Delete included gradle jar
2947 (delete-file-recursively "gradle/wrapper")
2948 ;; Delete pre-built native libraries
2949 (delete-file-recursively "libs")
2950 #t))))
2951 (build-system ant-build-system)
2952 (arguments
2953 `(#:make-flags '("-file" "build/build.xml")
2954 #:build-target "jar-all"
2955 #:test-target "jar-test"
2956 #:jdk ,icedtea-8
2957 #:phases
2958 (modify-phases %standard-phases
1ed386fc
RW
2959 ;; FIXME: this build phase fails.
2960 (delete 'generate-jar-indices)
2f0d0418
RW
2961 ;; Don't erase results from the build phase when building tests.
2962 (add-after 'unpack 'separate-test-target-from-clean
2963 (lambda _
2964 (substitute* "build/build.xml"
2965 (("\"jar-test\" depends=\"clean, ")
2966 "\"jar-test\" depends=\""))
2967 #t))
2968 (add-after 'unpack 'unpack-build-resources
2969 (lambda* (#:key inputs #:allow-other-keys)
2970 (copy-recursively (assoc-ref inputs "build-resources")
2971 "../build_resources")
2972 (delete-file-recursively "../build_resources/lib/")
2973 (mkdir-p "../build_resources/lib")
2974 ;; Remove dependency on classycle
2975 (substitute* "../build_resources/ant/build-common.xml"
2976 (("<taskdef name=\"dependency-checker.*") "")
2977 (("classname=\"classycle.*") "")
2978 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2979 ;; Remove dependency on svn
2980 (substitute* "build/build.xml"
2981 (("<build-info.*") "")
2982 (("\\$\\{revision.number\\}")
2983 ,(number->string revision))
2984 (("\\$\\{version.number\\}") ,base-version))
2985 #t))
2986 (add-after 'unpack-build-resources 'fix-dependencies
2987 (lambda* (#:key inputs #:allow-other-keys)
2988 (substitute* "../build_resources/ant/build-common.xml"
2989 (("../libraries/testng/testng-jdk15.jar")
2990 (string-append (assoc-ref inputs "java-testng")
2991 "/share/java/java-testng.jar")))
2992 (substitute* "build/build.xml"
2993 (("\\$\\{lib\\}/sis-base/sis-base.jar")
2994 (string-append (assoc-ref inputs "java-cisd-base")
2995 "/share/java/sis-base.jar"))
2996 (("\\$\\{lib\\}/cisd-args4j/cisd-args4j.jar")
2997 (string-append (assoc-ref inputs "java-cisd-args4j")
2998 "/share/java/cisd-args4j.jar"))
2999 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
3000 (string-append (assoc-ref inputs "java-commons-lang")
3001 "/share/java/commons-lang-"
3002 ,(package-version java-commons-lang) ".jar"))
3003 (("\\$\\{lib\\}/commons-io/commons-io.jar")
3004 (string-append (assoc-ref inputs "java-commons-io")
3005 "/share/java/commons-io-"
3006 ,(package-version java-commons-io)
3007 "-SNAPSHOT.jar"))
3008 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
3009 (string-append (assoc-ref inputs "java-testng")
3010 "/share/java/java-testng.jar"))
3011 (("\\$\\{lib\\}/junit4/junit.jar")
3012 (string-append (assoc-ref inputs "java-junit")
3013 "/share/java/junit.jar"))
3014 (("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar")
3015 (string-append (assoc-ref inputs "java-hamcrest-core")
3016 "/share/java/hamcrest-core.jar")))
3017 ;; Remove dependency on ch.rinn.restrictions
3018 (with-directory-excursion "source/java/ch/systemsx/cisd/hdf5/"
3019 (substitute* '("BitSetConversionUtils.java"
3020 "HDF5Utils.java")
3021 (("import ch.rinn.restrictions.Private;") "")
3022 (("@Private") "")))
3023 (with-directory-excursion "sourceTest/java/ch/systemsx/cisd/hdf5/"
3024 (substitute* '("BitSetConversionTest.java"
3025 "h5ar/HDF5ArchiverTest.java")
3026 (("import ch.rinn.restrictions.Friend;") "")
3027 (("@Friend.*") ""))
3028 ;; Remove leftovers from removing @Friend
3029 (substitute* "h5ar/HDF5ArchiverTest.java"
3030 (("\\{ HDF5Archiver.class, IdCache.class, LinkRecord.class \\}\\)")
3031 "")))
3032 #t))
3033 (add-before 'configure 'build-native-library
3034 (lambda* (#:key inputs #:allow-other-keys)
3035 (let ((jdk (assoc-ref inputs "jdk"))
3036 (hdf5 (assoc-ref inputs "hdf5"))
3037 (dir ,(match (%current-system)
3038 ("i686-linux"
3039 "i386-Linux")
3040 ((or "armhf-linux" "aarch64-linux")
3041 "arm-Linux")
3042 ((or "x86_64-linux")
3043 "amd64-Linux")
3044 (_ "unknown-Linux"))))
3045 (with-directory-excursion "source/c"
3046 (apply invoke `("gcc" "-shared" "-O3"
3047 "-fPIC"
3048 "-Wl,--exclude-libs,ALL"
3049 ,@(find-files "jhdf5" "\\.c$")
3050 ,@(find-files "hdf-java" "\\.c$")
3051 ,(string-append "-I" hdf5 "/include")
3052 ,(string-append "-I" jdk "/include")
3053 ,(string-append "-I" jdk "/include/linux")
3054 ,(string-append hdf5 "/lib/libhdf5.a")
3055 "-o" "libjhdf5.so" "-lz")))
3056 (install-file "source/c/libjhdf5.so"
3057 (string-append "libs/native/jhdf5/" dir))
3058 #t)))
3059 ;; In the "check" phase we only build the test executable.
3060 (add-after 'check 'run-tests
3061 (lambda _
3062 (invoke "java" "-jar" "targets/dist/sis-jhdf5-test.jar")
3063 (delete-file "targets/dist/sis-jhdf5-test.jar")
3064 #t))
3065 (replace 'install
3066 (install-jars "targets/dist")))))
3067 (inputs
3068 `(("java-cisd-base" ,java-cisd-base)
3069 ("java-cisd-args4j" ,java-cisd-args4j)
3070 ("java-commons-lang" ,java-commons-lang)
3071 ("java-commons-io" ,java-commons-io)
3072 ("hdf5" ,hdf5)
3073 ("zlib" ,zlib)))
3074 (native-inputs
3075 `(("jdk" ,icedtea-8)
3076 ("java-testng" ,java-testng)
3077 ("java-junit" ,java-junit)
3078 ("java-jmock" ,java-jmock)
3079 ("java-hamcrest-core" ,java-hamcrest-core)
3080 ("build-resources"
3081 ,(origin
3082 (method svn-fetch)
3083 (uri (svn-reference
3084 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3085 "jhdf5/tags/release/"
3086 (version-major+minor base-version)
3087 ".x/" base-version
3088 "/build_resources/"))
3089 (revision revision)))
3090 (sha256
3091 (base32
3092 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
3093 (home-page "https://wiki-bsse.ethz.ch/display/JHDF5/")
3094 (synopsis "Java binding for HDF5")
3095 (description "JHDF5 is a high-level API in Java for reading and writing
3096HDF5 files, building on the libraries provided by the HDF Group.")
3097 ;; The C sources are under a non-copyleft license, which looks like a
3098 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
3099 (license (list license:asl2.0
3100 (license:non-copyleft "file://source/c/COPYING"))))))
3101
218d093b
RW
3102(define-public java-classpathx-servletapi
3103 (package
3104 (name "java-classpathx-servletapi")
ae307724 3105 (version "3.0.1")
218d093b
RW
3106 (source (origin
3107 (method url-fetch)
3108 (uri (string-append "mirror://gnu/classpathx/servletapi/"
3109 "servletapi-" version ".tar.gz"))
3110 (sha256
3111 (base32
ae307724 3112 "07d8h051siga2f33fra72hk12sbq1bxa4jifjg0qj0vfazjjff0x"))))
218d093b
RW
3113 (build-system ant-build-system)
3114 (arguments
3115 `(#:tests? #f ; there is no test target
3116 #:build-target "compile"
218d093b 3117 #:make-flags
ae307724 3118 (list "-Dbuild.compiler=javac1.8"
218d093b
RW
3119 (string-append "-Ddist=" (assoc-ref %outputs "out")))
3120 #:phases
3121 (modify-phases %standard-phases
3122 (replace 'install
3123 (lambda* (#:key make-flags #:allow-other-keys)
2c8ac364 3124 (apply invoke `("ant" "dist" ,@make-flags)))))))
218d093b
RW
3125 (home-page "https://www.gnu.org/software/classpathx/")
3126 (synopsis "Java servlet API implementation")
3127 (description "This is the GNU servlet API distribution, part of the
3128ClasspathX project. It provides implementations of version 3.0 of the servlet
3129API and version 2.1 of the Java ServerPages API.")
3130 (license license:gpl3+)))
3131
10d62a88
BH
3132(define-public java-javaee-servletapi
3133 (package
3134 (name "java-javaee-servletapi")
3135 (version "3.1.0")
44bac44c
BH
3136 (source (origin
3137 (method git-fetch)
3138 (uri (git-reference
3139 (url "https://github.com/javaee/servlet-spec.git")
3140 (commit version)))
3141 (file-name (git-file-name name version))
3142 (sha256
3143 (base32
3144 "0s03lj8w5an70lkqbjycgfrfk0kc07vbfav91jzk87gh3awf9ksl"))))
10d62a88
BH
3145 (build-system ant-build-system)
3146 (arguments
3147 `(#:jar-name "javax-servletapi.jar"
3148 ;; no tests
3149 #:tests? #f
8ea8d607
BH
3150 #:source-dir "src/main/java"
3151 #:phases
3152 (modify-phases %standard-phases
3153 (add-before 'build 'copy-resources
3154 (lambda _
3155 (mkdir-p "build/classes/javax/servlet/http")
3156 (let ((from-prefix "src/main/java/javax/servlet/")
3157 (to-prefix "build/classes/javax/servlet/"))
3158 (for-each (lambda (f)
3159 (copy-file (string-append from-prefix f)
3160 (string-append to-prefix f)))
3161 (list "LocalStrings_ja.properties"
3162 "LocalStrings.properties"
3163 "LocalStrings_fr.properties"
3164 "http/LocalStrings_es.properties"
3165 "http/LocalStrings_ja.properties"
3166 "http/LocalStrings.properties"
3167 "http/LocalStrings_fr.properties")))
3168 #t)))))
10d62a88
BH
3169 (native-inputs
3170 `(("unzip" ,unzip)))
3171 (home-page "https://javaee.github.io/servlet-spec/")
3172 (synopsis "Java servlet API")
3173 (description "Java Servlet is the foundation web specification in the
3174Java Enterprise Platform. Developers can build web applications using the
3175Servlet API to interact with the request/response workflow. This project
3176provides information on the continued development of the Java Servlet
3177specification.")
3178 ;; Main code is dual-licensed by Oracle under either GLP2 or CDDL 1.1.
3179 ;; Some files are licensed under ASL 2.0.
3180 (license (list license:asl2.0 license:gpl2 license:cddl1.1))))
3181
5490480c
RW
3182(define-public java-swt
3183 (package
3184 (name "java-swt")
8710d4dd 3185 (version "4.7.1a")
5490480c
RW
3186 (source
3187 ;; The types of many variables and procedures differ in the sources
3188 ;; dependent on whether the target architecture is a 32-bit system or a
3189 ;; 64-bit system. Instead of patching the sources on demand in a build
3190 ;; phase we download either the 32-bit archive (which mostly uses "int"
3191 ;; types) or the 64-bit archive (which mostly uses "long" types).
8710d4dd
RW
3192 (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9")
3193 (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q")
5490480c
RW
3194 (file32 "x86")
3195 (file64 "x86_64"))
3196 (let-values (((hash file)
3197 (match (or (%current-target-system) (%current-system))
3198 ("x86_64-linux" (values hash64 file64))
3199 (_ (values hash32 file32)))))
3200 (origin
3201 (method url-fetch)
3202 (uri (string-append
8710d4dd
RW
3203 "http://download.eclipse.org/eclipse/downloads/drops4/"
3204 "R-" version "-201710090410/swt-" version
3205 "-gtk-linux-" file ".zip"))
5490480c
RW
3206 (sha256 (base32 hash))))))
3207 (build-system ant-build-system)
3208 (arguments
3209 `(#:jar-name "swt.jar"
8710d4dd 3210 #:jdk ,icedtea-8
5490480c
RW
3211 #:tests? #f ; no "check" target
3212 #:phases
3213 (modify-phases %standard-phases
3214 (replace 'unpack
3215 (lambda* (#:key source #:allow-other-keys)
2c8ac364
MW
3216 (mkdir "swt")
3217 (invoke "unzip" source "-d" "swt")
3218 (chdir "swt")
3219 (mkdir "src")
3220 (invoke "unzip" "src.zip" "-d" "src")))
5490480c
RW
3221 ;; The classpath contains invalid icecat jars. Since we don't need
3222 ;; anything other than the JDK on the classpath, we can simply unset
3223 ;; it.
3224 (add-after 'configure 'unset-classpath
3225 (lambda _ (unsetenv "CLASSPATH") #t))
3226 (add-before 'build 'build-native
3227 (lambda* (#:key inputs outputs #:allow-other-keys)
3228 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3229 ;; Build shared libraries. Users of SWT have to set the system
3230 ;; property swt.library.path to the "lib" directory of this
3231 ;; package output.
3232 (mkdir-p lib)
3233 (setenv "OUTPUT_DIR" lib)
3234 (with-directory-excursion "src"
2c8ac364 3235 (invoke "bash" "build.sh")))))
5490480c
RW
3236 (add-after 'install 'install-native
3237 (lambda* (#:key outputs #:allow-other-keys)
3238 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3239 (for-each (lambda (file)
3240 (install-file file lib))
3241 (find-files "." "\\.so$"))
3242 #t))))))
3243 (inputs
8710d4dd 3244 `(("gtk" ,gtk+-2)
5490480c
RW
3245 ("libxtst" ,libxtst)
3246 ("libxt" ,libxt)
3247 ("mesa" ,mesa)
3248 ("glu" ,glu)))
3249 (native-inputs
3250 `(("pkg-config" ,pkg-config)
3251 ("unzip" ,unzip)))
3252 (home-page "https://www.eclipse.org/swt/")
3253 (synopsis "Widget toolkit for Java")
3254 (description
3255 "SWT is a widget toolkit for Java designed to provide efficient, portable
3256access to the user-interface facilities of the operating systems on which it
3257is implemented.")
3258 ;; SWT code is licensed under EPL1.0
3259 ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1
3260 ;; Cairo bindings contain code under MPL1.1
3261 ;; XULRunner 1.9 bindings contain code under MPL2.0
3262 (license (list
3263 license:epl1.0
3264 license:mpl1.1
3265 license:mpl2.0
3266 license:lgpl2.1+))))
3267
068e476f
RJ
3268(define-public java-xz
3269 (package
3270 (name "java-xz")
92966847 3271 (version "1.6")
068e476f
RJ
3272 (source (origin
3273 (method url-fetch)
3274 (uri (string-append "http://tukaani.org/xz/xz-java-" version ".zip"))
3275 (sha256
3276 (base32
92966847 3277 "1z3p1ri1gvl07inxn0agx44ck8n7wrzfmvkz8nbq3njn8r9wba8x"))))
068e476f
RJ
3278 (build-system ant-build-system)
3279 (arguments
3280 `(#:tests? #f ; There are no tests to run.
3281 #:jar-name ,(string-append "xz-" version ".jar")
3282 #:phases
3283 (modify-phases %standard-phases
3284 ;; The unpack phase enters the "maven" directory by accident.
3285 (add-after 'unpack 'chdir
3286 (lambda _ (chdir "..") #t)))))
3287 (native-inputs
3288 `(("unzip" ,unzip)))
d6ddc5ab 3289 (home-page "https://tukaani.org/xz/java.html")
068e476f
RJ
3290 (synopsis "Implementation of XZ data compression in pure Java")
3291 (description "This library aims to be a complete implementation of XZ data
3292compression in pure Java. Single-threaded streamed compression and
3293decompression and random access decompression have been fully implemented.")
3294 (license license:public-domain)))
04100c3b
RW
3295
3296;; java-hamcrest-core uses qdox version 1.12. We package this version instead
3297;; of the latest release.
3298(define-public java-qdox-1.12
3299 (package
3300 (name "java-qdox")
3301 (version "1.12.1")
3302 (source (origin
3303 (method url-fetch)
3344bc49 3304 (uri (string-append "https://repo1.maven.org/maven2/"
04100c3b
RW
3305 "com/thoughtworks/qdox/qdox/" version
3306 "/qdox-" version "-sources.jar"))
3307 (sha256
3308 (base32
3309 "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl"))))
3310 (build-system ant-build-system)
3311 (arguments
3312 `(;; Tests require junit
3313 #:tests? #f
3314 #:jar-name "qdox.jar"
3315 #:phases
3316 (modify-phases %standard-phases
3317 (replace 'unpack
3318 (lambda* (#:key source #:allow-other-keys)
3319 (mkdir "src")
3320 (with-directory-excursion "src"
2c8ac364 3321 (invoke "jar" "-xf" source))))
04100c3b
RW
3322 ;; At this point we don't have junit, so we must remove the API
3323 ;; tests.
3324 (add-after 'unpack 'delete-tests
3325 (lambda _
3326 (delete-file-recursively "src/com/thoughtworks/qdox/junit")
3327 #t)))))
3344bc49 3328 (home-page "https://github.com/codehaus/qdox")
04100c3b
RW
3329 (synopsis "Parse definitions from Java source files")
3330 (description
3331 "QDox is a high speed, small footprint parser for extracting
3332class/interface/method definitions from source files complete with JavaDoc
b13cf17f 3333@code{@@tags}. It is designed to be used by active code generators or
04100c3b
RW
3334documentation tools.")
3335 (license license:asl2.0)))
e7e28510 3336
5281ba17
BH
3337(define-public java-qdox
3338 (package
3339 (name "java-qdox")
3340 ; Newer version exists, but this version is required by java-plexus-component-metadata
3341 (version "2.0-M2")
3342 (source (origin
3343 (method url-fetch)
3344 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
3345 ;; Older releases at https://github.com/codehaus/qdox/
3346 ;; Note: The release at maven is pre-generated. The release at
3347 ;; github requires jflex.
3348 (uri (string-append "https://repo1.maven.org/maven2/"
3349 "com/thoughtworks/qdox/qdox/" version
3350 "/qdox-" version "-sources.jar"))
3351 (sha256
3352 (base32
3353 "10xxrcaicq6axszcr2jpygisa4ch4sinyx5q7kqqxv4lknrmxp5x"))))
3354 (build-system ant-build-system)
3355 (arguments
3356 `(#:jar-name "qdox.jar"
3357 #:tests? #f)); no tests
3358 (home-page "https://github.com/codehaus/qdox")
3359 (synopsis "Parse definitions from Java source files")
3360 (description "QDox is a high speed, small footprint parser for extracting
3361class/interface/method definitions from source files complete with JavaDoc
3362@code{@@tags}. It is designed to be used by active code generators or
3363documentation tools.")
3364 (license license:asl2.0)))
3365
e7e28510
RW
3366(define-public java-jarjar
3367 (package
3368 (name "java-jarjar")
3369 (version "1.4")
3370 (source (origin
3371 (method url-fetch)
3372 (uri (string-append
3373 "https://storage.googleapis.com/google-code-archive-downloads/v2/"
3374 "code.google.com/jarjar/jarjar-src-" version ".zip"))
3375 (sha256
3376 (base32
88aa75e9
GB
3377 "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl"))
3378 (modules '((guix build utils)))
3379 (snippet
3380 '(begin
3381 ;; Delete bundled thirds-party jar archives.
3382 ;; TODO: unbundle maven-plugin-api.
3383 (delete-file "lib/asm-4.0.jar")
3384 (delete-file "lib/asm-commons-4.0.jar")
3385 (delete-file "lib/junit-4.8.1.jar")
3386 #t))))
e7e28510
RW
3387 (build-system ant-build-system)
3388 (arguments
3389 `(;; Tests require junit, which ultimately depends on this package.
3390 #:tests? #f
3391 #:build-target "jar"
3392 #:phases
3393 (modify-phases %standard-phases
88aa75e9
GB
3394 (add-before 'build 'do-not-use-bundled-asm
3395 (lambda* (#:key inputs #:allow-other-keys)
3396 (substitute* "build.xml"
3397 (("<path id=\"path.build\">")
3398 (string-append "<path id=\"path.build\"><fileset dir=\""
3399 (assoc-ref inputs "java-asm-bootstrap")
3400 "/share/java\" includes=\"**/*.jar\"/>"))
3401 (("<zipfileset src=\"lib/asm-4.0.jar\"/>") "")
3402 (("lib/asm-commons-4.0.jar")
3403 (string-append (assoc-ref inputs "java-asm-bootstrap")
3404 "/share/java/asm-6.0.jar"))
3405 (("<include name=\"org/objectweb/asm/commons/Remap\\*\\.class\"/>")
3406 (string-append "<include name=\"org/objectweb/asm/"
3407 "commons/Remap*.class\"/>"
3408 "<include name=\"org/objectweb/asm/*.class\"/>"
3409 "<include name=\"org/objectweb/asm/"
3410 "signature/*.class\"/>"
3411 "<include name=\"org/objectweb/asm/"
3412 "commons/SignatureRemapper.class\"/>")))
3413 #t))
e7e28510
RW
3414 (replace 'install
3415 (lambda* (#:key outputs #:allow-other-keys)
3416 (let ((target (string-append (assoc-ref outputs "out")
3417 "/share/java")))
3418 (install-file (string-append "dist/jarjar-" ,version ".jar")
3419 target))
3420 #t)))))
88aa75e9
GB
3421 (inputs
3422 `(("java-asm-bootstrap" ,java-asm-bootstrap)))
e7e28510
RW
3423 (native-inputs
3424 `(("unzip" ,unzip)))
3425 (home-page "https://code.google.com/archive/p/jarjar/")
3426 (synopsis "Repackage Java libraries")
3427 (description
3428 "Jar Jar Links is a utility that makes it easy to repackage Java
3429libraries and embed them into your own distribution. Jar Jar Links includes
3430an Ant task that extends the built-in @code{jar} task.")
3431 (license license:asl2.0)))
87c31a21
RW
3432
3433(define-public java-hamcrest-core
3434 (package
3435 (name "java-hamcrest-core")
3436 (version "1.3")
3437 (source (origin
2703d573
EF
3438 (method git-fetch)
3439 (uri (git-reference
3440 (url "https://github.com/hamcrest/JavaHamcrest/")
3441 (commit (string-append "hamcrest-java-" version))))
3442 (file-name (git-file-name name version))
87c31a21
RW
3443 (sha256
3444 (base32
2703d573 3445 "16fxxkrd31ahqvcaby30jgh3z1i0zxh51m24hxgz0z2agxj6bc63"))
87c31a21
RW
3446 (modules '((guix build utils)))
3447 (snippet
3448 '(begin
00672896
HG
3449 ;; Delete bundled thirds-party jar archives.
3450 (delete-file-recursively "lib")
87c31a21
RW
3451 #t))))
3452 (build-system ant-build-system)
3453 (arguments
3454 `(#:tests? #f ; Tests require junit
a8d3cb62
RW
3455 #:modules ((guix build ant-build-system)
3456 (guix build utils)
3457 (srfi srfi-1))
87c31a21 3458 #:make-flags (list (string-append "-Dversion=" ,version))
fae0b4ca 3459 #:test-target "unit-test"
87c31a21
RW
3460 #:build-target "core"
3461 #:phases
3462 (modify-phases %standard-phases
3463 ;; Disable unit tests, because they require junit, which requires
3464 ;; hamcrest-core. We also give a fixed value to the "Built-Date"
3465 ;; attribute from the manifest for reproducibility.
3466 (add-before 'configure 'patch-build.xml
3467 (lambda _
3468 (substitute* "build.xml"
3469 (("unit-test, ") "")
3470 (("\\$\\{build.timestamp\\}") "guix"))
3471 #t))
3472 ;; Java's "getMethods()" returns methods in an unpredictable order.
3473 ;; To make the output of the generated code deterministic we must
3474 ;; sort the array of methods.
3475 (add-after 'unpack 'make-method-order-deterministic
3476 (lambda _
3477 (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java"
3478 (("import java\\.util\\.Iterator;" line)
3479 (string-append line "\n"
3480 "import java.util.Arrays; import java.util.Comparator;"))
3481 (("allMethods = cls\\.getMethods\\(\\);" line)
3482 (string-append "_" line
3483 "
3484private Method[] getSortedMethods() {
3485 Arrays.sort(_allMethods, new Comparator<Method>() {
3486 @Override
3487 public int compare(Method a, Method b) {
3488 return a.toString().compareTo(b.toString());
3489 }
3490 });
3491 return _allMethods;
3492}
3493
2c8ac364
MW
3494private Method[] allMethods = getSortedMethods();")))
3495 #t))
87c31a21
RW
3496 (add-before 'build 'do-not-use-bundled-qdox
3497 (lambda* (#:key inputs #:allow-other-keys)
3498 (substitute* "build.xml"
3499 (("lib/generator/qdox-1.12.jar")
3500 (string-append (assoc-ref inputs "java-qdox-1.12")
3501 "/share/java/qdox.jar")))
3502 #t))
fab959d3
HG
3503 ;; build.xml searches for .jar files in this directoy, which
3504 ;; we remove from the source archive.
3505 (add-before 'build 'create-dummy-directories
3506 (lambda _
3507 (mkdir-p "lib/integration")
3508 #t))
87c31a21
RW
3509 (replace 'install
3510 (lambda* (#:key outputs #:allow-other-keys)
a8d3cb62
RW
3511 (let* ((target (string-append (assoc-ref outputs "out")
3512 "/share/java/"))
3513 (version-suffix ,(string-append "-" version ".jar"))
3514 (install-without-version-suffix
3515 (lambda (jar)
3516 (copy-file jar
3517 (string-append target
3518 (basename jar version-suffix)
3519 ".jar")))))
3520 (mkdir-p target)
3521 (for-each
3522 install-without-version-suffix
3523 (find-files "build"
3524 (lambda (name _)
3525 (and (string-suffix? ".jar" name)
3526 (not (string-suffix? "-sources.jar" name)))))))
3527 #t)))))
87c31a21
RW
3528 (native-inputs
3529 `(("java-qdox-1.12" ,java-qdox-1.12)
3530 ("java-jarjar" ,java-jarjar)))
3531 (home-page "http://hamcrest.org/")
3532 (synopsis "Library of matchers for building test expressions")
3533 (description
3534 "This package provides a library of matcher objects (also known as
3535constraints or predicates) allowing @code{match} rules to be defined
3536declaratively, to be used in other frameworks. Typical scenarios include
3537testing frameworks, mocking libraries and UI validation rules.")
3538 (license license:bsd-2)))
d0184f44
RW
3539
3540(define-public java-junit
3541 (package
3542 (name "java-junit")
3543 (version "4.12")
3544 (source (origin
42c1c59e
EF
3545 (method git-fetch)
3546 (uri (git-reference
3547 (url "https://github.com/junit-team/junit/")
3548 (commit (string-append "r" version))))
3549 (file-name (git-file-name name version))
d0184f44
RW
3550 (sha256
3551 (base32
42c1c59e 3552 "1j8avi91px1z8rjc89cfikwrvfifdmmsarwiyrcnr59ynvpz0v8h"))
d0184f44
RW
3553 (modules '((guix build utils)))
3554 (snippet
3555 '(begin
3556 ;; Delete bundled jar archives.
3557 (delete-file-recursively "lib")
3558 #t))))
3559 (build-system ant-build-system)
3560 (arguments
3561 `(#:tests? #f ; no tests
3562 #:jar-name "junit.jar"))
3563 (inputs
3564 `(("java-hamcrest-core" ,java-hamcrest-core)))
42c1c59e 3565 (home-page "https://junit.org/junit4/")
d0184f44
RW
3566 (synopsis "Test framework for Java")
3567 (description
3568 "JUnit is a simple framework to write repeatable tests for Java projects.
3569JUnit provides assertions for testing expected results, test fixtures for
3570sharing common test data, and test runners for running tests.")
3571 (license license:epl1.0)))
9fb20d01
RW
3572
3573(define-public java-plexus-utils
3574 (package
3575 (name "java-plexus-utils")
0cd8efcc 3576 (version "3.2.0")
9fb20d01 3577 (source (origin
c53badd4
EF
3578 (method git-fetch)
3579 (uri (git-reference
3580 (url "https://github.com/codehaus-plexus/plexus-utils")
3581 (commit (string-append "plexus-utils-" version))))
3582 (file-name (git-file-name name version))
9fb20d01
RW
3583 (sha256
3584 (base32
c53badd4 3585 "1mlx7xrq7lgqjqcpg7y4hi1ghavf28vvk3har82037dqx61n0f15"))))
9fb20d01
RW
3586 (build-system ant-build-system)
3587 ;; FIXME: The default build.xml does not include a target to install
3588 ;; javadoc files.
3589 (arguments
3590 `(#:jar-name "plexus-utils.jar"
3591 #:source-dir "src/main"
3592 #:phases
3593 (modify-phases %standard-phases
3594 (add-after 'unpack 'fix-reference-to-/bin-and-/usr
3595 (lambda _
3596 (substitute* "src/main/java/org/codehaus/plexus/util/\
3597cli/shell/BourneShell.java"
3598 (("/bin/sh") (which "sh"))
3599 (("/usr/") (getcwd)))
3600 #t))
3601 (add-after 'unpack 'fix-or-disable-broken-tests
3602 (lambda _
3603 (with-directory-excursion "src/test/java/org/codehaus/plexus/util"
3604 (substitute* '("cli/CommandlineTest.java"
3605 "cli/shell/BourneShellTest.java")
3606 (("/bin/sh") (which "sh"))
3607 (("/bin/echo") (which "echo")))
3608
3609 ;; This test depends on MavenProjectStub, but we don't have
3610 ;; a package for Maven.
3611 (delete-file "introspection/ReflectionValueExtractorTest.java")
3612
3613 ;; FIXME: The command line tests fail, maybe because they use
3614 ;; absolute paths.
3615 (delete-file "cli/CommandlineTest.java"))
3616 #t)))))
3617 (native-inputs
0cd8efcc
JL
3618 `(("java-hamcrest-core" ,java-hamcrest-core)
3619 ("java-junit" ,java-junit)))
1b4d40cf 3620 (home-page "https://codehaus-plexus.github.io/plexus-utils/")
9fb20d01
RW
3621 (synopsis "Common utilities for the Plexus framework")
3622 (description "This package provides various Java utility classes for the
3623Plexus framework to ease working with strings, files, command lines, XML and
3624more.")
3625 (license license:asl2.0)))
1e555562
HG
3626
3627(define-public java-plexus-interpolation
3628 (package
3629 (name "java-plexus-interpolation")
3630 (version "1.23")
3631 (source (origin
c4b67ba3
EF
3632 (method git-fetch)
3633 (uri (git-reference
3634 (url "https://github.com/codehaus-plexus/plexus-interpolation")
3635 (commit (string-append "plexus-interpolation-" version))))
3636 (file-name (git-file-name name version))
1e555562
HG
3637 (sha256
3638 (base32
c4b67ba3 3639 "005hxxg1adv71a96lz4vp65bk3v1pi76j4c45z29xzizclib16vl"))))
1e555562
HG
3640 (build-system ant-build-system)
3641 (arguments
3642 `(#:jar-name "plexus-interpolation.jar"
3643 #:source-dir "src/main"))
3644 (native-inputs
3645 `(("java-junit" ,java-junit)
3646 ("java-hamcrest-core" ,java-hamcrest-core)))
35e74723 3647 (home-page "https://codehaus-plexus.github.io/plexus-interpolation/")
1e555562
HG
3648 (synopsis "Java components for interpolating ${} strings and the like")
3649 (description "Plexus interpolator is a modular, flexible interpolation
3650framework for the expression language style commonly seen in Maven, Plexus,
3651and other related projects.
3652
3653It has its foundation in the @code{org.codehaus.plexus.utils.interpolation}
3654package within @code{plexus-utils}, but has been separated in order to allow
3655these two libraries to vary independently of one another.")
3656 (license license:asl2.0)))
8f8ed9aa 3657
bb27eb0d
JL
3658(define-public java-plexus-classworlds
3659 (package
3660 (name "java-plexus-classworlds")
3661 (version "2.5.2")
3662 (source (origin
9520b2b1
EF
3663 (method git-fetch)
3664 (uri (git-reference
3665 (url "https://github.com/codehaus-plexus/plexus-classworlds")
3666 (commit (string-append "plexus-classworlds-" version))))
3667 (file-name (git-file-name name version))
bb27eb0d
JL
3668 (sha256
3669 (base32
9520b2b1 3670 "1iv8x55fbni2hg4l7pdpbwfq75xmvq1f25g6nxma8rcdpihsh13r"))))
bb27eb0d
JL
3671 (build-system ant-build-system)
3672 (arguments
3673 `(#:jar-name "plexus-classworlds.jar"
3674 #:source-dir "src/main"
3675 #:tests? #f));; FIXME: we need to generate some resources as in pom.xml
3676 (native-inputs
3677 `(("java-junit" ,java-junit)))
268dc472 3678 (home-page "https://codehaus-plexus.github.io/plexus-classworlds/")
bb27eb0d 3679 (synopsis "Java class loader framework")
f4548394
TGR
3680 (description "Plexus classworlds replaces the native @code{ClassLoader}
3681mechanism of Java. It is especially useful for dynamic loading of application
bb27eb0d
JL
3682components.")
3683 (license license:asl2.0)))
3684
a7ad92ad 3685(define java-plexus-container-default-bootstrap
0726d4ea
JL
3686 (package
3687 (name "java-plexus-container-default-bootstrap")
3688 (version "1.7.1")
3689 (source (origin
3a26ea3a
EF
3690 (method git-fetch)
3691 (uri (git-reference
3692 (url "https://github.com/codehaus-plexus/plexus-containers")
3693 (commit (string-append "plexus-containers-" version))))
3694 (file-name (git-file-name name version))
0726d4ea
JL
3695 (sha256
3696 (base32
3a26ea3a 3697 "1316hrp5vqfv0aw7miq2fp0wwy833h66h502h29vnh5sxj27x228"))))
0726d4ea
JL
3698 (build-system ant-build-system)
3699 (arguments
3700 `(#:jar-name "container-default.jar"
3701 #:source-dir "plexus-container-default/src/main/java"
3702 #:test-dir "plexus-container-default/src/test"
3703 #:jdk ,icedtea-8
3704 #:tests? #f; requires plexus-archiver, which depends on this package
3705 #:phases
3706 (modify-phases %standard-phases
3707 (add-before 'build 'copy-resources
3708 (lambda _
3709 (copy-recursively
3710 "plexus-container-default/src/main/resources/"
3711 "build/classes")
3712 #t)))))
3713 (inputs
3714 `(("worldclass" ,java-plexus-classworlds)
3715 ("xbean" ,java-geronimo-xbean-reflect)
3716 ("utils" ,java-plexus-utils)
3717 ("junit" ,java-junit)
3718 ("guava" ,java-guava)))
3719 (home-page "https://github.com/codehaus-plexus/plexus-containers")
f4548394 3720 (synopsis "Inversion-of-control container")
0726d4ea 3721 (description "Plexus-default-container is Plexus' inversion-of-control
f4548394 3722(@dfn{IoC}) container. It is composed of its public API and its default
0726d4ea
JL
3723implementation.")
3724 (license license:asl2.0)))
3725
0858b9dc
JL
3726(define-public java-plexus-io
3727 (package
3728 (name "java-plexus-io")
3729 (version "3.0.0")
3730 (source (origin
48fe942c
EF
3731 (method git-fetch)
3732 (uri (git-reference
3733 (url "https://github.com/codehaus-plexus/plexus-io")
3734 (commit (string-append "plexus-io-" version))))
3735 (file-name (git-file-name name version))
0858b9dc
JL
3736 (sha256
3737 (base32
48fe942c 3738 "1h4q9l2j9sfbscvxpnyy2hazi0r83h3am86y4r959wrl1b24xxwd"))))
0858b9dc
JL
3739 (build-system ant-build-system)
3740 (arguments
3741 `(#:jar-name "plexus-io.jar"
3742 #:source-dir "src/main/java"
3743 #:test-dir "src/test"
3744 #:jdk ,icedtea-8
3745 #:phases
3746 (modify-phases %standard-phases
3747 (add-before 'build 'copy-resources
3748 (lambda _
3749 (mkdir-p "build/classes/META-INF/plexus")
3750 (copy-file "src/main/resources/META-INF/plexus/components.xml"
3751 "build/classes/META-INF/plexus/components.xml")
3752 #t)))))
3753 (inputs
3754 `(("utils" ,java-plexus-utils)
3755 ("commons-io" ,java-commons-io)
3756 ("java-jsr305" ,java-jsr305)))
3757 (native-inputs
3758 `(("junit" ,java-junit)
3759 ("hamcrest" ,java-hamcrest-core)
3760 ("guava" ,java-guava)
3761 ("classworlds" ,java-plexus-classworlds)
3762 ("xbean" ,java-geronimo-xbean-reflect)
3763 ("container-default" ,java-plexus-container-default-bootstrap)))
3764 (home-page "https://github.com/codehaus-plexus/plexus-io")
3765 (synopsis "I/O plexus components")
3766 (description "Plexus IO is a set of plexus components, which are designed
3767for use in I/O operations. This implementation using plexus components allows
3768reusing it in maven.")
3769 (license license:asl2.0)))
3770
b51df3ca
JL
3771(define-public java-plexus-archiver
3772 (package
3773 (name "java-plexus-archiver")
6f737ae6 3774 (version "4.1.0")
b51df3ca
JL
3775 (source (origin
3776 (method url-fetch)
3777 (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver"
3778 "/archive/plexus-archiver-" version ".tar.gz"))
3779 (sha256
3780 (base32
6f737ae6 3781 "0ry6i92gli0mvdmfih2vgs0lkf9yvx18h2ajxim66yg6yipnp0hg"))))
b51df3ca
JL
3782 (build-system ant-build-system)
3783 (arguments
3784 `(#:jar-name "plexus-archiver.jar"
3785 #:source-dir "src/main/java"
3786 #:jdk ,icedtea-8
3787 #:test-dir "src/test"
3788 #:test-exclude (list "**/Abstract*.java" "**/Base*.java")
3789 #:phases
3790 (modify-phases %standard-phases
3791 (add-before 'check 'remove-failing
3792 (lambda _
3793 ;; Requires an older version of plexus container
3794 (delete-file
2c8ac364
MW
3795 "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java")
3796 #t))
6f737ae6
JL
3797 (add-before 'check 'fix-test-building
3798 (lambda _
3799 (substitute* "build.xml"
3800 (("srcdir=\"src/test\"") "srcdir=\"src/test/java\""))
3801 #t))
b51df3ca
JL
3802 (add-before 'build 'copy-resources
3803 (lambda _
3804 (mkdir-p "build/classes/META-INF/plexus")
3805 (copy-file "src/main/resources/META-INF/plexus/components.xml"
3806 "build/classes/META-INF/plexus/components.xml")
3807 #t)))))
3808 (inputs
3809 `(("utils" ,java-plexus-utils)
3810 ("commons-io" ,java-commons-io)
3811 ("snappy" ,java-iq80-snappy)
3812 ("io" ,java-plexus-io)
3813 ("compress" ,java-commons-compress)
3814 ("container-default" ,java-plexus-container-default-bootstrap)
3815 ("snappy" ,java-snappy)
3816 ("java-jsr305" ,java-jsr305)))
3817 (native-inputs
6f737ae6
JL
3818 `(("java-hamcrest-core" ,java-hamcrest-core)
3819 ("junit" ,java-junit)
b51df3ca
JL
3820 ("classworld" ,java-plexus-classworlds)
3821 ("xbean" ,java-geronimo-xbean-reflect)
3822 ("xz" ,java-tukaani-xz)
3823 ("guava" ,java-guava)))
3824 (home-page "https://github.com/codehaus-plexus/plexus-archiver")
3825 (synopsis "Archiver component of the Plexus project")
3826 (description "Plexus-archiver contains a component to deal with project
3827archives (jar).")
3828 (license license:asl2.0)))
3829
a0837294
JL
3830(define-public java-plexus-container-default
3831 (package
3832 (inherit java-plexus-container-default-bootstrap)
3833 (name "java-plexus-container-default")
3834 (arguments
3835 `(#:jar-name "container-default.jar"
3836 #:source-dir "plexus-container-default/src/main/java"
3837 #:test-dir "plexus-container-default/src/test"
3838 #:test-exclude (list ;"**/*Test.java"
3839 "**/Abstract*.java"
3840 ;; Requires plexus-hierarchy
3841 "**/PlexusHierarchyTest.java"
3842 ;; Failures
3843 "**/ComponentRealmCompositionTest.java"
3844 "**/PlexusContainerTest.java")
3845 #:jdk ,icedtea-8
3846 #:phases
3847 (modify-phases %standard-phases
3848 (add-before 'build 'copy-resources
3849 (lambda _
3850 (copy-recursively
3851 "plexus-container-default/src/main/resources/"
3852 "build/classes")
3853 #t))
3854 (add-before 'check 'fix-paths
3855 (lambda _
3856 (let ((dir "plexus-container-default/src/test/java/org/codehaus"))
3857 (substitute*
3858 (string-append
3859 dir "/plexus/component/composition/"
3860 "ComponentRealmCompositionTest.java")
3861 (("src/test") "plexus-container-default/src/test"))
3862 #t))))))
3863 (inputs
3864 `(("worldclass" ,java-plexus-classworlds)
3865 ("xbean" ,java-geronimo-xbean-reflect)
3866 ("utils" ,java-plexus-utils)
3867 ("junit" ,java-junit)
3868 ("guava" ,java-guava)))
3869 (native-inputs
3870 `(("archiver" ,java-plexus-archiver)
3871 ("hamcrest" ,java-hamcrest-core)))))
3872
3214afab
JL
3873(define-public java-plexus-component-annotations
3874 (package
3875 (inherit java-plexus-container-default)
3876 (name "java-plexus-component-annotations")
3877 (arguments
3878 `(#:jar-name "plexus-component-annotations.jar"
3879 #:source-dir "plexus-component-annotations/src/main/java"
3880 #:tests? #f)); no tests
3881 (inputs '())
3882 (native-inputs '())
3883 (synopsis "Plexus descriptors generator")
3884 (description "This package is a Maven plugin to generate Plexus descriptors
3885from source tags and class annotations.")))
3886
4f77ba17
JL
3887(define-public java-plexus-cipher
3888 (package
3889 (name "java-plexus-cipher")
3890 (version "1.7")
3891 (source (origin
d0e64613
EF
3892 (method git-fetch)
3893 (uri (git-reference
3894 (url "https://github.com/codehaus-plexus/plexus-cipher")
3895 (commit (string-append "plexus-cipher-" version))))
3896 (file-name (git-file-name name version))
4f77ba17
JL
3897 (sha256
3898 (base32
d0e64613 3899 "0m638nzlxbmnbcj5cwdpgs326ab584yv0k803zlx37r6iqwvf6b0"))))
4f77ba17
JL
3900 (build-system ant-build-system)
3901 (arguments
3902 `(#:jar-name "plexus-cipher.jar"
3903 #:source-dir "src/main/java"
3904 #:jdk ,icedtea-8
3905 #:tests? #f; FIXME: requires sisu-inject-bean
3906 #:phases
3907 (modify-phases %standard-phases
3908 (add-before 'build 'copy-resources
3909 (lambda _
3910 (copy-recursively "src/main/resources" "build/classes")
3911 (mkdir-p "build/classes/META-INF/sisu")
3912 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
3913 (lambda _
3914 (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
3915 #t)))))
3916 (inputs
3917 `(("java-cdi-api" ,java-cdi-api)
3918 ("java-javax-inject" ,java-javax-inject)))
3919 (home-page "https://github.com/sonatype/plexus-cipher")
3920 (synopsis "Encryption/decryption Component")
3921 (description "Plexus-cipher contains a component to deal with encryption
3922and decryption.")
3923 (license license:asl2.0)))
3924
239126d4
JL
3925(define-public java-plexus-compiler-api
3926 (package
3927 (name "java-plexus-compiler-api")
a70182b0 3928 (version "2.8.4")
239126d4 3929 (source (origin
5723137a
EF
3930 (method git-fetch)
3931 (uri (git-reference
3932 (url "https://github.com/codehaus-plexus/plexus-compiler")
3933 (commit (string-append "plexus-compiler-" version))))
3934 (file-name (git-file-name name version))
239126d4
JL
3935 (sha256
3936 (base32
5723137a 3937 "1nq1gnn3s6z1j29gmi1hqbklsmm8b1lmnafb0191914f95mn18gk"))))
239126d4
JL
3938 (build-system ant-build-system)
3939 (arguments
3940 `(#:jar-name "plexus-compiler-api.jar"
3941 #:source-dir "plexus-compiler-api/src/main/java"
3942 #:jdk ,icedtea-8
3943 #:test-dir "plexus-compiler-api/src/test"))
3944 (inputs
3945 `(("java-plexus-container-default" ,java-plexus-container-default)
3946 ("java-plexus-util" ,java-plexus-utils)))
3947 (native-inputs
3948 `(("java-junit" ,java-junit)))
3949 (home-page "https://github.com/codehaus-plexus/plexus-compiler")
3950 (synopsis "Plexus Compilers component's API to manipulate compilers")
3951 (description "This package contains the API used by components to manipulate
3952compilers.")
3953 (license (list license:asl2.0
3954 license:expat))))
3955
f8a519fa
JL
3956(define-public java-plexus-compiler-javac
3957 (package
3958 (inherit java-plexus-compiler-api)
3959 (name "java-plexus-compiler-javac")
3960 (arguments
3961 `(#:jar-name "plexus-compiler-javac.jar"
3962 #:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java"
3963 #:jdk ,icedtea-8
3964 #:tests? #f; depends on compiler-test -> maven-core -> ... -> this package.
3965 #:test-dir "plexus-compilers/plexus-compiler-javac/src/test"))
3966 (inputs
3967 `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
3968 ("java-plexus-utils" ,java-plexus-utils)
3969 ("java-plexus-container-default" ,java-plexus-container-default)))
3970 (native-inputs
3971 `(("java-junit" ,java-junit)))
3972 (synopsis "Javac Compiler support for Plexus Compiler component")
3973 (description "This package contains the Javac Compiler support for Plexus
3974Compiler component.")))
3975
0aa85081
JL
3976(define-public java-plexus-sec-dispatcher
3977 (package
3978 (name "java-plexus-sec-dispatcher")
3979 (version "1.4") ;; Newest release listed at the Maven Central Repository.
3980 (source (origin
3981 ;; This project doesn't tag releases or publish tarballs, so we take
3982 ;; the "prepare release plexus-sec-dispatcher-1.4" git commit.
d9e356a8
EF
3983 (method git-fetch)
3984 (uri (git-reference
3985 (url "https://github.com/sonatype/plexus-sec-dispatcher/")
3986 (commit "7db8f880486e192a1c5ea9544e01e756c3d49d0f")))
0aa85081
JL
3987 (sha256
3988 (base32
d9e356a8
EF
3989 "1ng4yliy4cqpjr4fxxjbpwyk1wkch5f8vblm1kvwf328s4gibszs"))
3990 (file-name (git-file-name name version))))
0aa85081
JL
3991 (arguments
3992 `(#:jar-name "plexus-sec-dispatcher.jar"
3993 #:source-dir "src/main/java"
3994 #:jdk ,icedtea-8
3995 #:phases
3996 (modify-phases %standard-phases
3997 (add-before 'build 'generate-models
3998 (lambda* (#:key inputs #:allow-other-keys)
3999 (define (modello-single-mode file version mode)
2c8ac364
MW
4000 (invoke "java"
4001 "org.codehaus.modello.ModelloCli"
4002 file mode "src/main/java" version
4003 "false" "true"))
0aa85081 4004 (let ((file "src/main/mdo/settings-security.mdo"))
0aa85081
JL
4005 (modello-single-mode file "1.0.0" "java")
4006 (modello-single-mode file "1.0.0" "xpp3-reader")
2c8ac364
MW
4007 (modello-single-mode file "1.0.0" "xpp3-writer"))
4008 #t))
0aa85081
JL
4009 (add-before 'build 'generate-components.xml
4010 (lambda _
4011 (mkdir-p "build/classes/META-INF/plexus")
4012 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
4013 (lambda _
4014 (display
4015 "<component-set>\n
4016 <components>\n
4017 <component>\n
4018 <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n
4019 <role-hint>default</role-hint>\n
4020 <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n
4021 <description></description>\n
4022 <requirements>\n
4023 <requirement>\n
4024 <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n
4025 <field-name>_cipher</field-name>\n
4026 </requirement>\n
4027 <requirement>\n
4028 <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n
4029 <field-name>_decryptors</field-name>\n
4030 </requirement>\n
4031 </requirements>\n
4032 <configuration>\n
4033 <_configuration-file>~/.settings-security.xml</_configuration-file>\n
4034 </configuration>\n
4035 </component>\n
4036 </components>\n
2c8ac364
MW
4037</component-set>\n")))
4038 #t))
0aa85081
JL
4039 (add-before 'check 'fix-paths
4040 (lambda _
2c8ac364
MW
4041 (copy-recursively "src/test/resources" "target")
4042 #t)))))
0aa85081
JL
4043 (inputs
4044 `(("java-plexus-cipher" ,java-plexus-cipher)))
4045 (native-inputs
4046 `(("java-modello-core" ,java-modello-core)
4047 ;; for modello:
4048 ("java-plexus-container-default" ,java-plexus-container-default)
4049 ("java-plexus-classworlds" ,java-plexus-classworlds)
4050 ("java-plexus-utils" ,java-plexus-utils)
4051 ("java-guava" ,java-guava)
4052 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4053 ("java-sisu-build-api" ,java-sisu-build-api)
4054 ;; modello plugins:
4055 ("java-modellop-plugins-java" ,java-modello-plugins-java)
4056 ("java-modellop-plugins-xml" ,java-modello-plugins-xml)
4057 ("java-modellop-plugins-xpp3" ,java-modello-plugins-xpp3)
4058 ;; for tests
4059 ("java-junit" ,java-junit)))
4060 (build-system ant-build-system)
4061 (home-page "https://github.com/sonatype/plexus-sec-dispatcher")
4062 (synopsis "Plexus Security Dispatcher Component")
4063 (description "This package is the Plexus Security Dispatcher Component.
4064This component decrypts a string passed to it.")
4065 (license license:asl2.0)))
4066
7d65489f
JL
4067(define-public java-plexus-cli
4068 (package
4069 (name "java-plexus-cli")
4070 (version "1.7")
4071 (source (origin
4072 (method git-fetch)
4073 (uri (git-reference
4074 (url "https://github.com/sonatype/plexus-cli")
4075 (commit "a776afa6bca84e5107bedb69440329cdb24ed645")))
4076 (file-name (string-append name "-" version))
4077 (sha256
4078 (base32
4079 "0xjrlay605rypv3zd7y24vlwf0039bil3n2cqw54r1ddpysq46vx"))))
4080 (build-system ant-build-system)
4081 (arguments
4082 `(#:jar-name "plexus-cli.jar"
4083 #:source-dir "src/main/java"
4084 #:jdk ,icedtea-8
4085 #:test-dir "src/test"))
4086 (inputs
4087 `(("java-commons-cli" ,java-commons-cli)
4088 ("java-plexus-container-default" ,java-plexus-container-default)
4089 ("java-plexus-classworlds" ,java-plexus-classworlds)))
4090 (native-inputs
4091 `(("java-plexus-utils" ,java-plexus-utils)
4092 ("java-junit" ,java-junit)
4093 ("java-guava" ,java-guava)))
4094 (home-page "https://codehaus-plexus.github.io/plexus-cli")
4095 (synopsis "CLI building library for plexus")
4096 (description "This package is a library to help creating CLI around
4097Plexus components.")
4098 (license license:asl2.0)))
4099
8f524749
JL
4100(define-public java-sisu-build-api
4101 (package
4102 (name "java-sisu-build-api")
4103 (version "0.0.7")
4104 (source (origin
16c62763
EF
4105 (method git-fetch)
4106 (uri (git-reference
4107 (url "https://github.com/sonatype/sisu-build-api")
4108 (commit (string-append "plexus-build-api-" version))))
4109 (file-name (git-file-name name version))
8f524749
JL
4110 (sha256
4111 (base32
16c62763 4112 "1d5w6c58gkx30d51v7qwv1xrhc0ly76848gihmgshj19yf6yhca0"))))
8f524749
JL
4113 (build-system ant-build-system)
4114 (arguments
4115 `(#:jar-name "sisu-build-api.jar"
4116 #:source-dir "src/main/java"
4117 #:jdk ,icedtea-8
4118 #:tests? #f; FIXME: how to run the tests?
4119 #:phases
4120 (modify-phases %standard-phases
4121 (add-before 'build 'copy-resources
4122 (lambda _
4123 (copy-recursively "src/main/resources" "build/classes")
4124 (substitute* (find-files "build/classes")
4125 (("\\$\\{project.version\\}") ,version))
4126 #t))
4127 (add-before 'build 'generate-plexus-compontent
4128 (lambda _
4129 (mkdir-p "build/classes/META-INF/plexus")
4130 ;; This file is required for plexus to inject this package.
4131 ;; FIXME: how is it generated?
4132 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
4133 (lambda _
4134 (display
4135 "<component-set>\n
4136 <components>\n
4137 <component>\n
4138 <role>org.sonatype.plexus.build.incremental.BuildContext</role>\n
4139 <role-hint>default</role-hint>\n
4140 <implementation>org.sonatype.plexus.build.incremental.DefaultBuildContext</implementation>\n
4141 <description>Filesystem based non-incremental build context implementation\n
4142which behaves as if all files were just created.</description>\n
4143 </component>\n
4144 </components>\n
4145</component-set>\n")))
4146 #t)))))
4147 (inputs
4148 `(("java-plexus-utils" ,java-plexus-utils)
4149 ("java-plexus-container-default" ,java-plexus-container-default)))
4150 (home-page "https://github.com/sonatype/sisu-build-api/")
4151 (synopsis "Base build API for maven")
4152 (description "This package contains the base build API for maven and
4153a default implementation of it. This API is about scanning files in a
4154project and determining what files need to be rebuilt.")
4155 (license license:asl2.0)))
4156
b26c8b61
JL
4157(define-public java-modello-core
4158 (package
4159 (name "java-modello-core")
4160 (version "1.9.1")
4161 (source (origin
df9487c5
EF
4162 (method git-fetch)
4163 (uri (git-reference
4164 (url "https://github.com/codehaus-plexus/modello")
4165 (commit (string-append "modello-" version))))
4166 (file-name (git-file-name name version))
b26c8b61
JL
4167 (sha256
4168 (base32
df9487c5 4169 "1di6ni42aqllpdvkpyfcw70352vr2i8wf6hd5nhd9kmqjb5dj5j4"))))
b26c8b61
JL
4170 (build-system ant-build-system)
4171 (arguments
4172 `(#:jar-name "modello-core.jar"
4173 #:source-dir "modello-core/src/main/java"
4174 #:test-dir "modello-core/src/test"
4175 #:main-class "org.codehaus.modello.ModelloCli"
4176 #:jdk ,icedtea-8
4177 #:phases
4178 (modify-phases %standard-phases
4179 (add-before 'build 'copy-resources
4180 (lambda _
4181 (mkdir-p "build/classes/META-INF/plexus")
4182 (copy-file "modello-core/src/main/resources/META-INF/plexus/components.xml"
4183 "build/classes/META-INF/plexus/components.xml")
4184 #t))
4185 (add-before 'check 'fix-tests
4186 (lambda _
4187 (with-directory-excursion "modello-core/src/test/java/org/codehaus"
4188 (substitute* '("modello/core/DefaultModelloCoreTest.java"
4189 "modello/core/io/ModelReaderTest.java")
4190 (("src/test") "modello-core/src/test")))
4191 #t)))))
4192 (inputs
4193 `(("java-plexus-utils" ,java-plexus-utils)
4194 ("java-plexus-container-default" ,java-plexus-container-default)
4195 ("java-sisu-build-api" ,java-sisu-build-api)))
4196 (native-inputs
4197 `(("java-junit" ,java-junit)
4198 ("java-plexus-classworlds" ,java-plexus-classworlds)
4199 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4200 ("java-guava" ,java-guava)))
7942a129 4201 (home-page "https://codehaus-plexus.github.io/modello/")
b26c8b61
JL
4202 (synopsis "Framework for code generation from a simple model")
4203 (description "Modello is a framework for code generation from a simple model.
4204
4205Modello generates code from a simple model format: based on a plugin
4206architecture, various types of code and descriptors can be generated from the
4207single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers,
4208XSD and documentation.")
4209 (license (list
4210 license:expat
4211 ;; Although this package uses only files licensed under expat,
4212 ;; other parts of the source are licensed under different
4213 ;; licenses. We include them to be inherited by other packages.
4214 license:asl2.0
4215 ;; Some files in modello-plugin-java are licensed under a
4216 ;; 5-clause BSD license.
4217 (license:non-copyleft
4218 (string-append "file:///modello-plugins/modello-plugin-java/"
4219 "src/main/java/org/codehaus/modello/plugin/"
4220 "java/javasource/JNaming.java"))))))
4221
fc620bef
JL
4222(define-public java-modello-plugins-java
4223 (package
4224 (inherit java-modello-core)
4225 (name "java-modello-plugins-java")
4226 (arguments
4227 `(#:jar-name "modello-plugins-java.jar"
4228 #:source-dir "modello-plugins/modello-plugin-java/src/main/java"
4229 #:test-dir "modello-plugins/modello-plugin-java/src/test"
4230 #:jdk ,icedtea-8
4231 #:tests? #f; requires maven-model, which depends on this package
4232 #:phases
4233 (modify-phases %standard-phases
4234 (add-before 'build 'copy-resources
4235 (lambda _
4236 (mkdir-p "build/classes")
4237 (copy-recursively "modello-plugins/modello-plugin-java/src/main/resources"
4238 "build/classes")
4239 #t)))))
4240 (inputs
4241 `(("java-modello-core" ,java-modello-core)
4242 ,@(package-inputs java-modello-core)))
4243 (synopsis "Modello Java Plugin")
4244 (description "Modello Java Plugin generates Java objects for the model.")))
4245
a0ce95ba
JL
4246(define-public java-modello-plugins-xml
4247 (package
4248 (inherit java-modello-core)
4249 (name "java-modello-plugins-xml")
4250 (arguments
4251 `(#:jar-name "modello-plugins-xml.jar"
4252 #:source-dir "modello-plugins/modello-plugin-xml/src/main/java"
4253 #:test-dir "modello-plugins/modello-plugin-xml/src/test"
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
4261 "modello-plugins/modello-plugin-xml/src/main/resources"
4262 "build/classes")
4263 #t))
4264 (add-before 'check 'fix-paths
4265 (lambda _
4266 (with-directory-excursion "modello-plugins/modello-plugin-xml/src/test"
4267 (substitute*
4268 "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java"
2c8ac364
MW
4269 (("src/test") "modello-plugins/modello-plugin-xml/src/test")))
4270 #t)))))
a0ce95ba
JL
4271 (inputs
4272 `(("java-modello-core" ,java-modello-core)
4273 ("java-modello-plugins-java" ,java-modello-plugins-java)
4274 ,@(package-inputs java-modello-core)))
4275 (synopsis "Modello XML Plugin")
4276 (description "Modello XML Plugin contains shared code for every plugins
4277working on XML representation of the model.")))
4278
e4708560
JL
4279(define-public java-modello-test
4280 (package
4281 (inherit java-modello-core)
4282 (name "java-modello-test")
4283 (arguments
4284 `(#:jar-name "modello-test.jar"
4285 #:source-dir "modello-test/src/main/java"
4286 #:tests? #f; no tests
4287 #:jdk ,icedtea-8))
4288 (inputs
4289 `(("java-plexus-utils" ,java-plexus-utils)
4290 ("java-plexus-compiler-api" ,java-plexus-compiler-api)
4291 ("java-plexus-compiler-javac" ,java-plexus-compiler-javac)
4292 ("java-plexus-container-default" ,java-plexus-container-default)))
4293 (synopsis "Modello test package")
4294 (description "The modello test package contains the basis to create
4295Modello generator unit-tests, including sample models and xml files to test
4296every feature for every plugin.")))
4297
36607d3b
JL
4298(define-public java-modello-plugins-xpp3
4299 (package
4300 (inherit java-modello-core)
4301 (name "java-modello-plugins-xpp3")
4302 (arguments
4303 `(#:jar-name "modello-plugins-xpp3.jar"
4304 #:source-dir "modello-plugins/modello-plugin-xpp3/src/main/java"
4305 #:test-dir "modello-plugins/modello-plugin-xpp3/src/test"
4306 ;; One of the test dependencies is maven-model which depends on this package.
4307 #:tests? #f
4308 #:jdk ,icedtea-8
4309 #:phases
4310 (modify-phases %standard-phases
4311 (add-before 'build 'copy-resources
4312 (lambda _
4313 (mkdir-p "build/classes")
4314 (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources"
4315 "build/classes")
4316 #t)))))
4317 (inputs
4318 `(("java-modello-core" ,java-modello-core)
4319 ("java-modello-plugins-java" ,java-modello-plugins-java)
4320 ("java-modello-plugins-xml" ,java-modello-plugins-xml)
4321 ,@(package-inputs java-modello-core)))
4322 (native-inputs
4323 `(("java-xmlunit" ,java-xmlunit)
4324 ("java-modello-test" ,java-modello-test)
4325 ,@(package-native-inputs java-modello-core)))
4326 (synopsis "Modello XPP3 Plugin")
4327 (description "The modello XPP3 plugin generates XML readers and writers based
4328on the XPP3 API (XML Pull Parser).")))
4329
8f8ed9aa
RW
4330(define-public java-asm
4331 (package
4332 (name "java-asm")
d0e9ded7 4333 (version "6.0")
8f8ed9aa
RW
4334 (source (origin
4335 (method url-fetch)
654f997d 4336 (uri (string-append "https://download.forge.ow2.org/asm/"
8f8ed9aa
RW
4337 "asm-" version ".tar.gz"))
4338 (sha256
4339 (base32
d0e9ded7 4340 "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00"))))
8f8ed9aa 4341 (build-system ant-build-system)
d0e9ded7 4342 (propagated-inputs
9d216017
GB
4343 `(("java-aqute-bndlib" ,java-aqute-bndlib)
4344 ("java-aqute-libg" ,java-aqute-libg)))
8f8ed9aa
RW
4345 (arguments
4346 `(#:build-target "compile"
4347 ;; The tests require an old version of Janino, which no longer compiles
4348 ;; with the JDK7.
4349 #:tests? #f
d0e9ded7
GB
4350 #:make-flags
4351 (list
4352 ;; We don't need these extra ant tasks, but the build system asks us to
4353 ;; provide a path anyway.
4354 "-Dobjectweb.ant.tasks.path=dummy-path"
4355 ;; The java-aqute.bndlib JAR file will be put onto the classpath and
4356 ;; used during the build automatically by ant-build-system, but
4357 ;; java-asm's build.xml fails unless we provide something here.
4358 "-Dbiz.aQute.bnd.path=dummy-path")
8f8ed9aa
RW
4359 #:phases
4360 (modify-phases %standard-phases
4361 (add-before 'install 'build-jars
4362 (lambda* (#:key make-flags #:allow-other-keys)
4363 ;; We cannot use the "jar" target because it depends on a couple
4364 ;; of unpackaged, complicated tools.
4365 (mkdir "dist")
2c8ac364
MW
4366 (invoke "jar"
4367 "-cf" (string-append "dist/asm-" ,version ".jar")
4368 "-C" "output/build/tmp" ".")))
8f8ed9aa
RW
4369 (replace 'install
4370 (install-jars "dist")))))
4371 (native-inputs
4372 `(("java-junit" ,java-junit)))
1e4ae551 4373 (home-page "https://asm.ow2.io/")
8f8ed9aa
RW
4374 (synopsis "Very small and fast Java bytecode manipulation framework")
4375 (description "ASM is an all purpose Java bytecode manipulation and
4376analysis framework. It can be used to modify existing classes or dynamically
4377generate classes, directly in binary form. The provided common
4378transformations and analysis algorithms allow to easily assemble custom
4379complex transformations and code analysis tools.")
4380 (license license:bsd-3)))
607fe24a 4381
bfb4004d
GB
4382(define java-asm-bootstrap
4383 (package
4384 (inherit java-asm)
4385 (name "java-asm-bootstrap")
4386 (arguments
4387 (substitute-keyword-arguments (package-arguments java-asm)
4388 ((#:tests? _) #f)))
4389 (native-inputs `())
4390 (propagated-inputs
4391 `(("java-aqute-bndlib" ,java-aqute-bndlib-bootstrap)
4392 ("java-aqute-libg" ,java-aqute-libg-bootstrap)
4393 ,@(delete `("java-aqute-bndlib" ,java-aqute-bndlib)
de99ba7e 4394 (delete `("java-aqute-libg" ,java-aqute-libg)
bfb4004d
GB
4395 (package-inputs java-asm)))))))
4396
607fe24a
RW
4397(define-public java-cglib
4398 (package
4399 (name "java-cglib")
4400 (version "3.2.4")
5c44505b
TGR
4401 (source
4402 (origin
4403 (method git-fetch)
4404 (uri (git-reference
4405 (url "https://github.com/cglib/cglib.git")
4406 (commit (string-append
4407 "RELEASE_"
4408 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
4409 version)))))
4410 (file-name (git-file-name name version))
4411 (sha256
4412 (base32 "186451jms2zfp47yd8kxd77az2cqal1my2br7klgyp8fpl4qfg8v"))))
607fe24a
RW
4413 (build-system ant-build-system)
4414 (arguments
4415 `(;; FIXME: tests fail because junit runs
4416 ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem
4417 ;; to describe a test at all.
4418 #:tests? #f
4419 #:jar-name "cglib.jar"
4420 #:phases
4421 (modify-phases %standard-phases
4422 (add-after 'unpack 'chdir
4423 (lambda _ (chdir "cglib") #t)))))
4424 (inputs
4425 `(("java-asm" ,java-asm)
4426 ("java-junit" ,java-junit)))
4427 (home-page "https://github.com/cglib/cglib/")
4428 (synopsis "Java byte code generation library")
4429 (description "The byte code generation library CGLIB is a high level API
4430to generate and transform Java byte code.")
4431 (license license:asl2.0)))
33e34bfe
RW
4432
4433(define-public java-objenesis
4434 (package
4435 (name "java-objenesis")
4436 (version "2.5.1")
4437 (source (origin
4438 (method url-fetch)
4439 (uri (string-append "https://github.com/easymock/objenesis/"
4440 "archive/" version ".tar.gz"))
4441 (file-name (string-append "objenesis-" version ".tar.gz"))
4442 (sha256
4443 (base32
4444 "1va5qz1i2wawwavhnxfzxnfgrcaflz9p1pg03irrjh4nd3rz8wh6"))))
4445 (build-system ant-build-system)
4446 (arguments
4447 `(#:jar-name "objenesis.jar"
4448 #:source-dir "main/src/"
4449 #:test-dir "main/src/test/"))
4450 (native-inputs
4451 `(("java-junit" ,java-junit)
4452 ("java-hamcrest-core" ,java-hamcrest-core)))
4453 (home-page "http://objenesis.org/")
4454 (synopsis "Bypass the constructor when creating an object")
4455 (description "Objenesis is a small Java library that serves one purpose:
4456to instantiate a new object of a particular class. It is common to see
4457restrictions in libraries stating that classes must require a default
4458constructor. Objenesis aims to overcome these restrictions by bypassing the
4459constructor on object instantiation.")
4460 (license license:asl2.0)))
ae589876
RW
4461
4462(define-public java-easymock
4463 (package
4464 (name "java-easymock")
4465 (version "3.4")
4466 (source (origin
4467 (method url-fetch)
4468 (uri (string-append "https://github.com/easymock/easymock/"
4469 "archive/easymock-" version ".tar.gz"))
4470 (sha256
4471 (base32
4472 "1yzg0kv256ndr57gpav46cyv4a1ns5sj722l50zpxk3j6sk9hnmi"))))
4473 (build-system ant-build-system)
4474 (arguments
4475 `(#:jar-name "easymock.jar"
4476 #:source-dir "core/src/main"
4477 #:test-dir "core/src/test"
4478 #:phases
4479 (modify-phases %standard-phases
4480 ;; FIXME: Android support requires the following packages to be
4481 ;; available: com.google.dexmaker.stock.ProxyBuilder
4482 (add-after 'unpack 'delete-android-support
4483 (lambda _
4484 (with-directory-excursion "core/src/main/java/org/easymock/internal"
4485 (substitute* "MocksControl.java"
4486 (("AndroidSupport.isAndroid\\(\\)") "false")
4487 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
4488 (delete-file "AndroidClassProxyFactory.java"))
4489 #t))
4490 (add-after 'unpack 'delete-broken-tests
4491 (lambda _
4492 (with-directory-excursion "core/src/test/java/org/easymock"
4493 ;; This test depends on dexmaker.
4494 (delete-file "tests2/ClassExtensionHelperTest.java")
4495
4496 ;; This is not a test.
4497 (delete-file "tests/BaseEasyMockRunnerTest.java")
4498
4499 ;; This test should be executed with a different runner...
4500 (delete-file "tests2/EasyMockAnnotationsTest.java")
4501 ;; ...but deleting it means that we also have to delete these
4502 ;; dependent files.
4503 (delete-file "tests2/EasyMockRunnerTest.java")
4504 (delete-file "tests2/EasyMockRuleTest.java")
4505
4506 ;; This test fails because the file "easymock.properties" does
4507 ;; not exist.
4508 (delete-file "tests2/EasyMockPropertiesTest.java"))
4509 #t)))))
4510 (inputs
4511 `(("java-asm" ,java-asm)
4512 ("java-cglib" ,java-cglib)
4513 ("java-objenesis" ,java-objenesis)))
4514 (native-inputs
4515 `(("java-junit" ,java-junit)
4516 ("java-hamcrest-core" ,java-hamcrest-core)))
4517 (home-page "http://easymock.org")
4518 (synopsis "Java library providing mock objects for unit tests")
4519 (description "EasyMock is a Java library that provides an easy way to use
4520mock objects in unit testing.")
4521 (license license:asl2.0)))
7aa37023 4522
f12ad6c7
RW
4523(define-public java-jmock-1
4524 (package
4525 (name "java-jmock")
4526 (version "1.2.0")
4527 (source (origin
4528 (method url-fetch)
4529 (uri (string-append "https://github.com/jmock-developers/"
4530 "jmock-library/archive/" version ".tar.gz"))
4531 (file-name (string-append "jmock-" version ".tar.gz"))
4532 (sha256
4533 (base32
4534 "0xmrlhq0fszldkbv281k9463mv496143vvmqwpxp62yzjvdkx9w0"))))
4535 (build-system ant-build-system)
4536 (arguments
4537 `(#:build-target "jars"
4538 #:test-target "run.tests"
4539 #:phases
4540 (modify-phases %standard-phases
4541 (replace 'install (install-jars "build")))))
4542 (home-page "http://www.jmock.org")
4543 (synopsis "Mock object library for test-driven development")
4544 (description "JMock is a library that supports test-driven development of
4545Java code with mock objects. Mock objects help you design and test the
4546interactions between the objects in your programs.
4547
4548The jMock library
4549
4550@itemize
4551@item makes it quick and easy to define mock objects
4552@item lets you precisely specify the interactions between
4553 your objects, reducing the brittleness of your tests
4554@item plugs into your favourite test framework
4555@item is easy to extend.
4556@end itemize\n")
4557 (license license:bsd-3)))
4558
045124ae
JL
4559(define-public java-jmock
4560 (package
4561 (inherit java-jmock-1)
4562 (name "java-jmock")
4563 (version "2.8.2")
4564 (source (origin
4565 (method url-fetch)
4566 (uri (string-append "https://github.com/jmock-developers/"
4567 "jmock-library/archive/" version ".tar.gz"))
4568 (file-name (string-append name "-" version ".tar.gz"))
4569 (sha256
4570 (base32
4571 "18650a9g8xffcsdb6w91pbswa7f40fp2sh6s3nclkclz5dbzq8f0"))))
4572 (inputs
4573 `(("java-hamcrest-all" ,java-hamcrest-all)
4574 ("java-asm" ,java-asm)
4575 ("java-bsh" ,java-bsh)
4576 ("java-junit" ,java-junit)))
4577 (native-inputs
4578 `(("cglib" ,java-cglib)))
4579 (arguments
4580 `(#:jar-name "java-jmock.jar"
4581 #:source-dir "jmock/src/main/java"
4582 #:test-dir "jmock/src/test"))))
4583
25436c6d
JL
4584(define-public java-jmock-junit4
4585 (package
4586 (inherit java-jmock)
4587 (name "java-jmock-junit4")
4588 (arguments
4589 `(#:jar-name "java-jmock-junit4.jar"
4590 #:source-dir "jmock-junit4/src/main/java"
4591 #:test-dir "jmock-junit4/src/test"))
4592 (inputs
4593 `(("java-hamcrest-all" ,java-hamcrest-all)
4594 ("java-asm" ,java-asm)
4595 ("java-bsh" ,java-bsh)
4596 ("java-jmock" ,java-jmock)
4597 ("java-jumit" ,java-junit)))))
4598
e84b899d
JL
4599(define-public java-jmock-legacy
4600 (package
4601 (inherit java-jmock)
4602 (name "java-jmock-legacy")
4603 (arguments
4604 `(#:jar-name "java-jmock-legacy.jar"
4605 #:source-dir "jmock-legacy/src/main/java"
4606 #:test-dir "jmock-legacy/src/test"
4607 #:phases
4608 (modify-phases %standard-phases
4609 (add-before 'check 'copy-tests
4610 (lambda _
4611 ;; This file is a dependancy of some tests
4612 (let ((file "org/jmock/test/acceptance/PackageProtectedType.java"))
4613 (copy-file (string-append "jmock/src/test/java/" file)
4614 (string-append "jmock-legacy/src/test/java/" file))
4615 #t))))))
4616 (inputs
4617 `(("java-hamcrest-all" ,java-hamcrest-all)
4618 ("java-objenesis" ,java-objenesis)
4619 ("java-cglib" ,java-cglib)
4620 ("java-jmock" ,java-jmock)
4621 ("java-asm" ,java-asm)
4622 ("java-bsh" ,java-bsh)
4623 ("java-junit" ,java-junit)))
4624 (native-inputs
4625 `(("java-jmock-junit4" ,java-jmock-junit4)))))
4626
439c59da
RW
4627(define-public java-hamcrest-all
4628 (package (inherit java-hamcrest-core)
4629 (name "java-hamcrest-all")
4630 (arguments
bfc007e1
RW
4631 `(#:jdk ,icedtea-8
4632 ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core)
4633 ((#:build-target _) "bigjar")
4634 ((#:phases phases)
4635 `(modify-phases ,phases
4636 ;; Some build targets override the classpath, so we need to patch
4637 ;; the build.xml to ensure that required dependencies are on the
4638 ;; classpath.
4639 (add-after 'unpack 'patch-classpath-for-integration
4640 (lambda* (#:key inputs #:allow-other-keys)
4641 (substitute* "build.xml"
4642 ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
4643 (string-join
4644 (cons line
4645 (append
4646 (find-files (assoc-ref inputs "java-junit") "\\.jar$")
4647 (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
4648 (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
2cc63e6f
RW
4649 ";"))
4650 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
4651 (string-append (assoc-ref inputs "java-hamcrest-core")
4652 "/share/java/hamcrest-core.jar")))
bfc007e1 4653 #t)))))))
439c59da
RW
4654 (inputs
4655 `(("java-junit" ,java-junit)
4656 ("java-jmock" ,java-jmock-1)
2cc63e6f
RW
4657 ;; This is necessary because of what seems to be a race condition.
4658 ;; This package would sometimes fail to build because hamcrest-core.jar
4659 ;; could not be found, even though it is built as part of this package.
4660 ;; Adding java-hamcrest-core appears to fix this problem. See
4661 ;; https://debbugs.gnu.org/31390 for more information.
4662 ("java-hamcrest-core" ,java-hamcrest-core)
439c59da 4663 ("java-easymock" ,java-easymock)
439c59da
RW
4664 ,@(package-inputs java-hamcrest-core)))))
4665
7aa37023
RW
4666(define-public java-jopt-simple
4667 (package
4668 (name "java-jopt-simple")
4669 (version "5.0.3")
4670 (source (origin
4671 (method url-fetch)
4672 (uri (string-append "http://repo1.maven.org/maven2/"
4673 "net/sf/jopt-simple/jopt-simple/"
4674 version "/jopt-simple-"
4675 version "-sources.jar"))
4676 (sha256
4677 (base32
4678 "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa"))))
4679 (build-system ant-build-system)
4680 (arguments
4681 `(#:tests? #f ; there are no tests
4682 #:jar-name "jopt-simple.jar"))
4683 (home-page "https://pholser.github.io/jopt-simple/")
4684 (synopsis "Java library for parsing command line options")
4685 (description "JOpt Simple is a Java library for parsing command line
4686options, such as those you might pass to an invocation of @code{javac}. In
4687the interest of striving for simplicity, as closely as possible JOpt Simple
4688attempts to honor the command line option syntaxes of POSIX @code{getopt} and
4689GNU @code{getopt_long}. It also aims to make option parser configuration and
4690retrieval of options and their arguments simple and expressive, without being
4691overly clever.")
4692 (license license:expat)))
840969e8
RW
4693
4694(define-public java-commons-math3
4695 (package
4696 (name "java-commons-math3")
4697 (version "3.6.1")
4698 (source (origin
4699 (method url-fetch)
4700 (uri (string-append "mirror://apache/commons/math/source/"
4701 "commons-math3-" version "-src.tar.gz"))
4702 (sha256
4703 (base32
4704 "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6"))))
4705 (build-system ant-build-system)
4706 (arguments
4707 `(#:build-target "jar"
4708 #:test-target "test"
4709 #:make-flags
4710 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
4711 (junit (assoc-ref %build-inputs "java-junit")))
4712 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4713 (string-append "-Dhamcrest.jar=" hamcrest
4714 "/share/java/hamcrest-core.jar")))
4715 #:phases
4716 (modify-phases %standard-phases
4717 ;; We want to build the jar in the build phase and run the tests
4718 ;; later in a separate phase.
4719 (add-after 'unpack 'untangle-targets
4720 (lambda _
4721 (substitute* "build.xml"
4722 (("name=\"jar\" depends=\"test\"")
4723 "name=\"jar\" depends=\"compile\""))
4724 #t))
4725 ;; There is no install target.
4726 (replace 'install
4727 (install-jars "target")))))
4728 (native-inputs
4729 `(("java-junit" ,java-junit)
4730 ("java-hamcrest-core" ,java-hamcrest-core)))
4f236f84 4731 (home-page "https://commons.apache.org/math/")
840969e8
RW
4732 (synopsis "Apache Commons mathematics library")
4733 (description "Commons Math is a library of lightweight, self-contained
4734mathematics and statistics components addressing the most common problems not
4735available in the Java programming language or Commons Lang.")
4736 (license license:asl2.0)))
62c9bfaa
RW
4737
4738(define-public java-jmh
4739 (package
4740 (name "java-jmh")
4741 (version "1.17.5")
4742 (source (origin
4743 (method hg-fetch)
4744 (uri (hg-reference
4745 (url "http://hg.openjdk.java.net/code-tools/jmh/")
4746 (changeset version)))
4747 (file-name (string-append name "-" version "-checkout"))
4748 (sha256
4749 (base32
4750 "1fxyxhg9famwcg1prc4cgwb5wzyxqavn3cjm5vz8605xz7x5k084"))))
4751 (build-system ant-build-system)
4752 (arguments
4753 `(#:jar-name "jmh-core.jar"
4754 #:source-dir "jmh-core/src/main"
4755 #:test-dir "jmh-core/src/test"
4756 #:phases
4757 (modify-phases %standard-phases
4758 ;; This seems to be a bug in the JDK. It may not be necessary in
4759 ;; future versions of the JDK.
4760 (add-after 'unpack 'fix-bug
4761 (lambda _
4762 (with-directory-excursion
4763 "jmh-core/src/main/java/org/openjdk/jmh/runner/options"
4764 (substitute* '("IntegerValueConverter.java"
4765 "ThreadsValueConverter.java")
4766 (("public Class<Integer> valueType")
4767 "public Class<? extends Integer> valueType")))
4768 #t)))))
4769 (inputs
4770 `(("java-jopt-simple" ,java-jopt-simple)
4771 ("java-commons-math3" ,java-commons-math3)))
4772 (native-inputs
4773 `(("java-junit" ,java-junit)
4774 ("java-hamcrest-core" ,java-hamcrest-core)))
e799400d 4775 (home-page "https://openjdk.java.net/projects/code-tools/jmh/")
62c9bfaa
RW
4776 (synopsis "Benchmark harness for the JVM")
4777 (description "JMH is a Java harness for building, running, and analysing
4778nano/micro/milli/macro benchmarks written in Java and other languages
f4548394 4779targeting the JVM.")
62c9bfaa
RW
4780 ;; GPLv2 only
4781 (license license:gpl2)))
56ebb4e9
RW
4782
4783(define-public java-commons-collections4
4784 (package
4785 (name "java-commons-collections4")
4786 (version "4.1")
4787 (source (origin
4788 (method url-fetch)
4789 (uri (string-append "mirror://apache/commons/collections/source/"
4790 "commons-collections4-" version "-src.tar.gz"))
4791 (sha256
4792 (base32
4793 "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl"))))
4794 (build-system ant-build-system)
4795 (arguments
4796 `(#:test-target "test"
4797 #:make-flags
4798 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
4799 (junit (assoc-ref %build-inputs "java-junit"))
4800 (easymock (assoc-ref %build-inputs "java-easymock")))
4801 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4802 (string-append "-Dhamcrest.jar=" hamcrest
4803 "/share/java/hamcrest-core.jar")
4804 (string-append "-Deasymock.jar=" easymock
4805 "/share/java/easymock.jar")))
4806 #:phases
4807 (modify-phases %standard-phases
4808 (replace 'install
4809 (install-jars "target")))))
4810 (native-inputs
4811 `(("java-junit" ,java-junit)
4812 ("java-hamcrest-core" ,java-hamcrest-core)
4813 ("java-easymock" ,java-easymock)))
21e207d2 4814 (home-page "https://commons.apache.org/collections/")
56ebb4e9
RW
4815 (synopsis "Collections framework")
4816 (description "The Java Collections Framework is the recognised standard
4817for collection handling in Java. Commons-Collections seek to build upon the
4818JDK classes by providing new interfaces, implementations and utilities. There
4819are many features, including:
4820
4821@itemize
4822@item @code{Bag} interface for collections that have a number of copies of
4823 each object
4824@item @code{BidiMap} interface for maps that can be looked up from value to
4825 key as well and key to value
4826@item @code{MapIterator} interface to provide simple and quick iteration over
4827 maps
4828@item Transforming decorators that alter each object as it is added to the
4829 collection
4830@item Composite collections that make multiple collections look like one
4831@item Ordered maps and sets that retain the order elements are added in,
4832 including an LRU based map
4833@item Reference map that allows keys and/or values to be garbage collected
4834 under close control
4835@item Many comparator implementations
4836@item Many iterator implementations
4837@item Adapter classes from array and enumerations to collections
4838@item Utilities to test or create typical set-theory properties of collections
4839 such as union, intersection, and closure.
4840@end itemize\n")
4841 (license license:asl2.0)))
6af63e65 4842
229a9864
JL
4843(define-public java-commons-collections
4844 (package
4845 (inherit java-commons-collections4)
4846 (name "java-commons-collections")
4847 (version "3.2.2")
4848 (source (origin
4849 (method url-fetch)
4850 (uri (string-append "mirror://apache/commons/collections/source/"
4851 "commons-collections-" version "-src.tar.gz"))
4852 (sha256
4853 (base32
7c7323e4
GB
4854 "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387"))
4855 (patches
4856 (search-patches "java-commons-collections-fix-java8.patch"))))
229a9864
JL
4857 (arguments
4858 (substitute-keyword-arguments (package-arguments java-commons-collections4)
4859 ((#:phases phases)
4860 `(modify-phases ,phases
4861 ;; The manifest is required by the build procedure
4862 (add-before 'build 'add-manifest
4863 (lambda _
4864 (mkdir-p "build/conf")
4865 (call-with-output-file "build/conf/MANIFEST.MF"
4866 (lambda (file)
2c8ac364
MW
4867 (format file "Manifest-Version: 1.0\n")))
4868 #t))
229a9864
JL
4869 (replace 'install
4870 (install-jars "build"))))))))
4871
5aa2f3f4
JL
4872(define java-commons-collections-test-classes
4873 (package
4874 (inherit java-commons-collections)
4875 (arguments
4876 `(#:jar-name "commons-collections-test-classes.jar"
4877 #:source-dir "src/test"
4878 #:tests? #f))
4879 (inputs
4880 `(("collection" ,java-commons-collections)))))
4881
4882(define-public java-commons-beanutils
4883 (package
4884 (name "java-commons-beanutils")
4885 (version "1.9.3")
4886 (source (origin
4887 (method url-fetch)
4888 (uri (string-append "mirror://apache/commons/beanutils/source/"
4889 "commons-beanutils-" version "-src.tar.gz"))
4890 (sha256
4891 (base32
4892 "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk"))))
4893 (build-system ant-build-system)
4894 (arguments
4895 `(#:test-target "test"
4896 #:tests? #f
4897 #:phases
4898 (modify-phases %standard-phases
4899 (replace 'install
4900 (lambda* (#:key outputs #:allow-other-keys)
4901 (rename-file (string-append "dist/commons-beanutils-" ,version
4902 "-SNAPSHOT.jar")
4903 "commons-beanutils.jar")
4904 (install-file "commons-beanutils.jar"
4905 (string-append (assoc-ref outputs "out") "/share/java/"))
4906 #t)))))
4907 (inputs
4908 `(("logging" ,java-commons-logging-minimal)
4909 ("collections" ,java-commons-collections)))
4910 (native-inputs
4911 `(("junit" ,java-junit)
4912 ("collections-test" ,java-commons-collections-test-classes)))
4f236f84 4913 (home-page "https://commons.apache.org/beanutils/")
5aa2f3f4
JL
4914 (synopsis "Dynamically set or get properties in Java")
4915 (description "BeanUtils provides a simplified interface to reflection and
4916introspection to set or get dynamically determined properties through their
4917setter and getter method.")
4918 (license license:asl2.0)))
4919
6af63e65
HG
4920(define-public java-commons-io
4921 (package
4922 (name "java-commons-io")
4923 (version "2.5")
4924 (source
4925 (origin
4926 (method url-fetch)
4927 (uri (string-append "mirror://apache/commons/io/source/"
4928 "commons-io-" version "-src.tar.gz"))
4929 (sha256
4930 (base32
4931 "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3"))))
4932 (build-system ant-build-system)
4933 (outputs '("out" "doc"))
4934 (arguments
4935 `(#:test-target "test"
4936 #:make-flags
4937 (list (string-append "-Djunit.jar="
4938 (assoc-ref %build-inputs "java-junit")
4939 "/share/java/junit.jar"))
4940 #:phases
4941 (modify-phases %standard-phases
4942 (add-after 'build 'build-javadoc ant-build-javadoc)
4943 (replace 'install (install-jars "target"))
4944 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4945 (native-inputs
4946 `(("java-junit" ,java-junit)
4947 ("java-hamcrest-core" ,java-hamcrest-core)))
4f236f84 4948 (home-page "https://commons.apache.org/io/")
6af63e65
HG
4949 (synopsis "Common useful IO related classes")
4950 (description "Commons-IO contains utility classes, stream implementations,
4951file filters and endian classes.")
4952 (license license:asl2.0)))
d631b5f3 4953
46f9022c
DM
4954(define-public java-commons-exec-1.1
4955 (package
4956 (name "java-commons-exec")
4957 (version "1.1")
4958 (source
4959 (origin
4960 (method url-fetch)
4961 (uri (string-append "mirror://apache/commons/exec/source/"
4962 "commons-exec-" version "-src.tar.gz"))
4963 (sha256
4964 (base32
4965 "025dk8xgj10lxwwwqp0hng2rn7fr4vcirxzydqzx9k4dim667alk"))))
4966 (build-system ant-build-system)
4967 (arguments
4968 `(#:test-target "test"
4969 #:make-flags
4970 (list (string-append "-Dmaven.junit.jar="
4971 (assoc-ref %build-inputs "java-junit")
4972 "/share/java/junit.jar"))
4973 #:phases
4974 (modify-phases %standard-phases
4975 (add-before 'build 'delete-network-tests
4976 (lambda _
4977 (delete-file "src/test/java/org/apache/commons/exec/DefaultExecutorTest.java")
4978 (substitute* "src/test/java/org/apache/commons/exec/TestRunner.java"
4979 (("suite\\.addTestSuite\\(DefaultExecutorTest\\.class\\);") ""))
4980 #t))
4981 ;; The "build" phase automatically tests.
4982 (delete 'check)
4983 (replace 'install (install-jars "target")))))
4984 (native-inputs
4985 `(("java-junit" ,java-junit)))
31b85761 4986 (home-page "https://commons.apache.org/proper/commons-exec/")
46f9022c
DM
4987 (synopsis "Common program execution related classes")
4988 (description "Commons-Exec simplifies executing external processes.")
4989 (license license:asl2.0)))
4990
4991(define-public java-commons-exec
4992 (package
4993 (inherit java-commons-exec-1.1)
4994 (version "1.3")
4995 (source
4996 (origin
4997 (method url-fetch)
4998 (uri (string-append "mirror://apache/commons/exec/source/"
4999 "commons-exec-" version "-src.tar.gz"))
5000 (sha256
5001 (base32
5002 "17yb4h6f8l49c5iyyvda4z2nmw0bxrx857nrwmsr7mmpb7x441yv"))))
5003 (arguments
5004 `(#:test-target "test"
5005 #:make-flags
5006 (list (string-append "-Dmaven.junit.jar="
5007 (assoc-ref %build-inputs "java-junit")
5008 "/share/java/junit.jar")
5009 "-Dmaven.compiler.source=1.7"
5010 "-Dmaven.compiler.target=1.7")
5011 #:phases
5012 (modify-phases %standard-phases
5013 (add-before 'build 'delete-network-tests
5014 (lambda* (#:key inputs #:allow-other-keys)
5015 ;; This test hangs indefinitely.
5016 (delete-file "src/test/java/org/apache/commons/exec/issues/Exec60Test.java")
5017 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec41Test.java"
5018 (("ping -c 10 127.0.0.1") "sleep 10"))
5019 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec49Test.java"
5020 (("/bin/ls") "ls"))
5021 (call-with-output-file "src/test/scripts/ping.sh"
5022 (lambda (port)
5023 (format port "#!~a/bin/sh\nsleep $1\n"
5024 (assoc-ref inputs "bash"))))
5025 #t))
5026 ;; The "build" phase automatically tests.
5027 (delete 'check)
5028 (replace 'install (install-jars "target")))))
5029 (native-inputs
5030 `(("java-junit" ,java-junit)
5031 ("java-hamcrest-core" ,java-hamcrest-core)))))
5032
d631b5f3
HG
5033(define-public java-commons-lang
5034 (package
5035 (name "java-commons-lang")
5036 (version "2.6")
5037 (source
5038 (origin
5039 (method url-fetch)
5040 (uri (string-append "mirror://apache/commons/lang/source/"
5041 "commons-lang-" version "-src.tar.gz"))
5042 (sha256
5043 (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5"))))
5044 (build-system ant-build-system)
5045 (outputs '("out" "doc"))
5046 (arguments
5047 `(#:test-target "test"
e5a96113 5048 #:test-exclude (list "**/Abstract*.java" "**/Random*.java")
d631b5f3
HG
5049 #:phases
5050 (modify-phases %standard-phases
5051 (add-after 'build 'build-javadoc ant-build-javadoc)
5052 (add-before 'check 'disable-failing-test
5053 (lambda _
5054 ;; Disable a failing test
5055 (substitute* "src/test/java/org/apache/commons/lang/\
5056time/FastDateFormatTest.java"
5057 (("public void testFormat\\(\\)")
5058 "public void disabled_testFormat()"))
5059 #t))
5060 (replace 'install (install-jars "target"))
5061 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
5062 (native-inputs
5063 `(("java-junit" ,java-junit)))
4f236f84 5064 (home-page "https://commons.apache.org/lang/")
d631b5f3
HG
5065 (synopsis "Extension of the java.lang package")
5066 (description "The Commons Lang components contains a set of Java classes
5067that provide helper methods for standard Java classes, especially those found
5068in the @code{java.lang} package in the Sun JDK. The following classes are
5069included:
5070
5071@itemize
5072@item StringUtils - Helper for @code{java.lang.String}.
5073@item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets
5074 of characters such as @code{[a-z]} and @code{[abcdez]}.
5075@item RandomStringUtils - Helper for creating randomised strings.
5076@item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
5077@item NumberRange - A range of numbers with an upper and lower bound.
5078@item ObjectUtils - Helper for @code{java.lang.Object}.
5079@item SerializationUtils - Helper for serializing objects.
5080@item SystemUtils - Utility class defining the Java system properties.
5081@item NestedException package - A sub-package for the creation of nested
5082 exceptions.
5083@item Enum package - A sub-package for the creation of enumerated types.
5084@item Builder package - A sub-package for the creation of @code{equals},
5085 @code{hashCode}, @code{compareTo} and @code{toString} methods.
5086@end itemize\n")
5087 (license license:asl2.0)))
82e18864
HG
5088
5089(define-public java-commons-lang3
5090 (package
5091 (name "java-commons-lang3")
5092 (version "3.4")
5093 (source
5094 (origin
5095 (method url-fetch)
5096 (uri (string-append "mirror://apache/commons/lang/source/"
5097 "commons-lang3-" version "-src.tar.gz"))
5098 (sha256
5099 (base32 "0xpshb9spjhplq5a7mr0y1bgfw8190ik4xj8f569xidfcki1d6kg"))))
5100 (build-system ant-build-system)
5101 (outputs '("out" "doc"))
5102 (arguments
5103 `(#:test-target "test"
5104 #:make-flags
5105 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-all"))
5106 (junit (assoc-ref %build-inputs "java-junit"))
5107 (easymock (assoc-ref %build-inputs "java-easymock"))
5108 (io (assoc-ref %build-inputs "java-commons-io")))
5109 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
5110 (string-append "-Dhamcrest.jar=" hamcrest
5111 "/share/java/hamcrest-all.jar")
5112 (string-append "-Dcommons-io.jar=" io
5113 "/share/java/commons-io-"
5114 ,(package-version java-commons-io)
5115 "-SNAPSHOT.jar")
5116 (string-append "-Deasymock.jar=" easymock
5117 "/share/java/easymock.jar")))
5118 #:phases
5119 (modify-phases %standard-phases
5120 (add-after 'build 'build-javadoc ant-build-javadoc)
5121 (replace 'install (install-jars "target"))
5122 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
5123 (native-inputs
5124 `(("java-junit" ,java-junit)
5125 ("java-commons-io" ,java-commons-io)
5126 ("java-hamcrest-all" ,java-hamcrest-all)
5127 ("java-easymock" ,java-easymock)))
4f236f84 5128 (home-page "https://commons.apache.org/lang/")
82e18864
HG
5129 (synopsis "Extension of the java.lang package")
5130 (description "The Commons Lang components contains a set of Java classes
5131that provide helper methods for standard Java classes, especially those found
5132in the @code{java.lang} package. The following classes are included:
5133
5134@itemize
5135@item StringUtils - Helper for @code{java.lang.String}.
5136@item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of
5137 characters such as @code{[a-z]} and @code{[abcdez]}.
5138@item RandomStringUtils - Helper for creating randomised strings.
5139@item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
5140@item NumberRange - A range of numbers with an upper and lower bound.
5141@item ObjectUtils - Helper for @code{java.lang.Object}.
5142@item SerializationUtils - Helper for serializing objects.
5143@item SystemUtils - Utility class defining the Java system properties.
5144@item NestedException package - A sub-package for the creation of nested
5145 exceptions.
5146@item Enum package - A sub-package for the creation of enumerated types.
5147@item Builder package - A sub-package for the creation of @code{equals},
5148 @code{hashCode}, @code{compareTo} and @code{toString} methods.
5149@end itemize\n")
5150 (license license:asl2.0)))
1c188f4e 5151
afb13a10
JL
5152(define-public java-commons-bsf
5153 (package
5154 (name "java-commons-bsf")
5155 (version "2.4.0")
5156 (source (origin
5157 (method url-fetch)
5158 (uri (string-append "mirror://apache/commons/bsf/source/bsf-src-"
5159 version ".tar.gz"))
5160 (sha256
5161 (base32
5162 "1sbamr8jl32p1jgf59nw0b2w9qivyg145954hm6ly54cfgsqrdas"))
5163 (modules '((guix build utils)))
5164 (snippet
5165 '(begin
5166 (for-each delete-file
5167 (find-files "." "\\.jar$"))
5168 #t))))
5169 (build-system ant-build-system)
5170 (arguments
5171 `(#:build-target "jar"
5172 #:tests? #f; No test file
5173 #:modules ((guix build ant-build-system)
5174 (guix build utils)
5175 (guix build java-utils)
5176 (sxml simple))
5177 #:phases
5178 (modify-phases %standard-phases
5179 (add-before 'build 'create-properties
5180 (lambda _
5181 ;; This file is missing from the distribution
5182 (call-with-output-file "build-properties.xml"
5183 (lambda (port)
5184 (sxml->xml
5185 `(project (@ (basedir ".") (name "build-properties") (default ""))
5186 (property (@ (name "project.name") (value "bsf")))
5187 (property (@ (name "source.level") (value "1.5")))
5188 (property (@ (name "build.lib") (value "build/jar")))
5189 (property (@ (name "src.dir") (value "src")))
5190 (property (@ (name "tests.dir") (value "src/org/apache/bsf/test")))
5191 (property (@ (name "build.tests") (value "build/test-classes")))
5192 (property (@ (name "build.dest") (value "build/classes"))))
2c8ac364
MW
5193 port)))
5194 #t))
afb13a10
JL
5195 (replace 'install (install-jars "build")))))
5196 (native-inputs
5197 `(("java-junit" ,java-junit)))
5198 (inputs
5199 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
5200 (home-page "https://commons.apache.org/proper/commons-bsf")
5201 (synopsis "Bean Scripting Framework")
5202 (description "The Bean Scripting Framework (BSF) is a set of Java classes
5203which provides scripting language support within Java applications, and access
5204to Java objects and methods from scripting languages. BSF allows one to write
5205JSPs in languages other than Java while providing access to the Java class
5206library. In addition, BSF permits any Java application to be implemented in
5207part (or dynamically extended) by a language that is embedded within it. This
5208is achieved by providing an API that permits calling scripting language engines
5209from within Java, as well as an object registry that exposes Java objects to
5210these scripting language engines.")
5211 (license license:asl2.0)))
5212
66006fe5
JL
5213(define-public java-commons-jxpath
5214 (package
5215 (name "java-commons-jxpath")
5216 (version "1.3")
5217 (source (origin
5218 (method url-fetch)
5219 (uri (string-append "mirror://apache/commons/jxpath/source/"
5220 "commons-jxpath-" version "-src.tar.gz"))
5221 (sha256
5222 (base32
5223 "1rpgg31ayn9fwr4bfi2i1ij0npcg79ad2fv0w9hacvawsyc42cfs"))))
5224 (build-system ant-build-system)
5225 (arguments
5226 `(#:jar-name "commons-jxpath.jar"
5227 ;; tests require more dependencies, including mockrunner which depends on old software
5228 #:tests? #f
5229 #:source-dir "src/java"))
5230 (inputs
10eddaca 5231 `(("servlet" ,java-classpathx-servletapi)
66006fe5
JL
5232 ("java-jdom" ,java-jdom)
5233 ("java-commons-beanutils" ,java-commons-beanutils)))
5234 (native-inputs
5235 `(("java-junit" ,java-junit)))
4f236f84 5236 (home-page "https://commons.apache.org/jxpath/")
66006fe5
JL
5237 (synopsis "Simple interpreter of an expression language called XPath.")
5238 (description "The org.apache.commons.jxpath package defines a simple
5239interpreter of an expression language called XPath. JXPath applies XPath
5240expressions to graphs of objects of all kinds: JavaBeans, Maps, Servlet
5241contexts, DOM etc, including mixtures thereof.")
5242 (license license:asl2.0)))
5243
b635d272
JL
5244(define-public java-commons-pool
5245 (package
5246 (name "java-commons-pool")
5247 (version "2.6.2")
5248 (source (origin
5249 (method url-fetch)
5250 (uri (string-append "mirror://apache/commons/pool/source/"
5251 "commons-pool2-" version "-src.tar.gz"))
5252 (sha256
5253 (base32
5254 "1fi1hgqmq01bs6azbj3sfswxzadp2r8sjjfiq6ryilz1m50kvrv6"))))
5255 (arguments
5256 `(#:jar-name "common-pool.jar"
5257 #:source-dir "src/main/java"
5258 #:test-exclude
5259 (list "**/PerformanceTest.java")))
5260 (build-system ant-build-system)
5261 (inputs
5262 `(("java-cglib" ,java-cglib)))
5263 (native-inputs
5264 `(("java-junit" ,java-junit)
5265 ("java-hamcrest-core" ,java-hamcrest-core)
5266 ("java-asm" ,java-asm)
5267 ("java-objenesis" ,java-objenesis)))
5268 (home-page "https://commons.apache.org/proper/commons-pool/")
5269 (synopsis "Object-pooling API in Java")
5270 (description "The commons-pool package provides an object-pooling API
5271and a number of object pool implementations. This package defines a
5272handful of pooling interfaces and some base classes that may be useful when
5273creating new pool implementations.")
5274 (license license:asl2.0)))
5275
f31ea164
JL
5276(define-public java-commons-dbcp
5277 (package
5278 (name "java-commons-dbcp")
5279 (version "2.6.0")
5280 (source (origin
5281 (method url-fetch)
5282 (uri (string-append "mirror://apache/commons/dbcp/source/"
5283 "commons-dbcp2-" version "-src.tar.gz"))
5284 (sha256
5285 (base32
5286 "0axbvcbnf2l70fc3ybrlp3siw2w4ka9mia2pnx4py8gz54cpw3rc"))))
5287 (arguments
5288 `(#:source-dir "src/main/java"
5289 #:jar-name "java-commons-dbcp.jar"
5290 #:tests? #f)); requires apache-geronimo
5291 (inputs
5292 `(("java-commons-pool" ,java-commons-pool)
5293 ("java-commons-logging" ,java-commons-logging-minimal)
5294 ("java-jboss-transaction-api-spec" ,java-jboss-transaction-api-spec)))
5295 (native-inputs
5296 `(("java-junit" ,java-junit)))
5297 (build-system ant-build-system)
5298 (home-page "https://commons.apache.org/proper/commons-dbcp/")
5299 (synopsis "Database Connection Pool for Java")
5300 (description "Commons-dbcp allows you to share a pool of database
5301connections between users. Creating a new connection for each user can be
5302time consuming and even unfeasible when the number of simultaneous users is
5303very large. This package provides a way to share a poole of connections to
5304reduce that load.")
5305 (license license:asl2.0)))
5306
934b83e4
JL
5307(define-public java-commons-jcs
5308 (package
5309 (name "java-commons-jcs")
5310 (version "2.2.1")
5311 (source (origin
5312 (method url-fetch)
5313 (uri (string-append "mirror://apache/commons/jcs/source/"
5314 "commons-jcs-dist-" version "-src.tar.gz"))
5315 (sha256
5316 (base32
5317 "0syhq2npjbrl0azqfjm0gvash1qd5qjy4qmysxcrqjsk0nf9fa1q"))))
5318 (build-system ant-build-system)
5319 (arguments
5320 `(#:jar-name "commons-jcs.jar"
5321 #:source-dir "commons-jcs-core/src/main/java"
5322 #:test-dir "commons-jcs-core/src/test"
5323 #:tests? #f; requires hsqldb
5324 #:phases
5325 (modify-phases %standard-phases
5326 (add-before 'build 'prepare
5327 (lambda _
5328 (with-directory-excursion
5329 "commons-jcs-core/src/main/java/org/apache/commons/jcs"
5330 (substitute*
5331 "auxiliary/disk/jdbc/dsfactory/SharedPoolDataSourceFactory.java"
5332 (("commons.dbcp") "commons.dbcp2")
5333 ((".*\\.setMaxActive.*") ""))
5334 ;;; Remove dependency on velocity-tools
5335 (delete-file "admin/servlet/JCSAdminServlet.java"))
5336 #t)))))
5337 (propagated-inputs
5338 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
5339 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
5340 ("java-commons-httpclient" ,java-commons-httpclient)
5341 ("java-commons-dbcp" ,java-commons-dbcp)))
5342 (native-inputs
5343 `(("java-junit" ,java-junit)))
5344 (home-page "https://commons.apache.org/proper/commons-jcs/")
5345 (synopsis "Distributed caching system in Java")
5346 (description "JCS is a distributed caching system written in Java. It
5347is intended to speed up applications by providing a means to manage cached
5348data of various dynamic natures. Like any caching system, JCS is most useful
5349for high read, low put applications. Latency times drop sharply and
5350bottlenecks move away from the database in an effectively cached system.")
5351 (license license:asl2.0)))
5352
a1a5ef20
JL
5353(define-public java-jsr250
5354 (package
5355 (name "java-jsr250")
5356 (version "1.3")
5357 (source (origin
5358 (method url-fetch)
5359 (uri (string-append "https://repo1.maven.org/maven2/"
5360 "javax/annotation/javax.annotation-api/"
5361 version "/javax.annotation-api-"
5362 version "-sources.jar"))
5363 (sha256
5364 (base32
5365 "08clh8n4n9wfglf75qsqfjs6yf79f7x6hqx38cn856pksszv50kz"))))
5366 (build-system ant-build-system)
5367 (arguments
5368 `(#:tests? #f ; no tests included
5369 #:jdk ,icedtea-8
5370 #:jar-name "jsr250.jar"))
5371 (home-page "https://jcp.org/en/jsr/detail?id=250")
5372 (synopsis "Security-related annotations")
5373 (description "This package provides annotations for security. It provides
5374packages in the @code{javax.annotation} and @code{javax.annotation.security}
5375namespaces.")
5376 ;; either cddl or gpl2 only, with classpath exception
5377 (license (list license:cddl1.0
5378 license:gpl2))))
5379
0d4a0d60
RW
5380(define-public java-jsr305
5381 (package
5382 (name "java-jsr305")
5383 (version "3.0.1")
5384 (source (origin
5385 (method url-fetch)
5386 (uri (string-append "https://repo1.maven.org/maven2/"
5387 "com/google/code/findbugs/"
5388 "jsr305/" version "/jsr305-"
5389 version "-sources.jar"))
5390 (sha256
5391 (base32
5392 "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n"))))
5393 (build-system ant-build-system)
5394 (arguments
5395 `(#:tests? #f ; no tests included
5396 #:jar-name "jsr305.jar"))
5397 (home-page "http://findbugs.sourceforge.net/")
5398 (synopsis "Annotations for the static analyzer called findbugs")
5399 (description "This package provides annotations for the findbugs package.
5400It provides packages in the @code{javax.annotations} namespace.")
5401 (license license:asl2.0)))
5402
4f3e47ea
RW
5403(define-public java-guava
5404 (package
5405 (name "java-guava")
5406 ;; This is the last release of Guava that can be built with Java 7.
5407 (version "20.0")
5408 (source (origin
5409 (method url-fetch)
5410 (uri (string-append "https://github.com/google/guava/"
5411 "releases/download/v" version
5412 "/guava-" version "-sources.jar"))
5413 (sha256
5414 (base32
5415 "1gawrs5gi6j5hcfxdgpnfli75vb9pfi4sn09pnc8xacr669yajwr"))))
5416 (build-system ant-build-system)
5417 (arguments
5418 `(#:tests? #f ; no tests included
5419 #:jar-name "guava.jar"
5420 #:phases
5421 (modify-phases %standard-phases
5422 (add-after 'unpack 'trim-sources
5423 (lambda _
5424 (with-directory-excursion "src/com/google/common"
5425 ;; Remove annotations to avoid extra dependencies:
5426 ;; * "j2objc" annotations are used when converting Java to
5427 ;; Objective C;
5428 ;; * "errorprone" annotations catch common Java mistakes at
5429 ;; compile time;
5430 ;; * "IgnoreJRERequirement" is used for Android.
5431 (substitute* (find-files "." "\\.java$")
5432 (("import com.google.j2objc.*") "")
5433 (("import com.google.errorprone.annotation.*") "")
5434 (("import org.codehaus.mojo.animal_sniffer.*") "")
5435 (("@CanIgnoreReturnValue") "")
5436 (("@LazyInit") "")
5437 (("@WeakOuter") "")
5438 (("@RetainedWith") "")
5439 (("@Weak") "")
5440 (("@ForOverride") "")
5441 (("@J2ObjCIncompatible") "")
5442 (("@IgnoreJRERequirement") "")))
5443 #t)))))
5444 (inputs
5445 `(("java-jsr305" ,java-jsr305)))
5446 (home-page "https://github.com/google/guava")
5447 (synopsis "Google core libraries for Java")
5448 (description "Guava is a set of core libraries that includes new
5449collection types (such as multimap and multiset), immutable collections, a
5450graph library, functional types, an in-memory cache, and APIs/utilities for
5451concurrency, I/O, hashing, primitives, reflection, string processing, and much
5452more!")
5453 (license license:asl2.0)))
5454
af8f8281
RW
5455;; The java-commons-logging package provides adapters to many different
5456;; logging frameworks. To avoid an excessive dependency graph we try to build
5457;; it with only a minimal set of adapters.
5458(define-public java-commons-logging-minimal
5459 (package
5460 (name "java-commons-logging-minimal")
5461 (version "1.2")
5462 (source (origin
5463 (method url-fetch)
5464 (uri (string-append "mirror://apache/commons/logging/source/"
5465 "commons-logging-" version "-src.tar.gz"))
5466 (sha256
5467 (base32
5468 "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9"))))
5469 (build-system ant-build-system)
5470 (arguments
5471 `(#:tests? #f ; avoid dependency on logging frameworks
5472 #:jar-name "commons-logging-minimal.jar"
5473 #:phases
5474 (modify-phases %standard-phases
5475 (add-after 'unpack 'delete-adapters-and-tests
5476 (lambda _
5477 ;; Delete all adapters except for NoOpLog, SimpleLog, and
5478 ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl
5479 ;; is used by applications; SimpleLog is the only actually usable
5480 ;; implementation that does not depend on another logging
5481 ;; framework.
5482 (for-each
5483 (lambda (file)
5484 (delete-file (string-append
5485 "src/main/java/org/apache/commons/logging/impl/" file)))
5486 (list "Jdk13LumberjackLogger.java"
5487 "WeakHashtable.java"
5488 "Log4JLogger.java"
5489 "ServletContextCleaner.java"
5490 "Jdk14Logger.java"
5491 "AvalonLogger.java"
5492 "LogKitLogger.java"))
5493 (delete-file-recursively "src/test")
5494 #t)))))
4f236f84 5495 (home-page "https://commons.apache.org/logging/")
af8f8281
RW
5496 (synopsis "Common API for logging implementations")
5497 (description "The Logging package is a thin bridge between different
5498logging implementations. A library that uses the commons-logging API can be
5499used with any logging implementation at runtime.")
5500 (license license:asl2.0)))
5501
90e65abe
RW
5502;; This is the last release of the 1.x series.
5503(define-public java-mockito-1
5504 (package
5505 (name "java-mockito")
5506 (version "1.10.19")
5507 (source (origin
5508 (method url-fetch)
5509 (uri (string-append "http://repo1.maven.org/maven2/"
5510 "org/mockito/mockito-core/" version
5511 "/mockito-core-" version "-sources.jar"))
5512 (sha256
5513 (base32
5514 "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc"))))
5515 (build-system ant-build-system)
5516 (arguments
5517 `(#:jar-name "mockito.jar"
5518 #:tests? #f ; no tests included
5519 ;; FIXME: patch-and-repack does not support jars, so we have to apply
5520 ;; patches in build phases.
5521 #:phases
5522 (modify-phases %standard-phases
5523 ;; Mockito was developed against a different version of hamcrest,
5524 ;; which does not require matcher implementations to provide an
5525 ;; implementation of the "describeMismatch" method. We add this
5526 ;; simple definition to pass the build with our version of hamcrest.
5527 (add-after 'unpack 'fix-hamcrest-build-error
5528 (lambda _
5529 (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java"
5530 (("public Matcher getActualMatcher\\(\\) .*" line)
5531 (string-append "
5532 public void describeMismatch(Object item, Description description) {
5533 actualMatcher.describeMismatch(item, description);
5534 }"
5535 line)))
5536 #t))
5537 ;; Mockito bundles cglib. We have a cglib package, so let's use
5538 ;; that instead.
5539 (add-after 'unpack 'use-system-libraries
5540 (lambda _
5541 (with-directory-excursion "src/org/mockito/internal/creation/cglib"
5542 (substitute* '("CGLIBHacker.java"
5543 "CglibMockMaker.java"
5544 "ClassImposterizer.java"
5545 "DelegatingMockitoMethodProxy.java"
5546 "MethodInterceptorFilter.java"
5547 "MockitoNamingPolicy.java"
5548 "SerializableMockitoMethodProxy.java"
5549 "SerializableNoOp.java")
5550 (("import org.mockito.cglib") "import net.sf.cglib")))
5551 #t)))))
5552 (inputs
5553 `(("java-junit" ,java-junit)
5554 ("java-objenesis" ,java-objenesis)
5555 ("java-cglib" ,java-cglib)
5556 ("java-hamcrest-core" ,java-hamcrest-core)))
5557 (home-page "http://mockito.org")
5558 (synopsis "Mockito is a mock library for Java")
5559 (description "Mockito is a mocking library for Java which lets you write
5560tests with a clean and simple API. It generates mocks using reflection, and
5561it records all mock invocations, including methods arguments.")
5562 (license license:asl2.0)))
5563
4f4d2e47
RW
5564(define-public java-httpcomponents-httpcore
5565 (package
5566 (name "java-httpcomponents-httpcore")
5567 (version "4.4.6")
5568 (source (origin
5569 (method url-fetch)
5570 (uri (string-append "mirror://apache//httpcomponents/httpcore/"
5571 "source/httpcomponents-core-"
5572 version "-src.tar.gz"))
5573 (sha256
5574 (base32
5575 "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy"))))
5576 (build-system ant-build-system)
5577 (arguments
5578 `(#:jar-name "httpcomponents-httpcore.jar"
5579 #:phases
5580 (modify-phases %standard-phases
5581 (add-after 'unpack 'chdir
5582 (lambda _ (chdir "httpcore") #t)))))
5583 (inputs
5584 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
5585 ("java-commons-lang3" ,java-commons-lang3)))
5586 (native-inputs
5587 `(("java-junit" ,java-junit)
5588 ("java-mockito" ,java-mockito-1)))
5589 (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html")
5590 (synopsis "Low level HTTP transport components")
5591 (description "HttpCore is a set of low level HTTP transport components
5592that can be used to build custom client and server side HTTP services with a
5593minimal footprint. HttpCore supports two I/O models: blocking I/O model based
5594on the classic Java I/O and non-blocking, event driven I/O model based on Java
5595NIO.
5596
5597This package provides the blocking I/O model library.")
5598 (license license:asl2.0)))
5599
3a068b43
RW
5600(define-public java-httpcomponents-httpcore-nio
5601 (package (inherit java-httpcomponents-httpcore)
5602 (name "java-httpcomponents-httpcore-nio")
5603 (arguments
5604 `(#:jar-name "httpcomponents-httpcore-nio.jar"
5605 #:phases
5606 (modify-phases %standard-phases
5607 (add-after 'unpack 'chdir
5608 (lambda _ (chdir "httpcore-nio") #t)))))
5609 (inputs
5610 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5611 ("java-hamcrest-core" ,java-hamcrest-core)
5612 ,@(package-inputs java-httpcomponents-httpcore)))
5613 (description "HttpCore is a set of low level HTTP transport components
5614that can be used to build custom client and server side HTTP services with a
5615minimal footprint. HttpCore supports two I/O models: blocking I/O model based
5616on the classic Java I/O and non-blocking, event driven I/O model based on Java
5617NIO.
5618
5619This package provides the non-blocking I/O model library based on Java
5620NIO.")))
5621
e1dd78f6
RW
5622(define-public java-httpcomponents-httpcore-ab
5623 (package (inherit java-httpcomponents-httpcore)
5624 (name "java-httpcomponents-httpcore-ab")
5625 (arguments
5626 `(#:jar-name "httpcomponents-httpcore-ab.jar"
5627 #:phases
5628 (modify-phases %standard-phases
5629 (add-after 'unpack 'chdir
5630 (lambda _ (chdir "httpcore-ab") #t)))))
5631 (inputs
5632 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5633 ("java-commons-cli" ,java-commons-cli)
5634 ("java-hamcrest-core" ,java-hamcrest-core)
5635 ,@(package-inputs java-httpcomponents-httpcore)))
5636 (synopsis "Apache HttpCore benchmarking tool")
5637 (description "This package provides the HttpCore benchmarking tool. It is
5638an Apache AB clone based on HttpCore.")))
5639
14a671d8
RW
5640(define-public java-httpcomponents-httpclient
5641 (package
5642 (name "java-httpcomponents-httpclient")
5643 (version "4.5.3")
5644 (source (origin
5645 (method url-fetch)
5646 (uri (string-append "mirror://apache/httpcomponents/httpclient/"
5647 "source/httpcomponents-client-"
5648 version "-src.tar.gz"))
5649 (sha256
5650 (base32
5651 "1428399s7qy3cim5wc6f3ks4gl9nf9vkjpfmnlap3jflif7g2pj1"))))
5652 (build-system ant-build-system)
5653 (arguments
5654 `(#:jar-name "httpcomponents-httpclient.jar"
5655 #:phases
5656 (modify-phases %standard-phases
5657 (add-after 'unpack 'chdir
5658 (lambda _ (chdir "httpclient") #t)))))
5659 (inputs
5660 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
5661 ("java-commons-codec" ,java-commons-codec)
5662 ("java-hamcrest-core" ,java-hamcrest-core)
5663 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5664 ("java-mockito" ,java-mockito-1)
5665 ("java-junit" ,java-junit)))
5666 (home-page "https://hc.apache.org/httpcomponents-client-ga/")
5667 (synopsis "HTTP client library for Java")
5668 (description "Although the @code{java.net} package provides basic
5669functionality for accessing resources via HTTP, it doesn't provide the full
5670flexibility or functionality needed by many applications. @code{HttpClient}
5671seeks to fill this void by providing an efficient, up-to-date, and
5672feature-rich package implementing the client side of the most recent HTTP
5673standards and recommendations.")
5674 (license license:asl2.0)))
5675
cbce5de2
RW
5676(define-public java-httpcomponents-httpmime
5677 (package (inherit java-httpcomponents-httpclient)
5678 (name "java-httpcomponents-httpmime")
5679 (arguments
5680 `(#:jar-name "httpcomponents-httpmime.jar"
5681 #:phases
5682 (modify-phases %standard-phases
5683 (add-after 'unpack 'chdir
5684 (lambda _ (chdir "httpmime") #t)))))
5685 (inputs
5686 `(("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient)
5687 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5688 ("java-junit" ,java-junit)
5689 ("java-hamcrest-core" ,java-hamcrest-core)))))
5690
4b34c21f
RW
5691(define-public java-commons-net
5692 (package
5693 (name "java-commons-net")
5694 (version "3.6")
5695 (source (origin
5696 (method url-fetch)
5697 (uri (string-append "mirror://apache/commons/net/source/"
5698 "commons-net-" version "-src.tar.gz"))
5699 (sha256
5700 (base32
5701 "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr"))))
5702 (build-system ant-build-system)
5703 (arguments
5704 `(;; FIXME: MainTest.java tries to read "examples.properties" (which
5705 ;; should be "resources/examples/examples.properties"), but gets "null"
5706 ;; instead.
5707 #:tests? #f
5708 #:jar-name "commons-net.jar"))
5709 (native-inputs
5710 `(("java-junit" ,java-junit)
5711 ("java-hamcrest-core" ,java-hamcrest-core)))
4f236f84 5712 (home-page "https://commons.apache.org/net/")
4b34c21f
RW
5713 (synopsis "Client library for many basic Internet protocols")
5714 (description "The Apache Commons Net library implements the client side of
5715many basic Internet protocols. The purpose of the library is to provide
5716fundamental protocol access, not higher-level abstractions.")
5717 (license license:asl2.0)))
5718
808cb58f
RW
5719(define-public java-jsch
5720 (package
5721 (name "java-jsch")
1c8ba10a 5722 (version "0.1.55")
808cb58f
RW
5723 (source (origin
5724 (method url-fetch)
5725 (uri (string-append "mirror://sourceforge/jsch/jsch/"
5726 version "/jsch-" version ".zip"))
5727 (sha256
5728 (base32
1c8ba10a 5729 "1lxyjwvmwa723wcf3bqn816hkvc03vz4xhbsi7bvfhrz2rpgcfq6"))))
808cb58f
RW
5730 (build-system ant-build-system)
5731 (arguments
5732 `(#:build-target "dist"
1c8ba10a 5733 #:tests? #f ; no tests included
808cb58f
RW
5734 #:phases
5735 (modify-phases %standard-phases
5736 (replace 'install (install-jars "dist")))))
5737 (native-inputs
5738 `(("unzip" ,unzip)))
5739 (home-page "http://www.jcraft.com/jsch/")
5740 (synopsis "Pure Java implementation of SSH2")
5741 (description "JSch is a pure Java implementation of SSH2. JSch allows you
5742to connect to an SSH server and use port forwarding, X11 forwarding, file
5743transfer, etc., and you can integrate its functionality into your own Java
5744programs.")
5745 (license license:bsd-3)))
5746
a6244698
RW
5747(define-public java-commons-compress
5748 (package
5749 (name "java-commons-compress")
5750 (version "1.13")
5751 (source (origin
5752 (method url-fetch)
5753 (uri (string-append "mirror://apache/commons/compress/source/"
5754 "commons-compress-" version "-src.tar.gz"))
5755 (sha256
5756 (base32
5757 "1vjqvavrn0babffn1kciz6v52ibwq2vwhzlb95hazis3lgllnxc8"))))
5758 (build-system ant-build-system)
5759 (arguments
5760 `(#:jar-name "commons-compress.jar"
5761 #:phases
5762 (modify-phases %standard-phases
5763 (add-after 'unpack 'delete-bad-tests
5764 (lambda _
5765 (with-directory-excursion "src/test/java/org/apache/commons/compress/"
5766 ;; FIXME: These tests really should not fail. Maybe they are
5767 ;; indicative of problems with our Java packaging work.
5768
5769 ;; This test fails with a null pointer exception.
5770 (delete-file "archivers/sevenz/SevenZOutputFileTest.java")
5771 ;; This test fails to open test resources.
5772 (delete-file "archivers/zip/ExplodeSupportTest.java")
5773
5774 ;; FIXME: This test adds a dependency on powermock, which is hard to
5775 ;; package at this point.
5776 ;; https://github.com/powermock/powermock
5777 (delete-file "archivers/sevenz/SevenZNativeHeapTest.java"))
5778 #t)))))
5779 (inputs
5780 `(("java-junit" ,java-junit)
5781 ("java-hamcrest-core" ,java-hamcrest-core)
5782 ("java-mockito" ,java-mockito-1)
5783 ("java-xz" ,java-xz)))
5784 (home-page "https://commons.apache.org/proper/commons-compress/")
5785 (synopsis "Java library for working with compressed files")
5786 (description "The Apache Commons Compress library defines an API for
5787working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ,
5788Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.")
5789 (license license:asl2.0)))
5790
51263ff5
JL
5791(define-public java-commons-csv
5792 (package
5793 (name "java-commons-csv")
5794 (version "1.4")
5795 (source (origin
5796 (method url-fetch)
5797 (uri (string-append "mirror://apache/commons/csv/source/"
5798 "commons-csv-" version "-src.tar.gz"))
5799 (sha256
5800 (base32
5801 "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij"))))
5802 (build-system ant-build-system)
5803 (arguments
5804 `(#:jar-name "commons-csv.jar"
5805 #:source-dir "src/main/java"
5806 #:tests? #f)); FIXME: requires java-h2
5807 (inputs
5808 `(("java-hamcrest-core" ,java-hamcrest-core)
5809 ("java-commons-io" ,java-commons-io)
5810 ("java-commons-lang3" ,java-commons-lang3)
5811 ("junit" ,java-junit)))
5812 (home-page "https://commons.apache.org/proper/commons-csv/")
5813 (synopsis "Read and write CSV documents")
5814 (description "Commons CSV reads and writes files in variations of the Comma
5815Separated Value (CSV) format. The most common CSV formats are predefined in the
5816CSVFormat class:
5817
5818@itemize
5819@item Microsoft Excel
5820@item Informix UNLOAD
5821@item Informix UNLOAD CSV
5822@item MySQL
5823@item RFC 4180
5824@item TDF
5825@end itemize
5826
5827Custom formats can be created using a fluent style API.")
5828 (license license:asl2.0)))
5829
6ee6d0b5
RW
5830(define-public java-osgi-annotation
5831 (package
5832 (name "java-osgi-annotation")
5833 (version "6.0.0")
5834 (source (origin
5835 (method url-fetch)
5836 (uri (string-append "https://repo1.maven.org/maven2/"
5837 "org/osgi/org.osgi.annotation/" version "/"
5838 "org.osgi.annotation-" version "-sources.jar"))
5839 (sha256
5840 (base32
5841 "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w"))))
5842 (build-system ant-build-system)
5843 (arguments
5844 `(#:tests? #f ; no tests
5845 #:jar-name "osgi-annotation.jar"))
c353d014 5846 (home-page "https://www.osgi.org")
6ee6d0b5
RW
5847 (synopsis "Annotation module of OSGi framework")
5848 (description
5849 "OSGi, for Open Services Gateway initiative framework, is a module system
5850and service platform for the Java programming language. This package contains
5851the OSGi annotation module, providing additional services to help dynamic
5852components.")
5853 (license license:asl2.0)))
5854
37e2e5d4
RW
5855(define-public java-osgi-core
5856 (package
5857 (name "java-osgi-core")
5858 (version "6.0.0")
5859 (source (origin
5860 (method url-fetch)
5861 (uri (string-append "https://repo1.maven.org/maven2/"
5862 "org/osgi/org.osgi.core/" version "/"
5863 "org.osgi.core-" version "-sources.jar"))
5864 (sha256
5865 (base32
5866 "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv"))))
5867 (build-system ant-build-system)
5868 (arguments
5869 `(#:tests? #f ; no tests
5870 #:jar-name "osgi-core.jar"))
5871 (inputs
5872 `(("java-osgi-annotation" ,java-osgi-annotation)))
c353d014 5873 (home-page "https://www.osgi.org")
37e2e5d4
RW
5874 (synopsis "Core module of OSGi framework")
5875 (description
5876 "OSGi, for Open Services Gateway initiative framework, is a module system
5877and service platform for the Java programming language. This package contains
5878the OSGi Core module.")
5879 (license license:asl2.0)))
5880
8af92c8f
RW
5881(define-public java-osgi-service-event
5882 (package
5883 (name "java-osgi-service-event")
5884 (version "1.3.1")
5885 (source (origin
5886 (method url-fetch)
5887 (uri (string-append "https://repo1.maven.org/maven2/"
5888 "org/osgi/org.osgi.service.event/"
5889 version "/org.osgi.service.event-"
5890 version "-sources.jar"))
5891 (sha256
5892 (base32
5893 "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm"))))
5894 (build-system ant-build-system)
5895 (arguments
5896 `(#:tests? #f ; no tests
5897 #:jar-name "osgi-service-event.jar"))
5898 (inputs
5899 `(("java-osgi-annotation" ,java-osgi-annotation)
5900 ("java-osgi-core" ,java-osgi-core)))
c353d014 5901 (home-page "https://www.osgi.org")
8af92c8f
RW
5902 (synopsis "OSGi service event module")
5903 (description
5904 "OSGi, for Open Services Gateway initiative framework, is a module system
5905and service platform for the Java programming language. This package contains
5906the OSGi @code{org.osgi.service.event} module.")
5907 (license license:asl2.0)))
5908
674e93a0
RW
5909(define-public java-eclipse-osgi
5910 (package
5911 (name "java-eclipse-osgi")
5912 (version "3.11.3")
5913 (source (origin
5914 (method url-fetch)
5915 (uri (string-append "https://repo1.maven.org/maven2/"
5916 "org/eclipse/platform/org.eclipse.osgi/"
5917 version "/org.eclipse.osgi-"
5918 version "-sources.jar"))
5919 (sha256
5920 (base32
5921 "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b"))))
5922 (build-system ant-build-system)
5923 (arguments
5924 `(#:tests? #f ; no tests included
5925 #:jar-name "eclipse-equinox-osgi.jar"))
5926 (inputs
5927 `(("java-osgi-annotation" ,java-osgi-annotation)))
5928 (home-page "http://www.eclipse.org/equinox/")
5929 (synopsis "Eclipse Equinox OSGi framework")
5930 (description "This package provides an implementation of the OSGi Core
5931specification.")
5932 (license license:epl1.0)))
5933
81b55b1e
RW
5934(define-public java-eclipse-equinox-common
5935 (package
5936 (name "java-eclipse-equinox-common")
e40e3792 5937 (version "3.10.200")
81b55b1e
RW
5938 (source (origin
5939 (method url-fetch)
5940 (uri (string-append "https://repo1.maven.org/maven2/"
5941 "org/eclipse/platform/org.eclipse.equinox.common/"
5942 version "/org.eclipse.equinox.common-"
5943 version "-sources.jar"))
5944 (sha256
5945 (base32
e40e3792 5946 "1yn8ij6xsljlf35sr2l7wvyvc0ss4n1rv0ry5zkgb49dj4hyrqrj"))))
81b55b1e
RW
5947 (build-system ant-build-system)
5948 (arguments
5949 `(#:tests? #f ; no tests included
5950 #:jar-name "eclipse-equinox-common.jar"))
5951 (inputs
5952 `(("java-eclipse-osgi" ,java-eclipse-osgi)))
5953 (home-page "http://www.eclipse.org/equinox/")
5954 (synopsis "Common Eclipse runtime")
5955 (description "This package provides the common Eclipse runtime.")
5956 (license license:epl1.0)))
5957
90368ad9
RW
5958(define-public java-eclipse-core-jobs
5959 (package
5960 (name "java-eclipse-core-jobs")
5961 (version "3.8.0")
5962 (source (origin
5963 (method url-fetch)
5964 (uri (string-append "https://repo1.maven.org/maven2/"
5965 "org/eclipse/platform/org.eclipse.core.jobs/"
5966 version "/org.eclipse.core.jobs-"
5967 version "-sources.jar"))
5968 (sha256
5969 (base32
5970 "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b"))))
5971 (build-system ant-build-system)
5972 (arguments
5973 `(#:tests? #f ; no tests included
5974 #:jar-name "eclipse-core-jobs.jar"))
5975 (inputs
5976 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5977 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5978 (home-page "http://www.eclipse.org/equinox/")
5979 (synopsis "Eclipse jobs mechanism")
5980 (description "This package provides the Eclipse jobs mechanism.")
5981 (license license:epl1.0)))
5982
fbaf09eb
RW
5983(define-public java-eclipse-equinox-registry
5984 (package
5985 (name "java-eclipse-equinox-registry")
5986 (version "3.6.100")
5987 (source (origin
5988 (method url-fetch)
5989 (uri (string-append "https://repo1.maven.org/maven2/"
5990 "org/eclipse/platform/org.eclipse.equinox.registry/"
5991 version "/org.eclipse.equinox.registry-"
5992 version "-sources.jar"))
5993 (sha256
5994 (base32
5995 "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k"))))
5996 (build-system ant-build-system)
5997 (arguments
5998 `(#:tests? #f ; no tests included
5999 #:jar-name "eclipse-equinox-registry.jar"))
6000 (inputs
6001 `(("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6002 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6003 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6004 (home-page "http://www.eclipse.org/equinox/")
6005 (synopsis "Eclipse extension registry support")
6006 (description "This package provides support for the Eclipse extension
6007registry.")
6008 (license license:epl1.0)))
6009
65214c87
RW
6010(define-public java-eclipse-equinox-app
6011 (package
6012 (name "java-eclipse-equinox-app")
6013 (version "1.3.400")
6014 (source (origin
6015 (method url-fetch)
6016 (uri (string-append "https://repo1.maven.org/maven2/"
6017 "org/eclipse/platform/org.eclipse.equinox.app/"
6018 version "/org.eclipse.equinox.app-"
6019 version "-sources.jar"))
6020 (sha256
6021 (base32
6022 "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab"))))
6023 (build-system ant-build-system)
6024 (arguments
6025 `(#:tests? #f ; no tests included
6026 #:jar-name "eclipse-equinox-app.jar"))
6027 (inputs
6028 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6029 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6030 ("java-eclipse-osgi" ,java-eclipse-osgi)
6031 ("java-osgi-service-event" ,java-osgi-service-event)))
6032 (home-page "http://www.eclipse.org/equinox/")
6033 (synopsis "Equinox application container")
6034 (description "This package provides the Equinox application container for
6035Eclipse.")
6036 (license license:epl1.0)))
6037
3f970214
RW
6038(define-public java-eclipse-equinox-preferences
6039 (package
6040 (name "java-eclipse-equinox-preferences")
6041 (version "3.6.1")
6042 (source (origin
6043 (method url-fetch)
6044 (uri (string-append "https://repo1.maven.org/maven2/"
6045 "org/eclipse/platform/org.eclipse.equinox.preferences/"
6046 version "/org.eclipse.equinox.preferences-"
6047 version "-sources.jar"))
6048 (sha256
6049 (base32
6050 "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2"))))
6051 (build-system ant-build-system)
6052 (arguments
6053 `(#:tests? #f ; no tests included
6054 #:jar-name "eclipse-equinox-preferences.jar"))
6055 (inputs
6056 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6057 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6058 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6059 (home-page "http://www.eclipse.org/equinox/")
6060 (synopsis "Eclipse preferences mechanism")
6061 (description "This package provides the Eclipse preferences mechanism with
6062the module @code{org.eclipse.equinox.preferences}.")
6063 (license license:epl1.0)))
6064
4ad3d4f3
RW
6065(define-public java-eclipse-core-contenttype
6066 (package
6067 (name "java-eclipse-core-contenttype")
6068 (version "3.5.100")
6069 (source (origin
6070 (method url-fetch)
6071 (uri (string-append "https://repo1.maven.org/maven2/"
6072 "org/eclipse/platform/org.eclipse.core.contenttype/"
6073 version "/org.eclipse.core.contenttype-"
6074 version "-sources.jar"))
6075 (sha256
6076 (base32
6077 "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi"))))
6078 (build-system ant-build-system)
6079 (arguments
6080 `(#:tests? #f ; no tests included
6081 #:jar-name "eclipse-core-contenttype.jar"))
6082 (inputs
6083 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6084 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6085 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6086 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6087 (home-page "http://www.eclipse.org/")
6088 (synopsis "Eclipse content mechanism")
6089 (description "This package provides the Eclipse content mechanism in the
6090@code{org.eclipse.core.contenttype} module.")
6091 (license license:epl1.0)))
6092
6a7f7e49
RW
6093(define-public java-eclipse-core-runtime
6094 (package
6095 (name "java-eclipse-core-runtime")
4fa9b6e6 6096 (version "3.15.100")
6a7f7e49
RW
6097 (source (origin
6098 (method url-fetch)
6099 (uri (string-append "https://repo1.maven.org/maven2/"
6100 "org/eclipse/platform/org.eclipse.core.runtime/"
6101 version "/org.eclipse.core.runtime-"
6102 version "-sources.jar"))
6103 (sha256
6104 (base32
4fa9b6e6 6105 "0l8xayacsbjvz5hypx2fv47vpw2n4dspamcfb3hx30x9hj8vmg7r"))))
6a7f7e49
RW
6106 (build-system ant-build-system)
6107 (arguments
6108 `(#:tests? #f ; no tests included
6109 #:jar-name "eclipse-core-runtime.jar"))
6110 (inputs
6111 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6112 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6113 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
6114 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6115 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6116 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6117 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6118 (home-page "https://www.eclipse.org/")
6119 (synopsis "Eclipse core runtime")
6120 (description "This package provides the Eclipse core runtime with the
6121module @code{org.eclipse.core.runtime}.")
6122 (license license:epl1.0)))
6123
b3806a15
RW
6124(define-public java-eclipse-core-filesystem
6125 (package
6126 (name "java-eclipse-core-filesystem")
6127 (version "1.6.1")
6128 (source (origin
6129 (method url-fetch)
6130 (uri (string-append "https://repo1.maven.org/maven2/"
6131 "org/eclipse/platform/org.eclipse.core.filesystem/"
6132 version "/org.eclipse.core.filesystem-"
6133 version "-sources.jar"))
6134 (sha256
6135 (base32
6136 "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj"))))
6137 (build-system ant-build-system)
6138 (arguments
6139 `(#:tests? #f ; no tests included
6140 #:jar-name "eclipse-core-filesystem.jar"))
6141 (inputs
6142 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6143 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6144 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6145 (home-page "https://www.eclipse.org/")
6146 (synopsis "Eclipse core file system")
6147 (description "This package provides the Eclipse core file system with the
6148module @code{org.eclipse.core.filesystem}.")
6149 (license license:epl1.0)))
6150
e96060de
RW
6151(define-public java-eclipse-core-expressions
6152 (package
6153 (name "java-eclipse-core-expressions")
6154 (version "3.5.100")
6155 (source (origin
6156 (method url-fetch)
6157 (uri (string-append "https://repo1.maven.org/maven2/"
6158 "org/eclipse/platform/org.eclipse.core.expressions/"
6159 version "/org.eclipse.core.expressions-"
6160 version "-sources.jar"))
6161 (sha256
6162 (base32
6163 "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f"))))
6164 (build-system ant-build-system)
6165 (arguments
6166 `(#:tests? #f ; no tests included
6167 #:jar-name "eclipse-core-expressions.jar"))
6168 (inputs
6169 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6170 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6171 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6172 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6173 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6174 (home-page "https://www.eclipse.org/")
6175 (synopsis "Eclipse core expression language")
6176 (description "This package provides the Eclipse core expression language
6177with the @code{org.eclipse.core.expressions} module.")
6178 (license license:epl1.0)))
6179
e8d0f7c8
RW
6180(define-public java-eclipse-core-variables
6181 (package
6182 (name "java-eclipse-core-variables")
6183 (version "3.3.0")
6184 (source (origin
6185 (method url-fetch)
6186 (uri (string-append "https://repo1.maven.org/maven2/"
6187 "org/eclipse/platform/org.eclipse.core.variables/"
6188 version "/org.eclipse.core.variables-"
6189 version "-sources.jar"))
6190 (sha256
6191 (base32
6192 "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy"))))
6193 (build-system ant-build-system)
6194 (arguments
6195 `(#:tests? #f ; no tests included
6196 #:jar-name "eclipse-core-variables.jar"))
6197 (inputs
6198 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6199 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6200 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6201 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6202 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6203 (home-page "https://www.eclipse.org/platform")
6204 (synopsis "Eclipse core variables")
6205 (description "This package provides the Eclipse core variables module
6206@code{org.eclipse.core.variables}.")
6207 (license license:epl1.0)))
6208
7c3d479e
RW
6209(define-public java-eclipse-ant-core
6210 (package
6211 (name "java-eclipse-ant-core")
6212 (version "3.4.100")
6213 (source (origin
6214 (method url-fetch)
6215 (uri (string-append "https://repo1.maven.org/maven2/"
6216 "org/eclipse/platform/org.eclipse.ant.core/"
6217 version "/org.eclipse.ant.core-"
6218 version "-sources.jar"))
6219 (sha256
6220 (base32
6221 "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7"))))
6222 (build-system ant-build-system)
6223 (arguments
6224 `(#:tests? #f ; no tests included
6225 #:jar-name "eclipse-ant-core.jar"))
6226 (inputs
6227 `(("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
6228 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6229 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6230 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6231 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6232 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6233 ("java-eclipse-core-variables" ,java-eclipse-core-variables)
6234 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6235 (home-page "https://www.eclipse.org/platform")
6236 (synopsis "Ant build tool core libraries")
6237 (description "This package provides the ant build tool core libraries with
6238the module @code{org.eclipse.ant.core}.")
6239 (license license:epl1.0)))
6240
6636f638
RW
6241(define-public java-eclipse-core-resources
6242 (package
6243 (name "java-eclipse-core-resources")
c8427a5e 6244 (version "3.13.200")
6636f638
RW
6245 (source (origin
6246 (method url-fetch)
6247 (uri (string-append "https://repo1.maven.org/maven2/"
6248 "org/eclipse/platform/org.eclipse.core.resources/"
6249 version "/org.eclipse.core.resources-"
6250 version "-sources.jar"))
6251 (sha256
6252 (base32
c8427a5e 6253 "1sn3b6ky72hkvxcgf9b2jkpbdh3y8lbhi9xxwv1dsiddpkkq91hs"))))
6636f638
RW
6254 (build-system ant-build-system)
6255 (arguments
6256 `(#:tests? #f ; no tests included
6257 #:jar-name "eclipse-core-resources.jar"))
6258 (inputs
6259 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6260 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6261 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6262 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6263 ("java-eclipse-core-expressions" ,java-eclipse-core-expressions)
6264 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
6265 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6266 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6267 ("java-eclipse-ant-core" ,java-eclipse-ant-core)
6268 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6269 (home-page "https://www.eclipse.org/")
6270 (synopsis "Eclipse core resource management")
6271 (description "This package provides the Eclipse core resource management
6272module @code{org.eclipse.core.resources}.")
6273 (license license:epl1.0)))
6274
afb5858d
RW
6275(define-public java-eclipse-compare-core
6276 (package
6277 (name "java-eclipse-compare-core")
6278 (version "3.6.0")
6279 (source (origin
6280 (method url-fetch)
6281 (uri (string-append "https://repo1.maven.org/maven2/"
6282 "org/eclipse/platform/org.eclipse.compare.core/"
6283 version "/org.eclipse.compare.core-"
6284 version "-sources.jar"))
6285 (sha256
6286 (base32
6287 "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg"))))
6288 (build-system ant-build-system)
6289 (arguments
6290 `(#:tests? #f ; no tests included
6291 #:jar-name "eclipse-compare-core.jar"))
6292 (inputs
6293 `(("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6294 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6295 ("java-eclipse-osgi" ,java-eclipse-osgi)
6296 ("java-icu4j" ,java-icu4j)))
6297 (home-page "https://www.eclipse.org/")
6298 (synopsis "Eclipse core compare support")
6299 (description "This package provides the Eclipse core compare support
6300module @code{org.eclipse.compare.core}.")
6301 (license license:epl1.0)))
6302
1bb191fc
RW
6303(define-public java-eclipse-team-core
6304 (package
6305 (name "java-eclipse-team-core")
6306 (version "3.8.0")
6307 (source (origin
6308 (method url-fetch)
6309 (uri (string-append "https://repo1.maven.org/maven2/"
6310 "org/eclipse/platform/org.eclipse.team.core/"
6311 version "/org.eclipse.team.core-"
6312 version "-sources.jar"))
6313 (sha256
6314 (base32
6315 "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7"))))
6316 (build-system ant-build-system)
6317 (arguments
6318 `(#:tests? #f ; no tests included
6319 #:jar-name "eclipse-team-core.jar"))
6320 (inputs
6321 `(("java-eclipse-compare-core" ,java-eclipse-compare-core)
6322 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6323 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
6324 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6325 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
6326 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6327 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6328 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6329 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6330 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6331 (home-page "https://www.eclipse.org/platform")
6332 (synopsis "Eclipse team support core")
6333 (description "This package provides the Eclipse team support core module
6334@code{org.eclipse.team.core}.")
6335 (license license:epl1.0)))
6336
31342529
RW
6337(define-public java-eclipse-core-commands
6338 (package
6339 (name "java-eclipse-core-commands")
6340 (version "3.8.1")
6341 (source (origin
6342 (method url-fetch)
6343 (uri (string-append "https://repo1.maven.org/maven2/"
6344 "org/eclipse/platform/org.eclipse.core.commands/"
6345 version "/org.eclipse.core.commands-"
6346 version "-sources.jar"))
6347 (sha256
6348 (base32
6349 "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9"))))
6350 (build-system ant-build-system)
6351 (arguments
6352 `(#:tests? #f ; no tests included
6353 #:jar-name "eclipse-core-commands.jar"))
6354 (inputs
6355 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)))
6356 (home-page "https://www.eclipse.org/platform")
6357 (synopsis "Eclipse core commands")
6358 (description "This package provides Eclipse core commands in the module
6359@code{org.eclipse.core.commands}.")
6360 (license license:epl1.0)))
6361
bf96acf7
RW
6362(define-public java-eclipse-text
6363 (package
6364 (name "java-eclipse-text")
6365 (version "3.6.0")
6366 (source (origin
6367 (method url-fetch)
6368 (uri (string-append "https://repo1.maven.org/maven2/"
6369 "org/eclipse/platform/org.eclipse.text/"
6370 version "/org.eclipse.text-"
6371 version "-sources.jar"))
6372 (sha256
6373 (base32
6374 "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1"))))
6375 (build-system ant-build-system)
6376 (arguments
6377 `(#:tests? #f ; no tests included
6378 #:jar-name "eclipse-text.jar"
6379 #:phases
6380 (modify-phases %standard-phases
6381 ;; When creating a new category we must make sure that the new list
6382 ;; matches List<Position>. By default it seems to be too generic
6383 ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>.
6384 ;; Without this we get this error:
6385 ;;
6386 ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376:
6387 ;; error: method put in interface Map<K,V> cannot be applied to given types;
6388 ;; [javac] fPositions.put(category, new ArrayList<>());
6389 ;; [javac] ^
6390 ;; [javac] required: String,List<Position>
6391 ;; [javac] found: String,ArrayList<Object>
6392 ;; [javac] reason: actual argument ArrayList<Object> cannot be converted
6393 ;; to List<Position> by method invocation conversion
6394 ;; [javac] where K,V are type-variables:
6395 ;; [javac] K extends Object declared in interface Map
6396 ;; [javac] V extends Object declared in interface Map
6397 ;;
6398 ;; I don't know if this is a good fix. I suspect it is not, but it
6399 ;; seems to work.
6400 (add-after 'unpack 'fix-compilation-error
6401 (lambda _
6402 (substitute* "src/org/eclipse/jface/text/AbstractDocument.java"
6403 (("Positions.put\\(category, new ArrayList<>\\(\\)\\);")
6404 "Positions.put(category, new ArrayList<Position>());"))
6405 #t)))))
6406 (inputs
6407 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6408 ("java-eclipse-core-commands" ,java-eclipse-core-commands)
6409 ("java-icu4j" ,java-icu4j)))
6410 (home-page "http://www.eclipse.org/platform")
6411 (synopsis "Eclipse text library")
6412 (description "Platform Text is part of the Platform UI project and
6413provides the basic building blocks for text and text editors within Eclipse
6414and contributes the Eclipse default text editor.")
6415 (license license:epl1.0)))
6416
c24d11b7
RW
6417(define-public java-eclipse-jdt-core
6418 (package
6419 (name "java-eclipse-jdt-core")
43d6776b 6420 (version "3.16.0")
c24d11b7
RW
6421 (source (origin
6422 (method url-fetch)
6423 (uri (string-append "https://repo1.maven.org/maven2/"
6424 "org/eclipse/jdt/org.eclipse.jdt.core/"
6425 version "/org.eclipse.jdt.core-"
6426 version "-sources.jar"))
6427 (sha256
6428 (base32
43d6776b 6429 "1g560yr9v2kzv34gc2m3ifpgnj7krcdd6h4gd4z83pwqacwkfz0k"))))
c24d11b7
RW
6430 (build-system ant-build-system)
6431 (arguments
6432 `(#:tests? #f ; no tests included
84b226c2
RW
6433 #:jar-name "eclipse-jdt-core.jar"
6434 #:phases
6435 (modify-phases %standard-phases
6436 (add-after 'unpack 'move-sources
6437 (lambda _
6438 (with-directory-excursion "src/jdtCompilerAdaptersrc/"
6439 (for-each (lambda (file)
6440 (install-file file (string-append "../" (dirname file))))
6441 (find-files "." ".*")))
6442 (delete-file-recursively "src/jdtCompilerAdaptersrc/")
6443 #t))
6444 (add-before 'build 'copy-resources
6445 (lambda _
6446 (with-directory-excursion "src"
6447 (for-each (lambda (file)
6448 (install-file file (string-append "../build/classes/" (dirname file))))
6449 (find-files "." ".*.(props|properties|rsc)")))
6450 #t)))))
c24d11b7
RW
6451 (inputs
6452 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6453 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
6454 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6455 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
6456 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6457 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
6458 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6459 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6460 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6461 ("java-eclipse-osgi" ,java-eclipse-osgi)
6462 ("java-eclipse-text" ,java-eclipse-text)))
6463 (home-page "https://www.eclipse.org/jdt")
6464 (synopsis "Java development tools core libraries")
6465 (description "This package provides the core libraries of the Eclipse Java
6466development tools.")
6467 (license license:epl1.0)))
6468
74c2339f
RW
6469(define-public java-eclipse-jdt-compiler-apt
6470 (package
6471 (name "java-eclipse-jdt-compiler-apt")
6472 (version "1.3.400")
6473 (source (origin
6474 (method url-fetch)
6475 (uri (string-append "https://repo1.maven.org/maven2/"
6476 "org/eclipse/jdt/org.eclipse.jdt.compiler.apt/"
6477 version "/org.eclipse.jdt.compiler.apt-"
6478 version "-sources.jar"))
6479 (sha256
6480 (base32
6481 "1s285k9p2ixdqrknb40jbbvw682n9a7l5lqpn583a8pvlzg2l6r8"))))
6482 (build-system ant-build-system)
6483 (arguments
6484 `(#:tests? #f ; no tests included
6485 #:jar-name "eclipse-jdt-compiler-apt.jar"
6486 #:jdk ,openjdk11))
6487 (inputs
6488 `(("java-eclipse-jdt-core" ,java-eclipse-jdt-core)))
6489 (home-page "https://www.eclipse.org/jdt/apt/")
6490 (synopsis "Annotation processing tool")
6491 (description "APT stands for Annotation Processing Tool. APT provides a
6492means for generating files and compiling new Java classes based on annotations
6493found in your source code.")
6494 (license license:epl2.0)))
6495
a5cdcf6c
RW
6496(define-public java-javax-mail
6497 (package
6498 (name "java-javax-mail")
6499 (version "1.5.6")
6500 (source (origin
6501 (method url-fetch)
6502 (uri (string-append "https://repo1.maven.org/maven2/"
6503 "com/sun/mail/javax.mail/"
6504 version "/javax.mail-"
6505 version "-sources.jar"))
6506 (sha256
6507 (base32
6508 "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9"))))
6509 (build-system ant-build-system)
6510 (arguments
6511 `(#:tests? #f ; no tests
6512 #:jar-name "javax-mail.jar"))
6513 (home-page "https://javamail.java.net")
6514 (synopsis "Reference implementation of the JavaMail API")
6515 (description
6516 "This package provides versions of the JavaMail API implementation, IMAP,
6517SMTP, and POP3 service providers, some examples, and documentation for the
6518JavaMail API.")
6519 ;; GPLv2 only with "classpath exception".
6520 (license license:gpl2)))
6521
0e660c4d
RW
6522(define-public java-log4j-api
6523 (package
6524 (name "java-log4j-api")
6525 (version "2.4.1")
6526 (source (origin
6527 (method url-fetch)
6528 (uri (string-append "mirror://apache/logging/log4j/" version
6529 "/apache-log4j-" version "-src.tar.gz"))
6530 (sha256
6531 (base32
6532 "0j5p9gik0jysh37nlrckqbky12isy95cpwg2gv5fas1rcdqbraxd"))))
6533 (build-system ant-build-system)
6534 (arguments
6535 `(#:tests? #f ; tests require unpackaged software
6536 #:jar-name "log4j-api.jar"
6537 #:make-flags
6538 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
6539 "/share/java"))
6540 #:phases
6541 (modify-phases %standard-phases
6542 (add-after 'unpack 'enter-dir
6543 (lambda _ (chdir "log4j-api") #t))
6544 ;; FIXME: The tests require additional software that has not been
6545 ;; packaged yet, such as
6546 ;; * org.apache.maven
6547 ;; * org.apache.felix
6548 (add-after 'enter-dir 'delete-tests
6549 (lambda _ (delete-file-recursively "src/test") #t)))))
6550 (inputs
6551 `(("java-osgi-core" ,java-osgi-core)
6552 ("java-hamcrest-core" ,java-hamcrest-core)
6553 ("java-junit" ,java-junit)))
4d1ddb51 6554 (home-page "https://logging.apache.org/log4j/2.x/")
0e660c4d
RW
6555 (synopsis "API module of the Log4j logging framework for Java")
6556 (description
6557 "This package provides the API module of the Log4j logging framework for
6558Java.")
6559 (license license:asl2.0)))
6560
dfef4231
JL
6561(define-public java-log4j-core
6562 (package
6563 (inherit java-log4j-api)
6564 (name "java-log4j-core")
6565 (inputs
6566 `(("java-osgi-core" ,java-osgi-core)
6567 ("java-hamcrest-core" ,java-hamcrest-core)
6568 ("java-log4j-api" ,java-log4j-api)
6569 ("java-mail" ,java-mail)
6570 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
6571 ("java-lmax-disruptor" ,java-lmax-disruptor)
6572 ("java-kafka" ,java-kafka-clients)
6573 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
6574 ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
6575 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
6576 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
6577 ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml)
6578 ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml)
6579 ("java-commons-compress" ,java-commons-compress)
6580 ("java-commons-csv" ,java-commons-csv)
6581 ("java-jeromq" ,java-jeromq)
6582 ("java-junit" ,java-junit)))
6583 (native-inputs
6584 `(("hamcrest" ,java-hamcrest-all)
6585 ("java-commons-io" ,java-commons-io)
6586 ("java-commons-lang3" ,java-commons-lang3)
6587 ("slf4j" ,java-slf4j-api)))
6588 (arguments
6589 `(#:tests? #f ; tests require more dependencies
6590 #:test-dir "src/test"
6591 #:source-dir "src/main/java"
6592 #:jar-name "log4j-core.jar"
6593 #:jdk ,icedtea-8
6594 #:make-flags
6595 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
6596 "/share/java"))
6597 #:phases
6598 (modify-phases %standard-phases
6599 (add-after 'unpack 'enter-dir
6600 (lambda _ (chdir "log4j-core") #t)))))
6601 (synopsis "Core component of the Log4j framework")
6602 (description "This package provides the core component of the Log4j
6603logging framework for Java.")))
6604
2caf873e
JL
6605(define-public java-log4j-1.2-api
6606 (package
6607 (inherit java-log4j-api)
6608 (name "java-log4j-1.2-api")
6609 (arguments
6610 `(#:jar-name "java-log4j-1.2-api.jar"
6611 #:source-dir "log4j-1.2-api/src/main/java"
6612 #:jdk ,icedtea-8
6613 ;; Tests require maven-model (and other maven subprojects), which is a
6614 ;; cyclic dependency.
6615 #:tests? #f))
6616 (inputs
6617 `(("log4j-api" ,java-log4j-api)
6618 ("log4j-core" ,java-log4j-core)
6619 ("osgi-core" ,java-osgi-core)
6620 ("eclipse-osgi" ,java-eclipse-osgi)
6621 ("java-lmax-disruptor" ,java-lmax-disruptor)))))
6622
1c188f4e
HG
6623(define-public java-commons-cli
6624 (package
6625 (name "java-commons-cli")
37602dd8 6626 (version "1.4")
1c188f4e
HG
6627 (source (origin
6628 (method url-fetch)
6629 (uri (string-append "mirror://apache/commons/cli/source/"
6630 "commons-cli-" version "-src.tar.gz"))
6631 (sha256
6632 (base32
37602dd8 6633 "05hgi2z01fqz374y719gl1dxzqvzci5af071zm7vxrjg9vczipm1"))))
1c188f4e
HG
6634 (build-system ant-build-system)
6635 ;; TODO: javadoc
6636 (arguments
6637 `(#:jar-name "commons-cli.jar"))
6638 (native-inputs
6639 `(("java-junit" ,java-junit)
6640 ("java-hamcrest-core" ,java-hamcrest-core)))
1b3a6038 6641 (home-page "https://commons.apache.org/cli/")
1c188f4e
HG
6642 (synopsis "Command line arguments and options parsing library")
6643 (description "The Apache Commons CLI library provides an API for parsing
6644command line options passed to programs. It is also able to print help
6645messages detailing the options available for a command line tool.
6646
6647Commons CLI supports different types of options:
6648
6649@itemize
6650@item POSIX like options (ie. tar -zxvf foo.tar.gz)
6651@item GNU like long options (ie. du --human-readable --max-depth=1)
6652@item Java like properties (ie. java -Djava.awt.headless=true Foo)
6653@item Short options with value attached (ie. gcc -O2 foo.c)
6654@item long options with single hyphen (ie. ant -projecthelp)
6655@end itemize
6656
6657This is a part of the Apache Commons Project.")
6658 (license license:asl2.0)))
0a8519bc
HG
6659
6660(define-public java-commons-codec
6661 (package
6662 (name "java-commons-codec")
6663 (version "1.10")
6664 (source (origin
6665 (method url-fetch)
6666 (uri (string-append "mirror://apache/commons/codec/source/"
6667 "commons-codec-" version "-src.tar.gz"))
6668 (sha256
6669 (base32
6670 "1w9qg30y4s0x8gnmr2fgj4lyplfn788jqxbcz27lf5kbr6n8xr65"))))
6671 (build-system ant-build-system)
6672 (outputs '("out" "doc"))
6673 (arguments
6674 `(#:test-target "test"
6675 #:make-flags
6676 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
6677 (junit (assoc-ref %build-inputs "java-junit")))
6678 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
6679 (string-append "-Dhamcrest.jar=" hamcrest
6680 "/share/java/hamcrest-core.jar")
6681 ;; Do not append version to jar.
6682 "-Dfinal.name=commons-codec"))
6683 #:phases
6684 (modify-phases %standard-phases
6685 (add-after 'build 'build-javadoc ant-build-javadoc)
6686 (replace 'install (install-jars "dist"))
6687 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
6688 (native-inputs
6689 `(("java-junit" ,java-junit)
6690 ("java-hamcrest-core" ,java-hamcrest-core)))
77e1fe31 6691 (home-page "https://commons.apache.org/codec/")
0a8519bc
HG
6692 (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs")
6693 (description "The codec package contains simple encoder and decoders for
6694various formats such as Base64 and Hexadecimal. In addition to these widely
6695used encoders and decoders, the codec package also maintains a collection of
6696phonetic encoding utilities.
6697
6698This is a part of the Apache Commons Project.")
6699 (license license:asl2.0)))
7d91c1b9
HG
6700
6701(define-public java-commons-daemon
6702 (package
6703 (name "java-commons-daemon")
b503ae3d 6704 (version "1.1.0")
7d91c1b9
HG
6705 (source (origin
6706 (method url-fetch)
6707 (uri (string-append "mirror://apache/commons/daemon/source/"
6708 "commons-daemon-" version "-src.tar.gz"))
6709 (sha256
6710 (base32
b503ae3d 6711 "141gkhfzv5v3pdhic6y4ardq2dhsa3v36j8wmmhy6f8mac48fp7n"))))
7d91c1b9
HG
6712 (build-system ant-build-system)
6713 (arguments
6714 `(#:test-target "test"
6715 #:phases
6716 (modify-phases %standard-phases
6717 (add-after 'build 'build-javadoc ant-build-javadoc)
6718 (replace 'install (install-jars "dist"))
6719 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
6720 (native-inputs
6721 `(("java-junit" ,java-junit)))
4f236f84 6722 (home-page "https://commons.apache.org/daemon/")
7d91c1b9
HG
6723 (synopsis "Library to launch Java applications as daemons")
6724 (description "The Daemon package from Apache Commons can be used to
6725implement Java applications which can be launched as daemons. For example the
6726program will be notified about a shutdown so that it can perform cleanup tasks
6727before its process of execution is destroyed by the operation system.
6728
6729This package contains the Java library. You will also need the actual binary
6730for your architecture which is provided by the jsvc package.
6731
6732This is a part of the Apache Commons Project.")
6733 (license license:asl2.0)))
9f68e74a 6734
eb270ecf
RW
6735(define-public java-javaewah
6736 (package
6737 (name "java-javaewah")
6738 (version "1.1.6")
6739 (source (origin
6740 (method url-fetch)
6741 (uri (string-append "https://github.com/lemire/javaewah/"
6742 "archive/JavaEWAH-" version ".tar.gz"))
6743 (sha256
6744 (base32
6745 "1n7j1r1h24wlhwv9zdcj6yqjrhma2ixwyzm15l5vrv6yqjs6753b"))))
6746 (build-system ant-build-system)
6747 (arguments `(#:jar-name "javaewah.jar"))
6748 (inputs
6749 `(("java-junit" ,java-junit)
6750 ("java-hamcrest-core" ,java-hamcrest-core)))
6751 (home-page "https://github.com/lemire/javaewah")
6752 (synopsis "Compressed alternative to the Java @code{BitSet} class")
6753 (description "This is a word-aligned compressed variant of the Java
6754@code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like
6755compression scheme. It can be used to implement bitmap indexes.
6756
6757The goal of word-aligned compression is not to achieve the best compression,
6758but rather to improve query processing time. Hence, JavaEWAH tries to save CPU
6759cycles, maybe at the expense of storage. However, the EWAH scheme is always
6760more efficient storage-wise than an uncompressed bitmap (as implemented in the
6761@code{BitSet} class by Sun).")
6762 ;; GPL2.0 derivates are explicitly allowed.
6763 (license license:asl2.0)))
6764
f8e4d022
RW
6765(define-public java-slf4j-api
6766 (package
6767 (name "java-slf4j-api")
6768 (version "1.7.25")
6769 (source (origin
6770 (method url-fetch)
6771 (uri (string-append "https://www.slf4j.org/dist/slf4j-"
6772 version ".tar.gz"))
6773 (sha256
6774 (base32
6775 "13j51sgzmhhdrfa74gkal5zpip7r1440dh7zsi2c8bpb2zs1v8kb"))
6776 (modules '((guix build utils)))
6777 ;; Delete bundled jars.
6778 (snippet
6779 '(begin
6780 (for-each delete-file (find-files "." "\\.jar$"))
6781 #t))))
6782 (build-system ant-build-system)
6783 (arguments
dcf7a8a6 6784 `(#:jar-name "slf4j-api.jar"
f8e4d022 6785 #:source-dir "slf4j-api/src/main"
dcf7a8a6
JL
6786 #:test-dir "slf4j-api/src/test"
6787 #:phases
6788 (modify-phases %standard-phases
6789 (add-after 'build 'regenerate-jar
6790 (lambda _
6791 ;; pom.xml ignores these files in the jar creation process. If we don't,
6792 ;; we get the error "This code should have never made it into slf4j-api.jar"
6793 (delete-file-recursively "build/classes/org/slf4j/impl")
2c8ac364
MW
6794 (invoke "jar" "-cf" "build/jar/slf4j-api.jar" "-C"
6795 "build/classes" ".")))
dcf7a8a6
JL
6796 (add-before 'check 'dont-test-abstract-classes
6797 (lambda _
6798 ;; abstract classes are not meant to be run with junit
6799 (substitute* "build.xml"
6800 (("<include name=\"\\*\\*/\\*Test.java\" />")
6801 (string-append "<include name=\"**/*Test.java\" />"
6802 "<exclude name=\"**/MultithreadedInitializationTest"
2c8ac364
MW
6803 ".java\" />")))
6804 #t)))))
f8e4d022
RW
6805 (inputs
6806 `(("java-junit" ,java-junit)
6807 ("java-hamcrest-core" ,java-hamcrest-core)))
6808 (home-page "https://www.slf4j.org/")
6809 (synopsis "Simple logging facade for Java")
6810 (description "The Simple Logging Facade for Java (SLF4J) serves as a
6811simple facade or abstraction for various logging
6812frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j})
6813allowing the end user to plug in the desired logging framework at deployment
6814time.")
6815 (license license:expat)))
6816
6d047cc4
GB
6817(define java-slf4j-api-bootstrap
6818 (package
6819 (inherit java-slf4j-api)
6820 (name "java-slf4j-api-bootstrap")
6821 (inputs `())
6822 (arguments
6823 (substitute-keyword-arguments (package-arguments java-slf4j-api)
6824 ((#:tests? _ #f) #f)))))
6825
88f256a1
TD
6826(define-public java-slf4j-simple
6827 (package
6828 (name "java-slf4j-simple")
6829 (version "1.7.25")
6830 (source (package-source java-slf4j-api))
6831 (build-system ant-build-system)
6832 (arguments
6833 `(#:jar-name "slf4j-simple.jar"
6834 #:source-dir "slf4j-simple/src/main"
6835 #:test-dir "slf4j-simple/src/test"
6836 #:phases
6837 (modify-phases %standard-phases
6838 ;; The tests need some test classes from slf4j-api
6839 (add-before 'check 'build-slf4j-api-test-helpers
6840 (lambda _
6841 ;; Add current dir to CLASSPATH ...
6842 (setenv "CLASSPATH"
6843 (string-append (getcwd) ":" (getenv "CLASSPATH")))
6844 ;; ... and build test helper classes here:
2c8ac364
MW
6845 (apply invoke
6846 `("javac" "-d" "."
6847 ,@(find-files "slf4j-api/src/test" ".*\\.java"))))))))
88f256a1
TD
6848 (inputs
6849 `(("java-junit" ,java-junit)
6850 ("java-hamcrest-core" ,java-hamcrest-core)
6851 ("java-slf4j-api" ,java-slf4j-api)))
6852 (home-page "https://www.slf4j.org/")
6853 (synopsis "Simple implementation of simple logging facade for Java")
6854 (description "SLF4J binding for the Simple implementation, which outputs
6855all events to System.err. Only messages of level INFO and higher are
6856printed.")
6857 (license license:expat)))
6858
9f68e74a
JL
6859(define-public antlr2
6860 (package
6861 (name "antlr2")
6862 (version "2.7.7")
6863 (source (origin
6864 (method url-fetch)
7420c1ee 6865 (uri (string-append "https://www.antlr2.org/download/antlr-"
9f68e74a
JL
6866 version ".tar.gz"))
6867 (sha256
6868 (base32
6869 "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5"))
6870 (modules '((guix build utils)))
6871 (snippet
6872 '(begin
6873 (delete-file "antlr.jar")
6874 (substitute* "lib/cpp/antlr/CharScanner.hpp"
6875 (("#include <map>")
6876 (string-append
6d225e89
RW
6877 "#include <map>\n"
6878 "#define EOF (-1)\n"
6879 "#include <strings.h>")))
9f68e74a 6880 (substitute* "configure"
6d225e89
RW
6881 (("/bin/sh") "sh"))
6882 #t))))
9f68e74a
JL
6883 (build-system gnu-build-system)
6884 (arguments
6d225e89 6885 `(#:tests? #f ; no test target
3ad90395
RW
6886 #:imported-modules ((guix build ant-build-system)
6887 (guix build syscalls)
6888 ,@%gnu-build-system-modules)
6889 #:modules (((guix build ant-build-system) #:prefix ant:)
6890 (guix build gnu-build-system)
6891 (guix build utils))
9f68e74a
JL
6892 #:phases
6893 (modify-phases %standard-phases
6894 (add-after 'install 'strip-jar-timestamps
3ad90395 6895 (assoc-ref ant:%standard-phases 'strip-jar-timestamps))
79f6fc0d
JL
6896 (add-before 'configure 'fix-timestamp
6897 (lambda _
6898 (substitute* "configure"
6899 (("^TIMESTAMP.*") "TIMESTAMP=19700101\n"))
6900 #t))
9f68e74a
JL
6901 (add-after 'configure 'fix-bin-ls
6902 (lambda _
3ad90395
RW
6903 (substitute* (find-files "." "Makefile")
6904 (("/bin/ls") "ls"))
6905 #t)))))
9f68e74a
JL
6906 (native-inputs
6907 `(("which" ,which)
6908 ("zip" ,zip)
6909 ("java" ,icedtea "jdk")))
6910 (inputs
6911 `(("java" ,icedtea)))
7420c1ee 6912 (home-page "https://www.antlr2.org")
9f68e74a
JL
6913 (synopsis "Framework for constructing recognizers, compilers, and translators")
6914 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
6915is a language tool that provides a framework for constructing recognizers,
6916compilers, and translators from grammatical descriptions containing Java, C#,
6917C++, or Python actions. ANTLR provides excellent support for tree construction,
6918tree walking, and translation.")
6919 (license license:public-domain)))
a0f15eff 6920
e44112e1 6921(define-public java-stringtemplate-3
a0f15eff 6922 (package
e44112e1 6923 (name "java-stringtemplate")
a0f15eff
JL
6924 (version "3.2.1")
6925 (source (origin
6926 (method url-fetch)
6927 (uri (string-append "https://github.com/antlr/website-st4/raw/"
6928 "gh-pages/download/stringtemplate-"
6929 version ".tar.gz"))
6930 (sha256
6931 (base32
6932 "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is"))))
6933 (build-system ant-build-system)
6934 (arguments
129d926d 6935 `(#:jar-name (string-append ,name "-" ,version ".jar")
2fcda6d2 6936 #:test-dir "test"
b101b4e8
RW
6937 #:modules ((guix build ant-build-system)
6938 (guix build utils)
6939 (srfi srfi-1))
a0f15eff
JL
6940 #:phases
6941 (modify-phases %standard-phases
2fcda6d2
RW
6942 (add-before 'check 'fix-tests
6943 (lambda _
6944 (substitute* "build.xml"
6945 (("\\$\\{test.home\\}/java")
6946 "${test.home}/org"))
6947 #t))
a0f15eff
JL
6948 (add-before 'build 'generate-grammar
6949 (lambda _
b101b4e8 6950 (with-directory-excursion "src/org/antlr/stringtemplate/language/"
2c8ac364
MW
6951 (for-each (lambda (file)
6952 (format #t "~a\n" file)
6953 (invoke "antlr" file))
6954 '("template.g" "angle.bracket.template.g" "action.g"
6955 "eval.g" "group.g" "interface.g")))
6956 #t)))))
a0f15eff 6957 (native-inputs
2fcda6d2
RW
6958 `(("antlr" ,antlr2)
6959 ("java-junit" ,java-junit)))
ba11a8bd 6960 (home-page "https://www.stringtemplate.org")
a0f15eff
JL
6961 (synopsis "Template engine to generate formatted text output")
6962 (description "StringTemplate is a java template engine (with ports for C#,
6963Objective-C, JavaScript, Scala) for generating source code, web pages, emails,
6964or any other formatted text output. StringTemplate is particularly good at
6965code generators, multiple site skins, and internationalization / localization.
6966StringTemplate also powers ANTLR.")
6967 (license license:bsd-3)))
4ad8aed7
JL
6968
6969;; antlr3 is partially written using antlr3 grammar files. It also depends on
6970;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar
6971;; files and uses antlr3 at runtime. The latest version requires a recent version
6972;; of antlr3 at runtime.
6973;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3.
6974;; This version of ST4 is sufficient for the latest antlr3.
6975;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build
6976;; the latest ST4 with it. Then we build our final antlr3 that will be linked
6977;; against the latest ST4.
6978;; antlr3.3 still depends on antlr3 to generate some files, so we use an
6979;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses
6980;; only grammar files with the antlr2 syntax.
6981;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3.
6982
64b7efc0 6983(define-public java-stringtemplate
407df789 6984 (package (inherit java-stringtemplate-3)
64b7efc0 6985 (name "java-stringtemplate")
4ad8aed7
JL
6986 (version "4.0.8")
6987 (source (origin
6988 (method url-fetch)
6989 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/"
6990 version ".tar.gz"))
6991 (file-name (string-append name "-" version ".tar.gz"))
6992 (sha256
6993 (base32
6994 "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087"))))
6995 (build-system ant-build-system)
6996 (arguments
6db77c7c
RW
6997 `(#:jar-name (string-append ,name "-" ,version ".jar")
6998 #:tests? #f ; FIXME: tests fail for unknown reasons
6999 #:test-dir "test"
f4aa4cfe
RW
7000 #:modules ((guix build ant-build-system)
7001 (guix build utils)
7002 (srfi srfi-1))
4ad8aed7
JL
7003 #:phases
7004 (modify-phases %standard-phases
6db77c7c
RW
7005 (add-before 'check 'fix-test-target
7006 (lambda _
7007 (substitute* "build.xml"
7008 (("\\$\\{test.home\\}/java") "${test.home}/")
7009 (("\\*Test.java") "Test*.java"))
7010 #t))
4ad8aed7 7011 (add-before 'build 'generate-grammar
f4aa4cfe
RW
7012 (lambda _
7013 (with-directory-excursion "src/org/stringtemplate/v4/compiler/"
2c8ac364
MW
7014 (for-each (lambda (file)
7015 (format #t "~a\n" file)
7016 (invoke "antlr3" file))
7017 '("STParser.g" "Group.g" "CodeGenerator.g")))
7018 #t)))))
4ad8aed7
JL
7019 (inputs
7020 `(("antlr3" ,antlr3-bootstrap)
7021 ("antlr2" ,antlr2)
6db77c7c
RW
7022 ("java-stringtemplate" ,java-stringtemplate-3)
7023 ("java-junit" ,java-junit)))))
4ad8aed7 7024
1345eeb0 7025(define java-stringtemplate-4.0.6
64b7efc0 7026 (package (inherit java-stringtemplate)
1345eeb0 7027 (name "java-stringtemplate")
4ad8aed7
JL
7028 (version "4.0.6")
7029 (source (origin
7030 (method url-fetch)
7031 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-"
7032 version ".tar.gz"))
7033 (file-name (string-append name "-" version ".tar.gz"))
7034 (sha256
7035 (base32
7036 "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp"))))
7037 (inputs
7038 `(("antlr3" ,antlr3-3.3)
7039 ("antlr2" ,antlr2)
e44112e1 7040 ("java-stringtemplate" ,java-stringtemplate-3)))))
4ad8aed7
JL
7041
7042(define-public antlr3
7043 (package
7044 (name "antlr3")
7045 (version "3.5.2")
7046 (source (origin
7047 (method url-fetch)
7048 (uri (string-append "https://github.com/antlr/antlr3/archive/"
7049 version ".tar.gz"))
7050 (file-name (string-append name "-" version ".tar.gz"))
7051 (sha256
7052 (base32
fd75eb6c 7053 "0218v683081lg54z9hvjxinhxd4dqp870jx6n39gslm0bkyi4vd6"))))
4ad8aed7
JL
7054 (build-system ant-build-system)
7055 (arguments
7056 `(#:jar-name (string-append ,name "-" ,version ".jar")
7057 #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3"
7058 #:tests? #f
7059 #:phases
7060 (modify-phases %standard-phases
7061 (add-after 'install 'bin-install
7062 (lambda* (#:key inputs outputs #:allow-other-keys)
7063 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
7064 (bin (string-append (assoc-ref outputs "out") "/bin")))
7065 (mkdir-p bin)
7066 (with-output-to-file (string-append bin "/antlr3")
7067 (lambda _
7068 (display
7069 (string-append "#!" (which "sh") "\n"
7070 "java -cp " jar "/" ,name "-" ,version ".jar:"
7071 (string-concatenate
7072 (find-files (assoc-ref inputs "stringtemplate")
7073 ".*\\.jar"))
7074 ":"
7075 (string-concatenate
7076 (find-files (assoc-ref inputs "stringtemplate4")
7077 ".*\\.jar"))
7078 ":"
7079 (string-concatenate
7080 (find-files (string-append
7081 (assoc-ref inputs "antlr")
7082 "/lib")
7083 ".*\\.jar"))
7084 " org.antlr.Tool $*"))))
2c8ac364
MW
7085 (chmod (string-append bin "/antlr3") #o755))
7086 #t))
4ad8aed7
JL
7087 (add-before 'build 'generate-grammar
7088 (lambda _
7089 (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/")
7090 (for-each (lambda (file)
7091 (display file)
7092 (newline)
2c8ac364 7093 (invoke "antlr3" file))
4ad8aed7
JL
7094 '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g"
7095 "AssignTokenTypesWalker.g"
7096 "ActionTranslator.g" "TreeToNFAConverter.g"
7097 "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g"
7098 "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g"))
7099 (substitute* "ANTLRParser.java"
7100 (("public Object getTree") "public GrammarAST getTree"))
7101 (substitute* "ANTLRv3Parser.java"
7102 (("public Object getTree") "public CommonTree getTree"))
7103 (chdir "../../../../../java")
4ad8aed7
JL
7104 (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java"
7105 (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*;
7106import org.antlr.grammar.v3.ANTLRTreePrinter;"))
7107 (substitute* "org/antlr/tool/ErrorManager.java"
7108 (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") ""))
2c8ac364
MW
7109 (chdir "../../../..")
7110 #t))
4ad8aed7
JL
7111 (add-before 'build 'fix-build-xml
7112 (lambda _
7113 (substitute* "build.xml"
570f3b63
JL
7114 (("target name=\"compile\">")
7115 "target name=\"compile\">
7116<copy todir=\"${classes.dir}\">
4ad8aed7
JL
7117<fileset dir=\"tool/src/main/resources\">
7118<include name=\"**/*.stg\"/>
7119<include name=\"**/*.st\"/>
7120<include name=\"**/*.sti\"/>
7121<include name=\"**/STLexer.tokens\"/>
7122</fileset>
570f3b63 7123</copy>"))
2c8ac364 7124 #t)))))
4ad8aed7
JL
7125 (native-inputs
7126 `(("antlr" ,antlr2)
7127 ("antlr3" ,antlr3-bootstrap)))
7128 (inputs
7129 `(("junit" ,java-junit)
e44112e1 7130 ("stringtemplate" ,java-stringtemplate-3)
64b7efc0 7131 ("stringtemplate4" ,java-stringtemplate)))
4ad8aed7 7132 (propagated-inputs
e44112e1 7133 `(("stringtemplate" ,java-stringtemplate-3)
4ad8aed7 7134 ("antlr" ,antlr2)
1345eeb0 7135 ("stringtemplate4" ,java-stringtemplate-4.0.6)))
a264250b 7136 (home-page "https://www.antlr3.org")
4ad8aed7
JL
7137 (synopsis "Framework for constructing recognizers, compilers, and translators")
7138 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
7139is a language tool that provides a framework for constructing recognizers,
7140compilers, and translators from grammatical descriptions containing Java, C#,
7141C++, or Python actions. ANTLR provides excellent support for tree construction,
7142tree walking, and translation.")
7143 (license license:bsd-3)))
7144
7145(define antlr3-bootstrap
7146 (package
7147 (inherit antlr3)
7148 (name "antlr3-bootstrap")
7149 (native-inputs
7150 `(("antlr" ,antlr2)
7151 ("antlr3" ,antlr3-3.3)))
7152 (inputs
7153 `(("junit" ,java-junit)))))
7154
7155(define antlr3-3.3
7156 (package
7157 (inherit antlr3)
7158 (name "antlr3")
7159 (version "3.3")
7160 (source (origin
7161 (method url-fetch)
7162 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
7163 "gh-pages/download/antlr-"
7164 version ".tar.gz"))
7165 (sha256
7166 (base32
48c86220
GB
7167 "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m"))
7168 (patches
7169 (search-patches "antlr3-3_3-fix-java8-compilation.patch"))))
4ad8aed7
JL
7170 (arguments
7171 `(#:jar-name (string-append ,name "-" ,version ".jar")
a9540107
RW
7172 #:source-dir (string-join '("tool/src/main/java"
7173 "runtime/Java/src/main/java"
7174 "tool/src/main/antlr2"
7175 "tool/src/main/antlr3")
7176 ":")
7177 #:tests? #f ; FIXME: tests seem to require maven plugin
7178 #:modules ((guix build ant-build-system)
7179 (guix build utils)
7180 (srfi srfi-1))
4ad8aed7
JL
7181 #:phases
7182 (modify-phases %standard-phases
7183 (add-after 'install 'bin-install
7184 (lambda* (#:key inputs outputs #:allow-other-keys)
a9540107
RW
7185 (let* ((out (assoc-ref outputs "out"))
7186 (jar (string-append out "/share/java"))
7187 (bin (string-append out "/bin")))
4ad8aed7
JL
7188 (mkdir-p bin)
7189 (with-output-to-file (string-append bin "/antlr3")
7190 (lambda _
7191 (display
a9540107
RW
7192 (string-append
7193 "#!" (which "sh") "\n"
7194 "java -cp " jar "/antlr3-3.3.jar:"
7195 (string-join
7196 (append (find-files (assoc-ref inputs "java-stringtemplate")
7197 ".*\\.jar$")
7198 (find-files (string-append (assoc-ref inputs "antlr")
7199 "/lib")
7200 ".*\\.jar$"))
7201 ":")
7202 " org.antlr.Tool $*"))))
7203 (chmod (string-append bin "/antlr3") #o755)
7204 #t)))
4ad8aed7
JL
7205 (add-before 'build 'generate-grammar
7206 (lambda _
4ad8aed7
JL
7207 (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java"
7208 (("import org.antlr.grammar.v2.\\*;")
7209 "import org.antlr.grammar.v2.*;\n
7210import org.antlr.grammar.v2.TreeToNFAConverter;\n
7211import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n
a9540107 7212import org.antlr.grammar.v2.ANTLRTreePrinter;"))
2c8ac364
MW
7213 (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/"
7214 (for-each (lambda (file)
7215 (format #t "~a\n" file)
7216 (invoke "antlr" file))
7217 '("antlr.g" "antlr.print.g" "assign.types.g"
7218 "buildnfa.g" "codegen.g" "define.g")))
7219 (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/"
7220 (for-each (lambda (file)
7221 (format #t "~a\n" file)
7222 (invoke "antlr3" file))
7223 '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g"
7224 "ANTLRv3Tree.g")))
7225 #t))
4ad8aed7
JL
7226 (add-before 'build 'fix-build-xml
7227 (lambda _
7228 (substitute* "build.xml"
570f3b63
JL
7229 (("target name=\"compile\">")
7230 "target name=\"compile\">
7231<copy todir=\"${classes.dir}\">
4ad8aed7
JL
7232<fileset dir=\"tool/src/main/resources\">
7233<include name=\"**/*.stg\"/>
7234<include name=\"**/*.st\"/>
7235<include name=\"**/*.sti\"/>
7236<include name=\"**/STLexer.tokens\"/>
7237</fileset>
570f3b63 7238</copy>"))
a9540107 7239 #t)))))
4ad8aed7
JL
7240 (native-inputs
7241 `(("antlr" ,antlr2)
7242 ("antlr3" ,antlr3-3.1)))
7243 (inputs
7244 `(("junit" ,java-junit)))
7245 (propagated-inputs
e44112e1 7246 `(("java-stringtemplate" ,java-stringtemplate-3)
4ad8aed7
JL
7247 ("antlr" ,antlr2)
7248 ("antlr3" ,antlr3-3.1)))))
7249
570f3b63 7250(define-public antlr3-3.1
4ad8aed7
JL
7251 (package
7252 (inherit antlr3)
4ad8aed7
JL
7253 (version "3.1")
7254 (source (origin
7255 (method url-fetch)
7256 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
7257 "gh-pages/download/antlr-"
7258 version ".tar.gz"))
7259 (sha256
7260 (base32
4c763b4d
GB
7261 "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z"))
7262 (patches
7263 (search-patches "antlr3-3_1-fix-java8-compilation.patch"))))
4ad8aed7 7264 (arguments
ec32bc98 7265 `(#:jar-name (string-append "antlr3-" ,version ".jar")
4ad8aed7
JL
7266 #:source-dir "src:runtime/Java/src"
7267 #:tests? #f
7268 #:phases
7269 (modify-phases %standard-phases
7270 (add-after 'install 'bin-install
7271 (lambda* (#:key inputs outputs #:allow-other-keys)
7272 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
7273 (bin (string-append (assoc-ref outputs "out") "/bin")))
7274 (mkdir-p bin)
7275 (with-output-to-file (string-append bin "/antlr3")
7276 (lambda _
7277 (display
7278 (string-append "#!" (which "sh") "\n"
57e37764 7279 "java -cp " jar "/antlr3-3.1.jar:"
4ad8aed7
JL
7280 (string-concatenate
7281 (find-files (assoc-ref inputs "stringtemplate")
7282 ".*\\.jar"))
7283 ":"
7284 (string-concatenate
7285 (find-files (string-append
7286 (assoc-ref inputs "antlr")
7287 "/lib")
7288 ".*\\.jar"))
7289 " org.antlr.Tool $*"))))
2c8ac364
MW
7290 (chmod (string-append bin "/antlr3") #o755))
7291 #t))
4ad8aed7
JL
7292 (add-before 'build 'generate-grammar
7293 (lambda _
7294 (let ((dir "src/org/antlr/tool/"))
7295 (for-each (lambda (file)
7296 (display file)
7297 (newline)
13f38d31 7298 (invoke "antlr" "-o" dir (string-append dir file)))
4ad8aed7
JL
7299 '("antlr.g" "antlr.print.g" "assign.types.g"
7300 "buildnfa.g" "define.g")))
7301 (format #t "codegen.g\n")
13f38d31
RW
7302 (invoke "antlr" "-o" "src/org/antlr/codegen"
7303 "src/org/antlr/codegen/codegen.g")
7304 #t))
4ad8aed7
JL
7305 (add-before 'build 'fix-build-xml
7306 (lambda _
7307 (substitute* "build.xml"
570f3b63
JL
7308 (("target name=\"compile\">")
7309 "target name=\"compile\">
7310<copy todir=\"${classes.dir}\">
4ad8aed7
JL
7311<fileset dir=\"src\">
7312<include name=\"**/*.stg\"/>
7313<include name=\"**/*.st\"/>
7314<include name=\"**/*.sti\"/>
7315<include name=\"**/STLexer.tokens\"/>
7316</fileset>
570f3b63 7317</copy>"))
2c8ac364 7318 #t)))))
4ad8aed7
JL
7319 (native-inputs
7320 `(("antlr" ,antlr2)))
7321 (inputs
7322 `(("junit" ,java-junit)))
7323 (propagated-inputs
e44112e1 7324 `(("stringtemplate" ,java-stringtemplate-3)))))
d44bcd7a 7325
742242a5
GB
7326(define-public java-commons-cli-1.2
7327 ;; This is a bootstrap dependency for Maven2.
7328 (package
7329 (inherit java-commons-cli)
7330 (version "1.2")
7331 (source (origin
7332 (method url-fetch)
7333 (uri (string-append "mirror://apache/commons/cli/source/"
7334 "commons-cli-" version "-src.tar.gz"))
7335 (sha256
7336 (base32
7337 "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm"))))
7338 (arguments
7339 `(#:jar-name "commons-cli.jar"
7340 #:phases
7341 (modify-phases %standard-phases
7342 (add-before 'check 'fix-build-xml
7343 (lambda* (#:key inputs #:allow-other-keys)
7344 (substitute* "build.xml"
7345 (("dir=\"\\$\\{test.home\\}/java\"")
7346 "dir=\"${test.home}\""))
7347 #t)))))
7348 (native-inputs
7349 `(("java-junit" ,java-junit)))))
30deadee
JL
7350
7351(define-public java-microemulator-cldc
7352 (package
7353 (name "java-microemulator-cldc")
7354 (version "2.0.4")
7355 (source (origin
7356 (method url-fetch)
7357 (uri (string-append "https://github.com/barteo/microemu/archive/"
7358 "microemulator_"
7359 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
7360 version)
7361 ".tar.gz"))
7362 (file-name (string-append name "-" version ".tar.gz"))
7363 (sha256
7364 (base32
7365 "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll"))))
7366 (build-system ant-build-system)
7367 (arguments
7368 `(#:jar-name "microemulator-cldc.jar"
7369 #:source-dir "microemu-cldc/src/main/java"
7370 #:tests? #f)); Requires even older software
7371 (home-page "https://github.com/barteo/microemu")
7372 (synopsis "J2ME CLDC emulator")
7373 (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP
7374Emulator. It allows to demonstrate MIDlet based applications in web browser
7375applet and can be run as a standalone java application.")
7376 (license (list license:asl2.0
7377 ;; or altenatively:
7378 license:lgpl2.1+))))
8e2f3e5e
JL
7379
7380(define-public java-datanucleus-javax-persistence
7381 (package
7382 (name "java-datanucleus-javax-persistence")
7383 (version "2.2.0")
7384 (source (origin
7385 (method url-fetch)
7386 (uri (string-append "https://github.com/datanucleus/"
7387 "javax.persistence/archive/javax.persistence-"
7388 version "-release.tar.gz"))
7389 (sha256
7390 (base32
7391 "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx"))))
7392 (build-system ant-build-system)
7393 (arguments
7394 `(#:jar-name "java-datanucleus-javax-persistence.jar"
7395 #:jdk ,icedtea-8
7396 #:source-dir "src/main/java"
7397 #:tests? #f)); no tests
7398 (home-page "https://github.com/datanucleus/javax.persistence")
7399 (synopsis "JPA API")
7400 (description "This package contains a clean definition of JPA API intended
7401for use with DataNucleus JPA since the JCP haven't provided an official JPA API
7402jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification
7403used to generate this API.")
7404 (license (list license:edl1.0 license:epl1.0))))
3240ddbf
JL
7405
7406(define-public java-osgi-cmpn
7407 (package
7408 (name "java-osgi-cmpn")
7409 (version "6.0.0")
7410 (source (origin
7411 (method url-fetch)
7779ad50 7412 (uri (string-append "https://repo1.maven.org/maven2/"
3240ddbf
JL
7413 "org/osgi/osgi.cmpn/" version "/osgi.cmpn-"
7414 version "-sources.jar"))
7415 (sha256
7416 (base32
7417 "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys"))))
7418 (build-system ant-build-system)
7419 (arguments
7420 `(#:jar-name "osgi-cmpn.jar"
7421 #:tests? #f)); no tests
7422 (inputs
7423 `(("annotation" ,java-osgi-annotation)
7424 ("core" ,java-osgi-core)
7425 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
7426 ("microemulator" ,java-microemulator-cldc)
7427 ("servlet" ,java-classpathx-servletapi)))
c353d014 7428 (home-page "https://www.osgi.org")
3240ddbf
JL
7429 (synopsis "Compendium specification module of OSGi framework")
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 compendium specification module, providing interfaces and classes for use
7434in compiling bundles.")
7435 (license license:asl2.0)))
747c7574
JL
7436
7437(define-public java-osgi-service-component-annotations
7438 (package
7439 (name "java-osgi-service-component-annotations")
7440 (version "1.3.0")
7441 (source (origin
7442 (method url-fetch)
fa315559 7443 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
747c7574
JL
7444 "org.osgi.service.component.annotations/"
7445 version "/org.osgi.service.component.annotations-"
7446 version "-sources.jar"))
7447 (sha256
7448 (base32
7449 "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0"))))
7450 (build-system ant-build-system)
7451 (arguments
7452 `(#:jar-name "osgi-service-component-annotations.jar"
7453 #:tests? #f)); no tests
7454 (inputs
7455 `(("annotation" ,java-osgi-annotation)))
c353d014 7456 (home-page "https://www.osgi.org")
747c7574
JL
7457 (synopsis "Support annotations for osgi-service-component")
7458 (description
7459 "OSGi, for Open Services Gateway initiative framework, is a module system
7460and service platform for the Java programming language. This package contains
7461the support annotations for osgi-service-component.")
7462 (license license:asl2.0)))
999b5fb4
JL
7463
7464(define-public java-osgi-dto
7465 (package
7466 (name "java-osgi-dto")
7467 (version "1.0.0")
7468 (source (origin
7469 (method url-fetch)
fc1c5dbd 7470 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
999b5fb4
JL
7471 "org.osgi.dto/" version "/org.osgi.dto-"
7472 version "-sources.jar"))
7473 (sha256
7474 (base32
7475 "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr"))))
7476 (build-system ant-build-system)
7477 (arguments
7478 `(#:jar-name "osgi-dto.jar"
7479 #:tests? #f)); no tests
7480 (inputs
7481 `(("annotation" ,java-osgi-annotation)))
c353d014 7482 (home-page "https://www.osgi.org")
999b5fb4
JL
7483 (synopsis "Data Transfer Objects")
7484 (description
7485 "OSGi, for Open Services Gateway initiative framework, is a module system
7486and service platform for the Java programming language. This package contains
7487the Data Transfer Objects. It is easily serializable having only public fields
7488of primitive types and their wrapper classes, Strings, and DTOs. List, Set,
7489Map and array aggregates may also be used. The aggregates must only hold
7490objects of the listed types or aggregates.")
7491 (license license:asl2.0)))
c304ce6a
JL
7492
7493(define-public java-osgi-resource
7494 (package
7495 (name "java-osgi-resource")
7496 (version "1.0.0")
7497 (source (origin
7498 (method url-fetch)
1f2643fa 7499 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
c304ce6a
JL
7500 "org.osgi.resource/"
7501 version "/org.osgi.resource-"
7502 version "-sources.jar"))
7503 (sha256
7504 (base32
7505 "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d"))))
7506 (build-system ant-build-system)
7507 (arguments
7508 `(#:jar-name "osgi-resource.jar"
7509 #:tests? #f)); no tests
7510 (inputs
7511 `(("annotation" ,java-osgi-annotation)
7512 ("dto" ,java-osgi-dto)))
c353d014 7513 (home-page "https://www.osgi.org")
c304ce6a
JL
7514 (synopsis "OSGI Resource")
7515 (description
7516 "OSGi, for Open Services Gateway initiative framework, is a module system
7517and service platform for the Java programming language. This package contains
7518the definition of common types in osgi packages.")
7519 (license license:asl2.0)))
c2b14516
JL
7520
7521(define-public java-osgi-namespace-contract
7522 (package
7523 (name "java-osgi-namespace-contract")
7524 (version "1.0.0")
7525 (source (origin
7526 (method url-fetch)
60f5ab0b 7527 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
c2b14516
JL
7528 "org.osgi.namespace.contract/"
7529 version "/org.osgi.namespace.contract-"
7530 version "-sources.jar"))
7531 (sha256
7532 (base32
7533 "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36"))))
7534 (build-system ant-build-system)
7535 (inputs
7536 `(("resource" ,java-osgi-resource)
7537 ("annotation" ,java-osgi-annotation)))
7538 (arguments
7539 `(#:jar-name "osgi-namespace-contract.jar"
7540 #:tests? #f)); no tests
c353d014 7541 (home-page "https://www.osgi.org")
c2b14516
JL
7542 (synopsis "Contract Capability and Requirement Namespace")
7543 (description
7544 "OSGi, for Open Services Gateway initiative framework, is a module system
7545and service platform for the Java programming language. This package contains
7546the names for the attributes and directives for a namespace with contracts.")
7547 (license license:asl2.0)))
f809c963
JL
7548
7549(define-public java-osgi-namespace-extender
7550 (package
7551 (name "java-osgi-namespace-extender")
7552 (version "1.0.1")
7553 (source (origin
7554 (method url-fetch)
fccce661 7555 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
f809c963
JL
7556 "org.osgi.namespace.extender/"
7557 version "/org.osgi.namespace.extender-"
7558 version "-sources.jar"))
7559 (sha256
7560 (base32
7561 "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz"))))
7562 (build-system ant-build-system)
7563 (inputs
7564 `(("resource" ,java-osgi-resource)
7565 ("annotation" ,java-osgi-annotation)))
7566 (arguments
7567 `(#:jar-name "osgi-namespace-extendent.jar"
7568 #:tests? #f)); no tests
c353d014 7569 (home-page "https://www.osgi.org")
f809c963
JL
7570 (synopsis "Extender Capability and Requirement Namespace")
7571 (description
7572 "OSGi, for Open Services Gateway initiative framework, is a module system
7573and service platform for the Java programming language. This package contains
b784962d
JL
7574the names for the attributes and directives for an extender namespace.")
7575 (license license:asl2.0)))
7576
7577(define-public java-osgi-namespace-service
7578 (package
7579 (name "java-osgi-namespace-service")
7580 (version "1.0.0")
7581 (source (origin
7582 (method url-fetch)
ec4ba417 7583 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
b784962d
JL
7584 "org.osgi.namespace.service/"
7585 version "/org.osgi.namespace.service-"
7586 version "-sources.jar"))
7587 (sha256
7588 (base32
7589 "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8"))))
7590 (build-system ant-build-system)
7591 (inputs
7592 `(("resource" ,java-osgi-resource)
7593 ("annotation" ,java-osgi-annotation)))
7594 (arguments
7595 `(#:jar-name "osgi-namespace-service.jar"
7596 #:tests? #f)); no tests
c353d014 7597 (home-page "https://www.osgi.org")
b784962d
JL
7598 (synopsis "Service Capability and Requirement Namespace")
7599 (description
7600 "OSGi, for Open Services Gateway initiative framework, is a module system
7601and service platform for the Java programming language. This package contains
7602the names for the attributes and directives for a service namespace.")
f809c963 7603 (license license:asl2.0)))
0f0c5218
JL
7604
7605(define-public java-osgi-util-function
7606 (package
7607 (name "java-osgi-util-function")
7608 (version "1.0.0")
7609 (source (origin
7610 (method url-fetch)
43be0299 7611 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
0f0c5218
JL
7612 "org.osgi.util.function/"
7613 version "/org.osgi.util.function-"
7614 version "-sources.jar"))
7615 (sha256
7616 (base32
7617 "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x"))))
7618 (build-system ant-build-system)
7619 (arguments
7620 `(#:jar-name "osgi-util-function.jar"
7621 #:tests? #f)); no tests
7622 (inputs
7623 `(("annotation" ,java-osgi-annotation)))
c353d014 7624 (home-page "https://www.osgi.org")
0f0c5218
JL
7625 (synopsis "OSGI Util Function")
7626 (description
7627 "OSGi, for Open Services Gateway initiative framework, is a module system
7628and service platform for the Java programming language. This package contains
7629an interface for a function that accepts a single argument and produces a result.")
7630 (license license:asl2.0)))
27103135
JL
7631
7632(define-public java-osgi-util-promise
7633 (package
7634 (name "java-osgi-util-promise")
7635 (version "1.0.0")
7636 (source (origin
7637 (method url-fetch)
c962e6c4 7638 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
27103135
JL
7639 "org.osgi.util.promise/"
7640 version "/org.osgi.util.promise-"
7641 version "-sources.jar"))
7642 (sha256
7643 (base32
7644 "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c"))))
7645 (build-system ant-build-system)
7646 (arguments
7647 `(#:jar-name "osgi-util-promise.jar"
7648 #:tests? #f)); no tests
7649 (inputs
7650 `(("annotation" ,java-osgi-annotation)
7651 ("function" ,java-osgi-util-function)))
c353d014 7652 (home-page "https://www.osgi.org")
27103135
JL
7653 (synopsis "Promise of a value")
7654 (description
7655 "OSGi, for Open Services Gateway initiative framework, is a module system
7656and service platform for the Java programming language. This package contains
7657an interface and utilitary classes for promises. A Promise represents a future
7658value. It handles the interactions for asynchronous processing.")
7659 (license license:asl2.0)))
2b1fdb2b
JL
7660
7661(define-public java-osgi-service-metatype-annotations
7662 (package
7663 (name "java-osgi-service-metatype-annotations")
7664 (version "1.3.0")
7665 (source (origin
7666 (method url-fetch)
98b1985f 7667 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
2b1fdb2b
JL
7668 "org.osgi.service.metatype.annotations/"
7669 version "/org.osgi.service.metatype.annotations-"
7670 version "-sources.jar"))
7671 (sha256
7672 (base32
7673 "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6"))))
7674 (build-system ant-build-system)
7675 (arguments
7676 `(#:jar-name "osgi-service-metatype-annotations.jar"
7677 #:tests? #f)); no tests
7678 (inputs
7679 `(("annotation" ,java-osgi-annotation)))
c353d014 7680 (home-page "https://www.osgi.org")
2b1fdb2b
JL
7681 (synopsis "Support annotations for metatype")
7682 (description
7683 "OSGi, for Open Services Gateway initiative framework, is a module system
7684and service platform for the Java programming language. This package contains
7685the support annotations for metatype.")
7686 (license license:asl2.0)))
a13acfbe
JL
7687
7688(define-public java-osgi-service-repository
7689 (package
7690 (name "java-osgi-service-repository")
7691 (version "1.1.0")
7692 (source (origin
7693 (method url-fetch)
7a5c5017 7694 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
a13acfbe
JL
7695 "org.osgi.service.repository/"
7696 version "/org.osgi.service.repository-"
7697 version "-sources.jar"))
7698 (sha256
7699 (base32
7700 "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n"))))
7701 (build-system ant-build-system)
7702 (arguments
7703 `(#:jar-name "osgi-service-repository.jar"
7704 #:tests? #f)); no tests
7705 (inputs
7706 `(("annotation" ,java-osgi-annotation)
7707 ("promise" ,java-osgi-util-promise)
7708 ("resource" ,java-osgi-resource)))
c353d014 7709 (home-page "https://www.osgi.org")
a13acfbe
JL
7710 (synopsis "OSGI service repository")
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
7714a repository service that contains resources.")
7715 (license license:asl2.0)))
dfd91541
JL
7716
7717(define-public java-osgi-framework
7718 (package
7719 (name "java-osgi-framework")
7720 (version "1.8.0")
7721 (source (origin
7722 (method url-fetch)
05662561 7723 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
dfd91541
JL
7724 "org.osgi.framework/" version "/org.osgi.framework-"
7725 version "-sources.jar"))
7726 (sha256
7727 (base32
7728 "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s"))))
7729 (build-system ant-build-system)
7730 (arguments
7731 `(#:jar-name "osgi-framework.jar"
7732 #:tests? #f)); no tests
7733 (inputs
7734 `(("annotation" ,java-osgi-annotation)
7735 ("resource" ,java-osgi-resource)
7736 ("dto" ,java-osgi-dto)))
c353d014 7737 (home-page "https://www.osgi.org")
dfd91541
JL
7738 (synopsis "OSGi framework")
7739 (description
7740 "OSGi, for Open Services Gateway initiative framework, is a module system
7741and service platform for the Java programming language.")
7742 (license license:asl2.0)))
98c9f16c
JL
7743
7744(define-public java-osgi-service-log
7745 (package
7746 (name "java-osgi-service-log")
7747 (version "1.3.0")
7748 (source (origin
7749 (method url-fetch)
9b0bf25c 7750 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
98c9f16c
JL
7751 "org.osgi.service.log/"
7752 version "/org.osgi.service.log-"
7753 version "-sources.jar"))
7754 (sha256
7755 (base32
7756 "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0"))))
7757 (build-system ant-build-system)
7758 (arguments
7759 `(#:jar-name "osgi-service-log.jar"
7760 #:tests? #f)); no tests
7761 (inputs
7762 `(("java-osgi-framework" ,java-osgi-framework)))
c353d014 7763 (home-page "https://www.osgi.org")
98c9f16c
JL
7764 (synopsis "Provides methods for bundles to write messages to the log")
7765 (description
7766 "OSGi, for Open Services Gateway initiative framework, is a module system
7767and service platform for the Java programming language. This package contains
7768the log service.")
7769 (license license:asl2.0)))
dd76d44b
JL
7770
7771(define-public java-osgi-service-jdbc
7772 (package
7773 (name "java-osgi-service-jdbc")
7774 (version "1.0.0")
7775 (source (origin
7776 (method url-fetch)
4a6a7b2d 7777 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
dd76d44b
JL
7778 "org.osgi.service.jdbc/"
7779 version "/org.osgi.service.jdbc-"
7780 version "-sources.jar"))
7781 (sha256
7782 (base32
7783 "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz"))))
7784 (build-system ant-build-system)
7785 (arguments
7786 `(#:jar-name "osgi-service-jdbc.jar"
7787 #:tests? #f)); no tests
c353d014 7788 (home-page "https://www.osgi.org")
dd76d44b
JL
7789 (synopsis "Factory for JDBC connection factories")
7790 (description
7791 "OSGi, for Open Services Gateway initiative framework, is a module system
7792and service platform for the Java programming language. This package contains
7793a factory for JDBC connection factories. There are 3 preferred connection
7794factories for getting JDBC connections:
7795
7796@itemize
7797@item @code{javax.sql.DataSource};
7798@item @code{javax.sql.ConnectionPoolDataSource};
7799@item @code{javax.sql.XADataSource}.
7800@end itemize")
7801 (license license:asl2.0)))
291d3f22
JL
7802
7803(define-public java-osgi-service-resolver
7804 (package
7805 (name "java-osgi-service-resolver")
7806 (version "1.0.1")
7807 (source (origin
7808 (method url-fetch)
b787534b 7809 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
291d3f22
JL
7810 "org.osgi.service.resolver/"
7811 version "/org.osgi.service.resolver-"
7812 version "-sources.jar"))
7813 (sha256
7814 (base32
7815 "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd"))))
7816 (build-system ant-build-system)
7817 (arguments
7818 `(#:jar-name "osgi-service-resolver.jar"
7819 #:tests? #f)); no tests
7820 (inputs
7821 `(("annotation" ,java-osgi-annotation)
7822 ("resource" ,java-osgi-resource)))
c353d014 7823 (home-page "https://www.osgi.org")
291d3f22
JL
7824 (synopsis "OSGI Resolver service")
7825 (description
7826 "OSGi, for Open Services Gateway initiative framework, is a module system
7827and service platform for the Java programming language. This package contains
7828a resolver service that resolves the specified resources in the context supplied
7829by the caller.")
7830 (license license:asl2.0)))
1884bb81
JL
7831
7832(define-public java-osgi-util-tracker
7833 (package
7834 (name "java-osgi-util-tracker")
7835 (version "1.5.1")
7836 (source (origin
7837 (method url-fetch)
e0695da9 7838 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
1884bb81
JL
7839 "org.osgi.util.tracker/"
7840 version "/org.osgi.util.tracker-"
7841 version "-sources.jar"))
7842 (sha256
7843 (base32
7844 "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz"))))
7845 (build-system ant-build-system)
7846 (arguments
7847 `(#:jar-name "osgi-util-tracker.jar"
7848 #:tests? #f)); no tests
7849 (inputs
7850 `(("framework" ,java-osgi-framework)
7851 ("annotation" ,java-osgi-annotation)))
c353d014 7852 (home-page "https://www.osgi.org")
1884bb81
JL
7853 (synopsis "Bundle tracking")
7854 (description
7855 "OSGi, for Open Services Gateway initiative framework, is a module system
7856and service platform for the Java programming language. This package contains
7857bundle tracking utility classes.")
7858 (license license:asl2.0)))
fb9c48b8
JL
7859
7860(define-public java-osgi-service-cm
7861 (package
7862 (name "java-osgi-service-cm")
7863 (version "1.5.0")
7864 (source (origin
7865 (method url-fetch)
f8f2fefb 7866 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
fb9c48b8
JL
7867 "org.osgi.service.cm/"
7868 version "/org.osgi.service.cm-"
7869 version "-sources.jar"))
7870 (sha256
7871 (base32
7872 "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6"))))
7873 (build-system ant-build-system)
7874 (arguments
7875 `(#:jar-name "osgi-service-cm.jar"
7876 #:tests? #f)); no tests
7877 (inputs
7878 `(("framework" ,java-osgi-framework)
7879 ("annotation" ,java-osgi-annotation)))
c353d014 7880 (home-page "https://www.osgi.org")
fb9c48b8
JL
7881 (synopsis "OSGI Configuration Management")
7882 (description
7883 "OSGi, for Open Services Gateway initiative framework, is a module system
7884and service platform for the Java programming language. This package contains
7885utility classes for the configuration of services.")
7886 (license license:asl2.0)))
500aac75
JL
7887
7888(define-public java-osgi-service-packageadmin
7889 (package
7890 (name "java-osgi-service-packageadmin")
7891 (version "1.2.0")
7892 (source (origin
7893 (method url-fetch)
839e3e89 7894 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
500aac75
JL
7895 "org.osgi.service.packageadmin/"
7896 version "/org.osgi.service.packageadmin-"
7897 version "-sources.jar"))
7898 (sha256
7899 (base32
7900 "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52"))))
7901 (build-system ant-build-system)
7902 (arguments
7903 `(#:jar-name "osgi-service-packageadmin.jar"
7904 #:tests? #f)); no tests
7905 (inputs
7906 `(("framework" ,java-osgi-framework)))
c353d014 7907 (home-page "https://www.osgi.org")
500aac75
JL
7908 (synopsis "OSGI Package Administration")
7909 (description
7910 "OSGi, for Open Services Gateway initiative framework, is a module system
7911and service platform for the Java programming language. This package contains
7912the packageadmin service.")
7913 (license license:asl2.0)))
77a4f1ae
JL
7914
7915(define-public java-ops4j-base-lang
7916 (package
7917 (name "java-ops4j-base-lang")
7918 (version "1.5.0")
7919 (source (origin
7920 (method url-fetch)
7921 (uri (string-append "https://github.com/ops4j/org.ops4j.base/"
7922 "archive/base-" version ".tar.gz"))
7923 (sha256
7924 (base32
7925 "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw"))))
7926 (build-system ant-build-system)
7927 (arguments
7928 `(#:jar-name "java-ops4j-base-lang.jar"
7929 #:source-dir "ops4j-base-lang/src/main/java"
7930 #:tests? #f; no tests
7931 #:phases
7932 (modify-phases %standard-phases
7933 (add-before 'build 'add-test-file
7934 (lambda _
7935 ;; That file is required by a test in ops4j-pax-exam-core-spi
7936 (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang")
7937 (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties"
7938 (lambda _
7939 (display
7940 (string-append
7941 "version=" ,version "\n"
7942 "groupId=org.ops4j.base"
2c8ac364
MW
7943 "artifactId=ops4j-base-lang\n"))))
7944 #t)))))
77a4f1ae
JL
7945 (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview")
7946 (synopsis "Utility classes and extensions to be used in OPS4J projects")
7947 (description "OPS4J stands for Open Participation Software for Java. This
7948package contains utilities and extensions related to @code{java.lang}.")
7949 (license license:asl2.0)))
b2353495
JL
7950
7951(define-public java-ops4j-base-monitors
7952 (package
7953 (inherit java-ops4j-base-lang)
7954 (name "java-ops4j-base-monitors")
7955 (arguments
7956 `(#:jar-name "java-ops4j-base-monitors.jar"
7957 #:source-dir "ops4j-base-monitors/src/main/java"
7958 #:tests? #f)); no tests
7959 (inputs
7960 `(("lang" ,java-ops4j-base-lang)))
7961 (description "OPS4J stands for Open Participation Software for Java. This
7962package contains utilities and extensions related to monitoring.")))
322d349a
JL
7963
7964(define-public java-ops4j-base-io
7965 (package
7966 (inherit java-ops4j-base-lang)
7967 (name "java-ops4j-base-io")
7968 (arguments
7969 `(#:jar-name "java-ops4j-base-io.jar"
7970 #:source-dir "ops4j-base-io/src/main/java"
7971 #:test-dir "ops4j-base-io/src/test"
7972 #:test-exclude
7973 (list "**/ListerTest.java")))
7974 (inputs
7975 `(("lang" ,java-ops4j-base-monitors)
7976 ("lang" ,java-ops4j-base-lang)))
7977 (native-inputs
7978 `(("junit" ,java-junit)
7979 ("hamcrest" ,java-hamcrest-core)))
7980 (description "OPS4J stands for Open Participation Software for Java. This
7981package contains utilities and extensions related to handling streams and files.")))
559919c1
JL
7982
7983(define-public java-ops4j-base-util
7984 (package
7985 (inherit java-ops4j-base-lang)
7986 (name "java-ops4j-base-util")
7987 (arguments
7988 `(#:jar-name "java-ops4j-base-util.jar"
7989 #:source-dir "ops4j-base-util/src/main/java"
7990 #:test-dir "ops4j-base-util/src/test"))
7991 (inputs
7992 `(("lang" ,java-ops4j-base-lang)))
7993 (native-inputs
7994 `(("junit" ,java-junit)))
7995 (description "OPS4J stands for Open Participation Software for Java. This
7996package contains utilities and extensions related to environment, i18n and
7997mime types.")))
60dcec7a
JL
7998
7999(define-public java-ops4j-base-util-property
8000 (package
8001 (inherit java-ops4j-base-lang)
8002 (name "java-ops4j-base-util-property")
8003 (arguments
8004 `(#:jar-name "java-ops4j-base-util-property.jar"
8005 #:source-dir "ops4j-base-util-property/src/main/java"
8006 #:tests? #f)); no tests
8007 (inputs
8008 `(("lang" ,java-ops4j-base-lang)
8009 ("util" ,java-ops4j-base-util)))
8010 (description "OPS4J stands for Open Participation Software for Java. This
8011package contains utilities and extensions related to resolving properties from
8012different sources.")))
0edf8cf0
JL
8013
8014(define-public java-ops4j-base-store
8015 (package
8016 (inherit java-ops4j-base-lang)
8017 (name "java-ops4j-base-store")
8018 (arguments
8019 `(#:jar-name "java-ops4j-base-store.jar"
8020 #:source-dir "ops4j-base-store/src/main/java"
8021 #:tests? #f)); no tests
8022 (inputs
8023 `(("lang" ,java-ops4j-base-lang)
8024 ("slf4j" ,java-slf4j-api)
8025 ("io" ,java-ops4j-base-io)))
8026 (description "OPS4J stands for Open Participation Software for Java. This
8027package contains utilities for storing and retrieving data from an
8028@code{InputStream}.")))
214fcd8a
JL
8029
8030(define-public java-ops4j-base-spi
8031 (package
8032 (inherit java-ops4j-base-lang)
8033 (name "java-ops4j-base-spi")
8034 (arguments
8035 `(#:jar-name "java-ops4j-base-spi.jar"
8036 #:source-dir "ops4j-base-spi/src/main/java"
8037 #:test-dir "ops4j-base-spi/src/test"))
8038 (native-inputs
8039 `(("junit" ,java-junit)
8040 ("hamcrest" ,java-hamcrest-core)))
8041 (description "OPS4J stands for Open Participation Software for Java. This
8042package contains utilities for obtaining services via the Java SE 6
8043@code{ServiceLoader}.")))
e1edf42e
JL
8044
8045(define-public java-aqute-bnd-annotation
8046 (package
8047 (name "java-aqute-bnd-annotation")
2cac8891 8048 (version "3.5.0")
e1edf42e
JL
8049 (source (origin
8050 (method url-fetch)
8051 (uri (string-append "https://github.com/bndtools/bnd/archive/"
8052 version ".REL.tar.gz"))
8053 (file-name (string-append name "-" version ".tar.gz"))
8054 (sha256
8055 (base32
2cac8891 8056 "1ggyiq0as0f6cz333a0dh98j72kmvv5pf2s47v9554yh905lfqdl"))))
e1edf42e
JL
8057 (build-system ant-build-system)
8058 (arguments
8059 `(#:jar-name "java-aqute-bnd-annotation.jar"
8060 #:source-dir "biz.aQute.bnd.annotation/src"
8061 #:tests? #f)); empty test dir
27c0eade 8062 (home-page "https://bnd.bndtools.org/")
e1edf42e
JL
8063 (synopsis "Tools for OSGi")
8064 (description "Bnd is a swiss army knife for OSGi, it creates manifest
8065headers based on analyzing the class code, it verifies the project settings,
8066it manages project dependencies, gives diffs jars, and much more.")
8067 (license license:asl2.0)))
60ba2978
JL
8068
8069(define-public java-aqute-libg
8070 (package
8071 (inherit java-aqute-bnd-annotation)
8072 (name "java-aqute-libg")
8073 (arguments
8074 `(#:jar-name "java-aqute-libg.jar"
78754995
GB
8075 ;; The build fails when source/target more recent than 1.7. This
8076 ;; is a known issue. See: https://github.com/bndtools/bnd/issues/1327
8077 ;;
8078 ;; It is closed as won't fix. There is no way to change the source
8079 ;; so that it works on 1.8, and still works on 1.6, the upstream
8080 ;; target. It work fine on 1.7, so we use 1.7.
8081 #:make-flags (list "-Dant.build.javac.source=1.7"
8082 "-Dant.build.javac.target=1.7")
2ab089b7
GB
8083 #:phases
8084 (modify-phases %standard-phases
8085 (add-before 'configure 'chdir
8086 ;; Change to aQute.libg directory, so that the relative
8087 ;; paths in the tests aren't broken.
8088 (lambda _
8089 (chdir "aQute.libg")
8090 #t))
8091 (add-before 'check 'create-test-directory
8092 ;; Copy the test directory to test/java, since that's where
8093 ;; ant-build-system's default project in build.xml expects to find
8094 ;; the test classes. Leave a copy in the original place to not
8095 ;; break paths in tests.
8096 (lambda _
8097 (mkdir "src/test")
8098 (copy-recursively "test" "src/test/java")
8099 #t)))))
60ba2978
JL
8100 (inputs
8101 `(("slf4j" ,java-slf4j-api)
8102 ("osgi-annot" ,java-osgi-annotation)
8103 ("java-osgi-cmpn" ,java-osgi-cmpn)
2ab089b7
GB
8104 ("osgi" ,java-osgi-core)))
8105 (native-inputs
8106 `(("hamcrest" ,java-hamcrest-core)
8107 ("java-junit" ,java-junit)))))
5f26a131 8108
288a5959
GB
8109(define java-aqute-libg-bootstrap
8110 (package
8111 (inherit java-aqute-libg)
8112 (name "java-aqute-libg-bootstrap")
aca7dcdd
GB
8113 (arguments
8114 ;; Disable tests, at this stage of bootstrap we have no test frameworks.
3785ccd2
GB
8115 (substitute-keyword-arguments (package-arguments java-aqute-libg)
8116 ((#:tests? _ #f) #f)))
288a5959
GB
8117 (inputs
8118 `(("slf4j-bootstrap" ,java-slf4j-api-bootstrap)
8119 ,@(delete `("slf4j" ,java-slf4j-api)
aca7dcdd
GB
8120 (package-inputs java-aqute-libg))))
8121 (native-inputs '())))
288a5959 8122
5f26a131
JL
8123(define-public java-aqute-bndlib
8124 (package
8125 (inherit java-aqute-bnd-annotation)
8126 (name "java-aqute-bndlib")
8127 (arguments
8128 `(#:jar-name "java-bndlib.jar"
8129 #:source-dir "biz.aQute.bndlib/src"
8130 #:tests? #f)); no tests
8131 (inputs
8132 `(("slf4j" ,java-slf4j-api)
8133 ("osgi-annot" ,java-osgi-annotation)
8134 ("java-aqute-libg" ,java-aqute-libg)
8135 ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation)
8136 ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations)
8137 ("java-osgi-service-repository" ,java-osgi-service-repository)
8138 ("java-osgi-service-log" ,java-osgi-service-log)
8139 ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations)
8140 ("java-osgi-namespace-contract" ,java-osgi-namespace-contract)
8141 ("java-osgi-namespace-extender" ,java-osgi-namespace-extender)
8142 ("java-osgi-namespace-service" ,java-osgi-namespace-service)
8143 ("promise" ,java-osgi-util-promise)
8144 ("osgi" ,java-osgi-core)))))
25aef81d 8145
869803aa
GB
8146(define java-aqute-bndlib-bootstrap
8147 (package
8148 (inherit java-aqute-bndlib)
8149 (name "java-aqute-bndlib-bootstrap")
8150 (inputs
8151 `(("slf4j-bootstrap" ,java-slf4j-api-bootstrap)
8152 ("java-aqute-libg-bootstrap" ,java-aqute-libg-bootstrap)
8153 ,@(delete `("slf4j" ,java-slf4j-api)
8154 (delete `("java-aqute-libg" ,java-aqute-libg)
8155 (package-inputs java-aqute-bndlib)))))))
8156
25aef81d
JL
8157(define-public java-ops4j-pax-tinybundles
8158 (package
8159 (name "java-ops4j-pax-tinybundles")
8160 (version "2.1.1")
8161 (source (origin
8162 (method url-fetch)
8163 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/"
8164 "archive/tinybundles-" version ".tar.gz"))
8165 (sha256
8166 (base32
8167 "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871"))))
8168 (arguments
8169 `(#:jar-name "java-ops4j-pax-tinybundles.jar"
8170 #:source-dir "src/main/java"
8171 #:test-exclude
8172 ;; Abstract base classes for other tests
8173 (list "**/BndTest.java" "**/CoreTest.java")
8174 #:phases
8175 (modify-phases %standard-phases
8176 (add-before 'check 'fix-version
8177 (lambda _
8178 ;; This test has a reference to an old version of bndlib we are not
8179 ;; packaging. It uses the version referenced in pom.xml. We replace
8180 ;; it with our own version.
8181 (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
0f277802 8182 (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*")
2c8ac364
MW
8183 ,(package-version java-aqute-bndlib)))
8184 #t)))))
25aef81d
JL
8185 (inputs
8186 `(("lang" ,java-ops4j-base-lang)
8187 ("io" ,java-ops4j-base-io)
8188 ("store" ,java-ops4j-base-store)
8189 ("slf4j" ,java-slf4j-api)
8190 ("libg" ,java-aqute-libg)
8191 ("bndlib" ,java-aqute-bndlib)))
8192 (native-inputs
8193 `(("junit" ,java-junit)
8194 ("hamcrest" ,java-hamcrest-core)
8195 ("log4j" ,java-log4j-api)
8196 ("bndannotation" ,java-aqute-bnd-annotation)
8197 ("framework" ,java-osgi-framework)))
8198 (build-system ant-build-system)
8199 (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles")
8200 (synopsis "Java APIs to create OSGi related artifacts")
8201 (description "Tinybundles is all about creating OSGi related artifacts like
6fa0914a 8202Bundles, Fragments and Deployment Packages with Java Api. It is very convenient
25aef81d
JL
8203to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the
8204other hand, this library can be a foundation of real end user tools that need
8205to create those artifacts.")
8206 (license license:asl2.0)))
e179add0
JL
8207
8208(define-public java-ops4j-pax-exam-core
8209 (package
8210 (name "java-ops4j-pax-exam-core")
8211 (version "4.11.0")
8212 (source (origin
8213 (method url-fetch)
8214 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/"
8215 "archive/exam-reactor-" version ".tar.gz"))
8216 (sha256
8217 (base32
8218 "08mzw8nkah3rj3vznlplnawspxhp61zgvb44ifqa1rni1cvbms2g"))))
8219 (arguments
8220 `(#:jar-name "java-ops4j-pax-exam-core.jar"
8221 #:source-dir "core/pax-exam/src/main/java"
8222 #:test-dir "core/pax-exam/src/test"))
8223 (inputs
8224 `(("slf4j" ,java-slf4j-api)
8225 ("lang" ,java-ops4j-base-lang)
8226 ("io" ,java-ops4j-base-io)
8227 ("util-property" ,java-ops4j-base-util-property)
8228 ("util-store" ,java-ops4j-base-store)
8229 ("java-osgi-core" ,java-osgi-core)))
8230 (native-inputs
8231 `(("junit" ,java-junit)
8232 ("hamcrest" ,java-hamcrest-core)))
8233 (build-system ant-build-system)
8234 (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview")
8235 (synopsis "In-Container Testing for OSGi, Java EE and CDI")
8236 (description "Pax Exam creates OSGi bundles for testing purposes. It lets
8237the user take control of the OSGi framework, the test framework (e.g. JUnit) and
8238the system under test at the same time.")
8239 (license license:asl2.0)))
7a7c2b75
JL
8240
8241(define-public java-ops4j-pax-exam-core-spi
8242 (package
8243 (inherit java-ops4j-pax-exam-core)
8244 (name "java-ops4j-pax-exam-core-spi")
8245 (arguments
8246 `(#:jar-name "java-ops4j-pax-exam-spi.jar"
8247 #:source-dir "src/main/java"
8248 #:test-exclude
8249 (list
8250 ;; Abstract base class, not a test
8251 "**/BaseStagedReactorTest.java"
8252 ;; Depends on org.mortbay.jetty.testwars:test-war-dump
8253 "**/WarBuilderTest.java")
8254 #:phases
8255 (modify-phases %standard-phases
8256 (add-before 'configure 'chdir
8257 (lambda _
8258 ;; Tests assume we are in this directory
2c8ac364
MW
8259 (chdir "core/pax-exam-spi")
8260 #t))
7a7c2b75
JL
8261 (add-before 'check 'fix-tests
8262 (lambda _
8263 ;; One test checks that this file is present.
8264 (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi")
8265 (with-output-to-file
8266 "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties"
8267 (lambda _
8268 (display
8269 (string-append "artifactId = pax-exam-spi\n"
8270 "version = " ,(package-version java-ops4j-pax-exam-core-spi)))))
8271 ;; Maven puts compilation results in the target directory, while we
8272 ;; put them in the build directory.
8273 (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java"
8274 "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java"
8275 "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java")
8276 (("target") "build"))
8277 ;; One test is expected to fail, but it doesn't throw the expected exception
8278 (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java"
2c8ac364
MW
8279 (("AssertionError") "IllegalArgumentException"))
8280 #t)))))
7a7c2b75
JL
8281 (inputs
8282 `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core)
8283 ("lang" ,java-ops4j-base-lang)
8284 ("monitors" ,java-ops4j-base-monitors)
8285 ("store" ,java-ops4j-base-store)
8286 ("io" ,java-ops4j-base-io)
8287 ("spi" ,java-ops4j-base-spi)
8288 ("osgi" ,java-osgi-core)
8289 ("slf4j" ,java-slf4j-api)
8290 ("tinybundles" ,java-ops4j-pax-tinybundles)))
8291 (native-inputs
8292 `(("mockito" ,java-mockito-1)
8293 ("junit" ,java-junit)
8294 ("hamcrest" ,java-hamcrest-core)
8295 ("cglib" ,java-cglib)
8296 ("objenesis" ,java-objenesis)
8297 ("asm" ,java-asm)))))
4496d77f
JL
8298
8299(define-public java-ops4j-pax-exam-core-junit
8300 (package
8301 (inherit java-ops4j-pax-exam-core)
8302 (name "java-ops4j-pax-exam-core-junit")
8303 (arguments
8304 `(#:jar-name "ops4j-pax-exam-core-junit.jar"
8305 #:source-dir "drivers/pax-exam-junit4/src/main/java"
8306 #:tests? #f)); no tests
8307 (inputs
8308 `(("junit" ,java-junit)
8309 ("slf4j" ,java-slf4j-api)
8310 ("core" ,java-ops4j-pax-exam-core)
8311 ("spi" ,java-ops4j-pax-exam-core-spi)))
8312 (native-inputs '())))
cb05f60d
JL
8313
8314(define-public java-fasterxml-jackson-annotations
8315 (package
8316 (name "java-fasterxml-jackson-annotations")
93dceea4 8317 (version "2.9.4")
cb05f60d
JL
8318 (source (origin
8319 (method url-fetch)
8320 (uri (string-append "https://github.com/FasterXML/"
8321 "jackson-annotations/archive/"
8322 "jackson-annotations-" version ".tar.gz"))
8323 (sha256
8324 (base32
93dceea4 8325 "0mr95xd0da6a4g95zvrl1ryk5n5zv2rc696w3xnsr5hxk2gicfc4"))))
cb05f60d
JL
8326 (build-system ant-build-system)
8327 (arguments
8328 `(#:jar-name "jackson-annotations.jar"
8329 #:source-dir "src/main/java"
8330 #:test-dir "src/test"))
8331 (native-inputs
8332 `(("junit" ,java-junit)))
8333 (home-page "https://github.com/FasterXML/jackson-annotations")
8334 (synopsis "General purpose annotations for the Jackson Data Processor")
8335 (description "This package contains general purpose annotations for the
8336Jackson Data Processor, used on value and handler types. The only annotations
8337not included are ones that require dependency to the Databind package.")
8338 (license license:asl2.0)))
0b5481df
JL
8339
8340(define-public java-fasterxml-jackson-core
8341 (package
8342 (name "java-fasterxml-jackson-core")
38a0fc38 8343 (version "2.9.4")
0b5481df
JL
8344 (source (origin
8345 (method url-fetch)
8346 (uri (string-append "https://github.com/FasterXML/"
8347 "jackson-core/archive/"
8348 "jackson-core-" version ".tar.gz"))
8349 (sha256
8350 (base32
38a0fc38 8351 "159hsnk17jr1gyzkf01cxvsn45srnk37g949r7364qlsr527gjgd"))))
0b5481df
JL
8352 (build-system ant-build-system)
8353 (arguments
8354 `(#:jar-name "jackson-core.jar"
8355 #:source-dir "src/main/java"
8356 #:test-dir "src/test"
8357 #:test-exclude
8358 (list
8359 ;; Expected failure. pom.xml excludes these
8360 "**/failing/**"
8361 ;; Base classes that have no constructor for junit
8362 "**/BaseTest.java"
8363 "**/ConcurrencyReadTest.java"
8364 "**/ManualCharAccessTest.java"
8365 "**/ManualCharAccessTest.java"
8366 "**/TrailingCommasTest.java"
8367 "**/AsyncMissingValuesInObjectTest.java"
8368 "**/AsyncMissingValuesInArrayTest.java")
8369 #:phases
8370 (modify-phases %standard-phases
8371 (add-before 'configure 'generate-PackageVersion.java
8372 (lambda _
8373 (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java")
8374 (in (string-append out ".in")))
8375 (copy-file in out)
8376 (substitute* out
8377 (("@package@") "com.fasterxml.jackson.core.json")
8378 (("@projectversion@") ,version)
8379 (("@projectgroupid@") "com.fasterxml.jackson.core")
2c8ac364
MW
8380 (("@projectartifactid@") "jackson-core")))
8381 #t))
0b5481df
JL
8382 (add-before 'build 'copy-resources
8383 (lambda _
8384 (copy-recursively "src/main/resources"
2c8ac364
MW
8385 "build/classes")
8386 #t))
0b5481df
JL
8387 (add-before 'check 'copy-test-resources
8388 (lambda _
8389 (copy-recursively "src/test/resources"
2c8ac364
MW
8390 "build/test-classes")
8391 #t)))))
0b5481df
JL
8392 (native-inputs
8393 `(("junit" ,java-junit)
8394 ("hamcrest" ,java-hamcrest-core)))
8395 (home-page "https://github.com/FasterXML/jackson-core")
8396 (synopsis "")
8397 (description "")
8398 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
f234c7a0
JL
8399
8400(define-public java-fasterxml-jackson-databind
8401 (package
8402 (name "java-fasterxml-jackson-databind")
3c1edff5 8403 (version "2.9.4")
f234c7a0
JL
8404 (source (origin
8405 (method url-fetch)
8406 (uri (string-append "https://github.com/FasterXML/"
8407 "jackson-databind/archive/"
8408 "jackson-databind-" version ".tar.gz"))
8409 (sha256
8410 (base32
3c1edff5 8411 "1zd2cw4z6kdkbx8za96xh9pyicv2a2l7y0rkcx2fqd8hv6d47s08"))))
f234c7a0
JL
8412 (build-system ant-build-system)
8413 (arguments
8414 `(#:jar-name "jackson-databind.jar"
8415 #:source-dir "src/main/java"
8416 #:tests? #f; requires javax.measures for which I can't find a free implementation
8417 #:phases
8418 (modify-phases %standard-phases
8419 (add-before 'configure 'generate-PackageVersion.java
8420 (lambda _
8421 (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java")
8422 (in (string-append out ".in")))
8423 (copy-file in out)
8424 (substitute* out
8425 (("@package@") "com.fasterxml.jackson.databind.cfg")
8426 (("@projectversion@") ,version)
8427 (("@projectgroupid@") "com.fasterxml.jackson.databind")
2c8ac364
MW
8428 (("@projectartifactid@") "jackson-databind")))
8429 #t))
f234c7a0
JL
8430 (add-before 'build 'copy-resources
8431 (lambda _
2c8ac364
MW
8432 (copy-recursively "src/main/resources" "build/classes")
8433 #t)))))
f234c7a0
JL
8434 (inputs
8435 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
8436 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)))
8437 (home-page "https://github.com/FasterXML/jackson-databind")
8438 (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor")
8439 (description "This package contains the general-purpose data-binding
8440functionality and tree-model for Jackson Data Processor. It builds on core
8441streaming parser/generator package, and uses Jackson Annotations for
8442configuration.")
8443 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
d57d8b89
JL
8444
8445(define-public java-fasterxml-jackson-modules-base-jaxb
8446 (package
8447 (name "java-fasterxml-jackson-modules-base-jaxb")
07207211 8448 (version "2.9.4")
d57d8b89
JL
8449 (source (origin
8450 (method url-fetch)
8451 (uri (string-append "https://github.com/FasterXML/"
8452 "jackson-modules-base/archive/"
8453 "jackson-modules-base-" version ".tar.gz"))
8454 (sha256
8455 (base32
07207211 8456 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
d57d8b89
JL
8457 (build-system ant-build-system)
8458 (arguments
8459 `(#:jar-name "jackson-modules-base-jaxb.jar"
8460 #:source-dir "jaxb/src/main/java"
8461 #:test-dir "jaxb/src/test"
8462 #:test-exclude
8463 ;; Base class for tests
8464 (list "**/BaseJaxbTest.java")
8465 #:phases
8466 (modify-phases %standard-phases
8467 (add-before 'configure 'generate-PackageVersion.java
8468 (lambda _
8469 (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/"
8470 "jackson/module/jaxb/PackageVersion.java"))
8471 (in (string-append out ".in")))
8472 (copy-file in out)
8473 (substitute* out
8474 (("@package@") "com.fasterxml.jackson.module.jaxb")
8475 (("@projectversion@") ,version)
8476 (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb")
2c8ac364
MW
8477 (("@projectartifactid@") "jackson-module-jaxb")))
8478 #t))
d57d8b89
JL
8479 (add-before 'build 'copy-resources
8480 (lambda _
2c8ac364
MW
8481 (copy-recursively "jaxb/src/main/resources" "build/classes")
8482 #t)))))
d57d8b89
JL
8483 (inputs
8484 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
8485 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
8486 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
8487 (native-inputs
8488 `(("java-junit" ,java-junit)))
8489 (home-page "https://github.com/FasterXML/jackson-modules-base")
8490 (synopsis "Jaxb annotations jackson module")
8491 (description "This package is the jaxb annotations module for jackson.")
8492 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
0f296d37 8493
5165fb40
DM
8494(define-public java-fasterxml-jackson-modules-base-mrbean
8495 (package
8496 (name "java-fasterxml-jackson-modules-base-mrbean")
8497 (version "2.9.4")
8498 (source (origin
8499 (method url-fetch)
8500 (uri (string-append "https://github.com/FasterXML/"
8501 "jackson-modules-base/archive/"
8502 "jackson-modules-base-" version ".tar.gz"))
8503 (sha256
8504 (base32
8505 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
8506 (build-system ant-build-system)
8507 (arguments
8508 `(#:jar-name "jackson-modules-base-mrbean.jar"
8509 #:source-dir "mrbean/src/main/java"
8510 #:test-dir "mrbean/src/test"
8511 #:test-exclude
8512 ;; Base class for tests
8513 (list "**/BaseTest.java")
8514 #:phases
8515 (modify-phases %standard-phases
8516 (add-before 'configure 'generate-PackageVersion.java
8517 (lambda _
8518 (let* ((out (string-append "mrbean/src/main/java/com/fasterxml/"
8519 "jackson/module/mrbean/PackageVersion.java"))
8520 (in (string-append out ".in")))
8521 (copy-file in out)
8522 (substitute* out
8523 (("@package@") "com.fasterxml.jackson.module.mrbean")
8524 (("@projectversion@") ,version)
8525 (("@projectgroupid@") "com.fasterxml.jackson.module.mrbean")
8526 (("@projectartifactid@") "jackson-module-mrbean")))
8527 #t)))))
8528 (inputs
8529 `(("java-asm" ,java-asm)
8530 ("java-fasterxml-jackson-annotations"
8531 ,java-fasterxml-jackson-annotations)
8532 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
8533 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
8534 (native-inputs
8535 `(("java-junit" ,java-junit)))
8536 (home-page "https://github.com/FasterXML/jackson-modules-base")
8537 (synopsis "POJO type materialization for Java")
8538 (description "This package implements POJO type materialization.
8539Databinders can construct implementation classes for Java interfaces as part
8540of deserialization.")
8541 (license license:asl2.0)))
8542
0f296d37
JL
8543(define-public java-snakeyaml
8544 (package
8545 (name "java-snakeyaml")
8546 (version "1.18")
8547 (source (origin
8548 (method url-fetch)
8549 (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
8550 version ".tar.gz"))
307856cd 8551 (file-name (string-append name "-" version ".tar.gz"))
0f296d37
JL
8552 (sha256
8553 (base32
b19f155c 8554 "0474cqcv46zgv9bhms2vgawakq1vyj0hp3h3f1bfys46msia90bh"))))
0f296d37
JL
8555 (build-system ant-build-system)
8556 (arguments
8557 `(#:jar-name "java-snakeyaml.jar"
8558 #:source-dir "src/main/java"
8559 ;; Tests require velocity, a cyclic dependency, and
8560 ;; java-spring-framework-context which is not packaged.
8561 #:tests? #f))
8562 (home-page "https://bitbucket.org/asomov/snakeyaml")
8563 (synopsis "YAML processor")
8564 (description "SnakeYAML is a YAML processor for the Java Virtual Machine.")
8565 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
087c8fd2
JL
8566
8567(define-public java-fasterxml-jackson-dataformat-yaml
8568 (package
8569 (name "java-fasterxml-jackson-dataformat-yaml")
1f2be88f 8570 (version "2.9.4")
087c8fd2
JL
8571 (source (origin
8572 (method url-fetch)
8573 (uri (string-append "https://github.com/FasterXML/"
8574 "jackson-dataformats-text/archive/"
8575 "jackson-dataformats-text-" version ".tar.gz"))
8576 (sha256
8577 (base32
1f2be88f 8578 "1hikl06khaxbg439avf442qifcadap8w0lx13f0nnhp2vh3dkbz7"))))
087c8fd2
JL
8579 (build-system ant-build-system)
8580 (arguments
8581 `(#:jar-name "jackson-dataformat-yaml.jar"
8582 #:source-dir "yaml/src/main/java"
8583 #:test-dir "yaml/src/test"
8584 #:test-exclude (list "**/failing/**.java")
8585 #:phases
8586 (modify-phases %standard-phases
8587 (add-before 'configure 'generate-PackageVersion.java
8588 (lambda _
8589 (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java")
8590 (in (string-append out ".in")))
8591 (copy-file in out)
8592 (substitute* out
8593 (("@package@") "com.fasterxml.jackson.dataformat.yaml")
8594 (("@projectversion@") ,version)
8595 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml")
2c8ac364
MW
8596 (("@projectartifactid@") "jackson-dataformat-yaml")))
8597 #t)))))
087c8fd2
JL
8598 (inputs
8599 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
8600 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
8601 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
8602 ("java-snakeyaml" ,java-snakeyaml)))
8603 (native-inputs
8604 `(("junit" ,java-junit)
8605 ("hamcrest" ,java-hamcrest-core)
8606 ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi)
8607 ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit)
8608 ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core)))
8609 (home-page "https://github.com/FasterXML/jackson-dataformats-text")
8610 (synopsis "Yaml backend for Jackson")
8611 (description "Dataformat backends are used to support format alternatives
8612to JSON, supported by default. This is done by sub-classing Jackson core
8613abstractions.")
8614 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
6fd07b98
JL
8615
8616(define-public java-stax2-api
8617 (package
8618 (name "java-stax2-api")
8619 (version "4.0.0")
8620 (source (origin
8621 (method url-fetch)
8622 (uri (string-append "https://github.com/FasterXML/stax2-api/archive/"
8623 "stax2-api-" version ".tar.gz"))
8624 (sha256
8625 (base32
8626 "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq"))))
8627 (build-system ant-build-system)
8628 (arguments
8629 `(#:jar-name "java-stax2-api.jar"
8630 #:source-dir "src/main/java"
8631 #:tests? #f)); no tests
8632 (home-page "https://github.com/FasterXML/stax2-api")
8633 (synopsis "Stax2 API")
8634 (description "Stax2 API is an extension to basic Stax 1.0 API that adds
8635significant new functionalities, such as full-featured bi-direction validation
8636interface and high-performance Typed Access API.")
8637 (license license:bsd-2)))
40f193f3
JL
8638
8639(define-public java-woodstox-core
8640 (package
8641 (name "java-woodstox-core")
8642 (version "5.0.3")
8643 (source (origin
8644 (method url-fetch)
8645 (uri (string-append "https://github.com/FasterXML/woodstox/archive/"
8646 "woodstox-core-" version ".tar.gz"))
8647 (sha256
8648 (base32
8649 "1i7pdgb8jbw6gdy5kmm0l6rz109n2ns92pqalpyp24vb8vlvdfd4"))))
8650 (build-system ant-build-system)
8651 (arguments
8652 `(#:jar-name "woodstox.jar"
8653 #:test-exclude
8654 (list "**/Base*.java" "failing/**")
8655 #:phases
8656 (modify-phases %standard-phases
8657 (add-before 'build 'remove-msv-dep
8658 (lambda _
8659 ;; we don't need osgi, and it depends on msv
8660 (delete-file-recursively "src/main/java/com/ctc/wstx/osgi")
8661 ;; msv's latest release is from 2011 and we don't need it
8662 (delete-file-recursively "src/main/java/com/ctc/wstx/msv")
8663 (delete-file-recursively "src/test/java/wstxtest/osgi")
2c8ac364
MW
8664 (delete-file-recursively "src/test/java/wstxtest/msv")
8665 #t))
40f193f3
JL
8666 (add-before 'build 'copy-resources
8667 (lambda _
2c8ac364
MW
8668 (copy-recursively "src/main/resources" "build/classes")
8669 #t)))))
40f193f3
JL
8670 (inputs
8671 `(("stax2" ,java-stax2-api)))
8672 (native-inputs
8673 `(("junit" ,java-junit)))
8674 (home-page "https://github.com/FasterXML/woodstox")
8675 (synopsis "Stax XML API implementation")
8676 (description "Woodstox is a stax XML API implementation.")
8677 (license license:asl2.0)))
262a4d33
JL
8678
8679(define-public java-fasterxml-jackson-dataformat-xml
8680 (package
8681 (name "java-fasterxml-jackson-dataformat-xml")
f3bbe029 8682 (version "2.9.4")
262a4d33
JL
8683 (source (origin
8684 (method url-fetch)
8685 (uri (string-append "https://github.com/FasterXML/"
8686 "jackson-dataformat-xml/archive/"
8687 "jackson-dataformat-xml-" version ".tar.gz"))
8688 (sha256
8689 (base32
f3bbe029 8690 "111fkkl90w31jbf30kgj82qdcxlw4sxppki7i198liw0ck1jcavq"))))
262a4d33
JL
8691 (build-system ant-build-system)
8692 (arguments
8693 `(#:jar-name "jackson-dataformat-xml.jar"
8694 #:source-dir "src/main/java"
8695 #:test-exclude
8696 (list "**/failing/**")
8697 #:phases
8698 (modify-phases %standard-phases
8699 (add-before 'configure 'generate-PackageVersion.java
8700 (lambda _
8701 (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java")
8702 (in (string-append out ".in")))
8703 (copy-file in out)
8704 (newline)
8705 (substitute* out
8706 (("@package@") "com.fasterxml.jackson.dataformat.xml")
8707 (("@projectversion@") ,version)
8708 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml")
2c8ac364
MW
8709 (("@projectartifactid@") "jackson-dataformat-xml")))
8710 #t))
262a4d33
JL
8711 (add-before 'build 'copy-resources
8712 (lambda _
2c8ac364
MW
8713 (copy-recursively "src/main/resources" "build/classes")
8714 #t)))))
262a4d33
JL
8715 (inputs
8716 `(("jackson-annotations" ,java-fasterxml-jackson-annotations)
8717 ("jackson-core" ,java-fasterxml-jackson-core)
8718 ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb)
8719 ("jackson-databind" ,java-fasterxml-jackson-databind)
8720 ("stax2-api" ,java-stax2-api)
8721 ("woodstox" ,java-woodstox-core)))
8722 (native-inputs
8723 `(("junit" ,java-junit)
8724 ("hamcrest" ,java-hamcrest-core)))
8725 (home-page "https://github.com/FasterXML/jackson-dataformat-xml")
8726 (synopsis "Read and write XML")
8727 (description "This package contains Jackson extension component for reading
8728and writing XML encoded data.
8729
8730Further, the goal is to emulate how JAXB data-binding works with \"Code-first\"
8731approach (that is, no support is added for \"Schema-first\" approach). Support
8732for JAXB annotations is provided by JAXB annotation module; this module
8733provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator},
8734@code{JsonFactory}) as well as small number of higher level overrides needed to
8735make data-binding work.")
8736 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
90a127c7
JL
8737
8738(define-public java-hdrhistogram
8739 (package
8740 (name "java-hdrhistogram")
8741 (version "2.1.9")
8742 (source (origin
8743 (method url-fetch)
8744 (uri (string-append "https://github.com/HdrHistogram/HdrHistogram/"
8745 "archive/HdrHistogram-" version ".tar.gz"))
8746 (sha256
8747 (base32
8748 "1sicbmc3sr42nw93qbkb26q9rn33ag33k6k77phjc3j5h5gjffqv"))))
8749 (build-system ant-build-system)
8750 (arguments
8751 `(#:jar-name "java-hdrhistogram.jar"
8752 #:source-dir "src/main/java"
8753 #:phases
8754 (modify-phases %standard-phases
8755 (add-before 'configure 'set-version
8756 (lambda _
8757 (let* ((version-java "src/main/java/org/HdrHistogram/Version.java")
8758 (template (string-append version-java ".template")))
8759 (copy-file template version-java)
8760 (substitute* version-java
8761 (("\\$VERSION\\$") ,version)
8762 (("\\$BUILD_TIME\\$") "0"))
8763 #t))))))
8764 (native-inputs
8765 `(("junit" ,java-junit)
8766 ("hamcrest" ,java-hamcrest-core)))
8767 (home-page "https://hdrhistogram.github.io/HdrHistogram")
8768 (synopsis "High dynamic range histogram")
8769 (description "Hdrhistogram allows to create histograms that support
8770recording and analyzing sampled data value counts across a configurable integer
8771value range with configurable value precision within the range. Value precision
8772is expressed as the number of significant digits in the value recording, and
8773provides control over value quantization behavior across the value range and
8774the subsequent value resolution at any given level.")
8775 (license license:public-domain)))
5d104a27 8776
c5ff11dc
RW
8777(define-public java-cofoja
8778 (package
8779 (name "java-cofoja")
8780 (version "1.3")
8781 (source (origin
8782 (method git-fetch)
8783 (uri (git-reference
8784 (url "https://github.com/nhatminhle/cofoja.git")
8785 (commit (string-append "v" version))))
8786 (file-name (string-append "java-cofoja-" version "-checkout"))
8787 (sha256
8788 (base32
8789 "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w"))))
8790 (build-system ant-build-system)
8791 (arguments
8792 `(#:build-target "dist"
8793 #:test-target "test"
8794 #:jdk ,icedtea-8
8795 #:make-flags
8796 (list "-Ddist.dir=dist")
8797 #:modules ((guix build ant-build-system)
8798 (guix build java-utils)
8799 (guix build utils)
8800 (srfi srfi-1)
8801 (ice-9 match))
8802 #:phases
8803 (modify-phases %standard-phases
8804 ;; The bulid system ignores the class path the ant-build-system sets
8805 ;; up and instead expects to find all dependencies in the "lib"
8806 ;; directory.
8807 (add-after 'unpack 'create-libdir
8808 (lambda* (#:key inputs #:allow-other-keys)
8809 (mkdir-p "lib")
8810 (for-each
8811 (lambda (file)
8812 (let ((target (string-append "lib/" (basename file))))
8813 (unless (file-exists? target)
8814 (symlink file target))))
8815 (append-map (match-lambda
8816 ((label . dir)
8817 (find-files dir "\\.jar$")))
8818 inputs))
8819 #t))
8820 (replace 'install (install-jars "dist")))))
8821 (inputs
8822 `(("java-asm" ,java-asm)))
8823 (native-inputs
8824 `(("java-junit" ,java-junit)))
8825 (home-page "https://github.com/nhatminhle/cofoja")
8826 (synopsis "Contracts for Java")
8827 (description "Contracts for Java, or Cofoja for short, is a contract
8828programming framework and test tool for Java, which uses annotation processing
8829and bytecode instrumentation to provide run-time checking. (In particular,
8830this is not a static analysis tool.)")
8831 (license license:lgpl3+)))
8832
5d104a27
JL
8833(define-public java-aopalliance
8834 (package
8835 (name "java-aopalliance")
8836 (version "1.0")
8837 (source (origin
8838 (method git-fetch)
8839 ;; Note: this git repository is not official, but contains the
8840 ;; source code that is in the CVS repository. Downloading the
8841 ;; tarball from sourceforge is undeterministic, and the cvs download
8842 ;; fails.
8843 (uri (git-reference
8844 (url "https://github.com/hoverruan/aopalliance")
8845 (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0")))
8846 (file-name (string-append name "-" version))
8847 (sha256
8848 (base32
8849 "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr"))))
8850 (build-system ant-build-system)
8851 (arguments
8852 `(#:jar-name "java-aopalliance.jar"
8853 #:jdk ,icedtea-8
8854 #:tests? #f; no tests
8855 #:source-dir "aopalliance/src/main"))
8856 (home-page "http://aopalliance.sourceforge.net")
8857 (synopsis "Aspect-Oriented Programming")
8858 (description "The AOP Alliance project is a joint project between several
8859software engineering people who are interested in Aspect-Oriented Programming
8860(AOP) and Java.")
8861 (license license:public-domain)))
454536e0
JL
8862
8863(define-public java-javax-inject
8864 (package
8865 (name "java-javax-inject")
8866 (version "tck-1")
8867 (source (origin
8868 (method url-fetch)
8869 (uri (string-append "https://github.com/javax-inject/javax-inject/"
8870 "archive/javax.inject-" version ".tar.gz"))
8871 (sha256
8872 (base32
8873 "1ydrlvh2r7vr1g7lhjwy3w2dggpj9h6pix1lakkkgdywb365n6g0"))))
8874 (build-system ant-build-system)
8875 (arguments
8876 `(#:jar-name "java-javax-inject.jar"
8877 #:jdk ,icedtea-8
8878 #:tests? #f)); no tests
8879 (home-page "http://github.com/javax-inject/javax-inject")
8880 (synopsis "JSR-330: Dependency Injection for Java")
8881 (description "This package specifies a means for obtaining objects in such
8882a way as to maximize reusability, testability and maintainability compared to
8883traditional approaches such as constructors, factories, and service locators
8884(e.g., JNDI). This process, known as dependency injection, is beneficial to
8885most nontrivial applications.
8886
8887Many types depend on other types. For example, a @var{Stopwatch} might depend
8888on a @var{TimeSource}. The types on which a type depends are known as its
8889dependencies. The process of finding an instance of a dependency to use at run
8890time is known as resolving the dependency. If no such instance can be found,
8891the dependency is said to be unsatisfied, and the application is broken.")
8892 (license license:asl2.0)))
5766984b
JL
8893
8894(define-public java-guice
8895 (package
8896 (name "java-guice")
8897 (version "4.1")
8898 (source (origin
8899 (method url-fetch)
8900 (uri (string-append "https://github.com/google/guice/archive/"
8901 version ".tar.gz"))
8902 (file-name (string-append name "-" version ".tar.gz"))
9936ffe7
BH
8903 (modules '((guix build utils)))
8904 (snippet
8905 `(begin
8906 (for-each delete-file (find-files "." ".*.jar"))))
5766984b
JL
8907 (sha256
8908 (base32
8909 "0dwmqjzlavb144ywqqglj3h68hqszkff8ai0a42hyb5il0qh4rbp"))))
8910 (build-system ant-build-system)
8911 (arguments
8912 `(#:jar-name "java-guice.jar"
8913 #:jdk ,icedtea-8
8914 #:tests? #f; FIXME: tests are not in a java sub directory
8915 #:source-dir "core/src"))
8916 (inputs
8917 `(("guava" ,java-guava)
8918 ("java-cglib" ,java-cglib)
8919 ("java-aopalliance" ,java-aopalliance)
8920 ("java-javax-inject" ,java-javax-inject)
8921 ("java-asm" ,java-asm)))
8922 (home-page "https://github.com/google/guice")
8923 (synopsis "Lightweight dependency injection framework")
8924 (description "Guice is a lightweight dependency injection framework fo
8925Java 6 and above.")
8926 (license license:asl2.0)))
ec4e8ad7
JL
8927
8928(define-public java-guice-servlet
8929 (package
8930 (inherit java-guice)
8931 (name "java-guice-servlet")
8932 (arguments
8933 `(#:jar-name "guice-servlet.jar"
8934 #:source-dir "extensions/servlet/src/"
8935 #:jdk ,icedtea-8
8936 #:tests? #f)); FIXME: not in a java subdir
8937 (inputs
8938 `(("guice" ,java-guice)
10eddaca 8939 ("servlet" ,java-classpathx-servletapi)
ec4e8ad7 8940 ,@(package-inputs java-guice)))))
b12fe1e5
JL
8941
8942(define-public java-assertj
8943 (package
8944 (name "java-assertj")
8945 (version "3.8.0")
8946 (source (origin
8947 (method url-fetch)
8948 (uri (string-append "https://github.com/joel-costigliola/"
8949 "assertj-core/archive/"
8950 "assertj-core-" version ".tar.gz"))
8951 (sha256
8952 (base32
8953 "1kf124fxskf548rklkg86294w2x6ajqrff94rrhyqns31danqkfz"))))
8954 (build-system ant-build-system)
8955 (arguments
8956 `(#:jar-name "java-assertj.jar"
8957 #:jdk ,icedtea-8
8958 #:source-dir "src/main/java"
8959 #:tests? #f)); depends on tng-junit which depends on assertj
8960 (inputs
8961 `(("cglib" ,java-cglib)
8962 ("junit" ,java-junit)
8963 ("hamcrest" ,java-hamcrest-core)))
8964 (native-inputs
8965 `(("mockito" ,java-mockito-1)))
8966 (home-page "https://joel-costigliola.github.io/assertj/index.html")
8967 (synopsis "Fluent assertions for java")
8968 (description "AssertJ core is a Java library that provides a fluent
8969interface for writing assertions. Its main goal is to improve test code
8970readability and make maintenance of tests easier.")
8971 (license license:asl2.0)))
6768e0a7
JL
8972
8973(define-public java-jboss-javassist
8974 (package
8975 (name "java-jboss-javassist")
8976 (version "3.21.0")
8977 (source (origin
8978 (method url-fetch)
8979 (uri (string-append "https://github.com/jboss-javassist/javassist/"
8980 "archive/rel_"
8981 (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)
8982 "_ga.tar.gz"))
8983 (sha256
8984 (base32
8985 "10lpcr3sbf7y6fq6fc2h2ik7rqrivwcy4747bg0kxhwszil3cfmf"))))
8986 (build-system ant-build-system)
8987 (arguments
8988 `(#:jar-name "java-jboss-javassist.jar"
8989 #:jdk ,icedtea-8
8990 #:source-dir "src/main"
8991 #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3
8992 #:phases
8993 (modify-phases %standard-phases
8994 (add-before 'configure 'remove-binary
8995 (lambda _
8996 (delete-file "javassist.jar")
8997 #t)))))
8998 (native-inputs
8999 `(("junit" ,java-junit)))
9000 (home-page "https://github.com/jboss-javassist/javassist")
9001 (synopsis "Java bytecode engineering toolkit")
9002 (description "Javassist (JAVA programming ASSISTant) makes Java bytecode
9003manipulation simple. It is a class library for editing bytecodes in Java; it
9004enables Java programs to define a new class at runtime and to modify a class
9005file when the JVM loads it.")
9006 (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl.
a6dd06d0
JL
9007
9008(define-public java-jcommander
9009 (package
9010 (name "java-jcommander")
9011 (version "1.71")
9012 (source (origin
9013 (method url-fetch)
9014 (uri (string-append "https://github.com/cbeust/jcommander/archive/"
9015 version ".tar.gz"))
9016 (file-name (string-append name "-" version ".tar.gz"))
9017 (sha256
9018 (base32
9019 "1f5k2ckay6qjc3d3w3d7bc0p3cx3c7n6p6zxvw1kibqdr0q98wlx"))))
9020 (build-system ant-build-system)
9021 (arguments
9022 `(#:jar-name "java-jcommander.jar"
9023 #:jdk ,icedtea-8
9024 #:tests? #f; requires testng which depends on jcommander
9025 #:source-dir "src/main/java"))
dcfdc908 9026 (home-page "https://jcommander.org")
a6dd06d0
JL
9027 (synopsis "Command line parameters parser")
9028 (description "JCommander is a very small Java framework that makes it
9029trivial to parse command line parameters. Parameters are declared with
9030annotations.")
9031 (license license:asl2.0)))
11bc385b
JL
9032
9033(define-public java-bsh
9034 (package
9035 (name "java-bsh")
9036 (version "2.0b6")
9037 (source (origin
9038 (method url-fetch)
9039 (uri (string-append "https://github.com/beanshell/beanshell/archive/"
9040 version ".tar.gz"))
9041 (file-name (string-append name "-" version ".tar.gz"))
9042 (sha256
9043 (base32
9044 "1bawkxk6jyc75hxvzkpz689h73cn3f222m0ar3nvb0dal2b85kfv"))))
9045 (build-system ant-build-system)
9046 (arguments
9047 `(#:build-target "jarall"
9048 #:test-target "junit-tests-all"
9049 #:phases
9050 (modify-phases %standard-phases
9051 (replace 'install
9052 (lambda* (#:key outputs #:allow-other-keys)
9053 (let ((share (string-append (assoc-ref outputs "out") "/share/java")))
9054 (mkdir-p share)
9055 (copy-file "dist/bsh-2.0b6.jar" (string-append share "/bsh-2.0b6.jar"))
9056 #t))))))
9057 (home-page "http://beanshell.org/")
9058 (synopsis "Lightweight Scripting for Java")
9059 (description "BeanShell is a small, free, embeddable Java source
9060interpreter with object scripting language features, written in Java.
9061BeanShell dynamically executes standard Java syntax and extends it with common
9062scripting conveniences such as loose types, commands, and method closures like
9063those in Perl and JavaScript.")
9064 (license license:asl2.0)))
7a343e97
JL
9065
9066(define-public java-fest-util
9067 (package
9068 (name "java-fest-util")
9069 (version "1.2.5")
9070 (source (origin
9071 (method url-fetch)
9072 (uri (string-append "https://github.com/alexruiz/fest-util/"
9073 "archive/fest-util-" version ".tar.gz"))
9074 (sha256
9075 (base32
9076 "05g6hljz5mdaakk8d7g32klbhz9bdwp3qlj6rdaggdidxs3x1sb8"))))
9077 (build-system ant-build-system)
9078 (arguments
9079 `(#:jar-name "java-fest-util.jar"
9080 #:source-dir "src/main/java"))
9081 (native-inputs
9082 `(("junit" ,java-junit)
9083 ("hamcrest" ,java-hamcrest-core)))
9084 (home-page "https://github.com/alexruiz/fest-util")
9085 (synopsis "FEST common utilities")
9086 (description "Common utilities used in all FEST module.")
9087 (license license:asl2.0)))
3c6c8358
JL
9088
9089(define-public java-fest-test
9090 (package
9091 (name "java-fest-test")
9092 (version "2.1.0")
9093 (source (origin
9094 (method url-fetch)
9095 (uri (string-append "https://github.com/alexruiz/fest-test/"
9096 "archive/fest-test-" version ".tar.gz"))
9097 (sha256
9098 (base32
9099 "1rxfbw6l9vc65iy1x3fb617qc6y4w2k430pgf1mfbxfdlxbm0f7g"))))
9100 (build-system ant-build-system)
9101 (arguments
9102 `(#:jar-name "java-fest-test.jar"
9103 #:source-dir "src/main/java"
9104 #:tests? #f)); no tests
9105 (inputs
9106 `(("junit" ,java-junit)))
9107 (home-page "https://github.com/alexruiz/fest-test")
9108 (synopsis "Common FEST testing infrastructure")
9109 (description "Fest-test contains the common FEST testing infrastructure.")
9110 (license license:asl2.0)))
ca98e448
JL
9111
9112(define-public java-fest-assert
9113 (package
9114 (name "java-fest-assert")
9115 (version "2.0M10")
9116 (source (origin
9117 (method url-fetch)
9118 (uri (string-append "https://github.com/alexruiz/fest-assert-2.x/"
9119 "archive/fest-assert-core-" version ".tar.gz"))
9120 (sha256
9121 (base32
9122 "1bi0iqavikzww6rxvz5jyg7y6bflv95s6ibryxx0xfcxrrw6i5lw"))))
9123 (build-system ant-build-system)
9124 (arguments
9125 `(#:jar-name "java-fest-assert.jar"
9126 #:source-dir "src/main/java"
9127 #:test-exclude
9128 (list
9129 "**/Abstract*.java"
9130 "**/*BaseTest.java"
9131 ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses
9132 "**/MessageFormatter_format_Test.java"
9133 "**/internal/*/*_assert*_Test.java")))
9134 (inputs
9135 `(("java-fest-util" ,java-fest-util)))
9136 (native-inputs
9137 `(("java-junit" ,java-junit)
9138 ("java-fest-test" ,java-fest-test)
9139 ("java-hamcrest-core" ,java-hamcrest-core)
9140 ("java-mockito" ,java-mockito-1)
9141 ("java-cglib" ,java-cglib)
9142 ("java-objenesis" ,java-objenesis)
9143 ("java-asm" ,java-asm)))
9144 (home-page "https://github.com/alexruiz/fest-assert-2.x")
9145 (synopsis "FEST fluent assertions")
9146 (description "FEST-Assert provides a fluent interface for assertions.")
9147 (license license:asl2.0)))
0442d897
JL
9148
9149(define-public java-testng
9150 (package
9151 (name "java-testng")
3422e10e 9152 (version "6.14.3")
0442d897 9153 (source (origin
36b39d16
RW
9154 (method git-fetch)
9155 (uri (git-reference
9156 (url "https://github.com/cbeust/testng.git")
9157 (commit version)))
9158 (file-name (string-append name "-" version "-checkout"))
0442d897
JL
9159 (sha256
9160 (base32
3422e10e 9161 "0y6vq30i5g276kw0v2bhbvci22ijg7ax49ap2611yqlhbs4d6dqv"))))
0442d897
JL
9162 (build-system ant-build-system)
9163 (arguments
9164 `(#:jdk ,icedtea-8; java.util.function
9165 #:jar-name "java-testng.jar"
9166 #:source-dir "src/main/java"
9167 #:phases
9168 (modify-phases %standard-phases
36b39d16
RW
9169 ;; FIXME: I don't know why these tests fail
9170 (add-after 'unpack 'delete-failing-tests
9171 (lambda _
9172 (substitute* "src/test/resources/testng.xml"
9173 (("<class name=\"test.configuration.github1625.TestRunnerIssue1625\"/>") "")
9174 (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") ""))
9175 #t))
9176 ;; We don't have groovy
9177 (add-after 'unpack 'delete-groovy-tests
9178 (lambda _
9179 (delete-file-recursively "src/test/java/test/dependent/issue1648/")
9180 (substitute* "src/test/resources/testng.xml"
9181 (("<class name=\"test.dependent.issue1648.TestRunner\"/>") ""))
9182 #t))
0442d897
JL
9183 (add-before 'build 'copy-resources
9184 (lambda _
9185 (copy-recursively "src/main/resources" "build/classes")
9186 #t))
9187 (add-before 'check 'copy-test-resources
9188 (lambda _
9189 (copy-recursively "src/test/resources" "build/test-classes")
9190 #t))
9191 (replace 'check
9192 (lambda _
2c8ac364 9193 (invoke "ant" "compile-tests")
0442d897
JL
9194 ;; we don't have groovy
9195 (substitute* "src/test/resources/testng.xml"
9196 (("<class name=\"test.groovy.GroovyTest\" />") ""))
2c8ac364
MW
9197 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
9198 ":build/classes"
9199 ":build/test-classes")
9200 "-Dtest.resources.dir=src/test/resources"
9201 "org.testng.TestNG" "src/test/resources/testng.xml"))))))
0442d897
JL
9202 (propagated-inputs
9203 `(("junit" ,java-junit)
9204 ("java-jsr305" ,java-jsr305)
9205 ("java-bsh" ,java-bsh)
9206 ("java-jcommander" ,java-jcommander)
9207 ("java-guice" ,java-guice)
9208 ("snakeyaml" ,java-snakeyaml)))
9209 (native-inputs
9210 `(("guava" ,java-guava)
9211 ("java-javax-inject" ,java-javax-inject)
9212 ("java-hamcrest" ,java-hamcrest-all)
9213 ("java-assertj" ,java-assertj)
36b39d16 9214 ("java-mockito" ,java-mockito-1)
0442d897
JL
9215 ("cglib" ,java-cglib)
9216 ("asm" ,java-asm)
9217 ("aopalliance" ,java-aopalliance)))
c9010605 9218 (home-page "https://testng.org")
0442d897
JL
9219 (synopsis "Testing framework")
9220 (description "TestNG is a testing framework inspired from JUnit and NUnit
9221but introducing some new functionalities that make it more powerful and easier
9222to use.")
9223 (license license:asl2.0)))
1717a7de
JL
9224
9225(define-public java-jnacl
3e87923a
RW
9226 (let ((commit "094e819afdd63ea81a499b3bcb42a271006bebd9")
9227 (revision "2"))
9228 (package
9229 (name "java-jnacl")
9230 (version (string-append "0.1.0-" revision "." (string-take commit 7)))
9231 (source (origin
9232 (method git-fetch)
9233 (uri (git-reference
9234 (url "https://github.com/neilalexander/jnacl.git")
9235 (commit commit)))
6c34ad73 9236 (file-name (git-file-name name version))
3e87923a
RW
9237 (sha256
9238 (base32
9239 "1d6g6xhn83byv5943n7935wwjsk0ibk0qdvqgr699qqgqqmwisbb"))))
9240 (build-system ant-build-system)
9241 (arguments
8c7d32e0 9242 `(#:jar-name "jnacl.jar"
3e87923a
RW
9243 #:source-dir "src/main/java"
9244 #:jdk ,icedtea-8
9245 #:phases
9246 (modify-phases %standard-phases
9247 (add-before 'build 'fix-tests
9248 (lambda _
9249 (substitute* '("src/test/java/com/neilalexander/jnacl/NaClTest.java"
9250 "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java")
9251 (("assertions.Assertions") "assertions.api.Assertions"))
9252 #t))
9253 (replace 'check
9254 (lambda _
9255 (invoke "ant" "compile-tests")
9256 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
9257 ":build/classes"
9258 ":build/test-classes")
9259 "org.testng.TestNG" "-testclass"
9260 "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class")
9261 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
9262 ":build/classes"
9263 ":build/test-classes")
9264 "org.testng.TestNG" "-testclass"
2c8ac364 9265 "build/test-classes/com/neilalexander/jnacl/NaClTest.class"))))))
3e87923a
RW
9266 (native-inputs
9267 `(("java-testng" ,java-testng)
9268 ("java-fest-util" ,java-fest-util)
9269 ("java-fest-assert" ,java-fest-assert)))
9270 (home-page "https://github.com/neilalexander/jnacl")
9271 (synopsis "Java implementation of NaCl")
9272 (description "Pure Java implementation of the NaCl: Networking and
1717a7de 9273Cryptography library.")
3e87923a 9274 (license license:bsd-2))))
eaf3cb7a
JL
9275
9276(define-public java-mvel2
9277 (package
9278 (name "java-mvel2")
9279 (version "2.3.1")
9280 (source (origin
9281 (method url-fetch)
9282 (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-"
9283 version ".Final.tar.gz"))
9284 (sha256
9285 (base32
9286 "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z"))))
9287 (build-system ant-build-system)
9288 (arguments
9289 `(#:jar-name "mvel2.jar"
9290 #:source-dir "src/main/java"
9291 #:test-exclude
9292 (list "**/Abstract*.java"
9293 ;; Base class with no tests
9294 "**/MVELThreadTest.java")
9295 #:phases
9296 (modify-phases %standard-phases
9297 (add-after 'install 'install-bin
9298 (lambda* (#:key outputs #:allow-other-keys)
9299 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
9300 (mkdir-p bin)
9301 (with-output-to-file (string-append bin "/mvel2")
9302 (lambda _
9303 (display
9304 (string-append
9305 "#!" (which "bash") "\n"
9306 "if [ \"$#\" -ne \"2\" ]; then\n"
9307 "echo 'Usage: mvel2 <script> <out.dir>'\n"
9308 "exit\n"
9309 "fi\n"
9310 "java -Dout.dir=$2 -cp " (getenv "CLASSPATH")
9311 ":" (assoc-ref outputs "out") "/share/java/mvel2.jar"
9312 " org.mvel2.sh.Main $1"))))
9313 (chmod (string-append bin "/mvel2") #o755))
9314 #t)))))
9315 (native-inputs
9316 `(("junit" ,java-junit)
9317 ("hamcrest" ,java-hamcrest-core)))
9318 (home-page "https://github.com/mvel/mvel")
9319 (synopsis "MVFLEX Expression Language")
9320 (description "MVEL has largely been inspired by Java syntax, but has some
9321fundamental differences aimed at making it more efficient as an expression
9322language, such as operators that directly support collection, array and string
9323matching, as well as regular expressions. MVEL is used to evaluate expressions
9324written using Java syntax.
9325
9326In addition to the expression language, MVEL serves as a templating language for
9327configuration and string construction.")
9328 (license license:asl2.0)))
d54d7d31 9329
9e325e8c
RW
9330(define-public java-commons-jexl-2
9331 (package
9332 (name "java-commons-jexl")
9333 (version "2.1.1")
9334 (source (origin
9335 (method url-fetch)
9336 (uri (string-append "mirror://apache/commons/jexl/source/"
9337 "commons-jexl-" version "-src.tar.gz"))
9338 (sha256
9339 (base32
9340 "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz"))))
9341 (build-system ant-build-system)
9342 (arguments
9343 `(#:jar-name "commons-jexl-2.jar"
9344 #:jdk ,icedtea-8
9345 #:source-dir "src/main/java"
9346 #:phases
9347 (modify-phases %standard-phases
9348 (add-before 'check 'disable-broken-tests
9349 (lambda* (#:key inputs #:allow-other-keys)
9350 (with-directory-excursion "src/test/java/org/apache/commons/jexl2/"
9351 (substitute* "ArithmeticTest.java"
9352 (("asserter.assertExpression\\(\"3 / 0\"") "//")
9353 (("asserter.assertExpression\\(\"imanull") "//"))
9354 ;; This test fails with "ambiguous method invocation"
9355 (delete-file "CacheTest.java")
9356 ;; This test doesn't have access to the temp directory
9357 (substitute* "ClassCreatorTest.java"
9358 (("java.io.tmpdir") "user.dir"))
9359 ;; This test fails in trying to detect whether it can run.
9360 (substitute* "ClassCreator.java"
9361 (("boolean canRun =.*") "boolean canRun = false;\n"))
9362 ;; ...and these tests depend on it.
9363 (delete-file "scripting/JexlScriptEngineOptionalTest.java")
9364 (delete-file "scripting/JexlScriptEngineTest.java"))
9365 #t))
9366 (add-before 'build 'run-javacc
9367 (lambda _
9368 (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/"
080d0b60
RW
9369 (invoke "java" "jjtree" "Parser.jjt")
9370 (invoke "java" "javacc" "Parser.jj"))
9371 #t)))))
9e325e8c
RW
9372 (inputs
9373 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
9374 (native-inputs
9375 `(("java-junit" ,java-junit)
9376 ("java-hamcrest-core" ,java-hamcrest-core)
9377 ("javacc" ,javacc-4)))
9378 (home-page "https://commons.apache.org/proper/commons-jexl/")
9379 (synopsis "Java Expression Language ")
9380 (description "JEXL is a library intended to facilitate the implementation
9381of dynamic and scripting features in applications and frameworks written in
9382Java. JEXL implements an Expression Language based on some extensions to the
9383JSTL Expression Language supporting most of the constructs seen in
9384shell-script or ECMAScript. Its goal is to expose scripting features usable
9385by technical operatives or consultants working with enterprise platforms.")
9386 (license license:asl2.0)))
9387
d54d7d31
JL
9388(define-public java-lz4
9389 (package
9390 (name "java-lz4")
9391 (version "1.4.0")
9392 (source (origin
9393 (method url-fetch)
9394 (uri (string-append "https://github.com/lz4/lz4-java/archive/"
9395 version ".tar.gz"))
9396 (file-name (string-append name "-" version ".tar.gz"))
9397 (sha256
9398 (base32
9399 "096dm57p2lzqk28n0j2p52x2j3cvnsd2dfqn43n7vbwrkjsy7y54"))))
9400 (build-system ant-build-system)
9401 (arguments
9402 `(#:jar-name "lz4.jar"
9403 #:jdk ,icedtea-8
9404 #:source-dir "src/java:src/java-unsafe"
9405 #:tests? #f; FIXME: requires more dependencies
9406 #:phases
9407 (modify-phases %standard-phases
9408 (add-before 'configure 'generate-source
9409 (lambda _
9410 (with-directory-excursion "src/build/source_templates"
1b6bc516
RW
9411 (invoke "mvel2" "../gen_sources.mvel" "../../java"))
9412 #t)))))
d54d7d31
JL
9413 (native-inputs
9414 `(("mvel" ,java-mvel2)))
9415 (home-page "https://jpountz.github.io/lz4-java")
9416 (synopsis "Compression algorithm")
9417 (description "LZ4 - Java is a Java port of the popular lz4 compression
9418algorithms and xxHash hashing algorithm.")
9419 (license license:asl2.0)))
62315865 9420
50d70a72 9421(define-public java-bouncycastle
62315865 9422 (package
50d70a72 9423 (name "java-bouncycastle")
248a9e16 9424 (version "1.60")
62315865
JL
9425 (source (origin
9426 (method url-fetch)
50d70a72 9427 (uri (string-append "https://github.com/bcgit/bc-java/archive/r"
248a9e16 9428 (substring version 0 1) "v"
50d70a72 9429 (substring version 2 4) ".tar.gz"))
62315865
JL
9430 (sha256
9431 (base32
248a9e16 9432 "0v434513y708qc87k4xz13p2kzydc736lk3ks67df9mg11s7hchv"))
50d70a72
JL
9433 (modules '((guix build utils)))
9434 (snippet
9435 '(begin
9436 (for-each delete-file
9437 (find-files "." "\\.jar$"))
9438 #t))))
62315865
JL
9439 (build-system ant-build-system)
9440 (arguments
50d70a72 9441 `(#:jdk ,icedtea-8
0c68f7fd 9442 #:tests? #f
62315865
JL
9443 #:phases
9444 (modify-phases %standard-phases
50d70a72 9445 (replace 'build
62315865 9446 (lambda _
50d70a72 9447 (invoke "ant" "-f" "ant/jdk15+.xml" "build-provider")
2c8ac364 9448 (invoke "ant" "-f" "ant/jdk15+.xml" "build")))
0c68f7fd
RW
9449 ;; FIXME: the tests freeze.
9450 ;; (replace 'check
9451 ;; (lambda _
9452 ;; (invoke "ant" "-f" "ant/jdk15+.xml" "test")))
50d70a72
JL
9453 (replace 'install
9454 (install-jars "build/artifacts/jdk1.5/jars")))))
9455 (inputs
9456 `(("java-javax-mail" ,java-javax-mail)))
31208367
JL
9457 (native-inputs
9458 `(("unzip" ,unzip)
50d70a72
JL
9459 ("junit" ,java-junit)
9460 ("java-native-access" ,java-native-access)
9461 ("java-native-access-platform" ,java-native-access-platform)))
31208367
JL
9462 (home-page "https://www.bouncycastle.org")
9463 (synopsis "Cryptographic library")
50d70a72
JL
9464 (description "Bouncy Castle is a cryptographic library for the Java
9465programming language.")
31208367 9466 (license license:expat)))
a53d9ac0
JL
9467
9468(define-public java-lmax-disruptor
9469 (package
9470 (name "java-lmax-disruptor")
9471 (version "3.3.7")
9472 (source (origin
9473 (method url-fetch)
9474 (uri (string-append "https://github.com/LMAX-Exchange/disruptor/"
9475 "archive/" version ".tar.gz"))
9476 (file-name (string-append name "-" version ".tar.gz"))
9477 (sha256
9478 (base32
9479 "17da2gwj5abnlsfgn2xqjk5lgzbg4vkb0hdv2dvc8r2fx4bi7w3g"))))
9480 (build-system ant-build-system)
9481 (arguments
9482 `(#:jar-name "java-lmax-disruptor.jar"
9483 #:jdk ,icedtea-8
9484 #:tests? #f)); tests hang
9485 (inputs
9486 `(("junit" ,java-junit)
9487 ("java-hdrhistogram" ,java-hdrhistogram)
9488 ("java-jmock" ,java-jmock)
9489 ("java-jmock-legacy" ,java-jmock-legacy)
9490 ("java-jmock-junit4" ,java-jmock-junit4)
9491 ("java-hamcrest-all" ,java-hamcrest-all)))
9492 (native-inputs
9493 `(("cglib" ,java-cglib)
9494 ("objenesis" ,java-objenesis)
9495 ("asm" ,java-asm)))
9496 (home-page "https://www.lmax.com/disruptor")
9497 (synopsis "High performance inter-thread communication")
9498 (description "LMAX Disruptor is a software pattern and software component
9499for high performance inter-thread communication that avoids the need for
9500message queues or resource locking.")
9501 (license license:asl2.0)))
5619556b 9502
5e3abfc8
RW
9503(define-public java-commons-bcel
9504 (package
9505 (name "java-commons-bcel")
9506 (version "6.1")
9507 (source (origin
9508 (method url-fetch)
9509 (uri (string-append "mirror://apache/commons/bcel/source/bcel-"
9510 version "-src.tar.gz"))
9511 (sha256
9512 (base32
9513 "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy"))))
9514 (build-system ant-build-system)
9515 (arguments
9516 `(#:jar-name "bcel.jar"
9517 #:jdk ,icedtea-8
9518 #:source-dir "src/main/java"
9519 #:test-dir "src/test/java"
9520 ;; FIXME: Tests require the unpackaged jna.
9521 #:tests? #f))
9522 (home-page "https://commons.apache.org/proper/commons-bcel/")
9523 (synopsis "Byte code engineering library")
9524 (description "The Byte Code Engineering Library (Apache Commons BCEL) is
9525intended to give users a convenient way to analyze, create, and
9526manipulate (binary) Java class files. Classes are represented by objects
9527which contain all the symbolic information of the given class: methods, fields
9528and byte code instructions, in particular.
9529
9530Such objects can be read from an existing file, be transformed by a
9531program (e.g. a class loader at run-time) and written to a file again. An
9532even more interesting application is the creation of classes from scratch at
9533run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful
9534if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format
9535of Java @code{.class} files.")
9536 (license license:asl2.0)))
9537
5619556b
JL
9538(define-public java-xerial-core
9539 (package
9540 (name "java-xerial-core")
9541 (version "2.1")
9542 (source (origin
9543 (method url-fetch)
9544 (uri (string-append "https://github.com/xerial/xerial-java/archive/"
9545 version ".tar.gz"))
9546 (file-name (string-append name "-" version ".tar.gz"))
9547 (sha256
9548 (base32
9549 "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d"))))
9550 (build-system ant-build-system)
9551 (arguments
9552 `(#:jar-name "xerial-core.jar"
9553 #:source-dir "xerial-core/src/main/java"
9554 #:test-dir "xerial-core/src/test"
9555 #:phases
9556 (modify-phases %standard-phases
9557 (add-before 'build 'copy-resources
9558 (lambda _
9559 (copy-recursively "xerial-core/src/main/resources"
9560 "build/classes")
9561 #t)))))
9562 (native-inputs
9563 `(("junit" ,java-junit)
9564 ("hamcrest" ,java-hamcrest-core)))
9565 (home-page "https://github.com/xerial/xerial-java")
f4548394 9566 (synopsis "Data management libraries for Java")
5619556b 9567 (description "Xerial is a set of data management libraries for the Java
f4548394 9568programming language. The ultimate goal of the Xerial project is to manage
5619556b
JL
9569everything as database, including class objects, text format data, data
9570streams, etc.")
9571 (license license:asl2.0)))
8d6a4815
JL
9572
9573(define-public java-powermock-reflect
9574 (package
9575 (name "java-powermock-reflect")
9576 (version "1.7.3")
9577 (source (origin
9578 (method url-fetch)
9579 (uri (string-append "https://github.com/powermock/powermock/"
9580 "archive/powermock-" version ".tar.gz"))
9581 (file-name (string-append name "-" version ".tar.gz"))
9582 (sha256
9583 (base32
9584 "0sbgi5vqq7k72wzcdjb20s370vyd4hsbnx71pzb8ishml3gy7fwy"))
9585 (patches
9586 (search-patches "java-powermock-fix-java-files.patch"))))
9587 (build-system ant-build-system)
9588 (arguments
9589 `(#:jar-name "java-powermock-reflect.jar"
9590 #:jdk ,icedtea-8
9591 #:source-dir "powermock-reflect/src/main/java"
9592 #:test-dir "powermock-reflect/src/test"))
9593 (inputs
9594 `(("java-objenesis" ,java-objenesis)))
9595 (native-inputs
9596 `(("junit" ,java-junit)
9597 ("cglib" ,java-cglib)
9598 ("asm" ,java-asm)
9599 ("hamcrest" ,java-hamcrest-core)
9600 ("assertj" ,java-assertj)))
9601 (home-page "https://github.com/powermock/powermock")
9602 (synopsis "Mock library extension framework")
9603 (description "PowerMock is a framework that extends other mock libraries
9604such as EasyMock with more powerful capabilities. PowerMock uses a custom
9605classloader and bytecode manipulation to enable mocking of static methods,
9606constructors, final classes and methods, private methods, removal of static
9607initializers and more. By using a custom classloader no changes need to be
9608done to the IDE or continuous integration servers which simplifies adoption.")
9609 (license license:asl2.0)))
d4a4d5da
JL
9610
9611(define-public java-powermock-core
9612 (package
9613 (inherit java-powermock-reflect)
9614 (name "java-powermock-core")
9615 (arguments
9616 `(#:jar-name "java-powermock-core.jar"
9617 #:source-dir "powermock-core/src/main/java"
9618 #:test-dir "powermock-core/src/test"
9619 #:tests? #f; requires powermock-api
59e0021c
JL
9620 #:jdk ,icedtea-8
9621 #:phases
9622 (modify-phases %standard-phases
9623 (add-before 'build 'copy-resources
9624 (lambda _
9625 (copy-recursively "powermock-core/src/main/resources"
2c8ac364
MW
9626 "build/classes")
9627 #t)))))
d4a4d5da
JL
9628 (inputs
9629 `(("reflect" ,java-powermock-reflect)
9630 ("javassist" ,java-jboss-javassist)))
9631 (native-inputs
9632 `(("junit" ,java-junit)
9633 ("assertj" ,java-assertj)
9634 ("mockito" ,java-mockito-1)))))
2d5d65d7
JL
9635
9636(define-public java-powermock-api-support
9637 (package
9638 (inherit java-powermock-reflect)
9639 (name "java-powermock-api-support")
9640 (build-system ant-build-system)
9641 (arguments
9642 `(#:jar-name "java-powermock-api-support.jar"
9643 #:jdk ,icedtea-8
9644 #:source-dir "powermock-api/powermock-api-support/src/main/java"
9645 #:tests? #f)); no tests
9646 (inputs
9647 `(("core" ,java-powermock-core)
9648 ("reflect" ,java-powermock-reflect)))))
6c21d46c
JL
9649
9650(define-public java-powermock-modules-junit4-common
9651 (package
9652 (inherit java-powermock-reflect)
9653 (name "java-powermock-modules-junit4-common")
9654 (build-system ant-build-system)
9655 (arguments
9656 `(#:jar-name "java-powermock-modules-junit4-common.jar"
9657 #:jdk ,icedtea-8
9658 #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java"
9659 #:test-dir "powermock-modules/powermock-module-junit4-common/src/test"))
9660 (inputs
9661 `(("core" ,java-powermock-core)
9662 ("easymock" ,java-easymock)
9663 ("reflect" ,java-powermock-reflect)
9664 ("hamcrest" ,java-hamcrest-core)
9665 ("cglib" ,java-cglib)))))
33db1681
JL
9666
9667(define-public java-powermock-modules-junit4
9668 (package
9669 (inherit java-powermock-reflect)
9670 (name "java-powermock-modules-junit4")
9671 (build-system ant-build-system)
9672 (arguments
9673 `(#:jar-name "java-powermock-modules-junit4.jar"
9674 #:jdk ,icedtea-8
9675 #:source-dir "powermock-modules/powermock-module-junit4/src/main/java"
1124683d
JL
9676 #:test-dir "powermock-modules/powermock-module-junit4/src/test"
9677 #:phases
9678 (modify-phases %standard-phases
9679 (add-before 'build 'fix-junit-detection
9680 (lambda _
9681 ;; Our junit version is 4.12-SNAPSHOT
9682 (substitute* (find-files "powermock-modules/powermock-module-junit4"
9683 "PowerMockJUnit4MethodValidator.java")
2c8ac364
MW
9684 (("4.12") "4.12-SNAPSHOT"))
9685 #t)))))
33db1681
JL
9686 (inputs
9687 `(("core" ,java-powermock-core)
9688 ("reflect" ,java-powermock-reflect)
9689 ("common" ,java-powermock-modules-junit4-common)
9690 ("cglib" ,java-cglib)))
9691 (native-inputs
9692 `(("easymock" ,java-easymock)
9693 ("hamcrest" ,java-hamcrest-core)
9694 ("objenesis" ,java-objenesis)
9695 ("asm" ,java-asm)
9696 ("junit" ,java-junit)))))
4d508975
JL
9697
9698(define-public java-powermock-api-easymock
9699 (package
9700 (inherit java-powermock-reflect)
9701 (name "java-powermock-api-easymock")
9702 (build-system ant-build-system)
9703 (arguments
9704 `(#:jar-name "java-powermock-api-easymock.jar"
9705 #:jdk ,icedtea-8
9706 #:source-dir "powermock-api/powermock-api-easymock/src/main/java"
9707 #:tests? #f; no tests
9708 #:phases
9709 (modify-phases %standard-phases
9710 (add-before 'build 'fix-file
9711 (lambda _
9712 ;; FIXME: This looks wrong, but it fixes a build error.
9713 (with-directory-excursion "powermock-api/powermock-api-easymock"
9714 (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java"
9715 (("classLoader instanceof MockClassLoader") "false")
9716 (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";")))
9717 #t)))))
9718 (inputs
9719 `(("core" ,java-powermock-core)
9720 ("easymock" ,java-easymock)
9721 ("reflect" ,java-powermock-reflect)
9722 ("support" ,java-powermock-api-support)
9723 ("cglib" ,java-cglib)))))
5fb3e822
JL
9724
9725(define-public java-jboss-jms-api-spec
9726 (package
9727 (name "java-jboss-jms-api-spec")
9728 (version "2.0")
9729 (source (origin
9730 (method url-fetch)
9731 (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/"
9732 "archive/jboss-jms-api_" version
9733 "_spec-1.0.1.Final.tar.gz"))
9734 (sha256
9735 (base32
9736 "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m"))))
9737 (build-system ant-build-system)
9738 (arguments
9739 `(#:jar-name "java-jboss-jms-api_spec.jar"
9740 #:jdk ,icedtea-8
9741 #:source-dir "."
9742 #:tests? #f)); no tests
9743 (home-page "https://github.com/jboss/jboss-jms-api_spec")
9744 (synopsis "Java Message Service API specification")
9745 (description "Java Message Service (JMS) API is used to send messages
9746messages between two or more clients. It is a messaging standard that allows
9747application components to create, send, receive, and read messages.")
9748 ; either gpl2 only with GPL Classpath Exception, or cddl.
9749 (license (list license:gpl2 license:cddl1.0))))
3ff47c66
JL
9750
9751(define-public java-mail
9752 (package
9753 (name "java-mail")
9754 (version "1.6.0")
9755 (source (origin
9756 (method url-fetch)
9757 (uri (string-append "https://github.com/javaee/javamail/archive/"
9758 "JAVAMAIL-1_6_0.tar.gz"))
9759 (sha256
9760 (base32
9761 "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92"))))
9762 (build-system ant-build-system)
9763 (arguments
9764 `(#:jar-name "java-mail.jar"
9765 #:jdk ,icedtea-8
9766 #:source-dir "mail/src/main/java"
9767 #:test-dir "mail/src/test"
9768 #:test-exclude
9769 (list "**/CollectorFormatterTest.java"
9770 "**/CompactFormatterTest.java"
9771 "**/DurationFilterTest.java"
9772 "**/MailHandlerTest.java"
9773 "**/GetLocalAddressTest.java"
9774 ;; FIXME: both end with:
9775 ;; java.lang.ClassNotFoundException:
9776 ;; javax.mail.internet.MimeMultipartParseTest
9777 "**/MimeMultipartParseTest.java"
9778 "**/SearchTermSerializationTest.java")
9779 #:phases
9780 (modify-phases %standard-phases
9781 (add-before 'configure 'move-version.java
9782 (lambda _
9783 (copy-file "mail/src/main/resources/javax/mail/Version.java"
218d1dde
RW
9784 "mail/src/main/java/javax/mail/Version.java")
9785 #t))
3ff47c66
JL
9786 (add-before 'build 'copy-resources
9787 (lambda _
9788 (copy-recursively "mail/src/main/resources/META-INF"
9789 "build/classes/META-INF")
9790 #t)))))
9791 (native-inputs
9792 `(("junit" ,java-junit)
9793 ("hamcrest" ,java-hamcrest-core)))
9794 (home-page "https://javaee.github.io/javamail/")
9795 (synopsis "Mail-related functionnalities in Java")
9796 (description "The JavaMail API provides a platform-independent and
9797protocol-independent framework to build mail and messaging applications.")
9798 ;; General Public License Version 2 only ("GPL") or the Common Development
9799 ;; and Distribution License("CDDL")
9800 (license (list license:cddl1.1
9801 license:gpl2)))); with classpath exception
217b20e4
JL
9802
9803(define-public java-jeromq
9804 (package
9805 (name "java-jeromq")
4aa0a1df 9806 (version "0.4.3")
217b20e4 9807 (source (origin
4aa0a1df
RW
9808 (method git-fetch)
9809 (uri (git-reference
9810 (url "https://github.com/zeromq/jeromq.git")
9811 (commit (string-append "v" version))))
9812 (file-name (string-append name "-" version "-checkout"))
217b20e4
JL
9813 (sha256
9814 (base32
594bd3a0
GB
9815 "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj"))
9816 (patches (search-patches "java-jeromq-fix-tests.patch"))))
217b20e4
JL
9817 (build-system ant-build-system)
9818 (arguments
9819 `(#:jar-name "java-jeromq.jar"
9820 #:source-dir "src/main/java"
9821 #:jdk ,icedtea-8
9822 #:test-exclude
9823 (list
9824 "**/Abstract*.java"
9825 ;; Requires network
9826 "**/ZBeaconTest.java"
9827 ;; Failures
4aa0a1df 9828 "**/DealerSpecTest.java"
217b20e4 9829 "**/CustomDecoderTest.java"
594bd3a0
GB
9830 "**/CustomEncoderTest.java"
9831 "**/ConnectRidTest.java"
9832 "**/ReqSpecTest.java"
9833 "**/PushPullSpecTest.java"
9834 "**/PubSubHwmTest.java"
9835 "**/RouterSpecTest.java"
9836 "**/ProxyTest.java")))
217b20e4
JL
9837 (inputs
9838 `(("java-jnacl" ,java-jnacl)))
9839 (native-inputs
9840 `(("java-hamcrest-core" ,java-hamcrest-core)
9841 ("junit" ,java-junit)))
9842 (home-page "http://zeromq.org/bindings:java")
9843 (synopsis "Java binding for 0MQ")
9844 (description "Jeromq provides the java bindings for 0MQ.")
9845 (license license:mpl2.0)))
46c6905a
JL
9846
9847(define-public java-kafka-clients
9848 (package
9849 (name "java-kafka-clients")
9850 (version "1.0.0")
9851 (source (origin
9852 (method url-fetch)
9853 (uri (string-append "mirror://apache/kafka/" version "/kafka-"
9854 version "-src.tgz"))
9855 (sha256
9856 (base32
9857 "1yxmnsmliwm7671q5yy9bl4jdqyyn00n26cggz9brwczx80w1vfq"))))
9858 (build-system ant-build-system)
9859 (arguments
9860 `(#:jar-name "java-kafka-clients.jar"
9861 #:jdk ,icedtea-8
9862 #:source-dir "clients/src/main/java"
9863 #:test-dir "clients/src/test"
9864 #:test-exclude
9865 (list
9866 ;; This file does not contain a class
9867 "**/IntegrationTest.java"
9868 ;; Requires network
9869 "**/ClientUtilsTest.java"
9870 ;; End with errors that seem related to our powermock
9871 "**/KafkaProducerTest.java"
9872 "**/BufferPoolTest.java")))
9873 (inputs
9874 `(("java-slf4j-api" ,java-slf4j-api)
9875 ("java-lz4" ,java-lz4)))
9876 (native-inputs
9877 `(("junit" ,java-junit)
9878 ("hamcrest" ,java-hamcrest-all)
9879 ("objenesis" ,java-objenesis)
9880 ("asm" ,java-asm)
9881 ("cglib" ,java-cglib)
9882 ("javassist" ,java-jboss-javassist)
9883 ("snappy" ,java-snappy)
9884 ("easymock" ,java-easymock)
9885 ("powermock" ,java-powermock-core)
9886 ("powermock-easymock" ,java-powermock-api-easymock)
9887 ("powermock-junit4-common" ,java-powermock-modules-junit4-common)
9888 ("powermock-junit4" ,java-powermock-modules-junit4)
9889 ("powermock-support" ,java-powermock-api-support)
50d70a72 9890 ("java-bouncycastle" ,java-bouncycastle)))
46c6905a
JL
9891 (home-page "https://kafka.apache.org")
9892 (synopsis "Distributed streaming platform")
9893 (description "Kafka is a distributed streaming platform, which means:
9894@itemize
9895@item it can publish and subscribe to streams of records;
9896@item it can store streams of records in a fault-tolerant way;
9897@item it can process streams of records as they occur.
9898@end itemize")
9899 ;; Either cddl or gpl2 only.
9900 (license (list license:cddl1.1; actually cddl1.1
9901 license:gpl2)))); with classpath exception
0b54e190
JL
9902
9903(define-public java-jdom
9904 (package
9905 (name "java-jdom")
9906 (version "1.1.3")
9907 (source (origin
9908 (method url-fetch)
9909 (uri (string-append "http://jdom.org/dist/binary/archive/jdom-"
9910 version ".tar.gz"))
9911 (sha256
9912 (base32
9913 "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl"))))
9914 (build-system ant-build-system)
9915 (arguments
9916 `(#:build-target "package"
9917 #:tests? #f; tests are run as part of the build process
9918 #:phases
9919 (modify-phases %standard-phases
9920 (replace 'install
9921 (install-jars "build")))))
9922 (home-page "http://jdom.org/")
9923 (synopsis "Access, manipulate, and output XML data")
9924 (description "Java-based solution for accessing, manipulating, and
9925outputting XML data from Java code.")
9926 (license license:bsd-4)))
78745d33
JL
9927
9928(define-public java-geronimo-xbean-reflect
9929 (package
9930 (name "java-geronimo-xbean-reflect")
9931 (version "4.5")
9932 (source (origin
9933 (method svn-fetch)
9934 (uri (svn-reference
9935 (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/")
9936 (revision 1807396)))
9937 (file-name (string-append name "-" version))
9938 (sha256
9939 (base32
9940 "18q3i6jgm6rkw8aysfgihgywrdc5nvijrwnslmi3ww497jvri6ja"))))
9941 (build-system ant-build-system)
9942 (arguments
9943 `(#:jar-name "geronimo-xbean-reflect.jar"
9944 #:source-dir "xbean-reflect/src/main/java"
9945 #:test-dir "xbean-reflect/src/test"
9946 #:jdk ,icedtea-8
9947 #:test-exclude
9948 (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java"
9949 "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java"
9950 "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java")
9951 #:phases
9952 (modify-phases %standard-phases
9953 (add-before 'build 'fix-source
9954 (lambda _
9955 (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/"))
9956 ;; org.apache.xbean.asm6 is actually repackaged java-asm
9957 (substitute* (string-append dir "XbeanAsmParameterNameLoader.java")
9958 (("org.apache.xbean.asm5") "org.objectweb.asm"))
9959 #t))))))
9960 (inputs
9961 `(("asm" ,java-asm)
9962 ("log4j" ,java-log4j-api)
9963 ("log4j-1.2" ,java-log4j-1.2-api)
9964 ("log4j-core" ,java-log4j-core)
9965 ("logging" ,java-commons-logging-minimal)))
9966 (native-inputs
9967 `(("junit" ,java-junit)))
9968 (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/")
9969 (synopsis "Dependency injection helper")
9970 (description "Xbean-reflect provides very flexible ways to create objects
9971and graphs of objects for dependency injection frameworks")
9972 (license license:asl2.0)))
09c44196 9973
3fda539b
JL
9974(define-public java-geronimo-xbean-bundleutils
9975 (package
9976 (inherit java-geronimo-xbean-reflect)
9977 (name "java-geronimo-xbean-bundleutils")
9978 (arguments
9979 `(#:jar-name "geronimo-xbean-bundleutils.jar"
9980 #:source-dir "xbean-bundleutils/src/main/java"
9981 #:test-dir "xbean-bundleutils/src/test"
9982 #:phases
9983 (modify-phases %standard-phases
9984 (add-before 'build 'fix-java
9985 (lambda _
9986 ;; We use a more recent version of osgi, so this file requires
9987 ;; more interface method implementations.
9988 (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java"
9989 (("import org.osgi.framework.ServiceRegistration;")
9990 "import org.osgi.framework.ServiceRegistration;
9991import org.osgi.framework.ServiceFactory;
9992import java.util.Collection;
9993import org.osgi.framework.ServiceObjects;")
9994 (("public Bundle getBundle\\(\\)")
9995 "@Override
9996public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) {
9997 throw new UnsupportedOperationException();
9998}
9999@Override
10000public <S> ServiceRegistration<S> registerService(Class<S> clazz,
10001 ServiceFactory<S> factory, Dictionary<String, ?> properties) {
10002 throw new UnsupportedOperationException();
10003}
10004public Bundle getBundle()"))
10005 #t)))))
10006 (inputs
10007 `(("java-slf4j" ,java-slf4j-api)
10008 ("java-asm" ,java-asm)
10009 ("java-osgi-framework" ,java-osgi-framework)
10010 ("java-eclipse-osgi" ,java-eclipse-osgi)
10011 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)))))
0cb9ce32
JL
10012
10013(define-public java-geronimo-xbean-asm-util
10014 (package
10015 (inherit java-geronimo-xbean-reflect)
10016 (name "java-geronimo-xbean-asm-util")
10017 (arguments
10018 `(#:jar-name "geronimo-xbean-asm-util.jar"
10019 #:source-dir "xbean-asm-util/src/main/java"
10020 #:tests? #f)); no tests
10021 (inputs
10022 `(("java-asm" ,java-asm)))
10023 (native-inputs '())))
8d510f65
JL
10024
10025(define-public java-geronimo-xbean-finder
10026 (package
10027 (inherit java-geronimo-xbean-reflect)
10028 (name "java-geronimo-xbean-finder")
10029 (arguments
10030 `(#:jar-name "geronimo-xbean-finder.jar"
10031 #:source-dir "xbean-finder/src/main/java"
10032 #:test-dir "xbean-finder/src/test"))
10033 (inputs
10034 `(("java-slf4j-api" ,java-slf4j-api)
10035 ("java-asm" ,java-asm)
10036 ("java-geronimo-xbean-bundleutils" ,java-geronimo-xbean-bundleutils)
10037 ("java-geronimo-xbean-asm-util" ,java-geronimo-xbean-asm-util)
10038 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)
10039 ("java-osgi-framework" ,java-osgi-framework)))
10040 (native-inputs
10041 `(("java-junit" ,java-junit)
10042 ("java-hamcrest-core" ,java-hamcrest-core)))))
3fda539b 10043
09c44196
JL
10044(define-public java-gson
10045 (package
10046 (name "java-gson")
10047 (version "2.8.2")
10048 (source (origin
10049 (method url-fetch)
10050 (uri (string-append "https://github.com/google/gson/archive/"
10051 "gson-parent-" version ".tar.gz"))
10052 (sha256
10053 (base32
10054 "1j4qnp7v046q0k48c4kyf69sxaasx2h949d3cqwsm3kzxms3x0f9"))))
10055 (build-system ant-build-system)
10056 (arguments
10057 `(#:jar-name "gson.jar"
10058 #:source-dir "gson/src/main/java"
10059 #:test-dir "gson/src/test"))
10060 (native-inputs
10061 `(("java-junit" ,java-junit)
10062 ("java-hamcrest-core" ,java-hamcrest-core)))
10063 (home-page "https://github.com/google/gson")
10064 (synopsis "Java serialization/deserialization library from/to JSON")
10065 (description "Gson is a Java library that can be used to convert Java
10066Objects into their JSON representation. It can also be used to convert a JSON
10067string to an equivalent Java object. Gson can work with arbitrary Java objects
10068including pre-existing objects that you do not have source-code of.")
10069 (license license:asl2.0)))
335aa20b
JL
10070
10071(define-public java-hawtjni
10072 (package
10073 (name "java-hawtjni")
10074 (version "1.15")
10075 (source (origin
10076 (method url-fetch)
10077 (uri (string-append "https://github.com/fusesource/hawtjni/archive/"
10078 "hawtjni-project-" version ".tar.gz"))
10079 (sha256
10080 (base32
10081 "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g"))))
10082 (build-system ant-build-system)
10083 (arguments
10084 `(#:jar-name "hawtjni.jar"
10085 #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java"
10086 #:tests? #f; no tests
10087 #:phases
10088 (modify-phases %standard-phases
10089 (add-before 'build 'build-native
10090 (lambda* (#:key inputs #:allow-other-keys)
6338ea9a
RW
10091 (let ((include (string-append "-I" (assoc-ref inputs "jdk") "/include/linux")))
10092 (with-directory-excursion "hawtjni-generator/src/main/resources/"
10093 (invoke "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o"
10094 "-fPIC" "-O2" include)
10095 (invoke "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o"
10096 "-fPIC" "-O2" include)
10097 (invoke "gcc" "-o" "libhawtjni.so" "-shared"
10098 "hawtjni.o" "hawtjni-callback.o")))
10099 #t))
335aa20b
JL
10100 (add-after 'install 'install-native
10101 (lambda* (#:key outputs #:allow-other-keys)
10102 (let* ((out (assoc-ref outputs "out"))
10103 (lib (string-append out "/lib"))
10104 (inc (string-append out "/include")))
335aa20b 10105 (with-directory-excursion "hawtjni-generator/src/main/resources/"
6338ea9a
RW
10106 (install-file "libhawtjni.so" lib)
10107 (install-file "hawtjni.h" inc)))
335aa20b
JL
10108 #t)))))
10109 (inputs
10110 `(("java-commons-cli" ,java-commons-cli)
10111 ("java-asm" ,java-asm)
10112 ("java-geronimo-xbean-finder" ,java-geronimo-xbean-finder)))
10113 (home-page "https://fusesource.github.io/hawtjni/")
10114 (synopsis "JNI code generator")
10115 (description "HawtJNI is a code generator that produces the JNI code needed
10116to implement Java native methods. It is based on the jnigen code generator
10117that is part of the SWT Tools project.")
10118 (license license:asl2.0)))
d0c62afa
JL
10119
10120(define-public java-jansi-native
10121 (package
10122 (name "java-jansi-native")
10123 (version "1.7")
10124 (source (origin
10125 (method url-fetch)
10126 (uri (string-append "https://github.com/fusesource/jansi-native/"
10127 "archive/jansi-native-" version ".tar.gz"))
10128 (sha256
10129 (base32
10130 "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf"))))
10131 (build-system ant-build-system)
10132 (arguments
10133 `(#:jar-name "jansi-native.jar"
10134 #:source-dir "src/main/java"
10135 #:tests? #f; no tests
10136 #:phases
10137 (modify-phases %standard-phases
10138 (add-before 'build 'build-native
10139 (lambda* (#:key inputs #:allow-other-keys)
10140 ;; there are more required files for windows in windows/
10141 (with-directory-excursion "src/main/native-package/src"
10142 (substitute* "jansi_ttyname.c"
10143 (("#include \"jansi_.*") ""))
e85c1bf6
RW
10144 (invoke "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o"
10145 (string-append "-I" (assoc-ref inputs "java-hawtjni")
10146 "/include")
10147 (string-append "-I" (assoc-ref inputs "jdk")
10148 "/include/linux")
10149 "-fPIC" "-O2")
2c8ac364 10150 (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o"))))
d0c62afa
JL
10151 (add-before 'build 'install-native
10152 (lambda _
10153 (let ((dir (string-append "build/classes/META-INF/native/"
10154 ,(match (%current-system)
10155 ((or "i686-linux" "armhf-linux")
10156 "linux32")
3c4103c8
LC
10157 ((or "x86_64-linux" "aarch64-linux"
10158 "mips64el-linux")
d0c62afa
JL
10159 "linux64")))))
10160 (install-file "src/main/native-package/src/libjansi.so" dir))
10161 #t))
10162 (add-after 'install 'install-native
10163 (lambda* (#:key outputs #:allow-other-keys)
d0c62afa
JL
10164 (install-file "src/main/native-package/src/jansi.h"
10165 (string-append (assoc-ref outputs "out") "/include"))
10166 #t)))))
10167 (inputs
10168 `(("java-hawtjni" ,java-hawtjni)))
10169 (home-page "https://fusesource.github.io/jansi/")
10170 (synopsis "Native library for jansi")
3d6925ef
RW
10171 (description "This package provides the native library for jansi, a small
10172Java library that allows you to use ANSI escape sequences to format your
10173console output.")
d0c62afa 10174 (license license:asl2.0)))
a87ea1ad
JL
10175
10176(define-public java-jansi
10177 (package
10178 (name "java-jansi")
10179 (version "1.16")
10180 (source (origin
10181 (method url-fetch)
10182 (uri (string-append "https://github.com/fusesource/jansi/archive/"
10183 "jansi-project-" version ".tar.gz"))
10184 (sha256
10185 (base32
10186 "11kh3144i3fzp21dpy8zg52mjmsr214k7km9p8ly0rqk2px0qq2z"))))
10187 (build-system ant-build-system)
10188 (arguments
10189 `(#:jar-name "jansi.jar"
10190 #:source-dir "jansi/src/main/java"
10191 #:test-dir "jansi/src/test"
10192 #:phases
10193 (modify-phases %standard-phases
10194 (add-after 'check 'clear-term
10195 (lambda _
2c8ac364 10196 (invoke "echo" "-e" "\\e[0m"))))))
a87ea1ad
JL
10197 (inputs
10198 `(("java-jansi-native" ,java-jansi-native)))
10199 (native-inputs
10200 `(("java-junit" ,java-junit)
10201 ("java-hamcrest-core" ,java-hamcrest-core)))
10202 (home-page "https://fusesource.github.io/jansi/")
10203 (synopsis "Portable ANSI escape sequences")
10204 (description "Jansi is a Java library that allows you to use ANSI escape
10205sequences to format your console output which works on every platform.")
10206 (license license:asl2.0)))
cc061329
JL
10207
10208(define-public java-jboss-el-api-spec
10209 (package
10210 (name "java-jboss-el-api-spec")
10211 (version "3.0")
10212 (source (origin
10213 (method url-fetch)
10214 (uri (string-append "https://github.com/jboss/jboss-el-api_spec/"
10215 "archive/jboss-el-api_" version
10216 "_spec-1.0.7.Final.tar.gz"))
10217 (sha256
10218 (base32
10219 "1j45ljxalwlibxl7g7iv952sjxkw275m8vyxxij8l6wdd5pf0pdh"))))
10220 (build-system ant-build-system)
10221 (arguments
10222 `(#:jar-name "java-jboss-el-api_spec.jar"
10223 #:jdk ,icedtea-8))
10224 (inputs
10225 `(("java-junit" ,java-junit)))
10226 (home-page "https://github.com/jboss/jboss-el-api_spec")
10227 (synopsis "JSR-341 expression language 3.0 API")
10228 (description "This package contains an implementation of the JSR-341
10229specification for the expression language 3.0. It implements an expression
10230language inspired by ECMAScript and XPath. This language is used with
10231JavaServer Pages (JSP).")
10232 ;; Either GPL2 only or CDDL.
10233 (license (list license:gpl2 license:cddl1.1))))
cc03a786
JL
10234
10235(define-public java-jboss-interceptors-api-spec
10236 (package
10237 (name "java-jboss-interceptors-api-spec")
10238 (version "1.2")
10239 (source (origin
10240 (method url-fetch)
10241 (uri (string-append "https://github.com/jboss/jboss-interceptors-api_spec/"
10242 "archive/jboss-interceptors-api_" version
10243 "_spec-1.0.0.Final.tar.gz"))
10244 (sha256
10245 (base32
10246 "0wv8x0jp9a5qxlrgkhb5jdk2gr6vi87b4j4kjb8ryxiy9gn8g51z"))))
10247 (build-system ant-build-system)
10248 (arguments
10249 `(#:jar-name "java-jboss-interceptors-api_spec.jar"
10250 #:jdk ,icedtea-8
10251 #:source-dir "."
10252 #:tests? #f)); no tests
10253 (home-page "https://github.com/jboss/jboss-interceptors-api_spec")
10254 (synopsis "Interceptors 1.2 API classes from JSR 318")
10255 (description "Java-jboss-interceptors-api-spec implements the Interceptors
10256API. Interceptors are used to interpose on business method invocations and
10257specific events.")
10258 ;; Either GPL2 only or CDDL.
10259 (license (list license:gpl2 license:cddl1.1))))
a10a451c
JL
10260
10261(define-public java-cdi-api
10262 (package
10263 (name "java-cdi-api")
10264 (version "2.0")
10265 (source (origin
10266 (method url-fetch)
10267 (uri (string-append "https://github.com/cdi-spec/cdi/archive/"
10268 version ".tar.gz"))
10269 (file-name (string-append name "-" version ".tar.gz"))
10270 (sha256
10271 (base32
10272 "1iv8b8bp07c5kmqic14jsr868vycjv4qv02lf3pkgp9z21mnfg5y"))))
10273 (build-system ant-build-system)
10274 (arguments
10275 `(#:source-dir "api/src/main/java"
10276 #:jar-name "java-cdi-api.jar"
10277 #:test-dir "api/src/test"
10278 #:jdk ,icedtea-8
10279 #:tests? #f)); Tests fail because we don't have a CDI provider yet
10280 (inputs
10281 `(("java-javax-inject" ,java-javax-inject)
10282 ("java-jboss-el-api-spec" ,java-jboss-el-api-spec)
10283 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)))
10284 (native-inputs
10285 `(("java-testng" ,java-testng)
10286 ("java-hamcrest-core" ,java-hamcrest-core)))
10287 (home-page "http://cdi-spec.org/")
10288 (synopsis "Contexts and Dependency Injection APIs")
10289 (description "Java-cdi-api contains the required APIs for Contexts and
10290Dependency Injection (CDI).")
10291 (license license:asl2.0)))
d57fd728
JL
10292
10293(define-public java-joda-convert
10294 (package
10295 (name "java-joda-convert")
10296 (version "1.9.2")
10297 (source (origin
10298 (method url-fetch)
10299 (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v"
10300 version ".tar.gz"))
10301 (file-name (string-append name "-" version ".tar.gz"))
10302 (sha256
10303 (base32
10304 "0vp346xz7dh9br4q7xazhc7hvzf76a6hf95fki9bg67q5jr0kjh7"))))
10305 (build-system ant-build-system)
10306 (arguments
10307 `(#:jar-name (string-append ,name "-" ,version ".jar")
10308 #:source-dir "src/main/java"
10309 #:test-include (list "**/Test*.java")
10310 ;; Contains only interfaces and base classes (no test)
10311 #:test-exclude (list "**/test*/**.java")))
10312 (inputs
10313 `(("java-guava" ,java-guava)))
10314 (native-inputs
10315 `(("java-junit" ,java-junit)
10316 ("java-hamcrest-core" ,java-hamcrest-core)))
c82ddf33 10317 (home-page "https://www.joda.org/joda-convert/")
d57fd728
JL
10318 (synopsis "Conversion between Objects and Strings")
10319 (description "Joda-Convert provides a small set of classes to aid
10320conversion between Objects and Strings. It is not intended to tackle the
10321wider problem of Object to Object transformation.")
10322 (license license:asl2.0)))
0158ea8a
JL
10323
10324(define-public java-joda-time
10325 (package
10326 (name "java-joda-time")
10327 (version "2.9.9")
10328 (source (origin
10329 (method url-fetch)
10330 (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v"
10331 version ".tar.gz"))
10332 (file-name (string-append name "-" version ".tar.gz"))
10333 (sha256
10334 (base32
10335 "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1"))))
10336 (build-system ant-build-system)
10337 (arguments
10338 `(#:jar-name "java-joda-time.jar"
10339 #:source-dir "src/main/java"
10340 #:test-include (list "**/Test*.java")
10341 ;; There is no runnable test in these files
10342 #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java")
10343 #:phases
10344 (modify-phases %standard-phases
10345 (add-after 'build 'build-resources
10346 (lambda _
10347 (mkdir-p "build/classes/org/joda/time/tz/data")
10348 (mkdir-p "build/classes/org/joda/time/format")
6d0368eb
JL
10349 ;; This will produce the following exception:
10350 ;; java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap"
10351 ;; which is normal, because it doesn't exist yet. It still generates
10352 ;; the same file as in the binary one can find on maven.
10353 (invoke "java" "-cp"
10354 (string-append "build/classes:" (getenv "CLASSPATH"))
10355 "org.joda.time.tz.ZoneInfoCompiler"
10356 "-src" "src/main/java/org/joda/time/tz/src"
10357 "-dst" "build/classes/org/joda/time/tz/data"
10358 "africa" "antarctica" "asia" "australasia"
10359 "europe" "northamerica" "southamerica"
10360 "pacificnew" "etcetera" "backward" "systemv")
0158ea8a
JL
10361 (for-each (lambda (f)
10362 (copy-file f (string-append
10363 "build/classes/org/joda/time/format/"
10364 (basename f))))
10365 (find-files "src/main/java/org/joda/time/format" ".*.properties"))
10366 #t))
10367 (add-before 'install 'regenerate-jar
10368 (lambda _
10369 ;; We need to regenerate the jar file to add generated data.
10370 (delete-file "build/jar/java-joda-time.jar")
6d0368eb 10371 (invoke "ant" "jar")))
0158ea8a
JL
10372 (add-before 'check 'copy-test-resources
10373 (lambda _
10374 (mkdir-p "build/test-classes/org/joda/time/tz/data")
10375 (copy-file "src/test/resources/tzdata/ZoneInfoMap"
10376 "build/test-classes/org/joda/time/tz/data/ZoneInfoMap")
10377 (copy-recursively "src/test/resources" "build/test-classes")
10378 #t)))))
10379 (inputs
10380 `(("java-joda-convert" ,java-joda-convert)))
10381 (native-inputs
10382 `(("java-junit" ,java-junit)
10383 ("java-hamcrest-core" ,java-hamcrest-core)
10384 ("tzdata" ,tzdata)))
14544d2f 10385 (home-page "https://www.joda.org/joda-time/")
0158ea8a
JL
10386 (synopsis "Replacement for the Java date and time classes")
10387 (description "Joda-Time is a replacement for the Java date and time
10388classes prior to Java SE 8.")
10389 (license license:asl2.0)))
6d0368eb
JL
10390
10391(define-public java-xerces
10392 (package
10393 (name "java-xerces")
10394 (version "2.11.0")
10395 (source
10396 (origin
10397 (method url-fetch)
10398 (uri (string-append "mirror://apache/xerces/j/source/"
10399 "Xerces-J-src." version ".tar.gz"))
10400 (sha256
10401 (base32 "1006igwy2lqrmjvdk64v8dg6qbk9c29pm8xxx7r87n0vnpvmx6pm"))
10402 (patches (search-patches
10403 "java-xerces-xjavac_taskdef.patch"
10404 "java-xerces-build_dont_unzip.patch"
10405 "java-xerces-bootclasspath.patch"))))
10406 (build-system ant-build-system)
10407 (arguments
10408 `(#:tests? #f;; Test files are not present
10409 #:test-target "test"
10410 #:jdk ,icedtea-8
10411 #:phases
10412 (modify-phases %standard-phases
10413 (add-after 'unpack 'create-build.properties
10414 (lambda* (#:key inputs #:allow-other-keys)
10415 (let ((jaxp (assoc-ref inputs "java-jaxp"))
10416 (resolver (assoc-ref inputs "java-apache-xml-commons-resolver")))
10417 (with-output-to-file "build.properties"
10418 (lambda _
10419 (format #t
10420 "jar.jaxp = ~a/share/java/jaxp.jar~@
10421 jar.apis-ext = ~a/share/java/jaxp.jar~@
10422 jar.resolver = ~a/share/java/xml-resolver.jar~%"
10423 jaxp jaxp resolver)))
10424 ;; Make xerces use our version of jaxp in tests
10425 (substitute* "build.xml"
10426 (("xml-apis.jar")
10427 (string-append jaxp "/share/java/jaxp.jar"))
10428 (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}")
10429 "${jar.apis}")))
10430 #t))
10431 (replace 'install (install-jars "build")))))
10432 (inputs
10433 `(("java-apache-xml-commons-resolver" ,java-apache-xml-commons-resolver)
10434 ("java-jaxp" ,java-jaxp)))
10435 (home-page "https://xerces.apache.org/xerces2-j/")
10436 (synopsis "Validating XML parser for Java with DOM level 3 support")
10437 (description "The Xerces2 Java parser is the reference implementation of
10438XNI, the Xerces Native Interface, and also a fully conforming XML Schema
10439processor.
10440
10441Xerces2-J supports the following standards and APIs:
10442
10443@itemize
10444@item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation
10445@item Namespaces in XML Recommendation
10446@item Document Object Model (DOM) Level 2 Core, Events, and Traversal and
10447 Range Recommendations
10448@item Simple API for XML (SAX) 2.0.1 Core and Extension
10449@item Java APIs for XML Processing (JAXP) 1.2.01
10450@item XML Schema 1.0 Structures and Datatypes Recommendations
10451@item Experimental implementation of the Document Object Model (DOM) Level 3
10452 Core and Load/Save Working Drafts
10453@item Provides a partial implementation of the XML Inclusions (XInclude) W3C
10454 Candidate Recommendation
10455@end itemize
10456
10457Xerces is now able to parse documents written according to the XML 1.1
10458Candidate Recommendation, except that it does not yet provide an option to
10459enable normalization checking as described in section 2.13 of this
10460specification. It also handles namespaces according to the XML Namespaces 1.1
10461Candidate Recommendation, and will correctly serialize XML 1.1 documents if
10462the DOM level 3 load/save API's are in use.")
10463 (license license:asl2.0)))
e06bf428 10464
ae6922ed
DM
10465(define-public java-jakarta-regexp
10466 (package
10467 (name "java-jakarta-regexp")
10468 (version "1.5")
10469 (source
10470 (origin
10471 (method url-fetch)
10472 (uri (string-append
10473 "https://archive.apache.org/dist/jakarta/regexp/jakarta-regexp-"
10474 version ".tar.gz"))
10475 (sha256
10476 (base32
10477 "0zg9rmyif48dck0cv6ynpxv23mmcsx265am1fnnxss7brgw0ms3r"))))
10478 (build-system ant-build-system)
10479 (arguments
10480 `(#:test-target "test"
10481 #:phases
10482 (modify-phases %standard-phases
10483 (replace 'install
10484 (lambda* (#:key outputs #:allow-other-keys)
10485 (let* ((out (assoc-ref outputs "out"))
10486 (out-share (string-append out "/share/java")))
10487 (mkdir-p out-share)
10488 (for-each (lambda (name)
10489 (install-file name out-share))
10490 (find-files "build" "^jakarta-regexp-.*\\.jar$"))
10491 #t))))))
10492 (home-page "https://attic.apache.org/projects/jakarta-regexp.html")
10493 (synopsis "Regular expression parser generator for Java.")
10494 (description "@code{jakarta-regexp} is an old regular expression parser
10495generator for Java.")
10496 (license license:asl2.0)))
10497
e06bf428
JL
10498(define-public java-jline
10499 (package
10500 (name "java-jline")
10501 (version "1.0")
10502 (source (origin
10503 (method url-fetch)
10504 (uri (string-append "https://github.com/jline/jline1/archive/jline-"
10505 version ".tar.gz"))
10506 (sha256
10507 (base32
10508 "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir"))))
10509 (build-system ant-build-system)
10510 (arguments
10511 `(#:jar-name "jline.jar"
10512 #:source-dir "src/main/java"
10513 #:test-dir "src/test"
10514 #:phases
10515 (modify-phases %standard-phases
10516 (add-before 'build 'copy-resources
10517 (lambda _
10518 (copy-recursively "src/main/resources" "build/classes")
10519 #t)))))
10520 (native-inputs
10521 `(("java-junit" ,java-junit)))
10522 (home-page "https://jline.github.io")
10523 (synopsis "Console input handling library")
10524 (description "JLine is a Java library for handling console input. It is
10525similar in functionality to BSD editline and GNU readline but with additional
10526features that bring it on par with the Z shell line editor.")
10527 (license license:bsd-3)))
7ac4f054 10528
49d74311
JL
10529(define-public java-jline-2
10530 (package
10531 (inherit java-jline)
10532 (version "2.14.5")
10533 (source (origin
10534 (method url-fetch)
10535 (uri (string-append "https://github.com/jline/jline2/archive/jline-"
10536 version ".tar.gz"))
10537 (sha256
10538 (base32
10539 "1c6qa26mf0viw8hg4jnv72s7i1qb1gh1l8rrzcdvqhqhx82rkdlf"))))
10540 (arguments
10541 `(#:jdk ,icedtea-8
10542 ,@(package-arguments java-jline)))
10543 (inputs
10544 `(("java-jansi" ,java-jansi)
10545 ("java-jansi-native" ,java-jansi-native)))
10546 (native-inputs
10547 `(("java-powermock-modules-junit4" ,java-powermock-modules-junit4)
10548 ("java-powermock-modules-junit4-common" ,java-powermock-modules-junit4-common)
10549 ("java-powermock-api-easymock" ,java-powermock-api-easymock)
10550 ("java-powermock-api-support" ,java-powermock-api-support)
10551 ("java-powermock-core" ,java-powermock-core)
10552 ("java-powermock-reflect" ,java-powermock-reflect)
10553 ("java-easymock" ,java-easymock)
10554 ("java-jboss-javassist" ,java-jboss-javassist)
10555 ("java-objenesis" ,java-objenesis)
10556 ("java-asm" ,java-asm)
10557 ("java-hamcrest-core" ,java-hamcrest-core)
10558 ("java-cglib" ,java-cglib)
10559 ("java-junit" ,java-junit)
10560 ("java-hawtjni" ,java-hawtjni)))))
10561
7ac4f054
JL
10562(define-public java-xmlunit
10563 (package
10564 (name "java-xmlunit")
10565 (version "2.5.1")
10566 (source (origin
10567 (method url-fetch)
10568 (uri (string-append "https://github.com/xmlunit/xmlunit/archive/v"
10569 version ".tar.gz"))
10570 (file-name (string-append name "-" version ".tar.gz"))
10571 (sha256
10572 (base32
10573 "035rivlnmwhfqj0fzviciv0bkh1h95ps1iwnh2kjcvdbk5nccm4z"))))
10574 (build-system ant-build-system)
10575 (arguments
10576 `(#:jar-name "java-xmlunit.jar"
10577 #:source-dir "xmlunit-core/src/main/java"
10578 #:test-dir "xmlunit-core/src/test"
10579 #:phases
10580 (modify-phases %standard-phases
10581 (add-before 'check 'copy-test-resources
10582 (lambda* (#:key inputs #:allow-other-keys)
10583 (copy-recursively (assoc-ref inputs "resources") "../test-resources")
10584 #t)))))
10585 (native-inputs
10586 `(("java-junit" ,java-junit)
10587 ("java-mockito-1" ,java-mockito-1)
10588 ("java-hamcrest-all" ,java-hamcrest-all)
10589 ("java-objenesis" ,java-objenesis)
10590 ("java-asm" ,java-asm)
10591 ("java-cglib" ,java-cglib)
10592 ("resources"
10593 ,(origin
10594 (method git-fetch)
10595 (uri (git-reference
10596 (url "https://github.com/xmlunit/test-resources.git")
10597 (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec")))
10598 (file-name "java-xmlunit-test-resources")
10599 (sha256
10600 (base32
10601 "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr"))))))
10602 (home-page "http://www.xmlunit.org/")
10603 (synopsis "XML output testing")
10604 (description "XMLUnit provides you with the tools to verify the XML you
10605emit is the one you want to create. It provides helpers to validate against
10606an XML Schema, assert the values of XPath queries or compare XML documents
10607against expected outcomes.")
10608 (license license:asl2.0)))
73a1f10a
JL
10609
10610(define-public java-xmlunit-legacy
10611 (package
10612 (inherit java-xmlunit)
10613 (name "java-xmlunit-legacy")
10614 (arguments
10615 `(#:jar-name "java-xmlunit-legacy.jar"
10616 #:source-dir "xmlunit-legacy/src/main/java"
10617 #:test-dir "xmlunit-legacy/src/test"))
10618 (inputs
10619 `(("java-xmlunit" ,java-xmlunit)
10620 ("java-junit" ,java-junit)))
10621 (native-inputs
10622 `(("java-mockito-1" ,java-mockito-1)))))
93abc975 10623
f5cc5ead
JL
10624(define-public java-xmlunit-matchers
10625 (package
10626 (inherit java-xmlunit)
10627 (name "java-xmlunit-matchers")
10628 (arguments
10629 `(#:jar-name "java-xmlunit-matchers.jar"
10630 #:source-dir "xmlunit-matchers/src/main/java"
10631 #:test-dir "xmlunit-matchers/src/test"
10632 #:test-exclude
10633 ;; Cannot open xsd for http://www.xmlunit.org/test-support/Book.xsd
10634 (list "**/ValidationMatcherTest.java")
10635 #:phases
10636 (modify-phases %standard-phases
10637 (add-before 'build 'copy-test-class
10638 (lambda _
10639 (copy-file "xmlunit-core/src/test/java/org/xmlunit/TestResources.java"
10640 "xmlunit-matchers/src/test/java/org/xmlunit/TestResources.java")
10641 #t))
10642 (add-before 'build 'fix-test-resources-path
10643 (lambda _
10644 (substitute* (find-files "xmlunit-matchers/src/test" ".*.java")
10645 (("../test-resources") "test-resources"))
10646 #t))
10647 (add-before 'check 'copy-test-resources
10648 (lambda* (#:key inputs #:allow-other-keys)
10649 (copy-recursively (assoc-ref inputs "resources") "test-resources")
10650 #t)))))
10651 (inputs
10652 `(("java-xmlunit" ,java-xmlunit)
10653 ("java-junit" ,java-junit)))))
10654
93abc975
RW
10655(define-public java-openchart2
10656 (package
10657 (name "java-openchart2")
10658 (version "1.4.3")
10659 (source (origin
10660 (method url-fetch)
10661 (uri (string-append "http://download.approximatrix.com/openchart2/"
10662 "openchart2-" version ".source.zip"))
10663 (sha256
10664 (base32
10665 "1xq96zm5r02n1blja0072jmmsifmxc40lbyfbnmcnr6mw42frh4g"))))
10666 (build-system ant-build-system)
10667 (arguments
10668 `(#:test-target "test"
10669 #:phases
10670 (modify-phases %standard-phases
10671 (add-after 'unpack 'fix-junit-errors
10672 (lambda _
10673 (with-directory-excursion "unittest/src/com/approximatrix/charting/"
10674 (substitute* '("coordsystem/ticklocator/NumericXTickLocatorTest.java"
10675 "coordsystem/ticklocator/NumericYTickLocatorTest.java"
10676 "coordsystem/ticklocator/ObjectXTickLocatorTest.java"
10677 "model/DefaultChartDataModelConstraintsTest.java"
10678 "model/MultiScatterDataModelConstraintsTest.java"
10679 "model/threedimensional/DotPlotDataModelConstraintsTest.java")
10680 (("(assertEquals[^;]+);" before _)
10681 (string-append (string-drop-right before 2) ", 1E-6);"))))
10682 #t))
10683 (replace 'install (install-jars ".")))))
10684 (native-inputs
10685 `(("unzip" ,unzip)
10686 ("java-junit" ,java-junit)
10687 ("java-hamcrest-core" ,java-hamcrest-core)))
a809d632 10688 (home-page "https://approximatrix.com/products/openchart2/")
93abc975
RW
10689 (synopsis "Simple plotting for Java")
10690 (description "Openchart2 provides a simple, yet powerful, interface for
10691Java programmers to create two-dimensional charts and plots. The library
10692features an assortment of graph styles, including advanced scatter plots, bar
10693graphs, and pie charts.")
10694 (license license:lgpl2.1+)))
5f5b31c6
JL
10695
10696(define-public java-commons-httpclient
10697 (package
10698 (name "java-commons-httpclient")
10699 (version "3.1")
10700 (source (origin
10701 (method url-fetch)
10702 (uri (string-append "https://archive.apache.org/dist/httpcomponents/"
10703 "commons-httpclient/source/commons-httpclient-"
10704 version "-src.tar.gz"))
10705 (sha256
10706 (base32
10707 "1wlpn3cfy3d4inxy6g7wxcsa8p7sshn6aldk9y4ia3lb879rd97r"))))
10708 (build-system ant-build-system)
10709 (arguments
10710 `(#:build-target "compile"
10711 #:test-target "test"
10712 #:tests? #f; requires junit-textui (junit 3)
10713 #:phases
10714 (modify-phases %standard-phases
10715 (add-before 'build 'fix-accent
10716 (lambda _
10717 (for-each (lambda (file)
10718 (with-fluids ((%default-port-encoding "ISO-8859-1"))
10719 (substitute* file
10720 (("\\* @author Ortwin .*") "* @author Ortwin Glueck\n"))))
10721 '("src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java"
10722 "src/examples/TrivialApp.java" "src/examples/ClientApp.java"
10723 "src/test/org/apache/commons/httpclient/TestHttps.java"
2c8ac364
MW
10724 "src/test/org/apache/commons/httpclient/TestURIUtil2.java"))
10725 #t))
5f5b31c6
JL
10726 (replace 'install
10727 (lambda* (#:key outputs #:allow-other-keys)
10728 (invoke "ant" "dist"
10729 (string-append "-Ddist.home=" (assoc-ref outputs "out")
10730 "/share/java"))
10731 #t)))))
10732 (propagated-inputs
10733 `(("java-commons-logging" ,java-commons-logging-minimal)
10734 ("java-commons-codec" ,java-commons-codec)))
10735 (home-page "https://hc.apache.org")
10736 (synopsis "HTTP/1.1 compliant HTTP agent implementation")
10737 (description "This package contains an HTTP/1.1 compliant HTTP agent
10738implementation. It also provides reusable components for client-side
10739authentication, HTTP state management, and HTTP connection management.")
10740 (license license:asl2.0)))
5fe981dc
JL
10741
10742(define-public java-commons-vfs
10743 (package
10744 (name "java-commons-vfs")
10745 (version "2.2")
10746 (source (origin
10747 (method url-fetch)
10748 (uri (string-append "mirror://apache/commons/vfs/source/"
10749 "commons-vfs2-distribution-" version "-src.tar.gz"))
10750 (file-name (string-append name "-" version ".tar.gz"))
10751 (sha256
10752 (base32
10753 "1cnq1iaghbp4cslpnvwbp83i5v234x87irssqynhwpfgw7caf1s3"))
10754 (modules '((guix build utils)))
10755 (snippet
10756 '(begin
10757 (for-each delete-file
10758 (find-files "." "\\.jar$"))
10759 #t))))
10760 (build-system ant-build-system)
10761 (arguments
10762 `(#:jar-name "commons-vfs.jar"
10763 #:source-dir "commons-vfs2/src/main/java"
10764 #:test-dir "commons-vfs2/src/test"
10765 ; FIXME: tests depend on many things: apache sshd, hadoop, ftpserver, ...
10766 #:tests? #f
10767 #:phases
10768 (modify-phases %standard-phases
10769 (add-before 'build 'remove-hadoop-and-webdav
10770 ; Remove these files as they are not required and depend on difficult
10771 ; packages.
10772 (lambda _
10773 (for-each delete-file-recursively
10774 '("commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/webdav"
2c8ac364
MW
10775 "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs"))
10776 #t)))))
5fe981dc
JL
10777 (inputs
10778 `(("java-commons-collections4" ,java-commons-collections4)
10779 ("java-commons-compress" ,java-commons-compress)
10780 ("java-commons-httpclient" ,java-commons-httpclient)
10781 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
10782 ("java-commons-net" ,java-commons-net)
10783 ("java-jsch" ,java-jsch)))
4f236f84 10784 (home-page "https://commons.apache.org/proper/commons-vfs/")
52beae7b 10785 (synopsis "Java file system library")
5fe981dc
JL
10786 (description "Commons VFS provides a single API for accessing various
10787different file systems. It presents a uniform view of the files from various
10788different sources, such as the files on local disk, on an HTTP server, or
10789inside a Zip archive.")
10790 (license license:asl2.0)))
f7b512c0
JL
10791
10792(define-public java-jakarta-oro
10793 (package
10794 (name "java-jakarta-oro")
10795 (version "2.0.8")
10796 (source (origin
10797 (method url-fetch)
10798 (uri (string-append "https://archive.apache.org/dist/jakarta/oro/"
10799 "jakarta-oro-" version ".tar.gz"))
10800 (sha256
10801 (base32
10802 "0rpmnsskiwmsy8r0sckz5n5dbvh3vkxx8hpm177c754r8xy3qksc"))
10803 (modules '((guix build utils)))
10804 (snippet
10805 `(begin
10806 (delete-file (string-append "jakarta-oro-" ,version ".jar"))
10807 #t))))
10808 (build-system ant-build-system)
10809 (arguments
10810 `(#:build-target "package"
10811 #:tests? #f; tests are run as part of the build process
10812 #:phases
10813 (modify-phases %standard-phases
10814 (replace 'install
10815 (install-jars ,(string-append "jakarta-oro-" version))))))
10816 (home-page "https://jakarta.apache.org/oro/")
10817 (synopsis "Text-processing for Java")
10818 (description "The Jakarta-ORO Java classes are a set of text-processing
10819Java classes that provide Perl5 compatible regular expressions, AWK-like
10820regular expressions, glob expressions, and utility classes for performing
10821substitutions, splits, filtering filenames, etc. This library is the successor
10822of the OROMatcher, AwkTools, PerlTools, and TextTools libraries originally
10823from ORO, Inc.")
10824 (license license:asl1.1)))
a970288c
JL
10825
10826(define-public java-native-access
10827 (package
10828 (name "java-native-access")
10829 (version "4.5.1")
10830 (source (origin
10831 (method url-fetch)
10832 (uri (string-append "https://github.com/java-native-access/jna/"
10833 "archive/" version ".tar.gz"))
10834 (file-name (string-append name "-" version ".tar.gz"))
10835 (sha256
10836 (base32
10837 "0zrpzkib6b905i018a9pqlzkqinphywr6y4jwv6mwp63jjqvqkd9"))
10838 (modules '((guix build utils)))
10839 (snippet
10840 `(begin
10841 (for-each delete-file (find-files "." ".*.jar"))
10842 (delete-file-recursively "native/libffi")
10843 (delete-file-recursively "dist")
10844 #t))))
10845 (build-system ant-build-system)
10846 (arguments
10847 `(#:tests? #f; FIXME: tests require reflections.jar
10848 #:test-target "test"
10849 #:make-flags (list "-Ddynlink.native=true")
10850 #:phases
10851 (modify-phases %standard-phases
10852 (add-before 'build 'fix-build.xml
10853 (lambda* (#:key inputs #:allow-other-keys)
10854 (substitute* "build.xml"
10855 ;; Since we removed the bundled ant.jar, give the correct path
10856 (("lib/ant.jar") (string-append (assoc-ref inputs "ant") "/lib/ant.jar"))
10857 ;; We removed generated native libraries. We can only rebuild one
10858 ;; so don't fail if we can't find a native library for another architecture.
10859 (("zipfileset") "zipfileset erroronmissingarchive=\"false\""))
10860 ;; Copy test dependencies
10861 (copy-file (string-append (assoc-ref inputs "java-junit")
10862 "/share/java/junit.jar")
10863 "lib/junit.jar")
10864 (copy-file (string-append (assoc-ref inputs "java-hamcrest-core")
10865 "/share/java/hamcrest-core.jar")
10866 "lib/hamcrest-core.jar")
10867 ;; FIXME: once reflections.jar is built, copy it to lib/test.
10868 #t))
10869 (add-before 'build 'build-native
10870 (lambda _
10871 (invoke "ant" "-Ddynlink.native=true" "native")
10872 #t))
10873 (replace 'install
10874 (install-jars "build")))))
10875 (inputs
10876 `(("libffi" ,libffi)
10877 ("libx11" ,libx11)
10878 ("libxt" ,libxt)))
10879 (native-inputs
10880 `(("java-junit" ,java-junit)
10881 ("java-hamcrest-core" ,java-hamcrest-core)))
10882 (home-page "https://github.com/java-native-access/jna")
10883 (synopsis "Access to native shared libraries from Java")
10884 (description "JNA provides Java programs easy access to native shared
10885libraries without writing anything but Java code - no JNI or native code is
10886required. JNA allows you to call directly into native functions using natural
10887Java method invocation.")
10888 ;; Java Native Access project (JNA) is dual-licensed under 2
10889 ;; alternative Free licenses: LGPL 2.1 or later and Apache License 2.0.
10890 (license (list
10891 license:asl2.0
10892 license:lgpl2.1+))))
cfb55cfc
JL
10893
10894(define-public java-native-access-platform
10895 (package
10896 (inherit java-native-access)
10897 (name "java-native-access-platform")
10898 (arguments
10899 `(#:test-target "test"
10900 #:tests? #f; require jna-test.jar
10901 #:phases
10902 (modify-phases %standard-phases
10903 (add-before 'build 'chdir
10904 (lambda _
10905 (chdir "contrib/platform")
10906 #t))
10907 (add-after 'chdir 'fix-ant
10908 (lambda* (#:key inputs #:allow-other-keys)
10909 (substitute* "nbproject/project.properties"
10910 (("../../build/jna.jar")
10911 (string-append (assoc-ref inputs "java-native-access")
10912 "/share/java/jna.jar"))
10913 (("../../lib/hamcrest-core-.*.jar")
10914 (string-append (assoc-ref inputs "java-hamcrest-core")
10915 "/share/java/hamcrest-core.jar"))
10916 (("../../lib/junit.jar")
10917 (string-append (assoc-ref inputs "java-junit")
10918 "/share/java/junit.jar")))
10919 #t))
10920 (replace 'install
10921 (install-jars "dist")))))
10922 (inputs
10923 `(("java-native-access" ,java-native-access)))
10924 (synopsis "Cross-platform mappings for jna")
10925 (description "java-native-access-platfrom has cross-platform mappings
10926and mappings for a number of commonly used platform functions, including a
10927large number of Win32 mappings as well as a set of utility classes that
10928simplify native access.")))
470674a5
JL
10929
10930(define-public java-jsch-agentproxy-core
10931 (package
10932 (name "java-jsch-agentproxy-core")
10933 (version "0.0.8")
10934 (source (origin
10935 (method url-fetch)
10936 (uri (string-append "https://github.com/ymnk/jsch-agent-proxy/archive/"
10937 version ".tar.gz"))
10938 (file-name (string-append name "-" version ".tar.gz"))
10939 (sha256
10940 (base32
10941 "02iqg6jbc1kxvfzqcg6wy9ygqxfm82bw5rf6vnswqy4y572niz4q"))))
10942 (build-system ant-build-system)
10943 (arguments
10944 `(#:jar-name "jsch-agentproxy-core.jar"
10945 #:source-dir "jsch-agent-proxy-core/src/main/java"
10946 #:tests? #f)); no tests
10947 (home-page "https://github.com/ymnk/jsch-agent-proxy")
f1d79c97 10948 (synopsis "Core component of the proxy to ssh-agent and Pageant in Java")
470674a5
JL
10949 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10950and Pageant included Putty. It will be easily integrated into JSch, and users
10951will be allowed to use these programs for authentication.")
10952 (license license:bsd-3)))
f1d79c97
JL
10953
10954(define-public java-jsch-agentproxy-sshagent
10955 (package
10956 (inherit java-jsch-agentproxy-core)
10957 (name "java-jsch-agentproxy-sshagent")
10958 (arguments
10959 `(#:jar-name "jsch-agentproxy-sshagent.jar"
10960 #:source-dir "jsch-agent-proxy-sshagent/src/main/java"
10961 #:tests? #f)); no tests
10962 (inputs
10963 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
10964 (synopsis "Proxy to ssh-agent")
10965 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10966and Pageant included in Putty. This component contains the code for a proxy to
10967ssh-agent.")))
f438e638
JL
10968
10969(define-public java-jsch-agentproxy-usocket-jna
10970 (package
10971 (inherit java-jsch-agentproxy-core)
10972 (name "java-jsch-agentproxy-usocket-jna")
10973 (arguments
10974 `(#:jar-name "jsch-agentproxy-usocket-jna.jar"
10975 #:source-dir "jsch-agent-proxy-usocket-jna/src/main/java"
10976 #:tests? #f)); no tests
10977 (inputs
10978 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10979 ("java-native-access" ,java-native-access)))
10980 (synopsis "USocketFactory implementation using JNA")
10981 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10982and Pageant included in Putty. This component contains an implementation of
10983USocketFactory using @dfn{JNA} (Java Native Access).")))
475225e3
JL
10984
10985(define-public java-jsch-agentproxy-pageant
10986 (package
10987 (inherit java-jsch-agentproxy-core)
10988 (name "java-jsch-agentproxy-pageant")
10989 (arguments
10990 `(#:jar-name "jsch-agentproxy-pageant.jar"
10991 #:source-dir "jsch-agent-proxy-pageant/src/main/java"
10992 #:tests? #f)); no tests
10993 (inputs
10994 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10995 ("java-native-access" ,java-native-access)
10996 ("java-native-access-platform" ,java-native-access-platform)))
10997 (synopsis "Proxy to pageant")
10998 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10999and Pageant included in Putty. This component contains the code for a proxy to
11000pageant.")))
96d6d9c7
JL
11001
11002(define-public java-jsch-agentproxy-usocket-nc
11003 (package
11004 (inherit java-jsch-agentproxy-core)
11005 (name "java-jsch-agentproxy-usocket-nc")
11006 (arguments
11007 `(#:jar-name "jsch-agentproxy-usocket-nc.jar"
11008 #:source-dir "jsch-agent-proxy-usocket-nc/src/main/java"
11009 #:tests? #f)); no tests
11010 (inputs
11011 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
11012 (synopsis "USocketFactory implementation using netcat")
11013 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
11014and Pageant included in Putty. This component contains an implementation of
11015USocketFactory using netcat.")))
5a46b17b
JL
11016
11017(define-public java-jsch-agentproxy-connector-factory
11018 (package
11019 (inherit java-jsch-agentproxy-core)
11020 (name "java-jsch-agentproxy-connector-factory")
11021 (arguments
11022 `(#:jar-name "jsch-agentproxy-connector-factory.jar"
11023 #:source-dir "jsch-agent-proxy-connector-factory/src/main/java"
11024 #:tests? #f)); no tests
11025 (inputs
11026 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
11027 ("java-jsch-agentproxy-sshagent" ,java-jsch-agentproxy-sshagent)
11028 ("java-jsch-agentproxy-usocket-jna" ,java-jsch-agentproxy-usocket-jna)
11029 ("java-jsch-agentproxy-pageant" ,java-jsch-agentproxy-pageant)
11030 ("java-jsch-agentproxy-usocket-nc" ,java-jsch-agentproxy-usocket-nc)))
11031 (synopsis "Connector factory for jsch agent proxy")
11032 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
11033and Pageant included in Putty. This component contains a connector factory.")))
b0fbf596
JL
11034
11035(define-public java-jsch-agentproxy-jsch
11036 (package
11037 (inherit java-jsch-agentproxy-core)
11038 (name "java-jsch-agentproxy-jsch")
11039 (arguments
11040 `(#:jar-name "jsch-agentproxy-jsch.jar"
11041 #:source-dir "jsch-agent-proxy-jsch/src/main/java"
11042 #:tests? #f)); no tests
11043 (inputs
11044 `(("java-jsch" ,java-jsch)
11045 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
11046 (synopsis "JSch integration library for agentproxy")
11047 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
11048and Pageant included in Putty. This component contains a library to use
11049jsch-agent-proxy with JSch.")))
f1f4a4f0
JL
11050
11051(define-public java-apache-ivy
11052 (package
11053 (name "java-apache-ivy")
11054 (version "2.4.0")
11055 (source (origin
11056 (method url-fetch)
11057 (uri (string-append "mirror://apache//ant/ivy/" version
11058 "/apache-ivy-" version "-src.tar.gz"))
11059 (sha256
11060 (base32
11061 "1xkfn57g2m7l6y0xdq75x5rnrgk52m9jx2xah70g3ggl8750hbr0"))
11062 (patches
11063 (search-patches
11064 "java-apache-ivy-port-to-latest-bouncycastle.patch"))))
11065 (build-system ant-build-system)
11066 (arguments
11067 `(#:jar-name "ivy.jar"
11068 #:tests? #f
11069 #:phases
11070 (modify-phases %standard-phases
11071 (add-before 'build 'remove-example
11072 (lambda _
11073 (delete-file-recursively "src/example")
11074 #t))
11075 (add-before 'build 'copy-resources
11076 (lambda _
11077 (with-directory-excursion "src/java"
11078 (for-each (lambda (file)
11079 (install-file file (string-append "../../build/classes/" (dirname file))))
11080 (append
11081 (find-files "." ".*.css")
11082 (find-files "." ".*.ent")
11083 (find-files "." ".*.html")
11084 (find-files "." ".*.properties")
11085 (find-files "." ".*.xsd")
11086 (find-files "." ".*.xsl")
2c8ac364
MW
11087 (find-files "." ".*.xml"))))
11088 #t))
f1f4a4f0
JL
11089 (add-before 'build 'fix-vfs
11090 (lambda _
11091 (substitute*
11092 '("src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java"
11093 "src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java")
11094 (("import org.apache.commons.vfs") "import org.apache.commons.vfs2"))
11095 #t))
11096 (add-before 'install 'copy-manifest
11097 (lambda _
11098 (install-file "META-INF/MANIFEST.MF" "build/classes/META-INF")
11099 #t))
11100 (add-before 'install 'repack
11101 (lambda _
11102 (invoke "jar" "-cmf" "build/classes/META-INF/MANIFEST.MF" "build/jar/ivy.jar"
2c8ac364 11103 "-C" "build/classes" ".")))
f1f4a4f0
JL
11104 (add-after 'install 'install-bin
11105 (lambda* (#:key outputs #:allow-other-keys)
11106 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
11107 (ivy (string-append bin "/ivy"))
11108 (jar (string-append (assoc-ref outputs "out") "/share/java/ivy.jar")))
11109 (mkdir-p bin)
11110 (with-output-to-file ivy
11111 (lambda _
11112 (display (string-append
11113 "#!" (which "sh") "\n"
11114 "if [[ -z $CLASSPATH ]]; then\n"
11115 " cp=\"" (getenv "CLASSPATH") ":" jar "\"\n"
11116 "else\n"
11117 " cp=\"" (getenv "CLASSPATH") ":" jar ":$CLASSPATH\"\n"
11118 "fi\n"
11119 (which "java") " -cp $cp org.apache.ivy.Main $@\n"))))
11120 (chmod ivy #o755)
11121 #t))))))
11122 (inputs
11123 `(("java-bouncycastle" ,java-bouncycastle)
11124 ("java-commons-cli" ,java-commons-cli)
11125 ("java-commons-collections" ,java-commons-collections)
11126 ("java-commons-httpclient" ,java-commons-httpclient)
11127 ("java-commons-lang" ,java-commons-lang)
11128 ("java-commons-vfs" ,java-commons-vfs)
11129 ("java-jakarta-oro" ,java-jakarta-oro)
11130 ("java-jsch" ,java-jsch)
11131 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
11132 ("java-jsch-agentproxy-connector-factory" ,java-jsch-agentproxy-connector-factory)
11133 ("java-jsch-agentproxy-jsch" ,java-jsch-agentproxy-jsch)
11134 ("java-junit" ,java-junit)))
11135 (home-page "https://ant.apache.org/ivy")
11136 (synopsis "Dependency manager for the Java programming language")
11137 (description "Ivy is a tool for managing (recording, tracking, resolving
11138and reporting) project dependencies. It is characterized by the following:
11139
11140@itemize
11141@item flexibility and configurability - Ivy is essentially process agnostic
11142 and is not tied to any methodology or structure. Instead it provides the
11143 necessary flexibility and configurability to be adapted to a broad range
11144 of dependency management and build processes.
11145@item tight integration with Apache Ant - while available as a standalone tool,
11146 Ivy works particularly well with Apache Ant providing a number of
11147 powerful Ant tasks ranging from dependency resolution to dependency
11148 reporting and publication.
11149@end itemize")
11150 (license license:asl2.0)))
1a1810f5
JL
11151
11152(define-public java-eclipse-sisu-inject
11153 (package
11154 (name "java-eclipse-sisu-inject")
11155 (version "0.3.3")
11156 (source (origin
ae69b39e
BH
11157 (method git-fetch)
11158 (uri (git-reference
11159 (url "https://github.com/eclipse/sisu.inject/")
11160 (commit "releases/0.3.3")))
11161 (file-name (git-file-name name version))
1a1810f5
JL
11162 (sha256
11163 (base32
ae69b39e 11164 "0gibc9x0bw0f4ls086fx73610fcspz9g2as7kcpcfhvl5znysvg7"))))
1a1810f5
JL
11165 (build-system ant-build-system)
11166 (arguments
11167 `(#:jar-name "eclipse-sisu-inject.jar"
11168 #:source-dir "org.eclipse.sisu.inject/src"
11169 #:jdk ,icedtea-8
11170 #:tests? #f)); no tests
11171 (inputs
11172 `(("java-guice" ,java-guice)
11173 ("java-guice-servlet" ,java-guice-servlet)
11174 ("java-javax-inject" ,java-javax-inject)
4b472f6a 11175 ("java-javaee-servletapi" ,java-javaee-servletapi)
1a1810f5
JL
11176 ("java-junit" ,java-junit)
11177 ("java-slf4j-api" ,java-slf4j-api)
11178 ("java-jsr305" ,java-jsr305)
11179 ("java-jsr250" ,java-jsr250)
11180 ("java-cdi-api" ,java-cdi-api)
11181 ("java-osgi-framework" ,java-osgi-framework)
11182 ("java-osgi-util-tracker" ,java-osgi-util-tracker)
11183 ("java-testng" ,java-testng)))
11184 (home-page "https://www.eclipse.org/sisu/")
11185 (synopsis "Classpath scanning, auto-binding, and dynamic auto-wiring")
11186 (description "Sisu is a modular JSR330-based container that supports
11187classpath scanning, auto-binding, and dynamic auto-wiring. Sisu uses
11188Google-Guice to perform dependency injection and provide the core JSR330
11189support, but removes the need to write explicit bindings in Guice modules.
11190Integration with other containers via the Eclipse Extension Registry and the
11191OSGi Service Registry is a goal of this project.")
11192 (license license:epl1.0)))
7049dea1
JL
11193
11194(define-public java-eclipse-sisu-plexus
11195 (package
11196 (name "java-eclipse-sisu-plexus")
e0c0b078 11197 (version "0.3.4")
7049dea1 11198 (source (origin
3560a2cd
EF
11199 (method git-fetch)
11200 (uri (git-reference
11201 (url "https://github.com/eclipse/sisu.plexus.git")
11202 (commit (string-append "releases/" version))))
11203 (file-name (git-file-name name version))
7049dea1
JL
11204 (sha256
11205 (base32
e0c0b078 11206 "17mjlajnsqnk07cc58h1qpxrif85yb2m2y0pyba48yjjgikk8r9f"))
7049dea1
JL
11207 (modules '((guix build utils)))
11208 (snippet
11209 '(begin
11210 (for-each delete-file (find-files "." ".*.jar"))
11211 (rename-file "org.eclipse.sisu.plexus.tests/src"
11212 "org.eclipse.sisu.plexus.tests/java")
11213 #t))))
11214 (build-system ant-build-system)
11215 (arguments
11216 `(#:jar-name "eclipse-sisu-plexus.jar"
11217 #:source-dir "org.eclipse.sisu.plexus/src"
11218 #:test-dir "org.eclipse.sisu.plexus.tests"
11219 #:test-exclude
11220 (list
11221 ;; This test fails probably because we can't generate the necessary
11222 ;; meta-inf files.
11223 "**/PlexusLoggingTest.*"
11224 ;; FIXME: This test fails because of some injection error
11225 "**/PlexusRequirementTest.*")
11226 #:jdk ,icedtea-8
11227 #:phases
11228 (modify-phases %standard-phases
11229 (add-before 'build 'copy-resources
11230 (lambda _
11231 (install-file "org.eclipse.sisu.plexus/META-INF/plexus/components.xml"
11232 "build/classes/META-INF/plexus")
11233 #t))
11234 (add-before 'check 'build-test-jar
11235 (lambda _
11236 (with-directory-excursion "org.eclipse.sisu.plexus.tests/resources/component-jar/src/main/"
11237 (mkdir "build")
11238 (with-directory-excursion "java"
11239 (apply invoke "javac" "-cp"
11240 (string-append (getenv "CLASSPATH")
11241 ":../../../../../build/classes")
11242 (find-files "." ".*.java"))
11243 (for-each (lambda (file) (install-file file (string-append "../build/" file)))
11244 (find-files "." ".*.jar")))
11245 (mkdir-p "build/META-INF/plexus")
11246 (copy-file "resources/META-INF/plexus/components.xml"
11247 "build/META-INF/plexus/components.xml")
11248 (with-directory-excursion "build"
11249 (invoke "jar" "cf" "../../../component-jar-0.1.jar" ".")))
11250 (with-directory-excursion "org.eclipse.sisu.plexus.tests/"
11251 (copy-recursively "META-INF" "../build/test-classes/META-INF")
11252 (substitute* "java/org/eclipse/sisu/plexus/DefaultPlexusContainerTest.java"
11253 (("resources/component-jar")
11254 "org.eclipse.sisu.plexus.tests/resources/component-jar")))
11255 #t)))))
11256 (inputs
11257 `(("java-plexus-classworlds" ,java-plexus-classworlds)
11258 ("java-plexus-util" ,java-plexus-utils)
11259 ("java-plexus-component-annotations" ,java-plexus-component-annotations)
11260 ("java-osgi-framework" ,java-osgi-framework)
11261 ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)
11262 ("java-guice" ,java-guice)
11263 ("java-javax-inject" ,java-javax-inject)
11264 ("java-slf4j-api" ,java-slf4j-api)
11265 ("java-junit" ,java-junit)))
11266 (native-inputs
11267 `(("java-guava" ,java-guava)
11268 ("java-aopalliance" ,java-aopalliance)
11269 ("java-cglib" ,java-cglib)
11270 ("java-asm" ,java-asm)))
11271 (home-page "https://www.eclipse.org/sisu/")
11272 (synopsis "Plexus support for the sisu container")
11273 (description "Sisu is a modular JSR330-based container that supports
11274classpath scanning, auto-binding, and dynamic auto-wiring. This package
11275adds Plexus support to the Sisu-Inject container.")
11276 (license license:epl1.0)))
3fa18fe7
JL
11277
11278(define-public java-commons-compiler
11279 (package
11280 (name "java-commons-compiler")
11281 (version "3.0.8")
11282 (source (origin
11283 (method git-fetch)
11284 (uri (git-reference
11285 (url "https://github.com/janino-compiler/janino")
11286 (commit "91aa95686d1e4ca3b16a984a03a38686572331b2")))
11287 (file-name (string-append name "-" version))
11288 (sha256
11289 (base32
11290 "04hfdl59sgh20qkxzgnibvs8f9hy6n7znxwpk611y5d89977y62r"))
11291 (modules '((guix build utils)))
11292 (snippet
11293 '(begin
11294 (for-each delete-file
11295 (find-files "." "\\.jar$"))
11296 #t))))
11297 (build-system ant-build-system)
11298 (arguments
11299 `(#:jar-name "commons-compiler.jar"
11300 #:source-dir "commons-compiler/src/main"
11301 #:tests? #f)); no tests
11302 (home-page "https://github.com/janino-compiler/janino")
11303 (synopsis "Java compiler")
11304 (description "Commons-compiler contains an API for janino, including the
11305@code{IExpressionEvaluator}, @code{IScriptEvaluator}, @code{IClassBodyEvaluator}
11306and @code{ISimpleCompiler} interfaces.")
11307 (license license:bsd-3)))
3402e651
JL
11308
11309(define-public java-janino
11310 (package
11311 (inherit java-commons-compiler)
11312 (name "java-janino")
11313 (arguments
11314 `(#:jar-name "janino.jar"
11315 #:source-dir "src/main/java"
11316 #:phases
11317 (modify-phases %standard-phases
11318 (add-before 'configure 'chdir
11319 (lambda _
2c8ac364
MW
11320 (chdir "janino")
11321 #t)))))
3402e651
JL
11322 (inputs
11323 `(("java-commons-compiler" ,java-commons-compiler)))
11324 (native-inputs
11325 `(("java-junit" ,java-junit)
11326 ("java-hamcrest-core" ,java-hamcrest-core)))
11327 (description "Janino is a Java compiler. Janino can compile a set of
11328source files to a set of class files like @code{javac}, but also compile a
11329Java expression, block, class body or source file in memory, load the bytecode
11330and execute it directly in the same JVM. @code{janino} can also be used for
11331static code analysis or code manipulation.")))
7d8207a4
JL
11332
11333(define-public java-logback-core
11334 (package
11335 (name "java-logback-core")
11336 (version "1.2.3")
11337 (source (origin
11338 (method url-fetch)
11339 (uri (string-append "https://github.com/qos-ch/logback/archive/v_"
11340 version ".tar.gz"))
b1ccd2a1 11341 (file-name (string-append name "-" version ".tar.gz"))
7d8207a4
JL
11342 (sha256
11343 (base32
11344 "1x6ga74yfgm94cfx98gybakbrlilx8i2gn6dx13l40kasmys06mi"))
11345 (modules '((guix build utils)))
11346 (snippet
2c8ac364
MW
11347 '(begin
11348 (delete-file-recursively "logback-access/lib")
11349 #t))))
7d8207a4
JL
11350 (build-system ant-build-system)
11351 (arguments
11352 `(#:jar-name "logback.jar"
11353 #:source-dir "src/main/java"
11354 #:test-dir "src/test"
11355 #:test-exclude
11356 ;; These tests fail with Unable to set MockitoNamingPolicy on cglib generator
11357 ;; which creates FastClasses
11358 (list "**/AllCoreTest.*"
11359 "**/AutoFlushingObjectWriterTest.*"
11360 "**/PackageTest.*"
11361 "**/ResilientOutputStreamTest.*"
11362 ;; And we still don't want to run abstract classes
11363 "**/Abstract*.*")
11364 #:phases
11365 (modify-phases %standard-phases
11366 (add-before 'configure 'chdir
11367 (lambda _
11368 (chdir "logback-core")
11369 #t)))))
11370 (inputs
11371 `(("java-javax-mail" ,java-javax-mail)
4b472f6a 11372 ("servlet" ,java-javaee-servletapi)
7d8207a4
JL
11373 ("java-commons-compiler" ,java-commons-compiler)
11374 ("java-janino" ,java-janino)))
11375 (native-inputs
11376 `(("java-junit" ,java-junit)
11377 ("java-hamcrest-core" ,java-hamcrest-core)
11378 ("java-mockito-1" ,java-mockito-1)
11379 ("java-cglib" ,java-cglib)
11380 ("java-asm" ,java-asm)
11381 ("java-objenesis" ,java-objenesis)
11382 ("java-joda-time" ,java-joda-time)))
11383 (home-page "https://logback.qos.ch")
11384 (synopsis "Logging for java")
11385 (description "Logback is intended as a successor to the popular log4j project.
11386This module lays the groundwork for the other two modules.")
11387 ;; Either epl1.0 or lgpl2.1
11388 (license (list license:epl1.0
11389 license:lgpl2.1))))
3a69f5f2
JL
11390
11391(define-public java-logback-classic
11392 (package
11393 (inherit java-logback-core)
11394 (name "java-logback-classic")
11395 (arguments
11396 `(#:jar-name "logback-classic.jar"
11397 #:source-dir "src/main/java"
11398 #:test-dir "src/test"
11399 #:tests? #f; tests require more packages: h2, greenmail, hsql, subethamail, slf4j, log4j, felix
11400 #:jdk ,icedtea-8
11401 #:phases
11402 (modify-phases %standard-phases
11403 (add-before 'configure 'chdir
11404 (lambda _
11405 (chdir "logback-classic")
11406 #t))
11407 (replace 'build
11408 (lambda* (#:key inputs #:allow-other-keys)
11409 (mkdir-p "build/classes")
11410 (setenv "CLASSPATH"
11411 (string-join
11412 (apply append (map (lambda (input)
11413 (find-files (assoc-ref inputs input)
11414 ".*.jar"))
11415 '("java-logback-core" "java-slf4j-api"
4b472f6a 11416 "java-commons-compiler" "servlet"
3a69f5f2
JL
11417 "groovy")))
11418 ":"))
11419 (apply invoke "groovyc" "-d" "build/classes" "-j"
11420 (find-files "src/main/" ".*\\.(groovy|java)$"))
11421 (invoke "ant" "jar")
11422 #t)))))
11423 (inputs
11424 `(("java-logback-core" ,java-logback-core)
11425 ("java-slf4j-api" ,java-slf4j-api)
11426 ,@(package-inputs java-logback-core)))
11427 (native-inputs
11428 `(("groovy" ,groovy)))
11429 (description "Logback is intended as a successor to the popular log4j project.
11430This module can be assimilated to a significantly improved version of log4j.
11431Moreover, @code{logback-classic} natively implements the slf4j API so that you
11432can readily switch back and forth between logback and other logging frameworks
11433such as log4j or @code{java.util.logging} (JUL).")))
ab621bf1 11434
c786dff0
LC
11435(define-public java-jgit
11436 (package
11437 (name "java-jgit")
11438 (version "4.7.0.201704051617-r")
11439 (source (origin
11440 (method url-fetch)
11441 (uri (string-append "https://repo1.maven.org/maven2/"
11442 "org/eclipse/jgit/org.eclipse.jgit/"
11443 version "/org.eclipse.jgit-"
11444 version "-sources.jar"))
11445 (sha256
11446 (base32
11447 "13ii4jn02ynzq6i7gsyi21k2i94jpc85wf6bcm31q4cyvzv0mk4k"))))
11448 (build-system ant-build-system)
11449 (arguments
11450 `(#:tests? #f ; There are no tests to run.
11451 #:jar-name "jgit.jar"
11452 ;; JGit must be built with a JDK supporting Java 8.
11453 #:jdk ,icedtea-8
11454 ;; Target our older default JDK.
11455 #:make-flags (list "-Dtarget=1.7")
11456 #:phases
11457 (modify-phases %standard-phases
11458 ;; The jar file generated by the default build.xml does not include
11459 ;; the text properties files, so we need to add them.
11460 (add-after 'build 'add-properties
11461 (lambda* (#:key jar-name #:allow-other-keys)
11462 (with-directory-excursion "src"
11463 (apply invoke "jar" "-uf"
11464 (string-append "../build/jar/" jar-name)
11465 (find-files "." "\\.properties$")))
11466 #t)))))
11467 (inputs
11468 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
11469 ("java-javaewah" ,java-javaewah)
11470 ("java-jsch" ,java-jsch)
11471 ("java-slf4j-api" ,java-slf4j-api)))
11472 (home-page "https://eclipse.org/jgit/")
11473 (synopsis "Java library implementing the Git version control system")
11474 (description "JGit is a lightweight, pure Java library implementing the
11475Git version control system, providing repository access routines, support for
11476network protocols, and core version control algorithms.")
11477 (license license:edl1.0)))
11478
11479;; For axoloti. This package can still be built with icedtea-7, which is
11480;; currently used as the default JDK.
11481(define-public java-jgit-4.2
11482 (package (inherit java-jgit)
11483 (version "4.2.0.201601211800-r")
11484 (source (origin
11485 (method url-fetch)
11486 (uri (string-append "https://repo1.maven.org/maven2/"
11487 "org/eclipse/jgit/org.eclipse.jgit/"
11488 version "/org.eclipse.jgit-"
11489 version "-sources.jar"))
11490 (sha256
11491 (base32
11492 "15gm537iivhnzlkjym4x3wn5jqdjdragsw9pdpzqqg21nrc817mm"))))
11493 (build-system ant-build-system)
11494 (arguments
11495 (substitute-keyword-arguments (package-arguments java-jgit)
11496 ;; Build for default JDK.
11497 ((#:jdk _) icedtea-7)
11498 ((#:phases phases)
11499 `(modify-phases ,phases
11500 (add-after 'unpack 'use-latest-javaewah-API
11501 (lambda _
11502 (substitute* "src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java"
11503 (("wordinbits") "WORD_IN_BITS"))
11504 #t))))))
11505 (inputs
11506 `(("java-javaewah" ,java-javaewah)
11507 ("java-jsch" ,java-jsch)
11508 ("java-slf4j-api" ,java-slf4j-api)))))
717b6ba6
CZ
11509
11510(define-public abcl
11511 (package
11512 (name "abcl")
514001e9 11513 (version "1.6.0")
717b6ba6
CZ
11514 (source
11515 (origin
11516 (method url-fetch)
11517 (uri (string-append "https://abcl.org/releases/"
11518 version "/abcl-src-" version ".tar.gz"))
11519 (sha256
11520 (base32
514001e9 11521 "0hvbcsffr8n2xwdixc8wyw1bfl9fxn2gyy0c4nma7j9zbn0wwgw9"))
717b6ba6
CZ
11522 (patches
11523 (search-patches
11524 "abcl-fix-build-xml.patch"))))
11525 (build-system ant-build-system)
11526 (native-inputs
11527 `(("java-junit" ,java-junit)))
11528 (arguments
11529 `(#:build-target "abcl.jar"
11530 #:test-target "abcl.test"
11531 #:phases
11532 (modify-phases %standard-phases
11533 (replace 'install
11534 (lambda* (#:key outputs #:allow-other-keys)
11535 (let ((share (string-append (assoc-ref outputs "out")
11536 "/share/java/"))
11537 (bin (string-append (assoc-ref outputs "out")
11538 "/bin/")))
11539 (mkdir-p share)
11540 (install-file "dist/abcl.jar" share)
11541 (install-file "dist/abcl-contrib.jar" share)
11542 (mkdir-p bin)
11543 (with-output-to-file (string-append bin "abcl")
11544 (lambda _
11545 (let ((classpath (string-append
11546 share "abcl.jar"
11547 ":"
11548 share "abcl-contrib.jar")))
11549 (display (string-append
11550 "#!" (which "sh") "\n"
11551 "if [[ -z $CLASSPATH ]]; then\n"
11552 " cp=\"" classpath "\"\n"
11553 "else\n"
11554 " cp=\"" classpath ":$CLASSPATH\"\n"
11555 "fi\n"
11556 "exec " (which "java")
11557 " -cp $cp org.armedbear.lisp.Main $@\n")))))
11558 (chmod (string-append bin "abcl") #o755)
11559 #t))))))
11560 (home-page "https://abcl.org/")
11561 (synopsis "Common Lisp Implementation on the JVM")
11562 (description
11563 "@dfn{Armed Bear Common Lisp} (ABCL) is a full implementation of the Common
11564Lisp language featuring both an interpreter and a compiler, running in the
11565JVM. It supports JSR-223 (Java scripting API): it can be a scripting engine
11566in any Java application. Additionally, it can be used to implement (parts of)
11567the application using Java to Lisp integration APIs.")
11568 (license (list license:gpl2+
11569 ;; named-readtables is released under 3 clause BSD
11570 license:bsd-3
11571 ;; jfli is released under CPL 1.0
11572 license:cpl1.0))))
da655b1e
JL
11573
11574(define-public java-jsonp-api
11575 (package
11576 (name "java-jsonp-api")
83c4c502 11577 (version "1.1.6")
da655b1e
JL
11578 (source (origin
11579 (method git-fetch)
11580 (uri (git-reference
11581 (url "https://github.com/eclipse-ee4j/jsonp")
83c4c502 11582 (commit (string-append "1.1-" version "-RELEASE"))))
da655b1e
JL
11583 (file-name (git-file-name name version))
11584 (sha256
11585 (base32
83c4c502 11586 "0zrj03hkr3jdmqlb4ipjr37cqpp2q2814qpmxi7srlwpdqs0ibgc"))))
da655b1e
JL
11587 (build-system ant-build-system)
11588 (arguments
11589 `(#:jar-name "jsonp-api.jar"
11590 #:tests? #f
11591 #:source-dir "api/src/main/java"
11592 #:test-dir "api/src/test"))
11593 (home-page "https://eclipse-ee4j.github.io/jsonp/")
11594 (synopsis "JSON Processing in Java")
11595 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
11596parse, generate, transform and query) JSON messages. It produces and
11597consumes JSON text in a streaming fashion (similar to StAX API for XML)
11598and allows to build a Java object model for JSON text using API classes
11599(similar to DOM API for XML).")
11600 ;; either gpl2 only with classpath exception, or epl2.0.
11601 (license (list license:gpl2
11602 license:epl2.0))))
d45f73c9
JL
11603
11604(define-public java-jsonp-impl
11605 (package
11606 (inherit java-jsonp-api)
11607 (name "java-jsonp-impl")
11608 (arguments
11609 `(#:jar-name "jsonp-impl.jar"
11610 #:tests? #f
11611 #:source-dir "impl/src/main/java"
83c4c502
JL
11612 #:test-dir "impl/src/test"
11613 #:phases
11614 (modify-phases %standard-phases
11615 (add-before 'build 'copy-resources
11616 (lambda _
11617 (copy-recursively
11618 "impl/src/main/resources/"
11619 "build/classes")
11620 #t)))))
d45f73c9
JL
11621 (propagated-inputs
11622 `(("java-jsonp-api" ,java-jsonp-api)))
11623 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
11624parse, generate, transform and query) JSON messages. This package contains
11625a reference implementation of that API.")))
357f4564
JL
11626
11627(define-public java-xmp
11628 (package
11629 (name "java-xmp")
11630 (version "5.1.3")
11631 (source (origin
11632 (method url-fetch)
11633 (uri (string-append "http://download.macromedia.com/pub/developer"
11634 "/xmp/sdk/XMPCoreJava-" version ".zip"))
11635 (sha256
11636 (base32
11637 "14nai2mmsg7l5ya2y5mx4w4lr1az3sk2fjz6hiy4zdrsavgvl1g7"))))
11638 (build-system ant-build-system)
11639 (arguments
11640 `(#:build-target "build"
11641 #:tests? #f; no tests
11642 #:phases
11643 (modify-phases %standard-phases
11644 (add-after 'unpack 'chdir
11645 (lambda _
11646 (chdir "XMPCore")
11647 #t))
11648 (add-before 'build 'fix-timestamp
11649 (lambda _
11650 (substitute* "build.xml"
11651 (("\\$\\{BuildDate\\}") "1970 Jan 01 00:00:00-GMT"))
11652 #t))
11653 (replace 'install
11654 (install-jars "."))
11655 (add-after 'install 'install-doc
11656 (lambda* (#:key outputs #:allow-other-keys)
11657 (copy-recursively
11658 "docs"
11659 (string-append (assoc-ref outputs "out") "/share/doc/java-xmp"))
11660 #t)))))
11661 (native-inputs
11662 `(("unzip" ,unzip)))
11663 (home-page "https://www.adobe.com/devnet/xmp.html")
11664 (synopsis "Extensible Metadat Platform (XMP) support in Java")
11665 (description "Adobe's Extensible Metadata Platform (XMP) is a labeling
11666technology that allows you to embed data about a file, known as metadata,
11667into the file itself. The XMP Toolkit for Java is based on the C++ XMPCore
11668library and the API is similar.")
11669 (license license:bsd-3)))
a005c63a
JL
11670
11671(define-public java-metadata-extractor
11672 (package
11673 (name "java-metadata-extractor")
11674 (version "2.11.0")
11675 (source (origin
11676 (method git-fetch)
11677 (uri (git-reference
11678 (url "https://github.com/drewnoakes/metadata-extractor")
11679 (commit version)))
11680 (file-name (git-file-name name version))
11681 (sha256
11682 (base32
11683 "06yrq0swrl1r40yjbk5kqzjxr04jlkq9lfi711jvfgjf5kp2qinj"))))
11684 (build-system ant-build-system)
11685 (arguments
11686 `(#:jar-name "metadata-extractor.jar"
11687 #:source-dir "Source"
11688 #:test-dir "Tests"
11689 #:phases
11690 (modify-phases %standard-phases
11691 (add-before 'check 'fix-test-dir
11692 (lambda _
11693 (substitute* "build.xml"
11694 (("/java\">") "\">"))
11695 #t)))))
11696 (propagated-inputs
11697 `(("java-xmp" ,java-xmp)))
11698 (native-inputs
11699 `(("java-hamcrest-core" ,java-hamcrest-core)
11700 ("java-junit" ,java-junit)))
11701 (home-page "https://github.com/drewnoakes/metadata-extractor")
11702 (synopsis "Extract metadata from image and video files")
11703 (description "Metadata-extractor is a straightforward Java library for
11704reading metadata from image files. It is able to read metadata in Exif,
11705IPTC, XMP, ICC and more formats.")
11706 (license license:asl2.0)))
0dd6089d
JL
11707
11708(define-public java-svg-salamander
11709 (package
11710 (name "java-svg-salamander")
11711 (version "1.1.2")
11712 (source (origin
11713 (method git-fetch)
11714 (uri (git-reference
11715 (url "https://github.com/blackears/svgSalamander")
11716 (commit (string-append "v" version))))
11717 (file-name (git-file-name name version))
11718 (sha256
11719 (base32
11720 "1zv3kjdkf6iqf02x6ln76254y634j2ji448y706a65lsbfjmmicf"))
11721 (modules '((guix build utils)))
11722 (snippet
58c3a4f5
BH
11723 '(begin
11724 (for-each delete-file (find-files "." ".*.jar"))
11725 #t))
0dd6089d
JL
11726 (patches
11727 (search-patches "java-svg-salamander-Fix-non-det.patch"))))
11728 (build-system ant-build-system)
11729 (arguments
11730 `(#:tests? #f; no tests
11731 #:phases
11732 (modify-phases %standard-phases
11733 (add-after 'unpack 'chdir
11734 (lambda _
11735 (chdir "svg-core")
11736 #t))
11737 (add-before 'build 'copy-jars
11738 (lambda* (#:key inputs #:allow-other-keys)
11739 (copy-file (car (find-files (assoc-ref inputs "javacc") "\\.jar$"))
11740 "../libraries/javacc.jar")
11741 (copy-file (car (find-files (assoc-ref inputs "ant") "ant\\.jar$"))
11742 "../libraries/ant.jar")
11743 #t))
11744 (replace 'install
11745 (install-jars "dist")))))
11746 (native-inputs
11747 `(("javacc" ,javacc)))
11748 (home-page "https://github.com/blackears/svgSalamander")
11749 (synopsis "SVG engine for Java")
11750 (description "SVG Salamander is an SVG engine for Java that's designed
11751to be small, fast, and allow programmers to use it with a minimum of fuss.
11752It's in particular targeted for making it easy to integrate SVG into Java
11753games and making it much easier for artists to design 2D game content - from
11754rich interactive menus to charts and graphcs to complex animations.")
11755 (license license:bsd-2)))
ff56e6ef
JL
11756
11757(define-public java-jboss-transaction-api-spec
11758 (package
11759 (name "java-jboss-transaction-api-spec")
11760 (version "1.2+1.1.1")
11761 (source (origin
11762 (method git-fetch)
11763 (uri (git-reference
11764 (url "https://github.com/jboss/jboss-transaction-api_spec")
11765 (commit "jboss-transaction-api_1.2_spec-1.1.1.Final")))
11766 (file-name (git-file-name name version))
11767 (sha256
11768 (base32
11769 "1xbfq5hvb86izflydxrqqv3k26c1ba2m0ap6m97shqrsdi9by4wy"))))
11770 (build-system ant-build-system)
11771 (arguments
11772 `(#:jar-name "java-jboss-transaction-api_spec.jar"
11773 #:source-dir "src/main/java"
11774 #:tests? #f)); no tests
11775 (inputs
11776 `(("java-cdi-api" ,java-cdi-api)
11777 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)))
11778 (home-page "https://github.com/jboss/jboss-transaction-api_spec")
11779 (synopsis "Generic transaction management API in Java")
11780 (description "Java-jboss-transaction-api-spec implements the Transactions
11781API. A transaction is a unit of work containing one or more operations
11782involving one or more shared resources having ACID (Atomicity, Consistency,
11783Isolation and Durability) properties.")
11784 ;; either gpl2 only with classpath exception or cddl.
11785 (license (list license:gpl2 license:cddl1.0))))