gnu: dovecot: Update to 2.3.6.
[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
CZ
4;;; Copyright © 2016, 2017 Roel Janssen <roel@gnu.org>
5;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
a1a5ef20 6;;; Copyright © 2017, 2018 Julien Lepiller <julien@lepiller.eu>
88f256a1 7;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
1d47ea86 8;;; Copyright © 2016, 2017, 2018 Alex Vong <alexvong1995@gmail.com>
1c8ba10a 9;;; Copyright © 2017, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
d0e9ded7
GB
10;;; Copyright © 2018 Gábor Boskovits <boskovits@gmail.com>
11;;; Copyright © 2018 Chris Marusich <cmmarusich@gmail.com>
64b2efc1 12;;; Copyright © 2018 Efraim Flashner <efraim@flashner.co.il>
0760e3a1
RW
13;;;
14;;; This file is part of GNU Guix.
15;;;
16;;; GNU Guix is free software; you can redistribute it and/or modify it
17;;; under the terms of the GNU General Public License as published by
18;;; the Free Software Foundation; either version 3 of the License, or (at
19;;; your option) any later version.
20;;;
21;;; GNU Guix is distributed in the hope that it will be useful, but
22;;; WITHOUT ANY WARRANTY; without even the implied warranty of
23;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24;;; GNU General Public License for more details.
25;;;
26;;; You should have received a copy of the GNU General Public License
27;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
28
29(define-module (gnu packages java)
30 #:use-module ((guix licenses) #:prefix license:)
31 #:use-module (guix packages)
32 #:use-module (guix download)
62c9bfaa 33 #:use-module (guix hg-download)
72885a4c 34 #:use-module (guix git-download)
78745d33 35 #:use-module (guix svn-download)
f6789047 36 #:use-module (guix utils)
068e476f 37 #:use-module (guix build-system ant)
0760e3a1 38 #:use-module (guix build-system gnu)
6a5829d9 39 #:use-module (guix build-system trivial)
0760e3a1
RW
40 #:use-module (gnu packages)
41 #:use-module (gnu packages attr)
42 #:use-module (gnu packages autotools)
43 #:use-module (gnu packages base)
44 #:use-module (gnu packages bash)
f21403e2 45 #:use-module (gnu packages certs)
0760e3a1
RW
46 #:use-module (gnu packages cpio)
47 #:use-module (gnu packages cups)
48 #:use-module (gnu packages compression)
dd741059 49 #:use-module (gnu packages elf)
0760e3a1
RW
50 #:use-module (gnu packages fontutils)
51 #:use-module (gnu packages gawk)
72885a4c 52 #:use-module (gnu packages gettext)
0760e3a1 53 #:use-module (gnu packages gcc)
8581c813 54 #:use-module (gnu packages gl)
0760e3a1
RW
55 #:use-module (gnu packages ghostscript) ;lcms
56 #:use-module (gnu packages gnome)
3a69f5f2 57 #:use-module (gnu packages groovy)
0760e3a1 58 #:use-module (gnu packages gtk)
6a5829d9 59 #:use-module (gnu packages guile)
afb5858d 60 #:use-module (gnu packages icu4c)
0760e3a1 61 #:use-module (gnu packages image)
24155bf4 62 #:use-module (gnu packages java-compression)
c4fd86f9 63 #:use-module (gnu packages libffi)
0760e3a1 64 #:use-module (gnu packages linux) ;alsa
2f0d0418 65 #:use-module (gnu packages maths)
aff0cce9 66 #:use-module (gnu packages nss)
bcb078a4 67 #:use-module (gnu packages onc-rpc)
5766984b 68 #:use-module (gnu packages web)
0760e3a1 69 #:use-module (gnu packages wget)
0760e3a1
RW
70 #:use-module (gnu packages pkg-config)
71 #:use-module (gnu packages perl)
c4fd86f9 72 #:use-module (gnu packages popt)
89e34644 73 #:use-module (gnu packages kerberos)
0760e3a1
RW
74 #:use-module (gnu packages xml)
75 #:use-module (gnu packages xorg)
f6789047 76 #:use-module (gnu packages texinfo)
2d15f601
RW
77 #:use-module ((srfi srfi-1) #:select (fold alist-delete))
78 #:use-module (srfi srfi-11)
79 #:use-module (ice-9 match))
0760e3a1 80
e1ae3587
RW
81\f
82;;;
83;;; Java bootstrap toolchain.
84;;;
85
86;; The Java bootstrap begins with Jikes, a Java compiler written in C++. We
269fb7d3
RW
87;; use it to build a simple version of GNU Classpath, the Java standard
88;; library. We chose version 0.93 because it is the last version that can be
89;; built with Jikes. With Jikes and this version of GNU Classpath we can
90;; build JamVM, a Java Virtual Machine. We build version 1.5.1 because it is
91;; the last version of JamVM that works with a version of GNU classpath that
92;; does not require ECJ. These three packages make up the bootstrap JDK.
93
94;; This is sufficient to build an older version of Ant, which is needed to
95;; build an older version of ECJ, an incremental Java compiler, both of which
96;; are written in Java.
e1ae3587 97;;
269fb7d3
RW
98;; ECJ is needed to build the latest release (0.99) and the development
99;; version of GNU Classpath. The development version of GNU Classpath has
100;; much more support for Java 1.6 than the latest release, but we need to
101;; build 0.99 first to get a working version of javah. ECJ, the development
102;; version of GNU Classpath, and the latest version of JamVM make up the
103;; second stage JDK with which we can build the OpenJDK with the Icedtea 1.x
104;; build framework. We then build the more recent JDKs Icedtea 2.x and
105;; Icedtea 3.x.
e1ae3587
RW
106
107(define jikes
108 (package
109 (name "jikes")
110 (version "1.22")
111 (source (origin
112 (method url-fetch)
113 (uri (string-append "mirror://sourceforge/jikes/Jikes/"
114 version "/jikes-" version ".tar.bz2"))
115 (sha256
116 (base32
117 "1qqldrp74pzpy5ly421srqn30qppmm9cvjiqdngk8hf47dv2rc0c"))))
118 (build-system gnu-build-system)
119 (home-page "http://jikes.sourceforge.net/")
120 (synopsis "Compiler for the Java language")
121 (description "Jikes is a compiler that translates Java source files as
122defined in The Java Language Specification into the bytecoded instruction set
123and binary format defined in The Java Virtual Machine Specification.")
124 (license license:ibmpl1.0)))
125
45f762ee
RW
126;; This is the last version of GNU Classpath that can be built without ECJ.
127(define classpath-bootstrap
2551fee8 128 (package
45f762ee
RW
129 (name "classpath")
130 (version "0.93")
2551fee8
RW
131 (source (origin
132 (method url-fetch)
45f762ee
RW
133 (uri (string-append "mirror://gnu/classpath/classpath-"
134 version ".tar.gz"))
2551fee8
RW
135 (sha256
136 (base32
bab9793f
EF
137 "0i99wf9xd3hw1sj2sazychb9prx8nadxh2clgvk3zlmb28v0jbfz"))
138 (patches (search-patches "classpath-aarch64-support.patch"))))
2551fee8
RW
139 (build-system gnu-build-system)
140 (arguments
141 `(#:configure-flags
45f762ee
RW
142 (list (string-append "JAVAC="
143 (assoc-ref %build-inputs "jikes")
144 "/bin/jikes")
2551fee8
RW
145 "--disable-Werror"
146 "--disable-gmp"
147 "--disable-gtk-peer"
45f762ee 148 "--disable-gconf-peer"
2551fee8
RW
149 "--disable-plugin"
150 "--disable-dssi"
151 "--disable-alsa"
45f762ee
RW
152 "--disable-gjdoc")
153 #:phases
154 (modify-phases %standard-phases
155 (add-after 'install 'install-data
0c66a4eb 156 (lambda _ (invoke "make" "install-data"))))))
2551fee8
RW
157 (native-inputs
158 `(("jikes" ,jikes)
159 ("fastjar" ,fastjar)
45f762ee 160 ("libltdl" ,libltdl)
2551fee8 161 ("pkg-config" ,pkg-config)))
45f762ee
RW
162 (home-page "https://www.gnu.org/software/classpath/")
163 (synopsis "Essential libraries for Java")
164 (description "GNU Classpath is a project to create core class libraries
165for use with runtimes, compilers and tools for the Java programming
166language.")
167 ;; GPLv2 or later, with special linking exception.
168 (license license:gpl2+)))
57f6c50d 169
063629aa
RW
170;; This is the last version of JamVM that works with a version of GNU
171;; classpath that does not require ECJ.
172(define jamvm-1-bootstrap
57f6c50d 173 (package
063629aa
RW
174 (name "jamvm")
175 (version "1.5.1")
57f6c50d
RW
176 (source (origin
177 (method url-fetch)
063629aa
RW
178 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
179 "JamVM%20" version "/jamvm-"
180 version ".tar.gz"))
64b2efc1 181 (patches (search-patches "jamvm-arm.patch"))
57f6c50d
RW
182 (sha256
183 (base32
063629aa 184 "06lhi03l3b0h48pc7x58bk9my2nrcf1flpmglvys3wyad6yraf36"))))
57f6c50d
RW
185 (build-system gnu-build-system)
186 (arguments
c4fd86f9 187 `(#:configure-flags
063629aa
RW
188 (list (string-append "--with-classpath-install-dir="
189 (assoc-ref %build-inputs "classpath")))))
57f6c50d 190 (inputs
063629aa 191 `(("classpath" ,classpath-bootstrap)
57f6c50d 192 ("jikes" ,jikes)
063629aa
RW
193 ("zlib" ,zlib)))
194 (home-page "http://jamvm.sourceforge.net/")
195 (synopsis "Small Java Virtual Machine")
196 (description "JamVM is a Java Virtual Machine conforming to the JVM
197specification edition 2 (blue book). It is extremely small. However, unlike
198other small VMs it supports the full spec, including object finalisation and
199JNI.")
200 (license license:gpl2+)))
2551fee8 201
5783bd77
RW
202(define ant-bootstrap
203 (package
204 (name "ant-bootstrap")
205 ;; The 1.10.x series requires Java 8. 1.9.0 and later use generics, which
206 ;; are not supported. The 1.8.x series is the last to use only features
ff4d9fdf
RW
207 ;; supported by Jikes.
208 (version "1.8.4")
5783bd77
RW
209 (source (origin
210 (method url-fetch)
211 (uri (string-append "http://archive.apache.org/dist/"
212 "ant/source/apache-ant-"
213 version "-src.tar.bz2"))
214 (sha256
215 (base32
ff4d9fdf 216 "1cg0lga887qz5iizh6mlkxp01lciymrhmp7wzxpl6zpnldxmzrjx"))))
5783bd77
RW
217 (build-system gnu-build-system)
218 (arguments
cded3a75
GB
219 `(#:imported-modules ((guix build syscalls)
220 ,@%gnu-build-system-modules)
221 #:modules ((srfi srfi-1)
222 (guix build gnu-build-system)
223 (guix build utils)
224 (guix build syscalls))
225 #:tests? #f ; no "check" target
5783bd77
RW
226 #:phases
227 (modify-phases %standard-phases
d4fd4c3a 228 (delete 'bootstrap)
5783bd77
RW
229 (delete 'configure)
230 (replace 'build
231 (lambda* (#:key inputs #:allow-other-keys)
aa432388 232 (setenv "JAVA_HOME" (assoc-ref inputs "jamvm"))
5783bd77 233 (setenv "JAVACMD"
aa432388
RW
234 (string-append (assoc-ref inputs "jamvm")
235 "/bin/jamvm"))
5783bd77 236 (setenv "JAVAC"
aa432388
RW
237 (string-append (assoc-ref inputs "jikes")
238 "/bin/jikes"))
239 (setenv "CLASSPATH"
240 (string-append (assoc-ref inputs "jamvm")
241 "/lib/rt.jar"))
5783bd77 242
d4fd4c3a
RW
243 ;; Ant complains if this file doesn't exist.
244 (setenv "HOME" "/tmp")
245 (with-output-to-file "/tmp/.ant.properties"
246 (lambda _ (display "")))
5783bd77
RW
247
248 ;; Use jikes instead of javac for <javac ...> tags in build.xml
249 (setenv "ANT_OPTS" "-Dbuild.compiler=jikes")
250
251 ;; jikes produces lots of warnings, but they are not very
252 ;; interesting, so we silence them.
253 (setenv "$BOOTJAVAC_OPTS" "-nowarn")
254
d4fd4c3a
RW
255 ;; Without these JamVM options the build may freeze.
256 (substitute* "bootstrap.sh"
257 (("^\"\\$\\{JAVACMD\\}\" " m)
a495998b
EF
258 ,@(if (string-prefix? "armhf" (or (%current-system)
259 (%current-target-system)))
260 `((string-append m "-Xnocompact "))
261 `((string-append m "-Xnocompact -Xnoinlining ")))))
d4fd4c3a 262
5783bd77
RW
263 ;; Disable tests because we are bootstrapping and thus don't have
264 ;; any of the dependencies required to build and run the tests.
265 (substitute* "build.xml"
266 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
8e14634a
EF
267 (invoke "bash" "bootstrap.sh"
268 (string-append "-Ddist.dir="
269 (assoc-ref %outputs "out")))))
cded3a75
GB
270 (add-after 'build 'strip-jar-timestamps ;based on ant-build-system
271 (lambda* (#:key outputs #:allow-other-keys)
272 (define (repack-archive jar)
273 (let* ((dir (mkdtemp! "jar-contents.XXXXXX"))
274 (manifest (string-append dir "/META-INF/MANIFESTS.MF")))
275 (with-directory-excursion dir
276 (invoke "unzip" jar))
277 (delete-file jar)
278 ;; XXX: copied from (gnu build install)
279 (for-each (lambda (file)
280 (let ((s (lstat file)))
281 (unless (eq? (stat:type s) 'symlink)
282 (utime file 0 0 0 0))))
283 (find-files dir #:directories? #t))
284 ;; It is important that the manifest appears first.
285 (with-directory-excursion dir
286 (let* ((files (find-files "." ".*" #:directories? #t))
287 ;; To ensure that the reference scanner can
288 ;; detect all store references in the jars
289 ;; we disable compression with the "-0" option.
290 (command (if (file-exists? manifest)
291 `("zip" "-0" "-X" ,jar ,manifest
292 ,@files)
293 `("zip" "-0" "-X" ,jar ,@files))))
294 (apply invoke command)))))
295 (for-each repack-archive
296 (find-files
297 (string-append (assoc-ref %outputs "out") "/lib")
298 "\\.jar$"))
299 #t))
5783bd77
RW
300 (delete 'install))))
301 (native-inputs
302 `(("jikes" ,jikes)
cded3a75
GB
303 ("jamvm" ,jamvm-1-bootstrap)
304 ("unzip" ,unzip)
b42b5afd 305 ("zip" ,zip)))
5783bd77
RW
306 (home-page "http://ant.apache.org")
307 (synopsis "Build tool for Java")
308 (description
309 "Ant is a platform-independent build tool for Java. It is similar to
310make but is implemented using the Java language, requires the Java platform,
311and is best suited to building Java projects. Ant uses XML to describe the
312build process and its dependencies, whereas Make uses Makefile format.")
313 (license license:asl2.0)))
314
5461721f
RW
315;; Version 3.2.2 is the last version without a dependency on a full-fledged
316;; compiler for Java 1.5.
317(define ecj-bootstrap
318 (package
319 (name "ecj-bootstrap")
320 (version "3.2.2")
321 (source (origin
322 (method url-fetch)
323 (uri (string-append "http://archive.eclipse.org/eclipse/"
324 "downloads/drops/R-" version
325 "-200702121330/ecjsrc.zip"))
326 (sha256
327 (base32
328 "05hj82kxd23qaglsjkaqcj944riisjha7acf7h3ljhrjyljx8307"))))
329 ;; It would be so much easier if we could use the ant-build-system, but we
330 ;; cannot as we don't have ant at this point. We use ecj for
331 ;; bootstrapping the JDK.
332 (build-system gnu-build-system)
333 (arguments
334 `(#:modules ((guix build gnu-build-system)
335 (guix build utils)
336 (srfi srfi-1))
337 #:tests? #f ; there are no tests
338 #:phases
339 (modify-phases %standard-phases
340 (replace 'configure
341 (lambda* (#:key inputs #:allow-other-keys)
342 (setenv "CLASSPATH"
343 (string-join
6c775dc6
RW
344 (cons (string-append (assoc-ref inputs "jamvm")
345 "/lib/rt.jar")
346 (find-files (string-append
347 (assoc-ref inputs "ant-bootstrap")
348 "/lib")
349 "\\.jar$"))
5461721f
RW
350 ":"))
351 #t))
352 (replace 'build
353 (lambda* (#:key inputs #:allow-other-keys)
354 ;; The unpack phase enters the "org" directory by mistake.
355 (chdir "..")
356
357 ;; Create a simple manifest to make ecj executable.
358 (with-output-to-file "manifest"
359 (lambda _
360 (display "Manifest-Version: 1.0
361Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n")))
362
363 ;; Compile it all!
0b302a16
EF
364 (and (apply invoke "jikes"
365 (find-files "." "\\.java$"))
366 (invoke "fastjar" "cvfm"
367 "ecj-bootstrap.jar" "manifest" "."))))
5461721f
RW
368 (replace 'install
369 (lambda* (#:key outputs #:allow-other-keys)
370 (let ((share (string-append (assoc-ref outputs "out")
371 "/share/java/")))
372 (mkdir-p share)
373 (install-file "ecj-bootstrap.jar" share)
374 #t))))))
375 (native-inputs
376 `(("ant-bootstrap" ,ant-bootstrap)
377 ("unzip" ,unzip)
6c775dc6
RW
378 ("jikes" ,jikes)
379 ("jamvm" ,jamvm-1-bootstrap)
5461721f
RW
380 ("fastjar" ,fastjar)))
381 (home-page "https://eclipse.org")
382 (synopsis "Eclipse Java development tools core batch compiler")
383 (description "This package provides the Eclipse Java core batch compiler
384for bootstrapping purposes. The @dfn{Eclipse compiler for Java} (ecj) is a
385requirement for all GNU Classpath releases after version 0.93.")
386 (license license:epl1.0)))
387
6a5829d9
RW
388(define ecj-javac-wrapper
389 (package (inherit ecj-bootstrap)
390 (name "ecj-javac-wrapper")
391 (source #f)
392 (build-system trivial-build-system)
393 (arguments
394 `(#:modules ((guix build utils))
395 #:builder
c4f06c11 396 (begin
6a5829d9
RW
397 (use-modules (guix build utils))
398 (let* ((bin (string-append (assoc-ref %outputs "out") "/bin"))
399 (target (string-append bin "/javac"))
400 (guile (string-append (assoc-ref %build-inputs "guile")
401 "/bin/guile"))
402 (ecj (string-append (assoc-ref %build-inputs "ecj-bootstrap")
403 "/share/java/ecj-bootstrap.jar"))
c4f06c11
RW
404 (java (string-append (assoc-ref %build-inputs "jamvm")
405 "/bin/jamvm"))
406 (bootcp (let ((jvmlib (string-append (assoc-ref %build-inputs "classpath")
407 "/share/classpath")))
51602aac
RW
408 (string-append jvmlib "/glibj.zip:"
409 jvmlib "/tools.zip"))))
6a5829d9
RW
410 (mkdir-p bin)
411 (with-output-to-file target
412 (lambda _
413 (format #t "#!~a --no-auto-compile\n!#\n" guile)
414 (write
415 `(begin (use-modules (ice-9 match)
416 (ice-9 receive)
417 (ice-9 hash-table)
418 (srfi srfi-1)
419 (srfi srfi-26))
420 (define defaults
421 '(("-bootclasspath" ,bootcp)
422 ("-source" "1.5")
423 ("-target" "1.5")
424 ("-cp" ".")))
425 (define (main args)
426 (let ((classpath (getenv "CLASSPATH")))
427 (setenv "CLASSPATH"
c4f06c11
RW
428 (string-join (list ,ecj
429 ,(string-append (assoc-ref %build-inputs "jamvm")
430 "/lib/rt.jar")
431 (or classpath ""))
432 ":")))
6a5829d9
RW
433 (receive (vm-args other-args)
434 ;; Separate VM arguments from arguments to ECJ.
435 (partition (cut string-prefix? "-J" <>)
436 (fold (lambda (default acc)
437 (if (member (first default) acc)
438 acc (append default acc)))
439 args defaults))
440 (apply system* ,java
441 (append
442 ;; Remove "-J" prefix
443 (map (cut string-drop <> 2) vm-args)
444 '("org.eclipse.jdt.internal.compiler.batch.Main")
445 (cons "-nowarn" other-args)))))
446 ;; Entry point
447 (let ((args (cdr (command-line))))
448 (if (null? args)
449 (format (current-error-port) "javac: no arguments given!\n")
450 (main args)))))))
451 (chmod target #o755)
452 #t))))
453 (native-inputs
454 `(("guile" ,guile-2.2)
455 ("ecj-bootstrap" ,ecj-bootstrap)
c4f06c11
RW
456 ("jamvm" ,jamvm-1-bootstrap)
457 ("classpath" ,classpath-bootstrap)))
6a5829d9
RW
458 (description "This package provides a wrapper around the @dfn{Eclipse
459compiler for Java} (ecj) with a command line interface that is compatible with
460the standard javac executable.")))
461
8778da03
RW
462;; The classpath-bootstrap was built without a virtual machine, so it does not
463;; provide a wrapper for javah. We cannot build the development version of
464;; Classpath without javah.
465(define classpath-0.99
466 (package (inherit classpath-bootstrap)
d3551e86
RW
467 (version "0.99")
468 (source (origin
469 (method url-fetch)
470 (uri (string-append "mirror://gnu/classpath/classpath-"
471 version ".tar.gz"))
472 (sha256
473 (base32
bab9793f
EF
474 "1j7cby4k66f1nvckm48xcmh352b1d1b33qk7l6hi7dp9i9zjjagr"))
475 (patches (search-patches "classpath-aarch64-support.patch"))))
d3551e86
RW
476 (arguments
477 `(#:configure-flags
478 (list (string-append "--with-ecj-jar="
479 (assoc-ref %build-inputs "ecj-bootstrap")
480 "/share/java/ecj-bootstrap.jar")
481 (string-append "JAVAC="
482 (assoc-ref %build-inputs "ecj-javac-wrapper")
483 "/bin/javac")
484 (string-append "JAVA="
8778da03
RW
485 (assoc-ref %build-inputs "jamvm")
486 "/bin/jamvm")
d3551e86
RW
487 "GCJ_JAVAC_TRUE=no"
488 "ac_cv_prog_java_works=yes" ; trust me
489 "--disable-Werror"
490 "--disable-gmp"
491 "--disable-gtk-peer"
492 "--disable-gconf-peer"
493 "--disable-plugin"
494 "--disable-dssi"
495 "--disable-alsa"
496 "--disable-gjdoc")
497 #:phases
498 (modify-phases %standard-phases
499 (add-after 'install 'install-data
15a59c21 500 (lambda _ (invoke "make" "install-data"))))))
d3551e86
RW
501 (native-inputs
502 `(("ecj-bootstrap" ,ecj-bootstrap)
503 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
504 ("fastjar" ,fastjar)
8778da03
RW
505 ("jamvm" ,jamvm-1-bootstrap)
506 ("classpath" ,classpath-bootstrap)
d3551e86 507 ("libltdl" ,libltdl)
8778da03 508 ("pkg-config" ,pkg-config)))))
d3551e86 509
c98d7a66
RW
510;; We need this because classpath-bootstrap does not provide all of the tools
511;; we need to build classpath-devel.
04d7cae2 512(define classpath-jamvm-wrappers
c98d7a66 513 (package (inherit classpath-0.99)
04d7cae2
RW
514 (name "classpath-jamvm-wrappers")
515 (source #f)
516 (build-system trivial-build-system)
517 (arguments
518 `(#:modules ((guix build utils))
519 #:builder
520 (begin
521 (use-modules (guix build utils))
522 (let* ((bash (assoc-ref %build-inputs "bash"))
523 (jamvm (assoc-ref %build-inputs "jamvm"))
524 (classpath (assoc-ref %build-inputs "classpath"))
525 (bin (string-append (assoc-ref %outputs "out")
526 "/bin/")))
527 (mkdir-p bin)
528 (for-each (lambda (tool)
529 (with-output-to-file (string-append bin tool)
530 (lambda _
e3ec1258
EF
531 ,@(if (string-prefix? "armhf" (or (%current-system)
532 (%current-target-system)))
533 `((format #t "#!~a/bin/sh
534~a/bin/jamvm -Xnocompact -classpath ~a/share/classpath/tools.zip \
535gnu.classpath.tools.~a.~a $@"
536 bash jamvm classpath tool
537 (if (string=? "native2ascii" tool)
538 "Native2ASCII" "Main")))
539 `((format #t "#!~a/bin/sh
40e3a197 540~a/bin/jamvm -Xnocompact -Xnoinlining -classpath ~a/share/classpath/tools.zip \
04d7cae2
RW
541gnu.classpath.tools.~a.~a $@"
542 bash jamvm classpath tool
543 (if (string=? "native2ascii" tool)
e3ec1258 544 "Native2ASCII" "Main"))))))
04d7cae2
RW
545 (chmod (string-append bin tool) #o755))
546 (list "javah"
547 "rmic"
548 "rmid"
549 "orbd"
550 "rmiregistry"
551 "native2ascii"))
552 #t))))
553 (native-inputs
554 `(("bash" ,bash)
c98d7a66
RW
555 ("jamvm" ,jamvm-1-bootstrap)
556 ("classpath" ,classpath-0.99)))
04d7cae2
RW
557 (inputs '())
558 (synopsis "Executables from GNU Classpath")
559 (description "This package provides wrappers around the tools provided by
560the GNU Classpath library. They are executed by the JamVM virtual
561machine.")))
562
72885a4c
RW
563;; The last release of GNU Classpath is 0.99 and it happened in 2012. Since
564;; then Classpath has gained much more support for Java 1.6.
565(define-public classpath-devel
566 (let ((commit "e7c13ee0cf2005206fbec0eca677f8cf66d5a103")
567 (revision "1"))
8778da03 568 (package (inherit classpath-bootstrap)
72885a4c
RW
569 (version (string-append "0.99-" revision "." (string-take commit 9)))
570 (source (origin
571 (method git-fetch)
572 (uri (git-reference
5f13bf09 573 (url "https://git.savannah.gnu.org/git/classpath.git")
72885a4c 574 (commit commit)))
51988e3a 575 (file-name (string-append "classpath-" version "-checkout"))
72885a4c
RW
576 (sha256
577 (base32
578 "1v2rww76ww322mpg3s12a1kkc6gkp31bm9gcxs532h0wq285fiw4"))))
579 (arguments
93c103ab
RW
580 `(#:make-flags
581 ;; Ensure that the initial heap size is smaller than the maximum
582 ;; size. By default only Xmx is set, which can lead to invalid
583 ;; memory settings on some machines with a lot of memory.
584 '("JAVAC_MEM_OPT=-J-Xms512M -J-Xmx768M")
585 #:configure-flags
72885a4c
RW
586 (list (string-append "--with-ecj-jar="
587 (assoc-ref %build-inputs "ecj-bootstrap")
588 "/share/java/ecj-bootstrap.jar")
93c103ab 589 (string-append "--with-javac="
72885a4c
RW
590 (assoc-ref %build-inputs "ecj-javac-wrapper")
591 "/bin/javac")
592 (string-append "JAVA="
593 (assoc-ref %build-inputs "jamvm")
594 "/bin/jamvm")
595 "GCJ_JAVAC_TRUE=no"
596 "ac_cv_prog_java_works=yes" ; trust me
597 "--disable-Werror"
598 "--disable-gmp"
599 "--disable-gtk-peer"
600 "--disable-gconf-peer"
601 "--disable-plugin"
602 "--disable-dssi"
603 "--disable-alsa"
604 "--disable-gjdoc")
605 #:phases
606 (modify-phases %standard-phases
2a69f48e
RW
607 ;; XXX The bootstrap phase executes autogen.sh, which fails after
608 ;; complaining about the lack of gettext.
609 (replace 'bootstrap
610 (lambda _ (invoke "autoreconf" "-vif")))
72885a4c
RW
611 (add-after 'unpack 'remove-unsupported-annotations
612 (lambda _
613 (substitute* (find-files "java" "\\.java$")
614 (("@Override") ""))
615 #t))
616 (add-after 'install 'install-data
4c65eb43 617 (lambda _ (invoke "make" "install-data"))))))
72885a4c
RW
618 (native-inputs
619 `(("autoconf" ,autoconf)
620 ("automake" ,automake)
621 ("libtool" ,libtool)
622 ("gettext" ,gettext-minimal)
623 ("texinfo" ,texinfo)
624 ("classpath-jamvm-wrappers" ,classpath-jamvm-wrappers) ; for javah
625 ("ecj-bootstrap" ,ecj-bootstrap)
b5a0d427 626 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
72885a4c 627 ("fastjar" ,fastjar)
58d2b135 628 ("jamvm" ,jamvm-1-bootstrap)
72885a4c
RW
629 ("libltdl" ,libltdl)
630 ("pkg-config" ,pkg-config))))))
631
58d2b135
RW
632(define jamvm
633 (package (inherit jamvm-1-bootstrap)
634 (version "2.0.0")
635 (source (origin
636 (method url-fetch)
637 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
638 "JamVM%20" version "/jamvm-"
639 version ".tar.gz"))
640 (sha256
641 (base32
642 "1nl0zxz8y5x8gwsrm7n32bry4dx8x70p8z3s9jbdvs8avyb8whkn"))))
643 (build-system gnu-build-system)
644 (arguments
645 `(#:configure-flags
646 (list (string-append "--with-classpath-install-dir="
647 (assoc-ref %build-inputs "classpath")))))
8c6091e3
RW
648 (inputs
649 `(("classpath" ,classpath-devel)
b5a0d427 650 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
8c6091e3
RW
651 ("zlib" ,zlib)))))
652
b5a0d427
RW
653(define ecj-javac-wrapper-final
654 (package (inherit ecj-javac-wrapper)
1bf56c72
RW
655 (native-inputs
656 `(("guile" ,guile-2.2)
657 ("ecj-bootstrap" ,ecj-bootstrap)
658 ("jamvm" ,jamvm)
659 ("classpath" ,classpath-devel)))))
660
98419316 661;; The bootstrap JDK consisting of jamvm, classpath-devel,
b5a0d427
RW
662;; ecj-javac-wrapper-final cannot build Icedtea 2.x directly, because it's
663;; written in Java 7. It can, however, build the unmaintained Icedtea 1.x,
664;; which uses Java 6 only.
98419316
RW
665(define-public icedtea-6
666 (package
667 (name "icedtea")
668 (version "1.13.13")
669 (source (origin
670 (method url-fetch)
671 (uri (string-append
672 "http://icedtea.wildebeest.org/download/source/icedtea6-"
673 version ".tar.xz"))
674 (sha256
675 (base32
676 "0bg9sb4f7qbq77c0zf9m17p47ga0kf0r9622g9p12ysg26jd1ksg"))
677 (modules '((guix build utils)))
678 (snippet
6cbee49d
MW
679 '(begin
680 (substitute* "Makefile.in"
681 ;; do not leak information about the build host
682 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
683 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
684 #t))))
98419316
RW
685 (build-system gnu-build-system)
686 (outputs '("out" ; Java Runtime Environment
687 "jdk" ; Java Development Kit
688 "doc")) ; all documentation
689 (arguments
690 `(;; There are many failing tests and many are known to fail upstream.
691 #:tests? #f
692
693 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
694 ;; gremlin) doesn't support it yet, so skip this phase.
695 #:validate-runpath? #f
696
697 #:modules ((guix build utils)
698 (guix build gnu-build-system)
699 (srfi srfi-19))
700
701 #:configure-flags
702 `("--enable-bootstrap"
703 "--enable-nss"
704 "--without-rhino"
705 "--with-parallel-jobs"
706 "--disable-downloading"
707 "--disable-tests"
708 ,(string-append "--with-ecj="
709 (assoc-ref %build-inputs "ecj")
710 "/share/java/ecj-bootstrap.jar")
711 ,(string-append "--with-jar="
712 (assoc-ref %build-inputs "fastjar")
713 "/bin/fastjar")
714 ,(string-append "--with-jdk-home="
715 (assoc-ref %build-inputs "classpath"))
716 ,(string-append "--with-java="
717 (assoc-ref %build-inputs "jamvm")
718 "/bin/jamvm"))
719 #:phases
720 (modify-phases %standard-phases
721 (replace 'unpack
722 (lambda* (#:key source inputs #:allow-other-keys)
2c8ac364
MW
723 (invoke "tar" "xvf" source)
724 (chdir (string-append "icedtea6-" ,version))
725 (mkdir "openjdk")
726 (copy-recursively (assoc-ref inputs "openjdk-src") "openjdk")
727 ;; The convenient OpenJDK source bundle is no longer
728 ;; available for download, so we have to take the sources
729 ;; from the Mercurial repositories and change the Makefile
730 ;; to avoid tests for the OpenJDK zip archive.
731 (with-directory-excursion "openjdk"
732 (for-each (lambda (part)
733 (mkdir part)
734 (copy-recursively
735 (assoc-ref inputs
736 (string-append part "-src"))
737 part))
873325b0 738 '("jdk" "corba"
2c8ac364 739 "langtools" "jaxp" "jaxws")))
873325b0
MB
740 (with-directory-excursion "openjdk"
741 (invoke "tar" "xvf" (assoc-ref inputs "hotspot-src"))
742 (rename-file "hg-checkout" "hotspot"))
2c8ac364
MW
743 (substitute* "Makefile.in"
744 (("echo \"ERROR: No up-to-date OpenJDK zip available\"; exit -1;")
745 "echo \"trust me\";")
746 ;; The contents of the bootstrap directory must be
747 ;; writeable but when copying from the store they are
748 ;; not.
749 (("mkdir -p lib/rt" line)
750 (string-append line "; chmod -R u+w $(BOOT_DIR)")))
751 (invoke "chmod" "-R" "u+w" "openjdk")))
98419316
RW
752 (add-after 'unpack 'use-classpath
753 (lambda* (#:key inputs #:allow-other-keys)
b5a0d427
RW
754 (let ((jvmlib (assoc-ref inputs "classpath"))
755 (jamvm (assoc-ref inputs "jamvm")))
98419316
RW
756 ;; Classpath does not provide rt.jar.
757 (substitute* "Makefile.in"
758 (("\\$\\(SYSTEM_JDK_DIR\\)/jre/lib/rt.jar")
759 (string-append jvmlib "/share/classpath/glibj.zip")))
760 ;; Make sure we can find all classes.
761 (setenv "CLASSPATH"
762 (string-append jvmlib "/share/classpath/glibj.zip:"
b5a0d427
RW
763 jvmlib "/share/classpath/tools.zip:"
764 jamvm "/lib/rt.jar"))
98419316
RW
765 (setenv "JAVACFLAGS"
766 (string-append "-cp "
767 jvmlib "/share/classpath/glibj.zip:"
768 jvmlib "/share/classpath/tools.zip")))
769 #t))
770 (add-after 'unpack 'patch-patches
771 (lambda _
772 ;; shebang in patches so that they apply cleanly
773 (substitute* '("patches/jtreg-jrunscript.patch"
774 "patches/hotspot/hs23/drop_unlicensed_test.patch")
775 (("#!/bin/sh") (string-append "#!" (which "sh"))))
776 #t))
777 (add-after 'unpack 'patch-paths
778 (lambda* (#:key inputs #:allow-other-keys)
779 ;; buildtree.make generates shell scripts, so we need to replace
780 ;; the generated shebang
781 (substitute* '("openjdk/hotspot/make/linux/makefiles/buildtree.make")
782 (("/bin/sh") (which "bash")))
783
784 (let ((corebin (string-append
785 (assoc-ref inputs "coreutils") "/bin/"))
786 (binbin (string-append
787 (assoc-ref inputs "binutils") "/bin/"))
788 (grepbin (string-append
789 (assoc-ref inputs "grep") "/bin/")))
790 (substitute* '("openjdk/jdk/make/common/shared/Defs-linux.gmk"
791 "openjdk/corba/make/common/shared/Defs-linux.gmk")
792 (("UNIXCOMMAND_PATH = /bin/")
793 (string-append "UNIXCOMMAND_PATH = " corebin))
794 (("USRBIN_PATH = /usr/bin/")
795 (string-append "USRBIN_PATH = " corebin))
796 (("DEVTOOLS_PATH *= */usr/bin/")
797 (string-append "DEVTOOLS_PATH = " corebin))
798 (("COMPILER_PATH *= */usr/bin/")
799 (string-append "COMPILER_PATH = "
800 (assoc-ref inputs "gcc") "/bin/"))
801 (("DEF_OBJCOPY *=.*objcopy")
802 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
803
804 ;; fix path to alsa header
805 (substitute* "openjdk/jdk/make/common/shared/Sanity.gmk"
806 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
807 (string-append "ALSA_INCLUDE="
808 (assoc-ref inputs "alsa-lib")
809 "/include/alsa/version.h")))
810
811 ;; fix hard-coded utility paths
812 (substitute* '("openjdk/jdk/make/common/shared/Defs-utils.gmk"
813 "openjdk/corba/make/common/shared/Defs-utils.gmk")
814 (("ECHO *=.*echo")
815 (string-append "ECHO = " (which "echo")))
816 (("^GREP *=.*grep")
817 (string-append "GREP = " (which "grep")))
818 (("EGREP *=.*egrep")
819 (string-append "EGREP = " (which "egrep")))
820 (("CPIO *=.*cpio")
821 (string-append "CPIO = " (which "cpio")))
822 (("READELF *=.*readelf")
823 (string-append "READELF = " (which "readelf")))
824 (("^ *AR *=.*ar")
825 (string-append "AR = " (which "ar")))
826 (("^ *TAR *=.*tar")
827 (string-append "TAR = " (which "tar")))
828 (("AS *=.*as")
829 (string-append "AS = " (which "as")))
830 (("LD *=.*ld")
831 (string-append "LD = " (which "ld")))
832 (("STRIP *=.*strip")
833 (string-append "STRIP = " (which "strip")))
834 (("NM *=.*nm")
835 (string-append "NM = " (which "nm")))
836 (("^SH *=.*sh")
837 (string-append "SH = " (which "bash")))
838 (("^FIND *=.*find")
839 (string-append "FIND = " (which "find")))
840 (("LDD *=.*ldd")
841 (string-append "LDD = " (which "ldd")))
842 (("NAWK *=.*(n|g)awk")
843 (string-append "NAWK = " (which "gawk")))
844 (("XARGS *=.*xargs")
845 (string-append "XARGS = " (which "xargs")))
846 (("UNZIP *=.*unzip")
847 (string-append "UNZIP = " (which "unzip")))
848 (("ZIPEXE *=.*zip")
849 (string-append "ZIPEXE = " (which "zip")))
850 (("SED *=.*sed")
851 (string-append "SED = " (which "sed"))))
852
853 ;; Some of these timestamps cause problems as they are more than
854 ;; 10 years ago, failing the build process.
855 (substitute*
856 "openjdk/jdk/src/share/classes/java/util/CurrencyData.properties"
857 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
858 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
859 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
860 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY"))
861 #t)))
862 (add-before 'configure 'set-additional-paths
863 (lambda* (#:key inputs #:allow-other-keys)
864 (setenv "CPATH"
865 (string-append (assoc-ref inputs "libxrender")
866 "/include/X11/extensions" ":"
867 (assoc-ref inputs "libxtst")
868 "/include/X11/extensions" ":"
869 (assoc-ref inputs "libxinerama")
870 "/include/X11/extensions" ":"
871 (or (getenv "CPATH") "")))
872 (setenv "ALT_CUPS_HEADERS_PATH"
873 (string-append (assoc-ref inputs "cups")
874 "/include"))
875 (setenv "ALT_FREETYPE_HEADERS_PATH"
876 (string-append (assoc-ref inputs "freetype")
877 "/include"))
878 (setenv "ALT_FREETYPE_LIB_PATH"
879 (string-append (assoc-ref inputs "freetype")
880 "/lib"))
881 #t))
882 (replace 'install
883 (lambda* (#:key outputs #:allow-other-keys)
884 (let ((doc (string-append (assoc-ref outputs "doc")
885 "/share/doc/icedtea"))
886 (jre (assoc-ref outputs "out"))
887 (jdk (assoc-ref outputs "jdk")))
888 (copy-recursively "openjdk.build/docs" doc)
889 (copy-recursively "openjdk.build/j2re-image" jre)
890 (copy-recursively "openjdk.build/j2sdk-image" jdk))
891 #t)))))
892 (native-inputs
893 `(("ant" ,ant-bootstrap)
894 ("alsa-lib" ,alsa-lib)
895 ("attr" ,attr)
896 ("classpath" ,classpath-devel)
897 ("coreutils" ,coreutils)
898 ("cpio" ,cpio)
899 ("cups" ,cups)
900 ("ecj" ,ecj-bootstrap)
b5a0d427 901 ("ecj-javac" ,ecj-javac-wrapper-final)
98419316
RW
902 ("fastjar" ,fastjar)
903 ("fontconfig" ,fontconfig)
904 ("freetype" ,freetype)
bcb078a4 905 ("gcc" ,gcc-4.9) ; there's a segmentation fault when compiling with gcc-5 or gcc-7
98419316
RW
906 ("gtk" ,gtk+-2)
907 ("gawk" ,gawk)
908 ("giflib" ,giflib)
909 ("grep" ,grep)
910 ("jamvm" ,jamvm)
911 ("lcms" ,lcms)
912 ("libjpeg" ,libjpeg)
bcb078a4 913 ("libnsl" ,libnsl)
98419316
RW
914 ("libpng" ,libpng)
915 ("libtool" ,libtool)
916 ("libx11" ,libx11)
917 ("libxcomposite" ,libxcomposite)
918 ("libxi" ,libxi)
919 ("libxinerama" ,libxinerama)
920 ("libxrender" ,libxrender)
921 ("libxslt" ,libxslt) ;for xsltproc
922 ("libxt" ,libxt)
923 ("libxtst" ,libxtst)
924 ("mit-krb5" ,mit-krb5)
925 ("nss" ,nss)
926 ("nss-certs" ,nss-certs)
927 ("perl" ,perl)
928 ("pkg-config" ,pkg-config)
929 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
930 ("unzip" ,unzip)
931 ("wget" ,wget)
932 ("which" ,which)
933 ("zip" ,zip)
934 ("zlib" ,zlib)
935 ("openjdk-src"
936 ,(origin
937 (method hg-fetch)
938 (uri (hg-reference
939 (url "http://hg.openjdk.java.net/jdk6/jdk6/")
940 (changeset "jdk6-b41")))
941 (sha256
942 (base32
943 "14q47yfg586fs64w30g8mk92m5dkxsvr36zzh0ra99xk5x0x96mv"))))
944 ("jdk-src"
945 ,(origin
946 (method hg-fetch)
947 (uri (hg-reference
948 (url "http://hg.openjdk.java.net/jdk6/jdk6/jdk/")
949 (changeset "jdk6-b41")))
950 (sha256
951 (base32
952 "165824nhg1k1dx6zs9dny0j49rmk35jw5b13dmz8c77jfajml4v9"))))
953 ("hotspot-src"
954 ,(origin
955 (method hg-fetch)
956 (uri (hg-reference
957 (url "http://hg.openjdk.java.net/jdk6/jdk6/hotspot/")
958 (changeset "jdk6-b41")))
959 (sha256
960 (base32
1cdff8cd
GB
961 "07lc1z4k5dj9nrc1wvwmpvxr3xgxrdkdh53xb95skk5ij49yagfd"))
962 (patches
963 (search-patches "icedtea-6-hotspot-gcc-segfault-workaround.patch"))))
98419316
RW
964 ("corba-src"
965 ,(origin
966 (method hg-fetch)
967 (uri (hg-reference
968 (url "http://hg.openjdk.java.net/jdk6/jdk6/corba/")
969 (changeset "jdk6-b41")))
970 (sha256
971 (base32
972 "1p9g1r9dnax2iwp7yb59qx7m4nmshqhwmrb2b8jj8zgbd9dl2i3q"))))
973 ("langtools-src"
974 ,(origin
975 (method hg-fetch)
976 (uri (hg-reference
977 (url "http://hg.openjdk.java.net/jdk6/jdk6/langtools/")
978 (changeset "jdk6-b41")))
979 (sha256
980 (base32
981 "1x52wd67fynbbd9ild6fb4wvba3f5hhwk03qdjfazd0a1qr37z3d"))))
982 ("jaxp-src"
983 ,(origin
984 (method hg-fetch)
985 (uri (hg-reference
986 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxp/")
987 (changeset "jdk6-b41")))
988 (sha256
989 (base32
990 "0shlqrvzpr4nrkmv215lbxnby63s3yvbdh1yxcayznsyqwa4nlxm"))))
991 ("jaxws-src"
992 ,(origin
993 (method hg-fetch)
994 (uri (hg-reference
995 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxws/")
996 (changeset "jdk6-b41")))
997 (sha256
998 (base32
999 "0835lkw8vib1xhp8lxnybhlvzdh699hbi4mclxanydjk63zbpxk0"))))))
1000 (home-page "http://icedtea.classpath.org")
1001 (synopsis "Java development kit")
1002 (description
1003 "This package provides the OpenJDK built with the IcedTea build harness.
1004This version of the OpenJDK is no longer maintained and is only used for
1005bootstrapping purposes.")
1006 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1007 ;; same license as both GNU Classpath and OpenJDK.
1008 (license license:gpl2+)))
1009
a243e12a 1010(define-public icedtea-7
7f6485e7 1011 (let* ((version "2.6.13")
f6789047
RW
1012 (drop (lambda (name hash)
1013 (origin
1014 (method url-fetch)
1015 (uri (string-append
d30ce4a7 1016 "http://icedtea.classpath.org/download/drops"
f6789047
RW
1017 "/icedtea7/" version "/" name ".tar.bz2"))
1018 (sha256 (base32 hash))))))
71053e14
RW
1019 (package
1020 (name "icedtea")
f6789047
RW
1021 (version version)
1022 (source (origin
1023 (method url-fetch)
1024 (uri (string-append
1025 "http://icedtea.wildebeest.org/download/source/icedtea-"
1026 version ".tar.xz"))
1027 (sha256
1028 (base32
7f6485e7 1029 "1w331rdqx1dcx2xb0fmjmrkdc71xqn20fxsgw8by4xhiblh88khh"))
f6789047
RW
1030 (modules '((guix build utils)))
1031 (snippet
6cbee49d
MW
1032 '(begin
1033 (substitute* "Makefile.in"
1034 ;; do not leak information about the build host
1035 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
1036 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
1037 #t))))
71053e14
RW
1038 (build-system gnu-build-system)
1039 (outputs '("out" ; Java Runtime Environment
1040 "jdk" ; Java Development Kit
1041 "doc")) ; all documentation
f6789047
RW
1042 (arguments
1043 `(;; There are many test failures. Some are known to
1044 ;; fail upstream, others relate to not having an X
1045 ;; server running at test time, yet others are a
1046 ;; complete mystery to me.
1047
1048 ;; hotspot: passed: 241; failed: 45; error: 2
1049 ;; langtools: passed: 1,934; failed: 26
1050 ;; jdk: unknown
1051 #:tests? #f
71053e14
RW
1052
1053 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
1054 ;; gremlin) doesn't support it yet, so skip this phase.
1055 #:validate-runpath? #f
1056
f6789047
RW
1057 ;; Apparently, the C locale is needed for some of the tests.
1058 #:locale "C"
71053e14
RW
1059
1060 #:modules ((guix build utils)
1061 (guix build gnu-build-system)
1062 (ice-9 match)
1063 (ice-9 popen)
71053e14
RW
1064 (srfi srfi-19)
1065 (srfi srfi-26))
1066
1067 #:configure-flags
e2098e2d
RW
1068 ;; TODO: package pcsc and sctp, and add to inputs
1069 `("--disable-system-pcsc"
1070 "--disable-system-sctp"
1071 "--enable-bootstrap"
1072 "--enable-nss"
1073 "--without-rhino"
1074 "--disable-downloading"
1075 "--disable-tests" ;they are run in the check phase instead
1076 "--with-openjdk-src-dir=./openjdk.src"
1077 ,(string-append "--with-jdk-home="
1078 (assoc-ref %build-inputs "jdk")))
71053e14
RW
1079
1080 #:phases
1081 (modify-phases %standard-phases
1082 (replace 'unpack
1083 (lambda* (#:key source inputs #:allow-other-keys)
1084 (let ((target (string-append "icedtea-" ,version))
1085 (unpack (lambda* (name #:optional dir)
1086 (let ((dir (or dir
1087 (string-drop-right name 5))))
1088 (mkdir dir)
2c8ac364
MW
1089 (invoke "tar" "xvf"
1090 (assoc-ref inputs name)
1091 "-C" dir
1092 "--strip-components=1")))))
71053e14 1093 (mkdir target)
2c8ac364
MW
1094 (invoke "tar" "xvf" source
1095 "-C" target "--strip-components=1")
1096 (chdir target)
1097 (unpack "openjdk-src" "openjdk.src")
1098 (with-directory-excursion "openjdk.src"
1099 (for-each unpack
1100 (filter (cut string-suffix? "-drop" <>)
1101 (map (match-lambda
1102 ((name . _) name))
1103 inputs))))
1104 #t)))
71053e14
RW
1105 (add-after 'unpack 'fix-x11-extension-include-path
1106 (lambda* (#:key inputs #:allow-other-keys)
1107 (substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk"
1108 (((string-append "\\$\\(firstword \\$\\(wildcard "
1109 "\\$\\(OPENWIN_HOME\\)"
1110 "/include/X11/extensions\\).*$"))
1111 (string-append (assoc-ref inputs "libxrender")
1112 "/include/X11/extensions"
1113 " -I" (assoc-ref inputs "libxtst")
1114 "/include/X11/extensions"
1115 " -I" (assoc-ref inputs "libxinerama")
1116 "/include/X11/extensions"))
1117 (("\\$\\(wildcard /usr/include/X11/extensions\\)\\)") ""))
1118 #t))
1119 (add-after 'unpack 'patch-paths
1120 (lambda _
1121 ;; buildtree.make generates shell scripts, so we need to replace
1122 ;; the generated shebang
1123 (substitute* '("openjdk.src/hotspot/make/linux/makefiles/buildtree.make")
1124 (("/bin/sh") (which "bash")))
1125
1126 (let ((corebin (string-append
1127 (assoc-ref %build-inputs "coreutils") "/bin/"))
1128 (binbin (string-append
1129 (assoc-ref %build-inputs "binutils") "/bin/"))
1130 (grepbin (string-append
1131 (assoc-ref %build-inputs "grep") "/bin/")))
1132 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-linux.gmk"
1133 "openjdk.src/corba/make/common/shared/Defs-linux.gmk")
1134 (("UNIXCOMMAND_PATH = /bin/")
1135 (string-append "UNIXCOMMAND_PATH = " corebin))
1136 (("USRBIN_PATH = /usr/bin/")
1137 (string-append "USRBIN_PATH = " corebin))
1138 (("DEVTOOLS_PATH *= */usr/bin/")
1139 (string-append "DEVTOOLS_PATH = " corebin))
1140 (("COMPILER_PATH *= */usr/bin/")
1141 (string-append "COMPILER_PATH = "
1142 (assoc-ref %build-inputs "gcc") "/bin/"))
1143 (("DEF_OBJCOPY *=.*objcopy")
1144 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
1145
1146 ;; fix path to alsa header
1147 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1148 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1149 (string-append "ALSA_INCLUDE="
1150 (assoc-ref %build-inputs "alsa-lib")
1151 "/include/alsa/version.h")))
1152
1153 ;; fix hard-coded utility paths
1154 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-utils.gmk"
1155 "openjdk.src/corba/make/common/shared/Defs-utils.gmk")
1156 (("ECHO *=.*echo")
1157 (string-append "ECHO = " (which "echo")))
1158 (("^GREP *=.*grep")
1159 (string-append "GREP = " (which "grep")))
1160 (("EGREP *=.*egrep")
1161 (string-append "EGREP = " (which "egrep")))
1162 (("CPIO *=.*cpio")
1163 (string-append "CPIO = " (which "cpio")))
1164 (("READELF *=.*readelf")
1165 (string-append "READELF = " (which "readelf")))
1166 (("^ *AR *=.*ar")
1167 (string-append "AR = " (which "ar")))
1168 (("^ *TAR *=.*tar")
1169 (string-append "TAR = " (which "tar")))
1170 (("AS *=.*as")
1171 (string-append "AS = " (which "as")))
1172 (("LD *=.*ld")
1173 (string-append "LD = " (which "ld")))
1174 (("STRIP *=.*strip")
1175 (string-append "STRIP = " (which "strip")))
1176 (("NM *=.*nm")
1177 (string-append "NM = " (which "nm")))
1178 (("^SH *=.*sh")
1179 (string-append "SH = " (which "bash")))
1180 (("^FIND *=.*find")
1181 (string-append "FIND = " (which "find")))
1182 (("LDD *=.*ldd")
1183 (string-append "LDD = " (which "ldd")))
1184 (("NAWK *=.*(n|g)awk")
1185 (string-append "NAWK = " (which "gawk")))
1186 (("XARGS *=.*xargs")
1187 (string-append "XARGS = " (which "xargs")))
1188 (("UNZIP *=.*unzip")
1189 (string-append "UNZIP = " (which "unzip")))
1190 (("ZIPEXE *=.*zip")
1191 (string-append "ZIPEXE = " (which "zip")))
1192 (("SED *=.*sed")
1193 (string-append "SED = " (which "sed"))))
1194
1195 ;; Some of these timestamps cause problems as they are more than
1196 ;; 10 years ago, failing the build process.
1197 (substitute*
1198 "openjdk.src/jdk/src/share/classes/java/util/CurrencyData.properties"
1199 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
1200 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
1201 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
1202 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY")))
1203 #t))
1204 (add-before 'configure 'set-additional-paths
1205 (lambda* (#:key inputs #:allow-other-keys)
e2098e2d
RW
1206 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1207 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1208 (string-append "ALSA_INCLUDE="
1209 (assoc-ref inputs "alsa-lib")
1210 "/include/alsa/version.h")))
1211 (setenv "CC" "gcc")
1212 (setenv "CPATH"
1213 (string-append (assoc-ref inputs "libxcomposite")
1214 "/include/X11/extensions" ":"
1215 (assoc-ref inputs "libxrender")
1216 "/include/X11/extensions" ":"
1217 (assoc-ref inputs "libxtst")
1218 "/include/X11/extensions" ":"
1219 (assoc-ref inputs "libxinerama")
1220 "/include/X11/extensions" ":"
1221 (or (getenv "CPATH") "")))
1222 (setenv "ALT_OBJCOPY" (which "objcopy"))
1223 (setenv "ALT_CUPS_HEADERS_PATH"
1224 (string-append (assoc-ref inputs "cups")
1225 "/include"))
1226 (setenv "ALT_FREETYPE_HEADERS_PATH"
1227 (string-append (assoc-ref inputs "freetype")
1228 "/include"))
1229 (setenv "ALT_FREETYPE_LIB_PATH"
1230 (string-append (assoc-ref inputs "freetype")
1231 "/lib"))
71053e14
RW
1232 #t))
1233 (add-before 'check 'fix-test-framework
1234 (lambda _
1235 ;; Fix PATH in test environment
1236 (substitute* "test/jtreg/com/sun/javatest/regtest/Main.java"
1237 (("PATH=/bin:/usr/bin")
1238 (string-append "PATH=" (getenv "PATH"))))
1239 (substitute* "test/jtreg/com/sun/javatest/util/SysEnv.java"
1240 (("/usr/bin/env") (which "env")))
1241 (substitute* "openjdk.src/hotspot/test/test_env.sh"
1242 (("/bin/rm") (which "rm"))
1243 (("/bin/cp") (which "cp"))
1244 (("/bin/mv") (which "mv")))
1245 #t))
1246 (add-before 'check 'fix-hotspot-tests
1247 (lambda _
1248 (with-directory-excursion "openjdk.src/hotspot/test/"
1249 (substitute* "jprt.config"
1250 (("PATH=\"\\$\\{path4sdk\\}\"")
1251 (string-append "PATH=" (getenv "PATH")))
1252 (("make=/usr/bin/make")
1253 (string-append "make=" (which "make"))))
1254 (substitute* '("runtime/6626217/Test6626217.sh"
1255 "runtime/7110720/Test7110720.sh")
1256 (("/bin/rm") (which "rm"))
1257 (("/bin/cp") (which "cp"))
1258 (("/bin/mv") (which "mv"))))
1259 #t))
1260 (add-before 'check 'fix-jdk-tests
1261 (lambda _
1262 (with-directory-excursion "openjdk.src/jdk/test/"
1263 (substitute* "com/sun/jdi/JdbReadTwiceTest.sh"
1264 (("/bin/pwd") (which "pwd")))
1265 (substitute* "com/sun/jdi/ShellScaffold.sh"
1266 (("/bin/kill") (which "kill")))
1267 (substitute* "start-Xvfb.sh"
1268 ;;(("/usr/bin/X11/Xvfb") (which "Xvfb"))
1269 (("/usr/bin/nohup") (which "nohup")))
1270 (substitute* "javax/security/auth/Subject/doAs/Test.sh"
1271 (("/bin/rm") (which "rm")))
1272 (substitute* "tools/launcher/MultipleJRE.sh"
1273 (("echo \"#!/bin/sh\"")
1274 (string-append "echo \"#!" (which "rm") "\""))
1275 (("/usr/bin/zip") (which "zip")))
1276 (substitute* "com/sun/jdi/OnThrowTest.java"
1277 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1278 (substitute* "java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java"
1279 (("/usr/bin/uptime") (which "uptime")))
1280 (substitute* "java/lang/ProcessBuilder/Basic.java"
1281 (("/usr/bin/env") (which "env"))
1282 (("/bin/false") (which "false"))
1283 (("/bin/true") (which "true"))
1284 (("/bin/cp") (which "cp"))
1285 (("/bin/sh") (which "sh")))
1286 (substitute* "java/lang/ProcessBuilder/FeelingLucky.java"
1287 (("/bin/sh") (which "sh")))
1288 (substitute* "java/lang/ProcessBuilder/Zombies.java"
1289 (("/usr/bin/perl") (which "perl"))
1290 (("/bin/ps") (which "ps"))
1291 (("/bin/true") (which "true")))
1292 (substitute* "java/lang/Runtime/exec/ConcurrentRead.java"
1293 (("/usr/bin/tee") (which "tee")))
1294 (substitute* "java/lang/Runtime/exec/ExecWithDir.java"
1295 (("/bin/true") (which "true")))
1296 (substitute* "java/lang/Runtime/exec/ExecWithInput.java"
1297 (("/bin/cat") (which "cat")))
1298 (substitute* "java/lang/Runtime/exec/ExitValue.java"
1299 (("/bin/sh") (which "sh"))
1300 (("/bin/true") (which "true"))
1301 (("/bin/kill") (which "kill")))
1302 (substitute* "java/lang/Runtime/exec/LotsOfDestroys.java"
1303 (("/usr/bin/echo") (which "echo")))
1304 (substitute* "java/lang/Runtime/exec/LotsOfOutput.java"
1305 (("/usr/bin/cat") (which "cat")))
1306 (substitute* "java/lang/Runtime/exec/SleepyCat.java"
1307 (("/bin/cat") (which "cat"))
1308 (("/bin/sleep") (which "sleep"))
1309 (("/bin/sh") (which "sh")))
1310 (substitute* "java/lang/Runtime/exec/StreamsSurviveDestroy.java"
1311 (("/bin/cat") (which "cat")))
1312 (substitute* "java/rmi/activation/CommandEnvironment/SetChildEnv.java"
1313 (("/bin/chmod") (which "chmod")))
1314 (substitute* "java/util/zip/ZipFile/Assortment.java"
1315 (("/bin/sh") (which "sh"))))
1316 #t))
1317 (replace 'check
1318 (lambda _
1319 ;; The "make check-*" targets always return zero, so we need to
1320 ;; check for errors in the associated log files to determine
1321 ;; whether any tests have failed.
1322 (use-modules (ice-9 rdelim))
1323 (let* ((error-pattern (make-regexp "^(Error|FAILED):.*"))
1324 (checker (lambda (port)
1325 (let loop ()
1326 (let ((line (read-line port)))
1327 (cond
1328 ((eof-object? line) #t)
2c8ac364
MW
1329 ((regexp-exec error-pattern line)
1330 (error "test failed"))
71053e14
RW
1331 (else (loop)))))))
1332 (run-test (lambda (test)
2c8ac364 1333 (invoke "make" test)
71053e14
RW
1334 (call-with-input-file
1335 (string-append "test/" test ".log")
1336 checker))))
2c8ac364
MW
1337 (when #f ; skip tests
1338 (run-test "check-hotspot")
1339 (run-test "check-langtools")
fa41a089
MW
1340 (run-test "check-jdk"))
1341 #t)))
71053e14
RW
1342 (replace 'install
1343 (lambda* (#:key outputs #:allow-other-keys)
1344 (let ((doc (string-append (assoc-ref outputs "doc")
1345 "/share/doc/icedtea"))
1346 (jre (assoc-ref outputs "out"))
1347 (jdk (assoc-ref outputs "jdk")))
1348 (copy-recursively "openjdk.build/docs" doc)
1349 (copy-recursively "openjdk.build/j2re-image" jre)
1350 (copy-recursively "openjdk.build/j2sdk-image" jdk))
1351 #t))
491dc2fb
RJ
1352 ;; Some of the libraries in the lib/amd64 folder link to libjvm.so.
1353 ;; But that shared object is located in the server/ folder, so it
1354 ;; cannot be found. This phase creates a symbolic link in the
1355 ;; lib/amd64 folder so that the other libraries can find it.
1356 ;;
1357 ;; See:
1358 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1359 ;;
1360 ;; FIXME: Find the bug in the build system, so that this symlink is
1361 ;; not needed.
1362 (add-after 'install 'install-libjvm
1363 (lambda* (#:key inputs outputs #:allow-other-keys)
1364 (let* ((lib-path (string-append (assoc-ref outputs "out")
1365 "/lib/amd64")))
1366 (symlink (string-append lib-path "/server/libjvm.so")
1367 (string-append lib-path "/libjvm.so")))
1368 #t))
71053e14
RW
1369 ;; By default IcedTea only generates an empty keystore. In order to
1370 ;; be able to use certificates in Java programs we need to generate a
1371 ;; keystore from a set of certificates. For convenience we use the
1372 ;; certificates from the nss-certs package.
1373 (add-after 'install 'install-keystore
1374 (lambda* (#:key inputs outputs #:allow-other-keys)
1375 (let* ((keystore "cacerts")
1376 (certs-dir (string-append (assoc-ref inputs "nss-certs")
1377 "/etc/ssl/certs"))
1378 (keytool (string-append (assoc-ref outputs "jdk")
1379 "/bin/keytool")))
1380 (define (extract-cert file target)
1381 (call-with-input-file file
1382 (lambda (in)
1383 (call-with-output-file target
1384 (lambda (out)
1385 (let loop ((line (read-line in 'concat))
1386 (copying? #f))
1387 (cond
1388 ((eof-object? line) #t)
1389 ((string-prefix? "-----BEGIN" line)
1390 (display line out)
1391 (loop (read-line in 'concat) #t))
1392 ((string-prefix? "-----END" line)
1393 (display line out)
1394 #t)
1395 (else
1396 (when copying? (display line out))
1397 (loop (read-line in 'concat) copying?)))))))))
1398 (define (import-cert cert)
1399 (format #t "Importing certificate ~a\n" (basename cert))
1400 (let ((temp "tmpcert"))
1401 (extract-cert cert temp)
1402 (let ((port (open-pipe* OPEN_WRITE keytool
1403 "-import"
1404 "-alias" (basename cert)
1405 "-keystore" keystore
1406 "-storepass" "changeit"
1407 "-file" temp)))
1408 (display "yes\n" port)
1409 (when (not (zero? (status:exit-val (close-pipe port))))
1410 (format #t "failed to import ~a\n" cert)))
1411 (delete-file temp)))
1412
1413 ;; This is necessary because the certificate directory contains
1414 ;; files with non-ASCII characters in their names.
1415 (setlocale LC_ALL "en_US.utf8")
1416 (setenv "LC_ALL" "en_US.utf8")
1417
1418 (for-each import-cert (find-files certs-dir "\\.pem$"))
1419 (mkdir-p (string-append (assoc-ref outputs "out")
1420 "/lib/security"))
1421 (mkdir-p (string-append (assoc-ref outputs "jdk")
1422 "/jre/lib/security"))
1423
1424 ;; The cacerts files we are going to overwrite are chmod'ed as
1425 ;; read-only (444) in icedtea-8 (which derives from this
1426 ;; package). We have to change this so we can overwrite them.
1427 (chmod (string-append (assoc-ref outputs "out")
1428 "/lib/security/" keystore) #o644)
1429 (chmod (string-append (assoc-ref outputs "jdk")
1430 "/jre/lib/security/" keystore) #o644)
1431
1432 (install-file keystore
1433 (string-append (assoc-ref outputs "out")
1434 "/lib/security"))
1435 (install-file keystore
1436 (string-append (assoc-ref outputs "jdk")
1437 "/jre/lib/security"))
1438 #t))))))
f6789047 1439 (native-inputs
d9148890 1440 `(("openjdk-src"
f6789047 1441 ,(drop "openjdk"
7f6485e7 1442 "0l34ikyf62hbzlf9032alzkkqvf7bpmckz4gvirvph755w7gka8l"))
f6789047
RW
1443 ("corba-drop"
1444 ,(drop "corba"
7f6485e7 1445 "050gv2jbg1pi6qkn8w18bwpbklfa5b0kymjvan9pncddbj8m84fz"))
f6789047
RW
1446 ("jaxp-drop"
1447 ,(drop "jaxp"
7f6485e7 1448 "1k6yldwnxfzdg5926r1nlfv8d1r1j7rlp2nkz6gqh05vgyamnfhl"))
f6789047
RW
1449 ("jaxws-drop"
1450 ,(drop "jaxws"
7f6485e7 1451 "110j7jlz47x2gg6f7653x12mssan5kvj9l9h1m1c8c92drfxbqyk"))
f6789047
RW
1452 ("jdk-drop"
1453 ,(drop "jdk"
7f6485e7 1454 "0d1mca38ksxvdskp9im3pp7fdijhj1n3lwq9w13r9s4v3qyskgdd"))
f6789047
RW
1455 ("langtools-drop"
1456 ,(drop "langtools"
7f6485e7 1457 "0nq5236fzxn3p6x8cgncl56mzcmsj07q9gymysnws4c8byc6n0qj"))
f6789047 1458 ("hotspot-drop"
db024183
GB
1459 ,(origin
1460 (method url-fetch)
1461 (uri (string-append
1462 "http://icedtea.classpath.org/downloads/drops"
1463 "/icedtea7/" version "/hotspot.tar.bz2"))
1464 (sha256
1465 (base32
1466 "17bdv39n4lh8l5737c96f3xgamx4y305m067p01cywgp7zaddqws"))
1467 (patches (search-patches
1468 "icedtea-7-hotspot-gcc-segfault-workaround.patch"))))
e2098e2d 1469 ("ant" ,ant-bootstrap)
71053e14 1470 ("attr" ,attr)
71053e14
RW
1471 ("coreutils" ,coreutils)
1472 ("diffutils" ,diffutils) ;for tests
1473 ("gawk" ,gawk)
1474 ("grep" ,grep)
1475 ("libtool" ,libtool)
1476 ("pkg-config" ,pkg-config)
1477 ("wget" ,wget)
1478 ("which" ,which)
1479 ("cpio" ,cpio)
1480 ("zip" ,zip)
1481 ("unzip" ,unzip)
1482 ("fastjar" ,fastjar)
1483 ("libxslt" ,libxslt) ;for xsltproc
1484 ("nss-certs" ,nss-certs)
1485 ("perl" ,perl)
1486 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
e2098e2d 1487 ("jdk" ,icedtea-6 "jdk")))
b711df02 1488 (inputs
71053e14
RW
1489 `(("alsa-lib" ,alsa-lib)
1490 ("cups" ,cups)
1491 ("libx11" ,libx11)
1492 ("libxcomposite" ,libxcomposite)
1493 ("libxt" ,libxt)
1494 ("libxtst" ,libxtst)
1495 ("libxi" ,libxi)
1496 ("libxinerama" ,libxinerama)
1497 ("libxrender" ,libxrender)
1498 ("libjpeg" ,libjpeg)
1499 ("libpng" ,libpng)
1500 ("mit-krb5" ,mit-krb5)
1501 ("nss" ,nss)
1502 ("giflib" ,giflib)
1503 ("fontconfig" ,fontconfig)
1504 ("freetype" ,freetype)
1505 ("lcms" ,lcms)
1506 ("zlib" ,zlib)
1507 ("gtk" ,gtk+-2)))
1508 (home-page "http://icedtea.classpath.org")
1509 (synopsis "Java development kit")
1510 (description
1511 "This package provides the Java development kit OpenJDK built with the
1512IcedTea build harness.")
1513 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1514 ;; same license as both GNU Classpath and OpenJDK.
1515 (license license:gpl2+))))
d2540f80 1516
349a3147 1517(define-public icedtea-8
1d97d8ff 1518 (let* ((version "3.7.0")
349a3147
RW
1519 (drop (lambda (name hash)
1520 (origin
1521 (method url-fetch)
1522 (uri (string-append
db531f73 1523 "http://icedtea.classpath.org/download/drops"
349a3147
RW
1524 "/icedtea8/" version "/" name ".tar.xz"))
1525 (sha256 (base32 hash))))))
1526 (package (inherit icedtea-7)
1d97d8ff 1527 (version "3.7.0")
349a3147
RW
1528 (source (origin
1529 (method url-fetch)
1530 (uri (string-append
1531 "http://icedtea.wildebeest.org/download/source/icedtea-"
1532 version ".tar.xz"))
1533 (sha256
1534 (base32
1d97d8ff 1535 "09yqzn8rpccs7cyv89hhy5zlznpgqw5x3jz0w1ccp0cz1vgs8l5w"))
349a3147
RW
1536 (modules '((guix build utils)))
1537 (snippet
0c729ef4 1538 '(begin
f2785bd6
RW
1539 (substitute* '("configure"
1540 "acinclude.m4")
0c729ef4
RW
1541 ;; Do not embed build time
1542 (("(DIST_ID=\"Custom build).*$" _ prefix)
1543 (string-append prefix "\"\n"))
1544 ;; Do not leak information about the build host
1545 (("DIST_NAME=\"\\$build_os\"")
1546 "DIST_NAME=\"guix\""))
1547 #t))))
349a3147 1548 (arguments
f2785bd6
RW
1549 `(#:imported-modules
1550 ((guix build ant-build-system)
1551 (guix build syscalls)
1552 ,@%gnu-build-system-modules)
1553 ,@(substitute-keyword-arguments (package-arguments icedtea-7)
1554 ((#:modules modules)
1555 `((guix build utils)
1556 (guix build gnu-build-system)
1557 ((guix build ant-build-system) #:prefix ant:)
1558 (ice-9 match)
1559 (ice-9 popen)
1560 (srfi srfi-19)
1561 (srfi srfi-26)))
1562 ((#:configure-flags flags)
1563 `(let ((jdk (assoc-ref %build-inputs "jdk")))
1564 `( ;;"--disable-bootstrap"
1565 "--enable-bootstrap"
1566 "--enable-nss"
1567 "--disable-downloading"
1568 "--disable-system-pcsc"
1569 "--disable-system-sctp"
1570 "--disable-tests" ;they are run in the check phase instead
1571 "--with-openjdk-src-dir=./openjdk.src"
1572 ,(string-append "--with-jdk-home=" jdk))))
1573 ((#:phases phases)
1574 `(modify-phases ,phases
1575 (delete 'fix-x11-extension-include-path)
1576 (delete 'patch-paths)
1577 (delete 'set-additional-paths)
1578 (delete 'patch-patches)
1579 ;; Prevent the keytool from recording the current time when
1580 ;; adding certificates at build time.
1581 (add-after 'unpack 'patch-keystore
1582 (lambda _
1583 (substitute* "openjdk.src/jdk/src/share/classes/sun/security/provider/JavaKeyStore.java"
1584 (("date = new Date\\(\\);")
1585 "\
1586date = (System.getenv(\"SOURCE_DATE_EPOCH\") != null) ?\
1587new Date(Long.parseLong(System.getenv(\"SOURCE_DATE_EPOCH\"))) :\
1588new Date();"))
1589 #t))
1590 (add-after 'unpack 'patch-jni-libs
1591 ;; Hardcode dynamically loaded libraries.
1592 (lambda _
1593 (let* ((library-path (search-path-as-string->list
1594 (getenv "LIBRARY_PATH")))
1595 (find-library (lambda (name)
1596 (search-path
1597 library-path
1598 (string-append "lib" name ".so")))))
1599 (for-each
1600 (lambda (file)
1601 (catch 'decoding-error
1602 (lambda ()
1603 (substitute* file
1604 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
1605 _ name version)
1606 (format #f "\"~a\"" (find-library name)))
1607 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
1608 (format #f "\"~a\"" (find-library name)))))
1609 (lambda _
1610 ;; Those are safe to skip.
1611 (format (current-error-port)
1612 "warning: failed to substitute: ~a~%"
1613 file))))
1614 (find-files "openjdk.src/jdk/src/solaris/native"
1615 "\\.c|\\.h"))
1616 #t)))
1617 (replace 'install
1618 (lambda* (#:key outputs #:allow-other-keys)
1619 (let ((doc (string-append (assoc-ref outputs "doc")
1620 "/share/doc/icedtea"))
1621 (jre (assoc-ref outputs "out"))
1622 (jdk (assoc-ref outputs "jdk")))
1623 (copy-recursively "openjdk.build/docs" doc)
1624 (copy-recursively "openjdk.build/images/j2re-image" jre)
1625 (copy-recursively "openjdk.build/images/j2sdk-image" jdk)
1626 ;; Install the nss.cfg file to JRE to enable SSL/TLS
1627 ;; support via NSS.
1628 (copy-file (string-append jdk "/jre/lib/security/nss.cfg")
1629 (string-append jre "/lib/security/nss.cfg"))
1630 #t)))
1631 (add-after 'install 'strip-jar-timestamps
1632 (assoc-ref ant:%standard-phases 'strip-jar-timestamps)))))))
349a3147
RW
1633 (native-inputs
1634 `(("jdk" ,icedtea-7 "jdk")
1635 ("openjdk-src"
1636 ,(drop "openjdk"
1d97d8ff 1637 "1mj6xgmw31i6qd30qi9dmv7160fbcfq5ikz1jwjihdg2793il19p"))
12eecbf0
LF
1638 ("aarch32-drop"
1639 ,(drop "aarch32"
1d97d8ff 1640 "1wb8k5zm40zld0986dvmlh5xh3gyixbg9h26sl662zy92amhmyyg"))
349a3147
RW
1641 ("corba-drop"
1642 ,(drop "corba"
1d97d8ff 1643 "11ma4zz0599cy70xd219v7a8vin7p96xrhhz3wsaw6cjhkzpagah"))
349a3147
RW
1644 ("jaxp-drop"
1645 ,(drop "jaxp"
1d97d8ff 1646 "14m1y0z0fbm5z5zjw3vnq85py8dma84bi3f9cw8rhdyc6skk8q4i"))
349a3147
RW
1647 ("jaxws-drop"
1648 ,(drop "jaxws"
1d97d8ff 1649 "09andnm6xaasnp963hgx42yiflifiljp9z7z85jrfyc5z8a5whmf"))
349a3147
RW
1650 ("jdk-drop"
1651 ,(drop "jdk"
1d97d8ff 1652 "0s6lcpc0zckz2fnq98aqf28nz9y3wbi41a3kyaqqa2abwbkm1zwl"))
349a3147
RW
1653 ("langtools-drop"
1654 ,(drop "langtools"
1d97d8ff 1655 "15wizy123vhk40chl1b4p552jf2pw2hdww0myf11qab425axz4nw"))
349a3147 1656 ("hotspot-drop"
673135df
GB
1657 ,(origin
1658 (method url-fetch)
1659 (uri (string-append
1660 "http://icedtea.classpath.org/download/drops"
1661 "/icedtea8/" version "/hotspot.tar.xz"))
1662 (sha256
1663 (base32
1664 "1ciz1w9j0kz7s1dxdhyqq71nla9icyz6qvn0b9z2zgkklqa98qmm"))
1665 (patches (search-patches
1666 "icedtea-7-hotspot-gcc-segfault-workaround.patch"))))
349a3147
RW
1667 ("nashorn-drop"
1668 ,(drop "nashorn"
1d97d8ff 1669 "19pzl3ppaw8j6r5cnyp8qiw3hxijh3hdc46l39g5yfhdl4pr4hpa"))
fd34d4f4
LF
1670 ("shenandoah-drop"
1671 ,(drop "shenandoah"
1d97d8ff 1672 "0k33anxdzw1icn072wynfmmdjhsv50hay0j1sfkfxny12rb3vgdy"))
349a3147 1673 ,@(fold alist-delete (package-native-inputs icedtea-7)
e2098e2d 1674 '("jdk" "openjdk-src" "corba-drop" "jaxp-drop" "jaxws-drop"
349a3147
RW
1675 "jdk-drop" "langtools-drop" "hotspot-drop")))))))
1676
dd741059
JL
1677(define-public openjdk9
1678 (package
1679 (name "openjdk")
1680 (version "9.181")
1681 (source (origin
1682 (method url-fetch)
1683 (uri "https://hg.openjdk.java.net/jdk/jdk/archive/3cc80be736f2.tar.bz2")
1684 (file-name (string-append name "-" version ".tar.bz2"))
1685 (sha256
1686 (base32
1687 "01ihmyf7k5z17wbr7xig7y40l9f01d5zjgkcmawn1102hw5kchpq"))
1688 (modules '((guix build utils)))
1689 (snippet
1690 `(begin
1691 (for-each delete-file (find-files "." ".*.bin$"))
1692 (for-each delete-file (find-files "." ".*.exe$"))
1693 (for-each delete-file (find-files "." ".*.jar$"))
1694 #t))))
1695 (build-system gnu-build-system)
1696 (outputs '("out" "jdk" "doc"))
1697 (arguments
1698 `(#:tests? #f; require jtreg
1699 #:imported-modules
1700 ((guix build syscalls)
1701 ,@%gnu-build-system-modules)
1702 #:phases
1703 (modify-phases %standard-phases
1704 (add-after 'patch-source-shebangs 'fix-java-shebangs
1705 (lambda _
1706 ;; This file was "fixed" by patch-source-shebangs, but it requires
1707 ;; this exact first line.
1708 (substitute* "jdk/make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1709 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
1710 #t))
1711 (replace 'configure
1712 (lambda* (#:key inputs outputs #:allow-other-keys)
1713 ;; TODO: unbundle libpng and lcms
1714 (invoke "bash" "./configure"
1715 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
1716 "--disable-freetype-bundling"
1717 "--disable-warnings-as-errors"
1718 "--disable-hotspot-gtest"
1719 "--with-giflib=system"
1720 "--with-libjpeg=system"
1721 (string-append "--prefix=" (assoc-ref outputs "out")))
1722 #t))
1723 (replace 'build
1724 (lambda _
1725 (with-output-to-file ".src-rev"
1726 (lambda _
1727 (display ,version)))
1728 (setenv "GUIX_LD_WRAPPER_ALLOW_IMPURITIES" "yes")
1729 (invoke "make" "all")
1730 #t))
1731 ;; Some of the libraries in the lib/ folder link to libjvm.so.
1732 ;; But that shared object is located in the server/ folder, so it
1733 ;; cannot be found. This phase creates a symbolic link in the
1734 ;; lib/ folder so that the other libraries can find it.
1735 ;;
1736 ;; See:
1737 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1738 ;;
1739 ;; FIXME: Find the bug in the build system, so that this symlink is
1740 ;; not needed.
1741 (add-after 'install 'install-libjvm
1742 (lambda* (#:key inputs outputs #:allow-other-keys)
1743 (let* ((lib-out (string-append (assoc-ref outputs "out")
1744 "/lib"))
1745 (lib-jdk (string-append (assoc-ref outputs "jdk")
1746 "/lib")))
1747 (symlink (string-append lib-jdk "/server/libjvm.so")
1748 (string-append lib-jdk "/libjvm.so"))
1749 (symlink (string-append lib-out "/server/libjvm.so")
1750 (string-append lib-out "/libjvm.so")))
1751 #t))
1752 (replace 'install
1753 (lambda* (#:key outputs #:allow-other-keys)
1754 (let ((out (assoc-ref outputs "out"))
1755 (jdk (assoc-ref outputs "jdk"))
1756 (doc (assoc-ref outputs "doc"))
1757 (images (car (find-files "build" ".*-server-release"
1758 #:directories? #t))))
1759 (copy-recursively (string-append images "/images/jdk") jdk)
1760 (copy-recursively (string-append images "/images/jre") out)
1761 (copy-recursively (string-append images "/images/docs") doc))
1762 #t))
1763 (add-after 'install 'strip-zip-timestamps
1764 (lambda* (#:key outputs #:allow-other-keys)
1765 (use-modules (guix build syscalls))
1766 (for-each (lambda (zip)
1767 (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
1768 (with-directory-excursion dir
1769 (invoke "unzip" zip))
1770 (delete-file zip)
1771 (for-each (lambda (file)
1772 (let ((s (lstat file)))
1773 (unless (eq? (stat:type s) 'symlink)
1774 (format #t "reset ~a~%" file)
1775 (utime file 0 0 0 0))))
1776 (find-files dir #:directories? #t))
1777 (with-directory-excursion dir
1778 (let ((files (find-files "." ".*" #:directories? #t)))
1779 (apply invoke "zip" "-0" "-X" zip files)))))
1780 (find-files (assoc-ref outputs "doc") ".*.zip$"))
1781 #t)))))
1782 (inputs
1783 `(("alsa-lib" ,alsa-lib)
1784 ("cups" ,cups)
1785 ("fontconfig" ,fontconfig)
1786 ("freetype" ,freetype)
1787 ("giflib" ,giflib)
1788 ("lcms" ,lcms)
1789 ("libelf" ,libelf)
1790 ("libjpeg" ,libjpeg)
1791 ("libice" ,libice)
1792 ("libpng" ,libpng)
1793 ("libx11" ,libx11)
1794 ("libxcomposite" ,libxcomposite)
1795 ("libxi" ,libxi)
1796 ("libxinerama" ,libxinerama)
1797 ("libxrender" ,libxrender)
1798 ("libxt" ,libxt)
1799 ("libxtst" ,libxtst)))
1800 (native-inputs
1801 `(("icedtea-8" ,icedtea-8)
1802 ("icedtea-8:jdk" ,icedtea-8 "jdk")
1803 ("unzip" ,unzip)
1804 ("which" ,which)
1805 ("zip" ,zip)))
1806 (home-page "https://openjdk.java.net/projects/jdk9/")
1807 (synopsis "Java development kit")
1808 (description
1809 "This package provides the Java development kit OpenJDK.")
1810 (license license:gpl2+)))
1811
16b89ecc
JL
1812(define-public openjdk10
1813 (package
1814 (inherit openjdk9)
1815 (name "openjdk")
1816 (version "10.46")
1817 (source (origin
1818 (method url-fetch)
1819 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/6fa770f9f8ab.tar.bz2")
1820 (file-name (string-append name "-" version ".tar.bz2"))
1821 (sha256
1822 (base32
1823 "0zywq2203b4hx4jms9vbwvjcj1d3k2v3qpx4s33729fkpmid97r4"))
accb5c31
GB
1824 (patches (search-patches
1825 "openjdk-10-idlj-reproducibility.patch"))
16b89ecc
JL
1826 (modules '((guix build utils)))
1827 (snippet
1828 `(begin
1829 (for-each delete-file (find-files "." ".*.bin$"))
1830 (for-each delete-file (find-files "." ".*.exe$"))
1831 (for-each delete-file (find-files "." ".*.jar$"))
1832 #t))))
1833 (arguments
1834 (substitute-keyword-arguments (package-arguments openjdk9)
1835 ((#:phases phases)
1836 `(modify-phases ,phases
1837 (replace 'fix-java-shebangs
1838 (lambda _
1839 ;; This file was "fixed" by patch-source-shebangs, but it requires
1840 ;; this exact first line.
1841 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1842 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
1843 #t))
1844 (replace 'configure
1845 (lambda* (#:key inputs outputs #:allow-other-keys)
1846 (invoke "bash" "./configure"
1847 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
1848 "--disable-freetype-bundling"
1849 "--disable-warnings-as-errors"
1850 "--disable-hotspot-gtest"
1851 "--with-giflib=system"
1852 "--with-libjpeg=system"
1853 "--with-native-debug-symbols=zipped"
1854 (string-append "--prefix=" (assoc-ref outputs "out")))
1855 #t))))))
1856 (native-inputs
1857 `(("openjdk9" ,openjdk9)
1858 ("openjdk9:jdk" ,openjdk9 "jdk")
1859 ("unzip" ,unzip)
1860 ("which" ,which)
1861 ("zip" ,zip)))))
1862
95bc85b7
GB
1863(define-public openjdk11
1864 (package
1865 (name "openjdk")
1866 (version "11.28")
1867 (source (origin
1868 (method url-fetch)
1869 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/76072a077ee1.tar.bz2")
1870 (file-name (string-append name "-" version ".tar.bz2"))
1871 (sha256
1872 (base32
1873 "0v705w1s9lrqalzahir78pk397rkk9gfvzq821yv8h3xha0bqi6w"))
1874 (modules '((guix build utils)))
1875 (snippet
1876 `(begin
1877 (for-each delete-file (find-files "." ".*.bin$"))
1878 (for-each delete-file (find-files "." ".*.exe$"))
1879 (for-each delete-file (find-files "." ".*.jar$"))
1880 #t))))
1881 (build-system gnu-build-system)
1882 (outputs '("out" "jdk" "doc"))
1883 (arguments
1884 `(#:imported-modules
1885 ((guix build syscalls)
1886 (ice-9 binary-ports)
1887 (rnrs bytevectors)
1888 ,@%gnu-build-system-modules)
1889 #:tests? #f; requires jtreg
1890 ;; TODO package jtreg
1891 ;; disable parallel builds, as the openjdk build system does not like -j
1892 #:parallel-build? #f
1893 #:parallel-tests? #f
1894 ;; reenable parallel builds and tests by adding the flags manually
1895 #:make-flags (list (string-append "JOBS=" (number->string (parallel-job-count))))
1896 #:configure-flags
1897 `("--disable-option-checking" ; --enable-fast-install default flag errors otherwise
1898 "--disable-warnings-as-errors"
1899 ;; make validate-runpath pass, see: http://issues.guix.info/issue/32894
1900 "--with-native-debug-symbols=zipped"
1901 ;; do not use the bundled libraries
1902 "--with-giflib=system"
1903 "--with-lcms=system"
1904 "--with-libjpeg=system"
1905 "--with-libpng=system"
1906 ;; allow the build system to locate the system freetype
1907 ,(string-append "--with-freetype-include="
1908 (assoc-ref %build-inputs "freetype") "/include")
1909 ,(string-append "--with-freetype-lib="
1910 (assoc-ref %build-inputs "freetype") "/lib"))
1911 ;; TODO
1912 #:phases
1913 (modify-phases %standard-phases
1914 (add-after 'patch-source-shebangs 'fix-java-shebangs
1915 (lambda _
1916 ;; This file was "fixed" by patch-source-shebangs, but it requires
1917 ;; this exact first line.
1918 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1919 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
1920 #t))
1921 (replace 'build
1922 (lambda _
1923 (with-output-to-file ".src-rev"
1924 (lambda _
1925 (display ,version)))
1926 (setenv "GUIX_LD_WRAPPER_ALLOW_IMPURITIES" "yes")
1927 (invoke "make" "all")
1928 #t))
1929 ;; jdk 11 does not build jre by default any more
1930 ;; building it anyways
1931 ;; for further information see:
1932 ;; https://github.com/AdoptOpenJDK/openjdk-build/issues/356
1933 (add-after 'build 'build-jre
1934 (lambda _
1935 (invoke "make" "legacy-jre-image")
1936 #t))
1937 (replace 'install
1938 (lambda* (#:key outputs #:allow-other-keys)
1939 (let ((out (assoc-ref outputs "out"))
1940 (jdk (assoc-ref outputs "jdk"))
1941 (doc (assoc-ref outputs "doc"))
1942 (images (car (find-files "build" ".*-server-release"
1943 #:directories? #t))))
1944 (copy-recursively (string-append images "/images/jdk") jdk)
1945 (copy-recursively (string-append images "/images/jre") out)
1946 (copy-recursively (string-append images "/images/docs") doc))
1947 #t))
1948 ;; Some of the libraries in the lib/ folder link to libjvm.so.
1949 ;; But that shared object is located in the server/ folder, so it
1950 ;; cannot be found. This phase creates a symbolic link in the
1951 ;; lib/ folder so that the other libraries can find it.
1952 ;;
1953 ;; See:
1954 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1955 ;;
1956 ;; FIXME: Find the bug in the build system, so that this symlink is
1957 ;; not needed.
1958 (add-after 'install 'install-libjvm
1959 (lambda* (#:key inputs outputs #:allow-other-keys)
1960 (let* ((lib-out (string-append (assoc-ref outputs "out")
1961 "/lib"))
1962 (lib-jdk (string-append (assoc-ref outputs "jdk")
1963 "/lib")))
1964 (symlink (string-append lib-jdk "/server/libjvm.so")
1965 (string-append lib-jdk "/libjvm.so"))
1966 (symlink (string-append lib-out "/server/libjvm.so")
1967 (string-append lib-out "/libjvm.so")))
1968 #t))
1969 (add-after 'install 'strip-character-data-timestamps
1970 (lambda* (#:key outputs #:allow-other-keys)
1971 (use-modules (guix build syscalls))
1972 (let ((archive (string-append
1973 (assoc-ref outputs "jdk") "/lib/src.zip"))
1974 (dir (mkdtemp! "zip-contents.XXXXXX")))
1975 (with-directory-excursion dir
1976 (invoke "unzip" archive))
1977 (delete-file archive)
1978 (with-directory-excursion dir
1979 (let ((char-data-files (find-files "." "CharacterData.*")))
1980 (for-each (lambda (file)
1981 (substitute* file
1982 (((string-append "This file was generated "
1983 "AUTOMATICALLY from a template "
1984 "file.*"))
1985 (string-append "This file was generated "
1986 "AUTOMATICALLY from a template "
1987 "file"))))
1988 char-data-files)))
1989 (with-directory-excursion dir
1990 (let ((files (find-files "." ".*" #:directories? #t)))
1991 (apply invoke "zip" "-0" "-X" archive files))))))
1992 (add-after 'strip-character-data-timestamps 'strip-archive-timestamps
1993 (lambda* (#:key outputs #:allow-other-keys)
1994 (use-modules (guix build syscalls)
1995 (ice-9 binary-ports)
1996 (rnrs bytevectors))
1997 (letrec ((repack-archive
1998 (lambda (archive)
1999 (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
2000 (with-directory-excursion dir
2001 (invoke "unzip" archive))
2002 (delete-file archive)
2003 (for-each (compose repack-archive canonicalize-path)
2004 (find-files dir "(ct.sym|.*.jar)$"))
2005 (let ((reset-file-timestamp
2006 (lambda (file)
2007 (let ((s (lstat file)))
2008 (unless (eq? (stat:type s) 'symlink)
2009 (format #t "reset ~a~%" file)
2010 (utime file 0 0 0 0))))))
2011 (for-each reset-file-timestamp
2012 (find-files dir #:directories? #t)))
2013 (with-directory-excursion dir
2014 (let ((files (find-files "." ".*" #:directories? #t)))
2015 (apply invoke "zip" "-0" "-X" archive files)))))))
2016 (for-each repack-archive
2017 (find-files (assoc-ref outputs "doc") ".*.zip$"))
2018 (for-each repack-archive
2019 (find-files (assoc-ref outputs "jdk")
2020 ".*.(zip|jar|diz)$"))
2021 (repack-archive (string-append (assoc-ref outputs "jdk") "/lib/ct.sym"))
2022 (let ((repack-jmod
2023 (lambda (file-name)
2024 (call-with-input-file file-name
2025 (lambda (file)
2026 (let ((header #vu8(#x4a #x4d #x01 #x00)))
2027 (if (equal? (get-bytevector-n
2028 file (bytevector-length header))
2029 header)
2030 (let* ((header-length (bytevector-length header))
2031 (temp-file (mkstemp!
2032 (string-copy
2033 "temp-file.XXXXXX")))
2034 (temp-filename (port-filename temp-file))
2035 (content-length
2036 (- (stat:size (stat file))
2037 header-length)))
2038 (sendfile temp-file file content-length header-length)
2039 (delete-file file-name)
2040 (close-port temp-file)
2041 (repack-archive (canonicalize-path temp-filename))
2042 (call-with-output-file file-name
2043 (lambda (file)
2044 (put-bytevector file header)
2045 (call-with-input-file temp-filename
2046 (lambda (temp-file)
2047 (sendfile
2048 file temp-file
2049 (stat:size (stat temp-file)) 0)))))))))))))
2050 (for-each repack-jmod
2051 (find-files (assoc-ref outputs "jdk") ".*.jmod$")))
2052 #t)))
2053 (add-after 'install 'remove-timestamp-from-api-summary
2054 (lambda* (#:key outputs #:allow-other-keys)
2055 (substitute* (string-append (assoc-ref outputs "doc")
2056 "/api/overview-summary.html")
2057 (("Generated by javadoc \\(11-internal\\).*$")
2058 "Generated by javadoc (11-internal) -->\n"))
2059 #t)))))
2060 (inputs
2061 `(("alsa-lib" ,alsa-lib)
2062 ("cups" ,cups)
2063 ("fontconfig" ,fontconfig)
2064 ("freetype" ,freetype)
2065 ("giflib" ,giflib)
2066 ("lcms" ,lcms)
2067 ("libjpeg" ,libjpeg)
2068 ("libpng" ,libpng)
2069 ("libx11" ,libx11)
2070 ("libxext" ,libxext)
2071 ("libxrender" ,libxrender)
2072 ("libxt" ,libxt)
2073 ("libxtst" ,libxtst)))
2074 (native-inputs
2075 `(("autoconf" ,autoconf)
2076 ("openjdk10" ,openjdk10)
2077 ("openjdk10:jdk" ,openjdk10 "jdk")
2078 ("pkg-config" ,pkg-config)
2079 ("unzip" ,unzip)
2080 ("which" ,which)
2081 ("zip" ,zip)))
2082 (home-page "https://openjdk.java.net/projects/jdk/11/")
2083 (synopsis "Java development kit")
2084 (description
2085 "This package provides the Java development kit OpenJDK.")
2086 (license license:gpl2+)))
2087
33aa65e0 2088(define-public icedtea icedtea-8)
068e476f 2089
5490480c 2090\f
8bbd0408
RW
2091(define-public ant/java8
2092 (package (inherit ant-bootstrap)
2093 (name "ant")
2094 (version "1.10.1")
2095 (source (origin
2096 (method url-fetch)
2097 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2098 version "-src.tar.gz"))
2099 (sha256
2100 (base32
2101 "10p3dh77lkzzzcy32dk9azljixzadp46fggjfbvgkl8mmb8cxxv8"))
2102 (modules '((guix build utils)))
2103 (snippet
2104 '(begin
2105 (for-each delete-file
2106 (find-files "lib/optional" "\\.jar$"))
2107 #t))))
2108 (arguments
2109 (substitute-keyword-arguments (package-arguments ant-bootstrap)
2110 ((#:phases phases)
2111 `(modify-phases ,phases
2112 (add-after 'unpack 'remove-scripts
2113 ;; Remove bat / cmd scripts for DOS as well as the antRun and runant
2114 ;; wrappers.
2115 (lambda _
2116 (for-each delete-file
2117 (find-files "src/script"
2118 "(.*\\.(bat|cmd)|runant.*|antRun.*)"))
2119 #t))
2120 (replace 'build
2121 (lambda* (#:key inputs outputs #:allow-other-keys)
2122 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
2123
2124 ;; Disable tests to avoid dependency on hamcrest-core, which needs
2125 ;; Ant to build. This is necessary in addition to disabling the
2126 ;; "check" phase, because the dependency on "test-jar" would always
2127 ;; result in the tests to be run.
2128 (substitute* "build.xml"
2129 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
2c8ac364
MW
2130 (invoke "bash" "bootstrap.sh"
2131 (string-append "-Ddist.dir="
2132 (assoc-ref outputs "out")))))))))
8bbd0408 2133 (native-inputs
1c7ef07e
GB
2134 `(("jdk" ,icedtea-8 "jdk")
2135 ("zip" ,zip)
2136 ("unzip" ,unzip)))))
8bbd0408 2137
e441fc56
RW
2138;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x series
2139;; requires Java 8.
2140(define-public ant
2141 (package (inherit ant/java8)
2142 (version "1.9.9")
2143 (source (origin
2144 (method url-fetch)
2145 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2146 version "-src.tar.gz"))
2147 (sha256
2148 (base32
2149 "1k28mka0m3isy9yr8gz84kz1f3f879rwaxrd44vdn9xbfwvwk86n"))))
2150 (native-inputs
3b6ba18b
GB
2151 `(("jdk" ,icedtea-7 "jdk")
2152 ("zip" ,zip)
2153 ("unzip" ,unzip)))))
e441fc56 2154
9ce7ac99
RW
2155(define-public ant-apache-bcel
2156 (package
2157 (inherit ant/java8)
2158 (name "ant-apache-bcel")
2159 (arguments
2160 (substitute-keyword-arguments (package-arguments ant/java8)
2161 ((#:phases phases)
2162 `(modify-phases ,phases
2163 (add-after 'unpack 'link-bcel
2164 (lambda* (#:key inputs #:allow-other-keys)
2165 (for-each (lambda (file)
2166 (symlink file
2167 (string-append "lib/optional/"
2168 (basename file))))
2169 (find-files (assoc-ref inputs "java-commons-bcel")
2170 "\\.jar$"))
2171 #t))
2172 (add-after 'build 'install
2173 (lambda* (#:key outputs #:allow-other-keys)
2174 (let* ((out (assoc-ref outputs "out"))
2175 (share (string-append out "/share/java"))
2176 (bin (string-append out "/bin"))
2177 (lib (string-append out "/lib")))
2178 (mkdir-p share)
2179 (install-file (string-append lib "/ant-apache-bcel.jar") share)
2180 (delete-file-recursively bin)
2181 (delete-file-recursively lib)
2182 #t)))))))
2183 (inputs
2184 `(("java-commons-bcel" ,java-commons-bcel)
2185 ,@(package-inputs ant/java8)))))
2186
fa6c4213
RW
2187(define-public ant-junit
2188 (package
2189 (inherit ant/java8)
2190 (name "ant-junit")
2191 (arguments
2192 (substitute-keyword-arguments (package-arguments ant/java8)
2193 ((#:phases phases)
2194 `(modify-phases ,phases
2195 (add-after 'unpack 'link-junit
2196 (lambda* (#:key inputs #:allow-other-keys)
2197 (for-each (lambda (file)
2198 (symlink file
2199 (string-append "lib/optional/"
2200 (basename file))))
2201 (find-files (assoc-ref inputs "java-junit")
2202 "\\.jar$"))
2203 #t))
2204 (add-after 'build 'install
2205 (lambda* (#:key outputs #:allow-other-keys)
2206 (let* ((out (assoc-ref outputs "out"))
2207 (share (string-append out "/share/java"))
2208 (bin (string-append out "/bin"))
2209 (lib (string-append out "/lib")))
2210 (mkdir-p share)
2211 (install-file (string-append lib "/ant-junit.jar") share)
2212 (delete-file-recursively bin)
2213 (delete-file-recursively lib)
2214 #t)))))))
2215 (inputs
2216 `(("java-junit" ,java-junit)
2217 ,@(package-inputs ant/java8)))))
2218
53fb0476 2219(define-public javacc-4
fc8d100b
RW
2220 (package
2221 (name "javacc")
53fb0476 2222 (version "4.1")
fc8d100b 2223 (source (origin
53fb0476
AV
2224 (method git-fetch)
2225 (uri (git-reference
2226 (url "https://github.com/javacc/javacc.git")
2227 (commit "release_41")))
2228 (file-name (string-append "javacc-" version "-checkout"))
fc8d100b
RW
2229 (sha256
2230 (base32
6662d65f
AV
2231 "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0"))
2232 (modules '((guix build utils)))
2233 ;; delete bundled jars
2234 (snippet '(begin (delete-file-recursively "lib") #t))))
fc8d100b 2235 (build-system ant-build-system)
53fb0476
AV
2236 ;; Tests fail with
2237 ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60:
2238 ;; JAVACODE failed
fc8d100b 2239 (arguments
53fb0476 2240 `(#:tests? #f
fc8d100b
RW
2241 #:phases
2242 (modify-phases %standard-phases
6662d65f
AV
2243 ;; Delete tests to avoid build failure (we don't run them anyway).
2244 (add-after 'unpack 'delete-tests
fc8d100b 2245 (lambda _
6662d65f
AV
2246 (for-each delete-file
2247 '("src/org/javacc/JavaCCTestCase.java"
2248 "src/org/javacc/parser/ExpansionTest.java"
2249 "src/org/javacc/parser/OptionsTest.java"
2250 "src/org/javacc/jjtree/JJTreeOptionsTest.java"))
2251 (for-each delete-file-recursively
2252 '("src/org/javacc/parser/test"
2253 "src/org/javacc/jjdoc/test"))
2254 #t))
53fb0476 2255 (replace 'install (install-jars "bin/lib")))))
fc8d100b
RW
2256 (home-page "https://javacc.org/")
2257 (synopsis "Java parser generator")
2258 (description "Java Compiler Compiler (JavaCC) is the most popular parser
2259generator for use with Java applications. A parser generator is a tool that
2260reads a grammar specification and converts it to a Java program that can
2261recognize matches to the grammar. In addition to the parser generator itself,
2262JavaCC provides other standard capabilities related to parser generation such
2263as tree building (via a tool called JJTree included with JavaCC), actions,
2264debugging, etc.")
2265 (license license:bsd-3)))
2266
53fb0476
AV
2267(define-public javacc
2268 (package
2269 (inherit javacc-4)
6b66e470 2270 (version "7.0.4")
ebf8048d
TGR
2271 (source
2272 (origin
2273 (method git-fetch)
2274 (uri (git-reference
2275 (url "https://github.com/javacc/javacc.git")
2276 (commit version)))
2277 (file-name (git-file-name "javacc" version))
2278 (sha256
2279 (base32 "18kkak3gda93gr25jrgy6q00g0jr8i24ri2wk4kybz1v234fxx9i"))
2280 (modules '((guix build utils)))
2281 ;; Delete bundled jars.
2282 (snippet '(begin (for-each delete-file-recursively
2283 '("bootstrap" "lib"))
2284 #t))))
6688c41e 2285 (arguments
6b66e470 2286 `(#:make-flags ; bootstrap from javacc-4
33428d12
AV
2287 (list (string-append "-Dbootstrap-jar="
2288 (assoc-ref %build-inputs "javacc")
2289 "/share/java/javacc.jar"))
2290 #:test-target "test"
6688c41e
RW
2291 #:phases
2292 (modify-phases %standard-phases
33428d12
AV
2293 (replace 'install (install-jars "target")))))
2294 (native-inputs
2295 `(("javacc" ,javacc-4)))))
6688c41e 2296
c1cb8576
RW
2297;; This is the last 3.x release of ECJ
2298(define-public java-ecj-3
2299 (package
2300 (name "java-ecj")
2301 (version "3.8.2")
2302 (source (origin
2303 (method url-fetch)
2304 (uri (string-append "http://archive.eclipse.org/eclipse/"
2305 "downloads/drops/R-" version
2306 "-201301310800/ecjsrc-" version ".jar"))
2307 (sha256
2308 (base32
2309 "01mdj14jw11g1jfnki4fi8229p0c6zzckd38zqy2w4m3cjcvsx04"))))
2310 (build-system ant-build-system)
2311 (arguments
2312 `(#:tests? #f ; none included
2313 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2314 #:make-flags (list "-f" "src/build.xml")
2315 #:build-target "build"
2316 #:phases
2317 (modify-phases %standard-phases
2318 (add-after 'unpack 'fix-manifest
2319 (lambda _
2320 ;; Record the main class to make ecj executable.
2321 (with-atomic-file-replacement "src/META-INF/MANIFEST.MF"
2322 (lambda (in out)
2323 (display "Manifest-Version: 1.0
2324Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2c8ac364
MW
2325 out)))
2326 #t))
c1cb8576
RW
2327 (replace 'install (install-jars ".")))))
2328 (home-page "https://eclipse.org")
2329 (synopsis "Eclipse Java development tools core batch compiler")
2330 (description "This package provides the Eclipse Java core batch compiler.")
2331 (license license:epl1.0)))
2332
f201b18e
RW
2333;; This is needed for java-cisd-args4j
2334(define-public java-ecj-3.5
2335 (package (inherit java-ecj-3)
2336 (version "3.5.1")
2337 (source (origin
2338 (method url-fetch/zipbomb)
2339 (uri (string-append "http://archive.eclipse.org/eclipse/"
2340 "downloads/drops/R-" version
2341 "-200909170800/ecjsrc-" version ".zip"))
2342 (sha256
2343 (base32
2344 "1vnl2mavisc567bip736xzsvvbjif5279wc4a7pbdik5wlir8qr7"))))
2345 (build-system ant-build-system)
2346 (arguments
2347 `(#:tests? #f ; none included
2348 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2349 #:build-target "build"
2350 #:phases
2351 (modify-phases %standard-phases
2352 (add-after 'unpack 'fix-manifest
2353 (lambda _
2354 ;; Record the main class to make ecj executable.
2355 (with-atomic-file-replacement "META-INF/MANIFEST.MF"
2356 (lambda (in out)
2357 (dump-port in out)
2358 (display "Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2c8ac364
MW
2359 out)))
2360 #t))
f201b18e
RW
2361 (replace 'install (install-jars ".")))))
2362 (native-inputs
2363 `(("unzip" ,unzip)))))
2364
30d55473
RW
2365(define-public java-cisd-base
2366 (let ((revision 38938)
2367 (base-version "14.12.0"))
2368 (package
2369 (name "java-cisd-base")
2370 (version (string-append base-version "-" (number->string revision)))
2371 (source (origin
2372 (method svn-fetch)
2373 (uri (svn-reference
2374 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2375 "base/tags/release/"
2376 (version-major+minor base-version)
2377 ".x/" base-version "/base/"))
2378 (revision revision)))
2379 (file-name (string-append "java-cisd-base-" version "-checkout"))
2380 (sha256
2381 (base32
2382 "1i5adyf7nzclb0wydgwa1az04qliid8035vpahaandmkmigbnxiy"))
2383 (modules '((guix build utils)))
2384 (snippet
2385 '(begin
2386 ;; Delete included gradle jar
2387 (delete-file-recursively "gradle/wrapper")
2388 ;; Delete pre-built native libraries
2389 (delete-file-recursively "libs")
2390 #t))))
2391 (build-system ant-build-system)
2392 (arguments
2393 `(#:make-flags '("-file" "build/build.xml")
2394 #:test-target "jar-test"
2395 #:jdk ,icedtea-8
2396 #:phases
2397 (modify-phases %standard-phases
2398 (add-after 'unpack 'unpack-build-resources
2399 (lambda* (#:key inputs #:allow-other-keys)
2400 (copy-recursively (assoc-ref inputs "build-resources")
2401 "../build_resources")
2402 #t))
2403 (add-after 'unpack-build-resources 'fix-dependencies
2404 (lambda* (#:key inputs #:allow-other-keys)
2405 (substitute* "build/build.xml"
2406 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2407 (string-append (assoc-ref inputs "java-testng")
2408 "/share/java/java-testng.jar"))
2409 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2410 (string-append (assoc-ref inputs "java-commons-lang")
2411 "/share/java/commons-lang-"
2412 ,(package-version java-commons-lang) ".jar"))
2413 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2414 (string-append (assoc-ref inputs "java-commons-io")
2415 "/share/java/commons-io-"
2416 ,(package-version java-commons-io)
2417 "-SNAPSHOT.jar"))
2418 ;; Remove dependency on svn
2419 (("<build-info.*") "")
2420 (("\\$\\{revision.number\\}")
2421 ,(number->string revision))
2422 (("\\$\\{version.number\\}") ,base-version))
2423 ;; Remove dependency on classycle
2424 (substitute* "../build_resources/ant/build-common.xml"
2425 (("<taskdef name=\"dependency-checker.*") "")
2426 (("classname=\"classycle.*") "")
2427 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2428 #t))
2429 ;; A few tests fail because of the lack of a proper /etc/groups and
2430 ;; /etc/passwd file in the build container.
2431 (add-after 'unpack 'disable-broken-tests
2432 (lambda _
2433 (substitute* "sourceTest/java/ch/systemsx/cisd/base/AllTests.java"
2434 (("Unix.isOperational\\(\\)") "false"))
2435 #t))
2436 ;; These decorators are almost useless and pull in an unpackaged
2437 ;; dependency.
2438 (add-after 'unpack 'remove-useless-decorators
2439 (lambda _
2440 (substitute* "source/java/ch/systemsx/cisd/base/unix/Unix.java"
2441 (("@Private") "")
2442 (("import ch.rinn.restrictions.Private;") ""))
2443 (substitute* "sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java"
2444 (("@Friend.*") "")
2445 (("import ch.rinn.restrictions.Friend;") ""))
2446 #t))
2447 (add-before 'configure 'build-native-code
2448 (lambda* (#:key inputs #:allow-other-keys)
2449 (let ((jdk (assoc-ref inputs "jdk"))
2450 (dir ,(match (%current-system)
2451 ("i686-linux"
2452 "i386-Linux")
2453 ((or "armhf-linux" "aarch64-linux")
2454 "arm-Linux")
2455 ((or "x86_64-linux")
2456 "amd64-Linux")
2457 (_ "unknown-Linux"))))
2458 (with-directory-excursion "source/c"
2459 (invoke "gcc" "-shared" "-O3" "-fPIC" "unix.c"
2460 (string-append "-I" jdk "/include")
2461 (string-append "-I" jdk "/include/linux")
2462 "-o" "libunix.so")
2463 (invoke "gcc" "-shared" "-O3" "-fPIC"
2464 "-DMACHINE_BYTE_ORDER=1"
2465 "copyCommon.c"
2466 "copyByteChar.c"
2467 "copyByteDouble.c"
2468 "copyByteFloat.c"
2469 "copyByteInt.c"
2470 "copyByteLong.c"
2471 "copyByteShort.c"
2472 (string-append "-I" jdk "/include")
2473 (string-append "-I" jdk "/include/linux")
2474 "-o" "libnativedata.so"))
2475 (install-file "source/c/libunix.so"
2476 (string-append "libs/native/unix/" dir))
2477 (install-file "source/c/libnativedata.so"
2478 (string-append "libs/native/nativedata/" dir))
2479 #t)))
2480 ;; In the "check" phase we only build the test executable.
2481 (add-after 'check 'run-tests
2482 (lambda _
2483 (invoke "java" "-jar" "targets/dist/sis-base-test.jar")
2484 (delete-file "targets/dist/sis-base-test.jar")
2485 #t))
2486 (replace 'install (install-jars "targets/dist")))))
2487 (native-inputs
2488 `(("jdk" ,icedtea-8)
2489 ("java-commons-lang" ,java-commons-lang)
2490 ("java-commons-io" ,java-commons-io)
2491 ("java-testng" ,java-testng)
2492 ("build-resources"
2493 ,(origin
2494 (method svn-fetch)
2495 (uri (svn-reference
2496 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2497 "base/tags/release/"
2498 (version-major+minor base-version)
2499 ".x/" base-version
2500 "/build_resources/"))
2501 (revision revision)))
2502 (sha256
2503 (base32
2504 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
2505 (home-page "http://svnsis.ethz.ch")
2506 (synopsis "Utility classes for libraries from ETH Zurich")
2507 (description "This library supplies some utility classes needed for
2508libraries from the SIS division at ETH Zurich like jHDF5.")
2509 ;; The C sources are under a non-copyleft license, which looks like a
2510 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
2511 (license (list license:asl2.0
2512 (license:non-copyleft "file://source/c/COPYING"))))))
2513
04ddca26
RW
2514(define-public java-cisd-args4j
2515 (let ((revision 39162)
2516 (base-version "9.11.2"))
2517 (package
2518 (name "java-cisd-args4j")
2519 (version (string-append base-version "-" (number->string revision)))
2520 (source (origin
2521 (method svn-fetch)
2522 (uri (svn-reference
2523 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2524 "args4j/tags/release/"
2525 (version-major+minor base-version)
2526 ".x/" base-version "/args4j/"))
2527 (revision revision)))
2528 (file-name (string-append "java-cisd-args4j-" version "-checkout"))
2529 (sha256
2530 (base32
2531 "0hhqznjaivq7ips7mkwas78z42s6djsm20rrs7g1zd59rcsakxn2"))))
2532 (build-system ant-build-system)
2533 (arguments
2534 `(#:make-flags '("-file" "build/build.xml")
2535 #:tests? #f ; there are no tests
2536 ;; There are weird build failures with JDK8, such as: "The type
2537 ;; java.io.ObjectInputStream cannot be resolved. It is indirectly
2538 ;; referenced from required .class files"
2539 #:jdk ,icedtea-7
2540 #:modules ((guix build ant-build-system)
2541 (guix build utils)
2542 (guix build java-utils)
2543 (sxml simple)
2544 (sxml transform)
2545 (sxml xpath))
2546 #:phases
2547 (modify-phases %standard-phases
2548 (add-after 'unpack 'unpack-build-resources
2549 (lambda* (#:key inputs #:allow-other-keys)
2550 (mkdir-p "../build_resources")
2551 (invoke "tar" "xf" (assoc-ref inputs "build-resources")
2552 "-C" "../build_resources"
2553 "--strip-components=1")
2554 (mkdir-p "../build_resources/lib")
2555 #t))
2556 (add-after 'unpack-build-resources 'fix-dependencies
2557 (lambda* (#:key inputs #:allow-other-keys)
2558 ;; FIXME: There should be a more convenient abstraction for
2559 ;; editing XML files.
2560 (with-directory-excursion "../build_resources/ant/"
2561 (chmod "build-common.xml" #o664)
2562 (call-with-output-file "build-common.xml.new"
2563 (lambda (port)
2564 (sxml->xml
2565 (pre-post-order
2566 (with-input-from-file "build-common.xml"
2567 (lambda _ (xml->sxml #:trim-whitespace? #t)))
2568 `(;; Remove dependency on classycle and custom ant tasks
2569 (taskdef . ,(lambda (tag . kids)
2570 (let ((name ((sxpath '(name *text*)) kids)))
2571 (if (or (member "build-info" name)
2572 (member "dependency-checker" name)
2573 (member "build-java-subprojects" name)
2574 (member "project-classpath" name))
2575 '() ; skip
2576 `(,tag ,@kids)))))
2577 (typedef . ,(lambda (tag . kids)
2578 (let ((name ((sxpath '(name *text*)) kids)))
2579 (if (member "recursive-jar" name)
2580 '() ; skip
2581 `(,tag ,@kids)))))
2582 (build-java-subprojects . ,(lambda _ '()))
2583 ;; Ignore everything else
2584 (*default* . ,(lambda (tag . kids) `(,tag ,@kids)))
2585 (*text* . ,(lambda (_ txt) txt))))
2586 port)))
2587 (rename-file "build-common.xml.new" "build-common.xml"))
2588 (substitute* "build/build.xml"
2589 (("\\$\\{lib\\}/cisd-base/cisd-base.jar")
2590 (string-append (assoc-ref inputs "java-cisd-base")
2591 "/share/java/sis-base.jar"))
2592 ;; Remove dependency on svn
2593 (("<build-info.*") "")
2594 (("\\$\\{revision.number\\}")
2595 ,(number->string revision))
2596 (("\\$\\{version.number\\}") ,base-version)
2597 ;; Don't use custom ant tasks.
2598 (("recursive-jar") "jar")
2599 (("<project-classpath.*") ""))
2600 #t))
2601 (replace 'install (install-jars "targets/dist")))))
2602 (inputs
2603 `(("java-cisd-base" ,java-cisd-base)))
2604 (native-inputs
2605 `(("ecj" ,java-ecj-3.5)
2606 ("build-resources"
2607 ,(origin
2608 (method svn-fetch)
2609 (uri (svn-reference
2610 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2611 "args4j/tags/release/"
2612 (version-major+minor base-version)
2613 ".x/" base-version
2614 "/build_resources/"))
2615 (revision revision)))
2616 (sha256
2617 (base32
2618 "056cam4k8pll7ass31sy6gwn8g8719njc41yf4l02b0342nilkyf"))
2619 (modules '((guix build utils)))
2620 ;; Delete bundled pre-built jars.
2621 (snippet
2622 '(begin (delete-file-recursively "lib/") #t))))))
2623 (home-page "http://svnsis.ethz.ch")
2624 (synopsis "Command line parser library")
2625 (description "This package provides a parser for command line arguments.")
2626 (license license:asl2.0))))
2627
2f0d0418
RW
2628(define-public java-cisd-jhdf5
2629 (let ((revision 39162)
2630 (base-version "14.12.6"))
2631 (package
2632 (name "java-cisd-jhdf5")
2633 (version (string-append base-version "-" (number->string revision)))
2634 (source (origin
2635 (method svn-fetch)
2636 (uri (svn-reference
2637 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2638 "jhdf5/tags/release/"
2639 (version-major+minor base-version)
2640 ".x/" base-version "/jhdf5/"))
2641 (revision revision)))
2642 (file-name (string-append "java-cisd-jhdf5-" version "-checkout"))
2643 (sha256
2644 (base32
2645 "13i17s2hn0q9drdqvp8csy7770p3hdbh9rp30ihln2ldkfawdmz0"))
2646 (modules '((guix build utils)))
2647 (snippet
2648 '(begin
2649 ;; Delete included gradle jar
2650 (delete-file-recursively "gradle/wrapper")
2651 ;; Delete pre-built native libraries
2652 (delete-file-recursively "libs")
2653 #t))))
2654 (build-system ant-build-system)
2655 (arguments
2656 `(#:make-flags '("-file" "build/build.xml")
2657 #:build-target "jar-all"
2658 #:test-target "jar-test"
2659 #:jdk ,icedtea-8
2660 #:phases
2661 (modify-phases %standard-phases
1ed386fc
RW
2662 ;; FIXME: this build phase fails.
2663 (delete 'generate-jar-indices)
2f0d0418
RW
2664 ;; Don't erase results from the build phase when building tests.
2665 (add-after 'unpack 'separate-test-target-from-clean
2666 (lambda _
2667 (substitute* "build/build.xml"
2668 (("\"jar-test\" depends=\"clean, ")
2669 "\"jar-test\" depends=\""))
2670 #t))
2671 (add-after 'unpack 'unpack-build-resources
2672 (lambda* (#:key inputs #:allow-other-keys)
2673 (copy-recursively (assoc-ref inputs "build-resources")
2674 "../build_resources")
2675 (delete-file-recursively "../build_resources/lib/")
2676 (mkdir-p "../build_resources/lib")
2677 ;; Remove dependency on classycle
2678 (substitute* "../build_resources/ant/build-common.xml"
2679 (("<taskdef name=\"dependency-checker.*") "")
2680 (("classname=\"classycle.*") "")
2681 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2682 ;; Remove dependency on svn
2683 (substitute* "build/build.xml"
2684 (("<build-info.*") "")
2685 (("\\$\\{revision.number\\}")
2686 ,(number->string revision))
2687 (("\\$\\{version.number\\}") ,base-version))
2688 #t))
2689 (add-after 'unpack-build-resources 'fix-dependencies
2690 (lambda* (#:key inputs #:allow-other-keys)
2691 (substitute* "../build_resources/ant/build-common.xml"
2692 (("../libraries/testng/testng-jdk15.jar")
2693 (string-append (assoc-ref inputs "java-testng")
2694 "/share/java/java-testng.jar")))
2695 (substitute* "build/build.xml"
2696 (("\\$\\{lib\\}/sis-base/sis-base.jar")
2697 (string-append (assoc-ref inputs "java-cisd-base")
2698 "/share/java/sis-base.jar"))
2699 (("\\$\\{lib\\}/cisd-args4j/cisd-args4j.jar")
2700 (string-append (assoc-ref inputs "java-cisd-args4j")
2701 "/share/java/cisd-args4j.jar"))
2702 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2703 (string-append (assoc-ref inputs "java-commons-lang")
2704 "/share/java/commons-lang-"
2705 ,(package-version java-commons-lang) ".jar"))
2706 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2707 (string-append (assoc-ref inputs "java-commons-io")
2708 "/share/java/commons-io-"
2709 ,(package-version java-commons-io)
2710 "-SNAPSHOT.jar"))
2711 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2712 (string-append (assoc-ref inputs "java-testng")
2713 "/share/java/java-testng.jar"))
2714 (("\\$\\{lib\\}/junit4/junit.jar")
2715 (string-append (assoc-ref inputs "java-junit")
2716 "/share/java/junit.jar"))
2717 (("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar")
2718 (string-append (assoc-ref inputs "java-hamcrest-core")
2719 "/share/java/hamcrest-core.jar")))
2720 ;; Remove dependency on ch.rinn.restrictions
2721 (with-directory-excursion "source/java/ch/systemsx/cisd/hdf5/"
2722 (substitute* '("BitSetConversionUtils.java"
2723 "HDF5Utils.java")
2724 (("import ch.rinn.restrictions.Private;") "")
2725 (("@Private") "")))
2726 (with-directory-excursion "sourceTest/java/ch/systemsx/cisd/hdf5/"
2727 (substitute* '("BitSetConversionTest.java"
2728 "h5ar/HDF5ArchiverTest.java")
2729 (("import ch.rinn.restrictions.Friend;") "")
2730 (("@Friend.*") ""))
2731 ;; Remove leftovers from removing @Friend
2732 (substitute* "h5ar/HDF5ArchiverTest.java"
2733 (("\\{ HDF5Archiver.class, IdCache.class, LinkRecord.class \\}\\)")
2734 "")))
2735 #t))
2736 (add-before 'configure 'build-native-library
2737 (lambda* (#:key inputs #:allow-other-keys)
2738 (let ((jdk (assoc-ref inputs "jdk"))
2739 (hdf5 (assoc-ref inputs "hdf5"))
2740 (dir ,(match (%current-system)
2741 ("i686-linux"
2742 "i386-Linux")
2743 ((or "armhf-linux" "aarch64-linux")
2744 "arm-Linux")
2745 ((or "x86_64-linux")
2746 "amd64-Linux")
2747 (_ "unknown-Linux"))))
2748 (with-directory-excursion "source/c"
2749 (apply invoke `("gcc" "-shared" "-O3"
2750 "-fPIC"
2751 "-Wl,--exclude-libs,ALL"
2752 ,@(find-files "jhdf5" "\\.c$")
2753 ,@(find-files "hdf-java" "\\.c$")
2754 ,(string-append "-I" hdf5 "/include")
2755 ,(string-append "-I" jdk "/include")
2756 ,(string-append "-I" jdk "/include/linux")
2757 ,(string-append hdf5 "/lib/libhdf5.a")
2758 "-o" "libjhdf5.so" "-lz")))
2759 (install-file "source/c/libjhdf5.so"
2760 (string-append "libs/native/jhdf5/" dir))
2761 #t)))
2762 ;; In the "check" phase we only build the test executable.
2763 (add-after 'check 'run-tests
2764 (lambda _
2765 (invoke "java" "-jar" "targets/dist/sis-jhdf5-test.jar")
2766 (delete-file "targets/dist/sis-jhdf5-test.jar")
2767 #t))
2768 (replace 'install
2769 (install-jars "targets/dist")))))
2770 (inputs
2771 `(("java-cisd-base" ,java-cisd-base)
2772 ("java-cisd-args4j" ,java-cisd-args4j)
2773 ("java-commons-lang" ,java-commons-lang)
2774 ("java-commons-io" ,java-commons-io)
2775 ("hdf5" ,hdf5)
2776 ("zlib" ,zlib)))
2777 (native-inputs
2778 `(("jdk" ,icedtea-8)
2779 ("java-testng" ,java-testng)
2780 ("java-junit" ,java-junit)
2781 ("java-jmock" ,java-jmock)
2782 ("java-hamcrest-core" ,java-hamcrest-core)
2783 ("build-resources"
2784 ,(origin
2785 (method svn-fetch)
2786 (uri (svn-reference
2787 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2788 "jhdf5/tags/release/"
2789 (version-major+minor base-version)
2790 ".x/" base-version
2791 "/build_resources/"))
2792 (revision revision)))
2793 (sha256
2794 (base32
2795 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
2796 (home-page "https://wiki-bsse.ethz.ch/display/JHDF5/")
2797 (synopsis "Java binding for HDF5")
2798 (description "JHDF5 is a high-level API in Java for reading and writing
2799HDF5 files, building on the libraries provided by the HDF Group.")
2800 ;; The C sources are under a non-copyleft license, which looks like a
2801 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
2802 (license (list license:asl2.0
2803 (license:non-copyleft "file://source/c/COPYING"))))))
2804
218d093b
RW
2805(define-public java-classpathx-servletapi
2806 (package
2807 (name "java-classpathx-servletapi")
ae307724 2808 (version "3.0.1")
218d093b
RW
2809 (source (origin
2810 (method url-fetch)
2811 (uri (string-append "mirror://gnu/classpathx/servletapi/"
2812 "servletapi-" version ".tar.gz"))
2813 (sha256
2814 (base32
ae307724 2815 "07d8h051siga2f33fra72hk12sbq1bxa4jifjg0qj0vfazjjff0x"))))
218d093b
RW
2816 (build-system ant-build-system)
2817 (arguments
2818 `(#:tests? #f ; there is no test target
2819 #:build-target "compile"
218d093b 2820 #:make-flags
ae307724 2821 (list "-Dbuild.compiler=javac1.8"
218d093b
RW
2822 (string-append "-Ddist=" (assoc-ref %outputs "out")))
2823 #:phases
2824 (modify-phases %standard-phases
2825 (replace 'install
2826 (lambda* (#:key make-flags #:allow-other-keys)
2c8ac364 2827 (apply invoke `("ant" "dist" ,@make-flags)))))))
218d093b
RW
2828 (home-page "https://www.gnu.org/software/classpathx/")
2829 (synopsis "Java servlet API implementation")
2830 (description "This is the GNU servlet API distribution, part of the
2831ClasspathX project. It provides implementations of version 3.0 of the servlet
2832API and version 2.1 of the Java ServerPages API.")
2833 (license license:gpl3+)))
2834
10d62a88
BH
2835(define-public java-javaee-servletapi
2836 (package
2837 (name "java-javaee-servletapi")
2838 (version "3.1.0")
2839 (source (origin
2840 (method url-fetch)
2841 (uri (string-append "https://github.com/javaee/servlet-spec/"
2842 "archive/" version ".zip"))
2843 (file-name (string-append name "-" version ".zip"))
2844 (sha256
2845 (base32
2846 "0m6p13vgfb1ihich1jp5j6fqlhkjsrkn32c86bsbkryp38ipwg8w"))))
2847 (build-system ant-build-system)
2848 (arguments
2849 `(#:jar-name "javax-servletapi.jar"
2850 ;; no tests
2851 #:tests? #f
2852 #:source-dir "src/main/java"))
2853 (native-inputs
2854 `(("unzip" ,unzip)))
2855 (home-page "https://javaee.github.io/servlet-spec/")
2856 (synopsis "Java servlet API")
2857 (description "Java Servlet is the foundation web specification in the
2858Java Enterprise Platform. Developers can build web applications using the
2859Servlet API to interact with the request/response workflow. This project
2860provides information on the continued development of the Java Servlet
2861specification.")
2862 ;; Main code is dual-licensed by Oracle under either GLP2 or CDDL 1.1.
2863 ;; Some files are licensed under ASL 2.0.
2864 (license (list license:asl2.0 license:gpl2 license:cddl1.1))))
2865
5490480c
RW
2866(define-public java-swt
2867 (package
2868 (name "java-swt")
8710d4dd 2869 (version "4.7.1a")
5490480c
RW
2870 (source
2871 ;; The types of many variables and procedures differ in the sources
2872 ;; dependent on whether the target architecture is a 32-bit system or a
2873 ;; 64-bit system. Instead of patching the sources on demand in a build
2874 ;; phase we download either the 32-bit archive (which mostly uses "int"
2875 ;; types) or the 64-bit archive (which mostly uses "long" types).
8710d4dd
RW
2876 (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9")
2877 (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q")
5490480c
RW
2878 (file32 "x86")
2879 (file64 "x86_64"))
2880 (let-values (((hash file)
2881 (match (or (%current-target-system) (%current-system))
2882 ("x86_64-linux" (values hash64 file64))
2883 (_ (values hash32 file32)))))
2884 (origin
2885 (method url-fetch)
2886 (uri (string-append
8710d4dd
RW
2887 "http://download.eclipse.org/eclipse/downloads/drops4/"
2888 "R-" version "-201710090410/swt-" version
2889 "-gtk-linux-" file ".zip"))
5490480c
RW
2890 (sha256 (base32 hash))))))
2891 (build-system ant-build-system)
2892 (arguments
2893 `(#:jar-name "swt.jar"
8710d4dd 2894 #:jdk ,icedtea-8
5490480c
RW
2895 #:tests? #f ; no "check" target
2896 #:phases
2897 (modify-phases %standard-phases
2898 (replace 'unpack
2899 (lambda* (#:key source #:allow-other-keys)
2c8ac364
MW
2900 (mkdir "swt")
2901 (invoke "unzip" source "-d" "swt")
2902 (chdir "swt")
2903 (mkdir "src")
2904 (invoke "unzip" "src.zip" "-d" "src")))
5490480c
RW
2905 ;; The classpath contains invalid icecat jars. Since we don't need
2906 ;; anything other than the JDK on the classpath, we can simply unset
2907 ;; it.
2908 (add-after 'configure 'unset-classpath
2909 (lambda _ (unsetenv "CLASSPATH") #t))
2910 (add-before 'build 'build-native
2911 (lambda* (#:key inputs outputs #:allow-other-keys)
2912 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
2913 ;; Build shared libraries. Users of SWT have to set the system
2914 ;; property swt.library.path to the "lib" directory of this
2915 ;; package output.
2916 (mkdir-p lib)
2917 (setenv "OUTPUT_DIR" lib)
2918 (with-directory-excursion "src"
2c8ac364 2919 (invoke "bash" "build.sh")))))
5490480c
RW
2920 (add-after 'install 'install-native
2921 (lambda* (#:key outputs #:allow-other-keys)
2922 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
2923 (for-each (lambda (file)
2924 (install-file file lib))
2925 (find-files "." "\\.so$"))
2926 #t))))))
2927 (inputs
8710d4dd 2928 `(("gtk" ,gtk+-2)
5490480c
RW
2929 ("libxtst" ,libxtst)
2930 ("libxt" ,libxt)
2931 ("mesa" ,mesa)
2932 ("glu" ,glu)))
2933 (native-inputs
2934 `(("pkg-config" ,pkg-config)
2935 ("unzip" ,unzip)))
2936 (home-page "https://www.eclipse.org/swt/")
2937 (synopsis "Widget toolkit for Java")
2938 (description
2939 "SWT is a widget toolkit for Java designed to provide efficient, portable
2940access to the user-interface facilities of the operating systems on which it
2941is implemented.")
2942 ;; SWT code is licensed under EPL1.0
2943 ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1
2944 ;; Cairo bindings contain code under MPL1.1
2945 ;; XULRunner 1.9 bindings contain code under MPL2.0
2946 (license (list
2947 license:epl1.0
2948 license:mpl1.1
2949 license:mpl2.0
2950 license:lgpl2.1+))))
2951
068e476f
RJ
2952(define-public java-xz
2953 (package
2954 (name "java-xz")
92966847 2955 (version "1.6")
068e476f
RJ
2956 (source (origin
2957 (method url-fetch)
2958 (uri (string-append "http://tukaani.org/xz/xz-java-" version ".zip"))
2959 (sha256
2960 (base32
92966847 2961 "1z3p1ri1gvl07inxn0agx44ck8n7wrzfmvkz8nbq3njn8r9wba8x"))))
068e476f
RJ
2962 (build-system ant-build-system)
2963 (arguments
2964 `(#:tests? #f ; There are no tests to run.
2965 #:jar-name ,(string-append "xz-" version ".jar")
2966 #:phases
2967 (modify-phases %standard-phases
2968 ;; The unpack phase enters the "maven" directory by accident.
2969 (add-after 'unpack 'chdir
2970 (lambda _ (chdir "..") #t)))))
2971 (native-inputs
2972 `(("unzip" ,unzip)))
d6ddc5ab 2973 (home-page "https://tukaani.org/xz/java.html")
068e476f
RJ
2974 (synopsis "Implementation of XZ data compression in pure Java")
2975 (description "This library aims to be a complete implementation of XZ data
2976compression in pure Java. Single-threaded streamed compression and
2977decompression and random access decompression have been fully implemented.")
2978 (license license:public-domain)))
04100c3b
RW
2979
2980;; java-hamcrest-core uses qdox version 1.12. We package this version instead
2981;; of the latest release.
2982(define-public java-qdox-1.12
2983 (package
2984 (name "java-qdox")
2985 (version "1.12.1")
2986 (source (origin
2987 (method url-fetch)
2988 (uri (string-append "http://central.maven.org/maven2/"
2989 "com/thoughtworks/qdox/qdox/" version
2990 "/qdox-" version "-sources.jar"))
2991 (sha256
2992 (base32
2993 "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl"))))
2994 (build-system ant-build-system)
2995 (arguments
2996 `(;; Tests require junit
2997 #:tests? #f
2998 #:jar-name "qdox.jar"
2999 #:phases
3000 (modify-phases %standard-phases
3001 (replace 'unpack
3002 (lambda* (#:key source #:allow-other-keys)
3003 (mkdir "src")
3004 (with-directory-excursion "src"
2c8ac364 3005 (invoke "jar" "-xf" source))))
04100c3b
RW
3006 ;; At this point we don't have junit, so we must remove the API
3007 ;; tests.
3008 (add-after 'unpack 'delete-tests
3009 (lambda _
3010 (delete-file-recursively "src/com/thoughtworks/qdox/junit")
3011 #t)))))
3012 (home-page "http://qdox.codehaus.org/")
3013 (synopsis "Parse definitions from Java source files")
3014 (description
3015 "QDox is a high speed, small footprint parser for extracting
3016class/interface/method definitions from source files complete with JavaDoc
b13cf17f 3017@code{@@tags}. It is designed to be used by active code generators or
04100c3b
RW
3018documentation tools.")
3019 (license license:asl2.0)))
e7e28510
RW
3020
3021(define-public java-jarjar
3022 (package
3023 (name "java-jarjar")
3024 (version "1.4")
3025 (source (origin
3026 (method url-fetch)
3027 (uri (string-append
3028 "https://storage.googleapis.com/google-code-archive-downloads/v2/"
3029 "code.google.com/jarjar/jarjar-src-" version ".zip"))
3030 (sha256
3031 (base32
88aa75e9
GB
3032 "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl"))
3033 (modules '((guix build utils)))
3034 (snippet
3035 '(begin
3036 ;; Delete bundled thirds-party jar archives.
3037 ;; TODO: unbundle maven-plugin-api.
3038 (delete-file "lib/asm-4.0.jar")
3039 (delete-file "lib/asm-commons-4.0.jar")
3040 (delete-file "lib/junit-4.8.1.jar")
3041 #t))))
e7e28510
RW
3042 (build-system ant-build-system)
3043 (arguments
3044 `(;; Tests require junit, which ultimately depends on this package.
3045 #:tests? #f
3046 #:build-target "jar"
3047 #:phases
3048 (modify-phases %standard-phases
88aa75e9
GB
3049 (add-before 'build 'do-not-use-bundled-asm
3050 (lambda* (#:key inputs #:allow-other-keys)
3051 (substitute* "build.xml"
3052 (("<path id=\"path.build\">")
3053 (string-append "<path id=\"path.build\"><fileset dir=\""
3054 (assoc-ref inputs "java-asm-bootstrap")
3055 "/share/java\" includes=\"**/*.jar\"/>"))
3056 (("<zipfileset src=\"lib/asm-4.0.jar\"/>") "")
3057 (("lib/asm-commons-4.0.jar")
3058 (string-append (assoc-ref inputs "java-asm-bootstrap")
3059 "/share/java/asm-6.0.jar"))
3060 (("<include name=\"org/objectweb/asm/commons/Remap\\*\\.class\"/>")
3061 (string-append "<include name=\"org/objectweb/asm/"
3062 "commons/Remap*.class\"/>"
3063 "<include name=\"org/objectweb/asm/*.class\"/>"
3064 "<include name=\"org/objectweb/asm/"
3065 "signature/*.class\"/>"
3066 "<include name=\"org/objectweb/asm/"
3067 "commons/SignatureRemapper.class\"/>")))
3068 #t))
e7e28510
RW
3069 (replace 'install
3070 (lambda* (#:key outputs #:allow-other-keys)
3071 (let ((target (string-append (assoc-ref outputs "out")
3072 "/share/java")))
3073 (install-file (string-append "dist/jarjar-" ,version ".jar")
3074 target))
3075 #t)))))
88aa75e9
GB
3076 (inputs
3077 `(("java-asm-bootstrap" ,java-asm-bootstrap)))
e7e28510
RW
3078 (native-inputs
3079 `(("unzip" ,unzip)))
3080 (home-page "https://code.google.com/archive/p/jarjar/")
3081 (synopsis "Repackage Java libraries")
3082 (description
3083 "Jar Jar Links is a utility that makes it easy to repackage Java
3084libraries and embed them into your own distribution. Jar Jar Links includes
3085an Ant task that extends the built-in @code{jar} task.")
3086 (license license:asl2.0)))
87c31a21
RW
3087
3088(define-public java-hamcrest-core
3089 (package
3090 (name "java-hamcrest-core")
3091 (version "1.3")
3092 (source (origin
3093 (method url-fetch)
00672896
HG
3094 (uri (string-append "https://github.com/hamcrest/JavaHamcrest/"
3095 "archive/hamcrest-java-" version ".tar.gz"))
87c31a21
RW
3096 (sha256
3097 (base32
00672896 3098 "11g0s105fmwzijbv08lx8jlb521yravjmxnpgdx08fvg1kjivhva"))
87c31a21
RW
3099 (modules '((guix build utils)))
3100 (snippet
3101 '(begin
00672896
HG
3102 ;; Delete bundled thirds-party jar archives.
3103 (delete-file-recursively "lib")
87c31a21
RW
3104 #t))))
3105 (build-system ant-build-system)
3106 (arguments
3107 `(#:tests? #f ; Tests require junit
a8d3cb62
RW
3108 #:modules ((guix build ant-build-system)
3109 (guix build utils)
3110 (srfi srfi-1))
87c31a21 3111 #:make-flags (list (string-append "-Dversion=" ,version))
fae0b4ca 3112 #:test-target "unit-test"
87c31a21
RW
3113 #:build-target "core"
3114 #:phases
3115 (modify-phases %standard-phases
3116 ;; Disable unit tests, because they require junit, which requires
3117 ;; hamcrest-core. We also give a fixed value to the "Built-Date"
3118 ;; attribute from the manifest for reproducibility.
3119 (add-before 'configure 'patch-build.xml
3120 (lambda _
3121 (substitute* "build.xml"
3122 (("unit-test, ") "")
3123 (("\\$\\{build.timestamp\\}") "guix"))
3124 #t))
3125 ;; Java's "getMethods()" returns methods in an unpredictable order.
3126 ;; To make the output of the generated code deterministic we must
3127 ;; sort the array of methods.
3128 (add-after 'unpack 'make-method-order-deterministic
3129 (lambda _
3130 (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java"
3131 (("import java\\.util\\.Iterator;" line)
3132 (string-append line "\n"
3133 "import java.util.Arrays; import java.util.Comparator;"))
3134 (("allMethods = cls\\.getMethods\\(\\);" line)
3135 (string-append "_" line
3136 "
3137private Method[] getSortedMethods() {
3138 Arrays.sort(_allMethods, new Comparator<Method>() {
3139 @Override
3140 public int compare(Method a, Method b) {
3141 return a.toString().compareTo(b.toString());
3142 }
3143 });
3144 return _allMethods;
3145}
3146
2c8ac364
MW
3147private Method[] allMethods = getSortedMethods();")))
3148 #t))
87c31a21
RW
3149 (add-before 'build 'do-not-use-bundled-qdox
3150 (lambda* (#:key inputs #:allow-other-keys)
3151 (substitute* "build.xml"
3152 (("lib/generator/qdox-1.12.jar")
3153 (string-append (assoc-ref inputs "java-qdox-1.12")
3154 "/share/java/qdox.jar")))
3155 #t))
fab959d3
HG
3156 ;; build.xml searches for .jar files in this directoy, which
3157 ;; we remove from the source archive.
3158 (add-before 'build 'create-dummy-directories
3159 (lambda _
3160 (mkdir-p "lib/integration")
3161 #t))
87c31a21
RW
3162 (replace 'install
3163 (lambda* (#:key outputs #:allow-other-keys)
a8d3cb62
RW
3164 (let* ((target (string-append (assoc-ref outputs "out")
3165 "/share/java/"))
3166 (version-suffix ,(string-append "-" version ".jar"))
3167 (install-without-version-suffix
3168 (lambda (jar)
3169 (copy-file jar
3170 (string-append target
3171 (basename jar version-suffix)
3172 ".jar")))))
3173 (mkdir-p target)
3174 (for-each
3175 install-without-version-suffix
3176 (find-files "build"
3177 (lambda (name _)
3178 (and (string-suffix? ".jar" name)
3179 (not (string-suffix? "-sources.jar" name)))))))
3180 #t)))))
87c31a21
RW
3181 (native-inputs
3182 `(("java-qdox-1.12" ,java-qdox-1.12)
3183 ("java-jarjar" ,java-jarjar)))
3184 (home-page "http://hamcrest.org/")
3185 (synopsis "Library of matchers for building test expressions")
3186 (description
3187 "This package provides a library of matcher objects (also known as
3188constraints or predicates) allowing @code{match} rules to be defined
3189declaratively, to be used in other frameworks. Typical scenarios include
3190testing frameworks, mocking libraries and UI validation rules.")
3191 (license license:bsd-2)))
d0184f44
RW
3192
3193(define-public java-junit
3194 (package
3195 (name "java-junit")
3196 (version "4.12")
3197 (source (origin
3198 (method url-fetch)
3199 (uri (string-append "https://github.com/junit-team/junit/"
3200 "archive/r" version ".tar.gz"))
3201 (file-name (string-append name "-" version ".tar.gz"))
3202 (sha256
3203 (base32
3204 "090dn5v1vs0b3acyaqc0gjf6p8lmd2h24wfzsbq7sly6b214anws"))
3205 (modules '((guix build utils)))
3206 (snippet
3207 '(begin
3208 ;; Delete bundled jar archives.
3209 (delete-file-recursively "lib")
3210 #t))))
3211 (build-system ant-build-system)
3212 (arguments
3213 `(#:tests? #f ; no tests
3214 #:jar-name "junit.jar"))
3215 (inputs
3216 `(("java-hamcrest-core" ,java-hamcrest-core)))
3217 (home-page "http://junit.org/")
3218 (synopsis "Test framework for Java")
3219 (description
3220 "JUnit is a simple framework to write repeatable tests for Java projects.
3221JUnit provides assertions for testing expected results, test fixtures for
3222sharing common test data, and test runners for running tests.")
3223 (license license:epl1.0)))
9fb20d01
RW
3224
3225(define-public java-plexus-utils
3226 (package
3227 (name "java-plexus-utils")
0cd8efcc 3228 (version "3.2.0")
9fb20d01
RW
3229 (source (origin
3230 (method url-fetch)
3231 (uri (string-append "https://github.com/codehaus-plexus/"
3232 "plexus-utils/archive/plexus-utils-"
3233 version ".tar.gz"))
3234 (sha256
3235 (base32
0cd8efcc 3236 "1ihfigar20lvk4pinii7dq05i173xphhw4iyrk6gjfy04m01j2lz"))))
9fb20d01
RW
3237 (build-system ant-build-system)
3238 ;; FIXME: The default build.xml does not include a target to install
3239 ;; javadoc files.
3240 (arguments
3241 `(#:jar-name "plexus-utils.jar"
3242 #:source-dir "src/main"
3243 #:phases
3244 (modify-phases %standard-phases
3245 (add-after 'unpack 'fix-reference-to-/bin-and-/usr
3246 (lambda _
3247 (substitute* "src/main/java/org/codehaus/plexus/util/\
3248cli/shell/BourneShell.java"
3249 (("/bin/sh") (which "sh"))
3250 (("/usr/") (getcwd)))
3251 #t))
3252 (add-after 'unpack 'fix-or-disable-broken-tests
3253 (lambda _
3254 (with-directory-excursion "src/test/java/org/codehaus/plexus/util"
3255 (substitute* '("cli/CommandlineTest.java"
3256 "cli/shell/BourneShellTest.java")
3257 (("/bin/sh") (which "sh"))
3258 (("/bin/echo") (which "echo")))
3259
3260 ;; This test depends on MavenProjectStub, but we don't have
3261 ;; a package for Maven.
3262 (delete-file "introspection/ReflectionValueExtractorTest.java")
3263
3264 ;; FIXME: The command line tests fail, maybe because they use
3265 ;; absolute paths.
3266 (delete-file "cli/CommandlineTest.java"))
3267 #t)))))
3268 (native-inputs
0cd8efcc
JL
3269 `(("java-hamcrest-core" ,java-hamcrest-core)
3270 ("java-junit" ,java-junit)))
9fb20d01
RW
3271 (home-page "http://codehaus-plexus.github.io/plexus-utils/")
3272 (synopsis "Common utilities for the Plexus framework")
3273 (description "This package provides various Java utility classes for the
3274Plexus framework to ease working with strings, files, command lines, XML and
3275more.")
3276 (license license:asl2.0)))
1e555562
HG
3277
3278(define-public java-plexus-interpolation
3279 (package
3280 (name "java-plexus-interpolation")
3281 (version "1.23")
3282 (source (origin
3283 (method url-fetch)
3284 (uri (string-append "https://github.com/codehaus-plexus/"
3285 "plexus-interpolation/archive/"
3286 "plexus-interpolation-" version ".tar.gz"))
3287 (sha256
3288 (base32
fd75eb6c 3289 "03377yzlx5q440m6sxxgv6a5qb8fl30zzcgxgc0hxk5qgl2z1jjn"))))
1e555562
HG
3290 (build-system ant-build-system)
3291 (arguments
3292 `(#:jar-name "plexus-interpolation.jar"
3293 #:source-dir "src/main"))
3294 (native-inputs
3295 `(("java-junit" ,java-junit)
3296 ("java-hamcrest-core" ,java-hamcrest-core)))
3297 (home-page "http://codehaus-plexus.github.io/plexus-interpolation/")
3298 (synopsis "Java components for interpolating ${} strings and the like")
3299 (description "Plexus interpolator is a modular, flexible interpolation
3300framework for the expression language style commonly seen in Maven, Plexus,
3301and other related projects.
3302
3303It has its foundation in the @code{org.codehaus.plexus.utils.interpolation}
3304package within @code{plexus-utils}, but has been separated in order to allow
3305these two libraries to vary independently of one another.")
3306 (license license:asl2.0)))
8f8ed9aa 3307
bb27eb0d
JL
3308(define-public java-plexus-classworlds
3309 (package
3310 (name "java-plexus-classworlds")
3311 (version "2.5.2")
3312 (source (origin
3313 (method url-fetch)
3314 (uri (string-append "https://github.com/codehaus-plexus/"
3315 "plexus-classworlds/archive/plexus-classworlds-"
3316 version ".tar.gz"))
3317 (sha256
3318 (base32
3319 "1qm4p0rl8d82lzhsiwnviw11jnq44s0gflg78zq152xyyr2xmh8g"))))
3320 (build-system ant-build-system)
3321 (arguments
3322 `(#:jar-name "plexus-classworlds.jar"
3323 #:source-dir "src/main"
3324 #:tests? #f));; FIXME: we need to generate some resources as in pom.xml
3325 (native-inputs
3326 `(("java-junit" ,java-junit)))
3327 (home-page "http://codehaus-plexus.github.io/plexus-classworlds/")
3328 (synopsis "Java class loader framework")
f4548394
TGR
3329 (description "Plexus classworlds replaces the native @code{ClassLoader}
3330mechanism of Java. It is especially useful for dynamic loading of application
bb27eb0d
JL
3331components.")
3332 (license license:asl2.0)))
3333
a7ad92ad 3334(define java-plexus-container-default-bootstrap
0726d4ea
JL
3335 (package
3336 (name "java-plexus-container-default-bootstrap")
3337 (version "1.7.1")
3338 (source (origin
3339 (method url-fetch)
3340 (uri (string-append "https://github.com/codehaus-plexus/plexus-containers"
3341 "/archive/plexus-containers-" version ".tar.gz"))
3342 (sha256
3343 (base32
3344 "0xw5g30qf4a83608rw9v2hv8pfsz7d69dkdhk6r0wia4q78hh1pc"))))
3345 (build-system ant-build-system)
3346 (arguments
3347 `(#:jar-name "container-default.jar"
3348 #:source-dir "plexus-container-default/src/main/java"
3349 #:test-dir "plexus-container-default/src/test"
3350 #:jdk ,icedtea-8
3351 #:tests? #f; requires plexus-archiver, which depends on this package
3352 #:phases
3353 (modify-phases %standard-phases
3354 (add-before 'build 'copy-resources
3355 (lambda _
3356 (copy-recursively
3357 "plexus-container-default/src/main/resources/"
3358 "build/classes")
3359 #t)))))
3360 (inputs
3361 `(("worldclass" ,java-plexus-classworlds)
3362 ("xbean" ,java-geronimo-xbean-reflect)
3363 ("utils" ,java-plexus-utils)
3364 ("junit" ,java-junit)
3365 ("guava" ,java-guava)))
3366 (home-page "https://github.com/codehaus-plexus/plexus-containers")
f4548394 3367 (synopsis "Inversion-of-control container")
0726d4ea 3368 (description "Plexus-default-container is Plexus' inversion-of-control
f4548394 3369(@dfn{IoC}) container. It is composed of its public API and its default
0726d4ea
JL
3370implementation.")
3371 (license license:asl2.0)))
3372
0858b9dc
JL
3373(define-public java-plexus-io
3374 (package
3375 (name "java-plexus-io")
3376 (version "3.0.0")
3377 (source (origin
3378 (method url-fetch)
3379 (uri (string-append "https://github.com/codehaus-plexus/plexus-io"
3380 "/archive/plexus-io-" version ".tar.gz"))
3381 (sha256
3382 (base32
3383 "0f2j41kihaymxkpbm55smpxjja235vad8cgz94frfy3ppcp021dw"))))
3384 (build-system ant-build-system)
3385 (arguments
3386 `(#:jar-name "plexus-io.jar"
3387 #:source-dir "src/main/java"
3388 #:test-dir "src/test"
3389 #:jdk ,icedtea-8
3390 #:phases
3391 (modify-phases %standard-phases
3392 (add-before 'build 'copy-resources
3393 (lambda _
3394 (mkdir-p "build/classes/META-INF/plexus")
3395 (copy-file "src/main/resources/META-INF/plexus/components.xml"
3396 "build/classes/META-INF/plexus/components.xml")
3397 #t)))))
3398 (inputs
3399 `(("utils" ,java-plexus-utils)
3400 ("commons-io" ,java-commons-io)
3401 ("java-jsr305" ,java-jsr305)))
3402 (native-inputs
3403 `(("junit" ,java-junit)
3404 ("hamcrest" ,java-hamcrest-core)
3405 ("guava" ,java-guava)
3406 ("classworlds" ,java-plexus-classworlds)
3407 ("xbean" ,java-geronimo-xbean-reflect)
3408 ("container-default" ,java-plexus-container-default-bootstrap)))
3409 (home-page "https://github.com/codehaus-plexus/plexus-io")
3410 (synopsis "I/O plexus components")
3411 (description "Plexus IO is a set of plexus components, which are designed
3412for use in I/O operations. This implementation using plexus components allows
3413reusing it in maven.")
3414 (license license:asl2.0)))
3415
b51df3ca
JL
3416(define-public java-plexus-archiver
3417 (package
3418 (name "java-plexus-archiver")
6f737ae6 3419 (version "4.1.0")
b51df3ca
JL
3420 (source (origin
3421 (method url-fetch)
3422 (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver"
3423 "/archive/plexus-archiver-" version ".tar.gz"))
3424 (sha256
3425 (base32
6f737ae6 3426 "0ry6i92gli0mvdmfih2vgs0lkf9yvx18h2ajxim66yg6yipnp0hg"))))
b51df3ca
JL
3427 (build-system ant-build-system)
3428 (arguments
3429 `(#:jar-name "plexus-archiver.jar"
3430 #:source-dir "src/main/java"
3431 #:jdk ,icedtea-8
3432 #:test-dir "src/test"
3433 #:test-exclude (list "**/Abstract*.java" "**/Base*.java")
3434 #:phases
3435 (modify-phases %standard-phases
3436 (add-before 'check 'remove-failing
3437 (lambda _
3438 ;; Requires an older version of plexus container
3439 (delete-file
2c8ac364
MW
3440 "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java")
3441 #t))
6f737ae6
JL
3442 (add-before 'check 'fix-test-building
3443 (lambda _
3444 (substitute* "build.xml"
3445 (("srcdir=\"src/test\"") "srcdir=\"src/test/java\""))
3446 #t))
b51df3ca
JL
3447 (add-before 'build 'copy-resources
3448 (lambda _
3449 (mkdir-p "build/classes/META-INF/plexus")
3450 (copy-file "src/main/resources/META-INF/plexus/components.xml"
3451 "build/classes/META-INF/plexus/components.xml")
3452 #t)))))
3453 (inputs
3454 `(("utils" ,java-plexus-utils)
3455 ("commons-io" ,java-commons-io)
3456 ("snappy" ,java-iq80-snappy)
3457 ("io" ,java-plexus-io)
3458 ("compress" ,java-commons-compress)
3459 ("container-default" ,java-plexus-container-default-bootstrap)
3460 ("snappy" ,java-snappy)
3461 ("java-jsr305" ,java-jsr305)))
3462 (native-inputs
6f737ae6
JL
3463 `(("java-hamcrest-core" ,java-hamcrest-core)
3464 ("junit" ,java-junit)
b51df3ca
JL
3465 ("classworld" ,java-plexus-classworlds)
3466 ("xbean" ,java-geronimo-xbean-reflect)
3467 ("xz" ,java-tukaani-xz)
3468 ("guava" ,java-guava)))
3469 (home-page "https://github.com/codehaus-plexus/plexus-archiver")
3470 (synopsis "Archiver component of the Plexus project")
3471 (description "Plexus-archiver contains a component to deal with project
3472archives (jar).")
3473 (license license:asl2.0)))
3474
a0837294
JL
3475(define-public java-plexus-container-default
3476 (package
3477 (inherit java-plexus-container-default-bootstrap)
3478 (name "java-plexus-container-default")
3479 (arguments
3480 `(#:jar-name "container-default.jar"
3481 #:source-dir "plexus-container-default/src/main/java"
3482 #:test-dir "plexus-container-default/src/test"
3483 #:test-exclude (list ;"**/*Test.java"
3484 "**/Abstract*.java"
3485 ;; Requires plexus-hierarchy
3486 "**/PlexusHierarchyTest.java"
3487 ;; Failures
3488 "**/ComponentRealmCompositionTest.java"
3489 "**/PlexusContainerTest.java")
3490 #:jdk ,icedtea-8
3491 #:phases
3492 (modify-phases %standard-phases
3493 (add-before 'build 'copy-resources
3494 (lambda _
3495 (copy-recursively
3496 "plexus-container-default/src/main/resources/"
3497 "build/classes")
3498 #t))
3499 (add-before 'check 'fix-paths
3500 (lambda _
3501 (let ((dir "plexus-container-default/src/test/java/org/codehaus"))
3502 (substitute*
3503 (string-append
3504 dir "/plexus/component/composition/"
3505 "ComponentRealmCompositionTest.java")
3506 (("src/test") "plexus-container-default/src/test"))
3507 #t))))))
3508 (inputs
3509 `(("worldclass" ,java-plexus-classworlds)
3510 ("xbean" ,java-geronimo-xbean-reflect)
3511 ("utils" ,java-plexus-utils)
3512 ("junit" ,java-junit)
3513 ("guava" ,java-guava)))
3514 (native-inputs
3515 `(("archiver" ,java-plexus-archiver)
3516 ("hamcrest" ,java-hamcrest-core)))))
3517
3214afab
JL
3518(define-public java-plexus-component-annotations
3519 (package
3520 (inherit java-plexus-container-default)
3521 (name "java-plexus-component-annotations")
3522 (arguments
3523 `(#:jar-name "plexus-component-annotations.jar"
3524 #:source-dir "plexus-component-annotations/src/main/java"
3525 #:tests? #f)); no tests
3526 (inputs '())
3527 (native-inputs '())
3528 (synopsis "Plexus descriptors generator")
3529 (description "This package is a Maven plugin to generate Plexus descriptors
3530from source tags and class annotations.")))
3531
4f77ba17
JL
3532(define-public java-plexus-cipher
3533 (package
3534 (name "java-plexus-cipher")
3535 (version "1.7")
3536 (source (origin
3537 (method url-fetch)
3538 (uri (string-append "https://github.com/codehaus-plexus/plexus-cipher"
3539 "/archive/plexus-cipher-" version ".tar.gz"))
3540 (sha256
3541 (base32
3542 "1j3r8xzlxlk340snkjp6lk2ilkxlkn8qavsfiq01f43xmvv8ymk3"))))
3543 (build-system ant-build-system)
3544 (arguments
3545 `(#:jar-name "plexus-cipher.jar"
3546 #:source-dir "src/main/java"
3547 #:jdk ,icedtea-8
3548 #:tests? #f; FIXME: requires sisu-inject-bean
3549 #:phases
3550 (modify-phases %standard-phases
3551 (add-before 'build 'copy-resources
3552 (lambda _
3553 (copy-recursively "src/main/resources" "build/classes")
3554 (mkdir-p "build/classes/META-INF/sisu")
3555 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
3556 (lambda _
3557 (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
3558 #t)))))
3559 (inputs
3560 `(("java-cdi-api" ,java-cdi-api)
3561 ("java-javax-inject" ,java-javax-inject)))
3562 (home-page "https://github.com/sonatype/plexus-cipher")
3563 (synopsis "Encryption/decryption Component")
3564 (description "Plexus-cipher contains a component to deal with encryption
3565and decryption.")
3566 (license license:asl2.0)))
3567
239126d4
JL
3568(define-public java-plexus-compiler-api
3569 (package
3570 (name "java-plexus-compiler-api")
a70182b0 3571 (version "2.8.4")
239126d4
JL
3572 (source (origin
3573 (method url-fetch)
3574 (uri (string-append "https://github.com/codehaus-plexus/plexus-compiler"
3575 "/archive/plexus-compiler-" version ".tar.gz"))
3576 (sha256
3577 (base32
a70182b0 3578 "09vmxs0807wsd26nbrwwj5l8ycmzazqycj52l7w6wjvkryywi69h"))))
239126d4
JL
3579 (build-system ant-build-system)
3580 (arguments
3581 `(#:jar-name "plexus-compiler-api.jar"
3582 #:source-dir "plexus-compiler-api/src/main/java"
3583 #:jdk ,icedtea-8
3584 #:test-dir "plexus-compiler-api/src/test"))
3585 (inputs
3586 `(("java-plexus-container-default" ,java-plexus-container-default)
3587 ("java-plexus-util" ,java-plexus-utils)))
3588 (native-inputs
3589 `(("java-junit" ,java-junit)))
3590 (home-page "https://github.com/codehaus-plexus/plexus-compiler")
3591 (synopsis "Plexus Compilers component's API to manipulate compilers")
3592 (description "This package contains the API used by components to manipulate
3593compilers.")
3594 (license (list license:asl2.0
3595 license:expat))))
3596
f8a519fa
JL
3597(define-public java-plexus-compiler-javac
3598 (package
3599 (inherit java-plexus-compiler-api)
3600 (name "java-plexus-compiler-javac")
3601 (arguments
3602 `(#:jar-name "plexus-compiler-javac.jar"
3603 #:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java"
3604 #:jdk ,icedtea-8
3605 #:tests? #f; depends on compiler-test -> maven-core -> ... -> this package.
3606 #:test-dir "plexus-compilers/plexus-compiler-javac/src/test"))
3607 (inputs
3608 `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
3609 ("java-plexus-utils" ,java-plexus-utils)
3610 ("java-plexus-container-default" ,java-plexus-container-default)))
3611 (native-inputs
3612 `(("java-junit" ,java-junit)))
3613 (synopsis "Javac Compiler support for Plexus Compiler component")
3614 (description "This package contains the Javac Compiler support for Plexus
3615Compiler component.")))
3616
0aa85081
JL
3617(define-public java-plexus-sec-dispatcher
3618 (package
3619 (name "java-plexus-sec-dispatcher")
3620 (version "1.4") ;; Newest release listed at the Maven Central Repository.
3621 (source (origin
3622 ;; This project doesn't tag releases or publish tarballs, so we take
3623 ;; the "prepare release plexus-sec-dispatcher-1.4" git commit.
3624 (method url-fetch)
3625 (uri (string-append "https://github.com/sonatype/plexus-sec-dispatcher/"
3626 "archive/7db8f88048.tar.gz"))
3627 (sha256
3628 (base32
3629 "1smfrk4n7xbrsxpxcp2j4i0j8q86j73w0w6xg7qz83dp6dagdjgp"))
3630 (file-name (string-append name "-" version ".tar.gz"))))
3631 (arguments
3632 `(#:jar-name "plexus-sec-dispatcher.jar"
3633 #:source-dir "src/main/java"
3634 #:jdk ,icedtea-8
3635 #:phases
3636 (modify-phases %standard-phases
3637 (add-before 'build 'generate-models
3638 (lambda* (#:key inputs #:allow-other-keys)
3639 (define (modello-single-mode file version mode)
2c8ac364
MW
3640 (invoke "java"
3641 "org.codehaus.modello.ModelloCli"
3642 file mode "src/main/java" version
3643 "false" "true"))
0aa85081 3644 (let ((file "src/main/mdo/settings-security.mdo"))
0aa85081
JL
3645 (modello-single-mode file "1.0.0" "java")
3646 (modello-single-mode file "1.0.0" "xpp3-reader")
2c8ac364
MW
3647 (modello-single-mode file "1.0.0" "xpp3-writer"))
3648 #t))
0aa85081
JL
3649 (add-before 'build 'generate-components.xml
3650 (lambda _
3651 (mkdir-p "build/classes/META-INF/plexus")
3652 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
3653 (lambda _
3654 (display
3655 "<component-set>\n
3656 <components>\n
3657 <component>\n
3658 <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n
3659 <role-hint>default</role-hint>\n
3660 <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n
3661 <description></description>\n
3662 <requirements>\n
3663 <requirement>\n
3664 <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n
3665 <field-name>_cipher</field-name>\n
3666 </requirement>\n
3667 <requirement>\n
3668 <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n
3669 <field-name>_decryptors</field-name>\n
3670 </requirement>\n
3671 </requirements>\n
3672 <configuration>\n
3673 <_configuration-file>~/.settings-security.xml</_configuration-file>\n
3674 </configuration>\n
3675 </component>\n
3676 </components>\n
2c8ac364
MW
3677</component-set>\n")))
3678 #t))
0aa85081
JL
3679 (add-before 'check 'fix-paths
3680 (lambda _
2c8ac364
MW
3681 (copy-recursively "src/test/resources" "target")
3682 #t)))))
0aa85081
JL
3683 (inputs
3684 `(("java-plexus-cipher" ,java-plexus-cipher)))
3685 (native-inputs
3686 `(("java-modello-core" ,java-modello-core)
3687 ;; for modello:
3688 ("java-plexus-container-default" ,java-plexus-container-default)
3689 ("java-plexus-classworlds" ,java-plexus-classworlds)
3690 ("java-plexus-utils" ,java-plexus-utils)
3691 ("java-guava" ,java-guava)
3692 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
3693 ("java-sisu-build-api" ,java-sisu-build-api)
3694 ;; modello plugins:
3695 ("java-modellop-plugins-java" ,java-modello-plugins-java)
3696 ("java-modellop-plugins-xml" ,java-modello-plugins-xml)
3697 ("java-modellop-plugins-xpp3" ,java-modello-plugins-xpp3)
3698 ;; for tests
3699 ("java-junit" ,java-junit)))
3700 (build-system ant-build-system)
3701 (home-page "https://github.com/sonatype/plexus-sec-dispatcher")
3702 (synopsis "Plexus Security Dispatcher Component")
3703 (description "This package is the Plexus Security Dispatcher Component.
3704This component decrypts a string passed to it.")
3705 (license license:asl2.0)))
3706
7d65489f
JL
3707(define-public java-plexus-cli
3708 (package
3709 (name "java-plexus-cli")
3710 (version "1.7")
3711 (source (origin
3712 (method git-fetch)
3713 (uri (git-reference
3714 (url "https://github.com/sonatype/plexus-cli")
3715 (commit "a776afa6bca84e5107bedb69440329cdb24ed645")))
3716 (file-name (string-append name "-" version))
3717 (sha256
3718 (base32
3719 "0xjrlay605rypv3zd7y24vlwf0039bil3n2cqw54r1ddpysq46vx"))))
3720 (build-system ant-build-system)
3721 (arguments
3722 `(#:jar-name "plexus-cli.jar"
3723 #:source-dir "src/main/java"
3724 #:jdk ,icedtea-8
3725 #:test-dir "src/test"))
3726 (inputs
3727 `(("java-commons-cli" ,java-commons-cli)
3728 ("java-plexus-container-default" ,java-plexus-container-default)
3729 ("java-plexus-classworlds" ,java-plexus-classworlds)))
3730 (native-inputs
3731 `(("java-plexus-utils" ,java-plexus-utils)
3732 ("java-junit" ,java-junit)
3733 ("java-guava" ,java-guava)))
3734 (home-page "https://codehaus-plexus.github.io/plexus-cli")
3735 (synopsis "CLI building library for plexus")
3736 (description "This package is a library to help creating CLI around
3737Plexus components.")
3738 (license license:asl2.0)))
3739
8f524749
JL
3740(define-public java-sisu-build-api
3741 (package
3742 (name "java-sisu-build-api")
3743 (version "0.0.7")
3744 (source (origin
3745 (method url-fetch)
3746 (uri (string-append "https://github.com/sonatype/sisu-build-api/"
3747 "archive/plexus-build-api-" version ".tar.gz"))
3748 (sha256
3749 (base32
3750 "1c3rrpma3x634xp2rm2p5iskfhzdyc7qfbhjzr70agrl1jwghgy2"))))
3751 (build-system ant-build-system)
3752 (arguments
3753 `(#:jar-name "sisu-build-api.jar"
3754 #:source-dir "src/main/java"
3755 #:jdk ,icedtea-8
3756 #:tests? #f; FIXME: how to run the tests?
3757 #:phases
3758 (modify-phases %standard-phases
3759 (add-before 'build 'copy-resources
3760 (lambda _
3761 (copy-recursively "src/main/resources" "build/classes")
3762 (substitute* (find-files "build/classes")
3763 (("\\$\\{project.version\\}") ,version))
3764 #t))
3765 (add-before 'build 'generate-plexus-compontent
3766 (lambda _
3767 (mkdir-p "build/classes/META-INF/plexus")
3768 ;; This file is required for plexus to inject this package.
3769 ;; FIXME: how is it generated?
3770 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
3771 (lambda _
3772 (display
3773 "<component-set>\n
3774 <components>\n
3775 <component>\n
3776 <role>org.sonatype.plexus.build.incremental.BuildContext</role>\n
3777 <role-hint>default</role-hint>\n
3778 <implementation>org.sonatype.plexus.build.incremental.DefaultBuildContext</implementation>\n
3779 <description>Filesystem based non-incremental build context implementation\n
3780which behaves as if all files were just created.</description>\n
3781 </component>\n
3782 </components>\n
3783</component-set>\n")))
3784 #t)))))
3785 (inputs
3786 `(("java-plexus-utils" ,java-plexus-utils)
3787 ("java-plexus-container-default" ,java-plexus-container-default)))
3788 (home-page "https://github.com/sonatype/sisu-build-api/")
3789 (synopsis "Base build API for maven")
3790 (description "This package contains the base build API for maven and
3791a default implementation of it. This API is about scanning files in a
3792project and determining what files need to be rebuilt.")
3793 (license license:asl2.0)))
3794
b26c8b61
JL
3795(define-public java-modello-core
3796 (package
3797 (name "java-modello-core")
3798 (version "1.9.1")
3799 (source (origin
3800 (method url-fetch)
3801 (uri (string-append "https://github.com/codehaus-plexus/modello"
3802 "/archive/modello-" version ".tar.gz"))
3803 (sha256
3804 (base32
3805 "0l2pvns8pmlrmjm3iknp7gpg3654y1m8qhy55b19sdwdchdcyxfh"))))
3806 (build-system ant-build-system)
3807 (arguments
3808 `(#:jar-name "modello-core.jar"
3809 #:source-dir "modello-core/src/main/java"
3810 #:test-dir "modello-core/src/test"
3811 #:main-class "org.codehaus.modello.ModelloCli"
3812 #:jdk ,icedtea-8
3813 #:phases
3814 (modify-phases %standard-phases
3815 (add-before 'build 'copy-resources
3816 (lambda _
3817 (mkdir-p "build/classes/META-INF/plexus")
3818 (copy-file "modello-core/src/main/resources/META-INF/plexus/components.xml"
3819 "build/classes/META-INF/plexus/components.xml")
3820 #t))
3821 (add-before 'check 'fix-tests
3822 (lambda _
3823 (with-directory-excursion "modello-core/src/test/java/org/codehaus"
3824 (substitute* '("modello/core/DefaultModelloCoreTest.java"
3825 "modello/core/io/ModelReaderTest.java")
3826 (("src/test") "modello-core/src/test")))
3827 #t)))))
3828 (inputs
3829 `(("java-plexus-utils" ,java-plexus-utils)
3830 ("java-plexus-container-default" ,java-plexus-container-default)
3831 ("java-sisu-build-api" ,java-sisu-build-api)))
3832 (native-inputs
3833 `(("java-junit" ,java-junit)
3834 ("java-plexus-classworlds" ,java-plexus-classworlds)
3835 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
3836 ("java-guava" ,java-guava)))
3837 (home-page "http://codehaus-plexus.github.io/modello/")
3838 (synopsis "Framework for code generation from a simple model")
3839 (description "Modello is a framework for code generation from a simple model.
3840
3841Modello generates code from a simple model format: based on a plugin
3842architecture, various types of code and descriptors can be generated from the
3843single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers,
3844XSD and documentation.")
3845 (license (list
3846 license:expat
3847 ;; Although this package uses only files licensed under expat,
3848 ;; other parts of the source are licensed under different
3849 ;; licenses. We include them to be inherited by other packages.
3850 license:asl2.0
3851 ;; Some files in modello-plugin-java are licensed under a
3852 ;; 5-clause BSD license.
3853 (license:non-copyleft
3854 (string-append "file:///modello-plugins/modello-plugin-java/"
3855 "src/main/java/org/codehaus/modello/plugin/"
3856 "java/javasource/JNaming.java"))))))
3857
fc620bef
JL
3858(define-public java-modello-plugins-java
3859 (package
3860 (inherit java-modello-core)
3861 (name "java-modello-plugins-java")
3862 (arguments
3863 `(#:jar-name "modello-plugins-java.jar"
3864 #:source-dir "modello-plugins/modello-plugin-java/src/main/java"
3865 #:test-dir "modello-plugins/modello-plugin-java/src/test"
3866 #:jdk ,icedtea-8
3867 #:tests? #f; requires maven-model, which depends on this package
3868 #:phases
3869 (modify-phases %standard-phases
3870 (add-before 'build 'copy-resources
3871 (lambda _
3872 (mkdir-p "build/classes")
3873 (copy-recursively "modello-plugins/modello-plugin-java/src/main/resources"
3874 "build/classes")
3875 #t)))))
3876 (inputs
3877 `(("java-modello-core" ,java-modello-core)
3878 ,@(package-inputs java-modello-core)))
3879 (synopsis "Modello Java Plugin")
3880 (description "Modello Java Plugin generates Java objects for the model.")))
3881
a0ce95ba
JL
3882(define-public java-modello-plugins-xml
3883 (package
3884 (inherit java-modello-core)
3885 (name "java-modello-plugins-xml")
3886 (arguments
3887 `(#:jar-name "modello-plugins-xml.jar"
3888 #:source-dir "modello-plugins/modello-plugin-xml/src/main/java"
3889 #:test-dir "modello-plugins/modello-plugin-xml/src/test"
3890 #:jdk ,icedtea-8
3891 #:phases
3892 (modify-phases %standard-phases
3893 (add-before 'build 'copy-resources
3894 (lambda _
3895 (mkdir-p "build/classes")
3896 (copy-recursively
3897 "modello-plugins/modello-plugin-xml/src/main/resources"
3898 "build/classes")
3899 #t))
3900 (add-before 'check 'fix-paths
3901 (lambda _
3902 (with-directory-excursion "modello-plugins/modello-plugin-xml/src/test"
3903 (substitute*
3904 "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java"
2c8ac364
MW
3905 (("src/test") "modello-plugins/modello-plugin-xml/src/test")))
3906 #t)))))
a0ce95ba
JL
3907 (inputs
3908 `(("java-modello-core" ,java-modello-core)
3909 ("java-modello-plugins-java" ,java-modello-plugins-java)
3910 ,@(package-inputs java-modello-core)))
3911 (synopsis "Modello XML Plugin")
3912 (description "Modello XML Plugin contains shared code for every plugins
3913working on XML representation of the model.")))
3914
e4708560
JL
3915(define-public java-modello-test
3916 (package
3917 (inherit java-modello-core)
3918 (name "java-modello-test")
3919 (arguments
3920 `(#:jar-name "modello-test.jar"
3921 #:source-dir "modello-test/src/main/java"
3922 #:tests? #f; no tests
3923 #:jdk ,icedtea-8))
3924 (inputs
3925 `(("java-plexus-utils" ,java-plexus-utils)
3926 ("java-plexus-compiler-api" ,java-plexus-compiler-api)
3927 ("java-plexus-compiler-javac" ,java-plexus-compiler-javac)
3928 ("java-plexus-container-default" ,java-plexus-container-default)))
3929 (synopsis "Modello test package")
3930 (description "The modello test package contains the basis to create
3931Modello generator unit-tests, including sample models and xml files to test
3932every feature for every plugin.")))
3933
36607d3b
JL
3934(define-public java-modello-plugins-xpp3
3935 (package
3936 (inherit java-modello-core)
3937 (name "java-modello-plugins-xpp3")
3938 (arguments
3939 `(#:jar-name "modello-plugins-xpp3.jar"
3940 #:source-dir "modello-plugins/modello-plugin-xpp3/src/main/java"
3941 #:test-dir "modello-plugins/modello-plugin-xpp3/src/test"
3942 ;; One of the test dependencies is maven-model which depends on this package.
3943 #:tests? #f
3944 #:jdk ,icedtea-8
3945 #:phases
3946 (modify-phases %standard-phases
3947 (add-before 'build 'copy-resources
3948 (lambda _
3949 (mkdir-p "build/classes")
3950 (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources"
3951 "build/classes")
3952 #t)))))
3953 (inputs
3954 `(("java-modello-core" ,java-modello-core)
3955 ("java-modello-plugins-java" ,java-modello-plugins-java)
3956 ("java-modello-plugins-xml" ,java-modello-plugins-xml)
3957 ,@(package-inputs java-modello-core)))
3958 (native-inputs
3959 `(("java-xmlunit" ,java-xmlunit)
3960 ("java-modello-test" ,java-modello-test)
3961 ,@(package-native-inputs java-modello-core)))
3962 (synopsis "Modello XPP3 Plugin")
3963 (description "The modello XPP3 plugin generates XML readers and writers based
3964on the XPP3 API (XML Pull Parser).")))
3965
8f8ed9aa
RW
3966(define-public java-asm
3967 (package
3968 (name "java-asm")
d0e9ded7 3969 (version "6.0")
8f8ed9aa
RW
3970 (source (origin
3971 (method url-fetch)
3972 (uri (string-append "http://download.forge.ow2.org/asm/"
3973 "asm-" version ".tar.gz"))
3974 (sha256
3975 (base32
d0e9ded7 3976 "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00"))))
8f8ed9aa 3977 (build-system ant-build-system)
d0e9ded7 3978 (propagated-inputs
9d216017
GB
3979 `(("java-aqute-bndlib" ,java-aqute-bndlib)
3980 ("java-aqute-libg" ,java-aqute-libg)))
8f8ed9aa
RW
3981 (arguments
3982 `(#:build-target "compile"
3983 ;; The tests require an old version of Janino, which no longer compiles
3984 ;; with the JDK7.
3985 #:tests? #f
d0e9ded7
GB
3986 #:make-flags
3987 (list
3988 ;; We don't need these extra ant tasks, but the build system asks us to
3989 ;; provide a path anyway.
3990 "-Dobjectweb.ant.tasks.path=dummy-path"
3991 ;; The java-aqute.bndlib JAR file will be put onto the classpath and
3992 ;; used during the build automatically by ant-build-system, but
3993 ;; java-asm's build.xml fails unless we provide something here.
3994 "-Dbiz.aQute.bnd.path=dummy-path")
8f8ed9aa
RW
3995 #:phases
3996 (modify-phases %standard-phases
3997 (add-before 'install 'build-jars
3998 (lambda* (#:key make-flags #:allow-other-keys)
3999 ;; We cannot use the "jar" target because it depends on a couple
4000 ;; of unpackaged, complicated tools.
4001 (mkdir "dist")
2c8ac364
MW
4002 (invoke "jar"
4003 "-cf" (string-append "dist/asm-" ,version ".jar")
4004 "-C" "output/build/tmp" ".")))
8f8ed9aa
RW
4005 (replace 'install
4006 (install-jars "dist")))))
4007 (native-inputs
4008 `(("java-junit" ,java-junit)))
4009 (home-page "http://asm.ow2.org/")
4010 (synopsis "Very small and fast Java bytecode manipulation framework")
4011 (description "ASM is an all purpose Java bytecode manipulation and
4012analysis framework. It can be used to modify existing classes or dynamically
4013generate classes, directly in binary form. The provided common
4014transformations and analysis algorithms allow to easily assemble custom
4015complex transformations and code analysis tools.")
4016 (license license:bsd-3)))
607fe24a 4017
bfb4004d
GB
4018(define java-asm-bootstrap
4019 (package
4020 (inherit java-asm)
4021 (name "java-asm-bootstrap")
4022 (arguments
4023 (substitute-keyword-arguments (package-arguments java-asm)
4024 ((#:tests? _) #f)))
4025 (native-inputs `())
4026 (propagated-inputs
4027 `(("java-aqute-bndlib" ,java-aqute-bndlib-bootstrap)
4028 ("java-aqute-libg" ,java-aqute-libg-bootstrap)
4029 ,@(delete `("java-aqute-bndlib" ,java-aqute-bndlib)
de99ba7e 4030 (delete `("java-aqute-libg" ,java-aqute-libg)
bfb4004d
GB
4031 (package-inputs java-asm)))))))
4032
607fe24a
RW
4033(define-public java-cglib
4034 (package
4035 (name "java-cglib")
4036 (version "3.2.4")
5c44505b
TGR
4037 (source
4038 (origin
4039 (method git-fetch)
4040 (uri (git-reference
4041 (url "https://github.com/cglib/cglib.git")
4042 (commit (string-append
4043 "RELEASE_"
4044 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
4045 version)))))
4046 (file-name (git-file-name name version))
4047 (sha256
4048 (base32 "186451jms2zfp47yd8kxd77az2cqal1my2br7klgyp8fpl4qfg8v"))))
607fe24a
RW
4049 (build-system ant-build-system)
4050 (arguments
4051 `(;; FIXME: tests fail because junit runs
4052 ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem
4053 ;; to describe a test at all.
4054 #:tests? #f
4055 #:jar-name "cglib.jar"
4056 #:phases
4057 (modify-phases %standard-phases
4058 (add-after 'unpack 'chdir
4059 (lambda _ (chdir "cglib") #t)))))
4060 (inputs
4061 `(("java-asm" ,java-asm)
4062 ("java-junit" ,java-junit)))
4063 (home-page "https://github.com/cglib/cglib/")
4064 (synopsis "Java byte code generation library")
4065 (description "The byte code generation library CGLIB is a high level API
4066to generate and transform Java byte code.")
4067 (license license:asl2.0)))
33e34bfe
RW
4068
4069(define-public java-objenesis
4070 (package
4071 (name "java-objenesis")
4072 (version "2.5.1")
4073 (source (origin
4074 (method url-fetch)
4075 (uri (string-append "https://github.com/easymock/objenesis/"
4076 "archive/" version ".tar.gz"))
4077 (file-name (string-append "objenesis-" version ".tar.gz"))
4078 (sha256
4079 (base32
4080 "1va5qz1i2wawwavhnxfzxnfgrcaflz9p1pg03irrjh4nd3rz8wh6"))))
4081 (build-system ant-build-system)
4082 (arguments
4083 `(#:jar-name "objenesis.jar"
4084 #:source-dir "main/src/"
4085 #:test-dir "main/src/test/"))
4086 (native-inputs
4087 `(("java-junit" ,java-junit)
4088 ("java-hamcrest-core" ,java-hamcrest-core)))
4089 (home-page "http://objenesis.org/")
4090 (synopsis "Bypass the constructor when creating an object")
4091 (description "Objenesis is a small Java library that serves one purpose:
4092to instantiate a new object of a particular class. It is common to see
4093restrictions in libraries stating that classes must require a default
4094constructor. Objenesis aims to overcome these restrictions by bypassing the
4095constructor on object instantiation.")
4096 (license license:asl2.0)))
ae589876
RW
4097
4098(define-public java-easymock
4099 (package
4100 (name "java-easymock")
4101 (version "3.4")
4102 (source (origin
4103 (method url-fetch)
4104 (uri (string-append "https://github.com/easymock/easymock/"
4105 "archive/easymock-" version ".tar.gz"))
4106 (sha256
4107 (base32
4108 "1yzg0kv256ndr57gpav46cyv4a1ns5sj722l50zpxk3j6sk9hnmi"))))
4109 (build-system ant-build-system)
4110 (arguments
4111 `(#:jar-name "easymock.jar"
4112 #:source-dir "core/src/main"
4113 #:test-dir "core/src/test"
4114 #:phases
4115 (modify-phases %standard-phases
4116 ;; FIXME: Android support requires the following packages to be
4117 ;; available: com.google.dexmaker.stock.ProxyBuilder
4118 (add-after 'unpack 'delete-android-support
4119 (lambda _
4120 (with-directory-excursion "core/src/main/java/org/easymock/internal"
4121 (substitute* "MocksControl.java"
4122 (("AndroidSupport.isAndroid\\(\\)") "false")
4123 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
4124 (delete-file "AndroidClassProxyFactory.java"))
4125 #t))
4126 (add-after 'unpack 'delete-broken-tests
4127 (lambda _
4128 (with-directory-excursion "core/src/test/java/org/easymock"
4129 ;; This test depends on dexmaker.
4130 (delete-file "tests2/ClassExtensionHelperTest.java")
4131
4132 ;; This is not a test.
4133 (delete-file "tests/BaseEasyMockRunnerTest.java")
4134
4135 ;; This test should be executed with a different runner...
4136 (delete-file "tests2/EasyMockAnnotationsTest.java")
4137 ;; ...but deleting it means that we also have to delete these
4138 ;; dependent files.
4139 (delete-file "tests2/EasyMockRunnerTest.java")
4140 (delete-file "tests2/EasyMockRuleTest.java")
4141
4142 ;; This test fails because the file "easymock.properties" does
4143 ;; not exist.
4144 (delete-file "tests2/EasyMockPropertiesTest.java"))
4145 #t)))))
4146 (inputs
4147 `(("java-asm" ,java-asm)
4148 ("java-cglib" ,java-cglib)
4149 ("java-objenesis" ,java-objenesis)))
4150 (native-inputs
4151 `(("java-junit" ,java-junit)
4152 ("java-hamcrest-core" ,java-hamcrest-core)))
4153 (home-page "http://easymock.org")
4154 (synopsis "Java library providing mock objects for unit tests")
4155 (description "EasyMock is a Java library that provides an easy way to use
4156mock objects in unit testing.")
4157 (license license:asl2.0)))
7aa37023 4158
f12ad6c7
RW
4159(define-public java-jmock-1
4160 (package
4161 (name "java-jmock")
4162 (version "1.2.0")
4163 (source (origin
4164 (method url-fetch)
4165 (uri (string-append "https://github.com/jmock-developers/"
4166 "jmock-library/archive/" version ".tar.gz"))
4167 (file-name (string-append "jmock-" version ".tar.gz"))
4168 (sha256
4169 (base32
4170 "0xmrlhq0fszldkbv281k9463mv496143vvmqwpxp62yzjvdkx9w0"))))
4171 (build-system ant-build-system)
4172 (arguments
4173 `(#:build-target "jars"
4174 #:test-target "run.tests"
4175 #:phases
4176 (modify-phases %standard-phases
4177 (replace 'install (install-jars "build")))))
4178 (home-page "http://www.jmock.org")
4179 (synopsis "Mock object library for test-driven development")
4180 (description "JMock is a library that supports test-driven development of
4181Java code with mock objects. Mock objects help you design and test the
4182interactions between the objects in your programs.
4183
4184The jMock library
4185
4186@itemize
4187@item makes it quick and easy to define mock objects
4188@item lets you precisely specify the interactions between
4189 your objects, reducing the brittleness of your tests
4190@item plugs into your favourite test framework
4191@item is easy to extend.
4192@end itemize\n")
4193 (license license:bsd-3)))
4194
045124ae
JL
4195(define-public java-jmock
4196 (package
4197 (inherit java-jmock-1)
4198 (name "java-jmock")
4199 (version "2.8.2")
4200 (source (origin
4201 (method url-fetch)
4202 (uri (string-append "https://github.com/jmock-developers/"
4203 "jmock-library/archive/" version ".tar.gz"))
4204 (file-name (string-append name "-" version ".tar.gz"))
4205 (sha256
4206 (base32
4207 "18650a9g8xffcsdb6w91pbswa7f40fp2sh6s3nclkclz5dbzq8f0"))))
4208 (inputs
4209 `(("java-hamcrest-all" ,java-hamcrest-all)
4210 ("java-asm" ,java-asm)
4211 ("java-bsh" ,java-bsh)
4212 ("java-junit" ,java-junit)))
4213 (native-inputs
4214 `(("cglib" ,java-cglib)))
4215 (arguments
4216 `(#:jar-name "java-jmock.jar"
4217 #:source-dir "jmock/src/main/java"
4218 #:test-dir "jmock/src/test"))))
4219
25436c6d
JL
4220(define-public java-jmock-junit4
4221 (package
4222 (inherit java-jmock)
4223 (name "java-jmock-junit4")
4224 (arguments
4225 `(#:jar-name "java-jmock-junit4.jar"
4226 #:source-dir "jmock-junit4/src/main/java"
4227 #:test-dir "jmock-junit4/src/test"))
4228 (inputs
4229 `(("java-hamcrest-all" ,java-hamcrest-all)
4230 ("java-asm" ,java-asm)
4231 ("java-bsh" ,java-bsh)
4232 ("java-jmock" ,java-jmock)
4233 ("java-jumit" ,java-junit)))))
4234
e84b899d
JL
4235(define-public java-jmock-legacy
4236 (package
4237 (inherit java-jmock)
4238 (name "java-jmock-legacy")
4239 (arguments
4240 `(#:jar-name "java-jmock-legacy.jar"
4241 #:source-dir "jmock-legacy/src/main/java"
4242 #:test-dir "jmock-legacy/src/test"
4243 #:phases
4244 (modify-phases %standard-phases
4245 (add-before 'check 'copy-tests
4246 (lambda _
4247 ;; This file is a dependancy of some tests
4248 (let ((file "org/jmock/test/acceptance/PackageProtectedType.java"))
4249 (copy-file (string-append "jmock/src/test/java/" file)
4250 (string-append "jmock-legacy/src/test/java/" file))
4251 #t))))))
4252 (inputs
4253 `(("java-hamcrest-all" ,java-hamcrest-all)
4254 ("java-objenesis" ,java-objenesis)
4255 ("java-cglib" ,java-cglib)
4256 ("java-jmock" ,java-jmock)
4257 ("java-asm" ,java-asm)
4258 ("java-bsh" ,java-bsh)
4259 ("java-junit" ,java-junit)))
4260 (native-inputs
4261 `(("java-jmock-junit4" ,java-jmock-junit4)))))
4262
439c59da
RW
4263(define-public java-hamcrest-all
4264 (package (inherit java-hamcrest-core)
4265 (name "java-hamcrest-all")
4266 (arguments
bfc007e1
RW
4267 `(#:jdk ,icedtea-8
4268 ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core)
4269 ((#:build-target _) "bigjar")
4270 ((#:phases phases)
4271 `(modify-phases ,phases
4272 ;; Some build targets override the classpath, so we need to patch
4273 ;; the build.xml to ensure that required dependencies are on the
4274 ;; classpath.
4275 (add-after 'unpack 'patch-classpath-for-integration
4276 (lambda* (#:key inputs #:allow-other-keys)
4277 (substitute* "build.xml"
4278 ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
4279 (string-join
4280 (cons line
4281 (append
4282 (find-files (assoc-ref inputs "java-junit") "\\.jar$")
4283 (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
4284 (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
2cc63e6f
RW
4285 ";"))
4286 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
4287 (string-append (assoc-ref inputs "java-hamcrest-core")
4288 "/share/java/hamcrest-core.jar")))
bfc007e1 4289 #t)))))))
439c59da
RW
4290 (inputs
4291 `(("java-junit" ,java-junit)
4292 ("java-jmock" ,java-jmock-1)
2cc63e6f
RW
4293 ;; This is necessary because of what seems to be a race condition.
4294 ;; This package would sometimes fail to build because hamcrest-core.jar
4295 ;; could not be found, even though it is built as part of this package.
4296 ;; Adding java-hamcrest-core appears to fix this problem. See
4297 ;; https://debbugs.gnu.org/31390 for more information.
4298 ("java-hamcrest-core" ,java-hamcrest-core)
439c59da 4299 ("java-easymock" ,java-easymock)
439c59da
RW
4300 ,@(package-inputs java-hamcrest-core)))))
4301
7aa37023
RW
4302(define-public java-jopt-simple
4303 (package
4304 (name "java-jopt-simple")
4305 (version "5.0.3")
4306 (source (origin
4307 (method url-fetch)
4308 (uri (string-append "http://repo1.maven.org/maven2/"
4309 "net/sf/jopt-simple/jopt-simple/"
4310 version "/jopt-simple-"
4311 version "-sources.jar"))
4312 (sha256
4313 (base32
4314 "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa"))))
4315 (build-system ant-build-system)
4316 (arguments
4317 `(#:tests? #f ; there are no tests
4318 #:jar-name "jopt-simple.jar"))
4319 (home-page "https://pholser.github.io/jopt-simple/")
4320 (synopsis "Java library for parsing command line options")
4321 (description "JOpt Simple is a Java library for parsing command line
4322options, such as those you might pass to an invocation of @code{javac}. In
4323the interest of striving for simplicity, as closely as possible JOpt Simple
4324attempts to honor the command line option syntaxes of POSIX @code{getopt} and
4325GNU @code{getopt_long}. It also aims to make option parser configuration and
4326retrieval of options and their arguments simple and expressive, without being
4327overly clever.")
4328 (license license:expat)))
840969e8
RW
4329
4330(define-public java-commons-math3
4331 (package
4332 (name "java-commons-math3")
4333 (version "3.6.1")
4334 (source (origin
4335 (method url-fetch)
4336 (uri (string-append "mirror://apache/commons/math/source/"
4337 "commons-math3-" version "-src.tar.gz"))
4338 (sha256
4339 (base32
4340 "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6"))))
4341 (build-system ant-build-system)
4342 (arguments
4343 `(#:build-target "jar"
4344 #:test-target "test"
4345 #:make-flags
4346 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
4347 (junit (assoc-ref %build-inputs "java-junit")))
4348 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4349 (string-append "-Dhamcrest.jar=" hamcrest
4350 "/share/java/hamcrest-core.jar")))
4351 #:phases
4352 (modify-phases %standard-phases
4353 ;; We want to build the jar in the build phase and run the tests
4354 ;; later in a separate phase.
4355 (add-after 'unpack 'untangle-targets
4356 (lambda _
4357 (substitute* "build.xml"
4358 (("name=\"jar\" depends=\"test\"")
4359 "name=\"jar\" depends=\"compile\""))
4360 #t))
4361 ;; There is no install target.
4362 (replace 'install
4363 (install-jars "target")))))
4364 (native-inputs
4365 `(("java-junit" ,java-junit)
4366 ("java-hamcrest-core" ,java-hamcrest-core)))
4367 (home-page "http://commons.apache.org/math/")
4368 (synopsis "Apache Commons mathematics library")
4369 (description "Commons Math is a library of lightweight, self-contained
4370mathematics and statistics components addressing the most common problems not
4371available in the Java programming language or Commons Lang.")
4372 (license license:asl2.0)))
62c9bfaa
RW
4373
4374(define-public java-jmh
4375 (package
4376 (name "java-jmh")
4377 (version "1.17.5")
4378 (source (origin
4379 (method hg-fetch)
4380 (uri (hg-reference
4381 (url "http://hg.openjdk.java.net/code-tools/jmh/")
4382 (changeset version)))
4383 (file-name (string-append name "-" version "-checkout"))
4384 (sha256
4385 (base32
4386 "1fxyxhg9famwcg1prc4cgwb5wzyxqavn3cjm5vz8605xz7x5k084"))))
4387 (build-system ant-build-system)
4388 (arguments
4389 `(#:jar-name "jmh-core.jar"
4390 #:source-dir "jmh-core/src/main"
4391 #:test-dir "jmh-core/src/test"
4392 #:phases
4393 (modify-phases %standard-phases
4394 ;; This seems to be a bug in the JDK. It may not be necessary in
4395 ;; future versions of the JDK.
4396 (add-after 'unpack 'fix-bug
4397 (lambda _
4398 (with-directory-excursion
4399 "jmh-core/src/main/java/org/openjdk/jmh/runner/options"
4400 (substitute* '("IntegerValueConverter.java"
4401 "ThreadsValueConverter.java")
4402 (("public Class<Integer> valueType")
4403 "public Class<? extends Integer> valueType")))
4404 #t)))))
4405 (inputs
4406 `(("java-jopt-simple" ,java-jopt-simple)
4407 ("java-commons-math3" ,java-commons-math3)))
4408 (native-inputs
4409 `(("java-junit" ,java-junit)
4410 ("java-hamcrest-core" ,java-hamcrest-core)))
4411 (home-page "http://openjdk.java.net/projects/code-tools/jmh/")
4412 (synopsis "Benchmark harness for the JVM")
4413 (description "JMH is a Java harness for building, running, and analysing
4414nano/micro/milli/macro benchmarks written in Java and other languages
f4548394 4415targeting the JVM.")
62c9bfaa
RW
4416 ;; GPLv2 only
4417 (license license:gpl2)))
56ebb4e9
RW
4418
4419(define-public java-commons-collections4
4420 (package
4421 (name "java-commons-collections4")
4422 (version "4.1")
4423 (source (origin
4424 (method url-fetch)
4425 (uri (string-append "mirror://apache/commons/collections/source/"
4426 "commons-collections4-" version "-src.tar.gz"))
4427 (sha256
4428 (base32
4429 "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl"))))
4430 (build-system ant-build-system)
4431 (arguments
4432 `(#:test-target "test"
4433 #:make-flags
4434 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
4435 (junit (assoc-ref %build-inputs "java-junit"))
4436 (easymock (assoc-ref %build-inputs "java-easymock")))
4437 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4438 (string-append "-Dhamcrest.jar=" hamcrest
4439 "/share/java/hamcrest-core.jar")
4440 (string-append "-Deasymock.jar=" easymock
4441 "/share/java/easymock.jar")))
4442 #:phases
4443 (modify-phases %standard-phases
4444 (replace 'install
4445 (install-jars "target")))))
4446 (native-inputs
4447 `(("java-junit" ,java-junit)
4448 ("java-hamcrest-core" ,java-hamcrest-core)
4449 ("java-easymock" ,java-easymock)))
4450 (home-page "http://commons.apache.org/collections/")
4451 (synopsis "Collections framework")
4452 (description "The Java Collections Framework is the recognised standard
4453for collection handling in Java. Commons-Collections seek to build upon the
4454JDK classes by providing new interfaces, implementations and utilities. There
4455are many features, including:
4456
4457@itemize
4458@item @code{Bag} interface for collections that have a number of copies of
4459 each object
4460@item @code{BidiMap} interface for maps that can be looked up from value to
4461 key as well and key to value
4462@item @code{MapIterator} interface to provide simple and quick iteration over
4463 maps
4464@item Transforming decorators that alter each object as it is added to the
4465 collection
4466@item Composite collections that make multiple collections look like one
4467@item Ordered maps and sets that retain the order elements are added in,
4468 including an LRU based map
4469@item Reference map that allows keys and/or values to be garbage collected
4470 under close control
4471@item Many comparator implementations
4472@item Many iterator implementations
4473@item Adapter classes from array and enumerations to collections
4474@item Utilities to test or create typical set-theory properties of collections
4475 such as union, intersection, and closure.
4476@end itemize\n")
4477 (license license:asl2.0)))
6af63e65 4478
229a9864
JL
4479(define-public java-commons-collections
4480 (package
4481 (inherit java-commons-collections4)
4482 (name "java-commons-collections")
4483 (version "3.2.2")
4484 (source (origin
4485 (method url-fetch)
4486 (uri (string-append "mirror://apache/commons/collections/source/"
4487 "commons-collections-" version "-src.tar.gz"))
4488 (sha256
4489 (base32
7c7323e4
GB
4490 "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387"))
4491 (patches
4492 (search-patches "java-commons-collections-fix-java8.patch"))))
229a9864
JL
4493 (arguments
4494 (substitute-keyword-arguments (package-arguments java-commons-collections4)
4495 ((#:phases phases)
4496 `(modify-phases ,phases
4497 ;; The manifest is required by the build procedure
4498 (add-before 'build 'add-manifest
4499 (lambda _
4500 (mkdir-p "build/conf")
4501 (call-with-output-file "build/conf/MANIFEST.MF"
4502 (lambda (file)
2c8ac364
MW
4503 (format file "Manifest-Version: 1.0\n")))
4504 #t))
229a9864
JL
4505 (replace 'install
4506 (install-jars "build"))))))))
4507
5aa2f3f4
JL
4508(define java-commons-collections-test-classes
4509 (package
4510 (inherit java-commons-collections)
4511 (arguments
4512 `(#:jar-name "commons-collections-test-classes.jar"
4513 #:source-dir "src/test"
4514 #:tests? #f))
4515 (inputs
4516 `(("collection" ,java-commons-collections)))))
4517
4518(define-public java-commons-beanutils
4519 (package
4520 (name "java-commons-beanutils")
4521 (version "1.9.3")
4522 (source (origin
4523 (method url-fetch)
4524 (uri (string-append "mirror://apache/commons/beanutils/source/"
4525 "commons-beanutils-" version "-src.tar.gz"))
4526 (sha256
4527 (base32
4528 "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk"))))
4529 (build-system ant-build-system)
4530 (arguments
4531 `(#:test-target "test"
4532 #:tests? #f
4533 #:phases
4534 (modify-phases %standard-phases
4535 (replace 'install
4536 (lambda* (#:key outputs #:allow-other-keys)
4537 (rename-file (string-append "dist/commons-beanutils-" ,version
4538 "-SNAPSHOT.jar")
4539 "commons-beanutils.jar")
4540 (install-file "commons-beanutils.jar"
4541 (string-append (assoc-ref outputs "out") "/share/java/"))
4542 #t)))))
4543 (inputs
4544 `(("logging" ,java-commons-logging-minimal)
4545 ("collections" ,java-commons-collections)))
4546 (native-inputs
4547 `(("junit" ,java-junit)
4548 ("collections-test" ,java-commons-collections-test-classes)))
4549 (home-page "http://commons.apache.org/beanutils/")
4550 (synopsis "Dynamically set or get properties in Java")
4551 (description "BeanUtils provides a simplified interface to reflection and
4552introspection to set or get dynamically determined properties through their
4553setter and getter method.")
4554 (license license:asl2.0)))
4555
6af63e65
HG
4556(define-public java-commons-io
4557 (package
4558 (name "java-commons-io")
4559 (version "2.5")
4560 (source
4561 (origin
4562 (method url-fetch)
4563 (uri (string-append "mirror://apache/commons/io/source/"
4564 "commons-io-" version "-src.tar.gz"))
4565 (sha256
4566 (base32
4567 "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3"))))
4568 (build-system ant-build-system)
4569 (outputs '("out" "doc"))
4570 (arguments
4571 `(#:test-target "test"
4572 #:make-flags
4573 (list (string-append "-Djunit.jar="
4574 (assoc-ref %build-inputs "java-junit")
4575 "/share/java/junit.jar"))
4576 #:phases
4577 (modify-phases %standard-phases
4578 (add-after 'build 'build-javadoc ant-build-javadoc)
4579 (replace 'install (install-jars "target"))
4580 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4581 (native-inputs
4582 `(("java-junit" ,java-junit)
4583 ("java-hamcrest-core" ,java-hamcrest-core)))
4584 (home-page "http://commons.apache.org/io/")
4585 (synopsis "Common useful IO related classes")
4586 (description "Commons-IO contains utility classes, stream implementations,
4587file filters and endian classes.")
4588 (license license:asl2.0)))
d631b5f3 4589
46f9022c
DM
4590(define-public java-commons-exec-1.1
4591 (package
4592 (name "java-commons-exec")
4593 (version "1.1")
4594 (source
4595 (origin
4596 (method url-fetch)
4597 (uri (string-append "mirror://apache/commons/exec/source/"
4598 "commons-exec-" version "-src.tar.gz"))
4599 (sha256
4600 (base32
4601 "025dk8xgj10lxwwwqp0hng2rn7fr4vcirxzydqzx9k4dim667alk"))))
4602 (build-system ant-build-system)
4603 (arguments
4604 `(#:test-target "test"
4605 #:make-flags
4606 (list (string-append "-Dmaven.junit.jar="
4607 (assoc-ref %build-inputs "java-junit")
4608 "/share/java/junit.jar"))
4609 #:phases
4610 (modify-phases %standard-phases
4611 (add-before 'build 'delete-network-tests
4612 (lambda _
4613 (delete-file "src/test/java/org/apache/commons/exec/DefaultExecutorTest.java")
4614 (substitute* "src/test/java/org/apache/commons/exec/TestRunner.java"
4615 (("suite\\.addTestSuite\\(DefaultExecutorTest\\.class\\);") ""))
4616 #t))
4617 ;; The "build" phase automatically tests.
4618 (delete 'check)
4619 (replace 'install (install-jars "target")))))
4620 (native-inputs
4621 `(("java-junit" ,java-junit)))
4622 (home-page "http://commons.apache.org/proper/commons-exec/")
4623 (synopsis "Common program execution related classes")
4624 (description "Commons-Exec simplifies executing external processes.")
4625 (license license:asl2.0)))
4626
4627(define-public java-commons-exec
4628 (package
4629 (inherit java-commons-exec-1.1)
4630 (version "1.3")
4631 (source
4632 (origin
4633 (method url-fetch)
4634 (uri (string-append "mirror://apache/commons/exec/source/"
4635 "commons-exec-" version "-src.tar.gz"))
4636 (sha256
4637 (base32
4638 "17yb4h6f8l49c5iyyvda4z2nmw0bxrx857nrwmsr7mmpb7x441yv"))))
4639 (arguments
4640 `(#:test-target "test"
4641 #:make-flags
4642 (list (string-append "-Dmaven.junit.jar="
4643 (assoc-ref %build-inputs "java-junit")
4644 "/share/java/junit.jar")
4645 "-Dmaven.compiler.source=1.7"
4646 "-Dmaven.compiler.target=1.7")
4647 #:phases
4648 (modify-phases %standard-phases
4649 (add-before 'build 'delete-network-tests
4650 (lambda* (#:key inputs #:allow-other-keys)
4651 ;; This test hangs indefinitely.
4652 (delete-file "src/test/java/org/apache/commons/exec/issues/Exec60Test.java")
4653 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec41Test.java"
4654 (("ping -c 10 127.0.0.1") "sleep 10"))
4655 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec49Test.java"
4656 (("/bin/ls") "ls"))
4657 (call-with-output-file "src/test/scripts/ping.sh"
4658 (lambda (port)
4659 (format port "#!~a/bin/sh\nsleep $1\n"
4660 (assoc-ref inputs "bash"))))
4661 #t))
4662 ;; The "build" phase automatically tests.
4663 (delete 'check)
4664 (replace 'install (install-jars "target")))))
4665 (native-inputs
4666 `(("java-junit" ,java-junit)
4667 ("java-hamcrest-core" ,java-hamcrest-core)))))
4668
d631b5f3
HG
4669(define-public java-commons-lang
4670 (package
4671 (name "java-commons-lang")
4672 (version "2.6")
4673 (source
4674 (origin
4675 (method url-fetch)
4676 (uri (string-append "mirror://apache/commons/lang/source/"
4677 "commons-lang-" version "-src.tar.gz"))
4678 (sha256
4679 (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5"))))
4680 (build-system ant-build-system)
4681 (outputs '("out" "doc"))
4682 (arguments
4683 `(#:test-target "test"
e5a96113 4684 #:test-exclude (list "**/Abstract*.java" "**/Random*.java")
d631b5f3
HG
4685 #:phases
4686 (modify-phases %standard-phases
4687 (add-after 'build 'build-javadoc ant-build-javadoc)
4688 (add-before 'check 'disable-failing-test
4689 (lambda _
4690 ;; Disable a failing test
4691 (substitute* "src/test/java/org/apache/commons/lang/\
4692time/FastDateFormatTest.java"
4693 (("public void testFormat\\(\\)")
4694 "public void disabled_testFormat()"))
4695 #t))
4696 (replace 'install (install-jars "target"))
4697 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4698 (native-inputs
4699 `(("java-junit" ,java-junit)))
4700 (home-page "http://commons.apache.org/lang/")
4701 (synopsis "Extension of the java.lang package")
4702 (description "The Commons Lang components contains a set of Java classes
4703that provide helper methods for standard Java classes, especially those found
4704in the @code{java.lang} package in the Sun JDK. The following classes are
4705included:
4706
4707@itemize
4708@item StringUtils - Helper for @code{java.lang.String}.
4709@item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets
4710 of characters such as @code{[a-z]} and @code{[abcdez]}.
4711@item RandomStringUtils - Helper for creating randomised strings.
4712@item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
4713@item NumberRange - A range of numbers with an upper and lower bound.
4714@item ObjectUtils - Helper for @code{java.lang.Object}.
4715@item SerializationUtils - Helper for serializing objects.
4716@item SystemUtils - Utility class defining the Java system properties.
4717@item NestedException package - A sub-package for the creation of nested
4718 exceptions.
4719@item Enum package - A sub-package for the creation of enumerated types.
4720@item Builder package - A sub-package for the creation of @code{equals},
4721 @code{hashCode}, @code{compareTo} and @code{toString} methods.
4722@end itemize\n")
4723 (license license:asl2.0)))
82e18864
HG
4724
4725(define-public java-commons-lang3
4726 (package
4727 (name "java-commons-lang3")
4728 (version "3.4")
4729 (source
4730 (origin
4731 (method url-fetch)
4732 (uri (string-append "mirror://apache/commons/lang/source/"
4733 "commons-lang3-" version "-src.tar.gz"))
4734 (sha256
4735 (base32 "0xpshb9spjhplq5a7mr0y1bgfw8190ik4xj8f569xidfcki1d6kg"))))
4736 (build-system ant-build-system)
4737 (outputs '("out" "doc"))
4738 (arguments
4739 `(#:test-target "test"
4740 #:make-flags
4741 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-all"))
4742 (junit (assoc-ref %build-inputs "java-junit"))
4743 (easymock (assoc-ref %build-inputs "java-easymock"))
4744 (io (assoc-ref %build-inputs "java-commons-io")))
4745 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4746 (string-append "-Dhamcrest.jar=" hamcrest
4747 "/share/java/hamcrest-all.jar")
4748 (string-append "-Dcommons-io.jar=" io
4749 "/share/java/commons-io-"
4750 ,(package-version java-commons-io)
4751 "-SNAPSHOT.jar")
4752 (string-append "-Deasymock.jar=" easymock
4753 "/share/java/easymock.jar")))
4754 #:phases
4755 (modify-phases %standard-phases
4756 (add-after 'build 'build-javadoc ant-build-javadoc)
4757 (replace 'install (install-jars "target"))
4758 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4759 (native-inputs
4760 `(("java-junit" ,java-junit)
4761 ("java-commons-io" ,java-commons-io)
4762 ("java-hamcrest-all" ,java-hamcrest-all)
4763 ("java-easymock" ,java-easymock)))
4764 (home-page "http://commons.apache.org/lang/")
4765 (synopsis "Extension of the java.lang package")
4766 (description "The Commons Lang components contains a set of Java classes
4767that provide helper methods for standard Java classes, especially those found
4768in the @code{java.lang} package. The following classes are included:
4769
4770@itemize
4771@item StringUtils - Helper for @code{java.lang.String}.
4772@item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of
4773 characters such as @code{[a-z]} and @code{[abcdez]}.
4774@item RandomStringUtils - Helper for creating randomised strings.
4775@item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
4776@item NumberRange - A range of numbers with an upper and lower bound.
4777@item ObjectUtils - Helper for @code{java.lang.Object}.
4778@item SerializationUtils - Helper for serializing objects.
4779@item SystemUtils - Utility class defining the Java system properties.
4780@item NestedException package - A sub-package for the creation of nested
4781 exceptions.
4782@item Enum package - A sub-package for the creation of enumerated types.
4783@item Builder package - A sub-package for the creation of @code{equals},
4784 @code{hashCode}, @code{compareTo} and @code{toString} methods.
4785@end itemize\n")
4786 (license license:asl2.0)))
1c188f4e 4787
afb13a10
JL
4788(define-public java-commons-bsf
4789 (package
4790 (name "java-commons-bsf")
4791 (version "2.4.0")
4792 (source (origin
4793 (method url-fetch)
4794 (uri (string-append "mirror://apache/commons/bsf/source/bsf-src-"
4795 version ".tar.gz"))
4796 (sha256
4797 (base32
4798 "1sbamr8jl32p1jgf59nw0b2w9qivyg145954hm6ly54cfgsqrdas"))
4799 (modules '((guix build utils)))
4800 (snippet
4801 '(begin
4802 (for-each delete-file
4803 (find-files "." "\\.jar$"))
4804 #t))))
4805 (build-system ant-build-system)
4806 (arguments
4807 `(#:build-target "jar"
4808 #:tests? #f; No test file
4809 #:modules ((guix build ant-build-system)
4810 (guix build utils)
4811 (guix build java-utils)
4812 (sxml simple))
4813 #:phases
4814 (modify-phases %standard-phases
4815 (add-before 'build 'create-properties
4816 (lambda _
4817 ;; This file is missing from the distribution
4818 (call-with-output-file "build-properties.xml"
4819 (lambda (port)
4820 (sxml->xml
4821 `(project (@ (basedir ".") (name "build-properties") (default ""))
4822 (property (@ (name "project.name") (value "bsf")))
4823 (property (@ (name "source.level") (value "1.5")))
4824 (property (@ (name "build.lib") (value "build/jar")))
4825 (property (@ (name "src.dir") (value "src")))
4826 (property (@ (name "tests.dir") (value "src/org/apache/bsf/test")))
4827 (property (@ (name "build.tests") (value "build/test-classes")))
4828 (property (@ (name "build.dest") (value "build/classes"))))
2c8ac364
MW
4829 port)))
4830 #t))
afb13a10
JL
4831 (replace 'install (install-jars "build")))))
4832 (native-inputs
4833 `(("java-junit" ,java-junit)))
4834 (inputs
4835 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
4836 (home-page "https://commons.apache.org/proper/commons-bsf")
4837 (synopsis "Bean Scripting Framework")
4838 (description "The Bean Scripting Framework (BSF) is a set of Java classes
4839which provides scripting language support within Java applications, and access
4840to Java objects and methods from scripting languages. BSF allows one to write
4841JSPs in languages other than Java while providing access to the Java class
4842library. In addition, BSF permits any Java application to be implemented in
4843part (or dynamically extended) by a language that is embedded within it. This
4844is achieved by providing an API that permits calling scripting language engines
4845from within Java, as well as an object registry that exposes Java objects to
4846these scripting language engines.")
4847 (license license:asl2.0)))
4848
66006fe5
JL
4849(define-public java-commons-jxpath
4850 (package
4851 (name "java-commons-jxpath")
4852 (version "1.3")
4853 (source (origin
4854 (method url-fetch)
4855 (uri (string-append "mirror://apache/commons/jxpath/source/"
4856 "commons-jxpath-" version "-src.tar.gz"))
4857 (sha256
4858 (base32
4859 "1rpgg31ayn9fwr4bfi2i1ij0npcg79ad2fv0w9hacvawsyc42cfs"))))
4860 (build-system ant-build-system)
4861 (arguments
4862 `(#:jar-name "commons-jxpath.jar"
4863 ;; tests require more dependencies, including mockrunner which depends on old software
4864 #:tests? #f
4865 #:source-dir "src/java"))
4866 (inputs
10eddaca 4867 `(("servlet" ,java-classpathx-servletapi)
66006fe5
JL
4868 ("java-jdom" ,java-jdom)
4869 ("java-commons-beanutils" ,java-commons-beanutils)))
4870 (native-inputs
4871 `(("java-junit" ,java-junit)))
4872 (home-page "http://commons.apache.org/jxpath/")
4873 (synopsis "Simple interpreter of an expression language called XPath.")
4874 (description "The org.apache.commons.jxpath package defines a simple
4875interpreter of an expression language called XPath. JXPath applies XPath
4876expressions to graphs of objects of all kinds: JavaBeans, Maps, Servlet
4877contexts, DOM etc, including mixtures thereof.")
4878 (license license:asl2.0)))
4879
a1a5ef20
JL
4880(define-public java-jsr250
4881 (package
4882 (name "java-jsr250")
4883 (version "1.3")
4884 (source (origin
4885 (method url-fetch)
4886 (uri (string-append "https://repo1.maven.org/maven2/"
4887 "javax/annotation/javax.annotation-api/"
4888 version "/javax.annotation-api-"
4889 version "-sources.jar"))
4890 (sha256
4891 (base32
4892 "08clh8n4n9wfglf75qsqfjs6yf79f7x6hqx38cn856pksszv50kz"))))
4893 (build-system ant-build-system)
4894 (arguments
4895 `(#:tests? #f ; no tests included
4896 #:jdk ,icedtea-8
4897 #:jar-name "jsr250.jar"))
4898 (home-page "https://jcp.org/en/jsr/detail?id=250")
4899 (synopsis "Security-related annotations")
4900 (description "This package provides annotations for security. It provides
4901packages in the @code{javax.annotation} and @code{javax.annotation.security}
4902namespaces.")
4903 ;; either cddl or gpl2 only, with classpath exception
4904 (license (list license:cddl1.0
4905 license:gpl2))))
4906
0d4a0d60
RW
4907(define-public java-jsr305
4908 (package
4909 (name "java-jsr305")
4910 (version "3.0.1")
4911 (source (origin
4912 (method url-fetch)
4913 (uri (string-append "https://repo1.maven.org/maven2/"
4914 "com/google/code/findbugs/"
4915 "jsr305/" version "/jsr305-"
4916 version "-sources.jar"))
4917 (sha256
4918 (base32
4919 "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n"))))
4920 (build-system ant-build-system)
4921 (arguments
4922 `(#:tests? #f ; no tests included
4923 #:jar-name "jsr305.jar"))
4924 (home-page "http://findbugs.sourceforge.net/")
4925 (synopsis "Annotations for the static analyzer called findbugs")
4926 (description "This package provides annotations for the findbugs package.
4927It provides packages in the @code{javax.annotations} namespace.")
4928 (license license:asl2.0)))
4929
4f3e47ea
RW
4930(define-public java-guava
4931 (package
4932 (name "java-guava")
4933 ;; This is the last release of Guava that can be built with Java 7.
4934 (version "20.0")
4935 (source (origin
4936 (method url-fetch)
4937 (uri (string-append "https://github.com/google/guava/"
4938 "releases/download/v" version
4939 "/guava-" version "-sources.jar"))
4940 (sha256
4941 (base32
4942 "1gawrs5gi6j5hcfxdgpnfli75vb9pfi4sn09pnc8xacr669yajwr"))))
4943 (build-system ant-build-system)
4944 (arguments
4945 `(#:tests? #f ; no tests included
4946 #:jar-name "guava.jar"
4947 #:phases
4948 (modify-phases %standard-phases
4949 (add-after 'unpack 'trim-sources
4950 (lambda _
4951 (with-directory-excursion "src/com/google/common"
4952 ;; Remove annotations to avoid extra dependencies:
4953 ;; * "j2objc" annotations are used when converting Java to
4954 ;; Objective C;
4955 ;; * "errorprone" annotations catch common Java mistakes at
4956 ;; compile time;
4957 ;; * "IgnoreJRERequirement" is used for Android.
4958 (substitute* (find-files "." "\\.java$")
4959 (("import com.google.j2objc.*") "")
4960 (("import com.google.errorprone.annotation.*") "")
4961 (("import org.codehaus.mojo.animal_sniffer.*") "")
4962 (("@CanIgnoreReturnValue") "")
4963 (("@LazyInit") "")
4964 (("@WeakOuter") "")
4965 (("@RetainedWith") "")
4966 (("@Weak") "")
4967 (("@ForOverride") "")
4968 (("@J2ObjCIncompatible") "")
4969 (("@IgnoreJRERequirement") "")))
4970 #t)))))
4971 (inputs
4972 `(("java-jsr305" ,java-jsr305)))
4973 (home-page "https://github.com/google/guava")
4974 (synopsis "Google core libraries for Java")
4975 (description "Guava is a set of core libraries that includes new
4976collection types (such as multimap and multiset), immutable collections, a
4977graph library, functional types, an in-memory cache, and APIs/utilities for
4978concurrency, I/O, hashing, primitives, reflection, string processing, and much
4979more!")
4980 (license license:asl2.0)))
4981
af8f8281
RW
4982;; The java-commons-logging package provides adapters to many different
4983;; logging frameworks. To avoid an excessive dependency graph we try to build
4984;; it with only a minimal set of adapters.
4985(define-public java-commons-logging-minimal
4986 (package
4987 (name "java-commons-logging-minimal")
4988 (version "1.2")
4989 (source (origin
4990 (method url-fetch)
4991 (uri (string-append "mirror://apache/commons/logging/source/"
4992 "commons-logging-" version "-src.tar.gz"))
4993 (sha256
4994 (base32
4995 "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9"))))
4996 (build-system ant-build-system)
4997 (arguments
4998 `(#:tests? #f ; avoid dependency on logging frameworks
4999 #:jar-name "commons-logging-minimal.jar"
5000 #:phases
5001 (modify-phases %standard-phases
5002 (add-after 'unpack 'delete-adapters-and-tests
5003 (lambda _
5004 ;; Delete all adapters except for NoOpLog, SimpleLog, and
5005 ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl
5006 ;; is used by applications; SimpleLog is the only actually usable
5007 ;; implementation that does not depend on another logging
5008 ;; framework.
5009 (for-each
5010 (lambda (file)
5011 (delete-file (string-append
5012 "src/main/java/org/apache/commons/logging/impl/" file)))
5013 (list "Jdk13LumberjackLogger.java"
5014 "WeakHashtable.java"
5015 "Log4JLogger.java"
5016 "ServletContextCleaner.java"
5017 "Jdk14Logger.java"
5018 "AvalonLogger.java"
5019 "LogKitLogger.java"))
5020 (delete-file-recursively "src/test")
5021 #t)))))
5022 (home-page "http://commons.apache.org/logging/")
5023 (synopsis "Common API for logging implementations")
5024 (description "The Logging package is a thin bridge between different
5025logging implementations. A library that uses the commons-logging API can be
5026used with any logging implementation at runtime.")
5027 (license license:asl2.0)))
5028
90e65abe
RW
5029;; This is the last release of the 1.x series.
5030(define-public java-mockito-1
5031 (package
5032 (name "java-mockito")
5033 (version "1.10.19")
5034 (source (origin
5035 (method url-fetch)
5036 (uri (string-append "http://repo1.maven.org/maven2/"
5037 "org/mockito/mockito-core/" version
5038 "/mockito-core-" version "-sources.jar"))
5039 (sha256
5040 (base32
5041 "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc"))))
5042 (build-system ant-build-system)
5043 (arguments
5044 `(#:jar-name "mockito.jar"
5045 #:tests? #f ; no tests included
5046 ;; FIXME: patch-and-repack does not support jars, so we have to apply
5047 ;; patches in build phases.
5048 #:phases
5049 (modify-phases %standard-phases
5050 ;; Mockito was developed against a different version of hamcrest,
5051 ;; which does not require matcher implementations to provide an
5052 ;; implementation of the "describeMismatch" method. We add this
5053 ;; simple definition to pass the build with our version of hamcrest.
5054 (add-after 'unpack 'fix-hamcrest-build-error
5055 (lambda _
5056 (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java"
5057 (("public Matcher getActualMatcher\\(\\) .*" line)
5058 (string-append "
5059 public void describeMismatch(Object item, Description description) {
5060 actualMatcher.describeMismatch(item, description);
5061 }"
5062 line)))
5063 #t))
5064 ;; Mockito bundles cglib. We have a cglib package, so let's use
5065 ;; that instead.
5066 (add-after 'unpack 'use-system-libraries
5067 (lambda _
5068 (with-directory-excursion "src/org/mockito/internal/creation/cglib"
5069 (substitute* '("CGLIBHacker.java"
5070 "CglibMockMaker.java"
5071 "ClassImposterizer.java"
5072 "DelegatingMockitoMethodProxy.java"
5073 "MethodInterceptorFilter.java"
5074 "MockitoNamingPolicy.java"
5075 "SerializableMockitoMethodProxy.java"
5076 "SerializableNoOp.java")
5077 (("import org.mockito.cglib") "import net.sf.cglib")))
5078 #t)))))
5079 (inputs
5080 `(("java-junit" ,java-junit)
5081 ("java-objenesis" ,java-objenesis)
5082 ("java-cglib" ,java-cglib)
5083 ("java-hamcrest-core" ,java-hamcrest-core)))
5084 (home-page "http://mockito.org")
5085 (synopsis "Mockito is a mock library for Java")
5086 (description "Mockito is a mocking library for Java which lets you write
5087tests with a clean and simple API. It generates mocks using reflection, and
5088it records all mock invocations, including methods arguments.")
5089 (license license:asl2.0)))
5090
4f4d2e47
RW
5091(define-public java-httpcomponents-httpcore
5092 (package
5093 (name "java-httpcomponents-httpcore")
5094 (version "4.4.6")
5095 (source (origin
5096 (method url-fetch)
5097 (uri (string-append "mirror://apache//httpcomponents/httpcore/"
5098 "source/httpcomponents-core-"
5099 version "-src.tar.gz"))
5100 (sha256
5101 (base32
5102 "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy"))))
5103 (build-system ant-build-system)
5104 (arguments
5105 `(#:jar-name "httpcomponents-httpcore.jar"
5106 #:phases
5107 (modify-phases %standard-phases
5108 (add-after 'unpack 'chdir
5109 (lambda _ (chdir "httpcore") #t)))))
5110 (inputs
5111 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
5112 ("java-commons-lang3" ,java-commons-lang3)))
5113 (native-inputs
5114 `(("java-junit" ,java-junit)
5115 ("java-mockito" ,java-mockito-1)))
5116 (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html")
5117 (synopsis "Low level HTTP transport components")
5118 (description "HttpCore is a set of low level HTTP transport components
5119that can be used to build custom client and server side HTTP services with a
5120minimal footprint. HttpCore supports two I/O models: blocking I/O model based
5121on the classic Java I/O and non-blocking, event driven I/O model based on Java
5122NIO.
5123
5124This package provides the blocking I/O model library.")
5125 (license license:asl2.0)))
5126
3a068b43
RW
5127(define-public java-httpcomponents-httpcore-nio
5128 (package (inherit java-httpcomponents-httpcore)
5129 (name "java-httpcomponents-httpcore-nio")
5130 (arguments
5131 `(#:jar-name "httpcomponents-httpcore-nio.jar"
5132 #:phases
5133 (modify-phases %standard-phases
5134 (add-after 'unpack 'chdir
5135 (lambda _ (chdir "httpcore-nio") #t)))))
5136 (inputs
5137 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5138 ("java-hamcrest-core" ,java-hamcrest-core)
5139 ,@(package-inputs java-httpcomponents-httpcore)))
5140 (description "HttpCore is a set of low level HTTP transport components
5141that can be used to build custom client and server side HTTP services with a
5142minimal footprint. HttpCore supports two I/O models: blocking I/O model based
5143on the classic Java I/O and non-blocking, event driven I/O model based on Java
5144NIO.
5145
5146This package provides the non-blocking I/O model library based on Java
5147NIO.")))
5148
e1dd78f6
RW
5149(define-public java-httpcomponents-httpcore-ab
5150 (package (inherit java-httpcomponents-httpcore)
5151 (name "java-httpcomponents-httpcore-ab")
5152 (arguments
5153 `(#:jar-name "httpcomponents-httpcore-ab.jar"
5154 #:phases
5155 (modify-phases %standard-phases
5156 (add-after 'unpack 'chdir
5157 (lambda _ (chdir "httpcore-ab") #t)))))
5158 (inputs
5159 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5160 ("java-commons-cli" ,java-commons-cli)
5161 ("java-hamcrest-core" ,java-hamcrest-core)
5162 ,@(package-inputs java-httpcomponents-httpcore)))
5163 (synopsis "Apache HttpCore benchmarking tool")
5164 (description "This package provides the HttpCore benchmarking tool. It is
5165an Apache AB clone based on HttpCore.")))
5166
14a671d8
RW
5167(define-public java-httpcomponents-httpclient
5168 (package
5169 (name "java-httpcomponents-httpclient")
5170 (version "4.5.3")
5171 (source (origin
5172 (method url-fetch)
5173 (uri (string-append "mirror://apache/httpcomponents/httpclient/"
5174 "source/httpcomponents-client-"
5175 version "-src.tar.gz"))
5176 (sha256
5177 (base32
5178 "1428399s7qy3cim5wc6f3ks4gl9nf9vkjpfmnlap3jflif7g2pj1"))))
5179 (build-system ant-build-system)
5180 (arguments
5181 `(#:jar-name "httpcomponents-httpclient.jar"
5182 #:phases
5183 (modify-phases %standard-phases
5184 (add-after 'unpack 'chdir
5185 (lambda _ (chdir "httpclient") #t)))))
5186 (inputs
5187 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
5188 ("java-commons-codec" ,java-commons-codec)
5189 ("java-hamcrest-core" ,java-hamcrest-core)
5190 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5191 ("java-mockito" ,java-mockito-1)
5192 ("java-junit" ,java-junit)))
5193 (home-page "https://hc.apache.org/httpcomponents-client-ga/")
5194 (synopsis "HTTP client library for Java")
5195 (description "Although the @code{java.net} package provides basic
5196functionality for accessing resources via HTTP, it doesn't provide the full
5197flexibility or functionality needed by many applications. @code{HttpClient}
5198seeks to fill this void by providing an efficient, up-to-date, and
5199feature-rich package implementing the client side of the most recent HTTP
5200standards and recommendations.")
5201 (license license:asl2.0)))
5202
cbce5de2
RW
5203(define-public java-httpcomponents-httpmime
5204 (package (inherit java-httpcomponents-httpclient)
5205 (name "java-httpcomponents-httpmime")
5206 (arguments
5207 `(#:jar-name "httpcomponents-httpmime.jar"
5208 #:phases
5209 (modify-phases %standard-phases
5210 (add-after 'unpack 'chdir
5211 (lambda _ (chdir "httpmime") #t)))))
5212 (inputs
5213 `(("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient)
5214 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5215 ("java-junit" ,java-junit)
5216 ("java-hamcrest-core" ,java-hamcrest-core)))))
5217
4b34c21f
RW
5218(define-public java-commons-net
5219 (package
5220 (name "java-commons-net")
5221 (version "3.6")
5222 (source (origin
5223 (method url-fetch)
5224 (uri (string-append "mirror://apache/commons/net/source/"
5225 "commons-net-" version "-src.tar.gz"))
5226 (sha256
5227 (base32
5228 "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr"))))
5229 (build-system ant-build-system)
5230 (arguments
5231 `(;; FIXME: MainTest.java tries to read "examples.properties" (which
5232 ;; should be "resources/examples/examples.properties"), but gets "null"
5233 ;; instead.
5234 #:tests? #f
5235 #:jar-name "commons-net.jar"))
5236 (native-inputs
5237 `(("java-junit" ,java-junit)
5238 ("java-hamcrest-core" ,java-hamcrest-core)))
5239 (home-page "http://commons.apache.org/net/")
5240 (synopsis "Client library for many basic Internet protocols")
5241 (description "The Apache Commons Net library implements the client side of
5242many basic Internet protocols. The purpose of the library is to provide
5243fundamental protocol access, not higher-level abstractions.")
5244 (license license:asl2.0)))
5245
808cb58f
RW
5246(define-public java-jsch
5247 (package
5248 (name "java-jsch")
1c8ba10a 5249 (version "0.1.55")
808cb58f
RW
5250 (source (origin
5251 (method url-fetch)
5252 (uri (string-append "mirror://sourceforge/jsch/jsch/"
5253 version "/jsch-" version ".zip"))
5254 (sha256
5255 (base32
1c8ba10a 5256 "1lxyjwvmwa723wcf3bqn816hkvc03vz4xhbsi7bvfhrz2rpgcfq6"))))
808cb58f
RW
5257 (build-system ant-build-system)
5258 (arguments
5259 `(#:build-target "dist"
1c8ba10a 5260 #:tests? #f ; no tests included
808cb58f
RW
5261 #:phases
5262 (modify-phases %standard-phases
5263 (replace 'install (install-jars "dist")))))
5264 (native-inputs
5265 `(("unzip" ,unzip)))
5266 (home-page "http://www.jcraft.com/jsch/")
5267 (synopsis "Pure Java implementation of SSH2")
5268 (description "JSch is a pure Java implementation of SSH2. JSch allows you
5269to connect to an SSH server and use port forwarding, X11 forwarding, file
5270transfer, etc., and you can integrate its functionality into your own Java
5271programs.")
5272 (license license:bsd-3)))
5273
a6244698
RW
5274(define-public java-commons-compress
5275 (package
5276 (name "java-commons-compress")
5277 (version "1.13")
5278 (source (origin
5279 (method url-fetch)
5280 (uri (string-append "mirror://apache/commons/compress/source/"
5281 "commons-compress-" version "-src.tar.gz"))
5282 (sha256
5283 (base32
5284 "1vjqvavrn0babffn1kciz6v52ibwq2vwhzlb95hazis3lgllnxc8"))))
5285 (build-system ant-build-system)
5286 (arguments
5287 `(#:jar-name "commons-compress.jar"
5288 #:phases
5289 (modify-phases %standard-phases
5290 (add-after 'unpack 'delete-bad-tests
5291 (lambda _
5292 (with-directory-excursion "src/test/java/org/apache/commons/compress/"
5293 ;; FIXME: These tests really should not fail. Maybe they are
5294 ;; indicative of problems with our Java packaging work.
5295
5296 ;; This test fails with a null pointer exception.
5297 (delete-file "archivers/sevenz/SevenZOutputFileTest.java")
5298 ;; This test fails to open test resources.
5299 (delete-file "archivers/zip/ExplodeSupportTest.java")
5300
5301 ;; FIXME: This test adds a dependency on powermock, which is hard to
5302 ;; package at this point.
5303 ;; https://github.com/powermock/powermock
5304 (delete-file "archivers/sevenz/SevenZNativeHeapTest.java"))
5305 #t)))))
5306 (inputs
5307 `(("java-junit" ,java-junit)
5308 ("java-hamcrest-core" ,java-hamcrest-core)
5309 ("java-mockito" ,java-mockito-1)
5310 ("java-xz" ,java-xz)))
5311 (home-page "https://commons.apache.org/proper/commons-compress/")
5312 (synopsis "Java library for working with compressed files")
5313 (description "The Apache Commons Compress library defines an API for
5314working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ,
5315Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.")
5316 (license license:asl2.0)))
5317
51263ff5
JL
5318(define-public java-commons-csv
5319 (package
5320 (name "java-commons-csv")
5321 (version "1.4")
5322 (source (origin
5323 (method url-fetch)
5324 (uri (string-append "mirror://apache/commons/csv/source/"
5325 "commons-csv-" version "-src.tar.gz"))
5326 (sha256
5327 (base32
5328 "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij"))))
5329 (build-system ant-build-system)
5330 (arguments
5331 `(#:jar-name "commons-csv.jar"
5332 #:source-dir "src/main/java"
5333 #:tests? #f)); FIXME: requires java-h2
5334 (inputs
5335 `(("java-hamcrest-core" ,java-hamcrest-core)
5336 ("java-commons-io" ,java-commons-io)
5337 ("java-commons-lang3" ,java-commons-lang3)
5338 ("junit" ,java-junit)))
5339 (home-page "https://commons.apache.org/proper/commons-csv/")
5340 (synopsis "Read and write CSV documents")
5341 (description "Commons CSV reads and writes files in variations of the Comma
5342Separated Value (CSV) format. The most common CSV formats are predefined in the
5343CSVFormat class:
5344
5345@itemize
5346@item Microsoft Excel
5347@item Informix UNLOAD
5348@item Informix UNLOAD CSV
5349@item MySQL
5350@item RFC 4180
5351@item TDF
5352@end itemize
5353
5354Custom formats can be created using a fluent style API.")
5355 (license license:asl2.0)))
5356
6ee6d0b5
RW
5357(define-public java-osgi-annotation
5358 (package
5359 (name "java-osgi-annotation")
5360 (version "6.0.0")
5361 (source (origin
5362 (method url-fetch)
5363 (uri (string-append "https://repo1.maven.org/maven2/"
5364 "org/osgi/org.osgi.annotation/" version "/"
5365 "org.osgi.annotation-" version "-sources.jar"))
5366 (sha256
5367 (base32
5368 "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w"))))
5369 (build-system ant-build-system)
5370 (arguments
5371 `(#:tests? #f ; no tests
5372 #:jar-name "osgi-annotation.jar"))
c353d014 5373 (home-page "https://www.osgi.org")
6ee6d0b5
RW
5374 (synopsis "Annotation module of OSGi framework")
5375 (description
5376 "OSGi, for Open Services Gateway initiative framework, is a module system
5377and service platform for the Java programming language. This package contains
5378the OSGi annotation module, providing additional services to help dynamic
5379components.")
5380 (license license:asl2.0)))
5381
37e2e5d4
RW
5382(define-public java-osgi-core
5383 (package
5384 (name "java-osgi-core")
5385 (version "6.0.0")
5386 (source (origin
5387 (method url-fetch)
5388 (uri (string-append "https://repo1.maven.org/maven2/"
5389 "org/osgi/org.osgi.core/" version "/"
5390 "org.osgi.core-" version "-sources.jar"))
5391 (sha256
5392 (base32
5393 "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv"))))
5394 (build-system ant-build-system)
5395 (arguments
5396 `(#:tests? #f ; no tests
5397 #:jar-name "osgi-core.jar"))
5398 (inputs
5399 `(("java-osgi-annotation" ,java-osgi-annotation)))
c353d014 5400 (home-page "https://www.osgi.org")
37e2e5d4
RW
5401 (synopsis "Core module of OSGi framework")
5402 (description
5403 "OSGi, for Open Services Gateway initiative framework, is a module system
5404and service platform for the Java programming language. This package contains
5405the OSGi Core module.")
5406 (license license:asl2.0)))
5407
8af92c8f
RW
5408(define-public java-osgi-service-event
5409 (package
5410 (name "java-osgi-service-event")
5411 (version "1.3.1")
5412 (source (origin
5413 (method url-fetch)
5414 (uri (string-append "https://repo1.maven.org/maven2/"
5415 "org/osgi/org.osgi.service.event/"
5416 version "/org.osgi.service.event-"
5417 version "-sources.jar"))
5418 (sha256
5419 (base32
5420 "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm"))))
5421 (build-system ant-build-system)
5422 (arguments
5423 `(#:tests? #f ; no tests
5424 #:jar-name "osgi-service-event.jar"))
5425 (inputs
5426 `(("java-osgi-annotation" ,java-osgi-annotation)
5427 ("java-osgi-core" ,java-osgi-core)))
c353d014 5428 (home-page "https://www.osgi.org")
8af92c8f
RW
5429 (synopsis "OSGi service event module")
5430 (description
5431 "OSGi, for Open Services Gateway initiative framework, is a module system
5432and service platform for the Java programming language. This package contains
5433the OSGi @code{org.osgi.service.event} module.")
5434 (license license:asl2.0)))
5435
674e93a0
RW
5436(define-public java-eclipse-osgi
5437 (package
5438 (name "java-eclipse-osgi")
5439 (version "3.11.3")
5440 (source (origin
5441 (method url-fetch)
5442 (uri (string-append "https://repo1.maven.org/maven2/"
5443 "org/eclipse/platform/org.eclipse.osgi/"
5444 version "/org.eclipse.osgi-"
5445 version "-sources.jar"))
5446 (sha256
5447 (base32
5448 "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b"))))
5449 (build-system ant-build-system)
5450 (arguments
5451 `(#:tests? #f ; no tests included
5452 #:jar-name "eclipse-equinox-osgi.jar"))
5453 (inputs
5454 `(("java-osgi-annotation" ,java-osgi-annotation)))
5455 (home-page "http://www.eclipse.org/equinox/")
5456 (synopsis "Eclipse Equinox OSGi framework")
5457 (description "This package provides an implementation of the OSGi Core
5458specification.")
5459 (license license:epl1.0)))
5460
81b55b1e
RW
5461(define-public java-eclipse-equinox-common
5462 (package
5463 (name "java-eclipse-equinox-common")
e40e3792 5464 (version "3.10.200")
81b55b1e
RW
5465 (source (origin
5466 (method url-fetch)
5467 (uri (string-append "https://repo1.maven.org/maven2/"
5468 "org/eclipse/platform/org.eclipse.equinox.common/"
5469 version "/org.eclipse.equinox.common-"
5470 version "-sources.jar"))
5471 (sha256
5472 (base32
e40e3792 5473 "1yn8ij6xsljlf35sr2l7wvyvc0ss4n1rv0ry5zkgb49dj4hyrqrj"))))
81b55b1e
RW
5474 (build-system ant-build-system)
5475 (arguments
5476 `(#:tests? #f ; no tests included
5477 #:jar-name "eclipse-equinox-common.jar"))
5478 (inputs
5479 `(("java-eclipse-osgi" ,java-eclipse-osgi)))
5480 (home-page "http://www.eclipse.org/equinox/")
5481 (synopsis "Common Eclipse runtime")
5482 (description "This package provides the common Eclipse runtime.")
5483 (license license:epl1.0)))
5484
90368ad9
RW
5485(define-public java-eclipse-core-jobs
5486 (package
5487 (name "java-eclipse-core-jobs")
5488 (version "3.8.0")
5489 (source (origin
5490 (method url-fetch)
5491 (uri (string-append "https://repo1.maven.org/maven2/"
5492 "org/eclipse/platform/org.eclipse.core.jobs/"
5493 version "/org.eclipse.core.jobs-"
5494 version "-sources.jar"))
5495 (sha256
5496 (base32
5497 "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b"))))
5498 (build-system ant-build-system)
5499 (arguments
5500 `(#:tests? #f ; no tests included
5501 #:jar-name "eclipse-core-jobs.jar"))
5502 (inputs
5503 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5504 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5505 (home-page "http://www.eclipse.org/equinox/")
5506 (synopsis "Eclipse jobs mechanism")
5507 (description "This package provides the Eclipse jobs mechanism.")
5508 (license license:epl1.0)))
5509
fbaf09eb
RW
5510(define-public java-eclipse-equinox-registry
5511 (package
5512 (name "java-eclipse-equinox-registry")
5513 (version "3.6.100")
5514 (source (origin
5515 (method url-fetch)
5516 (uri (string-append "https://repo1.maven.org/maven2/"
5517 "org/eclipse/platform/org.eclipse.equinox.registry/"
5518 version "/org.eclipse.equinox.registry-"
5519 version "-sources.jar"))
5520 (sha256
5521 (base32
5522 "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k"))))
5523 (build-system ant-build-system)
5524 (arguments
5525 `(#:tests? #f ; no tests included
5526 #:jar-name "eclipse-equinox-registry.jar"))
5527 (inputs
5528 `(("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5529 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5530 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5531 (home-page "http://www.eclipse.org/equinox/")
5532 (synopsis "Eclipse extension registry support")
5533 (description "This package provides support for the Eclipse extension
5534registry.")
5535 (license license:epl1.0)))
5536
65214c87
RW
5537(define-public java-eclipse-equinox-app
5538 (package
5539 (name "java-eclipse-equinox-app")
5540 (version "1.3.400")
5541 (source (origin
5542 (method url-fetch)
5543 (uri (string-append "https://repo1.maven.org/maven2/"
5544 "org/eclipse/platform/org.eclipse.equinox.app/"
5545 version "/org.eclipse.equinox.app-"
5546 version "-sources.jar"))
5547 (sha256
5548 (base32
5549 "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab"))))
5550 (build-system ant-build-system)
5551 (arguments
5552 `(#:tests? #f ; no tests included
5553 #:jar-name "eclipse-equinox-app.jar"))
5554 (inputs
5555 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5556 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5557 ("java-eclipse-osgi" ,java-eclipse-osgi)
5558 ("java-osgi-service-event" ,java-osgi-service-event)))
5559 (home-page "http://www.eclipse.org/equinox/")
5560 (synopsis "Equinox application container")
5561 (description "This package provides the Equinox application container for
5562Eclipse.")
5563 (license license:epl1.0)))
5564
3f970214
RW
5565(define-public java-eclipse-equinox-preferences
5566 (package
5567 (name "java-eclipse-equinox-preferences")
5568 (version "3.6.1")
5569 (source (origin
5570 (method url-fetch)
5571 (uri (string-append "https://repo1.maven.org/maven2/"
5572 "org/eclipse/platform/org.eclipse.equinox.preferences/"
5573 version "/org.eclipse.equinox.preferences-"
5574 version "-sources.jar"))
5575 (sha256
5576 (base32
5577 "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2"))))
5578 (build-system ant-build-system)
5579 (arguments
5580 `(#:tests? #f ; no tests included
5581 #:jar-name "eclipse-equinox-preferences.jar"))
5582 (inputs
5583 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5584 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5585 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5586 (home-page "http://www.eclipse.org/equinox/")
5587 (synopsis "Eclipse preferences mechanism")
5588 (description "This package provides the Eclipse preferences mechanism with
5589the module @code{org.eclipse.equinox.preferences}.")
5590 (license license:epl1.0)))
5591
4ad3d4f3
RW
5592(define-public java-eclipse-core-contenttype
5593 (package
5594 (name "java-eclipse-core-contenttype")
5595 (version "3.5.100")
5596 (source (origin
5597 (method url-fetch)
5598 (uri (string-append "https://repo1.maven.org/maven2/"
5599 "org/eclipse/platform/org.eclipse.core.contenttype/"
5600 version "/org.eclipse.core.contenttype-"
5601 version "-sources.jar"))
5602 (sha256
5603 (base32
5604 "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi"))))
5605 (build-system ant-build-system)
5606 (arguments
5607 `(#:tests? #f ; no tests included
5608 #:jar-name "eclipse-core-contenttype.jar"))
5609 (inputs
5610 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5611 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5612 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5613 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5614 (home-page "http://www.eclipse.org/")
5615 (synopsis "Eclipse content mechanism")
5616 (description "This package provides the Eclipse content mechanism in the
5617@code{org.eclipse.core.contenttype} module.")
5618 (license license:epl1.0)))
5619
6a7f7e49
RW
5620(define-public java-eclipse-core-runtime
5621 (package
5622 (name "java-eclipse-core-runtime")
4fa9b6e6 5623 (version "3.15.100")
6a7f7e49
RW
5624 (source (origin
5625 (method url-fetch)
5626 (uri (string-append "https://repo1.maven.org/maven2/"
5627 "org/eclipse/platform/org.eclipse.core.runtime/"
5628 version "/org.eclipse.core.runtime-"
5629 version "-sources.jar"))
5630 (sha256
5631 (base32
4fa9b6e6 5632 "0l8xayacsbjvz5hypx2fv47vpw2n4dspamcfb3hx30x9hj8vmg7r"))))
6a7f7e49
RW
5633 (build-system ant-build-system)
5634 (arguments
5635 `(#:tests? #f ; no tests included
5636 #:jar-name "eclipse-core-runtime.jar"))
5637 (inputs
5638 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5639 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5640 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
5641 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5642 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5643 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5644 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5645 (home-page "https://www.eclipse.org/")
5646 (synopsis "Eclipse core runtime")
5647 (description "This package provides the Eclipse core runtime with the
5648module @code{org.eclipse.core.runtime}.")
5649 (license license:epl1.0)))
5650
b3806a15
RW
5651(define-public java-eclipse-core-filesystem
5652 (package
5653 (name "java-eclipse-core-filesystem")
5654 (version "1.6.1")
5655 (source (origin
5656 (method url-fetch)
5657 (uri (string-append "https://repo1.maven.org/maven2/"
5658 "org/eclipse/platform/org.eclipse.core.filesystem/"
5659 version "/org.eclipse.core.filesystem-"
5660 version "-sources.jar"))
5661 (sha256
5662 (base32
5663 "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj"))))
5664 (build-system ant-build-system)
5665 (arguments
5666 `(#:tests? #f ; no tests included
5667 #:jar-name "eclipse-core-filesystem.jar"))
5668 (inputs
5669 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5670 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5671 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5672 (home-page "https://www.eclipse.org/")
5673 (synopsis "Eclipse core file system")
5674 (description "This package provides the Eclipse core file system with the
5675module @code{org.eclipse.core.filesystem}.")
5676 (license license:epl1.0)))
5677
e96060de
RW
5678(define-public java-eclipse-core-expressions
5679 (package
5680 (name "java-eclipse-core-expressions")
5681 (version "3.5.100")
5682 (source (origin
5683 (method url-fetch)
5684 (uri (string-append "https://repo1.maven.org/maven2/"
5685 "org/eclipse/platform/org.eclipse.core.expressions/"
5686 version "/org.eclipse.core.expressions-"
5687 version "-sources.jar"))
5688 (sha256
5689 (base32
5690 "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f"))))
5691 (build-system ant-build-system)
5692 (arguments
5693 `(#:tests? #f ; no tests included
5694 #:jar-name "eclipse-core-expressions.jar"))
5695 (inputs
5696 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5697 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5698 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5699 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5700 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5701 (home-page "https://www.eclipse.org/")
5702 (synopsis "Eclipse core expression language")
5703 (description "This package provides the Eclipse core expression language
5704with the @code{org.eclipse.core.expressions} module.")
5705 (license license:epl1.0)))
5706
e8d0f7c8
RW
5707(define-public java-eclipse-core-variables
5708 (package
5709 (name "java-eclipse-core-variables")
5710 (version "3.3.0")
5711 (source (origin
5712 (method url-fetch)
5713 (uri (string-append "https://repo1.maven.org/maven2/"
5714 "org/eclipse/platform/org.eclipse.core.variables/"
5715 version "/org.eclipse.core.variables-"
5716 version "-sources.jar"))
5717 (sha256
5718 (base32
5719 "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy"))))
5720 (build-system ant-build-system)
5721 (arguments
5722 `(#:tests? #f ; no tests included
5723 #:jar-name "eclipse-core-variables.jar"))
5724 (inputs
5725 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5726 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5727 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5728 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5729 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5730 (home-page "https://www.eclipse.org/platform")
5731 (synopsis "Eclipse core variables")
5732 (description "This package provides the Eclipse core variables module
5733@code{org.eclipse.core.variables}.")
5734 (license license:epl1.0)))
5735
7c3d479e
RW
5736(define-public java-eclipse-ant-core
5737 (package
5738 (name "java-eclipse-ant-core")
5739 (version "3.4.100")
5740 (source (origin
5741 (method url-fetch)
5742 (uri (string-append "https://repo1.maven.org/maven2/"
5743 "org/eclipse/platform/org.eclipse.ant.core/"
5744 version "/org.eclipse.ant.core-"
5745 version "-sources.jar"))
5746 (sha256
5747 (base32
5748 "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7"))))
5749 (build-system ant-build-system)
5750 (arguments
5751 `(#:tests? #f ; no tests included
5752 #:jar-name "eclipse-ant-core.jar"))
5753 (inputs
5754 `(("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
5755 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5756 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5757 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5758 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5759 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5760 ("java-eclipse-core-variables" ,java-eclipse-core-variables)
5761 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5762 (home-page "https://www.eclipse.org/platform")
5763 (synopsis "Ant build tool core libraries")
5764 (description "This package provides the ant build tool core libraries with
5765the module @code{org.eclipse.ant.core}.")
5766 (license license:epl1.0)))
5767
6636f638
RW
5768(define-public java-eclipse-core-resources
5769 (package
5770 (name "java-eclipse-core-resources")
c8427a5e 5771 (version "3.13.200")
6636f638
RW
5772 (source (origin
5773 (method url-fetch)
5774 (uri (string-append "https://repo1.maven.org/maven2/"
5775 "org/eclipse/platform/org.eclipse.core.resources/"
5776 version "/org.eclipse.core.resources-"
5777 version "-sources.jar"))
5778 (sha256
5779 (base32
c8427a5e 5780 "1sn3b6ky72hkvxcgf9b2jkpbdh3y8lbhi9xxwv1dsiddpkkq91hs"))))
6636f638
RW
5781 (build-system ant-build-system)
5782 (arguments
5783 `(#:tests? #f ; no tests included
5784 #:jar-name "eclipse-core-resources.jar"))
5785 (inputs
5786 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5787 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5788 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5789 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5790 ("java-eclipse-core-expressions" ,java-eclipse-core-expressions)
5791 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
5792 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5793 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5794 ("java-eclipse-ant-core" ,java-eclipse-ant-core)
5795 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5796 (home-page "https://www.eclipse.org/")
5797 (synopsis "Eclipse core resource management")
5798 (description "This package provides the Eclipse core resource management
5799module @code{org.eclipse.core.resources}.")
5800 (license license:epl1.0)))
5801
afb5858d
RW
5802(define-public java-eclipse-compare-core
5803 (package
5804 (name "java-eclipse-compare-core")
5805 (version "3.6.0")
5806 (source (origin
5807 (method url-fetch)
5808 (uri (string-append "https://repo1.maven.org/maven2/"
5809 "org/eclipse/platform/org.eclipse.compare.core/"
5810 version "/org.eclipse.compare.core-"
5811 version "-sources.jar"))
5812 (sha256
5813 (base32
5814 "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg"))))
5815 (build-system ant-build-system)
5816 (arguments
5817 `(#:tests? #f ; no tests included
5818 #:jar-name "eclipse-compare-core.jar"))
5819 (inputs
5820 `(("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5821 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5822 ("java-eclipse-osgi" ,java-eclipse-osgi)
5823 ("java-icu4j" ,java-icu4j)))
5824 (home-page "https://www.eclipse.org/")
5825 (synopsis "Eclipse core compare support")
5826 (description "This package provides the Eclipse core compare support
5827module @code{org.eclipse.compare.core}.")
5828 (license license:epl1.0)))
5829
1bb191fc
RW
5830(define-public java-eclipse-team-core
5831 (package
5832 (name "java-eclipse-team-core")
5833 (version "3.8.0")
5834 (source (origin
5835 (method url-fetch)
5836 (uri (string-append "https://repo1.maven.org/maven2/"
5837 "org/eclipse/platform/org.eclipse.team.core/"
5838 version "/org.eclipse.team.core-"
5839 version "-sources.jar"))
5840 (sha256
5841 (base32
5842 "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7"))))
5843 (build-system ant-build-system)
5844 (arguments
5845 `(#:tests? #f ; no tests included
5846 #:jar-name "eclipse-team-core.jar"))
5847 (inputs
5848 `(("java-eclipse-compare-core" ,java-eclipse-compare-core)
5849 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5850 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
5851 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5852 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
5853 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5854 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5855 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5856 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5857 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5858 (home-page "https://www.eclipse.org/platform")
5859 (synopsis "Eclipse team support core")
5860 (description "This package provides the Eclipse team support core module
5861@code{org.eclipse.team.core}.")
5862 (license license:epl1.0)))
5863
31342529
RW
5864(define-public java-eclipse-core-commands
5865 (package
5866 (name "java-eclipse-core-commands")
5867 (version "3.8.1")
5868 (source (origin
5869 (method url-fetch)
5870 (uri (string-append "https://repo1.maven.org/maven2/"
5871 "org/eclipse/platform/org.eclipse.core.commands/"
5872 version "/org.eclipse.core.commands-"
5873 version "-sources.jar"))
5874 (sha256
5875 (base32
5876 "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9"))))
5877 (build-system ant-build-system)
5878 (arguments
5879 `(#:tests? #f ; no tests included
5880 #:jar-name "eclipse-core-commands.jar"))
5881 (inputs
5882 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)))
5883 (home-page "https://www.eclipse.org/platform")
5884 (synopsis "Eclipse core commands")
5885 (description "This package provides Eclipse core commands in the module
5886@code{org.eclipse.core.commands}.")
5887 (license license:epl1.0)))
5888
bf96acf7
RW
5889(define-public java-eclipse-text
5890 (package
5891 (name "java-eclipse-text")
5892 (version "3.6.0")
5893 (source (origin
5894 (method url-fetch)
5895 (uri (string-append "https://repo1.maven.org/maven2/"
5896 "org/eclipse/platform/org.eclipse.text/"
5897 version "/org.eclipse.text-"
5898 version "-sources.jar"))
5899 (sha256
5900 (base32
5901 "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1"))))
5902 (build-system ant-build-system)
5903 (arguments
5904 `(#:tests? #f ; no tests included
5905 #:jar-name "eclipse-text.jar"
5906 #:phases
5907 (modify-phases %standard-phases
5908 ;; When creating a new category we must make sure that the new list
5909 ;; matches List<Position>. By default it seems to be too generic
5910 ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>.
5911 ;; Without this we get this error:
5912 ;;
5913 ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376:
5914 ;; error: method put in interface Map<K,V> cannot be applied to given types;
5915 ;; [javac] fPositions.put(category, new ArrayList<>());
5916 ;; [javac] ^
5917 ;; [javac] required: String,List<Position>
5918 ;; [javac] found: String,ArrayList<Object>
5919 ;; [javac] reason: actual argument ArrayList<Object> cannot be converted
5920 ;; to List<Position> by method invocation conversion
5921 ;; [javac] where K,V are type-variables:
5922 ;; [javac] K extends Object declared in interface Map
5923 ;; [javac] V extends Object declared in interface Map
5924 ;;
5925 ;; I don't know if this is a good fix. I suspect it is not, but it
5926 ;; seems to work.
5927 (add-after 'unpack 'fix-compilation-error
5928 (lambda _
5929 (substitute* "src/org/eclipse/jface/text/AbstractDocument.java"
5930 (("Positions.put\\(category, new ArrayList<>\\(\\)\\);")
5931 "Positions.put(category, new ArrayList<Position>());"))
5932 #t)))))
5933 (inputs
5934 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5935 ("java-eclipse-core-commands" ,java-eclipse-core-commands)
5936 ("java-icu4j" ,java-icu4j)))
5937 (home-page "http://www.eclipse.org/platform")
5938 (synopsis "Eclipse text library")
5939 (description "Platform Text is part of the Platform UI project and
5940provides the basic building blocks for text and text editors within Eclipse
5941and contributes the Eclipse default text editor.")
5942 (license license:epl1.0)))
5943
c24d11b7
RW
5944(define-public java-eclipse-jdt-core
5945 (package
5946 (name "java-eclipse-jdt-core")
43d6776b 5947 (version "3.16.0")
c24d11b7
RW
5948 (source (origin
5949 (method url-fetch)
5950 (uri (string-append "https://repo1.maven.org/maven2/"
5951 "org/eclipse/jdt/org.eclipse.jdt.core/"
5952 version "/org.eclipse.jdt.core-"
5953 version "-sources.jar"))
5954 (sha256
5955 (base32
43d6776b 5956 "1g560yr9v2kzv34gc2m3ifpgnj7krcdd6h4gd4z83pwqacwkfz0k"))))
c24d11b7
RW
5957 (build-system ant-build-system)
5958 (arguments
5959 `(#:tests? #f ; no tests included
84b226c2
RW
5960 #:jar-name "eclipse-jdt-core.jar"
5961 #:phases
5962 (modify-phases %standard-phases
5963 (add-after 'unpack 'move-sources
5964 (lambda _
5965 (with-directory-excursion "src/jdtCompilerAdaptersrc/"
5966 (for-each (lambda (file)
5967 (install-file file (string-append "../" (dirname file))))
5968 (find-files "." ".*")))
5969 (delete-file-recursively "src/jdtCompilerAdaptersrc/")
5970 #t))
5971 (add-before 'build 'copy-resources
5972 (lambda _
5973 (with-directory-excursion "src"
5974 (for-each (lambda (file)
5975 (install-file file (string-append "../build/classes/" (dirname file))))
5976 (find-files "." ".*.(props|properties|rsc)")))
5977 #t)))))
c24d11b7
RW
5978 (inputs
5979 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5980 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
5981 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5982 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
5983 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5984 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
5985 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5986 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5987 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5988 ("java-eclipse-osgi" ,java-eclipse-osgi)
5989 ("java-eclipse-text" ,java-eclipse-text)))
5990 (home-page "https://www.eclipse.org/jdt")
5991 (synopsis "Java development tools core libraries")
5992 (description "This package provides the core libraries of the Eclipse Java
5993development tools.")
5994 (license license:epl1.0)))
5995
74c2339f
RW
5996(define-public java-eclipse-jdt-compiler-apt
5997 (package
5998 (name "java-eclipse-jdt-compiler-apt")
5999 (version "1.3.400")
6000 (source (origin
6001 (method url-fetch)
6002 (uri (string-append "https://repo1.maven.org/maven2/"
6003 "org/eclipse/jdt/org.eclipse.jdt.compiler.apt/"
6004 version "/org.eclipse.jdt.compiler.apt-"
6005 version "-sources.jar"))
6006 (sha256
6007 (base32
6008 "1s285k9p2ixdqrknb40jbbvw682n9a7l5lqpn583a8pvlzg2l6r8"))))
6009 (build-system ant-build-system)
6010 (arguments
6011 `(#:tests? #f ; no tests included
6012 #:jar-name "eclipse-jdt-compiler-apt.jar"
6013 #:jdk ,openjdk11))
6014 (inputs
6015 `(("java-eclipse-jdt-core" ,java-eclipse-jdt-core)))
6016 (home-page "https://www.eclipse.org/jdt/apt/")
6017 (synopsis "Annotation processing tool")
6018 (description "APT stands for Annotation Processing Tool. APT provides a
6019means for generating files and compiling new Java classes based on annotations
6020found in your source code.")
6021 (license license:epl2.0)))
6022
a5cdcf6c
RW
6023(define-public java-javax-mail
6024 (package
6025 (name "java-javax-mail")
6026 (version "1.5.6")
6027 (source (origin
6028 (method url-fetch)
6029 (uri (string-append "https://repo1.maven.org/maven2/"
6030 "com/sun/mail/javax.mail/"
6031 version "/javax.mail-"
6032 version "-sources.jar"))
6033 (sha256
6034 (base32
6035 "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9"))))
6036 (build-system ant-build-system)
6037 (arguments
6038 `(#:tests? #f ; no tests
6039 #:jar-name "javax-mail.jar"))
6040 (home-page "https://javamail.java.net")
6041 (synopsis "Reference implementation of the JavaMail API")
6042 (description
6043 "This package provides versions of the JavaMail API implementation, IMAP,
6044SMTP, and POP3 service providers, some examples, and documentation for the
6045JavaMail API.")
6046 ;; GPLv2 only with "classpath exception".
6047 (license license:gpl2)))
6048
0e660c4d
RW
6049(define-public java-log4j-api
6050 (package
6051 (name "java-log4j-api")
6052 (version "2.4.1")
6053 (source (origin
6054 (method url-fetch)
6055 (uri (string-append "mirror://apache/logging/log4j/" version
6056 "/apache-log4j-" version "-src.tar.gz"))
6057 (sha256
6058 (base32
6059 "0j5p9gik0jysh37nlrckqbky12isy95cpwg2gv5fas1rcdqbraxd"))))
6060 (build-system ant-build-system)
6061 (arguments
6062 `(#:tests? #f ; tests require unpackaged software
6063 #:jar-name "log4j-api.jar"
6064 #:make-flags
6065 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
6066 "/share/java"))
6067 #:phases
6068 (modify-phases %standard-phases
6069 (add-after 'unpack 'enter-dir
6070 (lambda _ (chdir "log4j-api") #t))
6071 ;; FIXME: The tests require additional software that has not been
6072 ;; packaged yet, such as
6073 ;; * org.apache.maven
6074 ;; * org.apache.felix
6075 (add-after 'enter-dir 'delete-tests
6076 (lambda _ (delete-file-recursively "src/test") #t)))))
6077 (inputs
6078 `(("java-osgi-core" ,java-osgi-core)
6079 ("java-hamcrest-core" ,java-hamcrest-core)
6080 ("java-junit" ,java-junit)))
6081 (home-page "http://logging.apache.org/log4j/2.x/")
6082 (synopsis "API module of the Log4j logging framework for Java")
6083 (description
6084 "This package provides the API module of the Log4j logging framework for
6085Java.")
6086 (license license:asl2.0)))
6087
dfef4231
JL
6088(define-public java-log4j-core
6089 (package
6090 (inherit java-log4j-api)
6091 (name "java-log4j-core")
6092 (inputs
6093 `(("java-osgi-core" ,java-osgi-core)
6094 ("java-hamcrest-core" ,java-hamcrest-core)
6095 ("java-log4j-api" ,java-log4j-api)
6096 ("java-mail" ,java-mail)
6097 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
6098 ("java-lmax-disruptor" ,java-lmax-disruptor)
6099 ("java-kafka" ,java-kafka-clients)
6100 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
6101 ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
6102 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
6103 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
6104 ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml)
6105 ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml)
6106 ("java-commons-compress" ,java-commons-compress)
6107 ("java-commons-csv" ,java-commons-csv)
6108 ("java-jeromq" ,java-jeromq)
6109 ("java-junit" ,java-junit)))
6110 (native-inputs
6111 `(("hamcrest" ,java-hamcrest-all)
6112 ("java-commons-io" ,java-commons-io)
6113 ("java-commons-lang3" ,java-commons-lang3)
6114 ("slf4j" ,java-slf4j-api)))
6115 (arguments
6116 `(#:tests? #f ; tests require more dependencies
6117 #:test-dir "src/test"
6118 #:source-dir "src/main/java"
6119 #:jar-name "log4j-core.jar"
6120 #:jdk ,icedtea-8
6121 #:make-flags
6122 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
6123 "/share/java"))
6124 #:phases
6125 (modify-phases %standard-phases
6126 (add-after 'unpack 'enter-dir
6127 (lambda _ (chdir "log4j-core") #t)))))
6128 (synopsis "Core component of the Log4j framework")
6129 (description "This package provides the core component of the Log4j
6130logging framework for Java.")))
6131
2caf873e
JL
6132(define-public java-log4j-1.2-api
6133 (package
6134 (inherit java-log4j-api)
6135 (name "java-log4j-1.2-api")
6136 (arguments
6137 `(#:jar-name "java-log4j-1.2-api.jar"
6138 #:source-dir "log4j-1.2-api/src/main/java"
6139 #:jdk ,icedtea-8
6140 ;; Tests require maven-model (and other maven subprojects), which is a
6141 ;; cyclic dependency.
6142 #:tests? #f))
6143 (inputs
6144 `(("log4j-api" ,java-log4j-api)
6145 ("log4j-core" ,java-log4j-core)
6146 ("osgi-core" ,java-osgi-core)
6147 ("eclipse-osgi" ,java-eclipse-osgi)
6148 ("java-lmax-disruptor" ,java-lmax-disruptor)))))
6149
1c188f4e
HG
6150(define-public java-commons-cli
6151 (package
6152 (name "java-commons-cli")
37602dd8 6153 (version "1.4")
1c188f4e
HG
6154 (source (origin
6155 (method url-fetch)
6156 (uri (string-append "mirror://apache/commons/cli/source/"
6157 "commons-cli-" version "-src.tar.gz"))
6158 (sha256
6159 (base32
37602dd8 6160 "05hgi2z01fqz374y719gl1dxzqvzci5af071zm7vxrjg9vczipm1"))))
1c188f4e
HG
6161 (build-system ant-build-system)
6162 ;; TODO: javadoc
6163 (arguments
6164 `(#:jar-name "commons-cli.jar"))
6165 (native-inputs
6166 `(("java-junit" ,java-junit)
6167 ("java-hamcrest-core" ,java-hamcrest-core)))
6168 (home-page "http://commons.apache.org/cli/")
6169 (synopsis "Command line arguments and options parsing library")
6170 (description "The Apache Commons CLI library provides an API for parsing
6171command line options passed to programs. It is also able to print help
6172messages detailing the options available for a command line tool.
6173
6174Commons CLI supports different types of options:
6175
6176@itemize
6177@item POSIX like options (ie. tar -zxvf foo.tar.gz)
6178@item GNU like long options (ie. du --human-readable --max-depth=1)
6179@item Java like properties (ie. java -Djava.awt.headless=true Foo)
6180@item Short options with value attached (ie. gcc -O2 foo.c)
6181@item long options with single hyphen (ie. ant -projecthelp)
6182@end itemize
6183
6184This is a part of the Apache Commons Project.")
6185 (license license:asl2.0)))
0a8519bc
HG
6186
6187(define-public java-commons-codec
6188 (package
6189 (name "java-commons-codec")
6190 (version "1.10")
6191 (source (origin
6192 (method url-fetch)
6193 (uri (string-append "mirror://apache/commons/codec/source/"
6194 "commons-codec-" version "-src.tar.gz"))
6195 (sha256
6196 (base32
6197 "1w9qg30y4s0x8gnmr2fgj4lyplfn788jqxbcz27lf5kbr6n8xr65"))))
6198 (build-system ant-build-system)
6199 (outputs '("out" "doc"))
6200 (arguments
6201 `(#:test-target "test"
6202 #:make-flags
6203 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
6204 (junit (assoc-ref %build-inputs "java-junit")))
6205 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
6206 (string-append "-Dhamcrest.jar=" hamcrest
6207 "/share/java/hamcrest-core.jar")
6208 ;; Do not append version to jar.
6209 "-Dfinal.name=commons-codec"))
6210 #:phases
6211 (modify-phases %standard-phases
6212 (add-after 'build 'build-javadoc ant-build-javadoc)
6213 (replace 'install (install-jars "dist"))
6214 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
6215 (native-inputs
6216 `(("java-junit" ,java-junit)
6217 ("java-hamcrest-core" ,java-hamcrest-core)))
6218 (home-page "http://commons.apache.org/codec/")
6219 (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs")
6220 (description "The codec package contains simple encoder and decoders for
6221various formats such as Base64 and Hexadecimal. In addition to these widely
6222used encoders and decoders, the codec package also maintains a collection of
6223phonetic encoding utilities.
6224
6225This is a part of the Apache Commons Project.")
6226 (license license:asl2.0)))
7d91c1b9
HG
6227
6228(define-public java-commons-daemon
6229 (package
6230 (name "java-commons-daemon")
6231 (version "1.0.15")
6232 (source (origin
6233 (method url-fetch)
6234 (uri (string-append "mirror://apache/commons/daemon/source/"
6235 "commons-daemon-" version "-src.tar.gz"))
6236 (sha256
6237 (base32
6238 "0ci46kq8jpz084ccwq0mmkahcgsmh20ziclp2jf5i0djqv95gvhi"))))
6239 (build-system ant-build-system)
6240 (arguments
6241 `(#:test-target "test"
6242 #:phases
6243 (modify-phases %standard-phases
6244 (add-after 'build 'build-javadoc ant-build-javadoc)
6245 (replace 'install (install-jars "dist"))
6246 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
6247 (native-inputs
6248 `(("java-junit" ,java-junit)))
6249 (home-page "http://commons.apache.org/daemon/")
6250 (synopsis "Library to launch Java applications as daemons")
6251 (description "The Daemon package from Apache Commons can be used to
6252implement Java applications which can be launched as daemons. For example the
6253program will be notified about a shutdown so that it can perform cleanup tasks
6254before its process of execution is destroyed by the operation system.
6255
6256This package contains the Java library. You will also need the actual binary
6257for your architecture which is provided by the jsvc package.
6258
6259This is a part of the Apache Commons Project.")
6260 (license license:asl2.0)))
9f68e74a 6261
eb270ecf
RW
6262(define-public java-javaewah
6263 (package
6264 (name "java-javaewah")
6265 (version "1.1.6")
6266 (source (origin
6267 (method url-fetch)
6268 (uri (string-append "https://github.com/lemire/javaewah/"
6269 "archive/JavaEWAH-" version ".tar.gz"))
6270 (sha256
6271 (base32
6272 "1n7j1r1h24wlhwv9zdcj6yqjrhma2ixwyzm15l5vrv6yqjs6753b"))))
6273 (build-system ant-build-system)
6274 (arguments `(#:jar-name "javaewah.jar"))
6275 (inputs
6276 `(("java-junit" ,java-junit)
6277 ("java-hamcrest-core" ,java-hamcrest-core)))
6278 (home-page "https://github.com/lemire/javaewah")
6279 (synopsis "Compressed alternative to the Java @code{BitSet} class")
6280 (description "This is a word-aligned compressed variant of the Java
6281@code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like
6282compression scheme. It can be used to implement bitmap indexes.
6283
6284The goal of word-aligned compression is not to achieve the best compression,
6285but rather to improve query processing time. Hence, JavaEWAH tries to save CPU
6286cycles, maybe at the expense of storage. However, the EWAH scheme is always
6287more efficient storage-wise than an uncompressed bitmap (as implemented in the
6288@code{BitSet} class by Sun).")
6289 ;; GPL2.0 derivates are explicitly allowed.
6290 (license license:asl2.0)))
6291
f8e4d022
RW
6292(define-public java-slf4j-api
6293 (package
6294 (name "java-slf4j-api")
6295 (version "1.7.25")
6296 (source (origin
6297 (method url-fetch)
6298 (uri (string-append "https://www.slf4j.org/dist/slf4j-"
6299 version ".tar.gz"))
6300 (sha256
6301 (base32
6302 "13j51sgzmhhdrfa74gkal5zpip7r1440dh7zsi2c8bpb2zs1v8kb"))
6303 (modules '((guix build utils)))
6304 ;; Delete bundled jars.
6305 (snippet
6306 '(begin
6307 (for-each delete-file (find-files "." "\\.jar$"))
6308 #t))))
6309 (build-system ant-build-system)
6310 (arguments
dcf7a8a6 6311 `(#:jar-name "slf4j-api.jar"
f8e4d022 6312 #:source-dir "slf4j-api/src/main"
dcf7a8a6
JL
6313 #:test-dir "slf4j-api/src/test"
6314 #:phases
6315 (modify-phases %standard-phases
6316 (add-after 'build 'regenerate-jar
6317 (lambda _
6318 ;; pom.xml ignores these files in the jar creation process. If we don't,
6319 ;; we get the error "This code should have never made it into slf4j-api.jar"
6320 (delete-file-recursively "build/classes/org/slf4j/impl")
2c8ac364
MW
6321 (invoke "jar" "-cf" "build/jar/slf4j-api.jar" "-C"
6322 "build/classes" ".")))
dcf7a8a6
JL
6323 (add-before 'check 'dont-test-abstract-classes
6324 (lambda _
6325 ;; abstract classes are not meant to be run with junit
6326 (substitute* "build.xml"
6327 (("<include name=\"\\*\\*/\\*Test.java\" />")
6328 (string-append "<include name=\"**/*Test.java\" />"
6329 "<exclude name=\"**/MultithreadedInitializationTest"
2c8ac364
MW
6330 ".java\" />")))
6331 #t)))))
f8e4d022
RW
6332 (inputs
6333 `(("java-junit" ,java-junit)
6334 ("java-hamcrest-core" ,java-hamcrest-core)))
6335 (home-page "https://www.slf4j.org/")
6336 (synopsis "Simple logging facade for Java")
6337 (description "The Simple Logging Facade for Java (SLF4J) serves as a
6338simple facade or abstraction for various logging
6339frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j})
6340allowing the end user to plug in the desired logging framework at deployment
6341time.")
6342 (license license:expat)))
6343
6d047cc4
GB
6344(define java-slf4j-api-bootstrap
6345 (package
6346 (inherit java-slf4j-api)
6347 (name "java-slf4j-api-bootstrap")
6348 (inputs `())
6349 (arguments
6350 (substitute-keyword-arguments (package-arguments java-slf4j-api)
6351 ((#:tests? _ #f) #f)))))
6352
88f256a1
TD
6353(define-public java-slf4j-simple
6354 (package
6355 (name "java-slf4j-simple")
6356 (version "1.7.25")
6357 (source (package-source java-slf4j-api))
6358 (build-system ant-build-system)
6359 (arguments
6360 `(#:jar-name "slf4j-simple.jar"
6361 #:source-dir "slf4j-simple/src/main"
6362 #:test-dir "slf4j-simple/src/test"
6363 #:phases
6364 (modify-phases %standard-phases
6365 ;; The tests need some test classes from slf4j-api
6366 (add-before 'check 'build-slf4j-api-test-helpers
6367 (lambda _
6368 ;; Add current dir to CLASSPATH ...
6369 (setenv "CLASSPATH"
6370 (string-append (getcwd) ":" (getenv "CLASSPATH")))
6371 ;; ... and build test helper classes here:
2c8ac364
MW
6372 (apply invoke
6373 `("javac" "-d" "."
6374 ,@(find-files "slf4j-api/src/test" ".*\\.java"))))))))
88f256a1
TD
6375 (inputs
6376 `(("java-junit" ,java-junit)
6377 ("java-hamcrest-core" ,java-hamcrest-core)
6378 ("java-slf4j-api" ,java-slf4j-api)))
6379 (home-page "https://www.slf4j.org/")
6380 (synopsis "Simple implementation of simple logging facade for Java")
6381 (description "SLF4J binding for the Simple implementation, which outputs
6382all events to System.err. Only messages of level INFO and higher are
6383printed.")
6384 (license license:expat)))
6385
9f68e74a
JL
6386(define-public antlr2
6387 (package
6388 (name "antlr2")
6389 (version "2.7.7")
6390 (source (origin
6391 (method url-fetch)
6392 (uri (string-append "http://www.antlr2.org/download/antlr-"
6393 version ".tar.gz"))
6394 (sha256
6395 (base32
6396 "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5"))
6397 (modules '((guix build utils)))
6398 (snippet
6399 '(begin
6400 (delete-file "antlr.jar")
6401 (substitute* "lib/cpp/antlr/CharScanner.hpp"
6402 (("#include <map>")
6403 (string-append
6d225e89
RW
6404 "#include <map>\n"
6405 "#define EOF (-1)\n"
6406 "#include <strings.h>")))
9f68e74a 6407 (substitute* "configure"
6d225e89
RW
6408 (("/bin/sh") "sh"))
6409 #t))))
9f68e74a
JL
6410 (build-system gnu-build-system)
6411 (arguments
6d225e89 6412 `(#:tests? #f ; no test target
3ad90395
RW
6413 #:imported-modules ((guix build ant-build-system)
6414 (guix build syscalls)
6415 ,@%gnu-build-system-modules)
6416 #:modules (((guix build ant-build-system) #:prefix ant:)
6417 (guix build gnu-build-system)
6418 (guix build utils))
9f68e74a
JL
6419 #:phases
6420 (modify-phases %standard-phases
6421 (add-after 'install 'strip-jar-timestamps
3ad90395 6422 (assoc-ref ant:%standard-phases 'strip-jar-timestamps))
79f6fc0d
JL
6423 (add-before 'configure 'fix-timestamp
6424 (lambda _
6425 (substitute* "configure"
6426 (("^TIMESTAMP.*") "TIMESTAMP=19700101\n"))
6427 #t))
9f68e74a
JL
6428 (add-after 'configure 'fix-bin-ls
6429 (lambda _
3ad90395
RW
6430 (substitute* (find-files "." "Makefile")
6431 (("/bin/ls") "ls"))
6432 #t)))))
9f68e74a
JL
6433 (native-inputs
6434 `(("which" ,which)
6435 ("zip" ,zip)
6436 ("java" ,icedtea "jdk")))
6437 (inputs
6438 `(("java" ,icedtea)))
6439 (home-page "http://www.antlr2.org")
6440 (synopsis "Framework for constructing recognizers, compilers, and translators")
6441 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
6442is a language tool that provides a framework for constructing recognizers,
6443compilers, and translators from grammatical descriptions containing Java, C#,
6444C++, or Python actions. ANTLR provides excellent support for tree construction,
6445tree walking, and translation.")
6446 (license license:public-domain)))
a0f15eff 6447
e44112e1 6448(define-public java-stringtemplate-3
a0f15eff 6449 (package
e44112e1 6450 (name "java-stringtemplate")
a0f15eff
JL
6451 (version "3.2.1")
6452 (source (origin
6453 (method url-fetch)
6454 (uri (string-append "https://github.com/antlr/website-st4/raw/"
6455 "gh-pages/download/stringtemplate-"
6456 version ".tar.gz"))
6457 (sha256
6458 (base32
6459 "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is"))))
6460 (build-system ant-build-system)
6461 (arguments
129d926d 6462 `(#:jar-name (string-append ,name "-" ,version ".jar")
2fcda6d2 6463 #:test-dir "test"
b101b4e8
RW
6464 #:modules ((guix build ant-build-system)
6465 (guix build utils)
6466 (srfi srfi-1))
a0f15eff
JL
6467 #:phases
6468 (modify-phases %standard-phases
2fcda6d2
RW
6469 (add-before 'check 'fix-tests
6470 (lambda _
6471 (substitute* "build.xml"
6472 (("\\$\\{test.home\\}/java")
6473 "${test.home}/org"))
6474 #t))
a0f15eff
JL
6475 (add-before 'build 'generate-grammar
6476 (lambda _
b101b4e8 6477 (with-directory-excursion "src/org/antlr/stringtemplate/language/"
2c8ac364
MW
6478 (for-each (lambda (file)
6479 (format #t "~a\n" file)
6480 (invoke "antlr" file))
6481 '("template.g" "angle.bracket.template.g" "action.g"
6482 "eval.g" "group.g" "interface.g")))
6483 #t)))))
a0f15eff 6484 (native-inputs
2fcda6d2
RW
6485 `(("antlr" ,antlr2)
6486 ("java-junit" ,java-junit)))
a0f15eff
JL
6487 (home-page "http://www.stringtemplate.org")
6488 (synopsis "Template engine to generate formatted text output")
6489 (description "StringTemplate is a java template engine (with ports for C#,
6490Objective-C, JavaScript, Scala) for generating source code, web pages, emails,
6491or any other formatted text output. StringTemplate is particularly good at
6492code generators, multiple site skins, and internationalization / localization.
6493StringTemplate also powers ANTLR.")
6494 (license license:bsd-3)))
4ad8aed7
JL
6495
6496;; antlr3 is partially written using antlr3 grammar files. It also depends on
6497;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar
6498;; files and uses antlr3 at runtime. The latest version requires a recent version
6499;; of antlr3 at runtime.
6500;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3.
6501;; This version of ST4 is sufficient for the latest antlr3.
6502;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build
6503;; the latest ST4 with it. Then we build our final antlr3 that will be linked
6504;; against the latest ST4.
6505;; antlr3.3 still depends on antlr3 to generate some files, so we use an
6506;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses
6507;; only grammar files with the antlr2 syntax.
6508;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3.
6509
64b7efc0 6510(define-public java-stringtemplate
407df789 6511 (package (inherit java-stringtemplate-3)
64b7efc0 6512 (name "java-stringtemplate")
4ad8aed7
JL
6513 (version "4.0.8")
6514 (source (origin
6515 (method url-fetch)
6516 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/"
6517 version ".tar.gz"))
6518 (file-name (string-append name "-" version ".tar.gz"))
6519 (sha256
6520 (base32
6521 "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087"))))
6522 (build-system ant-build-system)
6523 (arguments
6db77c7c
RW
6524 `(#:jar-name (string-append ,name "-" ,version ".jar")
6525 #:tests? #f ; FIXME: tests fail for unknown reasons
6526 #:test-dir "test"
f4aa4cfe
RW
6527 #:modules ((guix build ant-build-system)
6528 (guix build utils)
6529 (srfi srfi-1))
4ad8aed7
JL
6530 #:phases
6531 (modify-phases %standard-phases
6db77c7c
RW
6532 (add-before 'check 'fix-test-target
6533 (lambda _
6534 (substitute* "build.xml"
6535 (("\\$\\{test.home\\}/java") "${test.home}/")
6536 (("\\*Test.java") "Test*.java"))
6537 #t))
4ad8aed7 6538 (add-before 'build 'generate-grammar
f4aa4cfe
RW
6539 (lambda _
6540 (with-directory-excursion "src/org/stringtemplate/v4/compiler/"
2c8ac364
MW
6541 (for-each (lambda (file)
6542 (format #t "~a\n" file)
6543 (invoke "antlr3" file))
6544 '("STParser.g" "Group.g" "CodeGenerator.g")))
6545 #t)))))
4ad8aed7
JL
6546 (inputs
6547 `(("antlr3" ,antlr3-bootstrap)
6548 ("antlr2" ,antlr2)
6db77c7c
RW
6549 ("java-stringtemplate" ,java-stringtemplate-3)
6550 ("java-junit" ,java-junit)))))
4ad8aed7 6551
1345eeb0 6552(define java-stringtemplate-4.0.6
64b7efc0 6553 (package (inherit java-stringtemplate)
1345eeb0 6554 (name "java-stringtemplate")
4ad8aed7
JL
6555 (version "4.0.6")
6556 (source (origin
6557 (method url-fetch)
6558 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-"
6559 version ".tar.gz"))
6560 (file-name (string-append name "-" version ".tar.gz"))
6561 (sha256
6562 (base32
6563 "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp"))))
6564 (inputs
6565 `(("antlr3" ,antlr3-3.3)
6566 ("antlr2" ,antlr2)
e44112e1 6567 ("java-stringtemplate" ,java-stringtemplate-3)))))
4ad8aed7
JL
6568
6569(define-public antlr3
6570 (package
6571 (name "antlr3")
6572 (version "3.5.2")
6573 (source (origin
6574 (method url-fetch)
6575 (uri (string-append "https://github.com/antlr/antlr3/archive/"
6576 version ".tar.gz"))
6577 (file-name (string-append name "-" version ".tar.gz"))
6578 (sha256
6579 (base32
fd75eb6c 6580 "0218v683081lg54z9hvjxinhxd4dqp870jx6n39gslm0bkyi4vd6"))))
4ad8aed7
JL
6581 (build-system ant-build-system)
6582 (arguments
6583 `(#:jar-name (string-append ,name "-" ,version ".jar")
6584 #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3"
6585 #:tests? #f
6586 #:phases
6587 (modify-phases %standard-phases
6588 (add-after 'install 'bin-install
6589 (lambda* (#:key inputs outputs #:allow-other-keys)
6590 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
6591 (bin (string-append (assoc-ref outputs "out") "/bin")))
6592 (mkdir-p bin)
6593 (with-output-to-file (string-append bin "/antlr3")
6594 (lambda _
6595 (display
6596 (string-append "#!" (which "sh") "\n"
6597 "java -cp " jar "/" ,name "-" ,version ".jar:"
6598 (string-concatenate
6599 (find-files (assoc-ref inputs "stringtemplate")
6600 ".*\\.jar"))
6601 ":"
6602 (string-concatenate
6603 (find-files (assoc-ref inputs "stringtemplate4")
6604 ".*\\.jar"))
6605 ":"
6606 (string-concatenate
6607 (find-files (string-append
6608 (assoc-ref inputs "antlr")
6609 "/lib")
6610 ".*\\.jar"))
6611 " org.antlr.Tool $*"))))
2c8ac364
MW
6612 (chmod (string-append bin "/antlr3") #o755))
6613 #t))
4ad8aed7
JL
6614 (add-before 'build 'generate-grammar
6615 (lambda _
6616 (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/")
6617 (for-each (lambda (file)
6618 (display file)
6619 (newline)
2c8ac364 6620 (invoke "antlr3" file))
4ad8aed7
JL
6621 '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g"
6622 "AssignTokenTypesWalker.g"
6623 "ActionTranslator.g" "TreeToNFAConverter.g"
6624 "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g"
6625 "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g"))
6626 (substitute* "ANTLRParser.java"
6627 (("public Object getTree") "public GrammarAST getTree"))
6628 (substitute* "ANTLRv3Parser.java"
6629 (("public Object getTree") "public CommonTree getTree"))
6630 (chdir "../../../../../java")
4ad8aed7
JL
6631 (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java"
6632 (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*;
6633import org.antlr.grammar.v3.ANTLRTreePrinter;"))
6634 (substitute* "org/antlr/tool/ErrorManager.java"
6635 (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") ""))
2c8ac364
MW
6636 (chdir "../../../..")
6637 #t))
4ad8aed7
JL
6638 (add-before 'build 'fix-build-xml
6639 (lambda _
6640 (substitute* "build.xml"
6641 (("<exec") "<copy todir=\"${classes.dir}\">
6642<fileset dir=\"tool/src/main/resources\">
6643<include name=\"**/*.stg\"/>
6644<include name=\"**/*.st\"/>
6645<include name=\"**/*.sti\"/>
6646<include name=\"**/STLexer.tokens\"/>
6647</fileset>
2c8ac364
MW
6648</copy><exec"))
6649 #t)))))
4ad8aed7
JL
6650 (native-inputs
6651 `(("antlr" ,antlr2)
6652 ("antlr3" ,antlr3-bootstrap)))
6653 (inputs
6654 `(("junit" ,java-junit)
e44112e1 6655 ("stringtemplate" ,java-stringtemplate-3)
64b7efc0 6656 ("stringtemplate4" ,java-stringtemplate)))
4ad8aed7 6657 (propagated-inputs
e44112e1 6658 `(("stringtemplate" ,java-stringtemplate-3)
4ad8aed7 6659 ("antlr" ,antlr2)
1345eeb0 6660 ("stringtemplate4" ,java-stringtemplate-4.0.6)))
4ad8aed7
JL
6661 (home-page "http://www.antlr3.org")
6662 (synopsis "Framework for constructing recognizers, compilers, and translators")
6663 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
6664is a language tool that provides a framework for constructing recognizers,
6665compilers, and translators from grammatical descriptions containing Java, C#,
6666C++, or Python actions. ANTLR provides excellent support for tree construction,
6667tree walking, and translation.")
6668 (license license:bsd-3)))
6669
6670(define antlr3-bootstrap
6671 (package
6672 (inherit antlr3)
6673 (name "antlr3-bootstrap")
6674 (native-inputs
6675 `(("antlr" ,antlr2)
6676 ("antlr3" ,antlr3-3.3)))
6677 (inputs
6678 `(("junit" ,java-junit)))))
6679
6680(define antlr3-3.3
6681 (package
6682 (inherit antlr3)
6683 (name "antlr3")
6684 (version "3.3")
6685 (source (origin
6686 (method url-fetch)
6687 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
6688 "gh-pages/download/antlr-"
6689 version ".tar.gz"))
6690 (sha256
6691 (base32
48c86220
GB
6692 "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m"))
6693 (patches
6694 (search-patches "antlr3-3_3-fix-java8-compilation.patch"))))
4ad8aed7
JL
6695 (arguments
6696 `(#:jar-name (string-append ,name "-" ,version ".jar")
a9540107
RW
6697 #:source-dir (string-join '("tool/src/main/java"
6698 "runtime/Java/src/main/java"
6699 "tool/src/main/antlr2"
6700 "tool/src/main/antlr3")
6701 ":")
6702 #:tests? #f ; FIXME: tests seem to require maven plugin
6703 #:modules ((guix build ant-build-system)
6704 (guix build utils)
6705 (srfi srfi-1))
4ad8aed7
JL
6706 #:phases
6707 (modify-phases %standard-phases
6708 (add-after 'install 'bin-install
6709 (lambda* (#:key inputs outputs #:allow-other-keys)
a9540107
RW
6710 (let* ((out (assoc-ref outputs "out"))
6711 (jar (string-append out "/share/java"))
6712 (bin (string-append out "/bin")))
4ad8aed7
JL
6713 (mkdir-p bin)
6714 (with-output-to-file (string-append bin "/antlr3")
6715 (lambda _
6716 (display
a9540107
RW
6717 (string-append
6718 "#!" (which "sh") "\n"
6719 "java -cp " jar "/antlr3-3.3.jar:"
6720 (string-join
6721 (append (find-files (assoc-ref inputs "java-stringtemplate")
6722 ".*\\.jar$")
6723 (find-files (string-append (assoc-ref inputs "antlr")
6724 "/lib")
6725 ".*\\.jar$"))
6726 ":")
6727 " org.antlr.Tool $*"))))
6728 (chmod (string-append bin "/antlr3") #o755)
6729 #t)))
4ad8aed7
JL
6730 (add-before 'build 'generate-grammar
6731 (lambda _
4ad8aed7
JL
6732 (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java"
6733 (("import org.antlr.grammar.v2.\\*;")
6734 "import org.antlr.grammar.v2.*;\n
6735import org.antlr.grammar.v2.TreeToNFAConverter;\n
6736import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n
a9540107 6737import org.antlr.grammar.v2.ANTLRTreePrinter;"))
2c8ac364
MW
6738 (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/"
6739 (for-each (lambda (file)
6740 (format #t "~a\n" file)
6741 (invoke "antlr" file))
6742 '("antlr.g" "antlr.print.g" "assign.types.g"
6743 "buildnfa.g" "codegen.g" "define.g")))
6744 (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/"
6745 (for-each (lambda (file)
6746 (format #t "~a\n" file)
6747 (invoke "antlr3" file))
6748 '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g"
6749 "ANTLRv3Tree.g")))
6750 #t))
4ad8aed7
JL
6751 (add-before 'build 'fix-build-xml
6752 (lambda _
6753 (substitute* "build.xml"
6754 (("<exec") "<copy todir=\"${classes.dir}\">
6755<fileset dir=\"tool/src/main/resources\">
6756<include name=\"**/*.stg\"/>
6757<include name=\"**/*.st\"/>
6758<include name=\"**/*.sti\"/>
6759<include name=\"**/STLexer.tokens\"/>
6760</fileset>
a9540107
RW
6761</copy><exec"))
6762 #t)))))
4ad8aed7
JL
6763 (native-inputs
6764 `(("antlr" ,antlr2)
6765 ("antlr3" ,antlr3-3.1)))
6766 (inputs
6767 `(("junit" ,java-junit)))
6768 (propagated-inputs
e44112e1 6769 `(("java-stringtemplate" ,java-stringtemplate-3)
4ad8aed7
JL
6770 ("antlr" ,antlr2)
6771 ("antlr3" ,antlr3-3.1)))))
6772
6773(define antlr3-3.1
6774 (package
6775 (inherit antlr3)
4ad8aed7
JL
6776 (version "3.1")
6777 (source (origin
6778 (method url-fetch)
6779 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
6780 "gh-pages/download/antlr-"
6781 version ".tar.gz"))
6782 (sha256
6783 (base32
4c763b4d
GB
6784 "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z"))
6785 (patches
6786 (search-patches "antlr3-3_1-fix-java8-compilation.patch"))))
4ad8aed7 6787 (arguments
ec32bc98 6788 `(#:jar-name (string-append "antlr3-" ,version ".jar")
4ad8aed7
JL
6789 #:source-dir "src:runtime/Java/src"
6790 #:tests? #f
6791 #:phases
6792 (modify-phases %standard-phases
6793 (add-after 'install 'bin-install
6794 (lambda* (#:key inputs outputs #:allow-other-keys)
6795 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
6796 (bin (string-append (assoc-ref outputs "out") "/bin")))
6797 (mkdir-p bin)
6798 (with-output-to-file (string-append bin "/antlr3")
6799 (lambda _
6800 (display
6801 (string-append "#!" (which "sh") "\n"
57e37764 6802 "java -cp " jar "/antlr3-3.1.jar:"
4ad8aed7
JL
6803 (string-concatenate
6804 (find-files (assoc-ref inputs "stringtemplate")
6805 ".*\\.jar"))
6806 ":"
6807 (string-concatenate
6808 (find-files (string-append
6809 (assoc-ref inputs "antlr")
6810 "/lib")
6811 ".*\\.jar"))
6812 " org.antlr.Tool $*"))))
2c8ac364
MW
6813 (chmod (string-append bin "/antlr3") #o755))
6814 #t))
4ad8aed7
JL
6815 (add-before 'build 'generate-grammar
6816 (lambda _
6817 (let ((dir "src/org/antlr/tool/"))
6818 (for-each (lambda (file)
6819 (display file)
6820 (newline)
13f38d31 6821 (invoke "antlr" "-o" dir (string-append dir file)))
4ad8aed7
JL
6822 '("antlr.g" "antlr.print.g" "assign.types.g"
6823 "buildnfa.g" "define.g")))
6824 (format #t "codegen.g\n")
13f38d31
RW
6825 (invoke "antlr" "-o" "src/org/antlr/codegen"
6826 "src/org/antlr/codegen/codegen.g")
6827 #t))
4ad8aed7
JL
6828 (add-before 'build 'fix-build-xml
6829 (lambda _
6830 (substitute* "build.xml"
6831 (("<exec") "<copy todir=\"${classes.dir}\">
6832<fileset dir=\"src\">
6833<include name=\"**/*.stg\"/>
6834<include name=\"**/*.st\"/>
6835<include name=\"**/*.sti\"/>
6836<include name=\"**/STLexer.tokens\"/>
6837</fileset>
2c8ac364
MW
6838</copy><exec"))
6839 #t)))))
4ad8aed7
JL
6840 (native-inputs
6841 `(("antlr" ,antlr2)))
6842 (inputs
6843 `(("junit" ,java-junit)))
6844 (propagated-inputs
e44112e1 6845 `(("stringtemplate" ,java-stringtemplate-3)))))
d44bcd7a 6846
742242a5
GB
6847(define-public java-commons-cli-1.2
6848 ;; This is a bootstrap dependency for Maven2.
6849 (package
6850 (inherit java-commons-cli)
6851 (version "1.2")
6852 (source (origin
6853 (method url-fetch)
6854 (uri (string-append "mirror://apache/commons/cli/source/"
6855 "commons-cli-" version "-src.tar.gz"))
6856 (sha256
6857 (base32
6858 "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm"))))
6859 (arguments
6860 `(#:jar-name "commons-cli.jar"
6861 #:phases
6862 (modify-phases %standard-phases
6863 (add-before 'check 'fix-build-xml
6864 (lambda* (#:key inputs #:allow-other-keys)
6865 (substitute* "build.xml"
6866 (("dir=\"\\$\\{test.home\\}/java\"")
6867 "dir=\"${test.home}\""))
6868 #t)))))
6869 (native-inputs
6870 `(("java-junit" ,java-junit)))))
30deadee
JL
6871
6872(define-public java-microemulator-cldc
6873 (package
6874 (name "java-microemulator-cldc")
6875 (version "2.0.4")
6876 (source (origin
6877 (method url-fetch)
6878 (uri (string-append "https://github.com/barteo/microemu/archive/"
6879 "microemulator_"
6880 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
6881 version)
6882 ".tar.gz"))
6883 (file-name (string-append name "-" version ".tar.gz"))
6884 (sha256
6885 (base32
6886 "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll"))))
6887 (build-system ant-build-system)
6888 (arguments
6889 `(#:jar-name "microemulator-cldc.jar"
6890 #:source-dir "microemu-cldc/src/main/java"
6891 #:tests? #f)); Requires even older software
6892 (home-page "https://github.com/barteo/microemu")
6893 (synopsis "J2ME CLDC emulator")
6894 (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP
6895Emulator. It allows to demonstrate MIDlet based applications in web browser
6896applet and can be run as a standalone java application.")
6897 (license (list license:asl2.0
6898 ;; or altenatively:
6899 license:lgpl2.1+))))
8e2f3e5e
JL
6900
6901(define-public java-datanucleus-javax-persistence
6902 (package
6903 (name "java-datanucleus-javax-persistence")
6904 (version "2.2.0")
6905 (source (origin
6906 (method url-fetch)
6907 (uri (string-append "https://github.com/datanucleus/"
6908 "javax.persistence/archive/javax.persistence-"
6909 version "-release.tar.gz"))
6910 (sha256
6911 (base32
6912 "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx"))))
6913 (build-system ant-build-system)
6914 (arguments
6915 `(#:jar-name "java-datanucleus-javax-persistence.jar"
6916 #:jdk ,icedtea-8
6917 #:source-dir "src/main/java"
6918 #:tests? #f)); no tests
6919 (home-page "https://github.com/datanucleus/javax.persistence")
6920 (synopsis "JPA API")
6921 (description "This package contains a clean definition of JPA API intended
6922for use with DataNucleus JPA since the JCP haven't provided an official JPA API
6923jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification
6924used to generate this API.")
6925 (license (list license:edl1.0 license:epl1.0))))
3240ddbf
JL
6926
6927(define-public java-osgi-cmpn
6928 (package
6929 (name "java-osgi-cmpn")
6930 (version "6.0.0")
6931 (source (origin
6932 (method url-fetch)
6933 (uri (string-append "http://central.maven.org/maven2/"
6934 "org/osgi/osgi.cmpn/" version "/osgi.cmpn-"
6935 version "-sources.jar"))
6936 (sha256
6937 (base32
6938 "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys"))))
6939 (build-system ant-build-system)
6940 (arguments
6941 `(#:jar-name "osgi-cmpn.jar"
6942 #:tests? #f)); no tests
6943 (inputs
6944 `(("annotation" ,java-osgi-annotation)
6945 ("core" ,java-osgi-core)
6946 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
6947 ("microemulator" ,java-microemulator-cldc)
6948 ("servlet" ,java-classpathx-servletapi)))
c353d014 6949 (home-page "https://www.osgi.org")
3240ddbf
JL
6950 (synopsis "Compendium specification module of OSGi framework")
6951 (description
6952 "OSGi, for Open Services Gateway initiative framework, is a module system
6953and service platform for the Java programming language. This package contains
6954the compendium specification module, providing interfaces and classes for use
6955in compiling bundles.")
6956 (license license:asl2.0)))
747c7574
JL
6957
6958(define-public java-osgi-service-component-annotations
6959 (package
6960 (name "java-osgi-service-component-annotations")
6961 (version "1.3.0")
6962 (source (origin
6963 (method url-fetch)
6964 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6965 "org.osgi.service.component.annotations/"
6966 version "/org.osgi.service.component.annotations-"
6967 version "-sources.jar"))
6968 (sha256
6969 (base32
6970 "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0"))))
6971 (build-system ant-build-system)
6972 (arguments
6973 `(#:jar-name "osgi-service-component-annotations.jar"
6974 #:tests? #f)); no tests
6975 (inputs
6976 `(("annotation" ,java-osgi-annotation)))
c353d014 6977 (home-page "https://www.osgi.org")
747c7574
JL
6978 (synopsis "Support annotations for osgi-service-component")
6979 (description
6980 "OSGi, for Open Services Gateway initiative framework, is a module system
6981and service platform for the Java programming language. This package contains
6982the support annotations for osgi-service-component.")
6983 (license license:asl2.0)))
999b5fb4
JL
6984
6985(define-public java-osgi-dto
6986 (package
6987 (name "java-osgi-dto")
6988 (version "1.0.0")
6989 (source (origin
6990 (method url-fetch)
6991 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6992 "org.osgi.dto/" version "/org.osgi.dto-"
6993 version "-sources.jar"))
6994 (sha256
6995 (base32
6996 "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr"))))
6997 (build-system ant-build-system)
6998 (arguments
6999 `(#:jar-name "osgi-dto.jar"
7000 #:tests? #f)); no tests
7001 (inputs
7002 `(("annotation" ,java-osgi-annotation)))
c353d014 7003 (home-page "https://www.osgi.org")
999b5fb4
JL
7004 (synopsis "Data Transfer Objects")
7005 (description
7006 "OSGi, for Open Services Gateway initiative framework, is a module system
7007and service platform for the Java programming language. This package contains
7008the Data Transfer Objects. It is easily serializable having only public fields
7009of primitive types and their wrapper classes, Strings, and DTOs. List, Set,
7010Map and array aggregates may also be used. The aggregates must only hold
7011objects of the listed types or aggregates.")
7012 (license license:asl2.0)))
c304ce6a
JL
7013
7014(define-public java-osgi-resource
7015 (package
7016 (name "java-osgi-resource")
7017 (version "1.0.0")
7018 (source (origin
7019 (method url-fetch)
7020 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7021 "org.osgi.resource/"
7022 version "/org.osgi.resource-"
7023 version "-sources.jar"))
7024 (sha256
7025 (base32
7026 "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d"))))
7027 (build-system ant-build-system)
7028 (arguments
7029 `(#:jar-name "osgi-resource.jar"
7030 #:tests? #f)); no tests
7031 (inputs
7032 `(("annotation" ,java-osgi-annotation)
7033 ("dto" ,java-osgi-dto)))
c353d014 7034 (home-page "https://www.osgi.org")
c304ce6a
JL
7035 (synopsis "OSGI Resource")
7036 (description
7037 "OSGi, for Open Services Gateway initiative framework, is a module system
7038and service platform for the Java programming language. This package contains
7039the definition of common types in osgi packages.")
7040 (license license:asl2.0)))
c2b14516
JL
7041
7042(define-public java-osgi-namespace-contract
7043 (package
7044 (name "java-osgi-namespace-contract")
7045 (version "1.0.0")
7046 (source (origin
7047 (method url-fetch)
7048 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7049 "org.osgi.namespace.contract/"
7050 version "/org.osgi.namespace.contract-"
7051 version "-sources.jar"))
7052 (sha256
7053 (base32
7054 "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36"))))
7055 (build-system ant-build-system)
7056 (inputs
7057 `(("resource" ,java-osgi-resource)
7058 ("annotation" ,java-osgi-annotation)))
7059 (arguments
7060 `(#:jar-name "osgi-namespace-contract.jar"
7061 #:tests? #f)); no tests
c353d014 7062 (home-page "https://www.osgi.org")
c2b14516
JL
7063 (synopsis "Contract Capability and Requirement Namespace")
7064 (description
7065 "OSGi, for Open Services Gateway initiative framework, is a module system
7066and service platform for the Java programming language. This package contains
7067the names for the attributes and directives for a namespace with contracts.")
7068 (license license:asl2.0)))
f809c963
JL
7069
7070(define-public java-osgi-namespace-extender
7071 (package
7072 (name "java-osgi-namespace-extender")
7073 (version "1.0.1")
7074 (source (origin
7075 (method url-fetch)
7076 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7077 "org.osgi.namespace.extender/"
7078 version "/org.osgi.namespace.extender-"
7079 version "-sources.jar"))
7080 (sha256
7081 (base32
7082 "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz"))))
7083 (build-system ant-build-system)
7084 (inputs
7085 `(("resource" ,java-osgi-resource)
7086 ("annotation" ,java-osgi-annotation)))
7087 (arguments
7088 `(#:jar-name "osgi-namespace-extendent.jar"
7089 #:tests? #f)); no tests
c353d014 7090 (home-page "https://www.osgi.org")
f809c963
JL
7091 (synopsis "Extender Capability and Requirement Namespace")
7092 (description
7093 "OSGi, for Open Services Gateway initiative framework, is a module system
7094and service platform for the Java programming language. This package contains
b784962d
JL
7095the names for the attributes and directives for an extender namespace.")
7096 (license license:asl2.0)))
7097
7098(define-public java-osgi-namespace-service
7099 (package
7100 (name "java-osgi-namespace-service")
7101 (version "1.0.0")
7102 (source (origin
7103 (method url-fetch)
7104 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7105 "org.osgi.namespace.service/"
7106 version "/org.osgi.namespace.service-"
7107 version "-sources.jar"))
7108 (sha256
7109 (base32
7110 "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8"))))
7111 (build-system ant-build-system)
7112 (inputs
7113 `(("resource" ,java-osgi-resource)
7114 ("annotation" ,java-osgi-annotation)))
7115 (arguments
7116 `(#:jar-name "osgi-namespace-service.jar"
7117 #:tests? #f)); no tests
c353d014 7118 (home-page "https://www.osgi.org")
b784962d
JL
7119 (synopsis "Service Capability and Requirement Namespace")
7120 (description
7121 "OSGi, for Open Services Gateway initiative framework, is a module system
7122and service platform for the Java programming language. This package contains
7123the names for the attributes and directives for a service namespace.")
f809c963 7124 (license license:asl2.0)))
0f0c5218
JL
7125
7126(define-public java-osgi-util-function
7127 (package
7128 (name "java-osgi-util-function")
7129 (version "1.0.0")
7130 (source (origin
7131 (method url-fetch)
7132 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7133 "org.osgi.util.function/"
7134 version "/org.osgi.util.function-"
7135 version "-sources.jar"))
7136 (sha256
7137 (base32
7138 "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x"))))
7139 (build-system ant-build-system)
7140 (arguments
7141 `(#:jar-name "osgi-util-function.jar"
7142 #:tests? #f)); no tests
7143 (inputs
7144 `(("annotation" ,java-osgi-annotation)))
c353d014 7145 (home-page "https://www.osgi.org")
0f0c5218
JL
7146 (synopsis "OSGI Util Function")
7147 (description
7148 "OSGi, for Open Services Gateway initiative framework, is a module system
7149and service platform for the Java programming language. This package contains
7150an interface for a function that accepts a single argument and produces a result.")
7151 (license license:asl2.0)))
27103135
JL
7152
7153(define-public java-osgi-util-promise
7154 (package
7155 (name "java-osgi-util-promise")
7156 (version "1.0.0")
7157 (source (origin
7158 (method url-fetch)
7159 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7160 "org.osgi.util.promise/"
7161 version "/org.osgi.util.promise-"
7162 version "-sources.jar"))
7163 (sha256
7164 (base32
7165 "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c"))))
7166 (build-system ant-build-system)
7167 (arguments
7168 `(#:jar-name "osgi-util-promise.jar"
7169 #:tests? #f)); no tests
7170 (inputs
7171 `(("annotation" ,java-osgi-annotation)
7172 ("function" ,java-osgi-util-function)))
c353d014 7173 (home-page "https://www.osgi.org")
27103135
JL
7174 (synopsis "Promise of a value")
7175 (description
7176 "OSGi, for Open Services Gateway initiative framework, is a module system
7177and service platform for the Java programming language. This package contains
7178an interface and utilitary classes for promises. A Promise represents a future
7179value. It handles the interactions for asynchronous processing.")
7180 (license license:asl2.0)))
2b1fdb2b
JL
7181
7182(define-public java-osgi-service-metatype-annotations
7183 (package
7184 (name "java-osgi-service-metatype-annotations")
7185 (version "1.3.0")
7186 (source (origin
7187 (method url-fetch)
7188 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7189 "org.osgi.service.metatype.annotations/"
7190 version "/org.osgi.service.metatype.annotations-"
7191 version "-sources.jar"))
7192 (sha256
7193 (base32
7194 "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6"))))
7195 (build-system ant-build-system)
7196 (arguments
7197 `(#:jar-name "osgi-service-metatype-annotations.jar"
7198 #:tests? #f)); no tests
7199 (inputs
7200 `(("annotation" ,java-osgi-annotation)))
c353d014 7201 (home-page "https://www.osgi.org")
2b1fdb2b
JL
7202 (synopsis "Support annotations for metatype")
7203 (description
7204 "OSGi, for Open Services Gateway initiative framework, is a module system
7205and service platform for the Java programming language. This package contains
7206the support annotations for metatype.")
7207 (license license:asl2.0)))
a13acfbe
JL
7208
7209(define-public java-osgi-service-repository
7210 (package
7211 (name "java-osgi-service-repository")
7212 (version "1.1.0")
7213 (source (origin
7214 (method url-fetch)
7215 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7216 "org.osgi.service.repository/"
7217 version "/org.osgi.service.repository-"
7218 version "-sources.jar"))
7219 (sha256
7220 (base32
7221 "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n"))))
7222 (build-system ant-build-system)
7223 (arguments
7224 `(#:jar-name "osgi-service-repository.jar"
7225 #:tests? #f)); no tests
7226 (inputs
7227 `(("annotation" ,java-osgi-annotation)
7228 ("promise" ,java-osgi-util-promise)
7229 ("resource" ,java-osgi-resource)))
c353d014 7230 (home-page "https://www.osgi.org")
a13acfbe
JL
7231 (synopsis "OSGI service repository")
7232 (description
7233 "OSGi, for Open Services Gateway initiative framework, is a module system
7234and service platform for the Java programming language. This package contains
7235a repository service that contains resources.")
7236 (license license:asl2.0)))
dfd91541
JL
7237
7238(define-public java-osgi-framework
7239 (package
7240 (name "java-osgi-framework")
7241 (version "1.8.0")
7242 (source (origin
7243 (method url-fetch)
7244 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7245 "org.osgi.framework/" version "/org.osgi.framework-"
7246 version "-sources.jar"))
7247 (sha256
7248 (base32
7249 "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s"))))
7250 (build-system ant-build-system)
7251 (arguments
7252 `(#:jar-name "osgi-framework.jar"
7253 #:tests? #f)); no tests
7254 (inputs
7255 `(("annotation" ,java-osgi-annotation)
7256 ("resource" ,java-osgi-resource)
7257 ("dto" ,java-osgi-dto)))
c353d014 7258 (home-page "https://www.osgi.org")
dfd91541
JL
7259 (synopsis "OSGi framework")
7260 (description
7261 "OSGi, for Open Services Gateway initiative framework, is a module system
7262and service platform for the Java programming language.")
7263 (license license:asl2.0)))
98c9f16c
JL
7264
7265(define-public java-osgi-service-log
7266 (package
7267 (name "java-osgi-service-log")
7268 (version "1.3.0")
7269 (source (origin
7270 (method url-fetch)
7271 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7272 "org.osgi.service.log/"
7273 version "/org.osgi.service.log-"
7274 version "-sources.jar"))
7275 (sha256
7276 (base32
7277 "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0"))))
7278 (build-system ant-build-system)
7279 (arguments
7280 `(#:jar-name "osgi-service-log.jar"
7281 #:tests? #f)); no tests
7282 (inputs
7283 `(("java-osgi-framework" ,java-osgi-framework)))
c353d014 7284 (home-page "https://www.osgi.org")
98c9f16c
JL
7285 (synopsis "Provides methods for bundles to write messages to the log")
7286 (description
7287 "OSGi, for Open Services Gateway initiative framework, is a module system
7288and service platform for the Java programming language. This package contains
7289the log service.")
7290 (license license:asl2.0)))
dd76d44b
JL
7291
7292(define-public java-osgi-service-jdbc
7293 (package
7294 (name "java-osgi-service-jdbc")
7295 (version "1.0.0")
7296 (source (origin
7297 (method url-fetch)
7298 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7299 "org.osgi.service.jdbc/"
7300 version "/org.osgi.service.jdbc-"
7301 version "-sources.jar"))
7302 (sha256
7303 (base32
7304 "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz"))))
7305 (build-system ant-build-system)
7306 (arguments
7307 `(#:jar-name "osgi-service-jdbc.jar"
7308 #:tests? #f)); no tests
c353d014 7309 (home-page "https://www.osgi.org")
dd76d44b
JL
7310 (synopsis "Factory for JDBC connection factories")
7311 (description
7312 "OSGi, for Open Services Gateway initiative framework, is a module system
7313and service platform for the Java programming language. This package contains
7314a factory for JDBC connection factories. There are 3 preferred connection
7315factories for getting JDBC connections:
7316
7317@itemize
7318@item @code{javax.sql.DataSource};
7319@item @code{javax.sql.ConnectionPoolDataSource};
7320@item @code{javax.sql.XADataSource}.
7321@end itemize")
7322 (license license:asl2.0)))
291d3f22
JL
7323
7324(define-public java-osgi-service-resolver
7325 (package
7326 (name "java-osgi-service-resolver")
7327 (version "1.0.1")
7328 (source (origin
7329 (method url-fetch)
7330 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7331 "org.osgi.service.resolver/"
7332 version "/org.osgi.service.resolver-"
7333 version "-sources.jar"))
7334 (sha256
7335 (base32
7336 "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd"))))
7337 (build-system ant-build-system)
7338 (arguments
7339 `(#:jar-name "osgi-service-resolver.jar"
7340 #:tests? #f)); no tests
7341 (inputs
7342 `(("annotation" ,java-osgi-annotation)
7343 ("resource" ,java-osgi-resource)))
c353d014 7344 (home-page "https://www.osgi.org")
291d3f22
JL
7345 (synopsis "OSGI Resolver service")
7346 (description
7347 "OSGi, for Open Services Gateway initiative framework, is a module system
7348and service platform for the Java programming language. This package contains
7349a resolver service that resolves the specified resources in the context supplied
7350by the caller.")
7351 (license license:asl2.0)))
1884bb81
JL
7352
7353(define-public java-osgi-util-tracker
7354 (package
7355 (name "java-osgi-util-tracker")
7356 (version "1.5.1")
7357 (source (origin
7358 (method url-fetch)
7359 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7360 "org.osgi.util.tracker/"
7361 version "/org.osgi.util.tracker-"
7362 version "-sources.jar"))
7363 (sha256
7364 (base32
7365 "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz"))))
7366 (build-system ant-build-system)
7367 (arguments
7368 `(#:jar-name "osgi-util-tracker.jar"
7369 #:tests? #f)); no tests
7370 (inputs
7371 `(("framework" ,java-osgi-framework)
7372 ("annotation" ,java-osgi-annotation)))
c353d014 7373 (home-page "https://www.osgi.org")
1884bb81
JL
7374 (synopsis "Bundle tracking")
7375 (description
7376 "OSGi, for Open Services Gateway initiative framework, is a module system
7377and service platform for the Java programming language. This package contains
7378bundle tracking utility classes.")
7379 (license license:asl2.0)))
fb9c48b8
JL
7380
7381(define-public java-osgi-service-cm
7382 (package
7383 (name "java-osgi-service-cm")
7384 (version "1.5.0")
7385 (source (origin
7386 (method url-fetch)
7387 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7388 "org.osgi.service.cm/"
7389 version "/org.osgi.service.cm-"
7390 version "-sources.jar"))
7391 (sha256
7392 (base32
7393 "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6"))))
7394 (build-system ant-build-system)
7395 (arguments
7396 `(#:jar-name "osgi-service-cm.jar"
7397 #:tests? #f)); no tests
7398 (inputs
7399 `(("framework" ,java-osgi-framework)
7400 ("annotation" ,java-osgi-annotation)))
c353d014 7401 (home-page "https://www.osgi.org")
fb9c48b8
JL
7402 (synopsis "OSGI Configuration Management")
7403 (description
7404 "OSGi, for Open Services Gateway initiative framework, is a module system
7405and service platform for the Java programming language. This package contains
7406utility classes for the configuration of services.")
7407 (license license:asl2.0)))
500aac75
JL
7408
7409(define-public java-osgi-service-packageadmin
7410 (package
7411 (name "java-osgi-service-packageadmin")
7412 (version "1.2.0")
7413 (source (origin
7414 (method url-fetch)
7415 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7416 "org.osgi.service.packageadmin/"
7417 version "/org.osgi.service.packageadmin-"
7418 version "-sources.jar"))
7419 (sha256
7420 (base32
7421 "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52"))))
7422 (build-system ant-build-system)
7423 (arguments
7424 `(#:jar-name "osgi-service-packageadmin.jar"
7425 #:tests? #f)); no tests
7426 (inputs
7427 `(("framework" ,java-osgi-framework)))
c353d014 7428 (home-page "https://www.osgi.org")
500aac75
JL
7429 (synopsis "OSGI Package Administration")
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 packageadmin service.")
7434 (license license:asl2.0)))
77a4f1ae
JL
7435
7436(define-public java-ops4j-base-lang
7437 (package
7438 (name "java-ops4j-base-lang")
7439 (version "1.5.0")
7440 (source (origin
7441 (method url-fetch)
7442 (uri (string-append "https://github.com/ops4j/org.ops4j.base/"
7443 "archive/base-" version ".tar.gz"))
7444 (sha256
7445 (base32
7446 "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw"))))
7447 (build-system ant-build-system)
7448 (arguments
7449 `(#:jar-name "java-ops4j-base-lang.jar"
7450 #:source-dir "ops4j-base-lang/src/main/java"
7451 #:tests? #f; no tests
7452 #:phases
7453 (modify-phases %standard-phases
7454 (add-before 'build 'add-test-file
7455 (lambda _
7456 ;; That file is required by a test in ops4j-pax-exam-core-spi
7457 (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang")
7458 (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties"
7459 (lambda _
7460 (display
7461 (string-append
7462 "version=" ,version "\n"
7463 "groupId=org.ops4j.base"
2c8ac364
MW
7464 "artifactId=ops4j-base-lang\n"))))
7465 #t)))))
77a4f1ae
JL
7466 (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview")
7467 (synopsis "Utility classes and extensions to be used in OPS4J projects")
7468 (description "OPS4J stands for Open Participation Software for Java. This
7469package contains utilities and extensions related to @code{java.lang}.")
7470 (license license:asl2.0)))
b2353495
JL
7471
7472(define-public java-ops4j-base-monitors
7473 (package
7474 (inherit java-ops4j-base-lang)
7475 (name "java-ops4j-base-monitors")
7476 (arguments
7477 `(#:jar-name "java-ops4j-base-monitors.jar"
7478 #:source-dir "ops4j-base-monitors/src/main/java"
7479 #:tests? #f)); no tests
7480 (inputs
7481 `(("lang" ,java-ops4j-base-lang)))
7482 (description "OPS4J stands for Open Participation Software for Java. This
7483package contains utilities and extensions related to monitoring.")))
322d349a
JL
7484
7485(define-public java-ops4j-base-io
7486 (package
7487 (inherit java-ops4j-base-lang)
7488 (name "java-ops4j-base-io")
7489 (arguments
7490 `(#:jar-name "java-ops4j-base-io.jar"
7491 #:source-dir "ops4j-base-io/src/main/java"
7492 #:test-dir "ops4j-base-io/src/test"
7493 #:test-exclude
7494 (list "**/ListerTest.java")))
7495 (inputs
7496 `(("lang" ,java-ops4j-base-monitors)
7497 ("lang" ,java-ops4j-base-lang)))
7498 (native-inputs
7499 `(("junit" ,java-junit)
7500 ("hamcrest" ,java-hamcrest-core)))
7501 (description "OPS4J stands for Open Participation Software for Java. This
7502package contains utilities and extensions related to handling streams and files.")))
559919c1
JL
7503
7504(define-public java-ops4j-base-util
7505 (package
7506 (inherit java-ops4j-base-lang)
7507 (name "java-ops4j-base-util")
7508 (arguments
7509 `(#:jar-name "java-ops4j-base-util.jar"
7510 #:source-dir "ops4j-base-util/src/main/java"
7511 #:test-dir "ops4j-base-util/src/test"))
7512 (inputs
7513 `(("lang" ,java-ops4j-base-lang)))
7514 (native-inputs
7515 `(("junit" ,java-junit)))
7516 (description "OPS4J stands for Open Participation Software for Java. This
7517package contains utilities and extensions related to environment, i18n and
7518mime types.")))
60dcec7a
JL
7519
7520(define-public java-ops4j-base-util-property
7521 (package
7522 (inherit java-ops4j-base-lang)
7523 (name "java-ops4j-base-util-property")
7524 (arguments
7525 `(#:jar-name "java-ops4j-base-util-property.jar"
7526 #:source-dir "ops4j-base-util-property/src/main/java"
7527 #:tests? #f)); no tests
7528 (inputs
7529 `(("lang" ,java-ops4j-base-lang)
7530 ("util" ,java-ops4j-base-util)))
7531 (description "OPS4J stands for Open Participation Software for Java. This
7532package contains utilities and extensions related to resolving properties from
7533different sources.")))
0edf8cf0
JL
7534
7535(define-public java-ops4j-base-store
7536 (package
7537 (inherit java-ops4j-base-lang)
7538 (name "java-ops4j-base-store")
7539 (arguments
7540 `(#:jar-name "java-ops4j-base-store.jar"
7541 #:source-dir "ops4j-base-store/src/main/java"
7542 #:tests? #f)); no tests
7543 (inputs
7544 `(("lang" ,java-ops4j-base-lang)
7545 ("slf4j" ,java-slf4j-api)
7546 ("io" ,java-ops4j-base-io)))
7547 (description "OPS4J stands for Open Participation Software for Java. This
7548package contains utilities for storing and retrieving data from an
7549@code{InputStream}.")))
214fcd8a
JL
7550
7551(define-public java-ops4j-base-spi
7552 (package
7553 (inherit java-ops4j-base-lang)
7554 (name "java-ops4j-base-spi")
7555 (arguments
7556 `(#:jar-name "java-ops4j-base-spi.jar"
7557 #:source-dir "ops4j-base-spi/src/main/java"
7558 #:test-dir "ops4j-base-spi/src/test"))
7559 (native-inputs
7560 `(("junit" ,java-junit)
7561 ("hamcrest" ,java-hamcrest-core)))
7562 (description "OPS4J stands for Open Participation Software for Java. This
7563package contains utilities for obtaining services via the Java SE 6
7564@code{ServiceLoader}.")))
e1edf42e
JL
7565
7566(define-public java-aqute-bnd-annotation
7567 (package
7568 (name "java-aqute-bnd-annotation")
2cac8891 7569 (version "3.5.0")
e1edf42e
JL
7570 (source (origin
7571 (method url-fetch)
7572 (uri (string-append "https://github.com/bndtools/bnd/archive/"
7573 version ".REL.tar.gz"))
7574 (file-name (string-append name "-" version ".tar.gz"))
7575 (sha256
7576 (base32
2cac8891 7577 "1ggyiq0as0f6cz333a0dh98j72kmvv5pf2s47v9554yh905lfqdl"))))
e1edf42e
JL
7578 (build-system ant-build-system)
7579 (arguments
7580 `(#:jar-name "java-aqute-bnd-annotation.jar"
7581 #:source-dir "biz.aQute.bnd.annotation/src"
7582 #:tests? #f)); empty test dir
7583 (home-page "http://bnd.bndtools.org/")
7584 (synopsis "Tools for OSGi")
7585 (description "Bnd is a swiss army knife for OSGi, it creates manifest
7586headers based on analyzing the class code, it verifies the project settings,
7587it manages project dependencies, gives diffs jars, and much more.")
7588 (license license:asl2.0)))
60ba2978
JL
7589
7590(define-public java-aqute-libg
7591 (package
7592 (inherit java-aqute-bnd-annotation)
7593 (name "java-aqute-libg")
7594 (arguments
7595 `(#:jar-name "java-aqute-libg.jar"
78754995
GB
7596 ;; The build fails when source/target more recent than 1.7. This
7597 ;; is a known issue. See: https://github.com/bndtools/bnd/issues/1327
7598 ;;
7599 ;; It is closed as won't fix. There is no way to change the source
7600 ;; so that it works on 1.8, and still works on 1.6, the upstream
7601 ;; target. It work fine on 1.7, so we use 1.7.
7602 #:make-flags (list "-Dant.build.javac.source=1.7"
7603 "-Dant.build.javac.target=1.7")
2ab089b7
GB
7604 #:phases
7605 (modify-phases %standard-phases
7606 (add-before 'configure 'chdir
7607 ;; Change to aQute.libg directory, so that the relative
7608 ;; paths in the tests aren't broken.
7609 (lambda _
7610 (chdir "aQute.libg")
7611 #t))
7612 (add-before 'check 'create-test-directory
7613 ;; Copy the test directory to test/java, since that's where
7614 ;; ant-build-system's default project in build.xml expects to find
7615 ;; the test classes. Leave a copy in the original place to not
7616 ;; break paths in tests.
7617 (lambda _
7618 (mkdir "src/test")
7619 (copy-recursively "test" "src/test/java")
7620 #t)))))
60ba2978
JL
7621 (inputs
7622 `(("slf4j" ,java-slf4j-api)
7623 ("osgi-annot" ,java-osgi-annotation)
7624 ("java-osgi-cmpn" ,java-osgi-cmpn)
2ab089b7
GB
7625 ("osgi" ,java-osgi-core)))
7626 (native-inputs
7627 `(("hamcrest" ,java-hamcrest-core)
7628 ("java-junit" ,java-junit)))))
5f26a131 7629
288a5959
GB
7630(define java-aqute-libg-bootstrap
7631 (package
7632 (inherit java-aqute-libg)
7633 (name "java-aqute-libg-bootstrap")
aca7dcdd
GB
7634 (arguments
7635 ;; Disable tests, at this stage of bootstrap we have no test frameworks.
3785ccd2
GB
7636 (substitute-keyword-arguments (package-arguments java-aqute-libg)
7637 ((#:tests? _ #f) #f)))
288a5959
GB
7638 (inputs
7639 `(("slf4j-bootstrap" ,java-slf4j-api-bootstrap)
7640 ,@(delete `("slf4j" ,java-slf4j-api)
aca7dcdd
GB
7641 (package-inputs java-aqute-libg))))
7642 (native-inputs '())))
288a5959 7643
5f26a131
JL
7644(define-public java-aqute-bndlib
7645 (package
7646 (inherit java-aqute-bnd-annotation)
7647 (name "java-aqute-bndlib")
7648 (arguments
7649 `(#:jar-name "java-bndlib.jar"
7650 #:source-dir "biz.aQute.bndlib/src"
7651 #:tests? #f)); no tests
7652 (inputs
7653 `(("slf4j" ,java-slf4j-api)
7654 ("osgi-annot" ,java-osgi-annotation)
7655 ("java-aqute-libg" ,java-aqute-libg)
7656 ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation)
7657 ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations)
7658 ("java-osgi-service-repository" ,java-osgi-service-repository)
7659 ("java-osgi-service-log" ,java-osgi-service-log)
7660 ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations)
7661 ("java-osgi-namespace-contract" ,java-osgi-namespace-contract)
7662 ("java-osgi-namespace-extender" ,java-osgi-namespace-extender)
7663 ("java-osgi-namespace-service" ,java-osgi-namespace-service)
7664 ("promise" ,java-osgi-util-promise)
7665 ("osgi" ,java-osgi-core)))))
25aef81d 7666
869803aa
GB
7667(define java-aqute-bndlib-bootstrap
7668 (package
7669 (inherit java-aqute-bndlib)
7670 (name "java-aqute-bndlib-bootstrap")
7671 (inputs
7672 `(("slf4j-bootstrap" ,java-slf4j-api-bootstrap)
7673 ("java-aqute-libg-bootstrap" ,java-aqute-libg-bootstrap)
7674 ,@(delete `("slf4j" ,java-slf4j-api)
7675 (delete `("java-aqute-libg" ,java-aqute-libg)
7676 (package-inputs java-aqute-bndlib)))))))
7677
25aef81d
JL
7678(define-public java-ops4j-pax-tinybundles
7679 (package
7680 (name "java-ops4j-pax-tinybundles")
7681 (version "2.1.1")
7682 (source (origin
7683 (method url-fetch)
7684 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/"
7685 "archive/tinybundles-" version ".tar.gz"))
7686 (sha256
7687 (base32
7688 "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871"))))
7689 (arguments
7690 `(#:jar-name "java-ops4j-pax-tinybundles.jar"
7691 #:source-dir "src/main/java"
7692 #:test-exclude
7693 ;; Abstract base classes for other tests
7694 (list "**/BndTest.java" "**/CoreTest.java")
7695 #:phases
7696 (modify-phases %standard-phases
7697 (add-before 'check 'fix-version
7698 (lambda _
7699 ;; This test has a reference to an old version of bndlib we are not
7700 ;; packaging. It uses the version referenced in pom.xml. We replace
7701 ;; it with our own version.
7702 (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
0f277802 7703 (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*")
2c8ac364
MW
7704 ,(package-version java-aqute-bndlib)))
7705 #t)))))
25aef81d
JL
7706 (inputs
7707 `(("lang" ,java-ops4j-base-lang)
7708 ("io" ,java-ops4j-base-io)
7709 ("store" ,java-ops4j-base-store)
7710 ("slf4j" ,java-slf4j-api)
7711 ("libg" ,java-aqute-libg)
7712 ("bndlib" ,java-aqute-bndlib)))
7713 (native-inputs
7714 `(("junit" ,java-junit)
7715 ("hamcrest" ,java-hamcrest-core)
7716 ("log4j" ,java-log4j-api)
7717 ("bndannotation" ,java-aqute-bnd-annotation)
7718 ("framework" ,java-osgi-framework)))
7719 (build-system ant-build-system)
7720 (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles")
7721 (synopsis "Java APIs to create OSGi related artifacts")
7722 (description "Tinybundles is all about creating OSGi related artifacts like
7723Bundles, Fragments and Deployment Packages with Java Api. It is very convinient
7724to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the
7725other hand, this library can be a foundation of real end user tools that need
7726to create those artifacts.")
7727 (license license:asl2.0)))
e179add0
JL
7728
7729(define-public java-ops4j-pax-exam-core
7730 (package
7731 (name "java-ops4j-pax-exam-core")
7732 (version "4.11.0")
7733 (source (origin
7734 (method url-fetch)
7735 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/"
7736 "archive/exam-reactor-" version ".tar.gz"))
7737 (sha256
7738 (base32
7739 "08mzw8nkah3rj3vznlplnawspxhp61zgvb44ifqa1rni1cvbms2g"))))
7740 (arguments
7741 `(#:jar-name "java-ops4j-pax-exam-core.jar"
7742 #:source-dir "core/pax-exam/src/main/java"
7743 #:test-dir "core/pax-exam/src/test"))
7744 (inputs
7745 `(("slf4j" ,java-slf4j-api)
7746 ("lang" ,java-ops4j-base-lang)
7747 ("io" ,java-ops4j-base-io)
7748 ("util-property" ,java-ops4j-base-util-property)
7749 ("util-store" ,java-ops4j-base-store)
7750 ("java-osgi-core" ,java-osgi-core)))
7751 (native-inputs
7752 `(("junit" ,java-junit)
7753 ("hamcrest" ,java-hamcrest-core)))
7754 (build-system ant-build-system)
7755 (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview")
7756 (synopsis "In-Container Testing for OSGi, Java EE and CDI")
7757 (description "Pax Exam creates OSGi bundles for testing purposes. It lets
7758the user take control of the OSGi framework, the test framework (e.g. JUnit) and
7759the system under test at the same time.")
7760 (license license:asl2.0)))
7a7c2b75
JL
7761
7762(define-public java-ops4j-pax-exam-core-spi
7763 (package
7764 (inherit java-ops4j-pax-exam-core)
7765 (name "java-ops4j-pax-exam-core-spi")
7766 (arguments
7767 `(#:jar-name "java-ops4j-pax-exam-spi.jar"
7768 #:source-dir "src/main/java"
7769 #:test-exclude
7770 (list
7771 ;; Abstract base class, not a test
7772 "**/BaseStagedReactorTest.java"
7773 ;; Depends on org.mortbay.jetty.testwars:test-war-dump
7774 "**/WarBuilderTest.java")
7775 #:phases
7776 (modify-phases %standard-phases
7777 (add-before 'configure 'chdir
7778 (lambda _
7779 ;; Tests assume we are in this directory
2c8ac364
MW
7780 (chdir "core/pax-exam-spi")
7781 #t))
7a7c2b75
JL
7782 (add-before 'check 'fix-tests
7783 (lambda _
7784 ;; One test checks that this file is present.
7785 (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi")
7786 (with-output-to-file
7787 "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties"
7788 (lambda _
7789 (display
7790 (string-append "artifactId = pax-exam-spi\n"
7791 "version = " ,(package-version java-ops4j-pax-exam-core-spi)))))
7792 ;; Maven puts compilation results in the target directory, while we
7793 ;; put them in the build directory.
7794 (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java"
7795 "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java"
7796 "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java")
7797 (("target") "build"))
7798 ;; One test is expected to fail, but it doesn't throw the expected exception
7799 (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java"
2c8ac364
MW
7800 (("AssertionError") "IllegalArgumentException"))
7801 #t)))))
7a7c2b75
JL
7802 (inputs
7803 `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core)
7804 ("lang" ,java-ops4j-base-lang)
7805 ("monitors" ,java-ops4j-base-monitors)
7806 ("store" ,java-ops4j-base-store)
7807 ("io" ,java-ops4j-base-io)
7808 ("spi" ,java-ops4j-base-spi)
7809 ("osgi" ,java-osgi-core)
7810 ("slf4j" ,java-slf4j-api)
7811 ("tinybundles" ,java-ops4j-pax-tinybundles)))
7812 (native-inputs
7813 `(("mockito" ,java-mockito-1)
7814 ("junit" ,java-junit)
7815 ("hamcrest" ,java-hamcrest-core)
7816 ("cglib" ,java-cglib)
7817 ("objenesis" ,java-objenesis)
7818 ("asm" ,java-asm)))))
4496d77f
JL
7819
7820(define-public java-ops4j-pax-exam-core-junit
7821 (package
7822 (inherit java-ops4j-pax-exam-core)
7823 (name "java-ops4j-pax-exam-core-junit")
7824 (arguments
7825 `(#:jar-name "ops4j-pax-exam-core-junit.jar"
7826 #:source-dir "drivers/pax-exam-junit4/src/main/java"
7827 #:tests? #f)); no tests
7828 (inputs
7829 `(("junit" ,java-junit)
7830 ("slf4j" ,java-slf4j-api)
7831 ("core" ,java-ops4j-pax-exam-core)
7832 ("spi" ,java-ops4j-pax-exam-core-spi)))
7833 (native-inputs '())))
cb05f60d
JL
7834
7835(define-public java-fasterxml-jackson-annotations
7836 (package
7837 (name "java-fasterxml-jackson-annotations")
93dceea4 7838 (version "2.9.4")
cb05f60d
JL
7839 (source (origin
7840 (method url-fetch)
7841 (uri (string-append "https://github.com/FasterXML/"
7842 "jackson-annotations/archive/"
7843 "jackson-annotations-" version ".tar.gz"))
7844 (sha256
7845 (base32
93dceea4 7846 "0mr95xd0da6a4g95zvrl1ryk5n5zv2rc696w3xnsr5hxk2gicfc4"))))
cb05f60d
JL
7847 (build-system ant-build-system)
7848 (arguments
7849 `(#:jar-name "jackson-annotations.jar"
7850 #:source-dir "src/main/java"
7851 #:test-dir "src/test"))
7852 (native-inputs
7853 `(("junit" ,java-junit)))
7854 (home-page "https://github.com/FasterXML/jackson-annotations")
7855 (synopsis "General purpose annotations for the Jackson Data Processor")
7856 (description "This package contains general purpose annotations for the
7857Jackson Data Processor, used on value and handler types. The only annotations
7858not included are ones that require dependency to the Databind package.")
7859 (license license:asl2.0)))
0b5481df
JL
7860
7861(define-public java-fasterxml-jackson-core
7862 (package
7863 (name "java-fasterxml-jackson-core")
38a0fc38 7864 (version "2.9.4")
0b5481df
JL
7865 (source (origin
7866 (method url-fetch)
7867 (uri (string-append "https://github.com/FasterXML/"
7868 "jackson-core/archive/"
7869 "jackson-core-" version ".tar.gz"))
7870 (sha256
7871 (base32
38a0fc38 7872 "159hsnk17jr1gyzkf01cxvsn45srnk37g949r7364qlsr527gjgd"))))
0b5481df
JL
7873 (build-system ant-build-system)
7874 (arguments
7875 `(#:jar-name "jackson-core.jar"
7876 #:source-dir "src/main/java"
7877 #:test-dir "src/test"
7878 #:test-exclude
7879 (list
7880 ;; Expected failure. pom.xml excludes these
7881 "**/failing/**"
7882 ;; Base classes that have no constructor for junit
7883 "**/BaseTest.java"
7884 "**/ConcurrencyReadTest.java"
7885 "**/ManualCharAccessTest.java"
7886 "**/ManualCharAccessTest.java"
7887 "**/TrailingCommasTest.java"
7888 "**/AsyncMissingValuesInObjectTest.java"
7889 "**/AsyncMissingValuesInArrayTest.java")
7890 #:phases
7891 (modify-phases %standard-phases
7892 (add-before 'configure 'generate-PackageVersion.java
7893 (lambda _
7894 (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java")
7895 (in (string-append out ".in")))
7896 (copy-file in out)
7897 (substitute* out
7898 (("@package@") "com.fasterxml.jackson.core.json")
7899 (("@projectversion@") ,version)
7900 (("@projectgroupid@") "com.fasterxml.jackson.core")
2c8ac364
MW
7901 (("@projectartifactid@") "jackson-core")))
7902 #t))
0b5481df
JL
7903 (add-before 'build 'copy-resources
7904 (lambda _
7905 (copy-recursively "src/main/resources"
2c8ac364
MW
7906 "build/classes")
7907 #t))
0b5481df
JL
7908 (add-before 'check 'copy-test-resources
7909 (lambda _
7910 (copy-recursively "src/test/resources"
2c8ac364
MW
7911 "build/test-classes")
7912 #t)))))
0b5481df
JL
7913 (native-inputs
7914 `(("junit" ,java-junit)
7915 ("hamcrest" ,java-hamcrest-core)))
7916 (home-page "https://github.com/FasterXML/jackson-core")
7917 (synopsis "")
7918 (description "")
7919 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
f234c7a0
JL
7920
7921(define-public java-fasterxml-jackson-databind
7922 (package
7923 (name "java-fasterxml-jackson-databind")
3c1edff5 7924 (version "2.9.4")
f234c7a0
JL
7925 (source (origin
7926 (method url-fetch)
7927 (uri (string-append "https://github.com/FasterXML/"
7928 "jackson-databind/archive/"
7929 "jackson-databind-" version ".tar.gz"))
7930 (sha256
7931 (base32
3c1edff5 7932 "1zd2cw4z6kdkbx8za96xh9pyicv2a2l7y0rkcx2fqd8hv6d47s08"))))
f234c7a0
JL
7933 (build-system ant-build-system)
7934 (arguments
7935 `(#:jar-name "jackson-databind.jar"
7936 #:source-dir "src/main/java"
7937 #:tests? #f; requires javax.measures for which I can't find a free implementation
7938 #:phases
7939 (modify-phases %standard-phases
7940 (add-before 'configure 'generate-PackageVersion.java
7941 (lambda _
7942 (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java")
7943 (in (string-append out ".in")))
7944 (copy-file in out)
7945 (substitute* out
7946 (("@package@") "com.fasterxml.jackson.databind.cfg")
7947 (("@projectversion@") ,version)
7948 (("@projectgroupid@") "com.fasterxml.jackson.databind")
2c8ac364
MW
7949 (("@projectartifactid@") "jackson-databind")))
7950 #t))
f234c7a0
JL
7951 (add-before 'build 'copy-resources
7952 (lambda _
2c8ac364
MW
7953 (copy-recursively "src/main/resources" "build/classes")
7954 #t)))))
f234c7a0
JL
7955 (inputs
7956 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7957 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)))
7958 (home-page "https://github.com/FasterXML/jackson-databind")
7959 (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor")
7960 (description "This package contains the general-purpose data-binding
7961functionality and tree-model for Jackson Data Processor. It builds on core
7962streaming parser/generator package, and uses Jackson Annotations for
7963configuration.")
7964 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
d57d8b89
JL
7965
7966(define-public java-fasterxml-jackson-modules-base-jaxb
7967 (package
7968 (name "java-fasterxml-jackson-modules-base-jaxb")
07207211 7969 (version "2.9.4")
d57d8b89
JL
7970 (source (origin
7971 (method url-fetch)
7972 (uri (string-append "https://github.com/FasterXML/"
7973 "jackson-modules-base/archive/"
7974 "jackson-modules-base-" version ".tar.gz"))
7975 (sha256
7976 (base32
07207211 7977 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
d57d8b89
JL
7978 (build-system ant-build-system)
7979 (arguments
7980 `(#:jar-name "jackson-modules-base-jaxb.jar"
7981 #:source-dir "jaxb/src/main/java"
7982 #:test-dir "jaxb/src/test"
7983 #:test-exclude
7984 ;; Base class for tests
7985 (list "**/BaseJaxbTest.java")
7986 #:phases
7987 (modify-phases %standard-phases
7988 (add-before 'configure 'generate-PackageVersion.java
7989 (lambda _
7990 (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/"
7991 "jackson/module/jaxb/PackageVersion.java"))
7992 (in (string-append out ".in")))
7993 (copy-file in out)
7994 (substitute* out
7995 (("@package@") "com.fasterxml.jackson.module.jaxb")
7996 (("@projectversion@") ,version)
7997 (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb")
2c8ac364
MW
7998 (("@projectartifactid@") "jackson-module-jaxb")))
7999 #t))
d57d8b89
JL
8000 (add-before 'build 'copy-resources
8001 (lambda _
2c8ac364
MW
8002 (copy-recursively "jaxb/src/main/resources" "build/classes")
8003 #t)))))
d57d8b89
JL
8004 (inputs
8005 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
8006 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
8007 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
8008 (native-inputs
8009 `(("java-junit" ,java-junit)))
8010 (home-page "https://github.com/FasterXML/jackson-modules-base")
8011 (synopsis "Jaxb annotations jackson module")
8012 (description "This package is the jaxb annotations module for jackson.")
8013 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
0f296d37 8014
5165fb40
DM
8015(define-public java-fasterxml-jackson-modules-base-mrbean
8016 (package
8017 (name "java-fasterxml-jackson-modules-base-mrbean")
8018 (version "2.9.4")
8019 (source (origin
8020 (method url-fetch)
8021 (uri (string-append "https://github.com/FasterXML/"
8022 "jackson-modules-base/archive/"
8023 "jackson-modules-base-" version ".tar.gz"))
8024 (sha256
8025 (base32
8026 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
8027 (build-system ant-build-system)
8028 (arguments
8029 `(#:jar-name "jackson-modules-base-mrbean.jar"
8030 #:source-dir "mrbean/src/main/java"
8031 #:test-dir "mrbean/src/test"
8032 #:test-exclude
8033 ;; Base class for tests
8034 (list "**/BaseTest.java")
8035 #:phases
8036 (modify-phases %standard-phases
8037 (add-before 'configure 'generate-PackageVersion.java
8038 (lambda _
8039 (let* ((out (string-append "mrbean/src/main/java/com/fasterxml/"
8040 "jackson/module/mrbean/PackageVersion.java"))
8041 (in (string-append out ".in")))
8042 (copy-file in out)
8043 (substitute* out
8044 (("@package@") "com.fasterxml.jackson.module.mrbean")
8045 (("@projectversion@") ,version)
8046 (("@projectgroupid@") "com.fasterxml.jackson.module.mrbean")
8047 (("@projectartifactid@") "jackson-module-mrbean")))
8048 #t)))))
8049 (inputs
8050 `(("java-asm" ,java-asm)
8051 ("java-fasterxml-jackson-annotations"
8052 ,java-fasterxml-jackson-annotations)
8053 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
8054 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
8055 (native-inputs
8056 `(("java-junit" ,java-junit)))
8057 (home-page "https://github.com/FasterXML/jackson-modules-base")
8058 (synopsis "POJO type materialization for Java")
8059 (description "This package implements POJO type materialization.
8060Databinders can construct implementation classes for Java interfaces as part
8061of deserialization.")
8062 (license license:asl2.0)))
8063
0f296d37
JL
8064(define-public java-snakeyaml
8065 (package
8066 (name "java-snakeyaml")
8067 (version "1.18")
8068 (source (origin
8069 (method url-fetch)
8070 (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
8071 version ".tar.gz"))
307856cd 8072 (file-name (string-append name "-" version ".tar.gz"))
0f296d37
JL
8073 (sha256
8074 (base32
8075 "0rf5ha6w0waz50jz2479jsrbgmd0dnx0gs337m126j5z7zlmg7mg"))))
8076 (build-system ant-build-system)
8077 (arguments
8078 `(#:jar-name "java-snakeyaml.jar"
8079 #:source-dir "src/main/java"
8080 ;; Tests require velocity, a cyclic dependency, and
8081 ;; java-spring-framework-context which is not packaged.
8082 #:tests? #f))
8083 (home-page "https://bitbucket.org/asomov/snakeyaml")
8084 (synopsis "YAML processor")
8085 (description "SnakeYAML is a YAML processor for the Java Virtual Machine.")
8086 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
087c8fd2
JL
8087
8088(define-public java-fasterxml-jackson-dataformat-yaml
8089 (package
8090 (name "java-fasterxml-jackson-dataformat-yaml")
1f2be88f 8091 (version "2.9.4")
087c8fd2
JL
8092 (source (origin
8093 (method url-fetch)
8094 (uri (string-append "https://github.com/FasterXML/"
8095 "jackson-dataformats-text/archive/"
8096 "jackson-dataformats-text-" version ".tar.gz"))
8097 (sha256
8098 (base32
1f2be88f 8099 "1hikl06khaxbg439avf442qifcadap8w0lx13f0nnhp2vh3dkbz7"))))
087c8fd2
JL
8100 (build-system ant-build-system)
8101 (arguments
8102 `(#:jar-name "jackson-dataformat-yaml.jar"
8103 #:source-dir "yaml/src/main/java"
8104 #:test-dir "yaml/src/test"
8105 #:test-exclude (list "**/failing/**.java")
8106 #:phases
8107 (modify-phases %standard-phases
8108 (add-before 'configure 'generate-PackageVersion.java
8109 (lambda _
8110 (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java")
8111 (in (string-append out ".in")))
8112 (copy-file in out)
8113 (substitute* out
8114 (("@package@") "com.fasterxml.jackson.dataformat.yaml")
8115 (("@projectversion@") ,version)
8116 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml")
2c8ac364
MW
8117 (("@projectartifactid@") "jackson-dataformat-yaml")))
8118 #t)))))
087c8fd2
JL
8119 (inputs
8120 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
8121 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
8122 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
8123 ("java-snakeyaml" ,java-snakeyaml)))
8124 (native-inputs
8125 `(("junit" ,java-junit)
8126 ("hamcrest" ,java-hamcrest-core)
8127 ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi)
8128 ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit)
8129 ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core)))
8130 (home-page "https://github.com/FasterXML/jackson-dataformats-text")
8131 (synopsis "Yaml backend for Jackson")
8132 (description "Dataformat backends are used to support format alternatives
8133to JSON, supported by default. This is done by sub-classing Jackson core
8134abstractions.")
8135 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
6fd07b98
JL
8136
8137(define-public java-stax2-api
8138 (package
8139 (name "java-stax2-api")
8140 (version "4.0.0")
8141 (source (origin
8142 (method url-fetch)
8143 (uri (string-append "https://github.com/FasterXML/stax2-api/archive/"
8144 "stax2-api-" version ".tar.gz"))
8145 (sha256
8146 (base32
8147 "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq"))))
8148 (build-system ant-build-system)
8149 (arguments
8150 `(#:jar-name "java-stax2-api.jar"
8151 #:source-dir "src/main/java"
8152 #:tests? #f)); no tests
8153 (home-page "https://github.com/FasterXML/stax2-api")
8154 (synopsis "Stax2 API")
8155 (description "Stax2 API is an extension to basic Stax 1.0 API that adds
8156significant new functionalities, such as full-featured bi-direction validation
8157interface and high-performance Typed Access API.")
8158 (license license:bsd-2)))
40f193f3
JL
8159
8160(define-public java-woodstox-core
8161 (package
8162 (name "java-woodstox-core")
8163 (version "5.0.3")
8164 (source (origin
8165 (method url-fetch)
8166 (uri (string-append "https://github.com/FasterXML/woodstox/archive/"
8167 "woodstox-core-" version ".tar.gz"))
8168 (sha256
8169 (base32
8170 "1i7pdgb8jbw6gdy5kmm0l6rz109n2ns92pqalpyp24vb8vlvdfd4"))))
8171 (build-system ant-build-system)
8172 (arguments
8173 `(#:jar-name "woodstox.jar"
8174 #:test-exclude
8175 (list "**/Base*.java" "failing/**")
8176 #:phases
8177 (modify-phases %standard-phases
8178 (add-before 'build 'remove-msv-dep
8179 (lambda _
8180 ;; we don't need osgi, and it depends on msv
8181 (delete-file-recursively "src/main/java/com/ctc/wstx/osgi")
8182 ;; msv's latest release is from 2011 and we don't need it
8183 (delete-file-recursively "src/main/java/com/ctc/wstx/msv")
8184 (delete-file-recursively "src/test/java/wstxtest/osgi")
2c8ac364
MW
8185 (delete-file-recursively "src/test/java/wstxtest/msv")
8186 #t))
40f193f3
JL
8187 (add-before 'build 'copy-resources
8188 (lambda _
2c8ac364
MW
8189 (copy-recursively "src/main/resources" "build/classes")
8190 #t)))))
40f193f3
JL
8191 (inputs
8192 `(("stax2" ,java-stax2-api)))
8193 (native-inputs
8194 `(("junit" ,java-junit)))
8195 (home-page "https://github.com/FasterXML/woodstox")
8196 (synopsis "Stax XML API implementation")
8197 (description "Woodstox is a stax XML API implementation.")
8198 (license license:asl2.0)))
262a4d33
JL
8199
8200(define-public java-fasterxml-jackson-dataformat-xml
8201 (package
8202 (name "java-fasterxml-jackson-dataformat-xml")
f3bbe029 8203 (version "2.9.4")
262a4d33
JL
8204 (source (origin
8205 (method url-fetch)
8206 (uri (string-append "https://github.com/FasterXML/"
8207 "jackson-dataformat-xml/archive/"
8208 "jackson-dataformat-xml-" version ".tar.gz"))
8209 (sha256
8210 (base32
f3bbe029 8211 "111fkkl90w31jbf30kgj82qdcxlw4sxppki7i198liw0ck1jcavq"))))
262a4d33
JL
8212 (build-system ant-build-system)
8213 (arguments
8214 `(#:jar-name "jackson-dataformat-xml.jar"
8215 #:source-dir "src/main/java"
8216 #:test-exclude
8217 (list "**/failing/**")
8218 #:phases
8219 (modify-phases %standard-phases
8220 (add-before 'configure 'generate-PackageVersion.java
8221 (lambda _
8222 (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java")
8223 (in (string-append out ".in")))
8224 (copy-file in out)
8225 (newline)
8226 (substitute* out
8227 (("@package@") "com.fasterxml.jackson.dataformat.xml")
8228 (("@projectversion@") ,version)
8229 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml")
2c8ac364
MW
8230 (("@projectartifactid@") "jackson-dataformat-xml")))
8231 #t))
262a4d33
JL
8232 (add-before 'build 'copy-resources
8233 (lambda _
2c8ac364
MW
8234 (copy-recursively "src/main/resources" "build/classes")
8235 #t)))))
262a4d33
JL
8236 (inputs
8237 `(("jackson-annotations" ,java-fasterxml-jackson-annotations)
8238 ("jackson-core" ,java-fasterxml-jackson-core)
8239 ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb)
8240 ("jackson-databind" ,java-fasterxml-jackson-databind)
8241 ("stax2-api" ,java-stax2-api)
8242 ("woodstox" ,java-woodstox-core)))
8243 (native-inputs
8244 `(("junit" ,java-junit)
8245 ("hamcrest" ,java-hamcrest-core)))
8246 (home-page "https://github.com/FasterXML/jackson-dataformat-xml")
8247 (synopsis "Read and write XML")
8248 (description "This package contains Jackson extension component for reading
8249and writing XML encoded data.
8250
8251Further, the goal is to emulate how JAXB data-binding works with \"Code-first\"
8252approach (that is, no support is added for \"Schema-first\" approach). Support
8253for JAXB annotations is provided by JAXB annotation module; this module
8254provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator},
8255@code{JsonFactory}) as well as small number of higher level overrides needed to
8256make data-binding work.")
8257 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
90a127c7
JL
8258
8259(define-public java-hdrhistogram
8260 (package
8261 (name "java-hdrhistogram")
8262 (version "2.1.9")
8263 (source (origin
8264 (method url-fetch)
8265 (uri (string-append "https://github.com/HdrHistogram/HdrHistogram/"
8266 "archive/HdrHistogram-" version ".tar.gz"))
8267 (sha256
8268 (base32
8269 "1sicbmc3sr42nw93qbkb26q9rn33ag33k6k77phjc3j5h5gjffqv"))))
8270 (build-system ant-build-system)
8271 (arguments
8272 `(#:jar-name "java-hdrhistogram.jar"
8273 #:source-dir "src/main/java"
8274 #:phases
8275 (modify-phases %standard-phases
8276 (add-before 'configure 'set-version
8277 (lambda _
8278 (let* ((version-java "src/main/java/org/HdrHistogram/Version.java")
8279 (template (string-append version-java ".template")))
8280 (copy-file template version-java)
8281 (substitute* version-java
8282 (("\\$VERSION\\$") ,version)
8283 (("\\$BUILD_TIME\\$") "0"))
8284 #t))))))
8285 (native-inputs
8286 `(("junit" ,java-junit)
8287 ("hamcrest" ,java-hamcrest-core)))
8288 (home-page "https://hdrhistogram.github.io/HdrHistogram")
8289 (synopsis "High dynamic range histogram")
8290 (description "Hdrhistogram allows to create histograms that support
8291recording and analyzing sampled data value counts across a configurable integer
8292value range with configurable value precision within the range. Value precision
8293is expressed as the number of significant digits in the value recording, and
8294provides control over value quantization behavior across the value range and
8295the subsequent value resolution at any given level.")
8296 (license license:public-domain)))
5d104a27 8297
c5ff11dc
RW
8298(define-public java-cofoja
8299 (package
8300 (name "java-cofoja")
8301 (version "1.3")
8302 (source (origin
8303 (method git-fetch)
8304 (uri (git-reference
8305 (url "https://github.com/nhatminhle/cofoja.git")
8306 (commit (string-append "v" version))))
8307 (file-name (string-append "java-cofoja-" version "-checkout"))
8308 (sha256
8309 (base32
8310 "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w"))))
8311 (build-system ant-build-system)
8312 (arguments
8313 `(#:build-target "dist"
8314 #:test-target "test"
8315 #:jdk ,icedtea-8
8316 #:make-flags
8317 (list "-Ddist.dir=dist")
8318 #:modules ((guix build ant-build-system)
8319 (guix build java-utils)
8320 (guix build utils)
8321 (srfi srfi-1)
8322 (ice-9 match))
8323 #:phases
8324 (modify-phases %standard-phases
8325 ;; The bulid system ignores the class path the ant-build-system sets
8326 ;; up and instead expects to find all dependencies in the "lib"
8327 ;; directory.
8328 (add-after 'unpack 'create-libdir
8329 (lambda* (#:key inputs #:allow-other-keys)
8330 (mkdir-p "lib")
8331 (for-each
8332 (lambda (file)
8333 (let ((target (string-append "lib/" (basename file))))
8334 (unless (file-exists? target)
8335 (symlink file target))))
8336 (append-map (match-lambda
8337 ((label . dir)
8338 (find-files dir "\\.jar$")))
8339 inputs))
8340 #t))
8341 (replace 'install (install-jars "dist")))))
8342 (inputs
8343 `(("java-asm" ,java-asm)))
8344 (native-inputs
8345 `(("java-junit" ,java-junit)))
8346 (home-page "https://github.com/nhatminhle/cofoja")
8347 (synopsis "Contracts for Java")
8348 (description "Contracts for Java, or Cofoja for short, is a contract
8349programming framework and test tool for Java, which uses annotation processing
8350and bytecode instrumentation to provide run-time checking. (In particular,
8351this is not a static analysis tool.)")
8352 (license license:lgpl3+)))
8353
5d104a27
JL
8354(define-public java-aopalliance
8355 (package
8356 (name "java-aopalliance")
8357 (version "1.0")
8358 (source (origin
8359 (method git-fetch)
8360 ;; Note: this git repository is not official, but contains the
8361 ;; source code that is in the CVS repository. Downloading the
8362 ;; tarball from sourceforge is undeterministic, and the cvs download
8363 ;; fails.
8364 (uri (git-reference
8365 (url "https://github.com/hoverruan/aopalliance")
8366 (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0")))
8367 (file-name (string-append name "-" version))
8368 (sha256
8369 (base32
8370 "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr"))))
8371 (build-system ant-build-system)
8372 (arguments
8373 `(#:jar-name "java-aopalliance.jar"
8374 #:jdk ,icedtea-8
8375 #:tests? #f; no tests
8376 #:source-dir "aopalliance/src/main"))
8377 (home-page "http://aopalliance.sourceforge.net")
8378 (synopsis "Aspect-Oriented Programming")
8379 (description "The AOP Alliance project is a joint project between several
8380software engineering people who are interested in Aspect-Oriented Programming
8381(AOP) and Java.")
8382 (license license:public-domain)))
454536e0
JL
8383
8384(define-public java-javax-inject
8385 (package
8386 (name "java-javax-inject")
8387 (version "tck-1")
8388 (source (origin
8389 (method url-fetch)
8390 (uri (string-append "https://github.com/javax-inject/javax-inject/"
8391 "archive/javax.inject-" version ".tar.gz"))
8392 (sha256
8393 (base32
8394 "1ydrlvh2r7vr1g7lhjwy3w2dggpj9h6pix1lakkkgdywb365n6g0"))))
8395 (build-system ant-build-system)
8396 (arguments
8397 `(#:jar-name "java-javax-inject.jar"
8398 #:jdk ,icedtea-8
8399 #:tests? #f)); no tests
8400 (home-page "http://github.com/javax-inject/javax-inject")
8401 (synopsis "JSR-330: Dependency Injection for Java")
8402 (description "This package specifies a means for obtaining objects in such
8403a way as to maximize reusability, testability and maintainability compared to
8404traditional approaches such as constructors, factories, and service locators
8405(e.g., JNDI). This process, known as dependency injection, is beneficial to
8406most nontrivial applications.
8407
8408Many types depend on other types. For example, a @var{Stopwatch} might depend
8409on a @var{TimeSource}. The types on which a type depends are known as its
8410dependencies. The process of finding an instance of a dependency to use at run
8411time is known as resolving the dependency. If no such instance can be found,
8412the dependency is said to be unsatisfied, and the application is broken.")
8413 (license license:asl2.0)))
5766984b
JL
8414
8415(define-public java-guice
8416 (package
8417 (name "java-guice")
8418 (version "4.1")
8419 (source (origin
8420 (method url-fetch)
8421 (uri (string-append "https://github.com/google/guice/archive/"
8422 version ".tar.gz"))
8423 (file-name (string-append name "-" version ".tar.gz"))
9936ffe7
BH
8424 (modules '((guix build utils)))
8425 (snippet
8426 `(begin
8427 (for-each delete-file (find-files "." ".*.jar"))))
5766984b
JL
8428 (sha256
8429 (base32
8430 "0dwmqjzlavb144ywqqglj3h68hqszkff8ai0a42hyb5il0qh4rbp"))))
8431 (build-system ant-build-system)
8432 (arguments
8433 `(#:jar-name "java-guice.jar"
8434 #:jdk ,icedtea-8
8435 #:tests? #f; FIXME: tests are not in a java sub directory
8436 #:source-dir "core/src"))
8437 (inputs
8438 `(("guava" ,java-guava)
8439 ("java-cglib" ,java-cglib)
8440 ("java-aopalliance" ,java-aopalliance)
8441 ("java-javax-inject" ,java-javax-inject)
8442 ("java-asm" ,java-asm)))
8443 (home-page "https://github.com/google/guice")
8444 (synopsis "Lightweight dependency injection framework")
8445 (description "Guice is a lightweight dependency injection framework fo
8446Java 6 and above.")
8447 (license license:asl2.0)))
ec4e8ad7
JL
8448
8449(define-public java-guice-servlet
8450 (package
8451 (inherit java-guice)
8452 (name "java-guice-servlet")
8453 (arguments
8454 `(#:jar-name "guice-servlet.jar"
8455 #:source-dir "extensions/servlet/src/"
8456 #:jdk ,icedtea-8
8457 #:tests? #f)); FIXME: not in a java subdir
8458 (inputs
8459 `(("guice" ,java-guice)
10eddaca 8460 ("servlet" ,java-classpathx-servletapi)
ec4e8ad7 8461 ,@(package-inputs java-guice)))))
b12fe1e5
JL
8462
8463(define-public java-assertj
8464 (package
8465 (name "java-assertj")
8466 (version "3.8.0")
8467 (source (origin
8468 (method url-fetch)
8469 (uri (string-append "https://github.com/joel-costigliola/"
8470 "assertj-core/archive/"
8471 "assertj-core-" version ".tar.gz"))
8472 (sha256
8473 (base32
8474 "1kf124fxskf548rklkg86294w2x6ajqrff94rrhyqns31danqkfz"))))
8475 (build-system ant-build-system)
8476 (arguments
8477 `(#:jar-name "java-assertj.jar"
8478 #:jdk ,icedtea-8
8479 #:source-dir "src/main/java"
8480 #:tests? #f)); depends on tng-junit which depends on assertj
8481 (inputs
8482 `(("cglib" ,java-cglib)
8483 ("junit" ,java-junit)
8484 ("hamcrest" ,java-hamcrest-core)))
8485 (native-inputs
8486 `(("mockito" ,java-mockito-1)))
8487 (home-page "https://joel-costigliola.github.io/assertj/index.html")
8488 (synopsis "Fluent assertions for java")
8489 (description "AssertJ core is a Java library that provides a fluent
8490interface for writing assertions. Its main goal is to improve test code
8491readability and make maintenance of tests easier.")
8492 (license license:asl2.0)))
6768e0a7
JL
8493
8494(define-public java-jboss-javassist
8495 (package
8496 (name "java-jboss-javassist")
8497 (version "3.21.0")
8498 (source (origin
8499 (method url-fetch)
8500 (uri (string-append "https://github.com/jboss-javassist/javassist/"
8501 "archive/rel_"
8502 (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)
8503 "_ga.tar.gz"))
8504 (sha256
8505 (base32
8506 "10lpcr3sbf7y6fq6fc2h2ik7rqrivwcy4747bg0kxhwszil3cfmf"))))
8507 (build-system ant-build-system)
8508 (arguments
8509 `(#:jar-name "java-jboss-javassist.jar"
8510 #:jdk ,icedtea-8
8511 #:source-dir "src/main"
8512 #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3
8513 #:phases
8514 (modify-phases %standard-phases
8515 (add-before 'configure 'remove-binary
8516 (lambda _
8517 (delete-file "javassist.jar")
8518 #t)))))
8519 (native-inputs
8520 `(("junit" ,java-junit)))
8521 (home-page "https://github.com/jboss-javassist/javassist")
8522 (synopsis "Java bytecode engineering toolkit")
8523 (description "Javassist (JAVA programming ASSISTant) makes Java bytecode
8524manipulation simple. It is a class library for editing bytecodes in Java; it
8525enables Java programs to define a new class at runtime and to modify a class
8526file when the JVM loads it.")
8527 (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl.
a6dd06d0
JL
8528
8529(define-public java-jcommander
8530 (package
8531 (name "java-jcommander")
8532 (version "1.71")
8533 (source (origin
8534 (method url-fetch)
8535 (uri (string-append "https://github.com/cbeust/jcommander/archive/"
8536 version ".tar.gz"))
8537 (file-name (string-append name "-" version ".tar.gz"))
8538 (sha256
8539 (base32
8540 "1f5k2ckay6qjc3d3w3d7bc0p3cx3c7n6p6zxvw1kibqdr0q98wlx"))))
8541 (build-system ant-build-system)
8542 (arguments
8543 `(#:jar-name "java-jcommander.jar"
8544 #:jdk ,icedtea-8
8545 #:tests? #f; requires testng which depends on jcommander
8546 #:source-dir "src/main/java"))
8547 (home-page "http://jcommander.org")
8548 (synopsis "Command line parameters parser")
8549 (description "JCommander is a very small Java framework that makes it
8550trivial to parse command line parameters. Parameters are declared with
8551annotations.")
8552 (license license:asl2.0)))
11bc385b
JL
8553
8554(define-public java-bsh
8555 (package
8556 (name "java-bsh")
8557 (version "2.0b6")
8558 (source (origin
8559 (method url-fetch)
8560 (uri (string-append "https://github.com/beanshell/beanshell/archive/"
8561 version ".tar.gz"))
8562 (file-name (string-append name "-" version ".tar.gz"))
8563 (sha256
8564 (base32
8565 "1bawkxk6jyc75hxvzkpz689h73cn3f222m0ar3nvb0dal2b85kfv"))))
8566 (build-system ant-build-system)
8567 (arguments
8568 `(#:build-target "jarall"
8569 #:test-target "junit-tests-all"
8570 #:phases
8571 (modify-phases %standard-phases
8572 (replace 'install
8573 (lambda* (#:key outputs #:allow-other-keys)
8574 (let ((share (string-append (assoc-ref outputs "out") "/share/java")))
8575 (mkdir-p share)
8576 (copy-file "dist/bsh-2.0b6.jar" (string-append share "/bsh-2.0b6.jar"))
8577 #t))))))
8578 (home-page "http://beanshell.org/")
8579 (synopsis "Lightweight Scripting for Java")
8580 (description "BeanShell is a small, free, embeddable Java source
8581interpreter with object scripting language features, written in Java.
8582BeanShell dynamically executes standard Java syntax and extends it with common
8583scripting conveniences such as loose types, commands, and method closures like
8584those in Perl and JavaScript.")
8585 (license license:asl2.0)))
7a343e97
JL
8586
8587(define-public java-fest-util
8588 (package
8589 (name "java-fest-util")
8590 (version "1.2.5")
8591 (source (origin
8592 (method url-fetch)
8593 (uri (string-append "https://github.com/alexruiz/fest-util/"
8594 "archive/fest-util-" version ".tar.gz"))
8595 (sha256
8596 (base32
8597 "05g6hljz5mdaakk8d7g32klbhz9bdwp3qlj6rdaggdidxs3x1sb8"))))
8598 (build-system ant-build-system)
8599 (arguments
8600 `(#:jar-name "java-fest-util.jar"
8601 #:source-dir "src/main/java"))
8602 (native-inputs
8603 `(("junit" ,java-junit)
8604 ("hamcrest" ,java-hamcrest-core)))
8605 (home-page "https://github.com/alexruiz/fest-util")
8606 (synopsis "FEST common utilities")
8607 (description "Common utilities used in all FEST module.")
8608 (license license:asl2.0)))
3c6c8358
JL
8609
8610(define-public java-fest-test
8611 (package
8612 (name "java-fest-test")
8613 (version "2.1.0")
8614 (source (origin
8615 (method url-fetch)
8616 (uri (string-append "https://github.com/alexruiz/fest-test/"
8617 "archive/fest-test-" version ".tar.gz"))
8618 (sha256
8619 (base32
8620 "1rxfbw6l9vc65iy1x3fb617qc6y4w2k430pgf1mfbxfdlxbm0f7g"))))
8621 (build-system ant-build-system)
8622 (arguments
8623 `(#:jar-name "java-fest-test.jar"
8624 #:source-dir "src/main/java"
8625 #:tests? #f)); no tests
8626 (inputs
8627 `(("junit" ,java-junit)))
8628 (home-page "https://github.com/alexruiz/fest-test")
8629 (synopsis "Common FEST testing infrastructure")
8630 (description "Fest-test contains the common FEST testing infrastructure.")
8631 (license license:asl2.0)))
ca98e448
JL
8632
8633(define-public java-fest-assert
8634 (package
8635 (name "java-fest-assert")
8636 (version "2.0M10")
8637 (source (origin
8638 (method url-fetch)
8639 (uri (string-append "https://github.com/alexruiz/fest-assert-2.x/"
8640 "archive/fest-assert-core-" version ".tar.gz"))
8641 (sha256
8642 (base32
8643 "1bi0iqavikzww6rxvz5jyg7y6bflv95s6ibryxx0xfcxrrw6i5lw"))))
8644 (build-system ant-build-system)
8645 (arguments
8646 `(#:jar-name "java-fest-assert.jar"
8647 #:source-dir "src/main/java"
8648 #:test-exclude
8649 (list
8650 "**/Abstract*.java"
8651 "**/*BaseTest.java"
8652 ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses
8653 "**/MessageFormatter_format_Test.java"
8654 "**/internal/*/*_assert*_Test.java")))
8655 (inputs
8656 `(("java-fest-util" ,java-fest-util)))
8657 (native-inputs
8658 `(("java-junit" ,java-junit)
8659 ("java-fest-test" ,java-fest-test)
8660 ("java-hamcrest-core" ,java-hamcrest-core)
8661 ("java-mockito" ,java-mockito-1)
8662 ("java-cglib" ,java-cglib)
8663 ("java-objenesis" ,java-objenesis)
8664 ("java-asm" ,java-asm)))
8665 (home-page "https://github.com/alexruiz/fest-assert-2.x")
8666 (synopsis "FEST fluent assertions")
8667 (description "FEST-Assert provides a fluent interface for assertions.")
8668 (license license:asl2.0)))
0442d897
JL
8669
8670(define-public java-testng
8671 (package
8672 (name "java-testng")
3422e10e 8673 (version "6.14.3")
0442d897 8674 (source (origin
36b39d16
RW
8675 (method git-fetch)
8676 (uri (git-reference
8677 (url "https://github.com/cbeust/testng.git")
8678 (commit version)))
8679 (file-name (string-append name "-" version "-checkout"))
0442d897
JL
8680 (sha256
8681 (base32
3422e10e 8682 "0y6vq30i5g276kw0v2bhbvci22ijg7ax49ap2611yqlhbs4d6dqv"))))
0442d897
JL
8683 (build-system ant-build-system)
8684 (arguments
8685 `(#:jdk ,icedtea-8; java.util.function
8686 #:jar-name "java-testng.jar"
8687 #:source-dir "src/main/java"
8688 #:phases
8689 (modify-phases %standard-phases
36b39d16
RW
8690 ;; FIXME: I don't know why these tests fail
8691 (add-after 'unpack 'delete-failing-tests
8692 (lambda _
8693 (substitute* "src/test/resources/testng.xml"
8694 (("<class name=\"test.configuration.github1625.TestRunnerIssue1625\"/>") "")
8695 (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") ""))
8696 #t))
8697 ;; We don't have groovy
8698 (add-after 'unpack 'delete-groovy-tests
8699 (lambda _
8700 (delete-file-recursively "src/test/java/test/dependent/issue1648/")
8701 (substitute* "src/test/resources/testng.xml"
8702 (("<class name=\"test.dependent.issue1648.TestRunner\"/>") ""))
8703 #t))
0442d897
JL
8704 (add-before 'build 'copy-resources
8705 (lambda _
8706 (copy-recursively "src/main/resources" "build/classes")
8707 #t))
8708 (add-before 'check 'copy-test-resources
8709 (lambda _
8710 (copy-recursively "src/test/resources" "build/test-classes")
8711 #t))
8712 (replace 'check
8713 (lambda _
2c8ac364 8714 (invoke "ant" "compile-tests")
0442d897
JL
8715 ;; we don't have groovy
8716 (substitute* "src/test/resources/testng.xml"
8717 (("<class name=\"test.groovy.GroovyTest\" />") ""))
2c8ac364
MW
8718 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8719 ":build/classes"
8720 ":build/test-classes")
8721 "-Dtest.resources.dir=src/test/resources"
8722 "org.testng.TestNG" "src/test/resources/testng.xml"))))))
0442d897
JL
8723 (propagated-inputs
8724 `(("junit" ,java-junit)
8725 ("java-jsr305" ,java-jsr305)
8726 ("java-bsh" ,java-bsh)
8727 ("java-jcommander" ,java-jcommander)
8728 ("java-guice" ,java-guice)
8729 ("snakeyaml" ,java-snakeyaml)))
8730 (native-inputs
8731 `(("guava" ,java-guava)
8732 ("java-javax-inject" ,java-javax-inject)
8733 ("java-hamcrest" ,java-hamcrest-all)
8734 ("java-assertj" ,java-assertj)
36b39d16 8735 ("java-mockito" ,java-mockito-1)
0442d897
JL
8736 ("cglib" ,java-cglib)
8737 ("asm" ,java-asm)
8738 ("aopalliance" ,java-aopalliance)))
8739 (home-page "http://testng.org")
8740 (synopsis "Testing framework")
8741 (description "TestNG is a testing framework inspired from JUnit and NUnit
8742but introducing some new functionalities that make it more powerful and easier
8743to use.")
8744 (license license:asl2.0)))
1717a7de
JL
8745
8746(define-public java-jnacl
3e87923a
RW
8747 (let ((commit "094e819afdd63ea81a499b3bcb42a271006bebd9")
8748 (revision "2"))
8749 (package
8750 (name "java-jnacl")
8751 (version (string-append "0.1.0-" revision "." (string-take commit 7)))
8752 (source (origin
8753 (method git-fetch)
8754 (uri (git-reference
8755 (url "https://github.com/neilalexander/jnacl.git")
8756 (commit commit)))
6c34ad73 8757 (file-name (git-file-name name version))
3e87923a
RW
8758 (sha256
8759 (base32
8760 "1d6g6xhn83byv5943n7935wwjsk0ibk0qdvqgr699qqgqqmwisbb"))))
8761 (build-system ant-build-system)
8762 (arguments
8c7d32e0 8763 `(#:jar-name "jnacl.jar"
3e87923a
RW
8764 #:source-dir "src/main/java"
8765 #:jdk ,icedtea-8
8766 #:phases
8767 (modify-phases %standard-phases
8768 (add-before 'build 'fix-tests
8769 (lambda _
8770 (substitute* '("src/test/java/com/neilalexander/jnacl/NaClTest.java"
8771 "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java")
8772 (("assertions.Assertions") "assertions.api.Assertions"))
8773 #t))
8774 (replace 'check
8775 (lambda _
8776 (invoke "ant" "compile-tests")
8777 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8778 ":build/classes"
8779 ":build/test-classes")
8780 "org.testng.TestNG" "-testclass"
8781 "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class")
8782 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8783 ":build/classes"
8784 ":build/test-classes")
8785 "org.testng.TestNG" "-testclass"
2c8ac364 8786 "build/test-classes/com/neilalexander/jnacl/NaClTest.class"))))))
3e87923a
RW
8787 (native-inputs
8788 `(("java-testng" ,java-testng)
8789 ("java-fest-util" ,java-fest-util)
8790 ("java-fest-assert" ,java-fest-assert)))
8791 (home-page "https://github.com/neilalexander/jnacl")
8792 (synopsis "Java implementation of NaCl")
8793 (description "Pure Java implementation of the NaCl: Networking and
1717a7de 8794Cryptography library.")
3e87923a 8795 (license license:bsd-2))))
eaf3cb7a
JL
8796
8797(define-public java-mvel2
8798 (package
8799 (name "java-mvel2")
8800 (version "2.3.1")
8801 (source (origin
8802 (method url-fetch)
8803 (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-"
8804 version ".Final.tar.gz"))
8805 (sha256
8806 (base32
8807 "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z"))))
8808 (build-system ant-build-system)
8809 (arguments
8810 `(#:jar-name "mvel2.jar"
8811 #:source-dir "src/main/java"
8812 #:test-exclude
8813 (list "**/Abstract*.java"
8814 ;; Base class with no tests
8815 "**/MVELThreadTest.java")
8816 #:phases
8817 (modify-phases %standard-phases
8818 (add-after 'install 'install-bin
8819 (lambda* (#:key outputs #:allow-other-keys)
8820 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
8821 (mkdir-p bin)
8822 (with-output-to-file (string-append bin "/mvel2")
8823 (lambda _
8824 (display
8825 (string-append
8826 "#!" (which "bash") "\n"
8827 "if [ \"$#\" -ne \"2\" ]; then\n"
8828 "echo 'Usage: mvel2 <script> <out.dir>'\n"
8829 "exit\n"
8830 "fi\n"
8831 "java -Dout.dir=$2 -cp " (getenv "CLASSPATH")
8832 ":" (assoc-ref outputs "out") "/share/java/mvel2.jar"
8833 " org.mvel2.sh.Main $1"))))
8834 (chmod (string-append bin "/mvel2") #o755))
8835 #t)))))
8836 (native-inputs
8837 `(("junit" ,java-junit)
8838 ("hamcrest" ,java-hamcrest-core)))
8839 (home-page "https://github.com/mvel/mvel")
8840 (synopsis "MVFLEX Expression Language")
8841 (description "MVEL has largely been inspired by Java syntax, but has some
8842fundamental differences aimed at making it more efficient as an expression
8843language, such as operators that directly support collection, array and string
8844matching, as well as regular expressions. MVEL is used to evaluate expressions
8845written using Java syntax.
8846
8847In addition to the expression language, MVEL serves as a templating language for
8848configuration and string construction.")
8849 (license license:asl2.0)))
d54d7d31 8850
9e325e8c
RW
8851(define-public java-commons-jexl-2
8852 (package
8853 (name "java-commons-jexl")
8854 (version "2.1.1")
8855 (source (origin
8856 (method url-fetch)
8857 (uri (string-append "mirror://apache/commons/jexl/source/"
8858 "commons-jexl-" version "-src.tar.gz"))
8859 (sha256
8860 (base32
8861 "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz"))))
8862 (build-system ant-build-system)
8863 (arguments
8864 `(#:jar-name "commons-jexl-2.jar"
8865 #:jdk ,icedtea-8
8866 #:source-dir "src/main/java"
8867 #:phases
8868 (modify-phases %standard-phases
8869 (add-before 'check 'disable-broken-tests
8870 (lambda* (#:key inputs #:allow-other-keys)
8871 (with-directory-excursion "src/test/java/org/apache/commons/jexl2/"
8872 (substitute* "ArithmeticTest.java"
8873 (("asserter.assertExpression\\(\"3 / 0\"") "//")
8874 (("asserter.assertExpression\\(\"imanull") "//"))
8875 ;; This test fails with "ambiguous method invocation"
8876 (delete-file "CacheTest.java")
8877 ;; This test doesn't have access to the temp directory
8878 (substitute* "ClassCreatorTest.java"
8879 (("java.io.tmpdir") "user.dir"))
8880 ;; This test fails in trying to detect whether it can run.
8881 (substitute* "ClassCreator.java"
8882 (("boolean canRun =.*") "boolean canRun = false;\n"))
8883 ;; ...and these tests depend on it.
8884 (delete-file "scripting/JexlScriptEngineOptionalTest.java")
8885 (delete-file "scripting/JexlScriptEngineTest.java"))
8886 #t))
8887 (add-before 'build 'run-javacc
8888 (lambda _
8889 (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/"
080d0b60
RW
8890 (invoke "java" "jjtree" "Parser.jjt")
8891 (invoke "java" "javacc" "Parser.jj"))
8892 #t)))))
9e325e8c
RW
8893 (inputs
8894 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
8895 (native-inputs
8896 `(("java-junit" ,java-junit)
8897 ("java-hamcrest-core" ,java-hamcrest-core)
8898 ("javacc" ,javacc-4)))
8899 (home-page "https://commons.apache.org/proper/commons-jexl/")
8900 (synopsis "Java Expression Language ")
8901 (description "JEXL is a library intended to facilitate the implementation
8902of dynamic and scripting features in applications and frameworks written in
8903Java. JEXL implements an Expression Language based on some extensions to the
8904JSTL Expression Language supporting most of the constructs seen in
8905shell-script or ECMAScript. Its goal is to expose scripting features usable
8906by technical operatives or consultants working with enterprise platforms.")
8907 (license license:asl2.0)))
8908
d54d7d31
JL
8909(define-public java-lz4
8910 (package
8911 (name "java-lz4")
8912 (version "1.4.0")
8913 (source (origin
8914 (method url-fetch)
8915 (uri (string-append "https://github.com/lz4/lz4-java/archive/"
8916 version ".tar.gz"))
8917 (file-name (string-append name "-" version ".tar.gz"))
8918 (sha256
8919 (base32
8920 "096dm57p2lzqk28n0j2p52x2j3cvnsd2dfqn43n7vbwrkjsy7y54"))))
8921 (build-system ant-build-system)
8922 (arguments
8923 `(#:jar-name "lz4.jar"
8924 #:jdk ,icedtea-8
8925 #:source-dir "src/java:src/java-unsafe"
8926 #:tests? #f; FIXME: requires more dependencies
8927 #:phases
8928 (modify-phases %standard-phases
8929 (add-before 'configure 'generate-source
8930 (lambda _
8931 (with-directory-excursion "src/build/source_templates"
1b6bc516
RW
8932 (invoke "mvel2" "../gen_sources.mvel" "../../java"))
8933 #t)))))
d54d7d31
JL
8934 (native-inputs
8935 `(("mvel" ,java-mvel2)))
8936 (home-page "https://jpountz.github.io/lz4-java")
8937 (synopsis "Compression algorithm")
8938 (description "LZ4 - Java is a Java port of the popular lz4 compression
8939algorithms and xxHash hashing algorithm.")
8940 (license license:asl2.0)))
62315865 8941
50d70a72 8942(define-public java-bouncycastle
62315865 8943 (package
50d70a72 8944 (name "java-bouncycastle")
248a9e16 8945 (version "1.60")
62315865
JL
8946 (source (origin
8947 (method url-fetch)
50d70a72 8948 (uri (string-append "https://github.com/bcgit/bc-java/archive/r"
248a9e16 8949 (substring version 0 1) "v"
50d70a72 8950 (substring version 2 4) ".tar.gz"))
62315865
JL
8951 (sha256
8952 (base32
248a9e16 8953 "0v434513y708qc87k4xz13p2kzydc736lk3ks67df9mg11s7hchv"))
50d70a72
JL
8954 (modules '((guix build utils)))
8955 (snippet
8956 '(begin
8957 (for-each delete-file
8958 (find-files "." "\\.jar$"))
8959 #t))))
62315865
JL
8960 (build-system ant-build-system)
8961 (arguments
50d70a72 8962 `(#:jdk ,icedtea-8
0c68f7fd 8963 #:tests? #f
62315865
JL
8964 #:phases
8965 (modify-phases %standard-phases
50d70a72 8966 (replace 'build
62315865 8967 (lambda _
50d70a72 8968 (invoke "ant" "-f" "ant/jdk15+.xml" "build-provider")
2c8ac364 8969 (invoke "ant" "-f" "ant/jdk15+.xml" "build")))
0c68f7fd
RW
8970 ;; FIXME: the tests freeze.
8971 ;; (replace 'check
8972 ;; (lambda _
8973 ;; (invoke "ant" "-f" "ant/jdk15+.xml" "test")))
50d70a72
JL
8974 (replace 'install
8975 (install-jars "build/artifacts/jdk1.5/jars")))))
8976 (inputs
8977 `(("java-javax-mail" ,java-javax-mail)))
31208367
JL
8978 (native-inputs
8979 `(("unzip" ,unzip)
50d70a72
JL
8980 ("junit" ,java-junit)
8981 ("java-native-access" ,java-native-access)
8982 ("java-native-access-platform" ,java-native-access-platform)))
31208367
JL
8983 (home-page "https://www.bouncycastle.org")
8984 (synopsis "Cryptographic library")
50d70a72
JL
8985 (description "Bouncy Castle is a cryptographic library for the Java
8986programming language.")
31208367 8987 (license license:expat)))
a53d9ac0
JL
8988
8989(define-public java-lmax-disruptor
8990 (package
8991 (name "java-lmax-disruptor")
8992 (version "3.3.7")
8993 (source (origin
8994 (method url-fetch)
8995 (uri (string-append "https://github.com/LMAX-Exchange/disruptor/"
8996 "archive/" version ".tar.gz"))
8997 (file-name (string-append name "-" version ".tar.gz"))
8998 (sha256
8999 (base32
9000 "17da2gwj5abnlsfgn2xqjk5lgzbg4vkb0hdv2dvc8r2fx4bi7w3g"))))
9001 (build-system ant-build-system)
9002 (arguments
9003 `(#:jar-name "java-lmax-disruptor.jar"
9004 #:jdk ,icedtea-8
9005 #:tests? #f)); tests hang
9006 (inputs
9007 `(("junit" ,java-junit)
9008 ("java-hdrhistogram" ,java-hdrhistogram)
9009 ("java-jmock" ,java-jmock)
9010 ("java-jmock-legacy" ,java-jmock-legacy)
9011 ("java-jmock-junit4" ,java-jmock-junit4)
9012 ("java-hamcrest-all" ,java-hamcrest-all)))
9013 (native-inputs
9014 `(("cglib" ,java-cglib)
9015 ("objenesis" ,java-objenesis)
9016 ("asm" ,java-asm)))
9017 (home-page "https://www.lmax.com/disruptor")
9018 (synopsis "High performance inter-thread communication")
9019 (description "LMAX Disruptor is a software pattern and software component
9020for high performance inter-thread communication that avoids the need for
9021message queues or resource locking.")
9022 (license license:asl2.0)))
5619556b 9023
5e3abfc8
RW
9024(define-public java-commons-bcel
9025 (package
9026 (name "java-commons-bcel")
9027 (version "6.1")
9028 (source (origin
9029 (method url-fetch)
9030 (uri (string-append "mirror://apache/commons/bcel/source/bcel-"
9031 version "-src.tar.gz"))
9032 (sha256
9033 (base32
9034 "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy"))))
9035 (build-system ant-build-system)
9036 (arguments
9037 `(#:jar-name "bcel.jar"
9038 #:jdk ,icedtea-8
9039 #:source-dir "src/main/java"
9040 #:test-dir "src/test/java"
9041 ;; FIXME: Tests require the unpackaged jna.
9042 #:tests? #f))
9043 (home-page "https://commons.apache.org/proper/commons-bcel/")
9044 (synopsis "Byte code engineering library")
9045 (description "The Byte Code Engineering Library (Apache Commons BCEL) is
9046intended to give users a convenient way to analyze, create, and
9047manipulate (binary) Java class files. Classes are represented by objects
9048which contain all the symbolic information of the given class: methods, fields
9049and byte code instructions, in particular.
9050
9051Such objects can be read from an existing file, be transformed by a
9052program (e.g. a class loader at run-time) and written to a file again. An
9053even more interesting application is the creation of classes from scratch at
9054run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful
9055if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format
9056of Java @code{.class} files.")
9057 (license license:asl2.0)))
9058
5619556b
JL
9059(define-public java-xerial-core
9060 (package
9061 (name "java-xerial-core")
9062 (version "2.1")
9063 (source (origin
9064 (method url-fetch)
9065 (uri (string-append "https://github.com/xerial/xerial-java/archive/"
9066 version ".tar.gz"))
9067 (file-name (string-append name "-" version ".tar.gz"))
9068 (sha256
9069 (base32
9070 "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d"))))
9071 (build-system ant-build-system)
9072 (arguments
9073 `(#:jar-name "xerial-core.jar"
9074 #:source-dir "xerial-core/src/main/java"
9075 #:test-dir "xerial-core/src/test"
9076 #:phases
9077 (modify-phases %standard-phases
9078 (add-before 'build 'copy-resources
9079 (lambda _
9080 (copy-recursively "xerial-core/src/main/resources"
9081 "build/classes")
9082 #t)))))
9083 (native-inputs
9084 `(("junit" ,java-junit)
9085 ("hamcrest" ,java-hamcrest-core)))
9086 (home-page "https://github.com/xerial/xerial-java")
f4548394 9087 (synopsis "Data management libraries for Java")
5619556b 9088 (description "Xerial is a set of data management libraries for the Java
f4548394 9089programming language. The ultimate goal of the Xerial project is to manage
5619556b
JL
9090everything as database, including class objects, text format data, data
9091streams, etc.")
9092 (license license:asl2.0)))
8d6a4815
JL
9093
9094(define-public java-powermock-reflect
9095 (package
9096 (name "java-powermock-reflect")
9097 (version "1.7.3")
9098 (source (origin
9099 (method url-fetch)
9100 (uri (string-append "https://github.com/powermock/powermock/"
9101 "archive/powermock-" version ".tar.gz"))
9102 (file-name (string-append name "-" version ".tar.gz"))
9103 (sha256
9104 (base32
9105 "0sbgi5vqq7k72wzcdjb20s370vyd4hsbnx71pzb8ishml3gy7fwy"))
9106 (patches
9107 (search-patches "java-powermock-fix-java-files.patch"))))
9108 (build-system ant-build-system)
9109 (arguments
9110 `(#:jar-name "java-powermock-reflect.jar"
9111 #:jdk ,icedtea-8
9112 #:source-dir "powermock-reflect/src/main/java"
9113 #:test-dir "powermock-reflect/src/test"))
9114 (inputs
9115 `(("java-objenesis" ,java-objenesis)))
9116 (native-inputs
9117 `(("junit" ,java-junit)
9118 ("cglib" ,java-cglib)
9119 ("asm" ,java-asm)
9120 ("hamcrest" ,java-hamcrest-core)
9121 ("assertj" ,java-assertj)))
9122 (home-page "https://github.com/powermock/powermock")
9123 (synopsis "Mock library extension framework")
9124 (description "PowerMock is a framework that extends other mock libraries
9125such as EasyMock with more powerful capabilities. PowerMock uses a custom
9126classloader and bytecode manipulation to enable mocking of static methods,
9127constructors, final classes and methods, private methods, removal of static
9128initializers and more. By using a custom classloader no changes need to be
9129done to the IDE or continuous integration servers which simplifies adoption.")
9130 (license license:asl2.0)))
d4a4d5da
JL
9131
9132(define-public java-powermock-core
9133 (package
9134 (inherit java-powermock-reflect)
9135 (name "java-powermock-core")
9136 (arguments
9137 `(#:jar-name "java-powermock-core.jar"
9138 #:source-dir "powermock-core/src/main/java"
9139 #:test-dir "powermock-core/src/test"
9140 #:tests? #f; requires powermock-api
59e0021c
JL
9141 #:jdk ,icedtea-8
9142 #:phases
9143 (modify-phases %standard-phases
9144 (add-before 'build 'copy-resources
9145 (lambda _
9146 (copy-recursively "powermock-core/src/main/resources"
2c8ac364
MW
9147 "build/classes")
9148 #t)))))
d4a4d5da
JL
9149 (inputs
9150 `(("reflect" ,java-powermock-reflect)
9151 ("javassist" ,java-jboss-javassist)))
9152 (native-inputs
9153 `(("junit" ,java-junit)
9154 ("assertj" ,java-assertj)
9155 ("mockito" ,java-mockito-1)))))
2d5d65d7
JL
9156
9157(define-public java-powermock-api-support
9158 (package
9159 (inherit java-powermock-reflect)
9160 (name "java-powermock-api-support")
9161 (build-system ant-build-system)
9162 (arguments
9163 `(#:jar-name "java-powermock-api-support.jar"
9164 #:jdk ,icedtea-8
9165 #:source-dir "powermock-api/powermock-api-support/src/main/java"
9166 #:tests? #f)); no tests
9167 (inputs
9168 `(("core" ,java-powermock-core)
9169 ("reflect" ,java-powermock-reflect)))))
6c21d46c
JL
9170
9171(define-public java-powermock-modules-junit4-common
9172 (package
9173 (inherit java-powermock-reflect)
9174 (name "java-powermock-modules-junit4-common")
9175 (build-system ant-build-system)
9176 (arguments
9177 `(#:jar-name "java-powermock-modules-junit4-common.jar"
9178 #:jdk ,icedtea-8
9179 #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java"
9180 #:test-dir "powermock-modules/powermock-module-junit4-common/src/test"))
9181 (inputs
9182 `(("core" ,java-powermock-core)
9183 ("easymock" ,java-easymock)
9184 ("reflect" ,java-powermock-reflect)
9185 ("hamcrest" ,java-hamcrest-core)
9186 ("cglib" ,java-cglib)))))
33db1681
JL
9187
9188(define-public java-powermock-modules-junit4
9189 (package
9190 (inherit java-powermock-reflect)
9191 (name "java-powermock-modules-junit4")
9192 (build-system ant-build-system)
9193 (arguments
9194 `(#:jar-name "java-powermock-modules-junit4.jar"
9195 #:jdk ,icedtea-8
9196 #:source-dir "powermock-modules/powermock-module-junit4/src/main/java"
1124683d
JL
9197 #:test-dir "powermock-modules/powermock-module-junit4/src/test"
9198 #:phases
9199 (modify-phases %standard-phases
9200 (add-before 'build 'fix-junit-detection
9201 (lambda _
9202 ;; Our junit version is 4.12-SNAPSHOT
9203 (substitute* (find-files "powermock-modules/powermock-module-junit4"
9204 "PowerMockJUnit4MethodValidator.java")
2c8ac364
MW
9205 (("4.12") "4.12-SNAPSHOT"))
9206 #t)))))
33db1681
JL
9207 (inputs
9208 `(("core" ,java-powermock-core)
9209 ("reflect" ,java-powermock-reflect)
9210 ("common" ,java-powermock-modules-junit4-common)
9211 ("cglib" ,java-cglib)))
9212 (native-inputs
9213 `(("easymock" ,java-easymock)
9214 ("hamcrest" ,java-hamcrest-core)
9215 ("objenesis" ,java-objenesis)
9216 ("asm" ,java-asm)
9217 ("junit" ,java-junit)))))
4d508975
JL
9218
9219(define-public java-powermock-api-easymock
9220 (package
9221 (inherit java-powermock-reflect)
9222 (name "java-powermock-api-easymock")
9223 (build-system ant-build-system)
9224 (arguments
9225 `(#:jar-name "java-powermock-api-easymock.jar"
9226 #:jdk ,icedtea-8
9227 #:source-dir "powermock-api/powermock-api-easymock/src/main/java"
9228 #:tests? #f; no tests
9229 #:phases
9230 (modify-phases %standard-phases
9231 (add-before 'build 'fix-file
9232 (lambda _
9233 ;; FIXME: This looks wrong, but it fixes a build error.
9234 (with-directory-excursion "powermock-api/powermock-api-easymock"
9235 (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java"
9236 (("classLoader instanceof MockClassLoader") "false")
9237 (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";")))
9238 #t)))))
9239 (inputs
9240 `(("core" ,java-powermock-core)
9241 ("easymock" ,java-easymock)
9242 ("reflect" ,java-powermock-reflect)
9243 ("support" ,java-powermock-api-support)
9244 ("cglib" ,java-cglib)))))
5fb3e822
JL
9245
9246(define-public java-jboss-jms-api-spec
9247 (package
9248 (name "java-jboss-jms-api-spec")
9249 (version "2.0")
9250 (source (origin
9251 (method url-fetch)
9252 (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/"
9253 "archive/jboss-jms-api_" version
9254 "_spec-1.0.1.Final.tar.gz"))
9255 (sha256
9256 (base32
9257 "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m"))))
9258 (build-system ant-build-system)
9259 (arguments
9260 `(#:jar-name "java-jboss-jms-api_spec.jar"
9261 #:jdk ,icedtea-8
9262 #:source-dir "."
9263 #:tests? #f)); no tests
9264 (home-page "https://github.com/jboss/jboss-jms-api_spec")
9265 (synopsis "Java Message Service API specification")
9266 (description "Java Message Service (JMS) API is used to send messages
9267messages between two or more clients. It is a messaging standard that allows
9268application components to create, send, receive, and read messages.")
9269 ; either gpl2 only with GPL Classpath Exception, or cddl.
9270 (license (list license:gpl2 license:cddl1.0))))
3ff47c66
JL
9271
9272(define-public java-mail
9273 (package
9274 (name "java-mail")
9275 (version "1.6.0")
9276 (source (origin
9277 (method url-fetch)
9278 (uri (string-append "https://github.com/javaee/javamail/archive/"
9279 "JAVAMAIL-1_6_0.tar.gz"))
9280 (sha256
9281 (base32
9282 "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92"))))
9283 (build-system ant-build-system)
9284 (arguments
9285 `(#:jar-name "java-mail.jar"
9286 #:jdk ,icedtea-8
9287 #:source-dir "mail/src/main/java"
9288 #:test-dir "mail/src/test"
9289 #:test-exclude
9290 (list "**/CollectorFormatterTest.java"
9291 "**/CompactFormatterTest.java"
9292 "**/DurationFilterTest.java"
9293 "**/MailHandlerTest.java"
9294 "**/GetLocalAddressTest.java"
9295 ;; FIXME: both end with:
9296 ;; java.lang.ClassNotFoundException:
9297 ;; javax.mail.internet.MimeMultipartParseTest
9298 "**/MimeMultipartParseTest.java"
9299 "**/SearchTermSerializationTest.java")
9300 #:phases
9301 (modify-phases %standard-phases
9302 (add-before 'configure 'move-version.java
9303 (lambda _
9304 (copy-file "mail/src/main/resources/javax/mail/Version.java"
218d1dde
RW
9305 "mail/src/main/java/javax/mail/Version.java")
9306 #t))
3ff47c66
JL
9307 (add-before 'build 'copy-resources
9308 (lambda _
9309 (copy-recursively "mail/src/main/resources/META-INF"
9310 "build/classes/META-INF")
9311 #t)))))
9312 (native-inputs
9313 `(("junit" ,java-junit)
9314 ("hamcrest" ,java-hamcrest-core)))
9315 (home-page "https://javaee.github.io/javamail/")
9316 (synopsis "Mail-related functionnalities in Java")
9317 (description "The JavaMail API provides a platform-independent and
9318protocol-independent framework to build mail and messaging applications.")
9319 ;; General Public License Version 2 only ("GPL") or the Common Development
9320 ;; and Distribution License("CDDL")
9321 (license (list license:cddl1.1
9322 license:gpl2)))); with classpath exception
217b20e4
JL
9323
9324(define-public java-jeromq
9325 (package
9326 (name "java-jeromq")
4aa0a1df 9327 (version "0.4.3")
217b20e4 9328 (source (origin
4aa0a1df
RW
9329 (method git-fetch)
9330 (uri (git-reference
9331 (url "https://github.com/zeromq/jeromq.git")
9332 (commit (string-append "v" version))))
9333 (file-name (string-append name "-" version "-checkout"))
217b20e4
JL
9334 (sha256
9335 (base32
594bd3a0
GB
9336 "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj"))
9337 (patches (search-patches "java-jeromq-fix-tests.patch"))))
217b20e4
JL
9338 (build-system ant-build-system)
9339 (arguments
9340 `(#:jar-name "java-jeromq.jar"
9341 #:source-dir "src/main/java"
9342 #:jdk ,icedtea-8
9343 #:test-exclude
9344 (list
9345 "**/Abstract*.java"
9346 ;; Requires network
9347 "**/ZBeaconTest.java"
9348 ;; Failures
4aa0a1df 9349 "**/DealerSpecTest.java"
217b20e4 9350 "**/CustomDecoderTest.java"
594bd3a0
GB
9351 "**/CustomEncoderTest.java"
9352 "**/ConnectRidTest.java"
9353 "**/ReqSpecTest.java"
9354 "**/PushPullSpecTest.java"
9355 "**/PubSubHwmTest.java"
9356 "**/RouterSpecTest.java"
9357 "**/ProxyTest.java")))
217b20e4
JL
9358 (inputs
9359 `(("java-jnacl" ,java-jnacl)))
9360 (native-inputs
9361 `(("java-hamcrest-core" ,java-hamcrest-core)
9362 ("junit" ,java-junit)))
9363 (home-page "http://zeromq.org/bindings:java")
9364 (synopsis "Java binding for 0MQ")
9365 (description "Jeromq provides the java bindings for 0MQ.")
9366 (license license:mpl2.0)))
46c6905a
JL
9367
9368(define-public java-kafka-clients
9369 (package
9370 (name "java-kafka-clients")
9371 (version "1.0.0")
9372 (source (origin
9373 (method url-fetch)
9374 (uri (string-append "mirror://apache/kafka/" version "/kafka-"
9375 version "-src.tgz"))
9376 (sha256
9377 (base32
9378 "1yxmnsmliwm7671q5yy9bl4jdqyyn00n26cggz9brwczx80w1vfq"))))
9379 (build-system ant-build-system)
9380 (arguments
9381 `(#:jar-name "java-kafka-clients.jar"
9382 #:jdk ,icedtea-8
9383 #:source-dir "clients/src/main/java"
9384 #:test-dir "clients/src/test"
9385 #:test-exclude
9386 (list
9387 ;; This file does not contain a class
9388 "**/IntegrationTest.java"
9389 ;; Requires network
9390 "**/ClientUtilsTest.java"
9391 ;; End with errors that seem related to our powermock
9392 "**/KafkaProducerTest.java"
9393 "**/BufferPoolTest.java")))
9394 (inputs
9395 `(("java-slf4j-api" ,java-slf4j-api)
9396 ("java-lz4" ,java-lz4)))
9397 (native-inputs
9398 `(("junit" ,java-junit)
9399 ("hamcrest" ,java-hamcrest-all)
9400 ("objenesis" ,java-objenesis)
9401 ("asm" ,java-asm)
9402 ("cglib" ,java-cglib)
9403 ("javassist" ,java-jboss-javassist)
9404 ("snappy" ,java-snappy)
9405 ("easymock" ,java-easymock)
9406 ("powermock" ,java-powermock-core)
9407 ("powermock-easymock" ,java-powermock-api-easymock)
9408 ("powermock-junit4-common" ,java-powermock-modules-junit4-common)
9409 ("powermock-junit4" ,java-powermock-modules-junit4)
9410 ("powermock-support" ,java-powermock-api-support)
50d70a72 9411 ("java-bouncycastle" ,java-bouncycastle)))
46c6905a
JL
9412 (home-page "https://kafka.apache.org")
9413 (synopsis "Distributed streaming platform")
9414 (description "Kafka is a distributed streaming platform, which means:
9415@itemize
9416@item it can publish and subscribe to streams of records;
9417@item it can store streams of records in a fault-tolerant way;
9418@item it can process streams of records as they occur.
9419@end itemize")
9420 ;; Either cddl or gpl2 only.
9421 (license (list license:cddl1.1; actually cddl1.1
9422 license:gpl2)))); with classpath exception
0b54e190
JL
9423
9424(define-public java-jdom
9425 (package
9426 (name "java-jdom")
9427 (version "1.1.3")
9428 (source (origin
9429 (method url-fetch)
9430 (uri (string-append "http://jdom.org/dist/binary/archive/jdom-"
9431 version ".tar.gz"))
9432 (sha256
9433 (base32
9434 "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl"))))
9435 (build-system ant-build-system)
9436 (arguments
9437 `(#:build-target "package"
9438 #:tests? #f; tests are run as part of the build process
9439 #:phases
9440 (modify-phases %standard-phases
9441 (replace 'install
9442 (install-jars "build")))))
9443 (home-page "http://jdom.org/")
9444 (synopsis "Access, manipulate, and output XML data")
9445 (description "Java-based solution for accessing, manipulating, and
9446outputting XML data from Java code.")
9447 (license license:bsd-4)))
78745d33
JL
9448
9449(define-public java-geronimo-xbean-reflect
9450 (package
9451 (name "java-geronimo-xbean-reflect")
9452 (version "4.5")
9453 (source (origin
9454 (method svn-fetch)
9455 (uri (svn-reference
9456 (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/")
9457 (revision 1807396)))
9458 (file-name (string-append name "-" version))
9459 (sha256
9460 (base32
9461 "18q3i6jgm6rkw8aysfgihgywrdc5nvijrwnslmi3ww497jvri6ja"))))
9462 (build-system ant-build-system)
9463 (arguments
9464 `(#:jar-name "geronimo-xbean-reflect.jar"
9465 #:source-dir "xbean-reflect/src/main/java"
9466 #:test-dir "xbean-reflect/src/test"
9467 #:jdk ,icedtea-8
9468 #:test-exclude
9469 (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java"
9470 "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java"
9471 "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java")
9472 #:phases
9473 (modify-phases %standard-phases
9474 (add-before 'build 'fix-source
9475 (lambda _
9476 (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/"))
9477 ;; org.apache.xbean.asm6 is actually repackaged java-asm
9478 (substitute* (string-append dir "XbeanAsmParameterNameLoader.java")
9479 (("org.apache.xbean.asm5") "org.objectweb.asm"))
9480 #t))))))
9481 (inputs
9482 `(("asm" ,java-asm)
9483 ("log4j" ,java-log4j-api)
9484 ("log4j-1.2" ,java-log4j-1.2-api)
9485 ("log4j-core" ,java-log4j-core)
9486 ("logging" ,java-commons-logging-minimal)))
9487 (native-inputs
9488 `(("junit" ,java-junit)))
9489 (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/")
9490 (synopsis "Dependency injection helper")
9491 (description "Xbean-reflect provides very flexible ways to create objects
9492and graphs of objects for dependency injection frameworks")
9493 (license license:asl2.0)))
09c44196 9494
3fda539b
JL
9495(define-public java-geronimo-xbean-bundleutils
9496 (package
9497 (inherit java-geronimo-xbean-reflect)
9498 (name "java-geronimo-xbean-bundleutils")
9499 (arguments
9500 `(#:jar-name "geronimo-xbean-bundleutils.jar"
9501 #:source-dir "xbean-bundleutils/src/main/java"
9502 #:test-dir "xbean-bundleutils/src/test"
9503 #:phases
9504 (modify-phases %standard-phases
9505 (add-before 'build 'fix-java
9506 (lambda _
9507 ;; We use a more recent version of osgi, so this file requires
9508 ;; more interface method implementations.
9509 (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java"
9510 (("import org.osgi.framework.ServiceRegistration;")
9511 "import org.osgi.framework.ServiceRegistration;
9512import org.osgi.framework.ServiceFactory;
9513import java.util.Collection;
9514import org.osgi.framework.ServiceObjects;")
9515 (("public Bundle getBundle\\(\\)")
9516 "@Override
9517public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) {
9518 throw new UnsupportedOperationException();
9519}
9520@Override
9521public <S> ServiceRegistration<S> registerService(Class<S> clazz,
9522 ServiceFactory<S> factory, Dictionary<String, ?> properties) {
9523 throw new UnsupportedOperationException();
9524}
9525public Bundle getBundle()"))
9526 #t)))))
9527 (inputs
9528 `(("java-slf4j" ,java-slf4j-api)
9529 ("java-asm" ,java-asm)
9530 ("java-osgi-framework" ,java-osgi-framework)
9531 ("java-eclipse-osgi" ,java-eclipse-osgi)
9532 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)))))
0cb9ce32
JL
9533
9534(define-public java-geronimo-xbean-asm-util
9535 (package
9536 (inherit java-geronimo-xbean-reflect)
9537 (name "java-geronimo-xbean-asm-util")
9538 (arguments
9539 `(#:jar-name "geronimo-xbean-asm-util.jar"
9540 #:source-dir "xbean-asm-util/src/main/java"
9541 #:tests? #f)); no tests
9542 (inputs
9543 `(("java-asm" ,java-asm)))
9544 (native-inputs '())))
8d510f65
JL
9545
9546(define-public java-geronimo-xbean-finder
9547 (package
9548 (inherit java-geronimo-xbean-reflect)
9549 (name "java-geronimo-xbean-finder")
9550 (arguments
9551 `(#:jar-name "geronimo-xbean-finder.jar"
9552 #:source-dir "xbean-finder/src/main/java"
9553 #:test-dir "xbean-finder/src/test"))
9554 (inputs
9555 `(("java-slf4j-api" ,java-slf4j-api)
9556 ("java-asm" ,java-asm)
9557 ("java-geronimo-xbean-bundleutils" ,java-geronimo-xbean-bundleutils)
9558 ("java-geronimo-xbean-asm-util" ,java-geronimo-xbean-asm-util)
9559 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)
9560 ("java-osgi-framework" ,java-osgi-framework)))
9561 (native-inputs
9562 `(("java-junit" ,java-junit)
9563 ("java-hamcrest-core" ,java-hamcrest-core)))))
3fda539b 9564
09c44196
JL
9565(define-public java-gson
9566 (package
9567 (name "java-gson")
9568 (version "2.8.2")
9569 (source (origin
9570 (method url-fetch)
9571 (uri (string-append "https://github.com/google/gson/archive/"
9572 "gson-parent-" version ".tar.gz"))
9573 (sha256
9574 (base32
9575 "1j4qnp7v046q0k48c4kyf69sxaasx2h949d3cqwsm3kzxms3x0f9"))))
9576 (build-system ant-build-system)
9577 (arguments
9578 `(#:jar-name "gson.jar"
9579 #:source-dir "gson/src/main/java"
9580 #:test-dir "gson/src/test"))
9581 (native-inputs
9582 `(("java-junit" ,java-junit)
9583 ("java-hamcrest-core" ,java-hamcrest-core)))
9584 (home-page "https://github.com/google/gson")
9585 (synopsis "Java serialization/deserialization library from/to JSON")
9586 (description "Gson is a Java library that can be used to convert Java
9587Objects into their JSON representation. It can also be used to convert a JSON
9588string to an equivalent Java object. Gson can work with arbitrary Java objects
9589including pre-existing objects that you do not have source-code of.")
9590 (license license:asl2.0)))
335aa20b
JL
9591
9592(define-public java-hawtjni
9593 (package
9594 (name "java-hawtjni")
9595 (version "1.15")
9596 (source (origin
9597 (method url-fetch)
9598 (uri (string-append "https://github.com/fusesource/hawtjni/archive/"
9599 "hawtjni-project-" version ".tar.gz"))
9600 (sha256
9601 (base32
9602 "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g"))))
9603 (build-system ant-build-system)
9604 (arguments
9605 `(#:jar-name "hawtjni.jar"
9606 #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java"
9607 #:tests? #f; no tests
9608 #:phases
9609 (modify-phases %standard-phases
9610 (add-before 'build 'build-native
9611 (lambda* (#:key inputs #:allow-other-keys)
6338ea9a
RW
9612 (let ((include (string-append "-I" (assoc-ref inputs "jdk") "/include/linux")))
9613 (with-directory-excursion "hawtjni-generator/src/main/resources/"
9614 (invoke "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o"
9615 "-fPIC" "-O2" include)
9616 (invoke "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o"
9617 "-fPIC" "-O2" include)
9618 (invoke "gcc" "-o" "libhawtjni.so" "-shared"
9619 "hawtjni.o" "hawtjni-callback.o")))
9620 #t))
335aa20b
JL
9621 (add-after 'install 'install-native
9622 (lambda* (#:key outputs #:allow-other-keys)
9623 (let* ((out (assoc-ref outputs "out"))
9624 (lib (string-append out "/lib"))
9625 (inc (string-append out "/include")))
335aa20b 9626 (with-directory-excursion "hawtjni-generator/src/main/resources/"
6338ea9a
RW
9627 (install-file "libhawtjni.so" lib)
9628 (install-file "hawtjni.h" inc)))
335aa20b
JL
9629 #t)))))
9630 (inputs
9631 `(("java-commons-cli" ,java-commons-cli)
9632 ("java-asm" ,java-asm)
9633 ("java-geronimo-xbean-finder" ,java-geronimo-xbean-finder)))
9634 (home-page "https://fusesource.github.io/hawtjni/")
9635 (synopsis "JNI code generator")
9636 (description "HawtJNI is a code generator that produces the JNI code needed
9637to implement Java native methods. It is based on the jnigen code generator
9638that is part of the SWT Tools project.")
9639 (license license:asl2.0)))
d0c62afa
JL
9640
9641(define-public java-jansi-native
9642 (package
9643 (name "java-jansi-native")
9644 (version "1.7")
9645 (source (origin
9646 (method url-fetch)
9647 (uri (string-append "https://github.com/fusesource/jansi-native/"
9648 "archive/jansi-native-" version ".tar.gz"))
9649 (sha256
9650 (base32
9651 "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf"))))
9652 (build-system ant-build-system)
9653 (arguments
9654 `(#:jar-name "jansi-native.jar"
9655 #:source-dir "src/main/java"
9656 #:tests? #f; no tests
9657 #:phases
9658 (modify-phases %standard-phases
9659 (add-before 'build 'build-native
9660 (lambda* (#:key inputs #:allow-other-keys)
9661 ;; there are more required files for windows in windows/
9662 (with-directory-excursion "src/main/native-package/src"
9663 (substitute* "jansi_ttyname.c"
9664 (("#include \"jansi_.*") ""))
e85c1bf6
RW
9665 (invoke "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o"
9666 (string-append "-I" (assoc-ref inputs "java-hawtjni")
9667 "/include")
9668 (string-append "-I" (assoc-ref inputs "jdk")
9669 "/include/linux")
9670 "-fPIC" "-O2")
2c8ac364 9671 (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o"))))
d0c62afa
JL
9672 (add-before 'build 'install-native
9673 (lambda _
9674 (let ((dir (string-append "build/classes/META-INF/native/"
9675 ,(match (%current-system)
9676 ((or "i686-linux" "armhf-linux")
9677 "linux32")
3c4103c8
LC
9678 ((or "x86_64-linux" "aarch64-linux"
9679 "mips64el-linux")
d0c62afa
JL
9680 "linux64")))))
9681 (install-file "src/main/native-package/src/libjansi.so" dir))
9682 #t))
9683 (add-after 'install 'install-native
9684 (lambda* (#:key outputs #:allow-other-keys)
d0c62afa
JL
9685 (install-file "src/main/native-package/src/jansi.h"
9686 (string-append (assoc-ref outputs "out") "/include"))
9687 #t)))))
9688 (inputs
9689 `(("java-hawtjni" ,java-hawtjni)))
9690 (home-page "https://fusesource.github.io/jansi/")
9691 (synopsis "Native library for jansi")
3d6925ef
RW
9692 (description "This package provides the native library for jansi, a small
9693Java library that allows you to use ANSI escape sequences to format your
9694console output.")
d0c62afa 9695 (license license:asl2.0)))
a87ea1ad
JL
9696
9697(define-public java-jansi
9698 (package
9699 (name "java-jansi")
9700 (version "1.16")
9701 (source (origin
9702 (method url-fetch)
9703 (uri (string-append "https://github.com/fusesource/jansi/archive/"
9704 "jansi-project-" version ".tar.gz"))
9705 (sha256
9706 (base32
9707 "11kh3144i3fzp21dpy8zg52mjmsr214k7km9p8ly0rqk2px0qq2z"))))
9708 (build-system ant-build-system)
9709 (arguments
9710 `(#:jar-name "jansi.jar"
9711 #:source-dir "jansi/src/main/java"
9712 #:test-dir "jansi/src/test"
9713 #:phases
9714 (modify-phases %standard-phases
9715 (add-after 'check 'clear-term
9716 (lambda _
2c8ac364 9717 (invoke "echo" "-e" "\\e[0m"))))))
a87ea1ad
JL
9718 (inputs
9719 `(("java-jansi-native" ,java-jansi-native)))
9720 (native-inputs
9721 `(("java-junit" ,java-junit)
9722 ("java-hamcrest-core" ,java-hamcrest-core)))
9723 (home-page "https://fusesource.github.io/jansi/")
9724 (synopsis "Portable ANSI escape sequences")
9725 (description "Jansi is a Java library that allows you to use ANSI escape
9726sequences to format your console output which works on every platform.")
9727 (license license:asl2.0)))
cc061329
JL
9728
9729(define-public java-jboss-el-api-spec
9730 (package
9731 (name "java-jboss-el-api-spec")
9732 (version "3.0")
9733 (source (origin
9734 (method url-fetch)
9735 (uri (string-append "https://github.com/jboss/jboss-el-api_spec/"
9736 "archive/jboss-el-api_" version
9737 "_spec-1.0.7.Final.tar.gz"))
9738 (sha256
9739 (base32
9740 "1j45ljxalwlibxl7g7iv952sjxkw275m8vyxxij8l6wdd5pf0pdh"))))
9741 (build-system ant-build-system)
9742 (arguments
9743 `(#:jar-name "java-jboss-el-api_spec.jar"
9744 #:jdk ,icedtea-8))
9745 (inputs
9746 `(("java-junit" ,java-junit)))
9747 (home-page "https://github.com/jboss/jboss-el-api_spec")
9748 (synopsis "JSR-341 expression language 3.0 API")
9749 (description "This package contains an implementation of the JSR-341
9750specification for the expression language 3.0. It implements an expression
9751language inspired by ECMAScript and XPath. This language is used with
9752JavaServer Pages (JSP).")
9753 ;; Either GPL2 only or CDDL.
9754 (license (list license:gpl2 license:cddl1.1))))
cc03a786
JL
9755
9756(define-public java-jboss-interceptors-api-spec
9757 (package
9758 (name "java-jboss-interceptors-api-spec")
9759 (version "1.2")
9760 (source (origin
9761 (method url-fetch)
9762 (uri (string-append "https://github.com/jboss/jboss-interceptors-api_spec/"
9763 "archive/jboss-interceptors-api_" version
9764 "_spec-1.0.0.Final.tar.gz"))
9765 (sha256
9766 (base32
9767 "0wv8x0jp9a5qxlrgkhb5jdk2gr6vi87b4j4kjb8ryxiy9gn8g51z"))))
9768 (build-system ant-build-system)
9769 (arguments
9770 `(#:jar-name "java-jboss-interceptors-api_spec.jar"
9771 #:jdk ,icedtea-8
9772 #:source-dir "."
9773 #:tests? #f)); no tests
9774 (home-page "https://github.com/jboss/jboss-interceptors-api_spec")
9775 (synopsis "Interceptors 1.2 API classes from JSR 318")
9776 (description "Java-jboss-interceptors-api-spec implements the Interceptors
9777API. Interceptors are used to interpose on business method invocations and
9778specific events.")
9779 ;; Either GPL2 only or CDDL.
9780 (license (list license:gpl2 license:cddl1.1))))
a10a451c
JL
9781
9782(define-public java-cdi-api
9783 (package
9784 (name "java-cdi-api")
9785 (version "2.0")
9786 (source (origin
9787 (method url-fetch)
9788 (uri (string-append "https://github.com/cdi-spec/cdi/archive/"
9789 version ".tar.gz"))
9790 (file-name (string-append name "-" version ".tar.gz"))
9791 (sha256
9792 (base32
9793 "1iv8b8bp07c5kmqic14jsr868vycjv4qv02lf3pkgp9z21mnfg5y"))))
9794 (build-system ant-build-system)
9795 (arguments
9796 `(#:source-dir "api/src/main/java"
9797 #:jar-name "java-cdi-api.jar"
9798 #:test-dir "api/src/test"
9799 #:jdk ,icedtea-8
9800 #:tests? #f)); Tests fail because we don't have a CDI provider yet
9801 (inputs
9802 `(("java-javax-inject" ,java-javax-inject)
9803 ("java-jboss-el-api-spec" ,java-jboss-el-api-spec)
9804 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)))
9805 (native-inputs
9806 `(("java-testng" ,java-testng)
9807 ("java-hamcrest-core" ,java-hamcrest-core)))
9808 (home-page "http://cdi-spec.org/")
9809 (synopsis "Contexts and Dependency Injection APIs")
9810 (description "Java-cdi-api contains the required APIs for Contexts and
9811Dependency Injection (CDI).")
9812 (license license:asl2.0)))
d57fd728
JL
9813
9814(define-public java-joda-convert
9815 (package
9816 (name "java-joda-convert")
9817 (version "1.9.2")
9818 (source (origin
9819 (method url-fetch)
9820 (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v"
9821 version ".tar.gz"))
9822 (file-name (string-append name "-" version ".tar.gz"))
9823 (sha256
9824 (base32
9825 "0vp346xz7dh9br4q7xazhc7hvzf76a6hf95fki9bg67q5jr0kjh7"))))
9826 (build-system ant-build-system)
9827 (arguments
9828 `(#:jar-name (string-append ,name "-" ,version ".jar")
9829 #:source-dir "src/main/java"
9830 #:test-include (list "**/Test*.java")
9831 ;; Contains only interfaces and base classes (no test)
9832 #:test-exclude (list "**/test*/**.java")))
9833 (inputs
9834 `(("java-guava" ,java-guava)))
9835 (native-inputs
9836 `(("java-junit" ,java-junit)
9837 ("java-hamcrest-core" ,java-hamcrest-core)))
9838 (home-page "http://www.joda.org/joda-convert/")
9839 (synopsis "Conversion between Objects and Strings")
9840 (description "Joda-Convert provides a small set of classes to aid
9841conversion between Objects and Strings. It is not intended to tackle the
9842wider problem of Object to Object transformation.")
9843 (license license:asl2.0)))
0158ea8a
JL
9844
9845(define-public java-joda-time
9846 (package
9847 (name "java-joda-time")
9848 (version "2.9.9")
9849 (source (origin
9850 (method url-fetch)
9851 (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v"
9852 version ".tar.gz"))
9853 (file-name (string-append name "-" version ".tar.gz"))
9854 (sha256
9855 (base32
9856 "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1"))))
9857 (build-system ant-build-system)
9858 (arguments
9859 `(#:jar-name "java-joda-time.jar"
9860 #:source-dir "src/main/java"
9861 #:test-include (list "**/Test*.java")
9862 ;; There is no runnable test in these files
9863 #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java")
9864 #:phases
9865 (modify-phases %standard-phases
9866 (add-after 'build 'build-resources
9867 (lambda _
9868 (mkdir-p "build/classes/org/joda/time/tz/data")
9869 (mkdir-p "build/classes/org/joda/time/format")
6d0368eb
JL
9870 ;; This will produce the following exception:
9871 ;; java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap"
9872 ;; which is normal, because it doesn't exist yet. It still generates
9873 ;; the same file as in the binary one can find on maven.
9874 (invoke "java" "-cp"
9875 (string-append "build/classes:" (getenv "CLASSPATH"))
9876 "org.joda.time.tz.ZoneInfoCompiler"
9877 "-src" "src/main/java/org/joda/time/tz/src"
9878 "-dst" "build/classes/org/joda/time/tz/data"
9879 "africa" "antarctica" "asia" "australasia"
9880 "europe" "northamerica" "southamerica"
9881 "pacificnew" "etcetera" "backward" "systemv")
0158ea8a
JL
9882 (for-each (lambda (f)
9883 (copy-file f (string-append
9884 "build/classes/org/joda/time/format/"
9885 (basename f))))
9886 (find-files "src/main/java/org/joda/time/format" ".*.properties"))
9887 #t))
9888 (add-before 'install 'regenerate-jar
9889 (lambda _
9890 ;; We need to regenerate the jar file to add generated data.
9891 (delete-file "build/jar/java-joda-time.jar")
6d0368eb 9892 (invoke "ant" "jar")))
0158ea8a
JL
9893 (add-before 'check 'copy-test-resources
9894 (lambda _
9895 (mkdir-p "build/test-classes/org/joda/time/tz/data")
9896 (copy-file "src/test/resources/tzdata/ZoneInfoMap"
9897 "build/test-classes/org/joda/time/tz/data/ZoneInfoMap")
9898 (copy-recursively "src/test/resources" "build/test-classes")
9899 #t)))))
9900 (inputs
9901 `(("java-joda-convert" ,java-joda-convert)))
9902 (native-inputs
9903 `(("java-junit" ,java-junit)
9904 ("java-hamcrest-core" ,java-hamcrest-core)
9905 ("tzdata" ,tzdata)))
9906 (home-page "http://www.joda.org/joda-time/")
9907 (synopsis "Replacement for the Java date and time classes")
9908 (description "Joda-Time is a replacement for the Java date and time
9909classes prior to Java SE 8.")
9910 (license license:asl2.0)))
6d0368eb
JL
9911
9912(define-public java-xerces
9913 (package
9914 (name "java-xerces")
9915 (version "2.11.0")
9916 (source
9917 (origin
9918 (method url-fetch)
9919 (uri (string-append "mirror://apache/xerces/j/source/"
9920 "Xerces-J-src." version ".tar.gz"))
9921 (sha256
9922 (base32 "1006igwy2lqrmjvdk64v8dg6qbk9c29pm8xxx7r87n0vnpvmx6pm"))
9923 (patches (search-patches
9924 "java-xerces-xjavac_taskdef.patch"
9925 "java-xerces-build_dont_unzip.patch"
9926 "java-xerces-bootclasspath.patch"))))
9927 (build-system ant-build-system)
9928 (arguments
9929 `(#:tests? #f;; Test files are not present
9930 #:test-target "test"
9931 #:jdk ,icedtea-8
9932 #:phases
9933 (modify-phases %standard-phases
9934 (add-after 'unpack 'create-build.properties
9935 (lambda* (#:key inputs #:allow-other-keys)
9936 (let ((jaxp (assoc-ref inputs "java-jaxp"))
9937 (resolver (assoc-ref inputs "java-apache-xml-commons-resolver")))
9938 (with-output-to-file "build.properties"
9939 (lambda _
9940 (format #t
9941 "jar.jaxp = ~a/share/java/jaxp.jar~@
9942 jar.apis-ext = ~a/share/java/jaxp.jar~@
9943 jar.resolver = ~a/share/java/xml-resolver.jar~%"
9944 jaxp jaxp resolver)))
9945 ;; Make xerces use our version of jaxp in tests
9946 (substitute* "build.xml"
9947 (("xml-apis.jar")
9948 (string-append jaxp "/share/java/jaxp.jar"))
9949 (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}")
9950 "${jar.apis}")))
9951 #t))
9952 (replace 'install (install-jars "build")))))
9953 (inputs
9954 `(("java-apache-xml-commons-resolver" ,java-apache-xml-commons-resolver)
9955 ("java-jaxp" ,java-jaxp)))
9956 (home-page "https://xerces.apache.org/xerces2-j/")
9957 (synopsis "Validating XML parser for Java with DOM level 3 support")
9958 (description "The Xerces2 Java parser is the reference implementation of
9959XNI, the Xerces Native Interface, and also a fully conforming XML Schema
9960processor.
9961
9962Xerces2-J supports the following standards and APIs:
9963
9964@itemize
9965@item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation
9966@item Namespaces in XML Recommendation
9967@item Document Object Model (DOM) Level 2 Core, Events, and Traversal and
9968 Range Recommendations
9969@item Simple API for XML (SAX) 2.0.1 Core and Extension
9970@item Java APIs for XML Processing (JAXP) 1.2.01
9971@item XML Schema 1.0 Structures and Datatypes Recommendations
9972@item Experimental implementation of the Document Object Model (DOM) Level 3
9973 Core and Load/Save Working Drafts
9974@item Provides a partial implementation of the XML Inclusions (XInclude) W3C
9975 Candidate Recommendation
9976@end itemize
9977
9978Xerces is now able to parse documents written according to the XML 1.1
9979Candidate Recommendation, except that it does not yet provide an option to
9980enable normalization checking as described in section 2.13 of this
9981specification. It also handles namespaces according to the XML Namespaces 1.1
9982Candidate Recommendation, and will correctly serialize XML 1.1 documents if
9983the DOM level 3 load/save API's are in use.")
9984 (license license:asl2.0)))
e06bf428 9985
ae6922ed
DM
9986(define-public java-jakarta-regexp
9987 (package
9988 (name "java-jakarta-regexp")
9989 (version "1.5")
9990 (source
9991 (origin
9992 (method url-fetch)
9993 (uri (string-append
9994 "https://archive.apache.org/dist/jakarta/regexp/jakarta-regexp-"
9995 version ".tar.gz"))
9996 (sha256
9997 (base32
9998 "0zg9rmyif48dck0cv6ynpxv23mmcsx265am1fnnxss7brgw0ms3r"))))
9999 (build-system ant-build-system)
10000 (arguments
10001 `(#:test-target "test"
10002 #:phases
10003 (modify-phases %standard-phases
10004 (replace 'install
10005 (lambda* (#:key outputs #:allow-other-keys)
10006 (let* ((out (assoc-ref outputs "out"))
10007 (out-share (string-append out "/share/java")))
10008 (mkdir-p out-share)
10009 (for-each (lambda (name)
10010 (install-file name out-share))
10011 (find-files "build" "^jakarta-regexp-.*\\.jar$"))
10012 #t))))))
10013 (home-page "https://attic.apache.org/projects/jakarta-regexp.html")
10014 (synopsis "Regular expression parser generator for Java.")
10015 (description "@code{jakarta-regexp} is an old regular expression parser
10016generator for Java.")
10017 (license license:asl2.0)))
10018
e06bf428
JL
10019(define-public java-jline
10020 (package
10021 (name "java-jline")
10022 (version "1.0")
10023 (source (origin
10024 (method url-fetch)
10025 (uri (string-append "https://github.com/jline/jline1/archive/jline-"
10026 version ".tar.gz"))
10027 (sha256
10028 (base32
10029 "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir"))))
10030 (build-system ant-build-system)
10031 (arguments
10032 `(#:jar-name "jline.jar"
10033 #:source-dir "src/main/java"
10034 #:test-dir "src/test"
10035 #:phases
10036 (modify-phases %standard-phases
10037 (add-before 'build 'copy-resources
10038 (lambda _
10039 (copy-recursively "src/main/resources" "build/classes")
10040 #t)))))
10041 (native-inputs
10042 `(("java-junit" ,java-junit)))
10043 (home-page "https://jline.github.io")
10044 (synopsis "Console input handling library")
10045 (description "JLine is a Java library for handling console input. It is
10046similar in functionality to BSD editline and GNU readline but with additional
10047features that bring it on par with the Z shell line editor.")
10048 (license license:bsd-3)))
7ac4f054 10049
49d74311
JL
10050(define-public java-jline-2
10051 (package
10052 (inherit java-jline)
10053 (version "2.14.5")
10054 (source (origin
10055 (method url-fetch)
10056 (uri (string-append "https://github.com/jline/jline2/archive/jline-"
10057 version ".tar.gz"))
10058 (sha256
10059 (base32
10060 "1c6qa26mf0viw8hg4jnv72s7i1qb1gh1l8rrzcdvqhqhx82rkdlf"))))
10061 (arguments
10062 `(#:jdk ,icedtea-8
10063 ,@(package-arguments java-jline)))
10064 (inputs
10065 `(("java-jansi" ,java-jansi)
10066 ("java-jansi-native" ,java-jansi-native)))
10067 (native-inputs
10068 `(("java-powermock-modules-junit4" ,java-powermock-modules-junit4)
10069 ("java-powermock-modules-junit4-common" ,java-powermock-modules-junit4-common)
10070 ("java-powermock-api-easymock" ,java-powermock-api-easymock)
10071 ("java-powermock-api-support" ,java-powermock-api-support)
10072 ("java-powermock-core" ,java-powermock-core)
10073 ("java-powermock-reflect" ,java-powermock-reflect)
10074 ("java-easymock" ,java-easymock)
10075 ("java-jboss-javassist" ,java-jboss-javassist)
10076 ("java-objenesis" ,java-objenesis)
10077 ("java-asm" ,java-asm)
10078 ("java-hamcrest-core" ,java-hamcrest-core)
10079 ("java-cglib" ,java-cglib)
10080 ("java-junit" ,java-junit)
10081 ("java-hawtjni" ,java-hawtjni)))))
10082
7ac4f054
JL
10083(define-public java-xmlunit
10084 (package
10085 (name "java-xmlunit")
10086 (version "2.5.1")
10087 (source (origin
10088 (method url-fetch)
10089 (uri (string-append "https://github.com/xmlunit/xmlunit/archive/v"
10090 version ".tar.gz"))
10091 (file-name (string-append name "-" version ".tar.gz"))
10092 (sha256
10093 (base32
10094 "035rivlnmwhfqj0fzviciv0bkh1h95ps1iwnh2kjcvdbk5nccm4z"))))
10095 (build-system ant-build-system)
10096 (arguments
10097 `(#:jar-name "java-xmlunit.jar"
10098 #:source-dir "xmlunit-core/src/main/java"
10099 #:test-dir "xmlunit-core/src/test"
10100 #:phases
10101 (modify-phases %standard-phases
10102 (add-before 'check 'copy-test-resources
10103 (lambda* (#:key inputs #:allow-other-keys)
10104 (copy-recursively (assoc-ref inputs "resources") "../test-resources")
10105 #t)))))
10106 (native-inputs
10107 `(("java-junit" ,java-junit)
10108 ("java-mockito-1" ,java-mockito-1)
10109 ("java-hamcrest-all" ,java-hamcrest-all)
10110 ("java-objenesis" ,java-objenesis)
10111 ("java-asm" ,java-asm)
10112 ("java-cglib" ,java-cglib)
10113 ("resources"
10114 ,(origin
10115 (method git-fetch)
10116 (uri (git-reference
10117 (url "https://github.com/xmlunit/test-resources.git")
10118 (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec")))
10119 (file-name "java-xmlunit-test-resources")
10120 (sha256
10121 (base32
10122 "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr"))))))
10123 (home-page "http://www.xmlunit.org/")
10124 (synopsis "XML output testing")
10125 (description "XMLUnit provides you with the tools to verify the XML you
10126emit is the one you want to create. It provides helpers to validate against
10127an XML Schema, assert the values of XPath queries or compare XML documents
10128against expected outcomes.")
10129 (license license:asl2.0)))
73a1f10a
JL
10130
10131(define-public java-xmlunit-legacy
10132 (package
10133 (inherit java-xmlunit)
10134 (name "java-xmlunit-legacy")
10135 (arguments
10136 `(#:jar-name "java-xmlunit-legacy.jar"
10137 #:source-dir "xmlunit-legacy/src/main/java"
10138 #:test-dir "xmlunit-legacy/src/test"))
10139 (inputs
10140 `(("java-xmlunit" ,java-xmlunit)
10141 ("java-junit" ,java-junit)))
10142 (native-inputs
10143 `(("java-mockito-1" ,java-mockito-1)))))
93abc975 10144
f5cc5ead
JL
10145(define-public java-xmlunit-matchers
10146 (package
10147 (inherit java-xmlunit)
10148 (name "java-xmlunit-matchers")
10149 (arguments
10150 `(#:jar-name "java-xmlunit-matchers.jar"
10151 #:source-dir "xmlunit-matchers/src/main/java"
10152 #:test-dir "xmlunit-matchers/src/test"
10153 #:test-exclude
10154 ;; Cannot open xsd for http://www.xmlunit.org/test-support/Book.xsd
10155 (list "**/ValidationMatcherTest.java")
10156 #:phases
10157 (modify-phases %standard-phases
10158 (add-before 'build 'copy-test-class
10159 (lambda _
10160 (copy-file "xmlunit-core/src/test/java/org/xmlunit/TestResources.java"
10161 "xmlunit-matchers/src/test/java/org/xmlunit/TestResources.java")
10162 #t))
10163 (add-before 'build 'fix-test-resources-path
10164 (lambda _
10165 (substitute* (find-files "xmlunit-matchers/src/test" ".*.java")
10166 (("../test-resources") "test-resources"))
10167 #t))
10168 (add-before 'check 'copy-test-resources
10169 (lambda* (#:key inputs #:allow-other-keys)
10170 (copy-recursively (assoc-ref inputs "resources") "test-resources")
10171 #t)))))
10172 (inputs
10173 `(("java-xmlunit" ,java-xmlunit)
10174 ("java-junit" ,java-junit)))))
10175
93abc975
RW
10176(define-public java-openchart2
10177 (package
10178 (name "java-openchart2")
10179 (version "1.4.3")
10180 (source (origin
10181 (method url-fetch)
10182 (uri (string-append "http://download.approximatrix.com/openchart2/"
10183 "openchart2-" version ".source.zip"))
10184 (sha256
10185 (base32
10186 "1xq96zm5r02n1blja0072jmmsifmxc40lbyfbnmcnr6mw42frh4g"))))
10187 (build-system ant-build-system)
10188 (arguments
10189 `(#:test-target "test"
10190 #:phases
10191 (modify-phases %standard-phases
10192 (add-after 'unpack 'fix-junit-errors
10193 (lambda _
10194 (with-directory-excursion "unittest/src/com/approximatrix/charting/"
10195 (substitute* '("coordsystem/ticklocator/NumericXTickLocatorTest.java"
10196 "coordsystem/ticklocator/NumericYTickLocatorTest.java"
10197 "coordsystem/ticklocator/ObjectXTickLocatorTest.java"
10198 "model/DefaultChartDataModelConstraintsTest.java"
10199 "model/MultiScatterDataModelConstraintsTest.java"
10200 "model/threedimensional/DotPlotDataModelConstraintsTest.java")
10201 (("(assertEquals[^;]+);" before _)
10202 (string-append (string-drop-right before 2) ", 1E-6);"))))
10203 #t))
10204 (replace 'install (install-jars ".")))))
10205 (native-inputs
10206 `(("unzip" ,unzip)
10207 ("java-junit" ,java-junit)
10208 ("java-hamcrest-core" ,java-hamcrest-core)))
10209 (home-page "http://approximatrix.com/products/openchart2/")
10210 (synopsis "Simple plotting for Java")
10211 (description "Openchart2 provides a simple, yet powerful, interface for
10212Java programmers to create two-dimensional charts and plots. The library
10213features an assortment of graph styles, including advanced scatter plots, bar
10214graphs, and pie charts.")
10215 (license license:lgpl2.1+)))
5f5b31c6
JL
10216
10217(define-public java-commons-httpclient
10218 (package
10219 (name "java-commons-httpclient")
10220 (version "3.1")
10221 (source (origin
10222 (method url-fetch)
10223 (uri (string-append "https://archive.apache.org/dist/httpcomponents/"
10224 "commons-httpclient/source/commons-httpclient-"
10225 version "-src.tar.gz"))
10226 (sha256
10227 (base32
10228 "1wlpn3cfy3d4inxy6g7wxcsa8p7sshn6aldk9y4ia3lb879rd97r"))))
10229 (build-system ant-build-system)
10230 (arguments
10231 `(#:build-target "compile"
10232 #:test-target "test"
10233 #:tests? #f; requires junit-textui (junit 3)
10234 #:phases
10235 (modify-phases %standard-phases
10236 (add-before 'build 'fix-accent
10237 (lambda _
10238 (for-each (lambda (file)
10239 (with-fluids ((%default-port-encoding "ISO-8859-1"))
10240 (substitute* file
10241 (("\\* @author Ortwin .*") "* @author Ortwin Glueck\n"))))
10242 '("src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java"
10243 "src/examples/TrivialApp.java" "src/examples/ClientApp.java"
10244 "src/test/org/apache/commons/httpclient/TestHttps.java"
2c8ac364
MW
10245 "src/test/org/apache/commons/httpclient/TestURIUtil2.java"))
10246 #t))
5f5b31c6
JL
10247 (replace 'install
10248 (lambda* (#:key outputs #:allow-other-keys)
10249 (invoke "ant" "dist"
10250 (string-append "-Ddist.home=" (assoc-ref outputs "out")
10251 "/share/java"))
10252 #t)))))
10253 (propagated-inputs
10254 `(("java-commons-logging" ,java-commons-logging-minimal)
10255 ("java-commons-codec" ,java-commons-codec)))
10256 (home-page "https://hc.apache.org")
10257 (synopsis "HTTP/1.1 compliant HTTP agent implementation")
10258 (description "This package contains an HTTP/1.1 compliant HTTP agent
10259implementation. It also provides reusable components for client-side
10260authentication, HTTP state management, and HTTP connection management.")
10261 (license license:asl2.0)))
5fe981dc
JL
10262
10263(define-public java-commons-vfs
10264 (package
10265 (name "java-commons-vfs")
10266 (version "2.2")
10267 (source (origin
10268 (method url-fetch)
10269 (uri (string-append "mirror://apache/commons/vfs/source/"
10270 "commons-vfs2-distribution-" version "-src.tar.gz"))
10271 (file-name (string-append name "-" version ".tar.gz"))
10272 (sha256
10273 (base32
10274 "1cnq1iaghbp4cslpnvwbp83i5v234x87irssqynhwpfgw7caf1s3"))
10275 (modules '((guix build utils)))
10276 (snippet
10277 '(begin
10278 (for-each delete-file
10279 (find-files "." "\\.jar$"))
10280 #t))))
10281 (build-system ant-build-system)
10282 (arguments
10283 `(#:jar-name "commons-vfs.jar"
10284 #:source-dir "commons-vfs2/src/main/java"
10285 #:test-dir "commons-vfs2/src/test"
10286 ; FIXME: tests depend on many things: apache sshd, hadoop, ftpserver, ...
10287 #:tests? #f
10288 #:phases
10289 (modify-phases %standard-phases
10290 (add-before 'build 'remove-hadoop-and-webdav
10291 ; Remove these files as they are not required and depend on difficult
10292 ; packages.
10293 (lambda _
10294 (for-each delete-file-recursively
10295 '("commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/webdav"
2c8ac364
MW
10296 "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs"))
10297 #t)))))
5fe981dc
JL
10298 (inputs
10299 `(("java-commons-collections4" ,java-commons-collections4)
10300 ("java-commons-compress" ,java-commons-compress)
10301 ("java-commons-httpclient" ,java-commons-httpclient)
10302 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
10303 ("java-commons-net" ,java-commons-net)
10304 ("java-jsch" ,java-jsch)))
10305 (home-page "http://commons.apache.org/proper/commons-vfs/")
52beae7b 10306 (synopsis "Java file system library")
5fe981dc
JL
10307 (description "Commons VFS provides a single API for accessing various
10308different file systems. It presents a uniform view of the files from various
10309different sources, such as the files on local disk, on an HTTP server, or
10310inside a Zip archive.")
10311 (license license:asl2.0)))
f7b512c0
JL
10312
10313(define-public java-jakarta-oro
10314 (package
10315 (name "java-jakarta-oro")
10316 (version "2.0.8")
10317 (source (origin
10318 (method url-fetch)
10319 (uri (string-append "https://archive.apache.org/dist/jakarta/oro/"
10320 "jakarta-oro-" version ".tar.gz"))
10321 (sha256
10322 (base32
10323 "0rpmnsskiwmsy8r0sckz5n5dbvh3vkxx8hpm177c754r8xy3qksc"))
10324 (modules '((guix build utils)))
10325 (snippet
10326 `(begin
10327 (delete-file (string-append "jakarta-oro-" ,version ".jar"))
10328 #t))))
10329 (build-system ant-build-system)
10330 (arguments
10331 `(#:build-target "package"
10332 #:tests? #f; tests are run as part of the build process
10333 #:phases
10334 (modify-phases %standard-phases
10335 (replace 'install
10336 (install-jars ,(string-append "jakarta-oro-" version))))))
10337 (home-page "https://jakarta.apache.org/oro/")
10338 (synopsis "Text-processing for Java")
10339 (description "The Jakarta-ORO Java classes are a set of text-processing
10340Java classes that provide Perl5 compatible regular expressions, AWK-like
10341regular expressions, glob expressions, and utility classes for performing
10342substitutions, splits, filtering filenames, etc. This library is the successor
10343of the OROMatcher, AwkTools, PerlTools, and TextTools libraries originally
10344from ORO, Inc.")
10345 (license license:asl1.1)))
a970288c
JL
10346
10347(define-public java-native-access
10348 (package
10349 (name "java-native-access")
10350 (version "4.5.1")
10351 (source (origin
10352 (method url-fetch)
10353 (uri (string-append "https://github.com/java-native-access/jna/"
10354 "archive/" version ".tar.gz"))
10355 (file-name (string-append name "-" version ".tar.gz"))
10356 (sha256
10357 (base32
10358 "0zrpzkib6b905i018a9pqlzkqinphywr6y4jwv6mwp63jjqvqkd9"))
10359 (modules '((guix build utils)))
10360 (snippet
10361 `(begin
10362 (for-each delete-file (find-files "." ".*.jar"))
10363 (delete-file-recursively "native/libffi")
10364 (delete-file-recursively "dist")
10365 #t))))
10366 (build-system ant-build-system)
10367 (arguments
10368 `(#:tests? #f; FIXME: tests require reflections.jar
10369 #:test-target "test"
10370 #:make-flags (list "-Ddynlink.native=true")
10371 #:phases
10372 (modify-phases %standard-phases
10373 (add-before 'build 'fix-build.xml
10374 (lambda* (#:key inputs #:allow-other-keys)
10375 (substitute* "build.xml"
10376 ;; Since we removed the bundled ant.jar, give the correct path
10377 (("lib/ant.jar") (string-append (assoc-ref inputs "ant") "/lib/ant.jar"))
10378 ;; We removed generated native libraries. We can only rebuild one
10379 ;; so don't fail if we can't find a native library for another architecture.
10380 (("zipfileset") "zipfileset erroronmissingarchive=\"false\""))
10381 ;; Copy test dependencies
10382 (copy-file (string-append (assoc-ref inputs "java-junit")
10383 "/share/java/junit.jar")
10384 "lib/junit.jar")
10385 (copy-file (string-append (assoc-ref inputs "java-hamcrest-core")
10386 "/share/java/hamcrest-core.jar")
10387 "lib/hamcrest-core.jar")
10388 ;; FIXME: once reflections.jar is built, copy it to lib/test.
10389 #t))
10390 (add-before 'build 'build-native
10391 (lambda _
10392 (invoke "ant" "-Ddynlink.native=true" "native")
10393 #t))
10394 (replace 'install
10395 (install-jars "build")))))
10396 (inputs
10397 `(("libffi" ,libffi)
10398 ("libx11" ,libx11)
10399 ("libxt" ,libxt)))
10400 (native-inputs
10401 `(("java-junit" ,java-junit)
10402 ("java-hamcrest-core" ,java-hamcrest-core)))
10403 (home-page "https://github.com/java-native-access/jna")
10404 (synopsis "Access to native shared libraries from Java")
10405 (description "JNA provides Java programs easy access to native shared
10406libraries without writing anything but Java code - no JNI or native code is
10407required. JNA allows you to call directly into native functions using natural
10408Java method invocation.")
10409 ;; Java Native Access project (JNA) is dual-licensed under 2
10410 ;; alternative Free licenses: LGPL 2.1 or later and Apache License 2.0.
10411 (license (list
10412 license:asl2.0
10413 license:lgpl2.1+))))
cfb55cfc
JL
10414
10415(define-public java-native-access-platform
10416 (package
10417 (inherit java-native-access)
10418 (name "java-native-access-platform")
10419 (arguments
10420 `(#:test-target "test"
10421 #:tests? #f; require jna-test.jar
10422 #:phases
10423 (modify-phases %standard-phases
10424 (add-before 'build 'chdir
10425 (lambda _
10426 (chdir "contrib/platform")
10427 #t))
10428 (add-after 'chdir 'fix-ant
10429 (lambda* (#:key inputs #:allow-other-keys)
10430 (substitute* "nbproject/project.properties"
10431 (("../../build/jna.jar")
10432 (string-append (assoc-ref inputs "java-native-access")
10433 "/share/java/jna.jar"))
10434 (("../../lib/hamcrest-core-.*.jar")
10435 (string-append (assoc-ref inputs "java-hamcrest-core")
10436 "/share/java/hamcrest-core.jar"))
10437 (("../../lib/junit.jar")
10438 (string-append (assoc-ref inputs "java-junit")
10439 "/share/java/junit.jar")))
10440 #t))
10441 (replace 'install
10442 (install-jars "dist")))))
10443 (inputs
10444 `(("java-native-access" ,java-native-access)))
10445 (synopsis "Cross-platform mappings for jna")
10446 (description "java-native-access-platfrom has cross-platform mappings
10447and mappings for a number of commonly used platform functions, including a
10448large number of Win32 mappings as well as a set of utility classes that
10449simplify native access.")))
470674a5
JL
10450
10451(define-public java-jsch-agentproxy-core
10452 (package
10453 (name "java-jsch-agentproxy-core")
10454 (version "0.0.8")
10455 (source (origin
10456 (method url-fetch)
10457 (uri (string-append "https://github.com/ymnk/jsch-agent-proxy/archive/"
10458 version ".tar.gz"))
10459 (file-name (string-append name "-" version ".tar.gz"))
10460 (sha256
10461 (base32
10462 "02iqg6jbc1kxvfzqcg6wy9ygqxfm82bw5rf6vnswqy4y572niz4q"))))
10463 (build-system ant-build-system)
10464 (arguments
10465 `(#:jar-name "jsch-agentproxy-core.jar"
10466 #:source-dir "jsch-agent-proxy-core/src/main/java"
10467 #:tests? #f)); no tests
10468 (home-page "https://github.com/ymnk/jsch-agent-proxy")
f1d79c97 10469 (synopsis "Core component of the proxy to ssh-agent and Pageant in Java")
470674a5
JL
10470 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10471and Pageant included Putty. It will be easily integrated into JSch, and users
10472will be allowed to use these programs for authentication.")
10473 (license license:bsd-3)))
f1d79c97
JL
10474
10475(define-public java-jsch-agentproxy-sshagent
10476 (package
10477 (inherit java-jsch-agentproxy-core)
10478 (name "java-jsch-agentproxy-sshagent")
10479 (arguments
10480 `(#:jar-name "jsch-agentproxy-sshagent.jar"
10481 #:source-dir "jsch-agent-proxy-sshagent/src/main/java"
10482 #:tests? #f)); no tests
10483 (inputs
10484 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
10485 (synopsis "Proxy to ssh-agent")
10486 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10487and Pageant included in Putty. This component contains the code for a proxy to
10488ssh-agent.")))
f438e638
JL
10489
10490(define-public java-jsch-agentproxy-usocket-jna
10491 (package
10492 (inherit java-jsch-agentproxy-core)
10493 (name "java-jsch-agentproxy-usocket-jna")
10494 (arguments
10495 `(#:jar-name "jsch-agentproxy-usocket-jna.jar"
10496 #:source-dir "jsch-agent-proxy-usocket-jna/src/main/java"
10497 #:tests? #f)); no tests
10498 (inputs
10499 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10500 ("java-native-access" ,java-native-access)))
10501 (synopsis "USocketFactory implementation using JNA")
10502 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10503and Pageant included in Putty. This component contains an implementation of
10504USocketFactory using @dfn{JNA} (Java Native Access).")))
475225e3
JL
10505
10506(define-public java-jsch-agentproxy-pageant
10507 (package
10508 (inherit java-jsch-agentproxy-core)
10509 (name "java-jsch-agentproxy-pageant")
10510 (arguments
10511 `(#:jar-name "jsch-agentproxy-pageant.jar"
10512 #:source-dir "jsch-agent-proxy-pageant/src/main/java"
10513 #:tests? #f)); no tests
10514 (inputs
10515 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10516 ("java-native-access" ,java-native-access)
10517 ("java-native-access-platform" ,java-native-access-platform)))
10518 (synopsis "Proxy to pageant")
10519 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10520and Pageant included in Putty. This component contains the code for a proxy to
10521pageant.")))
96d6d9c7
JL
10522
10523(define-public java-jsch-agentproxy-usocket-nc
10524 (package
10525 (inherit java-jsch-agentproxy-core)
10526 (name "java-jsch-agentproxy-usocket-nc")
10527 (arguments
10528 `(#:jar-name "jsch-agentproxy-usocket-nc.jar"
10529 #:source-dir "jsch-agent-proxy-usocket-nc/src/main/java"
10530 #:tests? #f)); no tests
10531 (inputs
10532 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
10533 (synopsis "USocketFactory implementation using netcat")
10534 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10535and Pageant included in Putty. This component contains an implementation of
10536USocketFactory using netcat.")))
5a46b17b
JL
10537
10538(define-public java-jsch-agentproxy-connector-factory
10539 (package
10540 (inherit java-jsch-agentproxy-core)
10541 (name "java-jsch-agentproxy-connector-factory")
10542 (arguments
10543 `(#:jar-name "jsch-agentproxy-connector-factory.jar"
10544 #:source-dir "jsch-agent-proxy-connector-factory/src/main/java"
10545 #:tests? #f)); no tests
10546 (inputs
10547 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10548 ("java-jsch-agentproxy-sshagent" ,java-jsch-agentproxy-sshagent)
10549 ("java-jsch-agentproxy-usocket-jna" ,java-jsch-agentproxy-usocket-jna)
10550 ("java-jsch-agentproxy-pageant" ,java-jsch-agentproxy-pageant)
10551 ("java-jsch-agentproxy-usocket-nc" ,java-jsch-agentproxy-usocket-nc)))
10552 (synopsis "Connector factory for jsch agent proxy")
10553 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10554and Pageant included in Putty. This component contains a connector factory.")))
b0fbf596
JL
10555
10556(define-public java-jsch-agentproxy-jsch
10557 (package
10558 (inherit java-jsch-agentproxy-core)
10559 (name "java-jsch-agentproxy-jsch")
10560 (arguments
10561 `(#:jar-name "jsch-agentproxy-jsch.jar"
10562 #:source-dir "jsch-agent-proxy-jsch/src/main/java"
10563 #:tests? #f)); no tests
10564 (inputs
10565 `(("java-jsch" ,java-jsch)
10566 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
10567 (synopsis "JSch integration library for agentproxy")
10568 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10569and Pageant included in Putty. This component contains a library to use
10570jsch-agent-proxy with JSch.")))
f1f4a4f0
JL
10571
10572(define-public java-apache-ivy
10573 (package
10574 (name "java-apache-ivy")
10575 (version "2.4.0")
10576 (source (origin
10577 (method url-fetch)
10578 (uri (string-append "mirror://apache//ant/ivy/" version
10579 "/apache-ivy-" version "-src.tar.gz"))
10580 (sha256
10581 (base32
10582 "1xkfn57g2m7l6y0xdq75x5rnrgk52m9jx2xah70g3ggl8750hbr0"))
10583 (patches
10584 (search-patches
10585 "java-apache-ivy-port-to-latest-bouncycastle.patch"))))
10586 (build-system ant-build-system)
10587 (arguments
10588 `(#:jar-name "ivy.jar"
10589 #:tests? #f
10590 #:phases
10591 (modify-phases %standard-phases
10592 (add-before 'build 'remove-example
10593 (lambda _
10594 (delete-file-recursively "src/example")
10595 #t))
10596 (add-before 'build 'copy-resources
10597 (lambda _
10598 (with-directory-excursion "src/java"
10599 (for-each (lambda (file)
10600 (install-file file (string-append "../../build/classes/" (dirname file))))
10601 (append
10602 (find-files "." ".*.css")
10603 (find-files "." ".*.ent")
10604 (find-files "." ".*.html")
10605 (find-files "." ".*.properties")
10606 (find-files "." ".*.xsd")
10607 (find-files "." ".*.xsl")
2c8ac364
MW
10608 (find-files "." ".*.xml"))))
10609 #t))
f1f4a4f0
JL
10610 (add-before 'build 'fix-vfs
10611 (lambda _
10612 (substitute*
10613 '("src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java"
10614 "src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java")
10615 (("import org.apache.commons.vfs") "import org.apache.commons.vfs2"))
10616 #t))
10617 (add-before 'install 'copy-manifest
10618 (lambda _
10619 (install-file "META-INF/MANIFEST.MF" "build/classes/META-INF")
10620 #t))
10621 (add-before 'install 'repack
10622 (lambda _
10623 (invoke "jar" "-cmf" "build/classes/META-INF/MANIFEST.MF" "build/jar/ivy.jar"
2c8ac364 10624 "-C" "build/classes" ".")))
f1f4a4f0
JL
10625 (add-after 'install 'install-bin
10626 (lambda* (#:key outputs #:allow-other-keys)
10627 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
10628 (ivy (string-append bin "/ivy"))
10629 (jar (string-append (assoc-ref outputs "out") "/share/java/ivy.jar")))
10630 (mkdir-p bin)
10631 (with-output-to-file ivy
10632 (lambda _
10633 (display (string-append
10634 "#!" (which "sh") "\n"
10635 "if [[ -z $CLASSPATH ]]; then\n"
10636 " cp=\"" (getenv "CLASSPATH") ":" jar "\"\n"
10637 "else\n"
10638 " cp=\"" (getenv "CLASSPATH") ":" jar ":$CLASSPATH\"\n"
10639 "fi\n"
10640 (which "java") " -cp $cp org.apache.ivy.Main $@\n"))))
10641 (chmod ivy #o755)
10642 #t))))))
10643 (inputs
10644 `(("java-bouncycastle" ,java-bouncycastle)
10645 ("java-commons-cli" ,java-commons-cli)
10646 ("java-commons-collections" ,java-commons-collections)
10647 ("java-commons-httpclient" ,java-commons-httpclient)
10648 ("java-commons-lang" ,java-commons-lang)
10649 ("java-commons-vfs" ,java-commons-vfs)
10650 ("java-jakarta-oro" ,java-jakarta-oro)
10651 ("java-jsch" ,java-jsch)
10652 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10653 ("java-jsch-agentproxy-connector-factory" ,java-jsch-agentproxy-connector-factory)
10654 ("java-jsch-agentproxy-jsch" ,java-jsch-agentproxy-jsch)
10655 ("java-junit" ,java-junit)))
10656 (home-page "https://ant.apache.org/ivy")
10657 (synopsis "Dependency manager for the Java programming language")
10658 (description "Ivy is a tool for managing (recording, tracking, resolving
10659and reporting) project dependencies. It is characterized by the following:
10660
10661@itemize
10662@item flexibility and configurability - Ivy is essentially process agnostic
10663 and is not tied to any methodology or structure. Instead it provides the
10664 necessary flexibility and configurability to be adapted to a broad range
10665 of dependency management and build processes.
10666@item tight integration with Apache Ant - while available as a standalone tool,
10667 Ivy works particularly well with Apache Ant providing a number of
10668 powerful Ant tasks ranging from dependency resolution to dependency
10669 reporting and publication.
10670@end itemize")
10671 (license license:asl2.0)))
1a1810f5
JL
10672
10673(define-public java-eclipse-sisu-inject
10674 (package
10675 (name "java-eclipse-sisu-inject")
10676 (version "0.3.3")
10677 (source (origin
ae69b39e
BH
10678 (method git-fetch)
10679 (uri (git-reference
10680 (url "https://github.com/eclipse/sisu.inject/")
10681 (commit "releases/0.3.3")))
10682 (file-name (git-file-name name version))
1a1810f5
JL
10683 (sha256
10684 (base32
ae69b39e 10685 "0gibc9x0bw0f4ls086fx73610fcspz9g2as7kcpcfhvl5znysvg7"))))
1a1810f5
JL
10686 (build-system ant-build-system)
10687 (arguments
10688 `(#:jar-name "eclipse-sisu-inject.jar"
10689 #:source-dir "org.eclipse.sisu.inject/src"
10690 #:jdk ,icedtea-8
10691 #:tests? #f)); no tests
10692 (inputs
10693 `(("java-guice" ,java-guice)
10694 ("java-guice-servlet" ,java-guice-servlet)
10695 ("java-javax-inject" ,java-javax-inject)
4b472f6a 10696 ("java-javaee-servletapi" ,java-javaee-servletapi)
1a1810f5
JL
10697 ("java-junit" ,java-junit)
10698 ("java-slf4j-api" ,java-slf4j-api)
10699 ("java-jsr305" ,java-jsr305)
10700 ("java-jsr250" ,java-jsr250)
10701 ("java-cdi-api" ,java-cdi-api)
10702 ("java-osgi-framework" ,java-osgi-framework)
10703 ("java-osgi-util-tracker" ,java-osgi-util-tracker)
10704 ("java-testng" ,java-testng)))
10705 (home-page "https://www.eclipse.org/sisu/")
10706 (synopsis "Classpath scanning, auto-binding, and dynamic auto-wiring")
10707 (description "Sisu is a modular JSR330-based container that supports
10708classpath scanning, auto-binding, and dynamic auto-wiring. Sisu uses
10709Google-Guice to perform dependency injection and provide the core JSR330
10710support, but removes the need to write explicit bindings in Guice modules.
10711Integration with other containers via the Eclipse Extension Registry and the
10712OSGi Service Registry is a goal of this project.")
10713 (license license:epl1.0)))
7049dea1
JL
10714
10715(define-public java-eclipse-sisu-plexus
10716 (package
10717 (name "java-eclipse-sisu-plexus")
10718 (version "0.3.3")
10719 (source (origin
10720 (method url-fetch)
10721 (uri (string-append "https://github.com/eclipse/sisu.plexus/"
10722 "archive/releases/" version ".tar.gz"))
10723 (sha256
10724 (base32
10725 "0lbj7nxy5j0z71k407zbb82icfqh7midrfk0fb3fa3jzdjz0d9d9"))
10726 (modules '((guix build utils)))
10727 (snippet
10728 '(begin
10729 (for-each delete-file (find-files "." ".*.jar"))
10730 (rename-file "org.eclipse.sisu.plexus.tests/src"
10731 "org.eclipse.sisu.plexus.tests/java")
10732 #t))))
10733 (build-system ant-build-system)
10734 (arguments
10735 `(#:jar-name "eclipse-sisu-plexus.jar"
10736 #:source-dir "org.eclipse.sisu.plexus/src"
10737 #:test-dir "org.eclipse.sisu.plexus.tests"
10738 #:test-exclude
10739 (list
10740 ;; This test fails probably because we can't generate the necessary
10741 ;; meta-inf files.
10742 "**/PlexusLoggingTest.*"
10743 ;; FIXME: This test fails because of some injection error
10744 "**/PlexusRequirementTest.*")
10745 #:jdk ,icedtea-8
10746 #:phases
10747 (modify-phases %standard-phases
10748 (add-before 'build 'copy-resources
10749 (lambda _
10750 (install-file "org.eclipse.sisu.plexus/META-INF/plexus/components.xml"
10751 "build/classes/META-INF/plexus")
10752 #t))
10753 (add-before 'check 'build-test-jar
10754 (lambda _
10755 (with-directory-excursion "org.eclipse.sisu.plexus.tests/resources/component-jar/src/main/"
10756 (mkdir "build")
10757 (with-directory-excursion "java"
10758 (apply invoke "javac" "-cp"
10759 (string-append (getenv "CLASSPATH")
10760 ":../../../../../build/classes")
10761 (find-files "." ".*.java"))
10762 (for-each (lambda (file) (install-file file (string-append "../build/" file)))
10763 (find-files "." ".*.jar")))
10764 (mkdir-p "build/META-INF/plexus")
10765 (copy-file "resources/META-INF/plexus/components.xml"
10766 "build/META-INF/plexus/components.xml")
10767 (with-directory-excursion "build"
10768 (invoke "jar" "cf" "../../../component-jar-0.1.jar" ".")))
10769 (with-directory-excursion "org.eclipse.sisu.plexus.tests/"
10770 (copy-recursively "META-INF" "../build/test-classes/META-INF")
10771 (substitute* "java/org/eclipse/sisu/plexus/DefaultPlexusContainerTest.java"
10772 (("resources/component-jar")
10773 "org.eclipse.sisu.plexus.tests/resources/component-jar")))
10774 #t)))))
10775 (inputs
10776 `(("java-plexus-classworlds" ,java-plexus-classworlds)
10777 ("java-plexus-util" ,java-plexus-utils)
10778 ("java-plexus-component-annotations" ,java-plexus-component-annotations)
10779 ("java-osgi-framework" ,java-osgi-framework)
10780 ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)
10781 ("java-guice" ,java-guice)
10782 ("java-javax-inject" ,java-javax-inject)
10783 ("java-slf4j-api" ,java-slf4j-api)
10784 ("java-junit" ,java-junit)))
10785 (native-inputs
10786 `(("java-guava" ,java-guava)
10787 ("java-aopalliance" ,java-aopalliance)
10788 ("java-cglib" ,java-cglib)
10789 ("java-asm" ,java-asm)))
10790 (home-page "https://www.eclipse.org/sisu/")
10791 (synopsis "Plexus support for the sisu container")
10792 (description "Sisu is a modular JSR330-based container that supports
10793classpath scanning, auto-binding, and dynamic auto-wiring. This package
10794adds Plexus support to the Sisu-Inject container.")
10795 (license license:epl1.0)))
3fa18fe7
JL
10796
10797(define-public java-commons-compiler
10798 (package
10799 (name "java-commons-compiler")
10800 (version "3.0.8")
10801 (source (origin
10802 (method git-fetch)
10803 (uri (git-reference
10804 (url "https://github.com/janino-compiler/janino")
10805 (commit "91aa95686d1e4ca3b16a984a03a38686572331b2")))
10806 (file-name (string-append name "-" version))
10807 (sha256
10808 (base32
10809 "04hfdl59sgh20qkxzgnibvs8f9hy6n7znxwpk611y5d89977y62r"))
10810 (modules '((guix build utils)))
10811 (snippet
10812 '(begin
10813 (for-each delete-file
10814 (find-files "." "\\.jar$"))
10815 #t))))
10816 (build-system ant-build-system)
10817 (arguments
10818 `(#:jar-name "commons-compiler.jar"
10819 #:source-dir "commons-compiler/src/main"
10820 #:tests? #f)); no tests
10821 (home-page "https://github.com/janino-compiler/janino")
10822 (synopsis "Java compiler")
10823 (description "Commons-compiler contains an API for janino, including the
10824@code{IExpressionEvaluator}, @code{IScriptEvaluator}, @code{IClassBodyEvaluator}
10825and @code{ISimpleCompiler} interfaces.")
10826 (license license:bsd-3)))
3402e651
JL
10827
10828(define-public java-janino
10829 (package
10830 (inherit java-commons-compiler)
10831 (name "java-janino")
10832 (arguments
10833 `(#:jar-name "janino.jar"
10834 #:source-dir "src/main/java"
10835 #:phases
10836 (modify-phases %standard-phases
10837 (add-before 'configure 'chdir
10838 (lambda _
2c8ac364
MW
10839 (chdir "janino")
10840 #t)))))
3402e651
JL
10841 (inputs
10842 `(("java-commons-compiler" ,java-commons-compiler)))
10843 (native-inputs
10844 `(("java-junit" ,java-junit)
10845 ("java-hamcrest-core" ,java-hamcrest-core)))
10846 (description "Janino is a Java compiler. Janino can compile a set of
10847source files to a set of class files like @code{javac}, but also compile a
10848Java expression, block, class body or source file in memory, load the bytecode
10849and execute it directly in the same JVM. @code{janino} can also be used for
10850static code analysis or code manipulation.")))
7d8207a4
JL
10851
10852(define-public java-logback-core
10853 (package
10854 (name "java-logback-core")
10855 (version "1.2.3")
10856 (source (origin
10857 (method url-fetch)
10858 (uri (string-append "https://github.com/qos-ch/logback/archive/v_"
10859 version ".tar.gz"))
b1ccd2a1 10860 (file-name (string-append name "-" version ".tar.gz"))
7d8207a4
JL
10861 (sha256
10862 (base32
10863 "1x6ga74yfgm94cfx98gybakbrlilx8i2gn6dx13l40kasmys06mi"))
10864 (modules '((guix build utils)))
10865 (snippet
2c8ac364
MW
10866 '(begin
10867 (delete-file-recursively "logback-access/lib")
10868 #t))))
7d8207a4
JL
10869 (build-system ant-build-system)
10870 (arguments
10871 `(#:jar-name "logback.jar"
10872 #:source-dir "src/main/java"
10873 #:test-dir "src/test"
10874 #:test-exclude
10875 ;; These tests fail with Unable to set MockitoNamingPolicy on cglib generator
10876 ;; which creates FastClasses
10877 (list "**/AllCoreTest.*"
10878 "**/AutoFlushingObjectWriterTest.*"
10879 "**/PackageTest.*"
10880 "**/ResilientOutputStreamTest.*"
10881 ;; And we still don't want to run abstract classes
10882 "**/Abstract*.*")
10883 #:phases
10884 (modify-phases %standard-phases
10885 (add-before 'configure 'chdir
10886 (lambda _
10887 (chdir "logback-core")
10888 #t)))))
10889 (inputs
10890 `(("java-javax-mail" ,java-javax-mail)
4b472f6a 10891 ("servlet" ,java-javaee-servletapi)
7d8207a4
JL
10892 ("java-commons-compiler" ,java-commons-compiler)
10893 ("java-janino" ,java-janino)))
10894 (native-inputs
10895 `(("java-junit" ,java-junit)
10896 ("java-hamcrest-core" ,java-hamcrest-core)
10897 ("java-mockito-1" ,java-mockito-1)
10898 ("java-cglib" ,java-cglib)
10899 ("java-asm" ,java-asm)
10900 ("java-objenesis" ,java-objenesis)
10901 ("java-joda-time" ,java-joda-time)))
10902 (home-page "https://logback.qos.ch")
10903 (synopsis "Logging for java")
10904 (description "Logback is intended as a successor to the popular log4j project.
10905This module lays the groundwork for the other two modules.")
10906 ;; Either epl1.0 or lgpl2.1
10907 (license (list license:epl1.0
10908 license:lgpl2.1))))
3a69f5f2
JL
10909
10910(define-public java-logback-classic
10911 (package
10912 (inherit java-logback-core)
10913 (name "java-logback-classic")
10914 (arguments
10915 `(#:jar-name "logback-classic.jar"
10916 #:source-dir "src/main/java"
10917 #:test-dir "src/test"
10918 #:tests? #f; tests require more packages: h2, greenmail, hsql, subethamail, slf4j, log4j, felix
10919 #:jdk ,icedtea-8
10920 #:phases
10921 (modify-phases %standard-phases
10922 (add-before 'configure 'chdir
10923 (lambda _
10924 (chdir "logback-classic")
10925 #t))
10926 (replace 'build
10927 (lambda* (#:key inputs #:allow-other-keys)
10928 (mkdir-p "build/classes")
10929 (setenv "CLASSPATH"
10930 (string-join
10931 (apply append (map (lambda (input)
10932 (find-files (assoc-ref inputs input)
10933 ".*.jar"))
10934 '("java-logback-core" "java-slf4j-api"
4b472f6a 10935 "java-commons-compiler" "servlet"
3a69f5f2
JL
10936 "groovy")))
10937 ":"))
10938 (apply invoke "groovyc" "-d" "build/classes" "-j"
10939 (find-files "src/main/" ".*\\.(groovy|java)$"))
10940 (invoke "ant" "jar")
10941 #t)))))
10942 (inputs
10943 `(("java-logback-core" ,java-logback-core)
10944 ("java-slf4j-api" ,java-slf4j-api)
10945 ,@(package-inputs java-logback-core)))
10946 (native-inputs
10947 `(("groovy" ,groovy)))
10948 (description "Logback is intended as a successor to the popular log4j project.
10949This module can be assimilated to a significantly improved version of log4j.
10950Moreover, @code{logback-classic} natively implements the slf4j API so that you
10951can readily switch back and forth between logback and other logging frameworks
10952such as log4j or @code{java.util.logging} (JUL).")))
ab621bf1
JL
10953
10954(define-public java-qdox
10955 (package
10956 (name "java-qdox")
10957 ; Newer version exists, but this version is required by java-plexus-component-metadata
10958 (version "2.0-M2")
10959 (source (origin
10960 (method url-fetch)
10961 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
10962 ;; Older releases at https://github.com/codehaus/qdox/
10963 ;; Note: The release at maven is pre-generated. The release at
10964 ;; github requires jflex.
10965 (uri (string-append "http://central.maven.org/maven2/"
10966 "com/thoughtworks/qdox/qdox/" version
10967 "/qdox-" version "-sources.jar"))
10968 (sha256
10969 (base32
10970 "10xxrcaicq6axszcr2jpygisa4ch4sinyx5q7kqqxv4lknrmxp5x"))))
10971 (build-system ant-build-system)
10972 (arguments
10973 `(#:jar-name "qdox.jar"
10974 #:tests? #f)); no tests
10975 (home-page "http://qdox.codehaus.org/")
10976 (synopsis "Parse definitions from Java source files")
10977 (description "QDox is a high speed, small footprint parser for extracting
10978class/interface/method definitions from source files complete with JavaDoc
10979@code{@@tags}. It is designed to be used by active code generators or
10980documentation tools.")
10981 (license license:asl2.0)))
c786dff0
LC
10982
10983(define-public java-jgit
10984 (package
10985 (name "java-jgit")
10986 (version "4.7.0.201704051617-r")
10987 (source (origin
10988 (method url-fetch)
10989 (uri (string-append "https://repo1.maven.org/maven2/"
10990 "org/eclipse/jgit/org.eclipse.jgit/"
10991 version "/org.eclipse.jgit-"
10992 version "-sources.jar"))
10993 (sha256
10994 (base32
10995 "13ii4jn02ynzq6i7gsyi21k2i94jpc85wf6bcm31q4cyvzv0mk4k"))))
10996 (build-system ant-build-system)
10997 (arguments
10998 `(#:tests? #f ; There are no tests to run.
10999 #:jar-name "jgit.jar"
11000 ;; JGit must be built with a JDK supporting Java 8.
11001 #:jdk ,icedtea-8
11002 ;; Target our older default JDK.
11003 #:make-flags (list "-Dtarget=1.7")
11004 #:phases
11005 (modify-phases %standard-phases
11006 ;; The jar file generated by the default build.xml does not include
11007 ;; the text properties files, so we need to add them.
11008 (add-after 'build 'add-properties
11009 (lambda* (#:key jar-name #:allow-other-keys)
11010 (with-directory-excursion "src"
11011 (apply invoke "jar" "-uf"
11012 (string-append "../build/jar/" jar-name)
11013 (find-files "." "\\.properties$")))
11014 #t)))))
11015 (inputs
11016 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
11017 ("java-javaewah" ,java-javaewah)
11018 ("java-jsch" ,java-jsch)
11019 ("java-slf4j-api" ,java-slf4j-api)))
11020 (home-page "https://eclipse.org/jgit/")
11021 (synopsis "Java library implementing the Git version control system")
11022 (description "JGit is a lightweight, pure Java library implementing the
11023Git version control system, providing repository access routines, support for
11024network protocols, and core version control algorithms.")
11025 (license license:edl1.0)))
11026
11027;; For axoloti. This package can still be built with icedtea-7, which is
11028;; currently used as the default JDK.
11029(define-public java-jgit-4.2
11030 (package (inherit java-jgit)
11031 (version "4.2.0.201601211800-r")
11032 (source (origin
11033 (method url-fetch)
11034 (uri (string-append "https://repo1.maven.org/maven2/"
11035 "org/eclipse/jgit/org.eclipse.jgit/"
11036 version "/org.eclipse.jgit-"
11037 version "-sources.jar"))
11038 (sha256
11039 (base32
11040 "15gm537iivhnzlkjym4x3wn5jqdjdragsw9pdpzqqg21nrc817mm"))))
11041 (build-system ant-build-system)
11042 (arguments
11043 (substitute-keyword-arguments (package-arguments java-jgit)
11044 ;; Build for default JDK.
11045 ((#:jdk _) icedtea-7)
11046 ((#:phases phases)
11047 `(modify-phases ,phases
11048 (add-after 'unpack 'use-latest-javaewah-API
11049 (lambda _
11050 (substitute* "src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java"
11051 (("wordinbits") "WORD_IN_BITS"))
11052 #t))))))
11053 (inputs
11054 `(("java-javaewah" ,java-javaewah)
11055 ("java-jsch" ,java-jsch)
11056 ("java-slf4j-api" ,java-slf4j-api)))))