gnu: igt-gpu-tools: Don't use NAME in source URI.
[jackhill/guix/guix.git] / gnu / packages / java.scm
CommitLineData
0760e3a1 1;;; GNU Guix --- Functional package management for GNU
799c3c86 2;;; Copyright © 2015, 2016, 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
559239af 3;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
ea9e58ef
CZ
4;;; Copyright © 2016, 2017 Roel Janssen <roel@gnu.org>
5;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
a1a5ef20 6;;; Copyright © 2017, 2018 Julien Lepiller <julien@lepiller.eu>
88f256a1 7;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
1d47ea86 8;;; Copyright © 2016, 2017, 2018 Alex Vong <alexvong1995@gmail.com>
f4548394 9;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
d0e9ded7
GB
10;;; Copyright © 2018 Gábor Boskovits <boskovits@gmail.com>
11;;; Copyright © 2018 Chris Marusich <cmmarusich@gmail.com>
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 gnuzilla) ;nss
56 #:use-module (gnu packages ghostscript) ;lcms
57 #:use-module (gnu packages gnome)
3a69f5f2 58 #:use-module (gnu packages groovy)
0760e3a1 59 #:use-module (gnu packages gtk)
6a5829d9 60 #:use-module (gnu packages guile)
afb5858d 61 #:use-module (gnu packages icu4c)
0760e3a1 62 #:use-module (gnu packages image)
24155bf4 63 #:use-module (gnu packages java-compression)
c4fd86f9 64 #:use-module (gnu packages libffi)
0760e3a1 65 #:use-module (gnu packages linux) ;alsa
2f0d0418 66 #:use-module (gnu packages maths)
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)
2270 (version "7.0.3")
6688c41e 2271 (source (origin
53fb0476
AV
2272 (method url-fetch)
2273 (uri (string-append "https://github.com/javacc/javacc/"
2274 "archive/" version ".tar.gz"))
2275 (file-name (string-append "javacc-" version ".tar.gz"))
6688c41e
RW
2276 (sha256
2277 (base32
6662d65f
AV
2278 "111xc9mnmc5a6qz6x3xbhqc07y1lg2b996ggzw0hrblg42zya9xf"))
2279 (modules '((guix build utils)))
2280 ;; delete bundled jars
33428d12
AV
2281 (snippet '(begin (for-each delete-file-recursively
2282 '("bootstrap" "lib"))
2283 #t))))
6688c41e 2284 (arguments
33428d12
AV
2285 `(#:make-flags ; bootstrap from javacc-4
2286 (list (string-append "-Dbootstrap-jar="
2287 (assoc-ref %build-inputs "javacc")
2288 "/share/java/javacc.jar"))
2289 #:test-target "test"
6688c41e
RW
2290 #:phases
2291 (modify-phases %standard-phases
33428d12
AV
2292 (replace 'install (install-jars "target")))))
2293 (native-inputs
2294 `(("javacc" ,javacc-4)))))
6688c41e 2295
c1cb8576
RW
2296;; This is the last 3.x release of ECJ
2297(define-public java-ecj-3
2298 (package
2299 (name "java-ecj")
2300 (version "3.8.2")
2301 (source (origin
2302 (method url-fetch)
2303 (uri (string-append "http://archive.eclipse.org/eclipse/"
2304 "downloads/drops/R-" version
2305 "-201301310800/ecjsrc-" version ".jar"))
2306 (sha256
2307 (base32
2308 "01mdj14jw11g1jfnki4fi8229p0c6zzckd38zqy2w4m3cjcvsx04"))))
2309 (build-system ant-build-system)
2310 (arguments
2311 `(#:tests? #f ; none included
2312 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2313 #:make-flags (list "-f" "src/build.xml")
2314 #:build-target "build"
2315 #:phases
2316 (modify-phases %standard-phases
2317 (add-after 'unpack 'fix-manifest
2318 (lambda _
2319 ;; Record the main class to make ecj executable.
2320 (with-atomic-file-replacement "src/META-INF/MANIFEST.MF"
2321 (lambda (in out)
2322 (display "Manifest-Version: 1.0
2323Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2c8ac364
MW
2324 out)))
2325 #t))
c1cb8576
RW
2326 (replace 'install (install-jars ".")))))
2327 (home-page "https://eclipse.org")
2328 (synopsis "Eclipse Java development tools core batch compiler")
2329 (description "This package provides the Eclipse Java core batch compiler.")
2330 (license license:epl1.0)))
2331
f201b18e
RW
2332;; This is needed for java-cisd-args4j
2333(define-public java-ecj-3.5
2334 (package (inherit java-ecj-3)
2335 (version "3.5.1")
2336 (source (origin
2337 (method url-fetch/zipbomb)
2338 (uri (string-append "http://archive.eclipse.org/eclipse/"
2339 "downloads/drops/R-" version
2340 "-200909170800/ecjsrc-" version ".zip"))
2341 (sha256
2342 (base32
2343 "1vnl2mavisc567bip736xzsvvbjif5279wc4a7pbdik5wlir8qr7"))))
2344 (build-system ant-build-system)
2345 (arguments
2346 `(#:tests? #f ; none included
2347 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2348 #:build-target "build"
2349 #:phases
2350 (modify-phases %standard-phases
2351 (add-after 'unpack 'fix-manifest
2352 (lambda _
2353 ;; Record the main class to make ecj executable.
2354 (with-atomic-file-replacement "META-INF/MANIFEST.MF"
2355 (lambda (in out)
2356 (dump-port in out)
2357 (display "Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2c8ac364
MW
2358 out)))
2359 #t))
f201b18e
RW
2360 (replace 'install (install-jars ".")))))
2361 (native-inputs
2362 `(("unzip" ,unzip)))))
2363
30d55473
RW
2364(define-public java-cisd-base
2365 (let ((revision 38938)
2366 (base-version "14.12.0"))
2367 (package
2368 (name "java-cisd-base")
2369 (version (string-append base-version "-" (number->string revision)))
2370 (source (origin
2371 (method svn-fetch)
2372 (uri (svn-reference
2373 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2374 "base/tags/release/"
2375 (version-major+minor base-version)
2376 ".x/" base-version "/base/"))
2377 (revision revision)))
2378 (file-name (string-append "java-cisd-base-" version "-checkout"))
2379 (sha256
2380 (base32
2381 "1i5adyf7nzclb0wydgwa1az04qliid8035vpahaandmkmigbnxiy"))
2382 (modules '((guix build utils)))
2383 (snippet
2384 '(begin
2385 ;; Delete included gradle jar
2386 (delete-file-recursively "gradle/wrapper")
2387 ;; Delete pre-built native libraries
2388 (delete-file-recursively "libs")
2389 #t))))
2390 (build-system ant-build-system)
2391 (arguments
2392 `(#:make-flags '("-file" "build/build.xml")
2393 #:test-target "jar-test"
2394 #:jdk ,icedtea-8
2395 #:phases
2396 (modify-phases %standard-phases
2397 (add-after 'unpack 'unpack-build-resources
2398 (lambda* (#:key inputs #:allow-other-keys)
2399 (copy-recursively (assoc-ref inputs "build-resources")
2400 "../build_resources")
2401 #t))
2402 (add-after 'unpack-build-resources 'fix-dependencies
2403 (lambda* (#:key inputs #:allow-other-keys)
2404 (substitute* "build/build.xml"
2405 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2406 (string-append (assoc-ref inputs "java-testng")
2407 "/share/java/java-testng.jar"))
2408 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2409 (string-append (assoc-ref inputs "java-commons-lang")
2410 "/share/java/commons-lang-"
2411 ,(package-version java-commons-lang) ".jar"))
2412 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2413 (string-append (assoc-ref inputs "java-commons-io")
2414 "/share/java/commons-io-"
2415 ,(package-version java-commons-io)
2416 "-SNAPSHOT.jar"))
2417 ;; Remove dependency on svn
2418 (("<build-info.*") "")
2419 (("\\$\\{revision.number\\}")
2420 ,(number->string revision))
2421 (("\\$\\{version.number\\}") ,base-version))
2422 ;; Remove dependency on classycle
2423 (substitute* "../build_resources/ant/build-common.xml"
2424 (("<taskdef name=\"dependency-checker.*") "")
2425 (("classname=\"classycle.*") "")
2426 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2427 #t))
2428 ;; A few tests fail because of the lack of a proper /etc/groups and
2429 ;; /etc/passwd file in the build container.
2430 (add-after 'unpack 'disable-broken-tests
2431 (lambda _
2432 (substitute* "sourceTest/java/ch/systemsx/cisd/base/AllTests.java"
2433 (("Unix.isOperational\\(\\)") "false"))
2434 #t))
2435 ;; These decorators are almost useless and pull in an unpackaged
2436 ;; dependency.
2437 (add-after 'unpack 'remove-useless-decorators
2438 (lambda _
2439 (substitute* "source/java/ch/systemsx/cisd/base/unix/Unix.java"
2440 (("@Private") "")
2441 (("import ch.rinn.restrictions.Private;") ""))
2442 (substitute* "sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java"
2443 (("@Friend.*") "")
2444 (("import ch.rinn.restrictions.Friend;") ""))
2445 #t))
2446 (add-before 'configure 'build-native-code
2447 (lambda* (#:key inputs #:allow-other-keys)
2448 (let ((jdk (assoc-ref inputs "jdk"))
2449 (dir ,(match (%current-system)
2450 ("i686-linux"
2451 "i386-Linux")
2452 ((or "armhf-linux" "aarch64-linux")
2453 "arm-Linux")
2454 ((or "x86_64-linux")
2455 "amd64-Linux")
2456 (_ "unknown-Linux"))))
2457 (with-directory-excursion "source/c"
2458 (invoke "gcc" "-shared" "-O3" "-fPIC" "unix.c"
2459 (string-append "-I" jdk "/include")
2460 (string-append "-I" jdk "/include/linux")
2461 "-o" "libunix.so")
2462 (invoke "gcc" "-shared" "-O3" "-fPIC"
2463 "-DMACHINE_BYTE_ORDER=1"
2464 "copyCommon.c"
2465 "copyByteChar.c"
2466 "copyByteDouble.c"
2467 "copyByteFloat.c"
2468 "copyByteInt.c"
2469 "copyByteLong.c"
2470 "copyByteShort.c"
2471 (string-append "-I" jdk "/include")
2472 (string-append "-I" jdk "/include/linux")
2473 "-o" "libnativedata.so"))
2474 (install-file "source/c/libunix.so"
2475 (string-append "libs/native/unix/" dir))
2476 (install-file "source/c/libnativedata.so"
2477 (string-append "libs/native/nativedata/" dir))
2478 #t)))
2479 ;; In the "check" phase we only build the test executable.
2480 (add-after 'check 'run-tests
2481 (lambda _
2482 (invoke "java" "-jar" "targets/dist/sis-base-test.jar")
2483 (delete-file "targets/dist/sis-base-test.jar")
2484 #t))
2485 (replace 'install (install-jars "targets/dist")))))
2486 (native-inputs
2487 `(("jdk" ,icedtea-8)
2488 ("java-commons-lang" ,java-commons-lang)
2489 ("java-commons-io" ,java-commons-io)
2490 ("java-testng" ,java-testng)
2491 ("build-resources"
2492 ,(origin
2493 (method svn-fetch)
2494 (uri (svn-reference
2495 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2496 "base/tags/release/"
2497 (version-major+minor base-version)
2498 ".x/" base-version
2499 "/build_resources/"))
2500 (revision revision)))
2501 (sha256
2502 (base32
2503 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
2504 (home-page "http://svnsis.ethz.ch")
2505 (synopsis "Utility classes for libraries from ETH Zurich")
2506 (description "This library supplies some utility classes needed for
2507libraries from the SIS division at ETH Zurich like jHDF5.")
2508 ;; The C sources are under a non-copyleft license, which looks like a
2509 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
2510 (license (list license:asl2.0
2511 (license:non-copyleft "file://source/c/COPYING"))))))
2512
04ddca26
RW
2513(define-public java-cisd-args4j
2514 (let ((revision 39162)
2515 (base-version "9.11.2"))
2516 (package
2517 (name "java-cisd-args4j")
2518 (version (string-append base-version "-" (number->string revision)))
2519 (source (origin
2520 (method svn-fetch)
2521 (uri (svn-reference
2522 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2523 "args4j/tags/release/"
2524 (version-major+minor base-version)
2525 ".x/" base-version "/args4j/"))
2526 (revision revision)))
2527 (file-name (string-append "java-cisd-args4j-" version "-checkout"))
2528 (sha256
2529 (base32
2530 "0hhqznjaivq7ips7mkwas78z42s6djsm20rrs7g1zd59rcsakxn2"))))
2531 (build-system ant-build-system)
2532 (arguments
2533 `(#:make-flags '("-file" "build/build.xml")
2534 #:tests? #f ; there are no tests
2535 ;; There are weird build failures with JDK8, such as: "The type
2536 ;; java.io.ObjectInputStream cannot be resolved. It is indirectly
2537 ;; referenced from required .class files"
2538 #:jdk ,icedtea-7
2539 #:modules ((guix build ant-build-system)
2540 (guix build utils)
2541 (guix build java-utils)
2542 (sxml simple)
2543 (sxml transform)
2544 (sxml xpath))
2545 #:phases
2546 (modify-phases %standard-phases
2547 (add-after 'unpack 'unpack-build-resources
2548 (lambda* (#:key inputs #:allow-other-keys)
2549 (mkdir-p "../build_resources")
2550 (invoke "tar" "xf" (assoc-ref inputs "build-resources")
2551 "-C" "../build_resources"
2552 "--strip-components=1")
2553 (mkdir-p "../build_resources/lib")
2554 #t))
2555 (add-after 'unpack-build-resources 'fix-dependencies
2556 (lambda* (#:key inputs #:allow-other-keys)
2557 ;; FIXME: There should be a more convenient abstraction for
2558 ;; editing XML files.
2559 (with-directory-excursion "../build_resources/ant/"
2560 (chmod "build-common.xml" #o664)
2561 (call-with-output-file "build-common.xml.new"
2562 (lambda (port)
2563 (sxml->xml
2564 (pre-post-order
2565 (with-input-from-file "build-common.xml"
2566 (lambda _ (xml->sxml #:trim-whitespace? #t)))
2567 `(;; Remove dependency on classycle and custom ant tasks
2568 (taskdef . ,(lambda (tag . kids)
2569 (let ((name ((sxpath '(name *text*)) kids)))
2570 (if (or (member "build-info" name)
2571 (member "dependency-checker" name)
2572 (member "build-java-subprojects" name)
2573 (member "project-classpath" name))
2574 '() ; skip
2575 `(,tag ,@kids)))))
2576 (typedef . ,(lambda (tag . kids)
2577 (let ((name ((sxpath '(name *text*)) kids)))
2578 (if (member "recursive-jar" name)
2579 '() ; skip
2580 `(,tag ,@kids)))))
2581 (build-java-subprojects . ,(lambda _ '()))
2582 ;; Ignore everything else
2583 (*default* . ,(lambda (tag . kids) `(,tag ,@kids)))
2584 (*text* . ,(lambda (_ txt) txt))))
2585 port)))
2586 (rename-file "build-common.xml.new" "build-common.xml"))
2587 (substitute* "build/build.xml"
2588 (("\\$\\{lib\\}/cisd-base/cisd-base.jar")
2589 (string-append (assoc-ref inputs "java-cisd-base")
2590 "/share/java/sis-base.jar"))
2591 ;; Remove dependency on svn
2592 (("<build-info.*") "")
2593 (("\\$\\{revision.number\\}")
2594 ,(number->string revision))
2595 (("\\$\\{version.number\\}") ,base-version)
2596 ;; Don't use custom ant tasks.
2597 (("recursive-jar") "jar")
2598 (("<project-classpath.*") ""))
2599 #t))
2600 (replace 'install (install-jars "targets/dist")))))
2601 (inputs
2602 `(("java-cisd-base" ,java-cisd-base)))
2603 (native-inputs
2604 `(("ecj" ,java-ecj-3.5)
2605 ("build-resources"
2606 ,(origin
2607 (method svn-fetch)
2608 (uri (svn-reference
2609 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2610 "args4j/tags/release/"
2611 (version-major+minor base-version)
2612 ".x/" base-version
2613 "/build_resources/"))
2614 (revision revision)))
2615 (sha256
2616 (base32
2617 "056cam4k8pll7ass31sy6gwn8g8719njc41yf4l02b0342nilkyf"))
2618 (modules '((guix build utils)))
2619 ;; Delete bundled pre-built jars.
2620 (snippet
2621 '(begin (delete-file-recursively "lib/") #t))))))
2622 (home-page "http://svnsis.ethz.ch")
2623 (synopsis "Command line parser library")
2624 (description "This package provides a parser for command line arguments.")
2625 (license license:asl2.0))))
2626
2f0d0418
RW
2627(define-public java-cisd-jhdf5
2628 (let ((revision 39162)
2629 (base-version "14.12.6"))
2630 (package
2631 (name "java-cisd-jhdf5")
2632 (version (string-append base-version "-" (number->string revision)))
2633 (source (origin
2634 (method svn-fetch)
2635 (uri (svn-reference
2636 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2637 "jhdf5/tags/release/"
2638 (version-major+minor base-version)
2639 ".x/" base-version "/jhdf5/"))
2640 (revision revision)))
2641 (file-name (string-append "java-cisd-jhdf5-" version "-checkout"))
2642 (sha256
2643 (base32
2644 "13i17s2hn0q9drdqvp8csy7770p3hdbh9rp30ihln2ldkfawdmz0"))
2645 (modules '((guix build utils)))
2646 (snippet
2647 '(begin
2648 ;; Delete included gradle jar
2649 (delete-file-recursively "gradle/wrapper")
2650 ;; Delete pre-built native libraries
2651 (delete-file-recursively "libs")
2652 #t))))
2653 (build-system ant-build-system)
2654 (arguments
2655 `(#:make-flags '("-file" "build/build.xml")
2656 #:build-target "jar-all"
2657 #:test-target "jar-test"
2658 #:jdk ,icedtea-8
2659 #:phases
2660 (modify-phases %standard-phases
1ed386fc
RW
2661 ;; FIXME: this build phase fails.
2662 (delete 'generate-jar-indices)
2f0d0418
RW
2663 ;; Don't erase results from the build phase when building tests.
2664 (add-after 'unpack 'separate-test-target-from-clean
2665 (lambda _
2666 (substitute* "build/build.xml"
2667 (("\"jar-test\" depends=\"clean, ")
2668 "\"jar-test\" depends=\""))
2669 #t))
2670 (add-after 'unpack 'unpack-build-resources
2671 (lambda* (#:key inputs #:allow-other-keys)
2672 (copy-recursively (assoc-ref inputs "build-resources")
2673 "../build_resources")
2674 (delete-file-recursively "../build_resources/lib/")
2675 (mkdir-p "../build_resources/lib")
2676 ;; Remove dependency on classycle
2677 (substitute* "../build_resources/ant/build-common.xml"
2678 (("<taskdef name=\"dependency-checker.*") "")
2679 (("classname=\"classycle.*") "")
2680 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2681 ;; Remove dependency on svn
2682 (substitute* "build/build.xml"
2683 (("<build-info.*") "")
2684 (("\\$\\{revision.number\\}")
2685 ,(number->string revision))
2686 (("\\$\\{version.number\\}") ,base-version))
2687 #t))
2688 (add-after 'unpack-build-resources 'fix-dependencies
2689 (lambda* (#:key inputs #:allow-other-keys)
2690 (substitute* "../build_resources/ant/build-common.xml"
2691 (("../libraries/testng/testng-jdk15.jar")
2692 (string-append (assoc-ref inputs "java-testng")
2693 "/share/java/java-testng.jar")))
2694 (substitute* "build/build.xml"
2695 (("\\$\\{lib\\}/sis-base/sis-base.jar")
2696 (string-append (assoc-ref inputs "java-cisd-base")
2697 "/share/java/sis-base.jar"))
2698 (("\\$\\{lib\\}/cisd-args4j/cisd-args4j.jar")
2699 (string-append (assoc-ref inputs "java-cisd-args4j")
2700 "/share/java/cisd-args4j.jar"))
2701 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2702 (string-append (assoc-ref inputs "java-commons-lang")
2703 "/share/java/commons-lang-"
2704 ,(package-version java-commons-lang) ".jar"))
2705 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2706 (string-append (assoc-ref inputs "java-commons-io")
2707 "/share/java/commons-io-"
2708 ,(package-version java-commons-io)
2709 "-SNAPSHOT.jar"))
2710 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2711 (string-append (assoc-ref inputs "java-testng")
2712 "/share/java/java-testng.jar"))
2713 (("\\$\\{lib\\}/junit4/junit.jar")
2714 (string-append (assoc-ref inputs "java-junit")
2715 "/share/java/junit.jar"))
2716 (("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar")
2717 (string-append (assoc-ref inputs "java-hamcrest-core")
2718 "/share/java/hamcrest-core.jar")))
2719 ;; Remove dependency on ch.rinn.restrictions
2720 (with-directory-excursion "source/java/ch/systemsx/cisd/hdf5/"
2721 (substitute* '("BitSetConversionUtils.java"
2722 "HDF5Utils.java")
2723 (("import ch.rinn.restrictions.Private;") "")
2724 (("@Private") "")))
2725 (with-directory-excursion "sourceTest/java/ch/systemsx/cisd/hdf5/"
2726 (substitute* '("BitSetConversionTest.java"
2727 "h5ar/HDF5ArchiverTest.java")
2728 (("import ch.rinn.restrictions.Friend;") "")
2729 (("@Friend.*") ""))
2730 ;; Remove leftovers from removing @Friend
2731 (substitute* "h5ar/HDF5ArchiverTest.java"
2732 (("\\{ HDF5Archiver.class, IdCache.class, LinkRecord.class \\}\\)")
2733 "")))
2734 #t))
2735 (add-before 'configure 'build-native-library
2736 (lambda* (#:key inputs #:allow-other-keys)
2737 (let ((jdk (assoc-ref inputs "jdk"))
2738 (hdf5 (assoc-ref inputs "hdf5"))
2739 (dir ,(match (%current-system)
2740 ("i686-linux"
2741 "i386-Linux")
2742 ((or "armhf-linux" "aarch64-linux")
2743 "arm-Linux")
2744 ((or "x86_64-linux")
2745 "amd64-Linux")
2746 (_ "unknown-Linux"))))
2747 (with-directory-excursion "source/c"
2748 (apply invoke `("gcc" "-shared" "-O3"
2749 "-fPIC"
2750 "-Wl,--exclude-libs,ALL"
2751 ,@(find-files "jhdf5" "\\.c$")
2752 ,@(find-files "hdf-java" "\\.c$")
2753 ,(string-append "-I" hdf5 "/include")
2754 ,(string-append "-I" jdk "/include")
2755 ,(string-append "-I" jdk "/include/linux")
2756 ,(string-append hdf5 "/lib/libhdf5.a")
2757 "-o" "libjhdf5.so" "-lz")))
2758 (install-file "source/c/libjhdf5.so"
2759 (string-append "libs/native/jhdf5/" dir))
2760 #t)))
2761 ;; In the "check" phase we only build the test executable.
2762 (add-after 'check 'run-tests
2763 (lambda _
2764 (invoke "java" "-jar" "targets/dist/sis-jhdf5-test.jar")
2765 (delete-file "targets/dist/sis-jhdf5-test.jar")
2766 #t))
2767 (replace 'install
2768 (install-jars "targets/dist")))))
2769 (inputs
2770 `(("java-cisd-base" ,java-cisd-base)
2771 ("java-cisd-args4j" ,java-cisd-args4j)
2772 ("java-commons-lang" ,java-commons-lang)
2773 ("java-commons-io" ,java-commons-io)
2774 ("hdf5" ,hdf5)
2775 ("zlib" ,zlib)))
2776 (native-inputs
2777 `(("jdk" ,icedtea-8)
2778 ("java-testng" ,java-testng)
2779 ("java-junit" ,java-junit)
2780 ("java-jmock" ,java-jmock)
2781 ("java-hamcrest-core" ,java-hamcrest-core)
2782 ("build-resources"
2783 ,(origin
2784 (method svn-fetch)
2785 (uri (svn-reference
2786 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2787 "jhdf5/tags/release/"
2788 (version-major+minor base-version)
2789 ".x/" base-version
2790 "/build_resources/"))
2791 (revision revision)))
2792 (sha256
2793 (base32
2794 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
2795 (home-page "https://wiki-bsse.ethz.ch/display/JHDF5/")
2796 (synopsis "Java binding for HDF5")
2797 (description "JHDF5 is a high-level API in Java for reading and writing
2798HDF5 files, building on the libraries provided by the HDF Group.")
2799 ;; The C sources are under a non-copyleft license, which looks like a
2800 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
2801 (license (list license:asl2.0
2802 (license:non-copyleft "file://source/c/COPYING"))))))
2803
218d093b
RW
2804(define-public java-classpathx-servletapi
2805 (package
2806 (name "java-classpathx-servletapi")
ae307724 2807 (version "3.0.1")
218d093b
RW
2808 (source (origin
2809 (method url-fetch)
2810 (uri (string-append "mirror://gnu/classpathx/servletapi/"
2811 "servletapi-" version ".tar.gz"))
2812 (sha256
2813 (base32
ae307724 2814 "07d8h051siga2f33fra72hk12sbq1bxa4jifjg0qj0vfazjjff0x"))))
218d093b
RW
2815 (build-system ant-build-system)
2816 (arguments
2817 `(#:tests? #f ; there is no test target
2818 #:build-target "compile"
218d093b 2819 #:make-flags
ae307724 2820 (list "-Dbuild.compiler=javac1.8"
218d093b
RW
2821 (string-append "-Ddist=" (assoc-ref %outputs "out")))
2822 #:phases
2823 (modify-phases %standard-phases
2824 (replace 'install
2825 (lambda* (#:key make-flags #:allow-other-keys)
2c8ac364 2826 (apply invoke `("ant" "dist" ,@make-flags)))))))
218d093b
RW
2827 (home-page "https://www.gnu.org/software/classpathx/")
2828 (synopsis "Java servlet API implementation")
2829 (description "This is the GNU servlet API distribution, part of the
2830ClasspathX project. It provides implementations of version 3.0 of the servlet
2831API and version 2.1 of the Java ServerPages API.")
2832 (license license:gpl3+)))
2833
10d62a88
BH
2834(define-public java-javaee-servletapi
2835 (package
2836 (name "java-javaee-servletapi")
2837 (version "3.1.0")
2838 (source (origin
2839 (method url-fetch)
2840 (uri (string-append "https://github.com/javaee/servlet-spec/"
2841 "archive/" version ".zip"))
2842 (file-name (string-append name "-" version ".zip"))
2843 (sha256
2844 (base32
2845 "0m6p13vgfb1ihich1jp5j6fqlhkjsrkn32c86bsbkryp38ipwg8w"))))
2846 (build-system ant-build-system)
2847 (arguments
2848 `(#:jar-name "javax-servletapi.jar"
2849 ;; no tests
2850 #:tests? #f
2851 #:source-dir "src/main/java"))
2852 (native-inputs
2853 `(("unzip" ,unzip)))
2854 (home-page "https://javaee.github.io/servlet-spec/")
2855 (synopsis "Java servlet API")
2856 (description "Java Servlet is the foundation web specification in the
2857Java Enterprise Platform. Developers can build web applications using the
2858Servlet API to interact with the request/response workflow. This project
2859provides information on the continued development of the Java Servlet
2860specification.")
2861 ;; Main code is dual-licensed by Oracle under either GLP2 or CDDL 1.1.
2862 ;; Some files are licensed under ASL 2.0.
2863 (license (list license:asl2.0 license:gpl2 license:cddl1.1))))
2864
5490480c
RW
2865(define-public java-swt
2866 (package
2867 (name "java-swt")
8710d4dd 2868 (version "4.7.1a")
5490480c
RW
2869 (source
2870 ;; The types of many variables and procedures differ in the sources
2871 ;; dependent on whether the target architecture is a 32-bit system or a
2872 ;; 64-bit system. Instead of patching the sources on demand in a build
2873 ;; phase we download either the 32-bit archive (which mostly uses "int"
2874 ;; types) or the 64-bit archive (which mostly uses "long" types).
8710d4dd
RW
2875 (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9")
2876 (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q")
5490480c
RW
2877 (file32 "x86")
2878 (file64 "x86_64"))
2879 (let-values (((hash file)
2880 (match (or (%current-target-system) (%current-system))
2881 ("x86_64-linux" (values hash64 file64))
2882 (_ (values hash32 file32)))))
2883 (origin
2884 (method url-fetch)
2885 (uri (string-append
8710d4dd
RW
2886 "http://download.eclipse.org/eclipse/downloads/drops4/"
2887 "R-" version "-201710090410/swt-" version
2888 "-gtk-linux-" file ".zip"))
5490480c
RW
2889 (sha256 (base32 hash))))))
2890 (build-system ant-build-system)
2891 (arguments
2892 `(#:jar-name "swt.jar"
8710d4dd 2893 #:jdk ,icedtea-8
5490480c
RW
2894 #:tests? #f ; no "check" target
2895 #:phases
2896 (modify-phases %standard-phases
2897 (replace 'unpack
2898 (lambda* (#:key source #:allow-other-keys)
2c8ac364
MW
2899 (mkdir "swt")
2900 (invoke "unzip" source "-d" "swt")
2901 (chdir "swt")
2902 (mkdir "src")
2903 (invoke "unzip" "src.zip" "-d" "src")))
5490480c
RW
2904 ;; The classpath contains invalid icecat jars. Since we don't need
2905 ;; anything other than the JDK on the classpath, we can simply unset
2906 ;; it.
2907 (add-after 'configure 'unset-classpath
2908 (lambda _ (unsetenv "CLASSPATH") #t))
2909 (add-before 'build 'build-native
2910 (lambda* (#:key inputs outputs #:allow-other-keys)
2911 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
2912 ;; Build shared libraries. Users of SWT have to set the system
2913 ;; property swt.library.path to the "lib" directory of this
2914 ;; package output.
2915 (mkdir-p lib)
2916 (setenv "OUTPUT_DIR" lib)
2917 (with-directory-excursion "src"
2c8ac364 2918 (invoke "bash" "build.sh")))))
5490480c
RW
2919 (add-after 'install 'install-native
2920 (lambda* (#:key outputs #:allow-other-keys)
2921 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
2922 (for-each (lambda (file)
2923 (install-file file lib))
2924 (find-files "." "\\.so$"))
2925 #t))))))
2926 (inputs
8710d4dd 2927 `(("gtk" ,gtk+-2)
5490480c
RW
2928 ("libxtst" ,libxtst)
2929 ("libxt" ,libxt)
2930 ("mesa" ,mesa)
2931 ("glu" ,glu)))
2932 (native-inputs
2933 `(("pkg-config" ,pkg-config)
2934 ("unzip" ,unzip)))
2935 (home-page "https://www.eclipse.org/swt/")
2936 (synopsis "Widget toolkit for Java")
2937 (description
2938 "SWT is a widget toolkit for Java designed to provide efficient, portable
2939access to the user-interface facilities of the operating systems on which it
2940is implemented.")
2941 ;; SWT code is licensed under EPL1.0
2942 ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1
2943 ;; Cairo bindings contain code under MPL1.1
2944 ;; XULRunner 1.9 bindings contain code under MPL2.0
2945 (license (list
2946 license:epl1.0
2947 license:mpl1.1
2948 license:mpl2.0
2949 license:lgpl2.1+))))
2950
068e476f
RJ
2951(define-public java-xz
2952 (package
2953 (name "java-xz")
92966847 2954 (version "1.6")
068e476f
RJ
2955 (source (origin
2956 (method url-fetch)
2957 (uri (string-append "http://tukaani.org/xz/xz-java-" version ".zip"))
2958 (sha256
2959 (base32
92966847 2960 "1z3p1ri1gvl07inxn0agx44ck8n7wrzfmvkz8nbq3njn8r9wba8x"))))
068e476f
RJ
2961 (build-system ant-build-system)
2962 (arguments
2963 `(#:tests? #f ; There are no tests to run.
2964 #:jar-name ,(string-append "xz-" version ".jar")
2965 #:phases
2966 (modify-phases %standard-phases
2967 ;; The unpack phase enters the "maven" directory by accident.
2968 (add-after 'unpack 'chdir
2969 (lambda _ (chdir "..") #t)))))
2970 (native-inputs
2971 `(("unzip" ,unzip)))
d6ddc5ab 2972 (home-page "https://tukaani.org/xz/java.html")
068e476f
RJ
2973 (synopsis "Implementation of XZ data compression in pure Java")
2974 (description "This library aims to be a complete implementation of XZ data
2975compression in pure Java. Single-threaded streamed compression and
2976decompression and random access decompression have been fully implemented.")
2977 (license license:public-domain)))
04100c3b
RW
2978
2979;; java-hamcrest-core uses qdox version 1.12. We package this version instead
2980;; of the latest release.
2981(define-public java-qdox-1.12
2982 (package
2983 (name "java-qdox")
2984 (version "1.12.1")
2985 (source (origin
2986 (method url-fetch)
2987 (uri (string-append "http://central.maven.org/maven2/"
2988 "com/thoughtworks/qdox/qdox/" version
2989 "/qdox-" version "-sources.jar"))
2990 (sha256
2991 (base32
2992 "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl"))))
2993 (build-system ant-build-system)
2994 (arguments
2995 `(;; Tests require junit
2996 #:tests? #f
2997 #:jar-name "qdox.jar"
2998 #:phases
2999 (modify-phases %standard-phases
3000 (replace 'unpack
3001 (lambda* (#:key source #:allow-other-keys)
3002 (mkdir "src")
3003 (with-directory-excursion "src"
2c8ac364 3004 (invoke "jar" "-xf" source))))
04100c3b
RW
3005 ;; At this point we don't have junit, so we must remove the API
3006 ;; tests.
3007 (add-after 'unpack 'delete-tests
3008 (lambda _
3009 (delete-file-recursively "src/com/thoughtworks/qdox/junit")
3010 #t)))))
3011 (home-page "http://qdox.codehaus.org/")
3012 (synopsis "Parse definitions from Java source files")
3013 (description
3014 "QDox is a high speed, small footprint parser for extracting
3015class/interface/method definitions from source files complete with JavaDoc
b13cf17f 3016@code{@@tags}. It is designed to be used by active code generators or
04100c3b
RW
3017documentation tools.")
3018 (license license:asl2.0)))
e7e28510
RW
3019
3020(define-public java-jarjar
3021 (package
3022 (name "java-jarjar")
3023 (version "1.4")
3024 (source (origin
3025 (method url-fetch)
3026 (uri (string-append
3027 "https://storage.googleapis.com/google-code-archive-downloads/v2/"
3028 "code.google.com/jarjar/jarjar-src-" version ".zip"))
3029 (sha256
3030 (base32
88aa75e9
GB
3031 "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl"))
3032 (modules '((guix build utils)))
3033 (snippet
3034 '(begin
3035 ;; Delete bundled thirds-party jar archives.
3036 ;; TODO: unbundle maven-plugin-api.
3037 (delete-file "lib/asm-4.0.jar")
3038 (delete-file "lib/asm-commons-4.0.jar")
3039 (delete-file "lib/junit-4.8.1.jar")
3040 #t))))
e7e28510
RW
3041 (build-system ant-build-system)
3042 (arguments
3043 `(;; Tests require junit, which ultimately depends on this package.
3044 #:tests? #f
3045 #:build-target "jar"
3046 #:phases
3047 (modify-phases %standard-phases
88aa75e9
GB
3048 (add-before 'build 'do-not-use-bundled-asm
3049 (lambda* (#:key inputs #:allow-other-keys)
3050 (substitute* "build.xml"
3051 (("<path id=\"path.build\">")
3052 (string-append "<path id=\"path.build\"><fileset dir=\""
3053 (assoc-ref inputs "java-asm-bootstrap")
3054 "/share/java\" includes=\"**/*.jar\"/>"))
3055 (("<zipfileset src=\"lib/asm-4.0.jar\"/>") "")
3056 (("lib/asm-commons-4.0.jar")
3057 (string-append (assoc-ref inputs "java-asm-bootstrap")
3058 "/share/java/asm-6.0.jar"))
3059 (("<include name=\"org/objectweb/asm/commons/Remap\\*\\.class\"/>")
3060 (string-append "<include name=\"org/objectweb/asm/"
3061 "commons/Remap*.class\"/>"
3062 "<include name=\"org/objectweb/asm/*.class\"/>"
3063 "<include name=\"org/objectweb/asm/"
3064 "signature/*.class\"/>"
3065 "<include name=\"org/objectweb/asm/"
3066 "commons/SignatureRemapper.class\"/>")))
3067 #t))
e7e28510
RW
3068 (replace 'install
3069 (lambda* (#:key outputs #:allow-other-keys)
3070 (let ((target (string-append (assoc-ref outputs "out")
3071 "/share/java")))
3072 (install-file (string-append "dist/jarjar-" ,version ".jar")
3073 target))
3074 #t)))))
88aa75e9
GB
3075 (inputs
3076 `(("java-asm-bootstrap" ,java-asm-bootstrap)))
e7e28510
RW
3077 (native-inputs
3078 `(("unzip" ,unzip)))
3079 (home-page "https://code.google.com/archive/p/jarjar/")
3080 (synopsis "Repackage Java libraries")
3081 (description
3082 "Jar Jar Links is a utility that makes it easy to repackage Java
3083libraries and embed them into your own distribution. Jar Jar Links includes
3084an Ant task that extends the built-in @code{jar} task.")
3085 (license license:asl2.0)))
87c31a21
RW
3086
3087(define-public java-hamcrest-core
3088 (package
3089 (name "java-hamcrest-core")
3090 (version "1.3")
3091 (source (origin
3092 (method url-fetch)
00672896
HG
3093 (uri (string-append "https://github.com/hamcrest/JavaHamcrest/"
3094 "archive/hamcrest-java-" version ".tar.gz"))
87c31a21
RW
3095 (sha256
3096 (base32
00672896 3097 "11g0s105fmwzijbv08lx8jlb521yravjmxnpgdx08fvg1kjivhva"))
87c31a21
RW
3098 (modules '((guix build utils)))
3099 (snippet
3100 '(begin
00672896
HG
3101 ;; Delete bundled thirds-party jar archives.
3102 (delete-file-recursively "lib")
87c31a21
RW
3103 #t))))
3104 (build-system ant-build-system)
3105 (arguments
3106 `(#:tests? #f ; Tests require junit
a8d3cb62
RW
3107 #:modules ((guix build ant-build-system)
3108 (guix build utils)
3109 (srfi srfi-1))
87c31a21 3110 #:make-flags (list (string-append "-Dversion=" ,version))
fae0b4ca 3111 #:test-target "unit-test"
87c31a21
RW
3112 #:build-target "core"
3113 #:phases
3114 (modify-phases %standard-phases
3115 ;; Disable unit tests, because they require junit, which requires
3116 ;; hamcrest-core. We also give a fixed value to the "Built-Date"
3117 ;; attribute from the manifest for reproducibility.
3118 (add-before 'configure 'patch-build.xml
3119 (lambda _
3120 (substitute* "build.xml"
3121 (("unit-test, ") "")
3122 (("\\$\\{build.timestamp\\}") "guix"))
3123 #t))
3124 ;; Java's "getMethods()" returns methods in an unpredictable order.
3125 ;; To make the output of the generated code deterministic we must
3126 ;; sort the array of methods.
3127 (add-after 'unpack 'make-method-order-deterministic
3128 (lambda _
3129 (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java"
3130 (("import java\\.util\\.Iterator;" line)
3131 (string-append line "\n"
3132 "import java.util.Arrays; import java.util.Comparator;"))
3133 (("allMethods = cls\\.getMethods\\(\\);" line)
3134 (string-append "_" line
3135 "
3136private Method[] getSortedMethods() {
3137 Arrays.sort(_allMethods, new Comparator<Method>() {
3138 @Override
3139 public int compare(Method a, Method b) {
3140 return a.toString().compareTo(b.toString());
3141 }
3142 });
3143 return _allMethods;
3144}
3145
2c8ac364
MW
3146private Method[] allMethods = getSortedMethods();")))
3147 #t))
87c31a21
RW
3148 (add-before 'build 'do-not-use-bundled-qdox
3149 (lambda* (#:key inputs #:allow-other-keys)
3150 (substitute* "build.xml"
3151 (("lib/generator/qdox-1.12.jar")
3152 (string-append (assoc-ref inputs "java-qdox-1.12")
3153 "/share/java/qdox.jar")))
3154 #t))
fab959d3
HG
3155 ;; build.xml searches for .jar files in this directoy, which
3156 ;; we remove from the source archive.
3157 (add-before 'build 'create-dummy-directories
3158 (lambda _
3159 (mkdir-p "lib/integration")
3160 #t))
87c31a21
RW
3161 (replace 'install
3162 (lambda* (#:key outputs #:allow-other-keys)
a8d3cb62
RW
3163 (let* ((target (string-append (assoc-ref outputs "out")
3164 "/share/java/"))
3165 (version-suffix ,(string-append "-" version ".jar"))
3166 (install-without-version-suffix
3167 (lambda (jar)
3168 (copy-file jar
3169 (string-append target
3170 (basename jar version-suffix)
3171 ".jar")))))
3172 (mkdir-p target)
3173 (for-each
3174 install-without-version-suffix
3175 (find-files "build"
3176 (lambda (name _)
3177 (and (string-suffix? ".jar" name)
3178 (not (string-suffix? "-sources.jar" name)))))))
3179 #t)))))
87c31a21
RW
3180 (native-inputs
3181 `(("java-qdox-1.12" ,java-qdox-1.12)
3182 ("java-jarjar" ,java-jarjar)))
3183 (home-page "http://hamcrest.org/")
3184 (synopsis "Library of matchers for building test expressions")
3185 (description
3186 "This package provides a library of matcher objects (also known as
3187constraints or predicates) allowing @code{match} rules to be defined
3188declaratively, to be used in other frameworks. Typical scenarios include
3189testing frameworks, mocking libraries and UI validation rules.")
3190 (license license:bsd-2)))
d0184f44
RW
3191
3192(define-public java-junit
3193 (package
3194 (name "java-junit")
3195 (version "4.12")
3196 (source (origin
3197 (method url-fetch)
3198 (uri (string-append "https://github.com/junit-team/junit/"
3199 "archive/r" version ".tar.gz"))
3200 (file-name (string-append name "-" version ".tar.gz"))
3201 (sha256
3202 (base32
3203 "090dn5v1vs0b3acyaqc0gjf6p8lmd2h24wfzsbq7sly6b214anws"))
3204 (modules '((guix build utils)))
3205 (snippet
3206 '(begin
3207 ;; Delete bundled jar archives.
3208 (delete-file-recursively "lib")
3209 #t))))
3210 (build-system ant-build-system)
3211 (arguments
3212 `(#:tests? #f ; no tests
3213 #:jar-name "junit.jar"))
3214 (inputs
3215 `(("java-hamcrest-core" ,java-hamcrest-core)))
3216 (home-page "http://junit.org/")
3217 (synopsis "Test framework for Java")
3218 (description
3219 "JUnit is a simple framework to write repeatable tests for Java projects.
3220JUnit provides assertions for testing expected results, test fixtures for
3221sharing common test data, and test runners for running tests.")
3222 (license license:epl1.0)))
9fb20d01
RW
3223
3224(define-public java-plexus-utils
3225 (package
3226 (name "java-plexus-utils")
3227 (version "3.0.24")
3228 (source (origin
3229 (method url-fetch)
3230 (uri (string-append "https://github.com/codehaus-plexus/"
3231 "plexus-utils/archive/plexus-utils-"
3232 version ".tar.gz"))
3233 (sha256
3234 (base32
3235 "1mlwpc6fms24slygv5yvi6fi9hcha2fh0v73p5znpi78bg36i2js"))))
3236 (build-system ant-build-system)
3237 ;; FIXME: The default build.xml does not include a target to install
3238 ;; javadoc files.
3239 (arguments
3240 `(#:jar-name "plexus-utils.jar"
3241 #:source-dir "src/main"
3242 #:phases
3243 (modify-phases %standard-phases
3244 (add-after 'unpack 'fix-reference-to-/bin-and-/usr
3245 (lambda _
3246 (substitute* "src/main/java/org/codehaus/plexus/util/\
3247cli/shell/BourneShell.java"
3248 (("/bin/sh") (which "sh"))
3249 (("/usr/") (getcwd)))
3250 #t))
3251 (add-after 'unpack 'fix-or-disable-broken-tests
3252 (lambda _
3253 (with-directory-excursion "src/test/java/org/codehaus/plexus/util"
3254 (substitute* '("cli/CommandlineTest.java"
3255 "cli/shell/BourneShellTest.java")
3256 (("/bin/sh") (which "sh"))
3257 (("/bin/echo") (which "echo")))
3258
3259 ;; This test depends on MavenProjectStub, but we don't have
3260 ;; a package for Maven.
3261 (delete-file "introspection/ReflectionValueExtractorTest.java")
3262
3263 ;; FIXME: The command line tests fail, maybe because they use
3264 ;; absolute paths.
3265 (delete-file "cli/CommandlineTest.java"))
3266 #t)))))
3267 (native-inputs
3268 `(("java-junit" ,java-junit)))
3269 (home-page "http://codehaus-plexus.github.io/plexus-utils/")
3270 (synopsis "Common utilities for the Plexus framework")
3271 (description "This package provides various Java utility classes for the
3272Plexus framework to ease working with strings, files, command lines, XML and
3273more.")
3274 (license license:asl2.0)))
1e555562
HG
3275
3276(define-public java-plexus-interpolation
3277 (package
3278 (name "java-plexus-interpolation")
3279 (version "1.23")
3280 (source (origin
3281 (method url-fetch)
3282 (uri (string-append "https://github.com/codehaus-plexus/"
3283 "plexus-interpolation/archive/"
3284 "plexus-interpolation-" version ".tar.gz"))
3285 (sha256
3286 (base32
fd75eb6c 3287 "03377yzlx5q440m6sxxgv6a5qb8fl30zzcgxgc0hxk5qgl2z1jjn"))))
1e555562
HG
3288 (build-system ant-build-system)
3289 (arguments
3290 `(#:jar-name "plexus-interpolation.jar"
3291 #:source-dir "src/main"))
3292 (native-inputs
3293 `(("java-junit" ,java-junit)
3294 ("java-hamcrest-core" ,java-hamcrest-core)))
3295 (home-page "http://codehaus-plexus.github.io/plexus-interpolation/")
3296 (synopsis "Java components for interpolating ${} strings and the like")
3297 (description "Plexus interpolator is a modular, flexible interpolation
3298framework for the expression language style commonly seen in Maven, Plexus,
3299and other related projects.
3300
3301It has its foundation in the @code{org.codehaus.plexus.utils.interpolation}
3302package within @code{plexus-utils}, but has been separated in order to allow
3303these two libraries to vary independently of one another.")
3304 (license license:asl2.0)))
8f8ed9aa 3305
bb27eb0d
JL
3306(define-public java-plexus-classworlds
3307 (package
3308 (name "java-plexus-classworlds")
3309 (version "2.5.2")
3310 (source (origin
3311 (method url-fetch)
3312 (uri (string-append "https://github.com/codehaus-plexus/"
3313 "plexus-classworlds/archive/plexus-classworlds-"
3314 version ".tar.gz"))
3315 (sha256
3316 (base32
3317 "1qm4p0rl8d82lzhsiwnviw11jnq44s0gflg78zq152xyyr2xmh8g"))))
3318 (build-system ant-build-system)
3319 (arguments
3320 `(#:jar-name "plexus-classworlds.jar"
3321 #:source-dir "src/main"
3322 #:tests? #f));; FIXME: we need to generate some resources as in pom.xml
3323 (native-inputs
3324 `(("java-junit" ,java-junit)))
3325 (home-page "http://codehaus-plexus.github.io/plexus-classworlds/")
3326 (synopsis "Java class loader framework")
f4548394
TGR
3327 (description "Plexus classworlds replaces the native @code{ClassLoader}
3328mechanism of Java. It is especially useful for dynamic loading of application
bb27eb0d
JL
3329components.")
3330 (license license:asl2.0)))
3331
a7ad92ad 3332(define java-plexus-container-default-bootstrap
0726d4ea
JL
3333 (package
3334 (name "java-plexus-container-default-bootstrap")
3335 (version "1.7.1")
3336 (source (origin
3337 (method url-fetch)
3338 (uri (string-append "https://github.com/codehaus-plexus/plexus-containers"
3339 "/archive/plexus-containers-" version ".tar.gz"))
3340 (sha256
3341 (base32
3342 "0xw5g30qf4a83608rw9v2hv8pfsz7d69dkdhk6r0wia4q78hh1pc"))))
3343 (build-system ant-build-system)
3344 (arguments
3345 `(#:jar-name "container-default.jar"
3346 #:source-dir "plexus-container-default/src/main/java"
3347 #:test-dir "plexus-container-default/src/test"
3348 #:jdk ,icedtea-8
3349 #:tests? #f; requires plexus-archiver, which depends on this package
3350 #:phases
3351 (modify-phases %standard-phases
3352 (add-before 'build 'copy-resources
3353 (lambda _
3354 (copy-recursively
3355 "plexus-container-default/src/main/resources/"
3356 "build/classes")
3357 #t)))))
3358 (inputs
3359 `(("worldclass" ,java-plexus-classworlds)
3360 ("xbean" ,java-geronimo-xbean-reflect)
3361 ("utils" ,java-plexus-utils)
3362 ("junit" ,java-junit)
3363 ("guava" ,java-guava)))
3364 (home-page "https://github.com/codehaus-plexus/plexus-containers")
f4548394 3365 (synopsis "Inversion-of-control container")
0726d4ea 3366 (description "Plexus-default-container is Plexus' inversion-of-control
f4548394 3367(@dfn{IoC}) container. It is composed of its public API and its default
0726d4ea
JL
3368implementation.")
3369 (license license:asl2.0)))
3370
0858b9dc
JL
3371(define-public java-plexus-io
3372 (package
3373 (name "java-plexus-io")
3374 (version "3.0.0")
3375 (source (origin
3376 (method url-fetch)
3377 (uri (string-append "https://github.com/codehaus-plexus/plexus-io"
3378 "/archive/plexus-io-" version ".tar.gz"))
3379 (sha256
3380 (base32
3381 "0f2j41kihaymxkpbm55smpxjja235vad8cgz94frfy3ppcp021dw"))))
3382 (build-system ant-build-system)
3383 (arguments
3384 `(#:jar-name "plexus-io.jar"
3385 #:source-dir "src/main/java"
3386 #:test-dir "src/test"
3387 #:jdk ,icedtea-8
3388 #:phases
3389 (modify-phases %standard-phases
3390 (add-before 'build 'copy-resources
3391 (lambda _
3392 (mkdir-p "build/classes/META-INF/plexus")
3393 (copy-file "src/main/resources/META-INF/plexus/components.xml"
3394 "build/classes/META-INF/plexus/components.xml")
3395 #t)))))
3396 (inputs
3397 `(("utils" ,java-plexus-utils)
3398 ("commons-io" ,java-commons-io)
3399 ("java-jsr305" ,java-jsr305)))
3400 (native-inputs
3401 `(("junit" ,java-junit)
3402 ("hamcrest" ,java-hamcrest-core)
3403 ("guava" ,java-guava)
3404 ("classworlds" ,java-plexus-classworlds)
3405 ("xbean" ,java-geronimo-xbean-reflect)
3406 ("container-default" ,java-plexus-container-default-bootstrap)))
3407 (home-page "https://github.com/codehaus-plexus/plexus-io")
3408 (synopsis "I/O plexus components")
3409 (description "Plexus IO is a set of plexus components, which are designed
3410for use in I/O operations. This implementation using plexus components allows
3411reusing it in maven.")
3412 (license license:asl2.0)))
3413
b51df3ca
JL
3414(define-public java-plexus-archiver
3415 (package
3416 (name "java-plexus-archiver")
3417 (version "3.5")
3418 (source (origin
3419 (method url-fetch)
3420 (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver"
3421 "/archive/plexus-archiver-" version ".tar.gz"))
3422 (sha256
3423 (base32
3424 "0iv1j7khra6icqh3jndng3iipfmkc7l5jq2y802cm8r575v75pyv"))))
3425 (build-system ant-build-system)
3426 (arguments
3427 `(#:jar-name "plexus-archiver.jar"
3428 #:source-dir "src/main/java"
3429 #:jdk ,icedtea-8
3430 #:test-dir "src/test"
3431 #:test-exclude (list "**/Abstract*.java" "**/Base*.java")
3432 #:phases
3433 (modify-phases %standard-phases
3434 (add-before 'check 'remove-failing
3435 (lambda _
3436 ;; Requires an older version of plexus container
3437 (delete-file
2c8ac364
MW
3438 "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java")
3439 #t))
b51df3ca
JL
3440 (add-before 'build 'copy-resources
3441 (lambda _
3442 (mkdir-p "build/classes/META-INF/plexus")
3443 (copy-file "src/main/resources/META-INF/plexus/components.xml"
3444 "build/classes/META-INF/plexus/components.xml")
3445 #t)))))
3446 (inputs
3447 `(("utils" ,java-plexus-utils)
3448 ("commons-io" ,java-commons-io)
3449 ("snappy" ,java-iq80-snappy)
3450 ("io" ,java-plexus-io)
3451 ("compress" ,java-commons-compress)
3452 ("container-default" ,java-plexus-container-default-bootstrap)
3453 ("snappy" ,java-snappy)
3454 ("java-jsr305" ,java-jsr305)))
3455 (native-inputs
3456 `(("junit" ,java-junit)
3457 ("classworld" ,java-plexus-classworlds)
3458 ("xbean" ,java-geronimo-xbean-reflect)
3459 ("xz" ,java-tukaani-xz)
3460 ("guava" ,java-guava)))
3461 (home-page "https://github.com/codehaus-plexus/plexus-archiver")
3462 (synopsis "Archiver component of the Plexus project")
3463 (description "Plexus-archiver contains a component to deal with project
3464archives (jar).")
3465 (license license:asl2.0)))
3466
a0837294
JL
3467(define-public java-plexus-container-default
3468 (package
3469 (inherit java-plexus-container-default-bootstrap)
3470 (name "java-plexus-container-default")
3471 (arguments
3472 `(#:jar-name "container-default.jar"
3473 #:source-dir "plexus-container-default/src/main/java"
3474 #:test-dir "plexus-container-default/src/test"
3475 #:test-exclude (list ;"**/*Test.java"
3476 "**/Abstract*.java"
3477 ;; Requires plexus-hierarchy
3478 "**/PlexusHierarchyTest.java"
3479 ;; Failures
3480 "**/ComponentRealmCompositionTest.java"
3481 "**/PlexusContainerTest.java")
3482 #:jdk ,icedtea-8
3483 #:phases
3484 (modify-phases %standard-phases
3485 (add-before 'build 'copy-resources
3486 (lambda _
3487 (copy-recursively
3488 "plexus-container-default/src/main/resources/"
3489 "build/classes")
3490 #t))
3491 (add-before 'check 'fix-paths
3492 (lambda _
3493 (let ((dir "plexus-container-default/src/test/java/org/codehaus"))
3494 (substitute*
3495 (string-append
3496 dir "/plexus/component/composition/"
3497 "ComponentRealmCompositionTest.java")
3498 (("src/test") "plexus-container-default/src/test"))
3499 #t))))))
3500 (inputs
3501 `(("worldclass" ,java-plexus-classworlds)
3502 ("xbean" ,java-geronimo-xbean-reflect)
3503 ("utils" ,java-plexus-utils)
3504 ("junit" ,java-junit)
3505 ("guava" ,java-guava)))
3506 (native-inputs
3507 `(("archiver" ,java-plexus-archiver)
3508 ("hamcrest" ,java-hamcrest-core)))))
3509
3214afab
JL
3510(define-public java-plexus-component-annotations
3511 (package
3512 (inherit java-plexus-container-default)
3513 (name "java-plexus-component-annotations")
3514 (arguments
3515 `(#:jar-name "plexus-component-annotations.jar"
3516 #:source-dir "plexus-component-annotations/src/main/java"
3517 #:tests? #f)); no tests
3518 (inputs '())
3519 (native-inputs '())
3520 (synopsis "Plexus descriptors generator")
3521 (description "This package is a Maven plugin to generate Plexus descriptors
3522from source tags and class annotations.")))
3523
4f77ba17
JL
3524(define-public java-plexus-cipher
3525 (package
3526 (name "java-plexus-cipher")
3527 (version "1.7")
3528 (source (origin
3529 (method url-fetch)
3530 (uri (string-append "https://github.com/codehaus-plexus/plexus-cipher"
3531 "/archive/plexus-cipher-" version ".tar.gz"))
3532 (sha256
3533 (base32
3534 "1j3r8xzlxlk340snkjp6lk2ilkxlkn8qavsfiq01f43xmvv8ymk3"))))
3535 (build-system ant-build-system)
3536 (arguments
3537 `(#:jar-name "plexus-cipher.jar"
3538 #:source-dir "src/main/java"
3539 #:jdk ,icedtea-8
3540 #:tests? #f; FIXME: requires sisu-inject-bean
3541 #:phases
3542 (modify-phases %standard-phases
3543 (add-before 'build 'copy-resources
3544 (lambda _
3545 (copy-recursively "src/main/resources" "build/classes")
3546 (mkdir-p "build/classes/META-INF/sisu")
3547 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
3548 (lambda _
3549 (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
3550 #t)))))
3551 (inputs
3552 `(("java-cdi-api" ,java-cdi-api)
3553 ("java-javax-inject" ,java-javax-inject)))
3554 (home-page "https://github.com/sonatype/plexus-cipher")
3555 (synopsis "Encryption/decryption Component")
3556 (description "Plexus-cipher contains a component to deal with encryption
3557and decryption.")
3558 (license license:asl2.0)))
3559
239126d4
JL
3560(define-public java-plexus-compiler-api
3561 (package
3562 (name "java-plexus-compiler-api")
a70182b0 3563 (version "2.8.4")
239126d4
JL
3564 (source (origin
3565 (method url-fetch)
3566 (uri (string-append "https://github.com/codehaus-plexus/plexus-compiler"
3567 "/archive/plexus-compiler-" version ".tar.gz"))
3568 (sha256
3569 (base32
a70182b0 3570 "09vmxs0807wsd26nbrwwj5l8ycmzazqycj52l7w6wjvkryywi69h"))))
239126d4
JL
3571 (build-system ant-build-system)
3572 (arguments
3573 `(#:jar-name "plexus-compiler-api.jar"
3574 #:source-dir "plexus-compiler-api/src/main/java"
3575 #:jdk ,icedtea-8
3576 #:test-dir "plexus-compiler-api/src/test"))
3577 (inputs
3578 `(("java-plexus-container-default" ,java-plexus-container-default)
3579 ("java-plexus-util" ,java-plexus-utils)))
3580 (native-inputs
3581 `(("java-junit" ,java-junit)))
3582 (home-page "https://github.com/codehaus-plexus/plexus-compiler")
3583 (synopsis "Plexus Compilers component's API to manipulate compilers")
3584 (description "This package contains the API used by components to manipulate
3585compilers.")
3586 (license (list license:asl2.0
3587 license:expat))))
3588
f8a519fa
JL
3589(define-public java-plexus-compiler-javac
3590 (package
3591 (inherit java-plexus-compiler-api)
3592 (name "java-plexus-compiler-javac")
3593 (arguments
3594 `(#:jar-name "plexus-compiler-javac.jar"
3595 #:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java"
3596 #:jdk ,icedtea-8
3597 #:tests? #f; depends on compiler-test -> maven-core -> ... -> this package.
3598 #:test-dir "plexus-compilers/plexus-compiler-javac/src/test"))
3599 (inputs
3600 `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
3601 ("java-plexus-utils" ,java-plexus-utils)
3602 ("java-plexus-container-default" ,java-plexus-container-default)))
3603 (native-inputs
3604 `(("java-junit" ,java-junit)))
3605 (synopsis "Javac Compiler support for Plexus Compiler component")
3606 (description "This package contains the Javac Compiler support for Plexus
3607Compiler component.")))
3608
0aa85081
JL
3609(define-public java-plexus-sec-dispatcher
3610 (package
3611 (name "java-plexus-sec-dispatcher")
3612 (version "1.4") ;; Newest release listed at the Maven Central Repository.
3613 (source (origin
3614 ;; This project doesn't tag releases or publish tarballs, so we take
3615 ;; the "prepare release plexus-sec-dispatcher-1.4" git commit.
3616 (method url-fetch)
3617 (uri (string-append "https://github.com/sonatype/plexus-sec-dispatcher/"
3618 "archive/7db8f88048.tar.gz"))
3619 (sha256
3620 (base32
3621 "1smfrk4n7xbrsxpxcp2j4i0j8q86j73w0w6xg7qz83dp6dagdjgp"))
3622 (file-name (string-append name "-" version ".tar.gz"))))
3623 (arguments
3624 `(#:jar-name "plexus-sec-dispatcher.jar"
3625 #:source-dir "src/main/java"
3626 #:jdk ,icedtea-8
3627 #:phases
3628 (modify-phases %standard-phases
3629 (add-before 'build 'generate-models
3630 (lambda* (#:key inputs #:allow-other-keys)
3631 (define (modello-single-mode file version mode)
2c8ac364
MW
3632 (invoke "java"
3633 "org.codehaus.modello.ModelloCli"
3634 file mode "src/main/java" version
3635 "false" "true"))
0aa85081 3636 (let ((file "src/main/mdo/settings-security.mdo"))
0aa85081
JL
3637 (modello-single-mode file "1.0.0" "java")
3638 (modello-single-mode file "1.0.0" "xpp3-reader")
2c8ac364
MW
3639 (modello-single-mode file "1.0.0" "xpp3-writer"))
3640 #t))
0aa85081
JL
3641 (add-before 'build 'generate-components.xml
3642 (lambda _
3643 (mkdir-p "build/classes/META-INF/plexus")
3644 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
3645 (lambda _
3646 (display
3647 "<component-set>\n
3648 <components>\n
3649 <component>\n
3650 <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n
3651 <role-hint>default</role-hint>\n
3652 <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n
3653 <description></description>\n
3654 <requirements>\n
3655 <requirement>\n
3656 <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n
3657 <field-name>_cipher</field-name>\n
3658 </requirement>\n
3659 <requirement>\n
3660 <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n
3661 <field-name>_decryptors</field-name>\n
3662 </requirement>\n
3663 </requirements>\n
3664 <configuration>\n
3665 <_configuration-file>~/.settings-security.xml</_configuration-file>\n
3666 </configuration>\n
3667 </component>\n
3668 </components>\n
2c8ac364
MW
3669</component-set>\n")))
3670 #t))
0aa85081
JL
3671 (add-before 'check 'fix-paths
3672 (lambda _
2c8ac364
MW
3673 (copy-recursively "src/test/resources" "target")
3674 #t)))))
0aa85081
JL
3675 (inputs
3676 `(("java-plexus-cipher" ,java-plexus-cipher)))
3677 (native-inputs
3678 `(("java-modello-core" ,java-modello-core)
3679 ;; for modello:
3680 ("java-plexus-container-default" ,java-plexus-container-default)
3681 ("java-plexus-classworlds" ,java-plexus-classworlds)
3682 ("java-plexus-utils" ,java-plexus-utils)
3683 ("java-guava" ,java-guava)
3684 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
3685 ("java-sisu-build-api" ,java-sisu-build-api)
3686 ;; modello plugins:
3687 ("java-modellop-plugins-java" ,java-modello-plugins-java)
3688 ("java-modellop-plugins-xml" ,java-modello-plugins-xml)
3689 ("java-modellop-plugins-xpp3" ,java-modello-plugins-xpp3)
3690 ;; for tests
3691 ("java-junit" ,java-junit)))
3692 (build-system ant-build-system)
3693 (home-page "https://github.com/sonatype/plexus-sec-dispatcher")
3694 (synopsis "Plexus Security Dispatcher Component")
3695 (description "This package is the Plexus Security Dispatcher Component.
3696This component decrypts a string passed to it.")
3697 (license license:asl2.0)))
3698
7d65489f
JL
3699(define-public java-plexus-cli
3700 (package
3701 (name "java-plexus-cli")
3702 (version "1.7")
3703 (source (origin
3704 (method git-fetch)
3705 (uri (git-reference
3706 (url "https://github.com/sonatype/plexus-cli")
3707 (commit "a776afa6bca84e5107bedb69440329cdb24ed645")))
3708 (file-name (string-append name "-" version))
3709 (sha256
3710 (base32
3711 "0xjrlay605rypv3zd7y24vlwf0039bil3n2cqw54r1ddpysq46vx"))))
3712 (build-system ant-build-system)
3713 (arguments
3714 `(#:jar-name "plexus-cli.jar"
3715 #:source-dir "src/main/java"
3716 #:jdk ,icedtea-8
3717 #:test-dir "src/test"))
3718 (inputs
3719 `(("java-commons-cli" ,java-commons-cli)
3720 ("java-plexus-container-default" ,java-plexus-container-default)
3721 ("java-plexus-classworlds" ,java-plexus-classworlds)))
3722 (native-inputs
3723 `(("java-plexus-utils" ,java-plexus-utils)
3724 ("java-junit" ,java-junit)
3725 ("java-guava" ,java-guava)))
3726 (home-page "https://codehaus-plexus.github.io/plexus-cli")
3727 (synopsis "CLI building library for plexus")
3728 (description "This package is a library to help creating CLI around
3729Plexus components.")
3730 (license license:asl2.0)))
3731
8f524749
JL
3732(define-public java-sisu-build-api
3733 (package
3734 (name "java-sisu-build-api")
3735 (version "0.0.7")
3736 (source (origin
3737 (method url-fetch)
3738 (uri (string-append "https://github.com/sonatype/sisu-build-api/"
3739 "archive/plexus-build-api-" version ".tar.gz"))
3740 (sha256
3741 (base32
3742 "1c3rrpma3x634xp2rm2p5iskfhzdyc7qfbhjzr70agrl1jwghgy2"))))
3743 (build-system ant-build-system)
3744 (arguments
3745 `(#:jar-name "sisu-build-api.jar"
3746 #:source-dir "src/main/java"
3747 #:jdk ,icedtea-8
3748 #:tests? #f; FIXME: how to run the tests?
3749 #:phases
3750 (modify-phases %standard-phases
3751 (add-before 'build 'copy-resources
3752 (lambda _
3753 (copy-recursively "src/main/resources" "build/classes")
3754 (substitute* (find-files "build/classes")
3755 (("\\$\\{project.version\\}") ,version))
3756 #t))
3757 (add-before 'build 'generate-plexus-compontent
3758 (lambda _
3759 (mkdir-p "build/classes/META-INF/plexus")
3760 ;; This file is required for plexus to inject this package.
3761 ;; FIXME: how is it generated?
3762 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
3763 (lambda _
3764 (display
3765 "<component-set>\n
3766 <components>\n
3767 <component>\n
3768 <role>org.sonatype.plexus.build.incremental.BuildContext</role>\n
3769 <role-hint>default</role-hint>\n
3770 <implementation>org.sonatype.plexus.build.incremental.DefaultBuildContext</implementation>\n
3771 <description>Filesystem based non-incremental build context implementation\n
3772which behaves as if all files were just created.</description>\n
3773 </component>\n
3774 </components>\n
3775</component-set>\n")))
3776 #t)))))
3777 (inputs
3778 `(("java-plexus-utils" ,java-plexus-utils)
3779 ("java-plexus-container-default" ,java-plexus-container-default)))
3780 (home-page "https://github.com/sonatype/sisu-build-api/")
3781 (synopsis "Base build API for maven")
3782 (description "This package contains the base build API for maven and
3783a default implementation of it. This API is about scanning files in a
3784project and determining what files need to be rebuilt.")
3785 (license license:asl2.0)))
3786
b26c8b61
JL
3787(define-public java-modello-core
3788 (package
3789 (name "java-modello-core")
3790 (version "1.9.1")
3791 (source (origin
3792 (method url-fetch)
3793 (uri (string-append "https://github.com/codehaus-plexus/modello"
3794 "/archive/modello-" version ".tar.gz"))
3795 (sha256
3796 (base32
3797 "0l2pvns8pmlrmjm3iknp7gpg3654y1m8qhy55b19sdwdchdcyxfh"))))
3798 (build-system ant-build-system)
3799 (arguments
3800 `(#:jar-name "modello-core.jar"
3801 #:source-dir "modello-core/src/main/java"
3802 #:test-dir "modello-core/src/test"
3803 #:main-class "org.codehaus.modello.ModelloCli"
3804 #:jdk ,icedtea-8
3805 #:phases
3806 (modify-phases %standard-phases
3807 (add-before 'build 'copy-resources
3808 (lambda _
3809 (mkdir-p "build/classes/META-INF/plexus")
3810 (copy-file "modello-core/src/main/resources/META-INF/plexus/components.xml"
3811 "build/classes/META-INF/plexus/components.xml")
3812 #t))
3813 (add-before 'check 'fix-tests
3814 (lambda _
3815 (with-directory-excursion "modello-core/src/test/java/org/codehaus"
3816 (substitute* '("modello/core/DefaultModelloCoreTest.java"
3817 "modello/core/io/ModelReaderTest.java")
3818 (("src/test") "modello-core/src/test")))
3819 #t)))))
3820 (inputs
3821 `(("java-plexus-utils" ,java-plexus-utils)
3822 ("java-plexus-container-default" ,java-plexus-container-default)
3823 ("java-sisu-build-api" ,java-sisu-build-api)))
3824 (native-inputs
3825 `(("java-junit" ,java-junit)
3826 ("java-plexus-classworlds" ,java-plexus-classworlds)
3827 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
3828 ("java-guava" ,java-guava)))
3829 (home-page "http://codehaus-plexus.github.io/modello/")
3830 (synopsis "Framework for code generation from a simple model")
3831 (description "Modello is a framework for code generation from a simple model.
3832
3833Modello generates code from a simple model format: based on a plugin
3834architecture, various types of code and descriptors can be generated from the
3835single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers,
3836XSD and documentation.")
3837 (license (list
3838 license:expat
3839 ;; Although this package uses only files licensed under expat,
3840 ;; other parts of the source are licensed under different
3841 ;; licenses. We include them to be inherited by other packages.
3842 license:asl2.0
3843 ;; Some files in modello-plugin-java are licensed under a
3844 ;; 5-clause BSD license.
3845 (license:non-copyleft
3846 (string-append "file:///modello-plugins/modello-plugin-java/"
3847 "src/main/java/org/codehaus/modello/plugin/"
3848 "java/javasource/JNaming.java"))))))
3849
fc620bef
JL
3850(define-public java-modello-plugins-java
3851 (package
3852 (inherit java-modello-core)
3853 (name "java-modello-plugins-java")
3854 (arguments
3855 `(#:jar-name "modello-plugins-java.jar"
3856 #:source-dir "modello-plugins/modello-plugin-java/src/main/java"
3857 #:test-dir "modello-plugins/modello-plugin-java/src/test"
3858 #:jdk ,icedtea-8
3859 #:tests? #f; requires maven-model, which depends on this package
3860 #:phases
3861 (modify-phases %standard-phases
3862 (add-before 'build 'copy-resources
3863 (lambda _
3864 (mkdir-p "build/classes")
3865 (copy-recursively "modello-plugins/modello-plugin-java/src/main/resources"
3866 "build/classes")
3867 #t)))))
3868 (inputs
3869 `(("java-modello-core" ,java-modello-core)
3870 ,@(package-inputs java-modello-core)))
3871 (synopsis "Modello Java Plugin")
3872 (description "Modello Java Plugin generates Java objects for the model.")))
3873
a0ce95ba
JL
3874(define-public java-modello-plugins-xml
3875 (package
3876 (inherit java-modello-core)
3877 (name "java-modello-plugins-xml")
3878 (arguments
3879 `(#:jar-name "modello-plugins-xml.jar"
3880 #:source-dir "modello-plugins/modello-plugin-xml/src/main/java"
3881 #:test-dir "modello-plugins/modello-plugin-xml/src/test"
3882 #:jdk ,icedtea-8
3883 #:phases
3884 (modify-phases %standard-phases
3885 (add-before 'build 'copy-resources
3886 (lambda _
3887 (mkdir-p "build/classes")
3888 (copy-recursively
3889 "modello-plugins/modello-plugin-xml/src/main/resources"
3890 "build/classes")
3891 #t))
3892 (add-before 'check 'fix-paths
3893 (lambda _
3894 (with-directory-excursion "modello-plugins/modello-plugin-xml/src/test"
3895 (substitute*
3896 "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java"
2c8ac364
MW
3897 (("src/test") "modello-plugins/modello-plugin-xml/src/test")))
3898 #t)))))
a0ce95ba
JL
3899 (inputs
3900 `(("java-modello-core" ,java-modello-core)
3901 ("java-modello-plugins-java" ,java-modello-plugins-java)
3902 ,@(package-inputs java-modello-core)))
3903 (synopsis "Modello XML Plugin")
3904 (description "Modello XML Plugin contains shared code for every plugins
3905working on XML representation of the model.")))
3906
e4708560
JL
3907(define-public java-modello-test
3908 (package
3909 (inherit java-modello-core)
3910 (name "java-modello-test")
3911 (arguments
3912 `(#:jar-name "modello-test.jar"
3913 #:source-dir "modello-test/src/main/java"
3914 #:tests? #f; no tests
3915 #:jdk ,icedtea-8))
3916 (inputs
3917 `(("java-plexus-utils" ,java-plexus-utils)
3918 ("java-plexus-compiler-api" ,java-plexus-compiler-api)
3919 ("java-plexus-compiler-javac" ,java-plexus-compiler-javac)
3920 ("java-plexus-container-default" ,java-plexus-container-default)))
3921 (synopsis "Modello test package")
3922 (description "The modello test package contains the basis to create
3923Modello generator unit-tests, including sample models and xml files to test
3924every feature for every plugin.")))
3925
36607d3b
JL
3926(define-public java-modello-plugins-xpp3
3927 (package
3928 (inherit java-modello-core)
3929 (name "java-modello-plugins-xpp3")
3930 (arguments
3931 `(#:jar-name "modello-plugins-xpp3.jar"
3932 #:source-dir "modello-plugins/modello-plugin-xpp3/src/main/java"
3933 #:test-dir "modello-plugins/modello-plugin-xpp3/src/test"
3934 ;; One of the test dependencies is maven-model which depends on this package.
3935 #:tests? #f
3936 #:jdk ,icedtea-8
3937 #:phases
3938 (modify-phases %standard-phases
3939 (add-before 'build 'copy-resources
3940 (lambda _
3941 (mkdir-p "build/classes")
3942 (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources"
3943 "build/classes")
3944 #t)))))
3945 (inputs
3946 `(("java-modello-core" ,java-modello-core)
3947 ("java-modello-plugins-java" ,java-modello-plugins-java)
3948 ("java-modello-plugins-xml" ,java-modello-plugins-xml)
3949 ,@(package-inputs java-modello-core)))
3950 (native-inputs
3951 `(("java-xmlunit" ,java-xmlunit)
3952 ("java-modello-test" ,java-modello-test)
3953 ,@(package-native-inputs java-modello-core)))
3954 (synopsis "Modello XPP3 Plugin")
3955 (description "The modello XPP3 plugin generates XML readers and writers based
3956on the XPP3 API (XML Pull Parser).")))
3957
8f8ed9aa
RW
3958(define-public java-asm
3959 (package
3960 (name "java-asm")
d0e9ded7 3961 (version "6.0")
8f8ed9aa
RW
3962 (source (origin
3963 (method url-fetch)
3964 (uri (string-append "http://download.forge.ow2.org/asm/"
3965 "asm-" version ".tar.gz"))
3966 (sha256
3967 (base32
d0e9ded7 3968 "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00"))))
8f8ed9aa 3969 (build-system ant-build-system)
d0e9ded7 3970 (propagated-inputs
9d216017
GB
3971 `(("java-aqute-bndlib" ,java-aqute-bndlib)
3972 ("java-aqute-libg" ,java-aqute-libg)))
8f8ed9aa
RW
3973 (arguments
3974 `(#:build-target "compile"
3975 ;; The tests require an old version of Janino, which no longer compiles
3976 ;; with the JDK7.
3977 #:tests? #f
d0e9ded7
GB
3978 #:make-flags
3979 (list
3980 ;; We don't need these extra ant tasks, but the build system asks us to
3981 ;; provide a path anyway.
3982 "-Dobjectweb.ant.tasks.path=dummy-path"
3983 ;; The java-aqute.bndlib JAR file will be put onto the classpath and
3984 ;; used during the build automatically by ant-build-system, but
3985 ;; java-asm's build.xml fails unless we provide something here.
3986 "-Dbiz.aQute.bnd.path=dummy-path")
8f8ed9aa
RW
3987 #:phases
3988 (modify-phases %standard-phases
3989 (add-before 'install 'build-jars
3990 (lambda* (#:key make-flags #:allow-other-keys)
3991 ;; We cannot use the "jar" target because it depends on a couple
3992 ;; of unpackaged, complicated tools.
3993 (mkdir "dist")
2c8ac364
MW
3994 (invoke "jar"
3995 "-cf" (string-append "dist/asm-" ,version ".jar")
3996 "-C" "output/build/tmp" ".")))
8f8ed9aa
RW
3997 (replace 'install
3998 (install-jars "dist")))))
3999 (native-inputs
4000 `(("java-junit" ,java-junit)))
4001 (home-page "http://asm.ow2.org/")
4002 (synopsis "Very small and fast Java bytecode manipulation framework")
4003 (description "ASM is an all purpose Java bytecode manipulation and
4004analysis framework. It can be used to modify existing classes or dynamically
4005generate classes, directly in binary form. The provided common
4006transformations and analysis algorithms allow to easily assemble custom
4007complex transformations and code analysis tools.")
4008 (license license:bsd-3)))
607fe24a 4009
bfb4004d
GB
4010(define java-asm-bootstrap
4011 (package
4012 (inherit java-asm)
4013 (name "java-asm-bootstrap")
4014 (arguments
4015 (substitute-keyword-arguments (package-arguments java-asm)
4016 ((#:tests? _) #f)))
4017 (native-inputs `())
4018 (propagated-inputs
4019 `(("java-aqute-bndlib" ,java-aqute-bndlib-bootstrap)
4020 ("java-aqute-libg" ,java-aqute-libg-bootstrap)
4021 ,@(delete `("java-aqute-bndlib" ,java-aqute-bndlib)
de99ba7e 4022 (delete `("java-aqute-libg" ,java-aqute-libg)
bfb4004d
GB
4023 (package-inputs java-asm)))))))
4024
607fe24a
RW
4025(define-public java-cglib
4026 (package
4027 (name "java-cglib")
4028 (version "3.2.4")
4029 (source (origin
4030 (method url-fetch)
4031 (uri (string-append
4032 "https://github.com/cglib/cglib/archive/RELEASE_"
4033 (string-map (lambda (c) (if (char=? c #\.) #\_ c)) version)
4034 ".tar.gz"))
4035 (file-name (string-append "cglib-" version ".tar.gz"))
4036 (sha256
4037 (base32
4038 "162dvd4fln76ai8prfharf66pn6r56p3sxx683j5vdyccrd5hi1q"))))
4039 (build-system ant-build-system)
4040 (arguments
4041 `(;; FIXME: tests fail because junit runs
4042 ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem
4043 ;; to describe a test at all.
4044 #:tests? #f
4045 #:jar-name "cglib.jar"
4046 #:phases
4047 (modify-phases %standard-phases
4048 (add-after 'unpack 'chdir
4049 (lambda _ (chdir "cglib") #t)))))
4050 (inputs
4051 `(("java-asm" ,java-asm)
4052 ("java-junit" ,java-junit)))
4053 (home-page "https://github.com/cglib/cglib/")
4054 (synopsis "Java byte code generation library")
4055 (description "The byte code generation library CGLIB is a high level API
4056to generate and transform Java byte code.")
4057 (license license:asl2.0)))
33e34bfe
RW
4058
4059(define-public java-objenesis
4060 (package
4061 (name "java-objenesis")
4062 (version "2.5.1")
4063 (source (origin
4064 (method url-fetch)
4065 (uri (string-append "https://github.com/easymock/objenesis/"
4066 "archive/" version ".tar.gz"))
4067 (file-name (string-append "objenesis-" version ".tar.gz"))
4068 (sha256
4069 (base32
4070 "1va5qz1i2wawwavhnxfzxnfgrcaflz9p1pg03irrjh4nd3rz8wh6"))))
4071 (build-system ant-build-system)
4072 (arguments
4073 `(#:jar-name "objenesis.jar"
4074 #:source-dir "main/src/"
4075 #:test-dir "main/src/test/"))
4076 (native-inputs
4077 `(("java-junit" ,java-junit)
4078 ("java-hamcrest-core" ,java-hamcrest-core)))
4079 (home-page "http://objenesis.org/")
4080 (synopsis "Bypass the constructor when creating an object")
4081 (description "Objenesis is a small Java library that serves one purpose:
4082to instantiate a new object of a particular class. It is common to see
4083restrictions in libraries stating that classes must require a default
4084constructor. Objenesis aims to overcome these restrictions by bypassing the
4085constructor on object instantiation.")
4086 (license license:asl2.0)))
ae589876
RW
4087
4088(define-public java-easymock
4089 (package
4090 (name "java-easymock")
4091 (version "3.4")
4092 (source (origin
4093 (method url-fetch)
4094 (uri (string-append "https://github.com/easymock/easymock/"
4095 "archive/easymock-" version ".tar.gz"))
4096 (sha256
4097 (base32
4098 "1yzg0kv256ndr57gpav46cyv4a1ns5sj722l50zpxk3j6sk9hnmi"))))
4099 (build-system ant-build-system)
4100 (arguments
4101 `(#:jar-name "easymock.jar"
4102 #:source-dir "core/src/main"
4103 #:test-dir "core/src/test"
4104 #:phases
4105 (modify-phases %standard-phases
4106 ;; FIXME: Android support requires the following packages to be
4107 ;; available: com.google.dexmaker.stock.ProxyBuilder
4108 (add-after 'unpack 'delete-android-support
4109 (lambda _
4110 (with-directory-excursion "core/src/main/java/org/easymock/internal"
4111 (substitute* "MocksControl.java"
4112 (("AndroidSupport.isAndroid\\(\\)") "false")
4113 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
4114 (delete-file "AndroidClassProxyFactory.java"))
4115 #t))
4116 (add-after 'unpack 'delete-broken-tests
4117 (lambda _
4118 (with-directory-excursion "core/src/test/java/org/easymock"
4119 ;; This test depends on dexmaker.
4120 (delete-file "tests2/ClassExtensionHelperTest.java")
4121
4122 ;; This is not a test.
4123 (delete-file "tests/BaseEasyMockRunnerTest.java")
4124
4125 ;; This test should be executed with a different runner...
4126 (delete-file "tests2/EasyMockAnnotationsTest.java")
4127 ;; ...but deleting it means that we also have to delete these
4128 ;; dependent files.
4129 (delete-file "tests2/EasyMockRunnerTest.java")
4130 (delete-file "tests2/EasyMockRuleTest.java")
4131
4132 ;; This test fails because the file "easymock.properties" does
4133 ;; not exist.
4134 (delete-file "tests2/EasyMockPropertiesTest.java"))
4135 #t)))))
4136 (inputs
4137 `(("java-asm" ,java-asm)
4138 ("java-cglib" ,java-cglib)
4139 ("java-objenesis" ,java-objenesis)))
4140 (native-inputs
4141 `(("java-junit" ,java-junit)
4142 ("java-hamcrest-core" ,java-hamcrest-core)))
4143 (home-page "http://easymock.org")
4144 (synopsis "Java library providing mock objects for unit tests")
4145 (description "EasyMock is a Java library that provides an easy way to use
4146mock objects in unit testing.")
4147 (license license:asl2.0)))
7aa37023 4148
f12ad6c7
RW
4149(define-public java-jmock-1
4150 (package
4151 (name "java-jmock")
4152 (version "1.2.0")
4153 (source (origin
4154 (method url-fetch)
4155 (uri (string-append "https://github.com/jmock-developers/"
4156 "jmock-library/archive/" version ".tar.gz"))
4157 (file-name (string-append "jmock-" version ".tar.gz"))
4158 (sha256
4159 (base32
4160 "0xmrlhq0fszldkbv281k9463mv496143vvmqwpxp62yzjvdkx9w0"))))
4161 (build-system ant-build-system)
4162 (arguments
4163 `(#:build-target "jars"
4164 #:test-target "run.tests"
4165 #:phases
4166 (modify-phases %standard-phases
4167 (replace 'install (install-jars "build")))))
4168 (home-page "http://www.jmock.org")
4169 (synopsis "Mock object library for test-driven development")
4170 (description "JMock is a library that supports test-driven development of
4171Java code with mock objects. Mock objects help you design and test the
4172interactions between the objects in your programs.
4173
4174The jMock library
4175
4176@itemize
4177@item makes it quick and easy to define mock objects
4178@item lets you precisely specify the interactions between
4179 your objects, reducing the brittleness of your tests
4180@item plugs into your favourite test framework
4181@item is easy to extend.
4182@end itemize\n")
4183 (license license:bsd-3)))
4184
045124ae
JL
4185(define-public java-jmock
4186 (package
4187 (inherit java-jmock-1)
4188 (name "java-jmock")
4189 (version "2.8.2")
4190 (source (origin
4191 (method url-fetch)
4192 (uri (string-append "https://github.com/jmock-developers/"
4193 "jmock-library/archive/" version ".tar.gz"))
4194 (file-name (string-append name "-" version ".tar.gz"))
4195 (sha256
4196 (base32
4197 "18650a9g8xffcsdb6w91pbswa7f40fp2sh6s3nclkclz5dbzq8f0"))))
4198 (inputs
4199 `(("java-hamcrest-all" ,java-hamcrest-all)
4200 ("java-asm" ,java-asm)
4201 ("java-bsh" ,java-bsh)
4202 ("java-junit" ,java-junit)))
4203 (native-inputs
4204 `(("cglib" ,java-cglib)))
4205 (arguments
4206 `(#:jar-name "java-jmock.jar"
4207 #:source-dir "jmock/src/main/java"
4208 #:test-dir "jmock/src/test"))))
4209
25436c6d
JL
4210(define-public java-jmock-junit4
4211 (package
4212 (inherit java-jmock)
4213 (name "java-jmock-junit4")
4214 (arguments
4215 `(#:jar-name "java-jmock-junit4.jar"
4216 #:source-dir "jmock-junit4/src/main/java"
4217 #:test-dir "jmock-junit4/src/test"))
4218 (inputs
4219 `(("java-hamcrest-all" ,java-hamcrest-all)
4220 ("java-asm" ,java-asm)
4221 ("java-bsh" ,java-bsh)
4222 ("java-jmock" ,java-jmock)
4223 ("java-jumit" ,java-junit)))))
4224
e84b899d
JL
4225(define-public java-jmock-legacy
4226 (package
4227 (inherit java-jmock)
4228 (name "java-jmock-legacy")
4229 (arguments
4230 `(#:jar-name "java-jmock-legacy.jar"
4231 #:source-dir "jmock-legacy/src/main/java"
4232 #:test-dir "jmock-legacy/src/test"
4233 #:phases
4234 (modify-phases %standard-phases
4235 (add-before 'check 'copy-tests
4236 (lambda _
4237 ;; This file is a dependancy of some tests
4238 (let ((file "org/jmock/test/acceptance/PackageProtectedType.java"))
4239 (copy-file (string-append "jmock/src/test/java/" file)
4240 (string-append "jmock-legacy/src/test/java/" file))
4241 #t))))))
4242 (inputs
4243 `(("java-hamcrest-all" ,java-hamcrest-all)
4244 ("java-objenesis" ,java-objenesis)
4245 ("java-cglib" ,java-cglib)
4246 ("java-jmock" ,java-jmock)
4247 ("java-asm" ,java-asm)
4248 ("java-bsh" ,java-bsh)
4249 ("java-junit" ,java-junit)))
4250 (native-inputs
4251 `(("java-jmock-junit4" ,java-jmock-junit4)))))
4252
439c59da
RW
4253(define-public java-hamcrest-all
4254 (package (inherit java-hamcrest-core)
4255 (name "java-hamcrest-all")
4256 (arguments
bfc007e1
RW
4257 `(#:jdk ,icedtea-8
4258 ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core)
4259 ((#:build-target _) "bigjar")
4260 ((#:phases phases)
4261 `(modify-phases ,phases
4262 ;; Some build targets override the classpath, so we need to patch
4263 ;; the build.xml to ensure that required dependencies are on the
4264 ;; classpath.
4265 (add-after 'unpack 'patch-classpath-for-integration
4266 (lambda* (#:key inputs #:allow-other-keys)
4267 (substitute* "build.xml"
4268 ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
4269 (string-join
4270 (cons line
4271 (append
4272 (find-files (assoc-ref inputs "java-junit") "\\.jar$")
4273 (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
4274 (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
2cc63e6f
RW
4275 ";"))
4276 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
4277 (string-append (assoc-ref inputs "java-hamcrest-core")
4278 "/share/java/hamcrest-core.jar")))
bfc007e1 4279 #t)))))))
439c59da
RW
4280 (inputs
4281 `(("java-junit" ,java-junit)
4282 ("java-jmock" ,java-jmock-1)
2cc63e6f
RW
4283 ;; This is necessary because of what seems to be a race condition.
4284 ;; This package would sometimes fail to build because hamcrest-core.jar
4285 ;; could not be found, even though it is built as part of this package.
4286 ;; Adding java-hamcrest-core appears to fix this problem. See
4287 ;; https://debbugs.gnu.org/31390 for more information.
4288 ("java-hamcrest-core" ,java-hamcrest-core)
439c59da 4289 ("java-easymock" ,java-easymock)
439c59da
RW
4290 ,@(package-inputs java-hamcrest-core)))))
4291
7aa37023
RW
4292(define-public java-jopt-simple
4293 (package
4294 (name "java-jopt-simple")
4295 (version "5.0.3")
4296 (source (origin
4297 (method url-fetch)
4298 (uri (string-append "http://repo1.maven.org/maven2/"
4299 "net/sf/jopt-simple/jopt-simple/"
4300 version "/jopt-simple-"
4301 version "-sources.jar"))
4302 (sha256
4303 (base32
4304 "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa"))))
4305 (build-system ant-build-system)
4306 (arguments
4307 `(#:tests? #f ; there are no tests
4308 #:jar-name "jopt-simple.jar"))
4309 (home-page "https://pholser.github.io/jopt-simple/")
4310 (synopsis "Java library for parsing command line options")
4311 (description "JOpt Simple is a Java library for parsing command line
4312options, such as those you might pass to an invocation of @code{javac}. In
4313the interest of striving for simplicity, as closely as possible JOpt Simple
4314attempts to honor the command line option syntaxes of POSIX @code{getopt} and
4315GNU @code{getopt_long}. It also aims to make option parser configuration and
4316retrieval of options and their arguments simple and expressive, without being
4317overly clever.")
4318 (license license:expat)))
840969e8
RW
4319
4320(define-public java-commons-math3
4321 (package
4322 (name "java-commons-math3")
4323 (version "3.6.1")
4324 (source (origin
4325 (method url-fetch)
4326 (uri (string-append "mirror://apache/commons/math/source/"
4327 "commons-math3-" version "-src.tar.gz"))
4328 (sha256
4329 (base32
4330 "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6"))))
4331 (build-system ant-build-system)
4332 (arguments
4333 `(#:build-target "jar"
4334 #:test-target "test"
4335 #:make-flags
4336 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
4337 (junit (assoc-ref %build-inputs "java-junit")))
4338 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4339 (string-append "-Dhamcrest.jar=" hamcrest
4340 "/share/java/hamcrest-core.jar")))
4341 #:phases
4342 (modify-phases %standard-phases
4343 ;; We want to build the jar in the build phase and run the tests
4344 ;; later in a separate phase.
4345 (add-after 'unpack 'untangle-targets
4346 (lambda _
4347 (substitute* "build.xml"
4348 (("name=\"jar\" depends=\"test\"")
4349 "name=\"jar\" depends=\"compile\""))
4350 #t))
4351 ;; There is no install target.
4352 (replace 'install
4353 (install-jars "target")))))
4354 (native-inputs
4355 `(("java-junit" ,java-junit)
4356 ("java-hamcrest-core" ,java-hamcrest-core)))
4357 (home-page "http://commons.apache.org/math/")
4358 (synopsis "Apache Commons mathematics library")
4359 (description "Commons Math is a library of lightweight, self-contained
4360mathematics and statistics components addressing the most common problems not
4361available in the Java programming language or Commons Lang.")
4362 (license license:asl2.0)))
62c9bfaa
RW
4363
4364(define-public java-jmh
4365 (package
4366 (name "java-jmh")
4367 (version "1.17.5")
4368 (source (origin
4369 (method hg-fetch)
4370 (uri (hg-reference
4371 (url "http://hg.openjdk.java.net/code-tools/jmh/")
4372 (changeset version)))
4373 (file-name (string-append name "-" version "-checkout"))
4374 (sha256
4375 (base32
4376 "1fxyxhg9famwcg1prc4cgwb5wzyxqavn3cjm5vz8605xz7x5k084"))))
4377 (build-system ant-build-system)
4378 (arguments
4379 `(#:jar-name "jmh-core.jar"
4380 #:source-dir "jmh-core/src/main"
4381 #:test-dir "jmh-core/src/test"
4382 #:phases
4383 (modify-phases %standard-phases
4384 ;; This seems to be a bug in the JDK. It may not be necessary in
4385 ;; future versions of the JDK.
4386 (add-after 'unpack 'fix-bug
4387 (lambda _
4388 (with-directory-excursion
4389 "jmh-core/src/main/java/org/openjdk/jmh/runner/options"
4390 (substitute* '("IntegerValueConverter.java"
4391 "ThreadsValueConverter.java")
4392 (("public Class<Integer> valueType")
4393 "public Class<? extends Integer> valueType")))
4394 #t)))))
4395 (inputs
4396 `(("java-jopt-simple" ,java-jopt-simple)
4397 ("java-commons-math3" ,java-commons-math3)))
4398 (native-inputs
4399 `(("java-junit" ,java-junit)
4400 ("java-hamcrest-core" ,java-hamcrest-core)))
4401 (home-page "http://openjdk.java.net/projects/code-tools/jmh/")
4402 (synopsis "Benchmark harness for the JVM")
4403 (description "JMH is a Java harness for building, running, and analysing
4404nano/micro/milli/macro benchmarks written in Java and other languages
f4548394 4405targeting the JVM.")
62c9bfaa
RW
4406 ;; GPLv2 only
4407 (license license:gpl2)))
56ebb4e9
RW
4408
4409(define-public java-commons-collections4
4410 (package
4411 (name "java-commons-collections4")
4412 (version "4.1")
4413 (source (origin
4414 (method url-fetch)
4415 (uri (string-append "mirror://apache/commons/collections/source/"
4416 "commons-collections4-" version "-src.tar.gz"))
4417 (sha256
4418 (base32
4419 "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl"))))
4420 (build-system ant-build-system)
4421 (arguments
4422 `(#:test-target "test"
4423 #:make-flags
4424 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
4425 (junit (assoc-ref %build-inputs "java-junit"))
4426 (easymock (assoc-ref %build-inputs "java-easymock")))
4427 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4428 (string-append "-Dhamcrest.jar=" hamcrest
4429 "/share/java/hamcrest-core.jar")
4430 (string-append "-Deasymock.jar=" easymock
4431 "/share/java/easymock.jar")))
4432 #:phases
4433 (modify-phases %standard-phases
4434 (replace 'install
4435 (install-jars "target")))))
4436 (native-inputs
4437 `(("java-junit" ,java-junit)
4438 ("java-hamcrest-core" ,java-hamcrest-core)
4439 ("java-easymock" ,java-easymock)))
4440 (home-page "http://commons.apache.org/collections/")
4441 (synopsis "Collections framework")
4442 (description "The Java Collections Framework is the recognised standard
4443for collection handling in Java. Commons-Collections seek to build upon the
4444JDK classes by providing new interfaces, implementations and utilities. There
4445are many features, including:
4446
4447@itemize
4448@item @code{Bag} interface for collections that have a number of copies of
4449 each object
4450@item @code{BidiMap} interface for maps that can be looked up from value to
4451 key as well and key to value
4452@item @code{MapIterator} interface to provide simple and quick iteration over
4453 maps
4454@item Transforming decorators that alter each object as it is added to the
4455 collection
4456@item Composite collections that make multiple collections look like one
4457@item Ordered maps and sets that retain the order elements are added in,
4458 including an LRU based map
4459@item Reference map that allows keys and/or values to be garbage collected
4460 under close control
4461@item Many comparator implementations
4462@item Many iterator implementations
4463@item Adapter classes from array and enumerations to collections
4464@item Utilities to test or create typical set-theory properties of collections
4465 such as union, intersection, and closure.
4466@end itemize\n")
4467 (license license:asl2.0)))
6af63e65 4468
229a9864
JL
4469(define-public java-commons-collections
4470 (package
4471 (inherit java-commons-collections4)
4472 (name "java-commons-collections")
4473 (version "3.2.2")
4474 (source (origin
4475 (method url-fetch)
4476 (uri (string-append "mirror://apache/commons/collections/source/"
4477 "commons-collections-" version "-src.tar.gz"))
4478 (sha256
4479 (base32
7c7323e4
GB
4480 "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387"))
4481 (patches
4482 (search-patches "java-commons-collections-fix-java8.patch"))))
229a9864
JL
4483 (arguments
4484 (substitute-keyword-arguments (package-arguments java-commons-collections4)
4485 ((#:phases phases)
4486 `(modify-phases ,phases
4487 ;; The manifest is required by the build procedure
4488 (add-before 'build 'add-manifest
4489 (lambda _
4490 (mkdir-p "build/conf")
4491 (call-with-output-file "build/conf/MANIFEST.MF"
4492 (lambda (file)
2c8ac364
MW
4493 (format file "Manifest-Version: 1.0\n")))
4494 #t))
229a9864
JL
4495 (replace 'install
4496 (install-jars "build"))))))))
4497
5aa2f3f4
JL
4498(define java-commons-collections-test-classes
4499 (package
4500 (inherit java-commons-collections)
4501 (arguments
4502 `(#:jar-name "commons-collections-test-classes.jar"
4503 #:source-dir "src/test"
4504 #:tests? #f))
4505 (inputs
4506 `(("collection" ,java-commons-collections)))))
4507
4508(define-public java-commons-beanutils
4509 (package
4510 (name "java-commons-beanutils")
4511 (version "1.9.3")
4512 (source (origin
4513 (method url-fetch)
4514 (uri (string-append "mirror://apache/commons/beanutils/source/"
4515 "commons-beanutils-" version "-src.tar.gz"))
4516 (sha256
4517 (base32
4518 "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk"))))
4519 (build-system ant-build-system)
4520 (arguments
4521 `(#:test-target "test"
4522 #:tests? #f
4523 #:phases
4524 (modify-phases %standard-phases
4525 (replace 'install
4526 (lambda* (#:key outputs #:allow-other-keys)
4527 (rename-file (string-append "dist/commons-beanutils-" ,version
4528 "-SNAPSHOT.jar")
4529 "commons-beanutils.jar")
4530 (install-file "commons-beanutils.jar"
4531 (string-append (assoc-ref outputs "out") "/share/java/"))
4532 #t)))))
4533 (inputs
4534 `(("logging" ,java-commons-logging-minimal)
4535 ("collections" ,java-commons-collections)))
4536 (native-inputs
4537 `(("junit" ,java-junit)
4538 ("collections-test" ,java-commons-collections-test-classes)))
4539 (home-page "http://commons.apache.org/beanutils/")
4540 (synopsis "Dynamically set or get properties in Java")
4541 (description "BeanUtils provides a simplified interface to reflection and
4542introspection to set or get dynamically determined properties through their
4543setter and getter method.")
4544 (license license:asl2.0)))
4545
6af63e65
HG
4546(define-public java-commons-io
4547 (package
4548 (name "java-commons-io")
4549 (version "2.5")
4550 (source
4551 (origin
4552 (method url-fetch)
4553 (uri (string-append "mirror://apache/commons/io/source/"
4554 "commons-io-" version "-src.tar.gz"))
4555 (sha256
4556 (base32
4557 "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3"))))
4558 (build-system ant-build-system)
4559 (outputs '("out" "doc"))
4560 (arguments
4561 `(#:test-target "test"
4562 #:make-flags
4563 (list (string-append "-Djunit.jar="
4564 (assoc-ref %build-inputs "java-junit")
4565 "/share/java/junit.jar"))
4566 #:phases
4567 (modify-phases %standard-phases
4568 (add-after 'build 'build-javadoc ant-build-javadoc)
4569 (replace 'install (install-jars "target"))
4570 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4571 (native-inputs
4572 `(("java-junit" ,java-junit)
4573 ("java-hamcrest-core" ,java-hamcrest-core)))
4574 (home-page "http://commons.apache.org/io/")
4575 (synopsis "Common useful IO related classes")
4576 (description "Commons-IO contains utility classes, stream implementations,
4577file filters and endian classes.")
4578 (license license:asl2.0)))
d631b5f3 4579
46f9022c
DM
4580(define-public java-commons-exec-1.1
4581 (package
4582 (name "java-commons-exec")
4583 (version "1.1")
4584 (source
4585 (origin
4586 (method url-fetch)
4587 (uri (string-append "mirror://apache/commons/exec/source/"
4588 "commons-exec-" version "-src.tar.gz"))
4589 (sha256
4590 (base32
4591 "025dk8xgj10lxwwwqp0hng2rn7fr4vcirxzydqzx9k4dim667alk"))))
4592 (build-system ant-build-system)
4593 (arguments
4594 `(#:test-target "test"
4595 #:make-flags
4596 (list (string-append "-Dmaven.junit.jar="
4597 (assoc-ref %build-inputs "java-junit")
4598 "/share/java/junit.jar"))
4599 #:phases
4600 (modify-phases %standard-phases
4601 (add-before 'build 'delete-network-tests
4602 (lambda _
4603 (delete-file "src/test/java/org/apache/commons/exec/DefaultExecutorTest.java")
4604 (substitute* "src/test/java/org/apache/commons/exec/TestRunner.java"
4605 (("suite\\.addTestSuite\\(DefaultExecutorTest\\.class\\);") ""))
4606 #t))
4607 ;; The "build" phase automatically tests.
4608 (delete 'check)
4609 (replace 'install (install-jars "target")))))
4610 (native-inputs
4611 `(("java-junit" ,java-junit)))
4612 (home-page "http://commons.apache.org/proper/commons-exec/")
4613 (synopsis "Common program execution related classes")
4614 (description "Commons-Exec simplifies executing external processes.")
4615 (license license:asl2.0)))
4616
4617(define-public java-commons-exec
4618 (package
4619 (inherit java-commons-exec-1.1)
4620 (version "1.3")
4621 (source
4622 (origin
4623 (method url-fetch)
4624 (uri (string-append "mirror://apache/commons/exec/source/"
4625 "commons-exec-" version "-src.tar.gz"))
4626 (sha256
4627 (base32
4628 "17yb4h6f8l49c5iyyvda4z2nmw0bxrx857nrwmsr7mmpb7x441yv"))))
4629 (arguments
4630 `(#:test-target "test"
4631 #:make-flags
4632 (list (string-append "-Dmaven.junit.jar="
4633 (assoc-ref %build-inputs "java-junit")
4634 "/share/java/junit.jar")
4635 "-Dmaven.compiler.source=1.7"
4636 "-Dmaven.compiler.target=1.7")
4637 #:phases
4638 (modify-phases %standard-phases
4639 (add-before 'build 'delete-network-tests
4640 (lambda* (#:key inputs #:allow-other-keys)
4641 ;; This test hangs indefinitely.
4642 (delete-file "src/test/java/org/apache/commons/exec/issues/Exec60Test.java")
4643 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec41Test.java"
4644 (("ping -c 10 127.0.0.1") "sleep 10"))
4645 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec49Test.java"
4646 (("/bin/ls") "ls"))
4647 (call-with-output-file "src/test/scripts/ping.sh"
4648 (lambda (port)
4649 (format port "#!~a/bin/sh\nsleep $1\n"
4650 (assoc-ref inputs "bash"))))
4651 #t))
4652 ;; The "build" phase automatically tests.
4653 (delete 'check)
4654 (replace 'install (install-jars "target")))))
4655 (native-inputs
4656 `(("java-junit" ,java-junit)
4657 ("java-hamcrest-core" ,java-hamcrest-core)))))
4658
d631b5f3
HG
4659(define-public java-commons-lang
4660 (package
4661 (name "java-commons-lang")
4662 (version "2.6")
4663 (source
4664 (origin
4665 (method url-fetch)
4666 (uri (string-append "mirror://apache/commons/lang/source/"
4667 "commons-lang-" version "-src.tar.gz"))
4668 (sha256
4669 (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5"))))
4670 (build-system ant-build-system)
4671 (outputs '("out" "doc"))
4672 (arguments
4673 `(#:test-target "test"
e5a96113 4674 #:test-exclude (list "**/Abstract*.java" "**/Random*.java")
d631b5f3
HG
4675 #:phases
4676 (modify-phases %standard-phases
4677 (add-after 'build 'build-javadoc ant-build-javadoc)
4678 (add-before 'check 'disable-failing-test
4679 (lambda _
4680 ;; Disable a failing test
4681 (substitute* "src/test/java/org/apache/commons/lang/\
4682time/FastDateFormatTest.java"
4683 (("public void testFormat\\(\\)")
4684 "public void disabled_testFormat()"))
4685 #t))
4686 (replace 'install (install-jars "target"))
4687 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4688 (native-inputs
4689 `(("java-junit" ,java-junit)))
4690 (home-page "http://commons.apache.org/lang/")
4691 (synopsis "Extension of the java.lang package")
4692 (description "The Commons Lang components contains a set of Java classes
4693that provide helper methods for standard Java classes, especially those found
4694in the @code{java.lang} package in the Sun JDK. The following classes are
4695included:
4696
4697@itemize
4698@item StringUtils - Helper for @code{java.lang.String}.
4699@item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets
4700 of characters such as @code{[a-z]} and @code{[abcdez]}.
4701@item RandomStringUtils - Helper for creating randomised strings.
4702@item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
4703@item NumberRange - A range of numbers with an upper and lower bound.
4704@item ObjectUtils - Helper for @code{java.lang.Object}.
4705@item SerializationUtils - Helper for serializing objects.
4706@item SystemUtils - Utility class defining the Java system properties.
4707@item NestedException package - A sub-package for the creation of nested
4708 exceptions.
4709@item Enum package - A sub-package for the creation of enumerated types.
4710@item Builder package - A sub-package for the creation of @code{equals},
4711 @code{hashCode}, @code{compareTo} and @code{toString} methods.
4712@end itemize\n")
4713 (license license:asl2.0)))
82e18864
HG
4714
4715(define-public java-commons-lang3
4716 (package
4717 (name "java-commons-lang3")
4718 (version "3.4")
4719 (source
4720 (origin
4721 (method url-fetch)
4722 (uri (string-append "mirror://apache/commons/lang/source/"
4723 "commons-lang3-" version "-src.tar.gz"))
4724 (sha256
4725 (base32 "0xpshb9spjhplq5a7mr0y1bgfw8190ik4xj8f569xidfcki1d6kg"))))
4726 (build-system ant-build-system)
4727 (outputs '("out" "doc"))
4728 (arguments
4729 `(#:test-target "test"
4730 #:make-flags
4731 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-all"))
4732 (junit (assoc-ref %build-inputs "java-junit"))
4733 (easymock (assoc-ref %build-inputs "java-easymock"))
4734 (io (assoc-ref %build-inputs "java-commons-io")))
4735 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4736 (string-append "-Dhamcrest.jar=" hamcrest
4737 "/share/java/hamcrest-all.jar")
4738 (string-append "-Dcommons-io.jar=" io
4739 "/share/java/commons-io-"
4740 ,(package-version java-commons-io)
4741 "-SNAPSHOT.jar")
4742 (string-append "-Deasymock.jar=" easymock
4743 "/share/java/easymock.jar")))
4744 #:phases
4745 (modify-phases %standard-phases
4746 (add-after 'build 'build-javadoc ant-build-javadoc)
4747 (replace 'install (install-jars "target"))
4748 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4749 (native-inputs
4750 `(("java-junit" ,java-junit)
4751 ("java-commons-io" ,java-commons-io)
4752 ("java-hamcrest-all" ,java-hamcrest-all)
4753 ("java-easymock" ,java-easymock)))
4754 (home-page "http://commons.apache.org/lang/")
4755 (synopsis "Extension of the java.lang package")
4756 (description "The Commons Lang components contains a set of Java classes
4757that provide helper methods for standard Java classes, especially those found
4758in the @code{java.lang} package. The following classes are included:
4759
4760@itemize
4761@item StringUtils - Helper for @code{java.lang.String}.
4762@item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of
4763 characters such as @code{[a-z]} and @code{[abcdez]}.
4764@item RandomStringUtils - Helper for creating randomised strings.
4765@item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
4766@item NumberRange - A range of numbers with an upper and lower bound.
4767@item ObjectUtils - Helper for @code{java.lang.Object}.
4768@item SerializationUtils - Helper for serializing objects.
4769@item SystemUtils - Utility class defining the Java system properties.
4770@item NestedException package - A sub-package for the creation of nested
4771 exceptions.
4772@item Enum package - A sub-package for the creation of enumerated types.
4773@item Builder package - A sub-package for the creation of @code{equals},
4774 @code{hashCode}, @code{compareTo} and @code{toString} methods.
4775@end itemize\n")
4776 (license license:asl2.0)))
1c188f4e 4777
afb13a10
JL
4778(define-public java-commons-bsf
4779 (package
4780 (name "java-commons-bsf")
4781 (version "2.4.0")
4782 (source (origin
4783 (method url-fetch)
4784 (uri (string-append "mirror://apache/commons/bsf/source/bsf-src-"
4785 version ".tar.gz"))
4786 (sha256
4787 (base32
4788 "1sbamr8jl32p1jgf59nw0b2w9qivyg145954hm6ly54cfgsqrdas"))
4789 (modules '((guix build utils)))
4790 (snippet
4791 '(begin
4792 (for-each delete-file
4793 (find-files "." "\\.jar$"))
4794 #t))))
4795 (build-system ant-build-system)
4796 (arguments
4797 `(#:build-target "jar"
4798 #:tests? #f; No test file
4799 #:modules ((guix build ant-build-system)
4800 (guix build utils)
4801 (guix build java-utils)
4802 (sxml simple))
4803 #:phases
4804 (modify-phases %standard-phases
4805 (add-before 'build 'create-properties
4806 (lambda _
4807 ;; This file is missing from the distribution
4808 (call-with-output-file "build-properties.xml"
4809 (lambda (port)
4810 (sxml->xml
4811 `(project (@ (basedir ".") (name "build-properties") (default ""))
4812 (property (@ (name "project.name") (value "bsf")))
4813 (property (@ (name "source.level") (value "1.5")))
4814 (property (@ (name "build.lib") (value "build/jar")))
4815 (property (@ (name "src.dir") (value "src")))
4816 (property (@ (name "tests.dir") (value "src/org/apache/bsf/test")))
4817 (property (@ (name "build.tests") (value "build/test-classes")))
4818 (property (@ (name "build.dest") (value "build/classes"))))
2c8ac364
MW
4819 port)))
4820 #t))
afb13a10
JL
4821 (replace 'install (install-jars "build")))))
4822 (native-inputs
4823 `(("java-junit" ,java-junit)))
4824 (inputs
4825 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
4826 (home-page "https://commons.apache.org/proper/commons-bsf")
4827 (synopsis "Bean Scripting Framework")
4828 (description "The Bean Scripting Framework (BSF) is a set of Java classes
4829which provides scripting language support within Java applications, and access
4830to Java objects and methods from scripting languages. BSF allows one to write
4831JSPs in languages other than Java while providing access to the Java class
4832library. In addition, BSF permits any Java application to be implemented in
4833part (or dynamically extended) by a language that is embedded within it. This
4834is achieved by providing an API that permits calling scripting language engines
4835from within Java, as well as an object registry that exposes Java objects to
4836these scripting language engines.")
4837 (license license:asl2.0)))
4838
66006fe5
JL
4839(define-public java-commons-jxpath
4840 (package
4841 (name "java-commons-jxpath")
4842 (version "1.3")
4843 (source (origin
4844 (method url-fetch)
4845 (uri (string-append "mirror://apache/commons/jxpath/source/"
4846 "commons-jxpath-" version "-src.tar.gz"))
4847 (sha256
4848 (base32
4849 "1rpgg31ayn9fwr4bfi2i1ij0npcg79ad2fv0w9hacvawsyc42cfs"))))
4850 (build-system ant-build-system)
4851 (arguments
4852 `(#:jar-name "commons-jxpath.jar"
4853 ;; tests require more dependencies, including mockrunner which depends on old software
4854 #:tests? #f
4855 #:source-dir "src/java"))
4856 (inputs
10eddaca 4857 `(("servlet" ,java-classpathx-servletapi)
66006fe5
JL
4858 ("java-jdom" ,java-jdom)
4859 ("java-commons-beanutils" ,java-commons-beanutils)))
4860 (native-inputs
4861 `(("java-junit" ,java-junit)))
4862 (home-page "http://commons.apache.org/jxpath/")
4863 (synopsis "Simple interpreter of an expression language called XPath.")
4864 (description "The org.apache.commons.jxpath package defines a simple
4865interpreter of an expression language called XPath. JXPath applies XPath
4866expressions to graphs of objects of all kinds: JavaBeans, Maps, Servlet
4867contexts, DOM etc, including mixtures thereof.")
4868 (license license:asl2.0)))
4869
a1a5ef20
JL
4870(define-public java-jsr250
4871 (package
4872 (name "java-jsr250")
4873 (version "1.3")
4874 (source (origin
4875 (method url-fetch)
4876 (uri (string-append "https://repo1.maven.org/maven2/"
4877 "javax/annotation/javax.annotation-api/"
4878 version "/javax.annotation-api-"
4879 version "-sources.jar"))
4880 (sha256
4881 (base32
4882 "08clh8n4n9wfglf75qsqfjs6yf79f7x6hqx38cn856pksszv50kz"))))
4883 (build-system ant-build-system)
4884 (arguments
4885 `(#:tests? #f ; no tests included
4886 #:jdk ,icedtea-8
4887 #:jar-name "jsr250.jar"))
4888 (home-page "https://jcp.org/en/jsr/detail?id=250")
4889 (synopsis "Security-related annotations")
4890 (description "This package provides annotations for security. It provides
4891packages in the @code{javax.annotation} and @code{javax.annotation.security}
4892namespaces.")
4893 ;; either cddl or gpl2 only, with classpath exception
4894 (license (list license:cddl1.0
4895 license:gpl2))))
4896
0d4a0d60
RW
4897(define-public java-jsr305
4898 (package
4899 (name "java-jsr305")
4900 (version "3.0.1")
4901 (source (origin
4902 (method url-fetch)
4903 (uri (string-append "https://repo1.maven.org/maven2/"
4904 "com/google/code/findbugs/"
4905 "jsr305/" version "/jsr305-"
4906 version "-sources.jar"))
4907 (sha256
4908 (base32
4909 "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n"))))
4910 (build-system ant-build-system)
4911 (arguments
4912 `(#:tests? #f ; no tests included
4913 #:jar-name "jsr305.jar"))
4914 (home-page "http://findbugs.sourceforge.net/")
4915 (synopsis "Annotations for the static analyzer called findbugs")
4916 (description "This package provides annotations for the findbugs package.
4917It provides packages in the @code{javax.annotations} namespace.")
4918 (license license:asl2.0)))
4919
4f3e47ea
RW
4920(define-public java-guava
4921 (package
4922 (name "java-guava")
4923 ;; This is the last release of Guava that can be built with Java 7.
4924 (version "20.0")
4925 (source (origin
4926 (method url-fetch)
4927 (uri (string-append "https://github.com/google/guava/"
4928 "releases/download/v" version
4929 "/guava-" version "-sources.jar"))
4930 (sha256
4931 (base32
4932 "1gawrs5gi6j5hcfxdgpnfli75vb9pfi4sn09pnc8xacr669yajwr"))))
4933 (build-system ant-build-system)
4934 (arguments
4935 `(#:tests? #f ; no tests included
4936 #:jar-name "guava.jar"
4937 #:phases
4938 (modify-phases %standard-phases
4939 (add-after 'unpack 'trim-sources
4940 (lambda _
4941 (with-directory-excursion "src/com/google/common"
4942 ;; Remove annotations to avoid extra dependencies:
4943 ;; * "j2objc" annotations are used when converting Java to
4944 ;; Objective C;
4945 ;; * "errorprone" annotations catch common Java mistakes at
4946 ;; compile time;
4947 ;; * "IgnoreJRERequirement" is used for Android.
4948 (substitute* (find-files "." "\\.java$")
4949 (("import com.google.j2objc.*") "")
4950 (("import com.google.errorprone.annotation.*") "")
4951 (("import org.codehaus.mojo.animal_sniffer.*") "")
4952 (("@CanIgnoreReturnValue") "")
4953 (("@LazyInit") "")
4954 (("@WeakOuter") "")
4955 (("@RetainedWith") "")
4956 (("@Weak") "")
4957 (("@ForOverride") "")
4958 (("@J2ObjCIncompatible") "")
4959 (("@IgnoreJRERequirement") "")))
4960 #t)))))
4961 (inputs
4962 `(("java-jsr305" ,java-jsr305)))
4963 (home-page "https://github.com/google/guava")
4964 (synopsis "Google core libraries for Java")
4965 (description "Guava is a set of core libraries that includes new
4966collection types (such as multimap and multiset), immutable collections, a
4967graph library, functional types, an in-memory cache, and APIs/utilities for
4968concurrency, I/O, hashing, primitives, reflection, string processing, and much
4969more!")
4970 (license license:asl2.0)))
4971
af8f8281
RW
4972;; The java-commons-logging package provides adapters to many different
4973;; logging frameworks. To avoid an excessive dependency graph we try to build
4974;; it with only a minimal set of adapters.
4975(define-public java-commons-logging-minimal
4976 (package
4977 (name "java-commons-logging-minimal")
4978 (version "1.2")
4979 (source (origin
4980 (method url-fetch)
4981 (uri (string-append "mirror://apache/commons/logging/source/"
4982 "commons-logging-" version "-src.tar.gz"))
4983 (sha256
4984 (base32
4985 "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9"))))
4986 (build-system ant-build-system)
4987 (arguments
4988 `(#:tests? #f ; avoid dependency on logging frameworks
4989 #:jar-name "commons-logging-minimal.jar"
4990 #:phases
4991 (modify-phases %standard-phases
4992 (add-after 'unpack 'delete-adapters-and-tests
4993 (lambda _
4994 ;; Delete all adapters except for NoOpLog, SimpleLog, and
4995 ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl
4996 ;; is used by applications; SimpleLog is the only actually usable
4997 ;; implementation that does not depend on another logging
4998 ;; framework.
4999 (for-each
5000 (lambda (file)
5001 (delete-file (string-append
5002 "src/main/java/org/apache/commons/logging/impl/" file)))
5003 (list "Jdk13LumberjackLogger.java"
5004 "WeakHashtable.java"
5005 "Log4JLogger.java"
5006 "ServletContextCleaner.java"
5007 "Jdk14Logger.java"
5008 "AvalonLogger.java"
5009 "LogKitLogger.java"))
5010 (delete-file-recursively "src/test")
5011 #t)))))
5012 (home-page "http://commons.apache.org/logging/")
5013 (synopsis "Common API for logging implementations")
5014 (description "The Logging package is a thin bridge between different
5015logging implementations. A library that uses the commons-logging API can be
5016used with any logging implementation at runtime.")
5017 (license license:asl2.0)))
5018
90e65abe
RW
5019;; This is the last release of the 1.x series.
5020(define-public java-mockito-1
5021 (package
5022 (name "java-mockito")
5023 (version "1.10.19")
5024 (source (origin
5025 (method url-fetch)
5026 (uri (string-append "http://repo1.maven.org/maven2/"
5027 "org/mockito/mockito-core/" version
5028 "/mockito-core-" version "-sources.jar"))
5029 (sha256
5030 (base32
5031 "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc"))))
5032 (build-system ant-build-system)
5033 (arguments
5034 `(#:jar-name "mockito.jar"
5035 #:tests? #f ; no tests included
5036 ;; FIXME: patch-and-repack does not support jars, so we have to apply
5037 ;; patches in build phases.
5038 #:phases
5039 (modify-phases %standard-phases
5040 ;; Mockito was developed against a different version of hamcrest,
5041 ;; which does not require matcher implementations to provide an
5042 ;; implementation of the "describeMismatch" method. We add this
5043 ;; simple definition to pass the build with our version of hamcrest.
5044 (add-after 'unpack 'fix-hamcrest-build-error
5045 (lambda _
5046 (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java"
5047 (("public Matcher getActualMatcher\\(\\) .*" line)
5048 (string-append "
5049 public void describeMismatch(Object item, Description description) {
5050 actualMatcher.describeMismatch(item, description);
5051 }"
5052 line)))
5053 #t))
5054 ;; Mockito bundles cglib. We have a cglib package, so let's use
5055 ;; that instead.
5056 (add-after 'unpack 'use-system-libraries
5057 (lambda _
5058 (with-directory-excursion "src/org/mockito/internal/creation/cglib"
5059 (substitute* '("CGLIBHacker.java"
5060 "CglibMockMaker.java"
5061 "ClassImposterizer.java"
5062 "DelegatingMockitoMethodProxy.java"
5063 "MethodInterceptorFilter.java"
5064 "MockitoNamingPolicy.java"
5065 "SerializableMockitoMethodProxy.java"
5066 "SerializableNoOp.java")
5067 (("import org.mockito.cglib") "import net.sf.cglib")))
5068 #t)))))
5069 (inputs
5070 `(("java-junit" ,java-junit)
5071 ("java-objenesis" ,java-objenesis)
5072 ("java-cglib" ,java-cglib)
5073 ("java-hamcrest-core" ,java-hamcrest-core)))
5074 (home-page "http://mockito.org")
5075 (synopsis "Mockito is a mock library for Java")
5076 (description "Mockito is a mocking library for Java which lets you write
5077tests with a clean and simple API. It generates mocks using reflection, and
5078it records all mock invocations, including methods arguments.")
5079 (license license:asl2.0)))
5080
4f4d2e47
RW
5081(define-public java-httpcomponents-httpcore
5082 (package
5083 (name "java-httpcomponents-httpcore")
5084 (version "4.4.6")
5085 (source (origin
5086 (method url-fetch)
5087 (uri (string-append "mirror://apache//httpcomponents/httpcore/"
5088 "source/httpcomponents-core-"
5089 version "-src.tar.gz"))
5090 (sha256
5091 (base32
5092 "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy"))))
5093 (build-system ant-build-system)
5094 (arguments
5095 `(#:jar-name "httpcomponents-httpcore.jar"
5096 #:phases
5097 (modify-phases %standard-phases
5098 (add-after 'unpack 'chdir
5099 (lambda _ (chdir "httpcore") #t)))))
5100 (inputs
5101 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
5102 ("java-commons-lang3" ,java-commons-lang3)))
5103 (native-inputs
5104 `(("java-junit" ,java-junit)
5105 ("java-mockito" ,java-mockito-1)))
5106 (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html")
5107 (synopsis "Low level HTTP transport components")
5108 (description "HttpCore is a set of low level HTTP transport components
5109that can be used to build custom client and server side HTTP services with a
5110minimal footprint. HttpCore supports two I/O models: blocking I/O model based
5111on the classic Java I/O and non-blocking, event driven I/O model based on Java
5112NIO.
5113
5114This package provides the blocking I/O model library.")
5115 (license license:asl2.0)))
5116
3a068b43
RW
5117(define-public java-httpcomponents-httpcore-nio
5118 (package (inherit java-httpcomponents-httpcore)
5119 (name "java-httpcomponents-httpcore-nio")
5120 (arguments
5121 `(#:jar-name "httpcomponents-httpcore-nio.jar"
5122 #:phases
5123 (modify-phases %standard-phases
5124 (add-after 'unpack 'chdir
5125 (lambda _ (chdir "httpcore-nio") #t)))))
5126 (inputs
5127 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5128 ("java-hamcrest-core" ,java-hamcrest-core)
5129 ,@(package-inputs java-httpcomponents-httpcore)))
5130 (description "HttpCore is a set of low level HTTP transport components
5131that can be used to build custom client and server side HTTP services with a
5132minimal footprint. HttpCore supports two I/O models: blocking I/O model based
5133on the classic Java I/O and non-blocking, event driven I/O model based on Java
5134NIO.
5135
5136This package provides the non-blocking I/O model library based on Java
5137NIO.")))
5138
e1dd78f6
RW
5139(define-public java-httpcomponents-httpcore-ab
5140 (package (inherit java-httpcomponents-httpcore)
5141 (name "java-httpcomponents-httpcore-ab")
5142 (arguments
5143 `(#:jar-name "httpcomponents-httpcore-ab.jar"
5144 #:phases
5145 (modify-phases %standard-phases
5146 (add-after 'unpack 'chdir
5147 (lambda _ (chdir "httpcore-ab") #t)))))
5148 (inputs
5149 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5150 ("java-commons-cli" ,java-commons-cli)
5151 ("java-hamcrest-core" ,java-hamcrest-core)
5152 ,@(package-inputs java-httpcomponents-httpcore)))
5153 (synopsis "Apache HttpCore benchmarking tool")
5154 (description "This package provides the HttpCore benchmarking tool. It is
5155an Apache AB clone based on HttpCore.")))
5156
14a671d8
RW
5157(define-public java-httpcomponents-httpclient
5158 (package
5159 (name "java-httpcomponents-httpclient")
5160 (version "4.5.3")
5161 (source (origin
5162 (method url-fetch)
5163 (uri (string-append "mirror://apache/httpcomponents/httpclient/"
5164 "source/httpcomponents-client-"
5165 version "-src.tar.gz"))
5166 (sha256
5167 (base32
5168 "1428399s7qy3cim5wc6f3ks4gl9nf9vkjpfmnlap3jflif7g2pj1"))))
5169 (build-system ant-build-system)
5170 (arguments
5171 `(#:jar-name "httpcomponents-httpclient.jar"
5172 #:phases
5173 (modify-phases %standard-phases
5174 (add-after 'unpack 'chdir
5175 (lambda _ (chdir "httpclient") #t)))))
5176 (inputs
5177 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
5178 ("java-commons-codec" ,java-commons-codec)
5179 ("java-hamcrest-core" ,java-hamcrest-core)
5180 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5181 ("java-mockito" ,java-mockito-1)
5182 ("java-junit" ,java-junit)))
5183 (home-page "https://hc.apache.org/httpcomponents-client-ga/")
5184 (synopsis "HTTP client library for Java")
5185 (description "Although the @code{java.net} package provides basic
5186functionality for accessing resources via HTTP, it doesn't provide the full
5187flexibility or functionality needed by many applications. @code{HttpClient}
5188seeks to fill this void by providing an efficient, up-to-date, and
5189feature-rich package implementing the client side of the most recent HTTP
5190standards and recommendations.")
5191 (license license:asl2.0)))
5192
cbce5de2
RW
5193(define-public java-httpcomponents-httpmime
5194 (package (inherit java-httpcomponents-httpclient)
5195 (name "java-httpcomponents-httpmime")
5196 (arguments
5197 `(#:jar-name "httpcomponents-httpmime.jar"
5198 #:phases
5199 (modify-phases %standard-phases
5200 (add-after 'unpack 'chdir
5201 (lambda _ (chdir "httpmime") #t)))))
5202 (inputs
5203 `(("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient)
5204 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5205 ("java-junit" ,java-junit)
5206 ("java-hamcrest-core" ,java-hamcrest-core)))))
5207
4b34c21f
RW
5208(define-public java-commons-net
5209 (package
5210 (name "java-commons-net")
5211 (version "3.6")
5212 (source (origin
5213 (method url-fetch)
5214 (uri (string-append "mirror://apache/commons/net/source/"
5215 "commons-net-" version "-src.tar.gz"))
5216 (sha256
5217 (base32
5218 "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr"))))
5219 (build-system ant-build-system)
5220 (arguments
5221 `(;; FIXME: MainTest.java tries to read "examples.properties" (which
5222 ;; should be "resources/examples/examples.properties"), but gets "null"
5223 ;; instead.
5224 #:tests? #f
5225 #:jar-name "commons-net.jar"))
5226 (native-inputs
5227 `(("java-junit" ,java-junit)
5228 ("java-hamcrest-core" ,java-hamcrest-core)))
5229 (home-page "http://commons.apache.org/net/")
5230 (synopsis "Client library for many basic Internet protocols")
5231 (description "The Apache Commons Net library implements the client side of
5232many basic Internet protocols. The purpose of the library is to provide
5233fundamental protocol access, not higher-level abstractions.")
5234 (license license:asl2.0)))
5235
808cb58f
RW
5236(define-public java-jsch
5237 (package
5238 (name "java-jsch")
5239 (version "0.1.54")
5240 (source (origin
5241 (method url-fetch)
5242 (uri (string-append "mirror://sourceforge/jsch/jsch/"
5243 version "/jsch-" version ".zip"))
5244 (sha256
5245 (base32
5246 "029rdddyq1mh3ghryh3ki99kba1xkf1d1swjv2vi6lk6zzjy2wdb"))))
5247 (build-system ant-build-system)
5248 (arguments
5249 `(#:build-target "dist"
5250 #:tests? #f ; no tests included
5251 #:phases
5252 (modify-phases %standard-phases
5253 (replace 'install (install-jars "dist")))))
5254 (native-inputs
5255 `(("unzip" ,unzip)))
5256 (home-page "http://www.jcraft.com/jsch/")
5257 (synopsis "Pure Java implementation of SSH2")
5258 (description "JSch is a pure Java implementation of SSH2. JSch allows you
5259to connect to an SSH server and use port forwarding, X11 forwarding, file
5260transfer, etc., and you can integrate its functionality into your own Java
5261programs.")
5262 (license license:bsd-3)))
5263
a6244698
RW
5264(define-public java-commons-compress
5265 (package
5266 (name "java-commons-compress")
5267 (version "1.13")
5268 (source (origin
5269 (method url-fetch)
5270 (uri (string-append "mirror://apache/commons/compress/source/"
5271 "commons-compress-" version "-src.tar.gz"))
5272 (sha256
5273 (base32
5274 "1vjqvavrn0babffn1kciz6v52ibwq2vwhzlb95hazis3lgllnxc8"))))
5275 (build-system ant-build-system)
5276 (arguments
5277 `(#:jar-name "commons-compress.jar"
5278 #:phases
5279 (modify-phases %standard-phases
5280 (add-after 'unpack 'delete-bad-tests
5281 (lambda _
5282 (with-directory-excursion "src/test/java/org/apache/commons/compress/"
5283 ;; FIXME: These tests really should not fail. Maybe they are
5284 ;; indicative of problems with our Java packaging work.
5285
5286 ;; This test fails with a null pointer exception.
5287 (delete-file "archivers/sevenz/SevenZOutputFileTest.java")
5288 ;; This test fails to open test resources.
5289 (delete-file "archivers/zip/ExplodeSupportTest.java")
5290
5291 ;; FIXME: This test adds a dependency on powermock, which is hard to
5292 ;; package at this point.
5293 ;; https://github.com/powermock/powermock
5294 (delete-file "archivers/sevenz/SevenZNativeHeapTest.java"))
5295 #t)))))
5296 (inputs
5297 `(("java-junit" ,java-junit)
5298 ("java-hamcrest-core" ,java-hamcrest-core)
5299 ("java-mockito" ,java-mockito-1)
5300 ("java-xz" ,java-xz)))
5301 (home-page "https://commons.apache.org/proper/commons-compress/")
5302 (synopsis "Java library for working with compressed files")
5303 (description "The Apache Commons Compress library defines an API for
5304working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ,
5305Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.")
5306 (license license:asl2.0)))
5307
51263ff5
JL
5308(define-public java-commons-csv
5309 (package
5310 (name "java-commons-csv")
5311 (version "1.4")
5312 (source (origin
5313 (method url-fetch)
5314 (uri (string-append "mirror://apache/commons/csv/source/"
5315 "commons-csv-" version "-src.tar.gz"))
5316 (sha256
5317 (base32
5318 "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij"))))
5319 (build-system ant-build-system)
5320 (arguments
5321 `(#:jar-name "commons-csv.jar"
5322 #:source-dir "src/main/java"
5323 #:tests? #f)); FIXME: requires java-h2
5324 (inputs
5325 `(("java-hamcrest-core" ,java-hamcrest-core)
5326 ("java-commons-io" ,java-commons-io)
5327 ("java-commons-lang3" ,java-commons-lang3)
5328 ("junit" ,java-junit)))
5329 (home-page "https://commons.apache.org/proper/commons-csv/")
5330 (synopsis "Read and write CSV documents")
5331 (description "Commons CSV reads and writes files in variations of the Comma
5332Separated Value (CSV) format. The most common CSV formats are predefined in the
5333CSVFormat class:
5334
5335@itemize
5336@item Microsoft Excel
5337@item Informix UNLOAD
5338@item Informix UNLOAD CSV
5339@item MySQL
5340@item RFC 4180
5341@item TDF
5342@end itemize
5343
5344Custom formats can be created using a fluent style API.")
5345 (license license:asl2.0)))
5346
6ee6d0b5
RW
5347(define-public java-osgi-annotation
5348 (package
5349 (name "java-osgi-annotation")
5350 (version "6.0.0")
5351 (source (origin
5352 (method url-fetch)
5353 (uri (string-append "https://repo1.maven.org/maven2/"
5354 "org/osgi/org.osgi.annotation/" version "/"
5355 "org.osgi.annotation-" version "-sources.jar"))
5356 (sha256
5357 (base32
5358 "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w"))))
5359 (build-system ant-build-system)
5360 (arguments
5361 `(#:tests? #f ; no tests
5362 #:jar-name "osgi-annotation.jar"))
c353d014 5363 (home-page "https://www.osgi.org")
6ee6d0b5
RW
5364 (synopsis "Annotation module of OSGi framework")
5365 (description
5366 "OSGi, for Open Services Gateway initiative framework, is a module system
5367and service platform for the Java programming language. This package contains
5368the OSGi annotation module, providing additional services to help dynamic
5369components.")
5370 (license license:asl2.0)))
5371
37e2e5d4
RW
5372(define-public java-osgi-core
5373 (package
5374 (name "java-osgi-core")
5375 (version "6.0.0")
5376 (source (origin
5377 (method url-fetch)
5378 (uri (string-append "https://repo1.maven.org/maven2/"
5379 "org/osgi/org.osgi.core/" version "/"
5380 "org.osgi.core-" version "-sources.jar"))
5381 (sha256
5382 (base32
5383 "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv"))))
5384 (build-system ant-build-system)
5385 (arguments
5386 `(#:tests? #f ; no tests
5387 #:jar-name "osgi-core.jar"))
5388 (inputs
5389 `(("java-osgi-annotation" ,java-osgi-annotation)))
c353d014 5390 (home-page "https://www.osgi.org")
37e2e5d4
RW
5391 (synopsis "Core module of OSGi framework")
5392 (description
5393 "OSGi, for Open Services Gateway initiative framework, is a module system
5394and service platform for the Java programming language. This package contains
5395the OSGi Core module.")
5396 (license license:asl2.0)))
5397
8af92c8f
RW
5398(define-public java-osgi-service-event
5399 (package
5400 (name "java-osgi-service-event")
5401 (version "1.3.1")
5402 (source (origin
5403 (method url-fetch)
5404 (uri (string-append "https://repo1.maven.org/maven2/"
5405 "org/osgi/org.osgi.service.event/"
5406 version "/org.osgi.service.event-"
5407 version "-sources.jar"))
5408 (sha256
5409 (base32
5410 "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm"))))
5411 (build-system ant-build-system)
5412 (arguments
5413 `(#:tests? #f ; no tests
5414 #:jar-name "osgi-service-event.jar"))
5415 (inputs
5416 `(("java-osgi-annotation" ,java-osgi-annotation)
5417 ("java-osgi-core" ,java-osgi-core)))
c353d014 5418 (home-page "https://www.osgi.org")
8af92c8f
RW
5419 (synopsis "OSGi service event module")
5420 (description
5421 "OSGi, for Open Services Gateway initiative framework, is a module system
5422and service platform for the Java programming language. This package contains
5423the OSGi @code{org.osgi.service.event} module.")
5424 (license license:asl2.0)))
5425
674e93a0
RW
5426(define-public java-eclipse-osgi
5427 (package
5428 (name "java-eclipse-osgi")
5429 (version "3.11.3")
5430 (source (origin
5431 (method url-fetch)
5432 (uri (string-append "https://repo1.maven.org/maven2/"
5433 "org/eclipse/platform/org.eclipse.osgi/"
5434 version "/org.eclipse.osgi-"
5435 version "-sources.jar"))
5436 (sha256
5437 (base32
5438 "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b"))))
5439 (build-system ant-build-system)
5440 (arguments
5441 `(#:tests? #f ; no tests included
5442 #:jar-name "eclipse-equinox-osgi.jar"))
5443 (inputs
5444 `(("java-osgi-annotation" ,java-osgi-annotation)))
5445 (home-page "http://www.eclipse.org/equinox/")
5446 (synopsis "Eclipse Equinox OSGi framework")
5447 (description "This package provides an implementation of the OSGi Core
5448specification.")
5449 (license license:epl1.0)))
5450
81b55b1e
RW
5451(define-public java-eclipse-equinox-common
5452 (package
5453 (name "java-eclipse-equinox-common")
5454 (version "3.8.0")
5455 (source (origin
5456 (method url-fetch)
5457 (uri (string-append "https://repo1.maven.org/maven2/"
5458 "org/eclipse/platform/org.eclipse.equinox.common/"
5459 version "/org.eclipse.equinox.common-"
5460 version "-sources.jar"))
5461 (sha256
5462 (base32
5463 "12aazpkgw46r1qj0pr421jzwhbmsizd97r37krd7njnbrdgfzksc"))))
5464 (build-system ant-build-system)
5465 (arguments
5466 `(#:tests? #f ; no tests included
5467 #:jar-name "eclipse-equinox-common.jar"))
5468 (inputs
5469 `(("java-eclipse-osgi" ,java-eclipse-osgi)))
5470 (home-page "http://www.eclipse.org/equinox/")
5471 (synopsis "Common Eclipse runtime")
5472 (description "This package provides the common Eclipse runtime.")
5473 (license license:epl1.0)))
5474
90368ad9
RW
5475(define-public java-eclipse-core-jobs
5476 (package
5477 (name "java-eclipse-core-jobs")
5478 (version "3.8.0")
5479 (source (origin
5480 (method url-fetch)
5481 (uri (string-append "https://repo1.maven.org/maven2/"
5482 "org/eclipse/platform/org.eclipse.core.jobs/"
5483 version "/org.eclipse.core.jobs-"
5484 version "-sources.jar"))
5485 (sha256
5486 (base32
5487 "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b"))))
5488 (build-system ant-build-system)
5489 (arguments
5490 `(#:tests? #f ; no tests included
5491 #:jar-name "eclipse-core-jobs.jar"))
5492 (inputs
5493 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5494 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5495 (home-page "http://www.eclipse.org/equinox/")
5496 (synopsis "Eclipse jobs mechanism")
5497 (description "This package provides the Eclipse jobs mechanism.")
5498 (license license:epl1.0)))
5499
fbaf09eb
RW
5500(define-public java-eclipse-equinox-registry
5501 (package
5502 (name "java-eclipse-equinox-registry")
5503 (version "3.6.100")
5504 (source (origin
5505 (method url-fetch)
5506 (uri (string-append "https://repo1.maven.org/maven2/"
5507 "org/eclipse/platform/org.eclipse.equinox.registry/"
5508 version "/org.eclipse.equinox.registry-"
5509 version "-sources.jar"))
5510 (sha256
5511 (base32
5512 "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k"))))
5513 (build-system ant-build-system)
5514 (arguments
5515 `(#:tests? #f ; no tests included
5516 #:jar-name "eclipse-equinox-registry.jar"))
5517 (inputs
5518 `(("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5519 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5520 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5521 (home-page "http://www.eclipse.org/equinox/")
5522 (synopsis "Eclipse extension registry support")
5523 (description "This package provides support for the Eclipse extension
5524registry.")
5525 (license license:epl1.0)))
5526
65214c87
RW
5527(define-public java-eclipse-equinox-app
5528 (package
5529 (name "java-eclipse-equinox-app")
5530 (version "1.3.400")
5531 (source (origin
5532 (method url-fetch)
5533 (uri (string-append "https://repo1.maven.org/maven2/"
5534 "org/eclipse/platform/org.eclipse.equinox.app/"
5535 version "/org.eclipse.equinox.app-"
5536 version "-sources.jar"))
5537 (sha256
5538 (base32
5539 "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab"))))
5540 (build-system ant-build-system)
5541 (arguments
5542 `(#:tests? #f ; no tests included
5543 #:jar-name "eclipse-equinox-app.jar"))
5544 (inputs
5545 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5546 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5547 ("java-eclipse-osgi" ,java-eclipse-osgi)
5548 ("java-osgi-service-event" ,java-osgi-service-event)))
5549 (home-page "http://www.eclipse.org/equinox/")
5550 (synopsis "Equinox application container")
5551 (description "This package provides the Equinox application container for
5552Eclipse.")
5553 (license license:epl1.0)))
5554
3f970214
RW
5555(define-public java-eclipse-equinox-preferences
5556 (package
5557 (name "java-eclipse-equinox-preferences")
5558 (version "3.6.1")
5559 (source (origin
5560 (method url-fetch)
5561 (uri (string-append "https://repo1.maven.org/maven2/"
5562 "org/eclipse/platform/org.eclipse.equinox.preferences/"
5563 version "/org.eclipse.equinox.preferences-"
5564 version "-sources.jar"))
5565 (sha256
5566 (base32
5567 "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2"))))
5568 (build-system ant-build-system)
5569 (arguments
5570 `(#:tests? #f ; no tests included
5571 #:jar-name "eclipse-equinox-preferences.jar"))
5572 (inputs
5573 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5574 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5575 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5576 (home-page "http://www.eclipse.org/equinox/")
5577 (synopsis "Eclipse preferences mechanism")
5578 (description "This package provides the Eclipse preferences mechanism with
5579the module @code{org.eclipse.equinox.preferences}.")
5580 (license license:epl1.0)))
5581
4ad3d4f3
RW
5582(define-public java-eclipse-core-contenttype
5583 (package
5584 (name "java-eclipse-core-contenttype")
5585 (version "3.5.100")
5586 (source (origin
5587 (method url-fetch)
5588 (uri (string-append "https://repo1.maven.org/maven2/"
5589 "org/eclipse/platform/org.eclipse.core.contenttype/"
5590 version "/org.eclipse.core.contenttype-"
5591 version "-sources.jar"))
5592 (sha256
5593 (base32
5594 "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi"))))
5595 (build-system ant-build-system)
5596 (arguments
5597 `(#:tests? #f ; no tests included
5598 #:jar-name "eclipse-core-contenttype.jar"))
5599 (inputs
5600 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5601 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5602 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5603 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5604 (home-page "http://www.eclipse.org/")
5605 (synopsis "Eclipse content mechanism")
5606 (description "This package provides the Eclipse content mechanism in the
5607@code{org.eclipse.core.contenttype} module.")
5608 (license license:epl1.0)))
5609
6a7f7e49
RW
5610(define-public java-eclipse-core-runtime
5611 (package
5612 (name "java-eclipse-core-runtime")
5613 (version "3.12.0")
5614 (source (origin
5615 (method url-fetch)
5616 (uri (string-append "https://repo1.maven.org/maven2/"
5617 "org/eclipse/platform/org.eclipse.core.runtime/"
5618 version "/org.eclipse.core.runtime-"
5619 version "-sources.jar"))
5620 (sha256
5621 (base32
5622 "16mkf8jgj35pgzms7w1gyfq0gfm4ixw6c5xbbxzdj1la56c758ya"))))
5623 (build-system ant-build-system)
5624 (arguments
5625 `(#:tests? #f ; no tests included
5626 #:jar-name "eclipse-core-runtime.jar"))
5627 (inputs
5628 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5629 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5630 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
5631 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5632 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5633 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5634 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5635 (home-page "https://www.eclipse.org/")
5636 (synopsis "Eclipse core runtime")
5637 (description "This package provides the Eclipse core runtime with the
5638module @code{org.eclipse.core.runtime}.")
5639 (license license:epl1.0)))
5640
b3806a15
RW
5641(define-public java-eclipse-core-filesystem
5642 (package
5643 (name "java-eclipse-core-filesystem")
5644 (version "1.6.1")
5645 (source (origin
5646 (method url-fetch)
5647 (uri (string-append "https://repo1.maven.org/maven2/"
5648 "org/eclipse/platform/org.eclipse.core.filesystem/"
5649 version "/org.eclipse.core.filesystem-"
5650 version "-sources.jar"))
5651 (sha256
5652 (base32
5653 "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj"))))
5654 (build-system ant-build-system)
5655 (arguments
5656 `(#:tests? #f ; no tests included
5657 #:jar-name "eclipse-core-filesystem.jar"))
5658 (inputs
5659 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5660 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5661 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5662 (home-page "https://www.eclipse.org/")
5663 (synopsis "Eclipse core file system")
5664 (description "This package provides the Eclipse core file system with the
5665module @code{org.eclipse.core.filesystem}.")
5666 (license license:epl1.0)))
5667
e96060de
RW
5668(define-public java-eclipse-core-expressions
5669 (package
5670 (name "java-eclipse-core-expressions")
5671 (version "3.5.100")
5672 (source (origin
5673 (method url-fetch)
5674 (uri (string-append "https://repo1.maven.org/maven2/"
5675 "org/eclipse/platform/org.eclipse.core.expressions/"
5676 version "/org.eclipse.core.expressions-"
5677 version "-sources.jar"))
5678 (sha256
5679 (base32
5680 "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f"))))
5681 (build-system ant-build-system)
5682 (arguments
5683 `(#:tests? #f ; no tests included
5684 #:jar-name "eclipse-core-expressions.jar"))
5685 (inputs
5686 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5687 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5688 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5689 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5690 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5691 (home-page "https://www.eclipse.org/")
5692 (synopsis "Eclipse core expression language")
5693 (description "This package provides the Eclipse core expression language
5694with the @code{org.eclipse.core.expressions} module.")
5695 (license license:epl1.0)))
5696
e8d0f7c8
RW
5697(define-public java-eclipse-core-variables
5698 (package
5699 (name "java-eclipse-core-variables")
5700 (version "3.3.0")
5701 (source (origin
5702 (method url-fetch)
5703 (uri (string-append "https://repo1.maven.org/maven2/"
5704 "org/eclipse/platform/org.eclipse.core.variables/"
5705 version "/org.eclipse.core.variables-"
5706 version "-sources.jar"))
5707 (sha256
5708 (base32
5709 "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy"))))
5710 (build-system ant-build-system)
5711 (arguments
5712 `(#:tests? #f ; no tests included
5713 #:jar-name "eclipse-core-variables.jar"))
5714 (inputs
5715 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5716 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5717 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5718 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5719 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5720 (home-page "https://www.eclipse.org/platform")
5721 (synopsis "Eclipse core variables")
5722 (description "This package provides the Eclipse core variables module
5723@code{org.eclipse.core.variables}.")
5724 (license license:epl1.0)))
5725
7c3d479e
RW
5726(define-public java-eclipse-ant-core
5727 (package
5728 (name "java-eclipse-ant-core")
5729 (version "3.4.100")
5730 (source (origin
5731 (method url-fetch)
5732 (uri (string-append "https://repo1.maven.org/maven2/"
5733 "org/eclipse/platform/org.eclipse.ant.core/"
5734 version "/org.eclipse.ant.core-"
5735 version "-sources.jar"))
5736 (sha256
5737 (base32
5738 "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7"))))
5739 (build-system ant-build-system)
5740 (arguments
5741 `(#:tests? #f ; no tests included
5742 #:jar-name "eclipse-ant-core.jar"))
5743 (inputs
5744 `(("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
5745 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5746 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5747 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5748 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5749 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5750 ("java-eclipse-core-variables" ,java-eclipse-core-variables)
5751 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5752 (home-page "https://www.eclipse.org/platform")
5753 (synopsis "Ant build tool core libraries")
5754 (description "This package provides the ant build tool core libraries with
5755the module @code{org.eclipse.ant.core}.")
5756 (license license:epl1.0)))
5757
6636f638
RW
5758(define-public java-eclipse-core-resources
5759 (package
5760 (name "java-eclipse-core-resources")
5761 (version "3.11.1")
5762 (source (origin
5763 (method url-fetch)
5764 (uri (string-append "https://repo1.maven.org/maven2/"
5765 "org/eclipse/platform/org.eclipse.core.resources/"
5766 version "/org.eclipse.core.resources-"
5767 version "-sources.jar"))
5768 (sha256
5769 (base32
5770 "1hrfxrll6cpcagfksk2na1ypvkcnsp0fk6n3vcsrn97qayf9mx9l"))))
5771 (build-system ant-build-system)
5772 (arguments
5773 `(#:tests? #f ; no tests included
5774 #:jar-name "eclipse-core-resources.jar"))
5775 (inputs
5776 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5777 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5778 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5779 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5780 ("java-eclipse-core-expressions" ,java-eclipse-core-expressions)
5781 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
5782 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5783 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5784 ("java-eclipse-ant-core" ,java-eclipse-ant-core)
5785 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5786 (home-page "https://www.eclipse.org/")
5787 (synopsis "Eclipse core resource management")
5788 (description "This package provides the Eclipse core resource management
5789module @code{org.eclipse.core.resources}.")
5790 (license license:epl1.0)))
5791
afb5858d
RW
5792(define-public java-eclipse-compare-core
5793 (package
5794 (name "java-eclipse-compare-core")
5795 (version "3.6.0")
5796 (source (origin
5797 (method url-fetch)
5798 (uri (string-append "https://repo1.maven.org/maven2/"
5799 "org/eclipse/platform/org.eclipse.compare.core/"
5800 version "/org.eclipse.compare.core-"
5801 version "-sources.jar"))
5802 (sha256
5803 (base32
5804 "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg"))))
5805 (build-system ant-build-system)
5806 (arguments
5807 `(#:tests? #f ; no tests included
5808 #:jar-name "eclipse-compare-core.jar"))
5809 (inputs
5810 `(("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5811 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5812 ("java-eclipse-osgi" ,java-eclipse-osgi)
5813 ("java-icu4j" ,java-icu4j)))
5814 (home-page "https://www.eclipse.org/")
5815 (synopsis "Eclipse core compare support")
5816 (description "This package provides the Eclipse core compare support
5817module @code{org.eclipse.compare.core}.")
5818 (license license:epl1.0)))
5819
1bb191fc
RW
5820(define-public java-eclipse-team-core
5821 (package
5822 (name "java-eclipse-team-core")
5823 (version "3.8.0")
5824 (source (origin
5825 (method url-fetch)
5826 (uri (string-append "https://repo1.maven.org/maven2/"
5827 "org/eclipse/platform/org.eclipse.team.core/"
5828 version "/org.eclipse.team.core-"
5829 version "-sources.jar"))
5830 (sha256
5831 (base32
5832 "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7"))))
5833 (build-system ant-build-system)
5834 (arguments
5835 `(#:tests? #f ; no tests included
5836 #:jar-name "eclipse-team-core.jar"))
5837 (inputs
5838 `(("java-eclipse-compare-core" ,java-eclipse-compare-core)
5839 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5840 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
5841 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5842 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
5843 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5844 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5845 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5846 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5847 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5848 (home-page "https://www.eclipse.org/platform")
5849 (synopsis "Eclipse team support core")
5850 (description "This package provides the Eclipse team support core module
5851@code{org.eclipse.team.core}.")
5852 (license license:epl1.0)))
5853
31342529
RW
5854(define-public java-eclipse-core-commands
5855 (package
5856 (name "java-eclipse-core-commands")
5857 (version "3.8.1")
5858 (source (origin
5859 (method url-fetch)
5860 (uri (string-append "https://repo1.maven.org/maven2/"
5861 "org/eclipse/platform/org.eclipse.core.commands/"
5862 version "/org.eclipse.core.commands-"
5863 version "-sources.jar"))
5864 (sha256
5865 (base32
5866 "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9"))))
5867 (build-system ant-build-system)
5868 (arguments
5869 `(#:tests? #f ; no tests included
5870 #:jar-name "eclipse-core-commands.jar"))
5871 (inputs
5872 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)))
5873 (home-page "https://www.eclipse.org/platform")
5874 (synopsis "Eclipse core commands")
5875 (description "This package provides Eclipse core commands in the module
5876@code{org.eclipse.core.commands}.")
5877 (license license:epl1.0)))
5878
bf96acf7
RW
5879(define-public java-eclipse-text
5880 (package
5881 (name "java-eclipse-text")
5882 (version "3.6.0")
5883 (source (origin
5884 (method url-fetch)
5885 (uri (string-append "https://repo1.maven.org/maven2/"
5886 "org/eclipse/platform/org.eclipse.text/"
5887 version "/org.eclipse.text-"
5888 version "-sources.jar"))
5889 (sha256
5890 (base32
5891 "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1"))))
5892 (build-system ant-build-system)
5893 (arguments
5894 `(#:tests? #f ; no tests included
5895 #:jar-name "eclipse-text.jar"
5896 #:phases
5897 (modify-phases %standard-phases
5898 ;; When creating a new category we must make sure that the new list
5899 ;; matches List<Position>. By default it seems to be too generic
5900 ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>.
5901 ;; Without this we get this error:
5902 ;;
5903 ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376:
5904 ;; error: method put in interface Map<K,V> cannot be applied to given types;
5905 ;; [javac] fPositions.put(category, new ArrayList<>());
5906 ;; [javac] ^
5907 ;; [javac] required: String,List<Position>
5908 ;; [javac] found: String,ArrayList<Object>
5909 ;; [javac] reason: actual argument ArrayList<Object> cannot be converted
5910 ;; to List<Position> by method invocation conversion
5911 ;; [javac] where K,V are type-variables:
5912 ;; [javac] K extends Object declared in interface Map
5913 ;; [javac] V extends Object declared in interface Map
5914 ;;
5915 ;; I don't know if this is a good fix. I suspect it is not, but it
5916 ;; seems to work.
5917 (add-after 'unpack 'fix-compilation-error
5918 (lambda _
5919 (substitute* "src/org/eclipse/jface/text/AbstractDocument.java"
5920 (("Positions.put\\(category, new ArrayList<>\\(\\)\\);")
5921 "Positions.put(category, new ArrayList<Position>());"))
5922 #t)))))
5923 (inputs
5924 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5925 ("java-eclipse-core-commands" ,java-eclipse-core-commands)
5926 ("java-icu4j" ,java-icu4j)))
5927 (home-page "http://www.eclipse.org/platform")
5928 (synopsis "Eclipse text library")
5929 (description "Platform Text is part of the Platform UI project and
5930provides the basic building blocks for text and text editors within Eclipse
5931and contributes the Eclipse default text editor.")
5932 (license license:epl1.0)))
5933
c24d11b7
RW
5934(define-public java-eclipse-jdt-core
5935 (package
5936 (name "java-eclipse-jdt-core")
5937 (version "3.12.3")
5938 (source (origin
5939 (method url-fetch)
5940 (uri (string-append "https://repo1.maven.org/maven2/"
5941 "org/eclipse/jdt/org.eclipse.jdt.core/"
5942 version "/org.eclipse.jdt.core-"
5943 version "-sources.jar"))
5944 (sha256
5945 (base32
5946 "191xw4lc7mjjkprh4ji5vnpjvr5r4zvbpwkriy4bvsjqrz35vh1j"))))
5947 (build-system ant-build-system)
5948 (arguments
5949 `(#:tests? #f ; no tests included
5950 #:jar-name "eclipse-jdt-core.jar"))
5951 (inputs
5952 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5953 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
5954 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5955 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
5956 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5957 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
5958 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5959 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5960 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5961 ("java-eclipse-osgi" ,java-eclipse-osgi)
5962 ("java-eclipse-text" ,java-eclipse-text)))
5963 (home-page "https://www.eclipse.org/jdt")
5964 (synopsis "Java development tools core libraries")
5965 (description "This package provides the core libraries of the Eclipse Java
5966development tools.")
5967 (license license:epl1.0)))
5968
a5cdcf6c
RW
5969(define-public java-javax-mail
5970 (package
5971 (name "java-javax-mail")
5972 (version "1.5.6")
5973 (source (origin
5974 (method url-fetch)
5975 (uri (string-append "https://repo1.maven.org/maven2/"
5976 "com/sun/mail/javax.mail/"
5977 version "/javax.mail-"
5978 version "-sources.jar"))
5979 (sha256
5980 (base32
5981 "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9"))))
5982 (build-system ant-build-system)
5983 (arguments
5984 `(#:tests? #f ; no tests
5985 #:jar-name "javax-mail.jar"))
5986 (home-page "https://javamail.java.net")
5987 (synopsis "Reference implementation of the JavaMail API")
5988 (description
5989 "This package provides versions of the JavaMail API implementation, IMAP,
5990SMTP, and POP3 service providers, some examples, and documentation for the
5991JavaMail API.")
5992 ;; GPLv2 only with "classpath exception".
5993 (license license:gpl2)))
5994
0e660c4d
RW
5995(define-public java-log4j-api
5996 (package
5997 (name "java-log4j-api")
5998 (version "2.4.1")
5999 (source (origin
6000 (method url-fetch)
6001 (uri (string-append "mirror://apache/logging/log4j/" version
6002 "/apache-log4j-" version "-src.tar.gz"))
6003 (sha256
6004 (base32
6005 "0j5p9gik0jysh37nlrckqbky12isy95cpwg2gv5fas1rcdqbraxd"))))
6006 (build-system ant-build-system)
6007 (arguments
6008 `(#:tests? #f ; tests require unpackaged software
6009 #:jar-name "log4j-api.jar"
6010 #:make-flags
6011 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
6012 "/share/java"))
6013 #:phases
6014 (modify-phases %standard-phases
6015 (add-after 'unpack 'enter-dir
6016 (lambda _ (chdir "log4j-api") #t))
6017 ;; FIXME: The tests require additional software that has not been
6018 ;; packaged yet, such as
6019 ;; * org.apache.maven
6020 ;; * org.apache.felix
6021 (add-after 'enter-dir 'delete-tests
6022 (lambda _ (delete-file-recursively "src/test") #t)))))
6023 (inputs
6024 `(("java-osgi-core" ,java-osgi-core)
6025 ("java-hamcrest-core" ,java-hamcrest-core)
6026 ("java-junit" ,java-junit)))
6027 (home-page "http://logging.apache.org/log4j/2.x/")
6028 (synopsis "API module of the Log4j logging framework for Java")
6029 (description
6030 "This package provides the API module of the Log4j logging framework for
6031Java.")
6032 (license license:asl2.0)))
6033
dfef4231
JL
6034(define-public java-log4j-core
6035 (package
6036 (inherit java-log4j-api)
6037 (name "java-log4j-core")
6038 (inputs
6039 `(("java-osgi-core" ,java-osgi-core)
6040 ("java-hamcrest-core" ,java-hamcrest-core)
6041 ("java-log4j-api" ,java-log4j-api)
6042 ("java-mail" ,java-mail)
6043 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
6044 ("java-lmax-disruptor" ,java-lmax-disruptor)
6045 ("java-kafka" ,java-kafka-clients)
6046 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
6047 ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
6048 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
6049 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
6050 ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml)
6051 ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml)
6052 ("java-commons-compress" ,java-commons-compress)
6053 ("java-commons-csv" ,java-commons-csv)
6054 ("java-jeromq" ,java-jeromq)
6055 ("java-junit" ,java-junit)))
6056 (native-inputs
6057 `(("hamcrest" ,java-hamcrest-all)
6058 ("java-commons-io" ,java-commons-io)
6059 ("java-commons-lang3" ,java-commons-lang3)
6060 ("slf4j" ,java-slf4j-api)))
6061 (arguments
6062 `(#:tests? #f ; tests require more dependencies
6063 #:test-dir "src/test"
6064 #:source-dir "src/main/java"
6065 #:jar-name "log4j-core.jar"
6066 #:jdk ,icedtea-8
6067 #:make-flags
6068 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
6069 "/share/java"))
6070 #:phases
6071 (modify-phases %standard-phases
6072 (add-after 'unpack 'enter-dir
6073 (lambda _ (chdir "log4j-core") #t)))))
6074 (synopsis "Core component of the Log4j framework")
6075 (description "This package provides the core component of the Log4j
6076logging framework for Java.")))
6077
2caf873e
JL
6078(define-public java-log4j-1.2-api
6079 (package
6080 (inherit java-log4j-api)
6081 (name "java-log4j-1.2-api")
6082 (arguments
6083 `(#:jar-name "java-log4j-1.2-api.jar"
6084 #:source-dir "log4j-1.2-api/src/main/java"
6085 #:jdk ,icedtea-8
6086 ;; Tests require maven-model (and other maven subprojects), which is a
6087 ;; cyclic dependency.
6088 #:tests? #f))
6089 (inputs
6090 `(("log4j-api" ,java-log4j-api)
6091 ("log4j-core" ,java-log4j-core)
6092 ("osgi-core" ,java-osgi-core)
6093 ("eclipse-osgi" ,java-eclipse-osgi)
6094 ("java-lmax-disruptor" ,java-lmax-disruptor)))))
6095
1c188f4e
HG
6096(define-public java-commons-cli
6097 (package
6098 (name "java-commons-cli")
37602dd8 6099 (version "1.4")
1c188f4e
HG
6100 (source (origin
6101 (method url-fetch)
6102 (uri (string-append "mirror://apache/commons/cli/source/"
6103 "commons-cli-" version "-src.tar.gz"))
6104 (sha256
6105 (base32
37602dd8 6106 "05hgi2z01fqz374y719gl1dxzqvzci5af071zm7vxrjg9vczipm1"))))
1c188f4e
HG
6107 (build-system ant-build-system)
6108 ;; TODO: javadoc
6109 (arguments
6110 `(#:jar-name "commons-cli.jar"))
6111 (native-inputs
6112 `(("java-junit" ,java-junit)
6113 ("java-hamcrest-core" ,java-hamcrest-core)))
6114 (home-page "http://commons.apache.org/cli/")
6115 (synopsis "Command line arguments and options parsing library")
6116 (description "The Apache Commons CLI library provides an API for parsing
6117command line options passed to programs. It is also able to print help
6118messages detailing the options available for a command line tool.
6119
6120Commons CLI supports different types of options:
6121
6122@itemize
6123@item POSIX like options (ie. tar -zxvf foo.tar.gz)
6124@item GNU like long options (ie. du --human-readable --max-depth=1)
6125@item Java like properties (ie. java -Djava.awt.headless=true Foo)
6126@item Short options with value attached (ie. gcc -O2 foo.c)
6127@item long options with single hyphen (ie. ant -projecthelp)
6128@end itemize
6129
6130This is a part of the Apache Commons Project.")
6131 (license license:asl2.0)))
0a8519bc
HG
6132
6133(define-public java-commons-codec
6134 (package
6135 (name "java-commons-codec")
6136 (version "1.10")
6137 (source (origin
6138 (method url-fetch)
6139 (uri (string-append "mirror://apache/commons/codec/source/"
6140 "commons-codec-" version "-src.tar.gz"))
6141 (sha256
6142 (base32
6143 "1w9qg30y4s0x8gnmr2fgj4lyplfn788jqxbcz27lf5kbr6n8xr65"))))
6144 (build-system ant-build-system)
6145 (outputs '("out" "doc"))
6146 (arguments
6147 `(#:test-target "test"
6148 #:make-flags
6149 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
6150 (junit (assoc-ref %build-inputs "java-junit")))
6151 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
6152 (string-append "-Dhamcrest.jar=" hamcrest
6153 "/share/java/hamcrest-core.jar")
6154 ;; Do not append version to jar.
6155 "-Dfinal.name=commons-codec"))
6156 #:phases
6157 (modify-phases %standard-phases
6158 (add-after 'build 'build-javadoc ant-build-javadoc)
6159 (replace 'install (install-jars "dist"))
6160 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
6161 (native-inputs
6162 `(("java-junit" ,java-junit)
6163 ("java-hamcrest-core" ,java-hamcrest-core)))
6164 (home-page "http://commons.apache.org/codec/")
6165 (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs")
6166 (description "The codec package contains simple encoder and decoders for
6167various formats such as Base64 and Hexadecimal. In addition to these widely
6168used encoders and decoders, the codec package also maintains a collection of
6169phonetic encoding utilities.
6170
6171This is a part of the Apache Commons Project.")
6172 (license license:asl2.0)))
7d91c1b9
HG
6173
6174(define-public java-commons-daemon
6175 (package
6176 (name "java-commons-daemon")
6177 (version "1.0.15")
6178 (source (origin
6179 (method url-fetch)
6180 (uri (string-append "mirror://apache/commons/daemon/source/"
6181 "commons-daemon-" version "-src.tar.gz"))
6182 (sha256
6183 (base32
6184 "0ci46kq8jpz084ccwq0mmkahcgsmh20ziclp2jf5i0djqv95gvhi"))))
6185 (build-system ant-build-system)
6186 (arguments
6187 `(#:test-target "test"
6188 #:phases
6189 (modify-phases %standard-phases
6190 (add-after 'build 'build-javadoc ant-build-javadoc)
6191 (replace 'install (install-jars "dist"))
6192 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
6193 (native-inputs
6194 `(("java-junit" ,java-junit)))
6195 (home-page "http://commons.apache.org/daemon/")
6196 (synopsis "Library to launch Java applications as daemons")
6197 (description "The Daemon package from Apache Commons can be used to
6198implement Java applications which can be launched as daemons. For example the
6199program will be notified about a shutdown so that it can perform cleanup tasks
6200before its process of execution is destroyed by the operation system.
6201
6202This package contains the Java library. You will also need the actual binary
6203for your architecture which is provided by the jsvc package.
6204
6205This is a part of the Apache Commons Project.")
6206 (license license:asl2.0)))
9f68e74a 6207
eb270ecf
RW
6208(define-public java-javaewah
6209 (package
6210 (name "java-javaewah")
6211 (version "1.1.6")
6212 (source (origin
6213 (method url-fetch)
6214 (uri (string-append "https://github.com/lemire/javaewah/"
6215 "archive/JavaEWAH-" version ".tar.gz"))
6216 (sha256
6217 (base32
6218 "1n7j1r1h24wlhwv9zdcj6yqjrhma2ixwyzm15l5vrv6yqjs6753b"))))
6219 (build-system ant-build-system)
6220 (arguments `(#:jar-name "javaewah.jar"))
6221 (inputs
6222 `(("java-junit" ,java-junit)
6223 ("java-hamcrest-core" ,java-hamcrest-core)))
6224 (home-page "https://github.com/lemire/javaewah")
6225 (synopsis "Compressed alternative to the Java @code{BitSet} class")
6226 (description "This is a word-aligned compressed variant of the Java
6227@code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like
6228compression scheme. It can be used to implement bitmap indexes.
6229
6230The goal of word-aligned compression is not to achieve the best compression,
6231but rather to improve query processing time. Hence, JavaEWAH tries to save CPU
6232cycles, maybe at the expense of storage. However, the EWAH scheme is always
6233more efficient storage-wise than an uncompressed bitmap (as implemented in the
6234@code{BitSet} class by Sun).")
6235 ;; GPL2.0 derivates are explicitly allowed.
6236 (license license:asl2.0)))
6237
f8e4d022
RW
6238(define-public java-slf4j-api
6239 (package
6240 (name "java-slf4j-api")
6241 (version "1.7.25")
6242 (source (origin
6243 (method url-fetch)
6244 (uri (string-append "https://www.slf4j.org/dist/slf4j-"
6245 version ".tar.gz"))
6246 (sha256
6247 (base32
6248 "13j51sgzmhhdrfa74gkal5zpip7r1440dh7zsi2c8bpb2zs1v8kb"))
6249 (modules '((guix build utils)))
6250 ;; Delete bundled jars.
6251 (snippet
6252 '(begin
6253 (for-each delete-file (find-files "." "\\.jar$"))
6254 #t))))
6255 (build-system ant-build-system)
6256 (arguments
dcf7a8a6 6257 `(#:jar-name "slf4j-api.jar"
f8e4d022 6258 #:source-dir "slf4j-api/src/main"
dcf7a8a6
JL
6259 #:test-dir "slf4j-api/src/test"
6260 #:phases
6261 (modify-phases %standard-phases
6262 (add-after 'build 'regenerate-jar
6263 (lambda _
6264 ;; pom.xml ignores these files in the jar creation process. If we don't,
6265 ;; we get the error "This code should have never made it into slf4j-api.jar"
6266 (delete-file-recursively "build/classes/org/slf4j/impl")
2c8ac364
MW
6267 (invoke "jar" "-cf" "build/jar/slf4j-api.jar" "-C"
6268 "build/classes" ".")))
dcf7a8a6
JL
6269 (add-before 'check 'dont-test-abstract-classes
6270 (lambda _
6271 ;; abstract classes are not meant to be run with junit
6272 (substitute* "build.xml"
6273 (("<include name=\"\\*\\*/\\*Test.java\" />")
6274 (string-append "<include name=\"**/*Test.java\" />"
6275 "<exclude name=\"**/MultithreadedInitializationTest"
2c8ac364
MW
6276 ".java\" />")))
6277 #t)))))
f8e4d022
RW
6278 (inputs
6279 `(("java-junit" ,java-junit)
6280 ("java-hamcrest-core" ,java-hamcrest-core)))
6281 (home-page "https://www.slf4j.org/")
6282 (synopsis "Simple logging facade for Java")
6283 (description "The Simple Logging Facade for Java (SLF4J) serves as a
6284simple facade or abstraction for various logging
6285frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j})
6286allowing the end user to plug in the desired logging framework at deployment
6287time.")
6288 (license license:expat)))
6289
6d047cc4
GB
6290(define java-slf4j-api-bootstrap
6291 (package
6292 (inherit java-slf4j-api)
6293 (name "java-slf4j-api-bootstrap")
6294 (inputs `())
6295 (arguments
6296 (substitute-keyword-arguments (package-arguments java-slf4j-api)
6297 ((#:tests? _ #f) #f)))))
6298
88f256a1
TD
6299(define-public java-slf4j-simple
6300 (package
6301 (name "java-slf4j-simple")
6302 (version "1.7.25")
6303 (source (package-source java-slf4j-api))
6304 (build-system ant-build-system)
6305 (arguments
6306 `(#:jar-name "slf4j-simple.jar"
6307 #:source-dir "slf4j-simple/src/main"
6308 #:test-dir "slf4j-simple/src/test"
6309 #:phases
6310 (modify-phases %standard-phases
6311 ;; The tests need some test classes from slf4j-api
6312 (add-before 'check 'build-slf4j-api-test-helpers
6313 (lambda _
6314 ;; Add current dir to CLASSPATH ...
6315 (setenv "CLASSPATH"
6316 (string-append (getcwd) ":" (getenv "CLASSPATH")))
6317 ;; ... and build test helper classes here:
2c8ac364
MW
6318 (apply invoke
6319 `("javac" "-d" "."
6320 ,@(find-files "slf4j-api/src/test" ".*\\.java"))))))))
88f256a1
TD
6321 (inputs
6322 `(("java-junit" ,java-junit)
6323 ("java-hamcrest-core" ,java-hamcrest-core)
6324 ("java-slf4j-api" ,java-slf4j-api)))
6325 (home-page "https://www.slf4j.org/")
6326 (synopsis "Simple implementation of simple logging facade for Java")
6327 (description "SLF4J binding for the Simple implementation, which outputs
6328all events to System.err. Only messages of level INFO and higher are
6329printed.")
6330 (license license:expat)))
6331
9f68e74a
JL
6332(define-public antlr2
6333 (package
6334 (name "antlr2")
6335 (version "2.7.7")
6336 (source (origin
6337 (method url-fetch)
6338 (uri (string-append "http://www.antlr2.org/download/antlr-"
6339 version ".tar.gz"))
6340 (sha256
6341 (base32
6342 "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5"))
6343 (modules '((guix build utils)))
6344 (snippet
6345 '(begin
6346 (delete-file "antlr.jar")
6347 (substitute* "lib/cpp/antlr/CharScanner.hpp"
6348 (("#include <map>")
6349 (string-append
6d225e89
RW
6350 "#include <map>\n"
6351 "#define EOF (-1)\n"
6352 "#include <strings.h>")))
9f68e74a 6353 (substitute* "configure"
6d225e89
RW
6354 (("/bin/sh") "sh"))
6355 #t))))
9f68e74a
JL
6356 (build-system gnu-build-system)
6357 (arguments
6d225e89 6358 `(#:tests? #f ; no test target
3ad90395
RW
6359 #:imported-modules ((guix build ant-build-system)
6360 (guix build syscalls)
6361 ,@%gnu-build-system-modules)
6362 #:modules (((guix build ant-build-system) #:prefix ant:)
6363 (guix build gnu-build-system)
6364 (guix build utils))
9f68e74a
JL
6365 #:phases
6366 (modify-phases %standard-phases
6367 (add-after 'install 'strip-jar-timestamps
3ad90395 6368 (assoc-ref ant:%standard-phases 'strip-jar-timestamps))
79f6fc0d
JL
6369 (add-before 'configure 'fix-timestamp
6370 (lambda _
6371 (substitute* "configure"
6372 (("^TIMESTAMP.*") "TIMESTAMP=19700101\n"))
6373 #t))
9f68e74a
JL
6374 (add-after 'configure 'fix-bin-ls
6375 (lambda _
3ad90395
RW
6376 (substitute* (find-files "." "Makefile")
6377 (("/bin/ls") "ls"))
6378 #t)))))
9f68e74a
JL
6379 (native-inputs
6380 `(("which" ,which)
6381 ("zip" ,zip)
6382 ("java" ,icedtea "jdk")))
6383 (inputs
6384 `(("java" ,icedtea)))
6385 (home-page "http://www.antlr2.org")
6386 (synopsis "Framework for constructing recognizers, compilers, and translators")
6387 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
6388is a language tool that provides a framework for constructing recognizers,
6389compilers, and translators from grammatical descriptions containing Java, C#,
6390C++, or Python actions. ANTLR provides excellent support for tree construction,
6391tree walking, and translation.")
6392 (license license:public-domain)))
a0f15eff 6393
e44112e1 6394(define-public java-stringtemplate-3
a0f15eff 6395 (package
e44112e1 6396 (name "java-stringtemplate")
a0f15eff
JL
6397 (version "3.2.1")
6398 (source (origin
6399 (method url-fetch)
6400 (uri (string-append "https://github.com/antlr/website-st4/raw/"
6401 "gh-pages/download/stringtemplate-"
6402 version ".tar.gz"))
6403 (sha256
6404 (base32
6405 "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is"))))
6406 (build-system ant-build-system)
6407 (arguments
129d926d 6408 `(#:jar-name (string-append ,name "-" ,version ".jar")
2fcda6d2 6409 #:test-dir "test"
b101b4e8
RW
6410 #:modules ((guix build ant-build-system)
6411 (guix build utils)
6412 (srfi srfi-1))
a0f15eff
JL
6413 #:phases
6414 (modify-phases %standard-phases
2fcda6d2
RW
6415 (add-before 'check 'fix-tests
6416 (lambda _
6417 (substitute* "build.xml"
6418 (("\\$\\{test.home\\}/java")
6419 "${test.home}/org"))
6420 #t))
a0f15eff
JL
6421 (add-before 'build 'generate-grammar
6422 (lambda _
b101b4e8 6423 (with-directory-excursion "src/org/antlr/stringtemplate/language/"
2c8ac364
MW
6424 (for-each (lambda (file)
6425 (format #t "~a\n" file)
6426 (invoke "antlr" file))
6427 '("template.g" "angle.bracket.template.g" "action.g"
6428 "eval.g" "group.g" "interface.g")))
6429 #t)))))
a0f15eff 6430 (native-inputs
2fcda6d2
RW
6431 `(("antlr" ,antlr2)
6432 ("java-junit" ,java-junit)))
a0f15eff
JL
6433 (home-page "http://www.stringtemplate.org")
6434 (synopsis "Template engine to generate formatted text output")
6435 (description "StringTemplate is a java template engine (with ports for C#,
6436Objective-C, JavaScript, Scala) for generating source code, web pages, emails,
6437or any other formatted text output. StringTemplate is particularly good at
6438code generators, multiple site skins, and internationalization / localization.
6439StringTemplate also powers ANTLR.")
6440 (license license:bsd-3)))
4ad8aed7
JL
6441
6442;; antlr3 is partially written using antlr3 grammar files. It also depends on
6443;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar
6444;; files and uses antlr3 at runtime. The latest version requires a recent version
6445;; of antlr3 at runtime.
6446;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3.
6447;; This version of ST4 is sufficient for the latest antlr3.
6448;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build
6449;; the latest ST4 with it. Then we build our final antlr3 that will be linked
6450;; against the latest ST4.
6451;; antlr3.3 still depends on antlr3 to generate some files, so we use an
6452;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses
6453;; only grammar files with the antlr2 syntax.
6454;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3.
6455
64b7efc0 6456(define-public java-stringtemplate
407df789 6457 (package (inherit java-stringtemplate-3)
64b7efc0 6458 (name "java-stringtemplate")
4ad8aed7
JL
6459 (version "4.0.8")
6460 (source (origin
6461 (method url-fetch)
6462 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/"
6463 version ".tar.gz"))
6464 (file-name (string-append name "-" version ".tar.gz"))
6465 (sha256
6466 (base32
6467 "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087"))))
6468 (build-system ant-build-system)
6469 (arguments
6db77c7c
RW
6470 `(#:jar-name (string-append ,name "-" ,version ".jar")
6471 #:tests? #f ; FIXME: tests fail for unknown reasons
6472 #:test-dir "test"
f4aa4cfe
RW
6473 #:modules ((guix build ant-build-system)
6474 (guix build utils)
6475 (srfi srfi-1))
4ad8aed7
JL
6476 #:phases
6477 (modify-phases %standard-phases
6db77c7c
RW
6478 (add-before 'check 'fix-test-target
6479 (lambda _
6480 (substitute* "build.xml"
6481 (("\\$\\{test.home\\}/java") "${test.home}/")
6482 (("\\*Test.java") "Test*.java"))
6483 #t))
4ad8aed7 6484 (add-before 'build 'generate-grammar
f4aa4cfe
RW
6485 (lambda _
6486 (with-directory-excursion "src/org/stringtemplate/v4/compiler/"
2c8ac364
MW
6487 (for-each (lambda (file)
6488 (format #t "~a\n" file)
6489 (invoke "antlr3" file))
6490 '("STParser.g" "Group.g" "CodeGenerator.g")))
6491 #t)))))
4ad8aed7
JL
6492 (inputs
6493 `(("antlr3" ,antlr3-bootstrap)
6494 ("antlr2" ,antlr2)
6db77c7c
RW
6495 ("java-stringtemplate" ,java-stringtemplate-3)
6496 ("java-junit" ,java-junit)))))
4ad8aed7 6497
1345eeb0 6498(define java-stringtemplate-4.0.6
64b7efc0 6499 (package (inherit java-stringtemplate)
1345eeb0 6500 (name "java-stringtemplate")
4ad8aed7
JL
6501 (version "4.0.6")
6502 (source (origin
6503 (method url-fetch)
6504 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-"
6505 version ".tar.gz"))
6506 (file-name (string-append name "-" version ".tar.gz"))
6507 (sha256
6508 (base32
6509 "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp"))))
6510 (inputs
6511 `(("antlr3" ,antlr3-3.3)
6512 ("antlr2" ,antlr2)
e44112e1 6513 ("java-stringtemplate" ,java-stringtemplate-3)))))
4ad8aed7
JL
6514
6515(define-public antlr3
6516 (package
6517 (name "antlr3")
6518 (version "3.5.2")
6519 (source (origin
6520 (method url-fetch)
6521 (uri (string-append "https://github.com/antlr/antlr3/archive/"
6522 version ".tar.gz"))
6523 (file-name (string-append name "-" version ".tar.gz"))
6524 (sha256
6525 (base32
fd75eb6c 6526 "0218v683081lg54z9hvjxinhxd4dqp870jx6n39gslm0bkyi4vd6"))))
4ad8aed7
JL
6527 (build-system ant-build-system)
6528 (arguments
6529 `(#:jar-name (string-append ,name "-" ,version ".jar")
6530 #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3"
6531 #:tests? #f
6532 #:phases
6533 (modify-phases %standard-phases
6534 (add-after 'install 'bin-install
6535 (lambda* (#:key inputs outputs #:allow-other-keys)
6536 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
6537 (bin (string-append (assoc-ref outputs "out") "/bin")))
6538 (mkdir-p bin)
6539 (with-output-to-file (string-append bin "/antlr3")
6540 (lambda _
6541 (display
6542 (string-append "#!" (which "sh") "\n"
6543 "java -cp " jar "/" ,name "-" ,version ".jar:"
6544 (string-concatenate
6545 (find-files (assoc-ref inputs "stringtemplate")
6546 ".*\\.jar"))
6547 ":"
6548 (string-concatenate
6549 (find-files (assoc-ref inputs "stringtemplate4")
6550 ".*\\.jar"))
6551 ":"
6552 (string-concatenate
6553 (find-files (string-append
6554 (assoc-ref inputs "antlr")
6555 "/lib")
6556 ".*\\.jar"))
6557 " org.antlr.Tool $*"))))
2c8ac364
MW
6558 (chmod (string-append bin "/antlr3") #o755))
6559 #t))
4ad8aed7
JL
6560 (add-before 'build 'generate-grammar
6561 (lambda _
6562 (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/")
6563 (for-each (lambda (file)
6564 (display file)
6565 (newline)
2c8ac364 6566 (invoke "antlr3" file))
4ad8aed7
JL
6567 '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g"
6568 "AssignTokenTypesWalker.g"
6569 "ActionTranslator.g" "TreeToNFAConverter.g"
6570 "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g"
6571 "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g"))
6572 (substitute* "ANTLRParser.java"
6573 (("public Object getTree") "public GrammarAST getTree"))
6574 (substitute* "ANTLRv3Parser.java"
6575 (("public Object getTree") "public CommonTree getTree"))
6576 (chdir "../../../../../java")
4ad8aed7
JL
6577 (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java"
6578 (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*;
6579import org.antlr.grammar.v3.ANTLRTreePrinter;"))
6580 (substitute* "org/antlr/tool/ErrorManager.java"
6581 (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") ""))
2c8ac364
MW
6582 (chdir "../../../..")
6583 #t))
4ad8aed7
JL
6584 (add-before 'build 'fix-build-xml
6585 (lambda _
6586 (substitute* "build.xml"
6587 (("<exec") "<copy todir=\"${classes.dir}\">
6588<fileset dir=\"tool/src/main/resources\">
6589<include name=\"**/*.stg\"/>
6590<include name=\"**/*.st\"/>
6591<include name=\"**/*.sti\"/>
6592<include name=\"**/STLexer.tokens\"/>
6593</fileset>
2c8ac364
MW
6594</copy><exec"))
6595 #t)))))
4ad8aed7
JL
6596 (native-inputs
6597 `(("antlr" ,antlr2)
6598 ("antlr3" ,antlr3-bootstrap)))
6599 (inputs
6600 `(("junit" ,java-junit)
e44112e1 6601 ("stringtemplate" ,java-stringtemplate-3)
64b7efc0 6602 ("stringtemplate4" ,java-stringtemplate)))
4ad8aed7 6603 (propagated-inputs
e44112e1 6604 `(("stringtemplate" ,java-stringtemplate-3)
4ad8aed7 6605 ("antlr" ,antlr2)
1345eeb0 6606 ("stringtemplate4" ,java-stringtemplate-4.0.6)))
4ad8aed7
JL
6607 (home-page "http://www.antlr3.org")
6608 (synopsis "Framework for constructing recognizers, compilers, and translators")
6609 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
6610is a language tool that provides a framework for constructing recognizers,
6611compilers, and translators from grammatical descriptions containing Java, C#,
6612C++, or Python actions. ANTLR provides excellent support for tree construction,
6613tree walking, and translation.")
6614 (license license:bsd-3)))
6615
6616(define antlr3-bootstrap
6617 (package
6618 (inherit antlr3)
6619 (name "antlr3-bootstrap")
6620 (native-inputs
6621 `(("antlr" ,antlr2)
6622 ("antlr3" ,antlr3-3.3)))
6623 (inputs
6624 `(("junit" ,java-junit)))))
6625
6626(define antlr3-3.3
6627 (package
6628 (inherit antlr3)
6629 (name "antlr3")
6630 (version "3.3")
6631 (source (origin
6632 (method url-fetch)
6633 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
6634 "gh-pages/download/antlr-"
6635 version ".tar.gz"))
6636 (sha256
6637 (base32
48c86220
GB
6638 "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m"))
6639 (patches
6640 (search-patches "antlr3-3_3-fix-java8-compilation.patch"))))
4ad8aed7
JL
6641 (arguments
6642 `(#:jar-name (string-append ,name "-" ,version ".jar")
a9540107
RW
6643 #:source-dir (string-join '("tool/src/main/java"
6644 "runtime/Java/src/main/java"
6645 "tool/src/main/antlr2"
6646 "tool/src/main/antlr3")
6647 ":")
6648 #:tests? #f ; FIXME: tests seem to require maven plugin
6649 #:modules ((guix build ant-build-system)
6650 (guix build utils)
6651 (srfi srfi-1))
4ad8aed7
JL
6652 #:phases
6653 (modify-phases %standard-phases
6654 (add-after 'install 'bin-install
6655 (lambda* (#:key inputs outputs #:allow-other-keys)
a9540107
RW
6656 (let* ((out (assoc-ref outputs "out"))
6657 (jar (string-append out "/share/java"))
6658 (bin (string-append out "/bin")))
4ad8aed7
JL
6659 (mkdir-p bin)
6660 (with-output-to-file (string-append bin "/antlr3")
6661 (lambda _
6662 (display
a9540107
RW
6663 (string-append
6664 "#!" (which "sh") "\n"
6665 "java -cp " jar "/antlr3-3.3.jar:"
6666 (string-join
6667 (append (find-files (assoc-ref inputs "java-stringtemplate")
6668 ".*\\.jar$")
6669 (find-files (string-append (assoc-ref inputs "antlr")
6670 "/lib")
6671 ".*\\.jar$"))
6672 ":")
6673 " org.antlr.Tool $*"))))
6674 (chmod (string-append bin "/antlr3") #o755)
6675 #t)))
4ad8aed7
JL
6676 (add-before 'build 'generate-grammar
6677 (lambda _
4ad8aed7
JL
6678 (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java"
6679 (("import org.antlr.grammar.v2.\\*;")
6680 "import org.antlr.grammar.v2.*;\n
6681import org.antlr.grammar.v2.TreeToNFAConverter;\n
6682import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n
a9540107 6683import org.antlr.grammar.v2.ANTLRTreePrinter;"))
2c8ac364
MW
6684 (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/"
6685 (for-each (lambda (file)
6686 (format #t "~a\n" file)
6687 (invoke "antlr" file))
6688 '("antlr.g" "antlr.print.g" "assign.types.g"
6689 "buildnfa.g" "codegen.g" "define.g")))
6690 (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/"
6691 (for-each (lambda (file)
6692 (format #t "~a\n" file)
6693 (invoke "antlr3" file))
6694 '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g"
6695 "ANTLRv3Tree.g")))
6696 #t))
4ad8aed7
JL
6697 (add-before 'build 'fix-build-xml
6698 (lambda _
6699 (substitute* "build.xml"
6700 (("<exec") "<copy todir=\"${classes.dir}\">
6701<fileset dir=\"tool/src/main/resources\">
6702<include name=\"**/*.stg\"/>
6703<include name=\"**/*.st\"/>
6704<include name=\"**/*.sti\"/>
6705<include name=\"**/STLexer.tokens\"/>
6706</fileset>
a9540107
RW
6707</copy><exec"))
6708 #t)))))
4ad8aed7
JL
6709 (native-inputs
6710 `(("antlr" ,antlr2)
6711 ("antlr3" ,antlr3-3.1)))
6712 (inputs
6713 `(("junit" ,java-junit)))
6714 (propagated-inputs
e44112e1 6715 `(("java-stringtemplate" ,java-stringtemplate-3)
4ad8aed7
JL
6716 ("antlr" ,antlr2)
6717 ("antlr3" ,antlr3-3.1)))))
6718
6719(define antlr3-3.1
6720 (package
6721 (inherit antlr3)
4ad8aed7
JL
6722 (version "3.1")
6723 (source (origin
6724 (method url-fetch)
6725 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
6726 "gh-pages/download/antlr-"
6727 version ".tar.gz"))
6728 (sha256
6729 (base32
4c763b4d
GB
6730 "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z"))
6731 (patches
6732 (search-patches "antlr3-3_1-fix-java8-compilation.patch"))))
4ad8aed7 6733 (arguments
ec32bc98 6734 `(#:jar-name (string-append "antlr3-" ,version ".jar")
4ad8aed7
JL
6735 #:source-dir "src:runtime/Java/src"
6736 #:tests? #f
6737 #:phases
6738 (modify-phases %standard-phases
6739 (add-after 'install 'bin-install
6740 (lambda* (#:key inputs outputs #:allow-other-keys)
6741 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
6742 (bin (string-append (assoc-ref outputs "out") "/bin")))
6743 (mkdir-p bin)
6744 (with-output-to-file (string-append bin "/antlr3")
6745 (lambda _
6746 (display
6747 (string-append "#!" (which "sh") "\n"
57e37764 6748 "java -cp " jar "/antlr3-3.1.jar:"
4ad8aed7
JL
6749 (string-concatenate
6750 (find-files (assoc-ref inputs "stringtemplate")
6751 ".*\\.jar"))
6752 ":"
6753 (string-concatenate
6754 (find-files (string-append
6755 (assoc-ref inputs "antlr")
6756 "/lib")
6757 ".*\\.jar"))
6758 " org.antlr.Tool $*"))))
2c8ac364
MW
6759 (chmod (string-append bin "/antlr3") #o755))
6760 #t))
4ad8aed7
JL
6761 (add-before 'build 'generate-grammar
6762 (lambda _
6763 (let ((dir "src/org/antlr/tool/"))
6764 (for-each (lambda (file)
6765 (display file)
6766 (newline)
13f38d31 6767 (invoke "antlr" "-o" dir (string-append dir file)))
4ad8aed7
JL
6768 '("antlr.g" "antlr.print.g" "assign.types.g"
6769 "buildnfa.g" "define.g")))
6770 (format #t "codegen.g\n")
13f38d31
RW
6771 (invoke "antlr" "-o" "src/org/antlr/codegen"
6772 "src/org/antlr/codegen/codegen.g")
6773 #t))
4ad8aed7
JL
6774 (add-before 'build 'fix-build-xml
6775 (lambda _
6776 (substitute* "build.xml"
6777 (("<exec") "<copy todir=\"${classes.dir}\">
6778<fileset dir=\"src\">
6779<include name=\"**/*.stg\"/>
6780<include name=\"**/*.st\"/>
6781<include name=\"**/*.sti\"/>
6782<include name=\"**/STLexer.tokens\"/>
6783</fileset>
2c8ac364
MW
6784</copy><exec"))
6785 #t)))))
4ad8aed7
JL
6786 (native-inputs
6787 `(("antlr" ,antlr2)))
6788 (inputs
6789 `(("junit" ,java-junit)))
6790 (propagated-inputs
e44112e1 6791 `(("stringtemplate" ,java-stringtemplate-3)))))
d44bcd7a 6792
742242a5
GB
6793(define-public java-commons-cli-1.2
6794 ;; This is a bootstrap dependency for Maven2.
6795 (package
6796 (inherit java-commons-cli)
6797 (version "1.2")
6798 (source (origin
6799 (method url-fetch)
6800 (uri (string-append "mirror://apache/commons/cli/source/"
6801 "commons-cli-" version "-src.tar.gz"))
6802 (sha256
6803 (base32
6804 "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm"))))
6805 (arguments
6806 `(#:jar-name "commons-cli.jar"
6807 #:phases
6808 (modify-phases %standard-phases
6809 (add-before 'check 'fix-build-xml
6810 (lambda* (#:key inputs #:allow-other-keys)
6811 (substitute* "build.xml"
6812 (("dir=\"\\$\\{test.home\\}/java\"")
6813 "dir=\"${test.home}\""))
6814 #t)))))
6815 (native-inputs
6816 `(("java-junit" ,java-junit)))))
30deadee
JL
6817
6818(define-public java-microemulator-cldc
6819 (package
6820 (name "java-microemulator-cldc")
6821 (version "2.0.4")
6822 (source (origin
6823 (method url-fetch)
6824 (uri (string-append "https://github.com/barteo/microemu/archive/"
6825 "microemulator_"
6826 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
6827 version)
6828 ".tar.gz"))
6829 (file-name (string-append name "-" version ".tar.gz"))
6830 (sha256
6831 (base32
6832 "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll"))))
6833 (build-system ant-build-system)
6834 (arguments
6835 `(#:jar-name "microemulator-cldc.jar"
6836 #:source-dir "microemu-cldc/src/main/java"
6837 #:tests? #f)); Requires even older software
6838 (home-page "https://github.com/barteo/microemu")
6839 (synopsis "J2ME CLDC emulator")
6840 (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP
6841Emulator. It allows to demonstrate MIDlet based applications in web browser
6842applet and can be run as a standalone java application.")
6843 (license (list license:asl2.0
6844 ;; or altenatively:
6845 license:lgpl2.1+))))
8e2f3e5e
JL
6846
6847(define-public java-datanucleus-javax-persistence
6848 (package
6849 (name "java-datanucleus-javax-persistence")
6850 (version "2.2.0")
6851 (source (origin
6852 (method url-fetch)
6853 (uri (string-append "https://github.com/datanucleus/"
6854 "javax.persistence/archive/javax.persistence-"
6855 version "-release.tar.gz"))
6856 (sha256
6857 (base32
6858 "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx"))))
6859 (build-system ant-build-system)
6860 (arguments
6861 `(#:jar-name "java-datanucleus-javax-persistence.jar"
6862 #:jdk ,icedtea-8
6863 #:source-dir "src/main/java"
6864 #:tests? #f)); no tests
6865 (home-page "https://github.com/datanucleus/javax.persistence")
6866 (synopsis "JPA API")
6867 (description "This package contains a clean definition of JPA API intended
6868for use with DataNucleus JPA since the JCP haven't provided an official JPA API
6869jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification
6870used to generate this API.")
6871 (license (list license:edl1.0 license:epl1.0))))
3240ddbf
JL
6872
6873(define-public java-osgi-cmpn
6874 (package
6875 (name "java-osgi-cmpn")
6876 (version "6.0.0")
6877 (source (origin
6878 (method url-fetch)
6879 (uri (string-append "http://central.maven.org/maven2/"
6880 "org/osgi/osgi.cmpn/" version "/osgi.cmpn-"
6881 version "-sources.jar"))
6882 (sha256
6883 (base32
6884 "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys"))))
6885 (build-system ant-build-system)
6886 (arguments
6887 `(#:jar-name "osgi-cmpn.jar"
6888 #:tests? #f)); no tests
6889 (inputs
6890 `(("annotation" ,java-osgi-annotation)
6891 ("core" ,java-osgi-core)
6892 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
6893 ("microemulator" ,java-microemulator-cldc)
6894 ("servlet" ,java-classpathx-servletapi)))
c353d014 6895 (home-page "https://www.osgi.org")
3240ddbf
JL
6896 (synopsis "Compendium specification module of OSGi framework")
6897 (description
6898 "OSGi, for Open Services Gateway initiative framework, is a module system
6899and service platform for the Java programming language. This package contains
6900the compendium specification module, providing interfaces and classes for use
6901in compiling bundles.")
6902 (license license:asl2.0)))
747c7574
JL
6903
6904(define-public java-osgi-service-component-annotations
6905 (package
6906 (name "java-osgi-service-component-annotations")
6907 (version "1.3.0")
6908 (source (origin
6909 (method url-fetch)
6910 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6911 "org.osgi.service.component.annotations/"
6912 version "/org.osgi.service.component.annotations-"
6913 version "-sources.jar"))
6914 (sha256
6915 (base32
6916 "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0"))))
6917 (build-system ant-build-system)
6918 (arguments
6919 `(#:jar-name "osgi-service-component-annotations.jar"
6920 #:tests? #f)); no tests
6921 (inputs
6922 `(("annotation" ,java-osgi-annotation)))
c353d014 6923 (home-page "https://www.osgi.org")
747c7574
JL
6924 (synopsis "Support annotations for osgi-service-component")
6925 (description
6926 "OSGi, for Open Services Gateway initiative framework, is a module system
6927and service platform for the Java programming language. This package contains
6928the support annotations for osgi-service-component.")
6929 (license license:asl2.0)))
999b5fb4
JL
6930
6931(define-public java-osgi-dto
6932 (package
6933 (name "java-osgi-dto")
6934 (version "1.0.0")
6935 (source (origin
6936 (method url-fetch)
6937 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6938 "org.osgi.dto/" version "/org.osgi.dto-"
6939 version "-sources.jar"))
6940 (sha256
6941 (base32
6942 "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr"))))
6943 (build-system ant-build-system)
6944 (arguments
6945 `(#:jar-name "osgi-dto.jar"
6946 #:tests? #f)); no tests
6947 (inputs
6948 `(("annotation" ,java-osgi-annotation)))
c353d014 6949 (home-page "https://www.osgi.org")
999b5fb4
JL
6950 (synopsis "Data Transfer Objects")
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 Data Transfer Objects. It is easily serializable having only public fields
6955of primitive types and their wrapper classes, Strings, and DTOs. List, Set,
6956Map and array aggregates may also be used. The aggregates must only hold
6957objects of the listed types or aggregates.")
6958 (license license:asl2.0)))
c304ce6a
JL
6959
6960(define-public java-osgi-resource
6961 (package
6962 (name "java-osgi-resource")
6963 (version "1.0.0")
6964 (source (origin
6965 (method url-fetch)
6966 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6967 "org.osgi.resource/"
6968 version "/org.osgi.resource-"
6969 version "-sources.jar"))
6970 (sha256
6971 (base32
6972 "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d"))))
6973 (build-system ant-build-system)
6974 (arguments
6975 `(#:jar-name "osgi-resource.jar"
6976 #:tests? #f)); no tests
6977 (inputs
6978 `(("annotation" ,java-osgi-annotation)
6979 ("dto" ,java-osgi-dto)))
c353d014 6980 (home-page "https://www.osgi.org")
c304ce6a
JL
6981 (synopsis "OSGI Resource")
6982 (description
6983 "OSGi, for Open Services Gateway initiative framework, is a module system
6984and service platform for the Java programming language. This package contains
6985the definition of common types in osgi packages.")
6986 (license license:asl2.0)))
c2b14516
JL
6987
6988(define-public java-osgi-namespace-contract
6989 (package
6990 (name "java-osgi-namespace-contract")
6991 (version "1.0.0")
6992 (source (origin
6993 (method url-fetch)
6994 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6995 "org.osgi.namespace.contract/"
6996 version "/org.osgi.namespace.contract-"
6997 version "-sources.jar"))
6998 (sha256
6999 (base32
7000 "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36"))))
7001 (build-system ant-build-system)
7002 (inputs
7003 `(("resource" ,java-osgi-resource)
7004 ("annotation" ,java-osgi-annotation)))
7005 (arguments
7006 `(#:jar-name "osgi-namespace-contract.jar"
7007 #:tests? #f)); no tests
c353d014 7008 (home-page "https://www.osgi.org")
c2b14516
JL
7009 (synopsis "Contract Capability and Requirement Namespace")
7010 (description
7011 "OSGi, for Open Services Gateway initiative framework, is a module system
7012and service platform for the Java programming language. This package contains
7013the names for the attributes and directives for a namespace with contracts.")
7014 (license license:asl2.0)))
f809c963
JL
7015
7016(define-public java-osgi-namespace-extender
7017 (package
7018 (name "java-osgi-namespace-extender")
7019 (version "1.0.1")
7020 (source (origin
7021 (method url-fetch)
7022 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7023 "org.osgi.namespace.extender/"
7024 version "/org.osgi.namespace.extender-"
7025 version "-sources.jar"))
7026 (sha256
7027 (base32
7028 "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz"))))
7029 (build-system ant-build-system)
7030 (inputs
7031 `(("resource" ,java-osgi-resource)
7032 ("annotation" ,java-osgi-annotation)))
7033 (arguments
7034 `(#:jar-name "osgi-namespace-extendent.jar"
7035 #:tests? #f)); no tests
c353d014 7036 (home-page "https://www.osgi.org")
f809c963
JL
7037 (synopsis "Extender Capability and Requirement Namespace")
7038 (description
7039 "OSGi, for Open Services Gateway initiative framework, is a module system
7040and service platform for the Java programming language. This package contains
b784962d
JL
7041the names for the attributes and directives for an extender namespace.")
7042 (license license:asl2.0)))
7043
7044(define-public java-osgi-namespace-service
7045 (package
7046 (name "java-osgi-namespace-service")
7047 (version "1.0.0")
7048 (source (origin
7049 (method url-fetch)
7050 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7051 "org.osgi.namespace.service/"
7052 version "/org.osgi.namespace.service-"
7053 version "-sources.jar"))
7054 (sha256
7055 (base32
7056 "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8"))))
7057 (build-system ant-build-system)
7058 (inputs
7059 `(("resource" ,java-osgi-resource)
7060 ("annotation" ,java-osgi-annotation)))
7061 (arguments
7062 `(#:jar-name "osgi-namespace-service.jar"
7063 #:tests? #f)); no tests
c353d014 7064 (home-page "https://www.osgi.org")
b784962d
JL
7065 (synopsis "Service Capability and Requirement Namespace")
7066 (description
7067 "OSGi, for Open Services Gateway initiative framework, is a module system
7068and service platform for the Java programming language. This package contains
7069the names for the attributes and directives for a service namespace.")
f809c963 7070 (license license:asl2.0)))
0f0c5218
JL
7071
7072(define-public java-osgi-util-function
7073 (package
7074 (name "java-osgi-util-function")
7075 (version "1.0.0")
7076 (source (origin
7077 (method url-fetch)
7078 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7079 "org.osgi.util.function/"
7080 version "/org.osgi.util.function-"
7081 version "-sources.jar"))
7082 (sha256
7083 (base32
7084 "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x"))))
7085 (build-system ant-build-system)
7086 (arguments
7087 `(#:jar-name "osgi-util-function.jar"
7088 #:tests? #f)); no tests
7089 (inputs
7090 `(("annotation" ,java-osgi-annotation)))
c353d014 7091 (home-page "https://www.osgi.org")
0f0c5218
JL
7092 (synopsis "OSGI Util Function")
7093 (description
7094 "OSGi, for Open Services Gateway initiative framework, is a module system
7095and service platform for the Java programming language. This package contains
7096an interface for a function that accepts a single argument and produces a result.")
7097 (license license:asl2.0)))
27103135
JL
7098
7099(define-public java-osgi-util-promise
7100 (package
7101 (name "java-osgi-util-promise")
7102 (version "1.0.0")
7103 (source (origin
7104 (method url-fetch)
7105 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7106 "org.osgi.util.promise/"
7107 version "/org.osgi.util.promise-"
7108 version "-sources.jar"))
7109 (sha256
7110 (base32
7111 "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c"))))
7112 (build-system ant-build-system)
7113 (arguments
7114 `(#:jar-name "osgi-util-promise.jar"
7115 #:tests? #f)); no tests
7116 (inputs
7117 `(("annotation" ,java-osgi-annotation)
7118 ("function" ,java-osgi-util-function)))
c353d014 7119 (home-page "https://www.osgi.org")
27103135
JL
7120 (synopsis "Promise of a value")
7121 (description
7122 "OSGi, for Open Services Gateway initiative framework, is a module system
7123and service platform for the Java programming language. This package contains
7124an interface and utilitary classes for promises. A Promise represents a future
7125value. It handles the interactions for asynchronous processing.")
7126 (license license:asl2.0)))
2b1fdb2b
JL
7127
7128(define-public java-osgi-service-metatype-annotations
7129 (package
7130 (name "java-osgi-service-metatype-annotations")
7131 (version "1.3.0")
7132 (source (origin
7133 (method url-fetch)
7134 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7135 "org.osgi.service.metatype.annotations/"
7136 version "/org.osgi.service.metatype.annotations-"
7137 version "-sources.jar"))
7138 (sha256
7139 (base32
7140 "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6"))))
7141 (build-system ant-build-system)
7142 (arguments
7143 `(#:jar-name "osgi-service-metatype-annotations.jar"
7144 #:tests? #f)); no tests
7145 (inputs
7146 `(("annotation" ,java-osgi-annotation)))
c353d014 7147 (home-page "https://www.osgi.org")
2b1fdb2b
JL
7148 (synopsis "Support annotations for metatype")
7149 (description
7150 "OSGi, for Open Services Gateway initiative framework, is a module system
7151and service platform for the Java programming language. This package contains
7152the support annotations for metatype.")
7153 (license license:asl2.0)))
a13acfbe
JL
7154
7155(define-public java-osgi-service-repository
7156 (package
7157 (name "java-osgi-service-repository")
7158 (version "1.1.0")
7159 (source (origin
7160 (method url-fetch)
7161 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7162 "org.osgi.service.repository/"
7163 version "/org.osgi.service.repository-"
7164 version "-sources.jar"))
7165 (sha256
7166 (base32
7167 "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n"))))
7168 (build-system ant-build-system)
7169 (arguments
7170 `(#:jar-name "osgi-service-repository.jar"
7171 #:tests? #f)); no tests
7172 (inputs
7173 `(("annotation" ,java-osgi-annotation)
7174 ("promise" ,java-osgi-util-promise)
7175 ("resource" ,java-osgi-resource)))
c353d014 7176 (home-page "https://www.osgi.org")
a13acfbe
JL
7177 (synopsis "OSGI service repository")
7178 (description
7179 "OSGi, for Open Services Gateway initiative framework, is a module system
7180and service platform for the Java programming language. This package contains
7181a repository service that contains resources.")
7182 (license license:asl2.0)))
dfd91541
JL
7183
7184(define-public java-osgi-framework
7185 (package
7186 (name "java-osgi-framework")
7187 (version "1.8.0")
7188 (source (origin
7189 (method url-fetch)
7190 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7191 "org.osgi.framework/" version "/org.osgi.framework-"
7192 version "-sources.jar"))
7193 (sha256
7194 (base32
7195 "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s"))))
7196 (build-system ant-build-system)
7197 (arguments
7198 `(#:jar-name "osgi-framework.jar"
7199 #:tests? #f)); no tests
7200 (inputs
7201 `(("annotation" ,java-osgi-annotation)
7202 ("resource" ,java-osgi-resource)
7203 ("dto" ,java-osgi-dto)))
c353d014 7204 (home-page "https://www.osgi.org")
dfd91541
JL
7205 (synopsis "OSGi framework")
7206 (description
7207 "OSGi, for Open Services Gateway initiative framework, is a module system
7208and service platform for the Java programming language.")
7209 (license license:asl2.0)))
98c9f16c
JL
7210
7211(define-public java-osgi-service-log
7212 (package
7213 (name "java-osgi-service-log")
7214 (version "1.3.0")
7215 (source (origin
7216 (method url-fetch)
7217 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7218 "org.osgi.service.log/"
7219 version "/org.osgi.service.log-"
7220 version "-sources.jar"))
7221 (sha256
7222 (base32
7223 "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0"))))
7224 (build-system ant-build-system)
7225 (arguments
7226 `(#:jar-name "osgi-service-log.jar"
7227 #:tests? #f)); no tests
7228 (inputs
7229 `(("java-osgi-framework" ,java-osgi-framework)))
c353d014 7230 (home-page "https://www.osgi.org")
98c9f16c
JL
7231 (synopsis "Provides methods for bundles to write messages to the log")
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
7235the log service.")
7236 (license license:asl2.0)))
dd76d44b
JL
7237
7238(define-public java-osgi-service-jdbc
7239 (package
7240 (name "java-osgi-service-jdbc")
7241 (version "1.0.0")
7242 (source (origin
7243 (method url-fetch)
7244 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7245 "org.osgi.service.jdbc/"
7246 version "/org.osgi.service.jdbc-"
7247 version "-sources.jar"))
7248 (sha256
7249 (base32
7250 "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz"))))
7251 (build-system ant-build-system)
7252 (arguments
7253 `(#:jar-name "osgi-service-jdbc.jar"
7254 #:tests? #f)); no tests
c353d014 7255 (home-page "https://www.osgi.org")
dd76d44b
JL
7256 (synopsis "Factory for JDBC connection factories")
7257 (description
7258 "OSGi, for Open Services Gateway initiative framework, is a module system
7259and service platform for the Java programming language. This package contains
7260a factory for JDBC connection factories. There are 3 preferred connection
7261factories for getting JDBC connections:
7262
7263@itemize
7264@item @code{javax.sql.DataSource};
7265@item @code{javax.sql.ConnectionPoolDataSource};
7266@item @code{javax.sql.XADataSource}.
7267@end itemize")
7268 (license license:asl2.0)))
291d3f22
JL
7269
7270(define-public java-osgi-service-resolver
7271 (package
7272 (name "java-osgi-service-resolver")
7273 (version "1.0.1")
7274 (source (origin
7275 (method url-fetch)
7276 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7277 "org.osgi.service.resolver/"
7278 version "/org.osgi.service.resolver-"
7279 version "-sources.jar"))
7280 (sha256
7281 (base32
7282 "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd"))))
7283 (build-system ant-build-system)
7284 (arguments
7285 `(#:jar-name "osgi-service-resolver.jar"
7286 #:tests? #f)); no tests
7287 (inputs
7288 `(("annotation" ,java-osgi-annotation)
7289 ("resource" ,java-osgi-resource)))
c353d014 7290 (home-page "https://www.osgi.org")
291d3f22
JL
7291 (synopsis "OSGI Resolver service")
7292 (description
7293 "OSGi, for Open Services Gateway initiative framework, is a module system
7294and service platform for the Java programming language. This package contains
7295a resolver service that resolves the specified resources in the context supplied
7296by the caller.")
7297 (license license:asl2.0)))
1884bb81
JL
7298
7299(define-public java-osgi-util-tracker
7300 (package
7301 (name "java-osgi-util-tracker")
7302 (version "1.5.1")
7303 (source (origin
7304 (method url-fetch)
7305 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7306 "org.osgi.util.tracker/"
7307 version "/org.osgi.util.tracker-"
7308 version "-sources.jar"))
7309 (sha256
7310 (base32
7311 "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz"))))
7312 (build-system ant-build-system)
7313 (arguments
7314 `(#:jar-name "osgi-util-tracker.jar"
7315 #:tests? #f)); no tests
7316 (inputs
7317 `(("framework" ,java-osgi-framework)
7318 ("annotation" ,java-osgi-annotation)))
c353d014 7319 (home-page "https://www.osgi.org")
1884bb81
JL
7320 (synopsis "Bundle tracking")
7321 (description
7322 "OSGi, for Open Services Gateway initiative framework, is a module system
7323and service platform for the Java programming language. This package contains
7324bundle tracking utility classes.")
7325 (license license:asl2.0)))
fb9c48b8
JL
7326
7327(define-public java-osgi-service-cm
7328 (package
7329 (name "java-osgi-service-cm")
7330 (version "1.5.0")
7331 (source (origin
7332 (method url-fetch)
7333 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7334 "org.osgi.service.cm/"
7335 version "/org.osgi.service.cm-"
7336 version "-sources.jar"))
7337 (sha256
7338 (base32
7339 "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6"))))
7340 (build-system ant-build-system)
7341 (arguments
7342 `(#:jar-name "osgi-service-cm.jar"
7343 #:tests? #f)); no tests
7344 (inputs
7345 `(("framework" ,java-osgi-framework)
7346 ("annotation" ,java-osgi-annotation)))
c353d014 7347 (home-page "https://www.osgi.org")
fb9c48b8
JL
7348 (synopsis "OSGI Configuration Management")
7349 (description
7350 "OSGi, for Open Services Gateway initiative framework, is a module system
7351and service platform for the Java programming language. This package contains
7352utility classes for the configuration of services.")
7353 (license license:asl2.0)))
500aac75
JL
7354
7355(define-public java-osgi-service-packageadmin
7356 (package
7357 (name "java-osgi-service-packageadmin")
7358 (version "1.2.0")
7359 (source (origin
7360 (method url-fetch)
7361 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7362 "org.osgi.service.packageadmin/"
7363 version "/org.osgi.service.packageadmin-"
7364 version "-sources.jar"))
7365 (sha256
7366 (base32
7367 "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52"))))
7368 (build-system ant-build-system)
7369 (arguments
7370 `(#:jar-name "osgi-service-packageadmin.jar"
7371 #:tests? #f)); no tests
7372 (inputs
7373 `(("framework" ,java-osgi-framework)))
c353d014 7374 (home-page "https://www.osgi.org")
500aac75
JL
7375 (synopsis "OSGI Package Administration")
7376 (description
7377 "OSGi, for Open Services Gateway initiative framework, is a module system
7378and service platform for the Java programming language. This package contains
7379the packageadmin service.")
7380 (license license:asl2.0)))
77a4f1ae
JL
7381
7382(define-public java-ops4j-base-lang
7383 (package
7384 (name "java-ops4j-base-lang")
7385 (version "1.5.0")
7386 (source (origin
7387 (method url-fetch)
7388 (uri (string-append "https://github.com/ops4j/org.ops4j.base/"
7389 "archive/base-" version ".tar.gz"))
7390 (sha256
7391 (base32
7392 "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw"))))
7393 (build-system ant-build-system)
7394 (arguments
7395 `(#:jar-name "java-ops4j-base-lang.jar"
7396 #:source-dir "ops4j-base-lang/src/main/java"
7397 #:tests? #f; no tests
7398 #:phases
7399 (modify-phases %standard-phases
7400 (add-before 'build 'add-test-file
7401 (lambda _
7402 ;; That file is required by a test in ops4j-pax-exam-core-spi
7403 (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang")
7404 (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties"
7405 (lambda _
7406 (display
7407 (string-append
7408 "version=" ,version "\n"
7409 "groupId=org.ops4j.base"
2c8ac364
MW
7410 "artifactId=ops4j-base-lang\n"))))
7411 #t)))))
77a4f1ae
JL
7412 (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview")
7413 (synopsis "Utility classes and extensions to be used in OPS4J projects")
7414 (description "OPS4J stands for Open Participation Software for Java. This
7415package contains utilities and extensions related to @code{java.lang}.")
7416 (license license:asl2.0)))
b2353495
JL
7417
7418(define-public java-ops4j-base-monitors
7419 (package
7420 (inherit java-ops4j-base-lang)
7421 (name "java-ops4j-base-monitors")
7422 (arguments
7423 `(#:jar-name "java-ops4j-base-monitors.jar"
7424 #:source-dir "ops4j-base-monitors/src/main/java"
7425 #:tests? #f)); no tests
7426 (inputs
7427 `(("lang" ,java-ops4j-base-lang)))
7428 (description "OPS4J stands for Open Participation Software for Java. This
7429package contains utilities and extensions related to monitoring.")))
322d349a
JL
7430
7431(define-public java-ops4j-base-io
7432 (package
7433 (inherit java-ops4j-base-lang)
7434 (name "java-ops4j-base-io")
7435 (arguments
7436 `(#:jar-name "java-ops4j-base-io.jar"
7437 #:source-dir "ops4j-base-io/src/main/java"
7438 #:test-dir "ops4j-base-io/src/test"
7439 #:test-exclude
7440 (list "**/ListerTest.java")))
7441 (inputs
7442 `(("lang" ,java-ops4j-base-monitors)
7443 ("lang" ,java-ops4j-base-lang)))
7444 (native-inputs
7445 `(("junit" ,java-junit)
7446 ("hamcrest" ,java-hamcrest-core)))
7447 (description "OPS4J stands for Open Participation Software for Java. This
7448package contains utilities and extensions related to handling streams and files.")))
559919c1
JL
7449
7450(define-public java-ops4j-base-util
7451 (package
7452 (inherit java-ops4j-base-lang)
7453 (name "java-ops4j-base-util")
7454 (arguments
7455 `(#:jar-name "java-ops4j-base-util.jar"
7456 #:source-dir "ops4j-base-util/src/main/java"
7457 #:test-dir "ops4j-base-util/src/test"))
7458 (inputs
7459 `(("lang" ,java-ops4j-base-lang)))
7460 (native-inputs
7461 `(("junit" ,java-junit)))
7462 (description "OPS4J stands for Open Participation Software for Java. This
7463package contains utilities and extensions related to environment, i18n and
7464mime types.")))
60dcec7a
JL
7465
7466(define-public java-ops4j-base-util-property
7467 (package
7468 (inherit java-ops4j-base-lang)
7469 (name "java-ops4j-base-util-property")
7470 (arguments
7471 `(#:jar-name "java-ops4j-base-util-property.jar"
7472 #:source-dir "ops4j-base-util-property/src/main/java"
7473 #:tests? #f)); no tests
7474 (inputs
7475 `(("lang" ,java-ops4j-base-lang)
7476 ("util" ,java-ops4j-base-util)))
7477 (description "OPS4J stands for Open Participation Software for Java. This
7478package contains utilities and extensions related to resolving properties from
7479different sources.")))
0edf8cf0
JL
7480
7481(define-public java-ops4j-base-store
7482 (package
7483 (inherit java-ops4j-base-lang)
7484 (name "java-ops4j-base-store")
7485 (arguments
7486 `(#:jar-name "java-ops4j-base-store.jar"
7487 #:source-dir "ops4j-base-store/src/main/java"
7488 #:tests? #f)); no tests
7489 (inputs
7490 `(("lang" ,java-ops4j-base-lang)
7491 ("slf4j" ,java-slf4j-api)
7492 ("io" ,java-ops4j-base-io)))
7493 (description "OPS4J stands for Open Participation Software for Java. This
7494package contains utilities for storing and retrieving data from an
7495@code{InputStream}.")))
214fcd8a
JL
7496
7497(define-public java-ops4j-base-spi
7498 (package
7499 (inherit java-ops4j-base-lang)
7500 (name "java-ops4j-base-spi")
7501 (arguments
7502 `(#:jar-name "java-ops4j-base-spi.jar"
7503 #:source-dir "ops4j-base-spi/src/main/java"
7504 #:test-dir "ops4j-base-spi/src/test"))
7505 (native-inputs
7506 `(("junit" ,java-junit)
7507 ("hamcrest" ,java-hamcrest-core)))
7508 (description "OPS4J stands for Open Participation Software for Java. This
7509package contains utilities for obtaining services via the Java SE 6
7510@code{ServiceLoader}.")))
e1edf42e
JL
7511
7512(define-public java-aqute-bnd-annotation
7513 (package
7514 (name "java-aqute-bnd-annotation")
2cac8891 7515 (version "3.5.0")
e1edf42e
JL
7516 (source (origin
7517 (method url-fetch)
7518 (uri (string-append "https://github.com/bndtools/bnd/archive/"
7519 version ".REL.tar.gz"))
7520 (file-name (string-append name "-" version ".tar.gz"))
7521 (sha256
7522 (base32
2cac8891 7523 "1ggyiq0as0f6cz333a0dh98j72kmvv5pf2s47v9554yh905lfqdl"))))
e1edf42e
JL
7524 (build-system ant-build-system)
7525 (arguments
7526 `(#:jar-name "java-aqute-bnd-annotation.jar"
7527 #:source-dir "biz.aQute.bnd.annotation/src"
7528 #:tests? #f)); empty test dir
7529 (home-page "http://bnd.bndtools.org/")
7530 (synopsis "Tools for OSGi")
7531 (description "Bnd is a swiss army knife for OSGi, it creates manifest
7532headers based on analyzing the class code, it verifies the project settings,
7533it manages project dependencies, gives diffs jars, and much more.")
7534 (license license:asl2.0)))
60ba2978
JL
7535
7536(define-public java-aqute-libg
7537 (package
7538 (inherit java-aqute-bnd-annotation)
7539 (name "java-aqute-libg")
7540 (arguments
7541 `(#:jar-name "java-aqute-libg.jar"
78754995
GB
7542 ;; The build fails when source/target more recent than 1.7. This
7543 ;; is a known issue. See: https://github.com/bndtools/bnd/issues/1327
7544 ;;
7545 ;; It is closed as won't fix. There is no way to change the source
7546 ;; so that it works on 1.8, and still works on 1.6, the upstream
7547 ;; target. It work fine on 1.7, so we use 1.7.
7548 #:make-flags (list "-Dant.build.javac.source=1.7"
7549 "-Dant.build.javac.target=1.7")
2ab089b7
GB
7550 #:phases
7551 (modify-phases %standard-phases
7552 (add-before 'configure 'chdir
7553 ;; Change to aQute.libg directory, so that the relative
7554 ;; paths in the tests aren't broken.
7555 (lambda _
7556 (chdir "aQute.libg")
7557 #t))
7558 (add-before 'check 'create-test-directory
7559 ;; Copy the test directory to test/java, since that's where
7560 ;; ant-build-system's default project in build.xml expects to find
7561 ;; the test classes. Leave a copy in the original place to not
7562 ;; break paths in tests.
7563 (lambda _
7564 (mkdir "src/test")
7565 (copy-recursively "test" "src/test/java")
7566 #t)))))
60ba2978
JL
7567 (inputs
7568 `(("slf4j" ,java-slf4j-api)
7569 ("osgi-annot" ,java-osgi-annotation)
7570 ("java-osgi-cmpn" ,java-osgi-cmpn)
2ab089b7
GB
7571 ("osgi" ,java-osgi-core)))
7572 (native-inputs
7573 `(("hamcrest" ,java-hamcrest-core)
7574 ("java-junit" ,java-junit)))))
5f26a131 7575
288a5959
GB
7576(define java-aqute-libg-bootstrap
7577 (package
7578 (inherit java-aqute-libg)
7579 (name "java-aqute-libg-bootstrap")
aca7dcdd
GB
7580 (arguments
7581 ;; Disable tests, at this stage of bootstrap we have no test frameworks.
3785ccd2
GB
7582 (substitute-keyword-arguments (package-arguments java-aqute-libg)
7583 ((#:tests? _ #f) #f)))
288a5959
GB
7584 (inputs
7585 `(("slf4j-bootstrap" ,java-slf4j-api-bootstrap)
7586 ,@(delete `("slf4j" ,java-slf4j-api)
aca7dcdd
GB
7587 (package-inputs java-aqute-libg))))
7588 (native-inputs '())))
288a5959 7589
5f26a131
JL
7590(define-public java-aqute-bndlib
7591 (package
7592 (inherit java-aqute-bnd-annotation)
7593 (name "java-aqute-bndlib")
7594 (arguments
7595 `(#:jar-name "java-bndlib.jar"
7596 #:source-dir "biz.aQute.bndlib/src"
7597 #:tests? #f)); no tests
7598 (inputs
7599 `(("slf4j" ,java-slf4j-api)
7600 ("osgi-annot" ,java-osgi-annotation)
7601 ("java-aqute-libg" ,java-aqute-libg)
7602 ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation)
7603 ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations)
7604 ("java-osgi-service-repository" ,java-osgi-service-repository)
7605 ("java-osgi-service-log" ,java-osgi-service-log)
7606 ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations)
7607 ("java-osgi-namespace-contract" ,java-osgi-namespace-contract)
7608 ("java-osgi-namespace-extender" ,java-osgi-namespace-extender)
7609 ("java-osgi-namespace-service" ,java-osgi-namespace-service)
7610 ("promise" ,java-osgi-util-promise)
7611 ("osgi" ,java-osgi-core)))))
25aef81d 7612
869803aa
GB
7613(define java-aqute-bndlib-bootstrap
7614 (package
7615 (inherit java-aqute-bndlib)
7616 (name "java-aqute-bndlib-bootstrap")
7617 (inputs
7618 `(("slf4j-bootstrap" ,java-slf4j-api-bootstrap)
7619 ("java-aqute-libg-bootstrap" ,java-aqute-libg-bootstrap)
7620 ,@(delete `("slf4j" ,java-slf4j-api)
7621 (delete `("java-aqute-libg" ,java-aqute-libg)
7622 (package-inputs java-aqute-bndlib)))))))
7623
25aef81d
JL
7624(define-public java-ops4j-pax-tinybundles
7625 (package
7626 (name "java-ops4j-pax-tinybundles")
7627 (version "2.1.1")
7628 (source (origin
7629 (method url-fetch)
7630 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/"
7631 "archive/tinybundles-" version ".tar.gz"))
7632 (sha256
7633 (base32
7634 "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871"))))
7635 (arguments
7636 `(#:jar-name "java-ops4j-pax-tinybundles.jar"
7637 #:source-dir "src/main/java"
7638 #:test-exclude
7639 ;; Abstract base classes for other tests
7640 (list "**/BndTest.java" "**/CoreTest.java")
7641 #:phases
7642 (modify-phases %standard-phases
7643 (add-before 'check 'fix-version
7644 (lambda _
7645 ;; This test has a reference to an old version of bndlib we are not
7646 ;; packaging. It uses the version referenced in pom.xml. We replace
7647 ;; it with our own version.
7648 (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
0f277802 7649 (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*")
2c8ac364
MW
7650 ,(package-version java-aqute-bndlib)))
7651 #t)))))
25aef81d
JL
7652 (inputs
7653 `(("lang" ,java-ops4j-base-lang)
7654 ("io" ,java-ops4j-base-io)
7655 ("store" ,java-ops4j-base-store)
7656 ("slf4j" ,java-slf4j-api)
7657 ("libg" ,java-aqute-libg)
7658 ("bndlib" ,java-aqute-bndlib)))
7659 (native-inputs
7660 `(("junit" ,java-junit)
7661 ("hamcrest" ,java-hamcrest-core)
7662 ("log4j" ,java-log4j-api)
7663 ("bndannotation" ,java-aqute-bnd-annotation)
7664 ("framework" ,java-osgi-framework)))
7665 (build-system ant-build-system)
7666 (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles")
7667 (synopsis "Java APIs to create OSGi related artifacts")
7668 (description "Tinybundles is all about creating OSGi related artifacts like
7669Bundles, Fragments and Deployment Packages with Java Api. It is very convinient
7670to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the
7671other hand, this library can be a foundation of real end user tools that need
7672to create those artifacts.")
7673 (license license:asl2.0)))
e179add0
JL
7674
7675(define-public java-ops4j-pax-exam-core
7676 (package
7677 (name "java-ops4j-pax-exam-core")
7678 (version "4.11.0")
7679 (source (origin
7680 (method url-fetch)
7681 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/"
7682 "archive/exam-reactor-" version ".tar.gz"))
7683 (sha256
7684 (base32
7685 "08mzw8nkah3rj3vznlplnawspxhp61zgvb44ifqa1rni1cvbms2g"))))
7686 (arguments
7687 `(#:jar-name "java-ops4j-pax-exam-core.jar"
7688 #:source-dir "core/pax-exam/src/main/java"
7689 #:test-dir "core/pax-exam/src/test"))
7690 (inputs
7691 `(("slf4j" ,java-slf4j-api)
7692 ("lang" ,java-ops4j-base-lang)
7693 ("io" ,java-ops4j-base-io)
7694 ("util-property" ,java-ops4j-base-util-property)
7695 ("util-store" ,java-ops4j-base-store)
7696 ("java-osgi-core" ,java-osgi-core)))
7697 (native-inputs
7698 `(("junit" ,java-junit)
7699 ("hamcrest" ,java-hamcrest-core)))
7700 (build-system ant-build-system)
7701 (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview")
7702 (synopsis "In-Container Testing for OSGi, Java EE and CDI")
7703 (description "Pax Exam creates OSGi bundles for testing purposes. It lets
7704the user take control of the OSGi framework, the test framework (e.g. JUnit) and
7705the system under test at the same time.")
7706 (license license:asl2.0)))
7a7c2b75
JL
7707
7708(define-public java-ops4j-pax-exam-core-spi
7709 (package
7710 (inherit java-ops4j-pax-exam-core)
7711 (name "java-ops4j-pax-exam-core-spi")
7712 (arguments
7713 `(#:jar-name "java-ops4j-pax-exam-spi.jar"
7714 #:source-dir "src/main/java"
7715 #:test-exclude
7716 (list
7717 ;; Abstract base class, not a test
7718 "**/BaseStagedReactorTest.java"
7719 ;; Depends on org.mortbay.jetty.testwars:test-war-dump
7720 "**/WarBuilderTest.java")
7721 #:phases
7722 (modify-phases %standard-phases
7723 (add-before 'configure 'chdir
7724 (lambda _
7725 ;; Tests assume we are in this directory
2c8ac364
MW
7726 (chdir "core/pax-exam-spi")
7727 #t))
7a7c2b75
JL
7728 (add-before 'check 'fix-tests
7729 (lambda _
7730 ;; One test checks that this file is present.
7731 (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi")
7732 (with-output-to-file
7733 "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties"
7734 (lambda _
7735 (display
7736 (string-append "artifactId = pax-exam-spi\n"
7737 "version = " ,(package-version java-ops4j-pax-exam-core-spi)))))
7738 ;; Maven puts compilation results in the target directory, while we
7739 ;; put them in the build directory.
7740 (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java"
7741 "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java"
7742 "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java")
7743 (("target") "build"))
7744 ;; One test is expected to fail, but it doesn't throw the expected exception
7745 (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java"
2c8ac364
MW
7746 (("AssertionError") "IllegalArgumentException"))
7747 #t)))))
7a7c2b75
JL
7748 (inputs
7749 `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core)
7750 ("lang" ,java-ops4j-base-lang)
7751 ("monitors" ,java-ops4j-base-monitors)
7752 ("store" ,java-ops4j-base-store)
7753 ("io" ,java-ops4j-base-io)
7754 ("spi" ,java-ops4j-base-spi)
7755 ("osgi" ,java-osgi-core)
7756 ("slf4j" ,java-slf4j-api)
7757 ("tinybundles" ,java-ops4j-pax-tinybundles)))
7758 (native-inputs
7759 `(("mockito" ,java-mockito-1)
7760 ("junit" ,java-junit)
7761 ("hamcrest" ,java-hamcrest-core)
7762 ("cglib" ,java-cglib)
7763 ("objenesis" ,java-objenesis)
7764 ("asm" ,java-asm)))))
4496d77f
JL
7765
7766(define-public java-ops4j-pax-exam-core-junit
7767 (package
7768 (inherit java-ops4j-pax-exam-core)
7769 (name "java-ops4j-pax-exam-core-junit")
7770 (arguments
7771 `(#:jar-name "ops4j-pax-exam-core-junit.jar"
7772 #:source-dir "drivers/pax-exam-junit4/src/main/java"
7773 #:tests? #f)); no tests
7774 (inputs
7775 `(("junit" ,java-junit)
7776 ("slf4j" ,java-slf4j-api)
7777 ("core" ,java-ops4j-pax-exam-core)
7778 ("spi" ,java-ops4j-pax-exam-core-spi)))
7779 (native-inputs '())))
cb05f60d
JL
7780
7781(define-public java-fasterxml-jackson-annotations
7782 (package
7783 (name "java-fasterxml-jackson-annotations")
93dceea4 7784 (version "2.9.4")
cb05f60d
JL
7785 (source (origin
7786 (method url-fetch)
7787 (uri (string-append "https://github.com/FasterXML/"
7788 "jackson-annotations/archive/"
7789 "jackson-annotations-" version ".tar.gz"))
7790 (sha256
7791 (base32
93dceea4 7792 "0mr95xd0da6a4g95zvrl1ryk5n5zv2rc696w3xnsr5hxk2gicfc4"))))
cb05f60d
JL
7793 (build-system ant-build-system)
7794 (arguments
7795 `(#:jar-name "jackson-annotations.jar"
7796 #:source-dir "src/main/java"
7797 #:test-dir "src/test"))
7798 (native-inputs
7799 `(("junit" ,java-junit)))
7800 (home-page "https://github.com/FasterXML/jackson-annotations")
7801 (synopsis "General purpose annotations for the Jackson Data Processor")
7802 (description "This package contains general purpose annotations for the
7803Jackson Data Processor, used on value and handler types. The only annotations
7804not included are ones that require dependency to the Databind package.")
7805 (license license:asl2.0)))
0b5481df
JL
7806
7807(define-public java-fasterxml-jackson-core
7808 (package
7809 (name "java-fasterxml-jackson-core")
38a0fc38 7810 (version "2.9.4")
0b5481df
JL
7811 (source (origin
7812 (method url-fetch)
7813 (uri (string-append "https://github.com/FasterXML/"
7814 "jackson-core/archive/"
7815 "jackson-core-" version ".tar.gz"))
7816 (sha256
7817 (base32
38a0fc38 7818 "159hsnk17jr1gyzkf01cxvsn45srnk37g949r7364qlsr527gjgd"))))
0b5481df
JL
7819 (build-system ant-build-system)
7820 (arguments
7821 `(#:jar-name "jackson-core.jar"
7822 #:source-dir "src/main/java"
7823 #:test-dir "src/test"
7824 #:test-exclude
7825 (list
7826 ;; Expected failure. pom.xml excludes these
7827 "**/failing/**"
7828 ;; Base classes that have no constructor for junit
7829 "**/BaseTest.java"
7830 "**/ConcurrencyReadTest.java"
7831 "**/ManualCharAccessTest.java"
7832 "**/ManualCharAccessTest.java"
7833 "**/TrailingCommasTest.java"
7834 "**/AsyncMissingValuesInObjectTest.java"
7835 "**/AsyncMissingValuesInArrayTest.java")
7836 #:phases
7837 (modify-phases %standard-phases
7838 (add-before 'configure 'generate-PackageVersion.java
7839 (lambda _
7840 (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java")
7841 (in (string-append out ".in")))
7842 (copy-file in out)
7843 (substitute* out
7844 (("@package@") "com.fasterxml.jackson.core.json")
7845 (("@projectversion@") ,version)
7846 (("@projectgroupid@") "com.fasterxml.jackson.core")
2c8ac364
MW
7847 (("@projectartifactid@") "jackson-core")))
7848 #t))
0b5481df
JL
7849 (add-before 'build 'copy-resources
7850 (lambda _
7851 (copy-recursively "src/main/resources"
2c8ac364
MW
7852 "build/classes")
7853 #t))
0b5481df
JL
7854 (add-before 'check 'copy-test-resources
7855 (lambda _
7856 (copy-recursively "src/test/resources"
2c8ac364
MW
7857 "build/test-classes")
7858 #t)))))
0b5481df
JL
7859 (native-inputs
7860 `(("junit" ,java-junit)
7861 ("hamcrest" ,java-hamcrest-core)))
7862 (home-page "https://github.com/FasterXML/jackson-core")
7863 (synopsis "")
7864 (description "")
7865 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
f234c7a0
JL
7866
7867(define-public java-fasterxml-jackson-databind
7868 (package
7869 (name "java-fasterxml-jackson-databind")
3c1edff5 7870 (version "2.9.4")
f234c7a0
JL
7871 (source (origin
7872 (method url-fetch)
7873 (uri (string-append "https://github.com/FasterXML/"
7874 "jackson-databind/archive/"
7875 "jackson-databind-" version ".tar.gz"))
7876 (sha256
7877 (base32
3c1edff5 7878 "1zd2cw4z6kdkbx8za96xh9pyicv2a2l7y0rkcx2fqd8hv6d47s08"))))
f234c7a0
JL
7879 (build-system ant-build-system)
7880 (arguments
7881 `(#:jar-name "jackson-databind.jar"
7882 #:source-dir "src/main/java"
7883 #:tests? #f; requires javax.measures for which I can't find a free implementation
7884 #:phases
7885 (modify-phases %standard-phases
7886 (add-before 'configure 'generate-PackageVersion.java
7887 (lambda _
7888 (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java")
7889 (in (string-append out ".in")))
7890 (copy-file in out)
7891 (substitute* out
7892 (("@package@") "com.fasterxml.jackson.databind.cfg")
7893 (("@projectversion@") ,version)
7894 (("@projectgroupid@") "com.fasterxml.jackson.databind")
2c8ac364
MW
7895 (("@projectartifactid@") "jackson-databind")))
7896 #t))
f234c7a0
JL
7897 (add-before 'build 'copy-resources
7898 (lambda _
2c8ac364
MW
7899 (copy-recursively "src/main/resources" "build/classes")
7900 #t)))))
f234c7a0
JL
7901 (inputs
7902 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7903 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)))
7904 (home-page "https://github.com/FasterXML/jackson-databind")
7905 (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor")
7906 (description "This package contains the general-purpose data-binding
7907functionality and tree-model for Jackson Data Processor. It builds on core
7908streaming parser/generator package, and uses Jackson Annotations for
7909configuration.")
7910 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
d57d8b89
JL
7911
7912(define-public java-fasterxml-jackson-modules-base-jaxb
7913 (package
7914 (name "java-fasterxml-jackson-modules-base-jaxb")
07207211 7915 (version "2.9.4")
d57d8b89
JL
7916 (source (origin
7917 (method url-fetch)
7918 (uri (string-append "https://github.com/FasterXML/"
7919 "jackson-modules-base/archive/"
7920 "jackson-modules-base-" version ".tar.gz"))
7921 (sha256
7922 (base32
07207211 7923 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
d57d8b89
JL
7924 (build-system ant-build-system)
7925 (arguments
7926 `(#:jar-name "jackson-modules-base-jaxb.jar"
7927 #:source-dir "jaxb/src/main/java"
7928 #:test-dir "jaxb/src/test"
7929 #:test-exclude
7930 ;; Base class for tests
7931 (list "**/BaseJaxbTest.java")
7932 #:phases
7933 (modify-phases %standard-phases
7934 (add-before 'configure 'generate-PackageVersion.java
7935 (lambda _
7936 (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/"
7937 "jackson/module/jaxb/PackageVersion.java"))
7938 (in (string-append out ".in")))
7939 (copy-file in out)
7940 (substitute* out
7941 (("@package@") "com.fasterxml.jackson.module.jaxb")
7942 (("@projectversion@") ,version)
7943 (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb")
2c8ac364
MW
7944 (("@projectartifactid@") "jackson-module-jaxb")))
7945 #t))
d57d8b89
JL
7946 (add-before 'build 'copy-resources
7947 (lambda _
2c8ac364
MW
7948 (copy-recursively "jaxb/src/main/resources" "build/classes")
7949 #t)))))
d57d8b89
JL
7950 (inputs
7951 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7952 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
7953 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
7954 (native-inputs
7955 `(("java-junit" ,java-junit)))
7956 (home-page "https://github.com/FasterXML/jackson-modules-base")
7957 (synopsis "Jaxb annotations jackson module")
7958 (description "This package is the jaxb annotations module for jackson.")
7959 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
0f296d37 7960
5165fb40
DM
7961(define-public java-fasterxml-jackson-modules-base-mrbean
7962 (package
7963 (name "java-fasterxml-jackson-modules-base-mrbean")
7964 (version "2.9.4")
7965 (source (origin
7966 (method url-fetch)
7967 (uri (string-append "https://github.com/FasterXML/"
7968 "jackson-modules-base/archive/"
7969 "jackson-modules-base-" version ".tar.gz"))
7970 (sha256
7971 (base32
7972 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
7973 (build-system ant-build-system)
7974 (arguments
7975 `(#:jar-name "jackson-modules-base-mrbean.jar"
7976 #:source-dir "mrbean/src/main/java"
7977 #:test-dir "mrbean/src/test"
7978 #:test-exclude
7979 ;; Base class for tests
7980 (list "**/BaseTest.java")
7981 #:phases
7982 (modify-phases %standard-phases
7983 (add-before 'configure 'generate-PackageVersion.java
7984 (lambda _
7985 (let* ((out (string-append "mrbean/src/main/java/com/fasterxml/"
7986 "jackson/module/mrbean/PackageVersion.java"))
7987 (in (string-append out ".in")))
7988 (copy-file in out)
7989 (substitute* out
7990 (("@package@") "com.fasterxml.jackson.module.mrbean")
7991 (("@projectversion@") ,version)
7992 (("@projectgroupid@") "com.fasterxml.jackson.module.mrbean")
7993 (("@projectartifactid@") "jackson-module-mrbean")))
7994 #t)))))
7995 (inputs
7996 `(("java-asm" ,java-asm)
7997 ("java-fasterxml-jackson-annotations"
7998 ,java-fasterxml-jackson-annotations)
7999 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
8000 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
8001 (native-inputs
8002 `(("java-junit" ,java-junit)))
8003 (home-page "https://github.com/FasterXML/jackson-modules-base")
8004 (synopsis "POJO type materialization for Java")
8005 (description "This package implements POJO type materialization.
8006Databinders can construct implementation classes for Java interfaces as part
8007of deserialization.")
8008 (license license:asl2.0)))
8009
0f296d37
JL
8010(define-public java-snakeyaml
8011 (package
8012 (name "java-snakeyaml")
8013 (version "1.18")
8014 (source (origin
8015 (method url-fetch)
8016 (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
8017 version ".tar.gz"))
307856cd 8018 (file-name (string-append name "-" version ".tar.gz"))
0f296d37
JL
8019 (sha256
8020 (base32
8021 "0rf5ha6w0waz50jz2479jsrbgmd0dnx0gs337m126j5z7zlmg7mg"))))
8022 (build-system ant-build-system)
8023 (arguments
8024 `(#:jar-name "java-snakeyaml.jar"
8025 #:source-dir "src/main/java"
8026 ;; Tests require velocity, a cyclic dependency, and
8027 ;; java-spring-framework-context which is not packaged.
8028 #:tests? #f))
8029 (home-page "https://bitbucket.org/asomov/snakeyaml")
8030 (synopsis "YAML processor")
8031 (description "SnakeYAML is a YAML processor for the Java Virtual Machine.")
8032 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
087c8fd2
JL
8033
8034(define-public java-fasterxml-jackson-dataformat-yaml
8035 (package
8036 (name "java-fasterxml-jackson-dataformat-yaml")
1f2be88f 8037 (version "2.9.4")
087c8fd2
JL
8038 (source (origin
8039 (method url-fetch)
8040 (uri (string-append "https://github.com/FasterXML/"
8041 "jackson-dataformats-text/archive/"
8042 "jackson-dataformats-text-" version ".tar.gz"))
8043 (sha256
8044 (base32
1f2be88f 8045 "1hikl06khaxbg439avf442qifcadap8w0lx13f0nnhp2vh3dkbz7"))))
087c8fd2
JL
8046 (build-system ant-build-system)
8047 (arguments
8048 `(#:jar-name "jackson-dataformat-yaml.jar"
8049 #:source-dir "yaml/src/main/java"
8050 #:test-dir "yaml/src/test"
8051 #:test-exclude (list "**/failing/**.java")
8052 #:phases
8053 (modify-phases %standard-phases
8054 (add-before 'configure 'generate-PackageVersion.java
8055 (lambda _
8056 (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java")
8057 (in (string-append out ".in")))
8058 (copy-file in out)
8059 (substitute* out
8060 (("@package@") "com.fasterxml.jackson.dataformat.yaml")
8061 (("@projectversion@") ,version)
8062 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml")
2c8ac364
MW
8063 (("@projectartifactid@") "jackson-dataformat-yaml")))
8064 #t)))))
087c8fd2
JL
8065 (inputs
8066 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
8067 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
8068 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
8069 ("java-snakeyaml" ,java-snakeyaml)))
8070 (native-inputs
8071 `(("junit" ,java-junit)
8072 ("hamcrest" ,java-hamcrest-core)
8073 ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi)
8074 ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit)
8075 ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core)))
8076 (home-page "https://github.com/FasterXML/jackson-dataformats-text")
8077 (synopsis "Yaml backend for Jackson")
8078 (description "Dataformat backends are used to support format alternatives
8079to JSON, supported by default. This is done by sub-classing Jackson core
8080abstractions.")
8081 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
6fd07b98
JL
8082
8083(define-public java-stax2-api
8084 (package
8085 (name "java-stax2-api")
8086 (version "4.0.0")
8087 (source (origin
8088 (method url-fetch)
8089 (uri (string-append "https://github.com/FasterXML/stax2-api/archive/"
8090 "stax2-api-" version ".tar.gz"))
8091 (sha256
8092 (base32
8093 "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq"))))
8094 (build-system ant-build-system)
8095 (arguments
8096 `(#:jar-name "java-stax2-api.jar"
8097 #:source-dir "src/main/java"
8098 #:tests? #f)); no tests
8099 (home-page "https://github.com/FasterXML/stax2-api")
8100 (synopsis "Stax2 API")
8101 (description "Stax2 API is an extension to basic Stax 1.0 API that adds
8102significant new functionalities, such as full-featured bi-direction validation
8103interface and high-performance Typed Access API.")
8104 (license license:bsd-2)))
40f193f3
JL
8105
8106(define-public java-woodstox-core
8107 (package
8108 (name "java-woodstox-core")
8109 (version "5.0.3")
8110 (source (origin
8111 (method url-fetch)
8112 (uri (string-append "https://github.com/FasterXML/woodstox/archive/"
8113 "woodstox-core-" version ".tar.gz"))
8114 (sha256
8115 (base32
8116 "1i7pdgb8jbw6gdy5kmm0l6rz109n2ns92pqalpyp24vb8vlvdfd4"))))
8117 (build-system ant-build-system)
8118 (arguments
8119 `(#:jar-name "woodstox.jar"
8120 #:test-exclude
8121 (list "**/Base*.java" "failing/**")
8122 #:phases
8123 (modify-phases %standard-phases
8124 (add-before 'build 'remove-msv-dep
8125 (lambda _
8126 ;; we don't need osgi, and it depends on msv
8127 (delete-file-recursively "src/main/java/com/ctc/wstx/osgi")
8128 ;; msv's latest release is from 2011 and we don't need it
8129 (delete-file-recursively "src/main/java/com/ctc/wstx/msv")
8130 (delete-file-recursively "src/test/java/wstxtest/osgi")
2c8ac364
MW
8131 (delete-file-recursively "src/test/java/wstxtest/msv")
8132 #t))
40f193f3
JL
8133 (add-before 'build 'copy-resources
8134 (lambda _
2c8ac364
MW
8135 (copy-recursively "src/main/resources" "build/classes")
8136 #t)))))
40f193f3
JL
8137 (inputs
8138 `(("stax2" ,java-stax2-api)))
8139 (native-inputs
8140 `(("junit" ,java-junit)))
8141 (home-page "https://github.com/FasterXML/woodstox")
8142 (synopsis "Stax XML API implementation")
8143 (description "Woodstox is a stax XML API implementation.")
8144 (license license:asl2.0)))
262a4d33
JL
8145
8146(define-public java-fasterxml-jackson-dataformat-xml
8147 (package
8148 (name "java-fasterxml-jackson-dataformat-xml")
f3bbe029 8149 (version "2.9.4")
262a4d33
JL
8150 (source (origin
8151 (method url-fetch)
8152 (uri (string-append "https://github.com/FasterXML/"
8153 "jackson-dataformat-xml/archive/"
8154 "jackson-dataformat-xml-" version ".tar.gz"))
8155 (sha256
8156 (base32
f3bbe029 8157 "111fkkl90w31jbf30kgj82qdcxlw4sxppki7i198liw0ck1jcavq"))))
262a4d33
JL
8158 (build-system ant-build-system)
8159 (arguments
8160 `(#:jar-name "jackson-dataformat-xml.jar"
8161 #:source-dir "src/main/java"
8162 #:test-exclude
8163 (list "**/failing/**")
8164 #:phases
8165 (modify-phases %standard-phases
8166 (add-before 'configure 'generate-PackageVersion.java
8167 (lambda _
8168 (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java")
8169 (in (string-append out ".in")))
8170 (copy-file in out)
8171 (newline)
8172 (substitute* out
8173 (("@package@") "com.fasterxml.jackson.dataformat.xml")
8174 (("@projectversion@") ,version)
8175 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml")
2c8ac364
MW
8176 (("@projectartifactid@") "jackson-dataformat-xml")))
8177 #t))
262a4d33
JL
8178 (add-before 'build 'copy-resources
8179 (lambda _
2c8ac364
MW
8180 (copy-recursively "src/main/resources" "build/classes")
8181 #t)))))
262a4d33
JL
8182 (inputs
8183 `(("jackson-annotations" ,java-fasterxml-jackson-annotations)
8184 ("jackson-core" ,java-fasterxml-jackson-core)
8185 ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb)
8186 ("jackson-databind" ,java-fasterxml-jackson-databind)
8187 ("stax2-api" ,java-stax2-api)
8188 ("woodstox" ,java-woodstox-core)))
8189 (native-inputs
8190 `(("junit" ,java-junit)
8191 ("hamcrest" ,java-hamcrest-core)))
8192 (home-page "https://github.com/FasterXML/jackson-dataformat-xml")
8193 (synopsis "Read and write XML")
8194 (description "This package contains Jackson extension component for reading
8195and writing XML encoded data.
8196
8197Further, the goal is to emulate how JAXB data-binding works with \"Code-first\"
8198approach (that is, no support is added for \"Schema-first\" approach). Support
8199for JAXB annotations is provided by JAXB annotation module; this module
8200provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator},
8201@code{JsonFactory}) as well as small number of higher level overrides needed to
8202make data-binding work.")
8203 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
90a127c7
JL
8204
8205(define-public java-hdrhistogram
8206 (package
8207 (name "java-hdrhistogram")
8208 (version "2.1.9")
8209 (source (origin
8210 (method url-fetch)
8211 (uri (string-append "https://github.com/HdrHistogram/HdrHistogram/"
8212 "archive/HdrHistogram-" version ".tar.gz"))
8213 (sha256
8214 (base32
8215 "1sicbmc3sr42nw93qbkb26q9rn33ag33k6k77phjc3j5h5gjffqv"))))
8216 (build-system ant-build-system)
8217 (arguments
8218 `(#:jar-name "java-hdrhistogram.jar"
8219 #:source-dir "src/main/java"
8220 #:phases
8221 (modify-phases %standard-phases
8222 (add-before 'configure 'set-version
8223 (lambda _
8224 (let* ((version-java "src/main/java/org/HdrHistogram/Version.java")
8225 (template (string-append version-java ".template")))
8226 (copy-file template version-java)
8227 (substitute* version-java
8228 (("\\$VERSION\\$") ,version)
8229 (("\\$BUILD_TIME\\$") "0"))
8230 #t))))))
8231 (native-inputs
8232 `(("junit" ,java-junit)
8233 ("hamcrest" ,java-hamcrest-core)))
8234 (home-page "https://hdrhistogram.github.io/HdrHistogram")
8235 (synopsis "High dynamic range histogram")
8236 (description "Hdrhistogram allows to create histograms that support
8237recording and analyzing sampled data value counts across a configurable integer
8238value range with configurable value precision within the range. Value precision
8239is expressed as the number of significant digits in the value recording, and
8240provides control over value quantization behavior across the value range and
8241the subsequent value resolution at any given level.")
8242 (license license:public-domain)))
5d104a27 8243
c5ff11dc
RW
8244(define-public java-cofoja
8245 (package
8246 (name "java-cofoja")
8247 (version "1.3")
8248 (source (origin
8249 (method git-fetch)
8250 (uri (git-reference
8251 (url "https://github.com/nhatminhle/cofoja.git")
8252 (commit (string-append "v" version))))
8253 (file-name (string-append "java-cofoja-" version "-checkout"))
8254 (sha256
8255 (base32
8256 "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w"))))
8257 (build-system ant-build-system)
8258 (arguments
8259 `(#:build-target "dist"
8260 #:test-target "test"
8261 #:jdk ,icedtea-8
8262 #:make-flags
8263 (list "-Ddist.dir=dist")
8264 #:modules ((guix build ant-build-system)
8265 (guix build java-utils)
8266 (guix build utils)
8267 (srfi srfi-1)
8268 (ice-9 match))
8269 #:phases
8270 (modify-phases %standard-phases
8271 ;; The bulid system ignores the class path the ant-build-system sets
8272 ;; up and instead expects to find all dependencies in the "lib"
8273 ;; directory.
8274 (add-after 'unpack 'create-libdir
8275 (lambda* (#:key inputs #:allow-other-keys)
8276 (mkdir-p "lib")
8277 (for-each
8278 (lambda (file)
8279 (let ((target (string-append "lib/" (basename file))))
8280 (unless (file-exists? target)
8281 (symlink file target))))
8282 (append-map (match-lambda
8283 ((label . dir)
8284 (find-files dir "\\.jar$")))
8285 inputs))
8286 #t))
8287 (replace 'install (install-jars "dist")))))
8288 (inputs
8289 `(("java-asm" ,java-asm)))
8290 (native-inputs
8291 `(("java-junit" ,java-junit)))
8292 (home-page "https://github.com/nhatminhle/cofoja")
8293 (synopsis "Contracts for Java")
8294 (description "Contracts for Java, or Cofoja for short, is a contract
8295programming framework and test tool for Java, which uses annotation processing
8296and bytecode instrumentation to provide run-time checking. (In particular,
8297this is not a static analysis tool.)")
8298 (license license:lgpl3+)))
8299
5d104a27
JL
8300(define-public java-aopalliance
8301 (package
8302 (name "java-aopalliance")
8303 (version "1.0")
8304 (source (origin
8305 (method git-fetch)
8306 ;; Note: this git repository is not official, but contains the
8307 ;; source code that is in the CVS repository. Downloading the
8308 ;; tarball from sourceforge is undeterministic, and the cvs download
8309 ;; fails.
8310 (uri (git-reference
8311 (url "https://github.com/hoverruan/aopalliance")
8312 (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0")))
8313 (file-name (string-append name "-" version))
8314 (sha256
8315 (base32
8316 "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr"))))
8317 (build-system ant-build-system)
8318 (arguments
8319 `(#:jar-name "java-aopalliance.jar"
8320 #:jdk ,icedtea-8
8321 #:tests? #f; no tests
8322 #:source-dir "aopalliance/src/main"))
8323 (home-page "http://aopalliance.sourceforge.net")
8324 (synopsis "Aspect-Oriented Programming")
8325 (description "The AOP Alliance project is a joint project between several
8326software engineering people who are interested in Aspect-Oriented Programming
8327(AOP) and Java.")
8328 (license license:public-domain)))
454536e0
JL
8329
8330(define-public java-javax-inject
8331 (package
8332 (name "java-javax-inject")
8333 (version "tck-1")
8334 (source (origin
8335 (method url-fetch)
8336 (uri (string-append "https://github.com/javax-inject/javax-inject/"
8337 "archive/javax.inject-" version ".tar.gz"))
8338 (sha256
8339 (base32
8340 "1ydrlvh2r7vr1g7lhjwy3w2dggpj9h6pix1lakkkgdywb365n6g0"))))
8341 (build-system ant-build-system)
8342 (arguments
8343 `(#:jar-name "java-javax-inject.jar"
8344 #:jdk ,icedtea-8
8345 #:tests? #f)); no tests
8346 (home-page "http://github.com/javax-inject/javax-inject")
8347 (synopsis "JSR-330: Dependency Injection for Java")
8348 (description "This package specifies a means for obtaining objects in such
8349a way as to maximize reusability, testability and maintainability compared to
8350traditional approaches such as constructors, factories, and service locators
8351(e.g., JNDI). This process, known as dependency injection, is beneficial to
8352most nontrivial applications.
8353
8354Many types depend on other types. For example, a @var{Stopwatch} might depend
8355on a @var{TimeSource}. The types on which a type depends are known as its
8356dependencies. The process of finding an instance of a dependency to use at run
8357time is known as resolving the dependency. If no such instance can be found,
8358the dependency is said to be unsatisfied, and the application is broken.")
8359 (license license:asl2.0)))
5766984b
JL
8360
8361(define-public java-guice
8362 (package
8363 (name "java-guice")
8364 (version "4.1")
8365 (source (origin
8366 (method url-fetch)
8367 (uri (string-append "https://github.com/google/guice/archive/"
8368 version ".tar.gz"))
8369 (file-name (string-append name "-" version ".tar.gz"))
9936ffe7
BH
8370 (modules '((guix build utils)))
8371 (snippet
8372 `(begin
8373 (for-each delete-file (find-files "." ".*.jar"))))
5766984b
JL
8374 (sha256
8375 (base32
8376 "0dwmqjzlavb144ywqqglj3h68hqszkff8ai0a42hyb5il0qh4rbp"))))
8377 (build-system ant-build-system)
8378 (arguments
8379 `(#:jar-name "java-guice.jar"
8380 #:jdk ,icedtea-8
8381 #:tests? #f; FIXME: tests are not in a java sub directory
8382 #:source-dir "core/src"))
8383 (inputs
8384 `(("guava" ,java-guava)
8385 ("java-cglib" ,java-cglib)
8386 ("java-aopalliance" ,java-aopalliance)
8387 ("java-javax-inject" ,java-javax-inject)
8388 ("java-asm" ,java-asm)))
8389 (home-page "https://github.com/google/guice")
8390 (synopsis "Lightweight dependency injection framework")
8391 (description "Guice is a lightweight dependency injection framework fo
8392Java 6 and above.")
8393 (license license:asl2.0)))
ec4e8ad7
JL
8394
8395(define-public java-guice-servlet
8396 (package
8397 (inherit java-guice)
8398 (name "java-guice-servlet")
8399 (arguments
8400 `(#:jar-name "guice-servlet.jar"
8401 #:source-dir "extensions/servlet/src/"
8402 #:jdk ,icedtea-8
8403 #:tests? #f)); FIXME: not in a java subdir
8404 (inputs
8405 `(("guice" ,java-guice)
10eddaca 8406 ("servlet" ,java-classpathx-servletapi)
ec4e8ad7 8407 ,@(package-inputs java-guice)))))
b12fe1e5
JL
8408
8409(define-public java-assertj
8410 (package
8411 (name "java-assertj")
8412 (version "3.8.0")
8413 (source (origin
8414 (method url-fetch)
8415 (uri (string-append "https://github.com/joel-costigliola/"
8416 "assertj-core/archive/"
8417 "assertj-core-" version ".tar.gz"))
8418 (sha256
8419 (base32
8420 "1kf124fxskf548rklkg86294w2x6ajqrff94rrhyqns31danqkfz"))))
8421 (build-system ant-build-system)
8422 (arguments
8423 `(#:jar-name "java-assertj.jar"
8424 #:jdk ,icedtea-8
8425 #:source-dir "src/main/java"
8426 #:tests? #f)); depends on tng-junit which depends on assertj
8427 (inputs
8428 `(("cglib" ,java-cglib)
8429 ("junit" ,java-junit)
8430 ("hamcrest" ,java-hamcrest-core)))
8431 (native-inputs
8432 `(("mockito" ,java-mockito-1)))
8433 (home-page "https://joel-costigliola.github.io/assertj/index.html")
8434 (synopsis "Fluent assertions for java")
8435 (description "AssertJ core is a Java library that provides a fluent
8436interface for writing assertions. Its main goal is to improve test code
8437readability and make maintenance of tests easier.")
8438 (license license:asl2.0)))
6768e0a7
JL
8439
8440(define-public java-jboss-javassist
8441 (package
8442 (name "java-jboss-javassist")
8443 (version "3.21.0")
8444 (source (origin
8445 (method url-fetch)
8446 (uri (string-append "https://github.com/jboss-javassist/javassist/"
8447 "archive/rel_"
8448 (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)
8449 "_ga.tar.gz"))
8450 (sha256
8451 (base32
8452 "10lpcr3sbf7y6fq6fc2h2ik7rqrivwcy4747bg0kxhwszil3cfmf"))))
8453 (build-system ant-build-system)
8454 (arguments
8455 `(#:jar-name "java-jboss-javassist.jar"
8456 #:jdk ,icedtea-8
8457 #:source-dir "src/main"
8458 #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3
8459 #:phases
8460 (modify-phases %standard-phases
8461 (add-before 'configure 'remove-binary
8462 (lambda _
8463 (delete-file "javassist.jar")
8464 #t)))))
8465 (native-inputs
8466 `(("junit" ,java-junit)))
8467 (home-page "https://github.com/jboss-javassist/javassist")
8468 (synopsis "Java bytecode engineering toolkit")
8469 (description "Javassist (JAVA programming ASSISTant) makes Java bytecode
8470manipulation simple. It is a class library for editing bytecodes in Java; it
8471enables Java programs to define a new class at runtime and to modify a class
8472file when the JVM loads it.")
8473 (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl.
a6dd06d0
JL
8474
8475(define-public java-jcommander
8476 (package
8477 (name "java-jcommander")
8478 (version "1.71")
8479 (source (origin
8480 (method url-fetch)
8481 (uri (string-append "https://github.com/cbeust/jcommander/archive/"
8482 version ".tar.gz"))
8483 (file-name (string-append name "-" version ".tar.gz"))
8484 (sha256
8485 (base32
8486 "1f5k2ckay6qjc3d3w3d7bc0p3cx3c7n6p6zxvw1kibqdr0q98wlx"))))
8487 (build-system ant-build-system)
8488 (arguments
8489 `(#:jar-name "java-jcommander.jar"
8490 #:jdk ,icedtea-8
8491 #:tests? #f; requires testng which depends on jcommander
8492 #:source-dir "src/main/java"))
8493 (home-page "http://jcommander.org")
8494 (synopsis "Command line parameters parser")
8495 (description "JCommander is a very small Java framework that makes it
8496trivial to parse command line parameters. Parameters are declared with
8497annotations.")
8498 (license license:asl2.0)))
11bc385b
JL
8499
8500(define-public java-bsh
8501 (package
8502 (name "java-bsh")
8503 (version "2.0b6")
8504 (source (origin
8505 (method url-fetch)
8506 (uri (string-append "https://github.com/beanshell/beanshell/archive/"
8507 version ".tar.gz"))
8508 (file-name (string-append name "-" version ".tar.gz"))
8509 (sha256
8510 (base32
8511 "1bawkxk6jyc75hxvzkpz689h73cn3f222m0ar3nvb0dal2b85kfv"))))
8512 (build-system ant-build-system)
8513 (arguments
8514 `(#:build-target "jarall"
8515 #:test-target "junit-tests-all"
8516 #:phases
8517 (modify-phases %standard-phases
8518 (replace 'install
8519 (lambda* (#:key outputs #:allow-other-keys)
8520 (let ((share (string-append (assoc-ref outputs "out") "/share/java")))
8521 (mkdir-p share)
8522 (copy-file "dist/bsh-2.0b6.jar" (string-append share "/bsh-2.0b6.jar"))
8523 #t))))))
8524 (home-page "http://beanshell.org/")
8525 (synopsis "Lightweight Scripting for Java")
8526 (description "BeanShell is a small, free, embeddable Java source
8527interpreter with object scripting language features, written in Java.
8528BeanShell dynamically executes standard Java syntax and extends it with common
8529scripting conveniences such as loose types, commands, and method closures like
8530those in Perl and JavaScript.")
8531 (license license:asl2.0)))
7a343e97
JL
8532
8533(define-public java-fest-util
8534 (package
8535 (name "java-fest-util")
8536 (version "1.2.5")
8537 (source (origin
8538 (method url-fetch)
8539 (uri (string-append "https://github.com/alexruiz/fest-util/"
8540 "archive/fest-util-" version ".tar.gz"))
8541 (sha256
8542 (base32
8543 "05g6hljz5mdaakk8d7g32klbhz9bdwp3qlj6rdaggdidxs3x1sb8"))))
8544 (build-system ant-build-system)
8545 (arguments
8546 `(#:jar-name "java-fest-util.jar"
8547 #:source-dir "src/main/java"))
8548 (native-inputs
8549 `(("junit" ,java-junit)
8550 ("hamcrest" ,java-hamcrest-core)))
8551 (home-page "https://github.com/alexruiz/fest-util")
8552 (synopsis "FEST common utilities")
8553 (description "Common utilities used in all FEST module.")
8554 (license license:asl2.0)))
3c6c8358
JL
8555
8556(define-public java-fest-test
8557 (package
8558 (name "java-fest-test")
8559 (version "2.1.0")
8560 (source (origin
8561 (method url-fetch)
8562 (uri (string-append "https://github.com/alexruiz/fest-test/"
8563 "archive/fest-test-" version ".tar.gz"))
8564 (sha256
8565 (base32
8566 "1rxfbw6l9vc65iy1x3fb617qc6y4w2k430pgf1mfbxfdlxbm0f7g"))))
8567 (build-system ant-build-system)
8568 (arguments
8569 `(#:jar-name "java-fest-test.jar"
8570 #:source-dir "src/main/java"
8571 #:tests? #f)); no tests
8572 (inputs
8573 `(("junit" ,java-junit)))
8574 (home-page "https://github.com/alexruiz/fest-test")
8575 (synopsis "Common FEST testing infrastructure")
8576 (description "Fest-test contains the common FEST testing infrastructure.")
8577 (license license:asl2.0)))
ca98e448
JL
8578
8579(define-public java-fest-assert
8580 (package
8581 (name "java-fest-assert")
8582 (version "2.0M10")
8583 (source (origin
8584 (method url-fetch)
8585 (uri (string-append "https://github.com/alexruiz/fest-assert-2.x/"
8586 "archive/fest-assert-core-" version ".tar.gz"))
8587 (sha256
8588 (base32
8589 "1bi0iqavikzww6rxvz5jyg7y6bflv95s6ibryxx0xfcxrrw6i5lw"))))
8590 (build-system ant-build-system)
8591 (arguments
8592 `(#:jar-name "java-fest-assert.jar"
8593 #:source-dir "src/main/java"
8594 #:test-exclude
8595 (list
8596 "**/Abstract*.java"
8597 "**/*BaseTest.java"
8598 ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses
8599 "**/MessageFormatter_format_Test.java"
8600 "**/internal/*/*_assert*_Test.java")))
8601 (inputs
8602 `(("java-fest-util" ,java-fest-util)))
8603 (native-inputs
8604 `(("java-junit" ,java-junit)
8605 ("java-fest-test" ,java-fest-test)
8606 ("java-hamcrest-core" ,java-hamcrest-core)
8607 ("java-mockito" ,java-mockito-1)
8608 ("java-cglib" ,java-cglib)
8609 ("java-objenesis" ,java-objenesis)
8610 ("java-asm" ,java-asm)))
8611 (home-page "https://github.com/alexruiz/fest-assert-2.x")
8612 (synopsis "FEST fluent assertions")
8613 (description "FEST-Assert provides a fluent interface for assertions.")
8614 (license license:asl2.0)))
0442d897
JL
8615
8616(define-public java-testng
8617 (package
8618 (name "java-testng")
3422e10e 8619 (version "6.14.3")
0442d897 8620 (source (origin
36b39d16
RW
8621 (method git-fetch)
8622 (uri (git-reference
8623 (url "https://github.com/cbeust/testng.git")
8624 (commit version)))
8625 (file-name (string-append name "-" version "-checkout"))
0442d897
JL
8626 (sha256
8627 (base32
3422e10e 8628 "0y6vq30i5g276kw0v2bhbvci22ijg7ax49ap2611yqlhbs4d6dqv"))))
0442d897
JL
8629 (build-system ant-build-system)
8630 (arguments
8631 `(#:jdk ,icedtea-8; java.util.function
8632 #:jar-name "java-testng.jar"
8633 #:source-dir "src/main/java"
8634 #:phases
8635 (modify-phases %standard-phases
36b39d16
RW
8636 ;; FIXME: I don't know why these tests fail
8637 (add-after 'unpack 'delete-failing-tests
8638 (lambda _
8639 (substitute* "src/test/resources/testng.xml"
8640 (("<class name=\"test.configuration.github1625.TestRunnerIssue1625\"/>") "")
8641 (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") ""))
8642 #t))
8643 ;; We don't have groovy
8644 (add-after 'unpack 'delete-groovy-tests
8645 (lambda _
8646 (delete-file-recursively "src/test/java/test/dependent/issue1648/")
8647 (substitute* "src/test/resources/testng.xml"
8648 (("<class name=\"test.dependent.issue1648.TestRunner\"/>") ""))
8649 #t))
0442d897
JL
8650 (add-before 'build 'copy-resources
8651 (lambda _
8652 (copy-recursively "src/main/resources" "build/classes")
8653 #t))
8654 (add-before 'check 'copy-test-resources
8655 (lambda _
8656 (copy-recursively "src/test/resources" "build/test-classes")
8657 #t))
8658 (replace 'check
8659 (lambda _
2c8ac364 8660 (invoke "ant" "compile-tests")
0442d897
JL
8661 ;; we don't have groovy
8662 (substitute* "src/test/resources/testng.xml"
8663 (("<class name=\"test.groovy.GroovyTest\" />") ""))
2c8ac364
MW
8664 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8665 ":build/classes"
8666 ":build/test-classes")
8667 "-Dtest.resources.dir=src/test/resources"
8668 "org.testng.TestNG" "src/test/resources/testng.xml"))))))
0442d897
JL
8669 (propagated-inputs
8670 `(("junit" ,java-junit)
8671 ("java-jsr305" ,java-jsr305)
8672 ("java-bsh" ,java-bsh)
8673 ("java-jcommander" ,java-jcommander)
8674 ("java-guice" ,java-guice)
8675 ("snakeyaml" ,java-snakeyaml)))
8676 (native-inputs
8677 `(("guava" ,java-guava)
8678 ("java-javax-inject" ,java-javax-inject)
8679 ("java-hamcrest" ,java-hamcrest-all)
8680 ("java-assertj" ,java-assertj)
36b39d16 8681 ("java-mockito" ,java-mockito-1)
0442d897
JL
8682 ("cglib" ,java-cglib)
8683 ("asm" ,java-asm)
8684 ("aopalliance" ,java-aopalliance)))
8685 (home-page "http://testng.org")
8686 (synopsis "Testing framework")
8687 (description "TestNG is a testing framework inspired from JUnit and NUnit
8688but introducing some new functionalities that make it more powerful and easier
8689to use.")
8690 (license license:asl2.0)))
1717a7de
JL
8691
8692(define-public java-jnacl
3e87923a
RW
8693 (let ((commit "094e819afdd63ea81a499b3bcb42a271006bebd9")
8694 (revision "2"))
8695 (package
8696 (name "java-jnacl")
8697 (version (string-append "0.1.0-" revision "." (string-take commit 7)))
8698 (source (origin
8699 (method git-fetch)
8700 (uri (git-reference
8701 (url "https://github.com/neilalexander/jnacl.git")
8702 (commit commit)))
6c34ad73 8703 (file-name (git-file-name name version))
3e87923a
RW
8704 (sha256
8705 (base32
8706 "1d6g6xhn83byv5943n7935wwjsk0ibk0qdvqgr699qqgqqmwisbb"))))
8707 (build-system ant-build-system)
8708 (arguments
8c7d32e0 8709 `(#:jar-name "jnacl.jar"
3e87923a
RW
8710 #:source-dir "src/main/java"
8711 #:jdk ,icedtea-8
8712 #:phases
8713 (modify-phases %standard-phases
8714 (add-before 'build 'fix-tests
8715 (lambda _
8716 (substitute* '("src/test/java/com/neilalexander/jnacl/NaClTest.java"
8717 "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java")
8718 (("assertions.Assertions") "assertions.api.Assertions"))
8719 #t))
8720 (replace 'check
8721 (lambda _
8722 (invoke "ant" "compile-tests")
8723 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8724 ":build/classes"
8725 ":build/test-classes")
8726 "org.testng.TestNG" "-testclass"
8727 "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class")
8728 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8729 ":build/classes"
8730 ":build/test-classes")
8731 "org.testng.TestNG" "-testclass"
2c8ac364 8732 "build/test-classes/com/neilalexander/jnacl/NaClTest.class"))))))
3e87923a
RW
8733 (native-inputs
8734 `(("java-testng" ,java-testng)
8735 ("java-fest-util" ,java-fest-util)
8736 ("java-fest-assert" ,java-fest-assert)))
8737 (home-page "https://github.com/neilalexander/jnacl")
8738 (synopsis "Java implementation of NaCl")
8739 (description "Pure Java implementation of the NaCl: Networking and
1717a7de 8740Cryptography library.")
3e87923a 8741 (license license:bsd-2))))
eaf3cb7a
JL
8742
8743(define-public java-mvel2
8744 (package
8745 (name "java-mvel2")
8746 (version "2.3.1")
8747 (source (origin
8748 (method url-fetch)
8749 (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-"
8750 version ".Final.tar.gz"))
8751 (sha256
8752 (base32
8753 "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z"))))
8754 (build-system ant-build-system)
8755 (arguments
8756 `(#:jar-name "mvel2.jar"
8757 #:source-dir "src/main/java"
8758 #:test-exclude
8759 (list "**/Abstract*.java"
8760 ;; Base class with no tests
8761 "**/MVELThreadTest.java")
8762 #:phases
8763 (modify-phases %standard-phases
8764 (add-after 'install 'install-bin
8765 (lambda* (#:key outputs #:allow-other-keys)
8766 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
8767 (mkdir-p bin)
8768 (with-output-to-file (string-append bin "/mvel2")
8769 (lambda _
8770 (display
8771 (string-append
8772 "#!" (which "bash") "\n"
8773 "if [ \"$#\" -ne \"2\" ]; then\n"
8774 "echo 'Usage: mvel2 <script> <out.dir>'\n"
8775 "exit\n"
8776 "fi\n"
8777 "java -Dout.dir=$2 -cp " (getenv "CLASSPATH")
8778 ":" (assoc-ref outputs "out") "/share/java/mvel2.jar"
8779 " org.mvel2.sh.Main $1"))))
8780 (chmod (string-append bin "/mvel2") #o755))
8781 #t)))))
8782 (native-inputs
8783 `(("junit" ,java-junit)
8784 ("hamcrest" ,java-hamcrest-core)))
8785 (home-page "https://github.com/mvel/mvel")
8786 (synopsis "MVFLEX Expression Language")
8787 (description "MVEL has largely been inspired by Java syntax, but has some
8788fundamental differences aimed at making it more efficient as an expression
8789language, such as operators that directly support collection, array and string
8790matching, as well as regular expressions. MVEL is used to evaluate expressions
8791written using Java syntax.
8792
8793In addition to the expression language, MVEL serves as a templating language for
8794configuration and string construction.")
8795 (license license:asl2.0)))
d54d7d31 8796
9e325e8c
RW
8797(define-public java-commons-jexl-2
8798 (package
8799 (name "java-commons-jexl")
8800 (version "2.1.1")
8801 (source (origin
8802 (method url-fetch)
8803 (uri (string-append "mirror://apache/commons/jexl/source/"
8804 "commons-jexl-" version "-src.tar.gz"))
8805 (sha256
8806 (base32
8807 "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz"))))
8808 (build-system ant-build-system)
8809 (arguments
8810 `(#:jar-name "commons-jexl-2.jar"
8811 #:jdk ,icedtea-8
8812 #:source-dir "src/main/java"
8813 #:phases
8814 (modify-phases %standard-phases
8815 (add-before 'check 'disable-broken-tests
8816 (lambda* (#:key inputs #:allow-other-keys)
8817 (with-directory-excursion "src/test/java/org/apache/commons/jexl2/"
8818 (substitute* "ArithmeticTest.java"
8819 (("asserter.assertExpression\\(\"3 / 0\"") "//")
8820 (("asserter.assertExpression\\(\"imanull") "//"))
8821 ;; This test fails with "ambiguous method invocation"
8822 (delete-file "CacheTest.java")
8823 ;; This test doesn't have access to the temp directory
8824 (substitute* "ClassCreatorTest.java"
8825 (("java.io.tmpdir") "user.dir"))
8826 ;; This test fails in trying to detect whether it can run.
8827 (substitute* "ClassCreator.java"
8828 (("boolean canRun =.*") "boolean canRun = false;\n"))
8829 ;; ...and these tests depend on it.
8830 (delete-file "scripting/JexlScriptEngineOptionalTest.java")
8831 (delete-file "scripting/JexlScriptEngineTest.java"))
8832 #t))
8833 (add-before 'build 'run-javacc
8834 (lambda _
8835 (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/"
080d0b60
RW
8836 (invoke "java" "jjtree" "Parser.jjt")
8837 (invoke "java" "javacc" "Parser.jj"))
8838 #t)))))
9e325e8c
RW
8839 (inputs
8840 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
8841 (native-inputs
8842 `(("java-junit" ,java-junit)
8843 ("java-hamcrest-core" ,java-hamcrest-core)
8844 ("javacc" ,javacc-4)))
8845 (home-page "https://commons.apache.org/proper/commons-jexl/")
8846 (synopsis "Java Expression Language ")
8847 (description "JEXL is a library intended to facilitate the implementation
8848of dynamic and scripting features in applications and frameworks written in
8849Java. JEXL implements an Expression Language based on some extensions to the
8850JSTL Expression Language supporting most of the constructs seen in
8851shell-script or ECMAScript. Its goal is to expose scripting features usable
8852by technical operatives or consultants working with enterprise platforms.")
8853 (license license:asl2.0)))
8854
d54d7d31
JL
8855(define-public java-lz4
8856 (package
8857 (name "java-lz4")
8858 (version "1.4.0")
8859 (source (origin
8860 (method url-fetch)
8861 (uri (string-append "https://github.com/lz4/lz4-java/archive/"
8862 version ".tar.gz"))
8863 (file-name (string-append name "-" version ".tar.gz"))
8864 (sha256
8865 (base32
8866 "096dm57p2lzqk28n0j2p52x2j3cvnsd2dfqn43n7vbwrkjsy7y54"))))
8867 (build-system ant-build-system)
8868 (arguments
8869 `(#:jar-name "lz4.jar"
8870 #:jdk ,icedtea-8
8871 #:source-dir "src/java:src/java-unsafe"
8872 #:tests? #f; FIXME: requires more dependencies
8873 #:phases
8874 (modify-phases %standard-phases
8875 (add-before 'configure 'generate-source
8876 (lambda _
8877 (with-directory-excursion "src/build/source_templates"
1b6bc516
RW
8878 (invoke "mvel2" "../gen_sources.mvel" "../../java"))
8879 #t)))))
d54d7d31
JL
8880 (native-inputs
8881 `(("mvel" ,java-mvel2)))
8882 (home-page "https://jpountz.github.io/lz4-java")
8883 (synopsis "Compression algorithm")
8884 (description "LZ4 - Java is a Java port of the popular lz4 compression
8885algorithms and xxHash hashing algorithm.")
8886 (license license:asl2.0)))
62315865 8887
50d70a72 8888(define-public java-bouncycastle
62315865 8889 (package
50d70a72 8890 (name "java-bouncycastle")
248a9e16 8891 (version "1.60")
62315865
JL
8892 (source (origin
8893 (method url-fetch)
50d70a72 8894 (uri (string-append "https://github.com/bcgit/bc-java/archive/r"
248a9e16 8895 (substring version 0 1) "v"
50d70a72 8896 (substring version 2 4) ".tar.gz"))
62315865
JL
8897 (sha256
8898 (base32
248a9e16 8899 "0v434513y708qc87k4xz13p2kzydc736lk3ks67df9mg11s7hchv"))
50d70a72
JL
8900 (modules '((guix build utils)))
8901 (snippet
8902 '(begin
8903 (for-each delete-file
8904 (find-files "." "\\.jar$"))
8905 #t))))
62315865
JL
8906 (build-system ant-build-system)
8907 (arguments
50d70a72 8908 `(#:jdk ,icedtea-8
0c68f7fd 8909 #:tests? #f
62315865
JL
8910 #:phases
8911 (modify-phases %standard-phases
50d70a72 8912 (replace 'build
62315865 8913 (lambda _
50d70a72 8914 (invoke "ant" "-f" "ant/jdk15+.xml" "build-provider")
2c8ac364 8915 (invoke "ant" "-f" "ant/jdk15+.xml" "build")))
0c68f7fd
RW
8916 ;; FIXME: the tests freeze.
8917 ;; (replace 'check
8918 ;; (lambda _
8919 ;; (invoke "ant" "-f" "ant/jdk15+.xml" "test")))
50d70a72
JL
8920 (replace 'install
8921 (install-jars "build/artifacts/jdk1.5/jars")))))
8922 (inputs
8923 `(("java-javax-mail" ,java-javax-mail)))
31208367
JL
8924 (native-inputs
8925 `(("unzip" ,unzip)
50d70a72
JL
8926 ("junit" ,java-junit)
8927 ("java-native-access" ,java-native-access)
8928 ("java-native-access-platform" ,java-native-access-platform)))
31208367
JL
8929 (home-page "https://www.bouncycastle.org")
8930 (synopsis "Cryptographic library")
50d70a72
JL
8931 (description "Bouncy Castle is a cryptographic library for the Java
8932programming language.")
31208367 8933 (license license:expat)))
a53d9ac0
JL
8934
8935(define-public java-lmax-disruptor
8936 (package
8937 (name "java-lmax-disruptor")
8938 (version "3.3.7")
8939 (source (origin
8940 (method url-fetch)
8941 (uri (string-append "https://github.com/LMAX-Exchange/disruptor/"
8942 "archive/" version ".tar.gz"))
8943 (file-name (string-append name "-" version ".tar.gz"))
8944 (sha256
8945 (base32
8946 "17da2gwj5abnlsfgn2xqjk5lgzbg4vkb0hdv2dvc8r2fx4bi7w3g"))))
8947 (build-system ant-build-system)
8948 (arguments
8949 `(#:jar-name "java-lmax-disruptor.jar"
8950 #:jdk ,icedtea-8
8951 #:tests? #f)); tests hang
8952 (inputs
8953 `(("junit" ,java-junit)
8954 ("java-hdrhistogram" ,java-hdrhistogram)
8955 ("java-jmock" ,java-jmock)
8956 ("java-jmock-legacy" ,java-jmock-legacy)
8957 ("java-jmock-junit4" ,java-jmock-junit4)
8958 ("java-hamcrest-all" ,java-hamcrest-all)))
8959 (native-inputs
8960 `(("cglib" ,java-cglib)
8961 ("objenesis" ,java-objenesis)
8962 ("asm" ,java-asm)))
8963 (home-page "https://www.lmax.com/disruptor")
8964 (synopsis "High performance inter-thread communication")
8965 (description "LMAX Disruptor is a software pattern and software component
8966for high performance inter-thread communication that avoids the need for
8967message queues or resource locking.")
8968 (license license:asl2.0)))
5619556b 8969
5e3abfc8
RW
8970(define-public java-commons-bcel
8971 (package
8972 (name "java-commons-bcel")
8973 (version "6.1")
8974 (source (origin
8975 (method url-fetch)
8976 (uri (string-append "mirror://apache/commons/bcel/source/bcel-"
8977 version "-src.tar.gz"))
8978 (sha256
8979 (base32
8980 "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy"))))
8981 (build-system ant-build-system)
8982 (arguments
8983 `(#:jar-name "bcel.jar"
8984 #:jdk ,icedtea-8
8985 #:source-dir "src/main/java"
8986 #:test-dir "src/test/java"
8987 ;; FIXME: Tests require the unpackaged jna.
8988 #:tests? #f))
8989 (home-page "https://commons.apache.org/proper/commons-bcel/")
8990 (synopsis "Byte code engineering library")
8991 (description "The Byte Code Engineering Library (Apache Commons BCEL) is
8992intended to give users a convenient way to analyze, create, and
8993manipulate (binary) Java class files. Classes are represented by objects
8994which contain all the symbolic information of the given class: methods, fields
8995and byte code instructions, in particular.
8996
8997Such objects can be read from an existing file, be transformed by a
8998program (e.g. a class loader at run-time) and written to a file again. An
8999even more interesting application is the creation of classes from scratch at
9000run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful
9001if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format
9002of Java @code{.class} files.")
9003 (license license:asl2.0)))
9004
5619556b
JL
9005(define-public java-xerial-core
9006 (package
9007 (name "java-xerial-core")
9008 (version "2.1")
9009 (source (origin
9010 (method url-fetch)
9011 (uri (string-append "https://github.com/xerial/xerial-java/archive/"
9012 version ".tar.gz"))
9013 (file-name (string-append name "-" version ".tar.gz"))
9014 (sha256
9015 (base32
9016 "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d"))))
9017 (build-system ant-build-system)
9018 (arguments
9019 `(#:jar-name "xerial-core.jar"
9020 #:source-dir "xerial-core/src/main/java"
9021 #:test-dir "xerial-core/src/test"
9022 #:phases
9023 (modify-phases %standard-phases
9024 (add-before 'build 'copy-resources
9025 (lambda _
9026 (copy-recursively "xerial-core/src/main/resources"
9027 "build/classes")
9028 #t)))))
9029 (native-inputs
9030 `(("junit" ,java-junit)
9031 ("hamcrest" ,java-hamcrest-core)))
9032 (home-page "https://github.com/xerial/xerial-java")
f4548394 9033 (synopsis "Data management libraries for Java")
5619556b 9034 (description "Xerial is a set of data management libraries for the Java
f4548394 9035programming language. The ultimate goal of the Xerial project is to manage
5619556b
JL
9036everything as database, including class objects, text format data, data
9037streams, etc.")
9038 (license license:asl2.0)))
8d6a4815
JL
9039
9040(define-public java-powermock-reflect
9041 (package
9042 (name "java-powermock-reflect")
9043 (version "1.7.3")
9044 (source (origin
9045 (method url-fetch)
9046 (uri (string-append "https://github.com/powermock/powermock/"
9047 "archive/powermock-" version ".tar.gz"))
9048 (file-name (string-append name "-" version ".tar.gz"))
9049 (sha256
9050 (base32
9051 "0sbgi5vqq7k72wzcdjb20s370vyd4hsbnx71pzb8ishml3gy7fwy"))
9052 (patches
9053 (search-patches "java-powermock-fix-java-files.patch"))))
9054 (build-system ant-build-system)
9055 (arguments
9056 `(#:jar-name "java-powermock-reflect.jar"
9057 #:jdk ,icedtea-8
9058 #:source-dir "powermock-reflect/src/main/java"
9059 #:test-dir "powermock-reflect/src/test"))
9060 (inputs
9061 `(("java-objenesis" ,java-objenesis)))
9062 (native-inputs
9063 `(("junit" ,java-junit)
9064 ("cglib" ,java-cglib)
9065 ("asm" ,java-asm)
9066 ("hamcrest" ,java-hamcrest-core)
9067 ("assertj" ,java-assertj)))
9068 (home-page "https://github.com/powermock/powermock")
9069 (synopsis "Mock library extension framework")
9070 (description "PowerMock is a framework that extends other mock libraries
9071such as EasyMock with more powerful capabilities. PowerMock uses a custom
9072classloader and bytecode manipulation to enable mocking of static methods,
9073constructors, final classes and methods, private methods, removal of static
9074initializers and more. By using a custom classloader no changes need to be
9075done to the IDE or continuous integration servers which simplifies adoption.")
9076 (license license:asl2.0)))
d4a4d5da
JL
9077
9078(define-public java-powermock-core
9079 (package
9080 (inherit java-powermock-reflect)
9081 (name "java-powermock-core")
9082 (arguments
9083 `(#:jar-name "java-powermock-core.jar"
9084 #:source-dir "powermock-core/src/main/java"
9085 #:test-dir "powermock-core/src/test"
9086 #:tests? #f; requires powermock-api
59e0021c
JL
9087 #:jdk ,icedtea-8
9088 #:phases
9089 (modify-phases %standard-phases
9090 (add-before 'build 'copy-resources
9091 (lambda _
9092 (copy-recursively "powermock-core/src/main/resources"
2c8ac364
MW
9093 "build/classes")
9094 #t)))))
d4a4d5da
JL
9095 (inputs
9096 `(("reflect" ,java-powermock-reflect)
9097 ("javassist" ,java-jboss-javassist)))
9098 (native-inputs
9099 `(("junit" ,java-junit)
9100 ("assertj" ,java-assertj)
9101 ("mockito" ,java-mockito-1)))))
2d5d65d7
JL
9102
9103(define-public java-powermock-api-support
9104 (package
9105 (inherit java-powermock-reflect)
9106 (name "java-powermock-api-support")
9107 (build-system ant-build-system)
9108 (arguments
9109 `(#:jar-name "java-powermock-api-support.jar"
9110 #:jdk ,icedtea-8
9111 #:source-dir "powermock-api/powermock-api-support/src/main/java"
9112 #:tests? #f)); no tests
9113 (inputs
9114 `(("core" ,java-powermock-core)
9115 ("reflect" ,java-powermock-reflect)))))
6c21d46c
JL
9116
9117(define-public java-powermock-modules-junit4-common
9118 (package
9119 (inherit java-powermock-reflect)
9120 (name "java-powermock-modules-junit4-common")
9121 (build-system ant-build-system)
9122 (arguments
9123 `(#:jar-name "java-powermock-modules-junit4-common.jar"
9124 #:jdk ,icedtea-8
9125 #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java"
9126 #:test-dir "powermock-modules/powermock-module-junit4-common/src/test"))
9127 (inputs
9128 `(("core" ,java-powermock-core)
9129 ("easymock" ,java-easymock)
9130 ("reflect" ,java-powermock-reflect)
9131 ("hamcrest" ,java-hamcrest-core)
9132 ("cglib" ,java-cglib)))))
33db1681
JL
9133
9134(define-public java-powermock-modules-junit4
9135 (package
9136 (inherit java-powermock-reflect)
9137 (name "java-powermock-modules-junit4")
9138 (build-system ant-build-system)
9139 (arguments
9140 `(#:jar-name "java-powermock-modules-junit4.jar"
9141 #:jdk ,icedtea-8
9142 #:source-dir "powermock-modules/powermock-module-junit4/src/main/java"
1124683d
JL
9143 #:test-dir "powermock-modules/powermock-module-junit4/src/test"
9144 #:phases
9145 (modify-phases %standard-phases
9146 (add-before 'build 'fix-junit-detection
9147 (lambda _
9148 ;; Our junit version is 4.12-SNAPSHOT
9149 (substitute* (find-files "powermock-modules/powermock-module-junit4"
9150 "PowerMockJUnit4MethodValidator.java")
2c8ac364
MW
9151 (("4.12") "4.12-SNAPSHOT"))
9152 #t)))))
33db1681
JL
9153 (inputs
9154 `(("core" ,java-powermock-core)
9155 ("reflect" ,java-powermock-reflect)
9156 ("common" ,java-powermock-modules-junit4-common)
9157 ("cglib" ,java-cglib)))
9158 (native-inputs
9159 `(("easymock" ,java-easymock)
9160 ("hamcrest" ,java-hamcrest-core)
9161 ("objenesis" ,java-objenesis)
9162 ("asm" ,java-asm)
9163 ("junit" ,java-junit)))))
4d508975
JL
9164
9165(define-public java-powermock-api-easymock
9166 (package
9167 (inherit java-powermock-reflect)
9168 (name "java-powermock-api-easymock")
9169 (build-system ant-build-system)
9170 (arguments
9171 `(#:jar-name "java-powermock-api-easymock.jar"
9172 #:jdk ,icedtea-8
9173 #:source-dir "powermock-api/powermock-api-easymock/src/main/java"
9174 #:tests? #f; no tests
9175 #:phases
9176 (modify-phases %standard-phases
9177 (add-before 'build 'fix-file
9178 (lambda _
9179 ;; FIXME: This looks wrong, but it fixes a build error.
9180 (with-directory-excursion "powermock-api/powermock-api-easymock"
9181 (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java"
9182 (("classLoader instanceof MockClassLoader") "false")
9183 (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";")))
9184 #t)))))
9185 (inputs
9186 `(("core" ,java-powermock-core)
9187 ("easymock" ,java-easymock)
9188 ("reflect" ,java-powermock-reflect)
9189 ("support" ,java-powermock-api-support)
9190 ("cglib" ,java-cglib)))))
5fb3e822
JL
9191
9192(define-public java-jboss-jms-api-spec
9193 (package
9194 (name "java-jboss-jms-api-spec")
9195 (version "2.0")
9196 (source (origin
9197 (method url-fetch)
9198 (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/"
9199 "archive/jboss-jms-api_" version
9200 "_spec-1.0.1.Final.tar.gz"))
9201 (sha256
9202 (base32
9203 "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m"))))
9204 (build-system ant-build-system)
9205 (arguments
9206 `(#:jar-name "java-jboss-jms-api_spec.jar"
9207 #:jdk ,icedtea-8
9208 #:source-dir "."
9209 #:tests? #f)); no tests
9210 (home-page "https://github.com/jboss/jboss-jms-api_spec")
9211 (synopsis "Java Message Service API specification")
9212 (description "Java Message Service (JMS) API is used to send messages
9213messages between two or more clients. It is a messaging standard that allows
9214application components to create, send, receive, and read messages.")
9215 ; either gpl2 only with GPL Classpath Exception, or cddl.
9216 (license (list license:gpl2 license:cddl1.0))))
3ff47c66
JL
9217
9218(define-public java-mail
9219 (package
9220 (name "java-mail")
9221 (version "1.6.0")
9222 (source (origin
9223 (method url-fetch)
9224 (uri (string-append "https://github.com/javaee/javamail/archive/"
9225 "JAVAMAIL-1_6_0.tar.gz"))
9226 (sha256
9227 (base32
9228 "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92"))))
9229 (build-system ant-build-system)
9230 (arguments
9231 `(#:jar-name "java-mail.jar"
9232 #:jdk ,icedtea-8
9233 #:source-dir "mail/src/main/java"
9234 #:test-dir "mail/src/test"
9235 #:test-exclude
9236 (list "**/CollectorFormatterTest.java"
9237 "**/CompactFormatterTest.java"
9238 "**/DurationFilterTest.java"
9239 "**/MailHandlerTest.java"
9240 "**/GetLocalAddressTest.java"
9241 ;; FIXME: both end with:
9242 ;; java.lang.ClassNotFoundException:
9243 ;; javax.mail.internet.MimeMultipartParseTest
9244 "**/MimeMultipartParseTest.java"
9245 "**/SearchTermSerializationTest.java")
9246 #:phases
9247 (modify-phases %standard-phases
9248 (add-before 'configure 'move-version.java
9249 (lambda _
9250 (copy-file "mail/src/main/resources/javax/mail/Version.java"
218d1dde
RW
9251 "mail/src/main/java/javax/mail/Version.java")
9252 #t))
3ff47c66
JL
9253 (add-before 'build 'copy-resources
9254 (lambda _
9255 (copy-recursively "mail/src/main/resources/META-INF"
9256 "build/classes/META-INF")
9257 #t)))))
9258 (native-inputs
9259 `(("junit" ,java-junit)
9260 ("hamcrest" ,java-hamcrest-core)))
9261 (home-page "https://javaee.github.io/javamail/")
9262 (synopsis "Mail-related functionnalities in Java")
9263 (description "The JavaMail API provides a platform-independent and
9264protocol-independent framework to build mail and messaging applications.")
9265 ;; General Public License Version 2 only ("GPL") or the Common Development
9266 ;; and Distribution License("CDDL")
9267 (license (list license:cddl1.1
9268 license:gpl2)))); with classpath exception
217b20e4
JL
9269
9270(define-public java-jeromq
9271 (package
9272 (name "java-jeromq")
4aa0a1df 9273 (version "0.4.3")
217b20e4 9274 (source (origin
4aa0a1df
RW
9275 (method git-fetch)
9276 (uri (git-reference
9277 (url "https://github.com/zeromq/jeromq.git")
9278 (commit (string-append "v" version))))
9279 (file-name (string-append name "-" version "-checkout"))
217b20e4
JL
9280 (sha256
9281 (base32
594bd3a0
GB
9282 "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj"))
9283 (patches (search-patches "java-jeromq-fix-tests.patch"))))
217b20e4
JL
9284 (build-system ant-build-system)
9285 (arguments
9286 `(#:jar-name "java-jeromq.jar"
9287 #:source-dir "src/main/java"
9288 #:jdk ,icedtea-8
9289 #:test-exclude
9290 (list
9291 "**/Abstract*.java"
9292 ;; Requires network
9293 "**/ZBeaconTest.java"
9294 ;; Failures
4aa0a1df 9295 "**/DealerSpecTest.java"
217b20e4 9296 "**/CustomDecoderTest.java"
594bd3a0
GB
9297 "**/CustomEncoderTest.java"
9298 "**/ConnectRidTest.java"
9299 "**/ReqSpecTest.java"
9300 "**/PushPullSpecTest.java"
9301 "**/PubSubHwmTest.java"
9302 "**/RouterSpecTest.java"
9303 "**/ProxyTest.java")))
217b20e4
JL
9304 (inputs
9305 `(("java-jnacl" ,java-jnacl)))
9306 (native-inputs
9307 `(("java-hamcrest-core" ,java-hamcrest-core)
9308 ("junit" ,java-junit)))
9309 (home-page "http://zeromq.org/bindings:java")
9310 (synopsis "Java binding for 0MQ")
9311 (description "Jeromq provides the java bindings for 0MQ.")
9312 (license license:mpl2.0)))
46c6905a
JL
9313
9314(define-public java-kafka-clients
9315 (package
9316 (name "java-kafka-clients")
9317 (version "1.0.0")
9318 (source (origin
9319 (method url-fetch)
9320 (uri (string-append "mirror://apache/kafka/" version "/kafka-"
9321 version "-src.tgz"))
9322 (sha256
9323 (base32
9324 "1yxmnsmliwm7671q5yy9bl4jdqyyn00n26cggz9brwczx80w1vfq"))))
9325 (build-system ant-build-system)
9326 (arguments
9327 `(#:jar-name "java-kafka-clients.jar"
9328 #:jdk ,icedtea-8
9329 #:source-dir "clients/src/main/java"
9330 #:test-dir "clients/src/test"
9331 #:test-exclude
9332 (list
9333 ;; This file does not contain a class
9334 "**/IntegrationTest.java"
9335 ;; Requires network
9336 "**/ClientUtilsTest.java"
9337 ;; End with errors that seem related to our powermock
9338 "**/KafkaProducerTest.java"
9339 "**/BufferPoolTest.java")))
9340 (inputs
9341 `(("java-slf4j-api" ,java-slf4j-api)
9342 ("java-lz4" ,java-lz4)))
9343 (native-inputs
9344 `(("junit" ,java-junit)
9345 ("hamcrest" ,java-hamcrest-all)
9346 ("objenesis" ,java-objenesis)
9347 ("asm" ,java-asm)
9348 ("cglib" ,java-cglib)
9349 ("javassist" ,java-jboss-javassist)
9350 ("snappy" ,java-snappy)
9351 ("easymock" ,java-easymock)
9352 ("powermock" ,java-powermock-core)
9353 ("powermock-easymock" ,java-powermock-api-easymock)
9354 ("powermock-junit4-common" ,java-powermock-modules-junit4-common)
9355 ("powermock-junit4" ,java-powermock-modules-junit4)
9356 ("powermock-support" ,java-powermock-api-support)
50d70a72 9357 ("java-bouncycastle" ,java-bouncycastle)))
46c6905a
JL
9358 (home-page "https://kafka.apache.org")
9359 (synopsis "Distributed streaming platform")
9360 (description "Kafka is a distributed streaming platform, which means:
9361@itemize
9362@item it can publish and subscribe to streams of records;
9363@item it can store streams of records in a fault-tolerant way;
9364@item it can process streams of records as they occur.
9365@end itemize")
9366 ;; Either cddl or gpl2 only.
9367 (license (list license:cddl1.1; actually cddl1.1
9368 license:gpl2)))); with classpath exception
0b54e190
JL
9369
9370(define-public java-jdom
9371 (package
9372 (name "java-jdom")
9373 (version "1.1.3")
9374 (source (origin
9375 (method url-fetch)
9376 (uri (string-append "http://jdom.org/dist/binary/archive/jdom-"
9377 version ".tar.gz"))
9378 (sha256
9379 (base32
9380 "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl"))))
9381 (build-system ant-build-system)
9382 (arguments
9383 `(#:build-target "package"
9384 #:tests? #f; tests are run as part of the build process
9385 #:phases
9386 (modify-phases %standard-phases
9387 (replace 'install
9388 (install-jars "build")))))
9389 (home-page "http://jdom.org/")
9390 (synopsis "Access, manipulate, and output XML data")
9391 (description "Java-based solution for accessing, manipulating, and
9392outputting XML data from Java code.")
9393 (license license:bsd-4)))
78745d33
JL
9394
9395(define-public java-geronimo-xbean-reflect
9396 (package
9397 (name "java-geronimo-xbean-reflect")
9398 (version "4.5")
9399 (source (origin
9400 (method svn-fetch)
9401 (uri (svn-reference
9402 (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/")
9403 (revision 1807396)))
9404 (file-name (string-append name "-" version))
9405 (sha256
9406 (base32
9407 "18q3i6jgm6rkw8aysfgihgywrdc5nvijrwnslmi3ww497jvri6ja"))))
9408 (build-system ant-build-system)
9409 (arguments
9410 `(#:jar-name "geronimo-xbean-reflect.jar"
9411 #:source-dir "xbean-reflect/src/main/java"
9412 #:test-dir "xbean-reflect/src/test"
9413 #:jdk ,icedtea-8
9414 #:test-exclude
9415 (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java"
9416 "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java"
9417 "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java")
9418 #:phases
9419 (modify-phases %standard-phases
9420 (add-before 'build 'fix-source
9421 (lambda _
9422 (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/"))
9423 ;; org.apache.xbean.asm6 is actually repackaged java-asm
9424 (substitute* (string-append dir "XbeanAsmParameterNameLoader.java")
9425 (("org.apache.xbean.asm5") "org.objectweb.asm"))
9426 #t))))))
9427 (inputs
9428 `(("asm" ,java-asm)
9429 ("log4j" ,java-log4j-api)
9430 ("log4j-1.2" ,java-log4j-1.2-api)
9431 ("log4j-core" ,java-log4j-core)
9432 ("logging" ,java-commons-logging-minimal)))
9433 (native-inputs
9434 `(("junit" ,java-junit)))
9435 (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/")
9436 (synopsis "Dependency injection helper")
9437 (description "Xbean-reflect provides very flexible ways to create objects
9438and graphs of objects for dependency injection frameworks")
9439 (license license:asl2.0)))
09c44196 9440
3fda539b
JL
9441(define-public java-geronimo-xbean-bundleutils
9442 (package
9443 (inherit java-geronimo-xbean-reflect)
9444 (name "java-geronimo-xbean-bundleutils")
9445 (arguments
9446 `(#:jar-name "geronimo-xbean-bundleutils.jar"
9447 #:source-dir "xbean-bundleutils/src/main/java"
9448 #:test-dir "xbean-bundleutils/src/test"
9449 #:phases
9450 (modify-phases %standard-phases
9451 (add-before 'build 'fix-java
9452 (lambda _
9453 ;; We use a more recent version of osgi, so this file requires
9454 ;; more interface method implementations.
9455 (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java"
9456 (("import org.osgi.framework.ServiceRegistration;")
9457 "import org.osgi.framework.ServiceRegistration;
9458import org.osgi.framework.ServiceFactory;
9459import java.util.Collection;
9460import org.osgi.framework.ServiceObjects;")
9461 (("public Bundle getBundle\\(\\)")
9462 "@Override
9463public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) {
9464 throw new UnsupportedOperationException();
9465}
9466@Override
9467public <S> ServiceRegistration<S> registerService(Class<S> clazz,
9468 ServiceFactory<S> factory, Dictionary<String, ?> properties) {
9469 throw new UnsupportedOperationException();
9470}
9471public Bundle getBundle()"))
9472 #t)))))
9473 (inputs
9474 `(("java-slf4j" ,java-slf4j-api)
9475 ("java-asm" ,java-asm)
9476 ("java-osgi-framework" ,java-osgi-framework)
9477 ("java-eclipse-osgi" ,java-eclipse-osgi)
9478 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)))))
0cb9ce32
JL
9479
9480(define-public java-geronimo-xbean-asm-util
9481 (package
9482 (inherit java-geronimo-xbean-reflect)
9483 (name "java-geronimo-xbean-asm-util")
9484 (arguments
9485 `(#:jar-name "geronimo-xbean-asm-util.jar"
9486 #:source-dir "xbean-asm-util/src/main/java"
9487 #:tests? #f)); no tests
9488 (inputs
9489 `(("java-asm" ,java-asm)))
9490 (native-inputs '())))
8d510f65
JL
9491
9492(define-public java-geronimo-xbean-finder
9493 (package
9494 (inherit java-geronimo-xbean-reflect)
9495 (name "java-geronimo-xbean-finder")
9496 (arguments
9497 `(#:jar-name "geronimo-xbean-finder.jar"
9498 #:source-dir "xbean-finder/src/main/java"
9499 #:test-dir "xbean-finder/src/test"))
9500 (inputs
9501 `(("java-slf4j-api" ,java-slf4j-api)
9502 ("java-asm" ,java-asm)
9503 ("java-geronimo-xbean-bundleutils" ,java-geronimo-xbean-bundleutils)
9504 ("java-geronimo-xbean-asm-util" ,java-geronimo-xbean-asm-util)
9505 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)
9506 ("java-osgi-framework" ,java-osgi-framework)))
9507 (native-inputs
9508 `(("java-junit" ,java-junit)
9509 ("java-hamcrest-core" ,java-hamcrest-core)))))
3fda539b 9510
09c44196
JL
9511(define-public java-gson
9512 (package
9513 (name "java-gson")
9514 (version "2.8.2")
9515 (source (origin
9516 (method url-fetch)
9517 (uri (string-append "https://github.com/google/gson/archive/"
9518 "gson-parent-" version ".tar.gz"))
9519 (sha256
9520 (base32
9521 "1j4qnp7v046q0k48c4kyf69sxaasx2h949d3cqwsm3kzxms3x0f9"))))
9522 (build-system ant-build-system)
9523 (arguments
9524 `(#:jar-name "gson.jar"
9525 #:source-dir "gson/src/main/java"
9526 #:test-dir "gson/src/test"))
9527 (native-inputs
9528 `(("java-junit" ,java-junit)
9529 ("java-hamcrest-core" ,java-hamcrest-core)))
9530 (home-page "https://github.com/google/gson")
9531 (synopsis "Java serialization/deserialization library from/to JSON")
9532 (description "Gson is a Java library that can be used to convert Java
9533Objects into their JSON representation. It can also be used to convert a JSON
9534string to an equivalent Java object. Gson can work with arbitrary Java objects
9535including pre-existing objects that you do not have source-code of.")
9536 (license license:asl2.0)))
335aa20b
JL
9537
9538(define-public java-hawtjni
9539 (package
9540 (name "java-hawtjni")
9541 (version "1.15")
9542 (source (origin
9543 (method url-fetch)
9544 (uri (string-append "https://github.com/fusesource/hawtjni/archive/"
9545 "hawtjni-project-" version ".tar.gz"))
9546 (sha256
9547 (base32
9548 "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g"))))
9549 (build-system ant-build-system)
9550 (arguments
9551 `(#:jar-name "hawtjni.jar"
9552 #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java"
9553 #:tests? #f; no tests
9554 #:phases
9555 (modify-phases %standard-phases
9556 (add-before 'build 'build-native
9557 (lambda* (#:key inputs #:allow-other-keys)
6338ea9a
RW
9558 (let ((include (string-append "-I" (assoc-ref inputs "jdk") "/include/linux")))
9559 (with-directory-excursion "hawtjni-generator/src/main/resources/"
9560 (invoke "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o"
9561 "-fPIC" "-O2" include)
9562 (invoke "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o"
9563 "-fPIC" "-O2" include)
9564 (invoke "gcc" "-o" "libhawtjni.so" "-shared"
9565 "hawtjni.o" "hawtjni-callback.o")))
9566 #t))
335aa20b
JL
9567 (add-after 'install 'install-native
9568 (lambda* (#:key outputs #:allow-other-keys)
9569 (let* ((out (assoc-ref outputs "out"))
9570 (lib (string-append out "/lib"))
9571 (inc (string-append out "/include")))
335aa20b 9572 (with-directory-excursion "hawtjni-generator/src/main/resources/"
6338ea9a
RW
9573 (install-file "libhawtjni.so" lib)
9574 (install-file "hawtjni.h" inc)))
335aa20b
JL
9575 #t)))))
9576 (inputs
9577 `(("java-commons-cli" ,java-commons-cli)
9578 ("java-asm" ,java-asm)
9579 ("java-geronimo-xbean-finder" ,java-geronimo-xbean-finder)))
9580 (home-page "https://fusesource.github.io/hawtjni/")
9581 (synopsis "JNI code generator")
9582 (description "HawtJNI is a code generator that produces the JNI code needed
9583to implement Java native methods. It is based on the jnigen code generator
9584that is part of the SWT Tools project.")
9585 (license license:asl2.0)))
d0c62afa
JL
9586
9587(define-public java-jansi-native
9588 (package
9589 (name "java-jansi-native")
9590 (version "1.7")
9591 (source (origin
9592 (method url-fetch)
9593 (uri (string-append "https://github.com/fusesource/jansi-native/"
9594 "archive/jansi-native-" version ".tar.gz"))
9595 (sha256
9596 (base32
9597 "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf"))))
9598 (build-system ant-build-system)
9599 (arguments
9600 `(#:jar-name "jansi-native.jar"
9601 #:source-dir "src/main/java"
9602 #:tests? #f; no tests
9603 #:phases
9604 (modify-phases %standard-phases
9605 (add-before 'build 'build-native
9606 (lambda* (#:key inputs #:allow-other-keys)
9607 ;; there are more required files for windows in windows/
9608 (with-directory-excursion "src/main/native-package/src"
9609 (substitute* "jansi_ttyname.c"
9610 (("#include \"jansi_.*") ""))
e85c1bf6
RW
9611 (invoke "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o"
9612 (string-append "-I" (assoc-ref inputs "java-hawtjni")
9613 "/include")
9614 (string-append "-I" (assoc-ref inputs "jdk")
9615 "/include/linux")
9616 "-fPIC" "-O2")
2c8ac364 9617 (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o"))))
d0c62afa
JL
9618 (add-before 'build 'install-native
9619 (lambda _
9620 (let ((dir (string-append "build/classes/META-INF/native/"
9621 ,(match (%current-system)
9622 ((or "i686-linux" "armhf-linux")
9623 "linux32")
3c4103c8
LC
9624 ((or "x86_64-linux" "aarch64-linux"
9625 "mips64el-linux")
d0c62afa
JL
9626 "linux64")))))
9627 (install-file "src/main/native-package/src/libjansi.so" dir))
9628 #t))
9629 (add-after 'install 'install-native
9630 (lambda* (#:key outputs #:allow-other-keys)
d0c62afa
JL
9631 (install-file "src/main/native-package/src/jansi.h"
9632 (string-append (assoc-ref outputs "out") "/include"))
9633 #t)))))
9634 (inputs
9635 `(("java-hawtjni" ,java-hawtjni)))
9636 (home-page "https://fusesource.github.io/jansi/")
9637 (synopsis "Native library for jansi")
3d6925ef
RW
9638 (description "This package provides the native library for jansi, a small
9639Java library that allows you to use ANSI escape sequences to format your
9640console output.")
d0c62afa 9641 (license license:asl2.0)))
a87ea1ad
JL
9642
9643(define-public java-jansi
9644 (package
9645 (name "java-jansi")
9646 (version "1.16")
9647 (source (origin
9648 (method url-fetch)
9649 (uri (string-append "https://github.com/fusesource/jansi/archive/"
9650 "jansi-project-" version ".tar.gz"))
9651 (sha256
9652 (base32
9653 "11kh3144i3fzp21dpy8zg52mjmsr214k7km9p8ly0rqk2px0qq2z"))))
9654 (build-system ant-build-system)
9655 (arguments
9656 `(#:jar-name "jansi.jar"
9657 #:source-dir "jansi/src/main/java"
9658 #:test-dir "jansi/src/test"
9659 #:phases
9660 (modify-phases %standard-phases
9661 (add-after 'check 'clear-term
9662 (lambda _
2c8ac364 9663 (invoke "echo" "-e" "\\e[0m"))))))
a87ea1ad
JL
9664 (inputs
9665 `(("java-jansi-native" ,java-jansi-native)))
9666 (native-inputs
9667 `(("java-junit" ,java-junit)
9668 ("java-hamcrest-core" ,java-hamcrest-core)))
9669 (home-page "https://fusesource.github.io/jansi/")
9670 (synopsis "Portable ANSI escape sequences")
9671 (description "Jansi is a Java library that allows you to use ANSI escape
9672sequences to format your console output which works on every platform.")
9673 (license license:asl2.0)))
cc061329
JL
9674
9675(define-public java-jboss-el-api-spec
9676 (package
9677 (name "java-jboss-el-api-spec")
9678 (version "3.0")
9679 (source (origin
9680 (method url-fetch)
9681 (uri (string-append "https://github.com/jboss/jboss-el-api_spec/"
9682 "archive/jboss-el-api_" version
9683 "_spec-1.0.7.Final.tar.gz"))
9684 (sha256
9685 (base32
9686 "1j45ljxalwlibxl7g7iv952sjxkw275m8vyxxij8l6wdd5pf0pdh"))))
9687 (build-system ant-build-system)
9688 (arguments
9689 `(#:jar-name "java-jboss-el-api_spec.jar"
9690 #:jdk ,icedtea-8))
9691 (inputs
9692 `(("java-junit" ,java-junit)))
9693 (home-page "https://github.com/jboss/jboss-el-api_spec")
9694 (synopsis "JSR-341 expression language 3.0 API")
9695 (description "This package contains an implementation of the JSR-341
9696specification for the expression language 3.0. It implements an expression
9697language inspired by ECMAScript and XPath. This language is used with
9698JavaServer Pages (JSP).")
9699 ;; Either GPL2 only or CDDL.
9700 (license (list license:gpl2 license:cddl1.1))))
cc03a786
JL
9701
9702(define-public java-jboss-interceptors-api-spec
9703 (package
9704 (name "java-jboss-interceptors-api-spec")
9705 (version "1.2")
9706 (source (origin
9707 (method url-fetch)
9708 (uri (string-append "https://github.com/jboss/jboss-interceptors-api_spec/"
9709 "archive/jboss-interceptors-api_" version
9710 "_spec-1.0.0.Final.tar.gz"))
9711 (sha256
9712 (base32
9713 "0wv8x0jp9a5qxlrgkhb5jdk2gr6vi87b4j4kjb8ryxiy9gn8g51z"))))
9714 (build-system ant-build-system)
9715 (arguments
9716 `(#:jar-name "java-jboss-interceptors-api_spec.jar"
9717 #:jdk ,icedtea-8
9718 #:source-dir "."
9719 #:tests? #f)); no tests
9720 (home-page "https://github.com/jboss/jboss-interceptors-api_spec")
9721 (synopsis "Interceptors 1.2 API classes from JSR 318")
9722 (description "Java-jboss-interceptors-api-spec implements the Interceptors
9723API. Interceptors are used to interpose on business method invocations and
9724specific events.")
9725 ;; Either GPL2 only or CDDL.
9726 (license (list license:gpl2 license:cddl1.1))))
a10a451c
JL
9727
9728(define-public java-cdi-api
9729 (package
9730 (name "java-cdi-api")
9731 (version "2.0")
9732 (source (origin
9733 (method url-fetch)
9734 (uri (string-append "https://github.com/cdi-spec/cdi/archive/"
9735 version ".tar.gz"))
9736 (file-name (string-append name "-" version ".tar.gz"))
9737 (sha256
9738 (base32
9739 "1iv8b8bp07c5kmqic14jsr868vycjv4qv02lf3pkgp9z21mnfg5y"))))
9740 (build-system ant-build-system)
9741 (arguments
9742 `(#:source-dir "api/src/main/java"
9743 #:jar-name "java-cdi-api.jar"
9744 #:test-dir "api/src/test"
9745 #:jdk ,icedtea-8
9746 #:tests? #f)); Tests fail because we don't have a CDI provider yet
9747 (inputs
9748 `(("java-javax-inject" ,java-javax-inject)
9749 ("java-jboss-el-api-spec" ,java-jboss-el-api-spec)
9750 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)))
9751 (native-inputs
9752 `(("java-testng" ,java-testng)
9753 ("java-hamcrest-core" ,java-hamcrest-core)))
9754 (home-page "http://cdi-spec.org/")
9755 (synopsis "Contexts and Dependency Injection APIs")
9756 (description "Java-cdi-api contains the required APIs for Contexts and
9757Dependency Injection (CDI).")
9758 (license license:asl2.0)))
d57fd728
JL
9759
9760(define-public java-joda-convert
9761 (package
9762 (name "java-joda-convert")
9763 (version "1.9.2")
9764 (source (origin
9765 (method url-fetch)
9766 (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v"
9767 version ".tar.gz"))
9768 (file-name (string-append name "-" version ".tar.gz"))
9769 (sha256
9770 (base32
9771 "0vp346xz7dh9br4q7xazhc7hvzf76a6hf95fki9bg67q5jr0kjh7"))))
9772 (build-system ant-build-system)
9773 (arguments
9774 `(#:jar-name (string-append ,name "-" ,version ".jar")
9775 #:source-dir "src/main/java"
9776 #:test-include (list "**/Test*.java")
9777 ;; Contains only interfaces and base classes (no test)
9778 #:test-exclude (list "**/test*/**.java")))
9779 (inputs
9780 `(("java-guava" ,java-guava)))
9781 (native-inputs
9782 `(("java-junit" ,java-junit)
9783 ("java-hamcrest-core" ,java-hamcrest-core)))
9784 (home-page "http://www.joda.org/joda-convert/")
9785 (synopsis "Conversion between Objects and Strings")
9786 (description "Joda-Convert provides a small set of classes to aid
9787conversion between Objects and Strings. It is not intended to tackle the
9788wider problem of Object to Object transformation.")
9789 (license license:asl2.0)))
0158ea8a
JL
9790
9791(define-public java-joda-time
9792 (package
9793 (name "java-joda-time")
9794 (version "2.9.9")
9795 (source (origin
9796 (method url-fetch)
9797 (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v"
9798 version ".tar.gz"))
9799 (file-name (string-append name "-" version ".tar.gz"))
9800 (sha256
9801 (base32
9802 "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1"))))
9803 (build-system ant-build-system)
9804 (arguments
9805 `(#:jar-name "java-joda-time.jar"
9806 #:source-dir "src/main/java"
9807 #:test-include (list "**/Test*.java")
9808 ;; There is no runnable test in these files
9809 #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java")
9810 #:phases
9811 (modify-phases %standard-phases
9812 (add-after 'build 'build-resources
9813 (lambda _
9814 (mkdir-p "build/classes/org/joda/time/tz/data")
9815 (mkdir-p "build/classes/org/joda/time/format")
6d0368eb
JL
9816 ;; This will produce the following exception:
9817 ;; java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap"
9818 ;; which is normal, because it doesn't exist yet. It still generates
9819 ;; the same file as in the binary one can find on maven.
9820 (invoke "java" "-cp"
9821 (string-append "build/classes:" (getenv "CLASSPATH"))
9822 "org.joda.time.tz.ZoneInfoCompiler"
9823 "-src" "src/main/java/org/joda/time/tz/src"
9824 "-dst" "build/classes/org/joda/time/tz/data"
9825 "africa" "antarctica" "asia" "australasia"
9826 "europe" "northamerica" "southamerica"
9827 "pacificnew" "etcetera" "backward" "systemv")
0158ea8a
JL
9828 (for-each (lambda (f)
9829 (copy-file f (string-append
9830 "build/classes/org/joda/time/format/"
9831 (basename f))))
9832 (find-files "src/main/java/org/joda/time/format" ".*.properties"))
9833 #t))
9834 (add-before 'install 'regenerate-jar
9835 (lambda _
9836 ;; We need to regenerate the jar file to add generated data.
9837 (delete-file "build/jar/java-joda-time.jar")
6d0368eb 9838 (invoke "ant" "jar")))
0158ea8a
JL
9839 (add-before 'check 'copy-test-resources
9840 (lambda _
9841 (mkdir-p "build/test-classes/org/joda/time/tz/data")
9842 (copy-file "src/test/resources/tzdata/ZoneInfoMap"
9843 "build/test-classes/org/joda/time/tz/data/ZoneInfoMap")
9844 (copy-recursively "src/test/resources" "build/test-classes")
9845 #t)))))
9846 (inputs
9847 `(("java-joda-convert" ,java-joda-convert)))
9848 (native-inputs
9849 `(("java-junit" ,java-junit)
9850 ("java-hamcrest-core" ,java-hamcrest-core)
9851 ("tzdata" ,tzdata)))
9852 (home-page "http://www.joda.org/joda-time/")
9853 (synopsis "Replacement for the Java date and time classes")
9854 (description "Joda-Time is a replacement for the Java date and time
9855classes prior to Java SE 8.")
9856 (license license:asl2.0)))
6d0368eb
JL
9857
9858(define-public java-xerces
9859 (package
9860 (name "java-xerces")
9861 (version "2.11.0")
9862 (source
9863 (origin
9864 (method url-fetch)
9865 (uri (string-append "mirror://apache/xerces/j/source/"
9866 "Xerces-J-src." version ".tar.gz"))
9867 (sha256
9868 (base32 "1006igwy2lqrmjvdk64v8dg6qbk9c29pm8xxx7r87n0vnpvmx6pm"))
9869 (patches (search-patches
9870 "java-xerces-xjavac_taskdef.patch"
9871 "java-xerces-build_dont_unzip.patch"
9872 "java-xerces-bootclasspath.patch"))))
9873 (build-system ant-build-system)
9874 (arguments
9875 `(#:tests? #f;; Test files are not present
9876 #:test-target "test"
9877 #:jdk ,icedtea-8
9878 #:phases
9879 (modify-phases %standard-phases
9880 (add-after 'unpack 'create-build.properties
9881 (lambda* (#:key inputs #:allow-other-keys)
9882 (let ((jaxp (assoc-ref inputs "java-jaxp"))
9883 (resolver (assoc-ref inputs "java-apache-xml-commons-resolver")))
9884 (with-output-to-file "build.properties"
9885 (lambda _
9886 (format #t
9887 "jar.jaxp = ~a/share/java/jaxp.jar~@
9888 jar.apis-ext = ~a/share/java/jaxp.jar~@
9889 jar.resolver = ~a/share/java/xml-resolver.jar~%"
9890 jaxp jaxp resolver)))
9891 ;; Make xerces use our version of jaxp in tests
9892 (substitute* "build.xml"
9893 (("xml-apis.jar")
9894 (string-append jaxp "/share/java/jaxp.jar"))
9895 (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}")
9896 "${jar.apis}")))
9897 #t))
9898 (replace 'install (install-jars "build")))))
9899 (inputs
9900 `(("java-apache-xml-commons-resolver" ,java-apache-xml-commons-resolver)
9901 ("java-jaxp" ,java-jaxp)))
9902 (home-page "https://xerces.apache.org/xerces2-j/")
9903 (synopsis "Validating XML parser for Java with DOM level 3 support")
9904 (description "The Xerces2 Java parser is the reference implementation of
9905XNI, the Xerces Native Interface, and also a fully conforming XML Schema
9906processor.
9907
9908Xerces2-J supports the following standards and APIs:
9909
9910@itemize
9911@item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation
9912@item Namespaces in XML Recommendation
9913@item Document Object Model (DOM) Level 2 Core, Events, and Traversal and
9914 Range Recommendations
9915@item Simple API for XML (SAX) 2.0.1 Core and Extension
9916@item Java APIs for XML Processing (JAXP) 1.2.01
9917@item XML Schema 1.0 Structures and Datatypes Recommendations
9918@item Experimental implementation of the Document Object Model (DOM) Level 3
9919 Core and Load/Save Working Drafts
9920@item Provides a partial implementation of the XML Inclusions (XInclude) W3C
9921 Candidate Recommendation
9922@end itemize
9923
9924Xerces is now able to parse documents written according to the XML 1.1
9925Candidate Recommendation, except that it does not yet provide an option to
9926enable normalization checking as described in section 2.13 of this
9927specification. It also handles namespaces according to the XML Namespaces 1.1
9928Candidate Recommendation, and will correctly serialize XML 1.1 documents if
9929the DOM level 3 load/save API's are in use.")
9930 (license license:asl2.0)))
e06bf428 9931
ae6922ed
DM
9932(define-public java-jakarta-regexp
9933 (package
9934 (name "java-jakarta-regexp")
9935 (version "1.5")
9936 (source
9937 (origin
9938 (method url-fetch)
9939 (uri (string-append
9940 "https://archive.apache.org/dist/jakarta/regexp/jakarta-regexp-"
9941 version ".tar.gz"))
9942 (sha256
9943 (base32
9944 "0zg9rmyif48dck0cv6ynpxv23mmcsx265am1fnnxss7brgw0ms3r"))))
9945 (build-system ant-build-system)
9946 (arguments
9947 `(#:test-target "test"
9948 #:phases
9949 (modify-phases %standard-phases
9950 (replace 'install
9951 (lambda* (#:key outputs #:allow-other-keys)
9952 (let* ((out (assoc-ref outputs "out"))
9953 (out-share (string-append out "/share/java")))
9954 (mkdir-p out-share)
9955 (for-each (lambda (name)
9956 (install-file name out-share))
9957 (find-files "build" "^jakarta-regexp-.*\\.jar$"))
9958 #t))))))
9959 (home-page "https://attic.apache.org/projects/jakarta-regexp.html")
9960 (synopsis "Regular expression parser generator for Java.")
9961 (description "@code{jakarta-regexp} is an old regular expression parser
9962generator for Java.")
9963 (license license:asl2.0)))
9964
e06bf428
JL
9965(define-public java-jline
9966 (package
9967 (name "java-jline")
9968 (version "1.0")
9969 (source (origin
9970 (method url-fetch)
9971 (uri (string-append "https://github.com/jline/jline1/archive/jline-"
9972 version ".tar.gz"))
9973 (sha256
9974 (base32
9975 "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir"))))
9976 (build-system ant-build-system)
9977 (arguments
9978 `(#:jar-name "jline.jar"
9979 #:source-dir "src/main/java"
9980 #:test-dir "src/test"
9981 #:phases
9982 (modify-phases %standard-phases
9983 (add-before 'build 'copy-resources
9984 (lambda _
9985 (copy-recursively "src/main/resources" "build/classes")
9986 #t)))))
9987 (native-inputs
9988 `(("java-junit" ,java-junit)))
9989 (home-page "https://jline.github.io")
9990 (synopsis "Console input handling library")
9991 (description "JLine is a Java library for handling console input. It is
9992similar in functionality to BSD editline and GNU readline but with additional
9993features that bring it on par with the Z shell line editor.")
9994 (license license:bsd-3)))
7ac4f054 9995
49d74311
JL
9996(define-public java-jline-2
9997 (package
9998 (inherit java-jline)
9999 (version "2.14.5")
10000 (source (origin
10001 (method url-fetch)
10002 (uri (string-append "https://github.com/jline/jline2/archive/jline-"
10003 version ".tar.gz"))
10004 (sha256
10005 (base32
10006 "1c6qa26mf0viw8hg4jnv72s7i1qb1gh1l8rrzcdvqhqhx82rkdlf"))))
10007 (arguments
10008 `(#:jdk ,icedtea-8
10009 ,@(package-arguments java-jline)))
10010 (inputs
10011 `(("java-jansi" ,java-jansi)
10012 ("java-jansi-native" ,java-jansi-native)))
10013 (native-inputs
10014 `(("java-powermock-modules-junit4" ,java-powermock-modules-junit4)
10015 ("java-powermock-modules-junit4-common" ,java-powermock-modules-junit4-common)
10016 ("java-powermock-api-easymock" ,java-powermock-api-easymock)
10017 ("java-powermock-api-support" ,java-powermock-api-support)
10018 ("java-powermock-core" ,java-powermock-core)
10019 ("java-powermock-reflect" ,java-powermock-reflect)
10020 ("java-easymock" ,java-easymock)
10021 ("java-jboss-javassist" ,java-jboss-javassist)
10022 ("java-objenesis" ,java-objenesis)
10023 ("java-asm" ,java-asm)
10024 ("java-hamcrest-core" ,java-hamcrest-core)
10025 ("java-cglib" ,java-cglib)
10026 ("java-junit" ,java-junit)
10027 ("java-hawtjni" ,java-hawtjni)))))
10028
7ac4f054
JL
10029(define-public java-xmlunit
10030 (package
10031 (name "java-xmlunit")
10032 (version "2.5.1")
10033 (source (origin
10034 (method url-fetch)
10035 (uri (string-append "https://github.com/xmlunit/xmlunit/archive/v"
10036 version ".tar.gz"))
10037 (file-name (string-append name "-" version ".tar.gz"))
10038 (sha256
10039 (base32
10040 "035rivlnmwhfqj0fzviciv0bkh1h95ps1iwnh2kjcvdbk5nccm4z"))))
10041 (build-system ant-build-system)
10042 (arguments
10043 `(#:jar-name "java-xmlunit.jar"
10044 #:source-dir "xmlunit-core/src/main/java"
10045 #:test-dir "xmlunit-core/src/test"
10046 #:phases
10047 (modify-phases %standard-phases
10048 (add-before 'check 'copy-test-resources
10049 (lambda* (#:key inputs #:allow-other-keys)
10050 (copy-recursively (assoc-ref inputs "resources") "../test-resources")
10051 #t)))))
10052 (native-inputs
10053 `(("java-junit" ,java-junit)
10054 ("java-mockito-1" ,java-mockito-1)
10055 ("java-hamcrest-all" ,java-hamcrest-all)
10056 ("java-objenesis" ,java-objenesis)
10057 ("java-asm" ,java-asm)
10058 ("java-cglib" ,java-cglib)
10059 ("resources"
10060 ,(origin
10061 (method git-fetch)
10062 (uri (git-reference
10063 (url "https://github.com/xmlunit/test-resources.git")
10064 (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec")))
10065 (file-name "java-xmlunit-test-resources")
10066 (sha256
10067 (base32
10068 "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr"))))))
10069 (home-page "http://www.xmlunit.org/")
10070 (synopsis "XML output testing")
10071 (description "XMLUnit provides you with the tools to verify the XML you
10072emit is the one you want to create. It provides helpers to validate against
10073an XML Schema, assert the values of XPath queries or compare XML documents
10074against expected outcomes.")
10075 (license license:asl2.0)))
73a1f10a
JL
10076
10077(define-public java-xmlunit-legacy
10078 (package
10079 (inherit java-xmlunit)
10080 (name "java-xmlunit-legacy")
10081 (arguments
10082 `(#:jar-name "java-xmlunit-legacy.jar"
10083 #:source-dir "xmlunit-legacy/src/main/java"
10084 #:test-dir "xmlunit-legacy/src/test"))
10085 (inputs
10086 `(("java-xmlunit" ,java-xmlunit)
10087 ("java-junit" ,java-junit)))
10088 (native-inputs
10089 `(("java-mockito-1" ,java-mockito-1)))))
93abc975 10090
f5cc5ead
JL
10091(define-public java-xmlunit-matchers
10092 (package
10093 (inherit java-xmlunit)
10094 (name "java-xmlunit-matchers")
10095 (arguments
10096 `(#:jar-name "java-xmlunit-matchers.jar"
10097 #:source-dir "xmlunit-matchers/src/main/java"
10098 #:test-dir "xmlunit-matchers/src/test"
10099 #:test-exclude
10100 ;; Cannot open xsd for http://www.xmlunit.org/test-support/Book.xsd
10101 (list "**/ValidationMatcherTest.java")
10102 #:phases
10103 (modify-phases %standard-phases
10104 (add-before 'build 'copy-test-class
10105 (lambda _
10106 (copy-file "xmlunit-core/src/test/java/org/xmlunit/TestResources.java"
10107 "xmlunit-matchers/src/test/java/org/xmlunit/TestResources.java")
10108 #t))
10109 (add-before 'build 'fix-test-resources-path
10110 (lambda _
10111 (substitute* (find-files "xmlunit-matchers/src/test" ".*.java")
10112 (("../test-resources") "test-resources"))
10113 #t))
10114 (add-before 'check 'copy-test-resources
10115 (lambda* (#:key inputs #:allow-other-keys)
10116 (copy-recursively (assoc-ref inputs "resources") "test-resources")
10117 #t)))))
10118 (inputs
10119 `(("java-xmlunit" ,java-xmlunit)
10120 ("java-junit" ,java-junit)))))
10121
93abc975
RW
10122(define-public java-openchart2
10123 (package
10124 (name "java-openchart2")
10125 (version "1.4.3")
10126 (source (origin
10127 (method url-fetch)
10128 (uri (string-append "http://download.approximatrix.com/openchart2/"
10129 "openchart2-" version ".source.zip"))
10130 (sha256
10131 (base32
10132 "1xq96zm5r02n1blja0072jmmsifmxc40lbyfbnmcnr6mw42frh4g"))))
10133 (build-system ant-build-system)
10134 (arguments
10135 `(#:test-target "test"
10136 #:phases
10137 (modify-phases %standard-phases
10138 (add-after 'unpack 'fix-junit-errors
10139 (lambda _
10140 (with-directory-excursion "unittest/src/com/approximatrix/charting/"
10141 (substitute* '("coordsystem/ticklocator/NumericXTickLocatorTest.java"
10142 "coordsystem/ticklocator/NumericYTickLocatorTest.java"
10143 "coordsystem/ticklocator/ObjectXTickLocatorTest.java"
10144 "model/DefaultChartDataModelConstraintsTest.java"
10145 "model/MultiScatterDataModelConstraintsTest.java"
10146 "model/threedimensional/DotPlotDataModelConstraintsTest.java")
10147 (("(assertEquals[^;]+);" before _)
10148 (string-append (string-drop-right before 2) ", 1E-6);"))))
10149 #t))
10150 (replace 'install (install-jars ".")))))
10151 (native-inputs
10152 `(("unzip" ,unzip)
10153 ("java-junit" ,java-junit)
10154 ("java-hamcrest-core" ,java-hamcrest-core)))
10155 (home-page "http://approximatrix.com/products/openchart2/")
10156 (synopsis "Simple plotting for Java")
10157 (description "Openchart2 provides a simple, yet powerful, interface for
10158Java programmers to create two-dimensional charts and plots. The library
10159features an assortment of graph styles, including advanced scatter plots, bar
10160graphs, and pie charts.")
10161 (license license:lgpl2.1+)))
5f5b31c6
JL
10162
10163(define-public java-commons-httpclient
10164 (package
10165 (name "java-commons-httpclient")
10166 (version "3.1")
10167 (source (origin
10168 (method url-fetch)
10169 (uri (string-append "https://archive.apache.org/dist/httpcomponents/"
10170 "commons-httpclient/source/commons-httpclient-"
10171 version "-src.tar.gz"))
10172 (sha256
10173 (base32
10174 "1wlpn3cfy3d4inxy6g7wxcsa8p7sshn6aldk9y4ia3lb879rd97r"))))
10175 (build-system ant-build-system)
10176 (arguments
10177 `(#:build-target "compile"
10178 #:test-target "test"
10179 #:tests? #f; requires junit-textui (junit 3)
10180 #:phases
10181 (modify-phases %standard-phases
10182 (add-before 'build 'fix-accent
10183 (lambda _
10184 (for-each (lambda (file)
10185 (with-fluids ((%default-port-encoding "ISO-8859-1"))
10186 (substitute* file
10187 (("\\* @author Ortwin .*") "* @author Ortwin Glueck\n"))))
10188 '("src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java"
10189 "src/examples/TrivialApp.java" "src/examples/ClientApp.java"
10190 "src/test/org/apache/commons/httpclient/TestHttps.java"
2c8ac364
MW
10191 "src/test/org/apache/commons/httpclient/TestURIUtil2.java"))
10192 #t))
5f5b31c6
JL
10193 (replace 'install
10194 (lambda* (#:key outputs #:allow-other-keys)
10195 (invoke "ant" "dist"
10196 (string-append "-Ddist.home=" (assoc-ref outputs "out")
10197 "/share/java"))
10198 #t)))))
10199 (propagated-inputs
10200 `(("java-commons-logging" ,java-commons-logging-minimal)
10201 ("java-commons-codec" ,java-commons-codec)))
10202 (home-page "https://hc.apache.org")
10203 (synopsis "HTTP/1.1 compliant HTTP agent implementation")
10204 (description "This package contains an HTTP/1.1 compliant HTTP agent
10205implementation. It also provides reusable components for client-side
10206authentication, HTTP state management, and HTTP connection management.")
10207 (license license:asl2.0)))
5fe981dc
JL
10208
10209(define-public java-commons-vfs
10210 (package
10211 (name "java-commons-vfs")
10212 (version "2.2")
10213 (source (origin
10214 (method url-fetch)
10215 (uri (string-append "mirror://apache/commons/vfs/source/"
10216 "commons-vfs2-distribution-" version "-src.tar.gz"))
10217 (file-name (string-append name "-" version ".tar.gz"))
10218 (sha256
10219 (base32
10220 "1cnq1iaghbp4cslpnvwbp83i5v234x87irssqynhwpfgw7caf1s3"))
10221 (modules '((guix build utils)))
10222 (snippet
10223 '(begin
10224 (for-each delete-file
10225 (find-files "." "\\.jar$"))
10226 #t))))
10227 (build-system ant-build-system)
10228 (arguments
10229 `(#:jar-name "commons-vfs.jar"
10230 #:source-dir "commons-vfs2/src/main/java"
10231 #:test-dir "commons-vfs2/src/test"
10232 ; FIXME: tests depend on many things: apache sshd, hadoop, ftpserver, ...
10233 #:tests? #f
10234 #:phases
10235 (modify-phases %standard-phases
10236 (add-before 'build 'remove-hadoop-and-webdav
10237 ; Remove these files as they are not required and depend on difficult
10238 ; packages.
10239 (lambda _
10240 (for-each delete-file-recursively
10241 '("commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/webdav"
2c8ac364
MW
10242 "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs"))
10243 #t)))))
5fe981dc
JL
10244 (inputs
10245 `(("java-commons-collections4" ,java-commons-collections4)
10246 ("java-commons-compress" ,java-commons-compress)
10247 ("java-commons-httpclient" ,java-commons-httpclient)
10248 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
10249 ("java-commons-net" ,java-commons-net)
10250 ("java-jsch" ,java-jsch)))
10251 (home-page "http://commons.apache.org/proper/commons-vfs/")
10252 (synopsis "Java filesystem library")
10253 (description "Commons VFS provides a single API for accessing various
10254different file systems. It presents a uniform view of the files from various
10255different sources, such as the files on local disk, on an HTTP server, or
10256inside a Zip archive.")
10257 (license license:asl2.0)))
f7b512c0
JL
10258
10259(define-public java-jakarta-oro
10260 (package
10261 (name "java-jakarta-oro")
10262 (version "2.0.8")
10263 (source (origin
10264 (method url-fetch)
10265 (uri (string-append "https://archive.apache.org/dist/jakarta/oro/"
10266 "jakarta-oro-" version ".tar.gz"))
10267 (sha256
10268 (base32
10269 "0rpmnsskiwmsy8r0sckz5n5dbvh3vkxx8hpm177c754r8xy3qksc"))
10270 (modules '((guix build utils)))
10271 (snippet
10272 `(begin
10273 (delete-file (string-append "jakarta-oro-" ,version ".jar"))
10274 #t))))
10275 (build-system ant-build-system)
10276 (arguments
10277 `(#:build-target "package"
10278 #:tests? #f; tests are run as part of the build process
10279 #:phases
10280 (modify-phases %standard-phases
10281 (replace 'install
10282 (install-jars ,(string-append "jakarta-oro-" version))))))
10283 (home-page "https://jakarta.apache.org/oro/")
10284 (synopsis "Text-processing for Java")
10285 (description "The Jakarta-ORO Java classes are a set of text-processing
10286Java classes that provide Perl5 compatible regular expressions, AWK-like
10287regular expressions, glob expressions, and utility classes for performing
10288substitutions, splits, filtering filenames, etc. This library is the successor
10289of the OROMatcher, AwkTools, PerlTools, and TextTools libraries originally
10290from ORO, Inc.")
10291 (license license:asl1.1)))
a970288c
JL
10292
10293(define-public java-native-access
10294 (package
10295 (name "java-native-access")
10296 (version "4.5.1")
10297 (source (origin
10298 (method url-fetch)
10299 (uri (string-append "https://github.com/java-native-access/jna/"
10300 "archive/" version ".tar.gz"))
10301 (file-name (string-append name "-" version ".tar.gz"))
10302 (sha256
10303 (base32
10304 "0zrpzkib6b905i018a9pqlzkqinphywr6y4jwv6mwp63jjqvqkd9"))
10305 (modules '((guix build utils)))
10306 (snippet
10307 `(begin
10308 (for-each delete-file (find-files "." ".*.jar"))
10309 (delete-file-recursively "native/libffi")
10310 (delete-file-recursively "dist")
10311 #t))))
10312 (build-system ant-build-system)
10313 (arguments
10314 `(#:tests? #f; FIXME: tests require reflections.jar
10315 #:test-target "test"
10316 #:make-flags (list "-Ddynlink.native=true")
10317 #:phases
10318 (modify-phases %standard-phases
10319 (add-before 'build 'fix-build.xml
10320 (lambda* (#:key inputs #:allow-other-keys)
10321 (substitute* "build.xml"
10322 ;; Since we removed the bundled ant.jar, give the correct path
10323 (("lib/ant.jar") (string-append (assoc-ref inputs "ant") "/lib/ant.jar"))
10324 ;; We removed generated native libraries. We can only rebuild one
10325 ;; so don't fail if we can't find a native library for another architecture.
10326 (("zipfileset") "zipfileset erroronmissingarchive=\"false\""))
10327 ;; Copy test dependencies
10328 (copy-file (string-append (assoc-ref inputs "java-junit")
10329 "/share/java/junit.jar")
10330 "lib/junit.jar")
10331 (copy-file (string-append (assoc-ref inputs "java-hamcrest-core")
10332 "/share/java/hamcrest-core.jar")
10333 "lib/hamcrest-core.jar")
10334 ;; FIXME: once reflections.jar is built, copy it to lib/test.
10335 #t))
10336 (add-before 'build 'build-native
10337 (lambda _
10338 (invoke "ant" "-Ddynlink.native=true" "native")
10339 #t))
10340 (replace 'install
10341 (install-jars "build")))))
10342 (inputs
10343 `(("libffi" ,libffi)
10344 ("libx11" ,libx11)
10345 ("libxt" ,libxt)))
10346 (native-inputs
10347 `(("java-junit" ,java-junit)
10348 ("java-hamcrest-core" ,java-hamcrest-core)))
10349 (home-page "https://github.com/java-native-access/jna")
10350 (synopsis "Access to native shared libraries from Java")
10351 (description "JNA provides Java programs easy access to native shared
10352libraries without writing anything but Java code - no JNI or native code is
10353required. JNA allows you to call directly into native functions using natural
10354Java method invocation.")
10355 ;; Java Native Access project (JNA) is dual-licensed under 2
10356 ;; alternative Free licenses: LGPL 2.1 or later and Apache License 2.0.
10357 (license (list
10358 license:asl2.0
10359 license:lgpl2.1+))))
cfb55cfc
JL
10360
10361(define-public java-native-access-platform
10362 (package
10363 (inherit java-native-access)
10364 (name "java-native-access-platform")
10365 (arguments
10366 `(#:test-target "test"
10367 #:tests? #f; require jna-test.jar
10368 #:phases
10369 (modify-phases %standard-phases
10370 (add-before 'build 'chdir
10371 (lambda _
10372 (chdir "contrib/platform")
10373 #t))
10374 (add-after 'chdir 'fix-ant
10375 (lambda* (#:key inputs #:allow-other-keys)
10376 (substitute* "nbproject/project.properties"
10377 (("../../build/jna.jar")
10378 (string-append (assoc-ref inputs "java-native-access")
10379 "/share/java/jna.jar"))
10380 (("../../lib/hamcrest-core-.*.jar")
10381 (string-append (assoc-ref inputs "java-hamcrest-core")
10382 "/share/java/hamcrest-core.jar"))
10383 (("../../lib/junit.jar")
10384 (string-append (assoc-ref inputs "java-junit")
10385 "/share/java/junit.jar")))
10386 #t))
10387 (replace 'install
10388 (install-jars "dist")))))
10389 (inputs
10390 `(("java-native-access" ,java-native-access)))
10391 (synopsis "Cross-platform mappings for jna")
10392 (description "java-native-access-platfrom has cross-platform mappings
10393and mappings for a number of commonly used platform functions, including a
10394large number of Win32 mappings as well as a set of utility classes that
10395simplify native access.")))
470674a5
JL
10396
10397(define-public java-jsch-agentproxy-core
10398 (package
10399 (name "java-jsch-agentproxy-core")
10400 (version "0.0.8")
10401 (source (origin
10402 (method url-fetch)
10403 (uri (string-append "https://github.com/ymnk/jsch-agent-proxy/archive/"
10404 version ".tar.gz"))
10405 (file-name (string-append name "-" version ".tar.gz"))
10406 (sha256
10407 (base32
10408 "02iqg6jbc1kxvfzqcg6wy9ygqxfm82bw5rf6vnswqy4y572niz4q"))))
10409 (build-system ant-build-system)
10410 (arguments
10411 `(#:jar-name "jsch-agentproxy-core.jar"
10412 #:source-dir "jsch-agent-proxy-core/src/main/java"
10413 #:tests? #f)); no tests
10414 (home-page "https://github.com/ymnk/jsch-agent-proxy")
f1d79c97 10415 (synopsis "Core component of the proxy to ssh-agent and Pageant in Java")
470674a5
JL
10416 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10417and Pageant included Putty. It will be easily integrated into JSch, and users
10418will be allowed to use these programs for authentication.")
10419 (license license:bsd-3)))
f1d79c97
JL
10420
10421(define-public java-jsch-agentproxy-sshagent
10422 (package
10423 (inherit java-jsch-agentproxy-core)
10424 (name "java-jsch-agentproxy-sshagent")
10425 (arguments
10426 `(#:jar-name "jsch-agentproxy-sshagent.jar"
10427 #:source-dir "jsch-agent-proxy-sshagent/src/main/java"
10428 #:tests? #f)); no tests
10429 (inputs
10430 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
10431 (synopsis "Proxy to ssh-agent")
10432 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10433and Pageant included in Putty. This component contains the code for a proxy to
10434ssh-agent.")))
f438e638
JL
10435
10436(define-public java-jsch-agentproxy-usocket-jna
10437 (package
10438 (inherit java-jsch-agentproxy-core)
10439 (name "java-jsch-agentproxy-usocket-jna")
10440 (arguments
10441 `(#:jar-name "jsch-agentproxy-usocket-jna.jar"
10442 #:source-dir "jsch-agent-proxy-usocket-jna/src/main/java"
10443 #:tests? #f)); no tests
10444 (inputs
10445 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10446 ("java-native-access" ,java-native-access)))
10447 (synopsis "USocketFactory implementation using JNA")
10448 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10449and Pageant included in Putty. This component contains an implementation of
10450USocketFactory using @dfn{JNA} (Java Native Access).")))
475225e3
JL
10451
10452(define-public java-jsch-agentproxy-pageant
10453 (package
10454 (inherit java-jsch-agentproxy-core)
10455 (name "java-jsch-agentproxy-pageant")
10456 (arguments
10457 `(#:jar-name "jsch-agentproxy-pageant.jar"
10458 #:source-dir "jsch-agent-proxy-pageant/src/main/java"
10459 #:tests? #f)); no tests
10460 (inputs
10461 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10462 ("java-native-access" ,java-native-access)
10463 ("java-native-access-platform" ,java-native-access-platform)))
10464 (synopsis "Proxy to pageant")
10465 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10466and Pageant included in Putty. This component contains the code for a proxy to
10467pageant.")))
96d6d9c7
JL
10468
10469(define-public java-jsch-agentproxy-usocket-nc
10470 (package
10471 (inherit java-jsch-agentproxy-core)
10472 (name "java-jsch-agentproxy-usocket-nc")
10473 (arguments
10474 `(#:jar-name "jsch-agentproxy-usocket-nc.jar"
10475 #:source-dir "jsch-agent-proxy-usocket-nc/src/main/java"
10476 #:tests? #f)); no tests
10477 (inputs
10478 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
10479 (synopsis "USocketFactory implementation using netcat")
10480 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10481and Pageant included in Putty. This component contains an implementation of
10482USocketFactory using netcat.")))
5a46b17b
JL
10483
10484(define-public java-jsch-agentproxy-connector-factory
10485 (package
10486 (inherit java-jsch-agentproxy-core)
10487 (name "java-jsch-agentproxy-connector-factory")
10488 (arguments
10489 `(#:jar-name "jsch-agentproxy-connector-factory.jar"
10490 #:source-dir "jsch-agent-proxy-connector-factory/src/main/java"
10491 #:tests? #f)); no tests
10492 (inputs
10493 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10494 ("java-jsch-agentproxy-sshagent" ,java-jsch-agentproxy-sshagent)
10495 ("java-jsch-agentproxy-usocket-jna" ,java-jsch-agentproxy-usocket-jna)
10496 ("java-jsch-agentproxy-pageant" ,java-jsch-agentproxy-pageant)
10497 ("java-jsch-agentproxy-usocket-nc" ,java-jsch-agentproxy-usocket-nc)))
10498 (synopsis "Connector factory for jsch agent proxy")
10499 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10500and Pageant included in Putty. This component contains a connector factory.")))
b0fbf596
JL
10501
10502(define-public java-jsch-agentproxy-jsch
10503 (package
10504 (inherit java-jsch-agentproxy-core)
10505 (name "java-jsch-agentproxy-jsch")
10506 (arguments
10507 `(#:jar-name "jsch-agentproxy-jsch.jar"
10508 #:source-dir "jsch-agent-proxy-jsch/src/main/java"
10509 #:tests? #f)); no tests
10510 (inputs
10511 `(("java-jsch" ,java-jsch)
10512 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
10513 (synopsis "JSch integration library for agentproxy")
10514 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10515and Pageant included in Putty. This component contains a library to use
10516jsch-agent-proxy with JSch.")))
f1f4a4f0
JL
10517
10518(define-public java-apache-ivy
10519 (package
10520 (name "java-apache-ivy")
10521 (version "2.4.0")
10522 (source (origin
10523 (method url-fetch)
10524 (uri (string-append "mirror://apache//ant/ivy/" version
10525 "/apache-ivy-" version "-src.tar.gz"))
10526 (sha256
10527 (base32
10528 "1xkfn57g2m7l6y0xdq75x5rnrgk52m9jx2xah70g3ggl8750hbr0"))
10529 (patches
10530 (search-patches
10531 "java-apache-ivy-port-to-latest-bouncycastle.patch"))))
10532 (build-system ant-build-system)
10533 (arguments
10534 `(#:jar-name "ivy.jar"
10535 #:tests? #f
10536 #:phases
10537 (modify-phases %standard-phases
10538 (add-before 'build 'remove-example
10539 (lambda _
10540 (delete-file-recursively "src/example")
10541 #t))
10542 (add-before 'build 'copy-resources
10543 (lambda _
10544 (with-directory-excursion "src/java"
10545 (for-each (lambda (file)
10546 (install-file file (string-append "../../build/classes/" (dirname file))))
10547 (append
10548 (find-files "." ".*.css")
10549 (find-files "." ".*.ent")
10550 (find-files "." ".*.html")
10551 (find-files "." ".*.properties")
10552 (find-files "." ".*.xsd")
10553 (find-files "." ".*.xsl")
2c8ac364
MW
10554 (find-files "." ".*.xml"))))
10555 #t))
f1f4a4f0
JL
10556 (add-before 'build 'fix-vfs
10557 (lambda _
10558 (substitute*
10559 '("src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java"
10560 "src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java")
10561 (("import org.apache.commons.vfs") "import org.apache.commons.vfs2"))
10562 #t))
10563 (add-before 'install 'copy-manifest
10564 (lambda _
10565 (install-file "META-INF/MANIFEST.MF" "build/classes/META-INF")
10566 #t))
10567 (add-before 'install 'repack
10568 (lambda _
10569 (invoke "jar" "-cmf" "build/classes/META-INF/MANIFEST.MF" "build/jar/ivy.jar"
2c8ac364 10570 "-C" "build/classes" ".")))
f1f4a4f0
JL
10571 (add-after 'install 'install-bin
10572 (lambda* (#:key outputs #:allow-other-keys)
10573 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
10574 (ivy (string-append bin "/ivy"))
10575 (jar (string-append (assoc-ref outputs "out") "/share/java/ivy.jar")))
10576 (mkdir-p bin)
10577 (with-output-to-file ivy
10578 (lambda _
10579 (display (string-append
10580 "#!" (which "sh") "\n"
10581 "if [[ -z $CLASSPATH ]]; then\n"
10582 " cp=\"" (getenv "CLASSPATH") ":" jar "\"\n"
10583 "else\n"
10584 " cp=\"" (getenv "CLASSPATH") ":" jar ":$CLASSPATH\"\n"
10585 "fi\n"
10586 (which "java") " -cp $cp org.apache.ivy.Main $@\n"))))
10587 (chmod ivy #o755)
10588 #t))))))
10589 (inputs
10590 `(("java-bouncycastle" ,java-bouncycastle)
10591 ("java-commons-cli" ,java-commons-cli)
10592 ("java-commons-collections" ,java-commons-collections)
10593 ("java-commons-httpclient" ,java-commons-httpclient)
10594 ("java-commons-lang" ,java-commons-lang)
10595 ("java-commons-vfs" ,java-commons-vfs)
10596 ("java-jakarta-oro" ,java-jakarta-oro)
10597 ("java-jsch" ,java-jsch)
10598 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10599 ("java-jsch-agentproxy-connector-factory" ,java-jsch-agentproxy-connector-factory)
10600 ("java-jsch-agentproxy-jsch" ,java-jsch-agentproxy-jsch)
10601 ("java-junit" ,java-junit)))
10602 (home-page "https://ant.apache.org/ivy")
10603 (synopsis "Dependency manager for the Java programming language")
10604 (description "Ivy is a tool for managing (recording, tracking, resolving
10605and reporting) project dependencies. It is characterized by the following:
10606
10607@itemize
10608@item flexibility and configurability - Ivy is essentially process agnostic
10609 and is not tied to any methodology or structure. Instead it provides the
10610 necessary flexibility and configurability to be adapted to a broad range
10611 of dependency management and build processes.
10612@item tight integration with Apache Ant - while available as a standalone tool,
10613 Ivy works particularly well with Apache Ant providing a number of
10614 powerful Ant tasks ranging from dependency resolution to dependency
10615 reporting and publication.
10616@end itemize")
10617 (license license:asl2.0)))
1a1810f5
JL
10618
10619(define-public java-eclipse-sisu-inject
10620 (package
10621 (name "java-eclipse-sisu-inject")
10622 (version "0.3.3")
10623 (source (origin
10624 (method url-fetch)
10625 (uri (string-append "https://github.com/eclipse/sisu.inject/"
10626 "archive/releases/" version ".tar.gz"))
10627 (sha256
10628 (base32
10629 "11rg6yw5nl13i65xsp4jxxgr341qcnnaan48p767h28kb07s0ajn"))))
10630 (build-system ant-build-system)
10631 (arguments
10632 `(#:jar-name "eclipse-sisu-inject.jar"
10633 #:source-dir "org.eclipse.sisu.inject/src"
10634 #:jdk ,icedtea-8
10635 #:tests? #f)); no tests
10636 (inputs
10637 `(("java-guice" ,java-guice)
10638 ("java-guice-servlet" ,java-guice-servlet)
10639 ("java-javax-inject" ,java-javax-inject)
4b472f6a 10640 ("java-javaee-servletapi" ,java-javaee-servletapi)
1a1810f5
JL
10641 ("java-junit" ,java-junit)
10642 ("java-slf4j-api" ,java-slf4j-api)
10643 ("java-jsr305" ,java-jsr305)
10644 ("java-jsr250" ,java-jsr250)
10645 ("java-cdi-api" ,java-cdi-api)
10646 ("java-osgi-framework" ,java-osgi-framework)
10647 ("java-osgi-util-tracker" ,java-osgi-util-tracker)
10648 ("java-testng" ,java-testng)))
10649 (home-page "https://www.eclipse.org/sisu/")
10650 (synopsis "Classpath scanning, auto-binding, and dynamic auto-wiring")
10651 (description "Sisu is a modular JSR330-based container that supports
10652classpath scanning, auto-binding, and dynamic auto-wiring. Sisu uses
10653Google-Guice to perform dependency injection and provide the core JSR330
10654support, but removes the need to write explicit bindings in Guice modules.
10655Integration with other containers via the Eclipse Extension Registry and the
10656OSGi Service Registry is a goal of this project.")
10657 (license license:epl1.0)))
7049dea1
JL
10658
10659(define-public java-eclipse-sisu-plexus
10660 (package
10661 (name "java-eclipse-sisu-plexus")
10662 (version "0.3.3")
10663 (source (origin
10664 (method url-fetch)
10665 (uri (string-append "https://github.com/eclipse/sisu.plexus/"
10666 "archive/releases/" version ".tar.gz"))
10667 (sha256
10668 (base32
10669 "0lbj7nxy5j0z71k407zbb82icfqh7midrfk0fb3fa3jzdjz0d9d9"))
10670 (modules '((guix build utils)))
10671 (snippet
10672 '(begin
10673 (for-each delete-file (find-files "." ".*.jar"))
10674 (rename-file "org.eclipse.sisu.plexus.tests/src"
10675 "org.eclipse.sisu.plexus.tests/java")
10676 #t))))
10677 (build-system ant-build-system)
10678 (arguments
10679 `(#:jar-name "eclipse-sisu-plexus.jar"
10680 #:source-dir "org.eclipse.sisu.plexus/src"
10681 #:test-dir "org.eclipse.sisu.plexus.tests"
10682 #:test-exclude
10683 (list
10684 ;; This test fails probably because we can't generate the necessary
10685 ;; meta-inf files.
10686 "**/PlexusLoggingTest.*"
10687 ;; FIXME: This test fails because of some injection error
10688 "**/PlexusRequirementTest.*")
10689 #:jdk ,icedtea-8
10690 #:phases
10691 (modify-phases %standard-phases
10692 (add-before 'build 'copy-resources
10693 (lambda _
10694 (install-file "org.eclipse.sisu.plexus/META-INF/plexus/components.xml"
10695 "build/classes/META-INF/plexus")
10696 #t))
10697 (add-before 'check 'build-test-jar
10698 (lambda _
10699 (with-directory-excursion "org.eclipse.sisu.plexus.tests/resources/component-jar/src/main/"
10700 (mkdir "build")
10701 (with-directory-excursion "java"
10702 (apply invoke "javac" "-cp"
10703 (string-append (getenv "CLASSPATH")
10704 ":../../../../../build/classes")
10705 (find-files "." ".*.java"))
10706 (for-each (lambda (file) (install-file file (string-append "../build/" file)))
10707 (find-files "." ".*.jar")))
10708 (mkdir-p "build/META-INF/plexus")
10709 (copy-file "resources/META-INF/plexus/components.xml"
10710 "build/META-INF/plexus/components.xml")
10711 (with-directory-excursion "build"
10712 (invoke "jar" "cf" "../../../component-jar-0.1.jar" ".")))
10713 (with-directory-excursion "org.eclipse.sisu.plexus.tests/"
10714 (copy-recursively "META-INF" "../build/test-classes/META-INF")
10715 (substitute* "java/org/eclipse/sisu/plexus/DefaultPlexusContainerTest.java"
10716 (("resources/component-jar")
10717 "org.eclipse.sisu.plexus.tests/resources/component-jar")))
10718 #t)))))
10719 (inputs
10720 `(("java-plexus-classworlds" ,java-plexus-classworlds)
10721 ("java-plexus-util" ,java-plexus-utils)
10722 ("java-plexus-component-annotations" ,java-plexus-component-annotations)
10723 ("java-osgi-framework" ,java-osgi-framework)
10724 ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)
10725 ("java-guice" ,java-guice)
10726 ("java-javax-inject" ,java-javax-inject)
10727 ("java-slf4j-api" ,java-slf4j-api)
10728 ("java-junit" ,java-junit)))
10729 (native-inputs
10730 `(("java-guava" ,java-guava)
10731 ("java-aopalliance" ,java-aopalliance)
10732 ("java-cglib" ,java-cglib)
10733 ("java-asm" ,java-asm)))
10734 (home-page "https://www.eclipse.org/sisu/")
10735 (synopsis "Plexus support for the sisu container")
10736 (description "Sisu is a modular JSR330-based container that supports
10737classpath scanning, auto-binding, and dynamic auto-wiring. This package
10738adds Plexus support to the Sisu-Inject container.")
10739 (license license:epl1.0)))
3fa18fe7
JL
10740
10741(define-public java-commons-compiler
10742 (package
10743 (name "java-commons-compiler")
10744 (version "3.0.8")
10745 (source (origin
10746 (method git-fetch)
10747 (uri (git-reference
10748 (url "https://github.com/janino-compiler/janino")
10749 (commit "91aa95686d1e4ca3b16a984a03a38686572331b2")))
10750 (file-name (string-append name "-" version))
10751 (sha256
10752 (base32
10753 "04hfdl59sgh20qkxzgnibvs8f9hy6n7znxwpk611y5d89977y62r"))
10754 (modules '((guix build utils)))
10755 (snippet
10756 '(begin
10757 (for-each delete-file
10758 (find-files "." "\\.jar$"))
10759 #t))))
10760 (build-system ant-build-system)
10761 (arguments
10762 `(#:jar-name "commons-compiler.jar"
10763 #:source-dir "commons-compiler/src/main"
10764 #:tests? #f)); no tests
10765 (home-page "https://github.com/janino-compiler/janino")
10766 (synopsis "Java compiler")
10767 (description "Commons-compiler contains an API for janino, including the
10768@code{IExpressionEvaluator}, @code{IScriptEvaluator}, @code{IClassBodyEvaluator}
10769and @code{ISimpleCompiler} interfaces.")
10770 (license license:bsd-3)))
3402e651
JL
10771
10772(define-public java-janino
10773 (package
10774 (inherit java-commons-compiler)
10775 (name "java-janino")
10776 (arguments
10777 `(#:jar-name "janino.jar"
10778 #:source-dir "src/main/java"
10779 #:phases
10780 (modify-phases %standard-phases
10781 (add-before 'configure 'chdir
10782 (lambda _
2c8ac364
MW
10783 (chdir "janino")
10784 #t)))))
3402e651
JL
10785 (inputs
10786 `(("java-commons-compiler" ,java-commons-compiler)))
10787 (native-inputs
10788 `(("java-junit" ,java-junit)
10789 ("java-hamcrest-core" ,java-hamcrest-core)))
10790 (description "Janino is a Java compiler. Janino can compile a set of
10791source files to a set of class files like @code{javac}, but also compile a
10792Java expression, block, class body or source file in memory, load the bytecode
10793and execute it directly in the same JVM. @code{janino} can also be used for
10794static code analysis or code manipulation.")))
7d8207a4
JL
10795
10796(define-public java-logback-core
10797 (package
10798 (name "java-logback-core")
10799 (version "1.2.3")
10800 (source (origin
10801 (method url-fetch)
10802 (uri (string-append "https://github.com/qos-ch/logback/archive/v_"
10803 version ".tar.gz"))
b1ccd2a1 10804 (file-name (string-append name "-" version ".tar.gz"))
7d8207a4
JL
10805 (sha256
10806 (base32
10807 "1x6ga74yfgm94cfx98gybakbrlilx8i2gn6dx13l40kasmys06mi"))
10808 (modules '((guix build utils)))
10809 (snippet
2c8ac364
MW
10810 '(begin
10811 (delete-file-recursively "logback-access/lib")
10812 #t))))
7d8207a4
JL
10813 (build-system ant-build-system)
10814 (arguments
10815 `(#:jar-name "logback.jar"
10816 #:source-dir "src/main/java"
10817 #:test-dir "src/test"
10818 #:test-exclude
10819 ;; These tests fail with Unable to set MockitoNamingPolicy on cglib generator
10820 ;; which creates FastClasses
10821 (list "**/AllCoreTest.*"
10822 "**/AutoFlushingObjectWriterTest.*"
10823 "**/PackageTest.*"
10824 "**/ResilientOutputStreamTest.*"
10825 ;; And we still don't want to run abstract classes
10826 "**/Abstract*.*")
10827 #:phases
10828 (modify-phases %standard-phases
10829 (add-before 'configure 'chdir
10830 (lambda _
10831 (chdir "logback-core")
10832 #t)))))
10833 (inputs
10834 `(("java-javax-mail" ,java-javax-mail)
4b472f6a 10835 ("servlet" ,java-javaee-servletapi)
7d8207a4
JL
10836 ("java-commons-compiler" ,java-commons-compiler)
10837 ("java-janino" ,java-janino)))
10838 (native-inputs
10839 `(("java-junit" ,java-junit)
10840 ("java-hamcrest-core" ,java-hamcrest-core)
10841 ("java-mockito-1" ,java-mockito-1)
10842 ("java-cglib" ,java-cglib)
10843 ("java-asm" ,java-asm)
10844 ("java-objenesis" ,java-objenesis)
10845 ("java-joda-time" ,java-joda-time)))
10846 (home-page "https://logback.qos.ch")
10847 (synopsis "Logging for java")
10848 (description "Logback is intended as a successor to the popular log4j project.
10849This module lays the groundwork for the other two modules.")
10850 ;; Either epl1.0 or lgpl2.1
10851 (license (list license:epl1.0
10852 license:lgpl2.1))))
3a69f5f2
JL
10853
10854(define-public java-logback-classic
10855 (package
10856 (inherit java-logback-core)
10857 (name "java-logback-classic")
10858 (arguments
10859 `(#:jar-name "logback-classic.jar"
10860 #:source-dir "src/main/java"
10861 #:test-dir "src/test"
10862 #:tests? #f; tests require more packages: h2, greenmail, hsql, subethamail, slf4j, log4j, felix
10863 #:jdk ,icedtea-8
10864 #:phases
10865 (modify-phases %standard-phases
10866 (add-before 'configure 'chdir
10867 (lambda _
10868 (chdir "logback-classic")
10869 #t))
10870 (replace 'build
10871 (lambda* (#:key inputs #:allow-other-keys)
10872 (mkdir-p "build/classes")
10873 (setenv "CLASSPATH"
10874 (string-join
10875 (apply append (map (lambda (input)
10876 (find-files (assoc-ref inputs input)
10877 ".*.jar"))
10878 '("java-logback-core" "java-slf4j-api"
4b472f6a 10879 "java-commons-compiler" "servlet"
3a69f5f2
JL
10880 "groovy")))
10881 ":"))
10882 (apply invoke "groovyc" "-d" "build/classes" "-j"
10883 (find-files "src/main/" ".*\\.(groovy|java)$"))
10884 (invoke "ant" "jar")
10885 #t)))))
10886 (inputs
10887 `(("java-logback-core" ,java-logback-core)
10888 ("java-slf4j-api" ,java-slf4j-api)
10889 ,@(package-inputs java-logback-core)))
10890 (native-inputs
10891 `(("groovy" ,groovy)))
10892 (description "Logback is intended as a successor to the popular log4j project.
10893This module can be assimilated to a significantly improved version of log4j.
10894Moreover, @code{logback-classic} natively implements the slf4j API so that you
10895can readily switch back and forth between logback and other logging frameworks
10896such as log4j or @code{java.util.logging} (JUL).")))
ab621bf1
JL
10897
10898(define-public java-qdox
10899 (package
10900 (name "java-qdox")
10901 ; Newer version exists, but this version is required by java-plexus-component-metadata
10902 (version "2.0-M2")
10903 (source (origin
10904 (method url-fetch)
10905 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
10906 ;; Older releases at https://github.com/codehaus/qdox/
10907 ;; Note: The release at maven is pre-generated. The release at
10908 ;; github requires jflex.
10909 (uri (string-append "http://central.maven.org/maven2/"
10910 "com/thoughtworks/qdox/qdox/" version
10911 "/qdox-" version "-sources.jar"))
10912 (sha256
10913 (base32
10914 "10xxrcaicq6axszcr2jpygisa4ch4sinyx5q7kqqxv4lknrmxp5x"))))
10915 (build-system ant-build-system)
10916 (arguments
10917 `(#:jar-name "qdox.jar"
10918 #:tests? #f)); no tests
10919 (home-page "http://qdox.codehaus.org/")
10920 (synopsis "Parse definitions from Java source files")
10921 (description "QDox is a high speed, small footprint parser for extracting
10922class/interface/method definitions from source files complete with JavaDoc
10923@code{@@tags}. It is designed to be used by active code generators or
10924documentation tools.")
10925 (license license:asl2.0)))