gnu: autojump: Update to 22.5.1.
[jackhill/guix/guix.git] / gnu / packages / java.scm
CommitLineData
0760e3a1 1;;; GNU Guix --- Functional package management for GNU
799c3c86 2;;; Copyright © 2015, 2016, 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
559239af 3;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
ea9e58ef
CZ
4;;; Copyright © 2016, 2017 Roel Janssen <roel@gnu.org>
5;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
a1a5ef20 6;;; Copyright © 2017, 2018 Julien Lepiller <julien@lepiller.eu>
88f256a1 7;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
1d47ea86 8;;; Copyright © 2016, 2017, 2018 Alex Vong <alexvong1995@gmail.com>
f4548394 9;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
d0e9ded7
GB
10;;; Copyright © 2018 Gábor Boskovits <boskovits@gmail.com>
11;;; Copyright © 2018 Chris Marusich <cmmarusich@gmail.com>
0760e3a1
RW
12;;;
13;;; This file is part of GNU Guix.
14;;;
15;;; GNU Guix is free software; you can redistribute it and/or modify it
16;;; under the terms of the GNU General Public License as published by
17;;; the Free Software Foundation; either version 3 of the License, or (at
18;;; your option) any later version.
19;;;
20;;; GNU Guix is distributed in the hope that it will be useful, but
21;;; WITHOUT ANY WARRANTY; without even the implied warranty of
22;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23;;; GNU General Public License for more details.
24;;;
25;;; You should have received a copy of the GNU General Public License
26;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
27
28(define-module (gnu packages java)
29 #:use-module ((guix licenses) #:prefix license:)
30 #:use-module (guix packages)
31 #:use-module (guix download)
62c9bfaa 32 #:use-module (guix hg-download)
72885a4c 33 #:use-module (guix git-download)
78745d33 34 #:use-module (guix svn-download)
f6789047 35 #:use-module (guix utils)
068e476f 36 #:use-module (guix build-system ant)
0760e3a1 37 #:use-module (guix build-system gnu)
6a5829d9 38 #:use-module (guix build-system trivial)
0760e3a1
RW
39 #:use-module (gnu packages)
40 #:use-module (gnu packages attr)
41 #:use-module (gnu packages autotools)
42 #:use-module (gnu packages base)
43 #:use-module (gnu packages bash)
f21403e2 44 #:use-module (gnu packages certs)
0760e3a1
RW
45 #:use-module (gnu packages cpio)
46 #:use-module (gnu packages cups)
47 #:use-module (gnu packages compression)
48 #:use-module (gnu packages fontutils)
49 #:use-module (gnu packages gawk)
72885a4c 50 #:use-module (gnu packages gettext)
0760e3a1 51 #:use-module (gnu packages gcc)
8581c813 52 #:use-module (gnu packages gl)
0760e3a1
RW
53 #:use-module (gnu packages gnuzilla) ;nss
54 #:use-module (gnu packages ghostscript) ;lcms
55 #:use-module (gnu packages gnome)
3a69f5f2 56 #:use-module (gnu packages groovy)
0760e3a1 57 #:use-module (gnu packages gtk)
6a5829d9 58 #:use-module (gnu packages guile)
afb5858d 59 #:use-module (gnu packages icu4c)
0760e3a1 60 #:use-module (gnu packages image)
c4fd86f9 61 #:use-module (gnu packages libffi)
0760e3a1 62 #:use-module (gnu packages linux) ;alsa
2f0d0418 63 #:use-module (gnu packages maths)
bcb078a4 64 #:use-module (gnu packages onc-rpc)
5766984b 65 #:use-module (gnu packages web)
0760e3a1 66 #:use-module (gnu packages wget)
0760e3a1
RW
67 #:use-module (gnu packages pkg-config)
68 #:use-module (gnu packages perl)
c4fd86f9 69 #:use-module (gnu packages popt)
89e34644 70 #:use-module (gnu packages kerberos)
0760e3a1
RW
71 #:use-module (gnu packages xml)
72 #:use-module (gnu packages xorg)
f6789047 73 #:use-module (gnu packages texinfo)
2d15f601
RW
74 #:use-module ((srfi srfi-1) #:select (fold alist-delete))
75 #:use-module (srfi srfi-11)
76 #:use-module (ice-9 match))
0760e3a1 77
e1ae3587
RW
78\f
79;;;
80;;; Java bootstrap toolchain.
81;;;
82
83;; The Java bootstrap begins with Jikes, a Java compiler written in C++. We
269fb7d3
RW
84;; use it to build a simple version of GNU Classpath, the Java standard
85;; library. We chose version 0.93 because it is the last version that can be
86;; built with Jikes. With Jikes and this version of GNU Classpath we can
87;; build JamVM, a Java Virtual Machine. We build version 1.5.1 because it is
88;; the last version of JamVM that works with a version of GNU classpath that
89;; does not require ECJ. These three packages make up the bootstrap JDK.
90
91;; This is sufficient to build an older version of Ant, which is needed to
92;; build an older version of ECJ, an incremental Java compiler, both of which
93;; are written in Java.
e1ae3587 94;;
269fb7d3
RW
95;; ECJ is needed to build the latest release (0.99) and the development
96;; version of GNU Classpath. The development version of GNU Classpath has
97;; much more support for Java 1.6 than the latest release, but we need to
98;; build 0.99 first to get a working version of javah. ECJ, the development
99;; version of GNU Classpath, and the latest version of JamVM make up the
100;; second stage JDK with which we can build the OpenJDK with the Icedtea 1.x
101;; build framework. We then build the more recent JDKs Icedtea 2.x and
102;; Icedtea 3.x.
e1ae3587
RW
103
104(define jikes
105 (package
106 (name "jikes")
107 (version "1.22")
108 (source (origin
109 (method url-fetch)
110 (uri (string-append "mirror://sourceforge/jikes/Jikes/"
111 version "/jikes-" version ".tar.bz2"))
112 (sha256
113 (base32
114 "1qqldrp74pzpy5ly421srqn30qppmm9cvjiqdngk8hf47dv2rc0c"))))
115 (build-system gnu-build-system)
116 (home-page "http://jikes.sourceforge.net/")
117 (synopsis "Compiler for the Java language")
118 (description "Jikes is a compiler that translates Java source files as
119defined in The Java Language Specification into the bytecoded instruction set
120and binary format defined in The Java Virtual Machine Specification.")
121 (license license:ibmpl1.0)))
122
45f762ee
RW
123;; This is the last version of GNU Classpath that can be built without ECJ.
124(define classpath-bootstrap
2551fee8 125 (package
45f762ee
RW
126 (name "classpath")
127 (version "0.93")
2551fee8
RW
128 (source (origin
129 (method url-fetch)
45f762ee
RW
130 (uri (string-append "mirror://gnu/classpath/classpath-"
131 version ".tar.gz"))
2551fee8
RW
132 (sha256
133 (base32
bab9793f
EF
134 "0i99wf9xd3hw1sj2sazychb9prx8nadxh2clgvk3zlmb28v0jbfz"))
135 (patches (search-patches "classpath-aarch64-support.patch"))))
2551fee8
RW
136 (build-system gnu-build-system)
137 (arguments
138 `(#:configure-flags
45f762ee
RW
139 (list (string-append "JAVAC="
140 (assoc-ref %build-inputs "jikes")
141 "/bin/jikes")
2551fee8
RW
142 "--disable-Werror"
143 "--disable-gmp"
144 "--disable-gtk-peer"
45f762ee 145 "--disable-gconf-peer"
2551fee8
RW
146 "--disable-plugin"
147 "--disable-dssi"
148 "--disable-alsa"
45f762ee
RW
149 "--disable-gjdoc")
150 #:phases
151 (modify-phases %standard-phases
152 (add-after 'install 'install-data
153 (lambda _ (zero? (system* "make" "install-data")))))))
2551fee8
RW
154 (native-inputs
155 `(("jikes" ,jikes)
156 ("fastjar" ,fastjar)
45f762ee 157 ("libltdl" ,libltdl)
2551fee8 158 ("pkg-config" ,pkg-config)))
45f762ee
RW
159 (home-page "https://www.gnu.org/software/classpath/")
160 (synopsis "Essential libraries for Java")
161 (description "GNU Classpath is a project to create core class libraries
162for use with runtimes, compilers and tools for the Java programming
163language.")
164 ;; GPLv2 or later, with special linking exception.
165 (license license:gpl2+)))
57f6c50d 166
063629aa
RW
167;; This is the last version of JamVM that works with a version of GNU
168;; classpath that does not require ECJ.
169(define jamvm-1-bootstrap
57f6c50d 170 (package
063629aa
RW
171 (name "jamvm")
172 (version "1.5.1")
57f6c50d
RW
173 (source (origin
174 (method url-fetch)
063629aa
RW
175 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
176 "JamVM%20" version "/jamvm-"
177 version ".tar.gz"))
57f6c50d
RW
178 (sha256
179 (base32
063629aa 180 "06lhi03l3b0h48pc7x58bk9my2nrcf1flpmglvys3wyad6yraf36"))))
57f6c50d
RW
181 (build-system gnu-build-system)
182 (arguments
c4fd86f9 183 `(#:configure-flags
063629aa
RW
184 (list (string-append "--with-classpath-install-dir="
185 (assoc-ref %build-inputs "classpath")))))
57f6c50d 186 (inputs
063629aa 187 `(("classpath" ,classpath-bootstrap)
57f6c50d 188 ("jikes" ,jikes)
063629aa
RW
189 ("zlib" ,zlib)))
190 (home-page "http://jamvm.sourceforge.net/")
191 (synopsis "Small Java Virtual Machine")
192 (description "JamVM is a Java Virtual Machine conforming to the JVM
193specification edition 2 (blue book). It is extremely small. However, unlike
194other small VMs it supports the full spec, including object finalisation and
195JNI.")
196 (license license:gpl2+)))
2551fee8 197
5783bd77
RW
198(define ant-bootstrap
199 (package
200 (name "ant-bootstrap")
201 ;; The 1.10.x series requires Java 8. 1.9.0 and later use generics, which
202 ;; are not supported. The 1.8.x series is the last to use only features
ff4d9fdf
RW
203 ;; supported by Jikes.
204 (version "1.8.4")
5783bd77
RW
205 (source (origin
206 (method url-fetch)
207 (uri (string-append "http://archive.apache.org/dist/"
208 "ant/source/apache-ant-"
209 version "-src.tar.bz2"))
210 (sha256
211 (base32
ff4d9fdf 212 "1cg0lga887qz5iizh6mlkxp01lciymrhmp7wzxpl6zpnldxmzrjx"))))
5783bd77
RW
213 (build-system gnu-build-system)
214 (arguments
215 `(#:tests? #f ; no "check" target
216 #:phases
217 (modify-phases %standard-phases
d4fd4c3a 218 (delete 'bootstrap)
5783bd77
RW
219 (delete 'configure)
220 (replace 'build
221 (lambda* (#:key inputs #:allow-other-keys)
aa432388 222 (setenv "JAVA_HOME" (assoc-ref inputs "jamvm"))
5783bd77 223 (setenv "JAVACMD"
aa432388
RW
224 (string-append (assoc-ref inputs "jamvm")
225 "/bin/jamvm"))
5783bd77 226 (setenv "JAVAC"
aa432388
RW
227 (string-append (assoc-ref inputs "jikes")
228 "/bin/jikes"))
229 (setenv "CLASSPATH"
230 (string-append (assoc-ref inputs "jamvm")
231 "/lib/rt.jar"))
5783bd77 232
d4fd4c3a
RW
233 ;; Ant complains if this file doesn't exist.
234 (setenv "HOME" "/tmp")
235 (with-output-to-file "/tmp/.ant.properties"
236 (lambda _ (display "")))
5783bd77
RW
237
238 ;; Use jikes instead of javac for <javac ...> tags in build.xml
239 (setenv "ANT_OPTS" "-Dbuild.compiler=jikes")
240
241 ;; jikes produces lots of warnings, but they are not very
242 ;; interesting, so we silence them.
243 (setenv "$BOOTJAVAC_OPTS" "-nowarn")
244
d4fd4c3a
RW
245 ;; Without these JamVM options the build may freeze.
246 (substitute* "bootstrap.sh"
247 (("^\"\\$\\{JAVACMD\\}\" " m)
248 (string-append m "-Xnocompact -Xnoinlining ")))
249
5783bd77
RW
250 ;; Disable tests because we are bootstrapping and thus don't have
251 ;; any of the dependencies required to build and run the tests.
252 (substitute* "build.xml"
253 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
254 (zero? (system* "bash" "bootstrap.sh"
255 (string-append "-Ddist.dir="
256 (assoc-ref %outputs "out"))))))
257 (delete 'install))))
258 (native-inputs
259 `(("jikes" ,jikes)
aa432388 260 ("jamvm" ,jamvm-1-bootstrap)))
5783bd77
RW
261 (home-page "http://ant.apache.org")
262 (synopsis "Build tool for Java")
263 (description
264 "Ant is a platform-independent build tool for Java. It is similar to
265make but is implemented using the Java language, requires the Java platform,
266and is best suited to building Java projects. Ant uses XML to describe the
267build process and its dependencies, whereas Make uses Makefile format.")
268 (license license:asl2.0)))
269
5461721f
RW
270;; Version 3.2.2 is the last version without a dependency on a full-fledged
271;; compiler for Java 1.5.
272(define ecj-bootstrap
273 (package
274 (name "ecj-bootstrap")
275 (version "3.2.2")
276 (source (origin
277 (method url-fetch)
278 (uri (string-append "http://archive.eclipse.org/eclipse/"
279 "downloads/drops/R-" version
280 "-200702121330/ecjsrc.zip"))
281 (sha256
282 (base32
283 "05hj82kxd23qaglsjkaqcj944riisjha7acf7h3ljhrjyljx8307"))))
284 ;; It would be so much easier if we could use the ant-build-system, but we
285 ;; cannot as we don't have ant at this point. We use ecj for
286 ;; bootstrapping the JDK.
287 (build-system gnu-build-system)
288 (arguments
289 `(#:modules ((guix build gnu-build-system)
290 (guix build utils)
291 (srfi srfi-1))
292 #:tests? #f ; there are no tests
293 #:phases
294 (modify-phases %standard-phases
295 (replace 'configure
296 (lambda* (#:key inputs #:allow-other-keys)
297 (setenv "CLASSPATH"
298 (string-join
6c775dc6
RW
299 (cons (string-append (assoc-ref inputs "jamvm")
300 "/lib/rt.jar")
301 (find-files (string-append
302 (assoc-ref inputs "ant-bootstrap")
303 "/lib")
304 "\\.jar$"))
5461721f
RW
305 ":"))
306 #t))
307 (replace 'build
308 (lambda* (#:key inputs #:allow-other-keys)
309 ;; The unpack phase enters the "org" directory by mistake.
310 (chdir "..")
311
312 ;; Create a simple manifest to make ecj executable.
313 (with-output-to-file "manifest"
314 (lambda _
315 (display "Manifest-Version: 1.0
316Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n")))
317
318 ;; Compile it all!
6c775dc6 319 (and (zero? (apply system* "jikes"
5461721f
RW
320 (find-files "." "\\.java$")))
321 (zero? (system* "fastjar" "cvfm"
322 "ecj-bootstrap.jar" "manifest" ".")))))
323 (replace 'install
324 (lambda* (#:key outputs #:allow-other-keys)
325 (let ((share (string-append (assoc-ref outputs "out")
326 "/share/java/")))
327 (mkdir-p share)
328 (install-file "ecj-bootstrap.jar" share)
329 #t))))))
330 (native-inputs
331 `(("ant-bootstrap" ,ant-bootstrap)
332 ("unzip" ,unzip)
6c775dc6
RW
333 ("jikes" ,jikes)
334 ("jamvm" ,jamvm-1-bootstrap)
5461721f
RW
335 ("fastjar" ,fastjar)))
336 (home-page "https://eclipse.org")
337 (synopsis "Eclipse Java development tools core batch compiler")
338 (description "This package provides the Eclipse Java core batch compiler
339for bootstrapping purposes. The @dfn{Eclipse compiler for Java} (ecj) is a
340requirement for all GNU Classpath releases after version 0.93.")
341 (license license:epl1.0)))
342
6a5829d9
RW
343(define ecj-javac-wrapper
344 (package (inherit ecj-bootstrap)
345 (name "ecj-javac-wrapper")
346 (source #f)
347 (build-system trivial-build-system)
348 (arguments
349 `(#:modules ((guix build utils))
350 #:builder
c4f06c11 351 (begin
6a5829d9
RW
352 (use-modules (guix build utils))
353 (let* ((bin (string-append (assoc-ref %outputs "out") "/bin"))
354 (target (string-append bin "/javac"))
355 (guile (string-append (assoc-ref %build-inputs "guile")
356 "/bin/guile"))
357 (ecj (string-append (assoc-ref %build-inputs "ecj-bootstrap")
358 "/share/java/ecj-bootstrap.jar"))
c4f06c11
RW
359 (java (string-append (assoc-ref %build-inputs "jamvm")
360 "/bin/jamvm"))
361 (bootcp (let ((jvmlib (string-append (assoc-ref %build-inputs "classpath")
362 "/share/classpath")))
51602aac
RW
363 (string-append jvmlib "/glibj.zip:"
364 jvmlib "/tools.zip"))))
6a5829d9
RW
365 (mkdir-p bin)
366 (with-output-to-file target
367 (lambda _
368 (format #t "#!~a --no-auto-compile\n!#\n" guile)
369 (write
370 `(begin (use-modules (ice-9 match)
371 (ice-9 receive)
372 (ice-9 hash-table)
373 (srfi srfi-1)
374 (srfi srfi-26))
375 (define defaults
376 '(("-bootclasspath" ,bootcp)
377 ("-source" "1.5")
378 ("-target" "1.5")
379 ("-cp" ".")))
380 (define (main args)
381 (let ((classpath (getenv "CLASSPATH")))
382 (setenv "CLASSPATH"
c4f06c11
RW
383 (string-join (list ,ecj
384 ,(string-append (assoc-ref %build-inputs "jamvm")
385 "/lib/rt.jar")
386 (or classpath ""))
387 ":")))
6a5829d9
RW
388 (receive (vm-args other-args)
389 ;; Separate VM arguments from arguments to ECJ.
390 (partition (cut string-prefix? "-J" <>)
391 (fold (lambda (default acc)
392 (if (member (first default) acc)
393 acc (append default acc)))
394 args defaults))
395 (apply system* ,java
396 (append
ae0a5a7e 397 (list "-Xnocompact" "-Xnoinlining")
6a5829d9
RW
398 ;; Remove "-J" prefix
399 (map (cut string-drop <> 2) vm-args)
400 '("org.eclipse.jdt.internal.compiler.batch.Main")
401 (cons "-nowarn" other-args)))))
402 ;; Entry point
403 (let ((args (cdr (command-line))))
404 (if (null? args)
405 (format (current-error-port) "javac: no arguments given!\n")
406 (main args)))))))
407 (chmod target #o755)
408 #t))))
409 (native-inputs
410 `(("guile" ,guile-2.2)
411 ("ecj-bootstrap" ,ecj-bootstrap)
c4f06c11
RW
412 ("jamvm" ,jamvm-1-bootstrap)
413 ("classpath" ,classpath-bootstrap)))
6a5829d9
RW
414 (description "This package provides a wrapper around the @dfn{Eclipse
415compiler for Java} (ecj) with a command line interface that is compatible with
416the standard javac executable.")))
417
8778da03
RW
418;; The classpath-bootstrap was built without a virtual machine, so it does not
419;; provide a wrapper for javah. We cannot build the development version of
420;; Classpath without javah.
421(define classpath-0.99
422 (package (inherit classpath-bootstrap)
d3551e86
RW
423 (version "0.99")
424 (source (origin
425 (method url-fetch)
426 (uri (string-append "mirror://gnu/classpath/classpath-"
427 version ".tar.gz"))
428 (sha256
429 (base32
bab9793f
EF
430 "1j7cby4k66f1nvckm48xcmh352b1d1b33qk7l6hi7dp9i9zjjagr"))
431 (patches (search-patches "classpath-aarch64-support.patch"))))
d3551e86
RW
432 (arguments
433 `(#:configure-flags
434 (list (string-append "--with-ecj-jar="
435 (assoc-ref %build-inputs "ecj-bootstrap")
436 "/share/java/ecj-bootstrap.jar")
437 (string-append "JAVAC="
438 (assoc-ref %build-inputs "ecj-javac-wrapper")
439 "/bin/javac")
440 (string-append "JAVA="
8778da03
RW
441 (assoc-ref %build-inputs "jamvm")
442 "/bin/jamvm")
d3551e86
RW
443 "GCJ_JAVAC_TRUE=no"
444 "ac_cv_prog_java_works=yes" ; trust me
445 "--disable-Werror"
446 "--disable-gmp"
447 "--disable-gtk-peer"
448 "--disable-gconf-peer"
449 "--disable-plugin"
450 "--disable-dssi"
451 "--disable-alsa"
452 "--disable-gjdoc")
453 #:phases
454 (modify-phases %standard-phases
455 (add-after 'install 'install-data
456 (lambda _ (zero? (system* "make" "install-data")))))))
457 (native-inputs
458 `(("ecj-bootstrap" ,ecj-bootstrap)
459 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
460 ("fastjar" ,fastjar)
8778da03
RW
461 ("jamvm" ,jamvm-1-bootstrap)
462 ("classpath" ,classpath-bootstrap)
d3551e86 463 ("libltdl" ,libltdl)
8778da03 464 ("pkg-config" ,pkg-config)))))
d3551e86 465
c98d7a66
RW
466;; We need this because classpath-bootstrap does not provide all of the tools
467;; we need to build classpath-devel.
04d7cae2 468(define classpath-jamvm-wrappers
c98d7a66 469 (package (inherit classpath-0.99)
04d7cae2
RW
470 (name "classpath-jamvm-wrappers")
471 (source #f)
472 (build-system trivial-build-system)
473 (arguments
474 `(#:modules ((guix build utils))
475 #:builder
476 (begin
477 (use-modules (guix build utils))
478 (let* ((bash (assoc-ref %build-inputs "bash"))
479 (jamvm (assoc-ref %build-inputs "jamvm"))
480 (classpath (assoc-ref %build-inputs "classpath"))
481 (bin (string-append (assoc-ref %outputs "out")
482 "/bin/")))
483 (mkdir-p bin)
484 (for-each (lambda (tool)
485 (with-output-to-file (string-append bin tool)
486 (lambda _
487 (format #t "#!~a/bin/sh
40e3a197 488~a/bin/jamvm -Xnocompact -Xnoinlining -classpath ~a/share/classpath/tools.zip \
04d7cae2
RW
489gnu.classpath.tools.~a.~a $@"
490 bash jamvm classpath tool
491 (if (string=? "native2ascii" tool)
492 "Native2ASCII" "Main"))))
493 (chmod (string-append bin tool) #o755))
494 (list "javah"
495 "rmic"
496 "rmid"
497 "orbd"
498 "rmiregistry"
499 "native2ascii"))
500 #t))))
501 (native-inputs
502 `(("bash" ,bash)
c98d7a66
RW
503 ("jamvm" ,jamvm-1-bootstrap)
504 ("classpath" ,classpath-0.99)))
04d7cae2
RW
505 (inputs '())
506 (synopsis "Executables from GNU Classpath")
507 (description "This package provides wrappers around the tools provided by
508the GNU Classpath library. They are executed by the JamVM virtual
509machine.")))
510
72885a4c
RW
511;; The last release of GNU Classpath is 0.99 and it happened in 2012. Since
512;; then Classpath has gained much more support for Java 1.6.
513(define-public classpath-devel
514 (let ((commit "e7c13ee0cf2005206fbec0eca677f8cf66d5a103")
515 (revision "1"))
8778da03 516 (package (inherit classpath-bootstrap)
72885a4c
RW
517 (version (string-append "0.99-" revision "." (string-take commit 9)))
518 (source (origin
519 (method git-fetch)
520 (uri (git-reference
5f13bf09 521 (url "https://git.savannah.gnu.org/git/classpath.git")
72885a4c 522 (commit commit)))
51988e3a 523 (file-name (string-append "classpath-" version "-checkout"))
72885a4c
RW
524 (sha256
525 (base32
526 "1v2rww76ww322mpg3s12a1kkc6gkp31bm9gcxs532h0wq285fiw4"))))
527 (arguments
93c103ab
RW
528 `(#:make-flags
529 ;; Ensure that the initial heap size is smaller than the maximum
530 ;; size. By default only Xmx is set, which can lead to invalid
531 ;; memory settings on some machines with a lot of memory.
532 '("JAVAC_MEM_OPT=-J-Xms512M -J-Xmx768M")
533 #:configure-flags
72885a4c
RW
534 (list (string-append "--with-ecj-jar="
535 (assoc-ref %build-inputs "ecj-bootstrap")
536 "/share/java/ecj-bootstrap.jar")
93c103ab 537 (string-append "--with-javac="
72885a4c
RW
538 (assoc-ref %build-inputs "ecj-javac-wrapper")
539 "/bin/javac")
540 (string-append "JAVA="
541 (assoc-ref %build-inputs "jamvm")
542 "/bin/jamvm")
543 "GCJ_JAVAC_TRUE=no"
544 "ac_cv_prog_java_works=yes" ; trust me
545 "--disable-Werror"
546 "--disable-gmp"
547 "--disable-gtk-peer"
548 "--disable-gconf-peer"
549 "--disable-plugin"
550 "--disable-dssi"
551 "--disable-alsa"
552 "--disable-gjdoc")
553 #:phases
554 (modify-phases %standard-phases
2a69f48e
RW
555 ;; XXX The bootstrap phase executes autogen.sh, which fails after
556 ;; complaining about the lack of gettext.
557 (replace 'bootstrap
558 (lambda _ (invoke "autoreconf" "-vif")))
72885a4c
RW
559 (add-after 'unpack 'remove-unsupported-annotations
560 (lambda _
561 (substitute* (find-files "java" "\\.java$")
562 (("@Override") ""))
563 #t))
564 (add-after 'install 'install-data
565 (lambda _ (zero? (system* "make" "install-data")))))))
566 (native-inputs
567 `(("autoconf" ,autoconf)
568 ("automake" ,automake)
569 ("libtool" ,libtool)
570 ("gettext" ,gettext-minimal)
571 ("texinfo" ,texinfo)
572 ("classpath-jamvm-wrappers" ,classpath-jamvm-wrappers) ; for javah
573 ("ecj-bootstrap" ,ecj-bootstrap)
b5a0d427 574 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
72885a4c 575 ("fastjar" ,fastjar)
58d2b135 576 ("jamvm" ,jamvm-1-bootstrap)
72885a4c
RW
577 ("libltdl" ,libltdl)
578 ("pkg-config" ,pkg-config))))))
579
58d2b135
RW
580(define jamvm
581 (package (inherit jamvm-1-bootstrap)
582 (version "2.0.0")
583 (source (origin
584 (method url-fetch)
585 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
586 "JamVM%20" version "/jamvm-"
587 version ".tar.gz"))
588 (sha256
589 (base32
590 "1nl0zxz8y5x8gwsrm7n32bry4dx8x70p8z3s9jbdvs8avyb8whkn"))))
591 (build-system gnu-build-system)
592 (arguments
593 `(#:configure-flags
594 (list (string-append "--with-classpath-install-dir="
595 (assoc-ref %build-inputs "classpath")))))
8c6091e3
RW
596 (inputs
597 `(("classpath" ,classpath-devel)
b5a0d427 598 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
8c6091e3
RW
599 ("zlib" ,zlib)))))
600
b5a0d427
RW
601(define ecj-javac-wrapper-final
602 (package (inherit ecj-javac-wrapper)
1bf56c72
RW
603 (native-inputs
604 `(("guile" ,guile-2.2)
605 ("ecj-bootstrap" ,ecj-bootstrap)
606 ("jamvm" ,jamvm)
607 ("classpath" ,classpath-devel)))))
608
98419316 609;; The bootstrap JDK consisting of jamvm, classpath-devel,
b5a0d427
RW
610;; ecj-javac-wrapper-final cannot build Icedtea 2.x directly, because it's
611;; written in Java 7. It can, however, build the unmaintained Icedtea 1.x,
612;; which uses Java 6 only.
98419316
RW
613(define-public icedtea-6
614 (package
615 (name "icedtea")
616 (version "1.13.13")
617 (source (origin
618 (method url-fetch)
619 (uri (string-append
620 "http://icedtea.wildebeest.org/download/source/icedtea6-"
621 version ".tar.xz"))
622 (sha256
623 (base32
624 "0bg9sb4f7qbq77c0zf9m17p47ga0kf0r9622g9p12ysg26jd1ksg"))
625 (modules '((guix build utils)))
626 (snippet
6cbee49d
MW
627 '(begin
628 (substitute* "Makefile.in"
629 ;; do not leak information about the build host
630 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
631 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
632 #t))))
98419316
RW
633 (build-system gnu-build-system)
634 (outputs '("out" ; Java Runtime Environment
635 "jdk" ; Java Development Kit
636 "doc")) ; all documentation
637 (arguments
638 `(;; There are many failing tests and many are known to fail upstream.
639 #:tests? #f
640
641 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
642 ;; gremlin) doesn't support it yet, so skip this phase.
643 #:validate-runpath? #f
644
645 #:modules ((guix build utils)
646 (guix build gnu-build-system)
647 (srfi srfi-19))
648
649 #:configure-flags
650 `("--enable-bootstrap"
651 "--enable-nss"
652 "--without-rhino"
653 "--with-parallel-jobs"
654 "--disable-downloading"
655 "--disable-tests"
656 ,(string-append "--with-ecj="
657 (assoc-ref %build-inputs "ecj")
658 "/share/java/ecj-bootstrap.jar")
659 ,(string-append "--with-jar="
660 (assoc-ref %build-inputs "fastjar")
661 "/bin/fastjar")
662 ,(string-append "--with-jdk-home="
663 (assoc-ref %build-inputs "classpath"))
664 ,(string-append "--with-java="
665 (assoc-ref %build-inputs "jamvm")
666 "/bin/jamvm"))
667 #:phases
668 (modify-phases %standard-phases
669 (replace 'unpack
670 (lambda* (#:key source inputs #:allow-other-keys)
671 (and (zero? (system* "tar" "xvf" source))
672 (begin
673 (chdir (string-append "icedtea6-" ,version))
674 (mkdir "openjdk")
675 (copy-recursively (assoc-ref inputs "openjdk-src") "openjdk")
676 ;; The convenient OpenJDK source bundle is no longer
677 ;; available for download, so we have to take the sources
678 ;; from the Mercurial repositories and change the Makefile
679 ;; to avoid tests for the OpenJDK zip archive.
680 (with-directory-excursion "openjdk"
681 (for-each (lambda (part)
682 (mkdir part)
683 (copy-recursively
684 (assoc-ref inputs
685 (string-append part "-src"))
686 part))
687 '("jdk" "hotspot" "corba"
688 "langtools" "jaxp" "jaxws")))
689 (substitute* "Makefile.in"
690 (("echo \"ERROR: No up-to-date OpenJDK zip available\"; exit -1;")
691 "echo \"trust me\";")
692 ;; The contents of the bootstrap directory must be
693 ;; writeable but when copying from the store they are
694 ;; not.
695 (("mkdir -p lib/rt" line)
696 (string-append line "; chmod -R u+w $(BOOT_DIR)")))
697 (zero? (system* "chmod" "-R" "u+w" "openjdk"))
698 #t))))
699 (add-after 'unpack 'use-classpath
700 (lambda* (#:key inputs #:allow-other-keys)
b5a0d427
RW
701 (let ((jvmlib (assoc-ref inputs "classpath"))
702 (jamvm (assoc-ref inputs "jamvm")))
98419316
RW
703 ;; Classpath does not provide rt.jar.
704 (substitute* "Makefile.in"
705 (("\\$\\(SYSTEM_JDK_DIR\\)/jre/lib/rt.jar")
706 (string-append jvmlib "/share/classpath/glibj.zip")))
707 ;; Make sure we can find all classes.
708 (setenv "CLASSPATH"
709 (string-append jvmlib "/share/classpath/glibj.zip:"
b5a0d427
RW
710 jvmlib "/share/classpath/tools.zip:"
711 jamvm "/lib/rt.jar"))
98419316
RW
712 (setenv "JAVACFLAGS"
713 (string-append "-cp "
714 jvmlib "/share/classpath/glibj.zip:"
715 jvmlib "/share/classpath/tools.zip")))
716 #t))
717 (add-after 'unpack 'patch-patches
718 (lambda _
719 ;; shebang in patches so that they apply cleanly
720 (substitute* '("patches/jtreg-jrunscript.patch"
721 "patches/hotspot/hs23/drop_unlicensed_test.patch")
722 (("#!/bin/sh") (string-append "#!" (which "sh"))))
723 #t))
724 (add-after 'unpack 'patch-paths
725 (lambda* (#:key inputs #:allow-other-keys)
726 ;; buildtree.make generates shell scripts, so we need to replace
727 ;; the generated shebang
728 (substitute* '("openjdk/hotspot/make/linux/makefiles/buildtree.make")
729 (("/bin/sh") (which "bash")))
730
731 (let ((corebin (string-append
732 (assoc-ref inputs "coreutils") "/bin/"))
733 (binbin (string-append
734 (assoc-ref inputs "binutils") "/bin/"))
735 (grepbin (string-append
736 (assoc-ref inputs "grep") "/bin/")))
737 (substitute* '("openjdk/jdk/make/common/shared/Defs-linux.gmk"
738 "openjdk/corba/make/common/shared/Defs-linux.gmk")
739 (("UNIXCOMMAND_PATH = /bin/")
740 (string-append "UNIXCOMMAND_PATH = " corebin))
741 (("USRBIN_PATH = /usr/bin/")
742 (string-append "USRBIN_PATH = " corebin))
743 (("DEVTOOLS_PATH *= */usr/bin/")
744 (string-append "DEVTOOLS_PATH = " corebin))
745 (("COMPILER_PATH *= */usr/bin/")
746 (string-append "COMPILER_PATH = "
747 (assoc-ref inputs "gcc") "/bin/"))
748 (("DEF_OBJCOPY *=.*objcopy")
749 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
750
751 ;; fix path to alsa header
752 (substitute* "openjdk/jdk/make/common/shared/Sanity.gmk"
753 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
754 (string-append "ALSA_INCLUDE="
755 (assoc-ref inputs "alsa-lib")
756 "/include/alsa/version.h")))
757
758 ;; fix hard-coded utility paths
759 (substitute* '("openjdk/jdk/make/common/shared/Defs-utils.gmk"
760 "openjdk/corba/make/common/shared/Defs-utils.gmk")
761 (("ECHO *=.*echo")
762 (string-append "ECHO = " (which "echo")))
763 (("^GREP *=.*grep")
764 (string-append "GREP = " (which "grep")))
765 (("EGREP *=.*egrep")
766 (string-append "EGREP = " (which "egrep")))
767 (("CPIO *=.*cpio")
768 (string-append "CPIO = " (which "cpio")))
769 (("READELF *=.*readelf")
770 (string-append "READELF = " (which "readelf")))
771 (("^ *AR *=.*ar")
772 (string-append "AR = " (which "ar")))
773 (("^ *TAR *=.*tar")
774 (string-append "TAR = " (which "tar")))
775 (("AS *=.*as")
776 (string-append "AS = " (which "as")))
777 (("LD *=.*ld")
778 (string-append "LD = " (which "ld")))
779 (("STRIP *=.*strip")
780 (string-append "STRIP = " (which "strip")))
781 (("NM *=.*nm")
782 (string-append "NM = " (which "nm")))
783 (("^SH *=.*sh")
784 (string-append "SH = " (which "bash")))
785 (("^FIND *=.*find")
786 (string-append "FIND = " (which "find")))
787 (("LDD *=.*ldd")
788 (string-append "LDD = " (which "ldd")))
789 (("NAWK *=.*(n|g)awk")
790 (string-append "NAWK = " (which "gawk")))
791 (("XARGS *=.*xargs")
792 (string-append "XARGS = " (which "xargs")))
793 (("UNZIP *=.*unzip")
794 (string-append "UNZIP = " (which "unzip")))
795 (("ZIPEXE *=.*zip")
796 (string-append "ZIPEXE = " (which "zip")))
797 (("SED *=.*sed")
798 (string-append "SED = " (which "sed"))))
799
800 ;; Some of these timestamps cause problems as they are more than
801 ;; 10 years ago, failing the build process.
802 (substitute*
803 "openjdk/jdk/src/share/classes/java/util/CurrencyData.properties"
804 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
805 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
806 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
807 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY"))
808 #t)))
809 (add-before 'configure 'set-additional-paths
810 (lambda* (#:key inputs #:allow-other-keys)
811 (setenv "CPATH"
812 (string-append (assoc-ref inputs "libxrender")
813 "/include/X11/extensions" ":"
814 (assoc-ref inputs "libxtst")
815 "/include/X11/extensions" ":"
816 (assoc-ref inputs "libxinerama")
817 "/include/X11/extensions" ":"
818 (or (getenv "CPATH") "")))
819 (setenv "ALT_CUPS_HEADERS_PATH"
820 (string-append (assoc-ref inputs "cups")
821 "/include"))
822 (setenv "ALT_FREETYPE_HEADERS_PATH"
823 (string-append (assoc-ref inputs "freetype")
824 "/include"))
825 (setenv "ALT_FREETYPE_LIB_PATH"
826 (string-append (assoc-ref inputs "freetype")
827 "/lib"))
828 #t))
829 (replace 'install
830 (lambda* (#:key outputs #:allow-other-keys)
831 (let ((doc (string-append (assoc-ref outputs "doc")
832 "/share/doc/icedtea"))
833 (jre (assoc-ref outputs "out"))
834 (jdk (assoc-ref outputs "jdk")))
835 (copy-recursively "openjdk.build/docs" doc)
836 (copy-recursively "openjdk.build/j2re-image" jre)
837 (copy-recursively "openjdk.build/j2sdk-image" jdk))
838 #t)))))
839 (native-inputs
840 `(("ant" ,ant-bootstrap)
841 ("alsa-lib" ,alsa-lib)
842 ("attr" ,attr)
843 ("classpath" ,classpath-devel)
844 ("coreutils" ,coreutils)
845 ("cpio" ,cpio)
846 ("cups" ,cups)
847 ("ecj" ,ecj-bootstrap)
b5a0d427 848 ("ecj-javac" ,ecj-javac-wrapper-final)
98419316
RW
849 ("fastjar" ,fastjar)
850 ("fontconfig" ,fontconfig)
851 ("freetype" ,freetype)
bcb078a4 852 ("gcc" ,gcc-4.9) ; there's a segmentation fault when compiling with gcc-5 or gcc-7
98419316
RW
853 ("gtk" ,gtk+-2)
854 ("gawk" ,gawk)
855 ("giflib" ,giflib)
856 ("grep" ,grep)
857 ("jamvm" ,jamvm)
858 ("lcms" ,lcms)
859 ("libjpeg" ,libjpeg)
bcb078a4 860 ("libnsl" ,libnsl)
98419316
RW
861 ("libpng" ,libpng)
862 ("libtool" ,libtool)
863 ("libx11" ,libx11)
864 ("libxcomposite" ,libxcomposite)
865 ("libxi" ,libxi)
866 ("libxinerama" ,libxinerama)
867 ("libxrender" ,libxrender)
868 ("libxslt" ,libxslt) ;for xsltproc
869 ("libxt" ,libxt)
870 ("libxtst" ,libxtst)
871 ("mit-krb5" ,mit-krb5)
872 ("nss" ,nss)
873 ("nss-certs" ,nss-certs)
874 ("perl" ,perl)
875 ("pkg-config" ,pkg-config)
876 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
877 ("unzip" ,unzip)
878 ("wget" ,wget)
879 ("which" ,which)
880 ("zip" ,zip)
881 ("zlib" ,zlib)
882 ("openjdk-src"
883 ,(origin
884 (method hg-fetch)
885 (uri (hg-reference
886 (url "http://hg.openjdk.java.net/jdk6/jdk6/")
887 (changeset "jdk6-b41")))
888 (sha256
889 (base32
890 "14q47yfg586fs64w30g8mk92m5dkxsvr36zzh0ra99xk5x0x96mv"))))
891 ("jdk-src"
892 ,(origin
893 (method hg-fetch)
894 (uri (hg-reference
895 (url "http://hg.openjdk.java.net/jdk6/jdk6/jdk/")
896 (changeset "jdk6-b41")))
897 (sha256
898 (base32
899 "165824nhg1k1dx6zs9dny0j49rmk35jw5b13dmz8c77jfajml4v9"))))
900 ("hotspot-src"
901 ,(origin
902 (method hg-fetch)
903 (uri (hg-reference
904 (url "http://hg.openjdk.java.net/jdk6/jdk6/hotspot/")
905 (changeset "jdk6-b41")))
906 (sha256
907 (base32
908 "07lc1z4k5dj9nrc1wvwmpvxr3xgxrdkdh53xb95skk5ij49yagfd"))))
909 ("corba-src"
910 ,(origin
911 (method hg-fetch)
912 (uri (hg-reference
913 (url "http://hg.openjdk.java.net/jdk6/jdk6/corba/")
914 (changeset "jdk6-b41")))
915 (sha256
916 (base32
917 "1p9g1r9dnax2iwp7yb59qx7m4nmshqhwmrb2b8jj8zgbd9dl2i3q"))))
918 ("langtools-src"
919 ,(origin
920 (method hg-fetch)
921 (uri (hg-reference
922 (url "http://hg.openjdk.java.net/jdk6/jdk6/langtools/")
923 (changeset "jdk6-b41")))
924 (sha256
925 (base32
926 "1x52wd67fynbbd9ild6fb4wvba3f5hhwk03qdjfazd0a1qr37z3d"))))
927 ("jaxp-src"
928 ,(origin
929 (method hg-fetch)
930 (uri (hg-reference
931 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxp/")
932 (changeset "jdk6-b41")))
933 (sha256
934 (base32
935 "0shlqrvzpr4nrkmv215lbxnby63s3yvbdh1yxcayznsyqwa4nlxm"))))
936 ("jaxws-src"
937 ,(origin
938 (method hg-fetch)
939 (uri (hg-reference
940 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxws/")
941 (changeset "jdk6-b41")))
942 (sha256
943 (base32
944 "0835lkw8vib1xhp8lxnybhlvzdh699hbi4mclxanydjk63zbpxk0"))))))
945 (home-page "http://icedtea.classpath.org")
946 (synopsis "Java development kit")
947 (description
948 "This package provides the OpenJDK built with the IcedTea build harness.
949This version of the OpenJDK is no longer maintained and is only used for
950bootstrapping purposes.")
951 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
952 ;; same license as both GNU Classpath and OpenJDK.
953 (license license:gpl2+)))
954
a243e12a 955(define-public icedtea-7
7f6485e7 956 (let* ((version "2.6.13")
f6789047
RW
957 (drop (lambda (name hash)
958 (origin
959 (method url-fetch)
960 (uri (string-append
d30ce4a7 961 "http://icedtea.classpath.org/download/drops"
f6789047
RW
962 "/icedtea7/" version "/" name ".tar.bz2"))
963 (sha256 (base32 hash))))))
71053e14
RW
964 (package
965 (name "icedtea")
f6789047
RW
966 (version version)
967 (source (origin
968 (method url-fetch)
969 (uri (string-append
970 "http://icedtea.wildebeest.org/download/source/icedtea-"
971 version ".tar.xz"))
972 (sha256
973 (base32
7f6485e7 974 "1w331rdqx1dcx2xb0fmjmrkdc71xqn20fxsgw8by4xhiblh88khh"))
f6789047
RW
975 (modules '((guix build utils)))
976 (snippet
6cbee49d
MW
977 '(begin
978 (substitute* "Makefile.in"
979 ;; do not leak information about the build host
980 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
981 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
982 #t))))
71053e14
RW
983 (build-system gnu-build-system)
984 (outputs '("out" ; Java Runtime Environment
985 "jdk" ; Java Development Kit
986 "doc")) ; all documentation
f6789047
RW
987 (arguments
988 `(;; There are many test failures. Some are known to
989 ;; fail upstream, others relate to not having an X
990 ;; server running at test time, yet others are a
991 ;; complete mystery to me.
992
993 ;; hotspot: passed: 241; failed: 45; error: 2
994 ;; langtools: passed: 1,934; failed: 26
995 ;; jdk: unknown
996 #:tests? #f
71053e14
RW
997
998 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
999 ;; gremlin) doesn't support it yet, so skip this phase.
1000 #:validate-runpath? #f
1001
f6789047
RW
1002 ;; Apparently, the C locale is needed for some of the tests.
1003 #:locale "C"
71053e14
RW
1004
1005 #:modules ((guix build utils)
1006 (guix build gnu-build-system)
1007 (ice-9 match)
1008 (ice-9 popen)
71053e14
RW
1009 (srfi srfi-19)
1010 (srfi srfi-26))
1011
1012 #:configure-flags
e2098e2d
RW
1013 ;; TODO: package pcsc and sctp, and add to inputs
1014 `("--disable-system-pcsc"
1015 "--disable-system-sctp"
1016 "--enable-bootstrap"
1017 "--enable-nss"
1018 "--without-rhino"
1019 "--disable-downloading"
1020 "--disable-tests" ;they are run in the check phase instead
1021 "--with-openjdk-src-dir=./openjdk.src"
1022 ,(string-append "--with-jdk-home="
1023 (assoc-ref %build-inputs "jdk")))
71053e14
RW
1024
1025 #:phases
1026 (modify-phases %standard-phases
1027 (replace 'unpack
1028 (lambda* (#:key source inputs #:allow-other-keys)
1029 (let ((target (string-append "icedtea-" ,version))
1030 (unpack (lambda* (name #:optional dir)
1031 (let ((dir (or dir
1032 (string-drop-right name 5))))
1033 (mkdir dir)
1034 (zero? (system* "tar" "xvf"
1035 (assoc-ref inputs name)
1036 "-C" dir
1037 "--strip-components=1"))))))
1038 (mkdir target)
1039 (and
1040 (zero? (system* "tar" "xvf" source
1041 "-C" target "--strip-components=1"))
1042 (chdir target)
1043 (unpack "openjdk-src" "openjdk.src")
1044 (with-directory-excursion "openjdk.src"
1045 (for-each unpack
1046 (filter (cut string-suffix? "-drop" <>)
1047 (map (match-lambda
1048 ((name . _) name))
1049 inputs))))
1050 #t))))
1051 (add-after 'unpack 'fix-x11-extension-include-path
1052 (lambda* (#:key inputs #:allow-other-keys)
1053 (substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk"
1054 (((string-append "\\$\\(firstword \\$\\(wildcard "
1055 "\\$\\(OPENWIN_HOME\\)"
1056 "/include/X11/extensions\\).*$"))
1057 (string-append (assoc-ref inputs "libxrender")
1058 "/include/X11/extensions"
1059 " -I" (assoc-ref inputs "libxtst")
1060 "/include/X11/extensions"
1061 " -I" (assoc-ref inputs "libxinerama")
1062 "/include/X11/extensions"))
1063 (("\\$\\(wildcard /usr/include/X11/extensions\\)\\)") ""))
1064 #t))
1065 (add-after 'unpack 'patch-paths
1066 (lambda _
1067 ;; buildtree.make generates shell scripts, so we need to replace
1068 ;; the generated shebang
1069 (substitute* '("openjdk.src/hotspot/make/linux/makefiles/buildtree.make")
1070 (("/bin/sh") (which "bash")))
1071
1072 (let ((corebin (string-append
1073 (assoc-ref %build-inputs "coreutils") "/bin/"))
1074 (binbin (string-append
1075 (assoc-ref %build-inputs "binutils") "/bin/"))
1076 (grepbin (string-append
1077 (assoc-ref %build-inputs "grep") "/bin/")))
1078 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-linux.gmk"
1079 "openjdk.src/corba/make/common/shared/Defs-linux.gmk")
1080 (("UNIXCOMMAND_PATH = /bin/")
1081 (string-append "UNIXCOMMAND_PATH = " corebin))
1082 (("USRBIN_PATH = /usr/bin/")
1083 (string-append "USRBIN_PATH = " corebin))
1084 (("DEVTOOLS_PATH *= */usr/bin/")
1085 (string-append "DEVTOOLS_PATH = " corebin))
1086 (("COMPILER_PATH *= */usr/bin/")
1087 (string-append "COMPILER_PATH = "
1088 (assoc-ref %build-inputs "gcc") "/bin/"))
1089 (("DEF_OBJCOPY *=.*objcopy")
1090 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
1091
1092 ;; fix path to alsa header
1093 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1094 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1095 (string-append "ALSA_INCLUDE="
1096 (assoc-ref %build-inputs "alsa-lib")
1097 "/include/alsa/version.h")))
1098
1099 ;; fix hard-coded utility paths
1100 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-utils.gmk"
1101 "openjdk.src/corba/make/common/shared/Defs-utils.gmk")
1102 (("ECHO *=.*echo")
1103 (string-append "ECHO = " (which "echo")))
1104 (("^GREP *=.*grep")
1105 (string-append "GREP = " (which "grep")))
1106 (("EGREP *=.*egrep")
1107 (string-append "EGREP = " (which "egrep")))
1108 (("CPIO *=.*cpio")
1109 (string-append "CPIO = " (which "cpio")))
1110 (("READELF *=.*readelf")
1111 (string-append "READELF = " (which "readelf")))
1112 (("^ *AR *=.*ar")
1113 (string-append "AR = " (which "ar")))
1114 (("^ *TAR *=.*tar")
1115 (string-append "TAR = " (which "tar")))
1116 (("AS *=.*as")
1117 (string-append "AS = " (which "as")))
1118 (("LD *=.*ld")
1119 (string-append "LD = " (which "ld")))
1120 (("STRIP *=.*strip")
1121 (string-append "STRIP = " (which "strip")))
1122 (("NM *=.*nm")
1123 (string-append "NM = " (which "nm")))
1124 (("^SH *=.*sh")
1125 (string-append "SH = " (which "bash")))
1126 (("^FIND *=.*find")
1127 (string-append "FIND = " (which "find")))
1128 (("LDD *=.*ldd")
1129 (string-append "LDD = " (which "ldd")))
1130 (("NAWK *=.*(n|g)awk")
1131 (string-append "NAWK = " (which "gawk")))
1132 (("XARGS *=.*xargs")
1133 (string-append "XARGS = " (which "xargs")))
1134 (("UNZIP *=.*unzip")
1135 (string-append "UNZIP = " (which "unzip")))
1136 (("ZIPEXE *=.*zip")
1137 (string-append "ZIPEXE = " (which "zip")))
1138 (("SED *=.*sed")
1139 (string-append "SED = " (which "sed"))))
1140
1141 ;; Some of these timestamps cause problems as they are more than
1142 ;; 10 years ago, failing the build process.
1143 (substitute*
1144 "openjdk.src/jdk/src/share/classes/java/util/CurrencyData.properties"
1145 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
1146 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
1147 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
1148 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY")))
1149 #t))
1150 (add-before 'configure 'set-additional-paths
1151 (lambda* (#:key inputs #:allow-other-keys)
e2098e2d
RW
1152 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1153 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1154 (string-append "ALSA_INCLUDE="
1155 (assoc-ref inputs "alsa-lib")
1156 "/include/alsa/version.h")))
1157 (setenv "CC" "gcc")
1158 (setenv "CPATH"
1159 (string-append (assoc-ref inputs "libxcomposite")
1160 "/include/X11/extensions" ":"
1161 (assoc-ref inputs "libxrender")
1162 "/include/X11/extensions" ":"
1163 (assoc-ref inputs "libxtst")
1164 "/include/X11/extensions" ":"
1165 (assoc-ref inputs "libxinerama")
1166 "/include/X11/extensions" ":"
1167 (or (getenv "CPATH") "")))
1168 (setenv "ALT_OBJCOPY" (which "objcopy"))
1169 (setenv "ALT_CUPS_HEADERS_PATH"
1170 (string-append (assoc-ref inputs "cups")
1171 "/include"))
1172 (setenv "ALT_FREETYPE_HEADERS_PATH"
1173 (string-append (assoc-ref inputs "freetype")
1174 "/include"))
1175 (setenv "ALT_FREETYPE_LIB_PATH"
1176 (string-append (assoc-ref inputs "freetype")
1177 "/lib"))
71053e14
RW
1178 #t))
1179 (add-before 'check 'fix-test-framework
1180 (lambda _
1181 ;; Fix PATH in test environment
1182 (substitute* "test/jtreg/com/sun/javatest/regtest/Main.java"
1183 (("PATH=/bin:/usr/bin")
1184 (string-append "PATH=" (getenv "PATH"))))
1185 (substitute* "test/jtreg/com/sun/javatest/util/SysEnv.java"
1186 (("/usr/bin/env") (which "env")))
1187 (substitute* "openjdk.src/hotspot/test/test_env.sh"
1188 (("/bin/rm") (which "rm"))
1189 (("/bin/cp") (which "cp"))
1190 (("/bin/mv") (which "mv")))
1191 #t))
1192 (add-before 'check 'fix-hotspot-tests
1193 (lambda _
1194 (with-directory-excursion "openjdk.src/hotspot/test/"
1195 (substitute* "jprt.config"
1196 (("PATH=\"\\$\\{path4sdk\\}\"")
1197 (string-append "PATH=" (getenv "PATH")))
1198 (("make=/usr/bin/make")
1199 (string-append "make=" (which "make"))))
1200 (substitute* '("runtime/6626217/Test6626217.sh"
1201 "runtime/7110720/Test7110720.sh")
1202 (("/bin/rm") (which "rm"))
1203 (("/bin/cp") (which "cp"))
1204 (("/bin/mv") (which "mv"))))
1205 #t))
1206 (add-before 'check 'fix-jdk-tests
1207 (lambda _
1208 (with-directory-excursion "openjdk.src/jdk/test/"
1209 (substitute* "com/sun/jdi/JdbReadTwiceTest.sh"
1210 (("/bin/pwd") (which "pwd")))
1211 (substitute* "com/sun/jdi/ShellScaffold.sh"
1212 (("/bin/kill") (which "kill")))
1213 (substitute* "start-Xvfb.sh"
1214 ;;(("/usr/bin/X11/Xvfb") (which "Xvfb"))
1215 (("/usr/bin/nohup") (which "nohup")))
1216 (substitute* "javax/security/auth/Subject/doAs/Test.sh"
1217 (("/bin/rm") (which "rm")))
1218 (substitute* "tools/launcher/MultipleJRE.sh"
1219 (("echo \"#!/bin/sh\"")
1220 (string-append "echo \"#!" (which "rm") "\""))
1221 (("/usr/bin/zip") (which "zip")))
1222 (substitute* "com/sun/jdi/OnThrowTest.java"
1223 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1224 (substitute* "java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java"
1225 (("/usr/bin/uptime") (which "uptime")))
1226 (substitute* "java/lang/ProcessBuilder/Basic.java"
1227 (("/usr/bin/env") (which "env"))
1228 (("/bin/false") (which "false"))
1229 (("/bin/true") (which "true"))
1230 (("/bin/cp") (which "cp"))
1231 (("/bin/sh") (which "sh")))
1232 (substitute* "java/lang/ProcessBuilder/FeelingLucky.java"
1233 (("/bin/sh") (which "sh")))
1234 (substitute* "java/lang/ProcessBuilder/Zombies.java"
1235 (("/usr/bin/perl") (which "perl"))
1236 (("/bin/ps") (which "ps"))
1237 (("/bin/true") (which "true")))
1238 (substitute* "java/lang/Runtime/exec/ConcurrentRead.java"
1239 (("/usr/bin/tee") (which "tee")))
1240 (substitute* "java/lang/Runtime/exec/ExecWithDir.java"
1241 (("/bin/true") (which "true")))
1242 (substitute* "java/lang/Runtime/exec/ExecWithInput.java"
1243 (("/bin/cat") (which "cat")))
1244 (substitute* "java/lang/Runtime/exec/ExitValue.java"
1245 (("/bin/sh") (which "sh"))
1246 (("/bin/true") (which "true"))
1247 (("/bin/kill") (which "kill")))
1248 (substitute* "java/lang/Runtime/exec/LotsOfDestroys.java"
1249 (("/usr/bin/echo") (which "echo")))
1250 (substitute* "java/lang/Runtime/exec/LotsOfOutput.java"
1251 (("/usr/bin/cat") (which "cat")))
1252 (substitute* "java/lang/Runtime/exec/SleepyCat.java"
1253 (("/bin/cat") (which "cat"))
1254 (("/bin/sleep") (which "sleep"))
1255 (("/bin/sh") (which "sh")))
1256 (substitute* "java/lang/Runtime/exec/StreamsSurviveDestroy.java"
1257 (("/bin/cat") (which "cat")))
1258 (substitute* "java/rmi/activation/CommandEnvironment/SetChildEnv.java"
1259 (("/bin/chmod") (which "chmod")))
1260 (substitute* "java/util/zip/ZipFile/Assortment.java"
1261 (("/bin/sh") (which "sh"))))
1262 #t))
1263 (replace 'check
1264 (lambda _
1265 ;; The "make check-*" targets always return zero, so we need to
1266 ;; check for errors in the associated log files to determine
1267 ;; whether any tests have failed.
1268 (use-modules (ice-9 rdelim))
1269 (let* ((error-pattern (make-regexp "^(Error|FAILED):.*"))
1270 (checker (lambda (port)
1271 (let loop ()
1272 (let ((line (read-line port)))
1273 (cond
1274 ((eof-object? line) #t)
1275 ((regexp-exec error-pattern line) #f)
1276 (else (loop)))))))
1277 (run-test (lambda (test)
1278 (system* "make" test)
1279 (call-with-input-file
1280 (string-append "test/" test ".log")
1281 checker))))
1282 (or #t ; skip tests
1283 (and (run-test "check-hotspot")
1284 (run-test "check-langtools")
1285 (run-test "check-jdk"))))))
1286 (replace 'install
1287 (lambda* (#:key outputs #:allow-other-keys)
1288 (let ((doc (string-append (assoc-ref outputs "doc")
1289 "/share/doc/icedtea"))
1290 (jre (assoc-ref outputs "out"))
1291 (jdk (assoc-ref outputs "jdk")))
1292 (copy-recursively "openjdk.build/docs" doc)
1293 (copy-recursively "openjdk.build/j2re-image" jre)
1294 (copy-recursively "openjdk.build/j2sdk-image" jdk))
1295 #t))
491dc2fb
RJ
1296 ;; Some of the libraries in the lib/amd64 folder link to libjvm.so.
1297 ;; But that shared object is located in the server/ folder, so it
1298 ;; cannot be found. This phase creates a symbolic link in the
1299 ;; lib/amd64 folder so that the other libraries can find it.
1300 ;;
1301 ;; See:
1302 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1303 ;;
1304 ;; FIXME: Find the bug in the build system, so that this symlink is
1305 ;; not needed.
1306 (add-after 'install 'install-libjvm
1307 (lambda* (#:key inputs outputs #:allow-other-keys)
1308 (let* ((lib-path (string-append (assoc-ref outputs "out")
1309 "/lib/amd64")))
1310 (symlink (string-append lib-path "/server/libjvm.so")
1311 (string-append lib-path "/libjvm.so")))
1312 #t))
71053e14
RW
1313 ;; By default IcedTea only generates an empty keystore. In order to
1314 ;; be able to use certificates in Java programs we need to generate a
1315 ;; keystore from a set of certificates. For convenience we use the
1316 ;; certificates from the nss-certs package.
1317 (add-after 'install 'install-keystore
1318 (lambda* (#:key inputs outputs #:allow-other-keys)
1319 (let* ((keystore "cacerts")
1320 (certs-dir (string-append (assoc-ref inputs "nss-certs")
1321 "/etc/ssl/certs"))
1322 (keytool (string-append (assoc-ref outputs "jdk")
1323 "/bin/keytool")))
1324 (define (extract-cert file target)
1325 (call-with-input-file file
1326 (lambda (in)
1327 (call-with-output-file target
1328 (lambda (out)
1329 (let loop ((line (read-line in 'concat))
1330 (copying? #f))
1331 (cond
1332 ((eof-object? line) #t)
1333 ((string-prefix? "-----BEGIN" line)
1334 (display line out)
1335 (loop (read-line in 'concat) #t))
1336 ((string-prefix? "-----END" line)
1337 (display line out)
1338 #t)
1339 (else
1340 (when copying? (display line out))
1341 (loop (read-line in 'concat) copying?)))))))))
1342 (define (import-cert cert)
1343 (format #t "Importing certificate ~a\n" (basename cert))
1344 (let ((temp "tmpcert"))
1345 (extract-cert cert temp)
1346 (let ((port (open-pipe* OPEN_WRITE keytool
1347 "-import"
1348 "-alias" (basename cert)
1349 "-keystore" keystore
1350 "-storepass" "changeit"
1351 "-file" temp)))
1352 (display "yes\n" port)
1353 (when (not (zero? (status:exit-val (close-pipe port))))
1354 (format #t "failed to import ~a\n" cert)))
1355 (delete-file temp)))
1356
1357 ;; This is necessary because the certificate directory contains
1358 ;; files with non-ASCII characters in their names.
1359 (setlocale LC_ALL "en_US.utf8")
1360 (setenv "LC_ALL" "en_US.utf8")
1361
1362 (for-each import-cert (find-files certs-dir "\\.pem$"))
1363 (mkdir-p (string-append (assoc-ref outputs "out")
1364 "/lib/security"))
1365 (mkdir-p (string-append (assoc-ref outputs "jdk")
1366 "/jre/lib/security"))
1367
1368 ;; The cacerts files we are going to overwrite are chmod'ed as
1369 ;; read-only (444) in icedtea-8 (which derives from this
1370 ;; package). We have to change this so we can overwrite them.
1371 (chmod (string-append (assoc-ref outputs "out")
1372 "/lib/security/" keystore) #o644)
1373 (chmod (string-append (assoc-ref outputs "jdk")
1374 "/jre/lib/security/" keystore) #o644)
1375
1376 (install-file keystore
1377 (string-append (assoc-ref outputs "out")
1378 "/lib/security"))
1379 (install-file keystore
1380 (string-append (assoc-ref outputs "jdk")
1381 "/jre/lib/security"))
1382 #t))))))
f6789047 1383 (native-inputs
d9148890 1384 `(("openjdk-src"
f6789047 1385 ,(drop "openjdk"
7f6485e7 1386 "0l34ikyf62hbzlf9032alzkkqvf7bpmckz4gvirvph755w7gka8l"))
f6789047
RW
1387 ("corba-drop"
1388 ,(drop "corba"
7f6485e7 1389 "050gv2jbg1pi6qkn8w18bwpbklfa5b0kymjvan9pncddbj8m84fz"))
f6789047
RW
1390 ("jaxp-drop"
1391 ,(drop "jaxp"
7f6485e7 1392 "1k6yldwnxfzdg5926r1nlfv8d1r1j7rlp2nkz6gqh05vgyamnfhl"))
f6789047
RW
1393 ("jaxws-drop"
1394 ,(drop "jaxws"
7f6485e7 1395 "110j7jlz47x2gg6f7653x12mssan5kvj9l9h1m1c8c92drfxbqyk"))
f6789047
RW
1396 ("jdk-drop"
1397 ,(drop "jdk"
7f6485e7 1398 "0d1mca38ksxvdskp9im3pp7fdijhj1n3lwq9w13r9s4v3qyskgdd"))
f6789047
RW
1399 ("langtools-drop"
1400 ,(drop "langtools"
7f6485e7 1401 "0nq5236fzxn3p6x8cgncl56mzcmsj07q9gymysnws4c8byc6n0qj"))
f6789047
RW
1402 ("hotspot-drop"
1403 ,(drop "hotspot"
7f6485e7 1404 "17bdv39n4lh8l5737c96f3xgamx4y305m067p01cywgp7zaddqws"))
e2098e2d 1405 ("ant" ,ant-bootstrap)
71053e14 1406 ("attr" ,attr)
71053e14
RW
1407 ("coreutils" ,coreutils)
1408 ("diffutils" ,diffutils) ;for tests
1409 ("gawk" ,gawk)
bc73f673 1410 ("gcc" ,gcc-4.9) ; there's a segmentation fault when compiling with gcc-5
71053e14
RW
1411 ("grep" ,grep)
1412 ("libtool" ,libtool)
1413 ("pkg-config" ,pkg-config)
1414 ("wget" ,wget)
1415 ("which" ,which)
1416 ("cpio" ,cpio)
1417 ("zip" ,zip)
1418 ("unzip" ,unzip)
1419 ("fastjar" ,fastjar)
1420 ("libxslt" ,libxslt) ;for xsltproc
1421 ("nss-certs" ,nss-certs)
1422 ("perl" ,perl)
1423 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
e2098e2d 1424 ("jdk" ,icedtea-6 "jdk")))
b711df02 1425 (inputs
71053e14
RW
1426 `(("alsa-lib" ,alsa-lib)
1427 ("cups" ,cups)
1428 ("libx11" ,libx11)
1429 ("libxcomposite" ,libxcomposite)
1430 ("libxt" ,libxt)
1431 ("libxtst" ,libxtst)
1432 ("libxi" ,libxi)
1433 ("libxinerama" ,libxinerama)
1434 ("libxrender" ,libxrender)
1435 ("libjpeg" ,libjpeg)
1436 ("libpng" ,libpng)
1437 ("mit-krb5" ,mit-krb5)
1438 ("nss" ,nss)
1439 ("giflib" ,giflib)
1440 ("fontconfig" ,fontconfig)
1441 ("freetype" ,freetype)
1442 ("lcms" ,lcms)
1443 ("zlib" ,zlib)
1444 ("gtk" ,gtk+-2)))
1445 (home-page "http://icedtea.classpath.org")
1446 (synopsis "Java development kit")
1447 (description
1448 "This package provides the Java development kit OpenJDK built with the
1449IcedTea build harness.")
1450 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1451 ;; same license as both GNU Classpath and OpenJDK.
1452 (license license:gpl2+))))
d2540f80 1453
349a3147 1454(define-public icedtea-8
1d97d8ff 1455 (let* ((version "3.7.0")
349a3147
RW
1456 (drop (lambda (name hash)
1457 (origin
1458 (method url-fetch)
1459 (uri (string-append
db531f73 1460 "http://icedtea.classpath.org/download/drops"
349a3147
RW
1461 "/icedtea8/" version "/" name ".tar.xz"))
1462 (sha256 (base32 hash))))))
1463 (package (inherit icedtea-7)
1d97d8ff 1464 (version "3.7.0")
349a3147
RW
1465 (source (origin
1466 (method url-fetch)
1467 (uri (string-append
1468 "http://icedtea.wildebeest.org/download/source/icedtea-"
1469 version ".tar.xz"))
1470 (sha256
1471 (base32
1d97d8ff 1472 "09yqzn8rpccs7cyv89hhy5zlznpgqw5x3jz0w1ccp0cz1vgs8l5w"))
349a3147
RW
1473 (modules '((guix build utils)))
1474 (snippet
0c729ef4 1475 '(begin
f2785bd6
RW
1476 (substitute* '("configure"
1477 "acinclude.m4")
0c729ef4
RW
1478 ;; Do not embed build time
1479 (("(DIST_ID=\"Custom build).*$" _ prefix)
1480 (string-append prefix "\"\n"))
1481 ;; Do not leak information about the build host
1482 (("DIST_NAME=\"\\$build_os\"")
1483 "DIST_NAME=\"guix\""))
1484 #t))))
349a3147 1485 (arguments
f2785bd6
RW
1486 `(#:imported-modules
1487 ((guix build ant-build-system)
1488 (guix build syscalls)
1489 ,@%gnu-build-system-modules)
1490 ,@(substitute-keyword-arguments (package-arguments icedtea-7)
1491 ((#:modules modules)
1492 `((guix build utils)
1493 (guix build gnu-build-system)
1494 ((guix build ant-build-system) #:prefix ant:)
1495 (ice-9 match)
1496 (ice-9 popen)
1497 (srfi srfi-19)
1498 (srfi srfi-26)))
1499 ((#:configure-flags flags)
1500 `(let ((jdk (assoc-ref %build-inputs "jdk")))
1501 `( ;;"--disable-bootstrap"
1502 "--enable-bootstrap"
1503 "--enable-nss"
1504 "--disable-downloading"
1505 "--disable-system-pcsc"
1506 "--disable-system-sctp"
1507 "--disable-tests" ;they are run in the check phase instead
1508 "--with-openjdk-src-dir=./openjdk.src"
1509 ,(string-append "--with-jdk-home=" jdk))))
1510 ((#:phases phases)
1511 `(modify-phases ,phases
1512 (delete 'fix-x11-extension-include-path)
1513 (delete 'patch-paths)
1514 (delete 'set-additional-paths)
1515 (delete 'patch-patches)
1516 ;; Prevent the keytool from recording the current time when
1517 ;; adding certificates at build time.
1518 (add-after 'unpack 'patch-keystore
1519 (lambda _
1520 (substitute* "openjdk.src/jdk/src/share/classes/sun/security/provider/JavaKeyStore.java"
1521 (("date = new Date\\(\\);")
1522 "\
1523date = (System.getenv(\"SOURCE_DATE_EPOCH\") != null) ?\
1524new Date(Long.parseLong(System.getenv(\"SOURCE_DATE_EPOCH\"))) :\
1525new Date();"))
1526 #t))
1527 (add-after 'unpack 'patch-jni-libs
1528 ;; Hardcode dynamically loaded libraries.
1529 (lambda _
1530 (let* ((library-path (search-path-as-string->list
1531 (getenv "LIBRARY_PATH")))
1532 (find-library (lambda (name)
1533 (search-path
1534 library-path
1535 (string-append "lib" name ".so")))))
1536 (for-each
1537 (lambda (file)
1538 (catch 'decoding-error
1539 (lambda ()
1540 (substitute* file
1541 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
1542 _ name version)
1543 (format #f "\"~a\"" (find-library name)))
1544 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
1545 (format #f "\"~a\"" (find-library name)))))
1546 (lambda _
1547 ;; Those are safe to skip.
1548 (format (current-error-port)
1549 "warning: failed to substitute: ~a~%"
1550 file))))
1551 (find-files "openjdk.src/jdk/src/solaris/native"
1552 "\\.c|\\.h"))
1553 #t)))
1554 (replace 'install
1555 (lambda* (#:key outputs #:allow-other-keys)
1556 (let ((doc (string-append (assoc-ref outputs "doc")
1557 "/share/doc/icedtea"))
1558 (jre (assoc-ref outputs "out"))
1559 (jdk (assoc-ref outputs "jdk")))
1560 (copy-recursively "openjdk.build/docs" doc)
1561 (copy-recursively "openjdk.build/images/j2re-image" jre)
1562 (copy-recursively "openjdk.build/images/j2sdk-image" jdk)
1563 ;; Install the nss.cfg file to JRE to enable SSL/TLS
1564 ;; support via NSS.
1565 (copy-file (string-append jdk "/jre/lib/security/nss.cfg")
1566 (string-append jre "/lib/security/nss.cfg"))
1567 #t)))
1568 (add-after 'install 'strip-jar-timestamps
1569 (assoc-ref ant:%standard-phases 'strip-jar-timestamps)))))))
349a3147
RW
1570 (native-inputs
1571 `(("jdk" ,icedtea-7 "jdk")
1572 ("openjdk-src"
1573 ,(drop "openjdk"
1d97d8ff 1574 "1mj6xgmw31i6qd30qi9dmv7160fbcfq5ikz1jwjihdg2793il19p"))
12eecbf0
LF
1575 ("aarch32-drop"
1576 ,(drop "aarch32"
1d97d8ff 1577 "1wb8k5zm40zld0986dvmlh5xh3gyixbg9h26sl662zy92amhmyyg"))
349a3147
RW
1578 ("corba-drop"
1579 ,(drop "corba"
1d97d8ff 1580 "11ma4zz0599cy70xd219v7a8vin7p96xrhhz3wsaw6cjhkzpagah"))
349a3147
RW
1581 ("jaxp-drop"
1582 ,(drop "jaxp"
1d97d8ff 1583 "14m1y0z0fbm5z5zjw3vnq85py8dma84bi3f9cw8rhdyc6skk8q4i"))
349a3147
RW
1584 ("jaxws-drop"
1585 ,(drop "jaxws"
1d97d8ff 1586 "09andnm6xaasnp963hgx42yiflifiljp9z7z85jrfyc5z8a5whmf"))
349a3147
RW
1587 ("jdk-drop"
1588 ,(drop "jdk"
1d97d8ff 1589 "0s6lcpc0zckz2fnq98aqf28nz9y3wbi41a3kyaqqa2abwbkm1zwl"))
349a3147
RW
1590 ("langtools-drop"
1591 ,(drop "langtools"
1d97d8ff 1592 "15wizy123vhk40chl1b4p552jf2pw2hdww0myf11qab425axz4nw"))
349a3147
RW
1593 ("hotspot-drop"
1594 ,(drop "hotspot"
1d97d8ff 1595 "1ciz1w9j0kz7s1dxdhyqq71nla9icyz6qvn0b9z2zgkklqa98qmm"))
349a3147
RW
1596 ("nashorn-drop"
1597 ,(drop "nashorn"
1d97d8ff 1598 "19pzl3ppaw8j6r5cnyp8qiw3hxijh3hdc46l39g5yfhdl4pr4hpa"))
fd34d4f4
LF
1599 ("shenandoah-drop"
1600 ,(drop "shenandoah"
1d97d8ff 1601 "0k33anxdzw1icn072wynfmmdjhsv50hay0j1sfkfxny12rb3vgdy"))
349a3147 1602 ,@(fold alist-delete (package-native-inputs icedtea-7)
e2098e2d 1603 '("jdk" "openjdk-src" "corba-drop" "jaxp-drop" "jaxws-drop"
349a3147
RW
1604 "jdk-drop" "langtools-drop" "hotspot-drop")))))))
1605
a243e12a 1606(define-public icedtea icedtea-7)
068e476f 1607
5490480c 1608\f
8bbd0408
RW
1609(define-public ant/java8
1610 (package (inherit ant-bootstrap)
1611 (name "ant")
1612 (version "1.10.1")
1613 (source (origin
1614 (method url-fetch)
1615 (uri (string-append "mirror://apache/ant/source/apache-ant-"
1616 version "-src.tar.gz"))
1617 (sha256
1618 (base32
1619 "10p3dh77lkzzzcy32dk9azljixzadp46fggjfbvgkl8mmb8cxxv8"))
1620 (modules '((guix build utils)))
1621 (snippet
1622 '(begin
1623 (for-each delete-file
1624 (find-files "lib/optional" "\\.jar$"))
1625 #t))))
1626 (arguments
1627 (substitute-keyword-arguments (package-arguments ant-bootstrap)
1628 ((#:phases phases)
1629 `(modify-phases ,phases
1630 (add-after 'unpack 'remove-scripts
1631 ;; Remove bat / cmd scripts for DOS as well as the antRun and runant
1632 ;; wrappers.
1633 (lambda _
1634 (for-each delete-file
1635 (find-files "src/script"
1636 "(.*\\.(bat|cmd)|runant.*|antRun.*)"))
1637 #t))
1638 (replace 'build
1639 (lambda* (#:key inputs outputs #:allow-other-keys)
1640 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
1641
1642 ;; Disable tests to avoid dependency on hamcrest-core, which needs
1643 ;; Ant to build. This is necessary in addition to disabling the
1644 ;; "check" phase, because the dependency on "test-jar" would always
1645 ;; result in the tests to be run.
1646 (substitute* "build.xml"
1647 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
1648 (zero? (system* "bash" "bootstrap.sh"
1649 (string-append "-Ddist.dir="
1650 (assoc-ref outputs "out"))))))))))
1651 (native-inputs
1652 `(("jdk" ,icedtea-8 "jdk")))))
1653
e441fc56
RW
1654;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x series
1655;; requires Java 8.
1656(define-public ant
1657 (package (inherit ant/java8)
1658 (version "1.9.9")
1659 (source (origin
1660 (method url-fetch)
1661 (uri (string-append "mirror://apache/ant/source/apache-ant-"
1662 version "-src.tar.gz"))
1663 (sha256
1664 (base32
1665 "1k28mka0m3isy9yr8gz84kz1f3f879rwaxrd44vdn9xbfwvwk86n"))))
1666 (native-inputs
1667 `(("jdk" ,icedtea-7 "jdk")))))
1668
9ce7ac99
RW
1669(define-public ant-apache-bcel
1670 (package
1671 (inherit ant/java8)
1672 (name "ant-apache-bcel")
1673 (arguments
1674 (substitute-keyword-arguments (package-arguments ant/java8)
1675 ((#:phases phases)
1676 `(modify-phases ,phases
1677 (add-after 'unpack 'link-bcel
1678 (lambda* (#:key inputs #:allow-other-keys)
1679 (for-each (lambda (file)
1680 (symlink file
1681 (string-append "lib/optional/"
1682 (basename file))))
1683 (find-files (assoc-ref inputs "java-commons-bcel")
1684 "\\.jar$"))
1685 #t))
1686 (add-after 'build 'install
1687 (lambda* (#:key outputs #:allow-other-keys)
1688 (let* ((out (assoc-ref outputs "out"))
1689 (share (string-append out "/share/java"))
1690 (bin (string-append out "/bin"))
1691 (lib (string-append out "/lib")))
1692 (mkdir-p share)
1693 (install-file (string-append lib "/ant-apache-bcel.jar") share)
1694 (delete-file-recursively bin)
1695 (delete-file-recursively lib)
1696 #t)))))))
1697 (inputs
1698 `(("java-commons-bcel" ,java-commons-bcel)
1699 ,@(package-inputs ant/java8)))))
1700
fa6c4213
RW
1701(define-public ant-junit
1702 (package
1703 (inherit ant/java8)
1704 (name "ant-junit")
1705 (arguments
1706 (substitute-keyword-arguments (package-arguments ant/java8)
1707 ((#:phases phases)
1708 `(modify-phases ,phases
1709 (add-after 'unpack 'link-junit
1710 (lambda* (#:key inputs #:allow-other-keys)
1711 (for-each (lambda (file)
1712 (symlink file
1713 (string-append "lib/optional/"
1714 (basename file))))
1715 (find-files (assoc-ref inputs "java-junit")
1716 "\\.jar$"))
1717 #t))
1718 (add-after 'build 'install
1719 (lambda* (#:key outputs #:allow-other-keys)
1720 (let* ((out (assoc-ref outputs "out"))
1721 (share (string-append out "/share/java"))
1722 (bin (string-append out "/bin"))
1723 (lib (string-append out "/lib")))
1724 (mkdir-p share)
1725 (install-file (string-append lib "/ant-junit.jar") share)
1726 (delete-file-recursively bin)
1727 (delete-file-recursively lib)
1728 #t)))))))
1729 (inputs
1730 `(("java-junit" ,java-junit)
1731 ,@(package-inputs ant/java8)))))
1732
fc6e2727
RW
1733(define-public clojure
1734 (let* ((remove-archives '(begin
1735 (for-each delete-file
1736 (find-files "." ".*\\.(jar|zip)"))
1737 #t))
1738 (submodule (lambda (prefix version hash)
1739 (origin
1740 (method url-fetch)
1741 (uri (string-append "https://github.com/clojure/"
1742 prefix version ".tar.gz"))
1743 (sha256 (base32 hash))
1744 (modules '((guix build utils)))
1745 (snippet remove-archives)))))
1746 (package
1747 (name "clojure")
1d47ea86 1748 (version "1.9.0")
fc6e2727
RW
1749 (source
1750 (origin
1751 (method url-fetch)
1752 (uri
1d47ea86
AV
1753 (string-append "https://github.com/clojure/clojure/archive/clojure-"
1754 version ".tar.gz"))
fc6e2727 1755 (sha256
1d47ea86 1756 (base32 "0xjbzcw45z32vsn9pifp7ndysjzqswp5ig0jkjpivigh2ckkdzha"))
fc6e2727
RW
1757 (modules '((guix build utils)))
1758 (snippet remove-archives)))
1759 (build-system ant-build-system)
1760 (arguments
1761 `(#:modules ((guix build ant-build-system)
1762 (guix build utils)
1763 (ice-9 ftw)
1764 (ice-9 regex)
1765 (srfi srfi-1)
1766 (srfi srfi-26))
1767 #:test-target "test"
1768 #:phases
1769 (modify-phases %standard-phases
1770 (add-after 'unpack 'unpack-submodule-sources
1771 (lambda* (#:key inputs #:allow-other-keys)
1772 (for-each
1773 (lambda (name)
1774 (mkdir-p name)
1775 (with-directory-excursion name
1776 (or (zero? (system* "tar"
1777 ;; Use xz for repacked tarball.
1778 "--xz"
1779 "--extract"
1780 "--verbose"
1781 "--file" (assoc-ref inputs name)
1782 "--strip-components=1"))
1783 (error "failed to unpack tarball" name)))
1784 (copy-recursively (string-append name "/src/main/clojure/")
1785 "src/clj/"))
1d47ea86
AV
1786 '("core-specs-alpha-src"
1787 "data-generators-src"
1788 "spec-alpha-src"
fc6e2727
RW
1789 "test-check-src"
1790 "test-generative-src"
1d47ea86 1791 "tools-namespace-src"))
fc6e2727
RW
1792 #t))
1793 ;; The javadoc target is not built by default.
1794 (add-after 'build 'build-doc
1795 (lambda _
1796 (zero? (system* "ant" "javadoc"))))
1797 ;; Needed since no install target is provided.
1798 (replace 'install
1799 (lambda* (#:key outputs #:allow-other-keys)
1800 (let ((java-dir (string-append (assoc-ref outputs "out")
1801 "/share/java/")))
1802 ;; Install versioned to avoid collisions.
1803 (install-file (string-append "clojure-" ,version ".jar")
1804 java-dir)
1805 #t)))
1806 ;; Needed since no install-doc target is provided.
1807 (add-after 'install 'install-doc
1808 (lambda* (#:key outputs #:allow-other-keys)
1809 (let ((doc-dir (string-append (assoc-ref outputs "out")
1810 "/share/doc/clojure-"
1811 ,version "/")))
1812 (copy-recursively "doc/clojure" doc-dir)
1813 (copy-recursively "target/javadoc/"
1814 (string-append doc-dir "javadoc/"))
1815 (for-each (cut install-file <> doc-dir)
1816 (filter (cut string-match
1817 ".*\\.(html|markdown|md|txt)"
1818 <>)
1819 (scandir "./")))
1820 #t))))))
1821 ;; The native-inputs below are needed to run the tests.
1822 (native-inputs
1d47ea86
AV
1823 `(("core-specs-alpha-src"
1824 ,(submodule "core.specs.alpha/archive/core.specs.alpha-"
1825 "0.1.24"
1826 "0v2a0svf1ar2y42ajxwsjr7zmm5j7pp2zwrd2jh3k7xzd1p9x1fv"))
1827 ("data-generators-src"
fc6e2727
RW
1828 ,(submodule "data.generators/archive/data.generators-"
1829 "0.1.2"
1830 "0kki093jp4ckwxzfnw8ylflrfqs8b1i1wi9iapmwcsy328dmgzp1"))
1d47ea86
AV
1831 ("spec-alpha-src"
1832 ,(submodule "spec.alpha/archive/spec.alpha-"
1833 "0.1.143"
1834 "00alf0347licdn773w2jarpllyrbl52qz4d8mw61anjksacxylzz"))
fc6e2727
RW
1835 ("test-check-src"
1836 ,(submodule "test.check/archive/test.check-"
1837 "0.9.0"
1838 "0p0mnyhr442bzkz0s4k5ra3i6l5lc7kp6ajaqkkyh4c2k5yck1md"))
1839 ("test-generative-src"
1840 ,(submodule "test.generative/archive/test.generative-"
1841 "0.5.2"
1842 "1pjafy1i7yblc7ixmcpfq1lfbyf3jaljvkgrajn70sws9xs7a9f8"))
1843 ("tools-namespace-src"
1844 ,(submodule "tools.namespace/archive/tools.namespace-"
1845 "0.2.11"
1d47ea86 1846 "10baak8v0hnwz2hr33bavshm7y49mmn9zsyyms1dwjz45p5ymhy0"))))
fc6e2727
RW
1847 (home-page "https://clojure.org/")
1848 (synopsis "Lisp dialect running on the JVM")
1849 (description "Clojure is a dynamic, general-purpose programming language,
1850combining the approachability and interactive development of a scripting
1851language with an efficient and robust infrastructure for multithreaded
1852programming. Clojure is a compiled language, yet remains completely dynamic
1853– every feature supported by Clojure is supported at runtime. Clojure
1854provides easy access to the Java frameworks, with optional type hints and type
1855inference, to ensure that calls to Java can avoid reflection.
1856
1857Clojure is a dialect of Lisp, and shares with Lisp the code-as-data philosophy
1858and a powerful macro system. Clojure is predominantly a functional programming
1859language, and features a rich set of immutable, persistent data structures.
1860When mutable state is needed, Clojure offers a software transactional memory
1861system and reactive Agent system that ensure clean, correct, multithreaded
1862designs.")
1863 ;; Clojure is licensed under EPL1.0
1864 ;; ASM bytecode manipulation library is licensed under BSD-3
1865 ;; Guava Murmur3 hash implementation is licensed under APL2.0
1866 ;; src/clj/repl.clj is licensed under CPL1.0
1867 ;;
1868 ;; See readme.html or readme.txt for details.
1869 (license (list license:epl1.0
1870 license:bsd-3
1871 license:asl2.0
1872 license:cpl1.0)))))
1873
fc8d100b
RW
1874(define-public javacc
1875 (package
1876 (name "javacc")
1877 (version "7.0.3")
1878 (source (origin
1879 (method url-fetch)
1880 (uri (string-append "https://github.com/javacc/javacc/"
1881 "archive/" version ".tar.gz"))
1882 (file-name (string-append "javacc-" version ".tar.gz"))
1883 (sha256
1884 (base32
1885 "111xc9mnmc5a6qz6x3xbhqc07y1lg2b996ggzw0hrblg42zya9xf"))))
1886 (build-system ant-build-system)
1887 (arguments
1888 `(#:test-target "test"
1889 #:phases
1890 (modify-phases %standard-phases
1891 (add-after 'unpack 'delete-bundled-libs
1892 (lambda _
1893 (delete-file-recursively "lib") #t))
1894 (replace 'install (install-jars "target")))))
1895 (home-page "https://javacc.org/")
1896 (synopsis "Java parser generator")
1897 (description "Java Compiler Compiler (JavaCC) is the most popular parser
1898generator for use with Java applications. A parser generator is a tool that
1899reads a grammar specification and converts it to a Java program that can
1900recognize matches to the grammar. In addition to the parser generator itself,
1901JavaCC provides other standard capabilities related to parser generation such
1902as tree building (via a tool called JJTree included with JavaCC), actions,
1903debugging, etc.")
1904 (license license:bsd-3)))
1905
6688c41e
RW
1906(define-public javacc-4
1907 (package (inherit javacc)
1908 (version "4.1")
1909 (source (origin
1910 (method git-fetch)
1911 (uri (git-reference
1912 (url "https://github.com/javacc/javacc.git")
1913 (commit "release_41")))
1914 (file-name (string-append "javacc-" version "-checkout"))
1915 (sha256
1916 (base32
1917 "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0"))))
1918 ;; Tests fail with
1919 ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60:
1920 ;; JAVACODE failed
1921 (arguments
1922 `(#:tests? #f
1923 #:phases
1924 (modify-phases %standard-phases
1925 (add-after 'unpack 'delete-bundled-libs
1926 (lambda _
1927 (delete-file-recursively "lib") #t))
1928 (replace 'install (install-jars "bin/lib")))))))
1929
c1cb8576
RW
1930;; This is the last 3.x release of ECJ
1931(define-public java-ecj-3
1932 (package
1933 (name "java-ecj")
1934 (version "3.8.2")
1935 (source (origin
1936 (method url-fetch)
1937 (uri (string-append "http://archive.eclipse.org/eclipse/"
1938 "downloads/drops/R-" version
1939 "-201301310800/ecjsrc-" version ".jar"))
1940 (sha256
1941 (base32
1942 "01mdj14jw11g1jfnki4fi8229p0c6zzckd38zqy2w4m3cjcvsx04"))))
1943 (build-system ant-build-system)
1944 (arguments
1945 `(#:tests? #f ; none included
1946 #:jdk ,icedtea-7 ; doesn't build with JDK8+
1947 #:make-flags (list "-f" "src/build.xml")
1948 #:build-target "build"
1949 #:phases
1950 (modify-phases %standard-phases
1951 (add-after 'unpack 'fix-manifest
1952 (lambda _
1953 ;; Record the main class to make ecj executable.
1954 (with-atomic-file-replacement "src/META-INF/MANIFEST.MF"
1955 (lambda (in out)
1956 (display "Manifest-Version: 1.0
1957Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
1958 out)))))
1959 (replace 'install (install-jars ".")))))
1960 (home-page "https://eclipse.org")
1961 (synopsis "Eclipse Java development tools core batch compiler")
1962 (description "This package provides the Eclipse Java core batch compiler.")
1963 (license license:epl1.0)))
1964
f201b18e
RW
1965;; This is needed for java-cisd-args4j
1966(define-public java-ecj-3.5
1967 (package (inherit java-ecj-3)
1968 (version "3.5.1")
1969 (source (origin
1970 (method url-fetch/zipbomb)
1971 (uri (string-append "http://archive.eclipse.org/eclipse/"
1972 "downloads/drops/R-" version
1973 "-200909170800/ecjsrc-" version ".zip"))
1974 (sha256
1975 (base32
1976 "1vnl2mavisc567bip736xzsvvbjif5279wc4a7pbdik5wlir8qr7"))))
1977 (build-system ant-build-system)
1978 (arguments
1979 `(#:tests? #f ; none included
1980 #:jdk ,icedtea-7 ; doesn't build with JDK8+
1981 #:build-target "build"
1982 #:phases
1983 (modify-phases %standard-phases
1984 (add-after 'unpack 'fix-manifest
1985 (lambda _
1986 ;; Record the main class to make ecj executable.
1987 (with-atomic-file-replacement "META-INF/MANIFEST.MF"
1988 (lambda (in out)
1989 (dump-port in out)
1990 (display "Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
1991 out)))))
1992 (replace 'install (install-jars ".")))))
1993 (native-inputs
1994 `(("unzip" ,unzip)))))
1995
30d55473
RW
1996(define-public java-cisd-base
1997 (let ((revision 38938)
1998 (base-version "14.12.0"))
1999 (package
2000 (name "java-cisd-base")
2001 (version (string-append base-version "-" (number->string revision)))
2002 (source (origin
2003 (method svn-fetch)
2004 (uri (svn-reference
2005 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2006 "base/tags/release/"
2007 (version-major+minor base-version)
2008 ".x/" base-version "/base/"))
2009 (revision revision)))
2010 (file-name (string-append "java-cisd-base-" version "-checkout"))
2011 (sha256
2012 (base32
2013 "1i5adyf7nzclb0wydgwa1az04qliid8035vpahaandmkmigbnxiy"))
2014 (modules '((guix build utils)))
2015 (snippet
2016 '(begin
2017 ;; Delete included gradle jar
2018 (delete-file-recursively "gradle/wrapper")
2019 ;; Delete pre-built native libraries
2020 (delete-file-recursively "libs")
2021 #t))))
2022 (build-system ant-build-system)
2023 (arguments
2024 `(#:make-flags '("-file" "build/build.xml")
2025 #:test-target "jar-test"
2026 #:jdk ,icedtea-8
2027 #:phases
2028 (modify-phases %standard-phases
2029 (add-after 'unpack 'unpack-build-resources
2030 (lambda* (#:key inputs #:allow-other-keys)
2031 (copy-recursively (assoc-ref inputs "build-resources")
2032 "../build_resources")
2033 #t))
2034 (add-after 'unpack-build-resources 'fix-dependencies
2035 (lambda* (#:key inputs #:allow-other-keys)
2036 (substitute* "build/build.xml"
2037 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2038 (string-append (assoc-ref inputs "java-testng")
2039 "/share/java/java-testng.jar"))
2040 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2041 (string-append (assoc-ref inputs "java-commons-lang")
2042 "/share/java/commons-lang-"
2043 ,(package-version java-commons-lang) ".jar"))
2044 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2045 (string-append (assoc-ref inputs "java-commons-io")
2046 "/share/java/commons-io-"
2047 ,(package-version java-commons-io)
2048 "-SNAPSHOT.jar"))
2049 ;; Remove dependency on svn
2050 (("<build-info.*") "")
2051 (("\\$\\{revision.number\\}")
2052 ,(number->string revision))
2053 (("\\$\\{version.number\\}") ,base-version))
2054 ;; Remove dependency on classycle
2055 (substitute* "../build_resources/ant/build-common.xml"
2056 (("<taskdef name=\"dependency-checker.*") "")
2057 (("classname=\"classycle.*") "")
2058 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2059 #t))
2060 ;; A few tests fail because of the lack of a proper /etc/groups and
2061 ;; /etc/passwd file in the build container.
2062 (add-after 'unpack 'disable-broken-tests
2063 (lambda _
2064 (substitute* "sourceTest/java/ch/systemsx/cisd/base/AllTests.java"
2065 (("Unix.isOperational\\(\\)") "false"))
2066 #t))
2067 ;; These decorators are almost useless and pull in an unpackaged
2068 ;; dependency.
2069 (add-after 'unpack 'remove-useless-decorators
2070 (lambda _
2071 (substitute* "source/java/ch/systemsx/cisd/base/unix/Unix.java"
2072 (("@Private") "")
2073 (("import ch.rinn.restrictions.Private;") ""))
2074 (substitute* "sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java"
2075 (("@Friend.*") "")
2076 (("import ch.rinn.restrictions.Friend;") ""))
2077 #t))
2078 (add-before 'configure 'build-native-code
2079 (lambda* (#:key inputs #:allow-other-keys)
2080 (let ((jdk (assoc-ref inputs "jdk"))
2081 (dir ,(match (%current-system)
2082 ("i686-linux"
2083 "i386-Linux")
2084 ((or "armhf-linux" "aarch64-linux")
2085 "arm-Linux")
2086 ((or "x86_64-linux")
2087 "amd64-Linux")
2088 (_ "unknown-Linux"))))
2089 (with-directory-excursion "source/c"
2090 (invoke "gcc" "-shared" "-O3" "-fPIC" "unix.c"
2091 (string-append "-I" jdk "/include")
2092 (string-append "-I" jdk "/include/linux")
2093 "-o" "libunix.so")
2094 (invoke "gcc" "-shared" "-O3" "-fPIC"
2095 "-DMACHINE_BYTE_ORDER=1"
2096 "copyCommon.c"
2097 "copyByteChar.c"
2098 "copyByteDouble.c"
2099 "copyByteFloat.c"
2100 "copyByteInt.c"
2101 "copyByteLong.c"
2102 "copyByteShort.c"
2103 (string-append "-I" jdk "/include")
2104 (string-append "-I" jdk "/include/linux")
2105 "-o" "libnativedata.so"))
2106 (install-file "source/c/libunix.so"
2107 (string-append "libs/native/unix/" dir))
2108 (install-file "source/c/libnativedata.so"
2109 (string-append "libs/native/nativedata/" dir))
2110 #t)))
2111 ;; In the "check" phase we only build the test executable.
2112 (add-after 'check 'run-tests
2113 (lambda _
2114 (invoke "java" "-jar" "targets/dist/sis-base-test.jar")
2115 (delete-file "targets/dist/sis-base-test.jar")
2116 #t))
2117 (replace 'install (install-jars "targets/dist")))))
2118 (native-inputs
2119 `(("jdk" ,icedtea-8)
2120 ("java-commons-lang" ,java-commons-lang)
2121 ("java-commons-io" ,java-commons-io)
2122 ("java-testng" ,java-testng)
2123 ("build-resources"
2124 ,(origin
2125 (method svn-fetch)
2126 (uri (svn-reference
2127 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2128 "base/tags/release/"
2129 (version-major+minor base-version)
2130 ".x/" base-version
2131 "/build_resources/"))
2132 (revision revision)))
2133 (sha256
2134 (base32
2135 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
2136 (home-page "http://svnsis.ethz.ch")
2137 (synopsis "Utility classes for libraries from ETH Zurich")
2138 (description "This library supplies some utility classes needed for
2139libraries from the SIS division at ETH Zurich like jHDF5.")
2140 ;; The C sources are under a non-copyleft license, which looks like a
2141 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
2142 (license (list license:asl2.0
2143 (license:non-copyleft "file://source/c/COPYING"))))))
2144
04ddca26
RW
2145(define-public java-cisd-args4j
2146 (let ((revision 39162)
2147 (base-version "9.11.2"))
2148 (package
2149 (name "java-cisd-args4j")
2150 (version (string-append base-version "-" (number->string revision)))
2151 (source (origin
2152 (method svn-fetch)
2153 (uri (svn-reference
2154 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2155 "args4j/tags/release/"
2156 (version-major+minor base-version)
2157 ".x/" base-version "/args4j/"))
2158 (revision revision)))
2159 (file-name (string-append "java-cisd-args4j-" version "-checkout"))
2160 (sha256
2161 (base32
2162 "0hhqznjaivq7ips7mkwas78z42s6djsm20rrs7g1zd59rcsakxn2"))))
2163 (build-system ant-build-system)
2164 (arguments
2165 `(#:make-flags '("-file" "build/build.xml")
2166 #:tests? #f ; there are no tests
2167 ;; There are weird build failures with JDK8, such as: "The type
2168 ;; java.io.ObjectInputStream cannot be resolved. It is indirectly
2169 ;; referenced from required .class files"
2170 #:jdk ,icedtea-7
2171 #:modules ((guix build ant-build-system)
2172 (guix build utils)
2173 (guix build java-utils)
2174 (sxml simple)
2175 (sxml transform)
2176 (sxml xpath))
2177 #:phases
2178 (modify-phases %standard-phases
2179 (add-after 'unpack 'unpack-build-resources
2180 (lambda* (#:key inputs #:allow-other-keys)
2181 (mkdir-p "../build_resources")
2182 (invoke "tar" "xf" (assoc-ref inputs "build-resources")
2183 "-C" "../build_resources"
2184 "--strip-components=1")
2185 (mkdir-p "../build_resources/lib")
2186 #t))
2187 (add-after 'unpack-build-resources 'fix-dependencies
2188 (lambda* (#:key inputs #:allow-other-keys)
2189 ;; FIXME: There should be a more convenient abstraction for
2190 ;; editing XML files.
2191 (with-directory-excursion "../build_resources/ant/"
2192 (chmod "build-common.xml" #o664)
2193 (call-with-output-file "build-common.xml.new"
2194 (lambda (port)
2195 (sxml->xml
2196 (pre-post-order
2197 (with-input-from-file "build-common.xml"
2198 (lambda _ (xml->sxml #:trim-whitespace? #t)))
2199 `(;; Remove dependency on classycle and custom ant tasks
2200 (taskdef . ,(lambda (tag . kids)
2201 (let ((name ((sxpath '(name *text*)) kids)))
2202 (if (or (member "build-info" name)
2203 (member "dependency-checker" name)
2204 (member "build-java-subprojects" name)
2205 (member "project-classpath" name))
2206 '() ; skip
2207 `(,tag ,@kids)))))
2208 (typedef . ,(lambda (tag . kids)
2209 (let ((name ((sxpath '(name *text*)) kids)))
2210 (if (member "recursive-jar" name)
2211 '() ; skip
2212 `(,tag ,@kids)))))
2213 (build-java-subprojects . ,(lambda _ '()))
2214 ;; Ignore everything else
2215 (*default* . ,(lambda (tag . kids) `(,tag ,@kids)))
2216 (*text* . ,(lambda (_ txt) txt))))
2217 port)))
2218 (rename-file "build-common.xml.new" "build-common.xml"))
2219 (substitute* "build/build.xml"
2220 (("\\$\\{lib\\}/cisd-base/cisd-base.jar")
2221 (string-append (assoc-ref inputs "java-cisd-base")
2222 "/share/java/sis-base.jar"))
2223 ;; Remove dependency on svn
2224 (("<build-info.*") "")
2225 (("\\$\\{revision.number\\}")
2226 ,(number->string revision))
2227 (("\\$\\{version.number\\}") ,base-version)
2228 ;; Don't use custom ant tasks.
2229 (("recursive-jar") "jar")
2230 (("<project-classpath.*") ""))
2231 #t))
2232 (replace 'install (install-jars "targets/dist")))))
2233 (inputs
2234 `(("java-cisd-base" ,java-cisd-base)))
2235 (native-inputs
2236 `(("ecj" ,java-ecj-3.5)
2237 ("build-resources"
2238 ,(origin
2239 (method svn-fetch)
2240 (uri (svn-reference
2241 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2242 "args4j/tags/release/"
2243 (version-major+minor base-version)
2244 ".x/" base-version
2245 "/build_resources/"))
2246 (revision revision)))
2247 (sha256
2248 (base32
2249 "056cam4k8pll7ass31sy6gwn8g8719njc41yf4l02b0342nilkyf"))
2250 (modules '((guix build utils)))
2251 ;; Delete bundled pre-built jars.
2252 (snippet
2253 '(begin (delete-file-recursively "lib/") #t))))))
2254 (home-page "http://svnsis.ethz.ch")
2255 (synopsis "Command line parser library")
2256 (description "This package provides a parser for command line arguments.")
2257 (license license:asl2.0))))
2258
2f0d0418
RW
2259(define-public java-cisd-jhdf5
2260 (let ((revision 39162)
2261 (base-version "14.12.6"))
2262 (package
2263 (name "java-cisd-jhdf5")
2264 (version (string-append base-version "-" (number->string revision)))
2265 (source (origin
2266 (method svn-fetch)
2267 (uri (svn-reference
2268 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2269 "jhdf5/tags/release/"
2270 (version-major+minor base-version)
2271 ".x/" base-version "/jhdf5/"))
2272 (revision revision)))
2273 (file-name (string-append "java-cisd-jhdf5-" version "-checkout"))
2274 (sha256
2275 (base32
2276 "13i17s2hn0q9drdqvp8csy7770p3hdbh9rp30ihln2ldkfawdmz0"))
2277 (modules '((guix build utils)))
2278 (snippet
2279 '(begin
2280 ;; Delete included gradle jar
2281 (delete-file-recursively "gradle/wrapper")
2282 ;; Delete pre-built native libraries
2283 (delete-file-recursively "libs")
2284 #t))))
2285 (build-system ant-build-system)
2286 (arguments
2287 `(#:make-flags '("-file" "build/build.xml")
2288 #:build-target "jar-all"
2289 #:test-target "jar-test"
2290 #:jdk ,icedtea-8
2291 #:phases
2292 (modify-phases %standard-phases
1ed386fc
RW
2293 ;; FIXME: this build phase fails.
2294 (delete 'generate-jar-indices)
2f0d0418
RW
2295 ;; Don't erase results from the build phase when building tests.
2296 (add-after 'unpack 'separate-test-target-from-clean
2297 (lambda _
2298 (substitute* "build/build.xml"
2299 (("\"jar-test\" depends=\"clean, ")
2300 "\"jar-test\" depends=\""))
2301 #t))
2302 (add-after 'unpack 'unpack-build-resources
2303 (lambda* (#:key inputs #:allow-other-keys)
2304 (copy-recursively (assoc-ref inputs "build-resources")
2305 "../build_resources")
2306 (delete-file-recursively "../build_resources/lib/")
2307 (mkdir-p "../build_resources/lib")
2308 ;; Remove dependency on classycle
2309 (substitute* "../build_resources/ant/build-common.xml"
2310 (("<taskdef name=\"dependency-checker.*") "")
2311 (("classname=\"classycle.*") "")
2312 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2313 ;; Remove dependency on svn
2314 (substitute* "build/build.xml"
2315 (("<build-info.*") "")
2316 (("\\$\\{revision.number\\}")
2317 ,(number->string revision))
2318 (("\\$\\{version.number\\}") ,base-version))
2319 #t))
2320 (add-after 'unpack-build-resources 'fix-dependencies
2321 (lambda* (#:key inputs #:allow-other-keys)
2322 (substitute* "../build_resources/ant/build-common.xml"
2323 (("../libraries/testng/testng-jdk15.jar")
2324 (string-append (assoc-ref inputs "java-testng")
2325 "/share/java/java-testng.jar")))
2326 (substitute* "build/build.xml"
2327 (("\\$\\{lib\\}/sis-base/sis-base.jar")
2328 (string-append (assoc-ref inputs "java-cisd-base")
2329 "/share/java/sis-base.jar"))
2330 (("\\$\\{lib\\}/cisd-args4j/cisd-args4j.jar")
2331 (string-append (assoc-ref inputs "java-cisd-args4j")
2332 "/share/java/cisd-args4j.jar"))
2333 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2334 (string-append (assoc-ref inputs "java-commons-lang")
2335 "/share/java/commons-lang-"
2336 ,(package-version java-commons-lang) ".jar"))
2337 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2338 (string-append (assoc-ref inputs "java-commons-io")
2339 "/share/java/commons-io-"
2340 ,(package-version java-commons-io)
2341 "-SNAPSHOT.jar"))
2342 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2343 (string-append (assoc-ref inputs "java-testng")
2344 "/share/java/java-testng.jar"))
2345 (("\\$\\{lib\\}/junit4/junit.jar")
2346 (string-append (assoc-ref inputs "java-junit")
2347 "/share/java/junit.jar"))
2348 (("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar")
2349 (string-append (assoc-ref inputs "java-hamcrest-core")
2350 "/share/java/hamcrest-core.jar")))
2351 ;; Remove dependency on ch.rinn.restrictions
2352 (with-directory-excursion "source/java/ch/systemsx/cisd/hdf5/"
2353 (substitute* '("BitSetConversionUtils.java"
2354 "HDF5Utils.java")
2355 (("import ch.rinn.restrictions.Private;") "")
2356 (("@Private") "")))
2357 (with-directory-excursion "sourceTest/java/ch/systemsx/cisd/hdf5/"
2358 (substitute* '("BitSetConversionTest.java"
2359 "h5ar/HDF5ArchiverTest.java")
2360 (("import ch.rinn.restrictions.Friend;") "")
2361 (("@Friend.*") ""))
2362 ;; Remove leftovers from removing @Friend
2363 (substitute* "h5ar/HDF5ArchiverTest.java"
2364 (("\\{ HDF5Archiver.class, IdCache.class, LinkRecord.class \\}\\)")
2365 "")))
2366 #t))
2367 (add-before 'configure 'build-native-library
2368 (lambda* (#:key inputs #:allow-other-keys)
2369 (let ((jdk (assoc-ref inputs "jdk"))
2370 (hdf5 (assoc-ref inputs "hdf5"))
2371 (dir ,(match (%current-system)
2372 ("i686-linux"
2373 "i386-Linux")
2374 ((or "armhf-linux" "aarch64-linux")
2375 "arm-Linux")
2376 ((or "x86_64-linux")
2377 "amd64-Linux")
2378 (_ "unknown-Linux"))))
2379 (with-directory-excursion "source/c"
2380 (apply invoke `("gcc" "-shared" "-O3"
2381 "-fPIC"
2382 "-Wl,--exclude-libs,ALL"
2383 ,@(find-files "jhdf5" "\\.c$")
2384 ,@(find-files "hdf-java" "\\.c$")
2385 ,(string-append "-I" hdf5 "/include")
2386 ,(string-append "-I" jdk "/include")
2387 ,(string-append "-I" jdk "/include/linux")
2388 ,(string-append hdf5 "/lib/libhdf5.a")
2389 "-o" "libjhdf5.so" "-lz")))
2390 (install-file "source/c/libjhdf5.so"
2391 (string-append "libs/native/jhdf5/" dir))
2392 #t)))
2393 ;; In the "check" phase we only build the test executable.
2394 (add-after 'check 'run-tests
2395 (lambda _
2396 (invoke "java" "-jar" "targets/dist/sis-jhdf5-test.jar")
2397 (delete-file "targets/dist/sis-jhdf5-test.jar")
2398 #t))
2399 (replace 'install
2400 (install-jars "targets/dist")))))
2401 (inputs
2402 `(("java-cisd-base" ,java-cisd-base)
2403 ("java-cisd-args4j" ,java-cisd-args4j)
2404 ("java-commons-lang" ,java-commons-lang)
2405 ("java-commons-io" ,java-commons-io)
2406 ("hdf5" ,hdf5)
2407 ("zlib" ,zlib)))
2408 (native-inputs
2409 `(("jdk" ,icedtea-8)
2410 ("java-testng" ,java-testng)
2411 ("java-junit" ,java-junit)
2412 ("java-jmock" ,java-jmock)
2413 ("java-hamcrest-core" ,java-hamcrest-core)
2414 ("build-resources"
2415 ,(origin
2416 (method svn-fetch)
2417 (uri (svn-reference
2418 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2419 "jhdf5/tags/release/"
2420 (version-major+minor base-version)
2421 ".x/" base-version
2422 "/build_resources/"))
2423 (revision revision)))
2424 (sha256
2425 (base32
2426 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
2427 (home-page "https://wiki-bsse.ethz.ch/display/JHDF5/")
2428 (synopsis "Java binding for HDF5")
2429 (description "JHDF5 is a high-level API in Java for reading and writing
2430HDF5 files, building on the libraries provided by the HDF Group.")
2431 ;; The C sources are under a non-copyleft license, which looks like a
2432 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
2433 (license (list license:asl2.0
2434 (license:non-copyleft "file://source/c/COPYING"))))))
2435
218d093b
RW
2436(define-public java-classpathx-servletapi
2437 (package
2438 (name "java-classpathx-servletapi")
ae307724 2439 (version "3.0.1")
218d093b
RW
2440 (source (origin
2441 (method url-fetch)
2442 (uri (string-append "mirror://gnu/classpathx/servletapi/"
2443 "servletapi-" version ".tar.gz"))
2444 (sha256
2445 (base32
ae307724 2446 "07d8h051siga2f33fra72hk12sbq1bxa4jifjg0qj0vfazjjff0x"))))
218d093b
RW
2447 (build-system ant-build-system)
2448 (arguments
2449 `(#:tests? #f ; there is no test target
2450 #:build-target "compile"
218d093b 2451 #:make-flags
ae307724 2452 (list "-Dbuild.compiler=javac1.8"
218d093b
RW
2453 (string-append "-Ddist=" (assoc-ref %outputs "out")))
2454 #:phases
2455 (modify-phases %standard-phases
2456 (replace 'install
2457 (lambda* (#:key make-flags #:allow-other-keys)
2458 (zero? (apply system* `("ant" "dist" ,@make-flags))))))))
2459 (home-page "https://www.gnu.org/software/classpathx/")
2460 (synopsis "Java servlet API implementation")
2461 (description "This is the GNU servlet API distribution, part of the
2462ClasspathX project. It provides implementations of version 3.0 of the servlet
2463API and version 2.1 of the Java ServerPages API.")
2464 (license license:gpl3+)))
2465
5490480c
RW
2466(define-public java-swt
2467 (package
2468 (name "java-swt")
8710d4dd 2469 (version "4.7.1a")
5490480c
RW
2470 (source
2471 ;; The types of many variables and procedures differ in the sources
2472 ;; dependent on whether the target architecture is a 32-bit system or a
2473 ;; 64-bit system. Instead of patching the sources on demand in a build
2474 ;; phase we download either the 32-bit archive (which mostly uses "int"
2475 ;; types) or the 64-bit archive (which mostly uses "long" types).
8710d4dd
RW
2476 (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9")
2477 (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q")
5490480c
RW
2478 (file32 "x86")
2479 (file64 "x86_64"))
2480 (let-values (((hash file)
2481 (match (or (%current-target-system) (%current-system))
2482 ("x86_64-linux" (values hash64 file64))
2483 (_ (values hash32 file32)))))
2484 (origin
2485 (method url-fetch)
2486 (uri (string-append
8710d4dd
RW
2487 "http://download.eclipse.org/eclipse/downloads/drops4/"
2488 "R-" version "-201710090410/swt-" version
2489 "-gtk-linux-" file ".zip"))
5490480c
RW
2490 (sha256 (base32 hash))))))
2491 (build-system ant-build-system)
2492 (arguments
2493 `(#:jar-name "swt.jar"
8710d4dd 2494 #:jdk ,icedtea-8
5490480c
RW
2495 #:tests? #f ; no "check" target
2496 #:phases
2497 (modify-phases %standard-phases
2498 (replace 'unpack
2499 (lambda* (#:key source #:allow-other-keys)
2500 (and (mkdir "swt")
2501 (zero? (system* "unzip" source "-d" "swt"))
2502 (chdir "swt")
2503 (mkdir "src")
2504 (zero? (system* "unzip" "src.zip" "-d" "src")))))
2505 ;; The classpath contains invalid icecat jars. Since we don't need
2506 ;; anything other than the JDK on the classpath, we can simply unset
2507 ;; it.
2508 (add-after 'configure 'unset-classpath
2509 (lambda _ (unsetenv "CLASSPATH") #t))
2510 (add-before 'build 'build-native
2511 (lambda* (#:key inputs outputs #:allow-other-keys)
2512 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
2513 ;; Build shared libraries. Users of SWT have to set the system
2514 ;; property swt.library.path to the "lib" directory of this
2515 ;; package output.
2516 (mkdir-p lib)
2517 (setenv "OUTPUT_DIR" lib)
2518 (with-directory-excursion "src"
2519 (zero? (system* "bash" "build.sh"))))))
2520 (add-after 'install 'install-native
2521 (lambda* (#:key outputs #:allow-other-keys)
2522 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
2523 (for-each (lambda (file)
2524 (install-file file lib))
2525 (find-files "." "\\.so$"))
2526 #t))))))
2527 (inputs
8710d4dd 2528 `(("gtk" ,gtk+-2)
5490480c
RW
2529 ("libxtst" ,libxtst)
2530 ("libxt" ,libxt)
2531 ("mesa" ,mesa)
2532 ("glu" ,glu)))
2533 (native-inputs
2534 `(("pkg-config" ,pkg-config)
2535 ("unzip" ,unzip)))
2536 (home-page "https://www.eclipse.org/swt/")
2537 (synopsis "Widget toolkit for Java")
2538 (description
2539 "SWT is a widget toolkit for Java designed to provide efficient, portable
2540access to the user-interface facilities of the operating systems on which it
2541is implemented.")
2542 ;; SWT code is licensed under EPL1.0
2543 ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1
2544 ;; Cairo bindings contain code under MPL1.1
2545 ;; XULRunner 1.9 bindings contain code under MPL2.0
2546 (license (list
2547 license:epl1.0
2548 license:mpl1.1
2549 license:mpl2.0
2550 license:lgpl2.1+))))
2551
068e476f
RJ
2552(define-public java-xz
2553 (package
2554 (name "java-xz")
92966847 2555 (version "1.6")
068e476f
RJ
2556 (source (origin
2557 (method url-fetch)
2558 (uri (string-append "http://tukaani.org/xz/xz-java-" version ".zip"))
2559 (sha256
2560 (base32
92966847 2561 "1z3p1ri1gvl07inxn0agx44ck8n7wrzfmvkz8nbq3njn8r9wba8x"))))
068e476f
RJ
2562 (build-system ant-build-system)
2563 (arguments
2564 `(#:tests? #f ; There are no tests to run.
2565 #:jar-name ,(string-append "xz-" version ".jar")
2566 #:phases
2567 (modify-phases %standard-phases
2568 ;; The unpack phase enters the "maven" directory by accident.
2569 (add-after 'unpack 'chdir
2570 (lambda _ (chdir "..") #t)))))
2571 (native-inputs
2572 `(("unzip" ,unzip)))
d6ddc5ab 2573 (home-page "https://tukaani.org/xz/java.html")
068e476f
RJ
2574 (synopsis "Implementation of XZ data compression in pure Java")
2575 (description "This library aims to be a complete implementation of XZ data
2576compression in pure Java. Single-threaded streamed compression and
2577decompression and random access decompression have been fully implemented.")
2578 (license license:public-domain)))
04100c3b
RW
2579
2580;; java-hamcrest-core uses qdox version 1.12. We package this version instead
2581;; of the latest release.
2582(define-public java-qdox-1.12
2583 (package
2584 (name "java-qdox")
2585 (version "1.12.1")
2586 (source (origin
2587 (method url-fetch)
2588 (uri (string-append "http://central.maven.org/maven2/"
2589 "com/thoughtworks/qdox/qdox/" version
2590 "/qdox-" version "-sources.jar"))
2591 (sha256
2592 (base32
2593 "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl"))))
2594 (build-system ant-build-system)
2595 (arguments
2596 `(;; Tests require junit
2597 #:tests? #f
2598 #:jar-name "qdox.jar"
2599 #:phases
2600 (modify-phases %standard-phases
2601 (replace 'unpack
2602 (lambda* (#:key source #:allow-other-keys)
2603 (mkdir "src")
2604 (with-directory-excursion "src"
2605 (zero? (system* "jar" "-xf" source)))))
2606 ;; At this point we don't have junit, so we must remove the API
2607 ;; tests.
2608 (add-after 'unpack 'delete-tests
2609 (lambda _
2610 (delete-file-recursively "src/com/thoughtworks/qdox/junit")
2611 #t)))))
2612 (home-page "http://qdox.codehaus.org/")
2613 (synopsis "Parse definitions from Java source files")
2614 (description
2615 "QDox is a high speed, small footprint parser for extracting
2616class/interface/method definitions from source files complete with JavaDoc
b13cf17f 2617@code{@@tags}. It is designed to be used by active code generators or
04100c3b
RW
2618documentation tools.")
2619 (license license:asl2.0)))
e7e28510
RW
2620
2621(define-public java-jarjar
2622 (package
2623 (name "java-jarjar")
2624 (version "1.4")
2625 (source (origin
2626 (method url-fetch)
2627 (uri (string-append
2628 "https://storage.googleapis.com/google-code-archive-downloads/v2/"
2629 "code.google.com/jarjar/jarjar-src-" version ".zip"))
2630 (sha256
2631 (base32
2632 "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl"))))
2633 (build-system ant-build-system)
2634 (arguments
2635 `(;; Tests require junit, which ultimately depends on this package.
2636 #:tests? #f
2637 #:build-target "jar"
2638 #:phases
2639 (modify-phases %standard-phases
2640 (replace 'install
2641 (lambda* (#:key outputs #:allow-other-keys)
2642 (let ((target (string-append (assoc-ref outputs "out")
2643 "/share/java")))
2644 (install-file (string-append "dist/jarjar-" ,version ".jar")
2645 target))
2646 #t)))))
2647 (native-inputs
2648 `(("unzip" ,unzip)))
2649 (home-page "https://code.google.com/archive/p/jarjar/")
2650 (synopsis "Repackage Java libraries")
2651 (description
2652 "Jar Jar Links is a utility that makes it easy to repackage Java
2653libraries and embed them into your own distribution. Jar Jar Links includes
2654an Ant task that extends the built-in @code{jar} task.")
2655 (license license:asl2.0)))
87c31a21
RW
2656
2657(define-public java-hamcrest-core
2658 (package
2659 (name "java-hamcrest-core")
2660 (version "1.3")
2661 (source (origin
2662 (method url-fetch)
00672896
HG
2663 (uri (string-append "https://github.com/hamcrest/JavaHamcrest/"
2664 "archive/hamcrest-java-" version ".tar.gz"))
87c31a21
RW
2665 (sha256
2666 (base32
00672896 2667 "11g0s105fmwzijbv08lx8jlb521yravjmxnpgdx08fvg1kjivhva"))
87c31a21
RW
2668 (modules '((guix build utils)))
2669 (snippet
2670 '(begin
00672896
HG
2671 ;; Delete bundled thirds-party jar archives.
2672 (delete-file-recursively "lib")
87c31a21
RW
2673 #t))))
2674 (build-system ant-build-system)
2675 (arguments
2676 `(#:tests? #f ; Tests require junit
a8d3cb62
RW
2677 #:modules ((guix build ant-build-system)
2678 (guix build utils)
2679 (srfi srfi-1))
87c31a21 2680 #:make-flags (list (string-append "-Dversion=" ,version))
fae0b4ca 2681 #:test-target "unit-test"
87c31a21
RW
2682 #:build-target "core"
2683 #:phases
2684 (modify-phases %standard-phases
2685 ;; Disable unit tests, because they require junit, which requires
2686 ;; hamcrest-core. We also give a fixed value to the "Built-Date"
2687 ;; attribute from the manifest for reproducibility.
2688 (add-before 'configure 'patch-build.xml
2689 (lambda _
2690 (substitute* "build.xml"
2691 (("unit-test, ") "")
2692 (("\\$\\{build.timestamp\\}") "guix"))
2693 #t))
2694 ;; Java's "getMethods()" returns methods in an unpredictable order.
2695 ;; To make the output of the generated code deterministic we must
2696 ;; sort the array of methods.
2697 (add-after 'unpack 'make-method-order-deterministic
2698 (lambda _
2699 (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java"
2700 (("import java\\.util\\.Iterator;" line)
2701 (string-append line "\n"
2702 "import java.util.Arrays; import java.util.Comparator;"))
2703 (("allMethods = cls\\.getMethods\\(\\);" line)
2704 (string-append "_" line
2705 "
2706private Method[] getSortedMethods() {
2707 Arrays.sort(_allMethods, new Comparator<Method>() {
2708 @Override
2709 public int compare(Method a, Method b) {
2710 return a.toString().compareTo(b.toString());
2711 }
2712 });
2713 return _allMethods;
2714}
2715
2716private Method[] allMethods = getSortedMethods();")))))
2717 (add-before 'build 'do-not-use-bundled-qdox
2718 (lambda* (#:key inputs #:allow-other-keys)
2719 (substitute* "build.xml"
2720 (("lib/generator/qdox-1.12.jar")
2721 (string-append (assoc-ref inputs "java-qdox-1.12")
2722 "/share/java/qdox.jar")))
2723 #t))
fab959d3
HG
2724 ;; build.xml searches for .jar files in this directoy, which
2725 ;; we remove from the source archive.
2726 (add-before 'build 'create-dummy-directories
2727 (lambda _
2728 (mkdir-p "lib/integration")
2729 #t))
87c31a21
RW
2730 (replace 'install
2731 (lambda* (#:key outputs #:allow-other-keys)
a8d3cb62
RW
2732 (let* ((target (string-append (assoc-ref outputs "out")
2733 "/share/java/"))
2734 (version-suffix ,(string-append "-" version ".jar"))
2735 (install-without-version-suffix
2736 (lambda (jar)
2737 (copy-file jar
2738 (string-append target
2739 (basename jar version-suffix)
2740 ".jar")))))
2741 (mkdir-p target)
2742 (for-each
2743 install-without-version-suffix
2744 (find-files "build"
2745 (lambda (name _)
2746 (and (string-suffix? ".jar" name)
2747 (not (string-suffix? "-sources.jar" name)))))))
2748 #t)))))
87c31a21
RW
2749 (native-inputs
2750 `(("java-qdox-1.12" ,java-qdox-1.12)
2751 ("java-jarjar" ,java-jarjar)))
2752 (home-page "http://hamcrest.org/")
2753 (synopsis "Library of matchers for building test expressions")
2754 (description
2755 "This package provides a library of matcher objects (also known as
2756constraints or predicates) allowing @code{match} rules to be defined
2757declaratively, to be used in other frameworks. Typical scenarios include
2758testing frameworks, mocking libraries and UI validation rules.")
2759 (license license:bsd-2)))
d0184f44
RW
2760
2761(define-public java-junit
2762 (package
2763 (name "java-junit")
2764 (version "4.12")
2765 (source (origin
2766 (method url-fetch)
2767 (uri (string-append "https://github.com/junit-team/junit/"
2768 "archive/r" version ".tar.gz"))
2769 (file-name (string-append name "-" version ".tar.gz"))
2770 (sha256
2771 (base32
2772 "090dn5v1vs0b3acyaqc0gjf6p8lmd2h24wfzsbq7sly6b214anws"))
2773 (modules '((guix build utils)))
2774 (snippet
2775 '(begin
2776 ;; Delete bundled jar archives.
2777 (delete-file-recursively "lib")
2778 #t))))
2779 (build-system ant-build-system)
2780 (arguments
2781 `(#:tests? #f ; no tests
2782 #:jar-name "junit.jar"))
2783 (inputs
2784 `(("java-hamcrest-core" ,java-hamcrest-core)))
2785 (home-page "http://junit.org/")
2786 (synopsis "Test framework for Java")
2787 (description
2788 "JUnit is a simple framework to write repeatable tests for Java projects.
2789JUnit provides assertions for testing expected results, test fixtures for
2790sharing common test data, and test runners for running tests.")
2791 (license license:epl1.0)))
9fb20d01
RW
2792
2793(define-public java-plexus-utils
2794 (package
2795 (name "java-plexus-utils")
2796 (version "3.0.24")
2797 (source (origin
2798 (method url-fetch)
2799 (uri (string-append "https://github.com/codehaus-plexus/"
2800 "plexus-utils/archive/plexus-utils-"
2801 version ".tar.gz"))
2802 (sha256
2803 (base32
2804 "1mlwpc6fms24slygv5yvi6fi9hcha2fh0v73p5znpi78bg36i2js"))))
2805 (build-system ant-build-system)
2806 ;; FIXME: The default build.xml does not include a target to install
2807 ;; javadoc files.
2808 (arguments
2809 `(#:jar-name "plexus-utils.jar"
2810 #:source-dir "src/main"
2811 #:phases
2812 (modify-phases %standard-phases
2813 (add-after 'unpack 'fix-reference-to-/bin-and-/usr
2814 (lambda _
2815 (substitute* "src/main/java/org/codehaus/plexus/util/\
2816cli/shell/BourneShell.java"
2817 (("/bin/sh") (which "sh"))
2818 (("/usr/") (getcwd)))
2819 #t))
2820 (add-after 'unpack 'fix-or-disable-broken-tests
2821 (lambda _
2822 (with-directory-excursion "src/test/java/org/codehaus/plexus/util"
2823 (substitute* '("cli/CommandlineTest.java"
2824 "cli/shell/BourneShellTest.java")
2825 (("/bin/sh") (which "sh"))
2826 (("/bin/echo") (which "echo")))
2827
2828 ;; This test depends on MavenProjectStub, but we don't have
2829 ;; a package for Maven.
2830 (delete-file "introspection/ReflectionValueExtractorTest.java")
2831
2832 ;; FIXME: The command line tests fail, maybe because they use
2833 ;; absolute paths.
2834 (delete-file "cli/CommandlineTest.java"))
2835 #t)))))
2836 (native-inputs
2837 `(("java-junit" ,java-junit)))
2838 (home-page "http://codehaus-plexus.github.io/plexus-utils/")
2839 (synopsis "Common utilities for the Plexus framework")
2840 (description "This package provides various Java utility classes for the
2841Plexus framework to ease working with strings, files, command lines, XML and
2842more.")
2843 (license license:asl2.0)))
1e555562
HG
2844
2845(define-public java-plexus-interpolation
2846 (package
2847 (name "java-plexus-interpolation")
2848 (version "1.23")
2849 (source (origin
2850 (method url-fetch)
2851 (uri (string-append "https://github.com/codehaus-plexus/"
2852 "plexus-interpolation/archive/"
2853 "plexus-interpolation-" version ".tar.gz"))
2854 (sha256
2855 (base32
fd75eb6c 2856 "03377yzlx5q440m6sxxgv6a5qb8fl30zzcgxgc0hxk5qgl2z1jjn"))))
1e555562
HG
2857 (build-system ant-build-system)
2858 (arguments
2859 `(#:jar-name "plexus-interpolation.jar"
2860 #:source-dir "src/main"))
2861 (native-inputs
2862 `(("java-junit" ,java-junit)
2863 ("java-hamcrest-core" ,java-hamcrest-core)))
2864 (home-page "http://codehaus-plexus.github.io/plexus-interpolation/")
2865 (synopsis "Java components for interpolating ${} strings and the like")
2866 (description "Plexus interpolator is a modular, flexible interpolation
2867framework for the expression language style commonly seen in Maven, Plexus,
2868and other related projects.
2869
2870It has its foundation in the @code{org.codehaus.plexus.utils.interpolation}
2871package within @code{plexus-utils}, but has been separated in order to allow
2872these two libraries to vary independently of one another.")
2873 (license license:asl2.0)))
8f8ed9aa 2874
bb27eb0d
JL
2875(define-public java-plexus-classworlds
2876 (package
2877 (name "java-plexus-classworlds")
2878 (version "2.5.2")
2879 (source (origin
2880 (method url-fetch)
2881 (uri (string-append "https://github.com/codehaus-plexus/"
2882 "plexus-classworlds/archive/plexus-classworlds-"
2883 version ".tar.gz"))
2884 (sha256
2885 (base32
2886 "1qm4p0rl8d82lzhsiwnviw11jnq44s0gflg78zq152xyyr2xmh8g"))))
2887 (build-system ant-build-system)
2888 (arguments
2889 `(#:jar-name "plexus-classworlds.jar"
2890 #:source-dir "src/main"
2891 #:tests? #f));; FIXME: we need to generate some resources as in pom.xml
2892 (native-inputs
2893 `(("java-junit" ,java-junit)))
2894 (home-page "http://codehaus-plexus.github.io/plexus-classworlds/")
2895 (synopsis "Java class loader framework")
f4548394
TGR
2896 (description "Plexus classworlds replaces the native @code{ClassLoader}
2897mechanism of Java. It is especially useful for dynamic loading of application
bb27eb0d
JL
2898components.")
2899 (license license:asl2.0)))
2900
a7ad92ad 2901(define java-plexus-container-default-bootstrap
0726d4ea
JL
2902 (package
2903 (name "java-plexus-container-default-bootstrap")
2904 (version "1.7.1")
2905 (source (origin
2906 (method url-fetch)
2907 (uri (string-append "https://github.com/codehaus-plexus/plexus-containers"
2908 "/archive/plexus-containers-" version ".tar.gz"))
2909 (sha256
2910 (base32
2911 "0xw5g30qf4a83608rw9v2hv8pfsz7d69dkdhk6r0wia4q78hh1pc"))))
2912 (build-system ant-build-system)
2913 (arguments
2914 `(#:jar-name "container-default.jar"
2915 #:source-dir "plexus-container-default/src/main/java"
2916 #:test-dir "plexus-container-default/src/test"
2917 #:jdk ,icedtea-8
2918 #:tests? #f; requires plexus-archiver, which depends on this package
2919 #:phases
2920 (modify-phases %standard-phases
2921 (add-before 'build 'copy-resources
2922 (lambda _
2923 (copy-recursively
2924 "plexus-container-default/src/main/resources/"
2925 "build/classes")
2926 #t)))))
2927 (inputs
2928 `(("worldclass" ,java-plexus-classworlds)
2929 ("xbean" ,java-geronimo-xbean-reflect)
2930 ("utils" ,java-plexus-utils)
2931 ("junit" ,java-junit)
2932 ("guava" ,java-guava)))
2933 (home-page "https://github.com/codehaus-plexus/plexus-containers")
f4548394 2934 (synopsis "Inversion-of-control container")
0726d4ea 2935 (description "Plexus-default-container is Plexus' inversion-of-control
f4548394 2936(@dfn{IoC}) container. It is composed of its public API and its default
0726d4ea
JL
2937implementation.")
2938 (license license:asl2.0)))
2939
0858b9dc
JL
2940(define-public java-plexus-io
2941 (package
2942 (name "java-plexus-io")
2943 (version "3.0.0")
2944 (source (origin
2945 (method url-fetch)
2946 (uri (string-append "https://github.com/codehaus-plexus/plexus-io"
2947 "/archive/plexus-io-" version ".tar.gz"))
2948 (sha256
2949 (base32
2950 "0f2j41kihaymxkpbm55smpxjja235vad8cgz94frfy3ppcp021dw"))))
2951 (build-system ant-build-system)
2952 (arguments
2953 `(#:jar-name "plexus-io.jar"
2954 #:source-dir "src/main/java"
2955 #:test-dir "src/test"
2956 #:jdk ,icedtea-8
2957 #:phases
2958 (modify-phases %standard-phases
2959 (add-before 'build 'copy-resources
2960 (lambda _
2961 (mkdir-p "build/classes/META-INF/plexus")
2962 (copy-file "src/main/resources/META-INF/plexus/components.xml"
2963 "build/classes/META-INF/plexus/components.xml")
2964 #t)))))
2965 (inputs
2966 `(("utils" ,java-plexus-utils)
2967 ("commons-io" ,java-commons-io)
2968 ("java-jsr305" ,java-jsr305)))
2969 (native-inputs
2970 `(("junit" ,java-junit)
2971 ("hamcrest" ,java-hamcrest-core)
2972 ("guava" ,java-guava)
2973 ("classworlds" ,java-plexus-classworlds)
2974 ("xbean" ,java-geronimo-xbean-reflect)
2975 ("container-default" ,java-plexus-container-default-bootstrap)))
2976 (home-page "https://github.com/codehaus-plexus/plexus-io")
2977 (synopsis "I/O plexus components")
2978 (description "Plexus IO is a set of plexus components, which are designed
2979for use in I/O operations. This implementation using plexus components allows
2980reusing it in maven.")
2981 (license license:asl2.0)))
2982
b51df3ca
JL
2983(define-public java-plexus-archiver
2984 (package
2985 (name "java-plexus-archiver")
2986 (version "3.5")
2987 (source (origin
2988 (method url-fetch)
2989 (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver"
2990 "/archive/plexus-archiver-" version ".tar.gz"))
2991 (sha256
2992 (base32
2993 "0iv1j7khra6icqh3jndng3iipfmkc7l5jq2y802cm8r575v75pyv"))))
2994 (build-system ant-build-system)
2995 (arguments
2996 `(#:jar-name "plexus-archiver.jar"
2997 #:source-dir "src/main/java"
2998 #:jdk ,icedtea-8
2999 #:test-dir "src/test"
3000 #:test-exclude (list "**/Abstract*.java" "**/Base*.java")
3001 #:phases
3002 (modify-phases %standard-phases
3003 (add-before 'check 'remove-failing
3004 (lambda _
3005 ;; Requires an older version of plexus container
3006 (delete-file
3007 "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java")))
3008 (add-before 'build 'copy-resources
3009 (lambda _
3010 (mkdir-p "build/classes/META-INF/plexus")
3011 (copy-file "src/main/resources/META-INF/plexus/components.xml"
3012 "build/classes/META-INF/plexus/components.xml")
3013 #t)))))
3014 (inputs
3015 `(("utils" ,java-plexus-utils)
3016 ("commons-io" ,java-commons-io)
3017 ("snappy" ,java-iq80-snappy)
3018 ("io" ,java-plexus-io)
3019 ("compress" ,java-commons-compress)
3020 ("container-default" ,java-plexus-container-default-bootstrap)
3021 ("snappy" ,java-snappy)
3022 ("java-jsr305" ,java-jsr305)))
3023 (native-inputs
3024 `(("junit" ,java-junit)
3025 ("classworld" ,java-plexus-classworlds)
3026 ("xbean" ,java-geronimo-xbean-reflect)
3027 ("xz" ,java-tukaani-xz)
3028 ("guava" ,java-guava)))
3029 (home-page "https://github.com/codehaus-plexus/plexus-archiver")
3030 (synopsis "Archiver component of the Plexus project")
3031 (description "Plexus-archiver contains a component to deal with project
3032archives (jar).")
3033 (license license:asl2.0)))
3034
a0837294
JL
3035(define-public java-plexus-container-default
3036 (package
3037 (inherit java-plexus-container-default-bootstrap)
3038 (name "java-plexus-container-default")
3039 (arguments
3040 `(#:jar-name "container-default.jar"
3041 #:source-dir "plexus-container-default/src/main/java"
3042 #:test-dir "plexus-container-default/src/test"
3043 #:test-exclude (list ;"**/*Test.java"
3044 "**/Abstract*.java"
3045 ;; Requires plexus-hierarchy
3046 "**/PlexusHierarchyTest.java"
3047 ;; Failures
3048 "**/ComponentRealmCompositionTest.java"
3049 "**/PlexusContainerTest.java")
3050 #:jdk ,icedtea-8
3051 #:phases
3052 (modify-phases %standard-phases
3053 (add-before 'build 'copy-resources
3054 (lambda _
3055 (copy-recursively
3056 "plexus-container-default/src/main/resources/"
3057 "build/classes")
3058 #t))
3059 (add-before 'check 'fix-paths
3060 (lambda _
3061 (let ((dir "plexus-container-default/src/test/java/org/codehaus"))
3062 (substitute*
3063 (string-append
3064 dir "/plexus/component/composition/"
3065 "ComponentRealmCompositionTest.java")
3066 (("src/test") "plexus-container-default/src/test"))
3067 #t))))))
3068 (inputs
3069 `(("worldclass" ,java-plexus-classworlds)
3070 ("xbean" ,java-geronimo-xbean-reflect)
3071 ("utils" ,java-plexus-utils)
3072 ("junit" ,java-junit)
3073 ("guava" ,java-guava)))
3074 (native-inputs
3075 `(("archiver" ,java-plexus-archiver)
3076 ("hamcrest" ,java-hamcrest-core)))))
3077
3214afab
JL
3078(define-public java-plexus-component-annotations
3079 (package
3080 (inherit java-plexus-container-default)
3081 (name "java-plexus-component-annotations")
3082 (arguments
3083 `(#:jar-name "plexus-component-annotations.jar"
3084 #:source-dir "plexus-component-annotations/src/main/java"
3085 #:tests? #f)); no tests
3086 (inputs '())
3087 (native-inputs '())
3088 (synopsis "Plexus descriptors generator")
3089 (description "This package is a Maven plugin to generate Plexus descriptors
3090from source tags and class annotations.")))
3091
4f77ba17
JL
3092(define-public java-plexus-cipher
3093 (package
3094 (name "java-plexus-cipher")
3095 (version "1.7")
3096 (source (origin
3097 (method url-fetch)
3098 (uri (string-append "https://github.com/codehaus-plexus/plexus-cipher"
3099 "/archive/plexus-cipher-" version ".tar.gz"))
3100 (sha256
3101 (base32
3102 "1j3r8xzlxlk340snkjp6lk2ilkxlkn8qavsfiq01f43xmvv8ymk3"))))
3103 (build-system ant-build-system)
3104 (arguments
3105 `(#:jar-name "plexus-cipher.jar"
3106 #:source-dir "src/main/java"
3107 #:jdk ,icedtea-8
3108 #:tests? #f; FIXME: requires sisu-inject-bean
3109 #:phases
3110 (modify-phases %standard-phases
3111 (add-before 'build 'copy-resources
3112 (lambda _
3113 (copy-recursively "src/main/resources" "build/classes")
3114 (mkdir-p "build/classes/META-INF/sisu")
3115 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
3116 (lambda _
3117 (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
3118 #t)))))
3119 (inputs
3120 `(("java-cdi-api" ,java-cdi-api)
3121 ("java-javax-inject" ,java-javax-inject)))
3122 (home-page "https://github.com/sonatype/plexus-cipher")
3123 (synopsis "Encryption/decryption Component")
3124 (description "Plexus-cipher contains a component to deal with encryption
3125and decryption.")
3126 (license license:asl2.0)))
3127
239126d4
JL
3128(define-public java-plexus-compiler-api
3129 (package
3130 (name "java-plexus-compiler-api")
3131 (version "2.8.2")
3132 (source (origin
3133 (method url-fetch)
3134 (uri (string-append "https://github.com/codehaus-plexus/plexus-compiler"
3135 "/archive/plexus-compiler-" version ".tar.gz"))
3136 (sha256
3137 (base32
3138 "0g3x26pymcdnfnwv2a1i57pd5s26f5zqfi1rdy98z1bn01klx25k"))))
3139 (build-system ant-build-system)
3140 (arguments
3141 `(#:jar-name "plexus-compiler-api.jar"
3142 #:source-dir "plexus-compiler-api/src/main/java"
3143 #:jdk ,icedtea-8
3144 #:test-dir "plexus-compiler-api/src/test"))
3145 (inputs
3146 `(("java-plexus-container-default" ,java-plexus-container-default)
3147 ("java-plexus-util" ,java-plexus-utils)))
3148 (native-inputs
3149 `(("java-junit" ,java-junit)))
3150 (home-page "https://github.com/codehaus-plexus/plexus-compiler")
3151 (synopsis "Plexus Compilers component's API to manipulate compilers")
3152 (description "This package contains the API used by components to manipulate
3153compilers.")
3154 (license (list license:asl2.0
3155 license:expat))))
3156
f8a519fa
JL
3157(define-public java-plexus-compiler-javac
3158 (package
3159 (inherit java-plexus-compiler-api)
3160 (name "java-plexus-compiler-javac")
3161 (arguments
3162 `(#:jar-name "plexus-compiler-javac.jar"
3163 #:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java"
3164 #:jdk ,icedtea-8
3165 #:tests? #f; depends on compiler-test -> maven-core -> ... -> this package.
3166 #:test-dir "plexus-compilers/plexus-compiler-javac/src/test"))
3167 (inputs
3168 `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
3169 ("java-plexus-utils" ,java-plexus-utils)
3170 ("java-plexus-container-default" ,java-plexus-container-default)))
3171 (native-inputs
3172 `(("java-junit" ,java-junit)))
3173 (synopsis "Javac Compiler support for Plexus Compiler component")
3174 (description "This package contains the Javac Compiler support for Plexus
3175Compiler component.")))
3176
0aa85081
JL
3177(define-public java-plexus-sec-dispatcher
3178 (package
3179 (name "java-plexus-sec-dispatcher")
3180 (version "1.4") ;; Newest release listed at the Maven Central Repository.
3181 (source (origin
3182 ;; This project doesn't tag releases or publish tarballs, so we take
3183 ;; the "prepare release plexus-sec-dispatcher-1.4" git commit.
3184 (method url-fetch)
3185 (uri (string-append "https://github.com/sonatype/plexus-sec-dispatcher/"
3186 "archive/7db8f88048.tar.gz"))
3187 (sha256
3188 (base32
3189 "1smfrk4n7xbrsxpxcp2j4i0j8q86j73w0w6xg7qz83dp6dagdjgp"))
3190 (file-name (string-append name "-" version ".tar.gz"))))
3191 (arguments
3192 `(#:jar-name "plexus-sec-dispatcher.jar"
3193 #:source-dir "src/main/java"
3194 #:jdk ,icedtea-8
3195 #:phases
3196 (modify-phases %standard-phases
3197 (add-before 'build 'generate-models
3198 (lambda* (#:key inputs #:allow-other-keys)
3199 (define (modello-single-mode file version mode)
3200 (zero? (system* "java"
3201 "org.codehaus.modello.ModelloCli"
3202 file mode "src/main/java" version
3203 "false" "true")))
3204 (let ((file "src/main/mdo/settings-security.mdo"))
3205 (and
3206 (modello-single-mode file "1.0.0" "java")
3207 (modello-single-mode file "1.0.0" "xpp3-reader")
3208 (modello-single-mode file "1.0.0" "xpp3-writer")))))
3209 (add-before 'build 'generate-components.xml
3210 (lambda _
3211 (mkdir-p "build/classes/META-INF/plexus")
3212 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
3213 (lambda _
3214 (display
3215 "<component-set>\n
3216 <components>\n
3217 <component>\n
3218 <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n
3219 <role-hint>default</role-hint>\n
3220 <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n
3221 <description></description>\n
3222 <requirements>\n
3223 <requirement>\n
3224 <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n
3225 <field-name>_cipher</field-name>\n
3226 </requirement>\n
3227 <requirement>\n
3228 <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n
3229 <field-name>_decryptors</field-name>\n
3230 </requirement>\n
3231 </requirements>\n
3232 <configuration>\n
3233 <_configuration-file>~/.settings-security.xml</_configuration-file>\n
3234 </configuration>\n
3235 </component>\n
3236 </components>\n
3237</component-set>\n")))))
3238 (add-before 'check 'fix-paths
3239 (lambda _
3240 (copy-recursively "src/test/resources" "target"))))))
3241 (inputs
3242 `(("java-plexus-cipher" ,java-plexus-cipher)))
3243 (native-inputs
3244 `(("java-modello-core" ,java-modello-core)
3245 ;; for modello:
3246 ("java-plexus-container-default" ,java-plexus-container-default)
3247 ("java-plexus-classworlds" ,java-plexus-classworlds)
3248 ("java-plexus-utils" ,java-plexus-utils)
3249 ("java-guava" ,java-guava)
3250 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
3251 ("java-sisu-build-api" ,java-sisu-build-api)
3252 ;; modello plugins:
3253 ("java-modellop-plugins-java" ,java-modello-plugins-java)
3254 ("java-modellop-plugins-xml" ,java-modello-plugins-xml)
3255 ("java-modellop-plugins-xpp3" ,java-modello-plugins-xpp3)
3256 ;; for tests
3257 ("java-junit" ,java-junit)))
3258 (build-system ant-build-system)
3259 (home-page "https://github.com/sonatype/plexus-sec-dispatcher")
3260 (synopsis "Plexus Security Dispatcher Component")
3261 (description "This package is the Plexus Security Dispatcher Component.
3262This component decrypts a string passed to it.")
3263 (license license:asl2.0)))
3264
7d65489f
JL
3265(define-public java-plexus-cli
3266 (package
3267 (name "java-plexus-cli")
3268 (version "1.7")
3269 (source (origin
3270 (method git-fetch)
3271 (uri (git-reference
3272 (url "https://github.com/sonatype/plexus-cli")
3273 (commit "a776afa6bca84e5107bedb69440329cdb24ed645")))
3274 (file-name (string-append name "-" version))
3275 (sha256
3276 (base32
3277 "0xjrlay605rypv3zd7y24vlwf0039bil3n2cqw54r1ddpysq46vx"))))
3278 (build-system ant-build-system)
3279 (arguments
3280 `(#:jar-name "plexus-cli.jar"
3281 #:source-dir "src/main/java"
3282 #:jdk ,icedtea-8
3283 #:test-dir "src/test"))
3284 (inputs
3285 `(("java-commons-cli" ,java-commons-cli)
3286 ("java-plexus-container-default" ,java-plexus-container-default)
3287 ("java-plexus-classworlds" ,java-plexus-classworlds)))
3288 (native-inputs
3289 `(("java-plexus-utils" ,java-plexus-utils)
3290 ("java-junit" ,java-junit)
3291 ("java-guava" ,java-guava)))
3292 (home-page "https://codehaus-plexus.github.io/plexus-cli")
3293 (synopsis "CLI building library for plexus")
3294 (description "This package is a library to help creating CLI around
3295Plexus components.")
3296 (license license:asl2.0)))
3297
8f524749
JL
3298(define-public java-sisu-build-api
3299 (package
3300 (name "java-sisu-build-api")
3301 (version "0.0.7")
3302 (source (origin
3303 (method url-fetch)
3304 (uri (string-append "https://github.com/sonatype/sisu-build-api/"
3305 "archive/plexus-build-api-" version ".tar.gz"))
3306 (sha256
3307 (base32
3308 "1c3rrpma3x634xp2rm2p5iskfhzdyc7qfbhjzr70agrl1jwghgy2"))))
3309 (build-system ant-build-system)
3310 (arguments
3311 `(#:jar-name "sisu-build-api.jar"
3312 #:source-dir "src/main/java"
3313 #:jdk ,icedtea-8
3314 #:tests? #f; FIXME: how to run the tests?
3315 #:phases
3316 (modify-phases %standard-phases
3317 (add-before 'build 'copy-resources
3318 (lambda _
3319 (copy-recursively "src/main/resources" "build/classes")
3320 (substitute* (find-files "build/classes")
3321 (("\\$\\{project.version\\}") ,version))
3322 #t))
3323 (add-before 'build 'generate-plexus-compontent
3324 (lambda _
3325 (mkdir-p "build/classes/META-INF/plexus")
3326 ;; This file is required for plexus to inject this package.
3327 ;; FIXME: how is it generated?
3328 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
3329 (lambda _
3330 (display
3331 "<component-set>\n
3332 <components>\n
3333 <component>\n
3334 <role>org.sonatype.plexus.build.incremental.BuildContext</role>\n
3335 <role-hint>default</role-hint>\n
3336 <implementation>org.sonatype.plexus.build.incremental.DefaultBuildContext</implementation>\n
3337 <description>Filesystem based non-incremental build context implementation\n
3338which behaves as if all files were just created.</description>\n
3339 </component>\n
3340 </components>\n
3341</component-set>\n")))
3342 #t)))))
3343 (inputs
3344 `(("java-plexus-utils" ,java-plexus-utils)
3345 ("java-plexus-container-default" ,java-plexus-container-default)))
3346 (home-page "https://github.com/sonatype/sisu-build-api/")
3347 (synopsis "Base build API for maven")
3348 (description "This package contains the base build API for maven and
3349a default implementation of it. This API is about scanning files in a
3350project and determining what files need to be rebuilt.")
3351 (license license:asl2.0)))
3352
b26c8b61
JL
3353(define-public java-modello-core
3354 (package
3355 (name "java-modello-core")
3356 (version "1.9.1")
3357 (source (origin
3358 (method url-fetch)
3359 (uri (string-append "https://github.com/codehaus-plexus/modello"
3360 "/archive/modello-" version ".tar.gz"))
3361 (sha256
3362 (base32
3363 "0l2pvns8pmlrmjm3iknp7gpg3654y1m8qhy55b19sdwdchdcyxfh"))))
3364 (build-system ant-build-system)
3365 (arguments
3366 `(#:jar-name "modello-core.jar"
3367 #:source-dir "modello-core/src/main/java"
3368 #:test-dir "modello-core/src/test"
3369 #:main-class "org.codehaus.modello.ModelloCli"
3370 #:jdk ,icedtea-8
3371 #:phases
3372 (modify-phases %standard-phases
3373 (add-before 'build 'copy-resources
3374 (lambda _
3375 (mkdir-p "build/classes/META-INF/plexus")
3376 (copy-file "modello-core/src/main/resources/META-INF/plexus/components.xml"
3377 "build/classes/META-INF/plexus/components.xml")
3378 #t))
3379 (add-before 'check 'fix-tests
3380 (lambda _
3381 (with-directory-excursion "modello-core/src/test/java/org/codehaus"
3382 (substitute* '("modello/core/DefaultModelloCoreTest.java"
3383 "modello/core/io/ModelReaderTest.java")
3384 (("src/test") "modello-core/src/test")))
3385 #t)))))
3386 (inputs
3387 `(("java-plexus-utils" ,java-plexus-utils)
3388 ("java-plexus-container-default" ,java-plexus-container-default)
3389 ("java-sisu-build-api" ,java-sisu-build-api)))
3390 (native-inputs
3391 `(("java-junit" ,java-junit)
3392 ("java-plexus-classworlds" ,java-plexus-classworlds)
3393 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
3394 ("java-guava" ,java-guava)))
3395 (home-page "http://codehaus-plexus.github.io/modello/")
3396 (synopsis "Framework for code generation from a simple model")
3397 (description "Modello is a framework for code generation from a simple model.
3398
3399Modello generates code from a simple model format: based on a plugin
3400architecture, various types of code and descriptors can be generated from the
3401single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers,
3402XSD and documentation.")
3403 (license (list
3404 license:expat
3405 ;; Although this package uses only files licensed under expat,
3406 ;; other parts of the source are licensed under different
3407 ;; licenses. We include them to be inherited by other packages.
3408 license:asl2.0
3409 ;; Some files in modello-plugin-java are licensed under a
3410 ;; 5-clause BSD license.
3411 (license:non-copyleft
3412 (string-append "file:///modello-plugins/modello-plugin-java/"
3413 "src/main/java/org/codehaus/modello/plugin/"
3414 "java/javasource/JNaming.java"))))))
3415
fc620bef
JL
3416(define-public java-modello-plugins-java
3417 (package
3418 (inherit java-modello-core)
3419 (name "java-modello-plugins-java")
3420 (arguments
3421 `(#:jar-name "modello-plugins-java.jar"
3422 #:source-dir "modello-plugins/modello-plugin-java/src/main/java"
3423 #:test-dir "modello-plugins/modello-plugin-java/src/test"
3424 #:jdk ,icedtea-8
3425 #:tests? #f; requires maven-model, which depends on this package
3426 #:phases
3427 (modify-phases %standard-phases
3428 (add-before 'build 'copy-resources
3429 (lambda _
3430 (mkdir-p "build/classes")
3431 (copy-recursively "modello-plugins/modello-plugin-java/src/main/resources"
3432 "build/classes")
3433 #t)))))
3434 (inputs
3435 `(("java-modello-core" ,java-modello-core)
3436 ,@(package-inputs java-modello-core)))
3437 (synopsis "Modello Java Plugin")
3438 (description "Modello Java Plugin generates Java objects for the model.")))
3439
a0ce95ba
JL
3440(define-public java-modello-plugins-xml
3441 (package
3442 (inherit java-modello-core)
3443 (name "java-modello-plugins-xml")
3444 (arguments
3445 `(#:jar-name "modello-plugins-xml.jar"
3446 #:source-dir "modello-plugins/modello-plugin-xml/src/main/java"
3447 #:test-dir "modello-plugins/modello-plugin-xml/src/test"
3448 #:jdk ,icedtea-8
3449 #:phases
3450 (modify-phases %standard-phases
3451 (add-before 'build 'copy-resources
3452 (lambda _
3453 (mkdir-p "build/classes")
3454 (copy-recursively
3455 "modello-plugins/modello-plugin-xml/src/main/resources"
3456 "build/classes")
3457 #t))
3458 (add-before 'check 'fix-paths
3459 (lambda _
3460 (with-directory-excursion "modello-plugins/modello-plugin-xml/src/test"
3461 (substitute*
3462 "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java"
3463 (("src/test") "modello-plugins/modello-plugin-xml/src/test"))))))))
3464 (inputs
3465 `(("java-modello-core" ,java-modello-core)
3466 ("java-modello-plugins-java" ,java-modello-plugins-java)
3467 ,@(package-inputs java-modello-core)))
3468 (synopsis "Modello XML Plugin")
3469 (description "Modello XML Plugin contains shared code for every plugins
3470working on XML representation of the model.")))
3471
e4708560
JL
3472(define-public java-modello-test
3473 (package
3474 (inherit java-modello-core)
3475 (name "java-modello-test")
3476 (arguments
3477 `(#:jar-name "modello-test.jar"
3478 #:source-dir "modello-test/src/main/java"
3479 #:tests? #f; no tests
3480 #:jdk ,icedtea-8))
3481 (inputs
3482 `(("java-plexus-utils" ,java-plexus-utils)
3483 ("java-plexus-compiler-api" ,java-plexus-compiler-api)
3484 ("java-plexus-compiler-javac" ,java-plexus-compiler-javac)
3485 ("java-plexus-container-default" ,java-plexus-container-default)))
3486 (synopsis "Modello test package")
3487 (description "The modello test package contains the basis to create
3488Modello generator unit-tests, including sample models and xml files to test
3489every feature for every plugin.")))
3490
36607d3b
JL
3491(define-public java-modello-plugins-xpp3
3492 (package
3493 (inherit java-modello-core)
3494 (name "java-modello-plugins-xpp3")
3495 (arguments
3496 `(#:jar-name "modello-plugins-xpp3.jar"
3497 #:source-dir "modello-plugins/modello-plugin-xpp3/src/main/java"
3498 #:test-dir "modello-plugins/modello-plugin-xpp3/src/test"
3499 ;; One of the test dependencies is maven-model which depends on this package.
3500 #:tests? #f
3501 #:jdk ,icedtea-8
3502 #:phases
3503 (modify-phases %standard-phases
3504 (add-before 'build 'copy-resources
3505 (lambda _
3506 (mkdir-p "build/classes")
3507 (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources"
3508 "build/classes")
3509 #t)))))
3510 (inputs
3511 `(("java-modello-core" ,java-modello-core)
3512 ("java-modello-plugins-java" ,java-modello-plugins-java)
3513 ("java-modello-plugins-xml" ,java-modello-plugins-xml)
3514 ,@(package-inputs java-modello-core)))
3515 (native-inputs
3516 `(("java-xmlunit" ,java-xmlunit)
3517 ("java-modello-test" ,java-modello-test)
3518 ,@(package-native-inputs java-modello-core)))
3519 (synopsis "Modello XPP3 Plugin")
3520 (description "The modello XPP3 plugin generates XML readers and writers based
3521on the XPP3 API (XML Pull Parser).")))
3522
8f8ed9aa
RW
3523(define-public java-asm
3524 (package
3525 (name "java-asm")
d0e9ded7 3526 (version "6.0")
8f8ed9aa
RW
3527 (source (origin
3528 (method url-fetch)
3529 (uri (string-append "http://download.forge.ow2.org/asm/"
3530 "asm-" version ".tar.gz"))
3531 (sha256
3532 (base32
d0e9ded7 3533 "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00"))))
8f8ed9aa 3534 (build-system ant-build-system)
d0e9ded7
GB
3535 (propagated-inputs
3536 `(("java-aqute-bndlib" ,java-aqute-bndlib)))
8f8ed9aa
RW
3537 (arguments
3538 `(#:build-target "compile"
3539 ;; The tests require an old version of Janino, which no longer compiles
3540 ;; with the JDK7.
3541 #:tests? #f
d0e9ded7
GB
3542 #:make-flags
3543 (list
3544 ;; We don't need these extra ant tasks, but the build system asks us to
3545 ;; provide a path anyway.
3546 "-Dobjectweb.ant.tasks.path=dummy-path"
3547 ;; The java-aqute.bndlib JAR file will be put onto the classpath and
3548 ;; used during the build automatically by ant-build-system, but
3549 ;; java-asm's build.xml fails unless we provide something here.
3550 "-Dbiz.aQute.bnd.path=dummy-path")
8f8ed9aa
RW
3551 #:phases
3552 (modify-phases %standard-phases
3553 (add-before 'install 'build-jars
3554 (lambda* (#:key make-flags #:allow-other-keys)
3555 ;; We cannot use the "jar" target because it depends on a couple
3556 ;; of unpackaged, complicated tools.
3557 (mkdir "dist")
3558 (zero? (system* "jar"
3559 "-cf" (string-append "dist/asm-" ,version ".jar")
3560 "-C" "output/build/tmp" "."))))
3561 (replace 'install
3562 (install-jars "dist")))))
3563 (native-inputs
3564 `(("java-junit" ,java-junit)))
3565 (home-page "http://asm.ow2.org/")
3566 (synopsis "Very small and fast Java bytecode manipulation framework")
3567 (description "ASM is an all purpose Java bytecode manipulation and
3568analysis framework. It can be used to modify existing classes or dynamically
3569generate classes, directly in binary form. The provided common
3570transformations and analysis algorithms allow to easily assemble custom
3571complex transformations and code analysis tools.")
3572 (license license:bsd-3)))
607fe24a 3573
bfb4004d
GB
3574(define java-asm-bootstrap
3575 (package
3576 (inherit java-asm)
3577 (name "java-asm-bootstrap")
3578 (arguments
3579 (substitute-keyword-arguments (package-arguments java-asm)
3580 ((#:tests? _) #f)))
3581 (native-inputs `())
3582 (propagated-inputs
3583 `(("java-aqute-bndlib" ,java-aqute-bndlib-bootstrap)
3584 ("java-aqute-libg" ,java-aqute-libg-bootstrap)
3585 ,@(delete `("java-aqute-bndlib" ,java-aqute-bndlib)
de99ba7e 3586 (delete `("java-aqute-libg" ,java-aqute-libg)
bfb4004d
GB
3587 (package-inputs java-asm)))))))
3588
607fe24a
RW
3589(define-public java-cglib
3590 (package
3591 (name "java-cglib")
3592 (version "3.2.4")
3593 (source (origin
3594 (method url-fetch)
3595 (uri (string-append
3596 "https://github.com/cglib/cglib/archive/RELEASE_"
3597 (string-map (lambda (c) (if (char=? c #\.) #\_ c)) version)
3598 ".tar.gz"))
3599 (file-name (string-append "cglib-" version ".tar.gz"))
3600 (sha256
3601 (base32
3602 "162dvd4fln76ai8prfharf66pn6r56p3sxx683j5vdyccrd5hi1q"))))
3603 (build-system ant-build-system)
3604 (arguments
3605 `(;; FIXME: tests fail because junit runs
3606 ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem
3607 ;; to describe a test at all.
3608 #:tests? #f
3609 #:jar-name "cglib.jar"
3610 #:phases
3611 (modify-phases %standard-phases
3612 (add-after 'unpack 'chdir
3613 (lambda _ (chdir "cglib") #t)))))
3614 (inputs
3615 `(("java-asm" ,java-asm)
3616 ("java-junit" ,java-junit)))
3617 (home-page "https://github.com/cglib/cglib/")
3618 (synopsis "Java byte code generation library")
3619 (description "The byte code generation library CGLIB is a high level API
3620to generate and transform Java byte code.")
3621 (license license:asl2.0)))
33e34bfe
RW
3622
3623(define-public java-objenesis
3624 (package
3625 (name "java-objenesis")
3626 (version "2.5.1")
3627 (source (origin
3628 (method url-fetch)
3629 (uri (string-append "https://github.com/easymock/objenesis/"
3630 "archive/" version ".tar.gz"))
3631 (file-name (string-append "objenesis-" version ".tar.gz"))
3632 (sha256
3633 (base32
3634 "1va5qz1i2wawwavhnxfzxnfgrcaflz9p1pg03irrjh4nd3rz8wh6"))))
3635 (build-system ant-build-system)
3636 (arguments
3637 `(#:jar-name "objenesis.jar"
3638 #:source-dir "main/src/"
3639 #:test-dir "main/src/test/"))
3640 (native-inputs
3641 `(("java-junit" ,java-junit)
3642 ("java-hamcrest-core" ,java-hamcrest-core)))
3643 (home-page "http://objenesis.org/")
3644 (synopsis "Bypass the constructor when creating an object")
3645 (description "Objenesis is a small Java library that serves one purpose:
3646to instantiate a new object of a particular class. It is common to see
3647restrictions in libraries stating that classes must require a default
3648constructor. Objenesis aims to overcome these restrictions by bypassing the
3649constructor on object instantiation.")
3650 (license license:asl2.0)))
ae589876
RW
3651
3652(define-public java-easymock
3653 (package
3654 (name "java-easymock")
3655 (version "3.4")
3656 (source (origin
3657 (method url-fetch)
3658 (uri (string-append "https://github.com/easymock/easymock/"
3659 "archive/easymock-" version ".tar.gz"))
3660 (sha256
3661 (base32
3662 "1yzg0kv256ndr57gpav46cyv4a1ns5sj722l50zpxk3j6sk9hnmi"))))
3663 (build-system ant-build-system)
3664 (arguments
3665 `(#:jar-name "easymock.jar"
3666 #:source-dir "core/src/main"
3667 #:test-dir "core/src/test"
3668 #:phases
3669 (modify-phases %standard-phases
3670 ;; FIXME: Android support requires the following packages to be
3671 ;; available: com.google.dexmaker.stock.ProxyBuilder
3672 (add-after 'unpack 'delete-android-support
3673 (lambda _
3674 (with-directory-excursion "core/src/main/java/org/easymock/internal"
3675 (substitute* "MocksControl.java"
3676 (("AndroidSupport.isAndroid\\(\\)") "false")
3677 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
3678 (delete-file "AndroidClassProxyFactory.java"))
3679 #t))
3680 (add-after 'unpack 'delete-broken-tests
3681 (lambda _
3682 (with-directory-excursion "core/src/test/java/org/easymock"
3683 ;; This test depends on dexmaker.
3684 (delete-file "tests2/ClassExtensionHelperTest.java")
3685
3686 ;; This is not a test.
3687 (delete-file "tests/BaseEasyMockRunnerTest.java")
3688
3689 ;; This test should be executed with a different runner...
3690 (delete-file "tests2/EasyMockAnnotationsTest.java")
3691 ;; ...but deleting it means that we also have to delete these
3692 ;; dependent files.
3693 (delete-file "tests2/EasyMockRunnerTest.java")
3694 (delete-file "tests2/EasyMockRuleTest.java")
3695
3696 ;; This test fails because the file "easymock.properties" does
3697 ;; not exist.
3698 (delete-file "tests2/EasyMockPropertiesTest.java"))
3699 #t)))))
3700 (inputs
3701 `(("java-asm" ,java-asm)
3702 ("java-cglib" ,java-cglib)
3703 ("java-objenesis" ,java-objenesis)))
3704 (native-inputs
3705 `(("java-junit" ,java-junit)
3706 ("java-hamcrest-core" ,java-hamcrest-core)))
3707 (home-page "http://easymock.org")
3708 (synopsis "Java library providing mock objects for unit tests")
3709 (description "EasyMock is a Java library that provides an easy way to use
3710mock objects in unit testing.")
3711 (license license:asl2.0)))
7aa37023 3712
f12ad6c7
RW
3713(define-public java-jmock-1
3714 (package
3715 (name "java-jmock")
3716 (version "1.2.0")
3717 (source (origin
3718 (method url-fetch)
3719 (uri (string-append "https://github.com/jmock-developers/"
3720 "jmock-library/archive/" version ".tar.gz"))
3721 (file-name (string-append "jmock-" version ".tar.gz"))
3722 (sha256
3723 (base32
3724 "0xmrlhq0fszldkbv281k9463mv496143vvmqwpxp62yzjvdkx9w0"))))
3725 (build-system ant-build-system)
3726 (arguments
3727 `(#:build-target "jars"
3728 #:test-target "run.tests"
3729 #:phases
3730 (modify-phases %standard-phases
3731 (replace 'install (install-jars "build")))))
3732 (home-page "http://www.jmock.org")
3733 (synopsis "Mock object library for test-driven development")
3734 (description "JMock is a library that supports test-driven development of
3735Java code with mock objects. Mock objects help you design and test the
3736interactions between the objects in your programs.
3737
3738The jMock library
3739
3740@itemize
3741@item makes it quick and easy to define mock objects
3742@item lets you precisely specify the interactions between
3743 your objects, reducing the brittleness of your tests
3744@item plugs into your favourite test framework
3745@item is easy to extend.
3746@end itemize\n")
3747 (license license:bsd-3)))
3748
045124ae
JL
3749(define-public java-jmock
3750 (package
3751 (inherit java-jmock-1)
3752 (name "java-jmock")
3753 (version "2.8.2")
3754 (source (origin
3755 (method url-fetch)
3756 (uri (string-append "https://github.com/jmock-developers/"
3757 "jmock-library/archive/" version ".tar.gz"))
3758 (file-name (string-append name "-" version ".tar.gz"))
3759 (sha256
3760 (base32
3761 "18650a9g8xffcsdb6w91pbswa7f40fp2sh6s3nclkclz5dbzq8f0"))))
3762 (inputs
3763 `(("java-hamcrest-all" ,java-hamcrest-all)
3764 ("java-asm" ,java-asm)
3765 ("java-bsh" ,java-bsh)
3766 ("java-junit" ,java-junit)))
3767 (native-inputs
3768 `(("cglib" ,java-cglib)))
3769 (arguments
3770 `(#:jar-name "java-jmock.jar"
3771 #:source-dir "jmock/src/main/java"
3772 #:test-dir "jmock/src/test"))))
3773
25436c6d
JL
3774(define-public java-jmock-junit4
3775 (package
3776 (inherit java-jmock)
3777 (name "java-jmock-junit4")
3778 (arguments
3779 `(#:jar-name "java-jmock-junit4.jar"
3780 #:source-dir "jmock-junit4/src/main/java"
3781 #:test-dir "jmock-junit4/src/test"))
3782 (inputs
3783 `(("java-hamcrest-all" ,java-hamcrest-all)
3784 ("java-asm" ,java-asm)
3785 ("java-bsh" ,java-bsh)
3786 ("java-jmock" ,java-jmock)
3787 ("java-jumit" ,java-junit)))))
3788
e84b899d
JL
3789(define-public java-jmock-legacy
3790 (package
3791 (inherit java-jmock)
3792 (name "java-jmock-legacy")
3793 (arguments
3794 `(#:jar-name "java-jmock-legacy.jar"
3795 #:source-dir "jmock-legacy/src/main/java"
3796 #:test-dir "jmock-legacy/src/test"
3797 #:phases
3798 (modify-phases %standard-phases
3799 (add-before 'check 'copy-tests
3800 (lambda _
3801 ;; This file is a dependancy of some tests
3802 (let ((file "org/jmock/test/acceptance/PackageProtectedType.java"))
3803 (copy-file (string-append "jmock/src/test/java/" file)
3804 (string-append "jmock-legacy/src/test/java/" file))
3805 #t))))))
3806 (inputs
3807 `(("java-hamcrest-all" ,java-hamcrest-all)
3808 ("java-objenesis" ,java-objenesis)
3809 ("java-cglib" ,java-cglib)
3810 ("java-jmock" ,java-jmock)
3811 ("java-asm" ,java-asm)
3812 ("java-bsh" ,java-bsh)
3813 ("java-junit" ,java-junit)))
3814 (native-inputs
3815 `(("java-jmock-junit4" ,java-jmock-junit4)))))
3816
439c59da
RW
3817(define-public java-hamcrest-all
3818 (package (inherit java-hamcrest-core)
3819 (name "java-hamcrest-all")
3820 (arguments
bfc007e1
RW
3821 `(#:jdk ,icedtea-8
3822 ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core)
3823 ((#:build-target _) "bigjar")
3824 ((#:phases phases)
3825 `(modify-phases ,phases
3826 ;; Some build targets override the classpath, so we need to patch
3827 ;; the build.xml to ensure that required dependencies are on the
3828 ;; classpath.
3829 (add-after 'unpack 'patch-classpath-for-integration
3830 (lambda* (#:key inputs #:allow-other-keys)
3831 (substitute* "build.xml"
3832 ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
3833 (string-join
3834 (cons line
3835 (append
3836 (find-files (assoc-ref inputs "java-junit") "\\.jar$")
3837 (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
3838 (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
3839 ";")))
3840 #t)))))))
439c59da
RW
3841 (inputs
3842 `(("java-junit" ,java-junit)
3843 ("java-jmock" ,java-jmock-1)
3844 ("java-easymock" ,java-easymock)
439c59da
RW
3845 ,@(package-inputs java-hamcrest-core)))))
3846
7aa37023
RW
3847(define-public java-jopt-simple
3848 (package
3849 (name "java-jopt-simple")
3850 (version "5.0.3")
3851 (source (origin
3852 (method url-fetch)
3853 (uri (string-append "http://repo1.maven.org/maven2/"
3854 "net/sf/jopt-simple/jopt-simple/"
3855 version "/jopt-simple-"
3856 version "-sources.jar"))
3857 (sha256
3858 (base32
3859 "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa"))))
3860 (build-system ant-build-system)
3861 (arguments
3862 `(#:tests? #f ; there are no tests
3863 #:jar-name "jopt-simple.jar"))
3864 (home-page "https://pholser.github.io/jopt-simple/")
3865 (synopsis "Java library for parsing command line options")
3866 (description "JOpt Simple is a Java library for parsing command line
3867options, such as those you might pass to an invocation of @code{javac}. In
3868the interest of striving for simplicity, as closely as possible JOpt Simple
3869attempts to honor the command line option syntaxes of POSIX @code{getopt} and
3870GNU @code{getopt_long}. It also aims to make option parser configuration and
3871retrieval of options and their arguments simple and expressive, without being
3872overly clever.")
3873 (license license:expat)))
840969e8
RW
3874
3875(define-public java-commons-math3
3876 (package
3877 (name "java-commons-math3")
3878 (version "3.6.1")
3879 (source (origin
3880 (method url-fetch)
3881 (uri (string-append "mirror://apache/commons/math/source/"
3882 "commons-math3-" version "-src.tar.gz"))
3883 (sha256
3884 (base32
3885 "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6"))))
3886 (build-system ant-build-system)
3887 (arguments
3888 `(#:build-target "jar"
3889 #:test-target "test"
3890 #:make-flags
3891 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
3892 (junit (assoc-ref %build-inputs "java-junit")))
3893 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
3894 (string-append "-Dhamcrest.jar=" hamcrest
3895 "/share/java/hamcrest-core.jar")))
3896 #:phases
3897 (modify-phases %standard-phases
3898 ;; We want to build the jar in the build phase and run the tests
3899 ;; later in a separate phase.
3900 (add-after 'unpack 'untangle-targets
3901 (lambda _
3902 (substitute* "build.xml"
3903 (("name=\"jar\" depends=\"test\"")
3904 "name=\"jar\" depends=\"compile\""))
3905 #t))
3906 ;; There is no install target.
3907 (replace 'install
3908 (install-jars "target")))))
3909 (native-inputs
3910 `(("java-junit" ,java-junit)
3911 ("java-hamcrest-core" ,java-hamcrest-core)))
3912 (home-page "http://commons.apache.org/math/")
3913 (synopsis "Apache Commons mathematics library")
3914 (description "Commons Math is a library of lightweight, self-contained
3915mathematics and statistics components addressing the most common problems not
3916available in the Java programming language or Commons Lang.")
3917 (license license:asl2.0)))
62c9bfaa
RW
3918
3919(define-public java-jmh
3920 (package
3921 (name "java-jmh")
3922 (version "1.17.5")
3923 (source (origin
3924 (method hg-fetch)
3925 (uri (hg-reference
3926 (url "http://hg.openjdk.java.net/code-tools/jmh/")
3927 (changeset version)))
3928 (file-name (string-append name "-" version "-checkout"))
3929 (sha256
3930 (base32
3931 "1fxyxhg9famwcg1prc4cgwb5wzyxqavn3cjm5vz8605xz7x5k084"))))
3932 (build-system ant-build-system)
3933 (arguments
3934 `(#:jar-name "jmh-core.jar"
3935 #:source-dir "jmh-core/src/main"
3936 #:test-dir "jmh-core/src/test"
3937 #:phases
3938 (modify-phases %standard-phases
3939 ;; This seems to be a bug in the JDK. It may not be necessary in
3940 ;; future versions of the JDK.
3941 (add-after 'unpack 'fix-bug
3942 (lambda _
3943 (with-directory-excursion
3944 "jmh-core/src/main/java/org/openjdk/jmh/runner/options"
3945 (substitute* '("IntegerValueConverter.java"
3946 "ThreadsValueConverter.java")
3947 (("public Class<Integer> valueType")
3948 "public Class<? extends Integer> valueType")))
3949 #t)))))
3950 (inputs
3951 `(("java-jopt-simple" ,java-jopt-simple)
3952 ("java-commons-math3" ,java-commons-math3)))
3953 (native-inputs
3954 `(("java-junit" ,java-junit)
3955 ("java-hamcrest-core" ,java-hamcrest-core)))
3956 (home-page "http://openjdk.java.net/projects/code-tools/jmh/")
3957 (synopsis "Benchmark harness for the JVM")
3958 (description "JMH is a Java harness for building, running, and analysing
3959nano/micro/milli/macro benchmarks written in Java and other languages
f4548394 3960targeting the JVM.")
62c9bfaa
RW
3961 ;; GPLv2 only
3962 (license license:gpl2)))
56ebb4e9
RW
3963
3964(define-public java-commons-collections4
3965 (package
3966 (name "java-commons-collections4")
3967 (version "4.1")
3968 (source (origin
3969 (method url-fetch)
3970 (uri (string-append "mirror://apache/commons/collections/source/"
3971 "commons-collections4-" version "-src.tar.gz"))
3972 (sha256
3973 (base32
3974 "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl"))))
3975 (build-system ant-build-system)
3976 (arguments
3977 `(#:test-target "test"
3978 #:make-flags
3979 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
3980 (junit (assoc-ref %build-inputs "java-junit"))
3981 (easymock (assoc-ref %build-inputs "java-easymock")))
3982 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
3983 (string-append "-Dhamcrest.jar=" hamcrest
3984 "/share/java/hamcrest-core.jar")
3985 (string-append "-Deasymock.jar=" easymock
3986 "/share/java/easymock.jar")))
3987 #:phases
3988 (modify-phases %standard-phases
3989 (replace 'install
3990 (install-jars "target")))))
3991 (native-inputs
3992 `(("java-junit" ,java-junit)
3993 ("java-hamcrest-core" ,java-hamcrest-core)
3994 ("java-easymock" ,java-easymock)))
3995 (home-page "http://commons.apache.org/collections/")
3996 (synopsis "Collections framework")
3997 (description "The Java Collections Framework is the recognised standard
3998for collection handling in Java. Commons-Collections seek to build upon the
3999JDK classes by providing new interfaces, implementations and utilities. There
4000are many features, including:
4001
4002@itemize
4003@item @code{Bag} interface for collections that have a number of copies of
4004 each object
4005@item @code{BidiMap} interface for maps that can be looked up from value to
4006 key as well and key to value
4007@item @code{MapIterator} interface to provide simple and quick iteration over
4008 maps
4009@item Transforming decorators that alter each object as it is added to the
4010 collection
4011@item Composite collections that make multiple collections look like one
4012@item Ordered maps and sets that retain the order elements are added in,
4013 including an LRU based map
4014@item Reference map that allows keys and/or values to be garbage collected
4015 under close control
4016@item Many comparator implementations
4017@item Many iterator implementations
4018@item Adapter classes from array and enumerations to collections
4019@item Utilities to test or create typical set-theory properties of collections
4020 such as union, intersection, and closure.
4021@end itemize\n")
4022 (license license:asl2.0)))
6af63e65 4023
229a9864
JL
4024(define-public java-commons-collections
4025 (package
4026 (inherit java-commons-collections4)
4027 (name "java-commons-collections")
4028 (version "3.2.2")
4029 (source (origin
4030 (method url-fetch)
4031 (uri (string-append "mirror://apache/commons/collections/source/"
4032 "commons-collections-" version "-src.tar.gz"))
4033 (sha256
4034 (base32
7c7323e4
GB
4035 "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387"))
4036 (patches
4037 (search-patches "java-commons-collections-fix-java8.patch"))))
229a9864
JL
4038 (arguments
4039 (substitute-keyword-arguments (package-arguments java-commons-collections4)
4040 ((#:phases phases)
4041 `(modify-phases ,phases
4042 ;; The manifest is required by the build procedure
4043 (add-before 'build 'add-manifest
4044 (lambda _
4045 (mkdir-p "build/conf")
4046 (call-with-output-file "build/conf/MANIFEST.MF"
4047 (lambda (file)
4048 (format file "Manifest-Version: 1.0\n")))))
4049 (replace 'install
4050 (install-jars "build"))))))))
4051
5aa2f3f4
JL
4052(define java-commons-collections-test-classes
4053 (package
4054 (inherit java-commons-collections)
4055 (arguments
4056 `(#:jar-name "commons-collections-test-classes.jar"
4057 #:source-dir "src/test"
4058 #:tests? #f))
4059 (inputs
4060 `(("collection" ,java-commons-collections)))))
4061
4062(define-public java-commons-beanutils
4063 (package
4064 (name "java-commons-beanutils")
4065 (version "1.9.3")
4066 (source (origin
4067 (method url-fetch)
4068 (uri (string-append "mirror://apache/commons/beanutils/source/"
4069 "commons-beanutils-" version "-src.tar.gz"))
4070 (sha256
4071 (base32
4072 "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk"))))
4073 (build-system ant-build-system)
4074 (arguments
4075 `(#:test-target "test"
4076 #:tests? #f
4077 #:phases
4078 (modify-phases %standard-phases
4079 (replace 'install
4080 (lambda* (#:key outputs #:allow-other-keys)
4081 (rename-file (string-append "dist/commons-beanutils-" ,version
4082 "-SNAPSHOT.jar")
4083 "commons-beanutils.jar")
4084 (install-file "commons-beanutils.jar"
4085 (string-append (assoc-ref outputs "out") "/share/java/"))
4086 #t)))))
4087 (inputs
4088 `(("logging" ,java-commons-logging-minimal)
4089 ("collections" ,java-commons-collections)))
4090 (native-inputs
4091 `(("junit" ,java-junit)
4092 ("collections-test" ,java-commons-collections-test-classes)))
4093 (home-page "http://commons.apache.org/beanutils/")
4094 (synopsis "Dynamically set or get properties in Java")
4095 (description "BeanUtils provides a simplified interface to reflection and
4096introspection to set or get dynamically determined properties through their
4097setter and getter method.")
4098 (license license:asl2.0)))
4099
6af63e65
HG
4100(define-public java-commons-io
4101 (package
4102 (name "java-commons-io")
4103 (version "2.5")
4104 (source
4105 (origin
4106 (method url-fetch)
4107 (uri (string-append "mirror://apache/commons/io/source/"
4108 "commons-io-" version "-src.tar.gz"))
4109 (sha256
4110 (base32
4111 "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3"))))
4112 (build-system ant-build-system)
4113 (outputs '("out" "doc"))
4114 (arguments
4115 `(#:test-target "test"
4116 #:make-flags
4117 (list (string-append "-Djunit.jar="
4118 (assoc-ref %build-inputs "java-junit")
4119 "/share/java/junit.jar"))
4120 #:phases
4121 (modify-phases %standard-phases
4122 (add-after 'build 'build-javadoc ant-build-javadoc)
4123 (replace 'install (install-jars "target"))
4124 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4125 (native-inputs
4126 `(("java-junit" ,java-junit)
4127 ("java-hamcrest-core" ,java-hamcrest-core)))
4128 (home-page "http://commons.apache.org/io/")
4129 (synopsis "Common useful IO related classes")
4130 (description "Commons-IO contains utility classes, stream implementations,
4131file filters and endian classes.")
4132 (license license:asl2.0)))
d631b5f3
HG
4133
4134(define-public java-commons-lang
4135 (package
4136 (name "java-commons-lang")
4137 (version "2.6")
4138 (source
4139 (origin
4140 (method url-fetch)
4141 (uri (string-append "mirror://apache/commons/lang/source/"
4142 "commons-lang-" version "-src.tar.gz"))
4143 (sha256
4144 (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5"))))
4145 (build-system ant-build-system)
4146 (outputs '("out" "doc"))
4147 (arguments
4148 `(#:test-target "test"
e5a96113 4149 #:test-exclude (list "**/Abstract*.java" "**/Random*.java")
d631b5f3
HG
4150 #:phases
4151 (modify-phases %standard-phases
4152 (add-after 'build 'build-javadoc ant-build-javadoc)
4153 (add-before 'check 'disable-failing-test
4154 (lambda _
4155 ;; Disable a failing test
4156 (substitute* "src/test/java/org/apache/commons/lang/\
4157time/FastDateFormatTest.java"
4158 (("public void testFormat\\(\\)")
4159 "public void disabled_testFormat()"))
4160 #t))
4161 (replace 'install (install-jars "target"))
4162 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4163 (native-inputs
4164 `(("java-junit" ,java-junit)))
4165 (home-page "http://commons.apache.org/lang/")
4166 (synopsis "Extension of the java.lang package")
4167 (description "The Commons Lang components contains a set of Java classes
4168that provide helper methods for standard Java classes, especially those found
4169in the @code{java.lang} package in the Sun JDK. The following classes are
4170included:
4171
4172@itemize
4173@item StringUtils - Helper for @code{java.lang.String}.
4174@item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets
4175 of characters such as @code{[a-z]} and @code{[abcdez]}.
4176@item RandomStringUtils - Helper for creating randomised strings.
4177@item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
4178@item NumberRange - A range of numbers with an upper and lower bound.
4179@item ObjectUtils - Helper for @code{java.lang.Object}.
4180@item SerializationUtils - Helper for serializing objects.
4181@item SystemUtils - Utility class defining the Java system properties.
4182@item NestedException package - A sub-package for the creation of nested
4183 exceptions.
4184@item Enum package - A sub-package for the creation of enumerated types.
4185@item Builder package - A sub-package for the creation of @code{equals},
4186 @code{hashCode}, @code{compareTo} and @code{toString} methods.
4187@end itemize\n")
4188 (license license:asl2.0)))
82e18864
HG
4189
4190(define-public java-commons-lang3
4191 (package
4192 (name "java-commons-lang3")
4193 (version "3.4")
4194 (source
4195 (origin
4196 (method url-fetch)
4197 (uri (string-append "mirror://apache/commons/lang/source/"
4198 "commons-lang3-" version "-src.tar.gz"))
4199 (sha256
4200 (base32 "0xpshb9spjhplq5a7mr0y1bgfw8190ik4xj8f569xidfcki1d6kg"))))
4201 (build-system ant-build-system)
4202 (outputs '("out" "doc"))
4203 (arguments
4204 `(#:test-target "test"
4205 #:make-flags
4206 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-all"))
4207 (junit (assoc-ref %build-inputs "java-junit"))
4208 (easymock (assoc-ref %build-inputs "java-easymock"))
4209 (io (assoc-ref %build-inputs "java-commons-io")))
4210 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4211 (string-append "-Dhamcrest.jar=" hamcrest
4212 "/share/java/hamcrest-all.jar")
4213 (string-append "-Dcommons-io.jar=" io
4214 "/share/java/commons-io-"
4215 ,(package-version java-commons-io)
4216 "-SNAPSHOT.jar")
4217 (string-append "-Deasymock.jar=" easymock
4218 "/share/java/easymock.jar")))
4219 #:phases
4220 (modify-phases %standard-phases
4221 (add-after 'build 'build-javadoc ant-build-javadoc)
4222 (replace 'install (install-jars "target"))
4223 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4224 (native-inputs
4225 `(("java-junit" ,java-junit)
4226 ("java-commons-io" ,java-commons-io)
4227 ("java-hamcrest-all" ,java-hamcrest-all)
4228 ("java-easymock" ,java-easymock)))
4229 (home-page "http://commons.apache.org/lang/")
4230 (synopsis "Extension of the java.lang package")
4231 (description "The Commons Lang components contains a set of Java classes
4232that provide helper methods for standard Java classes, especially those found
4233in the @code{java.lang} package. The following classes are included:
4234
4235@itemize
4236@item StringUtils - Helper for @code{java.lang.String}.
4237@item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of
4238 characters such as @code{[a-z]} and @code{[abcdez]}.
4239@item RandomStringUtils - Helper for creating randomised strings.
4240@item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
4241@item NumberRange - A range of numbers with an upper and lower bound.
4242@item ObjectUtils - Helper for @code{java.lang.Object}.
4243@item SerializationUtils - Helper for serializing objects.
4244@item SystemUtils - Utility class defining the Java system properties.
4245@item NestedException package - A sub-package for the creation of nested
4246 exceptions.
4247@item Enum package - A sub-package for the creation of enumerated types.
4248@item Builder package - A sub-package for the creation of @code{equals},
4249 @code{hashCode}, @code{compareTo} and @code{toString} methods.
4250@end itemize\n")
4251 (license license:asl2.0)))
1c188f4e 4252
afb13a10
JL
4253(define-public java-commons-bsf
4254 (package
4255 (name "java-commons-bsf")
4256 (version "2.4.0")
4257 (source (origin
4258 (method url-fetch)
4259 (uri (string-append "mirror://apache/commons/bsf/source/bsf-src-"
4260 version ".tar.gz"))
4261 (sha256
4262 (base32
4263 "1sbamr8jl32p1jgf59nw0b2w9qivyg145954hm6ly54cfgsqrdas"))
4264 (modules '((guix build utils)))
4265 (snippet
4266 '(begin
4267 (for-each delete-file
4268 (find-files "." "\\.jar$"))
4269 #t))))
4270 (build-system ant-build-system)
4271 (arguments
4272 `(#:build-target "jar"
4273 #:tests? #f; No test file
4274 #:modules ((guix build ant-build-system)
4275 (guix build utils)
4276 (guix build java-utils)
4277 (sxml simple))
4278 #:phases
4279 (modify-phases %standard-phases
4280 (add-before 'build 'create-properties
4281 (lambda _
4282 ;; This file is missing from the distribution
4283 (call-with-output-file "build-properties.xml"
4284 (lambda (port)
4285 (sxml->xml
4286 `(project (@ (basedir ".") (name "build-properties") (default ""))
4287 (property (@ (name "project.name") (value "bsf")))
4288 (property (@ (name "source.level") (value "1.5")))
4289 (property (@ (name "build.lib") (value "build/jar")))
4290 (property (@ (name "src.dir") (value "src")))
4291 (property (@ (name "tests.dir") (value "src/org/apache/bsf/test")))
4292 (property (@ (name "build.tests") (value "build/test-classes")))
4293 (property (@ (name "build.dest") (value "build/classes"))))
4294 port)))))
4295 (replace 'install (install-jars "build")))))
4296 (native-inputs
4297 `(("java-junit" ,java-junit)))
4298 (inputs
4299 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
4300 (home-page "https://commons.apache.org/proper/commons-bsf")
4301 (synopsis "Bean Scripting Framework")
4302 (description "The Bean Scripting Framework (BSF) is a set of Java classes
4303which provides scripting language support within Java applications, and access
4304to Java objects and methods from scripting languages. BSF allows one to write
4305JSPs in languages other than Java while providing access to the Java class
4306library. In addition, BSF permits any Java application to be implemented in
4307part (or dynamically extended) by a language that is embedded within it. This
4308is achieved by providing an API that permits calling scripting language engines
4309from within Java, as well as an object registry that exposes Java objects to
4310these scripting language engines.")
4311 (license license:asl2.0)))
4312
66006fe5
JL
4313(define-public java-commons-jxpath
4314 (package
4315 (name "java-commons-jxpath")
4316 (version "1.3")
4317 (source (origin
4318 (method url-fetch)
4319 (uri (string-append "mirror://apache/commons/jxpath/source/"
4320 "commons-jxpath-" version "-src.tar.gz"))
4321 (sha256
4322 (base32
4323 "1rpgg31ayn9fwr4bfi2i1ij0npcg79ad2fv0w9hacvawsyc42cfs"))))
4324 (build-system ant-build-system)
4325 (arguments
4326 `(#:jar-name "commons-jxpath.jar"
4327 ;; tests require more dependencies, including mockrunner which depends on old software
4328 #:tests? #f
4329 #:source-dir "src/java"))
4330 (inputs
4331 `(("java-tomcat" ,java-tomcat)
4332 ("java-jdom" ,java-jdom)
4333 ("java-commons-beanutils" ,java-commons-beanutils)))
4334 (native-inputs
4335 `(("java-junit" ,java-junit)))
4336 (home-page "http://commons.apache.org/jxpath/")
4337 (synopsis "Simple interpreter of an expression language called XPath.")
4338 (description "The org.apache.commons.jxpath package defines a simple
4339interpreter of an expression language called XPath. JXPath applies XPath
4340expressions to graphs of objects of all kinds: JavaBeans, Maps, Servlet
4341contexts, DOM etc, including mixtures thereof.")
4342 (license license:asl2.0)))
4343
a1a5ef20
JL
4344(define-public java-jsr250
4345 (package
4346 (name "java-jsr250")
4347 (version "1.3")
4348 (source (origin
4349 (method url-fetch)
4350 (uri (string-append "https://repo1.maven.org/maven2/"
4351 "javax/annotation/javax.annotation-api/"
4352 version "/javax.annotation-api-"
4353 version "-sources.jar"))
4354 (sha256
4355 (base32
4356 "08clh8n4n9wfglf75qsqfjs6yf79f7x6hqx38cn856pksszv50kz"))))
4357 (build-system ant-build-system)
4358 (arguments
4359 `(#:tests? #f ; no tests included
4360 #:jdk ,icedtea-8
4361 #:jar-name "jsr250.jar"))
4362 (home-page "https://jcp.org/en/jsr/detail?id=250")
4363 (synopsis "Security-related annotations")
4364 (description "This package provides annotations for security. It provides
4365packages in the @code{javax.annotation} and @code{javax.annotation.security}
4366namespaces.")
4367 ;; either cddl or gpl2 only, with classpath exception
4368 (license (list license:cddl1.0
4369 license:gpl2))))
4370
0d4a0d60
RW
4371(define-public java-jsr305
4372 (package
4373 (name "java-jsr305")
4374 (version "3.0.1")
4375 (source (origin
4376 (method url-fetch)
4377 (uri (string-append "https://repo1.maven.org/maven2/"
4378 "com/google/code/findbugs/"
4379 "jsr305/" version "/jsr305-"
4380 version "-sources.jar"))
4381 (sha256
4382 (base32
4383 "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n"))))
4384 (build-system ant-build-system)
4385 (arguments
4386 `(#:tests? #f ; no tests included
4387 #:jar-name "jsr305.jar"))
4388 (home-page "http://findbugs.sourceforge.net/")
4389 (synopsis "Annotations for the static analyzer called findbugs")
4390 (description "This package provides annotations for the findbugs package.
4391It provides packages in the @code{javax.annotations} namespace.")
4392 (license license:asl2.0)))
4393
4f3e47ea
RW
4394(define-public java-guava
4395 (package
4396 (name "java-guava")
4397 ;; This is the last release of Guava that can be built with Java 7.
4398 (version "20.0")
4399 (source (origin
4400 (method url-fetch)
4401 (uri (string-append "https://github.com/google/guava/"
4402 "releases/download/v" version
4403 "/guava-" version "-sources.jar"))
4404 (sha256
4405 (base32
4406 "1gawrs5gi6j5hcfxdgpnfli75vb9pfi4sn09pnc8xacr669yajwr"))))
4407 (build-system ant-build-system)
4408 (arguments
4409 `(#:tests? #f ; no tests included
4410 #:jar-name "guava.jar"
4411 #:phases
4412 (modify-phases %standard-phases
4413 (add-after 'unpack 'trim-sources
4414 (lambda _
4415 (with-directory-excursion "src/com/google/common"
4416 ;; Remove annotations to avoid extra dependencies:
4417 ;; * "j2objc" annotations are used when converting Java to
4418 ;; Objective C;
4419 ;; * "errorprone" annotations catch common Java mistakes at
4420 ;; compile time;
4421 ;; * "IgnoreJRERequirement" is used for Android.
4422 (substitute* (find-files "." "\\.java$")
4423 (("import com.google.j2objc.*") "")
4424 (("import com.google.errorprone.annotation.*") "")
4425 (("import org.codehaus.mojo.animal_sniffer.*") "")
4426 (("@CanIgnoreReturnValue") "")
4427 (("@LazyInit") "")
4428 (("@WeakOuter") "")
4429 (("@RetainedWith") "")
4430 (("@Weak") "")
4431 (("@ForOverride") "")
4432 (("@J2ObjCIncompatible") "")
4433 (("@IgnoreJRERequirement") "")))
4434 #t)))))
4435 (inputs
4436 `(("java-jsr305" ,java-jsr305)))
4437 (home-page "https://github.com/google/guava")
4438 (synopsis "Google core libraries for Java")
4439 (description "Guava is a set of core libraries that includes new
4440collection types (such as multimap and multiset), immutable collections, a
4441graph library, functional types, an in-memory cache, and APIs/utilities for
4442concurrency, I/O, hashing, primitives, reflection, string processing, and much
4443more!")
4444 (license license:asl2.0)))
4445
af8f8281
RW
4446;; The java-commons-logging package provides adapters to many different
4447;; logging frameworks. To avoid an excessive dependency graph we try to build
4448;; it with only a minimal set of adapters.
4449(define-public java-commons-logging-minimal
4450 (package
4451 (name "java-commons-logging-minimal")
4452 (version "1.2")
4453 (source (origin
4454 (method url-fetch)
4455 (uri (string-append "mirror://apache/commons/logging/source/"
4456 "commons-logging-" version "-src.tar.gz"))
4457 (sha256
4458 (base32
4459 "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9"))))
4460 (build-system ant-build-system)
4461 (arguments
4462 `(#:tests? #f ; avoid dependency on logging frameworks
4463 #:jar-name "commons-logging-minimal.jar"
4464 #:phases
4465 (modify-phases %standard-phases
4466 (add-after 'unpack 'delete-adapters-and-tests
4467 (lambda _
4468 ;; Delete all adapters except for NoOpLog, SimpleLog, and
4469 ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl
4470 ;; is used by applications; SimpleLog is the only actually usable
4471 ;; implementation that does not depend on another logging
4472 ;; framework.
4473 (for-each
4474 (lambda (file)
4475 (delete-file (string-append
4476 "src/main/java/org/apache/commons/logging/impl/" file)))
4477 (list "Jdk13LumberjackLogger.java"
4478 "WeakHashtable.java"
4479 "Log4JLogger.java"
4480 "ServletContextCleaner.java"
4481 "Jdk14Logger.java"
4482 "AvalonLogger.java"
4483 "LogKitLogger.java"))
4484 (delete-file-recursively "src/test")
4485 #t)))))
4486 (home-page "http://commons.apache.org/logging/")
4487 (synopsis "Common API for logging implementations")
4488 (description "The Logging package is a thin bridge between different
4489logging implementations. A library that uses the commons-logging API can be
4490used with any logging implementation at runtime.")
4491 (license license:asl2.0)))
4492
90e65abe
RW
4493;; This is the last release of the 1.x series.
4494(define-public java-mockito-1
4495 (package
4496 (name "java-mockito")
4497 (version "1.10.19")
4498 (source (origin
4499 (method url-fetch)
4500 (uri (string-append "http://repo1.maven.org/maven2/"
4501 "org/mockito/mockito-core/" version
4502 "/mockito-core-" version "-sources.jar"))
4503 (sha256
4504 (base32
4505 "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc"))))
4506 (build-system ant-build-system)
4507 (arguments
4508 `(#:jar-name "mockito.jar"
4509 #:tests? #f ; no tests included
4510 ;; FIXME: patch-and-repack does not support jars, so we have to apply
4511 ;; patches in build phases.
4512 #:phases
4513 (modify-phases %standard-phases
4514 ;; Mockito was developed against a different version of hamcrest,
4515 ;; which does not require matcher implementations to provide an
4516 ;; implementation of the "describeMismatch" method. We add this
4517 ;; simple definition to pass the build with our version of hamcrest.
4518 (add-after 'unpack 'fix-hamcrest-build-error
4519 (lambda _
4520 (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java"
4521 (("public Matcher getActualMatcher\\(\\) .*" line)
4522 (string-append "
4523 public void describeMismatch(Object item, Description description) {
4524 actualMatcher.describeMismatch(item, description);
4525 }"
4526 line)))
4527 #t))
4528 ;; Mockito bundles cglib. We have a cglib package, so let's use
4529 ;; that instead.
4530 (add-after 'unpack 'use-system-libraries
4531 (lambda _
4532 (with-directory-excursion "src/org/mockito/internal/creation/cglib"
4533 (substitute* '("CGLIBHacker.java"
4534 "CglibMockMaker.java"
4535 "ClassImposterizer.java"
4536 "DelegatingMockitoMethodProxy.java"
4537 "MethodInterceptorFilter.java"
4538 "MockitoNamingPolicy.java"
4539 "SerializableMockitoMethodProxy.java"
4540 "SerializableNoOp.java")
4541 (("import org.mockito.cglib") "import net.sf.cglib")))
4542 #t)))))
4543 (inputs
4544 `(("java-junit" ,java-junit)
4545 ("java-objenesis" ,java-objenesis)
4546 ("java-cglib" ,java-cglib)
4547 ("java-hamcrest-core" ,java-hamcrest-core)))
4548 (home-page "http://mockito.org")
4549 (synopsis "Mockito is a mock library for Java")
4550 (description "Mockito is a mocking library for Java which lets you write
4551tests with a clean and simple API. It generates mocks using reflection, and
4552it records all mock invocations, including methods arguments.")
4553 (license license:asl2.0)))
4554
4f4d2e47
RW
4555(define-public java-httpcomponents-httpcore
4556 (package
4557 (name "java-httpcomponents-httpcore")
4558 (version "4.4.6")
4559 (source (origin
4560 (method url-fetch)
4561 (uri (string-append "mirror://apache//httpcomponents/httpcore/"
4562 "source/httpcomponents-core-"
4563 version "-src.tar.gz"))
4564 (sha256
4565 (base32
4566 "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy"))))
4567 (build-system ant-build-system)
4568 (arguments
4569 `(#:jar-name "httpcomponents-httpcore.jar"
4570 #:phases
4571 (modify-phases %standard-phases
4572 (add-after 'unpack 'chdir
4573 (lambda _ (chdir "httpcore") #t)))))
4574 (inputs
4575 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
4576 ("java-commons-lang3" ,java-commons-lang3)))
4577 (native-inputs
4578 `(("java-junit" ,java-junit)
4579 ("java-mockito" ,java-mockito-1)))
4580 (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html")
4581 (synopsis "Low level HTTP transport components")
4582 (description "HttpCore is a set of low level HTTP transport components
4583that can be used to build custom client and server side HTTP services with a
4584minimal footprint. HttpCore supports two I/O models: blocking I/O model based
4585on the classic Java I/O and non-blocking, event driven I/O model based on Java
4586NIO.
4587
4588This package provides the blocking I/O model library.")
4589 (license license:asl2.0)))
4590
3a068b43
RW
4591(define-public java-httpcomponents-httpcore-nio
4592 (package (inherit java-httpcomponents-httpcore)
4593 (name "java-httpcomponents-httpcore-nio")
4594 (arguments
4595 `(#:jar-name "httpcomponents-httpcore-nio.jar"
4596 #:phases
4597 (modify-phases %standard-phases
4598 (add-after 'unpack 'chdir
4599 (lambda _ (chdir "httpcore-nio") #t)))))
4600 (inputs
4601 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
4602 ("java-hamcrest-core" ,java-hamcrest-core)
4603 ,@(package-inputs java-httpcomponents-httpcore)))
4604 (description "HttpCore is a set of low level HTTP transport components
4605that can be used to build custom client and server side HTTP services with a
4606minimal footprint. HttpCore supports two I/O models: blocking I/O model based
4607on the classic Java I/O and non-blocking, event driven I/O model based on Java
4608NIO.
4609
4610This package provides the non-blocking I/O model library based on Java
4611NIO.")))
4612
e1dd78f6
RW
4613(define-public java-httpcomponents-httpcore-ab
4614 (package (inherit java-httpcomponents-httpcore)
4615 (name "java-httpcomponents-httpcore-ab")
4616 (arguments
4617 `(#:jar-name "httpcomponents-httpcore-ab.jar"
4618 #:phases
4619 (modify-phases %standard-phases
4620 (add-after 'unpack 'chdir
4621 (lambda _ (chdir "httpcore-ab") #t)))))
4622 (inputs
4623 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
4624 ("java-commons-cli" ,java-commons-cli)
4625 ("java-hamcrest-core" ,java-hamcrest-core)
4626 ,@(package-inputs java-httpcomponents-httpcore)))
4627 (synopsis "Apache HttpCore benchmarking tool")
4628 (description "This package provides the HttpCore benchmarking tool. It is
4629an Apache AB clone based on HttpCore.")))
4630
14a671d8
RW
4631(define-public java-httpcomponents-httpclient
4632 (package
4633 (name "java-httpcomponents-httpclient")
4634 (version "4.5.3")
4635 (source (origin
4636 (method url-fetch)
4637 (uri (string-append "mirror://apache/httpcomponents/httpclient/"
4638 "source/httpcomponents-client-"
4639 version "-src.tar.gz"))
4640 (sha256
4641 (base32
4642 "1428399s7qy3cim5wc6f3ks4gl9nf9vkjpfmnlap3jflif7g2pj1"))))
4643 (build-system ant-build-system)
4644 (arguments
4645 `(#:jar-name "httpcomponents-httpclient.jar"
4646 #:phases
4647 (modify-phases %standard-phases
4648 (add-after 'unpack 'chdir
4649 (lambda _ (chdir "httpclient") #t)))))
4650 (inputs
4651 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
4652 ("java-commons-codec" ,java-commons-codec)
4653 ("java-hamcrest-core" ,java-hamcrest-core)
4654 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
4655 ("java-mockito" ,java-mockito-1)
4656 ("java-junit" ,java-junit)))
4657 (home-page "https://hc.apache.org/httpcomponents-client-ga/")
4658 (synopsis "HTTP client library for Java")
4659 (description "Although the @code{java.net} package provides basic
4660functionality for accessing resources via HTTP, it doesn't provide the full
4661flexibility or functionality needed by many applications. @code{HttpClient}
4662seeks to fill this void by providing an efficient, up-to-date, and
4663feature-rich package implementing the client side of the most recent HTTP
4664standards and recommendations.")
4665 (license license:asl2.0)))
4666
cbce5de2
RW
4667(define-public java-httpcomponents-httpmime
4668 (package (inherit java-httpcomponents-httpclient)
4669 (name "java-httpcomponents-httpmime")
4670 (arguments
4671 `(#:jar-name "httpcomponents-httpmime.jar"
4672 #:phases
4673 (modify-phases %standard-phases
4674 (add-after 'unpack 'chdir
4675 (lambda _ (chdir "httpmime") #t)))))
4676 (inputs
4677 `(("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient)
4678 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
4679 ("java-junit" ,java-junit)
4680 ("java-hamcrest-core" ,java-hamcrest-core)))))
4681
4b34c21f
RW
4682(define-public java-commons-net
4683 (package
4684 (name "java-commons-net")
4685 (version "3.6")
4686 (source (origin
4687 (method url-fetch)
4688 (uri (string-append "mirror://apache/commons/net/source/"
4689 "commons-net-" version "-src.tar.gz"))
4690 (sha256
4691 (base32
4692 "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr"))))
4693 (build-system ant-build-system)
4694 (arguments
4695 `(;; FIXME: MainTest.java tries to read "examples.properties" (which
4696 ;; should be "resources/examples/examples.properties"), but gets "null"
4697 ;; instead.
4698 #:tests? #f
4699 #:jar-name "commons-net.jar"))
4700 (native-inputs
4701 `(("java-junit" ,java-junit)
4702 ("java-hamcrest-core" ,java-hamcrest-core)))
4703 (home-page "http://commons.apache.org/net/")
4704 (synopsis "Client library for many basic Internet protocols")
4705 (description "The Apache Commons Net library implements the client side of
4706many basic Internet protocols. The purpose of the library is to provide
4707fundamental protocol access, not higher-level abstractions.")
4708 (license license:asl2.0)))
4709
808cb58f
RW
4710(define-public java-jsch
4711 (package
4712 (name "java-jsch")
4713 (version "0.1.54")
4714 (source (origin
4715 (method url-fetch)
4716 (uri (string-append "mirror://sourceforge/jsch/jsch/"
4717 version "/jsch-" version ".zip"))
4718 (sha256
4719 (base32
4720 "029rdddyq1mh3ghryh3ki99kba1xkf1d1swjv2vi6lk6zzjy2wdb"))))
4721 (build-system ant-build-system)
4722 (arguments
4723 `(#:build-target "dist"
4724 #:tests? #f ; no tests included
4725 #:phases
4726 (modify-phases %standard-phases
4727 (replace 'install (install-jars "dist")))))
4728 (native-inputs
4729 `(("unzip" ,unzip)))
4730 (home-page "http://www.jcraft.com/jsch/")
4731 (synopsis "Pure Java implementation of SSH2")
4732 (description "JSch is a pure Java implementation of SSH2. JSch allows you
4733to connect to an SSH server and use port forwarding, X11 forwarding, file
4734transfer, etc., and you can integrate its functionality into your own Java
4735programs.")
4736 (license license:bsd-3)))
4737
a6244698
RW
4738(define-public java-commons-compress
4739 (package
4740 (name "java-commons-compress")
4741 (version "1.13")
4742 (source (origin
4743 (method url-fetch)
4744 (uri (string-append "mirror://apache/commons/compress/source/"
4745 "commons-compress-" version "-src.tar.gz"))
4746 (sha256
4747 (base32
4748 "1vjqvavrn0babffn1kciz6v52ibwq2vwhzlb95hazis3lgllnxc8"))))
4749 (build-system ant-build-system)
4750 (arguments
4751 `(#:jar-name "commons-compress.jar"
4752 #:phases
4753 (modify-phases %standard-phases
4754 (add-after 'unpack 'delete-bad-tests
4755 (lambda _
4756 (with-directory-excursion "src/test/java/org/apache/commons/compress/"
4757 ;; FIXME: These tests really should not fail. Maybe they are
4758 ;; indicative of problems with our Java packaging work.
4759
4760 ;; This test fails with a null pointer exception.
4761 (delete-file "archivers/sevenz/SevenZOutputFileTest.java")
4762 ;; This test fails to open test resources.
4763 (delete-file "archivers/zip/ExplodeSupportTest.java")
4764
4765 ;; FIXME: This test adds a dependency on powermock, which is hard to
4766 ;; package at this point.
4767 ;; https://github.com/powermock/powermock
4768 (delete-file "archivers/sevenz/SevenZNativeHeapTest.java"))
4769 #t)))))
4770 (inputs
4771 `(("java-junit" ,java-junit)
4772 ("java-hamcrest-core" ,java-hamcrest-core)
4773 ("java-mockito" ,java-mockito-1)
4774 ("java-xz" ,java-xz)))
4775 (home-page "https://commons.apache.org/proper/commons-compress/")
4776 (synopsis "Java library for working with compressed files")
4777 (description "The Apache Commons Compress library defines an API for
4778working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ,
4779Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.")
4780 (license license:asl2.0)))
4781
51263ff5
JL
4782(define-public java-commons-csv
4783 (package
4784 (name "java-commons-csv")
4785 (version "1.4")
4786 (source (origin
4787 (method url-fetch)
4788 (uri (string-append "mirror://apache/commons/csv/source/"
4789 "commons-csv-" version "-src.tar.gz"))
4790 (sha256
4791 (base32
4792 "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij"))))
4793 (build-system ant-build-system)
4794 (arguments
4795 `(#:jar-name "commons-csv.jar"
4796 #:source-dir "src/main/java"
4797 #:tests? #f)); FIXME: requires java-h2
4798 (inputs
4799 `(("java-hamcrest-core" ,java-hamcrest-core)
4800 ("java-commons-io" ,java-commons-io)
4801 ("java-commons-lang3" ,java-commons-lang3)
4802 ("junit" ,java-junit)))
4803 (home-page "https://commons.apache.org/proper/commons-csv/")
4804 (synopsis "Read and write CSV documents")
4805 (description "Commons CSV reads and writes files in variations of the Comma
4806Separated Value (CSV) format. The most common CSV formats are predefined in the
4807CSVFormat class:
4808
4809@itemize
4810@item Microsoft Excel
4811@item Informix UNLOAD
4812@item Informix UNLOAD CSV
4813@item MySQL
4814@item RFC 4180
4815@item TDF
4816@end itemize
4817
4818Custom formats can be created using a fluent style API.")
4819 (license license:asl2.0)))
4820
6ee6d0b5
RW
4821(define-public java-osgi-annotation
4822 (package
4823 (name "java-osgi-annotation")
4824 (version "6.0.0")
4825 (source (origin
4826 (method url-fetch)
4827 (uri (string-append "https://repo1.maven.org/maven2/"
4828 "org/osgi/org.osgi.annotation/" version "/"
4829 "org.osgi.annotation-" version "-sources.jar"))
4830 (sha256
4831 (base32
4832 "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w"))))
4833 (build-system ant-build-system)
4834 (arguments
4835 `(#:tests? #f ; no tests
4836 #:jar-name "osgi-annotation.jar"))
c353d014 4837 (home-page "https://www.osgi.org")
6ee6d0b5
RW
4838 (synopsis "Annotation module of OSGi framework")
4839 (description
4840 "OSGi, for Open Services Gateway initiative framework, is a module system
4841and service platform for the Java programming language. This package contains
4842the OSGi annotation module, providing additional services to help dynamic
4843components.")
4844 (license license:asl2.0)))
4845
37e2e5d4
RW
4846(define-public java-osgi-core
4847 (package
4848 (name "java-osgi-core")
4849 (version "6.0.0")
4850 (source (origin
4851 (method url-fetch)
4852 (uri (string-append "https://repo1.maven.org/maven2/"
4853 "org/osgi/org.osgi.core/" version "/"
4854 "org.osgi.core-" version "-sources.jar"))
4855 (sha256
4856 (base32
4857 "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv"))))
4858 (build-system ant-build-system)
4859 (arguments
4860 `(#:tests? #f ; no tests
4861 #:jar-name "osgi-core.jar"))
4862 (inputs
4863 `(("java-osgi-annotation" ,java-osgi-annotation)))
c353d014 4864 (home-page "https://www.osgi.org")
37e2e5d4
RW
4865 (synopsis "Core module of OSGi framework")
4866 (description
4867 "OSGi, for Open Services Gateway initiative framework, is a module system
4868and service platform for the Java programming language. This package contains
4869the OSGi Core module.")
4870 (license license:asl2.0)))
4871
8af92c8f
RW
4872(define-public java-osgi-service-event
4873 (package
4874 (name "java-osgi-service-event")
4875 (version "1.3.1")
4876 (source (origin
4877 (method url-fetch)
4878 (uri (string-append "https://repo1.maven.org/maven2/"
4879 "org/osgi/org.osgi.service.event/"
4880 version "/org.osgi.service.event-"
4881 version "-sources.jar"))
4882 (sha256
4883 (base32
4884 "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm"))))
4885 (build-system ant-build-system)
4886 (arguments
4887 `(#:tests? #f ; no tests
4888 #:jar-name "osgi-service-event.jar"))
4889 (inputs
4890 `(("java-osgi-annotation" ,java-osgi-annotation)
4891 ("java-osgi-core" ,java-osgi-core)))
c353d014 4892 (home-page "https://www.osgi.org")
8af92c8f
RW
4893 (synopsis "OSGi service event module")
4894 (description
4895 "OSGi, for Open Services Gateway initiative framework, is a module system
4896and service platform for the Java programming language. This package contains
4897the OSGi @code{org.osgi.service.event} module.")
4898 (license license:asl2.0)))
4899
674e93a0
RW
4900(define-public java-eclipse-osgi
4901 (package
4902 (name "java-eclipse-osgi")
4903 (version "3.11.3")
4904 (source (origin
4905 (method url-fetch)
4906 (uri (string-append "https://repo1.maven.org/maven2/"
4907 "org/eclipse/platform/org.eclipse.osgi/"
4908 version "/org.eclipse.osgi-"
4909 version "-sources.jar"))
4910 (sha256
4911 (base32
4912 "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b"))))
4913 (build-system ant-build-system)
4914 (arguments
4915 `(#:tests? #f ; no tests included
4916 #:jar-name "eclipse-equinox-osgi.jar"))
4917 (inputs
4918 `(("java-osgi-annotation" ,java-osgi-annotation)))
4919 (home-page "http://www.eclipse.org/equinox/")
4920 (synopsis "Eclipse Equinox OSGi framework")
4921 (description "This package provides an implementation of the OSGi Core
4922specification.")
4923 (license license:epl1.0)))
4924
81b55b1e
RW
4925(define-public java-eclipse-equinox-common
4926 (package
4927 (name "java-eclipse-equinox-common")
4928 (version "3.8.0")
4929 (source (origin
4930 (method url-fetch)
4931 (uri (string-append "https://repo1.maven.org/maven2/"
4932 "org/eclipse/platform/org.eclipse.equinox.common/"
4933 version "/org.eclipse.equinox.common-"
4934 version "-sources.jar"))
4935 (sha256
4936 (base32
4937 "12aazpkgw46r1qj0pr421jzwhbmsizd97r37krd7njnbrdgfzksc"))))
4938 (build-system ant-build-system)
4939 (arguments
4940 `(#:tests? #f ; no tests included
4941 #:jar-name "eclipse-equinox-common.jar"))
4942 (inputs
4943 `(("java-eclipse-osgi" ,java-eclipse-osgi)))
4944 (home-page "http://www.eclipse.org/equinox/")
4945 (synopsis "Common Eclipse runtime")
4946 (description "This package provides the common Eclipse runtime.")
4947 (license license:epl1.0)))
4948
90368ad9
RW
4949(define-public java-eclipse-core-jobs
4950 (package
4951 (name "java-eclipse-core-jobs")
4952 (version "3.8.0")
4953 (source (origin
4954 (method url-fetch)
4955 (uri (string-append "https://repo1.maven.org/maven2/"
4956 "org/eclipse/platform/org.eclipse.core.jobs/"
4957 version "/org.eclipse.core.jobs-"
4958 version "-sources.jar"))
4959 (sha256
4960 (base32
4961 "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b"))))
4962 (build-system ant-build-system)
4963 (arguments
4964 `(#:tests? #f ; no tests included
4965 #:jar-name "eclipse-core-jobs.jar"))
4966 (inputs
4967 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4968 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4969 (home-page "http://www.eclipse.org/equinox/")
4970 (synopsis "Eclipse jobs mechanism")
4971 (description "This package provides the Eclipse jobs mechanism.")
4972 (license license:epl1.0)))
4973
fbaf09eb
RW
4974(define-public java-eclipse-equinox-registry
4975 (package
4976 (name "java-eclipse-equinox-registry")
4977 (version "3.6.100")
4978 (source (origin
4979 (method url-fetch)
4980 (uri (string-append "https://repo1.maven.org/maven2/"
4981 "org/eclipse/platform/org.eclipse.equinox.registry/"
4982 version "/org.eclipse.equinox.registry-"
4983 version "-sources.jar"))
4984 (sha256
4985 (base32
4986 "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k"))))
4987 (build-system ant-build-system)
4988 (arguments
4989 `(#:tests? #f ; no tests included
4990 #:jar-name "eclipse-equinox-registry.jar"))
4991 (inputs
4992 `(("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
4993 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4994 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4995 (home-page "http://www.eclipse.org/equinox/")
4996 (synopsis "Eclipse extension registry support")
4997 (description "This package provides support for the Eclipse extension
4998registry.")
4999 (license license:epl1.0)))
5000
65214c87
RW
5001(define-public java-eclipse-equinox-app
5002 (package
5003 (name "java-eclipse-equinox-app")
5004 (version "1.3.400")
5005 (source (origin
5006 (method url-fetch)
5007 (uri (string-append "https://repo1.maven.org/maven2/"
5008 "org/eclipse/platform/org.eclipse.equinox.app/"
5009 version "/org.eclipse.equinox.app-"
5010 version "-sources.jar"))
5011 (sha256
5012 (base32
5013 "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab"))))
5014 (build-system ant-build-system)
5015 (arguments
5016 `(#:tests? #f ; no tests included
5017 #:jar-name "eclipse-equinox-app.jar"))
5018 (inputs
5019 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5020 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5021 ("java-eclipse-osgi" ,java-eclipse-osgi)
5022 ("java-osgi-service-event" ,java-osgi-service-event)))
5023 (home-page "http://www.eclipse.org/equinox/")
5024 (synopsis "Equinox application container")
5025 (description "This package provides the Equinox application container for
5026Eclipse.")
5027 (license license:epl1.0)))
5028
3f970214
RW
5029(define-public java-eclipse-equinox-preferences
5030 (package
5031 (name "java-eclipse-equinox-preferences")
5032 (version "3.6.1")
5033 (source (origin
5034 (method url-fetch)
5035 (uri (string-append "https://repo1.maven.org/maven2/"
5036 "org/eclipse/platform/org.eclipse.equinox.preferences/"
5037 version "/org.eclipse.equinox.preferences-"
5038 version "-sources.jar"))
5039 (sha256
5040 (base32
5041 "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2"))))
5042 (build-system ant-build-system)
5043 (arguments
5044 `(#:tests? #f ; no tests included
5045 #:jar-name "eclipse-equinox-preferences.jar"))
5046 (inputs
5047 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5048 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5049 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5050 (home-page "http://www.eclipse.org/equinox/")
5051 (synopsis "Eclipse preferences mechanism")
5052 (description "This package provides the Eclipse preferences mechanism with
5053the module @code{org.eclipse.equinox.preferences}.")
5054 (license license:epl1.0)))
5055
4ad3d4f3
RW
5056(define-public java-eclipse-core-contenttype
5057 (package
5058 (name "java-eclipse-core-contenttype")
5059 (version "3.5.100")
5060 (source (origin
5061 (method url-fetch)
5062 (uri (string-append "https://repo1.maven.org/maven2/"
5063 "org/eclipse/platform/org.eclipse.core.contenttype/"
5064 version "/org.eclipse.core.contenttype-"
5065 version "-sources.jar"))
5066 (sha256
5067 (base32
5068 "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi"))))
5069 (build-system ant-build-system)
5070 (arguments
5071 `(#:tests? #f ; no tests included
5072 #:jar-name "eclipse-core-contenttype.jar"))
5073 (inputs
5074 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5075 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5076 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5077 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5078 (home-page "http://www.eclipse.org/")
5079 (synopsis "Eclipse content mechanism")
5080 (description "This package provides the Eclipse content mechanism in the
5081@code{org.eclipse.core.contenttype} module.")
5082 (license license:epl1.0)))
5083
6a7f7e49
RW
5084(define-public java-eclipse-core-runtime
5085 (package
5086 (name "java-eclipse-core-runtime")
5087 (version "3.12.0")
5088 (source (origin
5089 (method url-fetch)
5090 (uri (string-append "https://repo1.maven.org/maven2/"
5091 "org/eclipse/platform/org.eclipse.core.runtime/"
5092 version "/org.eclipse.core.runtime-"
5093 version "-sources.jar"))
5094 (sha256
5095 (base32
5096 "16mkf8jgj35pgzms7w1gyfq0gfm4ixw6c5xbbxzdj1la56c758ya"))))
5097 (build-system ant-build-system)
5098 (arguments
5099 `(#:tests? #f ; no tests included
5100 #:jar-name "eclipse-core-runtime.jar"))
5101 (inputs
5102 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5103 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5104 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
5105 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5106 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5107 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5108 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5109 (home-page "https://www.eclipse.org/")
5110 (synopsis "Eclipse core runtime")
5111 (description "This package provides the Eclipse core runtime with the
5112module @code{org.eclipse.core.runtime}.")
5113 (license license:epl1.0)))
5114
b3806a15
RW
5115(define-public java-eclipse-core-filesystem
5116 (package
5117 (name "java-eclipse-core-filesystem")
5118 (version "1.6.1")
5119 (source (origin
5120 (method url-fetch)
5121 (uri (string-append "https://repo1.maven.org/maven2/"
5122 "org/eclipse/platform/org.eclipse.core.filesystem/"
5123 version "/org.eclipse.core.filesystem-"
5124 version "-sources.jar"))
5125 (sha256
5126 (base32
5127 "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj"))))
5128 (build-system ant-build-system)
5129 (arguments
5130 `(#:tests? #f ; no tests included
5131 #:jar-name "eclipse-core-filesystem.jar"))
5132 (inputs
5133 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5134 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5135 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5136 (home-page "https://www.eclipse.org/")
5137 (synopsis "Eclipse core file system")
5138 (description "This package provides the Eclipse core file system with the
5139module @code{org.eclipse.core.filesystem}.")
5140 (license license:epl1.0)))
5141
e96060de
RW
5142(define-public java-eclipse-core-expressions
5143 (package
5144 (name "java-eclipse-core-expressions")
5145 (version "3.5.100")
5146 (source (origin
5147 (method url-fetch)
5148 (uri (string-append "https://repo1.maven.org/maven2/"
5149 "org/eclipse/platform/org.eclipse.core.expressions/"
5150 version "/org.eclipse.core.expressions-"
5151 version "-sources.jar"))
5152 (sha256
5153 (base32
5154 "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f"))))
5155 (build-system ant-build-system)
5156 (arguments
5157 `(#:tests? #f ; no tests included
5158 #:jar-name "eclipse-core-expressions.jar"))
5159 (inputs
5160 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5161 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5162 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5163 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5164 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5165 (home-page "https://www.eclipse.org/")
5166 (synopsis "Eclipse core expression language")
5167 (description "This package provides the Eclipse core expression language
5168with the @code{org.eclipse.core.expressions} module.")
5169 (license license:epl1.0)))
5170
e8d0f7c8
RW
5171(define-public java-eclipse-core-variables
5172 (package
5173 (name "java-eclipse-core-variables")
5174 (version "3.3.0")
5175 (source (origin
5176 (method url-fetch)
5177 (uri (string-append "https://repo1.maven.org/maven2/"
5178 "org/eclipse/platform/org.eclipse.core.variables/"
5179 version "/org.eclipse.core.variables-"
5180 version "-sources.jar"))
5181 (sha256
5182 (base32
5183 "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy"))))
5184 (build-system ant-build-system)
5185 (arguments
5186 `(#:tests? #f ; no tests included
5187 #:jar-name "eclipse-core-variables.jar"))
5188 (inputs
5189 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5190 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5191 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5192 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5193 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5194 (home-page "https://www.eclipse.org/platform")
5195 (synopsis "Eclipse core variables")
5196 (description "This package provides the Eclipse core variables module
5197@code{org.eclipse.core.variables}.")
5198 (license license:epl1.0)))
5199
7c3d479e
RW
5200(define-public java-eclipse-ant-core
5201 (package
5202 (name "java-eclipse-ant-core")
5203 (version "3.4.100")
5204 (source (origin
5205 (method url-fetch)
5206 (uri (string-append "https://repo1.maven.org/maven2/"
5207 "org/eclipse/platform/org.eclipse.ant.core/"
5208 version "/org.eclipse.ant.core-"
5209 version "-sources.jar"))
5210 (sha256
5211 (base32
5212 "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7"))))
5213 (build-system ant-build-system)
5214 (arguments
5215 `(#:tests? #f ; no tests included
5216 #:jar-name "eclipse-ant-core.jar"))
5217 (inputs
5218 `(("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
5219 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5220 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5221 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5222 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5223 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5224 ("java-eclipse-core-variables" ,java-eclipse-core-variables)
5225 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5226 (home-page "https://www.eclipse.org/platform")
5227 (synopsis "Ant build tool core libraries")
5228 (description "This package provides the ant build tool core libraries with
5229the module @code{org.eclipse.ant.core}.")
5230 (license license:epl1.0)))
5231
6636f638
RW
5232(define-public java-eclipse-core-resources
5233 (package
5234 (name "java-eclipse-core-resources")
5235 (version "3.11.1")
5236 (source (origin
5237 (method url-fetch)
5238 (uri (string-append "https://repo1.maven.org/maven2/"
5239 "org/eclipse/platform/org.eclipse.core.resources/"
5240 version "/org.eclipse.core.resources-"
5241 version "-sources.jar"))
5242 (sha256
5243 (base32
5244 "1hrfxrll6cpcagfksk2na1ypvkcnsp0fk6n3vcsrn97qayf9mx9l"))))
5245 (build-system ant-build-system)
5246 (arguments
5247 `(#:tests? #f ; no tests included
5248 #:jar-name "eclipse-core-resources.jar"))
5249 (inputs
5250 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5251 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5252 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5253 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5254 ("java-eclipse-core-expressions" ,java-eclipse-core-expressions)
5255 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
5256 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5257 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5258 ("java-eclipse-ant-core" ,java-eclipse-ant-core)
5259 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5260 (home-page "https://www.eclipse.org/")
5261 (synopsis "Eclipse core resource management")
5262 (description "This package provides the Eclipse core resource management
5263module @code{org.eclipse.core.resources}.")
5264 (license license:epl1.0)))
5265
afb5858d
RW
5266(define-public java-eclipse-compare-core
5267 (package
5268 (name "java-eclipse-compare-core")
5269 (version "3.6.0")
5270 (source (origin
5271 (method url-fetch)
5272 (uri (string-append "https://repo1.maven.org/maven2/"
5273 "org/eclipse/platform/org.eclipse.compare.core/"
5274 version "/org.eclipse.compare.core-"
5275 version "-sources.jar"))
5276 (sha256
5277 (base32
5278 "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg"))))
5279 (build-system ant-build-system)
5280 (arguments
5281 `(#:tests? #f ; no tests included
5282 #:jar-name "eclipse-compare-core.jar"))
5283 (inputs
5284 `(("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5285 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5286 ("java-eclipse-osgi" ,java-eclipse-osgi)
5287 ("java-icu4j" ,java-icu4j)))
5288 (home-page "https://www.eclipse.org/")
5289 (synopsis "Eclipse core compare support")
5290 (description "This package provides the Eclipse core compare support
5291module @code{org.eclipse.compare.core}.")
5292 (license license:epl1.0)))
5293
1bb191fc
RW
5294(define-public java-eclipse-team-core
5295 (package
5296 (name "java-eclipse-team-core")
5297 (version "3.8.0")
5298 (source (origin
5299 (method url-fetch)
5300 (uri (string-append "https://repo1.maven.org/maven2/"
5301 "org/eclipse/platform/org.eclipse.team.core/"
5302 version "/org.eclipse.team.core-"
5303 version "-sources.jar"))
5304 (sha256
5305 (base32
5306 "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7"))))
5307 (build-system ant-build-system)
5308 (arguments
5309 `(#:tests? #f ; no tests included
5310 #:jar-name "eclipse-team-core.jar"))
5311 (inputs
5312 `(("java-eclipse-compare-core" ,java-eclipse-compare-core)
5313 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5314 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
5315 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5316 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
5317 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5318 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5319 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5320 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5321 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5322 (home-page "https://www.eclipse.org/platform")
5323 (synopsis "Eclipse team support core")
5324 (description "This package provides the Eclipse team support core module
5325@code{org.eclipse.team.core}.")
5326 (license license:epl1.0)))
5327
31342529
RW
5328(define-public java-eclipse-core-commands
5329 (package
5330 (name "java-eclipse-core-commands")
5331 (version "3.8.1")
5332 (source (origin
5333 (method url-fetch)
5334 (uri (string-append "https://repo1.maven.org/maven2/"
5335 "org/eclipse/platform/org.eclipse.core.commands/"
5336 version "/org.eclipse.core.commands-"
5337 version "-sources.jar"))
5338 (sha256
5339 (base32
5340 "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9"))))
5341 (build-system ant-build-system)
5342 (arguments
5343 `(#:tests? #f ; no tests included
5344 #:jar-name "eclipse-core-commands.jar"))
5345 (inputs
5346 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)))
5347 (home-page "https://www.eclipse.org/platform")
5348 (synopsis "Eclipse core commands")
5349 (description "This package provides Eclipse core commands in the module
5350@code{org.eclipse.core.commands}.")
5351 (license license:epl1.0)))
5352
bf96acf7
RW
5353(define-public java-eclipse-text
5354 (package
5355 (name "java-eclipse-text")
5356 (version "3.6.0")
5357 (source (origin
5358 (method url-fetch)
5359 (uri (string-append "https://repo1.maven.org/maven2/"
5360 "org/eclipse/platform/org.eclipse.text/"
5361 version "/org.eclipse.text-"
5362 version "-sources.jar"))
5363 (sha256
5364 (base32
5365 "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1"))))
5366 (build-system ant-build-system)
5367 (arguments
5368 `(#:tests? #f ; no tests included
5369 #:jar-name "eclipse-text.jar"
5370 #:phases
5371 (modify-phases %standard-phases
5372 ;; When creating a new category we must make sure that the new list
5373 ;; matches List<Position>. By default it seems to be too generic
5374 ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>.
5375 ;; Without this we get this error:
5376 ;;
5377 ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376:
5378 ;; error: method put in interface Map<K,V> cannot be applied to given types;
5379 ;; [javac] fPositions.put(category, new ArrayList<>());
5380 ;; [javac] ^
5381 ;; [javac] required: String,List<Position>
5382 ;; [javac] found: String,ArrayList<Object>
5383 ;; [javac] reason: actual argument ArrayList<Object> cannot be converted
5384 ;; to List<Position> by method invocation conversion
5385 ;; [javac] where K,V are type-variables:
5386 ;; [javac] K extends Object declared in interface Map
5387 ;; [javac] V extends Object declared in interface Map
5388 ;;
5389 ;; I don't know if this is a good fix. I suspect it is not, but it
5390 ;; seems to work.
5391 (add-after 'unpack 'fix-compilation-error
5392 (lambda _
5393 (substitute* "src/org/eclipse/jface/text/AbstractDocument.java"
5394 (("Positions.put\\(category, new ArrayList<>\\(\\)\\);")
5395 "Positions.put(category, new ArrayList<Position>());"))
5396 #t)))))
5397 (inputs
5398 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5399 ("java-eclipse-core-commands" ,java-eclipse-core-commands)
5400 ("java-icu4j" ,java-icu4j)))
5401 (home-page "http://www.eclipse.org/platform")
5402 (synopsis "Eclipse text library")
5403 (description "Platform Text is part of the Platform UI project and
5404provides the basic building blocks for text and text editors within Eclipse
5405and contributes the Eclipse default text editor.")
5406 (license license:epl1.0)))
5407
c24d11b7
RW
5408(define-public java-eclipse-jdt-core
5409 (package
5410 (name "java-eclipse-jdt-core")
5411 (version "3.12.3")
5412 (source (origin
5413 (method url-fetch)
5414 (uri (string-append "https://repo1.maven.org/maven2/"
5415 "org/eclipse/jdt/org.eclipse.jdt.core/"
5416 version "/org.eclipse.jdt.core-"
5417 version "-sources.jar"))
5418 (sha256
5419 (base32
5420 "191xw4lc7mjjkprh4ji5vnpjvr5r4zvbpwkriy4bvsjqrz35vh1j"))))
5421 (build-system ant-build-system)
5422 (arguments
5423 `(#:tests? #f ; no tests included
5424 #:jar-name "eclipse-jdt-core.jar"))
5425 (inputs
5426 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5427 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
5428 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5429 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
5430 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5431 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
5432 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5433 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5434 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5435 ("java-eclipse-osgi" ,java-eclipse-osgi)
5436 ("java-eclipse-text" ,java-eclipse-text)))
5437 (home-page "https://www.eclipse.org/jdt")
5438 (synopsis "Java development tools core libraries")
5439 (description "This package provides the core libraries of the Eclipse Java
5440development tools.")
5441 (license license:epl1.0)))
5442
a5cdcf6c
RW
5443(define-public java-javax-mail
5444 (package
5445 (name "java-javax-mail")
5446 (version "1.5.6")
5447 (source (origin
5448 (method url-fetch)
5449 (uri (string-append "https://repo1.maven.org/maven2/"
5450 "com/sun/mail/javax.mail/"
5451 version "/javax.mail-"
5452 version "-sources.jar"))
5453 (sha256
5454 (base32
5455 "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9"))))
5456 (build-system ant-build-system)
5457 (arguments
5458 `(#:tests? #f ; no tests
5459 #:jar-name "javax-mail.jar"))
5460 (home-page "https://javamail.java.net")
5461 (synopsis "Reference implementation of the JavaMail API")
5462 (description
5463 "This package provides versions of the JavaMail API implementation, IMAP,
5464SMTP, and POP3 service providers, some examples, and documentation for the
5465JavaMail API.")
5466 ;; GPLv2 only with "classpath exception".
5467 (license license:gpl2)))
5468
0e660c4d
RW
5469(define-public java-log4j-api
5470 (package
5471 (name "java-log4j-api")
5472 (version "2.4.1")
5473 (source (origin
5474 (method url-fetch)
5475 (uri (string-append "mirror://apache/logging/log4j/" version
5476 "/apache-log4j-" version "-src.tar.gz"))
5477 (sha256
5478 (base32
5479 "0j5p9gik0jysh37nlrckqbky12isy95cpwg2gv5fas1rcdqbraxd"))))
5480 (build-system ant-build-system)
5481 (arguments
5482 `(#:tests? #f ; tests require unpackaged software
5483 #:jar-name "log4j-api.jar"
5484 #:make-flags
5485 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
5486 "/share/java"))
5487 #:phases
5488 (modify-phases %standard-phases
5489 (add-after 'unpack 'enter-dir
5490 (lambda _ (chdir "log4j-api") #t))
5491 ;; FIXME: The tests require additional software that has not been
5492 ;; packaged yet, such as
5493 ;; * org.apache.maven
5494 ;; * org.apache.felix
5495 (add-after 'enter-dir 'delete-tests
5496 (lambda _ (delete-file-recursively "src/test") #t)))))
5497 (inputs
5498 `(("java-osgi-core" ,java-osgi-core)
5499 ("java-hamcrest-core" ,java-hamcrest-core)
5500 ("java-junit" ,java-junit)))
5501 (home-page "http://logging.apache.org/log4j/2.x/")
5502 (synopsis "API module of the Log4j logging framework for Java")
5503 (description
5504 "This package provides the API module of the Log4j logging framework for
5505Java.")
5506 (license license:asl2.0)))
5507
dfef4231
JL
5508(define-public java-log4j-core
5509 (package
5510 (inherit java-log4j-api)
5511 (name "java-log4j-core")
5512 (inputs
5513 `(("java-osgi-core" ,java-osgi-core)
5514 ("java-hamcrest-core" ,java-hamcrest-core)
5515 ("java-log4j-api" ,java-log4j-api)
5516 ("java-mail" ,java-mail)
5517 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
5518 ("java-lmax-disruptor" ,java-lmax-disruptor)
5519 ("java-kafka" ,java-kafka-clients)
5520 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
5521 ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
5522 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
5523 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
5524 ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml)
5525 ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml)
5526 ("java-commons-compress" ,java-commons-compress)
5527 ("java-commons-csv" ,java-commons-csv)
5528 ("java-jeromq" ,java-jeromq)
5529 ("java-junit" ,java-junit)))
5530 (native-inputs
5531 `(("hamcrest" ,java-hamcrest-all)
5532 ("java-commons-io" ,java-commons-io)
5533 ("java-commons-lang3" ,java-commons-lang3)
5534 ("slf4j" ,java-slf4j-api)))
5535 (arguments
5536 `(#:tests? #f ; tests require more dependencies
5537 #:test-dir "src/test"
5538 #:source-dir "src/main/java"
5539 #:jar-name "log4j-core.jar"
5540 #:jdk ,icedtea-8
5541 #:make-flags
5542 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
5543 "/share/java"))
5544 #:phases
5545 (modify-phases %standard-phases
5546 (add-after 'unpack 'enter-dir
5547 (lambda _ (chdir "log4j-core") #t)))))
5548 (synopsis "Core component of the Log4j framework")
5549 (description "This package provides the core component of the Log4j
5550logging framework for Java.")))
5551
2caf873e
JL
5552(define-public java-log4j-1.2-api
5553 (package
5554 (inherit java-log4j-api)
5555 (name "java-log4j-1.2-api")
5556 (arguments
5557 `(#:jar-name "java-log4j-1.2-api.jar"
5558 #:source-dir "log4j-1.2-api/src/main/java"
5559 #:jdk ,icedtea-8
5560 ;; Tests require maven-model (and other maven subprojects), which is a
5561 ;; cyclic dependency.
5562 #:tests? #f))
5563 (inputs
5564 `(("log4j-api" ,java-log4j-api)
5565 ("log4j-core" ,java-log4j-core)
5566 ("osgi-core" ,java-osgi-core)
5567 ("eclipse-osgi" ,java-eclipse-osgi)
5568 ("java-lmax-disruptor" ,java-lmax-disruptor)))))
5569
1c188f4e
HG
5570(define-public java-commons-cli
5571 (package
5572 (name "java-commons-cli")
37602dd8 5573 (version "1.4")
1c188f4e
HG
5574 (source (origin
5575 (method url-fetch)
5576 (uri (string-append "mirror://apache/commons/cli/source/"
5577 "commons-cli-" version "-src.tar.gz"))
5578 (sha256
5579 (base32
37602dd8 5580 "05hgi2z01fqz374y719gl1dxzqvzci5af071zm7vxrjg9vczipm1"))))
1c188f4e
HG
5581 (build-system ant-build-system)
5582 ;; TODO: javadoc
5583 (arguments
5584 `(#:jar-name "commons-cli.jar"))
5585 (native-inputs
5586 `(("java-junit" ,java-junit)
5587 ("java-hamcrest-core" ,java-hamcrest-core)))
5588 (home-page "http://commons.apache.org/cli/")
5589 (synopsis "Command line arguments and options parsing library")
5590 (description "The Apache Commons CLI library provides an API for parsing
5591command line options passed to programs. It is also able to print help
5592messages detailing the options available for a command line tool.
5593
5594Commons CLI supports different types of options:
5595
5596@itemize
5597@item POSIX like options (ie. tar -zxvf foo.tar.gz)
5598@item GNU like long options (ie. du --human-readable --max-depth=1)
5599@item Java like properties (ie. java -Djava.awt.headless=true Foo)
5600@item Short options with value attached (ie. gcc -O2 foo.c)
5601@item long options with single hyphen (ie. ant -projecthelp)
5602@end itemize
5603
5604This is a part of the Apache Commons Project.")
5605 (license license:asl2.0)))
0a8519bc
HG
5606
5607(define-public java-commons-codec
5608 (package
5609 (name "java-commons-codec")
5610 (version "1.10")
5611 (source (origin
5612 (method url-fetch)
5613 (uri (string-append "mirror://apache/commons/codec/source/"
5614 "commons-codec-" version "-src.tar.gz"))
5615 (sha256
5616 (base32
5617 "1w9qg30y4s0x8gnmr2fgj4lyplfn788jqxbcz27lf5kbr6n8xr65"))))
5618 (build-system ant-build-system)
5619 (outputs '("out" "doc"))
5620 (arguments
5621 `(#:test-target "test"
5622 #:make-flags
5623 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
5624 (junit (assoc-ref %build-inputs "java-junit")))
5625 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
5626 (string-append "-Dhamcrest.jar=" hamcrest
5627 "/share/java/hamcrest-core.jar")
5628 ;; Do not append version to jar.
5629 "-Dfinal.name=commons-codec"))
5630 #:phases
5631 (modify-phases %standard-phases
5632 (add-after 'build 'build-javadoc ant-build-javadoc)
5633 (replace 'install (install-jars "dist"))
5634 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
5635 (native-inputs
5636 `(("java-junit" ,java-junit)
5637 ("java-hamcrest-core" ,java-hamcrest-core)))
5638 (home-page "http://commons.apache.org/codec/")
5639 (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs")
5640 (description "The codec package contains simple encoder and decoders for
5641various formats such as Base64 and Hexadecimal. In addition to these widely
5642used encoders and decoders, the codec package also maintains a collection of
5643phonetic encoding utilities.
5644
5645This is a part of the Apache Commons Project.")
5646 (license license:asl2.0)))
7d91c1b9
HG
5647
5648(define-public java-commons-daemon
5649 (package
5650 (name "java-commons-daemon")
5651 (version "1.0.15")
5652 (source (origin
5653 (method url-fetch)
5654 (uri (string-append "mirror://apache/commons/daemon/source/"
5655 "commons-daemon-" version "-src.tar.gz"))
5656 (sha256
5657 (base32
5658 "0ci46kq8jpz084ccwq0mmkahcgsmh20ziclp2jf5i0djqv95gvhi"))))
5659 (build-system ant-build-system)
5660 (arguments
5661 `(#:test-target "test"
5662 #:phases
5663 (modify-phases %standard-phases
5664 (add-after 'build 'build-javadoc ant-build-javadoc)
5665 (replace 'install (install-jars "dist"))
5666 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
5667 (native-inputs
5668 `(("java-junit" ,java-junit)))
5669 (home-page "http://commons.apache.org/daemon/")
5670 (synopsis "Library to launch Java applications as daemons")
5671 (description "The Daemon package from Apache Commons can be used to
5672implement Java applications which can be launched as daemons. For example the
5673program will be notified about a shutdown so that it can perform cleanup tasks
5674before its process of execution is destroyed by the operation system.
5675
5676This package contains the Java library. You will also need the actual binary
5677for your architecture which is provided by the jsvc package.
5678
5679This is a part of the Apache Commons Project.")
5680 (license license:asl2.0)))
9f68e74a 5681
eb270ecf
RW
5682(define-public java-javaewah
5683 (package
5684 (name "java-javaewah")
5685 (version "1.1.6")
5686 (source (origin
5687 (method url-fetch)
5688 (uri (string-append "https://github.com/lemire/javaewah/"
5689 "archive/JavaEWAH-" version ".tar.gz"))
5690 (sha256
5691 (base32
5692 "1n7j1r1h24wlhwv9zdcj6yqjrhma2ixwyzm15l5vrv6yqjs6753b"))))
5693 (build-system ant-build-system)
5694 (arguments `(#:jar-name "javaewah.jar"))
5695 (inputs
5696 `(("java-junit" ,java-junit)
5697 ("java-hamcrest-core" ,java-hamcrest-core)))
5698 (home-page "https://github.com/lemire/javaewah")
5699 (synopsis "Compressed alternative to the Java @code{BitSet} class")
5700 (description "This is a word-aligned compressed variant of the Java
5701@code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like
5702compression scheme. It can be used to implement bitmap indexes.
5703
5704The goal of word-aligned compression is not to achieve the best compression,
5705but rather to improve query processing time. Hence, JavaEWAH tries to save CPU
5706cycles, maybe at the expense of storage. However, the EWAH scheme is always
5707more efficient storage-wise than an uncompressed bitmap (as implemented in the
5708@code{BitSet} class by Sun).")
5709 ;; GPL2.0 derivates are explicitly allowed.
5710 (license license:asl2.0)))
5711
f8e4d022
RW
5712(define-public java-slf4j-api
5713 (package
5714 (name "java-slf4j-api")
5715 (version "1.7.25")
5716 (source (origin
5717 (method url-fetch)
5718 (uri (string-append "https://www.slf4j.org/dist/slf4j-"
5719 version ".tar.gz"))
5720 (sha256
5721 (base32
5722 "13j51sgzmhhdrfa74gkal5zpip7r1440dh7zsi2c8bpb2zs1v8kb"))
5723 (modules '((guix build utils)))
5724 ;; Delete bundled jars.
5725 (snippet
5726 '(begin
5727 (for-each delete-file (find-files "." "\\.jar$"))
5728 #t))))
5729 (build-system ant-build-system)
5730 (arguments
dcf7a8a6 5731 `(#:jar-name "slf4j-api.jar"
f8e4d022 5732 #:source-dir "slf4j-api/src/main"
dcf7a8a6
JL
5733 #:test-dir "slf4j-api/src/test"
5734 #:phases
5735 (modify-phases %standard-phases
5736 (add-after 'build 'regenerate-jar
5737 (lambda _
5738 ;; pom.xml ignores these files in the jar creation process. If we don't,
5739 ;; we get the error "This code should have never made it into slf4j-api.jar"
5740 (delete-file-recursively "build/classes/org/slf4j/impl")
5741 (zero? (system* "jar" "-cf" "build/jar/slf4j-api.jar" "-C"
5742 "build/classes" "."))))
5743 (add-before 'check 'dont-test-abstract-classes
5744 (lambda _
5745 ;; abstract classes are not meant to be run with junit
5746 (substitute* "build.xml"
5747 (("<include name=\"\\*\\*/\\*Test.java\" />")
5748 (string-append "<include name=\"**/*Test.java\" />"
5749 "<exclude name=\"**/MultithreadedInitializationTest"
5750 ".java\" />"))))))))
f8e4d022
RW
5751 (inputs
5752 `(("java-junit" ,java-junit)
5753 ("java-hamcrest-core" ,java-hamcrest-core)))
5754 (home-page "https://www.slf4j.org/")
5755 (synopsis "Simple logging facade for Java")
5756 (description "The Simple Logging Facade for Java (SLF4J) serves as a
5757simple facade or abstraction for various logging
5758frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j})
5759allowing the end user to plug in the desired logging framework at deployment
5760time.")
5761 (license license:expat)))
5762
6d047cc4
GB
5763(define java-slf4j-api-bootstrap
5764 (package
5765 (inherit java-slf4j-api)
5766 (name "java-slf4j-api-bootstrap")
5767 (inputs `())
5768 (arguments
5769 (substitute-keyword-arguments (package-arguments java-slf4j-api)
5770 ((#:tests? _ #f) #f)))))
5771
88f256a1
TD
5772(define-public java-slf4j-simple
5773 (package
5774 (name "java-slf4j-simple")
5775 (version "1.7.25")
5776 (source (package-source java-slf4j-api))
5777 (build-system ant-build-system)
5778 (arguments
5779 `(#:jar-name "slf4j-simple.jar"
5780 #:source-dir "slf4j-simple/src/main"
5781 #:test-dir "slf4j-simple/src/test"
5782 #:phases
5783 (modify-phases %standard-phases
5784 ;; The tests need some test classes from slf4j-api
5785 (add-before 'check 'build-slf4j-api-test-helpers
5786 (lambda _
5787 ;; Add current dir to CLASSPATH ...
5788 (setenv "CLASSPATH"
5789 (string-append (getcwd) ":" (getenv "CLASSPATH")))
5790 ;; ... and build test helper classes here:
5791 (zero?
5792 (apply system*
5793 `("javac" "-d" "."
5794 ,@(find-files "slf4j-api/src/test" ".*\\.java")))))))))
5795 (inputs
5796 `(("java-junit" ,java-junit)
5797 ("java-hamcrest-core" ,java-hamcrest-core)
5798 ("java-slf4j-api" ,java-slf4j-api)))
5799 (home-page "https://www.slf4j.org/")
5800 (synopsis "Simple implementation of simple logging facade for Java")
5801 (description "SLF4J binding for the Simple implementation, which outputs
5802all events to System.err. Only messages of level INFO and higher are
5803printed.")
5804 (license license:expat)))
5805
9f68e74a
JL
5806(define-public antlr2
5807 (package
5808 (name "antlr2")
5809 (version "2.7.7")
5810 (source (origin
5811 (method url-fetch)
5812 (uri (string-append "http://www.antlr2.org/download/antlr-"
5813 version ".tar.gz"))
5814 (sha256
5815 (base32
5816 "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5"))
5817 (modules '((guix build utils)))
5818 (snippet
5819 '(begin
5820 (delete-file "antlr.jar")
5821 (substitute* "lib/cpp/antlr/CharScanner.hpp"
5822 (("#include <map>")
5823 (string-append
6d225e89
RW
5824 "#include <map>\n"
5825 "#define EOF (-1)\n"
5826 "#include <strings.h>")))
9f68e74a 5827 (substitute* "configure"
6d225e89
RW
5828 (("/bin/sh") "sh"))
5829 #t))))
9f68e74a
JL
5830 (build-system gnu-build-system)
5831 (arguments
6d225e89 5832 `(#:tests? #f ; no test target
3ad90395
RW
5833 #:imported-modules ((guix build ant-build-system)
5834 (guix build syscalls)
5835 ,@%gnu-build-system-modules)
5836 #:modules (((guix build ant-build-system) #:prefix ant:)
5837 (guix build gnu-build-system)
5838 (guix build utils))
9f68e74a
JL
5839 #:phases
5840 (modify-phases %standard-phases
5841 (add-after 'install 'strip-jar-timestamps
3ad90395 5842 (assoc-ref ant:%standard-phases 'strip-jar-timestamps))
9f68e74a
JL
5843 (add-after 'configure 'fix-bin-ls
5844 (lambda _
3ad90395
RW
5845 (substitute* (find-files "." "Makefile")
5846 (("/bin/ls") "ls"))
5847 #t)))))
9f68e74a
JL
5848 (native-inputs
5849 `(("which" ,which)
5850 ("zip" ,zip)
5851 ("java" ,icedtea "jdk")))
5852 (inputs
5853 `(("java" ,icedtea)))
5854 (home-page "http://www.antlr2.org")
5855 (synopsis "Framework for constructing recognizers, compilers, and translators")
5856 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
5857is a language tool that provides a framework for constructing recognizers,
5858compilers, and translators from grammatical descriptions containing Java, C#,
5859C++, or Python actions. ANTLR provides excellent support for tree construction,
5860tree walking, and translation.")
5861 (license license:public-domain)))
a0f15eff 5862
e44112e1 5863(define-public java-stringtemplate-3
a0f15eff 5864 (package
e44112e1 5865 (name "java-stringtemplate")
a0f15eff
JL
5866 (version "3.2.1")
5867 (source (origin
5868 (method url-fetch)
5869 (uri (string-append "https://github.com/antlr/website-st4/raw/"
5870 "gh-pages/download/stringtemplate-"
5871 version ".tar.gz"))
5872 (sha256
5873 (base32
5874 "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is"))))
5875 (build-system ant-build-system)
5876 (arguments
129d926d 5877 `(#:jar-name (string-append ,name "-" ,version ".jar")
2fcda6d2 5878 #:test-dir "test"
b101b4e8
RW
5879 #:modules ((guix build ant-build-system)
5880 (guix build utils)
5881 (srfi srfi-1))
a0f15eff
JL
5882 #:phases
5883 (modify-phases %standard-phases
2fcda6d2
RW
5884 (add-before 'check 'fix-tests
5885 (lambda _
5886 (substitute* "build.xml"
5887 (("\\$\\{test.home\\}/java")
5888 "${test.home}/org"))
5889 #t))
a0f15eff
JL
5890 (add-before 'build 'generate-grammar
5891 (lambda _
b101b4e8
RW
5892 (with-directory-excursion "src/org/antlr/stringtemplate/language/"
5893 (every (lambda (file)
5894 (format #t "~a\n" file)
5895 (zero? (system* "antlr" file)))
5896 '("template.g" "angle.bracket.template.g" "action.g"
5897 "eval.g" "group.g" "interface.g"))))))))
a0f15eff 5898 (native-inputs
2fcda6d2
RW
5899 `(("antlr" ,antlr2)
5900 ("java-junit" ,java-junit)))
a0f15eff
JL
5901 (home-page "http://www.stringtemplate.org")
5902 (synopsis "Template engine to generate formatted text output")
5903 (description "StringTemplate is a java template engine (with ports for C#,
5904Objective-C, JavaScript, Scala) for generating source code, web pages, emails,
5905or any other formatted text output. StringTemplate is particularly good at
5906code generators, multiple site skins, and internationalization / localization.
5907StringTemplate also powers ANTLR.")
5908 (license license:bsd-3)))
4ad8aed7
JL
5909
5910;; antlr3 is partially written using antlr3 grammar files. It also depends on
5911;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar
5912;; files and uses antlr3 at runtime. The latest version requires a recent version
5913;; of antlr3 at runtime.
5914;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3.
5915;; This version of ST4 is sufficient for the latest antlr3.
5916;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build
5917;; the latest ST4 with it. Then we build our final antlr3 that will be linked
5918;; against the latest ST4.
5919;; antlr3.3 still depends on antlr3 to generate some files, so we use an
5920;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses
5921;; only grammar files with the antlr2 syntax.
5922;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3.
5923
64b7efc0 5924(define-public java-stringtemplate
407df789 5925 (package (inherit java-stringtemplate-3)
64b7efc0 5926 (name "java-stringtemplate")
4ad8aed7
JL
5927 (version "4.0.8")
5928 (source (origin
5929 (method url-fetch)
5930 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/"
5931 version ".tar.gz"))
5932 (file-name (string-append name "-" version ".tar.gz"))
5933 (sha256
5934 (base32
5935 "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087"))))
5936 (build-system ant-build-system)
5937 (arguments
6db77c7c
RW
5938 `(#:jar-name (string-append ,name "-" ,version ".jar")
5939 #:tests? #f ; FIXME: tests fail for unknown reasons
5940 #:test-dir "test"
f4aa4cfe
RW
5941 #:modules ((guix build ant-build-system)
5942 (guix build utils)
5943 (srfi srfi-1))
4ad8aed7
JL
5944 #:phases
5945 (modify-phases %standard-phases
6db77c7c
RW
5946 (add-before 'check 'fix-test-target
5947 (lambda _
5948 (substitute* "build.xml"
5949 (("\\$\\{test.home\\}/java") "${test.home}/")
5950 (("\\*Test.java") "Test*.java"))
5951 #t))
4ad8aed7 5952 (add-before 'build 'generate-grammar
f4aa4cfe
RW
5953 (lambda _
5954 (with-directory-excursion "src/org/stringtemplate/v4/compiler/"
5955 (every (lambda (file)
5956 (format #t "~a\n" file)
5957 (zero? (system* "antlr3" file)))
5958 '("STParser.g" "Group.g" "CodeGenerator.g"))))))))
4ad8aed7
JL
5959 (inputs
5960 `(("antlr3" ,antlr3-bootstrap)
5961 ("antlr2" ,antlr2)
6db77c7c
RW
5962 ("java-stringtemplate" ,java-stringtemplate-3)
5963 ("java-junit" ,java-junit)))))
4ad8aed7 5964
1345eeb0 5965(define java-stringtemplate-4.0.6
64b7efc0 5966 (package (inherit java-stringtemplate)
1345eeb0 5967 (name "java-stringtemplate")
4ad8aed7
JL
5968 (version "4.0.6")
5969 (source (origin
5970 (method url-fetch)
5971 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-"
5972 version ".tar.gz"))
5973 (file-name (string-append name "-" version ".tar.gz"))
5974 (sha256
5975 (base32
5976 "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp"))))
5977 (inputs
5978 `(("antlr3" ,antlr3-3.3)
5979 ("antlr2" ,antlr2)
e44112e1 5980 ("java-stringtemplate" ,java-stringtemplate-3)))))
4ad8aed7
JL
5981
5982(define-public antlr3
5983 (package
5984 (name "antlr3")
5985 (version "3.5.2")
5986 (source (origin
5987 (method url-fetch)
5988 (uri (string-append "https://github.com/antlr/antlr3/archive/"
5989 version ".tar.gz"))
5990 (file-name (string-append name "-" version ".tar.gz"))
5991 (sha256
5992 (base32
fd75eb6c 5993 "0218v683081lg54z9hvjxinhxd4dqp870jx6n39gslm0bkyi4vd6"))))
4ad8aed7
JL
5994 (build-system ant-build-system)
5995 (arguments
5996 `(#:jar-name (string-append ,name "-" ,version ".jar")
5997 #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3"
5998 #:tests? #f
5999 #:phases
6000 (modify-phases %standard-phases
6001 (add-after 'install 'bin-install
6002 (lambda* (#:key inputs outputs #:allow-other-keys)
6003 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
6004 (bin (string-append (assoc-ref outputs "out") "/bin")))
6005 (mkdir-p bin)
6006 (with-output-to-file (string-append bin "/antlr3")
6007 (lambda _
6008 (display
6009 (string-append "#!" (which "sh") "\n"
6010 "java -cp " jar "/" ,name "-" ,version ".jar:"
6011 (string-concatenate
6012 (find-files (assoc-ref inputs "stringtemplate")
6013 ".*\\.jar"))
6014 ":"
6015 (string-concatenate
6016 (find-files (assoc-ref inputs "stringtemplate4")
6017 ".*\\.jar"))
6018 ":"
6019 (string-concatenate
6020 (find-files (string-append
6021 (assoc-ref inputs "antlr")
6022 "/lib")
6023 ".*\\.jar"))
6024 " org.antlr.Tool $*"))))
6025 (chmod (string-append bin "/antlr3") #o755))))
6026 (add-before 'build 'generate-grammar
6027 (lambda _
6028 (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/")
6029 (for-each (lambda (file)
6030 (display file)
6031 (newline)
6032 (system* "antlr3" file))
6033 '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g"
6034 "AssignTokenTypesWalker.g"
6035 "ActionTranslator.g" "TreeToNFAConverter.g"
6036 "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g"
6037 "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g"))
6038 (substitute* "ANTLRParser.java"
6039 (("public Object getTree") "public GrammarAST getTree"))
6040 (substitute* "ANTLRv3Parser.java"
6041 (("public Object getTree") "public CommonTree getTree"))
6042 (chdir "../../../../../java")
6043 (system* "antlr" "-o" "org/antlr/tool"
6044 "org/antlr/tool/serialize.g")
6045 (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java"
6046 (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*;
6047import org.antlr.grammar.v3.ANTLRTreePrinter;"))
6048 (substitute* "org/antlr/tool/ErrorManager.java"
6049 (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") ""))
6050 (chdir "../../../..")))
6051 (add-before 'build 'fix-build-xml
6052 (lambda _
6053 (substitute* "build.xml"
6054 (("<exec") "<copy todir=\"${classes.dir}\">
6055<fileset dir=\"tool/src/main/resources\">
6056<include name=\"**/*.stg\"/>
6057<include name=\"**/*.st\"/>
6058<include name=\"**/*.sti\"/>
6059<include name=\"**/STLexer.tokens\"/>
6060</fileset>
6061</copy><exec")))))))
6062 (native-inputs
6063 `(("antlr" ,antlr2)
6064 ("antlr3" ,antlr3-bootstrap)))
6065 (inputs
6066 `(("junit" ,java-junit)
e44112e1 6067 ("stringtemplate" ,java-stringtemplate-3)
64b7efc0 6068 ("stringtemplate4" ,java-stringtemplate)))
4ad8aed7 6069 (propagated-inputs
e44112e1 6070 `(("stringtemplate" ,java-stringtemplate-3)
4ad8aed7 6071 ("antlr" ,antlr2)
1345eeb0 6072 ("stringtemplate4" ,java-stringtemplate-4.0.6)))
4ad8aed7
JL
6073 (home-page "http://www.antlr3.org")
6074 (synopsis "Framework for constructing recognizers, compilers, and translators")
6075 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
6076is a language tool that provides a framework for constructing recognizers,
6077compilers, and translators from grammatical descriptions containing Java, C#,
6078C++, or Python actions. ANTLR provides excellent support for tree construction,
6079tree walking, and translation.")
6080 (license license:bsd-3)))
6081
6082(define antlr3-bootstrap
6083 (package
6084 (inherit antlr3)
6085 (name "antlr3-bootstrap")
6086 (native-inputs
6087 `(("antlr" ,antlr2)
6088 ("antlr3" ,antlr3-3.3)))
6089 (inputs
6090 `(("junit" ,java-junit)))))
6091
6092(define antlr3-3.3
6093 (package
6094 (inherit antlr3)
6095 (name "antlr3")
6096 (version "3.3")
6097 (source (origin
6098 (method url-fetch)
6099 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
6100 "gh-pages/download/antlr-"
6101 version ".tar.gz"))
6102 (sha256
6103 (base32
48c86220
GB
6104 "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m"))
6105 (patches
6106 (search-patches "antlr3-3_3-fix-java8-compilation.patch"))))
4ad8aed7
JL
6107 (arguments
6108 `(#:jar-name (string-append ,name "-" ,version ".jar")
a9540107
RW
6109 #:source-dir (string-join '("tool/src/main/java"
6110 "runtime/Java/src/main/java"
6111 "tool/src/main/antlr2"
6112 "tool/src/main/antlr3")
6113 ":")
6114 #:tests? #f ; FIXME: tests seem to require maven plugin
6115 #:modules ((guix build ant-build-system)
6116 (guix build utils)
6117 (srfi srfi-1))
4ad8aed7
JL
6118 #:phases
6119 (modify-phases %standard-phases
6120 (add-after 'install 'bin-install
6121 (lambda* (#:key inputs outputs #:allow-other-keys)
a9540107
RW
6122 (let* ((out (assoc-ref outputs "out"))
6123 (jar (string-append out "/share/java"))
6124 (bin (string-append out "/bin")))
4ad8aed7
JL
6125 (mkdir-p bin)
6126 (with-output-to-file (string-append bin "/antlr3")
6127 (lambda _
6128 (display
a9540107
RW
6129 (string-append
6130 "#!" (which "sh") "\n"
6131 "java -cp " jar "/antlr3-3.3.jar:"
6132 (string-join
6133 (append (find-files (assoc-ref inputs "java-stringtemplate")
6134 ".*\\.jar$")
6135 (find-files (string-append (assoc-ref inputs "antlr")
6136 "/lib")
6137 ".*\\.jar$"))
6138 ":")
6139 " org.antlr.Tool $*"))))
6140 (chmod (string-append bin "/antlr3") #o755)
6141 #t)))
4ad8aed7
JL
6142 (add-before 'build 'generate-grammar
6143 (lambda _
4ad8aed7
JL
6144 (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java"
6145 (("import org.antlr.grammar.v2.\\*;")
6146 "import org.antlr.grammar.v2.*;\n
6147import org.antlr.grammar.v2.TreeToNFAConverter;\n
6148import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n
a9540107
RW
6149import org.antlr.grammar.v2.ANTLRTreePrinter;"))
6150 (and
6151 (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/"
6152 (every (lambda (file)
6153 (format #t "~a\n" file)
6154 (zero? (system* "antlr" file)))
6155 '("antlr.g" "antlr.print.g" "assign.types.g"
6156 "buildnfa.g" "codegen.g" "define.g")))
6157 (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/"
6158 (every (lambda (file)
6159 (format #t "~a\n" file)
6160 (zero? (system* "antlr3" file)))
6161 '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g"
6162 "ANTLRv3Tree.g"))))))
4ad8aed7
JL
6163 (add-before 'build 'fix-build-xml
6164 (lambda _
6165 (substitute* "build.xml"
6166 (("<exec") "<copy todir=\"${classes.dir}\">
6167<fileset dir=\"tool/src/main/resources\">
6168<include name=\"**/*.stg\"/>
6169<include name=\"**/*.st\"/>
6170<include name=\"**/*.sti\"/>
6171<include name=\"**/STLexer.tokens\"/>
6172</fileset>
a9540107
RW
6173</copy><exec"))
6174 #t)))))
4ad8aed7
JL
6175 (native-inputs
6176 `(("antlr" ,antlr2)
6177 ("antlr3" ,antlr3-3.1)))
6178 (inputs
6179 `(("junit" ,java-junit)))
6180 (propagated-inputs
e44112e1 6181 `(("java-stringtemplate" ,java-stringtemplate-3)
4ad8aed7
JL
6182 ("antlr" ,antlr2)
6183 ("antlr3" ,antlr3-3.1)))))
6184
6185(define antlr3-3.1
6186 (package
6187 (inherit antlr3)
4ad8aed7
JL
6188 (version "3.1")
6189 (source (origin
6190 (method url-fetch)
6191 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
6192 "gh-pages/download/antlr-"
6193 version ".tar.gz"))
6194 (sha256
6195 (base32
4c763b4d
GB
6196 "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z"))
6197 (patches
6198 (search-patches "antlr3-3_1-fix-java8-compilation.patch"))))
4ad8aed7 6199 (arguments
ec32bc98 6200 `(#:jar-name (string-append "antlr3-" ,version ".jar")
4ad8aed7
JL
6201 #:source-dir "src:runtime/Java/src"
6202 #:tests? #f
6203 #:phases
6204 (modify-phases %standard-phases
6205 (add-after 'install 'bin-install
6206 (lambda* (#:key inputs outputs #:allow-other-keys)
6207 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
6208 (bin (string-append (assoc-ref outputs "out") "/bin")))
6209 (mkdir-p bin)
6210 (with-output-to-file (string-append bin "/antlr3")
6211 (lambda _
6212 (display
6213 (string-append "#!" (which "sh") "\n"
57e37764 6214 "java -cp " jar "/antlr3-3.1.jar:"
4ad8aed7
JL
6215 (string-concatenate
6216 (find-files (assoc-ref inputs "stringtemplate")
6217 ".*\\.jar"))
6218 ":"
6219 (string-concatenate
6220 (find-files (string-append
6221 (assoc-ref inputs "antlr")
6222 "/lib")
6223 ".*\\.jar"))
6224 " org.antlr.Tool $*"))))
6225 (chmod (string-append bin "/antlr3") #o755))))
6226 (add-before 'build 'generate-grammar
6227 (lambda _
6228 (let ((dir "src/org/antlr/tool/"))
6229 (for-each (lambda (file)
6230 (display file)
6231 (newline)
13f38d31 6232 (invoke "antlr" "-o" dir (string-append dir file)))
4ad8aed7
JL
6233 '("antlr.g" "antlr.print.g" "assign.types.g"
6234 "buildnfa.g" "define.g")))
6235 (format #t "codegen.g\n")
13f38d31
RW
6236 (invoke "antlr" "-o" "src/org/antlr/codegen"
6237 "src/org/antlr/codegen/codegen.g")
6238 #t))
4ad8aed7
JL
6239 (add-before 'build 'fix-build-xml
6240 (lambda _
6241 (substitute* "build.xml"
6242 (("<exec") "<copy todir=\"${classes.dir}\">
6243<fileset dir=\"src\">
6244<include name=\"**/*.stg\"/>
6245<include name=\"**/*.st\"/>
6246<include name=\"**/*.sti\"/>
6247<include name=\"**/STLexer.tokens\"/>
6248</fileset>
6249</copy><exec")))))))
6250 (native-inputs
6251 `(("antlr" ,antlr2)))
6252 (inputs
6253 `(("junit" ,java-junit)))
6254 (propagated-inputs
e44112e1 6255 `(("stringtemplate" ,java-stringtemplate-3)))))
d44bcd7a 6256
742242a5
GB
6257(define-public java-commons-cli-1.2
6258 ;; This is a bootstrap dependency for Maven2.
6259 (package
6260 (inherit java-commons-cli)
6261 (version "1.2")
6262 (source (origin
6263 (method url-fetch)
6264 (uri (string-append "mirror://apache/commons/cli/source/"
6265 "commons-cli-" version "-src.tar.gz"))
6266 (sha256
6267 (base32
6268 "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm"))))
6269 (arguments
6270 `(#:jar-name "commons-cli.jar"
6271 #:phases
6272 (modify-phases %standard-phases
6273 (add-before 'check 'fix-build-xml
6274 (lambda* (#:key inputs #:allow-other-keys)
6275 (substitute* "build.xml"
6276 (("dir=\"\\$\\{test.home\\}/java\"")
6277 "dir=\"${test.home}\""))
6278 #t)))))
6279 (native-inputs
6280 `(("java-junit" ,java-junit)))))
30deadee
JL
6281
6282(define-public java-microemulator-cldc
6283 (package
6284 (name "java-microemulator-cldc")
6285 (version "2.0.4")
6286 (source (origin
6287 (method url-fetch)
6288 (uri (string-append "https://github.com/barteo/microemu/archive/"
6289 "microemulator_"
6290 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
6291 version)
6292 ".tar.gz"))
6293 (file-name (string-append name "-" version ".tar.gz"))
6294 (sha256
6295 (base32
6296 "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll"))))
6297 (build-system ant-build-system)
6298 (arguments
6299 `(#:jar-name "microemulator-cldc.jar"
6300 #:source-dir "microemu-cldc/src/main/java"
6301 #:tests? #f)); Requires even older software
6302 (home-page "https://github.com/barteo/microemu")
6303 (synopsis "J2ME CLDC emulator")
6304 (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP
6305Emulator. It allows to demonstrate MIDlet based applications in web browser
6306applet and can be run as a standalone java application.")
6307 (license (list license:asl2.0
6308 ;; or altenatively:
6309 license:lgpl2.1+))))
8e2f3e5e
JL
6310
6311(define-public java-datanucleus-javax-persistence
6312 (package
6313 (name "java-datanucleus-javax-persistence")
6314 (version "2.2.0")
6315 (source (origin
6316 (method url-fetch)
6317 (uri (string-append "https://github.com/datanucleus/"
6318 "javax.persistence/archive/javax.persistence-"
6319 version "-release.tar.gz"))
6320 (sha256
6321 (base32
6322 "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx"))))
6323 (build-system ant-build-system)
6324 (arguments
6325 `(#:jar-name "java-datanucleus-javax-persistence.jar"
6326 #:jdk ,icedtea-8
6327 #:source-dir "src/main/java"
6328 #:tests? #f)); no tests
6329 (home-page "https://github.com/datanucleus/javax.persistence")
6330 (synopsis "JPA API")
6331 (description "This package contains a clean definition of JPA API intended
6332for use with DataNucleus JPA since the JCP haven't provided an official JPA API
6333jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification
6334used to generate this API.")
6335 (license (list license:edl1.0 license:epl1.0))))
3240ddbf
JL
6336
6337(define-public java-osgi-cmpn
6338 (package
6339 (name "java-osgi-cmpn")
6340 (version "6.0.0")
6341 (source (origin
6342 (method url-fetch)
6343 (uri (string-append "http://central.maven.org/maven2/"
6344 "org/osgi/osgi.cmpn/" version "/osgi.cmpn-"
6345 version "-sources.jar"))
6346 (sha256
6347 (base32
6348 "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys"))))
6349 (build-system ant-build-system)
6350 (arguments
6351 `(#:jar-name "osgi-cmpn.jar"
6352 #:tests? #f)); no tests
6353 (inputs
6354 `(("annotation" ,java-osgi-annotation)
6355 ("core" ,java-osgi-core)
6356 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
6357 ("microemulator" ,java-microemulator-cldc)
6358 ("servlet" ,java-classpathx-servletapi)))
c353d014 6359 (home-page "https://www.osgi.org")
3240ddbf
JL
6360 (synopsis "Compendium specification module of OSGi framework")
6361 (description
6362 "OSGi, for Open Services Gateway initiative framework, is a module system
6363and service platform for the Java programming language. This package contains
6364the compendium specification module, providing interfaces and classes for use
6365in compiling bundles.")
6366 (license license:asl2.0)))
747c7574
JL
6367
6368(define-public java-osgi-service-component-annotations
6369 (package
6370 (name "java-osgi-service-component-annotations")
6371 (version "1.3.0")
6372 (source (origin
6373 (method url-fetch)
6374 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6375 "org.osgi.service.component.annotations/"
6376 version "/org.osgi.service.component.annotations-"
6377 version "-sources.jar"))
6378 (sha256
6379 (base32
6380 "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0"))))
6381 (build-system ant-build-system)
6382 (arguments
6383 `(#:jar-name "osgi-service-component-annotations.jar"
6384 #:tests? #f)); no tests
6385 (inputs
6386 `(("annotation" ,java-osgi-annotation)))
c353d014 6387 (home-page "https://www.osgi.org")
747c7574
JL
6388 (synopsis "Support annotations for osgi-service-component")
6389 (description
6390 "OSGi, for Open Services Gateway initiative framework, is a module system
6391and service platform for the Java programming language. This package contains
6392the support annotations for osgi-service-component.")
6393 (license license:asl2.0)))
999b5fb4
JL
6394
6395(define-public java-osgi-dto
6396 (package
6397 (name "java-osgi-dto")
6398 (version "1.0.0")
6399 (source (origin
6400 (method url-fetch)
6401 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6402 "org.osgi.dto/" version "/org.osgi.dto-"
6403 version "-sources.jar"))
6404 (sha256
6405 (base32
6406 "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr"))))
6407 (build-system ant-build-system)
6408 (arguments
6409 `(#:jar-name "osgi-dto.jar"
6410 #:tests? #f)); no tests
6411 (inputs
6412 `(("annotation" ,java-osgi-annotation)))
c353d014 6413 (home-page "https://www.osgi.org")
999b5fb4
JL
6414 (synopsis "Data Transfer Objects")
6415 (description
6416 "OSGi, for Open Services Gateway initiative framework, is a module system
6417and service platform for the Java programming language. This package contains
6418the Data Transfer Objects. It is easily serializable having only public fields
6419of primitive types and their wrapper classes, Strings, and DTOs. List, Set,
6420Map and array aggregates may also be used. The aggregates must only hold
6421objects of the listed types or aggregates.")
6422 (license license:asl2.0)))
c304ce6a
JL
6423
6424(define-public java-osgi-resource
6425 (package
6426 (name "java-osgi-resource")
6427 (version "1.0.0")
6428 (source (origin
6429 (method url-fetch)
6430 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6431 "org.osgi.resource/"
6432 version "/org.osgi.resource-"
6433 version "-sources.jar"))
6434 (sha256
6435 (base32
6436 "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d"))))
6437 (build-system ant-build-system)
6438 (arguments
6439 `(#:jar-name "osgi-resource.jar"
6440 #:tests? #f)); no tests
6441 (inputs
6442 `(("annotation" ,java-osgi-annotation)
6443 ("dto" ,java-osgi-dto)))
c353d014 6444 (home-page "https://www.osgi.org")
c304ce6a
JL
6445 (synopsis "OSGI Resource")
6446 (description
6447 "OSGi, for Open Services Gateway initiative framework, is a module system
6448and service platform for the Java programming language. This package contains
6449the definition of common types in osgi packages.")
6450 (license license:asl2.0)))
c2b14516
JL
6451
6452(define-public java-osgi-namespace-contract
6453 (package
6454 (name "java-osgi-namespace-contract")
6455 (version "1.0.0")
6456 (source (origin
6457 (method url-fetch)
6458 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6459 "org.osgi.namespace.contract/"
6460 version "/org.osgi.namespace.contract-"
6461 version "-sources.jar"))
6462 (sha256
6463 (base32
6464 "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36"))))
6465 (build-system ant-build-system)
6466 (inputs
6467 `(("resource" ,java-osgi-resource)
6468 ("annotation" ,java-osgi-annotation)))
6469 (arguments
6470 `(#:jar-name "osgi-namespace-contract.jar"
6471 #:tests? #f)); no tests
c353d014 6472 (home-page "https://www.osgi.org")
c2b14516
JL
6473 (synopsis "Contract Capability and Requirement Namespace")
6474 (description
6475 "OSGi, for Open Services Gateway initiative framework, is a module system
6476and service platform for the Java programming language. This package contains
6477the names for the attributes and directives for a namespace with contracts.")
6478 (license license:asl2.0)))
f809c963
JL
6479
6480(define-public java-osgi-namespace-extender
6481 (package
6482 (name "java-osgi-namespace-extender")
6483 (version "1.0.1")
6484 (source (origin
6485 (method url-fetch)
6486 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6487 "org.osgi.namespace.extender/"
6488 version "/org.osgi.namespace.extender-"
6489 version "-sources.jar"))
6490 (sha256
6491 (base32
6492 "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz"))))
6493 (build-system ant-build-system)
6494 (inputs
6495 `(("resource" ,java-osgi-resource)
6496 ("annotation" ,java-osgi-annotation)))
6497 (arguments
6498 `(#:jar-name "osgi-namespace-extendent.jar"
6499 #:tests? #f)); no tests
c353d014 6500 (home-page "https://www.osgi.org")
f809c963
JL
6501 (synopsis "Extender Capability and Requirement Namespace")
6502 (description
6503 "OSGi, for Open Services Gateway initiative framework, is a module system
6504and service platform for the Java programming language. This package contains
b784962d
JL
6505the names for the attributes and directives for an extender namespace.")
6506 (license license:asl2.0)))
6507
6508(define-public java-osgi-namespace-service
6509 (package
6510 (name "java-osgi-namespace-service")
6511 (version "1.0.0")
6512 (source (origin
6513 (method url-fetch)
6514 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6515 "org.osgi.namespace.service/"
6516 version "/org.osgi.namespace.service-"
6517 version "-sources.jar"))
6518 (sha256
6519 (base32
6520 "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8"))))
6521 (build-system ant-build-system)
6522 (inputs
6523 `(("resource" ,java-osgi-resource)
6524 ("annotation" ,java-osgi-annotation)))
6525 (arguments
6526 `(#:jar-name "osgi-namespace-service.jar"
6527 #:tests? #f)); no tests
c353d014 6528 (home-page "https://www.osgi.org")
b784962d
JL
6529 (synopsis "Service Capability and Requirement Namespace")
6530 (description
6531 "OSGi, for Open Services Gateway initiative framework, is a module system
6532and service platform for the Java programming language. This package contains
6533the names for the attributes and directives for a service namespace.")
f809c963 6534 (license license:asl2.0)))
0f0c5218
JL
6535
6536(define-public java-osgi-util-function
6537 (package
6538 (name "java-osgi-util-function")
6539 (version "1.0.0")
6540 (source (origin
6541 (method url-fetch)
6542 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6543 "org.osgi.util.function/"
6544 version "/org.osgi.util.function-"
6545 version "-sources.jar"))
6546 (sha256
6547 (base32
6548 "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x"))))
6549 (build-system ant-build-system)
6550 (arguments
6551 `(#:jar-name "osgi-util-function.jar"
6552 #:tests? #f)); no tests
6553 (inputs
6554 `(("annotation" ,java-osgi-annotation)))
c353d014 6555 (home-page "https://www.osgi.org")
0f0c5218
JL
6556 (synopsis "OSGI Util Function")
6557 (description
6558 "OSGi, for Open Services Gateway initiative framework, is a module system
6559and service platform for the Java programming language. This package contains
6560an interface for a function that accepts a single argument and produces a result.")
6561 (license license:asl2.0)))
27103135
JL
6562
6563(define-public java-osgi-util-promise
6564 (package
6565 (name "java-osgi-util-promise")
6566 (version "1.0.0")
6567 (source (origin
6568 (method url-fetch)
6569 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6570 "org.osgi.util.promise/"
6571 version "/org.osgi.util.promise-"
6572 version "-sources.jar"))
6573 (sha256
6574 (base32
6575 "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c"))))
6576 (build-system ant-build-system)
6577 (arguments
6578 `(#:jar-name "osgi-util-promise.jar"
6579 #:tests? #f)); no tests
6580 (inputs
6581 `(("annotation" ,java-osgi-annotation)
6582 ("function" ,java-osgi-util-function)))
c353d014 6583 (home-page "https://www.osgi.org")
27103135
JL
6584 (synopsis "Promise of a value")
6585 (description
6586 "OSGi, for Open Services Gateway initiative framework, is a module system
6587and service platform for the Java programming language. This package contains
6588an interface and utilitary classes for promises. A Promise represents a future
6589value. It handles the interactions for asynchronous processing.")
6590 (license license:asl2.0)))
2b1fdb2b
JL
6591
6592(define-public java-osgi-service-metatype-annotations
6593 (package
6594 (name "java-osgi-service-metatype-annotations")
6595 (version "1.3.0")
6596 (source (origin
6597 (method url-fetch)
6598 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6599 "org.osgi.service.metatype.annotations/"
6600 version "/org.osgi.service.metatype.annotations-"
6601 version "-sources.jar"))
6602 (sha256
6603 (base32
6604 "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6"))))
6605 (build-system ant-build-system)
6606 (arguments
6607 `(#:jar-name "osgi-service-metatype-annotations.jar"
6608 #:tests? #f)); no tests
6609 (inputs
6610 `(("annotation" ,java-osgi-annotation)))
c353d014 6611 (home-page "https://www.osgi.org")
2b1fdb2b
JL
6612 (synopsis "Support annotations for metatype")
6613 (description
6614 "OSGi, for Open Services Gateway initiative framework, is a module system
6615and service platform for the Java programming language. This package contains
6616the support annotations for metatype.")
6617 (license license:asl2.0)))
a13acfbe
JL
6618
6619(define-public java-osgi-service-repository
6620 (package
6621 (name "java-osgi-service-repository")
6622 (version "1.1.0")
6623 (source (origin
6624 (method url-fetch)
6625 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6626 "org.osgi.service.repository/"
6627 version "/org.osgi.service.repository-"
6628 version "-sources.jar"))
6629 (sha256
6630 (base32
6631 "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n"))))
6632 (build-system ant-build-system)
6633 (arguments
6634 `(#:jar-name "osgi-service-repository.jar"
6635 #:tests? #f)); no tests
6636 (inputs
6637 `(("annotation" ,java-osgi-annotation)
6638 ("promise" ,java-osgi-util-promise)
6639 ("resource" ,java-osgi-resource)))
c353d014 6640 (home-page "https://www.osgi.org")
a13acfbe
JL
6641 (synopsis "OSGI service repository")
6642 (description
6643 "OSGi, for Open Services Gateway initiative framework, is a module system
6644and service platform for the Java programming language. This package contains
6645a repository service that contains resources.")
6646 (license license:asl2.0)))
dfd91541
JL
6647
6648(define-public java-osgi-framework
6649 (package
6650 (name "java-osgi-framework")
6651 (version "1.8.0")
6652 (source (origin
6653 (method url-fetch)
6654 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6655 "org.osgi.framework/" version "/org.osgi.framework-"
6656 version "-sources.jar"))
6657 (sha256
6658 (base32
6659 "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s"))))
6660 (build-system ant-build-system)
6661 (arguments
6662 `(#:jar-name "osgi-framework.jar"
6663 #:tests? #f)); no tests
6664 (inputs
6665 `(("annotation" ,java-osgi-annotation)
6666 ("resource" ,java-osgi-resource)
6667 ("dto" ,java-osgi-dto)))
c353d014 6668 (home-page "https://www.osgi.org")
dfd91541
JL
6669 (synopsis "OSGi framework")
6670 (description
6671 "OSGi, for Open Services Gateway initiative framework, is a module system
6672and service platform for the Java programming language.")
6673 (license license:asl2.0)))
98c9f16c
JL
6674
6675(define-public java-osgi-service-log
6676 (package
6677 (name "java-osgi-service-log")
6678 (version "1.3.0")
6679 (source (origin
6680 (method url-fetch)
6681 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6682 "org.osgi.service.log/"
6683 version "/org.osgi.service.log-"
6684 version "-sources.jar"))
6685 (sha256
6686 (base32
6687 "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0"))))
6688 (build-system ant-build-system)
6689 (arguments
6690 `(#:jar-name "osgi-service-log.jar"
6691 #:tests? #f)); no tests
6692 (inputs
6693 `(("java-osgi-framework" ,java-osgi-framework)))
c353d014 6694 (home-page "https://www.osgi.org")
98c9f16c
JL
6695 (synopsis "Provides methods for bundles to write messages to the log")
6696 (description
6697 "OSGi, for Open Services Gateway initiative framework, is a module system
6698and service platform for the Java programming language. This package contains
6699the log service.")
6700 (license license:asl2.0)))
dd76d44b
JL
6701
6702(define-public java-osgi-service-jdbc
6703 (package
6704 (name "java-osgi-service-jdbc")
6705 (version "1.0.0")
6706 (source (origin
6707 (method url-fetch)
6708 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6709 "org.osgi.service.jdbc/"
6710 version "/org.osgi.service.jdbc-"
6711 version "-sources.jar"))
6712 (sha256
6713 (base32
6714 "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz"))))
6715 (build-system ant-build-system)
6716 (arguments
6717 `(#:jar-name "osgi-service-jdbc.jar"
6718 #:tests? #f)); no tests
c353d014 6719 (home-page "https://www.osgi.org")
dd76d44b
JL
6720 (synopsis "Factory for JDBC connection factories")
6721 (description
6722 "OSGi, for Open Services Gateway initiative framework, is a module system
6723and service platform for the Java programming language. This package contains
6724a factory for JDBC connection factories. There are 3 preferred connection
6725factories for getting JDBC connections:
6726
6727@itemize
6728@item @code{javax.sql.DataSource};
6729@item @code{javax.sql.ConnectionPoolDataSource};
6730@item @code{javax.sql.XADataSource}.
6731@end itemize")
6732 (license license:asl2.0)))
291d3f22
JL
6733
6734(define-public java-osgi-service-resolver
6735 (package
6736 (name "java-osgi-service-resolver")
6737 (version "1.0.1")
6738 (source (origin
6739 (method url-fetch)
6740 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6741 "org.osgi.service.resolver/"
6742 version "/org.osgi.service.resolver-"
6743 version "-sources.jar"))
6744 (sha256
6745 (base32
6746 "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd"))))
6747 (build-system ant-build-system)
6748 (arguments
6749 `(#:jar-name "osgi-service-resolver.jar"
6750 #:tests? #f)); no tests
6751 (inputs
6752 `(("annotation" ,java-osgi-annotation)
6753 ("resource" ,java-osgi-resource)))
c353d014 6754 (home-page "https://www.osgi.org")
291d3f22
JL
6755 (synopsis "OSGI Resolver service")
6756 (description
6757 "OSGi, for Open Services Gateway initiative framework, is a module system
6758and service platform for the Java programming language. This package contains
6759a resolver service that resolves the specified resources in the context supplied
6760by the caller.")
6761 (license license:asl2.0)))
1884bb81
JL
6762
6763(define-public java-osgi-util-tracker
6764 (package
6765 (name "java-osgi-util-tracker")
6766 (version "1.5.1")
6767 (source (origin
6768 (method url-fetch)
6769 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6770 "org.osgi.util.tracker/"
6771 version "/org.osgi.util.tracker-"
6772 version "-sources.jar"))
6773 (sha256
6774 (base32
6775 "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz"))))
6776 (build-system ant-build-system)
6777 (arguments
6778 `(#:jar-name "osgi-util-tracker.jar"
6779 #:tests? #f)); no tests
6780 (inputs
6781 `(("framework" ,java-osgi-framework)
6782 ("annotation" ,java-osgi-annotation)))
c353d014 6783 (home-page "https://www.osgi.org")
1884bb81
JL
6784 (synopsis "Bundle tracking")
6785 (description
6786 "OSGi, for Open Services Gateway initiative framework, is a module system
6787and service platform for the Java programming language. This package contains
6788bundle tracking utility classes.")
6789 (license license:asl2.0)))
fb9c48b8
JL
6790
6791(define-public java-osgi-service-cm
6792 (package
6793 (name "java-osgi-service-cm")
6794 (version "1.5.0")
6795 (source (origin
6796 (method url-fetch)
6797 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6798 "org.osgi.service.cm/"
6799 version "/org.osgi.service.cm-"
6800 version "-sources.jar"))
6801 (sha256
6802 (base32
6803 "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6"))))
6804 (build-system ant-build-system)
6805 (arguments
6806 `(#:jar-name "osgi-service-cm.jar"
6807 #:tests? #f)); no tests
6808 (inputs
6809 `(("framework" ,java-osgi-framework)
6810 ("annotation" ,java-osgi-annotation)))
c353d014 6811 (home-page "https://www.osgi.org")
fb9c48b8
JL
6812 (synopsis "OSGI Configuration Management")
6813 (description
6814 "OSGi, for Open Services Gateway initiative framework, is a module system
6815and service platform for the Java programming language. This package contains
6816utility classes for the configuration of services.")
6817 (license license:asl2.0)))
500aac75
JL
6818
6819(define-public java-osgi-service-packageadmin
6820 (package
6821 (name "java-osgi-service-packageadmin")
6822 (version "1.2.0")
6823 (source (origin
6824 (method url-fetch)
6825 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6826 "org.osgi.service.packageadmin/"
6827 version "/org.osgi.service.packageadmin-"
6828 version "-sources.jar"))
6829 (sha256
6830 (base32
6831 "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52"))))
6832 (build-system ant-build-system)
6833 (arguments
6834 `(#:jar-name "osgi-service-packageadmin.jar"
6835 #:tests? #f)); no tests
6836 (inputs
6837 `(("framework" ,java-osgi-framework)))
c353d014 6838 (home-page "https://www.osgi.org")
500aac75
JL
6839 (synopsis "OSGI Package Administration")
6840 (description
6841 "OSGi, for Open Services Gateway initiative framework, is a module system
6842and service platform for the Java programming language. This package contains
6843the packageadmin service.")
6844 (license license:asl2.0)))
77a4f1ae
JL
6845
6846(define-public java-ops4j-base-lang
6847 (package
6848 (name "java-ops4j-base-lang")
6849 (version "1.5.0")
6850 (source (origin
6851 (method url-fetch)
6852 (uri (string-append "https://github.com/ops4j/org.ops4j.base/"
6853 "archive/base-" version ".tar.gz"))
6854 (sha256
6855 (base32
6856 "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw"))))
6857 (build-system ant-build-system)
6858 (arguments
6859 `(#:jar-name "java-ops4j-base-lang.jar"
6860 #:source-dir "ops4j-base-lang/src/main/java"
6861 #:tests? #f; no tests
6862 #:phases
6863 (modify-phases %standard-phases
6864 (add-before 'build 'add-test-file
6865 (lambda _
6866 ;; That file is required by a test in ops4j-pax-exam-core-spi
6867 (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang")
6868 (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties"
6869 (lambda _
6870 (display
6871 (string-append
6872 "version=" ,version "\n"
6873 "groupId=org.ops4j.base"
6874 "artifactId=ops4j-base-lang\n")))))))))
6875 (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview")
6876 (synopsis "Utility classes and extensions to be used in OPS4J projects")
6877 (description "OPS4J stands for Open Participation Software for Java. This
6878package contains utilities and extensions related to @code{java.lang}.")
6879 (license license:asl2.0)))
b2353495
JL
6880
6881(define-public java-ops4j-base-monitors
6882 (package
6883 (inherit java-ops4j-base-lang)
6884 (name "java-ops4j-base-monitors")
6885 (arguments
6886 `(#:jar-name "java-ops4j-base-monitors.jar"
6887 #:source-dir "ops4j-base-monitors/src/main/java"
6888 #:tests? #f)); no tests
6889 (inputs
6890 `(("lang" ,java-ops4j-base-lang)))
6891 (description "OPS4J stands for Open Participation Software for Java. This
6892package contains utilities and extensions related to monitoring.")))
322d349a
JL
6893
6894(define-public java-ops4j-base-io
6895 (package
6896 (inherit java-ops4j-base-lang)
6897 (name "java-ops4j-base-io")
6898 (arguments
6899 `(#:jar-name "java-ops4j-base-io.jar"
6900 #:source-dir "ops4j-base-io/src/main/java"
6901 #:test-dir "ops4j-base-io/src/test"
6902 #:test-exclude
6903 (list "**/ListerTest.java")))
6904 (inputs
6905 `(("lang" ,java-ops4j-base-monitors)
6906 ("lang" ,java-ops4j-base-lang)))
6907 (native-inputs
6908 `(("junit" ,java-junit)
6909 ("hamcrest" ,java-hamcrest-core)))
6910 (description "OPS4J stands for Open Participation Software for Java. This
6911package contains utilities and extensions related to handling streams and files.")))
559919c1
JL
6912
6913(define-public java-ops4j-base-util
6914 (package
6915 (inherit java-ops4j-base-lang)
6916 (name "java-ops4j-base-util")
6917 (arguments
6918 `(#:jar-name "java-ops4j-base-util.jar"
6919 #:source-dir "ops4j-base-util/src/main/java"
6920 #:test-dir "ops4j-base-util/src/test"))
6921 (inputs
6922 `(("lang" ,java-ops4j-base-lang)))
6923 (native-inputs
6924 `(("junit" ,java-junit)))
6925 (description "OPS4J stands for Open Participation Software for Java. This
6926package contains utilities and extensions related to environment, i18n and
6927mime types.")))
60dcec7a
JL
6928
6929(define-public java-ops4j-base-util-property
6930 (package
6931 (inherit java-ops4j-base-lang)
6932 (name "java-ops4j-base-util-property")
6933 (arguments
6934 `(#:jar-name "java-ops4j-base-util-property.jar"
6935 #:source-dir "ops4j-base-util-property/src/main/java"
6936 #:tests? #f)); no tests
6937 (inputs
6938 `(("lang" ,java-ops4j-base-lang)
6939 ("util" ,java-ops4j-base-util)))
6940 (description "OPS4J stands for Open Participation Software for Java. This
6941package contains utilities and extensions related to resolving properties from
6942different sources.")))
0edf8cf0
JL
6943
6944(define-public java-ops4j-base-store
6945 (package
6946 (inherit java-ops4j-base-lang)
6947 (name "java-ops4j-base-store")
6948 (arguments
6949 `(#:jar-name "java-ops4j-base-store.jar"
6950 #:source-dir "ops4j-base-store/src/main/java"
6951 #:tests? #f)); no tests
6952 (inputs
6953 `(("lang" ,java-ops4j-base-lang)
6954 ("slf4j" ,java-slf4j-api)
6955 ("io" ,java-ops4j-base-io)))
6956 (description "OPS4J stands for Open Participation Software for Java. This
6957package contains utilities for storing and retrieving data from an
6958@code{InputStream}.")))
214fcd8a
JL
6959
6960(define-public java-ops4j-base-spi
6961 (package
6962 (inherit java-ops4j-base-lang)
6963 (name "java-ops4j-base-spi")
6964 (arguments
6965 `(#:jar-name "java-ops4j-base-spi.jar"
6966 #:source-dir "ops4j-base-spi/src/main/java"
6967 #:test-dir "ops4j-base-spi/src/test"))
6968 (native-inputs
6969 `(("junit" ,java-junit)
6970 ("hamcrest" ,java-hamcrest-core)))
6971 (description "OPS4J stands for Open Participation Software for Java. This
6972package contains utilities for obtaining services via the Java SE 6
6973@code{ServiceLoader}.")))
e1edf42e
JL
6974
6975(define-public java-aqute-bnd-annotation
6976 (package
6977 (name "java-aqute-bnd-annotation")
2cac8891 6978 (version "3.5.0")
e1edf42e
JL
6979 (source (origin
6980 (method url-fetch)
6981 (uri (string-append "https://github.com/bndtools/bnd/archive/"
6982 version ".REL.tar.gz"))
6983 (file-name (string-append name "-" version ".tar.gz"))
6984 (sha256
6985 (base32
2cac8891 6986 "1ggyiq0as0f6cz333a0dh98j72kmvv5pf2s47v9554yh905lfqdl"))))
e1edf42e
JL
6987 (build-system ant-build-system)
6988 (arguments
6989 `(#:jar-name "java-aqute-bnd-annotation.jar"
6990 #:source-dir "biz.aQute.bnd.annotation/src"
6991 #:tests? #f)); empty test dir
6992 (home-page "http://bnd.bndtools.org/")
6993 (synopsis "Tools for OSGi")
6994 (description "Bnd is a swiss army knife for OSGi, it creates manifest
6995headers based on analyzing the class code, it verifies the project settings,
6996it manages project dependencies, gives diffs jars, and much more.")
6997 (license license:asl2.0)))
60ba2978
JL
6998
6999(define-public java-aqute-libg
7000 (package
7001 (inherit java-aqute-bnd-annotation)
7002 (name "java-aqute-libg")
7003 (arguments
7004 `(#:jar-name "java-aqute-libg.jar"
78754995
GB
7005 ;; The build fails when source/target more recent than 1.7. This
7006 ;; is a known issue. See: https://github.com/bndtools/bnd/issues/1327
7007 ;;
7008 ;; It is closed as won't fix. There is no way to change the source
7009 ;; so that it works on 1.8, and still works on 1.6, the upstream
7010 ;; target. It work fine on 1.7, so we use 1.7.
7011 #:make-flags (list "-Dant.build.javac.source=1.7"
7012 "-Dant.build.javac.target=1.7")
2ab089b7
GB
7013 #:phases
7014 (modify-phases %standard-phases
7015 (add-before 'configure 'chdir
7016 ;; Change to aQute.libg directory, so that the relative
7017 ;; paths in the tests aren't broken.
7018 (lambda _
7019 (chdir "aQute.libg")
7020 #t))
7021 (add-before 'check 'create-test-directory
7022 ;; Copy the test directory to test/java, since that's where
7023 ;; ant-build-system's default project in build.xml expects to find
7024 ;; the test classes. Leave a copy in the original place to not
7025 ;; break paths in tests.
7026 (lambda _
7027 (mkdir "src/test")
7028 (copy-recursively "test" "src/test/java")
7029 #t)))))
60ba2978
JL
7030 (inputs
7031 `(("slf4j" ,java-slf4j-api)
7032 ("osgi-annot" ,java-osgi-annotation)
7033 ("java-osgi-cmpn" ,java-osgi-cmpn)
2ab089b7
GB
7034 ("osgi" ,java-osgi-core)))
7035 (native-inputs
7036 `(("hamcrest" ,java-hamcrest-core)
7037 ("java-junit" ,java-junit)))))
5f26a131 7038
288a5959
GB
7039(define java-aqute-libg-bootstrap
7040 (package
7041 (inherit java-aqute-libg)
7042 (name "java-aqute-libg-bootstrap")
aca7dcdd
GB
7043 (arguments
7044 ;; Disable tests, at this stage of bootstrap we have no test frameworks.
7045 `(#:tests? #f))
288a5959
GB
7046 (inputs
7047 `(("slf4j-bootstrap" ,java-slf4j-api-bootstrap)
7048 ,@(delete `("slf4j" ,java-slf4j-api)
aca7dcdd
GB
7049 (package-inputs java-aqute-libg))))
7050 (native-inputs '())))
288a5959 7051
5f26a131
JL
7052(define-public java-aqute-bndlib
7053 (package
7054 (inherit java-aqute-bnd-annotation)
7055 (name "java-aqute-bndlib")
7056 (arguments
7057 `(#:jar-name "java-bndlib.jar"
7058 #:source-dir "biz.aQute.bndlib/src"
7059 #:tests? #f)); no tests
7060 (inputs
7061 `(("slf4j" ,java-slf4j-api)
7062 ("osgi-annot" ,java-osgi-annotation)
7063 ("java-aqute-libg" ,java-aqute-libg)
7064 ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation)
7065 ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations)
7066 ("java-osgi-service-repository" ,java-osgi-service-repository)
7067 ("java-osgi-service-log" ,java-osgi-service-log)
7068 ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations)
7069 ("java-osgi-namespace-contract" ,java-osgi-namespace-contract)
7070 ("java-osgi-namespace-extender" ,java-osgi-namespace-extender)
7071 ("java-osgi-namespace-service" ,java-osgi-namespace-service)
7072 ("promise" ,java-osgi-util-promise)
7073 ("osgi" ,java-osgi-core)))))
25aef81d 7074
869803aa
GB
7075(define java-aqute-bndlib-bootstrap
7076 (package
7077 (inherit java-aqute-bndlib)
7078 (name "java-aqute-bndlib-bootstrap")
7079 (inputs
7080 `(("slf4j-bootstrap" ,java-slf4j-api-bootstrap)
7081 ("java-aqute-libg-bootstrap" ,java-aqute-libg-bootstrap)
7082 ,@(delete `("slf4j" ,java-slf4j-api)
7083 (delete `("java-aqute-libg" ,java-aqute-libg)
7084 (package-inputs java-aqute-bndlib)))))))
7085
25aef81d
JL
7086(define-public java-ops4j-pax-tinybundles
7087 (package
7088 (name "java-ops4j-pax-tinybundles")
7089 (version "2.1.1")
7090 (source (origin
7091 (method url-fetch)
7092 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/"
7093 "archive/tinybundles-" version ".tar.gz"))
7094 (sha256
7095 (base32
7096 "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871"))))
7097 (arguments
7098 `(#:jar-name "java-ops4j-pax-tinybundles.jar"
7099 #:source-dir "src/main/java"
7100 #:test-exclude
7101 ;; Abstract base classes for other tests
7102 (list "**/BndTest.java" "**/CoreTest.java")
7103 #:phases
7104 (modify-phases %standard-phases
7105 (add-before 'check 'fix-version
7106 (lambda _
7107 ;; This test has a reference to an old version of bndlib we are not
7108 ;; packaging. It uses the version referenced in pom.xml. We replace
7109 ;; it with our own version.
7110 (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
0f277802
GB
7111 (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*")
7112 ,(package-version java-aqute-bndlib))))))))
25aef81d
JL
7113 (inputs
7114 `(("lang" ,java-ops4j-base-lang)
7115 ("io" ,java-ops4j-base-io)
7116 ("store" ,java-ops4j-base-store)
7117 ("slf4j" ,java-slf4j-api)
7118 ("libg" ,java-aqute-libg)
7119 ("bndlib" ,java-aqute-bndlib)))
7120 (native-inputs
7121 `(("junit" ,java-junit)
7122 ("hamcrest" ,java-hamcrest-core)
7123 ("log4j" ,java-log4j-api)
7124 ("bndannotation" ,java-aqute-bnd-annotation)
7125 ("framework" ,java-osgi-framework)))
7126 (build-system ant-build-system)
7127 (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles")
7128 (synopsis "Java APIs to create OSGi related artifacts")
7129 (description "Tinybundles is all about creating OSGi related artifacts like
7130Bundles, Fragments and Deployment Packages with Java Api. It is very convinient
7131to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the
7132other hand, this library can be a foundation of real end user tools that need
7133to create those artifacts.")
7134 (license license:asl2.0)))
e179add0
JL
7135
7136(define-public java-ops4j-pax-exam-core
7137 (package
7138 (name "java-ops4j-pax-exam-core")
7139 (version "4.11.0")
7140 (source (origin
7141 (method url-fetch)
7142 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/"
7143 "archive/exam-reactor-" version ".tar.gz"))
7144 (sha256
7145 (base32
7146 "08mzw8nkah3rj3vznlplnawspxhp61zgvb44ifqa1rni1cvbms2g"))))
7147 (arguments
7148 `(#:jar-name "java-ops4j-pax-exam-core.jar"
7149 #:source-dir "core/pax-exam/src/main/java"
7150 #:test-dir "core/pax-exam/src/test"))
7151 (inputs
7152 `(("slf4j" ,java-slf4j-api)
7153 ("lang" ,java-ops4j-base-lang)
7154 ("io" ,java-ops4j-base-io)
7155 ("util-property" ,java-ops4j-base-util-property)
7156 ("util-store" ,java-ops4j-base-store)
7157 ("java-osgi-core" ,java-osgi-core)))
7158 (native-inputs
7159 `(("junit" ,java-junit)
7160 ("hamcrest" ,java-hamcrest-core)))
7161 (build-system ant-build-system)
7162 (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview")
7163 (synopsis "In-Container Testing for OSGi, Java EE and CDI")
7164 (description "Pax Exam creates OSGi bundles for testing purposes. It lets
7165the user take control of the OSGi framework, the test framework (e.g. JUnit) and
7166the system under test at the same time.")
7167 (license license:asl2.0)))
7a7c2b75
JL
7168
7169(define-public java-ops4j-pax-exam-core-spi
7170 (package
7171 (inherit java-ops4j-pax-exam-core)
7172 (name "java-ops4j-pax-exam-core-spi")
7173 (arguments
7174 `(#:jar-name "java-ops4j-pax-exam-spi.jar"
7175 #:source-dir "src/main/java"
7176 #:test-exclude
7177 (list
7178 ;; Abstract base class, not a test
7179 "**/BaseStagedReactorTest.java"
7180 ;; Depends on org.mortbay.jetty.testwars:test-war-dump
7181 "**/WarBuilderTest.java")
7182 #:phases
7183 (modify-phases %standard-phases
7184 (add-before 'configure 'chdir
7185 (lambda _
7186 ;; Tests assume we are in this directory
7187 (chdir "core/pax-exam-spi")))
7188 (add-before 'check 'fix-tests
7189 (lambda _
7190 ;; One test checks that this file is present.
7191 (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi")
7192 (with-output-to-file
7193 "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties"
7194 (lambda _
7195 (display
7196 (string-append "artifactId = pax-exam-spi\n"
7197 "version = " ,(package-version java-ops4j-pax-exam-core-spi)))))
7198 ;; Maven puts compilation results in the target directory, while we
7199 ;; put them in the build directory.
7200 (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java"
7201 "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java"
7202 "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java")
7203 (("target") "build"))
7204 ;; One test is expected to fail, but it doesn't throw the expected exception
7205 (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java"
7206 (("AssertionError") "IllegalArgumentException")))))))
7207 (inputs
7208 `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core)
7209 ("lang" ,java-ops4j-base-lang)
7210 ("monitors" ,java-ops4j-base-monitors)
7211 ("store" ,java-ops4j-base-store)
7212 ("io" ,java-ops4j-base-io)
7213 ("spi" ,java-ops4j-base-spi)
7214 ("osgi" ,java-osgi-core)
7215 ("slf4j" ,java-slf4j-api)
7216 ("tinybundles" ,java-ops4j-pax-tinybundles)))
7217 (native-inputs
7218 `(("mockito" ,java-mockito-1)
7219 ("junit" ,java-junit)
7220 ("hamcrest" ,java-hamcrest-core)
7221 ("cglib" ,java-cglib)
7222 ("objenesis" ,java-objenesis)
7223 ("asm" ,java-asm)))))
4496d77f
JL
7224
7225(define-public java-ops4j-pax-exam-core-junit
7226 (package
7227 (inherit java-ops4j-pax-exam-core)
7228 (name "java-ops4j-pax-exam-core-junit")
7229 (arguments
7230 `(#:jar-name "ops4j-pax-exam-core-junit.jar"
7231 #:source-dir "drivers/pax-exam-junit4/src/main/java"
7232 #:tests? #f)); no tests
7233 (inputs
7234 `(("junit" ,java-junit)
7235 ("slf4j" ,java-slf4j-api)
7236 ("core" ,java-ops4j-pax-exam-core)
7237 ("spi" ,java-ops4j-pax-exam-core-spi)))
7238 (native-inputs '())))
cb05f60d
JL
7239
7240(define-public java-fasterxml-jackson-annotations
7241 (package
7242 (name "java-fasterxml-jackson-annotations")
93dceea4 7243 (version "2.9.4")
cb05f60d
JL
7244 (source (origin
7245 (method url-fetch)
7246 (uri (string-append "https://github.com/FasterXML/"
7247 "jackson-annotations/archive/"
7248 "jackson-annotations-" version ".tar.gz"))
7249 (sha256
7250 (base32
93dceea4 7251 "0mr95xd0da6a4g95zvrl1ryk5n5zv2rc696w3xnsr5hxk2gicfc4"))))
cb05f60d
JL
7252 (build-system ant-build-system)
7253 (arguments
7254 `(#:jar-name "jackson-annotations.jar"
7255 #:source-dir "src/main/java"
7256 #:test-dir "src/test"))
7257 (native-inputs
7258 `(("junit" ,java-junit)))
7259 (home-page "https://github.com/FasterXML/jackson-annotations")
7260 (synopsis "General purpose annotations for the Jackson Data Processor")
7261 (description "This package contains general purpose annotations for the
7262Jackson Data Processor, used on value and handler types. The only annotations
7263not included are ones that require dependency to the Databind package.")
7264 (license license:asl2.0)))
0b5481df
JL
7265
7266(define-public java-fasterxml-jackson-core
7267 (package
7268 (name "java-fasterxml-jackson-core")
38a0fc38 7269 (version "2.9.4")
0b5481df
JL
7270 (source (origin
7271 (method url-fetch)
7272 (uri (string-append "https://github.com/FasterXML/"
7273 "jackson-core/archive/"
7274 "jackson-core-" version ".tar.gz"))
7275 (sha256
7276 (base32
38a0fc38 7277 "159hsnk17jr1gyzkf01cxvsn45srnk37g949r7364qlsr527gjgd"))))
0b5481df
JL
7278 (build-system ant-build-system)
7279 (arguments
7280 `(#:jar-name "jackson-core.jar"
7281 #:source-dir "src/main/java"
7282 #:test-dir "src/test"
7283 #:test-exclude
7284 (list
7285 ;; Expected failure. pom.xml excludes these
7286 "**/failing/**"
7287 ;; Base classes that have no constructor for junit
7288 "**/BaseTest.java"
7289 "**/ConcurrencyReadTest.java"
7290 "**/ManualCharAccessTest.java"
7291 "**/ManualCharAccessTest.java"
7292 "**/TrailingCommasTest.java"
7293 "**/AsyncMissingValuesInObjectTest.java"
7294 "**/AsyncMissingValuesInArrayTest.java")
7295 #:phases
7296 (modify-phases %standard-phases
7297 (add-before 'configure 'generate-PackageVersion.java
7298 (lambda _
7299 (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java")
7300 (in (string-append out ".in")))
7301 (copy-file in out)
7302 (substitute* out
7303 (("@package@") "com.fasterxml.jackson.core.json")
7304 (("@projectversion@") ,version)
7305 (("@projectgroupid@") "com.fasterxml.jackson.core")
7306 (("@projectartifactid@") "jackson-core")))))
7307 (add-before 'build 'copy-resources
7308 (lambda _
7309 (copy-recursively "src/main/resources"
7310 "build/classes")))
7311 (add-before 'check 'copy-test-resources
7312 (lambda _
7313 (copy-recursively "src/test/resources"
7314 "build/test-classes"))))))
7315 (native-inputs
7316 `(("junit" ,java-junit)
7317 ("hamcrest" ,java-hamcrest-core)))
7318 (home-page "https://github.com/FasterXML/jackson-core")
7319 (synopsis "")
7320 (description "")
7321 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
f234c7a0
JL
7322
7323(define-public java-fasterxml-jackson-databind
7324 (package
7325 (name "java-fasterxml-jackson-databind")
3c1edff5 7326 (version "2.9.4")
f234c7a0
JL
7327 (source (origin
7328 (method url-fetch)
7329 (uri (string-append "https://github.com/FasterXML/"
7330 "jackson-databind/archive/"
7331 "jackson-databind-" version ".tar.gz"))
7332 (sha256
7333 (base32
3c1edff5 7334 "1zd2cw4z6kdkbx8za96xh9pyicv2a2l7y0rkcx2fqd8hv6d47s08"))))
f234c7a0
JL
7335 (build-system ant-build-system)
7336 (arguments
7337 `(#:jar-name "jackson-databind.jar"
7338 #:source-dir "src/main/java"
7339 #:tests? #f; requires javax.measures for which I can't find a free implementation
7340 #:phases
7341 (modify-phases %standard-phases
7342 (add-before 'configure 'generate-PackageVersion.java
7343 (lambda _
7344 (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java")
7345 (in (string-append out ".in")))
7346 (copy-file in out)
7347 (substitute* out
7348 (("@package@") "com.fasterxml.jackson.databind.cfg")
7349 (("@projectversion@") ,version)
7350 (("@projectgroupid@") "com.fasterxml.jackson.databind")
7351 (("@projectartifactid@") "jackson-databind")))))
7352 (add-before 'build 'copy-resources
7353 (lambda _
7354 (copy-recursively "src/main/resources" "build/classes"))))))
7355 (inputs
7356 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7357 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)))
7358 (home-page "https://github.com/FasterXML/jackson-databind")
7359 (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor")
7360 (description "This package contains the general-purpose data-binding
7361functionality and tree-model for Jackson Data Processor. It builds on core
7362streaming parser/generator package, and uses Jackson Annotations for
7363configuration.")
7364 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
d57d8b89
JL
7365
7366(define-public java-fasterxml-jackson-modules-base-jaxb
7367 (package
7368 (name "java-fasterxml-jackson-modules-base-jaxb")
07207211 7369 (version "2.9.4")
d57d8b89
JL
7370 (source (origin
7371 (method url-fetch)
7372 (uri (string-append "https://github.com/FasterXML/"
7373 "jackson-modules-base/archive/"
7374 "jackson-modules-base-" version ".tar.gz"))
7375 (sha256
7376 (base32
07207211 7377 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
d57d8b89
JL
7378 (build-system ant-build-system)
7379 (arguments
7380 `(#:jar-name "jackson-modules-base-jaxb.jar"
7381 #:source-dir "jaxb/src/main/java"
7382 #:test-dir "jaxb/src/test"
7383 #:test-exclude
7384 ;; Base class for tests
7385 (list "**/BaseJaxbTest.java")
7386 #:phases
7387 (modify-phases %standard-phases
7388 (add-before 'configure 'generate-PackageVersion.java
7389 (lambda _
7390 (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/"
7391 "jackson/module/jaxb/PackageVersion.java"))
7392 (in (string-append out ".in")))
7393 (copy-file in out)
7394 (substitute* out
7395 (("@package@") "com.fasterxml.jackson.module.jaxb")
7396 (("@projectversion@") ,version)
7397 (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb")
7398 (("@projectartifactid@") "jackson-module-jaxb")))))
7399 (add-before 'build 'copy-resources
7400 (lambda _
7401 (copy-recursively "jaxb/src/main/resources" "build/classes"))))))
7402 (inputs
7403 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7404 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
7405 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
7406 (native-inputs
7407 `(("java-junit" ,java-junit)))
7408 (home-page "https://github.com/FasterXML/jackson-modules-base")
7409 (synopsis "Jaxb annotations jackson module")
7410 (description "This package is the jaxb annotations module for jackson.")
7411 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
0f296d37
JL
7412
7413(define-public java-snakeyaml
7414 (package
7415 (name "java-snakeyaml")
7416 (version "1.18")
7417 (source (origin
7418 (method url-fetch)
7419 (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
7420 version ".tar.gz"))
307856cd 7421 (file-name (string-append name "-" version ".tar.gz"))
0f296d37
JL
7422 (sha256
7423 (base32
7424 "0rf5ha6w0waz50jz2479jsrbgmd0dnx0gs337m126j5z7zlmg7mg"))))
7425 (build-system ant-build-system)
7426 (arguments
7427 `(#:jar-name "java-snakeyaml.jar"
7428 #:source-dir "src/main/java"
7429 ;; Tests require velocity, a cyclic dependency, and
7430 ;; java-spring-framework-context which is not packaged.
7431 #:tests? #f))
7432 (home-page "https://bitbucket.org/asomov/snakeyaml")
7433 (synopsis "YAML processor")
7434 (description "SnakeYAML is a YAML processor for the Java Virtual Machine.")
7435 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
087c8fd2
JL
7436
7437(define-public java-fasterxml-jackson-dataformat-yaml
7438 (package
7439 (name "java-fasterxml-jackson-dataformat-yaml")
1f2be88f 7440 (version "2.9.4")
087c8fd2
JL
7441 (source (origin
7442 (method url-fetch)
7443 (uri (string-append "https://github.com/FasterXML/"
7444 "jackson-dataformats-text/archive/"
7445 "jackson-dataformats-text-" version ".tar.gz"))
7446 (sha256
7447 (base32
1f2be88f 7448 "1hikl06khaxbg439avf442qifcadap8w0lx13f0nnhp2vh3dkbz7"))))
087c8fd2
JL
7449 (build-system ant-build-system)
7450 (arguments
7451 `(#:jar-name "jackson-dataformat-yaml.jar"
7452 #:source-dir "yaml/src/main/java"
7453 #:test-dir "yaml/src/test"
7454 #:test-exclude (list "**/failing/**.java")
7455 #:phases
7456 (modify-phases %standard-phases
7457 (add-before 'configure 'generate-PackageVersion.java
7458 (lambda _
7459 (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java")
7460 (in (string-append out ".in")))
7461 (copy-file in out)
7462 (substitute* out
7463 (("@package@") "com.fasterxml.jackson.dataformat.yaml")
7464 (("@projectversion@") ,version)
7465 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml")
7466 (("@projectartifactid@") "jackson-dataformat-yaml"))))))))
7467 (inputs
7468 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7469 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
7470 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
7471 ("java-snakeyaml" ,java-snakeyaml)))
7472 (native-inputs
7473 `(("junit" ,java-junit)
7474 ("hamcrest" ,java-hamcrest-core)
7475 ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi)
7476 ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit)
7477 ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core)))
7478 (home-page "https://github.com/FasterXML/jackson-dataformats-text")
7479 (synopsis "Yaml backend for Jackson")
7480 (description "Dataformat backends are used to support format alternatives
7481to JSON, supported by default. This is done by sub-classing Jackson core
7482abstractions.")
7483 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
6fd07b98
JL
7484
7485(define-public java-stax2-api
7486 (package
7487 (name "java-stax2-api")
7488 (version "4.0.0")
7489 (source (origin
7490 (method url-fetch)
7491 (uri (string-append "https://github.com/FasterXML/stax2-api/archive/"
7492 "stax2-api-" version ".tar.gz"))
7493 (sha256
7494 (base32
7495 "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq"))))
7496 (build-system ant-build-system)
7497 (arguments
7498 `(#:jar-name "java-stax2-api.jar"
7499 #:source-dir "src/main/java"
7500 #:tests? #f)); no tests
7501 (home-page "https://github.com/FasterXML/stax2-api")
7502 (synopsis "Stax2 API")
7503 (description "Stax2 API is an extension to basic Stax 1.0 API that adds
7504significant new functionalities, such as full-featured bi-direction validation
7505interface and high-performance Typed Access API.")
7506 (license license:bsd-2)))
40f193f3
JL
7507
7508(define-public java-woodstox-core
7509 (package
7510 (name "java-woodstox-core")
7511 (version "5.0.3")
7512 (source (origin
7513 (method url-fetch)
7514 (uri (string-append "https://github.com/FasterXML/woodstox/archive/"
7515 "woodstox-core-" version ".tar.gz"))
7516 (sha256
7517 (base32
7518 "1i7pdgb8jbw6gdy5kmm0l6rz109n2ns92pqalpyp24vb8vlvdfd4"))))
7519 (build-system ant-build-system)
7520 (arguments
7521 `(#:jar-name "woodstox.jar"
7522 #:test-exclude
7523 (list "**/Base*.java" "failing/**")
7524 #:phases
7525 (modify-phases %standard-phases
7526 (add-before 'build 'remove-msv-dep
7527 (lambda _
7528 ;; we don't need osgi, and it depends on msv
7529 (delete-file-recursively "src/main/java/com/ctc/wstx/osgi")
7530 ;; msv's latest release is from 2011 and we don't need it
7531 (delete-file-recursively "src/main/java/com/ctc/wstx/msv")
7532 (delete-file-recursively "src/test/java/wstxtest/osgi")
7533 (delete-file-recursively "src/test/java/wstxtest/msv")))
7534 (add-before 'build 'copy-resources
7535 (lambda _
7536 (copy-recursively "src/main/resources" "build/classes"))))))
7537 (inputs
7538 `(("stax2" ,java-stax2-api)))
7539 (native-inputs
7540 `(("junit" ,java-junit)))
7541 (home-page "https://github.com/FasterXML/woodstox")
7542 (synopsis "Stax XML API implementation")
7543 (description "Woodstox is a stax XML API implementation.")
7544 (license license:asl2.0)))
262a4d33
JL
7545
7546(define-public java-fasterxml-jackson-dataformat-xml
7547 (package
7548 (name "java-fasterxml-jackson-dataformat-xml")
f3bbe029 7549 (version "2.9.4")
262a4d33
JL
7550 (source (origin
7551 (method url-fetch)
7552 (uri (string-append "https://github.com/FasterXML/"
7553 "jackson-dataformat-xml/archive/"
7554 "jackson-dataformat-xml-" version ".tar.gz"))
7555 (sha256
7556 (base32
f3bbe029 7557 "111fkkl90w31jbf30kgj82qdcxlw4sxppki7i198liw0ck1jcavq"))))
262a4d33
JL
7558 (build-system ant-build-system)
7559 (arguments
7560 `(#:jar-name "jackson-dataformat-xml.jar"
7561 #:source-dir "src/main/java"
7562 #:test-exclude
7563 (list "**/failing/**")
7564 #:phases
7565 (modify-phases %standard-phases
7566 (add-before 'configure 'generate-PackageVersion.java
7567 (lambda _
7568 (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java")
7569 (in (string-append out ".in")))
7570 (copy-file in out)
7571 (newline)
7572 (substitute* out
7573 (("@package@") "com.fasterxml.jackson.dataformat.xml")
7574 (("@projectversion@") ,version)
7575 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml")
7576 (("@projectartifactid@") "jackson-dataformat-xml")))))
7577 (add-before 'build 'copy-resources
7578 (lambda _
7579 (copy-recursively "src/main/resources" "build/classes"))))))
7580 (inputs
7581 `(("jackson-annotations" ,java-fasterxml-jackson-annotations)
7582 ("jackson-core" ,java-fasterxml-jackson-core)
7583 ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb)
7584 ("jackson-databind" ,java-fasterxml-jackson-databind)
7585 ("stax2-api" ,java-stax2-api)
7586 ("woodstox" ,java-woodstox-core)))
7587 (native-inputs
7588 `(("junit" ,java-junit)
7589 ("hamcrest" ,java-hamcrest-core)))
7590 (home-page "https://github.com/FasterXML/jackson-dataformat-xml")
7591 (synopsis "Read and write XML")
7592 (description "This package contains Jackson extension component for reading
7593and writing XML encoded data.
7594
7595Further, the goal is to emulate how JAXB data-binding works with \"Code-first\"
7596approach (that is, no support is added for \"Schema-first\" approach). Support
7597for JAXB annotations is provided by JAXB annotation module; this module
7598provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator},
7599@code{JsonFactory}) as well as small number of higher level overrides needed to
7600make data-binding work.")
7601 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
90a127c7
JL
7602
7603(define-public java-hdrhistogram
7604 (package
7605 (name "java-hdrhistogram")
7606 (version "2.1.9")
7607 (source (origin
7608 (method url-fetch)
7609 (uri (string-append "https://github.com/HdrHistogram/HdrHistogram/"
7610 "archive/HdrHistogram-" version ".tar.gz"))
7611 (sha256
7612 (base32
7613 "1sicbmc3sr42nw93qbkb26q9rn33ag33k6k77phjc3j5h5gjffqv"))))
7614 (build-system ant-build-system)
7615 (arguments
7616 `(#:jar-name "java-hdrhistogram.jar"
7617 #:source-dir "src/main/java"
7618 #:phases
7619 (modify-phases %standard-phases
7620 (add-before 'configure 'set-version
7621 (lambda _
7622 (let* ((version-java "src/main/java/org/HdrHistogram/Version.java")
7623 (template (string-append version-java ".template")))
7624 (copy-file template version-java)
7625 (substitute* version-java
7626 (("\\$VERSION\\$") ,version)
7627 (("\\$BUILD_TIME\\$") "0"))
7628 #t))))))
7629 (native-inputs
7630 `(("junit" ,java-junit)
7631 ("hamcrest" ,java-hamcrest-core)))
7632 (home-page "https://hdrhistogram.github.io/HdrHistogram")
7633 (synopsis "High dynamic range histogram")
7634 (description "Hdrhistogram allows to create histograms that support
7635recording and analyzing sampled data value counts across a configurable integer
7636value range with configurable value precision within the range. Value precision
7637is expressed as the number of significant digits in the value recording, and
7638provides control over value quantization behavior across the value range and
7639the subsequent value resolution at any given level.")
7640 (license license:public-domain)))
5d104a27 7641
c5ff11dc
RW
7642(define-public java-cofoja
7643 (package
7644 (name "java-cofoja")
7645 (version "1.3")
7646 (source (origin
7647 (method git-fetch)
7648 (uri (git-reference
7649 (url "https://github.com/nhatminhle/cofoja.git")
7650 (commit (string-append "v" version))))
7651 (file-name (string-append "java-cofoja-" version "-checkout"))
7652 (sha256
7653 (base32
7654 "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w"))))
7655 (build-system ant-build-system)
7656 (arguments
7657 `(#:build-target "dist"
7658 #:test-target "test"
7659 #:jdk ,icedtea-8
7660 #:make-flags
7661 (list "-Ddist.dir=dist")
7662 #:modules ((guix build ant-build-system)
7663 (guix build java-utils)
7664 (guix build utils)
7665 (srfi srfi-1)
7666 (ice-9 match))
7667 #:phases
7668 (modify-phases %standard-phases
7669 ;; The bulid system ignores the class path the ant-build-system sets
7670 ;; up and instead expects to find all dependencies in the "lib"
7671 ;; directory.
7672 (add-after 'unpack 'create-libdir
7673 (lambda* (#:key inputs #:allow-other-keys)
7674 (mkdir-p "lib")
7675 (for-each
7676 (lambda (file)
7677 (let ((target (string-append "lib/" (basename file))))
7678 (unless (file-exists? target)
7679 (symlink file target))))
7680 (append-map (match-lambda
7681 ((label . dir)
7682 (find-files dir "\\.jar$")))
7683 inputs))
7684 #t))
7685 (replace 'install (install-jars "dist")))))
7686 (inputs
7687 `(("java-asm" ,java-asm)))
7688 (native-inputs
7689 `(("java-junit" ,java-junit)))
7690 (home-page "https://github.com/nhatminhle/cofoja")
7691 (synopsis "Contracts for Java")
7692 (description "Contracts for Java, or Cofoja for short, is a contract
7693programming framework and test tool for Java, which uses annotation processing
7694and bytecode instrumentation to provide run-time checking. (In particular,
7695this is not a static analysis tool.)")
7696 (license license:lgpl3+)))
7697
5d104a27
JL
7698(define-public java-aopalliance
7699 (package
7700 (name "java-aopalliance")
7701 (version "1.0")
7702 (source (origin
7703 (method git-fetch)
7704 ;; Note: this git repository is not official, but contains the
7705 ;; source code that is in the CVS repository. Downloading the
7706 ;; tarball from sourceforge is undeterministic, and the cvs download
7707 ;; fails.
7708 (uri (git-reference
7709 (url "https://github.com/hoverruan/aopalliance")
7710 (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0")))
7711 (file-name (string-append name "-" version))
7712 (sha256
7713 (base32
7714 "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr"))))
7715 (build-system ant-build-system)
7716 (arguments
7717 `(#:jar-name "java-aopalliance.jar"
7718 #:jdk ,icedtea-8
7719 #:tests? #f; no tests
7720 #:source-dir "aopalliance/src/main"))
7721 (home-page "http://aopalliance.sourceforge.net")
7722 (synopsis "Aspect-Oriented Programming")
7723 (description "The AOP Alliance project is a joint project between several
7724software engineering people who are interested in Aspect-Oriented Programming
7725(AOP) and Java.")
7726 (license license:public-domain)))
454536e0
JL
7727
7728(define-public java-javax-inject
7729 (package
7730 (name "java-javax-inject")
7731 (version "tck-1")
7732 (source (origin
7733 (method url-fetch)
7734 (uri (string-append "https://github.com/javax-inject/javax-inject/"
7735 "archive/javax.inject-" version ".tar.gz"))
7736 (sha256
7737 (base32
7738 "1ydrlvh2r7vr1g7lhjwy3w2dggpj9h6pix1lakkkgdywb365n6g0"))))
7739 (build-system ant-build-system)
7740 (arguments
7741 `(#:jar-name "java-javax-inject.jar"
7742 #:jdk ,icedtea-8
7743 #:tests? #f)); no tests
7744 (home-page "http://github.com/javax-inject/javax-inject")
7745 (synopsis "JSR-330: Dependency Injection for Java")
7746 (description "This package specifies a means for obtaining objects in such
7747a way as to maximize reusability, testability and maintainability compared to
7748traditional approaches such as constructors, factories, and service locators
7749(e.g., JNDI). This process, known as dependency injection, is beneficial to
7750most nontrivial applications.
7751
7752Many types depend on other types. For example, a @var{Stopwatch} might depend
7753on a @var{TimeSource}. The types on which a type depends are known as its
7754dependencies. The process of finding an instance of a dependency to use at run
7755time is known as resolving the dependency. If no such instance can be found,
7756the dependency is said to be unsatisfied, and the application is broken.")
7757 (license license:asl2.0)))
5766984b
JL
7758
7759(define-public java-guice
7760 (package
7761 (name "java-guice")
7762 (version "4.1")
7763 (source (origin
7764 (method url-fetch)
7765 (uri (string-append "https://github.com/google/guice/archive/"
7766 version ".tar.gz"))
7767 (file-name (string-append name "-" version ".tar.gz"))
7768 (sha256
7769 (base32
7770 "0dwmqjzlavb144ywqqglj3h68hqszkff8ai0a42hyb5il0qh4rbp"))))
7771 (build-system ant-build-system)
7772 (arguments
7773 `(#:jar-name "java-guice.jar"
7774 #:jdk ,icedtea-8
7775 #:tests? #f; FIXME: tests are not in a java sub directory
7776 #:source-dir "core/src"))
7777 (inputs
7778 `(("guava" ,java-guava)
7779 ("java-cglib" ,java-cglib)
7780 ("java-aopalliance" ,java-aopalliance)
7781 ("java-javax-inject" ,java-javax-inject)
7782 ("java-asm" ,java-asm)))
7783 (home-page "https://github.com/google/guice")
7784 (synopsis "Lightweight dependency injection framework")
7785 (description "Guice is a lightweight dependency injection framework fo
7786Java 6 and above.")
7787 (license license:asl2.0)))
ec4e8ad7
JL
7788
7789(define-public java-guice-servlet
7790 (package
7791 (inherit java-guice)
7792 (name "java-guice-servlet")
7793 (arguments
7794 `(#:jar-name "guice-servlet.jar"
7795 #:source-dir "extensions/servlet/src/"
7796 #:jdk ,icedtea-8
7797 #:tests? #f)); FIXME: not in a java subdir
7798 (inputs
7799 `(("guice" ,java-guice)
7800 ("servlet" ,java-tomcat)
7801 ,@(package-inputs java-guice)))))
b12fe1e5
JL
7802
7803(define-public java-assertj
7804 (package
7805 (name "java-assertj")
7806 (version "3.8.0")
7807 (source (origin
7808 (method url-fetch)
7809 (uri (string-append "https://github.com/joel-costigliola/"
7810 "assertj-core/archive/"
7811 "assertj-core-" version ".tar.gz"))
7812 (sha256
7813 (base32
7814 "1kf124fxskf548rklkg86294w2x6ajqrff94rrhyqns31danqkfz"))))
7815 (build-system ant-build-system)
7816 (arguments
7817 `(#:jar-name "java-assertj.jar"
7818 #:jdk ,icedtea-8
7819 #:source-dir "src/main/java"
7820 #:tests? #f)); depends on tng-junit which depends on assertj
7821 (inputs
7822 `(("cglib" ,java-cglib)
7823 ("junit" ,java-junit)
7824 ("hamcrest" ,java-hamcrest-core)))
7825 (native-inputs
7826 `(("mockito" ,java-mockito-1)))
7827 (home-page "https://joel-costigliola.github.io/assertj/index.html")
7828 (synopsis "Fluent assertions for java")
7829 (description "AssertJ core is a Java library that provides a fluent
7830interface for writing assertions. Its main goal is to improve test code
7831readability and make maintenance of tests easier.")
7832 (license license:asl2.0)))
6768e0a7
JL
7833
7834(define-public java-jboss-javassist
7835 (package
7836 (name "java-jboss-javassist")
7837 (version "3.21.0")
7838 (source (origin
7839 (method url-fetch)
7840 (uri (string-append "https://github.com/jboss-javassist/javassist/"
7841 "archive/rel_"
7842 (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)
7843 "_ga.tar.gz"))
7844 (sha256
7845 (base32
7846 "10lpcr3sbf7y6fq6fc2h2ik7rqrivwcy4747bg0kxhwszil3cfmf"))))
7847 (build-system ant-build-system)
7848 (arguments
7849 `(#:jar-name "java-jboss-javassist.jar"
7850 #:jdk ,icedtea-8
7851 #:source-dir "src/main"
7852 #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3
7853 #:phases
7854 (modify-phases %standard-phases
7855 (add-before 'configure 'remove-binary
7856 (lambda _
7857 (delete-file "javassist.jar")
7858 #t)))))
7859 (native-inputs
7860 `(("junit" ,java-junit)))
7861 (home-page "https://github.com/jboss-javassist/javassist")
7862 (synopsis "Java bytecode engineering toolkit")
7863 (description "Javassist (JAVA programming ASSISTant) makes Java bytecode
7864manipulation simple. It is a class library for editing bytecodes in Java; it
7865enables Java programs to define a new class at runtime and to modify a class
7866file when the JVM loads it.")
7867 (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl.
a6dd06d0
JL
7868
7869(define-public java-jcommander
7870 (package
7871 (name "java-jcommander")
7872 (version "1.71")
7873 (source (origin
7874 (method url-fetch)
7875 (uri (string-append "https://github.com/cbeust/jcommander/archive/"
7876 version ".tar.gz"))
7877 (file-name (string-append name "-" version ".tar.gz"))
7878 (sha256
7879 (base32
7880 "1f5k2ckay6qjc3d3w3d7bc0p3cx3c7n6p6zxvw1kibqdr0q98wlx"))))
7881 (build-system ant-build-system)
7882 (arguments
7883 `(#:jar-name "java-jcommander.jar"
7884 #:jdk ,icedtea-8
7885 #:tests? #f; requires testng which depends on jcommander
7886 #:source-dir "src/main/java"))
7887 (home-page "http://jcommander.org")
7888 (synopsis "Command line parameters parser")
7889 (description "JCommander is a very small Java framework that makes it
7890trivial to parse command line parameters. Parameters are declared with
7891annotations.")
7892 (license license:asl2.0)))
11bc385b
JL
7893
7894(define-public java-bsh
7895 (package
7896 (name "java-bsh")
7897 (version "2.0b6")
7898 (source (origin
7899 (method url-fetch)
7900 (uri (string-append "https://github.com/beanshell/beanshell/archive/"
7901 version ".tar.gz"))
7902 (file-name (string-append name "-" version ".tar.gz"))
7903 (sha256
7904 (base32
7905 "1bawkxk6jyc75hxvzkpz689h73cn3f222m0ar3nvb0dal2b85kfv"))))
7906 (build-system ant-build-system)
7907 (arguments
7908 `(#:build-target "jarall"
7909 #:test-target "junit-tests-all"
7910 #:phases
7911 (modify-phases %standard-phases
7912 (replace 'install
7913 (lambda* (#:key outputs #:allow-other-keys)
7914 (let ((share (string-append (assoc-ref outputs "out") "/share/java")))
7915 (mkdir-p share)
7916 (copy-file "dist/bsh-2.0b6.jar" (string-append share "/bsh-2.0b6.jar"))
7917 #t))))))
7918 (home-page "http://beanshell.org/")
7919 (synopsis "Lightweight Scripting for Java")
7920 (description "BeanShell is a small, free, embeddable Java source
7921interpreter with object scripting language features, written in Java.
7922BeanShell dynamically executes standard Java syntax and extends it with common
7923scripting conveniences such as loose types, commands, and method closures like
7924those in Perl and JavaScript.")
7925 (license license:asl2.0)))
7a343e97
JL
7926
7927(define-public java-fest-util
7928 (package
7929 (name "java-fest-util")
7930 (version "1.2.5")
7931 (source (origin
7932 (method url-fetch)
7933 (uri (string-append "https://github.com/alexruiz/fest-util/"
7934 "archive/fest-util-" version ".tar.gz"))
7935 (sha256
7936 (base32
7937 "05g6hljz5mdaakk8d7g32klbhz9bdwp3qlj6rdaggdidxs3x1sb8"))))
7938 (build-system ant-build-system)
7939 (arguments
7940 `(#:jar-name "java-fest-util.jar"
7941 #:source-dir "src/main/java"))
7942 (native-inputs
7943 `(("junit" ,java-junit)
7944 ("hamcrest" ,java-hamcrest-core)))
7945 (home-page "https://github.com/alexruiz/fest-util")
7946 (synopsis "FEST common utilities")
7947 (description "Common utilities used in all FEST module.")
7948 (license license:asl2.0)))
3c6c8358
JL
7949
7950(define-public java-fest-test
7951 (package
7952 (name "java-fest-test")
7953 (version "2.1.0")
7954 (source (origin
7955 (method url-fetch)
7956 (uri (string-append "https://github.com/alexruiz/fest-test/"
7957 "archive/fest-test-" version ".tar.gz"))
7958 (sha256
7959 (base32
7960 "1rxfbw6l9vc65iy1x3fb617qc6y4w2k430pgf1mfbxfdlxbm0f7g"))))
7961 (build-system ant-build-system)
7962 (arguments
7963 `(#:jar-name "java-fest-test.jar"
7964 #:source-dir "src/main/java"
7965 #:tests? #f)); no tests
7966 (inputs
7967 `(("junit" ,java-junit)))
7968 (home-page "https://github.com/alexruiz/fest-test")
7969 (synopsis "Common FEST testing infrastructure")
7970 (description "Fest-test contains the common FEST testing infrastructure.")
7971 (license license:asl2.0)))
ca98e448
JL
7972
7973(define-public java-fest-assert
7974 (package
7975 (name "java-fest-assert")
7976 (version "2.0M10")
7977 (source (origin
7978 (method url-fetch)
7979 (uri (string-append "https://github.com/alexruiz/fest-assert-2.x/"
7980 "archive/fest-assert-core-" version ".tar.gz"))
7981 (sha256
7982 (base32
7983 "1bi0iqavikzww6rxvz5jyg7y6bflv95s6ibryxx0xfcxrrw6i5lw"))))
7984 (build-system ant-build-system)
7985 (arguments
7986 `(#:jar-name "java-fest-assert.jar"
7987 #:source-dir "src/main/java"
7988 #:test-exclude
7989 (list
7990 "**/Abstract*.java"
7991 "**/*BaseTest.java"
7992 ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses
7993 "**/MessageFormatter_format_Test.java"
7994 "**/internal/*/*_assert*_Test.java")))
7995 (inputs
7996 `(("java-fest-util" ,java-fest-util)))
7997 (native-inputs
7998 `(("java-junit" ,java-junit)
7999 ("java-fest-test" ,java-fest-test)
8000 ("java-hamcrest-core" ,java-hamcrest-core)
8001 ("java-mockito" ,java-mockito-1)
8002 ("java-cglib" ,java-cglib)
8003 ("java-objenesis" ,java-objenesis)
8004 ("java-asm" ,java-asm)))
8005 (home-page "https://github.com/alexruiz/fest-assert-2.x")
8006 (synopsis "FEST fluent assertions")
8007 (description "FEST-Assert provides a fluent interface for assertions.")
8008 (license license:asl2.0)))
0442d897
JL
8009
8010(define-public java-testng
8011 (package
8012 (name "java-testng")
3422e10e 8013 (version "6.14.3")
0442d897 8014 (source (origin
36b39d16
RW
8015 (method git-fetch)
8016 (uri (git-reference
8017 (url "https://github.com/cbeust/testng.git")
8018 (commit version)))
8019 (file-name (string-append name "-" version "-checkout"))
0442d897
JL
8020 (sha256
8021 (base32
3422e10e 8022 "0y6vq30i5g276kw0v2bhbvci22ijg7ax49ap2611yqlhbs4d6dqv"))))
0442d897
JL
8023 (build-system ant-build-system)
8024 (arguments
8025 `(#:jdk ,icedtea-8; java.util.function
8026 #:jar-name "java-testng.jar"
8027 #:source-dir "src/main/java"
8028 #:phases
8029 (modify-phases %standard-phases
36b39d16
RW
8030 ;; FIXME: I don't know why these tests fail
8031 (add-after 'unpack 'delete-failing-tests
8032 (lambda _
8033 (substitute* "src/test/resources/testng.xml"
8034 (("<class name=\"test.configuration.github1625.TestRunnerIssue1625\"/>") "")
8035 (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") ""))
8036 #t))
8037 ;; We don't have groovy
8038 (add-after 'unpack 'delete-groovy-tests
8039 (lambda _
8040 (delete-file-recursively "src/test/java/test/dependent/issue1648/")
8041 (substitute* "src/test/resources/testng.xml"
8042 (("<class name=\"test.dependent.issue1648.TestRunner\"/>") ""))
8043 #t))
0442d897
JL
8044 (add-before 'build 'copy-resources
8045 (lambda _
8046 (copy-recursively "src/main/resources" "build/classes")
8047 #t))
8048 (add-before 'check 'copy-test-resources
8049 (lambda _
8050 (copy-recursively "src/test/resources" "build/test-classes")
8051 #t))
8052 (replace 'check
8053 (lambda _
8054 (system* "ant" "compile-tests")
8055 ;; we don't have groovy
8056 (substitute* "src/test/resources/testng.xml"
8057 (("<class name=\"test.groovy.GroovyTest\" />") ""))
8058 (zero? (system* "java" "-cp" (string-append (getenv "CLASSPATH")
8059 ":build/classes"
8060 ":build/test-classes")
8061 "-Dtest.resources.dir=src/test/resources"
8062 "org.testng.TestNG" "src/test/resources/testng.xml")))))))
8063 (propagated-inputs
8064 `(("junit" ,java-junit)
8065 ("java-jsr305" ,java-jsr305)
8066 ("java-bsh" ,java-bsh)
8067 ("java-jcommander" ,java-jcommander)
8068 ("java-guice" ,java-guice)
8069 ("snakeyaml" ,java-snakeyaml)))
8070 (native-inputs
8071 `(("guava" ,java-guava)
8072 ("java-javax-inject" ,java-javax-inject)
8073 ("java-hamcrest" ,java-hamcrest-all)
8074 ("java-assertj" ,java-assertj)
36b39d16 8075 ("java-mockito" ,java-mockito-1)
0442d897
JL
8076 ("cglib" ,java-cglib)
8077 ("asm" ,java-asm)
8078 ("aopalliance" ,java-aopalliance)))
8079 (home-page "http://testng.org")
8080 (synopsis "Testing framework")
8081 (description "TestNG is a testing framework inspired from JUnit and NUnit
8082but introducing some new functionalities that make it more powerful and easier
8083to use.")
8084 (license license:asl2.0)))
1717a7de
JL
8085
8086(define-public java-jnacl
3e87923a
RW
8087 (let ((commit "094e819afdd63ea81a499b3bcb42a271006bebd9")
8088 (revision "2"))
8089 (package
8090 (name "java-jnacl")
8091 (version (string-append "0.1.0-" revision "." (string-take commit 7)))
8092 (source (origin
8093 (method git-fetch)
8094 (uri (git-reference
8095 (url "https://github.com/neilalexander/jnacl.git")
8096 (commit commit)))
6c34ad73 8097 (file-name (git-file-name name version))
3e87923a
RW
8098 (sha256
8099 (base32
8100 "1d6g6xhn83byv5943n7935wwjsk0ibk0qdvqgr699qqgqqmwisbb"))))
8101 (build-system ant-build-system)
8102 (arguments
8c7d32e0 8103 `(#:jar-name "jnacl.jar"
3e87923a
RW
8104 #:source-dir "src/main/java"
8105 #:jdk ,icedtea-8
8106 #:phases
8107 (modify-phases %standard-phases
8108 (add-before 'build 'fix-tests
8109 (lambda _
8110 (substitute* '("src/test/java/com/neilalexander/jnacl/NaClTest.java"
8111 "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java")
8112 (("assertions.Assertions") "assertions.api.Assertions"))
8113 #t))
8114 (replace 'check
8115 (lambda _
8116 (invoke "ant" "compile-tests")
8117 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8118 ":build/classes"
8119 ":build/test-classes")
8120 "org.testng.TestNG" "-testclass"
8121 "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class")
8122 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8123 ":build/classes"
8124 ":build/test-classes")
8125 "org.testng.TestNG" "-testclass"
8126 "build/test-classes/com/neilalexander/jnacl/NaClTest.class")
8127 #t)))))
8128 (native-inputs
8129 `(("java-testng" ,java-testng)
8130 ("java-fest-util" ,java-fest-util)
8131 ("java-fest-assert" ,java-fest-assert)))
8132 (home-page "https://github.com/neilalexander/jnacl")
8133 (synopsis "Java implementation of NaCl")
8134 (description "Pure Java implementation of the NaCl: Networking and
1717a7de 8135Cryptography library.")
3e87923a 8136 (license license:bsd-2))))
eaf3cb7a
JL
8137
8138(define-public java-mvel2
8139 (package
8140 (name "java-mvel2")
8141 (version "2.3.1")
8142 (source (origin
8143 (method url-fetch)
8144 (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-"
8145 version ".Final.tar.gz"))
8146 (sha256
8147 (base32
8148 "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z"))))
8149 (build-system ant-build-system)
8150 (arguments
8151 `(#:jar-name "mvel2.jar"
8152 #:source-dir "src/main/java"
8153 #:test-exclude
8154 (list "**/Abstract*.java"
8155 ;; Base class with no tests
8156 "**/MVELThreadTest.java")
8157 #:phases
8158 (modify-phases %standard-phases
8159 (add-after 'install 'install-bin
8160 (lambda* (#:key outputs #:allow-other-keys)
8161 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
8162 (mkdir-p bin)
8163 (with-output-to-file (string-append bin "/mvel2")
8164 (lambda _
8165 (display
8166 (string-append
8167 "#!" (which "bash") "\n"
8168 "if [ \"$#\" -ne \"2\" ]; then\n"
8169 "echo 'Usage: mvel2 <script> <out.dir>'\n"
8170 "exit\n"
8171 "fi\n"
8172 "java -Dout.dir=$2 -cp " (getenv "CLASSPATH")
8173 ":" (assoc-ref outputs "out") "/share/java/mvel2.jar"
8174 " org.mvel2.sh.Main $1"))))
8175 (chmod (string-append bin "/mvel2") #o755))
8176 #t)))))
8177 (native-inputs
8178 `(("junit" ,java-junit)
8179 ("hamcrest" ,java-hamcrest-core)))
8180 (home-page "https://github.com/mvel/mvel")
8181 (synopsis "MVFLEX Expression Language")
8182 (description "MVEL has largely been inspired by Java syntax, but has some
8183fundamental differences aimed at making it more efficient as an expression
8184language, such as operators that directly support collection, array and string
8185matching, as well as regular expressions. MVEL is used to evaluate expressions
8186written using Java syntax.
8187
8188In addition to the expression language, MVEL serves as a templating language for
8189configuration and string construction.")
8190 (license license:asl2.0)))
d54d7d31 8191
9e325e8c
RW
8192(define-public java-commons-jexl-2
8193 (package
8194 (name "java-commons-jexl")
8195 (version "2.1.1")
8196 (source (origin
8197 (method url-fetch)
8198 (uri (string-append "mirror://apache/commons/jexl/source/"
8199 "commons-jexl-" version "-src.tar.gz"))
8200 (sha256
8201 (base32
8202 "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz"))))
8203 (build-system ant-build-system)
8204 (arguments
8205 `(#:jar-name "commons-jexl-2.jar"
8206 #:jdk ,icedtea-8
8207 #:source-dir "src/main/java"
8208 #:phases
8209 (modify-phases %standard-phases
8210 (add-before 'check 'disable-broken-tests
8211 (lambda* (#:key inputs #:allow-other-keys)
8212 (with-directory-excursion "src/test/java/org/apache/commons/jexl2/"
8213 (substitute* "ArithmeticTest.java"
8214 (("asserter.assertExpression\\(\"3 / 0\"") "//")
8215 (("asserter.assertExpression\\(\"imanull") "//"))
8216 ;; This test fails with "ambiguous method invocation"
8217 (delete-file "CacheTest.java")
8218 ;; This test doesn't have access to the temp directory
8219 (substitute* "ClassCreatorTest.java"
8220 (("java.io.tmpdir") "user.dir"))
8221 ;; This test fails in trying to detect whether it can run.
8222 (substitute* "ClassCreator.java"
8223 (("boolean canRun =.*") "boolean canRun = false;\n"))
8224 ;; ...and these tests depend on it.
8225 (delete-file "scripting/JexlScriptEngineOptionalTest.java")
8226 (delete-file "scripting/JexlScriptEngineTest.java"))
8227 #t))
8228 (add-before 'build 'run-javacc
8229 (lambda _
8230 (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/"
080d0b60
RW
8231 (invoke "java" "jjtree" "Parser.jjt")
8232 (invoke "java" "javacc" "Parser.jj"))
8233 #t)))))
9e325e8c
RW
8234 (inputs
8235 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
8236 (native-inputs
8237 `(("java-junit" ,java-junit)
8238 ("java-hamcrest-core" ,java-hamcrest-core)
8239 ("javacc" ,javacc-4)))
8240 (home-page "https://commons.apache.org/proper/commons-jexl/")
8241 (synopsis "Java Expression Language ")
8242 (description "JEXL is a library intended to facilitate the implementation
8243of dynamic and scripting features in applications and frameworks written in
8244Java. JEXL implements an Expression Language based on some extensions to the
8245JSTL Expression Language supporting most of the constructs seen in
8246shell-script or ECMAScript. Its goal is to expose scripting features usable
8247by technical operatives or consultants working with enterprise platforms.")
8248 (license license:asl2.0)))
8249
d54d7d31
JL
8250(define-public java-lz4
8251 (package
8252 (name "java-lz4")
8253 (version "1.4.0")
8254 (source (origin
8255 (method url-fetch)
8256 (uri (string-append "https://github.com/lz4/lz4-java/archive/"
8257 version ".tar.gz"))
8258 (file-name (string-append name "-" version ".tar.gz"))
8259 (sha256
8260 (base32
8261 "096dm57p2lzqk28n0j2p52x2j3cvnsd2dfqn43n7vbwrkjsy7y54"))))
8262 (build-system ant-build-system)
8263 (arguments
8264 `(#:jar-name "lz4.jar"
8265 #:jdk ,icedtea-8
8266 #:source-dir "src/java:src/java-unsafe"
8267 #:tests? #f; FIXME: requires more dependencies
8268 #:phases
8269 (modify-phases %standard-phases
8270 (add-before 'configure 'generate-source
8271 (lambda _
8272 (with-directory-excursion "src/build/source_templates"
1b6bc516
RW
8273 (invoke "mvel2" "../gen_sources.mvel" "../../java"))
8274 #t)))))
d54d7d31
JL
8275 (native-inputs
8276 `(("mvel" ,java-mvel2)))
8277 (home-page "https://jpountz.github.io/lz4-java")
8278 (synopsis "Compression algorithm")
8279 (description "LZ4 - Java is a Java port of the popular lz4 compression
8280algorithms and xxHash hashing algorithm.")
8281 (license license:asl2.0)))
62315865 8282
50d70a72 8283(define-public java-bouncycastle
62315865 8284 (package
50d70a72
JL
8285 (name "java-bouncycastle")
8286 (version "1.59")
62315865
JL
8287 (source (origin
8288 (method url-fetch)
50d70a72
JL
8289 (uri (string-append "https://github.com/bcgit/bc-java/archive/r"
8290 (substring version 0 1) "rv"
8291 (substring version 2 4) ".tar.gz"))
62315865
JL
8292 (sha256
8293 (base32
50d70a72
JL
8294 "1bwl499whlbq896w18idqw2dkp8v0wp0npv9g71i5fgf8xjh0k3q"))
8295 (modules '((guix build utils)))
8296 (snippet
8297 '(begin
8298 (for-each delete-file
8299 (find-files "." "\\.jar$"))
8300 #t))))
62315865
JL
8301 (build-system ant-build-system)
8302 (arguments
50d70a72 8303 `(#:jdk ,icedtea-8
0c68f7fd 8304 #:tests? #f
62315865
JL
8305 #:phases
8306 (modify-phases %standard-phases
50d70a72 8307 (replace 'build
62315865 8308 (lambda _
50d70a72
JL
8309 (invoke "ant" "-f" "ant/jdk15+.xml" "build-provider")
8310 (invoke "ant" "-f" "ant/jdk15+.xml" "build")
8311 #t))
0c68f7fd
RW
8312 ;; FIXME: the tests freeze.
8313 ;; (replace 'check
8314 ;; (lambda _
8315 ;; (invoke "ant" "-f" "ant/jdk15+.xml" "test")))
50d70a72
JL
8316 (replace 'install
8317 (install-jars "build/artifacts/jdk1.5/jars")))))
8318 (inputs
8319 `(("java-javax-mail" ,java-javax-mail)))
31208367
JL
8320 (native-inputs
8321 `(("unzip" ,unzip)
50d70a72
JL
8322 ("junit" ,java-junit)
8323 ("java-native-access" ,java-native-access)
8324 ("java-native-access-platform" ,java-native-access-platform)))
31208367
JL
8325 (home-page "https://www.bouncycastle.org")
8326 (synopsis "Cryptographic library")
50d70a72
JL
8327 (description "Bouncy Castle is a cryptographic library for the Java
8328programming language.")
31208367 8329 (license license:expat)))
a53d9ac0
JL
8330
8331(define-public java-lmax-disruptor
8332 (package
8333 (name "java-lmax-disruptor")
8334 (version "3.3.7")
8335 (source (origin
8336 (method url-fetch)
8337 (uri (string-append "https://github.com/LMAX-Exchange/disruptor/"
8338 "archive/" version ".tar.gz"))
8339 (file-name (string-append name "-" version ".tar.gz"))
8340 (sha256
8341 (base32
8342 "17da2gwj5abnlsfgn2xqjk5lgzbg4vkb0hdv2dvc8r2fx4bi7w3g"))))
8343 (build-system ant-build-system)
8344 (arguments
8345 `(#:jar-name "java-lmax-disruptor.jar"
8346 #:jdk ,icedtea-8
8347 #:tests? #f)); tests hang
8348 (inputs
8349 `(("junit" ,java-junit)
8350 ("java-hdrhistogram" ,java-hdrhistogram)
8351 ("java-jmock" ,java-jmock)
8352 ("java-jmock-legacy" ,java-jmock-legacy)
8353 ("java-jmock-junit4" ,java-jmock-junit4)
8354 ("java-hamcrest-all" ,java-hamcrest-all)))
8355 (native-inputs
8356 `(("cglib" ,java-cglib)
8357 ("objenesis" ,java-objenesis)
8358 ("asm" ,java-asm)))
8359 (home-page "https://www.lmax.com/disruptor")
8360 (synopsis "High performance inter-thread communication")
8361 (description "LMAX Disruptor is a software pattern and software component
8362for high performance inter-thread communication that avoids the need for
8363message queues or resource locking.")
8364 (license license:asl2.0)))
5619556b 8365
5e3abfc8
RW
8366(define-public java-commons-bcel
8367 (package
8368 (name "java-commons-bcel")
8369 (version "6.1")
8370 (source (origin
8371 (method url-fetch)
8372 (uri (string-append "mirror://apache/commons/bcel/source/bcel-"
8373 version "-src.tar.gz"))
8374 (sha256
8375 (base32
8376 "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy"))))
8377 (build-system ant-build-system)
8378 (arguments
8379 `(#:jar-name "bcel.jar"
8380 #:jdk ,icedtea-8
8381 #:source-dir "src/main/java"
8382 #:test-dir "src/test/java"
8383 ;; FIXME: Tests require the unpackaged jna.
8384 #:tests? #f))
8385 (home-page "https://commons.apache.org/proper/commons-bcel/")
8386 (synopsis "Byte code engineering library")
8387 (description "The Byte Code Engineering Library (Apache Commons BCEL) is
8388intended to give users a convenient way to analyze, create, and
8389manipulate (binary) Java class files. Classes are represented by objects
8390which contain all the symbolic information of the given class: methods, fields
8391and byte code instructions, in particular.
8392
8393Such objects can be read from an existing file, be transformed by a
8394program (e.g. a class loader at run-time) and written to a file again. An
8395even more interesting application is the creation of classes from scratch at
8396run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful
8397if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format
8398of Java @code{.class} files.")
8399 (license license:asl2.0)))
8400
5619556b
JL
8401(define-public java-xerial-core
8402 (package
8403 (name "java-xerial-core")
8404 (version "2.1")
8405 (source (origin
8406 (method url-fetch)
8407 (uri (string-append "https://github.com/xerial/xerial-java/archive/"
8408 version ".tar.gz"))
8409 (file-name (string-append name "-" version ".tar.gz"))
8410 (sha256
8411 (base32
8412 "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d"))))
8413 (build-system ant-build-system)
8414 (arguments
8415 `(#:jar-name "xerial-core.jar"
8416 #:source-dir "xerial-core/src/main/java"
8417 #:test-dir "xerial-core/src/test"
8418 #:phases
8419 (modify-phases %standard-phases
8420 (add-before 'build 'copy-resources
8421 (lambda _
8422 (copy-recursively "xerial-core/src/main/resources"
8423 "build/classes")
8424 #t)))))
8425 (native-inputs
8426 `(("junit" ,java-junit)
8427 ("hamcrest" ,java-hamcrest-core)))
8428 (home-page "https://github.com/xerial/xerial-java")
f4548394 8429 (synopsis "Data management libraries for Java")
5619556b 8430 (description "Xerial is a set of data management libraries for the Java
f4548394 8431programming language. The ultimate goal of the Xerial project is to manage
5619556b
JL
8432everything as database, including class objects, text format data, data
8433streams, etc.")
8434 (license license:asl2.0)))
8d6a4815
JL
8435
8436(define-public java-powermock-reflect
8437 (package
8438 (name "java-powermock-reflect")
8439 (version "1.7.3")
8440 (source (origin
8441 (method url-fetch)
8442 (uri (string-append "https://github.com/powermock/powermock/"
8443 "archive/powermock-" version ".tar.gz"))
8444 (file-name (string-append name "-" version ".tar.gz"))
8445 (sha256
8446 (base32
8447 "0sbgi5vqq7k72wzcdjb20s370vyd4hsbnx71pzb8ishml3gy7fwy"))
8448 (patches
8449 (search-patches "java-powermock-fix-java-files.patch"))))
8450 (build-system ant-build-system)
8451 (arguments
8452 `(#:jar-name "java-powermock-reflect.jar"
8453 #:jdk ,icedtea-8
8454 #:source-dir "powermock-reflect/src/main/java"
8455 #:test-dir "powermock-reflect/src/test"))
8456 (inputs
8457 `(("java-objenesis" ,java-objenesis)))
8458 (native-inputs
8459 `(("junit" ,java-junit)
8460 ("cglib" ,java-cglib)
8461 ("asm" ,java-asm)
8462 ("hamcrest" ,java-hamcrest-core)
8463 ("assertj" ,java-assertj)))
8464 (home-page "https://github.com/powermock/powermock")
8465 (synopsis "Mock library extension framework")
8466 (description "PowerMock is a framework that extends other mock libraries
8467such as EasyMock with more powerful capabilities. PowerMock uses a custom
8468classloader and bytecode manipulation to enable mocking of static methods,
8469constructors, final classes and methods, private methods, removal of static
8470initializers and more. By using a custom classloader no changes need to be
8471done to the IDE or continuous integration servers which simplifies adoption.")
8472 (license license:asl2.0)))
d4a4d5da
JL
8473
8474(define-public java-powermock-core
8475 (package
8476 (inherit java-powermock-reflect)
8477 (name "java-powermock-core")
8478 (arguments
8479 `(#:jar-name "java-powermock-core.jar"
8480 #:source-dir "powermock-core/src/main/java"
8481 #:test-dir "powermock-core/src/test"
8482 #:tests? #f; requires powermock-api
59e0021c
JL
8483 #:jdk ,icedtea-8
8484 #:phases
8485 (modify-phases %standard-phases
8486 (add-before 'build 'copy-resources
8487 (lambda _
8488 (copy-recursively "powermock-core/src/main/resources"
8489 "build/classes"))))))
d4a4d5da
JL
8490 (inputs
8491 `(("reflect" ,java-powermock-reflect)
8492 ("javassist" ,java-jboss-javassist)))
8493 (native-inputs
8494 `(("junit" ,java-junit)
8495 ("assertj" ,java-assertj)
8496 ("mockito" ,java-mockito-1)))))
2d5d65d7
JL
8497
8498(define-public java-powermock-api-support
8499 (package
8500 (inherit java-powermock-reflect)
8501 (name "java-powermock-api-support")
8502 (build-system ant-build-system)
8503 (arguments
8504 `(#:jar-name "java-powermock-api-support.jar"
8505 #:jdk ,icedtea-8
8506 #:source-dir "powermock-api/powermock-api-support/src/main/java"
8507 #:tests? #f)); no tests
8508 (inputs
8509 `(("core" ,java-powermock-core)
8510 ("reflect" ,java-powermock-reflect)))))
6c21d46c
JL
8511
8512(define-public java-powermock-modules-junit4-common
8513 (package
8514 (inherit java-powermock-reflect)
8515 (name "java-powermock-modules-junit4-common")
8516 (build-system ant-build-system)
8517 (arguments
8518 `(#:jar-name "java-powermock-modules-junit4-common.jar"
8519 #:jdk ,icedtea-8
8520 #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java"
8521 #:test-dir "powermock-modules/powermock-module-junit4-common/src/test"))
8522 (inputs
8523 `(("core" ,java-powermock-core)
8524 ("easymock" ,java-easymock)
8525 ("reflect" ,java-powermock-reflect)
8526 ("hamcrest" ,java-hamcrest-core)
8527 ("cglib" ,java-cglib)))))
33db1681
JL
8528
8529(define-public java-powermock-modules-junit4
8530 (package
8531 (inherit java-powermock-reflect)
8532 (name "java-powermock-modules-junit4")
8533 (build-system ant-build-system)
8534 (arguments
8535 `(#:jar-name "java-powermock-modules-junit4.jar"
8536 #:jdk ,icedtea-8
8537 #:source-dir "powermock-modules/powermock-module-junit4/src/main/java"
1124683d
JL
8538 #:test-dir "powermock-modules/powermock-module-junit4/src/test"
8539 #:phases
8540 (modify-phases %standard-phases
8541 (add-before 'build 'fix-junit-detection
8542 (lambda _
8543 ;; Our junit version is 4.12-SNAPSHOT
8544 (substitute* (find-files "powermock-modules/powermock-module-junit4"
8545 "PowerMockJUnit4MethodValidator.java")
8546 (("4.12") "4.12-SNAPSHOT")))))))
33db1681
JL
8547 (inputs
8548 `(("core" ,java-powermock-core)
8549 ("reflect" ,java-powermock-reflect)
8550 ("common" ,java-powermock-modules-junit4-common)
8551 ("cglib" ,java-cglib)))
8552 (native-inputs
8553 `(("easymock" ,java-easymock)
8554 ("hamcrest" ,java-hamcrest-core)
8555 ("objenesis" ,java-objenesis)
8556 ("asm" ,java-asm)
8557 ("junit" ,java-junit)))))
4d508975
JL
8558
8559(define-public java-powermock-api-easymock
8560 (package
8561 (inherit java-powermock-reflect)
8562 (name "java-powermock-api-easymock")
8563 (build-system ant-build-system)
8564 (arguments
8565 `(#:jar-name "java-powermock-api-easymock.jar"
8566 #:jdk ,icedtea-8
8567 #:source-dir "powermock-api/powermock-api-easymock/src/main/java"
8568 #:tests? #f; no tests
8569 #:phases
8570 (modify-phases %standard-phases
8571 (add-before 'build 'fix-file
8572 (lambda _
8573 ;; FIXME: This looks wrong, but it fixes a build error.
8574 (with-directory-excursion "powermock-api/powermock-api-easymock"
8575 (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java"
8576 (("classLoader instanceof MockClassLoader") "false")
8577 (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";")))
8578 #t)))))
8579 (inputs
8580 `(("core" ,java-powermock-core)
8581 ("easymock" ,java-easymock)
8582 ("reflect" ,java-powermock-reflect)
8583 ("support" ,java-powermock-api-support)
8584 ("cglib" ,java-cglib)))))
5fb3e822
JL
8585
8586(define-public java-jboss-jms-api-spec
8587 (package
8588 (name "java-jboss-jms-api-spec")
8589 (version "2.0")
8590 (source (origin
8591 (method url-fetch)
8592 (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/"
8593 "archive/jboss-jms-api_" version
8594 "_spec-1.0.1.Final.tar.gz"))
8595 (sha256
8596 (base32
8597 "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m"))))
8598 (build-system ant-build-system)
8599 (arguments
8600 `(#:jar-name "java-jboss-jms-api_spec.jar"
8601 #:jdk ,icedtea-8
8602 #:source-dir "."
8603 #:tests? #f)); no tests
8604 (home-page "https://github.com/jboss/jboss-jms-api_spec")
8605 (synopsis "Java Message Service API specification")
8606 (description "Java Message Service (JMS) API is used to send messages
8607messages between two or more clients. It is a messaging standard that allows
8608application components to create, send, receive, and read messages.")
8609 ; either gpl2 only with GPL Classpath Exception, or cddl.
8610 (license (list license:gpl2 license:cddl1.0))))
3ff47c66
JL
8611
8612(define-public java-mail
8613 (package
8614 (name "java-mail")
8615 (version "1.6.0")
8616 (source (origin
8617 (method url-fetch)
8618 (uri (string-append "https://github.com/javaee/javamail/archive/"
8619 "JAVAMAIL-1_6_0.tar.gz"))
8620 (sha256
8621 (base32
8622 "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92"))))
8623 (build-system ant-build-system)
8624 (arguments
8625 `(#:jar-name "java-mail.jar"
8626 #:jdk ,icedtea-8
8627 #:source-dir "mail/src/main/java"
8628 #:test-dir "mail/src/test"
8629 #:test-exclude
8630 (list "**/CollectorFormatterTest.java"
8631 "**/CompactFormatterTest.java"
8632 "**/DurationFilterTest.java"
8633 "**/MailHandlerTest.java"
8634 "**/GetLocalAddressTest.java"
8635 ;; FIXME: both end with:
8636 ;; java.lang.ClassNotFoundException:
8637 ;; javax.mail.internet.MimeMultipartParseTest
8638 "**/MimeMultipartParseTest.java"
8639 "**/SearchTermSerializationTest.java")
8640 #:phases
8641 (modify-phases %standard-phases
8642 (add-before 'configure 'move-version.java
8643 (lambda _
8644 (copy-file "mail/src/main/resources/javax/mail/Version.java"
218d1dde
RW
8645 "mail/src/main/java/javax/mail/Version.java")
8646 #t))
3ff47c66
JL
8647 (add-before 'build 'copy-resources
8648 (lambda _
8649 (copy-recursively "mail/src/main/resources/META-INF"
8650 "build/classes/META-INF")
8651 #t)))))
8652 (native-inputs
8653 `(("junit" ,java-junit)
8654 ("hamcrest" ,java-hamcrest-core)))
8655 (home-page "https://javaee.github.io/javamail/")
8656 (synopsis "Mail-related functionnalities in Java")
8657 (description "The JavaMail API provides a platform-independent and
8658protocol-independent framework to build mail and messaging applications.")
8659 ;; General Public License Version 2 only ("GPL") or the Common Development
8660 ;; and Distribution License("CDDL")
8661 (license (list license:cddl1.1
8662 license:gpl2)))); with classpath exception
217b20e4
JL
8663
8664(define-public java-jeromq
8665 (package
8666 (name "java-jeromq")
4aa0a1df 8667 (version "0.4.3")
217b20e4 8668 (source (origin
4aa0a1df
RW
8669 (method git-fetch)
8670 (uri (git-reference
8671 (url "https://github.com/zeromq/jeromq.git")
8672 (commit (string-append "v" version))))
8673 (file-name (string-append name "-" version "-checkout"))
217b20e4
JL
8674 (sha256
8675 (base32
594bd3a0
GB
8676 "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj"))
8677 (patches (search-patches "java-jeromq-fix-tests.patch"))))
217b20e4
JL
8678 (build-system ant-build-system)
8679 (arguments
8680 `(#:jar-name "java-jeromq.jar"
8681 #:source-dir "src/main/java"
8682 #:jdk ,icedtea-8
8683 #:test-exclude
8684 (list
8685 "**/Abstract*.java"
8686 ;; Requires network
8687 "**/ZBeaconTest.java"
8688 ;; Failures
4aa0a1df 8689 "**/DealerSpecTest.java"
217b20e4 8690 "**/CustomDecoderTest.java"
594bd3a0
GB
8691 "**/CustomEncoderTest.java"
8692 "**/ConnectRidTest.java"
8693 "**/ReqSpecTest.java"
8694 "**/PushPullSpecTest.java"
8695 "**/PubSubHwmTest.java"
8696 "**/RouterSpecTest.java"
8697 "**/ProxyTest.java")))
217b20e4
JL
8698 (inputs
8699 `(("java-jnacl" ,java-jnacl)))
8700 (native-inputs
8701 `(("java-hamcrest-core" ,java-hamcrest-core)
8702 ("junit" ,java-junit)))
8703 (home-page "http://zeromq.org/bindings:java")
8704 (synopsis "Java binding for 0MQ")
8705 (description "Jeromq provides the java bindings for 0MQ.")
8706 (license license:mpl2.0)))
46c6905a
JL
8707
8708(define-public java-kafka-clients
8709 (package
8710 (name "java-kafka-clients")
8711 (version "1.0.0")
8712 (source (origin
8713 (method url-fetch)
8714 (uri (string-append "mirror://apache/kafka/" version "/kafka-"
8715 version "-src.tgz"))
8716 (sha256
8717 (base32
8718 "1yxmnsmliwm7671q5yy9bl4jdqyyn00n26cggz9brwczx80w1vfq"))))
8719 (build-system ant-build-system)
8720 (arguments
8721 `(#:jar-name "java-kafka-clients.jar"
8722 #:jdk ,icedtea-8
8723 #:source-dir "clients/src/main/java"
8724 #:test-dir "clients/src/test"
8725 #:test-exclude
8726 (list
8727 ;; This file does not contain a class
8728 "**/IntegrationTest.java"
8729 ;; Requires network
8730 "**/ClientUtilsTest.java"
8731 ;; End with errors that seem related to our powermock
8732 "**/KafkaProducerTest.java"
8733 "**/BufferPoolTest.java")))
8734 (inputs
8735 `(("java-slf4j-api" ,java-slf4j-api)
8736 ("java-lz4" ,java-lz4)))
8737 (native-inputs
8738 `(("junit" ,java-junit)
8739 ("hamcrest" ,java-hamcrest-all)
8740 ("objenesis" ,java-objenesis)
8741 ("asm" ,java-asm)
8742 ("cglib" ,java-cglib)
8743 ("javassist" ,java-jboss-javassist)
8744 ("snappy" ,java-snappy)
8745 ("easymock" ,java-easymock)
8746 ("powermock" ,java-powermock-core)
8747 ("powermock-easymock" ,java-powermock-api-easymock)
8748 ("powermock-junit4-common" ,java-powermock-modules-junit4-common)
8749 ("powermock-junit4" ,java-powermock-modules-junit4)
8750 ("powermock-support" ,java-powermock-api-support)
50d70a72 8751 ("java-bouncycastle" ,java-bouncycastle)))
46c6905a
JL
8752 (home-page "https://kafka.apache.org")
8753 (synopsis "Distributed streaming platform")
8754 (description "Kafka is a distributed streaming platform, which means:
8755@itemize
8756@item it can publish and subscribe to streams of records;
8757@item it can store streams of records in a fault-tolerant way;
8758@item it can process streams of records as they occur.
8759@end itemize")
8760 ;; Either cddl or gpl2 only.
8761 (license (list license:cddl1.1; actually cddl1.1
8762 license:gpl2)))); with classpath exception
0b54e190
JL
8763
8764(define-public java-jdom
8765 (package
8766 (name "java-jdom")
8767 (version "1.1.3")
8768 (source (origin
8769 (method url-fetch)
8770 (uri (string-append "http://jdom.org/dist/binary/archive/jdom-"
8771 version ".tar.gz"))
8772 (sha256
8773 (base32
8774 "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl"))))
8775 (build-system ant-build-system)
8776 (arguments
8777 `(#:build-target "package"
8778 #:tests? #f; tests are run as part of the build process
8779 #:phases
8780 (modify-phases %standard-phases
8781 (replace 'install
8782 (install-jars "build")))))
8783 (home-page "http://jdom.org/")
8784 (synopsis "Access, manipulate, and output XML data")
8785 (description "Java-based solution for accessing, manipulating, and
8786outputting XML data from Java code.")
8787 (license license:bsd-4)))
78745d33
JL
8788
8789(define-public java-geronimo-xbean-reflect
8790 (package
8791 (name "java-geronimo-xbean-reflect")
8792 (version "4.5")
8793 (source (origin
8794 (method svn-fetch)
8795 (uri (svn-reference
8796 (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/")
8797 (revision 1807396)))
8798 (file-name (string-append name "-" version))
8799 (sha256
8800 (base32
8801 "18q3i6jgm6rkw8aysfgihgywrdc5nvijrwnslmi3ww497jvri6ja"))))
8802 (build-system ant-build-system)
8803 (arguments
8804 `(#:jar-name "geronimo-xbean-reflect.jar"
8805 #:source-dir "xbean-reflect/src/main/java"
8806 #:test-dir "xbean-reflect/src/test"
8807 #:jdk ,icedtea-8
8808 #:test-exclude
8809 (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java"
8810 "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java"
8811 "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java")
8812 #:phases
8813 (modify-phases %standard-phases
8814 (add-before 'build 'fix-source
8815 (lambda _
8816 (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/"))
8817 ;; org.apache.xbean.asm6 is actually repackaged java-asm
8818 (substitute* (string-append dir "XbeanAsmParameterNameLoader.java")
8819 (("org.apache.xbean.asm5") "org.objectweb.asm"))
8820 #t))))))
8821 (inputs
8822 `(("asm" ,java-asm)
8823 ("log4j" ,java-log4j-api)
8824 ("log4j-1.2" ,java-log4j-1.2-api)
8825 ("log4j-core" ,java-log4j-core)
8826 ("logging" ,java-commons-logging-minimal)))
8827 (native-inputs
8828 `(("junit" ,java-junit)))
8829 (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/")
8830 (synopsis "Dependency injection helper")
8831 (description "Xbean-reflect provides very flexible ways to create objects
8832and graphs of objects for dependency injection frameworks")
8833 (license license:asl2.0)))
09c44196 8834
3fda539b
JL
8835(define-public java-geronimo-xbean-bundleutils
8836 (package
8837 (inherit java-geronimo-xbean-reflect)
8838 (name "java-geronimo-xbean-bundleutils")
8839 (arguments
8840 `(#:jar-name "geronimo-xbean-bundleutils.jar"
8841 #:source-dir "xbean-bundleutils/src/main/java"
8842 #:test-dir "xbean-bundleutils/src/test"
8843 #:phases
8844 (modify-phases %standard-phases
8845 (add-before 'build 'fix-java
8846 (lambda _
8847 ;; We use a more recent version of osgi, so this file requires
8848 ;; more interface method implementations.
8849 (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java"
8850 (("import org.osgi.framework.ServiceRegistration;")
8851 "import org.osgi.framework.ServiceRegistration;
8852import org.osgi.framework.ServiceFactory;
8853import java.util.Collection;
8854import org.osgi.framework.ServiceObjects;")
8855 (("public Bundle getBundle\\(\\)")
8856 "@Override
8857public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) {
8858 throw new UnsupportedOperationException();
8859}
8860@Override
8861public <S> ServiceRegistration<S> registerService(Class<S> clazz,
8862 ServiceFactory<S> factory, Dictionary<String, ?> properties) {
8863 throw new UnsupportedOperationException();
8864}
8865public Bundle getBundle()"))
8866 #t)))))
8867 (inputs
8868 `(("java-slf4j" ,java-slf4j-api)
8869 ("java-asm" ,java-asm)
8870 ("java-osgi-framework" ,java-osgi-framework)
8871 ("java-eclipse-osgi" ,java-eclipse-osgi)
8872 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)))))
0cb9ce32
JL
8873
8874(define-public java-geronimo-xbean-asm-util
8875 (package
8876 (inherit java-geronimo-xbean-reflect)
8877 (name "java-geronimo-xbean-asm-util")
8878 (arguments
8879 `(#:jar-name "geronimo-xbean-asm-util.jar"
8880 #:source-dir "xbean-asm-util/src/main/java"
8881 #:tests? #f)); no tests
8882 (inputs
8883 `(("java-asm" ,java-asm)))
8884 (native-inputs '())))
8d510f65
JL
8885
8886(define-public java-geronimo-xbean-finder
8887 (package
8888 (inherit java-geronimo-xbean-reflect)
8889 (name "java-geronimo-xbean-finder")
8890 (arguments
8891 `(#:jar-name "geronimo-xbean-finder.jar"
8892 #:source-dir "xbean-finder/src/main/java"
8893 #:test-dir "xbean-finder/src/test"))
8894 (inputs
8895 `(("java-slf4j-api" ,java-slf4j-api)
8896 ("java-asm" ,java-asm)
8897 ("java-geronimo-xbean-bundleutils" ,java-geronimo-xbean-bundleutils)
8898 ("java-geronimo-xbean-asm-util" ,java-geronimo-xbean-asm-util)
8899 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)
8900 ("java-osgi-framework" ,java-osgi-framework)))
8901 (native-inputs
8902 `(("java-junit" ,java-junit)
8903 ("java-hamcrest-core" ,java-hamcrest-core)))))
3fda539b 8904
09c44196
JL
8905(define-public java-gson
8906 (package
8907 (name "java-gson")
8908 (version "2.8.2")
8909 (source (origin
8910 (method url-fetch)
8911 (uri (string-append "https://github.com/google/gson/archive/"
8912 "gson-parent-" version ".tar.gz"))
8913 (sha256
8914 (base32
8915 "1j4qnp7v046q0k48c4kyf69sxaasx2h949d3cqwsm3kzxms3x0f9"))))
8916 (build-system ant-build-system)
8917 (arguments
8918 `(#:jar-name "gson.jar"
8919 #:source-dir "gson/src/main/java"
8920 #:test-dir "gson/src/test"))
8921 (native-inputs
8922 `(("java-junit" ,java-junit)
8923 ("java-hamcrest-core" ,java-hamcrest-core)))
8924 (home-page "https://github.com/google/gson")
8925 (synopsis "Java serialization/deserialization library from/to JSON")
8926 (description "Gson is a Java library that can be used to convert Java
8927Objects into their JSON representation. It can also be used to convert a JSON
8928string to an equivalent Java object. Gson can work with arbitrary Java objects
8929including pre-existing objects that you do not have source-code of.")
8930 (license license:asl2.0)))
335aa20b
JL
8931
8932(define-public java-hawtjni
8933 (package
8934 (name "java-hawtjni")
8935 (version "1.15")
8936 (source (origin
8937 (method url-fetch)
8938 (uri (string-append "https://github.com/fusesource/hawtjni/archive/"
8939 "hawtjni-project-" version ".tar.gz"))
8940 (sha256
8941 (base32
8942 "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g"))))
8943 (build-system ant-build-system)
8944 (arguments
8945 `(#:jar-name "hawtjni.jar"
8946 #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java"
8947 #:tests? #f; no tests
8948 #:phases
8949 (modify-phases %standard-phases
8950 (add-before 'build 'build-native
8951 (lambda* (#:key inputs #:allow-other-keys)
6338ea9a
RW
8952 (let ((include (string-append "-I" (assoc-ref inputs "jdk") "/include/linux")))
8953 (with-directory-excursion "hawtjni-generator/src/main/resources/"
8954 (invoke "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o"
8955 "-fPIC" "-O2" include)
8956 (invoke "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o"
8957 "-fPIC" "-O2" include)
8958 (invoke "gcc" "-o" "libhawtjni.so" "-shared"
8959 "hawtjni.o" "hawtjni-callback.o")))
8960 #t))
335aa20b
JL
8961 (add-after 'install 'install-native
8962 (lambda* (#:key outputs #:allow-other-keys)
8963 (let* ((out (assoc-ref outputs "out"))
8964 (lib (string-append out "/lib"))
8965 (inc (string-append out "/include")))
335aa20b 8966 (with-directory-excursion "hawtjni-generator/src/main/resources/"
6338ea9a
RW
8967 (install-file "libhawtjni.so" lib)
8968 (install-file "hawtjni.h" inc)))
335aa20b
JL
8969 #t)))))
8970 (inputs
8971 `(("java-commons-cli" ,java-commons-cli)
8972 ("java-asm" ,java-asm)
8973 ("java-geronimo-xbean-finder" ,java-geronimo-xbean-finder)))
8974 (home-page "https://fusesource.github.io/hawtjni/")
8975 (synopsis "JNI code generator")
8976 (description "HawtJNI is a code generator that produces the JNI code needed
8977to implement Java native methods. It is based on the jnigen code generator
8978that is part of the SWT Tools project.")
8979 (license license:asl2.0)))
d0c62afa
JL
8980
8981(define-public java-jansi-native
8982 (package
8983 (name "java-jansi-native")
8984 (version "1.7")
8985 (source (origin
8986 (method url-fetch)
8987 (uri (string-append "https://github.com/fusesource/jansi-native/"
8988 "archive/jansi-native-" version ".tar.gz"))
8989 (sha256
8990 (base32
8991 "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf"))))
8992 (build-system ant-build-system)
8993 (arguments
8994 `(#:jar-name "jansi-native.jar"
8995 #:source-dir "src/main/java"
8996 #:tests? #f; no tests
8997 #:phases
8998 (modify-phases %standard-phases
8999 (add-before 'build 'build-native
9000 (lambda* (#:key inputs #:allow-other-keys)
9001 ;; there are more required files for windows in windows/
9002 (with-directory-excursion "src/main/native-package/src"
9003 (substitute* "jansi_ttyname.c"
9004 (("#include \"jansi_.*") ""))
e85c1bf6
RW
9005 (invoke "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o"
9006 (string-append "-I" (assoc-ref inputs "java-hawtjni")
9007 "/include")
9008 (string-append "-I" (assoc-ref inputs "jdk")
9009 "/include/linux")
9010 "-fPIC" "-O2")
9011 (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o")
9012 #t)))
d0c62afa
JL
9013 (add-before 'build 'install-native
9014 (lambda _
9015 (let ((dir (string-append "build/classes/META-INF/native/"
9016 ,(match (%current-system)
9017 ((or "i686-linux" "armhf-linux")
9018 "linux32")
9019 ((or "x86_64-linux" "aarch64-linux")
9020 "linux64")))))
9021 (install-file "src/main/native-package/src/libjansi.so" dir))
9022 #t))
9023 (add-after 'install 'install-native
9024 (lambda* (#:key outputs #:allow-other-keys)
d0c62afa
JL
9025 (install-file "src/main/native-package/src/jansi.h"
9026 (string-append (assoc-ref outputs "out") "/include"))
9027 #t)))))
9028 (inputs
9029 `(("java-hawtjni" ,java-hawtjni)))
9030 (home-page "https://fusesource.github.io/jansi/")
9031 (synopsis "Native library for jansi")
3d6925ef
RW
9032 (description "This package provides the native library for jansi, a small
9033Java library that allows you to use ANSI escape sequences to format your
9034console output.")
d0c62afa 9035 (license license:asl2.0)))
a87ea1ad
JL
9036
9037(define-public java-jansi
9038 (package
9039 (name "java-jansi")
9040 (version "1.16")
9041 (source (origin
9042 (method url-fetch)
9043 (uri (string-append "https://github.com/fusesource/jansi/archive/"
9044 "jansi-project-" version ".tar.gz"))
9045 (sha256
9046 (base32
9047 "11kh3144i3fzp21dpy8zg52mjmsr214k7km9p8ly0rqk2px0qq2z"))))
9048 (build-system ant-build-system)
9049 (arguments
9050 `(#:jar-name "jansi.jar"
9051 #:source-dir "jansi/src/main/java"
9052 #:test-dir "jansi/src/test"
9053 #:phases
9054 (modify-phases %standard-phases
9055 (add-after 'check 'clear-term
9056 (lambda _
9057 (zero? (system* "echo" "-e" "\\e[0m")))))))
9058 (inputs
9059 `(("java-jansi-native" ,java-jansi-native)))
9060 (native-inputs
9061 `(("java-junit" ,java-junit)
9062 ("java-hamcrest-core" ,java-hamcrest-core)))
9063 (home-page "https://fusesource.github.io/jansi/")
9064 (synopsis "Portable ANSI escape sequences")
9065 (description "Jansi is a Java library that allows you to use ANSI escape
9066sequences to format your console output which works on every platform.")
9067 (license license:asl2.0)))
cc061329
JL
9068
9069(define-public java-jboss-el-api-spec
9070 (package
9071 (name "java-jboss-el-api-spec")
9072 (version "3.0")
9073 (source (origin
9074 (method url-fetch)
9075 (uri (string-append "https://github.com/jboss/jboss-el-api_spec/"
9076 "archive/jboss-el-api_" version
9077 "_spec-1.0.7.Final.tar.gz"))
9078 (sha256
9079 (base32
9080 "1j45ljxalwlibxl7g7iv952sjxkw275m8vyxxij8l6wdd5pf0pdh"))))
9081 (build-system ant-build-system)
9082 (arguments
9083 `(#:jar-name "java-jboss-el-api_spec.jar"
9084 #:jdk ,icedtea-8))
9085 (inputs
9086 `(("java-junit" ,java-junit)))
9087 (home-page "https://github.com/jboss/jboss-el-api_spec")
9088 (synopsis "JSR-341 expression language 3.0 API")
9089 (description "This package contains an implementation of the JSR-341
9090specification for the expression language 3.0. It implements an expression
9091language inspired by ECMAScript and XPath. This language is used with
9092JavaServer Pages (JSP).")
9093 ;; Either GPL2 only or CDDL.
9094 (license (list license:gpl2 license:cddl1.1))))
cc03a786
JL
9095
9096(define-public java-jboss-interceptors-api-spec
9097 (package
9098 (name "java-jboss-interceptors-api-spec")
9099 (version "1.2")
9100 (source (origin
9101 (method url-fetch)
9102 (uri (string-append "https://github.com/jboss/jboss-interceptors-api_spec/"
9103 "archive/jboss-interceptors-api_" version
9104 "_spec-1.0.0.Final.tar.gz"))
9105 (sha256
9106 (base32
9107 "0wv8x0jp9a5qxlrgkhb5jdk2gr6vi87b4j4kjb8ryxiy9gn8g51z"))))
9108 (build-system ant-build-system)
9109 (arguments
9110 `(#:jar-name "java-jboss-interceptors-api_spec.jar"
9111 #:jdk ,icedtea-8
9112 #:source-dir "."
9113 #:tests? #f)); no tests
9114 (home-page "https://github.com/jboss/jboss-interceptors-api_spec")
9115 (synopsis "Interceptors 1.2 API classes from JSR 318")
9116 (description "Java-jboss-interceptors-api-spec implements the Interceptors
9117API. Interceptors are used to interpose on business method invocations and
9118specific events.")
9119 ;; Either GPL2 only or CDDL.
9120 (license (list license:gpl2 license:cddl1.1))))
a10a451c
JL
9121
9122(define-public java-cdi-api
9123 (package
9124 (name "java-cdi-api")
9125 (version "2.0")
9126 (source (origin
9127 (method url-fetch)
9128 (uri (string-append "https://github.com/cdi-spec/cdi/archive/"
9129 version ".tar.gz"))
9130 (file-name (string-append name "-" version ".tar.gz"))
9131 (sha256
9132 (base32
9133 "1iv8b8bp07c5kmqic14jsr868vycjv4qv02lf3pkgp9z21mnfg5y"))))
9134 (build-system ant-build-system)
9135 (arguments
9136 `(#:source-dir "api/src/main/java"
9137 #:jar-name "java-cdi-api.jar"
9138 #:test-dir "api/src/test"
9139 #:jdk ,icedtea-8
9140 #:tests? #f)); Tests fail because we don't have a CDI provider yet
9141 (inputs
9142 `(("java-javax-inject" ,java-javax-inject)
9143 ("java-jboss-el-api-spec" ,java-jboss-el-api-spec)
9144 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)))
9145 (native-inputs
9146 `(("java-testng" ,java-testng)
9147 ("java-hamcrest-core" ,java-hamcrest-core)))
9148 (home-page "http://cdi-spec.org/")
9149 (synopsis "Contexts and Dependency Injection APIs")
9150 (description "Java-cdi-api contains the required APIs for Contexts and
9151Dependency Injection (CDI).")
9152 (license license:asl2.0)))
d57fd728
JL
9153
9154(define-public java-joda-convert
9155 (package
9156 (name "java-joda-convert")
9157 (version "1.9.2")
9158 (source (origin
9159 (method url-fetch)
9160 (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v"
9161 version ".tar.gz"))
9162 (file-name (string-append name "-" version ".tar.gz"))
9163 (sha256
9164 (base32
9165 "0vp346xz7dh9br4q7xazhc7hvzf76a6hf95fki9bg67q5jr0kjh7"))))
9166 (build-system ant-build-system)
9167 (arguments
9168 `(#:jar-name (string-append ,name "-" ,version ".jar")
9169 #:source-dir "src/main/java"
9170 #:test-include (list "**/Test*.java")
9171 ;; Contains only interfaces and base classes (no test)
9172 #:test-exclude (list "**/test*/**.java")))
9173 (inputs
9174 `(("java-guava" ,java-guava)))
9175 (native-inputs
9176 `(("java-junit" ,java-junit)
9177 ("java-hamcrest-core" ,java-hamcrest-core)))
9178 (home-page "http://www.joda.org/joda-convert/")
9179 (synopsis "Conversion between Objects and Strings")
9180 (description "Joda-Convert provides a small set of classes to aid
9181conversion between Objects and Strings. It is not intended to tackle the
9182wider problem of Object to Object transformation.")
9183 (license license:asl2.0)))
0158ea8a
JL
9184
9185(define-public java-joda-time
9186 (package
9187 (name "java-joda-time")
9188 (version "2.9.9")
9189 (source (origin
9190 (method url-fetch)
9191 (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v"
9192 version ".tar.gz"))
9193 (file-name (string-append name "-" version ".tar.gz"))
9194 (sha256
9195 (base32
9196 "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1"))))
9197 (build-system ant-build-system)
9198 (arguments
9199 `(#:jar-name "java-joda-time.jar"
9200 #:source-dir "src/main/java"
9201 #:test-include (list "**/Test*.java")
9202 ;; There is no runnable test in these files
9203 #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java")
9204 #:phases
9205 (modify-phases %standard-phases
9206 (add-after 'build 'build-resources
9207 (lambda _
9208 (mkdir-p "build/classes/org/joda/time/tz/data")
9209 (mkdir-p "build/classes/org/joda/time/format")
6d0368eb
JL
9210 ;; This will produce the following exception:
9211 ;; java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap"
9212 ;; which is normal, because it doesn't exist yet. It still generates
9213 ;; the same file as in the binary one can find on maven.
9214 (invoke "java" "-cp"
9215 (string-append "build/classes:" (getenv "CLASSPATH"))
9216 "org.joda.time.tz.ZoneInfoCompiler"
9217 "-src" "src/main/java/org/joda/time/tz/src"
9218 "-dst" "build/classes/org/joda/time/tz/data"
9219 "africa" "antarctica" "asia" "australasia"
9220 "europe" "northamerica" "southamerica"
9221 "pacificnew" "etcetera" "backward" "systemv")
0158ea8a
JL
9222 (for-each (lambda (f)
9223 (copy-file f (string-append
9224 "build/classes/org/joda/time/format/"
9225 (basename f))))
9226 (find-files "src/main/java/org/joda/time/format" ".*.properties"))
9227 #t))
9228 (add-before 'install 'regenerate-jar
9229 (lambda _
9230 ;; We need to regenerate the jar file to add generated data.
9231 (delete-file "build/jar/java-joda-time.jar")
6d0368eb 9232 (invoke "ant" "jar")))
0158ea8a
JL
9233 (add-before 'check 'copy-test-resources
9234 (lambda _
9235 (mkdir-p "build/test-classes/org/joda/time/tz/data")
9236 (copy-file "src/test/resources/tzdata/ZoneInfoMap"
9237 "build/test-classes/org/joda/time/tz/data/ZoneInfoMap")
9238 (copy-recursively "src/test/resources" "build/test-classes")
9239 #t)))))
9240 (inputs
9241 `(("java-joda-convert" ,java-joda-convert)))
9242 (native-inputs
9243 `(("java-junit" ,java-junit)
9244 ("java-hamcrest-core" ,java-hamcrest-core)
9245 ("tzdata" ,tzdata)))
9246 (home-page "http://www.joda.org/joda-time/")
9247 (synopsis "Replacement for the Java date and time classes")
9248 (description "Joda-Time is a replacement for the Java date and time
9249classes prior to Java SE 8.")
9250 (license license:asl2.0)))
6d0368eb
JL
9251
9252(define-public java-xerces
9253 (package
9254 (name "java-xerces")
9255 (version "2.11.0")
9256 (source
9257 (origin
9258 (method url-fetch)
9259 (uri (string-append "mirror://apache/xerces/j/source/"
9260 "Xerces-J-src." version ".tar.gz"))
9261 (sha256
9262 (base32 "1006igwy2lqrmjvdk64v8dg6qbk9c29pm8xxx7r87n0vnpvmx6pm"))
9263 (patches (search-patches
9264 "java-xerces-xjavac_taskdef.patch"
9265 "java-xerces-build_dont_unzip.patch"
9266 "java-xerces-bootclasspath.patch"))))
9267 (build-system ant-build-system)
9268 (arguments
9269 `(#:tests? #f;; Test files are not present
9270 #:test-target "test"
9271 #:jdk ,icedtea-8
9272 #:phases
9273 (modify-phases %standard-phases
9274 (add-after 'unpack 'create-build.properties
9275 (lambda* (#:key inputs #:allow-other-keys)
9276 (let ((jaxp (assoc-ref inputs "java-jaxp"))
9277 (resolver (assoc-ref inputs "java-apache-xml-commons-resolver")))
9278 (with-output-to-file "build.properties"
9279 (lambda _
9280 (format #t
9281 "jar.jaxp = ~a/share/java/jaxp.jar~@
9282 jar.apis-ext = ~a/share/java/jaxp.jar~@
9283 jar.resolver = ~a/share/java/xml-resolver.jar~%"
9284 jaxp jaxp resolver)))
9285 ;; Make xerces use our version of jaxp in tests
9286 (substitute* "build.xml"
9287 (("xml-apis.jar")
9288 (string-append jaxp "/share/java/jaxp.jar"))
9289 (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}")
9290 "${jar.apis}")))
9291 #t))
9292 (replace 'install (install-jars "build")))))
9293 (inputs
9294 `(("java-apache-xml-commons-resolver" ,java-apache-xml-commons-resolver)
9295 ("java-jaxp" ,java-jaxp)))
9296 (home-page "https://xerces.apache.org/xerces2-j/")
9297 (synopsis "Validating XML parser for Java with DOM level 3 support")
9298 (description "The Xerces2 Java parser is the reference implementation of
9299XNI, the Xerces Native Interface, and also a fully conforming XML Schema
9300processor.
9301
9302Xerces2-J supports the following standards and APIs:
9303
9304@itemize
9305@item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation
9306@item Namespaces in XML Recommendation
9307@item Document Object Model (DOM) Level 2 Core, Events, and Traversal and
9308 Range Recommendations
9309@item Simple API for XML (SAX) 2.0.1 Core and Extension
9310@item Java APIs for XML Processing (JAXP) 1.2.01
9311@item XML Schema 1.0 Structures and Datatypes Recommendations
9312@item Experimental implementation of the Document Object Model (DOM) Level 3
9313 Core and Load/Save Working Drafts
9314@item Provides a partial implementation of the XML Inclusions (XInclude) W3C
9315 Candidate Recommendation
9316@end itemize
9317
9318Xerces is now able to parse documents written according to the XML 1.1
9319Candidate Recommendation, except that it does not yet provide an option to
9320enable normalization checking as described in section 2.13 of this
9321specification. It also handles namespaces according to the XML Namespaces 1.1
9322Candidate Recommendation, and will correctly serialize XML 1.1 documents if
9323the DOM level 3 load/save API's are in use.")
9324 (license license:asl2.0)))
e06bf428
JL
9325
9326(define-public java-jline
9327 (package
9328 (name "java-jline")
9329 (version "1.0")
9330 (source (origin
9331 (method url-fetch)
9332 (uri (string-append "https://github.com/jline/jline1/archive/jline-"
9333 version ".tar.gz"))
9334 (sha256
9335 (base32
9336 "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir"))))
9337 (build-system ant-build-system)
9338 (arguments
9339 `(#:jar-name "jline.jar"
9340 #:source-dir "src/main/java"
9341 #:test-dir "src/test"
9342 #:phases
9343 (modify-phases %standard-phases
9344 (add-before 'build 'copy-resources
9345 (lambda _
9346 (copy-recursively "src/main/resources" "build/classes")
9347 #t)))))
9348 (native-inputs
9349 `(("java-junit" ,java-junit)))
9350 (home-page "https://jline.github.io")
9351 (synopsis "Console input handling library")
9352 (description "JLine is a Java library for handling console input. It is
9353similar in functionality to BSD editline and GNU readline but with additional
9354features that bring it on par with the Z shell line editor.")
9355 (license license:bsd-3)))
7ac4f054 9356
49d74311
JL
9357(define-public java-jline-2
9358 (package
9359 (inherit java-jline)
9360 (version "2.14.5")
9361 (source (origin
9362 (method url-fetch)
9363 (uri (string-append "https://github.com/jline/jline2/archive/jline-"
9364 version ".tar.gz"))
9365 (sha256
9366 (base32
9367 "1c6qa26mf0viw8hg4jnv72s7i1qb1gh1l8rrzcdvqhqhx82rkdlf"))))
9368 (arguments
9369 `(#:jdk ,icedtea-8
9370 ,@(package-arguments java-jline)))
9371 (inputs
9372 `(("java-jansi" ,java-jansi)
9373 ("java-jansi-native" ,java-jansi-native)))
9374 (native-inputs
9375 `(("java-powermock-modules-junit4" ,java-powermock-modules-junit4)
9376 ("java-powermock-modules-junit4-common" ,java-powermock-modules-junit4-common)
9377 ("java-powermock-api-easymock" ,java-powermock-api-easymock)
9378 ("java-powermock-api-support" ,java-powermock-api-support)
9379 ("java-powermock-core" ,java-powermock-core)
9380 ("java-powermock-reflect" ,java-powermock-reflect)
9381 ("java-easymock" ,java-easymock)
9382 ("java-jboss-javassist" ,java-jboss-javassist)
9383 ("java-objenesis" ,java-objenesis)
9384 ("java-asm" ,java-asm)
9385 ("java-hamcrest-core" ,java-hamcrest-core)
9386 ("java-cglib" ,java-cglib)
9387 ("java-junit" ,java-junit)
9388 ("java-hawtjni" ,java-hawtjni)))))
9389
7ac4f054
JL
9390(define-public java-xmlunit
9391 (package
9392 (name "java-xmlunit")
9393 (version "2.5.1")
9394 (source (origin
9395 (method url-fetch)
9396 (uri (string-append "https://github.com/xmlunit/xmlunit/archive/v"
9397 version ".tar.gz"))
9398 (file-name (string-append name "-" version ".tar.gz"))
9399 (sha256
9400 (base32
9401 "035rivlnmwhfqj0fzviciv0bkh1h95ps1iwnh2kjcvdbk5nccm4z"))))
9402 (build-system ant-build-system)
9403 (arguments
9404 `(#:jar-name "java-xmlunit.jar"
9405 #:source-dir "xmlunit-core/src/main/java"
9406 #:test-dir "xmlunit-core/src/test"
9407 #:phases
9408 (modify-phases %standard-phases
9409 (add-before 'check 'copy-test-resources
9410 (lambda* (#:key inputs #:allow-other-keys)
9411 (copy-recursively (assoc-ref inputs "resources") "../test-resources")
9412 #t)))))
9413 (native-inputs
9414 `(("java-junit" ,java-junit)
9415 ("java-mockito-1" ,java-mockito-1)
9416 ("java-hamcrest-all" ,java-hamcrest-all)
9417 ("java-objenesis" ,java-objenesis)
9418 ("java-asm" ,java-asm)
9419 ("java-cglib" ,java-cglib)
9420 ("resources"
9421 ,(origin
9422 (method git-fetch)
9423 (uri (git-reference
9424 (url "https://github.com/xmlunit/test-resources.git")
9425 (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec")))
9426 (file-name "java-xmlunit-test-resources")
9427 (sha256
9428 (base32
9429 "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr"))))))
9430 (home-page "http://www.xmlunit.org/")
9431 (synopsis "XML output testing")
9432 (description "XMLUnit provides you with the tools to verify the XML you
9433emit is the one you want to create. It provides helpers to validate against
9434an XML Schema, assert the values of XPath queries or compare XML documents
9435against expected outcomes.")
9436 (license license:asl2.0)))
73a1f10a
JL
9437
9438(define-public java-xmlunit-legacy
9439 (package
9440 (inherit java-xmlunit)
9441 (name "java-xmlunit-legacy")
9442 (arguments
9443 `(#:jar-name "java-xmlunit-legacy.jar"
9444 #:source-dir "xmlunit-legacy/src/main/java"
9445 #:test-dir "xmlunit-legacy/src/test"))
9446 (inputs
9447 `(("java-xmlunit" ,java-xmlunit)
9448 ("java-junit" ,java-junit)))
9449 (native-inputs
9450 `(("java-mockito-1" ,java-mockito-1)))))
93abc975
RW
9451
9452(define-public java-openchart2
9453 (package
9454 (name "java-openchart2")
9455 (version "1.4.3")
9456 (source (origin
9457 (method url-fetch)
9458 (uri (string-append "http://download.approximatrix.com/openchart2/"
9459 "openchart2-" version ".source.zip"))
9460 (sha256
9461 (base32
9462 "1xq96zm5r02n1blja0072jmmsifmxc40lbyfbnmcnr6mw42frh4g"))))
9463 (build-system ant-build-system)
9464 (arguments
9465 `(#:test-target "test"
9466 #:phases
9467 (modify-phases %standard-phases
9468 (add-after 'unpack 'fix-junit-errors
9469 (lambda _
9470 (with-directory-excursion "unittest/src/com/approximatrix/charting/"
9471 (substitute* '("coordsystem/ticklocator/NumericXTickLocatorTest.java"
9472 "coordsystem/ticklocator/NumericYTickLocatorTest.java"
9473 "coordsystem/ticklocator/ObjectXTickLocatorTest.java"
9474 "model/DefaultChartDataModelConstraintsTest.java"
9475 "model/MultiScatterDataModelConstraintsTest.java"
9476 "model/threedimensional/DotPlotDataModelConstraintsTest.java")
9477 (("(assertEquals[^;]+);" before _)
9478 (string-append (string-drop-right before 2) ", 1E-6);"))))
9479 #t))
9480 (replace 'install (install-jars ".")))))
9481 (native-inputs
9482 `(("unzip" ,unzip)
9483 ("java-junit" ,java-junit)
9484 ("java-hamcrest-core" ,java-hamcrest-core)))
9485 (home-page "http://approximatrix.com/products/openchart2/")
9486 (synopsis "Simple plotting for Java")
9487 (description "Openchart2 provides a simple, yet powerful, interface for
9488Java programmers to create two-dimensional charts and plots. The library
9489features an assortment of graph styles, including advanced scatter plots, bar
9490graphs, and pie charts.")
9491 (license license:lgpl2.1+)))
5f5b31c6
JL
9492
9493(define-public java-commons-httpclient
9494 (package
9495 (name "java-commons-httpclient")
9496 (version "3.1")
9497 (source (origin
9498 (method url-fetch)
9499 (uri (string-append "https://archive.apache.org/dist/httpcomponents/"
9500 "commons-httpclient/source/commons-httpclient-"
9501 version "-src.tar.gz"))
9502 (sha256
9503 (base32
9504 "1wlpn3cfy3d4inxy6g7wxcsa8p7sshn6aldk9y4ia3lb879rd97r"))))
9505 (build-system ant-build-system)
9506 (arguments
9507 `(#:build-target "compile"
9508 #:test-target "test"
9509 #:tests? #f; requires junit-textui (junit 3)
9510 #:phases
9511 (modify-phases %standard-phases
9512 (add-before 'build 'fix-accent
9513 (lambda _
9514 (for-each (lambda (file)
9515 (with-fluids ((%default-port-encoding "ISO-8859-1"))
9516 (substitute* file
9517 (("\\* @author Ortwin .*") "* @author Ortwin Glueck\n"))))
9518 '("src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java"
9519 "src/examples/TrivialApp.java" "src/examples/ClientApp.java"
9520 "src/test/org/apache/commons/httpclient/TestHttps.java"
9521 "src/test/org/apache/commons/httpclient/TestURIUtil2.java"))))
9522 (replace 'install
9523 (lambda* (#:key outputs #:allow-other-keys)
9524 (invoke "ant" "dist"
9525 (string-append "-Ddist.home=" (assoc-ref outputs "out")
9526 "/share/java"))
9527 #t)))))
9528 (propagated-inputs
9529 `(("java-commons-logging" ,java-commons-logging-minimal)
9530 ("java-commons-codec" ,java-commons-codec)))
9531 (home-page "https://hc.apache.org")
9532 (synopsis "HTTP/1.1 compliant HTTP agent implementation")
9533 (description "This package contains an HTTP/1.1 compliant HTTP agent
9534implementation. It also provides reusable components for client-side
9535authentication, HTTP state management, and HTTP connection management.")
9536 (license license:asl2.0)))
5fe981dc
JL
9537
9538(define-public java-commons-vfs
9539 (package
9540 (name "java-commons-vfs")
9541 (version "2.2")
9542 (source (origin
9543 (method url-fetch)
9544 (uri (string-append "mirror://apache/commons/vfs/source/"
9545 "commons-vfs2-distribution-" version "-src.tar.gz"))
9546 (file-name (string-append name "-" version ".tar.gz"))
9547 (sha256
9548 (base32
9549 "1cnq1iaghbp4cslpnvwbp83i5v234x87irssqynhwpfgw7caf1s3"))
9550 (modules '((guix build utils)))
9551 (snippet
9552 '(begin
9553 (for-each delete-file
9554 (find-files "." "\\.jar$"))
9555 #t))))
9556 (build-system ant-build-system)
9557 (arguments
9558 `(#:jar-name "commons-vfs.jar"
9559 #:source-dir "commons-vfs2/src/main/java"
9560 #:test-dir "commons-vfs2/src/test"
9561 ; FIXME: tests depend on many things: apache sshd, hadoop, ftpserver, ...
9562 #:tests? #f
9563 #:phases
9564 (modify-phases %standard-phases
9565 (add-before 'build 'remove-hadoop-and-webdav
9566 ; Remove these files as they are not required and depend on difficult
9567 ; packages.
9568 (lambda _
9569 (for-each delete-file-recursively
9570 '("commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/webdav"
9571 "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs")))))))
9572 (inputs
9573 `(("java-commons-collections4" ,java-commons-collections4)
9574 ("java-commons-compress" ,java-commons-compress)
9575 ("java-commons-httpclient" ,java-commons-httpclient)
9576 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
9577 ("java-commons-net" ,java-commons-net)
9578 ("java-jsch" ,java-jsch)))
9579 (home-page "http://commons.apache.org/proper/commons-vfs/")
9580 (synopsis "Java filesystem library")
9581 (description "Commons VFS provides a single API for accessing various
9582different file systems. It presents a uniform view of the files from various
9583different sources, such as the files on local disk, on an HTTP server, or
9584inside a Zip archive.")
9585 (license license:asl2.0)))
f7b512c0
JL
9586
9587(define-public java-jakarta-oro
9588 (package
9589 (name "java-jakarta-oro")
9590 (version "2.0.8")
9591 (source (origin
9592 (method url-fetch)
9593 (uri (string-append "https://archive.apache.org/dist/jakarta/oro/"
9594 "jakarta-oro-" version ".tar.gz"))
9595 (sha256
9596 (base32
9597 "0rpmnsskiwmsy8r0sckz5n5dbvh3vkxx8hpm177c754r8xy3qksc"))
9598 (modules '((guix build utils)))
9599 (snippet
9600 `(begin
9601 (delete-file (string-append "jakarta-oro-" ,version ".jar"))
9602 #t))))
9603 (build-system ant-build-system)
9604 (arguments
9605 `(#:build-target "package"
9606 #:tests? #f; tests are run as part of the build process
9607 #:phases
9608 (modify-phases %standard-phases
9609 (replace 'install
9610 (install-jars ,(string-append "jakarta-oro-" version))))))
9611 (home-page "https://jakarta.apache.org/oro/")
9612 (synopsis "Text-processing for Java")
9613 (description "The Jakarta-ORO Java classes are a set of text-processing
9614Java classes that provide Perl5 compatible regular expressions, AWK-like
9615regular expressions, glob expressions, and utility classes for performing
9616substitutions, splits, filtering filenames, etc. This library is the successor
9617of the OROMatcher, AwkTools, PerlTools, and TextTools libraries originally
9618from ORO, Inc.")
9619 (license license:asl1.1)))
a970288c
JL
9620
9621(define-public java-native-access
9622 (package
9623 (name "java-native-access")
9624 (version "4.5.1")
9625 (source (origin
9626 (method url-fetch)
9627 (uri (string-append "https://github.com/java-native-access/jna/"
9628 "archive/" version ".tar.gz"))
9629 (file-name (string-append name "-" version ".tar.gz"))
9630 (sha256
9631 (base32
9632 "0zrpzkib6b905i018a9pqlzkqinphywr6y4jwv6mwp63jjqvqkd9"))
9633 (modules '((guix build utils)))
9634 (snippet
9635 `(begin
9636 (for-each delete-file (find-files "." ".*.jar"))
9637 (delete-file-recursively "native/libffi")
9638 (delete-file-recursively "dist")
9639 #t))))
9640 (build-system ant-build-system)
9641 (arguments
9642 `(#:tests? #f; FIXME: tests require reflections.jar
9643 #:test-target "test"
9644 #:make-flags (list "-Ddynlink.native=true")
9645 #:phases
9646 (modify-phases %standard-phases
9647 (add-before 'build 'fix-build.xml
9648 (lambda* (#:key inputs #:allow-other-keys)
9649 (substitute* "build.xml"
9650 ;; Since we removed the bundled ant.jar, give the correct path
9651 (("lib/ant.jar") (string-append (assoc-ref inputs "ant") "/lib/ant.jar"))
9652 ;; We removed generated native libraries. We can only rebuild one
9653 ;; so don't fail if we can't find a native library for another architecture.
9654 (("zipfileset") "zipfileset erroronmissingarchive=\"false\""))
9655 ;; Copy test dependencies
9656 (copy-file (string-append (assoc-ref inputs "java-junit")
9657 "/share/java/junit.jar")
9658 "lib/junit.jar")
9659 (copy-file (string-append (assoc-ref inputs "java-hamcrest-core")
9660 "/share/java/hamcrest-core.jar")
9661 "lib/hamcrest-core.jar")
9662 ;; FIXME: once reflections.jar is built, copy it to lib/test.
9663 #t))
9664 (add-before 'build 'build-native
9665 (lambda _
9666 (invoke "ant" "-Ddynlink.native=true" "native")
9667 #t))
9668 (replace 'install
9669 (install-jars "build")))))
9670 (inputs
9671 `(("libffi" ,libffi)
9672 ("libx11" ,libx11)
9673 ("libxt" ,libxt)))
9674 (native-inputs
9675 `(("java-junit" ,java-junit)
9676 ("java-hamcrest-core" ,java-hamcrest-core)))
9677 (home-page "https://github.com/java-native-access/jna")
9678 (synopsis "Access to native shared libraries from Java")
9679 (description "JNA provides Java programs easy access to native shared
9680libraries without writing anything but Java code - no JNI or native code is
9681required. JNA allows you to call directly into native functions using natural
9682Java method invocation.")
9683 ;; Java Native Access project (JNA) is dual-licensed under 2
9684 ;; alternative Free licenses: LGPL 2.1 or later and Apache License 2.0.
9685 (license (list
9686 license:asl2.0
9687 license:lgpl2.1+))))
cfb55cfc
JL
9688
9689(define-public java-native-access-platform
9690 (package
9691 (inherit java-native-access)
9692 (name "java-native-access-platform")
9693 (arguments
9694 `(#:test-target "test"
9695 #:tests? #f; require jna-test.jar
9696 #:phases
9697 (modify-phases %standard-phases
9698 (add-before 'build 'chdir
9699 (lambda _
9700 (chdir "contrib/platform")
9701 #t))
9702 (add-after 'chdir 'fix-ant
9703 (lambda* (#:key inputs #:allow-other-keys)
9704 (substitute* "nbproject/project.properties"
9705 (("../../build/jna.jar")
9706 (string-append (assoc-ref inputs "java-native-access")
9707 "/share/java/jna.jar"))
9708 (("../../lib/hamcrest-core-.*.jar")
9709 (string-append (assoc-ref inputs "java-hamcrest-core")
9710 "/share/java/hamcrest-core.jar"))
9711 (("../../lib/junit.jar")
9712 (string-append (assoc-ref inputs "java-junit")
9713 "/share/java/junit.jar")))
9714 #t))
9715 (replace 'install
9716 (install-jars "dist")))))
9717 (inputs
9718 `(("java-native-access" ,java-native-access)))
9719 (synopsis "Cross-platform mappings for jna")
9720 (description "java-native-access-platfrom has cross-platform mappings
9721and mappings for a number of commonly used platform functions, including a
9722large number of Win32 mappings as well as a set of utility classes that
9723simplify native access.")))
470674a5
JL
9724
9725(define-public java-jsch-agentproxy-core
9726 (package
9727 (name "java-jsch-agentproxy-core")
9728 (version "0.0.8")
9729 (source (origin
9730 (method url-fetch)
9731 (uri (string-append "https://github.com/ymnk/jsch-agent-proxy/archive/"
9732 version ".tar.gz"))
9733 (file-name (string-append name "-" version ".tar.gz"))
9734 (sha256
9735 (base32
9736 "02iqg6jbc1kxvfzqcg6wy9ygqxfm82bw5rf6vnswqy4y572niz4q"))))
9737 (build-system ant-build-system)
9738 (arguments
9739 `(#:jar-name "jsch-agentproxy-core.jar"
9740 #:source-dir "jsch-agent-proxy-core/src/main/java"
9741 #:tests? #f)); no tests
9742 (home-page "https://github.com/ymnk/jsch-agent-proxy")
f1d79c97 9743 (synopsis "Core component of the proxy to ssh-agent and Pageant in Java")
470674a5
JL
9744 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
9745and Pageant included Putty. It will be easily integrated into JSch, and users
9746will be allowed to use these programs for authentication.")
9747 (license license:bsd-3)))
f1d79c97
JL
9748
9749(define-public java-jsch-agentproxy-sshagent
9750 (package
9751 (inherit java-jsch-agentproxy-core)
9752 (name "java-jsch-agentproxy-sshagent")
9753 (arguments
9754 `(#:jar-name "jsch-agentproxy-sshagent.jar"
9755 #:source-dir "jsch-agent-proxy-sshagent/src/main/java"
9756 #:tests? #f)); no tests
9757 (inputs
9758 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
9759 (synopsis "Proxy to ssh-agent")
9760 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
9761and Pageant included in Putty. This component contains the code for a proxy to
9762ssh-agent.")))
f438e638
JL
9763
9764(define-public java-jsch-agentproxy-usocket-jna
9765 (package
9766 (inherit java-jsch-agentproxy-core)
9767 (name "java-jsch-agentproxy-usocket-jna")
9768 (arguments
9769 `(#:jar-name "jsch-agentproxy-usocket-jna.jar"
9770 #:source-dir "jsch-agent-proxy-usocket-jna/src/main/java"
9771 #:tests? #f)); no tests
9772 (inputs
9773 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
9774 ("java-native-access" ,java-native-access)))
9775 (synopsis "USocketFactory implementation using JNA")
9776 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
9777and Pageant included in Putty. This component contains an implementation of
9778USocketFactory using @dfn{JNA} (Java Native Access).")))
475225e3
JL
9779
9780(define-public java-jsch-agentproxy-pageant
9781 (package
9782 (inherit java-jsch-agentproxy-core)
9783 (name "java-jsch-agentproxy-pageant")
9784 (arguments
9785 `(#:jar-name "jsch-agentproxy-pageant.jar"
9786 #:source-dir "jsch-agent-proxy-pageant/src/main/java"
9787 #:tests? #f)); no tests
9788 (inputs
9789 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
9790 ("java-native-access" ,java-native-access)
9791 ("java-native-access-platform" ,java-native-access-platform)))
9792 (synopsis "Proxy to pageant")
9793 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
9794and Pageant included in Putty. This component contains the code for a proxy to
9795pageant.")))
96d6d9c7
JL
9796
9797(define-public java-jsch-agentproxy-usocket-nc
9798 (package
9799 (inherit java-jsch-agentproxy-core)
9800 (name "java-jsch-agentproxy-usocket-nc")
9801 (arguments
9802 `(#:jar-name "jsch-agentproxy-usocket-nc.jar"
9803 #:source-dir "jsch-agent-proxy-usocket-nc/src/main/java"
9804 #:tests? #f)); no tests
9805 (inputs
9806 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
9807 (synopsis "USocketFactory implementation using netcat")
9808 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
9809and Pageant included in Putty. This component contains an implementation of
9810USocketFactory using netcat.")))
5a46b17b
JL
9811
9812(define-public java-jsch-agentproxy-connector-factory
9813 (package
9814 (inherit java-jsch-agentproxy-core)
9815 (name "java-jsch-agentproxy-connector-factory")
9816 (arguments
9817 `(#:jar-name "jsch-agentproxy-connector-factory.jar"
9818 #:source-dir "jsch-agent-proxy-connector-factory/src/main/java"
9819 #:tests? #f)); no tests
9820 (inputs
9821 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
9822 ("java-jsch-agentproxy-sshagent" ,java-jsch-agentproxy-sshagent)
9823 ("java-jsch-agentproxy-usocket-jna" ,java-jsch-agentproxy-usocket-jna)
9824 ("java-jsch-agentproxy-pageant" ,java-jsch-agentproxy-pageant)
9825 ("java-jsch-agentproxy-usocket-nc" ,java-jsch-agentproxy-usocket-nc)))
9826 (synopsis "Connector factory for jsch agent proxy")
9827 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
9828and Pageant included in Putty. This component contains a connector factory.")))
b0fbf596
JL
9829
9830(define-public java-jsch-agentproxy-jsch
9831 (package
9832 (inherit java-jsch-agentproxy-core)
9833 (name "java-jsch-agentproxy-jsch")
9834 (arguments
9835 `(#:jar-name "jsch-agentproxy-jsch.jar"
9836 #:source-dir "jsch-agent-proxy-jsch/src/main/java"
9837 #:tests? #f)); no tests
9838 (inputs
9839 `(("java-jsch" ,java-jsch)
9840 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
9841 (synopsis "JSch integration library for agentproxy")
9842 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
9843and Pageant included in Putty. This component contains a library to use
9844jsch-agent-proxy with JSch.")))
f1f4a4f0
JL
9845
9846(define-public java-apache-ivy
9847 (package
9848 (name "java-apache-ivy")
9849 (version "2.4.0")
9850 (source (origin
9851 (method url-fetch)
9852 (uri (string-append "mirror://apache//ant/ivy/" version
9853 "/apache-ivy-" version "-src.tar.gz"))
9854 (sha256
9855 (base32
9856 "1xkfn57g2m7l6y0xdq75x5rnrgk52m9jx2xah70g3ggl8750hbr0"))
9857 (patches
9858 (search-patches
9859 "java-apache-ivy-port-to-latest-bouncycastle.patch"))))
9860 (build-system ant-build-system)
9861 (arguments
9862 `(#:jar-name "ivy.jar"
9863 #:tests? #f
9864 #:phases
9865 (modify-phases %standard-phases
9866 (add-before 'build 'remove-example
9867 (lambda _
9868 (delete-file-recursively "src/example")
9869 #t))
9870 (add-before 'build 'copy-resources
9871 (lambda _
9872 (with-directory-excursion "src/java"
9873 (for-each (lambda (file)
9874 (install-file file (string-append "../../build/classes/" (dirname file))))
9875 (append
9876 (find-files "." ".*.css")
9877 (find-files "." ".*.ent")
9878 (find-files "." ".*.html")
9879 (find-files "." ".*.properties")
9880 (find-files "." ".*.xsd")
9881 (find-files "." ".*.xsl")
9882 (find-files "." ".*.xml"))))))
9883 (add-before 'build 'fix-vfs
9884 (lambda _
9885 (substitute*
9886 '("src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java"
9887 "src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java")
9888 (("import org.apache.commons.vfs") "import org.apache.commons.vfs2"))
9889 #t))
9890 (add-before 'install 'copy-manifest
9891 (lambda _
9892 (install-file "META-INF/MANIFEST.MF" "build/classes/META-INF")
9893 #t))
9894 (add-before 'install 'repack
9895 (lambda _
9896 (invoke "jar" "-cmf" "build/classes/META-INF/MANIFEST.MF" "build/jar/ivy.jar"
9897 "-C" "build/classes" ".")
9898 #t))
9899 (add-after 'install 'install-bin
9900 (lambda* (#:key outputs #:allow-other-keys)
9901 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
9902 (ivy (string-append bin "/ivy"))
9903 (jar (string-append (assoc-ref outputs "out") "/share/java/ivy.jar")))
9904 (mkdir-p bin)
9905 (with-output-to-file ivy
9906 (lambda _
9907 (display (string-append
9908 "#!" (which "sh") "\n"
9909 "if [[ -z $CLASSPATH ]]; then\n"
9910 " cp=\"" (getenv "CLASSPATH") ":" jar "\"\n"
9911 "else\n"
9912 " cp=\"" (getenv "CLASSPATH") ":" jar ":$CLASSPATH\"\n"
9913 "fi\n"
9914 (which "java") " -cp $cp org.apache.ivy.Main $@\n"))))
9915 (chmod ivy #o755)
9916 #t))))))
9917 (inputs
9918 `(("java-bouncycastle" ,java-bouncycastle)
9919 ("java-commons-cli" ,java-commons-cli)
9920 ("java-commons-collections" ,java-commons-collections)
9921 ("java-commons-httpclient" ,java-commons-httpclient)
9922 ("java-commons-lang" ,java-commons-lang)
9923 ("java-commons-vfs" ,java-commons-vfs)
9924 ("java-jakarta-oro" ,java-jakarta-oro)
9925 ("java-jsch" ,java-jsch)
9926 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
9927 ("java-jsch-agentproxy-connector-factory" ,java-jsch-agentproxy-connector-factory)
9928 ("java-jsch-agentproxy-jsch" ,java-jsch-agentproxy-jsch)
9929 ("java-junit" ,java-junit)))
9930 (home-page "https://ant.apache.org/ivy")
9931 (synopsis "Dependency manager for the Java programming language")
9932 (description "Ivy is a tool for managing (recording, tracking, resolving
9933and reporting) project dependencies. It is characterized by the following:
9934
9935@itemize
9936@item flexibility and configurability - Ivy is essentially process agnostic
9937 and is not tied to any methodology or structure. Instead it provides the
9938 necessary flexibility and configurability to be adapted to a broad range
9939 of dependency management and build processes.
9940@item tight integration with Apache Ant - while available as a standalone tool,
9941 Ivy works particularly well with Apache Ant providing a number of
9942 powerful Ant tasks ranging from dependency resolution to dependency
9943 reporting and publication.
9944@end itemize")
9945 (license license:asl2.0)))
1a1810f5
JL
9946
9947(define-public java-eclipse-sisu-inject
9948 (package
9949 (name "java-eclipse-sisu-inject")
9950 (version "0.3.3")
9951 (source (origin
9952 (method url-fetch)
9953 (uri (string-append "https://github.com/eclipse/sisu.inject/"
9954 "archive/releases/" version ".tar.gz"))
9955 (sha256
9956 (base32
9957 "11rg6yw5nl13i65xsp4jxxgr341qcnnaan48p767h28kb07s0ajn"))))
9958 (build-system ant-build-system)
9959 (arguments
9960 `(#:jar-name "eclipse-sisu-inject.jar"
9961 #:source-dir "org.eclipse.sisu.inject/src"
9962 #:jdk ,icedtea-8
9963 #:tests? #f)); no tests
9964 (inputs
9965 `(("java-guice" ,java-guice)
9966 ("java-guice-servlet" ,java-guice-servlet)
9967 ("java-javax-inject" ,java-javax-inject)
9968 ("java-tomcat" ,java-tomcat)
9969 ("java-junit" ,java-junit)
9970 ("java-slf4j-api" ,java-slf4j-api)
9971 ("java-jsr305" ,java-jsr305)
9972 ("java-jsr250" ,java-jsr250)
9973 ("java-cdi-api" ,java-cdi-api)
9974 ("java-osgi-framework" ,java-osgi-framework)
9975 ("java-osgi-util-tracker" ,java-osgi-util-tracker)
9976 ("java-testng" ,java-testng)))
9977 (home-page "https://www.eclipse.org/sisu/")
9978 (synopsis "Classpath scanning, auto-binding, and dynamic auto-wiring")
9979 (description "Sisu is a modular JSR330-based container that supports
9980classpath scanning, auto-binding, and dynamic auto-wiring. Sisu uses
9981Google-Guice to perform dependency injection and provide the core JSR330
9982support, but removes the need to write explicit bindings in Guice modules.
9983Integration with other containers via the Eclipse Extension Registry and the
9984OSGi Service Registry is a goal of this project.")
9985 (license license:epl1.0)))
7049dea1
JL
9986
9987(define-public java-eclipse-sisu-plexus
9988 (package
9989 (name "java-eclipse-sisu-plexus")
9990 (version "0.3.3")
9991 (source (origin
9992 (method url-fetch)
9993 (uri (string-append "https://github.com/eclipse/sisu.plexus/"
9994 "archive/releases/" version ".tar.gz"))
9995 (sha256
9996 (base32
9997 "0lbj7nxy5j0z71k407zbb82icfqh7midrfk0fb3fa3jzdjz0d9d9"))
9998 (modules '((guix build utils)))
9999 (snippet
10000 '(begin
10001 (for-each delete-file (find-files "." ".*.jar"))
10002 (rename-file "org.eclipse.sisu.plexus.tests/src"
10003 "org.eclipse.sisu.plexus.tests/java")
10004 #t))))
10005 (build-system ant-build-system)
10006 (arguments
10007 `(#:jar-name "eclipse-sisu-plexus.jar"
10008 #:source-dir "org.eclipse.sisu.plexus/src"
10009 #:test-dir "org.eclipse.sisu.plexus.tests"
10010 #:test-exclude
10011 (list
10012 ;; This test fails probably because we can't generate the necessary
10013 ;; meta-inf files.
10014 "**/PlexusLoggingTest.*"
10015 ;; FIXME: This test fails because of some injection error
10016 "**/PlexusRequirementTest.*")
10017 #:jdk ,icedtea-8
10018 #:phases
10019 (modify-phases %standard-phases
10020 (add-before 'build 'copy-resources
10021 (lambda _
10022 (install-file "org.eclipse.sisu.plexus/META-INF/plexus/components.xml"
10023 "build/classes/META-INF/plexus")
10024 #t))
10025 (add-before 'check 'build-test-jar
10026 (lambda _
10027 (with-directory-excursion "org.eclipse.sisu.plexus.tests/resources/component-jar/src/main/"
10028 (mkdir "build")
10029 (with-directory-excursion "java"
10030 (apply invoke "javac" "-cp"
10031 (string-append (getenv "CLASSPATH")
10032 ":../../../../../build/classes")
10033 (find-files "." ".*.java"))
10034 (for-each (lambda (file) (install-file file (string-append "../build/" file)))
10035 (find-files "." ".*.jar")))
10036 (mkdir-p "build/META-INF/plexus")
10037 (copy-file "resources/META-INF/plexus/components.xml"
10038 "build/META-INF/plexus/components.xml")
10039 (with-directory-excursion "build"
10040 (invoke "jar" "cf" "../../../component-jar-0.1.jar" ".")))
10041 (with-directory-excursion "org.eclipse.sisu.plexus.tests/"
10042 (copy-recursively "META-INF" "../build/test-classes/META-INF")
10043 (substitute* "java/org/eclipse/sisu/plexus/DefaultPlexusContainerTest.java"
10044 (("resources/component-jar")
10045 "org.eclipse.sisu.plexus.tests/resources/component-jar")))
10046 #t)))))
10047 (inputs
10048 `(("java-plexus-classworlds" ,java-plexus-classworlds)
10049 ("java-plexus-util" ,java-plexus-utils)
10050 ("java-plexus-component-annotations" ,java-plexus-component-annotations)
10051 ("java-osgi-framework" ,java-osgi-framework)
10052 ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)
10053 ("java-guice" ,java-guice)
10054 ("java-javax-inject" ,java-javax-inject)
10055 ("java-slf4j-api" ,java-slf4j-api)
10056 ("java-junit" ,java-junit)))
10057 (native-inputs
10058 `(("java-guava" ,java-guava)
10059 ("java-aopalliance" ,java-aopalliance)
10060 ("java-cglib" ,java-cglib)
10061 ("java-asm" ,java-asm)))
10062 (home-page "https://www.eclipse.org/sisu/")
10063 (synopsis "Plexus support for the sisu container")
10064 (description "Sisu is a modular JSR330-based container that supports
10065classpath scanning, auto-binding, and dynamic auto-wiring. This package
10066adds Plexus support to the Sisu-Inject container.")
10067 (license license:epl1.0)))
3fa18fe7
JL
10068
10069(define-public java-commons-compiler
10070 (package
10071 (name "java-commons-compiler")
10072 (version "3.0.8")
10073 (source (origin
10074 (method git-fetch)
10075 (uri (git-reference
10076 (url "https://github.com/janino-compiler/janino")
10077 (commit "91aa95686d1e4ca3b16a984a03a38686572331b2")))
10078 (file-name (string-append name "-" version))
10079 (sha256
10080 (base32
10081 "04hfdl59sgh20qkxzgnibvs8f9hy6n7znxwpk611y5d89977y62r"))
10082 (modules '((guix build utils)))
10083 (snippet
10084 '(begin
10085 (for-each delete-file
10086 (find-files "." "\\.jar$"))
10087 #t))))
10088 (build-system ant-build-system)
10089 (arguments
10090 `(#:jar-name "commons-compiler.jar"
10091 #:source-dir "commons-compiler/src/main"
10092 #:tests? #f)); no tests
10093 (home-page "https://github.com/janino-compiler/janino")
10094 (synopsis "Java compiler")
10095 (description "Commons-compiler contains an API for janino, including the
10096@code{IExpressionEvaluator}, @code{IScriptEvaluator}, @code{IClassBodyEvaluator}
10097and @code{ISimpleCompiler} interfaces.")
10098 (license license:bsd-3)))
3402e651
JL
10099
10100(define-public java-janino
10101 (package
10102 (inherit java-commons-compiler)
10103 (name "java-janino")
10104 (arguments
10105 `(#:jar-name "janino.jar"
10106 #:source-dir "src/main/java"
10107 #:phases
10108 (modify-phases %standard-phases
10109 (add-before 'configure 'chdir
10110 (lambda _
10111 (chdir "janino"))))))
10112 (inputs
10113 `(("java-commons-compiler" ,java-commons-compiler)))
10114 (native-inputs
10115 `(("java-junit" ,java-junit)
10116 ("java-hamcrest-core" ,java-hamcrest-core)))
10117 (description "Janino is a Java compiler. Janino can compile a set of
10118source files to a set of class files like @code{javac}, but also compile a
10119Java expression, block, class body or source file in memory, load the bytecode
10120and execute it directly in the same JVM. @code{janino} can also be used for
10121static code analysis or code manipulation.")))
7d8207a4
JL
10122
10123(define-public java-logback-core
10124 (package
10125 (name "java-logback-core")
10126 (version "1.2.3")
10127 (source (origin
10128 (method url-fetch)
10129 (uri (string-append "https://github.com/qos-ch/logback/archive/v_"
10130 version ".tar.gz"))
10131 (sha256
10132 (base32
10133 "1x6ga74yfgm94cfx98gybakbrlilx8i2gn6dx13l40kasmys06mi"))
10134 (modules '((guix build utils)))
10135 (snippet
10136 '(delete-file-recursively "logback-access/lib"))))
10137 (build-system ant-build-system)
10138 (arguments
10139 `(#:jar-name "logback.jar"
10140 #:source-dir "src/main/java"
10141 #:test-dir "src/test"
10142 #:test-exclude
10143 ;; These tests fail with Unable to set MockitoNamingPolicy on cglib generator
10144 ;; which creates FastClasses
10145 (list "**/AllCoreTest.*"
10146 "**/AutoFlushingObjectWriterTest.*"
10147 "**/PackageTest.*"
10148 "**/ResilientOutputStreamTest.*"
10149 ;; And we still don't want to run abstract classes
10150 "**/Abstract*.*")
10151 #:phases
10152 (modify-phases %standard-phases
10153 (add-before 'configure 'chdir
10154 (lambda _
10155 (chdir "logback-core")
10156 #t)))))
10157 (inputs
10158 `(("java-javax-mail" ,java-javax-mail)
10159 ("java-tomcat" ,java-tomcat)
10160 ("java-commons-compiler" ,java-commons-compiler)
10161 ("java-janino" ,java-janino)))
10162 (native-inputs
10163 `(("java-junit" ,java-junit)
10164 ("java-hamcrest-core" ,java-hamcrest-core)
10165 ("java-mockito-1" ,java-mockito-1)
10166 ("java-cglib" ,java-cglib)
10167 ("java-asm" ,java-asm)
10168 ("java-objenesis" ,java-objenesis)
10169 ("java-joda-time" ,java-joda-time)))
10170 (home-page "https://logback.qos.ch")
10171 (synopsis "Logging for java")
10172 (description "Logback is intended as a successor to the popular log4j project.
10173This module lays the groundwork for the other two modules.")
10174 ;; Either epl1.0 or lgpl2.1
10175 (license (list license:epl1.0
10176 license:lgpl2.1))))
3a69f5f2
JL
10177
10178(define-public java-logback-classic
10179 (package
10180 (inherit java-logback-core)
10181 (name "java-logback-classic")
10182 (arguments
10183 `(#:jar-name "logback-classic.jar"
10184 #:source-dir "src/main/java"
10185 #:test-dir "src/test"
10186 #:tests? #f; tests require more packages: h2, greenmail, hsql, subethamail, slf4j, log4j, felix
10187 #:jdk ,icedtea-8
10188 #:phases
10189 (modify-phases %standard-phases
10190 (add-before 'configure 'chdir
10191 (lambda _
10192 (chdir "logback-classic")
10193 #t))
10194 (replace 'build
10195 (lambda* (#:key inputs #:allow-other-keys)
10196 (mkdir-p "build/classes")
10197 (setenv "CLASSPATH"
10198 (string-join
10199 (apply append (map (lambda (input)
10200 (find-files (assoc-ref inputs input)
10201 ".*.jar"))
10202 '("java-logback-core" "java-slf4j-api"
10203 "java-commons-compiler" "java-tomcat"
10204 "groovy")))
10205 ":"))
10206 (apply invoke "groovyc" "-d" "build/classes" "-j"
10207 (find-files "src/main/" ".*\\.(groovy|java)$"))
10208 (invoke "ant" "jar")
10209 #t)))))
10210 (inputs
10211 `(("java-logback-core" ,java-logback-core)
10212 ("java-slf4j-api" ,java-slf4j-api)
10213 ,@(package-inputs java-logback-core)))
10214 (native-inputs
10215 `(("groovy" ,groovy)))
10216 (description "Logback is intended as a successor to the popular log4j project.
10217This module can be assimilated to a significantly improved version of log4j.
10218Moreover, @code{logback-classic} natively implements the slf4j API so that you
10219can readily switch back and forth between logback and other logging frameworks
10220such as log4j or @code{java.util.logging} (JUL).")))
ab621bf1
JL
10221
10222(define-public java-qdox
10223 (package
10224 (name "java-qdox")
10225 ; Newer version exists, but this version is required by java-plexus-component-metadata
10226 (version "2.0-M2")
10227 (source (origin
10228 (method url-fetch)
10229 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
10230 ;; Older releases at https://github.com/codehaus/qdox/
10231 ;; Note: The release at maven is pre-generated. The release at
10232 ;; github requires jflex.
10233 (uri (string-append "http://central.maven.org/maven2/"
10234 "com/thoughtworks/qdox/qdox/" version
10235 "/qdox-" version "-sources.jar"))
10236 (sha256
10237 (base32
10238 "10xxrcaicq6axszcr2jpygisa4ch4sinyx5q7kqqxv4lknrmxp5x"))))
10239 (build-system ant-build-system)
10240 (arguments
10241 `(#:jar-name "qdox.jar"
10242 #:tests? #f)); no tests
10243 (home-page "http://qdox.codehaus.org/")
10244 (synopsis "Parse definitions from Java source files")
10245 (description "QDox is a high speed, small footprint parser for extracting
10246class/interface/method definitions from source files complete with JavaDoc
10247@code{@@tags}. It is designed to be used by active code generators or
10248documentation tools.")
10249 (license license:asl2.0)))