gnu: Add java-asm-tree-8.
[jackhill/guix/guix.git] / gnu / packages / java.scm
CommitLineData
0760e3a1 1;;; GNU Guix --- Functional package management for GNU
b7a1cac6 2;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
559239af 3;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
ea9e58ef 4;;; Copyright © 2016, 2017 Roel Janssen <roel@gnu.org>
717b6ba6 5;;; Copyright © 2017, 2019 Carlo Zancanaro <carlo@zancanaro.id.au>
30b7704a 6;;; Copyright © 2017-2020 Julien Lepiller <julien@lepiller.eu>
88f256a1 7;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
1d47ea86 8;;; Copyright © 2016, 2017, 2018 Alex Vong <alexvong1995@gmail.com>
1c8ba10a 9;;; Copyright © 2017, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
0bc11cc7 10;;; Copyright © 2018, 2019 Gábor Boskovits <boskovits@gmail.com>
d0e9ded7 11;;; Copyright © 2018 Chris Marusich <cmmarusich@gmail.com>
2703d573 12;;; Copyright © 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
60f5ab0b 13;;; Copyright © 2019, 2020 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
9820d6ed 14;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
f1cf62f5
RG
15;;; Copyright © 2020 Raghav Gururajan <raghavgururajan@disroot.org>
16;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
0760e3a1
RW
17;;;
18;;; This file is part of GNU Guix.
19;;;
20;;; GNU Guix is free software; you can redistribute it and/or modify it
21;;; under the terms of the GNU General Public License as published by
22;;; the Free Software Foundation; either version 3 of the License, or (at
23;;; your option) any later version.
24;;;
25;;; GNU Guix is distributed in the hope that it will be useful, but
26;;; WITHOUT ANY WARRANTY; without even the implied warranty of
27;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28;;; GNU General Public License for more details.
29;;;
30;;; You should have received a copy of the GNU General Public License
31;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
32
33(define-module (gnu packages java)
34 #:use-module ((guix licenses) #:prefix license:)
35 #:use-module (guix packages)
36 #:use-module (guix download)
62c9bfaa 37 #:use-module (guix hg-download)
72885a4c 38 #:use-module (guix git-download)
78745d33 39 #:use-module (guix svn-download)
f6789047 40 #:use-module (guix utils)
068e476f 41 #:use-module (guix build-system ant)
0760e3a1 42 #:use-module (guix build-system gnu)
6a5829d9 43 #:use-module (guix build-system trivial)
0760e3a1
RW
44 #:use-module (gnu packages)
45 #:use-module (gnu packages attr)
46 #:use-module (gnu packages autotools)
47 #:use-module (gnu packages base)
48 #:use-module (gnu packages bash)
f21403e2 49 #:use-module (gnu packages certs)
0760e3a1
RW
50 #:use-module (gnu packages cpio)
51 #:use-module (gnu packages cups)
52 #:use-module (gnu packages compression)
dd741059 53 #:use-module (gnu packages elf)
0760e3a1
RW
54 #:use-module (gnu packages fontutils)
55 #:use-module (gnu packages gawk)
72885a4c 56 #:use-module (gnu packages gettext)
8581c813 57 #:use-module (gnu packages gl)
0760e3a1
RW
58 #:use-module (gnu packages ghostscript) ;lcms
59 #:use-module (gnu packages gnome)
3a69f5f2 60 #:use-module (gnu packages groovy)
0760e3a1 61 #:use-module (gnu packages gtk)
6a5829d9 62 #:use-module (gnu packages guile)
afb5858d 63 #:use-module (gnu packages icu4c)
0760e3a1 64 #:use-module (gnu packages image)
24155bf4 65 #:use-module (gnu packages java-compression)
c4fd86f9 66 #:use-module (gnu packages libffi)
0760e3a1 67 #:use-module (gnu packages linux) ;alsa
2f0d0418 68 #:use-module (gnu packages maths)
015e8774 69 #:use-module (gnu packages maven)
b916b638 70 #:use-module (gnu packages maven-parent-pom)
aff0cce9 71 #:use-module (gnu packages nss)
bcb078a4 72 #:use-module (gnu packages onc-rpc)
5766984b 73 #:use-module (gnu packages web)
0760e3a1 74 #:use-module (gnu packages wget)
0760e3a1
RW
75 #:use-module (gnu packages pkg-config)
76 #:use-module (gnu packages perl)
c4fd86f9 77 #:use-module (gnu packages popt)
89e34644 78 #:use-module (gnu packages kerberos)
0760e3a1
RW
79 #:use-module (gnu packages xml)
80 #:use-module (gnu packages xorg)
f6789047 81 #:use-module (gnu packages texinfo)
2d15f601
RW
82 #:use-module ((srfi srfi-1) #:select (fold alist-delete))
83 #:use-module (srfi srfi-11)
84 #:use-module (ice-9 match))
0760e3a1 85
e1ae3587
RW
86\f
87;;;
88;;; Java bootstrap toolchain.
89;;;
90
91;; The Java bootstrap begins with Jikes, a Java compiler written in C++. We
269fb7d3
RW
92;; use it to build a simple version of GNU Classpath, the Java standard
93;; library. We chose version 0.93 because it is the last version that can be
94;; built with Jikes. With Jikes and this version of GNU Classpath we can
95;; build JamVM, a Java Virtual Machine. We build version 1.5.1 because it is
96;; the last version of JamVM that works with a version of GNU classpath that
97;; does not require ECJ. These three packages make up the bootstrap JDK.
98
99;; This is sufficient to build an older version of Ant, which is needed to
100;; build an older version of ECJ, an incremental Java compiler, both of which
101;; are written in Java.
e1ae3587 102;;
269fb7d3
RW
103;; ECJ is needed to build the latest release (0.99) and the development
104;; version of GNU Classpath. The development version of GNU Classpath has
105;; much more support for Java 1.6 than the latest release, but we need to
106;; build 0.99 first to get a working version of javah. ECJ, the development
107;; version of GNU Classpath, and the latest version of JamVM make up the
108;; second stage JDK with which we can build the OpenJDK with the Icedtea 1.x
109;; build framework. We then build the more recent JDKs Icedtea 2.x and
110;; Icedtea 3.x.
e1ae3587 111
f1cf62f5
RG
112(define-public libantlr3c
113 (package
114 (name "libantlr3c")
115 (version "3.4")
116 (source
117 (origin
118 (method url-fetch)
119 (uri
120 (string-append "https://www.antlr3.org/download/C/"
121 name "-" version ".tar.gz"))
122 (sha256
123 (base32 "0lpbnb4dq4azmsvlhp6khq1gy42kyqyjv8gww74g5lm2y6blm4fa"))))
124 (build-system gnu-build-system)
125 (arguments
126 `(#:configure-flags (list "--enable-debuginfo" "--disable-static")
127 #:phases (modify-phases %standard-phases
128 (replace 'configure
129 (lambda* (#:key build target native-inputs inputs outputs
130 (configure-flags '()) out-of-source? system
131 #:allow-other-keys)
132 (let ((configure (assoc-ref %standard-phases 'configure))
133 (enable-64bit? (member system '("aarch64-linux"
134 "x86_64-linux"
135 "mips64el-linux"))))
136 (configure #:build build #:target target
137 #:native-inputs native-inputs
138 #:inputs inputs #:outputs outputs
139 #:configure-flags `(,(if enable-64bit?
140 "--enable-64bit"
141 '())
142 ,@configure-flags)
143 #:out-of-source? out-of-source?)))))))
144 (synopsis "ANTLR C Library")
145 (description "LIBANTLR3C provides run-time C libraries for ANTLR3 (ANother
146Tool for Language Recognition v3).")
147 (home-page "https://www.antlr3.org/")
148 (license license:bsd-3)))
149
e1ae3587
RW
150(define jikes
151 (package
152 (name "jikes")
153 (version "1.22")
154 (source (origin
155 (method url-fetch)
156 (uri (string-append "mirror://sourceforge/jikes/Jikes/"
157 version "/jikes-" version ".tar.bz2"))
158 (sha256
159 (base32
160 "1qqldrp74pzpy5ly421srqn30qppmm9cvjiqdngk8hf47dv2rc0c"))))
161 (build-system gnu-build-system)
162 (home-page "http://jikes.sourceforge.net/")
163 (synopsis "Compiler for the Java language")
164 (description "Jikes is a compiler that translates Java source files as
165defined in The Java Language Specification into the bytecoded instruction set
166and binary format defined in The Java Virtual Machine Specification.")
167 (license license:ibmpl1.0)))
168
880939c1
PN
169(define-public drip
170 ;; Last release is from 2014, with a few important commits afterwards.
171 (let ((commit "a4bd00df0199e78243847f06cc04ecaea31f8f08"))
172 (package
173 (name "drip")
174 (version (git-version "0.2.4" "1" commit))
175 (source (origin
176 (method git-fetch)
177 (uri (git-reference
178 (url "https://github.com/ninjudd/drip")
179 (commit commit)))
180 (file-name (git-file-name name version))
181 (sha256
182 (base32
183 "0wzmjwfyldr3jn49517xd8yn7dgdk8h88qkga3kjyg1zc375ylg2"))))
184 (build-system gnu-build-system)
185 (native-inputs
186 `(("jdk" ,icedtea "jdk")))
187 (arguments
188 `(#:tests? #f ; No tests.
189 #:phases
190 (modify-phases %standard-phases
191 (delete 'configure)
192 (add-before 'install 'fix-wrapper
193 (lambda* (#:key inputs #:allow-other-keys)
194 (let ((jps (string-append (assoc-ref inputs "jdk") "/bin/jps")))
195 (substitute* "bin/drip"
196 (("jps") jps)
197 (("brew update && brew upgrade drip") "guix pull && guix install drip")
198 ;; No need to make:
199 (("\\(cd -- \"\\$drip_dir\" && make -s\\) \\|\\| exit 1") "")
200 ;; No need to include source:
201 (("\\[\\[ -r \\$drip_dir/src/org/flatland/drip/Main\\.java \\]\\]")
202 "true"))
203 #t)))
204 (replace 'install
205 (lambda* (#:key outputs #:allow-other-keys)
206 (let* ((out (assoc-ref outputs "out"))
207 (bin (string-append out "/bin"))
208 (share (string-append out "/share/drip")))
209 (mkdir-p bin)
210 (for-each
211 (lambda (file)
212 (install-file (string-append "bin/" file) bin))
213 '("drip" "drip_daemon" "drip_proxy"))
214 (install-file "drip.jar" share)
215 (substitute* (string-append bin "/drip")
216 (("drip_dir=\\$bin_dir/..")
217 (string-append "drip_dir=" share)))
218 #t))))))
219 (home-page "https://github.com/ninjudd/drip")
220 (synopsis "Faster Java Virtual Machine launching")
221 (description "Drip is a launcher for the Java Virtual Machine that
222provides much faster startup times than the @command{java} command. The @command{drip}
223script is intended to be a drop-in replacement for the @command{java} command,
224only faster.")
225 (license license:epl1.0))))
226
45f762ee
RW
227;; This is the last version of GNU Classpath that can be built without ECJ.
228(define classpath-bootstrap
2551fee8 229 (package
45f762ee
RW
230 (name "classpath")
231 (version "0.93")
2551fee8
RW
232 (source (origin
233 (method url-fetch)
45f762ee
RW
234 (uri (string-append "mirror://gnu/classpath/classpath-"
235 version ".tar.gz"))
2551fee8
RW
236 (sha256
237 (base32
bab9793f
EF
238 "0i99wf9xd3hw1sj2sazychb9prx8nadxh2clgvk3zlmb28v0jbfz"))
239 (patches (search-patches "classpath-aarch64-support.patch"))))
2551fee8
RW
240 (build-system gnu-build-system)
241 (arguments
242 `(#:configure-flags
45f762ee
RW
243 (list (string-append "JAVAC="
244 (assoc-ref %build-inputs "jikes")
245 "/bin/jikes")
2551fee8
RW
246 "--disable-Werror"
247 "--disable-gmp"
248 "--disable-gtk-peer"
45f762ee 249 "--disable-gconf-peer"
2551fee8
RW
250 "--disable-plugin"
251 "--disable-dssi"
252 "--disable-alsa"
45f762ee
RW
253 "--disable-gjdoc")
254 #:phases
255 (modify-phases %standard-phases
4fb59c9e
RW
256 ;; XXX: This introduces a memory leak as we remove a call to free up
257 ;; memory for the file name string. This was necessary because of a
258 ;; runtime error that would have prevented us from building
259 ;; ant-bootstrap later. See https://issues.guix.gnu.org/issue/36685
260 ;; for the gnarly details.
261 (add-after 'unpack 'remove-call-to-free
262 (lambda _
263 (substitute* "native/jni/java-io/java_io_VMFile.c"
264 (("result = cpio_isFileExists.*" m)
265 (string-append m "\n//")))
266 #t))
45f762ee 267 (add-after 'install 'install-data
0c66a4eb 268 (lambda _ (invoke "make" "install-data"))))))
2551fee8
RW
269 (native-inputs
270 `(("jikes" ,jikes)
271 ("fastjar" ,fastjar)
45f762ee 272 ("libltdl" ,libltdl)
2551fee8 273 ("pkg-config" ,pkg-config)))
45f762ee
RW
274 (home-page "https://www.gnu.org/software/classpath/")
275 (synopsis "Essential libraries for Java")
276 (description "GNU Classpath is a project to create core class libraries
277for use with runtimes, compilers and tools for the Java programming
278language.")
279 ;; GPLv2 or later, with special linking exception.
280 (license license:gpl2+)))
57f6c50d 281
063629aa
RW
282;; This is the last version of JamVM that works with a version of GNU
283;; classpath that does not require ECJ.
284(define jamvm-1-bootstrap
57f6c50d 285 (package
063629aa
RW
286 (name "jamvm")
287 (version "1.5.1")
57f6c50d
RW
288 (source (origin
289 (method url-fetch)
063629aa
RW
290 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
291 "JamVM%20" version "/jamvm-"
292 version ".tar.gz"))
6c9dca5a
SS
293 (patches (search-patches "jamvm-1.5.1-aarch64-support.patch"
294 "jamvm-1.5.1-armv7-support.patch"))
57f6c50d
RW
295 (sha256
296 (base32
cff1e095
297 "06lhi03l3b0h48pc7x58bk9my2nrcf1flpmglvys3wyad6yraf36"))
298 (snippet
299 '(begin
300 ;; Remove precompiled software.
301 (delete-file "lib/classes.zip")
302 #t))))
57f6c50d
RW
303 (build-system gnu-build-system)
304 (arguments
c4fd86f9 305 `(#:configure-flags
063629aa 306 (list (string-append "--with-classpath-install-dir="
fc37b4af
RW
307 (assoc-ref %build-inputs "classpath"))
308 "--disable-int-caching"
309 "--enable-runtime-reloc-checks"
6c9dca5a
SS
310 "--enable-ffi")
311 #:phases
312 ,(if (string-prefix? "aarch64" (or (%current-system)
313 (%current-target-system)))
314 ;; Makefiles and the configure script need to be regenerated to
315 ;; incorporate support for AArch64.
316 '(modify-phases %standard-phases
317 (replace 'bootstrap
318 (lambda _ (invoke "autoreconf" "-vif"))))
319 '%standard-phases)))
57f6c50d 320 (inputs
063629aa 321 `(("classpath" ,classpath-bootstrap)
57f6c50d 322 ("jikes" ,jikes)
fc37b4af 323 ("libffi" ,libffi)
cff1e095 324 ("zip" ,zip)
063629aa 325 ("zlib" ,zlib)))
6c9dca5a
SS
326 (native-inputs
327 (if (string-prefix? "aarch64" (or (%current-system)
328 (%current-target-system)))
329 ;; Additional packages needed for autoreconf.
330 `(("autoconf" ,autoconf)
331 ("automake" ,automake)
332 ("libtool" ,libtool))
333 '()))
063629aa
RW
334 (home-page "http://jamvm.sourceforge.net/")
335 (synopsis "Small Java Virtual Machine")
336 (description "JamVM is a Java Virtual Machine conforming to the JVM
337specification edition 2 (blue book). It is extremely small. However, unlike
338other small VMs it supports the full spec, including object finalisation and
339JNI.")
340 (license license:gpl2+)))
2551fee8 341
5783bd77
RW
342(define ant-bootstrap
343 (package
344 (name "ant-bootstrap")
345 ;; The 1.10.x series requires Java 8. 1.9.0 and later use generics, which
346 ;; are not supported. The 1.8.x series is the last to use only features
ff4d9fdf
RW
347 ;; supported by Jikes.
348 (version "1.8.4")
5783bd77
RW
349 (source (origin
350 (method url-fetch)
9a01efa2 351 (uri (string-append "mirror://apache/"
5783bd77
RW
352 "ant/source/apache-ant-"
353 version "-src.tar.bz2"))
354 (sha256
355 (base32
ff4d9fdf 356 "1cg0lga887qz5iizh6mlkxp01lciymrhmp7wzxpl6zpnldxmzrjx"))))
5783bd77
RW
357 (build-system gnu-build-system)
358 (arguments
cded3a75
GB
359 `(#:imported-modules ((guix build syscalls)
360 ,@%gnu-build-system-modules)
361 #:modules ((srfi srfi-1)
362 (guix build gnu-build-system)
363 (guix build utils)
364 (guix build syscalls))
365 #:tests? #f ; no "check" target
5783bd77
RW
366 #:phases
367 (modify-phases %standard-phases
d4fd4c3a 368 (delete 'bootstrap)
5783bd77
RW
369 (delete 'configure)
370 (replace 'build
371 (lambda* (#:key inputs #:allow-other-keys)
aa432388 372 (setenv "JAVA_HOME" (assoc-ref inputs "jamvm"))
5783bd77 373 (setenv "JAVACMD"
aa432388
RW
374 (string-append (assoc-ref inputs "jamvm")
375 "/bin/jamvm"))
5783bd77 376 (setenv "JAVAC"
aa432388
RW
377 (string-append (assoc-ref inputs "jikes")
378 "/bin/jikes"))
379 (setenv "CLASSPATH"
380 (string-append (assoc-ref inputs "jamvm")
381 "/lib/rt.jar"))
5783bd77 382
d4fd4c3a
RW
383 ;; Ant complains if this file doesn't exist.
384 (setenv "HOME" "/tmp")
385 (with-output-to-file "/tmp/.ant.properties"
386 (lambda _ (display "")))
5783bd77
RW
387
388 ;; Use jikes instead of javac for <javac ...> tags in build.xml
389 (setenv "ANT_OPTS" "-Dbuild.compiler=jikes")
390
391 ;; jikes produces lots of warnings, but they are not very
392 ;; interesting, so we silence them.
393 (setenv "$BOOTJAVAC_OPTS" "-nowarn")
394
d4fd4c3a
RW
395 ;; Without these JamVM options the build may freeze.
396 (substitute* "bootstrap.sh"
397 (("^\"\\$\\{JAVACMD\\}\" " m)
a495998b
EF
398 ,@(if (string-prefix? "armhf" (or (%current-system)
399 (%current-target-system)))
400 `((string-append m "-Xnocompact "))
401 `((string-append m "-Xnocompact -Xnoinlining ")))))
d4fd4c3a 402
5783bd77
RW
403 ;; Disable tests because we are bootstrapping and thus don't have
404 ;; any of the dependencies required to build and run the tests.
405 (substitute* "build.xml"
406 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
8e14634a
EF
407 (invoke "bash" "bootstrap.sh"
408 (string-append "-Ddist.dir="
409 (assoc-ref %outputs "out")))))
cded3a75
GB
410 (add-after 'build 'strip-jar-timestamps ;based on ant-build-system
411 (lambda* (#:key outputs #:allow-other-keys)
412 (define (repack-archive jar)
413 (let* ((dir (mkdtemp! "jar-contents.XXXXXX"))
414 (manifest (string-append dir "/META-INF/MANIFESTS.MF")))
415 (with-directory-excursion dir
416 (invoke "unzip" jar))
417 (delete-file jar)
418 ;; XXX: copied from (gnu build install)
419 (for-each (lambda (file)
420 (let ((s (lstat file)))
421 (unless (eq? (stat:type s) 'symlink)
422 (utime file 0 0 0 0))))
423 (find-files dir #:directories? #t))
424 ;; It is important that the manifest appears first.
425 (with-directory-excursion dir
426 (let* ((files (find-files "." ".*" #:directories? #t))
427 ;; To ensure that the reference scanner can
428 ;; detect all store references in the jars
429 ;; we disable compression with the "-0" option.
430 (command (if (file-exists? manifest)
431 `("zip" "-0" "-X" ,jar ,manifest
432 ,@files)
433 `("zip" "-0" "-X" ,jar ,@files))))
434 (apply invoke command)))))
435 (for-each repack-archive
436 (find-files
437 (string-append (assoc-ref %outputs "out") "/lib")
438 "\\.jar$"))
439 #t))
5783bd77
RW
440 (delete 'install))))
441 (native-inputs
442 `(("jikes" ,jikes)
cded3a75
GB
443 ("jamvm" ,jamvm-1-bootstrap)
444 ("unzip" ,unzip)
b42b5afd 445 ("zip" ,zip)))
0b1d71b2 446 (home-page "https://ant.apache.org")
5783bd77
RW
447 (synopsis "Build tool for Java")
448 (description
449 "Ant is a platform-independent build tool for Java. It is similar to
450make but is implemented using the Java language, requires the Java platform,
451and is best suited to building Java projects. Ant uses XML to describe the
452build process and its dependencies, whereas Make uses Makefile format.")
453 (license license:asl2.0)))
454
5461721f
RW
455;; Version 3.2.2 is the last version without a dependency on a full-fledged
456;; compiler for Java 1.5.
457(define ecj-bootstrap
458 (package
459 (name "ecj-bootstrap")
460 (version "3.2.2")
461 (source (origin
462 (method url-fetch)
463 (uri (string-append "http://archive.eclipse.org/eclipse/"
464 "downloads/drops/R-" version
465 "-200702121330/ecjsrc.zip"))
466 (sha256
467 (base32
468 "05hj82kxd23qaglsjkaqcj944riisjha7acf7h3ljhrjyljx8307"))))
469 ;; It would be so much easier if we could use the ant-build-system, but we
470 ;; cannot as we don't have ant at this point. We use ecj for
471 ;; bootstrapping the JDK.
472 (build-system gnu-build-system)
473 (arguments
474 `(#:modules ((guix build gnu-build-system)
475 (guix build utils)
476 (srfi srfi-1))
477 #:tests? #f ; there are no tests
478 #:phases
479 (modify-phases %standard-phases
480 (replace 'configure
481 (lambda* (#:key inputs #:allow-other-keys)
482 (setenv "CLASSPATH"
483 (string-join
6c775dc6
RW
484 (cons (string-append (assoc-ref inputs "jamvm")
485 "/lib/rt.jar")
486 (find-files (string-append
487 (assoc-ref inputs "ant-bootstrap")
488 "/lib")
489 "\\.jar$"))
5461721f
RW
490 ":"))
491 #t))
492 (replace 'build
493 (lambda* (#:key inputs #:allow-other-keys)
494 ;; The unpack phase enters the "org" directory by mistake.
495 (chdir "..")
496
497 ;; Create a simple manifest to make ecj executable.
498 (with-output-to-file "manifest"
499 (lambda _
500 (display "Manifest-Version: 1.0
501Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n")))
502
503 ;; Compile it all!
0b302a16
EF
504 (and (apply invoke "jikes"
505 (find-files "." "\\.java$"))
506 (invoke "fastjar" "cvfm"
507 "ecj-bootstrap.jar" "manifest" "."))))
5461721f
RW
508 (replace 'install
509 (lambda* (#:key outputs #:allow-other-keys)
510 (let ((share (string-append (assoc-ref outputs "out")
511 "/share/java/")))
512 (mkdir-p share)
513 (install-file "ecj-bootstrap.jar" share)
514 #t))))))
515 (native-inputs
516 `(("ant-bootstrap" ,ant-bootstrap)
517 ("unzip" ,unzip)
6c775dc6
RW
518 ("jikes" ,jikes)
519 ("jamvm" ,jamvm-1-bootstrap)
5461721f
RW
520 ("fastjar" ,fastjar)))
521 (home-page "https://eclipse.org")
522 (synopsis "Eclipse Java development tools core batch compiler")
523 (description "This package provides the Eclipse Java core batch compiler
524for bootstrapping purposes. The @dfn{Eclipse compiler for Java} (ecj) is a
525requirement for all GNU Classpath releases after version 0.93.")
526 (license license:epl1.0)))
527
6a5829d9
RW
528(define ecj-javac-wrapper
529 (package (inherit ecj-bootstrap)
530 (name "ecj-javac-wrapper")
531 (source #f)
532 (build-system trivial-build-system)
533 (arguments
534 `(#:modules ((guix build utils))
535 #:builder
c4f06c11 536 (begin
6a5829d9
RW
537 (use-modules (guix build utils))
538 (let* ((bin (string-append (assoc-ref %outputs "out") "/bin"))
539 (target (string-append bin "/javac"))
540 (guile (string-append (assoc-ref %build-inputs "guile")
541 "/bin/guile"))
542 (ecj (string-append (assoc-ref %build-inputs "ecj-bootstrap")
543 "/share/java/ecj-bootstrap.jar"))
c4f06c11
RW
544 (java (string-append (assoc-ref %build-inputs "jamvm")
545 "/bin/jamvm"))
546 (bootcp (let ((jvmlib (string-append (assoc-ref %build-inputs "classpath")
547 "/share/classpath")))
51602aac
RW
548 (string-append jvmlib "/glibj.zip:"
549 jvmlib "/tools.zip"))))
6a5829d9
RW
550 (mkdir-p bin)
551 (with-output-to-file target
552 (lambda _
553 (format #t "#!~a --no-auto-compile\n!#\n" guile)
554 (write
555 `(begin (use-modules (ice-9 match)
556 (ice-9 receive)
557 (ice-9 hash-table)
558 (srfi srfi-1)
559 (srfi srfi-26))
560 (define defaults
561 '(("-bootclasspath" ,bootcp)
562 ("-source" "1.5")
563 ("-target" "1.5")
564 ("-cp" ".")))
565 (define (main args)
566 (let ((classpath (getenv "CLASSPATH")))
567 (setenv "CLASSPATH"
c4f06c11
RW
568 (string-join (list ,ecj
569 ,(string-append (assoc-ref %build-inputs "jamvm")
570 "/lib/rt.jar")
571 (or classpath ""))
572 ":")))
6a5829d9
RW
573 (receive (vm-args other-args)
574 ;; Separate VM arguments from arguments to ECJ.
575 (partition (cut string-prefix? "-J" <>)
576 (fold (lambda (default acc)
577 (if (member (first default) acc)
578 acc (append default acc)))
579 args defaults))
580 (apply system* ,java
581 (append
582 ;; Remove "-J" prefix
583 (map (cut string-drop <> 2) vm-args)
584 '("org.eclipse.jdt.internal.compiler.batch.Main")
585 (cons "-nowarn" other-args)))))
586 ;; Entry point
587 (let ((args (cdr (command-line))))
588 (if (null? args)
589 (format (current-error-port) "javac: no arguments given!\n")
590 (main args)))))))
591 (chmod target #o755)
592 #t))))
593 (native-inputs
594 `(("guile" ,guile-2.2)
595 ("ecj-bootstrap" ,ecj-bootstrap)
c4f06c11
RW
596 ("jamvm" ,jamvm-1-bootstrap)
597 ("classpath" ,classpath-bootstrap)))
6a5829d9
RW
598 (description "This package provides a wrapper around the @dfn{Eclipse
599compiler for Java} (ecj) with a command line interface that is compatible with
600the standard javac executable.")))
601
8778da03
RW
602;; The classpath-bootstrap was built without a virtual machine, so it does not
603;; provide a wrapper for javah. We cannot build the development version of
604;; Classpath without javah.
605(define classpath-0.99
606 (package (inherit classpath-bootstrap)
d3551e86
RW
607 (version "0.99")
608 (source (origin
609 (method url-fetch)
610 (uri (string-append "mirror://gnu/classpath/classpath-"
611 version ".tar.gz"))
612 (sha256
613 (base32
bab9793f
EF
614 "1j7cby4k66f1nvckm48xcmh352b1d1b33qk7l6hi7dp9i9zjjagr"))
615 (patches (search-patches "classpath-aarch64-support.patch"))))
d3551e86
RW
616 (arguments
617 `(#:configure-flags
618 (list (string-append "--with-ecj-jar="
619 (assoc-ref %build-inputs "ecj-bootstrap")
620 "/share/java/ecj-bootstrap.jar")
621 (string-append "JAVAC="
622 (assoc-ref %build-inputs "ecj-javac-wrapper")
623 "/bin/javac")
624 (string-append "JAVA="
8778da03
RW
625 (assoc-ref %build-inputs "jamvm")
626 "/bin/jamvm")
d3551e86
RW
627 "GCJ_JAVAC_TRUE=no"
628 "ac_cv_prog_java_works=yes" ; trust me
629 "--disable-Werror"
630 "--disable-gmp"
631 "--disable-gtk-peer"
632 "--disable-gconf-peer"
633 "--disable-plugin"
634 "--disable-dssi"
635 "--disable-alsa"
636 "--disable-gjdoc")
637 #:phases
638 (modify-phases %standard-phases
639 (add-after 'install 'install-data
15a59c21 640 (lambda _ (invoke "make" "install-data"))))))
d3551e86
RW
641 (native-inputs
642 `(("ecj-bootstrap" ,ecj-bootstrap)
643 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
644 ("fastjar" ,fastjar)
8778da03
RW
645 ("jamvm" ,jamvm-1-bootstrap)
646 ("classpath" ,classpath-bootstrap)
d3551e86 647 ("libltdl" ,libltdl)
8778da03 648 ("pkg-config" ,pkg-config)))))
d3551e86 649
c98d7a66
RW
650;; We need this because classpath-bootstrap does not provide all of the tools
651;; we need to build classpath-devel.
04d7cae2 652(define classpath-jamvm-wrappers
c98d7a66 653 (package (inherit classpath-0.99)
04d7cae2
RW
654 (name "classpath-jamvm-wrappers")
655 (source #f)
656 (build-system trivial-build-system)
657 (arguments
658 `(#:modules ((guix build utils))
659 #:builder
660 (begin
661 (use-modules (guix build utils))
662 (let* ((bash (assoc-ref %build-inputs "bash"))
663 (jamvm (assoc-ref %build-inputs "jamvm"))
664 (classpath (assoc-ref %build-inputs "classpath"))
665 (bin (string-append (assoc-ref %outputs "out")
666 "/bin/")))
667 (mkdir-p bin)
668 (for-each (lambda (tool)
669 (with-output-to-file (string-append bin tool)
670 (lambda _
e3ec1258
EF
671 ,@(if (string-prefix? "armhf" (or (%current-system)
672 (%current-target-system)))
673 `((format #t "#!~a/bin/sh
674~a/bin/jamvm -Xnocompact -classpath ~a/share/classpath/tools.zip \
675gnu.classpath.tools.~a.~a $@"
676 bash jamvm classpath tool
677 (if (string=? "native2ascii" tool)
678 "Native2ASCII" "Main")))
679 `((format #t "#!~a/bin/sh
40e3a197 680~a/bin/jamvm -Xnocompact -Xnoinlining -classpath ~a/share/classpath/tools.zip \
04d7cae2
RW
681gnu.classpath.tools.~a.~a $@"
682 bash jamvm classpath tool
683 (if (string=? "native2ascii" tool)
e3ec1258 684 "Native2ASCII" "Main"))))))
04d7cae2
RW
685 (chmod (string-append bin tool) #o755))
686 (list "javah"
687 "rmic"
688 "rmid"
689 "orbd"
690 "rmiregistry"
691 "native2ascii"))
692 #t))))
693 (native-inputs
694 `(("bash" ,bash)
c98d7a66
RW
695 ("jamvm" ,jamvm-1-bootstrap)
696 ("classpath" ,classpath-0.99)))
04d7cae2
RW
697 (inputs '())
698 (synopsis "Executables from GNU Classpath")
699 (description "This package provides wrappers around the tools provided by
700the GNU Classpath library. They are executed by the JamVM virtual
701machine.")))
702
72885a4c
RW
703;; The last release of GNU Classpath is 0.99 and it happened in 2012. Since
704;; then Classpath has gained much more support for Java 1.6.
705(define-public classpath-devel
706 (let ((commit "e7c13ee0cf2005206fbec0eca677f8cf66d5a103")
707 (revision "1"))
8778da03 708 (package (inherit classpath-bootstrap)
72885a4c
RW
709 (version (string-append "0.99-" revision "." (string-take commit 9)))
710 (source (origin
711 (method git-fetch)
712 (uri (git-reference
5f13bf09 713 (url "https://git.savannah.gnu.org/git/classpath.git")
72885a4c 714 (commit commit)))
51988e3a 715 (file-name (string-append "classpath-" version "-checkout"))
72885a4c
RW
716 (sha256
717 (base32
2995be77
SS
718 "1v2rww76ww322mpg3s12a1kkc6gkp31bm9gcxs532h0wq285fiw4"))
719 (patches (search-patches "classpath-aarch64-support.patch"))))
72885a4c 720 (arguments
93c103ab
RW
721 `(#:make-flags
722 ;; Ensure that the initial heap size is smaller than the maximum
723 ;; size. By default only Xmx is set, which can lead to invalid
724 ;; memory settings on some machines with a lot of memory.
725 '("JAVAC_MEM_OPT=-J-Xms512M -J-Xmx768M")
726 #:configure-flags
72885a4c
RW
727 (list (string-append "--with-ecj-jar="
728 (assoc-ref %build-inputs "ecj-bootstrap")
729 "/share/java/ecj-bootstrap.jar")
93c103ab 730 (string-append "--with-javac="
72885a4c
RW
731 (assoc-ref %build-inputs "ecj-javac-wrapper")
732 "/bin/javac")
733 (string-append "JAVA="
734 (assoc-ref %build-inputs "jamvm")
735 "/bin/jamvm")
736 "GCJ_JAVAC_TRUE=no"
737 "ac_cv_prog_java_works=yes" ; trust me
738 "--disable-Werror"
739 "--disable-gmp"
740 "--disable-gtk-peer"
741 "--disable-gconf-peer"
742 "--disable-plugin"
743 "--disable-dssi"
744 "--disable-alsa"
745 "--disable-gjdoc")
746 #:phases
747 (modify-phases %standard-phases
2a69f48e
RW
748 ;; XXX The bootstrap phase executes autogen.sh, which fails after
749 ;; complaining about the lack of gettext.
750 (replace 'bootstrap
751 (lambda _ (invoke "autoreconf" "-vif")))
72885a4c
RW
752 (add-after 'unpack 'remove-unsupported-annotations
753 (lambda _
754 (substitute* (find-files "java" "\\.java$")
755 (("@Override") ""))
756 #t))
757 (add-after 'install 'install-data
4c65eb43 758 (lambda _ (invoke "make" "install-data"))))))
72885a4c
RW
759 (native-inputs
760 `(("autoconf" ,autoconf)
761 ("automake" ,automake)
762 ("libtool" ,libtool)
763 ("gettext" ,gettext-minimal)
764 ("texinfo" ,texinfo)
765 ("classpath-jamvm-wrappers" ,classpath-jamvm-wrappers) ; for javah
766 ("ecj-bootstrap" ,ecj-bootstrap)
b5a0d427 767 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
72885a4c 768 ("fastjar" ,fastjar)
58d2b135 769 ("jamvm" ,jamvm-1-bootstrap)
72885a4c
RW
770 ("libltdl" ,libltdl)
771 ("pkg-config" ,pkg-config))))))
772
58d2b135
RW
773(define jamvm
774 (package (inherit jamvm-1-bootstrap)
775 (version "2.0.0")
776 (source (origin
777 (method url-fetch)
778 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
779 "JamVM%20" version "/jamvm-"
780 version ".tar.gz"))
781 (sha256
782 (base32
cff1e095 783 "1nl0zxz8y5x8gwsrm7n32bry4dx8x70p8z3s9jbdvs8avyb8whkn"))
a2120060 784 (patches
2995be77
SS
785 (search-patches "jamvm-2.0.0-disable-branch-patching.patch"
786 "jamvm-2.0.0-opcode-guard.patch"
787 "jamvm-2.0.0-aarch64-support.patch"))
cff1e095
788 (snippet
789 '(begin
790 ;; Remove precompiled software.
791 (delete-file "src/classlib/gnuclasspath/lib/classes.zip")
792 #t))))
58d2b135
RW
793 (build-system gnu-build-system)
794 (arguments
2995be77
SS
795 (substitute-keyword-arguments (package-arguments jamvm-1-bootstrap)
796 ((#:configure-flags _)
797 '(list (string-append "--with-classpath-install-dir="
798 (assoc-ref %build-inputs "classpath"))))))
8c6091e3
RW
799 (inputs
800 `(("classpath" ,classpath-devel)
b5a0d427 801 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
cff1e095 802 ("zip" ,zip)
8c6091e3
RW
803 ("zlib" ,zlib)))))
804
b5a0d427
RW
805(define ecj-javac-wrapper-final
806 (package (inherit ecj-javac-wrapper)
1bf56c72
RW
807 (native-inputs
808 `(("guile" ,guile-2.2)
809 ("ecj-bootstrap" ,ecj-bootstrap)
810 ("jamvm" ,jamvm)
811 ("classpath" ,classpath-devel)))))
812
98419316 813;; The bootstrap JDK consisting of jamvm, classpath-devel,
b5a0d427
RW
814;; ecj-javac-wrapper-final cannot build Icedtea 2.x directly, because it's
815;; written in Java 7. It can, however, build the unmaintained Icedtea 1.x,
816;; which uses Java 6 only.
98419316
RW
817(define-public icedtea-6
818 (package
819 (name "icedtea")
820 (version "1.13.13")
821 (source (origin
822 (method url-fetch)
823 (uri (string-append
824 "http://icedtea.wildebeest.org/download/source/icedtea6-"
825 version ".tar.xz"))
826 (sha256
827 (base32
828 "0bg9sb4f7qbq77c0zf9m17p47ga0kf0r9622g9p12ysg26jd1ksg"))
829 (modules '((guix build utils)))
830 (snippet
6cbee49d
MW
831 '(begin
832 (substitute* "Makefile.in"
833 ;; do not leak information about the build host
834 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
835 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
836 #t))))
98419316
RW
837 (build-system gnu-build-system)
838 (outputs '("out" ; Java Runtime Environment
839 "jdk" ; Java Development Kit
840 "doc")) ; all documentation
841 (arguments
842 `(;; There are many failing tests and many are known to fail upstream.
843 #:tests? #f
844
845 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
846 ;; gremlin) doesn't support it yet, so skip this phase.
847 #:validate-runpath? #f
848
849 #:modules ((guix build utils)
850 (guix build gnu-build-system)
851 (srfi srfi-19))
852
853 #:configure-flags
854 `("--enable-bootstrap"
855 "--enable-nss"
856 "--without-rhino"
857 "--with-parallel-jobs"
858 "--disable-downloading"
859 "--disable-tests"
860 ,(string-append "--with-ecj="
861 (assoc-ref %build-inputs "ecj")
862 "/share/java/ecj-bootstrap.jar")
863 ,(string-append "--with-jar="
864 (assoc-ref %build-inputs "fastjar")
865 "/bin/fastjar")
866 ,(string-append "--with-jdk-home="
867 (assoc-ref %build-inputs "classpath"))
868 ,(string-append "--with-java="
869 (assoc-ref %build-inputs "jamvm")
870 "/bin/jamvm"))
871 #:phases
872 (modify-phases %standard-phases
873 (replace 'unpack
874 (lambda* (#:key source inputs #:allow-other-keys)
2c8ac364
MW
875 (invoke "tar" "xvf" source)
876 (chdir (string-append "icedtea6-" ,version))
877 (mkdir "openjdk")
878 (copy-recursively (assoc-ref inputs "openjdk-src") "openjdk")
879 ;; The convenient OpenJDK source bundle is no longer
880 ;; available for download, so we have to take the sources
881 ;; from the Mercurial repositories and change the Makefile
882 ;; to avoid tests for the OpenJDK zip archive.
883 (with-directory-excursion "openjdk"
884 (for-each (lambda (part)
885 (mkdir part)
886 (copy-recursively
887 (assoc-ref inputs
888 (string-append part "-src"))
889 part))
873325b0 890 '("jdk" "corba"
2c8ac364 891 "langtools" "jaxp" "jaxws")))
873325b0
MB
892 (with-directory-excursion "openjdk"
893 (invoke "tar" "xvf" (assoc-ref inputs "hotspot-src"))
894 (rename-file "hg-checkout" "hotspot"))
306c1e61
RW
895 (substitute* "patches/freetypeversion.patch"
896 (("REQUIRED_FREETYPE_VERSION = 2.2.1")
897 "REQUIRED_FREETYPE_VERSION = 2.10.1"))
2c8ac364
MW
898 (substitute* "Makefile.in"
899 (("echo \"ERROR: No up-to-date OpenJDK zip available\"; exit -1;")
900 "echo \"trust me\";")
901 ;; The contents of the bootstrap directory must be
902 ;; writeable but when copying from the store they are
903 ;; not.
904 (("mkdir -p lib/rt" line)
905 (string-append line "; chmod -R u+w $(BOOT_DIR)")))
906 (invoke "chmod" "-R" "u+w" "openjdk")))
98419316
RW
907 (add-after 'unpack 'use-classpath
908 (lambda* (#:key inputs #:allow-other-keys)
b5a0d427
RW
909 (let ((jvmlib (assoc-ref inputs "classpath"))
910 (jamvm (assoc-ref inputs "jamvm")))
98419316
RW
911 ;; Classpath does not provide rt.jar.
912 (substitute* "Makefile.in"
913 (("\\$\\(SYSTEM_JDK_DIR\\)/jre/lib/rt.jar")
914 (string-append jvmlib "/share/classpath/glibj.zip")))
915 ;; Make sure we can find all classes.
916 (setenv "CLASSPATH"
917 (string-append jvmlib "/share/classpath/glibj.zip:"
b5a0d427
RW
918 jvmlib "/share/classpath/tools.zip:"
919 jamvm "/lib/rt.jar"))
98419316
RW
920 (setenv "JAVACFLAGS"
921 (string-append "-cp "
922 jvmlib "/share/classpath/glibj.zip:"
923 jvmlib "/share/classpath/tools.zip")))
924 #t))
925 (add-after 'unpack 'patch-patches
926 (lambda _
927 ;; shebang in patches so that they apply cleanly
928 (substitute* '("patches/jtreg-jrunscript.patch"
929 "patches/hotspot/hs23/drop_unlicensed_test.patch")
930 (("#!/bin/sh") (string-append "#!" (which "sh"))))
931 #t))
932 (add-after 'unpack 'patch-paths
933 (lambda* (#:key inputs #:allow-other-keys)
934 ;; buildtree.make generates shell scripts, so we need to replace
935 ;; the generated shebang
936 (substitute* '("openjdk/hotspot/make/linux/makefiles/buildtree.make")
937 (("/bin/sh") (which "bash")))
938
939 (let ((corebin (string-append
940 (assoc-ref inputs "coreutils") "/bin/"))
941 (binbin (string-append
942 (assoc-ref inputs "binutils") "/bin/"))
943 (grepbin (string-append
944 (assoc-ref inputs "grep") "/bin/")))
945 (substitute* '("openjdk/jdk/make/common/shared/Defs-linux.gmk"
946 "openjdk/corba/make/common/shared/Defs-linux.gmk")
947 (("UNIXCOMMAND_PATH = /bin/")
948 (string-append "UNIXCOMMAND_PATH = " corebin))
949 (("USRBIN_PATH = /usr/bin/")
950 (string-append "USRBIN_PATH = " corebin))
951 (("DEVTOOLS_PATH *= */usr/bin/")
952 (string-append "DEVTOOLS_PATH = " corebin))
953 (("COMPILER_PATH *= */usr/bin/")
954 (string-append "COMPILER_PATH = "
955 (assoc-ref inputs "gcc") "/bin/"))
956 (("DEF_OBJCOPY *=.*objcopy")
957 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
958
959 ;; fix path to alsa header
960 (substitute* "openjdk/jdk/make/common/shared/Sanity.gmk"
961 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
962 (string-append "ALSA_INCLUDE="
963 (assoc-ref inputs "alsa-lib")
964 "/include/alsa/version.h")))
965
966 ;; fix hard-coded utility paths
967 (substitute* '("openjdk/jdk/make/common/shared/Defs-utils.gmk"
968 "openjdk/corba/make/common/shared/Defs-utils.gmk")
969 (("ECHO *=.*echo")
970 (string-append "ECHO = " (which "echo")))
971 (("^GREP *=.*grep")
972 (string-append "GREP = " (which "grep")))
973 (("EGREP *=.*egrep")
974 (string-append "EGREP = " (which "egrep")))
975 (("CPIO *=.*cpio")
976 (string-append "CPIO = " (which "cpio")))
977 (("READELF *=.*readelf")
978 (string-append "READELF = " (which "readelf")))
979 (("^ *AR *=.*ar")
980 (string-append "AR = " (which "ar")))
981 (("^ *TAR *=.*tar")
982 (string-append "TAR = " (which "tar")))
983 (("AS *=.*as")
984 (string-append "AS = " (which "as")))
985 (("LD *=.*ld")
986 (string-append "LD = " (which "ld")))
987 (("STRIP *=.*strip")
988 (string-append "STRIP = " (which "strip")))
989 (("NM *=.*nm")
990 (string-append "NM = " (which "nm")))
991 (("^SH *=.*sh")
992 (string-append "SH = " (which "bash")))
993 (("^FIND *=.*find")
994 (string-append "FIND = " (which "find")))
995 (("LDD *=.*ldd")
996 (string-append "LDD = " (which "ldd")))
997 (("NAWK *=.*(n|g)awk")
998 (string-append "NAWK = " (which "gawk")))
999 (("XARGS *=.*xargs")
1000 (string-append "XARGS = " (which "xargs")))
1001 (("UNZIP *=.*unzip")
1002 (string-append "UNZIP = " (which "unzip")))
1003 (("ZIPEXE *=.*zip")
1004 (string-append "ZIPEXE = " (which "zip")))
1005 (("SED *=.*sed")
1006 (string-append "SED = " (which "sed"))))
1007
1008 ;; Some of these timestamps cause problems as they are more than
1009 ;; 10 years ago, failing the build process.
1010 (substitute*
1011 "openjdk/jdk/src/share/classes/java/util/CurrencyData.properties"
1012 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
1013 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
1014 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
1015 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY"))
1016 #t)))
1017 (add-before 'configure 'set-additional-paths
1018 (lambda* (#:key inputs #:allow-other-keys)
1019 (setenv "CPATH"
1020 (string-append (assoc-ref inputs "libxrender")
1021 "/include/X11/extensions" ":"
1022 (assoc-ref inputs "libxtst")
1023 "/include/X11/extensions" ":"
1024 (assoc-ref inputs "libxinerama")
1025 "/include/X11/extensions" ":"
1026 (or (getenv "CPATH") "")))
1027 (setenv "ALT_CUPS_HEADERS_PATH"
1028 (string-append (assoc-ref inputs "cups")
1029 "/include"))
1030 (setenv "ALT_FREETYPE_HEADERS_PATH"
1031 (string-append (assoc-ref inputs "freetype")
1032 "/include"))
1033 (setenv "ALT_FREETYPE_LIB_PATH"
1034 (string-append (assoc-ref inputs "freetype")
1035 "/lib"))
1036 #t))
0bc11cc7
GB
1037 (add-before 'build 'disable-os-version-check
1038 ;; allow build on linux major version change
1039 (lambda _
1040 (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok")
1041 #t))
98419316
RW
1042 (replace 'install
1043 (lambda* (#:key outputs #:allow-other-keys)
1044 (let ((doc (string-append (assoc-ref outputs "doc")
1045 "/share/doc/icedtea"))
1046 (jre (assoc-ref outputs "out"))
1047 (jdk (assoc-ref outputs "jdk")))
1048 (copy-recursively "openjdk.build/docs" doc)
1049 (copy-recursively "openjdk.build/j2re-image" jre)
1050 (copy-recursively "openjdk.build/j2sdk-image" jdk))
1051 #t)))))
1052 (native-inputs
1053 `(("ant" ,ant-bootstrap)
1054 ("alsa-lib" ,alsa-lib)
1055 ("attr" ,attr)
1056 ("classpath" ,classpath-devel)
1057 ("coreutils" ,coreutils)
1058 ("cpio" ,cpio)
1059 ("cups" ,cups)
1060 ("ecj" ,ecj-bootstrap)
b5a0d427 1061 ("ecj-javac" ,ecj-javac-wrapper-final)
98419316
RW
1062 ("fastjar" ,fastjar)
1063 ("fontconfig" ,fontconfig)
1064 ("freetype" ,freetype)
1065 ("gtk" ,gtk+-2)
1066 ("gawk" ,gawk)
1067 ("giflib" ,giflib)
1068 ("grep" ,grep)
1069 ("jamvm" ,jamvm)
1070 ("lcms" ,lcms)
4bd428a7 1071 ("libjpeg" ,libjpeg-turbo)
bcb078a4 1072 ("libnsl" ,libnsl)
98419316
RW
1073 ("libpng" ,libpng)
1074 ("libtool" ,libtool)
1075 ("libx11" ,libx11)
1076 ("libxcomposite" ,libxcomposite)
1077 ("libxi" ,libxi)
1078 ("libxinerama" ,libxinerama)
1079 ("libxrender" ,libxrender)
1080 ("libxslt" ,libxslt) ;for xsltproc
1081 ("libxt" ,libxt)
1082 ("libxtst" ,libxtst)
1083 ("mit-krb5" ,mit-krb5)
1084 ("nss" ,nss)
1085 ("nss-certs" ,nss-certs)
1086 ("perl" ,perl)
1087 ("pkg-config" ,pkg-config)
1088 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
1089 ("unzip" ,unzip)
1090 ("wget" ,wget)
1091 ("which" ,which)
1092 ("zip" ,zip)
1093 ("zlib" ,zlib)
1094 ("openjdk-src"
1095 ,(origin
1096 (method hg-fetch)
1097 (uri (hg-reference
1098 (url "http://hg.openjdk.java.net/jdk6/jdk6/")
1099 (changeset "jdk6-b41")))
1100 (sha256
1101 (base32
1102 "14q47yfg586fs64w30g8mk92m5dkxsvr36zzh0ra99xk5x0x96mv"))))
1103 ("jdk-src"
1104 ,(origin
1105 (method hg-fetch)
1106 (uri (hg-reference
1107 (url "http://hg.openjdk.java.net/jdk6/jdk6/jdk/")
1108 (changeset "jdk6-b41")))
1109 (sha256
1110 (base32
1111 "165824nhg1k1dx6zs9dny0j49rmk35jw5b13dmz8c77jfajml4v9"))))
1112 ("hotspot-src"
1113 ,(origin
1114 (method hg-fetch)
1115 (uri (hg-reference
1116 (url "http://hg.openjdk.java.net/jdk6/jdk6/hotspot/")
1117 (changeset "jdk6-b41")))
1118 (sha256
1119 (base32
1cdff8cd
GB
1120 "07lc1z4k5dj9nrc1wvwmpvxr3xgxrdkdh53xb95skk5ij49yagfd"))
1121 (patches
1122 (search-patches "icedtea-6-hotspot-gcc-segfault-workaround.patch"))))
98419316
RW
1123 ("corba-src"
1124 ,(origin
1125 (method hg-fetch)
1126 (uri (hg-reference
1127 (url "http://hg.openjdk.java.net/jdk6/jdk6/corba/")
1128 (changeset "jdk6-b41")))
1129 (sha256
1130 (base32
1131 "1p9g1r9dnax2iwp7yb59qx7m4nmshqhwmrb2b8jj8zgbd9dl2i3q"))))
1132 ("langtools-src"
1133 ,(origin
1134 (method hg-fetch)
1135 (uri (hg-reference
1136 (url "http://hg.openjdk.java.net/jdk6/jdk6/langtools/")
1137 (changeset "jdk6-b41")))
1138 (sha256
1139 (base32
1140 "1x52wd67fynbbd9ild6fb4wvba3f5hhwk03qdjfazd0a1qr37z3d"))))
1141 ("jaxp-src"
1142 ,(origin
1143 (method hg-fetch)
1144 (uri (hg-reference
1145 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxp/")
1146 (changeset "jdk6-b41")))
1147 (sha256
1148 (base32
1149 "0shlqrvzpr4nrkmv215lbxnby63s3yvbdh1yxcayznsyqwa4nlxm"))))
1150 ("jaxws-src"
1151 ,(origin
1152 (method hg-fetch)
1153 (uri (hg-reference
1154 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxws/")
1155 (changeset "jdk6-b41")))
1156 (sha256
1157 (base32
1158 "0835lkw8vib1xhp8lxnybhlvzdh699hbi4mclxanydjk63zbpxk0"))))))
1159 (home-page "http://icedtea.classpath.org")
1160 (synopsis "Java development kit")
1161 (description
1162 "This package provides the OpenJDK built with the IcedTea build harness.
1163This version of the OpenJDK is no longer maintained and is only used for
1164bootstrapping purposes.")
1165 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1166 ;; same license as both GNU Classpath and OpenJDK.
1167 (license license:gpl2+)))
1168
a243e12a 1169(define-public icedtea-7
7f6485e7 1170 (let* ((version "2.6.13")
f6789047
RW
1171 (drop (lambda (name hash)
1172 (origin
1173 (method url-fetch)
1174 (uri (string-append
d30ce4a7 1175 "http://icedtea.classpath.org/download/drops"
f6789047
RW
1176 "/icedtea7/" version "/" name ".tar.bz2"))
1177 (sha256 (base32 hash))))))
71053e14
RW
1178 (package
1179 (name "icedtea")
f6789047
RW
1180 (version version)
1181 (source (origin
1182 (method url-fetch)
1183 (uri (string-append
1184 "http://icedtea.wildebeest.org/download/source/icedtea-"
1185 version ".tar.xz"))
1186 (sha256
1187 (base32
7f6485e7 1188 "1w331rdqx1dcx2xb0fmjmrkdc71xqn20fxsgw8by4xhiblh88khh"))
f6789047
RW
1189 (modules '((guix build utils)))
1190 (snippet
6cbee49d
MW
1191 '(begin
1192 (substitute* "Makefile.in"
1193 ;; do not leak information about the build host
1194 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
1195 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
1196 #t))))
71053e14
RW
1197 (build-system gnu-build-system)
1198 (outputs '("out" ; Java Runtime Environment
1199 "jdk" ; Java Development Kit
1200 "doc")) ; all documentation
f6789047
RW
1201 (arguments
1202 `(;; There are many test failures. Some are known to
1203 ;; fail upstream, others relate to not having an X
1204 ;; server running at test time, yet others are a
1205 ;; complete mystery to me.
1206
1207 ;; hotspot: passed: 241; failed: 45; error: 2
1208 ;; langtools: passed: 1,934; failed: 26
1209 ;; jdk: unknown
1210 #:tests? #f
71053e14
RW
1211
1212 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
1213 ;; gremlin) doesn't support it yet, so skip this phase.
1214 #:validate-runpath? #f
1215
f6789047
RW
1216 ;; Apparently, the C locale is needed for some of the tests.
1217 #:locale "C"
71053e14
RW
1218
1219 #:modules ((guix build utils)
1220 (guix build gnu-build-system)
1221 (ice-9 match)
1222 (ice-9 popen)
71053e14
RW
1223 (srfi srfi-19)
1224 (srfi srfi-26))
1225
1226 #:configure-flags
e2098e2d
RW
1227 ;; TODO: package pcsc and sctp, and add to inputs
1228 `("--disable-system-pcsc"
1229 "--disable-system-sctp"
1230 "--enable-bootstrap"
1231 "--enable-nss"
1232 "--without-rhino"
1233 "--disable-downloading"
1234 "--disable-tests" ;they are run in the check phase instead
1235 "--with-openjdk-src-dir=./openjdk.src"
1236 ,(string-append "--with-jdk-home="
1237 (assoc-ref %build-inputs "jdk")))
71053e14
RW
1238
1239 #:phases
1240 (modify-phases %standard-phases
1241 (replace 'unpack
1242 (lambda* (#:key source inputs #:allow-other-keys)
1243 (let ((target (string-append "icedtea-" ,version))
1244 (unpack (lambda* (name #:optional dir)
1245 (let ((dir (or dir
1246 (string-drop-right name 5))))
1247 (mkdir dir)
2c8ac364
MW
1248 (invoke "tar" "xvf"
1249 (assoc-ref inputs name)
1250 "-C" dir
1251 "--strip-components=1")))))
71053e14 1252 (mkdir target)
2c8ac364
MW
1253 (invoke "tar" "xvf" source
1254 "-C" target "--strip-components=1")
1255 (chdir target)
1256 (unpack "openjdk-src" "openjdk.src")
1257 (with-directory-excursion "openjdk.src"
1258 (for-each unpack
1259 (filter (cut string-suffix? "-drop" <>)
1260 (map (match-lambda
1261 ((name . _) name))
1262 inputs))))
1263 #t)))
6b7e09ae
RW
1264 (add-after 'unpack 'patch-bitrot
1265 (lambda _
1266 (substitute* '("patches/boot/revert-6973616.patch"
1267 "openjdk.src/jdk/make/common/shared/Defs-versions.gmk")
1268 (("REQUIRED_FREETYPE_VERSION = 2.2.1")
1269 "REQUIRED_FREETYPE_VERSION = 2.10.1"))
1270 ;; As of attr 2.4.48 this header is no longer
1271 ;; included. It is provided by the libc instead.
1272 (substitute* '("configure"
1273 "openjdk.src/jdk/src/solaris/native/sun/nio/fs/LinuxNativeDispatcher.c")
1274 (("attr/xattr.h") "sys/xattr.h"))
1275 #t))
71053e14
RW
1276 (add-after 'unpack 'fix-x11-extension-include-path
1277 (lambda* (#:key inputs #:allow-other-keys)
1278 (substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk"
1279 (((string-append "\\$\\(firstword \\$\\(wildcard "
1280 "\\$\\(OPENWIN_HOME\\)"
1281 "/include/X11/extensions\\).*$"))
1282 (string-append (assoc-ref inputs "libxrender")
1283 "/include/X11/extensions"
1284 " -I" (assoc-ref inputs "libxtst")
1285 "/include/X11/extensions"
1286 " -I" (assoc-ref inputs "libxinerama")
1287 "/include/X11/extensions"))
1288 (("\\$\\(wildcard /usr/include/X11/extensions\\)\\)") ""))
1289 #t))
1290 (add-after 'unpack 'patch-paths
1291 (lambda _
1292 ;; buildtree.make generates shell scripts, so we need to replace
1293 ;; the generated shebang
1294 (substitute* '("openjdk.src/hotspot/make/linux/makefiles/buildtree.make")
1295 (("/bin/sh") (which "bash")))
1296
1297 (let ((corebin (string-append
1298 (assoc-ref %build-inputs "coreutils") "/bin/"))
1299 (binbin (string-append
1300 (assoc-ref %build-inputs "binutils") "/bin/"))
1301 (grepbin (string-append
1302 (assoc-ref %build-inputs "grep") "/bin/")))
1303 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-linux.gmk"
1304 "openjdk.src/corba/make/common/shared/Defs-linux.gmk")
1305 (("UNIXCOMMAND_PATH = /bin/")
1306 (string-append "UNIXCOMMAND_PATH = " corebin))
1307 (("USRBIN_PATH = /usr/bin/")
1308 (string-append "USRBIN_PATH = " corebin))
1309 (("DEVTOOLS_PATH *= */usr/bin/")
1310 (string-append "DEVTOOLS_PATH = " corebin))
1311 (("COMPILER_PATH *= */usr/bin/")
1312 (string-append "COMPILER_PATH = "
1313 (assoc-ref %build-inputs "gcc") "/bin/"))
1314 (("DEF_OBJCOPY *=.*objcopy")
1315 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
1316
1317 ;; fix path to alsa header
1318 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1319 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1320 (string-append "ALSA_INCLUDE="
1321 (assoc-ref %build-inputs "alsa-lib")
1322 "/include/alsa/version.h")))
1323
1324 ;; fix hard-coded utility paths
1325 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-utils.gmk"
1326 "openjdk.src/corba/make/common/shared/Defs-utils.gmk")
1327 (("ECHO *=.*echo")
1328 (string-append "ECHO = " (which "echo")))
1329 (("^GREP *=.*grep")
1330 (string-append "GREP = " (which "grep")))
1331 (("EGREP *=.*egrep")
1332 (string-append "EGREP = " (which "egrep")))
1333 (("CPIO *=.*cpio")
1334 (string-append "CPIO = " (which "cpio")))
1335 (("READELF *=.*readelf")
1336 (string-append "READELF = " (which "readelf")))
1337 (("^ *AR *=.*ar")
1338 (string-append "AR = " (which "ar")))
1339 (("^ *TAR *=.*tar")
1340 (string-append "TAR = " (which "tar")))
1341 (("AS *=.*as")
1342 (string-append "AS = " (which "as")))
1343 (("LD *=.*ld")
1344 (string-append "LD = " (which "ld")))
1345 (("STRIP *=.*strip")
1346 (string-append "STRIP = " (which "strip")))
1347 (("NM *=.*nm")
1348 (string-append "NM = " (which "nm")))
1349 (("^SH *=.*sh")
1350 (string-append "SH = " (which "bash")))
1351 (("^FIND *=.*find")
1352 (string-append "FIND = " (which "find")))
1353 (("LDD *=.*ldd")
1354 (string-append "LDD = " (which "ldd")))
1355 (("NAWK *=.*(n|g)awk")
1356 (string-append "NAWK = " (which "gawk")))
1357 (("XARGS *=.*xargs")
1358 (string-append "XARGS = " (which "xargs")))
1359 (("UNZIP *=.*unzip")
1360 (string-append "UNZIP = " (which "unzip")))
1361 (("ZIPEXE *=.*zip")
1362 (string-append "ZIPEXE = " (which "zip")))
1363 (("SED *=.*sed")
1364 (string-append "SED = " (which "sed"))))
1365
1366 ;; Some of these timestamps cause problems as they are more than
1367 ;; 10 years ago, failing the build process.
1368 (substitute*
1369 "openjdk.src/jdk/src/share/classes/java/util/CurrencyData.properties"
1370 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
1371 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
1372 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
1373 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY")))
1374 #t))
1375 (add-before 'configure 'set-additional-paths
1376 (lambda* (#:key inputs #:allow-other-keys)
e2098e2d
RW
1377 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1378 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1379 (string-append "ALSA_INCLUDE="
1380 (assoc-ref inputs "alsa-lib")
1381 "/include/alsa/version.h")))
1382 (setenv "CC" "gcc")
1383 (setenv "CPATH"
1384 (string-append (assoc-ref inputs "libxcomposite")
1385 "/include/X11/extensions" ":"
1386 (assoc-ref inputs "libxrender")
1387 "/include/X11/extensions" ":"
1388 (assoc-ref inputs "libxtst")
1389 "/include/X11/extensions" ":"
1390 (assoc-ref inputs "libxinerama")
1391 "/include/X11/extensions" ":"
1392 (or (getenv "CPATH") "")))
1393 (setenv "ALT_OBJCOPY" (which "objcopy"))
1394 (setenv "ALT_CUPS_HEADERS_PATH"
1395 (string-append (assoc-ref inputs "cups")
1396 "/include"))
1397 (setenv "ALT_FREETYPE_HEADERS_PATH"
1398 (string-append (assoc-ref inputs "freetype")
1399 "/include"))
1400 (setenv "ALT_FREETYPE_LIB_PATH"
1401 (string-append (assoc-ref inputs "freetype")
1402 "/lib"))
71053e14 1403 #t))
59199e1a
GB
1404 (add-before 'build 'disable-os-version-check
1405 ;; allow build on linux major version change
1406 (lambda _
1407 (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok")
1408 #t))
71053e14
RW
1409 (add-before 'check 'fix-test-framework
1410 (lambda _
1411 ;; Fix PATH in test environment
1412 (substitute* "test/jtreg/com/sun/javatest/regtest/Main.java"
1413 (("PATH=/bin:/usr/bin")
1414 (string-append "PATH=" (getenv "PATH"))))
1415 (substitute* "test/jtreg/com/sun/javatest/util/SysEnv.java"
1416 (("/usr/bin/env") (which "env")))
1417 (substitute* "openjdk.src/hotspot/test/test_env.sh"
1418 (("/bin/rm") (which "rm"))
1419 (("/bin/cp") (which "cp"))
1420 (("/bin/mv") (which "mv")))
1421 #t))
1422 (add-before 'check 'fix-hotspot-tests
1423 (lambda _
1424 (with-directory-excursion "openjdk.src/hotspot/test/"
1425 (substitute* "jprt.config"
1426 (("PATH=\"\\$\\{path4sdk\\}\"")
1427 (string-append "PATH=" (getenv "PATH")))
1428 (("make=/usr/bin/make")
1429 (string-append "make=" (which "make"))))
1430 (substitute* '("runtime/6626217/Test6626217.sh"
1431 "runtime/7110720/Test7110720.sh")
1432 (("/bin/rm") (which "rm"))
1433 (("/bin/cp") (which "cp"))
1434 (("/bin/mv") (which "mv"))))
1435 #t))
1436 (add-before 'check 'fix-jdk-tests
1437 (lambda _
1438 (with-directory-excursion "openjdk.src/jdk/test/"
1439 (substitute* "com/sun/jdi/JdbReadTwiceTest.sh"
1440 (("/bin/pwd") (which "pwd")))
1441 (substitute* "com/sun/jdi/ShellScaffold.sh"
1442 (("/bin/kill") (which "kill")))
1443 (substitute* "start-Xvfb.sh"
1444 ;;(("/usr/bin/X11/Xvfb") (which "Xvfb"))
1445 (("/usr/bin/nohup") (which "nohup")))
1446 (substitute* "javax/security/auth/Subject/doAs/Test.sh"
1447 (("/bin/rm") (which "rm")))
1448 (substitute* "tools/launcher/MultipleJRE.sh"
1449 (("echo \"#!/bin/sh\"")
1450 (string-append "echo \"#!" (which "rm") "\""))
1451 (("/usr/bin/zip") (which "zip")))
1452 (substitute* "com/sun/jdi/OnThrowTest.java"
1453 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1454 (substitute* "java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java"
1455 (("/usr/bin/uptime") (which "uptime")))
1456 (substitute* "java/lang/ProcessBuilder/Basic.java"
1457 (("/usr/bin/env") (which "env"))
1458 (("/bin/false") (which "false"))
1459 (("/bin/true") (which "true"))
1460 (("/bin/cp") (which "cp"))
1461 (("/bin/sh") (which "sh")))
1462 (substitute* "java/lang/ProcessBuilder/FeelingLucky.java"
1463 (("/bin/sh") (which "sh")))
1464 (substitute* "java/lang/ProcessBuilder/Zombies.java"
1465 (("/usr/bin/perl") (which "perl"))
1466 (("/bin/ps") (which "ps"))
1467 (("/bin/true") (which "true")))
1468 (substitute* "java/lang/Runtime/exec/ConcurrentRead.java"
1469 (("/usr/bin/tee") (which "tee")))
1470 (substitute* "java/lang/Runtime/exec/ExecWithDir.java"
1471 (("/bin/true") (which "true")))
1472 (substitute* "java/lang/Runtime/exec/ExecWithInput.java"
1473 (("/bin/cat") (which "cat")))
1474 (substitute* "java/lang/Runtime/exec/ExitValue.java"
1475 (("/bin/sh") (which "sh"))
1476 (("/bin/true") (which "true"))
1477 (("/bin/kill") (which "kill")))
1478 (substitute* "java/lang/Runtime/exec/LotsOfDestroys.java"
1479 (("/usr/bin/echo") (which "echo")))
1480 (substitute* "java/lang/Runtime/exec/LotsOfOutput.java"
1481 (("/usr/bin/cat") (which "cat")))
1482 (substitute* "java/lang/Runtime/exec/SleepyCat.java"
1483 (("/bin/cat") (which "cat"))
1484 (("/bin/sleep") (which "sleep"))
1485 (("/bin/sh") (which "sh")))
1486 (substitute* "java/lang/Runtime/exec/StreamsSurviveDestroy.java"
1487 (("/bin/cat") (which "cat")))
1488 (substitute* "java/rmi/activation/CommandEnvironment/SetChildEnv.java"
1489 (("/bin/chmod") (which "chmod")))
1490 (substitute* "java/util/zip/ZipFile/Assortment.java"
1491 (("/bin/sh") (which "sh"))))
1492 #t))
1493 (replace 'check
1494 (lambda _
1495 ;; The "make check-*" targets always return zero, so we need to
1496 ;; check for errors in the associated log files to determine
1497 ;; whether any tests have failed.
1498 (use-modules (ice-9 rdelim))
1499 (let* ((error-pattern (make-regexp "^(Error|FAILED):.*"))
1500 (checker (lambda (port)
1501 (let loop ()
1502 (let ((line (read-line port)))
1503 (cond
1504 ((eof-object? line) #t)
2c8ac364
MW
1505 ((regexp-exec error-pattern line)
1506 (error "test failed"))
71053e14
RW
1507 (else (loop)))))))
1508 (run-test (lambda (test)
2c8ac364 1509 (invoke "make" test)
71053e14
RW
1510 (call-with-input-file
1511 (string-append "test/" test ".log")
1512 checker))))
2c8ac364
MW
1513 (when #f ; skip tests
1514 (run-test "check-hotspot")
1515 (run-test "check-langtools")
fa41a089
MW
1516 (run-test "check-jdk"))
1517 #t)))
71053e14
RW
1518 (replace 'install
1519 (lambda* (#:key outputs #:allow-other-keys)
1520 (let ((doc (string-append (assoc-ref outputs "doc")
1521 "/share/doc/icedtea"))
1522 (jre (assoc-ref outputs "out"))
1523 (jdk (assoc-ref outputs "jdk")))
1524 (copy-recursively "openjdk.build/docs" doc)
1525 (copy-recursively "openjdk.build/j2re-image" jre)
1526 (copy-recursively "openjdk.build/j2sdk-image" jdk))
1527 #t))
491dc2fb
RJ
1528 ;; Some of the libraries in the lib/amd64 folder link to libjvm.so.
1529 ;; But that shared object is located in the server/ folder, so it
1530 ;; cannot be found. This phase creates a symbolic link in the
1531 ;; lib/amd64 folder so that the other libraries can find it.
1532 ;;
1533 ;; See:
1534 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1535 ;;
1536 ;; FIXME: Find the bug in the build system, so that this symlink is
1537 ;; not needed.
1538 (add-after 'install 'install-libjvm
1539 (lambda* (#:key inputs outputs #:allow-other-keys)
1540 (let* ((lib-path (string-append (assoc-ref outputs "out")
d3e22bcc
LC
1541 ;; See 'INSTALL_ARCH_DIR' in
1542 ;; 'configure'.
1b6f99ea
RW
1543 ,(match (%current-system)
1544 ("i686-linux"
048d21a8 1545 "/lib/i386")
1b6f99ea 1546 ("x86_64-linux"
048d21a8 1547 "/lib/amd64")
d3e22bcc 1548 ("armhf-linux"
048d21a8 1549 "/lib/arm")
d3e22bcc 1550 ("aarch64-linux"
41763008
EF
1551 "/lib/aarch64")
1552 ;; We need a catch-all, dropping
1553 ;; '-linux' works in most cases.
1554 (_
1555 (string-append
1556 "/lib/"
1557 (string-drop-right
1558 (%current-system) 6)))))))
491dc2fb
RJ
1559 (symlink (string-append lib-path "/server/libjvm.so")
1560 (string-append lib-path "/libjvm.so")))
1561 #t))
71053e14
RW
1562 ;; By default IcedTea only generates an empty keystore. In order to
1563 ;; be able to use certificates in Java programs we need to generate a
1564 ;; keystore from a set of certificates. For convenience we use the
1565 ;; certificates from the nss-certs package.
1566 (add-after 'install 'install-keystore
1567 (lambda* (#:key inputs outputs #:allow-other-keys)
1568 (let* ((keystore "cacerts")
1569 (certs-dir (string-append (assoc-ref inputs "nss-certs")
1570 "/etc/ssl/certs"))
1571 (keytool (string-append (assoc-ref outputs "jdk")
1572 "/bin/keytool")))
1573 (define (extract-cert file target)
1574 (call-with-input-file file
1575 (lambda (in)
1576 (call-with-output-file target
1577 (lambda (out)
1578 (let loop ((line (read-line in 'concat))
1579 (copying? #f))
1580 (cond
1581 ((eof-object? line) #t)
1582 ((string-prefix? "-----BEGIN" line)
1583 (display line out)
1584 (loop (read-line in 'concat) #t))
1585 ((string-prefix? "-----END" line)
1586 (display line out)
1587 #t)
1588 (else
1589 (when copying? (display line out))
1590 (loop (read-line in 'concat) copying?)))))))))
1591 (define (import-cert cert)
1592 (format #t "Importing certificate ~a\n" (basename cert))
1593 (let ((temp "tmpcert"))
1594 (extract-cert cert temp)
1595 (let ((port (open-pipe* OPEN_WRITE keytool
1596 "-import"
1597 "-alias" (basename cert)
1598 "-keystore" keystore
1599 "-storepass" "changeit"
1600 "-file" temp)))
1601 (display "yes\n" port)
1602 (when (not (zero? (status:exit-val (close-pipe port))))
1603 (format #t "failed to import ~a\n" cert)))
1604 (delete-file temp)))
1605
1606 ;; This is necessary because the certificate directory contains
1607 ;; files with non-ASCII characters in their names.
1608 (setlocale LC_ALL "en_US.utf8")
1609 (setenv "LC_ALL" "en_US.utf8")
1610
1611 (for-each import-cert (find-files certs-dir "\\.pem$"))
1612 (mkdir-p (string-append (assoc-ref outputs "out")
1613 "/lib/security"))
1614 (mkdir-p (string-append (assoc-ref outputs "jdk")
1615 "/jre/lib/security"))
1616
1617 ;; The cacerts files we are going to overwrite are chmod'ed as
1618 ;; read-only (444) in icedtea-8 (which derives from this
1619 ;; package). We have to change this so we can overwrite them.
1620 (chmod (string-append (assoc-ref outputs "out")
1621 "/lib/security/" keystore) #o644)
1622 (chmod (string-append (assoc-ref outputs "jdk")
1623 "/jre/lib/security/" keystore) #o644)
1624
1625 (install-file keystore
1626 (string-append (assoc-ref outputs "out")
1627 "/lib/security"))
1628 (install-file keystore
1629 (string-append (assoc-ref outputs "jdk")
1630 "/jre/lib/security"))
1631 #t))))))
f6789047 1632 (native-inputs
d9148890 1633 `(("openjdk-src"
f6789047 1634 ,(drop "openjdk"
7f6485e7 1635 "0l34ikyf62hbzlf9032alzkkqvf7bpmckz4gvirvph755w7gka8l"))
f6789047
RW
1636 ("corba-drop"
1637 ,(drop "corba"
7f6485e7 1638 "050gv2jbg1pi6qkn8w18bwpbklfa5b0kymjvan9pncddbj8m84fz"))
f6789047
RW
1639 ("jaxp-drop"
1640 ,(drop "jaxp"
7f6485e7 1641 "1k6yldwnxfzdg5926r1nlfv8d1r1j7rlp2nkz6gqh05vgyamnfhl"))
f6789047
RW
1642 ("jaxws-drop"
1643 ,(drop "jaxws"
7f6485e7 1644 "110j7jlz47x2gg6f7653x12mssan5kvj9l9h1m1c8c92drfxbqyk"))
f6789047
RW
1645 ("jdk-drop"
1646 ,(drop "jdk"
7f6485e7 1647 "0d1mca38ksxvdskp9im3pp7fdijhj1n3lwq9w13r9s4v3qyskgdd"))
f6789047
RW
1648 ("langtools-drop"
1649 ,(drop "langtools"
7f6485e7 1650 "0nq5236fzxn3p6x8cgncl56mzcmsj07q9gymysnws4c8byc6n0qj"))
f6789047 1651 ("hotspot-drop"
db024183
GB
1652 ,(origin
1653 (method url-fetch)
1654 (uri (string-append
1655 "http://icedtea.classpath.org/downloads/drops"
1656 "/icedtea7/" version "/hotspot.tar.bz2"))
1657 (sha256
1658 (base32
1659 "17bdv39n4lh8l5737c96f3xgamx4y305m067p01cywgp7zaddqws"))
1660 (patches (search-patches
1661 "icedtea-7-hotspot-gcc-segfault-workaround.patch"))))
e2098e2d 1662 ("ant" ,ant-bootstrap)
71053e14 1663 ("attr" ,attr)
71053e14
RW
1664 ("coreutils" ,coreutils)
1665 ("diffutils" ,diffutils) ;for tests
1666 ("gawk" ,gawk)
1667 ("grep" ,grep)
1668 ("libtool" ,libtool)
1669 ("pkg-config" ,pkg-config)
1670 ("wget" ,wget)
1671 ("which" ,which)
1672 ("cpio" ,cpio)
1673 ("zip" ,zip)
1674 ("unzip" ,unzip)
1675 ("fastjar" ,fastjar)
1676 ("libxslt" ,libxslt) ;for xsltproc
1677 ("nss-certs" ,nss-certs)
1678 ("perl" ,perl)
1679 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
e2098e2d 1680 ("jdk" ,icedtea-6 "jdk")))
b711df02 1681 (inputs
71053e14
RW
1682 `(("alsa-lib" ,alsa-lib)
1683 ("cups" ,cups)
1684 ("libx11" ,libx11)
1685 ("libxcomposite" ,libxcomposite)
1686 ("libxt" ,libxt)
1687 ("libxtst" ,libxtst)
1688 ("libxi" ,libxi)
1689 ("libxinerama" ,libxinerama)
1690 ("libxrender" ,libxrender)
4bd428a7 1691 ("libjpeg" ,libjpeg-turbo)
71053e14
RW
1692 ("libpng" ,libpng)
1693 ("mit-krb5" ,mit-krb5)
1694 ("nss" ,nss)
1695 ("giflib" ,giflib)
1696 ("fontconfig" ,fontconfig)
1697 ("freetype" ,freetype)
1698 ("lcms" ,lcms)
1699 ("zlib" ,zlib)
1700 ("gtk" ,gtk+-2)))
1701 (home-page "http://icedtea.classpath.org")
1702 (synopsis "Java development kit")
1703 (description
1704 "This package provides the Java development kit OpenJDK built with the
1705IcedTea build harness.")
d3e22bcc
LC
1706
1707 ;; 'configure' lists "mips" and "mipsel", but not "mips64el'.
1708 (supported-systems (delete "mips64el-linux" %supported-systems))
1709
71053e14
RW
1710 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1711 ;; same license as both GNU Classpath and OpenJDK.
1712 (license license:gpl2+))))
d2540f80 1713
349a3147 1714(define-public icedtea-8
1d97d8ff 1715 (let* ((version "3.7.0")
349a3147
RW
1716 (drop (lambda (name hash)
1717 (origin
1718 (method url-fetch)
1719 (uri (string-append
db531f73 1720 "http://icedtea.classpath.org/download/drops"
349a3147
RW
1721 "/icedtea8/" version "/" name ".tar.xz"))
1722 (sha256 (base32 hash))))))
1723 (package (inherit icedtea-7)
1d97d8ff 1724 (version "3.7.0")
349a3147
RW
1725 (source (origin
1726 (method url-fetch)
1727 (uri (string-append
1728 "http://icedtea.wildebeest.org/download/source/icedtea-"
1729 version ".tar.xz"))
1730 (sha256
1731 (base32
1d97d8ff 1732 "09yqzn8rpccs7cyv89hhy5zlznpgqw5x3jz0w1ccp0cz1vgs8l5w"))
349a3147
RW
1733 (modules '((guix build utils)))
1734 (snippet
0c729ef4 1735 '(begin
f2785bd6
RW
1736 (substitute* '("configure"
1737 "acinclude.m4")
0c729ef4
RW
1738 ;; Do not embed build time
1739 (("(DIST_ID=\"Custom build).*$" _ prefix)
1740 (string-append prefix "\"\n"))
1741 ;; Do not leak information about the build host
1742 (("DIST_NAME=\"\\$build_os\"")
1743 "DIST_NAME=\"guix\""))
1744 #t))))
349a3147 1745 (arguments
f2785bd6
RW
1746 `(#:imported-modules
1747 ((guix build ant-build-system)
1748 (guix build syscalls)
1749 ,@%gnu-build-system-modules)
1750 ,@(substitute-keyword-arguments (package-arguments icedtea-7)
1751 ((#:modules modules)
1752 `((guix build utils)
1753 (guix build gnu-build-system)
1754 ((guix build ant-build-system) #:prefix ant:)
1755 (ice-9 match)
1756 (ice-9 popen)
1757 (srfi srfi-19)
1758 (srfi srfi-26)))
1759 ((#:configure-flags flags)
1760 `(let ((jdk (assoc-ref %build-inputs "jdk")))
1761 `( ;;"--disable-bootstrap"
1762 "--enable-bootstrap"
1763 "--enable-nss"
1764 "--disable-downloading"
1765 "--disable-system-pcsc"
1766 "--disable-system-sctp"
1767 "--disable-tests" ;they are run in the check phase instead
1768 "--with-openjdk-src-dir=./openjdk.src"
1769 ,(string-append "--with-jdk-home=" jdk))))
1770 ((#:phases phases)
1771 `(modify-phases ,phases
1772 (delete 'fix-x11-extension-include-path)
1773 (delete 'patch-paths)
1774 (delete 'set-additional-paths)
1775 (delete 'patch-patches)
6b7e09ae 1776 (delete 'patch-bitrot)
f2785bd6
RW
1777 ;; Prevent the keytool from recording the current time when
1778 ;; adding certificates at build time.
1779 (add-after 'unpack 'patch-keystore
1780 (lambda _
1781 (substitute* "openjdk.src/jdk/src/share/classes/sun/security/provider/JavaKeyStore.java"
1782 (("date = new Date\\(\\);")
1783 "\
1784date = (System.getenv(\"SOURCE_DATE_EPOCH\") != null) ?\
1785new Date(Long.parseLong(System.getenv(\"SOURCE_DATE_EPOCH\"))) :\
1786new Date();"))
1787 #t))
1788 (add-after 'unpack 'patch-jni-libs
1789 ;; Hardcode dynamically loaded libraries.
1790 (lambda _
1791 (let* ((library-path (search-path-as-string->list
1792 (getenv "LIBRARY_PATH")))
1793 (find-library (lambda (name)
1794 (search-path
1795 library-path
1796 (string-append "lib" name ".so")))))
1797 (for-each
1798 (lambda (file)
1799 (catch 'decoding-error
1800 (lambda ()
1801 (substitute* file
1802 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
1803 _ name version)
1804 (format #f "\"~a\"" (find-library name)))
1805 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
1806 (format #f "\"~a\"" (find-library name)))))
1807 (lambda _
1808 ;; Those are safe to skip.
1809 (format (current-error-port)
1810 "warning: failed to substitute: ~a~%"
1811 file))))
1812 (find-files "openjdk.src/jdk/src/solaris/native"
1813 "\\.c|\\.h"))
1814 #t)))
1815 (replace 'install
1816 (lambda* (#:key outputs #:allow-other-keys)
1817 (let ((doc (string-append (assoc-ref outputs "doc")
1818 "/share/doc/icedtea"))
1819 (jre (assoc-ref outputs "out"))
1820 (jdk (assoc-ref outputs "jdk")))
1821 (copy-recursively "openjdk.build/docs" doc)
1822 (copy-recursively "openjdk.build/images/j2re-image" jre)
1823 (copy-recursively "openjdk.build/images/j2sdk-image" jdk)
1824 ;; Install the nss.cfg file to JRE to enable SSL/TLS
1825 ;; support via NSS.
1826 (copy-file (string-append jdk "/jre/lib/security/nss.cfg")
1827 (string-append jre "/lib/security/nss.cfg"))
1828 #t)))
1829 (add-after 'install 'strip-jar-timestamps
1830 (assoc-ref ant:%standard-phases 'strip-jar-timestamps)))))))
349a3147
RW
1831 (native-inputs
1832 `(("jdk" ,icedtea-7 "jdk")
1833 ("openjdk-src"
1834 ,(drop "openjdk"
1d97d8ff 1835 "1mj6xgmw31i6qd30qi9dmv7160fbcfq5ikz1jwjihdg2793il19p"))
12eecbf0
LF
1836 ("aarch32-drop"
1837 ,(drop "aarch32"
1d97d8ff 1838 "1wb8k5zm40zld0986dvmlh5xh3gyixbg9h26sl662zy92amhmyyg"))
349a3147
RW
1839 ("corba-drop"
1840 ,(drop "corba"
1d97d8ff 1841 "11ma4zz0599cy70xd219v7a8vin7p96xrhhz3wsaw6cjhkzpagah"))
349a3147
RW
1842 ("jaxp-drop"
1843 ,(drop "jaxp"
1d97d8ff 1844 "14m1y0z0fbm5z5zjw3vnq85py8dma84bi3f9cw8rhdyc6skk8q4i"))
349a3147
RW
1845 ("jaxws-drop"
1846 ,(drop "jaxws"
1d97d8ff 1847 "09andnm6xaasnp963hgx42yiflifiljp9z7z85jrfyc5z8a5whmf"))
349a3147
RW
1848 ("jdk-drop"
1849 ,(drop "jdk"
1d97d8ff 1850 "0s6lcpc0zckz2fnq98aqf28nz9y3wbi41a3kyaqqa2abwbkm1zwl"))
349a3147
RW
1851 ("langtools-drop"
1852 ,(drop "langtools"
1d97d8ff 1853 "15wizy123vhk40chl1b4p552jf2pw2hdww0myf11qab425axz4nw"))
349a3147 1854 ("hotspot-drop"
673135df
GB
1855 ,(origin
1856 (method url-fetch)
1857 (uri (string-append
1858 "http://icedtea.classpath.org/download/drops"
1859 "/icedtea8/" version "/hotspot.tar.xz"))
1860 (sha256
1861 (base32
1862 "1ciz1w9j0kz7s1dxdhyqq71nla9icyz6qvn0b9z2zgkklqa98qmm"))
1863 (patches (search-patches
1864 "icedtea-7-hotspot-gcc-segfault-workaround.patch"))))
349a3147
RW
1865 ("nashorn-drop"
1866 ,(drop "nashorn"
1d97d8ff 1867 "19pzl3ppaw8j6r5cnyp8qiw3hxijh3hdc46l39g5yfhdl4pr4hpa"))
fd34d4f4
LF
1868 ("shenandoah-drop"
1869 ,(drop "shenandoah"
1d97d8ff 1870 "0k33anxdzw1icn072wynfmmdjhsv50hay0j1sfkfxny12rb3vgdy"))
349a3147 1871 ,@(fold alist-delete (package-native-inputs icedtea-7)
e2098e2d 1872 '("jdk" "openjdk-src" "corba-drop" "jaxp-drop" "jaxws-drop"
349a3147
RW
1873 "jdk-drop" "langtools-drop" "hotspot-drop")))))))
1874
dd741059
JL
1875(define-public openjdk9
1876 (package
1877 (name "openjdk")
1878 (version "9.181")
1879 (source (origin
1880 (method url-fetch)
1881 (uri "https://hg.openjdk.java.net/jdk/jdk/archive/3cc80be736f2.tar.bz2")
1882 (file-name (string-append name "-" version ".tar.bz2"))
1883 (sha256
1884 (base32
1885 "01ihmyf7k5z17wbr7xig7y40l9f01d5zjgkcmawn1102hw5kchpq"))
1886 (modules '((guix build utils)))
1887 (snippet
1888 `(begin
b7a1cac6
RW
1889 (for-each delete-file
1890 (find-files "." ".*.(bin|exe|jar)$"))
dd741059
JL
1891 #t))))
1892 (build-system gnu-build-system)
1893 (outputs '("out" "jdk" "doc"))
1894 (arguments
1895 `(#:tests? #f; require jtreg
f5789c26 1896 #:make-flags '("all")
dd741059
JL
1897 #:imported-modules
1898 ((guix build syscalls)
1899 ,@%gnu-build-system-modules)
1900 #:phases
1901 (modify-phases %standard-phases
1902 (add-after 'patch-source-shebangs 'fix-java-shebangs
1903 (lambda _
1904 ;; This file was "fixed" by patch-source-shebangs, but it requires
1905 ;; this exact first line.
1906 (substitute* "jdk/make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1907 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
1908 #t))
1909 (replace 'configure
1910 (lambda* (#:key inputs outputs #:allow-other-keys)
1911 ;; TODO: unbundle libpng and lcms
1912 (invoke "bash" "./configure"
1913 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
1914 "--disable-freetype-bundling"
1915 "--disable-warnings-as-errors"
1916 "--disable-hotspot-gtest"
1917 "--with-giflib=system"
1918 "--with-libjpeg=system"
1919 (string-append "--prefix=" (assoc-ref outputs "out")))
1920 #t))
f5789c26 1921 (add-before 'build 'write-source-revision-file
dd741059
JL
1922 (lambda _
1923 (with-output-to-file ".src-rev"
1924 (lambda _
1925 (display ,version)))
dd741059 1926 #t))
f5789c26
RW
1927 (replace 'build
1928 (lambda* (#:key make-flags parallel-build? #:allow-other-keys)
1929 (apply invoke "make"
1930 `(,@(if parallel-build?
1931 (list (string-append "JOBS="
1932 (number->string (parallel-job-count))))
1933 '())
1934 ,@make-flags))))
dd741059
JL
1935 ;; Some of the libraries in the lib/ folder link to libjvm.so.
1936 ;; But that shared object is located in the server/ folder, so it
1937 ;; cannot be found. This phase creates a symbolic link in the
1938 ;; lib/ folder so that the other libraries can find it.
1939 ;;
1940 ;; See:
1941 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1942 ;;
1943 ;; FIXME: Find the bug in the build system, so that this symlink is
1944 ;; not needed.
1945 (add-after 'install 'install-libjvm
1946 (lambda* (#:key inputs outputs #:allow-other-keys)
1947 (let* ((lib-out (string-append (assoc-ref outputs "out")
1948 "/lib"))
1949 (lib-jdk (string-append (assoc-ref outputs "jdk")
1950 "/lib")))
1951 (symlink (string-append lib-jdk "/server/libjvm.so")
1952 (string-append lib-jdk "/libjvm.so"))
1953 (symlink (string-append lib-out "/server/libjvm.so")
1954 (string-append lib-out "/libjvm.so")))
1955 #t))
1956 (replace 'install
1957 (lambda* (#:key outputs #:allow-other-keys)
1958 (let ((out (assoc-ref outputs "out"))
1959 (jdk (assoc-ref outputs "jdk"))
1960 (doc (assoc-ref outputs "doc"))
1961 (images (car (find-files "build" ".*-server-release"
1962 #:directories? #t))))
1963 (copy-recursively (string-append images "/images/jdk") jdk)
1964 (copy-recursively (string-append images "/images/jre") out)
1965 (copy-recursively (string-append images "/images/docs") doc))
1966 #t))
1967 (add-after 'install 'strip-zip-timestamps
1968 (lambda* (#:key outputs #:allow-other-keys)
1969 (use-modules (guix build syscalls))
1970 (for-each (lambda (zip)
1971 (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
1972 (with-directory-excursion dir
1973 (invoke "unzip" zip))
1974 (delete-file zip)
1975 (for-each (lambda (file)
1976 (let ((s (lstat file)))
1977 (unless (eq? (stat:type s) 'symlink)
1978 (format #t "reset ~a~%" file)
1979 (utime file 0 0 0 0))))
1980 (find-files dir #:directories? #t))
1981 (with-directory-excursion dir
1982 (let ((files (find-files "." ".*" #:directories? #t)))
1983 (apply invoke "zip" "-0" "-X" zip files)))))
1984 (find-files (assoc-ref outputs "doc") ".*.zip$"))
1985 #t)))))
1986 (inputs
1987 `(("alsa-lib" ,alsa-lib)
1988 ("cups" ,cups)
1989 ("fontconfig" ,fontconfig)
1990 ("freetype" ,freetype)
1991 ("giflib" ,giflib)
1992 ("lcms" ,lcms)
1993 ("libelf" ,libelf)
4bd428a7 1994 ("libjpeg" ,libjpeg-turbo)
dd741059
JL
1995 ("libice" ,libice)
1996 ("libpng" ,libpng)
1997 ("libx11" ,libx11)
1998 ("libxcomposite" ,libxcomposite)
1999 ("libxi" ,libxi)
2000 ("libxinerama" ,libxinerama)
2001 ("libxrender" ,libxrender)
2002 ("libxt" ,libxt)
2003 ("libxtst" ,libxtst)))
2004 (native-inputs
2005 `(("icedtea-8" ,icedtea-8)
2006 ("icedtea-8:jdk" ,icedtea-8 "jdk")
f5789c26 2007 ;; XXX: The build system fails with newer versions of GNU Make.
5fd0c288 2008 ("make@4.2" ,gnu-make-4.2)
dd741059
JL
2009 ("unzip" ,unzip)
2010 ("which" ,which)
2011 ("zip" ,zip)))
2012 (home-page "https://openjdk.java.net/projects/jdk9/")
2013 (synopsis "Java development kit")
2014 (description
2015 "This package provides the Java development kit OpenJDK.")
2016 (license license:gpl2+)))
2017
16b89ecc
JL
2018(define-public openjdk10
2019 (package
2020 (inherit openjdk9)
2021 (name "openjdk")
2022 (version "10.46")
2023 (source (origin
2024 (method url-fetch)
2025 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/6fa770f9f8ab.tar.bz2")
2026 (file-name (string-append name "-" version ".tar.bz2"))
2027 (sha256
2028 (base32
2029 "0zywq2203b4hx4jms9vbwvjcj1d3k2v3qpx4s33729fkpmid97r4"))
accb5c31
GB
2030 (patches (search-patches
2031 "openjdk-10-idlj-reproducibility.patch"))
16b89ecc
JL
2032 (modules '((guix build utils)))
2033 (snippet
2034 `(begin
49ad6aec 2035 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
16b89ecc
JL
2036 #t))))
2037 (arguments
2038 (substitute-keyword-arguments (package-arguments openjdk9)
2039 ((#:phases phases)
2040 `(modify-phases ,phases
2041 (replace 'fix-java-shebangs
2042 (lambda _
2043 ;; This file was "fixed" by patch-source-shebangs, but it requires
2044 ;; this exact first line.
2045 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
2046 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
2047 #t))
2048 (replace 'configure
2049 (lambda* (#:key inputs outputs #:allow-other-keys)
2050 (invoke "bash" "./configure"
2051 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
2052 "--disable-freetype-bundling"
2053 "--disable-warnings-as-errors"
2054 "--disable-hotspot-gtest"
2055 "--with-giflib=system"
2056 "--with-libjpeg=system"
2057 "--with-native-debug-symbols=zipped"
2058 (string-append "--prefix=" (assoc-ref outputs "out")))
2059 #t))))))
2060 (native-inputs
2061 `(("openjdk9" ,openjdk9)
2062 ("openjdk9:jdk" ,openjdk9 "jdk")
5fd0c288 2063 ("make@4.2" ,gnu-make-4.2)
16b89ecc
JL
2064 ("unzip" ,unzip)
2065 ("which" ,which)
2066 ("zip" ,zip)))))
2067
95bc85b7
GB
2068(define-public openjdk11
2069 (package
2070 (name "openjdk")
2071 (version "11.28")
2072 (source (origin
2073 (method url-fetch)
2074 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/76072a077ee1.tar.bz2")
2075 (file-name (string-append name "-" version ".tar.bz2"))
2076 (sha256
2077 (base32
2078 "0v705w1s9lrqalzahir78pk397rkk9gfvzq821yv8h3xha0bqi6w"))
2079 (modules '((guix build utils)))
2080 (snippet
2081 `(begin
62d46ad6 2082 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
95bc85b7
GB
2083 #t))))
2084 (build-system gnu-build-system)
2085 (outputs '("out" "jdk" "doc"))
2086 (arguments
2087 `(#:imported-modules
2088 ((guix build syscalls)
2089 (ice-9 binary-ports)
2090 (rnrs bytevectors)
2091 ,@%gnu-build-system-modules)
2092 #:tests? #f; requires jtreg
2093 ;; TODO package jtreg
95bc85b7
GB
2094 #:configure-flags
2095 `("--disable-option-checking" ; --enable-fast-install default flag errors otherwise
2096 "--disable-warnings-as-errors"
2097 ;; make validate-runpath pass, see: http://issues.guix.info/issue/32894
2098 "--with-native-debug-symbols=zipped"
2099 ;; do not use the bundled libraries
2100 "--with-giflib=system"
2101 "--with-lcms=system"
2102 "--with-libjpeg=system"
2103 "--with-libpng=system"
70d23edf 2104 "--with-version-pre="
95bc85b7
GB
2105 ;; allow the build system to locate the system freetype
2106 ,(string-append "--with-freetype-include="
2107 (assoc-ref %build-inputs "freetype") "/include")
2108 ,(string-append "--with-freetype-lib="
2109 (assoc-ref %build-inputs "freetype") "/lib"))
95bc85b7
GB
2110 #:phases
2111 (modify-phases %standard-phases
2112 (add-after 'patch-source-shebangs 'fix-java-shebangs
2113 (lambda _
2114 ;; This file was "fixed" by patch-source-shebangs, but it requires
2115 ;; this exact first line.
2116 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
2117 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
2118 #t))
7b82e1cd 2119 (add-before 'build 'write-source-revision-file
95bc85b7
GB
2120 (lambda _
2121 (with-output-to-file ".src-rev"
2122 (lambda _
2123 (display ,version)))
95bc85b7 2124 #t))
7b82e1cd
RW
2125 (replace 'build
2126 (lambda* (#:key parallel-build? make-flags #:allow-other-keys)
2127 (apply invoke "make" "all"
2128 `(,@(if parallel-build?
2129 (list (string-append "JOBS="
2130 (number->string (parallel-job-count))))
2131 '())
2132 ,@make-flags))))
95bc85b7
GB
2133 ;; jdk 11 does not build jre by default any more
2134 ;; building it anyways
2135 ;; for further information see:
2136 ;; https://github.com/AdoptOpenJDK/openjdk-build/issues/356
2137 (add-after 'build 'build-jre
7b82e1cd
RW
2138 (lambda* (#:key parallel-build? make-flags #:allow-other-keys)
2139 (apply invoke "make" "legacy-jre-image"
2140 `(,@(if parallel-build?
2141 (list (string-append "JOBS="
2142 (number->string (parallel-job-count))))
2143 '())
2144 ,@make-flags))))
95bc85b7
GB
2145 (replace 'install
2146 (lambda* (#:key outputs #:allow-other-keys)
2147 (let ((out (assoc-ref outputs "out"))
2148 (jdk (assoc-ref outputs "jdk"))
2149 (doc (assoc-ref outputs "doc"))
2150 (images (car (find-files "build" ".*-server-release"
2151 #:directories? #t))))
2152 (copy-recursively (string-append images "/images/jdk") jdk)
2153 (copy-recursively (string-append images "/images/jre") out)
2154 (copy-recursively (string-append images "/images/docs") doc))
2155 #t))
2156 ;; Some of the libraries in the lib/ folder link to libjvm.so.
2157 ;; But that shared object is located in the server/ folder, so it
2158 ;; cannot be found. This phase creates a symbolic link in the
2159 ;; lib/ folder so that the other libraries can find it.
2160 ;;
2161 ;; See:
2162 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
2163 ;;
2164 ;; FIXME: Find the bug in the build system, so that this symlink is
2165 ;; not needed.
2166 (add-after 'install 'install-libjvm
2167 (lambda* (#:key inputs outputs #:allow-other-keys)
2168 (let* ((lib-out (string-append (assoc-ref outputs "out")
2169 "/lib"))
2170 (lib-jdk (string-append (assoc-ref outputs "jdk")
2171 "/lib")))
2172 (symlink (string-append lib-jdk "/server/libjvm.so")
2173 (string-append lib-jdk "/libjvm.so"))
2174 (symlink (string-append lib-out "/server/libjvm.so")
2175 (string-append lib-out "/libjvm.so")))
2176 #t))
2177 (add-after 'install 'strip-character-data-timestamps
2178 (lambda* (#:key outputs #:allow-other-keys)
2179 (use-modules (guix build syscalls))
2180 (let ((archive (string-append
2181 (assoc-ref outputs "jdk") "/lib/src.zip"))
2182 (dir (mkdtemp! "zip-contents.XXXXXX")))
2183 (with-directory-excursion dir
2184 (invoke "unzip" archive))
2185 (delete-file archive)
2186 (with-directory-excursion dir
2187 (let ((char-data-files (find-files "." "CharacterData.*")))
2188 (for-each (lambda (file)
2189 (substitute* file
2190 (((string-append "This file was generated "
2191 "AUTOMATICALLY from a template "
2192 "file.*"))
2193 (string-append "This file was generated "
2194 "AUTOMATICALLY from a template "
2195 "file"))))
2196 char-data-files)))
2197 (with-directory-excursion dir
2198 (let ((files (find-files "." ".*" #:directories? #t)))
2199 (apply invoke "zip" "-0" "-X" archive files))))))
2200 (add-after 'strip-character-data-timestamps 'strip-archive-timestamps
2201 (lambda* (#:key outputs #:allow-other-keys)
2202 (use-modules (guix build syscalls)
2203 (ice-9 binary-ports)
2204 (rnrs bytevectors))
2205 (letrec ((repack-archive
2206 (lambda (archive)
2207 (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
2208 (with-directory-excursion dir
2209 (invoke "unzip" archive))
2210 (delete-file archive)
2211 (for-each (compose repack-archive canonicalize-path)
2212 (find-files dir "(ct.sym|.*.jar)$"))
2213 (let ((reset-file-timestamp
2214 (lambda (file)
2215 (let ((s (lstat file)))
2216 (unless (eq? (stat:type s) 'symlink)
2217 (format #t "reset ~a~%" file)
2218 (utime file 0 0 0 0))))))
2219 (for-each reset-file-timestamp
2220 (find-files dir #:directories? #t)))
2221 (with-directory-excursion dir
2222 (let ((files (find-files "." ".*" #:directories? #t)))
2223 (apply invoke "zip" "-0" "-X" archive files)))))))
2224 (for-each repack-archive
2225 (find-files (assoc-ref outputs "doc") ".*.zip$"))
2226 (for-each repack-archive
2227 (find-files (assoc-ref outputs "jdk")
2228 ".*.(zip|jar|diz)$"))
2229 (repack-archive (string-append (assoc-ref outputs "jdk") "/lib/ct.sym"))
2230 (let ((repack-jmod
2231 (lambda (file-name)
2232 (call-with-input-file file-name
2233 (lambda (file)
2234 (let ((header #vu8(#x4a #x4d #x01 #x00)))
2235 (if (equal? (get-bytevector-n
2236 file (bytevector-length header))
2237 header)
2238 (let* ((header-length (bytevector-length header))
2239 (temp-file (mkstemp!
2240 (string-copy
2241 "temp-file.XXXXXX")))
2242 (temp-filename (port-filename temp-file))
2243 (content-length
2244 (- (stat:size (stat file))
2245 header-length)))
2246 (sendfile temp-file file content-length header-length)
2247 (delete-file file-name)
2248 (close-port temp-file)
2249 (repack-archive (canonicalize-path temp-filename))
2250 (call-with-output-file file-name
2251 (lambda (file)
2252 (put-bytevector file header)
2253 (call-with-input-file temp-filename
2254 (lambda (temp-file)
2255 (sendfile
2256 file temp-file
2257 (stat:size (stat temp-file)) 0)))))))))))))
2258 (for-each repack-jmod
2259 (find-files (assoc-ref outputs "jdk") ".*.jmod$")))
2260 #t)))
2261 (add-after 'install 'remove-timestamp-from-api-summary
2262 (lambda* (#:key outputs #:allow-other-keys)
2263 (substitute* (string-append (assoc-ref outputs "doc")
2264 "/api/overview-summary.html")
2265 (("Generated by javadoc \\(11-internal\\).*$")
2266 "Generated by javadoc (11-internal) -->\n"))
2267 #t)))))
2268 (inputs
2269 `(("alsa-lib" ,alsa-lib)
2270 ("cups" ,cups)
2271 ("fontconfig" ,fontconfig)
2272 ("freetype" ,freetype)
2273 ("giflib" ,giflib)
2274 ("lcms" ,lcms)
4bd428a7 2275 ("libjpeg" ,libjpeg-turbo)
95bc85b7
GB
2276 ("libpng" ,libpng)
2277 ("libx11" ,libx11)
2278 ("libxext" ,libxext)
2279 ("libxrender" ,libxrender)
2280 ("libxt" ,libxt)
2281 ("libxtst" ,libxtst)))
2282 (native-inputs
2283 `(("autoconf" ,autoconf)
2284 ("openjdk10" ,openjdk10)
2285 ("openjdk10:jdk" ,openjdk10 "jdk")
5fd0c288 2286 ("make" ,gnu-make-4.2)
95bc85b7
GB
2287 ("pkg-config" ,pkg-config)
2288 ("unzip" ,unzip)
2289 ("which" ,which)
2290 ("zip" ,zip)))
2291 (home-page "https://openjdk.java.net/projects/jdk/11/")
2292 (synopsis "Java development kit")
2293 (description
2294 "This package provides the Java development kit OpenJDK.")
2295 (license license:gpl2+)))
2296
64dc8e9e
GB
2297(define-public openjdk12
2298 (package
2299 (inherit openjdk11)
2300 (name "openjdk")
2301 (version "12.33")
2302 (source (origin
2303 (method url-fetch)
2304 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/0276cba45aac.tar.bz2")
2305 (file-name (string-append name "-" version ".tar.bz2"))
2306 (sha256
2307 (base32
2308 "0mbhdrk12b6878kby0flnbak7444dlpm0ihlmf92vk59y1c02bc2"))
2309 (modules '((guix build utils)))
2310 (snippet
2311 `(begin
c7c9370d 2312 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
64dc8e9e
GB
2313 #t))))
2314 (inputs
2315 `(("alsa-lib" ,alsa-lib)
2316 ("cups" ,cups)
2317 ("fontconfig" ,fontconfig)
2318 ("freetype" ,freetype)
2319 ("giflib" ,giflib)
2320 ("lcms" ,lcms)
4bd428a7 2321 ("libjpeg" ,libjpeg-turbo)
64dc8e9e
GB
2322 ("libpng" ,libpng)
2323 ("libx11" ,libx11)
2324 ("libxext" ,libxext)
2325 ("libxrandr" ,libxrandr)
2326 ("libxrender" ,libxrender)
2327 ("libxt" ,libxt)
2328 ("libxtst" ,libxtst)))
2329 (native-inputs
2330 `(("autoconf" ,autoconf)
2331 ("openjdk11" ,openjdk11)
2332 ("openjdk11:jdk" ,openjdk11 "jdk")
5fd0c288 2333 ("make@4.2" ,gnu-make-4.2)
64dc8e9e
GB
2334 ("pkg-config" ,pkg-config)
2335 ("unzip" ,unzip)
2336 ("which" ,which)
2337 ("zip" ,zip)))
2338 (home-page "https://openjdk.java.net/projects/jdk/12")))
2339
c4618174
NZ
2340(define-public openjdk13
2341 (package
2342 (inherit openjdk12)
2343 (name "openjdk")
2344 (version "13.0")
2345 (source (origin
2346 (method url-fetch)
2347 (uri "http://hg.openjdk.java.net/jdk/jdk13/archive/9c250a7600e1.tar.bz2")
2348 (file-name (string-append name "-" version ".tar.bz2"))
2349 (sha256
2350 (base32
2351 "0v0ljvx5dyzp96dw4z4ksw3pvasil7783mgnmd1wk9gads5ab8iq"))
2352 (modules '((guix build utils)))
2353 (snippet
2354 `(begin
2355 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2356 #t))))
2357 (inputs
2358 `(("alsa-lib" ,alsa-lib)
2359 ("cups" ,cups)
2360 ("fontconfig" ,fontconfig)
2361 ("freetype" ,freetype)
2362 ("giflib" ,giflib)
2363 ("lcms" ,lcms)
2364 ("libjpeg" ,libjpeg-turbo)
2365 ("libpng" ,libpng)
2366 ("libx11" ,libx11)
2367 ("libxext" ,libxext)
2368 ("libxrandr" ,libxrandr)
2369 ("libxrender" ,libxrender)
2370 ("libxt" ,libxt)
2371 ("libxtst" ,libxtst)))
2372 (native-inputs
2373 `(("autoconf" ,autoconf)
2374 ("openjdk12:jdk" ,openjdk12 "jdk")
2375 ("make@4.2" ,gnu-make-4.2)
2376 ("pkg-config" ,pkg-config)
2377 ("unzip" ,unzip)
2378 ("which" ,which)
2379 ("zip" ,zip)))
2380 (home-page "https://openjdk.java.net/projects/jdk/13")))
2381
65a11a59
NZ
2382(define-public openjdk14
2383 (package
2384 (inherit openjdk13)
2385 (name "openjdk")
2386 (version "14.0")
2387 (source (origin
2388 (method url-fetch)
2389 (uri "http://hg.openjdk.java.net/jdk/jdk14/archive/bc54620a3848.tar.bz2")
2390 (file-name (string-append name "-" version ".tar.bz2"))
2391 (sha256
2392 (base32
2393 "0z485pk7r1xpw8004g4nrwrzj17sabgx8yfdbxwfvzkjp8qyajch"))
2394 (modules '((guix build utils)))
2395 (snippet
2396 `(begin
2397 ;; The m4 macro uses 'help' to search for builtins, which is
2398 ;; not available in bash-minimal
2399 (substitute* "make/autoconf/basics.m4"
2400 (("if help") "if command -v"))
2401 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2402 #t))))
2403 (inputs
2404 `(("alsa-lib" ,alsa-lib)
2405 ("cups" ,cups)
2406 ("fontconfig" ,fontconfig)
2407 ("freetype" ,freetype)
2408 ("giflib" ,giflib)
2409 ("lcms" ,lcms)
2410 ("libjpeg" ,libjpeg-turbo)
2411 ("libpng" ,libpng)
2412 ("libx11" ,libx11)
2413 ("libxext" ,libxext)
2414 ("libxrandr" ,libxrandr)
2415 ("libxrender" ,libxrender)
2416 ("libxt" ,libxt)
2417 ("libxtst" ,libxtst)))
2418 (native-inputs
2419 `(("autoconf" ,autoconf)
2420 ("make@4.2" ,gnu-make-4.2)
2421 ("openjdk13:jdk" ,openjdk13 "jdk")
2422 ("pkg-config" ,pkg-config)
2423 ("unzip" ,unzip)
2424 ("which" ,which)
2425 ("zip" ,zip)))
2426 (home-page "https://openjdk.java.net/projects/jdk/14")))
2427
33aa65e0 2428(define-public icedtea icedtea-8)
068e476f 2429
5490480c 2430\f
8bbd0408
RW
2431(define-public ant/java8
2432 (package (inherit ant-bootstrap)
2433 (name "ant")
00848717 2434 (version "1.10.8")
8bbd0408
RW
2435 (source (origin
2436 (method url-fetch)
2437 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2438 version "-src.tar.gz"))
2439 (sha256
2440 (base32
00848717 2441 "066k2isig5xm70cihj9p73hkp5w7h5zbfqz5kxb6cwr9cb86xl2k"))
8bbd0408
RW
2442 (modules '((guix build utils)))
2443 (snippet
2444 '(begin
2445 (for-each delete-file
2446 (find-files "lib/optional" "\\.jar$"))
2447 #t))))
2448 (arguments
2449 (substitute-keyword-arguments (package-arguments ant-bootstrap)
2450 ((#:phases phases)
2451 `(modify-phases ,phases
2452 (add-after 'unpack 'remove-scripts
2453 ;; Remove bat / cmd scripts for DOS as well as the antRun and runant
2454 ;; wrappers.
2455 (lambda _
2456 (for-each delete-file
2457 (find-files "src/script"
2458 "(.*\\.(bat|cmd)|runant.*|antRun.*)"))
2459 #t))
2460 (replace 'build
2461 (lambda* (#:key inputs outputs #:allow-other-keys)
2462 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
2463
2464 ;; Disable tests to avoid dependency on hamcrest-core, which needs
2465 ;; Ant to build. This is necessary in addition to disabling the
2466 ;; "check" phase, because the dependency on "test-jar" would always
2467 ;; result in the tests to be run.
2468 (substitute* "build.xml"
00848717 2469 (("depends=\"jars,test-jar") "depends=\"jars"))
2c8ac364
MW
2470 (invoke "bash" "bootstrap.sh"
2471 (string-append "-Ddist.dir="
2472 (assoc-ref outputs "out")))))))))
8bbd0408 2473 (native-inputs
1c7ef07e
GB
2474 `(("jdk" ,icedtea-8 "jdk")
2475 ("zip" ,zip)
2476 ("unzip" ,unzip)))))
8bbd0408 2477
e441fc56
RW
2478;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x series
2479;; requires Java 8.
2480(define-public ant
2481 (package (inherit ant/java8)
2039cf37 2482 (version "1.9.15")
e441fc56
RW
2483 (source (origin
2484 (method url-fetch)
2485 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2486 version "-src.tar.gz"))
2487 (sha256
2488 (base32
2039cf37 2489 "1xy30f1w5gaqk6g3f0vw7ygix4rb6032qkcw42y4z8wd9jihgygd"))))
e441fc56 2490 (native-inputs
3b6ba18b
GB
2491 `(("jdk" ,icedtea-7 "jdk")
2492 ("zip" ,zip)
2493 ("unzip" ,unzip)))))
e441fc56 2494
9ce7ac99
RW
2495(define-public ant-apache-bcel
2496 (package
2497 (inherit ant/java8)
2498 (name "ant-apache-bcel")
2499 (arguments
2500 (substitute-keyword-arguments (package-arguments ant/java8)
2501 ((#:phases phases)
2502 `(modify-phases ,phases
2503 (add-after 'unpack 'link-bcel
2504 (lambda* (#:key inputs #:allow-other-keys)
2505 (for-each (lambda (file)
2506 (symlink file
2507 (string-append "lib/optional/"
2508 (basename file))))
2509 (find-files (assoc-ref inputs "java-commons-bcel")
2510 "\\.jar$"))
2511 #t))
2512 (add-after 'build 'install
2513 (lambda* (#:key outputs #:allow-other-keys)
2514 (let* ((out (assoc-ref outputs "out"))
2515 (share (string-append out "/share/java"))
2516 (bin (string-append out "/bin"))
2517 (lib (string-append out "/lib")))
2518 (mkdir-p share)
2519 (install-file (string-append lib "/ant-apache-bcel.jar") share)
2520 (delete-file-recursively bin)
2521 (delete-file-recursively lib)
2522 #t)))))))
2523 (inputs
2524 `(("java-commons-bcel" ,java-commons-bcel)
2525 ,@(package-inputs ant/java8)))))
2526
fa6c4213
RW
2527(define-public ant-junit
2528 (package
2529 (inherit ant/java8)
2530 (name "ant-junit")
2531 (arguments
2532 (substitute-keyword-arguments (package-arguments ant/java8)
2533 ((#:phases phases)
2534 `(modify-phases ,phases
2535 (add-after 'unpack 'link-junit
2536 (lambda* (#:key inputs #:allow-other-keys)
2537 (for-each (lambda (file)
2538 (symlink file
2539 (string-append "lib/optional/"
2540 (basename file))))
2541 (find-files (assoc-ref inputs "java-junit")
2542 "\\.jar$"))
2543 #t))
2544 (add-after 'build 'install
2545 (lambda* (#:key outputs #:allow-other-keys)
2546 (let* ((out (assoc-ref outputs "out"))
2547 (share (string-append out "/share/java"))
2548 (bin (string-append out "/bin"))
2549 (lib (string-append out "/lib")))
2550 (mkdir-p share)
2551 (install-file (string-append lib "/ant-junit.jar") share)
2552 (delete-file-recursively bin)
2553 (delete-file-recursively lib)
2554 #t)))))))
2555 (inputs
2556 `(("java-junit" ,java-junit)
2557 ,@(package-inputs ant/java8)))))
2558
7214fbd2
JL
2559(define-public java-openjfx-build
2560 (package
2561 (name "java-openjfx-build")
2562 ;; This is a java-8 version
2563 (version "8.202")
2564 (source (origin
2565 (method hg-fetch)
2566 (uri (hg-reference
c19293ad
AA
2567 (url "http://hg.openjdk.java.net/openjfx/8u-dev/rt")
2568 (changeset (string-append
2569 (string-join (string-split version #\.) "u")
2570 "-ga"))))
7214fbd2 2571 (file-name (string-append name "-" version "-checkout"))
2c2b1ef8
BH
2572 (modules '((guix build utils)))
2573 (snippet
2574 '(begin
2575 ;; Delete included gradle jar
2576 (delete-file-recursively "gradle/wrapper")
2577 #t))
7214fbd2
JL
2578 (sha256
2579 (base32
d9ef5aeb
AA
2580 "0yg38mwpivswccv9n96k06x3iv82i4px1a9xg9l8dswzwmfj259f"))
2581 (patches (search-patches "java-openjfx-build-jdk_version.patch"))))
7214fbd2
JL
2582 (build-system ant-build-system)
2583 (arguments
2584 `(#:jar-name "java-openjfx.jar"
2585 #:source-dir "buildSrc/src/main/java"
2586 #:test-dir "buildSrc/src/test"
2587 #:phases
2588 (modify-phases %standard-phases
2589 (add-before 'configure 'generate-jsl-parser
2590 (lambda _
2591 (invoke "antlr3" "-o"
2592 "buildSrc/src/main/java/com/sun/scenario/effect/compiler"
2593 "buildSrc/src/main/antlr/JSL.g"))))))
2594 (inputs
2595 `(("antlr3" ,antlr3)
2596 ("java-stringtemplate" ,java-stringtemplate)))
2597 (native-inputs
2598 `(("java-junit" ,java-junit)
2599 ("java-hamcrest-core" ,java-hamcrest-core)))
2600 (home-page "https://openjfx.io")
2601 (synopsis "Graphical application toolkit in Java")
2602 (description "OpenJFX is a client application platform for desktop,
2603mobile and embedded systems built on Java. Its goal is to produce a
2604modern, efficient, and fully featured toolkit for developing rich client
2605applications. This package contains base classes for the OpenJFX
2606distribution and helper classes for building other parts of the
2607distribution.")
2608 (license license:gpl2))) ;gpl2 only, with classpath exception
2609
46f05439
JL
2610(define-public java-openjfx-base
2611 (package (inherit java-openjfx-build)
2612 (name "java-openjfx-base")
2613 (arguments
2614 `(#:jar-name "java-openjfx-base.jar"
2615 #:source-dir "modules/base/src/main/java:modules/base/src/main/java8:modules/base/src/main/version-info"
2616 #:test-dir "modules/base/src/test"
2617 #:phases
2618 (modify-phases %standard-phases
2619 (add-before 'check 'remove-empty-file
2620 (lambda _
2621 (with-directory-excursion "modules/base/src/test/java"
2622 ;; These files are completely commented, but junit expects them to
2623 ;; contain a class, so tests fail.
2624 (delete-file
2625 "com/sun/javafx/property/adapter/PropertyDescriptorTest.java")
2626 (delete-file
2627 "com/sun/javafx/property/adapter/ReadOnlyPropertyDescriptorTest.java")
2628 (delete-file "javafx/beans/property/PropertiesTest.java")
2629 (delete-file
2630 "javafx/beans/property/adapter/ReadOnlyJavaBeanPropertyBuilder_General_Test.java")
2631 ;; This one fails
2632 (delete-file "com/sun/javafx/runtime/VersionInfoTest.java"))
2633 #t)))))
2634 (propagated-inputs
2635 `(("java-openjfx-build" ,java-openjfx-build)))
2636 (description "OpenJFX is a client application platform for desktop,
2637mobile and embedded systems built on Java. Its goal is to produce a
2638modern, efficient, and fully featured toolkit for developing rich client
2639applications. This package contains base classes for the OpenJFX
2640distribution.")))
36f73d70
JL
2641
2642(define-public java-openjfx-graphics
2643 (package (inherit java-openjfx-build)
2644 (name "java-openjfx-graphics")
2645 (arguments
2646 `(#:jar-name "java-openjfx-graphics.jar"
2647 #:source-dir "modules/graphics/src/main/java"
2648 #:tests? #f; require X
2649 #:test-dir "modules/graphics/src/test"))
2650 (propagated-inputs
2651 `(("java-openjfx-base" ,java-openjfx-base)
2652 ("java-swt" ,java-swt)))
2653 (description "OpenJFX is a client application platform for desktop,
2654mobile and embedded systems built on Java. Its goal is to produce a
2655modern, efficient, and fully featured toolkit for developing rich client
2656applications. This package contains graphics-related classes for the
2657OpenJFX distribution.")))
68a13319
JL
2658
2659(define-public java-openjfx-media
2660 (package (inherit java-openjfx-build)
2661 (name "java-openjfx-media")
2662 (propagated-inputs
2663 `(("java-openjxf-graphics" ,java-openjfx-graphics)))
2664 (arguments
2665 `(#:jar-name "java-openjfx-media.jar"
2666 #:source-dir "modules/media/src/main/java"
2667 #:tests? #f)); no tests
2668 (description "OpenJFX is a client application platform for desktop,
2669mobile and embedded systems built on Java. Its goal is to produce a
2670modern, efficient, and fully featured toolkit for developing rich client
2671applications. This package contains media-related classes for the
2672OpenJFX distribution.")))
46f05439 2673
53fb0476 2674(define-public javacc-4
fc8d100b
RW
2675 (package
2676 (name "javacc")
53fb0476 2677 (version "4.1")
fc8d100b 2678 (source (origin
53fb0476
AV
2679 (method git-fetch)
2680 (uri (git-reference
b0e7b699 2681 (url "https://github.com/javacc/javacc")
53fb0476
AV
2682 (commit "release_41")))
2683 (file-name (string-append "javacc-" version "-checkout"))
fc8d100b
RW
2684 (sha256
2685 (base32
6662d65f
AV
2686 "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0"))
2687 (modules '((guix build utils)))
2688 ;; delete bundled jars
2689 (snippet '(begin (delete-file-recursively "lib") #t))))
fc8d100b 2690 (build-system ant-build-system)
53fb0476
AV
2691 ;; Tests fail with
2692 ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60:
2693 ;; JAVACODE failed
fc8d100b 2694 (arguments
53fb0476 2695 `(#:tests? #f
fc8d100b
RW
2696 #:phases
2697 (modify-phases %standard-phases
6662d65f
AV
2698 ;; Delete tests to avoid build failure (we don't run them anyway).
2699 (add-after 'unpack 'delete-tests
fc8d100b 2700 (lambda _
6662d65f
AV
2701 (for-each delete-file
2702 '("src/org/javacc/JavaCCTestCase.java"
2703 "src/org/javacc/parser/ExpansionTest.java"
2704 "src/org/javacc/parser/OptionsTest.java"
2705 "src/org/javacc/jjtree/JJTreeOptionsTest.java"))
2706 (for-each delete-file-recursively
2707 '("src/org/javacc/parser/test"
2708 "src/org/javacc/jjdoc/test"))
2709 #t))
53fb0476 2710 (replace 'install (install-jars "bin/lib")))))
fc8d100b
RW
2711 (home-page "https://javacc.org/")
2712 (synopsis "Java parser generator")
2713 (description "Java Compiler Compiler (JavaCC) is the most popular parser
2714generator for use with Java applications. A parser generator is a tool that
2715reads a grammar specification and converts it to a Java program that can
2716recognize matches to the grammar. In addition to the parser generator itself,
2717JavaCC provides other standard capabilities related to parser generation such
2718as tree building (via a tool called JJTree included with JavaCC), actions,
2719debugging, etc.")
2720 (license license:bsd-3)))
2721
aabaac7d
JL
2722;; javacc-3, as javacc-4 is not properly bootstrapped: is contains a javacc.jar
2723;; in the bootstrap/ directory.
2724(define-public javacc-3
2725 (package
2726 (inherit javacc-4)
2727 (version "3.2")
2728 (source (origin
2729 (method git-fetch)
2730 (uri (git-reference
2731 (url "https://github.com/javacc/javacc.git")
2732 (commit "release_32")))
2733 (file-name (string-append "javacc-" version "-checkout"))
2734 (sha256
2735 (base32
2736 "1pyf1xyh8gk83nxqn2v2mdws32l68ydznha41cxa4l2kkbq1v1g3"))))
2737 (arguments
2738 `(#:tests? #f
2739 #:phases
2740 (modify-phases %standard-phases
2741 (add-before 'build 'set-java-version
2742 (lambda _
2743 (for-each
2744 (lambda (file)
2745 (substitute* file
2746 (("debug=") "source=\"1.4\" debug=")))
2747 (find-files "." "build.xml"))
2748 #t))
2749 (replace 'install (install-jars "bin/lib")))))))
2750
53fb0476
AV
2751(define-public javacc
2752 (package
2753 (inherit javacc-4)
6b66e470 2754 (version "7.0.4")
ebf8048d
TGR
2755 (source
2756 (origin
2757 (method git-fetch)
2758 (uri (git-reference
b0e7b699 2759 (url "https://github.com/javacc/javacc")
ebf8048d
TGR
2760 (commit version)))
2761 (file-name (git-file-name "javacc" version))
2762 (sha256
2763 (base32 "18kkak3gda93gr25jrgy6q00g0jr8i24ri2wk4kybz1v234fxx9i"))
2764 (modules '((guix build utils)))
2765 ;; Delete bundled jars.
2766 (snippet '(begin (for-each delete-file-recursively
2767 '("bootstrap" "lib"))
2768 #t))))
6688c41e 2769 (arguments
6b66e470 2770 `(#:make-flags ; bootstrap from javacc-4
33428d12
AV
2771 (list (string-append "-Dbootstrap-jar="
2772 (assoc-ref %build-inputs "javacc")
2773 "/share/java/javacc.jar"))
2774 #:test-target "test"
6688c41e
RW
2775 #:phases
2776 (modify-phases %standard-phases
16fdf2f5
JL
2777 (replace 'install (install-jars "target"))
2778 (add-after 'install 'install-bin
2779 (lambda* (#:key outputs inputs #:allow-other-keys)
2780 (let* ((out (assoc-ref outputs "out"))
2781 (dir (string-append out "/share/java"))
2782 (bin (string-append out "/bin"))
2783 (javacc (string-append bin "/javacc")))
2784 (mkdir-p bin)
2785 (with-output-to-file javacc
2786 (lambda _
2787 (display
2788 (string-append "#!/bin/sh\n"
2789 (assoc-ref inputs "jdk") "/bin/java"
2790 " -cp " dir "/javacc.jar" " `basename $0`" " $*"))))
2791 (chmod javacc #o755)
2792 ;; symlink to different names to affect the first argument and
2793 ;; change the behavior of the jar file.
2794 (symlink javacc (string-append bin "/jjdoc"))
2795 (symlink javacc (string-append bin "/jjtree"))
2796 #t))))))
2797
33428d12
AV
2798 (native-inputs
2799 `(("javacc" ,javacc-4)))))
6688c41e 2800
c1cb8576
RW
2801;; This is the last 3.x release of ECJ
2802(define-public java-ecj-3
2803 (package
2804 (name "java-ecj")
2805 (version "3.8.2")
2806 (source (origin
2807 (method url-fetch)
2808 (uri (string-append "http://archive.eclipse.org/eclipse/"
2809 "downloads/drops/R-" version
2810 "-201301310800/ecjsrc-" version ".jar"))
2811 (sha256
2812 (base32
2813 "01mdj14jw11g1jfnki4fi8229p0c6zzckd38zqy2w4m3cjcvsx04"))))
2814 (build-system ant-build-system)
2815 (arguments
2816 `(#:tests? #f ; none included
2817 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2818 #:make-flags (list "-f" "src/build.xml")
2819 #:build-target "build"
2820 #:phases
2821 (modify-phases %standard-phases
2822 (add-after 'unpack 'fix-manifest
2823 (lambda _
2824 ;; Record the main class to make ecj executable.
2825 (with-atomic-file-replacement "src/META-INF/MANIFEST.MF"
2826 (lambda (in out)
2827 (display "Manifest-Version: 1.0
2828Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2c8ac364
MW
2829 out)))
2830 #t))
c1cb8576
RW
2831 (replace 'install (install-jars ".")))))
2832 (home-page "https://eclipse.org")
2833 (synopsis "Eclipse Java development tools core batch compiler")
2834 (description "This package provides the Eclipse Java core batch compiler.")
2835 (license license:epl1.0)))
2836
f201b18e
RW
2837;; This is needed for java-cisd-args4j
2838(define-public java-ecj-3.5
2839 (package (inherit java-ecj-3)
2840 (version "3.5.1")
2841 (source (origin
2842 (method url-fetch/zipbomb)
2843 (uri (string-append "http://archive.eclipse.org/eclipse/"
2844 "downloads/drops/R-" version
2845 "-200909170800/ecjsrc-" version ".zip"))
2846 (sha256
2847 (base32
2848 "1vnl2mavisc567bip736xzsvvbjif5279wc4a7pbdik5wlir8qr7"))))
2849 (build-system ant-build-system)
2850 (arguments
2851 `(#:tests? #f ; none included
2852 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2853 #:build-target "build"
2854 #:phases
2855 (modify-phases %standard-phases
2856 (add-after 'unpack 'fix-manifest
2857 (lambda _
2858 ;; Record the main class to make ecj executable.
2859 (with-atomic-file-replacement "META-INF/MANIFEST.MF"
2860 (lambda (in out)
2861 (dump-port in out)
2862 (display "Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2c8ac364
MW
2863 out)))
2864 #t))
f201b18e
RW
2865 (replace 'install (install-jars ".")))))
2866 (native-inputs
2867 `(("unzip" ,unzip)))))
2868
bc3497a5
BH
2869(define-public java-ecj
2870 (package (inherit java-ecj-3)
2871 (version "4.6.3")
2872 (source
2873 (origin
2874 (method url-fetch)
2875 (uri (string-append
2876 "http://archive.eclipse.org/eclipse/downloads/drops4/R-"
2877 version
2878 "-201703010400/ecjsrc-"
2879 version
2880 ".jar"))
2881 (sha256
2882 (base32
2883 "11cfgsdgznja1pvlxkjbqykxd7pcd5655vkm7s44xmahmap15gpl"))))
2884 (arguments
2885 `(#:tests? #f ; none included
2886 #:build-target "build"
2887 #:phases
2888 (modify-phases %standard-phases
2889 (add-after 'unpack 'fix-build.xml
2890 (lambda _
2891 (substitute* "src/build.xml"
2892 (("^.*MANIFEST.*$")
2893 ""))
2894 #t))
2895 (add-after 'unpack 'fix-prop
2896 (lambda _
2897 (substitute* "src/build.xml"
2898 (("^.*properties.*$")
2899 "<include name=\"**/*.properties\"/>
2900 <include name=\"**/*.props\"/>"))
2901 #t))
2902 (add-before 'build 'chdir
2903 (lambda _
2904 (chdir "src")
2905 #t))
2906 (replace 'install (install-jars ".")))))))
2907
30d55473
RW
2908(define-public java-cisd-base
2909 (let ((revision 38938)
2910 (base-version "14.12.0"))
2911 (package
2912 (name "java-cisd-base")
2913 (version (string-append base-version "-" (number->string revision)))
2914 (source (origin
2915 (method svn-fetch)
2916 (uri (svn-reference
2917 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2918 "base/tags/release/"
2919 (version-major+minor base-version)
2920 ".x/" base-version "/base/"))
2921 (revision revision)))
2922 (file-name (string-append "java-cisd-base-" version "-checkout"))
2923 (sha256
2924 (base32
2925 "1i5adyf7nzclb0wydgwa1az04qliid8035vpahaandmkmigbnxiy"))
2926 (modules '((guix build utils)))
2927 (snippet
2928 '(begin
2929 ;; Delete included gradle jar
2930 (delete-file-recursively "gradle/wrapper")
2931 ;; Delete pre-built native libraries
2932 (delete-file-recursively "libs")
2933 #t))))
2934 (build-system ant-build-system)
2935 (arguments
2936 `(#:make-flags '("-file" "build/build.xml")
2937 #:test-target "jar-test"
2938 #:jdk ,icedtea-8
2939 #:phases
2940 (modify-phases %standard-phases
2941 (add-after 'unpack 'unpack-build-resources
2942 (lambda* (#:key inputs #:allow-other-keys)
2943 (copy-recursively (assoc-ref inputs "build-resources")
2944 "../build_resources")
2945 #t))
2946 (add-after 'unpack-build-resources 'fix-dependencies
2947 (lambda* (#:key inputs #:allow-other-keys)
2948 (substitute* "build/build.xml"
2949 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2950 (string-append (assoc-ref inputs "java-testng")
2951 "/share/java/java-testng.jar"))
2952 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2953 (string-append (assoc-ref inputs "java-commons-lang")
2954 "/share/java/commons-lang-"
2955 ,(package-version java-commons-lang) ".jar"))
2956 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2957 (string-append (assoc-ref inputs "java-commons-io")
3448c7ed 2958 "/lib/m2/commons-io/commons-io/"
30d55473 2959 ,(package-version java-commons-io)
3448c7ed
RW
2960 "/commons-io-"
2961 ,(package-version java-commons-io)
2962 ".jar"))
30d55473
RW
2963 ;; Remove dependency on svn
2964 (("<build-info.*") "")
2965 (("\\$\\{revision.number\\}")
2966 ,(number->string revision))
2967 (("\\$\\{version.number\\}") ,base-version))
2968 ;; Remove dependency on classycle
2969 (substitute* "../build_resources/ant/build-common.xml"
2970 (("<taskdef name=\"dependency-checker.*") "")
2971 (("classname=\"classycle.*") "")
2972 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2973 #t))
2974 ;; A few tests fail because of the lack of a proper /etc/groups and
2975 ;; /etc/passwd file in the build container.
2976 (add-after 'unpack 'disable-broken-tests
2977 (lambda _
2978 (substitute* "sourceTest/java/ch/systemsx/cisd/base/AllTests.java"
2979 (("Unix.isOperational\\(\\)") "false"))
2980 #t))
2981 ;; These decorators are almost useless and pull in an unpackaged
2982 ;; dependency.
2983 (add-after 'unpack 'remove-useless-decorators
2984 (lambda _
2985 (substitute* "source/java/ch/systemsx/cisd/base/unix/Unix.java"
2986 (("@Private") "")
2987 (("import ch.rinn.restrictions.Private;") ""))
2988 (substitute* "sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java"
2989 (("@Friend.*") "")
2990 (("import ch.rinn.restrictions.Friend;") ""))
2991 #t))
2992 (add-before 'configure 'build-native-code
2993 (lambda* (#:key inputs #:allow-other-keys)
2994 (let ((jdk (assoc-ref inputs "jdk"))
2995 (dir ,(match (%current-system)
2996 ("i686-linux"
2997 "i386-Linux")
2998 ((or "armhf-linux" "aarch64-linux")
2999 "arm-Linux")
3000 ((or "x86_64-linux")
3001 "amd64-Linux")
3002 (_ "unknown-Linux"))))
3003 (with-directory-excursion "source/c"
3004 (invoke "gcc" "-shared" "-O3" "-fPIC" "unix.c"
3005 (string-append "-I" jdk "/include")
3006 (string-append "-I" jdk "/include/linux")
3007 "-o" "libunix.so")
3008 (invoke "gcc" "-shared" "-O3" "-fPIC"
3009 "-DMACHINE_BYTE_ORDER=1"
3010 "copyCommon.c"
3011 "copyByteChar.c"
3012 "copyByteDouble.c"
3013 "copyByteFloat.c"
3014 "copyByteInt.c"
3015 "copyByteLong.c"
3016 "copyByteShort.c"
3017 (string-append "-I" jdk "/include")
3018 (string-append "-I" jdk "/include/linux")
3019 "-o" "libnativedata.so"))
3020 (install-file "source/c/libunix.so"
3021 (string-append "libs/native/unix/" dir))
3022 (install-file "source/c/libnativedata.so"
3023 (string-append "libs/native/nativedata/" dir))
3024 #t)))
3025 ;; In the "check" phase we only build the test executable.
3026 (add-after 'check 'run-tests
3027 (lambda _
3028 (invoke "java" "-jar" "targets/dist/sis-base-test.jar")
3029 (delete-file "targets/dist/sis-base-test.jar")
3030 #t))
3031 (replace 'install (install-jars "targets/dist")))))
3032 (native-inputs
3033 `(("jdk" ,icedtea-8)
3034 ("java-commons-lang" ,java-commons-lang)
3035 ("java-commons-io" ,java-commons-io)
3036 ("java-testng" ,java-testng)
3037 ("build-resources"
3038 ,(origin
3039 (method svn-fetch)
3040 (uri (svn-reference
3041 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3042 "base/tags/release/"
3043 (version-major+minor base-version)
3044 ".x/" base-version
3045 "/build_resources/"))
3046 (revision revision)))
3047 (sha256
3048 (base32
3049 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
3050 (home-page "http://svnsis.ethz.ch")
3051 (synopsis "Utility classes for libraries from ETH Zurich")
3052 (description "This library supplies some utility classes needed for
3053libraries from the SIS division at ETH Zurich like jHDF5.")
3054 ;; The C sources are under a non-copyleft license, which looks like a
3055 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
3056 (license (list license:asl2.0
3057 (license:non-copyleft "file://source/c/COPYING"))))))
3058
04ddca26
RW
3059(define-public java-cisd-args4j
3060 (let ((revision 39162)
3061 (base-version "9.11.2"))
3062 (package
3063 (name "java-cisd-args4j")
3064 (version (string-append base-version "-" (number->string revision)))
3065 (source (origin
3066 (method svn-fetch)
3067 (uri (svn-reference
3068 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3069 "args4j/tags/release/"
3070 (version-major+minor base-version)
3071 ".x/" base-version "/args4j/"))
3072 (revision revision)))
3073 (file-name (string-append "java-cisd-args4j-" version "-checkout"))
3074 (sha256
3075 (base32
3076 "0hhqznjaivq7ips7mkwas78z42s6djsm20rrs7g1zd59rcsakxn2"))))
3077 (build-system ant-build-system)
3078 (arguments
3079 `(#:make-flags '("-file" "build/build.xml")
3080 #:tests? #f ; there are no tests
3081 ;; There are weird build failures with JDK8, such as: "The type
3082 ;; java.io.ObjectInputStream cannot be resolved. It is indirectly
3083 ;; referenced from required .class files"
3084 #:jdk ,icedtea-7
3085 #:modules ((guix build ant-build-system)
3086 (guix build utils)
3087 (guix build java-utils)
3088 (sxml simple)
3089 (sxml transform)
3090 (sxml xpath))
3091 #:phases
3092 (modify-phases %standard-phases
3093 (add-after 'unpack 'unpack-build-resources
3094 (lambda* (#:key inputs #:allow-other-keys)
3095 (mkdir-p "../build_resources")
3096 (invoke "tar" "xf" (assoc-ref inputs "build-resources")
3097 "-C" "../build_resources"
3098 "--strip-components=1")
3099 (mkdir-p "../build_resources/lib")
3100 #t))
3101 (add-after 'unpack-build-resources 'fix-dependencies
3102 (lambda* (#:key inputs #:allow-other-keys)
3103 ;; FIXME: There should be a more convenient abstraction for
3104 ;; editing XML files.
3105 (with-directory-excursion "../build_resources/ant/"
3106 (chmod "build-common.xml" #o664)
3107 (call-with-output-file "build-common.xml.new"
3108 (lambda (port)
3109 (sxml->xml
3110 (pre-post-order
3111 (with-input-from-file "build-common.xml"
3112 (lambda _ (xml->sxml #:trim-whitespace? #t)))
3113 `(;; Remove dependency on classycle and custom ant tasks
3114 (taskdef . ,(lambda (tag . kids)
3115 (let ((name ((sxpath '(name *text*)) kids)))
3116 (if (or (member "build-info" name)
3117 (member "dependency-checker" name)
3118 (member "build-java-subprojects" name)
3119 (member "project-classpath" name))
3120 '() ; skip
3121 `(,tag ,@kids)))))
3122 (typedef . ,(lambda (tag . kids)
3123 (let ((name ((sxpath '(name *text*)) kids)))
3124 (if (member "recursive-jar" name)
3125 '() ; skip
3126 `(,tag ,@kids)))))
3127 (build-java-subprojects . ,(lambda _ '()))
3128 ;; Ignore everything else
3129 (*default* . ,(lambda (tag . kids) `(,tag ,@kids)))
3130 (*text* . ,(lambda (_ txt) txt))))
3131 port)))
3132 (rename-file "build-common.xml.new" "build-common.xml"))
3133 (substitute* "build/build.xml"
3134 (("\\$\\{lib\\}/cisd-base/cisd-base.jar")
3135 (string-append (assoc-ref inputs "java-cisd-base")
3136 "/share/java/sis-base.jar"))
3137 ;; Remove dependency on svn
3138 (("<build-info.*") "")
3139 (("\\$\\{revision.number\\}")
3140 ,(number->string revision))
3141 (("\\$\\{version.number\\}") ,base-version)
3142 ;; Don't use custom ant tasks.
3143 (("recursive-jar") "jar")
3144 (("<project-classpath.*") ""))
3145 #t))
3146 (replace 'install (install-jars "targets/dist")))))
3147 (inputs
3148 `(("java-cisd-base" ,java-cisd-base)))
3149 (native-inputs
3150 `(("ecj" ,java-ecj-3.5)
3151 ("build-resources"
3152 ,(origin
3153 (method svn-fetch)
3154 (uri (svn-reference
3155 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3156 "args4j/tags/release/"
3157 (version-major+minor base-version)
3158 ".x/" base-version
3159 "/build_resources/"))
3160 (revision revision)))
3161 (sha256
3162 (base32
3163 "056cam4k8pll7ass31sy6gwn8g8719njc41yf4l02b0342nilkyf"))
3164 (modules '((guix build utils)))
3165 ;; Delete bundled pre-built jars.
3166 (snippet
3167 '(begin (delete-file-recursively "lib/") #t))))))
3168 (home-page "http://svnsis.ethz.ch")
3169 (synopsis "Command line parser library")
3170 (description "This package provides a parser for command line arguments.")
3171 (license license:asl2.0))))
3172
2f0d0418
RW
3173(define-public java-cisd-jhdf5
3174 (let ((revision 39162)
3175 (base-version "14.12.6"))
3176 (package
3177 (name "java-cisd-jhdf5")
3178 (version (string-append base-version "-" (number->string revision)))
3179 (source (origin
3180 (method svn-fetch)
3181 (uri (svn-reference
3182 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3183 "jhdf5/tags/release/"
3184 (version-major+minor base-version)
3185 ".x/" base-version "/jhdf5/"))
3186 (revision revision)))
3187 (file-name (string-append "java-cisd-jhdf5-" version "-checkout"))
3188 (sha256
3189 (base32
3190 "13i17s2hn0q9drdqvp8csy7770p3hdbh9rp30ihln2ldkfawdmz0"))
3191 (modules '((guix build utils)))
3192 (snippet
3193 '(begin
3194 ;; Delete included gradle jar
3195 (delete-file-recursively "gradle/wrapper")
3196 ;; Delete pre-built native libraries
3197 (delete-file-recursively "libs")
3198 #t))))
3199 (build-system ant-build-system)
3200 (arguments
3201 `(#:make-flags '("-file" "build/build.xml")
3202 #:build-target "jar-all"
3203 #:test-target "jar-test"
3204 #:jdk ,icedtea-8
3205 #:phases
3206 (modify-phases %standard-phases
1ed386fc
RW
3207 ;; FIXME: this build phase fails.
3208 (delete 'generate-jar-indices)
2f0d0418
RW
3209 ;; Don't erase results from the build phase when building tests.
3210 (add-after 'unpack 'separate-test-target-from-clean
3211 (lambda _
3212 (substitute* "build/build.xml"
3213 (("\"jar-test\" depends=\"clean, ")
3214 "\"jar-test\" depends=\""))
3215 #t))
3216 (add-after 'unpack 'unpack-build-resources
3217 (lambda* (#:key inputs #:allow-other-keys)
3218 (copy-recursively (assoc-ref inputs "build-resources")
3219 "../build_resources")
3220 (delete-file-recursively "../build_resources/lib/")
3221 (mkdir-p "../build_resources/lib")
3222 ;; Remove dependency on classycle
3223 (substitute* "../build_resources/ant/build-common.xml"
3224 (("<taskdef name=\"dependency-checker.*") "")
3225 (("classname=\"classycle.*") "")
3226 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
3227 ;; Remove dependency on svn
3228 (substitute* "build/build.xml"
3229 (("<build-info.*") "")
3230 (("\\$\\{revision.number\\}")
3231 ,(number->string revision))
3232 (("\\$\\{version.number\\}") ,base-version))
3233 #t))
3234 (add-after 'unpack-build-resources 'fix-dependencies
3235 (lambda* (#:key inputs #:allow-other-keys)
3236 (substitute* "../build_resources/ant/build-common.xml"
3237 (("../libraries/testng/testng-jdk15.jar")
3238 (string-append (assoc-ref inputs "java-testng")
3239 "/share/java/java-testng.jar")))
3240 (substitute* "build/build.xml"
3241 (("\\$\\{lib\\}/sis-base/sis-base.jar")
3242 (string-append (assoc-ref inputs "java-cisd-base")
3243 "/share/java/sis-base.jar"))
3244 (("\\$\\{lib\\}/cisd-args4j/cisd-args4j.jar")
3245 (string-append (assoc-ref inputs "java-cisd-args4j")
3246 "/share/java/cisd-args4j.jar"))
3247 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
3248 (string-append (assoc-ref inputs "java-commons-lang")
3249 "/share/java/commons-lang-"
3250 ,(package-version java-commons-lang) ".jar"))
3251 (("\\$\\{lib\\}/commons-io/commons-io.jar")
3252 (string-append (assoc-ref inputs "java-commons-io")
cd005bfe
RW
3253 "/lib/m2/commons-io/commons-io/"
3254 ,(package-version java-commons-io)
3255 "/commons-io-"
2f0d0418 3256 ,(package-version java-commons-io)
cd005bfe 3257 ".jar"))
2f0d0418
RW
3258 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
3259 (string-append (assoc-ref inputs "java-testng")
3260 "/share/java/java-testng.jar"))
3261 (("\\$\\{lib\\}/junit4/junit.jar")
fff4fcc4 3262 (car (find-files (assoc-ref inputs "java-junit") "jar$")))
2f0d0418 3263 (("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar")
fff4fcc4
JL
3264 (car (find-files (assoc-ref inputs "java-hamcrest-core")
3265 "jar$"))))
2f0d0418
RW
3266 ;; Remove dependency on ch.rinn.restrictions
3267 (with-directory-excursion "source/java/ch/systemsx/cisd/hdf5/"
3268 (substitute* '("BitSetConversionUtils.java"
3269 "HDF5Utils.java")
3270 (("import ch.rinn.restrictions.Private;") "")
3271 (("@Private") "")))
3272 (with-directory-excursion "sourceTest/java/ch/systemsx/cisd/hdf5/"
3273 (substitute* '("BitSetConversionTest.java"
3274 "h5ar/HDF5ArchiverTest.java")
3275 (("import ch.rinn.restrictions.Friend;") "")
3276 (("@Friend.*") ""))
3277 ;; Remove leftovers from removing @Friend
3278 (substitute* "h5ar/HDF5ArchiverTest.java"
3279 (("\\{ HDF5Archiver.class, IdCache.class, LinkRecord.class \\}\\)")
3280 "")))
3281 #t))
3282 (add-before 'configure 'build-native-library
3283 (lambda* (#:key inputs #:allow-other-keys)
3284 (let ((jdk (assoc-ref inputs "jdk"))
3285 (hdf5 (assoc-ref inputs "hdf5"))
3286 (dir ,(match (%current-system)
3287 ("i686-linux"
3288 "i386-Linux")
3289 ((or "armhf-linux" "aarch64-linux")
3290 "arm-Linux")
3291 ((or "x86_64-linux")
3292 "amd64-Linux")
3293 (_ "unknown-Linux"))))
3294 (with-directory-excursion "source/c"
3295 (apply invoke `("gcc" "-shared" "-O3"
3296 "-fPIC"
3297 "-Wl,--exclude-libs,ALL"
3298 ,@(find-files "jhdf5" "\\.c$")
3299 ,@(find-files "hdf-java" "\\.c$")
3300 ,(string-append "-I" hdf5 "/include")
3301 ,(string-append "-I" jdk "/include")
3302 ,(string-append "-I" jdk "/include/linux")
3303 ,(string-append hdf5 "/lib/libhdf5.a")
3304 "-o" "libjhdf5.so" "-lz")))
3305 (install-file "source/c/libjhdf5.so"
3306 (string-append "libs/native/jhdf5/" dir))
3307 #t)))
3308 ;; In the "check" phase we only build the test executable.
3309 (add-after 'check 'run-tests
3310 (lambda _
3311 (invoke "java" "-jar" "targets/dist/sis-jhdf5-test.jar")
3312 (delete-file "targets/dist/sis-jhdf5-test.jar")
3313 #t))
3314 (replace 'install
3315 (install-jars "targets/dist")))))
3316 (inputs
3317 `(("java-cisd-base" ,java-cisd-base)
3318 ("java-cisd-args4j" ,java-cisd-args4j)
3319 ("java-commons-lang" ,java-commons-lang)
3320 ("java-commons-io" ,java-commons-io)
3321 ("hdf5" ,hdf5)
3322 ("zlib" ,zlib)))
3323 (native-inputs
3324 `(("jdk" ,icedtea-8)
3325 ("java-testng" ,java-testng)
3326 ("java-junit" ,java-junit)
3327 ("java-jmock" ,java-jmock)
3328 ("java-hamcrest-core" ,java-hamcrest-core)
3329 ("build-resources"
3330 ,(origin
3331 (method svn-fetch)
3332 (uri (svn-reference
3333 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3334 "jhdf5/tags/release/"
3335 (version-major+minor base-version)
3336 ".x/" base-version
3337 "/build_resources/"))
3338 (revision revision)))
3339 (sha256
3340 (base32
3341 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
3342 (home-page "https://wiki-bsse.ethz.ch/display/JHDF5/")
3343 (synopsis "Java binding for HDF5")
3344 (description "JHDF5 is a high-level API in Java for reading and writing
3345HDF5 files, building on the libraries provided by the HDF Group.")
3346 ;; The C sources are under a non-copyleft license, which looks like a
3347 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
3348 (license (list license:asl2.0
3349 (license:non-copyleft "file://source/c/COPYING"))))))
3350
218d093b
RW
3351(define-public java-classpathx-servletapi
3352 (package
3353 (name "java-classpathx-servletapi")
ae307724 3354 (version "3.0.1")
218d093b
RW
3355 (source (origin
3356 (method url-fetch)
3357 (uri (string-append "mirror://gnu/classpathx/servletapi/"
3358 "servletapi-" version ".tar.gz"))
3359 (sha256
3360 (base32
ae307724 3361 "07d8h051siga2f33fra72hk12sbq1bxa4jifjg0qj0vfazjjff0x"))))
218d093b
RW
3362 (build-system ant-build-system)
3363 (arguments
3364 `(#:tests? #f ; there is no test target
3365 #:build-target "compile"
218d093b 3366 #:make-flags
ae307724 3367 (list "-Dbuild.compiler=javac1.8"
218d093b
RW
3368 (string-append "-Ddist=" (assoc-ref %outputs "out")))
3369 #:phases
3370 (modify-phases %standard-phases
3371 (replace 'install
3372 (lambda* (#:key make-flags #:allow-other-keys)
2c8ac364 3373 (apply invoke `("ant" "dist" ,@make-flags)))))))
218d093b
RW
3374 (home-page "https://www.gnu.org/software/classpathx/")
3375 (synopsis "Java servlet API implementation")
3376 (description "This is the GNU servlet API distribution, part of the
3377ClasspathX project. It provides implementations of version 3.0 of the servlet
3378API and version 2.1 of the Java ServerPages API.")
3379 (license license:gpl3+)))
3380
10d62a88
BH
3381(define-public java-javaee-servletapi
3382 (package
3383 (name "java-javaee-servletapi")
3384 (version "3.1.0")
44bac44c
BH
3385 (source (origin
3386 (method git-fetch)
3387 (uri (git-reference
b0e7b699 3388 (url "https://github.com/javaee/servlet-spec")
44bac44c
BH
3389 (commit version)))
3390 (file-name (git-file-name name version))
3391 (sha256
3392 (base32
3393 "0s03lj8w5an70lkqbjycgfrfk0kc07vbfav91jzk87gh3awf9ksl"))))
10d62a88
BH
3394 (build-system ant-build-system)
3395 (arguments
3396 `(#:jar-name "javax-servletapi.jar"
3397 ;; no tests
3398 #:tests? #f
8ea8d607
BH
3399 #:source-dir "src/main/java"
3400 #:phases
3401 (modify-phases %standard-phases
3402 (add-before 'build 'copy-resources
3403 (lambda _
3404 (mkdir-p "build/classes/javax/servlet/http")
3405 (let ((from-prefix "src/main/java/javax/servlet/")
3406 (to-prefix "build/classes/javax/servlet/"))
3407 (for-each (lambda (f)
3408 (copy-file (string-append from-prefix f)
3409 (string-append to-prefix f)))
3410 (list "LocalStrings_ja.properties"
3411 "LocalStrings.properties"
3412 "LocalStrings_fr.properties"
3413 "http/LocalStrings_es.properties"
3414 "http/LocalStrings_ja.properties"
3415 "http/LocalStrings.properties"
3416 "http/LocalStrings_fr.properties")))
3417 #t)))))
10d62a88
BH
3418 (native-inputs
3419 `(("unzip" ,unzip)))
3420 (home-page "https://javaee.github.io/servlet-spec/")
3421 (synopsis "Java servlet API")
3422 (description "Java Servlet is the foundation web specification in the
3423Java Enterprise Platform. Developers can build web applications using the
3424Servlet API to interact with the request/response workflow. This project
3425provides information on the continued development of the Java Servlet
3426specification.")
3427 ;; Main code is dual-licensed by Oracle under either GLP2 or CDDL 1.1.
3428 ;; Some files are licensed under ASL 2.0.
3429 (license (list license:asl2.0 license:gpl2 license:cddl1.1))))
3430
5490480c
RW
3431(define-public java-swt
3432 (package
3433 (name "java-swt")
8710d4dd 3434 (version "4.7.1a")
5490480c
RW
3435 (source
3436 ;; The types of many variables and procedures differ in the sources
3437 ;; dependent on whether the target architecture is a 32-bit system or a
3438 ;; 64-bit system. Instead of patching the sources on demand in a build
3439 ;; phase we download either the 32-bit archive (which mostly uses "int"
3440 ;; types) or the 64-bit archive (which mostly uses "long" types).
8710d4dd
RW
3441 (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9")
3442 (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q")
5490480c
RW
3443 (file32 "x86")
3444 (file64 "x86_64"))
3445 (let-values (((hash file)
3446 (match (or (%current-target-system) (%current-system))
3447 ("x86_64-linux" (values hash64 file64))
3448 (_ (values hash32 file32)))))
3449 (origin
3450 (method url-fetch)
3451 (uri (string-append
8710d4dd
RW
3452 "http://download.eclipse.org/eclipse/downloads/drops4/"
3453 "R-" version "-201710090410/swt-" version
3454 "-gtk-linux-" file ".zip"))
5490480c
RW
3455 (sha256 (base32 hash))))))
3456 (build-system ant-build-system)
3457 (arguments
3458 `(#:jar-name "swt.jar"
8710d4dd 3459 #:jdk ,icedtea-8
5490480c
RW
3460 #:tests? #f ; no "check" target
3461 #:phases
3462 (modify-phases %standard-phases
3463 (replace 'unpack
3464 (lambda* (#:key source #:allow-other-keys)
2c8ac364
MW
3465 (mkdir "swt")
3466 (invoke "unzip" source "-d" "swt")
3467 (chdir "swt")
3468 (mkdir "src")
3469 (invoke "unzip" "src.zip" "-d" "src")))
5490480c
RW
3470 ;; The classpath contains invalid icecat jars. Since we don't need
3471 ;; anything other than the JDK on the classpath, we can simply unset
3472 ;; it.
3473 (add-after 'configure 'unset-classpath
3474 (lambda _ (unsetenv "CLASSPATH") #t))
3475 (add-before 'build 'build-native
3476 (lambda* (#:key inputs outputs #:allow-other-keys)
3477 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3478 ;; Build shared libraries. Users of SWT have to set the system
3479 ;; property swt.library.path to the "lib" directory of this
3480 ;; package output.
3481 (mkdir-p lib)
3482 (setenv "OUTPUT_DIR" lib)
3483 (with-directory-excursion "src"
2c8ac364 3484 (invoke "bash" "build.sh")))))
5490480c
RW
3485 (add-after 'install 'install-native
3486 (lambda* (#:key outputs #:allow-other-keys)
3487 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3488 (for-each (lambda (file)
3489 (install-file file lib))
3490 (find-files "." "\\.so$"))
3491 #t))))))
3492 (inputs
8710d4dd 3493 `(("gtk" ,gtk+-2)
5490480c
RW
3494 ("libxtst" ,libxtst)
3495 ("libxt" ,libxt)
3496 ("mesa" ,mesa)
3497 ("glu" ,glu)))
3498 (native-inputs
3499 `(("pkg-config" ,pkg-config)
3500 ("unzip" ,unzip)))
3501 (home-page "https://www.eclipse.org/swt/")
3502 (synopsis "Widget toolkit for Java")
3503 (description
3504 "SWT is a widget toolkit for Java designed to provide efficient, portable
3505access to the user-interface facilities of the operating systems on which it
3506is implemented.")
3507 ;; SWT code is licensed under EPL1.0
3508 ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1
3509 ;; Cairo bindings contain code under MPL1.1
3510 ;; XULRunner 1.9 bindings contain code under MPL2.0
3511 (license (list
3512 license:epl1.0
3513 license:mpl1.1
3514 license:mpl2.0
3515 license:lgpl2.1+))))
3516
04100c3b
RW
3517;; java-hamcrest-core uses qdox version 1.12. We package this version instead
3518;; of the latest release.
3519(define-public java-qdox-1.12
3520 (package
3521 (name "java-qdox")
3522 (version "1.12.1")
3523 (source (origin
3524 (method url-fetch)
3344bc49 3525 (uri (string-append "https://repo1.maven.org/maven2/"
04100c3b
RW
3526 "com/thoughtworks/qdox/qdox/" version
3527 "/qdox-" version "-sources.jar"))
3528 (sha256
3529 (base32
3530 "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl"))))
3531 (build-system ant-build-system)
3532 (arguments
3533 `(;; Tests require junit
3534 #:tests? #f
3535 #:jar-name "qdox.jar"
3536 #:phases
3537 (modify-phases %standard-phases
3538 (replace 'unpack
3539 (lambda* (#:key source #:allow-other-keys)
3540 (mkdir "src")
3541 (with-directory-excursion "src"
2c8ac364 3542 (invoke "jar" "-xf" source))))
04100c3b
RW
3543 ;; At this point we don't have junit, so we must remove the API
3544 ;; tests.
3545 (add-after 'unpack 'delete-tests
3546 (lambda _
3547 (delete-file-recursively "src/com/thoughtworks/qdox/junit")
3548 #t)))))
3344bc49 3549 (home-page "https://github.com/codehaus/qdox")
04100c3b
RW
3550 (synopsis "Parse definitions from Java source files")
3551 (description
3552 "QDox is a high speed, small footprint parser for extracting
3553class/interface/method definitions from source files complete with JavaDoc
b13cf17f 3554@code{@@tags}. It is designed to be used by active code generators or
04100c3b
RW
3555documentation tools.")
3556 (license license:asl2.0)))
e7e28510 3557
5281ba17
BH
3558(define-public java-qdox
3559 (package
3560 (name "java-qdox")
3561 ; Newer version exists, but this version is required by java-plexus-component-metadata
3562 (version "2.0-M2")
3563 (source (origin
3564 (method url-fetch)
3565 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
3566 ;; Older releases at https://github.com/codehaus/qdox/
3567 ;; Note: The release at maven is pre-generated. The release at
3568 ;; github requires jflex.
3569 (uri (string-append "https://repo1.maven.org/maven2/"
3570 "com/thoughtworks/qdox/qdox/" version
3571 "/qdox-" version "-sources.jar"))
3572 (sha256
3573 (base32
3574 "10xxrcaicq6axszcr2jpygisa4ch4sinyx5q7kqqxv4lknrmxp5x"))))
3575 (build-system ant-build-system)
3576 (arguments
3577 `(#:jar-name "qdox.jar"
0ab9eba7
JL
3578 #:tests? #f; no tests
3579 #:modules
3580 ((guix build ant-build-system)
3581 (guix build java-utils)
3582 (guix build utils)
3583 (sxml simple))
3584 #:phases
3585 (modify-phases %standard-phases
3586 (add-before 'install 'create-pom
3587 (lambda _
3588 (with-output-to-file "pom.xml"
3589 (lambda _
3590 (sxml->xml
3591 `((project
3592 (modelVersion "4.0.0")
3593 (name "QDox")
3594 (groupId "com.thoughtworks.qdox")
3595 (artifactId "qdox")
3596 (version ,,version))))))
3597 #t))
3598 (replace 'install
3599 (install-from-pom "pom.xml")))))
5281ba17
BH
3600 (home-page "https://github.com/codehaus/qdox")
3601 (synopsis "Parse definitions from Java source files")
3602 (description "QDox is a high speed, small footprint parser for extracting
3603class/interface/method definitions from source files complete with JavaDoc
3604@code{@@tags}. It is designed to be used by active code generators or
3605documentation tools.")
3606 (license license:asl2.0)))
3607
0ab9eba7
JL
3608(define-public java-qdox-2-M9
3609 (package
3610 (inherit java-qdox)
3611 (version "2.0-M9"); required by plexus-java
3612 (source (origin
3613 (method url-fetch)
3614 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
3615 ;; Older releases at https://github.com/codehaus/qdox/
3616 ;; Note: The release at maven is pre-generated. The release at
3617 ;; github requires jflex.
3618 (uri (string-append "https://repo1.maven.org/maven2/"
3619 "com/thoughtworks/qdox/qdox/" version
3620 "/qdox-" version "-sources.jar"))
3621 (sha256
3622 (base32
3623 "1s2jnmx2dkwnaha12lcj26aynywgwa8sslc47z82wx8xai13y4fg"))))))
3624
e7e28510
RW
3625(define-public java-jarjar
3626 (package
3627 (name "java-jarjar")
3628 (version "1.4")
3629 (source (origin
3630 (method url-fetch)
3631 (uri (string-append
3632 "https://storage.googleapis.com/google-code-archive-downloads/v2/"
3633 "code.google.com/jarjar/jarjar-src-" version ".zip"))
3634 (sha256
3635 (base32
88aa75e9
GB
3636 "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl"))
3637 (modules '((guix build utils)))
3638 (snippet
3639 '(begin
3640 ;; Delete bundled thirds-party jar archives.
e0ee843f
JL
3641 (delete-file-recursively "lib")
3642 (delete-file "src/test/enumtest.jar")
3643 ;; the CLASSPATH needs this directory, create an empty one
3644 (mkdir-p "lib")
88aa75e9 3645 #t))))
e7e28510
RW
3646 (build-system ant-build-system)
3647 (arguments
3648 `(;; Tests require junit, which ultimately depends on this package.
3649 #:tests? #f
3650 #:build-target "jar"
3651 #:phases
3652 (modify-phases %standard-phases
88aa75e9
GB
3653 (add-before 'build 'do-not-use-bundled-asm
3654 (lambda* (#:key inputs #:allow-other-keys)
3655 (substitute* "build.xml"
3656 (("<path id=\"path.build\">")
3657 (string-append "<path id=\"path.build\"><fileset dir=\""
3658 (assoc-ref inputs "java-asm-bootstrap")
51087d51 3659 "/lib/m2\" includes=\"**/*.jar\"/>"))
88aa75e9
GB
3660 (("<zipfileset src=\"lib/asm-4.0.jar\"/>") "")
3661 (("lib/asm-commons-4.0.jar")
51087d51
JL
3662 (car (find-files (assoc-ref inputs "java-asm-bootstrap")
3663 "asm-6.0.jar")))
88aa75e9
GB
3664 (("<include name=\"org/objectweb/asm/commons/Remap\\*\\.class\"/>")
3665 (string-append "<include name=\"org/objectweb/asm/"
3666 "commons/Remap*.class\"/>"
3667 "<include name=\"org/objectweb/asm/*.class\"/>"
3668 "<include name=\"org/objectweb/asm/"
3669 "signature/*.class\"/>"
3670 "<include name=\"org/objectweb/asm/"
3671 "commons/SignatureRemapper.class\"/>")))
3672 #t))
e0ee843f
JL
3673 (add-before 'build 'remove-maven-dependency
3674 (lambda _
3675 ;; We do not need to build jarjar as a maven plugin just yet, so
3676 ;; remove this file. Maven requires jarjar (but not that plugin),
3677 ;; so removing it improves the bootstrap.
3678 (delete-file "src/main/com/tonicsystems/jarjar/JarJarMojo.java")
3679 #t))
e7e28510
RW
3680 (replace 'install
3681 (lambda* (#:key outputs #:allow-other-keys)
3682 (let ((target (string-append (assoc-ref outputs "out")
3683 "/share/java")))
3684 (install-file (string-append "dist/jarjar-" ,version ".jar")
3685 target))
3686 #t)))))
88aa75e9
GB
3687 (inputs
3688 `(("java-asm-bootstrap" ,java-asm-bootstrap)))
e7e28510
RW
3689 (native-inputs
3690 `(("unzip" ,unzip)))
3691 (home-page "https://code.google.com/archive/p/jarjar/")
3692 (synopsis "Repackage Java libraries")
3693 (description
3694 "Jar Jar Links is a utility that makes it easy to repackage Java
3695libraries and embed them into your own distribution. Jar Jar Links includes
3696an Ant task that extends the built-in @code{jar} task.")
3697 (license license:asl2.0)))
87c31a21
RW
3698
3699(define-public java-hamcrest-core
3700 (package
3701 (name "java-hamcrest-core")
3702 (version "1.3")
3703 (source (origin
2703d573
EF
3704 (method git-fetch)
3705 (uri (git-reference
3706 (url "https://github.com/hamcrest/JavaHamcrest/")
3707 (commit (string-append "hamcrest-java-" version))))
3708 (file-name (git-file-name name version))
87c31a21
RW
3709 (sha256
3710 (base32
2703d573 3711 "16fxxkrd31ahqvcaby30jgh3z1i0zxh51m24hxgz0z2agxj6bc63"))
87c31a21
RW
3712 (modules '((guix build utils)))
3713 (snippet
3714 '(begin
00672896
HG
3715 ;; Delete bundled thirds-party jar archives.
3716 (delete-file-recursively "lib")
87c31a21
RW
3717 #t))))
3718 (build-system ant-build-system)
3719 (arguments
3720 `(#:tests? #f ; Tests require junit
a8d3cb62 3721 #:modules ((guix build ant-build-system)
fff4fcc4 3722 (guix build java-utils)
a8d3cb62
RW
3723 (guix build utils)
3724 (srfi srfi-1))
87c31a21 3725 #:make-flags (list (string-append "-Dversion=" ,version))
fae0b4ca 3726 #:test-target "unit-test"
87c31a21
RW
3727 #:build-target "core"
3728 #:phases
3729 (modify-phases %standard-phases
3730 ;; Disable unit tests, because they require junit, which requires
3731 ;; hamcrest-core. We also give a fixed value to the "Built-Date"
3732 ;; attribute from the manifest for reproducibility.
3733 (add-before 'configure 'patch-build.xml
3734 (lambda _
3735 (substitute* "build.xml"
3736 (("unit-test, ") "")
3737 (("\\$\\{build.timestamp\\}") "guix"))
3738 #t))
3739 ;; Java's "getMethods()" returns methods in an unpredictable order.
3740 ;; To make the output of the generated code deterministic we must
3741 ;; sort the array of methods.
3742 (add-after 'unpack 'make-method-order-deterministic
3743 (lambda _
3744 (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java"
3745 (("import java\\.util\\.Iterator;" line)
3746 (string-append line "\n"
3747 "import java.util.Arrays; import java.util.Comparator;"))
3748 (("allMethods = cls\\.getMethods\\(\\);" line)
3749 (string-append "_" line
3750 "
3751private Method[] getSortedMethods() {
3752 Arrays.sort(_allMethods, new Comparator<Method>() {
3753 @Override
3754 public int compare(Method a, Method b) {
3755 return a.toString().compareTo(b.toString());
3756 }
3757 });
3758 return _allMethods;
3759}
3760
2c8ac364
MW
3761private Method[] allMethods = getSortedMethods();")))
3762 #t))
87c31a21
RW
3763 (add-before 'build 'do-not-use-bundled-qdox
3764 (lambda* (#:key inputs #:allow-other-keys)
3765 (substitute* "build.xml"
3766 (("lib/generator/qdox-1.12.jar")
3767 (string-append (assoc-ref inputs "java-qdox-1.12")
3768 "/share/java/qdox.jar")))
3769 #t))
fab959d3
HG
3770 ;; build.xml searches for .jar files in this directoy, which
3771 ;; we remove from the source archive.
3772 (add-before 'build 'create-dummy-directories
3773 (lambda _
3774 (mkdir-p "lib/integration")
3775 #t))
fff4fcc4
JL
3776 (add-before 'build 'create-pom
3777 (lambda _
3778 (substitute* "pom/hamcrest-core.pom"
3779 (("@VERSION@") ,version))
3780 #t))
87c31a21 3781 (replace 'install
fff4fcc4 3782 (install-from-pom "pom/hamcrest-core.pom")))))
87c31a21
RW
3783 (native-inputs
3784 `(("java-qdox-1.12" ,java-qdox-1.12)
3785 ("java-jarjar" ,java-jarjar)))
fff4fcc4
JL
3786 (propagated-inputs
3787 `(("java-hamcrest-parent-pom" ,java-hamcrest-parent-pom)))
87c31a21
RW
3788 (home-page "http://hamcrest.org/")
3789 (synopsis "Library of matchers for building test expressions")
3790 (description
3791 "This package provides a library of matcher objects (also known as
3792constraints or predicates) allowing @code{match} rules to be defined
3793declaratively, to be used in other frameworks. Typical scenarios include
3794testing frameworks, mocking libraries and UI validation rules.")
3795 (license license:bsd-2)))
d0184f44 3796
fff4fcc4
JL
3797(define java-hamcrest-parent-pom
3798 (package
3799 (inherit java-hamcrest-core)
3800 (name "java-hamcrest-parent-pom")
3801 (propagated-inputs '())
3802 (native-inputs '())
3803 (arguments
3804 `(#:tests? #f
3805 #:phases
3806 (modify-phases %standard-phases
3807 (delete 'configure)
3808 (replace 'build
3809 (lambda _
3810 (substitute* "pom/hamcrest-parent.pom"
3811 (("@VERSION@") ,(package-version java-hamcrest-core)))
3812 #t))
3813 (replace 'install
3814 (install-pom-file "pom/hamcrest-parent.pom")))))))
3815
031516d6
JL
3816(define-public java-hamcrest-library
3817 (package
3818 (inherit java-hamcrest-core)
3819 (name "java-hamcrest-library")
3820 (arguments
3821 (substitute-keyword-arguments (package-arguments java-hamcrest-core)
fff4fcc4
JL
3822 ((#:build-target _) "library")
3823 ((#:phases phases)
3824 `(modify-phases ,phases
7bbe61f8
JL
3825 (add-after 'unpack 'patch-classpath-for-integration
3826 (lambda* (#:key inputs #:allow-other-keys)
3827 (substitute* "build.xml"
3828 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
3829 (car (find-files (assoc-ref inputs "java-hamcrest-core")
3830 "jar$"))))
3831 #t))
fff4fcc4
JL
3832 (replace 'create-pom
3833 (lambda _
3834 (substitute* "pom/hamcrest-library.pom"
3835 (("@VERSION@") ,(package-version java-hamcrest-core)))
3836 #t))
3837 (replace 'install
3838 (install-from-pom "pom/hamcrest-library.pom"))))))
031516d6 3839 (propagated-inputs
fff4fcc4
JL
3840 `(("java-hamcrest-core" ,java-hamcrest-core)
3841 ("java-hamcrest-parent-pom" ,java-hamcrest-parent-pom)))))
031516d6 3842
d0184f44
RW
3843(define-public java-junit
3844 (package
3845 (name "java-junit")
3846 (version "4.12")
3847 (source (origin
42c1c59e
EF
3848 (method git-fetch)
3849 (uri (git-reference
3850 (url "https://github.com/junit-team/junit/")
3851 (commit (string-append "r" version))))
3852 (file-name (git-file-name name version))
d0184f44
RW
3853 (sha256
3854 (base32
42c1c59e 3855 "1j8avi91px1z8rjc89cfikwrvfifdmmsarwiyrcnr59ynvpz0v8h"))
d0184f44
RW
3856 (modules '((guix build utils)))
3857 (snippet
3858 '(begin
3859 ;; Delete bundled jar archives.
3860 (delete-file-recursively "lib")
3861 #t))))
3862 (build-system ant-build-system)
3863 (arguments
29428e10
JL
3864 `(#:jar-name "junit.jar"
3865 #:source-dir "src/main/java"
3866 #:test-dir "src/test"
3867 #:test-exclude (list "**/SimpleTest.java" "**/StackTracesTest.java"
3868 "**/RuleChainTest.java" "**/TestWatchmanTest.java")
3869 #:phases
3870 (modify-phases %standard-phases
3871 (add-before 'check 'copy-test-resources
3872 (lambda _
3873 (copy-recursively "src/test/resources" "build/test-classes")
fff4fcc4
JL
3874 #t))
3875 (replace 'install
3876 (install-from-pom "pom.xml")))))
29428e10 3877 (propagated-inputs
d0184f44 3878 `(("java-hamcrest-core" ,java-hamcrest-core)))
29428e10
JL
3879 (native-inputs
3880 `(("java-hamcrest-library" ,java-hamcrest-library)))
42c1c59e 3881 (home-page "https://junit.org/junit4/")
d0184f44
RW
3882 (synopsis "Test framework for Java")
3883 (description
3884 "JUnit is a simple framework to write repeatable tests for Java projects.
3885JUnit provides assertions for testing expected results, test fixtures for
3886sharing common test data, and test runners for running tests.")
3887 (license license:epl1.0)))
9fb20d01 3888
52a23d8e
JL
3889(define-public java-junitparams
3890 (package
3891 (name "java-junitparams")
3892 (version "1.1.1")
3893 (source (origin
3894 (method git-fetch)
3895 (uri (git-reference
3896 (url "https://github.com/Pragmatists/JUnitParams")
3897 (commit (string-append "JUnitParams-" version))))
3898 (file-name (git-file-name name version))
3899 (sha256
3900 (base32
3901 "0rb52xdfp99invyjrras3w0bf0a81cz30yd47rkkiyqcqj0y1q9b"))))
3902 (build-system ant-build-system)
3903 (arguments
3904 `(#:jar-name "junitparams.jar"
3905 #:source-dir "src/main/java"
3906 #:test-dir "src/test"
3907 #:test-exclude (list "**/SuperclassTest.java")))
3908 (inputs
3909 `(("java-junit" ,java-junit)))
3910 (native-inputs
3911 `(("java-junit" ,java-junit)
3912 ("java-hamcrest-core" ,java-hamcrest-core)
3913 ("java-assertj" ,java-assertj)))
3914 (home-page "https://github.com/Pragmatists/JUnitParams")
3915 (synopsis "Parameterised test support for JUnit")
3916 (description "The JUnitParams project adds a new runner to JUnit and
3917provides much easier and readable parametrised tests for JUnit.")
3918 (license license:asl2.0)))
3919
9fb20d01
RW
3920(define-public java-plexus-utils
3921 (package
3922 (name "java-plexus-utils")
b3971a5c
JL
3923 ;; sisu-build-api needs this version, later versions don't work
3924 (version "3.2.1")
9fb20d01 3925 (source (origin
c53badd4
EF
3926 (method git-fetch)
3927 (uri (git-reference
3928 (url "https://github.com/codehaus-plexus/plexus-utils")
3929 (commit (string-append "plexus-utils-" version))))
3930 (file-name (git-file-name name version))
9fb20d01
RW
3931 (sha256
3932 (base32
b3971a5c 3933 "1w169glixyk94jbczj8jzg897lsab46jihiaa3dhw0p06g35va8b"))))
9fb20d01
RW
3934 (build-system ant-build-system)
3935 ;; FIXME: The default build.xml does not include a target to install
3936 ;; javadoc files.
3937 (arguments
3938 `(#:jar-name "plexus-utils.jar"
3939 #:source-dir "src/main"
3940 #:phases
3941 (modify-phases %standard-phases
3942 (add-after 'unpack 'fix-reference-to-/bin-and-/usr
3943 (lambda _
3944 (substitute* "src/main/java/org/codehaus/plexus/util/\
3945cli/shell/BourneShell.java"
3946 (("/bin/sh") (which "sh"))
3947 (("/usr/") (getcwd)))
3948 #t))
3949 (add-after 'unpack 'fix-or-disable-broken-tests
3950 (lambda _
3951 (with-directory-excursion "src/test/java/org/codehaus/plexus/util"
3952 (substitute* '("cli/CommandlineTest.java"
3953 "cli/shell/BourneShellTest.java")
3954 (("/bin/sh") (which "sh"))
3955 (("/bin/echo") (which "echo")))
3956
3957 ;; This test depends on MavenProjectStub, but we don't have
3958 ;; a package for Maven.
3959 (delete-file "introspection/ReflectionValueExtractorTest.java")
3960
3961 ;; FIXME: The command line tests fail, maybe because they use
3962 ;; absolute paths.
b3971a5c
JL
3963 (delete-file "cli/CommandlineTest.java")
3964
3965 ;; These tests require openjdk jmh, which is not packaged yet
3966 (for-each delete-file (find-files "." "PerfTest.java$")))
3967 #t))
3968 (add-before 'build 'copy-resources
3969 (lambda _
3970 (copy-recursively "src/main/resources" "build/classes")
3971 #t))
3972 (replace 'install (install-from-pom "pom.xml")))))
9fb20d01 3973 (native-inputs
0cd8efcc
JL
3974 `(("java-hamcrest-core" ,java-hamcrest-core)
3975 ("java-junit" ,java-junit)))
b3971a5c
JL
3976 (propagated-inputs
3977 `(("plexus-parent-pom" ,plexus-parent-pom-5.1)))
1b4d40cf 3978 (home-page "https://codehaus-plexus.github.io/plexus-utils/")
9fb20d01
RW
3979 (synopsis "Common utilities for the Plexus framework")
3980 (description "This package provides various Java utility classes for the
3981Plexus framework to ease working with strings, files, command lines, XML and
3982more.")
3983 (license license:asl2.0)))
1e555562 3984
2ddf13ae
JL
3985(define-public java-plexus-utils-3.3.0
3986 (package
3987 (inherit java-plexus-utils)
3988 (version "3.3.0")
3989 (source (origin
3990 (method git-fetch)
3991 (uri (git-reference
3992 (url "https://github.com/codehaus-plexus/plexus-utils")
3993 (commit (string-append "plexus-utils-" version))))
3994 (file-name (git-file-name "java-plexus-utils" version))
3995 (sha256
3996 (base32
3997 "0d0fq21rzjy0j55kcp8w9k1rbq9rwr0r7cc8239p9jbz54vihp0g"))))))
3998
1e555562
HG
3999(define-public java-plexus-interpolation
4000 (package
4001 (name "java-plexus-interpolation")
6671d6a1 4002 (version "1.26")
1e555562 4003 (source (origin
c4b67ba3
EF
4004 (method git-fetch)
4005 (uri (git-reference
4006 (url "https://github.com/codehaus-plexus/plexus-interpolation")
4007 (commit (string-append "plexus-interpolation-" version))))
4008 (file-name (git-file-name name version))
1e555562
HG
4009 (sha256
4010 (base32
6671d6a1 4011 "1rahjmhywf6d5m32qzlc9izawyvcd71abfm9k03f13rs2xmfxzlh"))))
1e555562
HG
4012 (build-system ant-build-system)
4013 (arguments
4014 `(#:jar-name "plexus-interpolation.jar"
6671d6a1
JL
4015 #:source-dir "src/main"
4016 #:phases
4017 (modify-phases %standard-phases
4018 (replace 'install (install-from-pom "pom.xml")))))
4019 (propagated-inputs
4020 `(("plexus-parent-pom-5.1" ,plexus-parent-pom-5.1)))
1e555562
HG
4021 (native-inputs
4022 `(("java-junit" ,java-junit)
4023 ("java-hamcrest-core" ,java-hamcrest-core)))
35e74723 4024 (home-page "https://codehaus-plexus.github.io/plexus-interpolation/")
1e555562
HG
4025 (synopsis "Java components for interpolating ${} strings and the like")
4026 (description "Plexus interpolator is a modular, flexible interpolation
4027framework for the expression language style commonly seen in Maven, Plexus,
4028and other related projects.
4029
4030It has its foundation in the @code{org.codehaus.plexus.utils.interpolation}
4031package within @code{plexus-utils}, but has been separated in order to allow
4032these two libraries to vary independently of one another.")
4033 (license license:asl2.0)))
8f8ed9aa 4034
bb27eb0d
JL
4035(define-public java-plexus-classworlds
4036 (package
4037 (name "java-plexus-classworlds")
ae913096 4038 (version "2.6.0")
bb27eb0d 4039 (source (origin
9520b2b1
EF
4040 (method git-fetch)
4041 (uri (git-reference
4042 (url "https://github.com/codehaus-plexus/plexus-classworlds")
4043 (commit (string-append "plexus-classworlds-" version))))
4044 (file-name (git-file-name name version))
bb27eb0d
JL
4045 (sha256
4046 (base32
ae913096 4047 "034k2hgvj1saalwbnzrbg4n0zgzwcpz1lhlb8q4kgglsp9pmm03s"))))
bb27eb0d
JL
4048 (build-system ant-build-system)
4049 (arguments
4050 `(#:jar-name "plexus-classworlds.jar"
4051 #:source-dir "src/main"
ae913096
JL
4052 #:tests? #f;; FIXME: we need to generate some resources as in pom.xml
4053 #:phases
4054 (modify-phases %standard-phases
4055 (replace 'install (install-from-pom "pom.xml")))))
4056 (propagated-inputs
4057 `(("plexus-parent-pom-5.1" ,plexus-parent-pom-5.1)))
bb27eb0d
JL
4058 (native-inputs
4059 `(("java-junit" ,java-junit)))
268dc472 4060 (home-page "https://codehaus-plexus.github.io/plexus-classworlds/")
bb27eb0d 4061 (synopsis "Java class loader framework")
f4548394
TGR
4062 (description "Plexus classworlds replaces the native @code{ClassLoader}
4063mechanism of Java. It is especially useful for dynamic loading of application
bb27eb0d
JL
4064components.")
4065 (license license:asl2.0)))
4066
a7ad92ad 4067(define java-plexus-container-default-bootstrap
0726d4ea
JL
4068 (package
4069 (name "java-plexus-container-default-bootstrap")
4070 (version "1.7.1")
4071 (source (origin
3a26ea3a
EF
4072 (method git-fetch)
4073 (uri (git-reference
4074 (url "https://github.com/codehaus-plexus/plexus-containers")
4075 (commit (string-append "plexus-containers-" version))))
4076 (file-name (git-file-name name version))
0726d4ea
JL
4077 (sha256
4078 (base32
3a26ea3a 4079 "1316hrp5vqfv0aw7miq2fp0wwy833h66h502h29vnh5sxj27x228"))))
0726d4ea
JL
4080 (build-system ant-build-system)
4081 (arguments
4082 `(#:jar-name "container-default.jar"
4083 #:source-dir "plexus-container-default/src/main/java"
4084 #:test-dir "plexus-container-default/src/test"
0726d4ea
JL
4085 #:tests? #f; requires plexus-archiver, which depends on this package
4086 #:phases
4087 (modify-phases %standard-phases
02ed96dc
JL
4088 (add-before 'build 'fix-google-collections
4089 (lambda _
4090 ;; Google collections are now replaced with guava
4091 (substitute* "plexus-container-default/pom.xml"
4092 (("google-collections") "guava")
4093 (("com.google.collections") "com.google.guava"))
4094 #t))
0726d4ea
JL
4095 (add-before 'build 'copy-resources
4096 (lambda _
4097 (copy-recursively
4098 "plexus-container-default/src/main/resources/"
4099 "build/classes")
02ed96dc
JL
4100 #t))
4101 (replace 'install
4102 (install-from-pom "plexus-container-default/pom.xml")))))
4103 (propagated-inputs
4104 `(("java-plexus-worldclass" ,java-plexus-classworlds)
4105 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4106 ("java-plexus-utils" ,java-plexus-utils)
4107 ("java-junit" ,java-junit)
4108 ("java-guava" ,java-guava)
4109 ("java-plexus-containers-parent-pom" ,java-plexus-containers-parent-pom)))
0726d4ea 4110 (home-page "https://github.com/codehaus-plexus/plexus-containers")
f4548394 4111 (synopsis "Inversion-of-control container")
0726d4ea 4112 (description "Plexus-default-container is Plexus' inversion-of-control
f4548394 4113(@dfn{IoC}) container. It is composed of its public API and its default
0726d4ea
JL
4114implementation.")
4115 (license license:asl2.0)))
4116
02ed96dc
JL
4117(define java-plexus-containers-parent-pom
4118 (package
4119 (inherit java-plexus-container-default-bootstrap)
4120 (name "java-plexus-containers-parent-pom")
4121 (arguments
4122 `(#:tests? #f
4123 #:phases
4124 (modify-phases %standard-phases
4125 (delete 'configure)
4126 (delete 'build)
4127 (replace 'install
4128 (install-pom-file "pom.xml")))))
4129 (propagated-inputs
4130 `(("plexus-parent-pom" ,plexus-parent-pom-4.0)))))
4131
0858b9dc
JL
4132(define-public java-plexus-io
4133 (package
4134 (name "java-plexus-io")
79265a45 4135 (version "3.2.0")
0858b9dc 4136 (source (origin
48fe942c
EF
4137 (method git-fetch)
4138 (uri (git-reference
4139 (url "https://github.com/codehaus-plexus/plexus-io")
4140 (commit (string-append "plexus-io-" version))))
4141 (file-name (git-file-name name version))
0858b9dc
JL
4142 (sha256
4143 (base32
79265a45 4144 "1r3wqfpbxq8vp4p914i8p88r0994rmcjw02hz14n11cfb6gsyvlr"))))
0858b9dc
JL
4145 (build-system ant-build-system)
4146 (arguments
4147 `(#:jar-name "plexus-io.jar"
4148 #:source-dir "src/main/java"
4149 #:test-dir "src/test"
0858b9dc
JL
4150 #:phases
4151 (modify-phases %standard-phases
4152 (add-before 'build 'copy-resources
4153 (lambda _
79265a45
JL
4154 (mkdir-p "build/classes")
4155 (copy-recursively "src/main/resources" "build/classes")
4156 (mkdir-p "build/test-classes")
4157 (copy-recursively "src/test/resources" "build/test-classes")
4158 #t))
4159 (replace 'install (install-from-pom "pom.xml")))))
4160 (propagated-inputs
4161 `(("java-plexus-utils" ,java-plexus-utils-3.3.0)
4162 ("java-commons-io" ,java-commons-io)
4163 ("plexus-parent-pom" ,plexus-parent-pom-5.1)))
0858b9dc 4164 (inputs
79265a45 4165 `(("java-jsr305" ,java-jsr305)))
0858b9dc
JL
4166 (native-inputs
4167 `(("junit" ,java-junit)
4168 ("hamcrest" ,java-hamcrest-core)
4169 ("guava" ,java-guava)
4170 ("classworlds" ,java-plexus-classworlds)
4171 ("xbean" ,java-geronimo-xbean-reflect)
4172 ("container-default" ,java-plexus-container-default-bootstrap)))
4173 (home-page "https://github.com/codehaus-plexus/plexus-io")
4174 (synopsis "I/O plexus components")
4175 (description "Plexus IO is a set of plexus components, which are designed
4176for use in I/O operations. This implementation using plexus components allows
4177reusing it in maven.")
4178 (license license:asl2.0)))
4179
b51df3ca
JL
4180(define-public java-plexus-archiver
4181 (package
4182 (name "java-plexus-archiver")
02ed96dc 4183 (version "4.2.2")
b51df3ca
JL
4184 (source (origin
4185 (method url-fetch)
4186 (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver"
4187 "/archive/plexus-archiver-" version ".tar.gz"))
4188 (sha256
4189 (base32
02ed96dc 4190 "144n971r3lfrx3l12nf2scm80x4xdvgbkk4bjpa4vcvvdrll6qys"))))
b51df3ca
JL
4191 (build-system ant-build-system)
4192 (arguments
4193 `(#:jar-name "plexus-archiver.jar"
4194 #:source-dir "src/main/java"
b51df3ca
JL
4195 #:test-dir "src/test"
4196 #:test-exclude (list "**/Abstract*.java" "**/Base*.java")
4197 #:phases
4198 (modify-phases %standard-phases
4199 (add-before 'check 'remove-failing
4200 (lambda _
4201 ;; Requires an older version of plexus container
4202 (delete-file
2c8ac364
MW
4203 "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java")
4204 #t))
6f737ae6
JL
4205 (add-before 'check 'fix-test-building
4206 (lambda _
4207 (substitute* "build.xml"
4208 (("srcdir=\"src/test\"") "srcdir=\"src/test/java\""))
4209 #t))
b51df3ca
JL
4210 (add-before 'build 'copy-resources
4211 (lambda _
02ed96dc
JL
4212 (mkdir-p "build/classes")
4213 (copy-recursively "src/main/resources" "build/classes")
4214 (mkdir-p "build/test-classes")
4215 (copy-recursively "src/test/resources" "build/test-classes")
4216 #t))
4217 (replace 'install (install-from-pom "pom.xml")))))
4218 (propagated-inputs
4219 `(("java-plexus-utils" ,java-plexus-utils-3.3.0)
4220 ("java-plexus-io" ,java-plexus-io)
4221 ("java-iq80-snappy" ,java-iq80-snappy)
4222 ("java-commons-compress" ,java-commons-compress)
4223 ("plexus-parent-pom" ,plexus-parent-pom-6.1)))
b51df3ca 4224 (inputs
02ed96dc
JL
4225 `(("java-jsr305" ,java-jsr305)
4226 ("java-plexus-container-default"
4227 ,java-plexus-container-default-bootstrap)))
b51df3ca 4228 (native-inputs
6f737ae6
JL
4229 `(("java-hamcrest-core" ,java-hamcrest-core)
4230 ("junit" ,java-junit)
b51df3ca
JL
4231 ("classworld" ,java-plexus-classworlds)
4232 ("xbean" ,java-geronimo-xbean-reflect)
d308bc01 4233 ("xz" ,java-xz)
b51df3ca
JL
4234 ("guava" ,java-guava)))
4235 (home-page "https://github.com/codehaus-plexus/plexus-archiver")
4236 (synopsis "Archiver component of the Plexus project")
4237 (description "Plexus-archiver contains a component to deal with project
4238archives (jar).")
4239 (license license:asl2.0)))
4240
a0837294
JL
4241(define-public java-plexus-container-default
4242 (package
4243 (inherit java-plexus-container-default-bootstrap)
4244 (name "java-plexus-container-default")
4245 (arguments
4246 `(#:jar-name "container-default.jar"
4247 #:source-dir "plexus-container-default/src/main/java"
4248 #:test-dir "plexus-container-default/src/test"
4249 #:test-exclude (list ;"**/*Test.java"
4250 "**/Abstract*.java"
4251 ;; Requires plexus-hierarchy
4252 "**/PlexusHierarchyTest.java"
4253 ;; Failures
4254 "**/ComponentRealmCompositionTest.java"
4255 "**/PlexusContainerTest.java")
a0837294
JL
4256 #:phases
4257 (modify-phases %standard-phases
51087d51
JL
4258 (add-before 'build 'fix-google-collections
4259 (lambda _
4260 ;; Google collections are now replaced with guava
4261 (substitute* "plexus-container-default/pom.xml"
4262 (("google-collections") "guava")
4263 (("com.google.collections") "com.google.guava"))
4264 #t))
a0837294
JL
4265 (add-before 'build 'copy-resources
4266 (lambda _
4267 (copy-recursively
4268 "plexus-container-default/src/main/resources/"
4269 "build/classes")
4270 #t))
4271 (add-before 'check 'fix-paths
4272 (lambda _
4273 (let ((dir "plexus-container-default/src/test/java/org/codehaus"))
4274 (substitute*
4275 (string-append
4276 dir "/plexus/component/composition/"
4277 "ComponentRealmCompositionTest.java")
4278 (("src/test") "plexus-container-default/src/test"))
51087d51
JL
4279 #t)))
4280 (replace 'install
4281 (install-from-pom "plexus-container-default/pom.xml")))))
a0837294
JL
4282 (inputs
4283 `(("worldclass" ,java-plexus-classworlds)
4284 ("xbean" ,java-geronimo-xbean-reflect)
4285 ("utils" ,java-plexus-utils)
4286 ("junit" ,java-junit)
4287 ("guava" ,java-guava)))
4288 (native-inputs
4289 `(("archiver" ,java-plexus-archiver)
4290 ("hamcrest" ,java-hamcrest-core)))))
4291
3214afab
JL
4292(define-public java-plexus-component-annotations
4293 (package
4294 (inherit java-plexus-container-default)
4295 (name "java-plexus-component-annotations")
4296 (arguments
4297 `(#:jar-name "plexus-component-annotations.jar"
4298 #:source-dir "plexus-component-annotations/src/main/java"
51087d51
JL
4299 #:tests? #f; no tests
4300 #:phases
4301 (modify-phases %standard-phases
4302 (replace 'install
4303 (install-from-pom "plexus-component-annotations/pom.xml")))))
4304 (propagated-inputs
4305 `(("java-plexus-containers-parent-pom" ,java-plexus-containers-parent-pom)))
3214afab
JL
4306 (inputs '())
4307 (native-inputs '())
4308 (synopsis "Plexus descriptors generator")
4309 (description "This package is a Maven plugin to generate Plexus descriptors
4310from source tags and class annotations.")))
4311
015e8774
JL
4312(define-public java-plexus-component-metadata
4313 (package
4314 (inherit java-plexus-container-default)
4315 (name "java-plexus-component-metadata")
4316 (arguments
4317 `(#:jar-name "plexus-component-metadata.jar"
4318 #:source-dir "src/main/java"
4319 #:test-dir "src/test"
4320 #:jdk ,icedtea-8
4321 #:phases
4322 (modify-phases %standard-phases
4323 (add-before 'configure 'chdir
4324 (lambda _
4325 (chdir "plexus-component-metadata")
4326 #t))
4327 (add-before 'build 'copy-resources
4328 (lambda _
4329 (copy-recursively "src/main/resources"
4330 "build/classes/")
4331 #t)))))
4332 (propagated-inputs
4333 `(("java-plexus-container-default" ,java-plexus-container-default)
4334 ("java-plexu-component-annotations" ,java-plexus-component-annotations)
4335 ("java-plexus-utils" ,java-plexus-utils)
4336 ("java-plexus-cli" ,java-plexus-cli)
4337 ("java-plexus-classworlds" ,java-plexus-classworlds)
4338 ("maven-plugin-api" ,maven-plugin-api)
4339 ("maven-plugin-annotations" ,maven-plugin-annotations)
4340 ("maven-core-bootstrap" ,maven-core-bootstrap)
4341 ("maven-model" ,maven-model)
4342 ("java-commons-cli" ,java-commons-cli)
4343 ("java-qdox" ,java-qdox)
4344 ("java-jdom2" ,java-jdom2)
4345 ("java-asm" ,java-asm)))
4346 (native-inputs
4347 `(("java-junit" ,java-junit)
4348 ("java-guava" ,java-guava)
4349 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)))
4350 (synopsis "Inversion-of-control container for Maven")
4351 (description "The Plexus project provides a full software stack for creating
4352and executing software projects. Based on the Plexus container, the
4353applications can utilise component-oriented programming to build modular,
4354reusable components that can easily be assembled and reused. This package
4355provides the Maven plugin generating the component metadata.")))
4356
4f77ba17
JL
4357(define-public java-plexus-cipher
4358 (package
4359 (name "java-plexus-cipher")
4360 (version "1.7")
4361 (source (origin
d0e64613
EF
4362 (method git-fetch)
4363 (uri (git-reference
4364 (url "https://github.com/codehaus-plexus/plexus-cipher")
4365 (commit (string-append "plexus-cipher-" version))))
4366 (file-name (git-file-name name version))
4f77ba17
JL
4367 (sha256
4368 (base32
d0e64613 4369 "0m638nzlxbmnbcj5cwdpgs326ab584yv0k803zlx37r6iqwvf6b0"))))
4f77ba17
JL
4370 (build-system ant-build-system)
4371 (arguments
4372 `(#:jar-name "plexus-cipher.jar"
4373 #:source-dir "src/main/java"
4f77ba17
JL
4374 #:tests? #f; FIXME: requires sisu-inject-bean
4375 #:phases
4376 (modify-phases %standard-phases
4377 (add-before 'build 'copy-resources
4378 (lambda _
4379 (copy-recursively "src/main/resources" "build/classes")
4380 (mkdir-p "build/classes/META-INF/sisu")
4381 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
4382 (lambda _
4383 (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
51087d51
JL
4384 #t))
4385 (add-before 'install 'fix-test-dependency
4386 (lambda _
4387 ;; sisu-inject-bean is only used for tests, but its scope is "provided".
4388 (substitute* "pom.xml"
4389 (("provided") "test"))
4390 #t))
4391 (replace 'install (install-from-pom "pom.xml")))))
4f77ba17
JL
4392 (inputs
4393 `(("java-cdi-api" ,java-cdi-api)
4394 ("java-javax-inject" ,java-javax-inject)))
51087d51
JL
4395 (propagated-inputs
4396 `(("java-sonatype-spice-parent-pom" ,java-sonatype-spice-parent-pom-15)))
4397 (native-inputs
4398 `(("java-junit" ,java-junit)))
4f77ba17
JL
4399 (home-page "https://github.com/sonatype/plexus-cipher")
4400 (synopsis "Encryption/decryption Component")
4401 (description "Plexus-cipher contains a component to deal with encryption
4402and decryption.")
4403 (license license:asl2.0)))
4404
8630a080
JL
4405(define-public java-plexus-java
4406 (package
4407 (name "java-plexus-java")
4408 (version "0.9.10")
4409 (source (origin
4410 (method git-fetch)
4411 (uri (git-reference
4412 (url "https://github.com/codehaus-plexus/plexus-languages")
4413 (commit (string-append "plexus-languages-" version))))
4414 (file-name (git-file-name name version))
4415 (sha256
4416 (base32
4417 "0vmvgq5hfxs90yyxgssfpwq78l7vwx1ljwpkk594mrdr8sm668b5"))
4418 (modules '((guix build utils)))
4419 (snippet
4420 `(begin
4421 (for-each delete-file (find-files "." ".*.jar$"))
4422 #t))))
4423 (build-system ant-build-system)
4424 (arguments
4425 `(#:jar-name "plexus-java.java"
4426 #:source-dir "plexus-java/src/main/java"
4427 #:test-dir "plexus-java/src/test"
4428 #:tests? #f; require mockito 2
4429 #:phases
4430 (modify-phases %standard-phases
4431 (add-after 'build 'generate-metadata
4432 (lambda _
4433 (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes")
4434 "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli"
4435 "--source" "plexus-java/src/main/java"
4436 "--output" "build/classes/META-INF/plexus/components.xml"
4437 "--classes" "build/classes"
4438 "--descriptors" "build/classes/META-INF")
4439 (invoke "ant" "jar")
4440 #t))
4441 (add-before 'install 'install-parent
4442 (install-pom-file "pom.xml"))
4443 (replace 'install
4444 (install-from-pom "plexus-java/pom.xml")))))
4445 (propagated-inputs
4446 `(("java-asm" ,java-asm)
4447 ("java-qdox" ,java-qdox-2-M9)
4448 ("java-javax-inject" ,java-javax-inject)
4449 ("plexus-parent-pom" ,plexus-parent-pom-4.0)))
4450 (inputs
4451 `(("java-plexus-component-annotations" ,java-plexus-component-annotations)))
4452 (native-inputs
4453 `(("java-plexus-component-metadata" ,java-plexus-component-metadata)
4454 ("java-junit" ,java-junit)))
4455 (home-page "https://codehaus-plexus.github.io/plexus-languages/plexus-java")
4456 (synopsis "Shared language features for Java")
4457 (description "This package contains shared language features of the Java
4458language, for the plexus project.")
4459 (license license:asl2.0)))
4460
239126d4
JL
4461(define-public java-plexus-compiler-api
4462 (package
4463 (name "java-plexus-compiler-api")
a70182b0 4464 (version "2.8.4")
239126d4 4465 (source (origin
5723137a
EF
4466 (method git-fetch)
4467 (uri (git-reference
4468 (url "https://github.com/codehaus-plexus/plexus-compiler")
4469 (commit (string-append "plexus-compiler-" version))))
4470 (file-name (git-file-name name version))
239126d4
JL
4471 (sha256
4472 (base32
5723137a 4473 "1nq1gnn3s6z1j29gmi1hqbklsmm8b1lmnafb0191914f95mn18gk"))))
239126d4
JL
4474 (build-system ant-build-system)
4475 (arguments
4476 `(#:jar-name "plexus-compiler-api.jar"
4477 #:source-dir "plexus-compiler-api/src/main/java"
90a1d04c
JL
4478 #:test-dir "plexus-compiler-api/src/test"
4479 #:phases
4480 (modify-phases %standard-phases
4481 (replace 'install
4482 (install-from-pom "plexus-compiler-api/pom.xml")))))
4483 (propagated-inputs
239126d4 4484 `(("java-plexus-container-default" ,java-plexus-container-default)
90a1d04c 4485 ("java-plexus-compiler-pom" ,java-plexus-compiler-pom)
239126d4
JL
4486 ("java-plexus-util" ,java-plexus-utils)))
4487 (native-inputs
4488 `(("java-junit" ,java-junit)))
4489 (home-page "https://github.com/codehaus-plexus/plexus-compiler")
4490 (synopsis "Plexus Compilers component's API to manipulate compilers")
4491 (description "This package contains the API used by components to manipulate
4492compilers.")
4493 (license (list license:asl2.0
4494 license:expat))))
4495
90a1d04c
JL
4496(define java-plexus-compiler-pom
4497 (package
4498 (inherit java-plexus-compiler-api)
4499 (name "java-plexus-compiler-pom")
4500 (arguments
4501 `(#:tests? #f
4502 #:phases
4503 (modify-phases %standard-phases
4504 (delete 'configure)
4505 (delete 'build)
4506 (replace 'install
4507 (install-pom-file "pom.xml"))
4508 (add-after 'install 'install-compilers
4509 (install-pom-file "plexus-compilers/pom.xml")))))
4510 (propagated-inputs
4511 `(("plexus-components-parent-pom-4.0" ,plexus-components-parent-pom-4.0)))))
4512
4513(define plexus-components-parent-pom-4.0
4514 (package
4515 (name "plexus-components-parent-pom")
4516 (version "4.0")
4517 (source (origin
4518 (method git-fetch)
4519 (uri (git-reference
4520 (url "https://github.com/codehaus-plexus/plexus-components")
4521 (commit (string-append "plexus-components-" version))))
5723137a 4522 (file-name (git-file-name name version))
239126d4
JL
4523 (sha256
4524 (base32
90a1d04c 4525 "041bm8yv0m2i17mqg8zljib4ykpha7ijls2qfdwvkma4d39lhysi"))))
239126d4
JL
4526 (build-system ant-build-system)
4527 (arguments
90a1d04c
JL
4528 `(#:tests? #f
4529 #:phases
4530 (modify-phases %standard-phases
4531 (delete 'configure)
4532 (delete 'build)
4533 (replace 'install
4534 (install-pom-file "pom.xml")))))
4535 (propagated-inputs
4536 `(("plexus-parent-pom-4.0" ,plexus-parent-pom-4.0)))
4537 (home-page "https://codehaus-plexus.github.io/plexus-components")
4538 (synopsis "Plexus parent pom")
4539 (description "This package contains the Plexus components parent POM.")
4540 (license license:asl2.0)))
4541
4542(define-public java-plexus-compiler-manager
4543 (package
4544 (inherit java-plexus-compiler-api)
4545 (name "java-plexus-compiler-manager")
4546 (arguments
4547 `(#:jar-name "compiler-compiler-manager.java"
4548 #:source-dir "plexus-compiler-manager/src/main/java"
4549 #:test-dir "plexus-compiler-manager/src/test"
4550 #:tests? #f
4551 #:phases
4552 (modify-phases %standard-phases
4553 (add-after 'build 'generate-metadata
4554 (lambda _
4555 (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes")
4556 "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli"
4557 "--source" "plexus-compiler-manager/src/main/java"
4558 "--output" "build/classes/META-INF/plexus/components.xml"
4559 "--classes" "build/classes"
4560 "--descriptors" "build/classes/META-INF")
4561 (invoke "ant" "jar")
4562 #t))
4563 (add-after 'generate-metadata 'rebuild
4564 (lambda _
4565 (invoke "ant" "jar")
4566 #t))
4567 (replace 'install
4568 (install-from-pom "plexus-compiler-manager/pom.xml")))))
4569 (propagated-inputs
4570 `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
4571 ("java-plexus-compiler-pom" ,java-plexus-compiler-pom)
4572 ("java-plexus-container-default" ,java-plexus-container-default)))
239126d4 4573 (native-inputs
90a1d04c
JL
4574 `(("unzip" ,unzip)
4575 ("java-plexus-component-metadata" ,java-plexus-component-metadata)))
4576 (synopsis "Compiler management for Plexus Compiler component")
4577 (description "Plexus Compiler is a Plexus component to use different
4578compilers through a uniform API. This component chooses the compiler
4579implementation to use in a project.")))
239126d4 4580
f8a519fa
JL
4581(define-public java-plexus-compiler-javac
4582 (package
4583 (inherit java-plexus-compiler-api)
4584 (name "java-plexus-compiler-javac")
4585 (arguments
4586 `(#:jar-name "plexus-compiler-javac.jar"
4587 #:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java"
4588 #:jdk ,icedtea-8
4589 #:tests? #f; depends on compiler-test -> maven-core -> ... -> this package.
90a1d04c
JL
4590 #:test-dir "plexus-compilers/plexus-compiler-javac/src/test"
4591 #:modules ((guix build ant-build-system)
4592 (guix build utils)
4593 (guix build java-utils)
4594 (sxml simple))
4595 #:phases
4596 (modify-phases %standard-phases
4597 ;; We cannot use java-plexus-component-metadata to generate the metadata
4598 ;; because it ultimately depends on this package.
4599 ;; Create it manually instead
4600 (add-before 'build 'create-metadata
4601 (lambda _
4602 (let* ((dir "build/classes/META-INF/plexus")
4603 (file (string-append dir "/components.xml")))
4604 (mkdir-p dir)
4605 (with-output-to-file file
4606 (lambda _
4607 (sxml->xml
4608 `(component-set
4609 (components
4610 (component
4611 (role "org.codehaus.plexus.compiler.Compiler")
4612 (role-hint "javac")
4613 (implementation "org.codehaus.plexus.compiler.javac.JavacCompiler")
4614 (isolated-realm "false"))))))))
4615 #t))
4616 (replace 'install
4617 (install-from-pom "plexus-compilers/plexus-compiler-javac/pom.xml")))))
4618 (propagated-inputs
f8a519fa
JL
4619 `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
4620 ("java-plexus-utils" ,java-plexus-utils)
4621 ("java-plexus-container-default" ,java-plexus-container-default)))
f8a519fa
JL
4622 (synopsis "Javac Compiler support for Plexus Compiler component")
4623 (description "This package contains the Javac Compiler support for Plexus
4624Compiler component.")))
4625
6a25a3b1
JL
4626(define plexus-components-pom-1.1.20
4627 (package
4628 (name "plexus-components-pom-1.1.20")
4629 (version "1.1.20")
4630 (source (origin
4631 (method git-fetch)
4632 (uri (git-reference
4633 (url "https://github.com/codehaus-plexus/plexus-components")
4634 (commit (string-append "plexus-components-" version))))
4635 (file-name (git-file-name name version))
4636 (sha256
4637 (base32
4638 "1q254k95m9icyfsvaw8c226midg8v6v436wvivhv7im825mnp5yb"))))
4639 (build-system ant-build-system)
4640 (arguments
4641 `(#:tests? #f
4642 #:phases
4643 (modify-phases %standard-phases
4644 (delete 'configure)
4645 (delete 'build)
4646 (replace 'install
4647 (install-pom-file "pom.xml")))))
4648 (propagated-inputs
4649 `(("plexus-parent-pom" ,plexus-parent-pom-3.1)))
4650 (home-page "https://github.com/codehaus-plexus/plexus-components")
4651 (synopsis "Maven parent pom for plexus packages")
4652 (description "This package contains the parent pom for plexus component
4653packages.")
4654 (license license:asl2.0)))
4655
4656(define-public java-plexus-digest
4657 (package
4658 (name "java-plexus-digest")
4659 (version "1.2")
4660 (source (origin
4661 (method git-fetch)
4662 (uri (git-reference
4663 (url "https://github.com/codehaus-plexus/plexus-digest")
4664 (commit "2a52ad1bda8297fa0e287163d2fa37245ec6a430")))
4665 (file-name (git-file-name name version))
4666 (sha256
4667 (base32
4668 "19w5wxsliz8r42niry68qa665kvjsb8081dazg9vgd3pca72w07x"))))
4669 (build-system ant-build-system)
4670 (arguments
4671 `(#:jar-name "plexus-digest.jar"
4672 #:source-dir "src/main/java"
4673 #:tests? #f
4674 #:phases
4675 (modify-phases %standard-phases
4676 (replace 'install
4677 (install-from-pom "pom.xml")))))
4678 (propagated-inputs
4679 `(("java-plexus-utils" ,java-plexus-utils)
4680 ("plexus-components-pom-1.1.20" ,plexus-components-pom-1.1.20)))
4681 (native-inputs
4682 `(("java-junit" ,java-junit)))
4683 (home-page "https://github.com/codehaus-plexus/plexus-digest")
4684 (synopsis "Hash function utilities for Java")
4685 (description "This package is a plexus component that contains hash
4686function utilities.")
4687 (license license:asl2.0)))
4688
0aa85081
JL
4689(define-public java-plexus-sec-dispatcher
4690 (package
4691 (name "java-plexus-sec-dispatcher")
4692 (version "1.4") ;; Newest release listed at the Maven Central Repository.
4693 (source (origin
4694 ;; This project doesn't tag releases or publish tarballs, so we take
4695 ;; the "prepare release plexus-sec-dispatcher-1.4" git commit.
d9e356a8
EF
4696 (method git-fetch)
4697 (uri (git-reference
4698 (url "https://github.com/sonatype/plexus-sec-dispatcher/")
4699 (commit "7db8f880486e192a1c5ea9544e01e756c3d49d0f")))
0aa85081
JL
4700 (sha256
4701 (base32
d9e356a8
EF
4702 "1ng4yliy4cqpjr4fxxjbpwyk1wkch5f8vblm1kvwf328s4gibszs"))
4703 (file-name (git-file-name name version))))
0aa85081
JL
4704 (arguments
4705 `(#:jar-name "plexus-sec-dispatcher.jar"
4706 #:source-dir "src/main/java"
0aa85081
JL
4707 #:phases
4708 (modify-phases %standard-phases
4709 (add-before 'build 'generate-models
4710 (lambda* (#:key inputs #:allow-other-keys)
4711 (define (modello-single-mode file version mode)
2c8ac364
MW
4712 (invoke "java"
4713 "org.codehaus.modello.ModelloCli"
4714 file mode "src/main/java" version
4715 "false" "true"))
0aa85081 4716 (let ((file "src/main/mdo/settings-security.mdo"))
0aa85081
JL
4717 (modello-single-mode file "1.0.0" "java")
4718 (modello-single-mode file "1.0.0" "xpp3-reader")
2c8ac364
MW
4719 (modello-single-mode file "1.0.0" "xpp3-writer"))
4720 #t))
0aa85081
JL
4721 (add-before 'build 'generate-components.xml
4722 (lambda _
4723 (mkdir-p "build/classes/META-INF/plexus")
4724 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
4725 (lambda _
4726 (display
4727 "<component-set>\n
4728 <components>\n
4729 <component>\n
4730 <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n
4731 <role-hint>default</role-hint>\n
4732 <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n
4733 <description></description>\n
4734 <requirements>\n
4735 <requirement>\n
4736 <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n
4737 <field-name>_cipher</field-name>\n
4738 </requirement>\n
4739 <requirement>\n
4740 <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n
4741 <field-name>_decryptors</field-name>\n
4742 </requirement>\n
4743 </requirements>\n
4744 <configuration>\n
4745 <_configuration-file>~/.settings-security.xml</_configuration-file>\n
4746 </configuration>\n
4747 </component>\n
4748 </components>\n
2c8ac364
MW
4749</component-set>\n")))
4750 #t))
0aa85081
JL
4751 (add-before 'check 'fix-paths
4752 (lambda _
2c8ac364 4753 (copy-recursively "src/test/resources" "target")
51087d51
JL
4754 #t))
4755 (replace 'install (install-from-pom "pom.xml")))))
4756 (propagated-inputs
4757 `(("java-plexus-utils" ,java-plexus-utils)
4758 ("java-plexus-cipher" ,java-plexus-cipher)
4759 ("java-sonatype-spice-parent-pom" ,java-sonatype-spice-parent-pom-12)))
0aa85081
JL
4760 (native-inputs
4761 `(("java-modello-core" ,java-modello-core)
4762 ;; for modello:
4763 ("java-plexus-container-default" ,java-plexus-container-default)
4764 ("java-plexus-classworlds" ,java-plexus-classworlds)
4765 ("java-plexus-utils" ,java-plexus-utils)
4766 ("java-guava" ,java-guava)
4767 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4768 ("java-sisu-build-api" ,java-sisu-build-api)
4769 ;; modello plugins:
4770 ("java-modellop-plugins-java" ,java-modello-plugins-java)
4771 ("java-modellop-plugins-xml" ,java-modello-plugins-xml)
4772 ("java-modellop-plugins-xpp3" ,java-modello-plugins-xpp3)
4773 ;; for tests
4774 ("java-junit" ,java-junit)))
4775 (build-system ant-build-system)
4776 (home-page "https://github.com/sonatype/plexus-sec-dispatcher")
4777 (synopsis "Plexus Security Dispatcher Component")
4778 (description "This package is the Plexus Security Dispatcher Component.
4779This component decrypts a string passed to it.")
4780 (license license:asl2.0)))
4781
7d65489f
JL
4782(define-public java-plexus-cli
4783 (package
4784 (name "java-plexus-cli")
4785 (version "1.7")
4786 (source (origin
4787 (method git-fetch)
4788 (uri (git-reference
4789 (url "https://github.com/sonatype/plexus-cli")
4790 (commit "a776afa6bca84e5107bedb69440329cdb24ed645")))
4791 (file-name (string-append name "-" version))
4792 (sha256
4793 (base32
4794 "0xjrlay605rypv3zd7y24vlwf0039bil3n2cqw54r1ddpysq46vx"))))
4795 (build-system ant-build-system)
4796 (arguments
4797 `(#:jar-name "plexus-cli.jar"
4798 #:source-dir "src/main/java"
4799 #:jdk ,icedtea-8
4800 #:test-dir "src/test"))
4801 (inputs
4802 `(("java-commons-cli" ,java-commons-cli)
4803 ("java-plexus-container-default" ,java-plexus-container-default)
4804 ("java-plexus-classworlds" ,java-plexus-classworlds)))
4805 (native-inputs
4806 `(("java-plexus-utils" ,java-plexus-utils)
4807 ("java-junit" ,java-junit)
4808 ("java-guava" ,java-guava)))
4809 (home-page "https://codehaus-plexus.github.io/plexus-cli")
4810 (synopsis "CLI building library for plexus")
4811 (description "This package is a library to help creating CLI around
4812Plexus components.")
4813 (license license:asl2.0)))
4814
8f524749
JL
4815(define-public java-sisu-build-api
4816 (package
4817 (name "java-sisu-build-api")
4818 (version "0.0.7")
4819 (source (origin
16c62763
EF
4820 (method git-fetch)
4821 (uri (git-reference
4822 (url "https://github.com/sonatype/sisu-build-api")
4823 (commit (string-append "plexus-build-api-" version))))
4824 (file-name (git-file-name name version))
8f524749
JL
4825 (sha256
4826 (base32
16c62763 4827 "1d5w6c58gkx30d51v7qwv1xrhc0ly76848gihmgshj19yf6yhca0"))))
8f524749
JL
4828 (build-system ant-build-system)
4829 (arguments
4830 `(#:jar-name "sisu-build-api.jar"
4831 #:source-dir "src/main/java"
4832 #:jdk ,icedtea-8
4833 #:tests? #f; FIXME: how to run the tests?
4834 #:phases
4835 (modify-phases %standard-phases
4836 (add-before 'build 'copy-resources
4837 (lambda _
4838 (copy-recursively "src/main/resources" "build/classes")
4839 (substitute* (find-files "build/classes")
4840 (("\\$\\{project.version\\}") ,version))
4841 #t))
4842 (add-before 'build 'generate-plexus-compontent
4843 (lambda _
4844 (mkdir-p "build/classes/META-INF/plexus")
4845 ;; This file is required for plexus to inject this package.
4846 ;; FIXME: how is it generated?
4847 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
4848 (lambda _
4849 (display
4850 "<component-set>\n
4851 <components>\n
4852 <component>\n
4853 <role>org.sonatype.plexus.build.incremental.BuildContext</role>\n
4854 <role-hint>default</role-hint>\n
4855 <implementation>org.sonatype.plexus.build.incremental.DefaultBuildContext</implementation>\n
4856 <description>Filesystem based non-incremental build context implementation\n
4857which behaves as if all files were just created.</description>\n
4858 </component>\n
4859 </components>\n
4860</component-set>\n")))
f0e3e6ca
JL
4861 #t))
4862 (replace 'install
4863 (install-from-pom "pom.xml")))))
8f524749
JL
4864 (inputs
4865 `(("java-plexus-utils" ,java-plexus-utils)
4866 ("java-plexus-container-default" ,java-plexus-container-default)))
4867 (home-page "https://github.com/sonatype/sisu-build-api/")
4868 (synopsis "Base build API for maven")
4869 (description "This package contains the base build API for maven and
4870a default implementation of it. This API is about scanning files in a
4871project and determining what files need to be rebuilt.")
4872 (license license:asl2.0)))
4873
b26c8b61
JL
4874(define-public java-modello-core
4875 (package
4876 (name "java-modello-core")
4877 (version "1.9.1")
4878 (source (origin
df9487c5
EF
4879 (method git-fetch)
4880 (uri (git-reference
4881 (url "https://github.com/codehaus-plexus/modello")
4882 (commit (string-append "modello-" version))))
4883 (file-name (git-file-name name version))
b26c8b61
JL
4884 (sha256
4885 (base32
df9487c5 4886 "1di6ni42aqllpdvkpyfcw70352vr2i8wf6hd5nhd9kmqjb5dj5j4"))))
b26c8b61
JL
4887 (build-system ant-build-system)
4888 (arguments
4889 `(#:jar-name "modello-core.jar"
4890 #:source-dir "modello-core/src/main/java"
4891 #:test-dir "modello-core/src/test"
4892 #:main-class "org.codehaus.modello.ModelloCli"
4893 #:jdk ,icedtea-8
4894 #:phases
4895 (modify-phases %standard-phases
4896 (add-before 'build 'copy-resources
4897 (lambda _
4898 (mkdir-p "build/classes/META-INF/plexus")
4899 (copy-file "modello-core/src/main/resources/META-INF/plexus/components.xml"
4900 "build/classes/META-INF/plexus/components.xml")
4901 #t))
4902 (add-before 'check 'fix-tests
4903 (lambda _
4904 (with-directory-excursion "modello-core/src/test/java/org/codehaus"
4905 (substitute* '("modello/core/DefaultModelloCoreTest.java"
4906 "modello/core/io/ModelReaderTest.java")
4907 (("src/test") "modello-core/src/test")))
4908 #t)))))
29534ff7 4909 (propagated-inputs
b26c8b61
JL
4910 `(("java-plexus-utils" ,java-plexus-utils)
4911 ("java-plexus-container-default" ,java-plexus-container-default)
4912 ("java-sisu-build-api" ,java-sisu-build-api)))
4913 (native-inputs
4914 `(("java-junit" ,java-junit)
4915 ("java-plexus-classworlds" ,java-plexus-classworlds)
4916 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4917 ("java-guava" ,java-guava)))
7942a129 4918 (home-page "https://codehaus-plexus.github.io/modello/")
b26c8b61
JL
4919 (synopsis "Framework for code generation from a simple model")
4920 (description "Modello is a framework for code generation from a simple model.
4921
4922Modello generates code from a simple model format: based on a plugin
4923architecture, various types of code and descriptors can be generated from the
4924single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers,
4925XSD and documentation.")
4926 (license (list
4927 license:expat
4928 ;; Although this package uses only files licensed under expat,
4929 ;; other parts of the source are licensed under different
4930 ;; licenses. We include them to be inherited by other packages.
4931 license:asl2.0
4932 ;; Some files in modello-plugin-java are licensed under a
4933 ;; 5-clause BSD license.
4934 (license:non-copyleft
4935 (string-append "file:///modello-plugins/modello-plugin-java/"
4936 "src/main/java/org/codehaus/modello/plugin/"
4937 "java/javasource/JNaming.java"))))))
4938
fc620bef
JL
4939(define-public java-modello-plugins-java
4940 (package
4941 (inherit java-modello-core)
4942 (name "java-modello-plugins-java")
4943 (arguments
4944 `(#:jar-name "modello-plugins-java.jar"
4945 #:source-dir "modello-plugins/modello-plugin-java/src/main/java"
4946 #:test-dir "modello-plugins/modello-plugin-java/src/test"
4947 #:jdk ,icedtea-8
4948 #:tests? #f; requires maven-model, which depends on this package
4949 #:phases
4950 (modify-phases %standard-phases
4951 (add-before 'build 'copy-resources
4952 (lambda _
4953 (mkdir-p "build/classes")
4954 (copy-recursively "modello-plugins/modello-plugin-java/src/main/resources"
4955 "build/classes")
4956 #t)))))
4957 (inputs
29534ff7 4958 `(("java-modello-core" ,java-modello-core)))
fc620bef
JL
4959 (synopsis "Modello Java Plugin")
4960 (description "Modello Java Plugin generates Java objects for the model.")))
4961
a0ce95ba
JL
4962(define-public java-modello-plugins-xml
4963 (package
4964 (inherit java-modello-core)
4965 (name "java-modello-plugins-xml")
4966 (arguments
4967 `(#:jar-name "modello-plugins-xml.jar"
4968 #:source-dir "modello-plugins/modello-plugin-xml/src/main/java"
4969 #:test-dir "modello-plugins/modello-plugin-xml/src/test"
4970 #:jdk ,icedtea-8
4971 #:phases
4972 (modify-phases %standard-phases
4973 (add-before 'build 'copy-resources
4974 (lambda _
4975 (mkdir-p "build/classes")
4976 (copy-recursively
4977 "modello-plugins/modello-plugin-xml/src/main/resources"
4978 "build/classes")
4979 #t))
4980 (add-before 'check 'fix-paths
4981 (lambda _
4982 (with-directory-excursion "modello-plugins/modello-plugin-xml/src/test"
4983 (substitute*
4984 "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java"
2c8ac364
MW
4985 (("src/test") "modello-plugins/modello-plugin-xml/src/test")))
4986 #t)))))
29534ff7 4987 (propagated-inputs
a0ce95ba 4988 `(("java-modello-core" ,java-modello-core)
29534ff7 4989 ("java-modello-plugins-java" ,java-modello-plugins-java)))
a0ce95ba
JL
4990 (synopsis "Modello XML Plugin")
4991 (description "Modello XML Plugin contains shared code for every plugins
4992working on XML representation of the model.")))
4993
e4708560
JL
4994(define-public java-modello-test
4995 (package
4996 (inherit java-modello-core)
4997 (name "java-modello-test")
4998 (arguments
4999 `(#:jar-name "modello-test.jar"
5000 #:source-dir "modello-test/src/main/java"
5001 #:tests? #f; no tests
5002 #:jdk ,icedtea-8))
5003 (inputs
5004 `(("java-plexus-utils" ,java-plexus-utils)
5005 ("java-plexus-compiler-api" ,java-plexus-compiler-api)
5006 ("java-plexus-compiler-javac" ,java-plexus-compiler-javac)
5007 ("java-plexus-container-default" ,java-plexus-container-default)))
5008 (synopsis "Modello test package")
5009 (description "The modello test package contains the basis to create
5010Modello generator unit-tests, including sample models and xml files to test
5011every feature for every plugin.")))
5012
36607d3b
JL
5013(define-public java-modello-plugins-xpp3
5014 (package
5015 (inherit java-modello-core)
5016 (name "java-modello-plugins-xpp3")
5017 (arguments
5018 `(#:jar-name "modello-plugins-xpp3.jar"
5019 #:source-dir "modello-plugins/modello-plugin-xpp3/src/main/java"
5020 #:test-dir "modello-plugins/modello-plugin-xpp3/src/test"
5021 ;; One of the test dependencies is maven-model which depends on this package.
5022 #:tests? #f
5023 #:jdk ,icedtea-8
5024 #:phases
5025 (modify-phases %standard-phases
5026 (add-before 'build 'copy-resources
5027 (lambda _
5028 (mkdir-p "build/classes")
5029 (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources"
5030 "build/classes")
5031 #t)))))
29534ff7 5032 (propagated-inputs
36607d3b
JL
5033 `(("java-modello-core" ,java-modello-core)
5034 ("java-modello-plugins-java" ,java-modello-plugins-java)
29534ff7 5035 ("java-modello-plugins-xml" ,java-modello-plugins-xml)))
36607d3b
JL
5036 (native-inputs
5037 `(("java-xmlunit" ,java-xmlunit)
5038 ("java-modello-test" ,java-modello-test)
5039 ,@(package-native-inputs java-modello-core)))
5040 (synopsis "Modello XPP3 Plugin")
5041 (description "The modello XPP3 plugin generates XML readers and writers based
5042on the XPP3 API (XML Pull Parser).")))
5043
8f8ed9aa
RW
5044(define-public java-asm
5045 (package
5046 (name "java-asm")
d0e9ded7 5047 (version "6.0")
8f8ed9aa
RW
5048 (source (origin
5049 (method url-fetch)
654f997d 5050 (uri (string-append "https://download.forge.ow2.org/asm/"
8f8ed9aa
RW
5051 "asm-" version ".tar.gz"))
5052 (sha256
5053 (base32
d0e9ded7 5054 "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00"))))
8f8ed9aa
RW
5055 (build-system ant-build-system)
5056 (arguments
5057 `(#:build-target "compile"
5058 ;; The tests require an old version of Janino, which no longer compiles
5059 ;; with the JDK7.
5060 #:tests? #f
d0e9ded7
GB
5061 #:make-flags
5062 (list
5063 ;; We don't need these extra ant tasks, but the build system asks us to
5064 ;; provide a path anyway.
5065 "-Dobjectweb.ant.tasks.path=dummy-path"
5066 ;; The java-aqute.bndlib JAR file will be put onto the classpath and
5067 ;; used during the build automatically by ant-build-system, but
5068 ;; java-asm's build.xml fails unless we provide something here.
5069 "-Dbiz.aQute.bnd.path=dummy-path")
8f8ed9aa
RW
5070 #:phases
5071 (modify-phases %standard-phases
30b7704a
JL
5072 (add-before 'build 'remove-bnd-dependency
5073 (lambda _
5074 ;; This file is the only one to require bnd, and is not needed
5075 ;; because we don't build a bundle.
5076 (delete-file "src/org/objectweb/asm/tools/ModuleInfoBndPlugin.java")
5077 #t))
8f8ed9aa
RW
5078 (add-before 'install 'build-jars
5079 (lambda* (#:key make-flags #:allow-other-keys)
5080 ;; We cannot use the "jar" target because it depends on a couple
5081 ;; of unpackaged, complicated tools.
5082 (mkdir "dist")
2c8ac364
MW
5083 (invoke "jar"
5084 "-cf" (string-append "dist/asm-" ,version ".jar")
5085 "-C" "output/build/tmp" ".")))
51087d51
JL
5086 (add-before 'install 'fix-pom
5087 (lambda _
5088 (substitute* (find-files "archive" "\\.pom$")
5089 (("@product.artifact@") ,version))
5090 #t))
5091 (add-before 'install 'install-parent
5092 (install-pom-file "archive/asm-parent.pom"))
8f8ed9aa 5093 (replace 'install
51087d51 5094 (install-from-pom "archive/asm.pom")))))
8f8ed9aa
RW
5095 (native-inputs
5096 `(("java-junit" ,java-junit)))
51087d51
JL
5097 (propagated-inputs
5098 `(("java-org-ow2-parent-pom" ,java-org-ow2-parent-pom-1.3)))
1e4ae551 5099 (home-page "https://asm.ow2.io/")
8f8ed9aa
RW
5100 (synopsis "Very small and fast Java bytecode manipulation framework")
5101 (description "ASM is an all purpose Java bytecode manipulation and
5102analysis framework. It can be used to modify existing classes or dynamically
5103generate classes, directly in binary form. The provided common
a4cb4d17 5104transformations and analysis algorithms allow easily assembling custom
8f8ed9aa
RW
5105complex transformations and code analysis tools.")
5106 (license license:bsd-3)))
607fe24a 5107
51087d51
JL
5108(define java-org-ow2-parent-pom-1.3
5109 (package
5110 (name "java-org-ow2-parent-pom")
5111 (version "1.3")
5112 (source (origin
5113 (method url-fetch)
5114 (uri "https://repo1.maven.org/maven2/org/ow2/ow2/1.3/ow2-1.3.pom")
5115 (sha256
5116 (base32
5117 "1yr8hfx8gffpppa4ii6cvrsq029a6x8hzy7nsavxhs60s9kmq8ai"))))
5118 (build-system ant-build-system)
5119 (arguments
5120 `(#:tests? #f
5121 #:phases
5122 (modify-phases %standard-phases
5123 (delete 'unpack)
5124 (delete 'build)
5125 (delete 'configure)
5126 (replace 'install
5127 (install-pom-file (assoc-ref %build-inputs "source"))))))
5128 (home-page "https://ow2.org")
5129 (synopsis "Ow2.org parent pom")
5130 (description "This package contains the parent pom for projects from ow2.org,
5131including java-asm.")
5132 (license license:lgpl2.1+)))
5133
bfb4004d
GB
5134(define java-asm-bootstrap
5135 (package
5136 (inherit java-asm)
5137 (name "java-asm-bootstrap")
5138 (arguments
5139 (substitute-keyword-arguments (package-arguments java-asm)
5140 ((#:tests? _) #f)))
30b7704a 5141 (native-inputs `())))
bfb4004d 5142
fafd543f
JL
5143(define-public java-asm-8
5144 (package
5145 (inherit java-asm)
5146 (version "8.0.1")
5147 (source (origin
5148 (method git-fetch)
5149 (uri (git-reference
5150 (url "https://gitlab.ow2.org/asm/asm")
5151 (commit (string-append
5152 "ASM_" (string-join (string-split version #\.)
5153 "_")))))
5154 (file-name (git-file-name "java-asm" version))
5155 (sha256
5156 (base32
5157 "1s6j27zc1i76gh891w2g48b1c3abp9w8zp5j54yb1vm5h8djkd69"))))
5158 (arguments
5159 `(#:jar-name "asm8.jar"
5160 #:source-dir "asm/src/main/java"
5161 #:test-dir "asm/src/test"
5162 ;; tests depend on junit5
5163 #:tests? #f))
5164 (propagated-inputs '())
5165 (native-inputs '())))
5166
d9d42624
JL
5167(define-public java-asm-tree-8
5168 (package
5169 (inherit java-asm-8)
5170 (name "java-asm-tree")
5171 (arguments
5172 `(#:jar-name "asm-tree.jar"
5173 #:source-dir "asm-tree/src/main/java"
5174 #:test-dir "asm-tree/src/test"
5175 ;; tests depend on junit5
5176 #:tests? #f))
5177 (inputs
5178 `(("java-asm" ,java-asm-8)))))
5179
607fe24a
RW
5180(define-public java-cglib
5181 (package
5182 (name "java-cglib")
5183 (version "3.2.4")
5c44505b
TGR
5184 (source
5185 (origin
5186 (method git-fetch)
5187 (uri (git-reference
b0e7b699 5188 (url "https://github.com/cglib/cglib")
5c44505b
TGR
5189 (commit (string-append
5190 "RELEASE_"
5191 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
5192 version)))))
5193 (file-name (git-file-name name version))
5194 (sha256
5195 (base32 "186451jms2zfp47yd8kxd77az2cqal1my2br7klgyp8fpl4qfg8v"))))
607fe24a
RW
5196 (build-system ant-build-system)
5197 (arguments
5198 `(;; FIXME: tests fail because junit runs
5199 ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem
5200 ;; to describe a test at all.
5201 #:tests? #f
5202 #:jar-name "cglib.jar"
5203 #:phases
5204 (modify-phases %standard-phases
5205 (add-after 'unpack 'chdir
5206 (lambda _ (chdir "cglib") #t)))))
5207 (inputs
5208 `(("java-asm" ,java-asm)
5209 ("java-junit" ,java-junit)))
5210 (home-page "https://github.com/cglib/cglib/")
5211 (synopsis "Java byte code generation library")
5212 (description "The byte code generation library CGLIB is a high level API
5213to generate and transform Java byte code.")
5214 (license license:asl2.0)))
33e34bfe
RW
5215
5216(define-public java-objenesis
5217 (package
5218 (name "java-objenesis")
5219 (version "2.5.1")
5220 (source (origin
3dc7a8ce
EF
5221 (method git-fetch)
5222 (uri (git-reference
5223 (url "https://github.com/easymock/objenesis")
5224 (commit version)))
5225 (file-name (git-file-name name version))
33e34bfe
RW
5226 (sha256
5227 (base32
3dc7a8ce 5228 "054yi200wj00x6dp1sxfrwgndwywadsbn8d8ij1j0v45j9g2vdya"))))
33e34bfe
RW
5229 (build-system ant-build-system)
5230 (arguments
5231 `(#:jar-name "objenesis.jar"
5232 #:source-dir "main/src/"
5233 #:test-dir "main/src/test/"))
5234 (native-inputs
5235 `(("java-junit" ,java-junit)
5236 ("java-hamcrest-core" ,java-hamcrest-core)))
5237 (home-page "http://objenesis.org/")
5238 (synopsis "Bypass the constructor when creating an object")
5239 (description "Objenesis is a small Java library that serves one purpose:
5240to instantiate a new object of a particular class. It is common to see
5241restrictions in libraries stating that classes must require a default
5242constructor. Objenesis aims to overcome these restrictions by bypassing the
5243constructor on object instantiation.")
5244 (license license:asl2.0)))
ae589876
RW
5245
5246(define-public java-easymock
5247 (package
5248 (name "java-easymock")
5249 (version "3.4")
5250 (source (origin
7cf90f64
EF
5251 (method git-fetch)
5252 (uri (git-reference
5253 (url "https://github.com/easymock/easymock/")
5254 (commit (string-append "easymock-" version))))
5255 (file-name (git-file-name name version))
ae589876
RW
5256 (sha256
5257 (base32
7cf90f64 5258 "02vybm8hc0i0n9sp2f2iiqn54zwqhq835f76wc6b2m7819z5a8dq"))))
ae589876
RW
5259 (build-system ant-build-system)
5260 (arguments
5261 `(#:jar-name "easymock.jar"
5262 #:source-dir "core/src/main"
5263 #:test-dir "core/src/test"
5264 #:phases
5265 (modify-phases %standard-phases
5266 ;; FIXME: Android support requires the following packages to be
5267 ;; available: com.google.dexmaker.stock.ProxyBuilder
5268 (add-after 'unpack 'delete-android-support
5269 (lambda _
5270 (with-directory-excursion "core/src/main/java/org/easymock/internal"
5271 (substitute* "MocksControl.java"
5272 (("AndroidSupport.isAndroid\\(\\)") "false")
5273 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
5274 (delete-file "AndroidClassProxyFactory.java"))
5275 #t))
5276 (add-after 'unpack 'delete-broken-tests
5277 (lambda _
5278 (with-directory-excursion "core/src/test/java/org/easymock"
5279 ;; This test depends on dexmaker.
5280 (delete-file "tests2/ClassExtensionHelperTest.java")
5281
5282 ;; This is not a test.
5283 (delete-file "tests/BaseEasyMockRunnerTest.java")
5284
5285 ;; This test should be executed with a different runner...
5286 (delete-file "tests2/EasyMockAnnotationsTest.java")
5287 ;; ...but deleting it means that we also have to delete these
5288 ;; dependent files.
5289 (delete-file "tests2/EasyMockRunnerTest.java")
5290 (delete-file "tests2/EasyMockRuleTest.java")
5291
5292 ;; This test fails because the file "easymock.properties" does
5293 ;; not exist.
5294 (delete-file "tests2/EasyMockPropertiesTest.java"))
5295 #t)))))
5296 (inputs
5297 `(("java-asm" ,java-asm)
5298 ("java-cglib" ,java-cglib)
5299 ("java-objenesis" ,java-objenesis)))
5300 (native-inputs
5301 `(("java-junit" ,java-junit)
5302 ("java-hamcrest-core" ,java-hamcrest-core)))
7cf90f64 5303 (home-page "https://easymock.org/")
ae589876
RW
5304 (synopsis "Java library providing mock objects for unit tests")
5305 (description "EasyMock is a Java library that provides an easy way to use
5306mock objects in unit testing.")
5307 (license license:asl2.0)))
7aa37023 5308
f12ad6c7
RW
5309(define-public java-jmock-1
5310 (package
5311 (name "java-jmock")
5312 (version "1.2.0")
5313 (source (origin
7cf26f24
EF
5314 (method git-fetch)
5315 (uri (git-reference
5316 (url "https://github.com/jmock-developers/jmock-library")
5317 (commit version)))
5318 (file-name (git-file-name name version))
f12ad6c7
RW
5319 (sha256
5320 (base32
7cf26f24 5321 "0lkga995xd9b9mmzxmcd301hlw83p1h78nibh7djlx7wydscr85z"))))
f12ad6c7
RW
5322 (build-system ant-build-system)
5323 (arguments
5324 `(#:build-target "jars"
5325 #:test-target "run.tests"
5326 #:phases
5327 (modify-phases %standard-phases
5328 (replace 'install (install-jars "build")))))
7cf26f24 5329 (home-page "http://jmock.org/")
f12ad6c7
RW
5330 (synopsis "Mock object library for test-driven development")
5331 (description "JMock is a library that supports test-driven development of
5332Java code with mock objects. Mock objects help you design and test the
5333interactions between the objects in your programs.
5334
5335The jMock library
5336
5337@itemize
5338@item makes it quick and easy to define mock objects
5339@item lets you precisely specify the interactions between
5340 your objects, reducing the brittleness of your tests
5341@item plugs into your favourite test framework
5342@item is easy to extend.
5343@end itemize\n")
5344 (license license:bsd-3)))
5345
045124ae
JL
5346(define-public java-jmock
5347 (package
5348 (inherit java-jmock-1)
5349 (name "java-jmock")
5350 (version "2.8.2")
5351 (source (origin
242af295
EF
5352 (method git-fetch)
5353 (uri (git-reference
5354 (url "https://github.com/jmock-developers/jmock-library")
5355 (commit version)))
5356 (file-name (git-file-name name version))
045124ae
JL
5357 (sha256
5358 (base32
242af295 5359 "12b7l22g3nrjvf2dzcw3z03fpd2chrgp0d8xkvn8w55rwb57pax6"))))
045124ae
JL
5360 (inputs
5361 `(("java-hamcrest-all" ,java-hamcrest-all)
5362 ("java-asm" ,java-asm)
5363 ("java-bsh" ,java-bsh)
5364 ("java-junit" ,java-junit)))
5365 (native-inputs
5366 `(("cglib" ,java-cglib)))
5367 (arguments
5368 `(#:jar-name "java-jmock.jar"
5369 #:source-dir "jmock/src/main/java"
5370 #:test-dir "jmock/src/test"))))
5371
25436c6d
JL
5372(define-public java-jmock-junit4
5373 (package
5374 (inherit java-jmock)
5375 (name "java-jmock-junit4")
5376 (arguments
5377 `(#:jar-name "java-jmock-junit4.jar"
5378 #:source-dir "jmock-junit4/src/main/java"
5379 #:test-dir "jmock-junit4/src/test"))
5380 (inputs
5381 `(("java-hamcrest-all" ,java-hamcrest-all)
5382 ("java-asm" ,java-asm)
5383 ("java-bsh" ,java-bsh)
5384 ("java-jmock" ,java-jmock)
5385 ("java-jumit" ,java-junit)))))
5386
e84b899d
JL
5387(define-public java-jmock-legacy
5388 (package
5389 (inherit java-jmock)
5390 (name "java-jmock-legacy")
5391 (arguments
5392 `(#:jar-name "java-jmock-legacy.jar"
5393 #:source-dir "jmock-legacy/src/main/java"
5394 #:test-dir "jmock-legacy/src/test"
5395 #:phases
5396 (modify-phases %standard-phases
5397 (add-before 'check 'copy-tests
5398 (lambda _
5399 ;; This file is a dependancy of some tests
5400 (let ((file "org/jmock/test/acceptance/PackageProtectedType.java"))
5401 (copy-file (string-append "jmock/src/test/java/" file)
5402 (string-append "jmock-legacy/src/test/java/" file))
5403 #t))))))
5404 (inputs
5405 `(("java-hamcrest-all" ,java-hamcrest-all)
5406 ("java-objenesis" ,java-objenesis)
5407 ("java-cglib" ,java-cglib)
5408 ("java-jmock" ,java-jmock)
5409 ("java-asm" ,java-asm)
5410 ("java-bsh" ,java-bsh)
5411 ("java-junit" ,java-junit)))
5412 (native-inputs
5413 `(("java-jmock-junit4" ,java-jmock-junit4)))))
5414
439c59da
RW
5415(define-public java-hamcrest-all
5416 (package (inherit java-hamcrest-core)
5417 (name "java-hamcrest-all")
5418 (arguments
bfc007e1
RW
5419 `(#:jdk ,icedtea-8
5420 ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core)
5421 ((#:build-target _) "bigjar")
5422 ((#:phases phases)
5423 `(modify-phases ,phases
5424 ;; Some build targets override the classpath, so we need to patch
5425 ;; the build.xml to ensure that required dependencies are on the
5426 ;; classpath.
5427 (add-after 'unpack 'patch-classpath-for-integration
5428 (lambda* (#:key inputs #:allow-other-keys)
5429 (substitute* "build.xml"
5430 ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
5431 (string-join
5432 (cons line
5433 (append
5434 (find-files (assoc-ref inputs "java-junit") "\\.jar$")
5435 (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
5436 (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
2cc63e6f
RW
5437 ";"))
5438 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
fff4fcc4
JL
5439 (car (find-files (assoc-ref inputs "java-hamcrest-core")
5440 "jar$"))))
5441 #t))
5442 (replace 'install
5443 (lambda* (#:key outputs #:allow-other-keys)
5444 (let* ((target (string-append (assoc-ref outputs "out")
5445 "/share/java/"))
5446 (version-suffix
5447 ,(string-append
5448 "-" (package-version java-hamcrest-core) ".jar"))
5449 (install-without-version-suffix
5450 (lambda (jar)
5451 (copy-file jar
5452 (string-append target
5453 (basename jar version-suffix)
5454 ".jar")))))
5455 (mkdir-p target)
5456 (for-each
5457 install-without-version-suffix
5458 (find-files "build"
5459 (lambda (name _)
5460 (and (string-suffix? ".jar" name)
5461 (not (string-suffix? "-sources.jar" name)))))))
bfc007e1 5462 #t)))))))
439c59da
RW
5463 (inputs
5464 `(("java-junit" ,java-junit)
5465 ("java-jmock" ,java-jmock-1)
2cc63e6f
RW
5466 ;; This is necessary because of what seems to be a race condition.
5467 ;; This package would sometimes fail to build because hamcrest-core.jar
5468 ;; could not be found, even though it is built as part of this package.
5469 ;; Adding java-hamcrest-core appears to fix this problem. See
5470 ;; https://debbugs.gnu.org/31390 for more information.
5471 ("java-hamcrest-core" ,java-hamcrest-core)
439c59da 5472 ("java-easymock" ,java-easymock)
439c59da
RW
5473 ,@(package-inputs java-hamcrest-core)))))
5474
7aa37023
RW
5475(define-public java-jopt-simple
5476 (package
5477 (name "java-jopt-simple")
5478 (version "5.0.3")
5479 (source (origin
5480 (method url-fetch)
5481 (uri (string-append "http://repo1.maven.org/maven2/"
5482 "net/sf/jopt-simple/jopt-simple/"
5483 version "/jopt-simple-"
5484 version "-sources.jar"))
5485 (sha256
5486 (base32
5487 "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa"))))
5488 (build-system ant-build-system)
5489 (arguments
5490 `(#:tests? #f ; there are no tests
5491 #:jar-name "jopt-simple.jar"))
5492 (home-page "https://pholser.github.io/jopt-simple/")
5493 (synopsis "Java library for parsing command line options")
5494 (description "JOpt Simple is a Java library for parsing command line
5495options, such as those you might pass to an invocation of @code{javac}. In
5496the interest of striving for simplicity, as closely as possible JOpt Simple
5497attempts to honor the command line option syntaxes of POSIX @code{getopt} and
5498GNU @code{getopt_long}. It also aims to make option parser configuration and
5499retrieval of options and their arguments simple and expressive, without being
5500overly clever.")
5501 (license license:expat)))
840969e8
RW
5502
5503(define-public java-commons-math3
5504 (package
5505 (name "java-commons-math3")
5506 (version "3.6.1")
5507 (source (origin
5508 (method url-fetch)
5509 (uri (string-append "mirror://apache/commons/math/source/"
5510 "commons-math3-" version "-src.tar.gz"))
5511 (sha256
5512 (base32
5513 "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6"))))
5514 (build-system ant-build-system)
5515 (arguments
5516 `(#:build-target "jar"
5517 #:test-target "test"
5518 #:make-flags
5519 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
5520 (junit (assoc-ref %build-inputs "java-junit")))
fff4fcc4
JL
5521 (list (string-append "-Djunit.jar="
5522 (car (find-files junit "jar$")))
5523 (string-append "-Dhamcrest.jar="
5524 (car (find-files hamcrest ".*.jar$")))))
840969e8
RW
5525 #:phases
5526 (modify-phases %standard-phases
5527 ;; We want to build the jar in the build phase and run the tests
5528 ;; later in a separate phase.
5529 (add-after 'unpack 'untangle-targets
5530 (lambda _
5531 (substitute* "build.xml"
5532 (("name=\"jar\" depends=\"test\"")
5533 "name=\"jar\" depends=\"compile\""))
5534 #t))
5535 ;; There is no install target.
5536 (replace 'install
5537 (install-jars "target")))))
5538 (native-inputs
5539 `(("java-junit" ,java-junit)
5540 ("java-hamcrest-core" ,java-hamcrest-core)))
4f236f84 5541 (home-page "https://commons.apache.org/math/")
840969e8
RW
5542 (synopsis "Apache Commons mathematics library")
5543 (description "Commons Math is a library of lightweight, self-contained
5544mathematics and statistics components addressing the most common problems not
5545available in the Java programming language or Commons Lang.")
5546 (license license:asl2.0)))
62c9bfaa
RW
5547
5548(define-public java-jmh
5549 (package
5550 (name "java-jmh")
5551 (version "1.17.5")
5552 (source (origin
5553 (method hg-fetch)
5554 (uri (hg-reference
5555 (url "http://hg.openjdk.java.net/code-tools/jmh/")
5556 (changeset version)))
5557 (file-name (string-append name "-" version "-checkout"))
5558 (sha256
5559 (base32
5560 "1fxyxhg9famwcg1prc4cgwb5wzyxqavn3cjm5vz8605xz7x5k084"))))
5561 (build-system ant-build-system)
5562 (arguments
5563 `(#:jar-name "jmh-core.jar"
5564 #:source-dir "jmh-core/src/main"
5565 #:test-dir "jmh-core/src/test"
5566 #:phases
5567 (modify-phases %standard-phases
5568 ;; This seems to be a bug in the JDK. It may not be necessary in
5569 ;; future versions of the JDK.
5570 (add-after 'unpack 'fix-bug
5571 (lambda _
5572 (with-directory-excursion
5573 "jmh-core/src/main/java/org/openjdk/jmh/runner/options"
5574 (substitute* '("IntegerValueConverter.java"
5575 "ThreadsValueConverter.java")
5576 (("public Class<Integer> valueType")
5577 "public Class<? extends Integer> valueType")))
5578 #t)))))
5579 (inputs
5580 `(("java-jopt-simple" ,java-jopt-simple)
5581 ("java-commons-math3" ,java-commons-math3)))
5582 (native-inputs
5583 `(("java-junit" ,java-junit)
5584 ("java-hamcrest-core" ,java-hamcrest-core)))
e799400d 5585 (home-page "https://openjdk.java.net/projects/code-tools/jmh/")
62c9bfaa
RW
5586 (synopsis "Benchmark harness for the JVM")
5587 (description "JMH is a Java harness for building, running, and analysing
5588nano/micro/milli/macro benchmarks written in Java and other languages
f4548394 5589targeting the JVM.")
62c9bfaa
RW
5590 ;; GPLv2 only
5591 (license license:gpl2)))
56ebb4e9
RW
5592
5593(define-public java-commons-collections4
5594 (package
5595 (name "java-commons-collections4")
5596 (version "4.1")
5597 (source (origin
5598 (method url-fetch)
5599 (uri (string-append "mirror://apache/commons/collections/source/"
5600 "commons-collections4-" version "-src.tar.gz"))
5601 (sha256
5602 (base32
5603 "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl"))))
5604 (build-system ant-build-system)
5605 (arguments
5606 `(#:test-target "test"
5607 #:make-flags
5608 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
5609 (junit (assoc-ref %build-inputs "java-junit"))
5610 (easymock (assoc-ref %build-inputs "java-easymock")))
fff4fcc4
JL
5611 (list (string-append "-Djunit.jar="
5612 (car (find-files junit "jar$")))
5613 (string-append "-Dhamcrest.jar="
5614 (car (find-files hamcrest "jar$")))
56ebb4e9
RW
5615 (string-append "-Deasymock.jar=" easymock
5616 "/share/java/easymock.jar")))
5617 #:phases
5618 (modify-phases %standard-phases
5619 (replace 'install
5620 (install-jars "target")))))
5621 (native-inputs
5622 `(("java-junit" ,java-junit)
5623 ("java-hamcrest-core" ,java-hamcrest-core)
5624 ("java-easymock" ,java-easymock)))
21e207d2 5625 (home-page "https://commons.apache.org/collections/")
56ebb4e9
RW
5626 (synopsis "Collections framework")
5627 (description "The Java Collections Framework is the recognised standard
5628for collection handling in Java. Commons-Collections seek to build upon the
5629JDK classes by providing new interfaces, implementations and utilities. There
5630are many features, including:
5631
5632@itemize
5633@item @code{Bag} interface for collections that have a number of copies of
5634 each object
5635@item @code{BidiMap} interface for maps that can be looked up from value to
5636 key as well and key to value
5637@item @code{MapIterator} interface to provide simple and quick iteration over
5638 maps
5639@item Transforming decorators that alter each object as it is added to the
5640 collection
5641@item Composite collections that make multiple collections look like one
5642@item Ordered maps and sets that retain the order elements are added in,
5643 including an LRU based map
5644@item Reference map that allows keys and/or values to be garbage collected
5645 under close control
5646@item Many comparator implementations
5647@item Many iterator implementations
5648@item Adapter classes from array and enumerations to collections
5649@item Utilities to test or create typical set-theory properties of collections
5650 such as union, intersection, and closure.
5651@end itemize\n")
5652 (license license:asl2.0)))
6af63e65 5653
229a9864
JL
5654(define-public java-commons-collections
5655 (package
5656 (inherit java-commons-collections4)
5657 (name "java-commons-collections")
5658 (version "3.2.2")
5659 (source (origin
5660 (method url-fetch)
5661 (uri (string-append "mirror://apache/commons/collections/source/"
5662 "commons-collections-" version "-src.tar.gz"))
5663 (sha256
5664 (base32
7c7323e4
GB
5665 "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387"))
5666 (patches
5667 (search-patches "java-commons-collections-fix-java8.patch"))))
229a9864
JL
5668 (arguments
5669 (substitute-keyword-arguments (package-arguments java-commons-collections4)
5670 ((#:phases phases)
5671 `(modify-phases ,phases
5672 ;; The manifest is required by the build procedure
5673 (add-before 'build 'add-manifest
5674 (lambda _
5675 (mkdir-p "build/conf")
5676 (call-with-output-file "build/conf/MANIFEST.MF"
5677 (lambda (file)
2c8ac364
MW
5678 (format file "Manifest-Version: 1.0\n")))
5679 #t))
229a9864
JL
5680 (replace 'install
5681 (install-jars "build"))))))))
5682
5aa2f3f4
JL
5683(define java-commons-collections-test-classes
5684 (package
5685 (inherit java-commons-collections)
5686 (arguments
5687 `(#:jar-name "commons-collections-test-classes.jar"
5688 #:source-dir "src/test"
5689 #:tests? #f))
5690 (inputs
5691 `(("collection" ,java-commons-collections)))))
5692
5693(define-public java-commons-beanutils
5694 (package
5695 (name "java-commons-beanutils")
5696 (version "1.9.3")
5697 (source (origin
5698 (method url-fetch)
5699 (uri (string-append "mirror://apache/commons/beanutils/source/"
5700 "commons-beanutils-" version "-src.tar.gz"))
5701 (sha256
5702 (base32
5703 "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk"))))
5704 (build-system ant-build-system)
5705 (arguments
5706 `(#:test-target "test"
5707 #:tests? #f
5708 #:phases
5709 (modify-phases %standard-phases
5710 (replace 'install
5711 (lambda* (#:key outputs #:allow-other-keys)
5712 (rename-file (string-append "dist/commons-beanutils-" ,version
5713 "-SNAPSHOT.jar")
5714 "commons-beanutils.jar")
5715 (install-file "commons-beanutils.jar"
5716 (string-append (assoc-ref outputs "out") "/share/java/"))
5717 #t)))))
5718 (inputs
5719 `(("logging" ,java-commons-logging-minimal)
5720 ("collections" ,java-commons-collections)))
5721 (native-inputs
5722 `(("junit" ,java-junit)
5723 ("collections-test" ,java-commons-collections-test-classes)))
4f236f84 5724 (home-page "https://commons.apache.org/beanutils/")
5aa2f3f4
JL
5725 (synopsis "Dynamically set or get properties in Java")
5726 (description "BeanUtils provides a simplified interface to reflection and
5727introspection to set or get dynamically determined properties through their
5728setter and getter method.")
5729 (license license:asl2.0)))
5730
6af63e65
HG
5731(define-public java-commons-io
5732 (package
5733 (name "java-commons-io")
5734 (version "2.5")
5735 (source
5736 (origin
5737 (method url-fetch)
5738 (uri (string-append "mirror://apache/commons/io/source/"
5739 "commons-io-" version "-src.tar.gz"))
5740 (sha256
5741 (base32
5742 "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3"))))
5743 (build-system ant-build-system)
5744 (outputs '("out" "doc"))
5745 (arguments
5746 `(#:test-target "test"
5747 #:make-flags
5748 (list (string-append "-Djunit.jar="
fff4fcc4
JL
5749 (car (find-files (assoc-ref %build-inputs "java-junit")
5750 "jar$"))))
6af63e65
HG
5751 #:phases
5752 (modify-phases %standard-phases
5753 (add-after 'build 'build-javadoc ant-build-javadoc)
79265a45 5754 (replace 'install (install-from-pom "pom.xml"))
6af63e65
HG
5755 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
5756 (native-inputs
5757 `(("java-junit" ,java-junit)
5758 ("java-hamcrest-core" ,java-hamcrest-core)))
79265a45
JL
5759 (propagated-inputs
5760 `(("apache-commons-parent-pom" ,apache-commons-parent-pom-39)))
4f236f84 5761 (home-page "https://commons.apache.org/io/")
6af63e65
HG
5762 (synopsis "Common useful IO related classes")
5763 (description "Commons-IO contains utility classes, stream implementations,
5764file filters and endian classes.")
5765 (license license:asl2.0)))
d631b5f3 5766
46f9022c
DM
5767(define-public java-commons-exec-1.1
5768 (package
5769 (name "java-commons-exec")
5770 (version "1.1")
5771 (source
5772 (origin
5773 (method url-fetch)
5774 (uri (string-append "mirror://apache/commons/exec/source/"
5775 "commons-exec-" version "-src.tar.gz"))
5776 (sha256
5777 (base32
5778 "025dk8xgj10lxwwwqp0hng2rn7fr4vcirxzydqzx9k4dim667alk"))))
5779 (build-system ant-build-system)
5780 (arguments
5781 `(#:test-target "test"
5782 #:make-flags
5783 (list (string-append "-Dmaven.junit.jar="
fff4fcc4
JL
5784 (car (find-files (assoc-ref %build-inputs "java-junit")
5785 "jar$"))))
46f9022c
DM
5786 #:phases
5787 (modify-phases %standard-phases
5788 (add-before 'build 'delete-network-tests
5789 (lambda _
5790 (delete-file "src/test/java/org/apache/commons/exec/DefaultExecutorTest.java")
5791 (substitute* "src/test/java/org/apache/commons/exec/TestRunner.java"
5792 (("suite\\.addTestSuite\\(DefaultExecutorTest\\.class\\);") ""))
5793 #t))
5794 ;; The "build" phase automatically tests.
5795 (delete 'check)
5796 (replace 'install (install-jars "target")))))
5797 (native-inputs
5798 `(("java-junit" ,java-junit)))
31b85761 5799 (home-page "https://commons.apache.org/proper/commons-exec/")
46f9022c
DM
5800 (synopsis "Common program execution related classes")
5801 (description "Commons-Exec simplifies executing external processes.")
5802 (license license:asl2.0)))
5803
5804(define-public java-commons-exec
5805 (package
5806 (inherit java-commons-exec-1.1)
5807 (version "1.3")
5808 (source
5809 (origin
5810 (method url-fetch)
5811 (uri (string-append "mirror://apache/commons/exec/source/"
5812 "commons-exec-" version "-src.tar.gz"))
5813 (sha256
5814 (base32
5815 "17yb4h6f8l49c5iyyvda4z2nmw0bxrx857nrwmsr7mmpb7x441yv"))))
5816 (arguments
5817 `(#:test-target "test"
5818 #:make-flags
5819 (list (string-append "-Dmaven.junit.jar="
fff4fcc4
JL
5820 (car (find-files (assoc-ref %build-inputs "java-junit")
5821 "jar$")))
46f9022c
DM
5822 "-Dmaven.compiler.source=1.7"
5823 "-Dmaven.compiler.target=1.7")
5824 #:phases
5825 (modify-phases %standard-phases
5826 (add-before 'build 'delete-network-tests
5827 (lambda* (#:key inputs #:allow-other-keys)
5828 ;; This test hangs indefinitely.
5829 (delete-file "src/test/java/org/apache/commons/exec/issues/Exec60Test.java")
5830 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec41Test.java"
5831 (("ping -c 10 127.0.0.1") "sleep 10"))
5832 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec49Test.java"
5833 (("/bin/ls") "ls"))
5834 (call-with-output-file "src/test/scripts/ping.sh"
5835 (lambda (port)
5836 (format port "#!~a/bin/sh\nsleep $1\n"
5837 (assoc-ref inputs "bash"))))
5838 #t))
5839 ;; The "build" phase automatically tests.
5840 (delete 'check)
5841 (replace 'install (install-jars "target")))))
5842 (native-inputs
5843 `(("java-junit" ,java-junit)
5844 ("java-hamcrest-core" ,java-hamcrest-core)))))
5845
d631b5f3
HG
5846(define-public java-commons-lang
5847 (package
5848 (name "java-commons-lang")
5849 (version "2.6")
5850 (source
5851 (origin
5852 (method url-fetch)
5853 (uri (string-append "mirror://apache/commons/lang/source/"
5854 "commons-lang-" version "-src.tar.gz"))
5855 (sha256
5856 (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5"))))
5857 (build-system ant-build-system)
5858 (outputs '("out" "doc"))
5859 (arguments
5860 `(#:test-target "test"
e5a96113 5861 #:test-exclude (list "**/Abstract*.java" "**/Random*.java")
d631b5f3
HG
5862 #:phases
5863 (modify-phases %standard-phases
5864 (add-after 'build 'build-javadoc ant-build-javadoc)
5865 (add-before 'check 'disable-failing-test
5866 (lambda _
5867 ;; Disable a failing test
5868 (substitute* "src/test/java/org/apache/commons/lang/\
5869time/FastDateFormatTest.java"
5870 (("public void testFormat\\(\\)")
5871 "public void disabled_testFormat()"))
5872 #t))
5873 (replace 'install (install-jars "target"))
5874 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
5875 (native-inputs
5876 `(("java-junit" ,java-junit)))
4f236f84 5877 (home-page "https://commons.apache.org/lang/")
d631b5f3
HG
5878 (synopsis "Extension of the java.lang package")
5879 (description "The Commons Lang components contains a set of Java classes
5880that provide helper methods for standard Java classes, especially those found
5881in the @code{java.lang} package in the Sun JDK. The following classes are
5882included:
5883
5884@itemize
5885@item StringUtils - Helper for @code{java.lang.String}.
5886@item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets
5887 of characters such as @code{[a-z]} and @code{[abcdez]}.
5888@item RandomStringUtils - Helper for creating randomised strings.
5889@item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
5890@item NumberRange - A range of numbers with an upper and lower bound.
5891@item ObjectUtils - Helper for @code{java.lang.Object}.
5892@item SerializationUtils - Helper for serializing objects.
5893@item SystemUtils - Utility class defining the Java system properties.
5894@item NestedException package - A sub-package for the creation of nested
5895 exceptions.
5896@item Enum package - A sub-package for the creation of enumerated types.
5897@item Builder package - A sub-package for the creation of @code{equals},
5898 @code{hashCode}, @code{compareTo} and @code{toString} methods.
5899@end itemize\n")
5900 (license license:asl2.0)))
82e18864
HG
5901
5902(define-public java-commons-lang3
5903 (package
5904 (name "java-commons-lang3")
b916b638 5905 (version "3.9")
82e18864
HG
5906 (source
5907 (origin
5908 (method url-fetch)
5909 (uri (string-append "mirror://apache/commons/lang/source/"
5910 "commons-lang3-" version "-src.tar.gz"))
5911 (sha256
b916b638 5912 (base32 "0s4ffbvsyl16c90l45ximsg4dwd8hmz7wsza3p308fw43h6mwhb6"))))
82e18864 5913 (build-system ant-build-system)
82e18864 5914 (arguments
b916b638
JL
5915 `(#:jar-name "commons-lang3.jar"
5916 #:source-dir "src/main/java"
5917 #:tests? #f; require junit5
82e18864
HG
5918 #:phases
5919 (modify-phases %standard-phases
b916b638
JL
5920 (replace 'install (install-from-pom "pom.xml")))))
5921 (propagated-inputs
5922 `(("apache-commons-parent-pom" ,apache-commons-parent-pom-48)))
4f236f84 5923 (home-page "https://commons.apache.org/lang/")
82e18864
HG
5924 (synopsis "Extension of the java.lang package")
5925 (description "The Commons Lang components contains a set of Java classes
5926that provide helper methods for standard Java classes, especially those found
5927in the @code{java.lang} package. The following classes are included:
5928
5929@itemize
5930@item StringUtils - Helper for @code{java.lang.String}.
5931@item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of
5932 characters such as @code{[a-z]} and @code{[abcdez]}.
5933@item RandomStringUtils - Helper for creating randomised strings.
5934@item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
5935@item NumberRange - A range of numbers with an upper and lower bound.
5936@item ObjectUtils - Helper for @code{java.lang.Object}.
5937@item SerializationUtils - Helper for serializing objects.
5938@item SystemUtils - Utility class defining the Java system properties.
5939@item NestedException package - A sub-package for the creation of nested
5940 exceptions.
5941@item Enum package - A sub-package for the creation of enumerated types.
5942@item Builder package - A sub-package for the creation of @code{equals},
5943 @code{hashCode}, @code{compareTo} and @code{toString} methods.
5944@end itemize\n")
5945 (license license:asl2.0)))
1c188f4e 5946
afb13a10
JL
5947(define-public java-commons-bsf
5948 (package
5949 (name "java-commons-bsf")
5950 (version "2.4.0")
5951 (source (origin
5952 (method url-fetch)
5953 (uri (string-append "mirror://apache/commons/bsf/source/bsf-src-"
5954 version ".tar.gz"))
5955 (sha256
5956 (base32
5957 "1sbamr8jl32p1jgf59nw0b2w9qivyg145954hm6ly54cfgsqrdas"))
5958 (modules '((guix build utils)))
5959 (snippet
5960 '(begin
5961 (for-each delete-file
5962 (find-files "." "\\.jar$"))
5963 #t))))
5964 (build-system ant-build-system)
5965 (arguments
5966 `(#:build-target "jar"
5967 #:tests? #f; No test file
5968 #:modules ((guix build ant-build-system)
5969 (guix build utils)
5970 (guix build java-utils)
5971 (sxml simple))
5972 #:phases
5973 (modify-phases %standard-phases
5974 (add-before 'build 'create-properties
5975 (lambda _
5976 ;; This file is missing from the distribution
5977 (call-with-output-file "build-properties.xml"
5978 (lambda (port)
5979 (sxml->xml
5980 `(project (@ (basedir ".") (name "build-properties") (default ""))
5981 (property (@ (name "project.name") (value "bsf")))
5982 (property (@ (name "source.level") (value "1.5")))
5983 (property (@ (name "build.lib") (value "build/jar")))
5984 (property (@ (name "src.dir") (value "src")))
5985 (property (@ (name "tests.dir") (value "src/org/apache/bsf/test")))
5986 (property (@ (name "build.tests") (value "build/test-classes")))
5987 (property (@ (name "build.dest") (value "build/classes"))))
2c8ac364
MW
5988 port)))
5989 #t))
afb13a10
JL
5990 (replace 'install (install-jars "build")))))
5991 (native-inputs
5992 `(("java-junit" ,java-junit)))
5993 (inputs
5994 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
5995 (home-page "https://commons.apache.org/proper/commons-bsf")
5996 (synopsis "Bean Scripting Framework")
5997 (description "The Bean Scripting Framework (BSF) is a set of Java classes
5998which provides scripting language support within Java applications, and access
5999to Java objects and methods from scripting languages. BSF allows one to write
6000JSPs in languages other than Java while providing access to the Java class
6001library. In addition, BSF permits any Java application to be implemented in
6002part (or dynamically extended) by a language that is embedded within it. This
6003is achieved by providing an API that permits calling scripting language engines
6004from within Java, as well as an object registry that exposes Java objects to
6005these scripting language engines.")
6006 (license license:asl2.0)))
6007
66006fe5
JL
6008(define-public java-commons-jxpath
6009 (package
6010 (name "java-commons-jxpath")
6011 (version "1.3")
6012 (source (origin
6013 (method url-fetch)
6014 (uri (string-append "mirror://apache/commons/jxpath/source/"
6015 "commons-jxpath-" version "-src.tar.gz"))
6016 (sha256
6017 (base32
6018 "1rpgg31ayn9fwr4bfi2i1ij0npcg79ad2fv0w9hacvawsyc42cfs"))))
6019 (build-system ant-build-system)
6020 (arguments
6021 `(#:jar-name "commons-jxpath.jar"
6022 ;; tests require more dependencies, including mockrunner which depends on old software
6023 #:tests? #f
6024 #:source-dir "src/java"))
6025 (inputs
10eddaca 6026 `(("servlet" ,java-classpathx-servletapi)
66006fe5
JL
6027 ("java-jdom" ,java-jdom)
6028 ("java-commons-beanutils" ,java-commons-beanutils)))
6029 (native-inputs
6030 `(("java-junit" ,java-junit)))
4f236f84 6031 (home-page "https://commons.apache.org/jxpath/")
66006fe5
JL
6032 (synopsis "Simple interpreter of an expression language called XPath.")
6033 (description "The org.apache.commons.jxpath package defines a simple
6034interpreter of an expression language called XPath. JXPath applies XPath
6035expressions to graphs of objects of all kinds: JavaBeans, Maps, Servlet
6036contexts, DOM etc, including mixtures thereof.")
6037 (license license:asl2.0)))
6038
b635d272
JL
6039(define-public java-commons-pool
6040 (package
6041 (name "java-commons-pool")
6042 (version "2.6.2")
6043 (source (origin
6044 (method url-fetch)
6045 (uri (string-append "mirror://apache/commons/pool/source/"
6046 "commons-pool2-" version "-src.tar.gz"))
6047 (sha256
6048 (base32
6049 "1fi1hgqmq01bs6azbj3sfswxzadp2r8sjjfiq6ryilz1m50kvrv6"))))
6050 (arguments
6051 `(#:jar-name "common-pool.jar"
6052 #:source-dir "src/main/java"
6053 #:test-exclude
6054 (list "**/PerformanceTest.java")))
6055 (build-system ant-build-system)
6056 (inputs
6057 `(("java-cglib" ,java-cglib)))
6058 (native-inputs
6059 `(("java-junit" ,java-junit)
6060 ("java-hamcrest-core" ,java-hamcrest-core)
6061 ("java-asm" ,java-asm)
6062 ("java-objenesis" ,java-objenesis)))
6063 (home-page "https://commons.apache.org/proper/commons-pool/")
6064 (synopsis "Object-pooling API in Java")
6065 (description "The commons-pool package provides an object-pooling API
6066and a number of object pool implementations. This package defines a
6067handful of pooling interfaces and some base classes that may be useful when
6068creating new pool implementations.")
6069 (license license:asl2.0)))
6070
f31ea164
JL
6071(define-public java-commons-dbcp
6072 (package
6073 (name "java-commons-dbcp")
6074 (version "2.6.0")
6075 (source (origin
6076 (method url-fetch)
6077 (uri (string-append "mirror://apache/commons/dbcp/source/"
6078 "commons-dbcp2-" version "-src.tar.gz"))
6079 (sha256
6080 (base32
6081 "0axbvcbnf2l70fc3ybrlp3siw2w4ka9mia2pnx4py8gz54cpw3rc"))))
6082 (arguments
6083 `(#:source-dir "src/main/java"
6084 #:jar-name "java-commons-dbcp.jar"
6085 #:tests? #f)); requires apache-geronimo
6086 (inputs
6087 `(("java-commons-pool" ,java-commons-pool)
6088 ("java-commons-logging" ,java-commons-logging-minimal)
6089 ("java-jboss-transaction-api-spec" ,java-jboss-transaction-api-spec)))
6090 (native-inputs
6091 `(("java-junit" ,java-junit)))
6092 (build-system ant-build-system)
6093 (home-page "https://commons.apache.org/proper/commons-dbcp/")
6094 (synopsis "Database Connection Pool for Java")
6095 (description "Commons-dbcp allows you to share a pool of database
6096connections between users. Creating a new connection for each user can be
6097time consuming and even unfeasible when the number of simultaneous users is
6098very large. This package provides a way to share a poole of connections to
6099reduce that load.")
6100 (license license:asl2.0)))
6101
934b83e4
JL
6102(define-public java-commons-jcs
6103 (package
6104 (name "java-commons-jcs")
6105 (version "2.2.1")
6106 (source (origin
6107 (method url-fetch)
6108 (uri (string-append "mirror://apache/commons/jcs/source/"
6109 "commons-jcs-dist-" version "-src.tar.gz"))
6110 (sha256
6111 (base32
6112 "0syhq2npjbrl0azqfjm0gvash1qd5qjy4qmysxcrqjsk0nf9fa1q"))))
6113 (build-system ant-build-system)
6114 (arguments
6115 `(#:jar-name "commons-jcs.jar"
6116 #:source-dir "commons-jcs-core/src/main/java"
6117 #:test-dir "commons-jcs-core/src/test"
6118 #:tests? #f; requires hsqldb
6119 #:phases
6120 (modify-phases %standard-phases
6121 (add-before 'build 'prepare
6122 (lambda _
6123 (with-directory-excursion
6124 "commons-jcs-core/src/main/java/org/apache/commons/jcs"
6125 (substitute*
6126 "auxiliary/disk/jdbc/dsfactory/SharedPoolDataSourceFactory.java"
6127 (("commons.dbcp") "commons.dbcp2")
6128 ((".*\\.setMaxActive.*") ""))
6129 ;;; Remove dependency on velocity-tools
6130 (delete-file "admin/servlet/JCSAdminServlet.java"))
6131 #t)))))
6132 (propagated-inputs
6133 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
6134 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
6135 ("java-commons-httpclient" ,java-commons-httpclient)
6136 ("java-commons-dbcp" ,java-commons-dbcp)))
6137 (native-inputs
6138 `(("java-junit" ,java-junit)))
6139 (home-page "https://commons.apache.org/proper/commons-jcs/")
6140 (synopsis "Distributed caching system in Java")
6141 (description "JCS is a distributed caching system written in Java. It
6142is intended to speed up applications by providing a means to manage cached
6143data of various dynamic natures. Like any caching system, JCS is most useful
6144for high read, low put applications. Latency times drop sharply and
6145bottlenecks move away from the database in an effectively cached system.")
6146 (license license:asl2.0)))
6147
a1a5ef20
JL
6148(define-public java-jsr250
6149 (package
6150 (name "java-jsr250")
6151 (version "1.3")
6152 (source (origin
6153 (method url-fetch)
6154 (uri (string-append "https://repo1.maven.org/maven2/"
6155 "javax/annotation/javax.annotation-api/"
6156 version "/javax.annotation-api-"
6157 version "-sources.jar"))
6158 (sha256
6159 (base32
6160 "08clh8n4n9wfglf75qsqfjs6yf79f7x6hqx38cn856pksszv50kz"))))
6161 (build-system ant-build-system)
6162 (arguments
6163 `(#:tests? #f ; no tests included
6164 #:jdk ,icedtea-8
51087d51
JL
6165 #:jar-name "jsr250.jar"
6166 #:modules ((guix build ant-build-system)
6167 (guix build utils)
6168 (guix build maven pom)
6169 (guix build java-utils)
6170 (sxml simple))
6171 #:phases
6172 (modify-phases %standard-phases
6173 (add-before 'install 'create-pom
6174 (lambda _
6175 (with-output-to-file "pom.xml"
6176 (lambda _
6177 (sxml->xml
6178 `((project
6179 (modelVersion "4.0.0")
6180 (name "jsr250")
6181 (groupId "javax.annotation")
6182 (artifactId "jsr250-api")
6183 (version ,,version))))))
6184 #t))
6185 (replace 'install
6186 (install-from-pom "pom.xml")))))
a1a5ef20
JL
6187 (home-page "https://jcp.org/en/jsr/detail?id=250")
6188 (synopsis "Security-related annotations")
6189 (description "This package provides annotations for security. It provides
6190packages in the @code{javax.annotation} and @code{javax.annotation.security}
6191namespaces.")
6192 ;; either cddl or gpl2 only, with classpath exception
6193 (license (list license:cddl1.0
6194 license:gpl2))))
6195
0d4a0d60
RW
6196(define-public java-jsr305
6197 (package
6198 (name "java-jsr305")
6199 (version "3.0.1")
6200 (source (origin
6201 (method url-fetch)
6202 (uri (string-append "https://repo1.maven.org/maven2/"
6203 "com/google/code/findbugs/"
6204 "jsr305/" version "/jsr305-"
6205 version "-sources.jar"))
6206 (sha256
6207 (base32
6208 "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n"))))
6209 (build-system ant-build-system)
6210 (arguments
6211 `(#:tests? #f ; no tests included
79265a45
JL
6212 #:jar-name "jsr305.jar"
6213 #:modules ((guix build ant-build-system)
6214 (guix build java-utils)
6215 (guix build maven pom)
6216 (guix build utils)
6217 (sxml simple))
6218 #:phases
6219 (modify-phases %standard-phases
6220 (add-before 'install 'create-pom
6221 (lambda _
6222 (with-output-to-file "pom.xml"
6223 (lambda _
6224 (sxml->xml
6225 `((project
6226 (modelVersion "4.0.0")
6227 (name "jsr305")
6228 (groupId "com.google.code.findbugs")
6229 (artifactId "jsr305")
6230 (version ,,version))))))
6231 #t))
6232 (replace 'install
6233 (install-from-pom "pom.xml")))))
0d4a0d60
RW
6234 (home-page "http://findbugs.sourceforge.net/")
6235 (synopsis "Annotations for the static analyzer called findbugs")
6236 (description "This package provides annotations for the findbugs package.
6237It provides packages in the @code{javax.annotations} namespace.")
6238 (license license:asl2.0)))
6239
4f3e47ea
RW
6240(define-public java-guava
6241 (package
6242 (name "java-guava")
6243 ;; This is the last release of Guava that can be built with Java 7.
6244 (version "20.0")
6245 (source (origin
02ed96dc
JL
6246 (method git-fetch)
6247 (uri (git-reference
6248 (url "https://github.com/google/guava/")
6249 (commit (string-append "v" version))))
2be973c3 6250 (file-name (git-file-name name version))
4f3e47ea
RW
6251 (sha256
6252 (base32
02ed96dc 6253 "00h5cawdjic1vind3yivzh1f58flvm1yfmhsyqwyvmbvj1vakysp"))))
4f3e47ea
RW
6254 (build-system ant-build-system)
6255 (arguments
6256 `(#:tests? #f ; no tests included
6257 #:jar-name "guava.jar"
02ed96dc 6258 #:source-dir "guava/src"
4f3e47ea
RW
6259 #:phases
6260 (modify-phases %standard-phases
6261 (add-after 'unpack 'trim-sources
6262 (lambda _
02ed96dc 6263 (with-directory-excursion "guava/src/com/google/common"
4f3e47ea
RW
6264 ;; Remove annotations to avoid extra dependencies:
6265 ;; * "j2objc" annotations are used when converting Java to
6266 ;; Objective C;
6267 ;; * "errorprone" annotations catch common Java mistakes at
6268 ;; compile time;
6269 ;; * "IgnoreJRERequirement" is used for Android.
6270 (substitute* (find-files "." "\\.java$")
6271 (("import com.google.j2objc.*") "")
6272 (("import com.google.errorprone.annotation.*") "")
6273 (("import org.codehaus.mojo.animal_sniffer.*") "")
6274 (("@CanIgnoreReturnValue") "")
6275 (("@LazyInit") "")
6276 (("@WeakOuter") "")
6277 (("@RetainedWith") "")
6278 (("@Weak") "")
6279 (("@ForOverride") "")
6280 (("@J2ObjCIncompatible") "")
6281 (("@IgnoreJRERequirement") "")))
02ed96dc
JL
6282 #t))
6283 (replace 'install (install-from-pom "guava/pom.xml")))))
4f3e47ea
RW
6284 (inputs
6285 `(("java-jsr305" ,java-jsr305)))
02ed96dc
JL
6286 (propagated-inputs
6287 `(("java-guava-parent-pom" ,java-guava-parent-pom)))
4f3e47ea
RW
6288 (home-page "https://github.com/google/guava")
6289 (synopsis "Google core libraries for Java")
6290 (description "Guava is a set of core libraries that includes new
6291collection types (such as multimap and multiset), immutable collections, a
6292graph library, functional types, an in-memory cache, and APIs/utilities for
6293concurrency, I/O, hashing, primitives, reflection, string processing, and much
6294more!")
6295 (license license:asl2.0)))
6296
02ed96dc
JL
6297(define java-guava-parent-pom
6298 (package
6299 (inherit java-guava)
6300 (name "java-guava-parent-pom")
6301 (arguments
6302 `(#:tests? #f
6303 #:phases
6304 (modify-phases %standard-phases
6305 (delete 'configure)
6306 (delete 'build)
6307 (replace 'install
6308 (install-pom-file "pom.xml")))))
6309 (propagated-inputs
6310 `(("java-sonatype-oss-parent-pom" ,java-sonatype-oss-parent-pom-7)))))
6311
af8f8281
RW
6312;; The java-commons-logging package provides adapters to many different
6313;; logging frameworks. To avoid an excessive dependency graph we try to build
6314;; it with only a minimal set of adapters.
6315(define-public java-commons-logging-minimal
6316 (package
6317 (name "java-commons-logging-minimal")
6318 (version "1.2")
6319 (source (origin
6320 (method url-fetch)
6321 (uri (string-append "mirror://apache/commons/logging/source/"
6322 "commons-logging-" version "-src.tar.gz"))
6323 (sha256
6324 (base32
6325 "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9"))))
6326 (build-system ant-build-system)
6327 (arguments
6328 `(#:tests? #f ; avoid dependency on logging frameworks
6329 #:jar-name "commons-logging-minimal.jar"
6330 #:phases
6331 (modify-phases %standard-phases
6332 (add-after 'unpack 'delete-adapters-and-tests
6333 (lambda _
6334 ;; Delete all adapters except for NoOpLog, SimpleLog, and
6335 ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl
6336 ;; is used by applications; SimpleLog is the only actually usable
6337 ;; implementation that does not depend on another logging
6338 ;; framework.
6339 (for-each
6340 (lambda (file)
6341 (delete-file (string-append
6342 "src/main/java/org/apache/commons/logging/impl/" file)))
6343 (list "Jdk13LumberjackLogger.java"
6344 "WeakHashtable.java"
6345 "Log4JLogger.java"
6346 "ServletContextCleaner.java"
6347 "Jdk14Logger.java"
6348 "AvalonLogger.java"
6349 "LogKitLogger.java"))
6350 (delete-file-recursively "src/test")
6351 #t)))))
4f236f84 6352 (home-page "https://commons.apache.org/logging/")
af8f8281
RW
6353 (synopsis "Common API for logging implementations")
6354 (description "The Logging package is a thin bridge between different
6355logging implementations. A library that uses the commons-logging API can be
6356used with any logging implementation at runtime.")
6357 (license license:asl2.0)))
6358
90e65abe
RW
6359;; This is the last release of the 1.x series.
6360(define-public java-mockito-1
6361 (package
6362 (name "java-mockito")
6363 (version "1.10.19")
6364 (source (origin
6365 (method url-fetch)
6366 (uri (string-append "http://repo1.maven.org/maven2/"
6367 "org/mockito/mockito-core/" version
6368 "/mockito-core-" version "-sources.jar"))
6369 (sha256
6370 (base32
6371 "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc"))))
6372 (build-system ant-build-system)
6373 (arguments
6374 `(#:jar-name "mockito.jar"
6375 #:tests? #f ; no tests included
6376 ;; FIXME: patch-and-repack does not support jars, so we have to apply
6377 ;; patches in build phases.
6378 #:phases
6379 (modify-phases %standard-phases
6380 ;; Mockito was developed against a different version of hamcrest,
6381 ;; which does not require matcher implementations to provide an
6382 ;; implementation of the "describeMismatch" method. We add this
6383 ;; simple definition to pass the build with our version of hamcrest.
6384 (add-after 'unpack 'fix-hamcrest-build-error
6385 (lambda _
6386 (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java"
6387 (("public Matcher getActualMatcher\\(\\) .*" line)
6388 (string-append "
6389 public void describeMismatch(Object item, Description description) {
6390 actualMatcher.describeMismatch(item, description);
6391 }"
6392 line)))
6393 #t))
6394 ;; Mockito bundles cglib. We have a cglib package, so let's use
6395 ;; that instead.
6396 (add-after 'unpack 'use-system-libraries
6397 (lambda _
6398 (with-directory-excursion "src/org/mockito/internal/creation/cglib"
6399 (substitute* '("CGLIBHacker.java"
6400 "CglibMockMaker.java"
6401 "ClassImposterizer.java"
6402 "DelegatingMockitoMethodProxy.java"
6403 "MethodInterceptorFilter.java"
6404 "MockitoNamingPolicy.java"
6405 "SerializableMockitoMethodProxy.java"
6406 "SerializableNoOp.java")
6407 (("import org.mockito.cglib") "import net.sf.cglib")))
6408 #t)))))
6409 (inputs
6410 `(("java-junit" ,java-junit)
6411 ("java-objenesis" ,java-objenesis)
6412 ("java-cglib" ,java-cglib)
6413 ("java-hamcrest-core" ,java-hamcrest-core)))
6414 (home-page "http://mockito.org")
6415 (synopsis "Mockito is a mock library for Java")
6416 (description "Mockito is a mocking library for Java which lets you write
6417tests with a clean and simple API. It generates mocks using reflection, and
6418it records all mock invocations, including methods arguments.")
6419 (license license:asl2.0)))
6420
4f4d2e47
RW
6421(define-public java-httpcomponents-httpcore
6422 (package
6423 (name "java-httpcomponents-httpcore")
6424 (version "4.4.6")
6425 (source (origin
6426 (method url-fetch)
6427 (uri (string-append "mirror://apache//httpcomponents/httpcore/"
6428 "source/httpcomponents-core-"
6429 version "-src.tar.gz"))
6430 (sha256
6431 (base32
6432 "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy"))))
6433 (build-system ant-build-system)
6434 (arguments
6435 `(#:jar-name "httpcomponents-httpcore.jar"
6436 #:phases
6437 (modify-phases %standard-phases
6438 (add-after 'unpack 'chdir
6439 (lambda _ (chdir "httpcore") #t)))))
6440 (inputs
6441 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
6442 ("java-commons-lang3" ,java-commons-lang3)))
6443 (native-inputs
6444 `(("java-junit" ,java-junit)
6445 ("java-mockito" ,java-mockito-1)))
6446 (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html")
6447 (synopsis "Low level HTTP transport components")
6448 (description "HttpCore is a set of low level HTTP transport components
6449that can be used to build custom client and server side HTTP services with a
6450minimal footprint. HttpCore supports two I/O models: blocking I/O model based
6451on the classic Java I/O and non-blocking, event driven I/O model based on Java
6452NIO.
6453
6454This package provides the blocking I/O model library.")
6455 (license license:asl2.0)))
6456
3a068b43
RW
6457(define-public java-httpcomponents-httpcore-nio
6458 (package (inherit java-httpcomponents-httpcore)
6459 (name "java-httpcomponents-httpcore-nio")
6460 (arguments
6461 `(#:jar-name "httpcomponents-httpcore-nio.jar"
6462 #:phases
6463 (modify-phases %standard-phases
6464 (add-after 'unpack 'chdir
6465 (lambda _ (chdir "httpcore-nio") #t)))))
6466 (inputs
6467 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
6468 ("java-hamcrest-core" ,java-hamcrest-core)
6469 ,@(package-inputs java-httpcomponents-httpcore)))
6470 (description "HttpCore is a set of low level HTTP transport components
6471that can be used to build custom client and server side HTTP services with a
6472minimal footprint. HttpCore supports two I/O models: blocking I/O model based
6473on the classic Java I/O and non-blocking, event driven I/O model based on Java
6474NIO.
6475
6476This package provides the non-blocking I/O model library based on Java
6477NIO.")))
6478
e1dd78f6
RW
6479(define-public java-httpcomponents-httpcore-ab
6480 (package (inherit java-httpcomponents-httpcore)
6481 (name "java-httpcomponents-httpcore-ab")
6482 (arguments
6483 `(#:jar-name "httpcomponents-httpcore-ab.jar"
6484 #:phases
6485 (modify-phases %standard-phases
6486 (add-after 'unpack 'chdir
6487 (lambda _ (chdir "httpcore-ab") #t)))))
6488 (inputs
6489 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
6490 ("java-commons-cli" ,java-commons-cli)
6491 ("java-hamcrest-core" ,java-hamcrest-core)
6492 ,@(package-inputs java-httpcomponents-httpcore)))
6493 (synopsis "Apache HttpCore benchmarking tool")
6494 (description "This package provides the HttpCore benchmarking tool. It is
6495an Apache AB clone based on HttpCore.")))
6496
14a671d8
RW
6497(define-public java-httpcomponents-httpclient
6498 (package
6499 (name "java-httpcomponents-httpclient")
968bb682 6500 (version "4.5.12")
14a671d8
RW
6501 (source (origin
6502 (method url-fetch)
6503 (uri (string-append "mirror://apache/httpcomponents/httpclient/"
6504 "source/httpcomponents-client-"
6505 version "-src.tar.gz"))
6506 (sha256
6507 (base32
968bb682 6508 "1va99m2zc2liv0v9vn72p5ja8yz4s5wq7zpahaai5nr966kvxzkb"))))
14a671d8
RW
6509 (build-system ant-build-system)
6510 (arguments
6511 `(#:jar-name "httpcomponents-httpclient.jar"
6512 #:phases
6513 (modify-phases %standard-phases
6514 (add-after 'unpack 'chdir
6515 (lambda _ (chdir "httpclient") #t)))))
6516 (inputs
6517 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
6518 ("java-commons-codec" ,java-commons-codec)
6519 ("java-hamcrest-core" ,java-hamcrest-core)
6520 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
6521 ("java-mockito" ,java-mockito-1)
6522 ("java-junit" ,java-junit)))
6523 (home-page "https://hc.apache.org/httpcomponents-client-ga/")
6524 (synopsis "HTTP client library for Java")
6525 (description "Although the @code{java.net} package provides basic
6526functionality for accessing resources via HTTP, it doesn't provide the full
6527flexibility or functionality needed by many applications. @code{HttpClient}
6528seeks to fill this void by providing an efficient, up-to-date, and
6529feature-rich package implementing the client side of the most recent HTTP
6530standards and recommendations.")
6531 (license license:asl2.0)))
6532
cbce5de2
RW
6533(define-public java-httpcomponents-httpmime
6534 (package (inherit java-httpcomponents-httpclient)
6535 (name "java-httpcomponents-httpmime")
6536 (arguments
6537 `(#:jar-name "httpcomponents-httpmime.jar"
6538 #:phases
6539 (modify-phases %standard-phases
6540 (add-after 'unpack 'chdir
6541 (lambda _ (chdir "httpmime") #t)))))
6542 (inputs
6543 `(("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient)
6544 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
6545 ("java-junit" ,java-junit)
6546 ("java-hamcrest-core" ,java-hamcrest-core)))))
6547
4b34c21f
RW
6548(define-public java-commons-net
6549 (package
6550 (name "java-commons-net")
6551 (version "3.6")
6552 (source (origin
6553 (method url-fetch)
6554 (uri (string-append "mirror://apache/commons/net/source/"
6555 "commons-net-" version "-src.tar.gz"))
6556 (sha256
6557 (base32
6558 "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr"))))
6559 (build-system ant-build-system)
6560 (arguments
6561 `(;; FIXME: MainTest.java tries to read "examples.properties" (which
6562 ;; should be "resources/examples/examples.properties"), but gets "null"
6563 ;; instead.
6564 #:tests? #f
6565 #:jar-name "commons-net.jar"))
6566 (native-inputs
6567 `(("java-junit" ,java-junit)
6568 ("java-hamcrest-core" ,java-hamcrest-core)))
4f236f84 6569 (home-page "https://commons.apache.org/net/")
4b34c21f
RW
6570 (synopsis "Client library for many basic Internet protocols")
6571 (description "The Apache Commons Net library implements the client side of
6572many basic Internet protocols. The purpose of the library is to provide
6573fundamental protocol access, not higher-level abstractions.")
6574 (license license:asl2.0)))
6575
808cb58f
RW
6576(define-public java-jsch
6577 (package
6578 (name "java-jsch")
1c8ba10a 6579 (version "0.1.55")
808cb58f
RW
6580 (source (origin
6581 (method url-fetch)
6582 (uri (string-append "mirror://sourceforge/jsch/jsch/"
6583 version "/jsch-" version ".zip"))
6584 (sha256
6585 (base32
1c8ba10a 6586 "1lxyjwvmwa723wcf3bqn816hkvc03vz4xhbsi7bvfhrz2rpgcfq6"))))
808cb58f
RW
6587 (build-system ant-build-system)
6588 (arguments
6589 `(#:build-target "dist"
1c8ba10a 6590 #:tests? #f ; no tests included
808cb58f
RW
6591 #:phases
6592 (modify-phases %standard-phases
6593 (replace 'install (install-jars "dist")))))
6594 (native-inputs
6595 `(("unzip" ,unzip)))
6596 (home-page "http://www.jcraft.com/jsch/")
6597 (synopsis "Pure Java implementation of SSH2")
6598 (description "JSch is a pure Java implementation of SSH2. JSch allows you
6599to connect to an SSH server and use port forwarding, X11 forwarding, file
6600transfer, etc., and you can integrate its functionality into your own Java
6601programs.")
6602 (license license:bsd-3)))
6603
a6244698
RW
6604(define-public java-commons-compress
6605 (package
6606 (name "java-commons-compress")
6607 (version "1.13")
6608 (source (origin
6609 (method url-fetch)
6610 (uri (string-append "mirror://apache/commons/compress/source/"
6611 "commons-compress-" version "-src.tar.gz"))
6612 (sha256
6613 (base32
6614 "1vjqvavrn0babffn1kciz6v52ibwq2vwhzlb95hazis3lgllnxc8"))))
6615 (build-system ant-build-system)
6616 (arguments
6617 `(#:jar-name "commons-compress.jar"
6618 #:phases
6619 (modify-phases %standard-phases
6620 (add-after 'unpack 'delete-bad-tests
6621 (lambda _
6622 (with-directory-excursion "src/test/java/org/apache/commons/compress/"
6623 ;; FIXME: These tests really should not fail. Maybe they are
6624 ;; indicative of problems with our Java packaging work.
6625
6626 ;; This test fails with a null pointer exception.
6627 (delete-file "archivers/sevenz/SevenZOutputFileTest.java")
6628 ;; This test fails to open test resources.
6629 (delete-file "archivers/zip/ExplodeSupportTest.java")
6630
6631 ;; FIXME: This test adds a dependency on powermock, which is hard to
6632 ;; package at this point.
6633 ;; https://github.com/powermock/powermock
6634 (delete-file "archivers/sevenz/SevenZNativeHeapTest.java"))
02ed96dc
JL
6635 #t))
6636 (replace 'install (install-from-pom "pom.xml")))))
6637 (propagated-inputs
6638 `(("java-xz" ,java-xz)
6639 ("apache-commons-parent-pom" ,apache-commons-parent-pom-41)))
6640 (native-inputs
a6244698 6641 `(("java-junit" ,java-junit)
02ed96dc 6642 ("java-mockito" ,java-mockito-1)))
a6244698
RW
6643 (home-page "https://commons.apache.org/proper/commons-compress/")
6644 (synopsis "Java library for working with compressed files")
6645 (description "The Apache Commons Compress library defines an API for
6646working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ,
6647Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.")
6648 (license license:asl2.0)))
6649
51263ff5
JL
6650(define-public java-commons-csv
6651 (package
6652 (name "java-commons-csv")
6653 (version "1.4")
6654 (source (origin
6655 (method url-fetch)
6656 (uri (string-append "mirror://apache/commons/csv/source/"
6657 "commons-csv-" version "-src.tar.gz"))
6658 (sha256
6659 (base32
6660 "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij"))))
6661 (build-system ant-build-system)
6662 (arguments
6663 `(#:jar-name "commons-csv.jar"
6664 #:source-dir "src/main/java"
6665 #:tests? #f)); FIXME: requires java-h2
6666 (inputs
6667 `(("java-hamcrest-core" ,java-hamcrest-core)
6668 ("java-commons-io" ,java-commons-io)
6669 ("java-commons-lang3" ,java-commons-lang3)
6670 ("junit" ,java-junit)))
6671 (home-page "https://commons.apache.org/proper/commons-csv/")
6672 (synopsis "Read and write CSV documents")
6673 (description "Commons CSV reads and writes files in variations of the Comma
6674Separated Value (CSV) format. The most common CSV formats are predefined in the
6675CSVFormat class:
6676
6677@itemize
6678@item Microsoft Excel
6679@item Informix UNLOAD
6680@item Informix UNLOAD CSV
6681@item MySQL
6682@item RFC 4180
6683@item TDF
6684@end itemize
6685
6686Custom formats can be created using a fluent style API.")
6687 (license license:asl2.0)))
6688
6ee6d0b5
RW
6689(define-public java-osgi-annotation
6690 (package
6691 (name "java-osgi-annotation")
6692 (version "6.0.0")
6693 (source (origin
6694 (method url-fetch)
6695 (uri (string-append "https://repo1.maven.org/maven2/"
6696 "org/osgi/org.osgi.annotation/" version "/"
6697 "org.osgi.annotation-" version "-sources.jar"))
6698 (sha256
6699 (base32
6700 "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w"))))
6701 (build-system ant-build-system)
6702 (arguments
6703 `(#:tests? #f ; no tests
6704 #:jar-name "osgi-annotation.jar"))
c353d014 6705 (home-page "https://www.osgi.org")
6ee6d0b5
RW
6706 (synopsis "Annotation module of OSGi framework")
6707 (description
6708 "OSGi, for Open Services Gateway initiative framework, is a module system
6709and service platform for the Java programming language. This package contains
6710the OSGi annotation module, providing additional services to help dynamic
6711components.")
6712 (license license:asl2.0)))
6713
37e2e5d4
RW
6714(define-public java-osgi-core
6715 (package
6716 (name "java-osgi-core")
6717 (version "6.0.0")
6718 (source (origin
6719 (method url-fetch)
6720 (uri (string-append "https://repo1.maven.org/maven2/"
6721 "org/osgi/org.osgi.core/" version "/"
6722 "org.osgi.core-" version "-sources.jar"))
6723 (sha256
6724 (base32
6725 "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv"))))
6726 (build-system ant-build-system)
6727 (arguments
6728 `(#:tests? #f ; no tests
6729 #:jar-name "osgi-core.jar"))
6730 (inputs
6731 `(("java-osgi-annotation" ,java-osgi-annotation)))
c353d014 6732 (home-page "https://www.osgi.org")
37e2e5d4
RW
6733 (synopsis "Core module of OSGi framework")
6734 (description
6735 "OSGi, for Open Services Gateway initiative framework, is a module system
6736and service platform for the Java programming language. This package contains
6737the OSGi Core module.")
6738 (license license:asl2.0)))
6739
8af92c8f
RW
6740(define-public java-osgi-service-event
6741 (package
6742 (name "java-osgi-service-event")
6743 (version "1.3.1")
6744 (source (origin
6745 (method url-fetch)
6746 (uri (string-append "https://repo1.maven.org/maven2/"
6747 "org/osgi/org.osgi.service.event/"
6748 version "/org.osgi.service.event-"
6749 version "-sources.jar"))
6750 (sha256
6751 (base32
6752 "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm"))))
6753 (build-system ant-build-system)
6754 (arguments
6755 `(#:tests? #f ; no tests
6756 #:jar-name "osgi-service-event.jar"))
6757 (inputs
6758 `(("java-osgi-annotation" ,java-osgi-annotation)
6759 ("java-osgi-core" ,java-osgi-core)))
c353d014 6760 (home-page "https://www.osgi.org")
8af92c8f
RW
6761 (synopsis "OSGi service event module")
6762 (description
6763 "OSGi, for Open Services Gateway initiative framework, is a module system
6764and service platform for the Java programming language. This package contains
6765the OSGi @code{org.osgi.service.event} module.")
6766 (license license:asl2.0)))
6767
674e93a0
RW
6768(define-public java-eclipse-osgi
6769 (package
6770 (name "java-eclipse-osgi")
6771 (version "3.11.3")
6772 (source (origin
6773 (method url-fetch)
6774 (uri (string-append "https://repo1.maven.org/maven2/"
6775 "org/eclipse/platform/org.eclipse.osgi/"
6776 version "/org.eclipse.osgi-"
6777 version "-sources.jar"))
6778 (sha256
6779 (base32
6780 "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b"))))
6781 (build-system ant-build-system)
6782 (arguments
6783 `(#:tests? #f ; no tests included
6784 #:jar-name "eclipse-equinox-osgi.jar"))
6785 (inputs
6786 `(("java-osgi-annotation" ,java-osgi-annotation)))
6787 (home-page "http://www.eclipse.org/equinox/")
6788 (synopsis "Eclipse Equinox OSGi framework")
6789 (description "This package provides an implementation of the OSGi Core
6790specification.")
6791 (license license:epl1.0)))
6792
81b55b1e
RW
6793(define-public java-eclipse-equinox-common
6794 (package
6795 (name "java-eclipse-equinox-common")
e40e3792 6796 (version "3.10.200")
81b55b1e
RW
6797 (source (origin
6798 (method url-fetch)
6799 (uri (string-append "https://repo1.maven.org/maven2/"
6800 "org/eclipse/platform/org.eclipse.equinox.common/"
6801 version "/org.eclipse.equinox.common-"
6802 version "-sources.jar"))
6803 (sha256
6804 (base32
e40e3792 6805 "1yn8ij6xsljlf35sr2l7wvyvc0ss4n1rv0ry5zkgb49dj4hyrqrj"))))
81b55b1e
RW
6806 (build-system ant-build-system)
6807 (arguments
6808 `(#:tests? #f ; no tests included
6809 #:jar-name "eclipse-equinox-common.jar"))
6810 (inputs
6811 `(("java-eclipse-osgi" ,java-eclipse-osgi)))
6812 (home-page "http://www.eclipse.org/equinox/")
6813 (synopsis "Common Eclipse runtime")
6814 (description "This package provides the common Eclipse runtime.")
6815 (license license:epl1.0)))
6816
90368ad9
RW
6817(define-public java-eclipse-core-jobs
6818 (package
6819 (name "java-eclipse-core-jobs")
6820 (version "3.8.0")
6821 (source (origin
6822 (method url-fetch)
6823 (uri (string-append "https://repo1.maven.org/maven2/"
6824 "org/eclipse/platform/org.eclipse.core.jobs/"
6825 version "/org.eclipse.core.jobs-"
6826 version "-sources.jar"))
6827 (sha256
6828 (base32
6829 "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b"))))
6830 (build-system ant-build-system)
6831 (arguments
6832 `(#:tests? #f ; no tests included
6833 #:jar-name "eclipse-core-jobs.jar"))
6834 (inputs
6835 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6836 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6837 (home-page "http://www.eclipse.org/equinox/")
6838 (synopsis "Eclipse jobs mechanism")
6839 (description "This package provides the Eclipse jobs mechanism.")
6840 (license license:epl1.0)))
6841
fbaf09eb
RW
6842(define-public java-eclipse-equinox-registry
6843 (package
6844 (name "java-eclipse-equinox-registry")
6845 (version "3.6.100")
6846 (source (origin
6847 (method url-fetch)
6848 (uri (string-append "https://repo1.maven.org/maven2/"
6849 "org/eclipse/platform/org.eclipse.equinox.registry/"
6850 version "/org.eclipse.equinox.registry-"
6851 version "-sources.jar"))
6852 (sha256
6853 (base32
6854 "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k"))))
6855 (build-system ant-build-system)
6856 (arguments
6857 `(#:tests? #f ; no tests included
6858 #:jar-name "eclipse-equinox-registry.jar"))
6859 (inputs
6860 `(("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6861 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6862 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6863 (home-page "http://www.eclipse.org/equinox/")
6864 (synopsis "Eclipse extension registry support")
6865 (description "This package provides support for the Eclipse extension
6866registry.")
6867 (license license:epl1.0)))
6868
65214c87
RW
6869(define-public java-eclipse-equinox-app
6870 (package
6871 (name "java-eclipse-equinox-app")
6872 (version "1.3.400")
6873 (source (origin
6874 (method url-fetch)
6875 (uri (string-append "https://repo1.maven.org/maven2/"
6876 "org/eclipse/platform/org.eclipse.equinox.app/"
6877 version "/org.eclipse.equinox.app-"
6878 version "-sources.jar"))
6879 (sha256
6880 (base32
6881 "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab"))))
6882 (build-system ant-build-system)
6883 (arguments
6884 `(#:tests? #f ; no tests included
6885 #:jar-name "eclipse-equinox-app.jar"))
6886 (inputs
6887 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6888 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6889 ("java-eclipse-osgi" ,java-eclipse-osgi)
6890 ("java-osgi-service-event" ,java-osgi-service-event)))
6891 (home-page "http://www.eclipse.org/equinox/")
6892 (synopsis "Equinox application container")
6893 (description "This package provides the Equinox application container for
6894Eclipse.")
6895 (license license:epl1.0)))
6896
3f970214
RW
6897(define-public java-eclipse-equinox-preferences
6898 (package
6899 (name "java-eclipse-equinox-preferences")
6900 (version "3.6.1")
6901 (source (origin
6902 (method url-fetch)
6903 (uri (string-append "https://repo1.maven.org/maven2/"
6904 "org/eclipse/platform/org.eclipse.equinox.preferences/"
6905 version "/org.eclipse.equinox.preferences-"
6906 version "-sources.jar"))
6907 (sha256
6908 (base32
6909 "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2"))))
6910 (build-system ant-build-system)
6911 (arguments
6912 `(#:tests? #f ; no tests included
6913 #:jar-name "eclipse-equinox-preferences.jar"))
6914 (inputs
6915 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6916 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6917 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6918 (home-page "http://www.eclipse.org/equinox/")
6919 (synopsis "Eclipse preferences mechanism")
6920 (description "This package provides the Eclipse preferences mechanism with
6921the module @code{org.eclipse.equinox.preferences}.")
6922 (license license:epl1.0)))
6923
4ad3d4f3
RW
6924(define-public java-eclipse-core-contenttype
6925 (package
6926 (name "java-eclipse-core-contenttype")
6927 (version "3.5.100")
6928 (source (origin
6929 (method url-fetch)
6930 (uri (string-append "https://repo1.maven.org/maven2/"
6931 "org/eclipse/platform/org.eclipse.core.contenttype/"
6932 version "/org.eclipse.core.contenttype-"
6933 version "-sources.jar"))
6934 (sha256
6935 (base32
6936 "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi"))))
6937 (build-system ant-build-system)
6938 (arguments
6939 `(#:tests? #f ; no tests included
6940 #:jar-name "eclipse-core-contenttype.jar"))
6941 (inputs
6942 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6943 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6944 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6945 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6946 (home-page "http://www.eclipse.org/")
6947 (synopsis "Eclipse content mechanism")
6948 (description "This package provides the Eclipse content mechanism in the
6949@code{org.eclipse.core.contenttype} module.")
6950 (license license:epl1.0)))
6951
6a7f7e49
RW
6952(define-public java-eclipse-core-runtime
6953 (package
6954 (name "java-eclipse-core-runtime")
4fa9b6e6 6955 (version "3.15.100")
6a7f7e49
RW
6956 (source (origin
6957 (method url-fetch)
6958 (uri (string-append "https://repo1.maven.org/maven2/"
6959 "org/eclipse/platform/org.eclipse.core.runtime/"
6960 version "/org.eclipse.core.runtime-"
6961 version "-sources.jar"))
6962 (sha256
6963 (base32
4fa9b6e6 6964 "0l8xayacsbjvz5hypx2fv47vpw2n4dspamcfb3hx30x9hj8vmg7r"))))
6a7f7e49
RW
6965 (build-system ant-build-system)
6966 (arguments
6967 `(#:tests? #f ; no tests included
6968 #:jar-name "eclipse-core-runtime.jar"))
6969 (inputs
6970 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6971 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6972 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
6973 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6974 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6975 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6976 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6977 (home-page "https://www.eclipse.org/")
6978 (synopsis "Eclipse core runtime")
6979 (description "This package provides the Eclipse core runtime with the
6980module @code{org.eclipse.core.runtime}.")
6981 (license license:epl1.0)))
6982
b3806a15
RW
6983(define-public java-eclipse-core-filesystem
6984 (package
6985 (name "java-eclipse-core-filesystem")
6986 (version "1.6.1")
6987 (source (origin
6988 (method url-fetch)
6989 (uri (string-append "https://repo1.maven.org/maven2/"
6990 "org/eclipse/platform/org.eclipse.core.filesystem/"
6991 version "/org.eclipse.core.filesystem-"
6992 version "-sources.jar"))
6993 (sha256
6994 (base32
6995 "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj"))))
6996 (build-system ant-build-system)
6997 (arguments
6998 `(#:tests? #f ; no tests included
6999 #:jar-name "eclipse-core-filesystem.jar"))
7000 (inputs
7001 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7002 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7003 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7004 (home-page "https://www.eclipse.org/")
7005 (synopsis "Eclipse core file system")
7006 (description "This package provides the Eclipse core file system with the
7007module @code{org.eclipse.core.filesystem}.")
7008 (license license:epl1.0)))
7009
e96060de
RW
7010(define-public java-eclipse-core-expressions
7011 (package
7012 (name "java-eclipse-core-expressions")
7013 (version "3.5.100")
7014 (source (origin
7015 (method url-fetch)
7016 (uri (string-append "https://repo1.maven.org/maven2/"
7017 "org/eclipse/platform/org.eclipse.core.expressions/"
7018 version "/org.eclipse.core.expressions-"
7019 version "-sources.jar"))
7020 (sha256
7021 (base32
7022 "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f"))))
7023 (build-system ant-build-system)
7024 (arguments
7025 `(#:tests? #f ; no tests included
7026 #:jar-name "eclipse-core-expressions.jar"))
7027 (inputs
7028 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7029 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7030 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7031 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7032 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7033 (home-page "https://www.eclipse.org/")
7034 (synopsis "Eclipse core expression language")
7035 (description "This package provides the Eclipse core expression language
7036with the @code{org.eclipse.core.expressions} module.")
7037 (license license:epl1.0)))
7038
e8d0f7c8
RW
7039(define-public java-eclipse-core-variables
7040 (package
7041 (name "java-eclipse-core-variables")
7042 (version "3.3.0")
7043 (source (origin
7044 (method url-fetch)
7045 (uri (string-append "https://repo1.maven.org/maven2/"
7046 "org/eclipse/platform/org.eclipse.core.variables/"
7047 version "/org.eclipse.core.variables-"
7048 version "-sources.jar"))
7049 (sha256
7050 (base32
7051 "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy"))))
7052 (build-system ant-build-system)
7053 (arguments
7054 `(#:tests? #f ; no tests included
7055 #:jar-name "eclipse-core-variables.jar"))
7056 (inputs
7057 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7058 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7059 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7060 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7061 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7062 (home-page "https://www.eclipse.org/platform")
7063 (synopsis "Eclipse core variables")
7064 (description "This package provides the Eclipse core variables module
7065@code{org.eclipse.core.variables}.")
7066 (license license:epl1.0)))
7067
7c3d479e
RW
7068(define-public java-eclipse-ant-core
7069 (package
7070 (name "java-eclipse-ant-core")
7071 (version "3.4.100")
7072 (source (origin
7073 (method url-fetch)
7074 (uri (string-append "https://repo1.maven.org/maven2/"
7075 "org/eclipse/platform/org.eclipse.ant.core/"
7076 version "/org.eclipse.ant.core-"
7077 version "-sources.jar"))
7078 (sha256
7079 (base32
7080 "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7"))))
7081 (build-system ant-build-system)
7082 (arguments
7083 `(#:tests? #f ; no tests included
7084 #:jar-name "eclipse-ant-core.jar"))
7085 (inputs
7086 `(("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
7087 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7088 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7089 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7090 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
7091 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7092 ("java-eclipse-core-variables" ,java-eclipse-core-variables)
7093 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7094 (home-page "https://www.eclipse.org/platform")
7095 (synopsis "Ant build tool core libraries")
7096 (description "This package provides the ant build tool core libraries with
7097the module @code{org.eclipse.ant.core}.")
7098 (license license:epl1.0)))
7099
6636f638
RW
7100(define-public java-eclipse-core-resources
7101 (package
7102 (name "java-eclipse-core-resources")
c8427a5e 7103 (version "3.13.200")
6636f638
RW
7104 (source (origin
7105 (method url-fetch)
7106 (uri (string-append "https://repo1.maven.org/maven2/"
7107 "org/eclipse/platform/org.eclipse.core.resources/"
7108 version "/org.eclipse.core.resources-"
7109 version "-sources.jar"))
7110 (sha256
7111 (base32
c8427a5e 7112 "1sn3b6ky72hkvxcgf9b2jkpbdh3y8lbhi9xxwv1dsiddpkkq91hs"))))
6636f638
RW
7113 (build-system ant-build-system)
7114 (arguments
7115 `(#:tests? #f ; no tests included
7116 #:jar-name "eclipse-core-resources.jar"))
7117 (inputs
7118 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7119 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7120 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7121 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
7122 ("java-eclipse-core-expressions" ,java-eclipse-core-expressions)
7123 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
7124 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
7125 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7126 ("java-eclipse-ant-core" ,java-eclipse-ant-core)
7127 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7128 (home-page "https://www.eclipse.org/")
7129 (synopsis "Eclipse core resource management")
7130 (description "This package provides the Eclipse core resource management
7131module @code{org.eclipse.core.resources}.")
7132 (license license:epl1.0)))
7133
afb5858d
RW
7134(define-public java-eclipse-compare-core
7135 (package
7136 (name "java-eclipse-compare-core")
7137 (version "3.6.0")
7138 (source (origin
7139 (method url-fetch)
7140 (uri (string-append "https://repo1.maven.org/maven2/"
7141 "org/eclipse/platform/org.eclipse.compare.core/"
7142 version "/org.eclipse.compare.core-"
7143 version "-sources.jar"))
7144 (sha256
7145 (base32
7146 "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg"))))
7147 (build-system ant-build-system)
7148 (arguments
7149 `(#:tests? #f ; no tests included
7150 #:jar-name "eclipse-compare-core.jar"))
7151 (inputs
7152 `(("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7153 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7154 ("java-eclipse-osgi" ,java-eclipse-osgi)
7155 ("java-icu4j" ,java-icu4j)))
7156 (home-page "https://www.eclipse.org/")
7157 (synopsis "Eclipse core compare support")
7158 (description "This package provides the Eclipse core compare support
7159module @code{org.eclipse.compare.core}.")
7160 (license license:epl1.0)))
7161
1bb191fc
RW
7162(define-public java-eclipse-team-core
7163 (package
7164 (name "java-eclipse-team-core")
7165 (version "3.8.0")
7166 (source (origin
7167 (method url-fetch)
7168 (uri (string-append "https://repo1.maven.org/maven2/"
7169 "org/eclipse/platform/org.eclipse.team.core/"
7170 version "/org.eclipse.team.core-"
7171 version "-sources.jar"))
7172 (sha256
7173 (base32
7174 "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7"))))
7175 (build-system ant-build-system)
7176 (arguments
7177 `(#:tests? #f ; no tests included
7178 #:jar-name "eclipse-team-core.jar"))
7179 (inputs
7180 `(("java-eclipse-compare-core" ,java-eclipse-compare-core)
7181 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
7182 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
7183 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
7184 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
7185 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7186 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7187 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7188 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7189 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7190 (home-page "https://www.eclipse.org/platform")
7191 (synopsis "Eclipse team support core")
7192 (description "This package provides the Eclipse team support core module
7193@code{org.eclipse.team.core}.")
7194 (license license:epl1.0)))
7195
31342529
RW
7196(define-public java-eclipse-core-commands
7197 (package
7198 (name "java-eclipse-core-commands")
7199 (version "3.8.1")
7200 (source (origin
7201 (method url-fetch)
7202 (uri (string-append "https://repo1.maven.org/maven2/"
7203 "org/eclipse/platform/org.eclipse.core.commands/"
7204 version "/org.eclipse.core.commands-"
7205 version "-sources.jar"))
7206 (sha256
7207 (base32
7208 "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9"))))
7209 (build-system ant-build-system)
7210 (arguments
7211 `(#:tests? #f ; no tests included
7212 #:jar-name "eclipse-core-commands.jar"))
7213 (inputs
7214 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)))
7215 (home-page "https://www.eclipse.org/platform")
7216 (synopsis "Eclipse core commands")
7217 (description "This package provides Eclipse core commands in the module
7218@code{org.eclipse.core.commands}.")
7219 (license license:epl1.0)))
7220
bf96acf7
RW
7221(define-public java-eclipse-text
7222 (package
7223 (name "java-eclipse-text")
7224 (version "3.6.0")
7225 (source (origin
7226 (method url-fetch)
7227 (uri (string-append "https://repo1.maven.org/maven2/"
7228 "org/eclipse/platform/org.eclipse.text/"
7229 version "/org.eclipse.text-"
7230 version "-sources.jar"))
7231 (sha256
7232 (base32
7233 "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1"))))
7234 (build-system ant-build-system)
7235 (arguments
7236 `(#:tests? #f ; no tests included
7237 #:jar-name "eclipse-text.jar"
7238 #:phases
7239 (modify-phases %standard-phases
7240 ;; When creating a new category we must make sure that the new list
7241 ;; matches List<Position>. By default it seems to be too generic
7242 ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>.
7243 ;; Without this we get this error:
7244 ;;
7245 ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376:
7246 ;; error: method put in interface Map<K,V> cannot be applied to given types;
7247 ;; [javac] fPositions.put(category, new ArrayList<>());
7248 ;; [javac] ^
7249 ;; [javac] required: String,List<Position>
7250 ;; [javac] found: String,ArrayList<Object>
7251 ;; [javac] reason: actual argument ArrayList<Object> cannot be converted
7252 ;; to List<Position> by method invocation conversion
7253 ;; [javac] where K,V are type-variables:
7254 ;; [javac] K extends Object declared in interface Map
7255 ;; [javac] V extends Object declared in interface Map
7256 ;;
7257 ;; I don't know if this is a good fix. I suspect it is not, but it
7258 ;; seems to work.
7259 (add-after 'unpack 'fix-compilation-error
7260 (lambda _
7261 (substitute* "src/org/eclipse/jface/text/AbstractDocument.java"
7262 (("Positions.put\\(category, new ArrayList<>\\(\\)\\);")
7263 "Positions.put(category, new ArrayList<Position>());"))
7264 #t)))))
7265 (inputs
7266 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7267 ("java-eclipse-core-commands" ,java-eclipse-core-commands)
7268 ("java-icu4j" ,java-icu4j)))
7269 (home-page "http://www.eclipse.org/platform")
7270 (synopsis "Eclipse text library")
7271 (description "Platform Text is part of the Platform UI project and
7272provides the basic building blocks for text and text editors within Eclipse
7273and contributes the Eclipse default text editor.")
7274 (license license:epl1.0)))
7275
c24d11b7
RW
7276(define-public java-eclipse-jdt-core
7277 (package
7278 (name "java-eclipse-jdt-core")
43d6776b 7279 (version "3.16.0")
c24d11b7
RW
7280 (source (origin
7281 (method url-fetch)
7282 (uri (string-append "https://repo1.maven.org/maven2/"
7283 "org/eclipse/jdt/org.eclipse.jdt.core/"
7284 version "/org.eclipse.jdt.core-"
7285 version "-sources.jar"))
7286 (sha256
7287 (base32
43d6776b 7288 "1g560yr9v2kzv34gc2m3ifpgnj7krcdd6h4gd4z83pwqacwkfz0k"))))
c24d11b7
RW
7289 (build-system ant-build-system)
7290 (arguments
7291 `(#:tests? #f ; no tests included
84b226c2
RW
7292 #:jar-name "eclipse-jdt-core.jar"
7293 #:phases
7294 (modify-phases %standard-phases
7295 (add-after 'unpack 'move-sources
7296 (lambda _
7297 (with-directory-excursion "src/jdtCompilerAdaptersrc/"
7298 (for-each (lambda (file)
7299 (install-file file (string-append "../" (dirname file))))
7300 (find-files "." ".*")))
7301 (delete-file-recursively "src/jdtCompilerAdaptersrc/")
7302 #t))
7303 (add-before 'build 'copy-resources
7304 (lambda _
7305 (with-directory-excursion "src"
7306 (for-each (lambda (file)
7307 (install-file file (string-append "../build/classes/" (dirname file))))
7308 (find-files "." ".*.(props|properties|rsc)")))
7309 #t)))))
c24d11b7
RW
7310 (inputs
7311 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
7312 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
7313 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
7314 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
7315 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7316 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
7317 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7318 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7319 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7320 ("java-eclipse-osgi" ,java-eclipse-osgi)
7321 ("java-eclipse-text" ,java-eclipse-text)))
7322 (home-page "https://www.eclipse.org/jdt")
7323 (synopsis "Java development tools core libraries")
7324 (description "This package provides the core libraries of the Eclipse Java
7325development tools.")
7326 (license license:epl1.0)))
7327
74c2339f
RW
7328(define-public java-eclipse-jdt-compiler-apt
7329 (package
7330 (name "java-eclipse-jdt-compiler-apt")
7331 (version "1.3.400")
7332 (source (origin
7333 (method url-fetch)
7334 (uri (string-append "https://repo1.maven.org/maven2/"
7335 "org/eclipse/jdt/org.eclipse.jdt.compiler.apt/"
7336 version "/org.eclipse.jdt.compiler.apt-"
7337 version "-sources.jar"))
7338 (sha256
7339 (base32
7340 "1s285k9p2ixdqrknb40jbbvw682n9a7l5lqpn583a8pvlzg2l6r8"))))
7341 (build-system ant-build-system)
7342 (arguments
7343 `(#:tests? #f ; no tests included
7344 #:jar-name "eclipse-jdt-compiler-apt.jar"
7345 #:jdk ,openjdk11))
7346 (inputs
7347 `(("java-eclipse-jdt-core" ,java-eclipse-jdt-core)))
7348 (home-page "https://www.eclipse.org/jdt/apt/")
7349 (synopsis "Annotation processing tool")
7350 (description "APT stands for Annotation Processing Tool. APT provides a
7351means for generating files and compiling new Java classes based on annotations
7352found in your source code.")
7353 (license license:epl2.0)))
7354
a5cdcf6c
RW
7355(define-public java-javax-mail
7356 (package
7357 (name "java-javax-mail")
7358 (version "1.5.6")
7359 (source (origin
7360 (method url-fetch)
7361 (uri (string-append "https://repo1.maven.org/maven2/"
7362 "com/sun/mail/javax.mail/"
7363 version "/javax.mail-"
7364 version "-sources.jar"))
7365 (sha256
7366 (base32
7367 "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9"))))
7368 (build-system ant-build-system)
7369 (arguments
7370 `(#:tests? #f ; no tests
7371 #:jar-name "javax-mail.jar"))
7372 (home-page "https://javamail.java.net")
7373 (synopsis "Reference implementation of the JavaMail API")
7374 (description
7375 "This package provides versions of the JavaMail API implementation, IMAP,
7376SMTP, and POP3 service providers, some examples, and documentation for the
7377JavaMail API.")
7378 ;; GPLv2 only with "classpath exception".
7379 (license license:gpl2)))
7380
0e660c4d
RW
7381(define-public java-log4j-api
7382 (package
7383 (name "java-log4j-api")
7384 (version "2.4.1")
7385 (source (origin
7386 (method url-fetch)
7387 (uri (string-append "mirror://apache/logging/log4j/" version
7388 "/apache-log4j-" version "-src.tar.gz"))
7389 (sha256
7390 (base32
7391 "0j5p9gik0jysh37nlrckqbky12isy95cpwg2gv5fas1rcdqbraxd"))))
7392 (build-system ant-build-system)
7393 (arguments
7394 `(#:tests? #f ; tests require unpackaged software
7395 #:jar-name "log4j-api.jar"
7396 #:make-flags
7397 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
7398 "/share/java"))
7399 #:phases
7400 (modify-phases %standard-phases
7401 (add-after 'unpack 'enter-dir
7402 (lambda _ (chdir "log4j-api") #t))
7403 ;; FIXME: The tests require additional software that has not been
7404 ;; packaged yet, such as
7405 ;; * org.apache.maven
7406 ;; * org.apache.felix
7407 (add-after 'enter-dir 'delete-tests
7408 (lambda _ (delete-file-recursively "src/test") #t)))))
7409 (inputs
7410 `(("java-osgi-core" ,java-osgi-core)
7411 ("java-hamcrest-core" ,java-hamcrest-core)
7412 ("java-junit" ,java-junit)))
4d1ddb51 7413 (home-page "https://logging.apache.org/log4j/2.x/")
0e660c4d
RW
7414 (synopsis "API module of the Log4j logging framework for Java")
7415 (description
7416 "This package provides the API module of the Log4j logging framework for
7417Java.")
7418 (license license:asl2.0)))
7419
dfef4231
JL
7420(define-public java-log4j-core
7421 (package
7422 (inherit java-log4j-api)
7423 (name "java-log4j-core")
7424 (inputs
7425 `(("java-osgi-core" ,java-osgi-core)
7426 ("java-hamcrest-core" ,java-hamcrest-core)
7427 ("java-log4j-api" ,java-log4j-api)
7428 ("java-mail" ,java-mail)
7429 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
7430 ("java-lmax-disruptor" ,java-lmax-disruptor)
7431 ("java-kafka" ,java-kafka-clients)
7432 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
7433 ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7434 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
7435 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
7436 ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml)
7437 ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml)
7438 ("java-commons-compress" ,java-commons-compress)
7439 ("java-commons-csv" ,java-commons-csv)
7440 ("java-jeromq" ,java-jeromq)
7441 ("java-junit" ,java-junit)))
7442 (native-inputs
7443 `(("hamcrest" ,java-hamcrest-all)
7444 ("java-commons-io" ,java-commons-io)
7445 ("java-commons-lang3" ,java-commons-lang3)
7446 ("slf4j" ,java-slf4j-api)))
7447 (arguments
7448 `(#:tests? #f ; tests require more dependencies
7449 #:test-dir "src/test"
7450 #:source-dir "src/main/java"
7451 #:jar-name "log4j-core.jar"
7452 #:jdk ,icedtea-8
7453 #:make-flags
7454 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
7455 "/share/java"))
7456 #:phases
7457 (modify-phases %standard-phases
7458 (add-after 'unpack 'enter-dir
7459 (lambda _ (chdir "log4j-core") #t)))))
7460 (synopsis "Core component of the Log4j framework")
7461 (description "This package provides the core component of the Log4j
7462logging framework for Java.")))
7463
2caf873e
JL
7464(define-public java-log4j-1.2-api
7465 (package
7466 (inherit java-log4j-api)
7467 (name "java-log4j-1.2-api")
7468 (arguments
7469 `(#:jar-name "java-log4j-1.2-api.jar"
7470 #:source-dir "log4j-1.2-api/src/main/java"
7471 #:jdk ,icedtea-8
7472 ;; Tests require maven-model (and other maven subprojects), which is a
7473 ;; cyclic dependency.
7474 #:tests? #f))
7475 (inputs
7476 `(("log4j-api" ,java-log4j-api)
7477 ("log4j-core" ,java-log4j-core)
7478 ("osgi-core" ,java-osgi-core)
7479 ("eclipse-osgi" ,java-eclipse-osgi)
7480 ("java-lmax-disruptor" ,java-lmax-disruptor)))))
7481
1c188f4e
HG
7482(define-public java-commons-cli
7483 (package
7484 (name "java-commons-cli")
37602dd8 7485 (version "1.4")
1c188f4e
HG
7486 (source (origin
7487 (method url-fetch)
7488 (uri (string-append "mirror://apache/commons/cli/source/"
7489 "commons-cli-" version "-src.tar.gz"))
7490 (sha256
7491 (base32
37602dd8 7492 "05hgi2z01fqz374y719gl1dxzqvzci5af071zm7vxrjg9vczipm1"))))
1c188f4e
HG
7493 (build-system ant-build-system)
7494 ;; TODO: javadoc
7495 (arguments
51087d51
JL
7496 `(#:jar-name "commons-cli.jar"
7497 #:phases
7498 (modify-phases %standard-phases
7499 (replace 'install
7500 (install-from-pom "pom.xml")))))
1c188f4e
HG
7501 (native-inputs
7502 `(("java-junit" ,java-junit)
7503 ("java-hamcrest-core" ,java-hamcrest-core)))
1b3a6038 7504 (home-page "https://commons.apache.org/cli/")
1c188f4e
HG
7505 (synopsis "Command line arguments and options parsing library")
7506 (description "The Apache Commons CLI library provides an API for parsing
7507command line options passed to programs. It is also able to print help
7508messages detailing the options available for a command line tool.
7509
7510Commons CLI supports different types of options:
7511
7512@itemize
7513@item POSIX like options (ie. tar -zxvf foo.tar.gz)
7514@item GNU like long options (ie. du --human-readable --max-depth=1)
7515@item Java like properties (ie. java -Djava.awt.headless=true Foo)
7516@item Short options with value attached (ie. gcc -O2 foo.c)
7517@item long options with single hyphen (ie. ant -projecthelp)
7518@end itemize
7519
7520This is a part of the Apache Commons Project.")
7521 (license license:asl2.0)))
0a8519bc
HG
7522
7523(define-public java-commons-codec
7524 (package
7525 (name "java-commons-codec")
ba03666d 7526 (version "1.14")
0a8519bc
HG
7527 (source (origin
7528 (method url-fetch)
7529 (uri (string-append "mirror://apache/commons/codec/source/"
7530 "commons-codec-" version "-src.tar.gz"))
7531 (sha256
7532 (base32
ba03666d 7533 "11xr0agckkhm91pb5akf2mbk84yd54gyr178wj57gsm97fi7nkh9"))))
0a8519bc 7534 (build-system ant-build-system)
0a8519bc 7535 (arguments
ba03666d
JL
7536 `(#:jar-name "java-commons-codec.jar"
7537 #:source-dir "src/main/java"
7538 #:test-dir "src/test"
7539 #:test-exclude (list "**/*AbstractTest.java")
0a8519bc
HG
7540 #:phases
7541 (modify-phases %standard-phases
ba03666d
JL
7542 (add-before 'build 'copy-resources
7543 (lambda _
7544 (copy-recursively "src/main/resources"
7545 "build/classes")
7546 #t))
7547 (add-before 'check 'copy-test-resources
7548 (lambda _
7549 (copy-recursively "src/test/resources"
7550 "build/test-classes")
7551 #t))
7552 (replace 'install (install-from-pom "pom.xml")))))
0a8519bc 7553 (native-inputs
ba03666d
JL
7554 `(("java-commons-lang3" ,java-commons-lang3)
7555 ("java-junit" ,java-junit)))
7556 (propagated-inputs
7557 `(("apache-commons-parent-pom" ,apache-commons-parent-pom-50)))
77e1fe31 7558 (home-page "https://commons.apache.org/codec/")
0a8519bc
HG
7559 (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs")
7560 (description "The codec package contains simple encoder and decoders for
7561various formats such as Base64 and Hexadecimal. In addition to these widely
7562used encoders and decoders, the codec package also maintains a collection of
7563phonetic encoding utilities.
7564
7565This is a part of the Apache Commons Project.")
7566 (license license:asl2.0)))
7d91c1b9
HG
7567
7568(define-public java-commons-daemon
7569 (package
7570 (name "java-commons-daemon")
b503ae3d 7571 (version "1.1.0")
7d91c1b9
HG
7572 (source (origin
7573 (method url-fetch)
7574 (uri (string-append "mirror://apache/commons/daemon/source/"
7575 "commons-daemon-" version "-src.tar.gz"))
7576 (sha256
7577 (base32
b503ae3d 7578 "141gkhfzv5v3pdhic6y4ardq2dhsa3v36j8wmmhy6f8mac48fp7n"))))
7d91c1b9
HG
7579 (build-system ant-build-system)
7580 (arguments
7581 `(#:test-target "test"
7582 #:phases
7583 (modify-phases %standard-phases
7584 (add-after 'build 'build-javadoc ant-build-javadoc)
7585 (replace 'install (install-jars "dist"))
7586 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
7587 (native-inputs
7588 `(("java-junit" ,java-junit)))
4f236f84 7589 (home-page "https://commons.apache.org/daemon/")
7d91c1b9
HG
7590 (synopsis "Library to launch Java applications as daemons")
7591 (description "The Daemon package from Apache Commons can be used to
7592implement Java applications which can be launched as daemons. For example the
7593program will be notified about a shutdown so that it can perform cleanup tasks
7594before its process of execution is destroyed by the operation system.
7595
7596This package contains the Java library. You will also need the actual binary
7597for your architecture which is provided by the jsvc package.
7598
7599This is a part of the Apache Commons Project.")
7600 (license license:asl2.0)))
9f68e74a 7601
eb270ecf
RW
7602(define-public java-javaewah
7603 (package
7604 (name "java-javaewah")
7605 (version "1.1.6")
7606 (source (origin
2876b233
EF
7607 (method git-fetch)
7608 (uri (git-reference
7609 (url "https://github.com/lemire/javaewah/")
7610 (commit (string-append "JavaEWAH-" version))))
7611 (file-name (git-file-name name version))
eb270ecf
RW
7612 (sha256
7613 (base32
2876b233 7614 "1m8qcb1py76v7avbjjrkvyy6fhr5dk2ywy73gbsxqry04gkm2nhw"))))
eb270ecf
RW
7615 (build-system ant-build-system)
7616 (arguments `(#:jar-name "javaewah.jar"))
7617 (inputs
7618 `(("java-junit" ,java-junit)
7619 ("java-hamcrest-core" ,java-hamcrest-core)))
7620 (home-page "https://github.com/lemire/javaewah")
7621 (synopsis "Compressed alternative to the Java @code{BitSet} class")
7622 (description "This is a word-aligned compressed variant of the Java
7623@code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like
7624compression scheme. It can be used to implement bitmap indexes.
7625
7626The goal of word-aligned compression is not to achieve the best compression,
2876b233 7627but rather to improve query processing time. Hence, JavaEWAH tries to save CPU
eb270ecf
RW
7628cycles, maybe at the expense of storage. However, the EWAH scheme is always
7629more efficient storage-wise than an uncompressed bitmap (as implemented in the
7630@code{BitSet} class by Sun).")
7631 ;; GPL2.0 derivates are explicitly allowed.
7632 (license license:asl2.0)))
7633
f8e4d022
RW
7634(define-public java-slf4j-api
7635 (package
7636 (name "java-slf4j-api")
7637 (version "1.7.25")
7638 (source (origin
7639 (method url-fetch)
7640 (uri (string-append "https://www.slf4j.org/dist/slf4j-"
7641 version ".tar.gz"))
7642 (sha256
7643 (base32
7644 "13j51sgzmhhdrfa74gkal5zpip7r1440dh7zsi2c8bpb2zs1v8kb"))
7645 (modules '((guix build utils)))
7646 ;; Delete bundled jars.
7647 (snippet
7648 '(begin
7649 (for-each delete-file (find-files "." "\\.jar$"))
7650 #t))))
7651 (build-system ant-build-system)
7652 (arguments
dcf7a8a6 7653 `(#:jar-name "slf4j-api.jar"
f8e4d022 7654 #:source-dir "slf4j-api/src/main"
dcf7a8a6
JL
7655 #:test-dir "slf4j-api/src/test"
7656 #:phases
7657 (modify-phases %standard-phases
7658 (add-after 'build 'regenerate-jar
7659 (lambda _
7660 ;; pom.xml ignores these files in the jar creation process. If we don't,
7661 ;; we get the error "This code should have never made it into slf4j-api.jar"
7662 (delete-file-recursively "build/classes/org/slf4j/impl")
2c8ac364
MW
7663 (invoke "jar" "-cf" "build/jar/slf4j-api.jar" "-C"
7664 "build/classes" ".")))
dcf7a8a6
JL
7665 (add-before 'check 'dont-test-abstract-classes
7666 (lambda _
7667 ;; abstract classes are not meant to be run with junit
7668 (substitute* "build.xml"
7669 (("<include name=\"\\*\\*/\\*Test.java\" />")
7670 (string-append "<include name=\"**/*Test.java\" />"
7671 "<exclude name=\"**/MultithreadedInitializationTest"
2c8ac364 7672 ".java\" />")))
51087d51
JL
7673 #t))
7674 (replace 'install
7675 (install-from-pom "slf4j-api/pom.xml")))))
7676 (propagated-inputs
7677 `(("java-slf4j-parent" ,java-slf4j-parent)))
7678 (native-inputs
f8e4d022
RW
7679 `(("java-junit" ,java-junit)
7680 ("java-hamcrest-core" ,java-hamcrest-core)))
7681 (home-page "https://www.slf4j.org/")
7682 (synopsis "Simple logging facade for Java")
7683 (description "The Simple Logging Facade for Java (SLF4J) serves as a
7684simple facade or abstraction for various logging
7685frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j})
7686allowing the end user to plug in the desired logging framework at deployment
7687time.")
7688 (license license:expat)))
7689
51087d51 7690(define java-slf4j-parent
6d047cc4
GB
7691 (package
7692 (inherit java-slf4j-api)
51087d51
JL
7693 (name "java-slf4j-parent")
7694 (native-inputs `())
7695 (propagated-inputs '())
6d047cc4 7696 (arguments
51087d51
JL
7697 `(#:tests? #f
7698 #:phases
7699 (modify-phases %standard-phases
7700 (delete 'build)
7701 (delete 'configure)
7702 (replace 'install
7703 (install-pom-file "pom.xml")))))))
6d047cc4 7704
88f256a1
TD
7705(define-public java-slf4j-simple
7706 (package
7707 (name "java-slf4j-simple")
7708 (version "1.7.25")
7709 (source (package-source java-slf4j-api))
7710 (build-system ant-build-system)
7711 (arguments
7712 `(#:jar-name "slf4j-simple.jar"
7713 #:source-dir "slf4j-simple/src/main"
7714 #:test-dir "slf4j-simple/src/test"
7715 #:phases
7716 (modify-phases %standard-phases
7717 ;; The tests need some test classes from slf4j-api
7718 (add-before 'check 'build-slf4j-api-test-helpers
7719 (lambda _
7720 ;; Add current dir to CLASSPATH ...
7721 (setenv "CLASSPATH"
7722 (string-append (getcwd) ":" (getenv "CLASSPATH")))
7723 ;; ... and build test helper classes here:
2c8ac364
MW
7724 (apply invoke
7725 `("javac" "-d" "."
51087d51
JL
7726 ,@(find-files "slf4j-api/src/test" ".*\\.java")))))
7727 (replace 'install
7728 (install-from-pom "slf4j-simple/pom.xml")))))
7729 (propagated-inputs
7730 `(("java-slf4j-api" ,java-slf4j-api)))
7731 (native-inputs
88f256a1 7732 `(("java-junit" ,java-junit)
51087d51 7733 ("java-hamcrest-core" ,java-hamcrest-core)))
88f256a1
TD
7734 (home-page "https://www.slf4j.org/")
7735 (synopsis "Simple implementation of simple logging facade for Java")
7736 (description "SLF4J binding for the Simple implementation, which outputs
7737all events to System.err. Only messages of level INFO and higher are
7738printed.")
7739 (license license:expat)))
7740
9f68e74a
JL
7741(define-public antlr2
7742 (package
7743 (name "antlr2")
7744 (version "2.7.7")
7745 (source (origin
7746 (method url-fetch)
7420c1ee 7747 (uri (string-append "https://www.antlr2.org/download/antlr-"
9f68e74a
JL
7748 version ".tar.gz"))
7749 (sha256
7750 (base32
7751 "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5"))
7752 (modules '((guix build utils)))
7753 (snippet
7754 '(begin
7755 (delete-file "antlr.jar")
7756 (substitute* "lib/cpp/antlr/CharScanner.hpp"
7757 (("#include <map>")
7758 (string-append
6d225e89
RW
7759 "#include <map>\n"
7760 "#define EOF (-1)\n"
7761 "#include <strings.h>")))
9f68e74a 7762 (substitute* "configure"
6d225e89
RW
7763 (("/bin/sh") "sh"))
7764 #t))))
9f68e74a
JL
7765 (build-system gnu-build-system)
7766 (arguments
6d225e89 7767 `(#:tests? #f ; no test target
3ad90395
RW
7768 #:imported-modules ((guix build ant-build-system)
7769 (guix build syscalls)
7770 ,@%gnu-build-system-modules)
7771 #:modules (((guix build ant-build-system) #:prefix ant:)
7772 (guix build gnu-build-system)
7773 (guix build utils))
9f68e74a
JL
7774 #:phases
7775 (modify-phases %standard-phases
7776 (add-after 'install 'strip-jar-timestamps
3ad90395 7777 (assoc-ref ant:%standard-phases 'strip-jar-timestamps))
79f6fc0d
JL
7778 (add-before 'configure 'fix-timestamp
7779 (lambda _
7780 (substitute* "configure"
7781 (("^TIMESTAMP.*") "TIMESTAMP=19700101\n"))
7782 #t))
9f68e74a
JL
7783 (add-after 'configure 'fix-bin-ls
7784 (lambda _
3ad90395
RW
7785 (substitute* (find-files "." "Makefile")
7786 (("/bin/ls") "ls"))
7787 #t)))))
9f68e74a
JL
7788 (native-inputs
7789 `(("which" ,which)
7790 ("zip" ,zip)
7791 ("java" ,icedtea "jdk")))
7792 (inputs
7793 `(("java" ,icedtea)))
7420c1ee 7794 (home-page "https://www.antlr2.org")
9f68e74a
JL
7795 (synopsis "Framework for constructing recognizers, compilers, and translators")
7796 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
7797is a language tool that provides a framework for constructing recognizers,
7798compilers, and translators from grammatical descriptions containing Java, C#,
7799C++, or Python actions. ANTLR provides excellent support for tree construction,
7800tree walking, and translation.")
7801 (license license:public-domain)))
a0f15eff 7802
e44112e1 7803(define-public java-stringtemplate-3
a0f15eff 7804 (package
e44112e1 7805 (name "java-stringtemplate")
a0f15eff
JL
7806 (version "3.2.1")
7807 (source (origin
7808 (method url-fetch)
7809 (uri (string-append "https://github.com/antlr/website-st4/raw/"
7810 "gh-pages/download/stringtemplate-"
7811 version ".tar.gz"))
7812 (sha256
7813 (base32
7814 "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is"))))
7815 (build-system ant-build-system)
7816 (arguments
129d926d 7817 `(#:jar-name (string-append ,name "-" ,version ".jar")
2fcda6d2 7818 #:test-dir "test"
b101b4e8
RW
7819 #:modules ((guix build ant-build-system)
7820 (guix build utils)
7821 (srfi srfi-1))
a0f15eff
JL
7822 #:phases
7823 (modify-phases %standard-phases
2fcda6d2
RW
7824 (add-before 'check 'fix-tests
7825 (lambda _
7826 (substitute* "build.xml"
7827 (("\\$\\{test.home\\}/java")
7828 "${test.home}/org"))
7829 #t))
a0f15eff
JL
7830 (add-before 'build 'generate-grammar
7831 (lambda _
b101b4e8 7832 (with-directory-excursion "src/org/antlr/stringtemplate/language/"
2c8ac364
MW
7833 (for-each (lambda (file)
7834 (format #t "~a\n" file)
7835 (invoke "antlr" file))
7836 '("template.g" "angle.bracket.template.g" "action.g"
7837 "eval.g" "group.g" "interface.g")))
7838 #t)))))
a0f15eff 7839 (native-inputs
2fcda6d2
RW
7840 `(("antlr" ,antlr2)
7841 ("java-junit" ,java-junit)))
ba11a8bd 7842 (home-page "https://www.stringtemplate.org")
a0f15eff
JL
7843 (synopsis "Template engine to generate formatted text output")
7844 (description "StringTemplate is a java template engine (with ports for C#,
7845Objective-C, JavaScript, Scala) for generating source code, web pages, emails,
7846or any other formatted text output. StringTemplate is particularly good at
7847code generators, multiple site skins, and internationalization / localization.
7848StringTemplate also powers ANTLR.")
7849 (license license:bsd-3)))
4ad8aed7
JL
7850
7851;; antlr3 is partially written using antlr3 grammar files. It also depends on
7852;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar
7853;; files and uses antlr3 at runtime. The latest version requires a recent version
7854;; of antlr3 at runtime.
7855;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3.
7856;; This version of ST4 is sufficient for the latest antlr3.
7857;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build
7858;; the latest ST4 with it. Then we build our final antlr3 that will be linked
7859;; against the latest ST4.
7860;; antlr3.3 still depends on antlr3 to generate some files, so we use an
7861;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses
7862;; only grammar files with the antlr2 syntax.
7863;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3.
7864
64b7efc0 7865(define-public java-stringtemplate
407df789 7866 (package (inherit java-stringtemplate-3)
64b7efc0 7867 (name "java-stringtemplate")
4ad8aed7
JL
7868 (version "4.0.8")
7869 (source (origin
7870 (method url-fetch)
7871 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/"
7872 version ".tar.gz"))
7873 (file-name (string-append name "-" version ".tar.gz"))
7874 (sha256
7875 (base32
7876 "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087"))))
7877 (build-system ant-build-system)
7878 (arguments
6db77c7c
RW
7879 `(#:jar-name (string-append ,name "-" ,version ".jar")
7880 #:tests? #f ; FIXME: tests fail for unknown reasons
7881 #:test-dir "test"
f4aa4cfe
RW
7882 #:modules ((guix build ant-build-system)
7883 (guix build utils)
7884 (srfi srfi-1))
4ad8aed7
JL
7885 #:phases
7886 (modify-phases %standard-phases
6db77c7c
RW
7887 (add-before 'check 'fix-test-target
7888 (lambda _
7889 (substitute* "build.xml"
7890 (("\\$\\{test.home\\}/java") "${test.home}/")
7891 (("\\*Test.java") "Test*.java"))
7892 #t))
4ad8aed7 7893 (add-before 'build 'generate-grammar
f4aa4cfe
RW
7894 (lambda _
7895 (with-directory-excursion "src/org/stringtemplate/v4/compiler/"
2c8ac364
MW
7896 (for-each (lambda (file)
7897 (format #t "~a\n" file)
7898 (invoke "antlr3" file))
7899 '("STParser.g" "Group.g" "CodeGenerator.g")))
7900 #t)))))
4ad8aed7
JL
7901 (inputs
7902 `(("antlr3" ,antlr3-bootstrap)
7903 ("antlr2" ,antlr2)
6db77c7c
RW
7904 ("java-stringtemplate" ,java-stringtemplate-3)
7905 ("java-junit" ,java-junit)))))
4ad8aed7 7906
1345eeb0 7907(define java-stringtemplate-4.0.6
64b7efc0 7908 (package (inherit java-stringtemplate)
1345eeb0 7909 (name "java-stringtemplate")
4ad8aed7
JL
7910 (version "4.0.6")
7911 (source (origin
7912 (method url-fetch)
7913 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-"
7914 version ".tar.gz"))
7915 (file-name (string-append name "-" version ".tar.gz"))
7916 (sha256
7917 (base32
7918 "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp"))))
7919 (inputs
7920 `(("antlr3" ,antlr3-3.3)
7921 ("antlr2" ,antlr2)
e44112e1 7922 ("java-stringtemplate" ,java-stringtemplate-3)))))
4ad8aed7
JL
7923
7924(define-public antlr3
7925 (package
7926 (name "antlr3")
7927 (version "3.5.2")
7928 (source (origin
043ee597
EF
7929 (method git-fetch)
7930 (uri (git-reference
7931 (url "https://github.com/antlr/antlr3")
7932 (commit version)))
7933 (file-name (git-file-name name version))
4ad8aed7
JL
7934 (sha256
7935 (base32
043ee597 7936 "0cafavrjmzqhklghrk8c2jqxkdwxgzskm20pbrfd3r41cn00dpnf"))))
4ad8aed7
JL
7937 (build-system ant-build-system)
7938 (arguments
7939 `(#:jar-name (string-append ,name "-" ,version ".jar")
7940 #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3"
7941 #:tests? #f
7942 #:phases
7943 (modify-phases %standard-phases
7944 (add-after 'install 'bin-install
7945 (lambda* (#:key inputs outputs #:allow-other-keys)
7946 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
7947 (bin (string-append (assoc-ref outputs "out") "/bin")))
7948 (mkdir-p bin)
7949 (with-output-to-file (string-append bin "/antlr3")
7950 (lambda _
7951 (display
7952 (string-append "#!" (which "sh") "\n"
7953 "java -cp " jar "/" ,name "-" ,version ".jar:"
7954 (string-concatenate
7955 (find-files (assoc-ref inputs "stringtemplate")
7956 ".*\\.jar"))
7957 ":"
7958 (string-concatenate
7959 (find-files (assoc-ref inputs "stringtemplate4")
7960 ".*\\.jar"))
7961 ":"
7962 (string-concatenate
7963 (find-files (string-append
7964 (assoc-ref inputs "antlr")
7965 "/lib")
7966 ".*\\.jar"))
7967 " org.antlr.Tool $*"))))
2c8ac364
MW
7968 (chmod (string-append bin "/antlr3") #o755))
7969 #t))
4ad8aed7
JL
7970 (add-before 'build 'generate-grammar
7971 (lambda _
7972 (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/")
7973 (for-each (lambda (file)
7974 (display file)
7975 (newline)
2c8ac364 7976 (invoke "antlr3" file))
4ad8aed7
JL
7977 '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g"
7978 "AssignTokenTypesWalker.g"
7979 "ActionTranslator.g" "TreeToNFAConverter.g"
7980 "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g"
7981 "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g"))
7982 (substitute* "ANTLRParser.java"
7983 (("public Object getTree") "public GrammarAST getTree"))
7984 (substitute* "ANTLRv3Parser.java"
7985 (("public Object getTree") "public CommonTree getTree"))
7986 (chdir "../../../../../java")
4ad8aed7
JL
7987 (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java"
7988 (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*;
7989import org.antlr.grammar.v3.ANTLRTreePrinter;"))
7990 (substitute* "org/antlr/tool/ErrorManager.java"
7991 (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") ""))
2c8ac364
MW
7992 (chdir "../../../..")
7993 #t))
4ad8aed7
JL
7994 (add-before 'build 'fix-build-xml
7995 (lambda _
7996 (substitute* "build.xml"
570f3b63
JL
7997 (("target name=\"compile\">")
7998 "target name=\"compile\">
7999<copy todir=\"${classes.dir}\">
4ad8aed7
JL
8000<fileset dir=\"tool/src/main/resources\">
8001<include name=\"**/*.stg\"/>
8002<include name=\"**/*.st\"/>
8003<include name=\"**/*.sti\"/>
8004<include name=\"**/STLexer.tokens\"/>
8005</fileset>
570f3b63 8006</copy>"))
2c8ac364 8007 #t)))))
4ad8aed7
JL
8008 (native-inputs
8009 `(("antlr" ,antlr2)
8010 ("antlr3" ,antlr3-bootstrap)))
8011 (inputs
8012 `(("junit" ,java-junit)
e44112e1 8013 ("stringtemplate" ,java-stringtemplate-3)
64b7efc0 8014 ("stringtemplate4" ,java-stringtemplate)))
4ad8aed7 8015 (propagated-inputs
e44112e1 8016 `(("stringtemplate" ,java-stringtemplate-3)
4ad8aed7 8017 ("antlr" ,antlr2)
1345eeb0 8018 ("stringtemplate4" ,java-stringtemplate-4.0.6)))
a264250b 8019 (home-page "https://www.antlr3.org")
4ad8aed7
JL
8020 (synopsis "Framework for constructing recognizers, compilers, and translators")
8021 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
8022is a language tool that provides a framework for constructing recognizers,
8023compilers, and translators from grammatical descriptions containing Java, C#,
8024C++, or Python actions. ANTLR provides excellent support for tree construction,
8025tree walking, and translation.")
8026 (license license:bsd-3)))
8027
8028(define antlr3-bootstrap
8029 (package
8030 (inherit antlr3)
8031 (name "antlr3-bootstrap")
8032 (native-inputs
8033 `(("antlr" ,antlr2)
8034 ("antlr3" ,antlr3-3.3)))
8035 (inputs
8036 `(("junit" ,java-junit)))))
8037
011f9412 8038(define-public antlr3-3.3
4ad8aed7
JL
8039 (package
8040 (inherit antlr3)
8041 (name "antlr3")
8042 (version "3.3")
8043 (source (origin
8044 (method url-fetch)
8045 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
8046 "gh-pages/download/antlr-"
8047 version ".tar.gz"))
8048 (sha256
8049 (base32
48c86220
GB
8050 "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m"))
8051 (patches
8052 (search-patches "antlr3-3_3-fix-java8-compilation.patch"))))
4ad8aed7
JL
8053 (arguments
8054 `(#:jar-name (string-append ,name "-" ,version ".jar")
a9540107
RW
8055 #:source-dir (string-join '("tool/src/main/java"
8056 "runtime/Java/src/main/java"
8057 "tool/src/main/antlr2"
8058 "tool/src/main/antlr3")
8059 ":")
8060 #:tests? #f ; FIXME: tests seem to require maven plugin
8061 #:modules ((guix build ant-build-system)
8062 (guix build utils)
8063 (srfi srfi-1))
4ad8aed7
JL
8064 #:phases
8065 (modify-phases %standard-phases
8066 (add-after 'install 'bin-install
8067 (lambda* (#:key inputs outputs #:allow-other-keys)
a9540107
RW
8068 (let* ((out (assoc-ref outputs "out"))
8069 (jar (string-append out "/share/java"))
8070 (bin (string-append out "/bin")))
4ad8aed7
JL
8071 (mkdir-p bin)
8072 (with-output-to-file (string-append bin "/antlr3")
8073 (lambda _
8074 (display
a9540107
RW
8075 (string-append
8076 "#!" (which "sh") "\n"
8077 "java -cp " jar "/antlr3-3.3.jar:"
8078 (string-join
8079 (append (find-files (assoc-ref inputs "java-stringtemplate")
8080 ".*\\.jar$")
8081 (find-files (string-append (assoc-ref inputs "antlr")
8082 "/lib")
8083 ".*\\.jar$"))
8084 ":")
8085 " org.antlr.Tool $*"))))
8086 (chmod (string-append bin "/antlr3") #o755)
8087 #t)))
4ad8aed7
JL
8088 (add-before 'build 'generate-grammar
8089 (lambda _
4ad8aed7
JL
8090 (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java"
8091 (("import org.antlr.grammar.v2.\\*;")
8092 "import org.antlr.grammar.v2.*;\n
8093import org.antlr.grammar.v2.TreeToNFAConverter;\n
8094import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n
a9540107 8095import org.antlr.grammar.v2.ANTLRTreePrinter;"))
2c8ac364
MW
8096 (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/"
8097 (for-each (lambda (file)
8098 (format #t "~a\n" file)
8099 (invoke "antlr" file))
8100 '("antlr.g" "antlr.print.g" "assign.types.g"
8101 "buildnfa.g" "codegen.g" "define.g")))
8102 (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/"
8103 (for-each (lambda (file)
8104 (format #t "~a\n" file)
8105 (invoke "antlr3" file))
8106 '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g"
8107 "ANTLRv3Tree.g")))
8108 #t))
4ad8aed7
JL
8109 (add-before 'build 'fix-build-xml
8110 (lambda _
8111 (substitute* "build.xml"
570f3b63
JL
8112 (("target name=\"compile\">")
8113 "target name=\"compile\">
8114<copy todir=\"${classes.dir}\">
4ad8aed7
JL
8115<fileset dir=\"tool/src/main/resources\">
8116<include name=\"**/*.stg\"/>
8117<include name=\"**/*.st\"/>
8118<include name=\"**/*.sti\"/>
8119<include name=\"**/STLexer.tokens\"/>
8120</fileset>
570f3b63 8121</copy>"))
a9540107 8122 #t)))))
4ad8aed7
JL
8123 (native-inputs
8124 `(("antlr" ,antlr2)
8125 ("antlr3" ,antlr3-3.1)))
8126 (inputs
8127 `(("junit" ,java-junit)))
8128 (propagated-inputs
e44112e1 8129 `(("java-stringtemplate" ,java-stringtemplate-3)
dcd62e8b 8130 ("antlr" ,antlr2)))))
4ad8aed7 8131
570f3b63 8132(define-public antlr3-3.1
4ad8aed7
JL
8133 (package
8134 (inherit antlr3)
4ad8aed7
JL
8135 (version "3.1")
8136 (source (origin
8137 (method url-fetch)
8138 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
8139 "gh-pages/download/antlr-"
8140 version ".tar.gz"))
8141 (sha256
8142 (base32
4c763b4d
GB
8143 "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z"))
8144 (patches
8145 (search-patches "antlr3-3_1-fix-java8-compilation.patch"))))
4ad8aed7 8146 (arguments
ec32bc98 8147 `(#:jar-name (string-append "antlr3-" ,version ".jar")
4ad8aed7
JL
8148 #:source-dir "src:runtime/Java/src"
8149 #:tests? #f
8150 #:phases
8151 (modify-phases %standard-phases
8152 (add-after 'install 'bin-install
8153 (lambda* (#:key inputs outputs #:allow-other-keys)
8154 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
8155 (bin (string-append (assoc-ref outputs "out") "/bin")))
8156 (mkdir-p bin)
8157 (with-output-to-file (string-append bin "/antlr3")
8158 (lambda _
8159 (display
8160 (string-append "#!" (which "sh") "\n"
57e37764 8161 "java -cp " jar "/antlr3-3.1.jar:"
4ad8aed7
JL
8162 (string-concatenate
8163 (find-files (assoc-ref inputs "stringtemplate")
8164 ".*\\.jar"))
8165 ":"
8166 (string-concatenate
8167 (find-files (string-append
8168 (assoc-ref inputs "antlr")
8169 "/lib")
8170 ".*\\.jar"))
8171 " org.antlr.Tool $*"))))
2c8ac364
MW
8172 (chmod (string-append bin "/antlr3") #o755))
8173 #t))
4ad8aed7
JL
8174 (add-before 'build 'generate-grammar
8175 (lambda _
8176 (let ((dir "src/org/antlr/tool/"))
8177 (for-each (lambda (file)
8178 (display file)
8179 (newline)
13f38d31 8180 (invoke "antlr" "-o" dir (string-append dir file)))
4ad8aed7
JL
8181 '("antlr.g" "antlr.print.g" "assign.types.g"
8182 "buildnfa.g" "define.g")))
8183 (format #t "codegen.g\n")
13f38d31
RW
8184 (invoke "antlr" "-o" "src/org/antlr/codegen"
8185 "src/org/antlr/codegen/codegen.g")
8186 #t))
4ad8aed7
JL
8187 (add-before 'build 'fix-build-xml
8188 (lambda _
8189 (substitute* "build.xml"
570f3b63
JL
8190 (("target name=\"compile\">")
8191 "target name=\"compile\">
8192<copy todir=\"${classes.dir}\">
4ad8aed7
JL
8193<fileset dir=\"src\">
8194<include name=\"**/*.stg\"/>
8195<include name=\"**/*.st\"/>
8196<include name=\"**/*.sti\"/>
8197<include name=\"**/STLexer.tokens\"/>
8198</fileset>
570f3b63 8199</copy>"))
2c8ac364 8200 #t)))))
4ad8aed7
JL
8201 (native-inputs
8202 `(("antlr" ,antlr2)))
8203 (inputs
8204 `(("junit" ,java-junit)))
8205 (propagated-inputs
e44112e1 8206 `(("stringtemplate" ,java-stringtemplate-3)))))
d44bcd7a 8207
1d630fe0
JL
8208(define-public java-treelayout
8209 (package
8210 (name "java-treelayout")
8211 (version "1.0.3")
8212 (source (origin
8213 (method git-fetch)
8214 (uri (git-reference
8215 (url "https://github.com/abego/treelayout")
8216 (commit (string-append "v" version))))
8217 (file-name (git-file-name name version))
8218 (sha256
8219 (base32
8220 "18my8ql9b1y0n0zrvkih7xfhf3dpgfhyfifvkcfhmwcvw3divxak"))))
8221 (build-system ant-build-system)
8222 (arguments
8223 `(#:jar-name (string-append ,name "-" ,version ".jar")
8224 #:source-dir "org.abego.treelayout/src/main/java"
8225 #:test-dir "org.abego.treelayout/src/test"))
8226 (inputs
8227 `(("java-junit" ,java-junit)))
8228 (native-inputs
8229 `(("java-hamcrest-core" ,java-hamcrest-core)))
8230 (home-page "http://treelayout.sourceforge.net")
8231 (synopsis "Tree Layout Algorithm in Java")
8232 (description "TreeLayout creates tree layouts for arbitrary trees. It is
8233not restricted to a specific output or format, but can be used for any kind of
8234two dimensional diagram. Examples are Swing based components, SVG files, etc.
8235This is possible because TreeLayout separates the layout of a tree from the
8236actual rendering.")
8237 (license license:bsd-3)))
8238
5d115440
JL
8239(define-public java-antlr4-runtime
8240 (package
8241 (name "java-antlr4-runtime")
8242 (version "4.8")
8243 (source (origin
8244 (method git-fetch)
8245 (uri (git-reference
8246 (url "https://github.com/antlr/antlr4")
8247 (commit version)))
8248 (file-name (git-file-name name version))
8249 (sha256
8250 (base32
8251 "1qal3add26qxskm85nk7r758arladn5rcyjinmhlhznmpbbv9j8m"))
8252 (patches
8253 (search-patches "java-antlr4-Add-standalone-generator.patch"
8254 "java-antlr4-fix-code-too-large.java"))))
8255 (build-system ant-build-system)
8256 (arguments
8257 `(#:jar-name "java-antlr4-runtime.jar"
8258 #:source-dir "runtime/Java/src/org"
8259 #:tests? #f; tests depend on java-antlr4 itself
8260 #:phases
8261 (modify-phases %standard-phases
8262 (add-before 'build 'copy-resources
8263 (lambda _
8264 (copy-recursively "runtime/Java/src/main/dot"
8265 "build/classes")
8266 #t)))))
8267 (home-page "https://antlr.org")
8268 (synopsis "ANTLR runtime library")
8269 (description "This package contains the runtime library used with generated
8270sources by ANTLR.")
8271 (license license:bsd-3)))
8272
f9a6e389
JL
8273(define-public antlr4
8274 (package
8275 (inherit java-antlr4-runtime)
8276 (name "antlr4")
8277 (arguments
8278 `(#:jar-name "antlr4.jar"
8279 #:source-dir "tool/src"
8280 #:test-dir "tool-testsuite/test:runtime-testsuite/test:runtime-testsuite/annotations/src"
8281 #:test-include (list "**/Test*.java")
8282 #:test-exclude (list
8283 ;; no runnable method
8284 "**/TestOutputReading.java"
8285 ;; no @Test methods
8286 "**/TestParserErrors.java"
8287 "**/TestSemPredEvalParser.java"
8288 "**/TestSets.java"
8289 "**/TestListeners.java"
8290 "**/TestParseTrees.java"
8291 "**/TestParserExec.java"
8292 "**/TestLexerErrors.java"
8293 "**/TestPerformance.java"
8294 "**/TestCompositeParsers.java"
8295 "**/TestLexerExec.java"
8296 "**/TestSemPredEvalLexer.java"
8297 "**/TestLeftRecursion.java"
8298 "**/TestFullContextParsing.java"
8299 "**/TestCompositeLexers.java"
8300 ;; Null pointer exception
8301 "**/TestCompositeGrammars.java"
8302 ;; Wrong assumption on emoji
8303 "**/TestUnicodeData.java")
8304 #:phases
8305 (modify-phases %standard-phases
8306 (add-before 'build 'fix-build.xml
8307 (lambda _
8308 ;; tests are not in a java subdirectory
8309 (substitute* "build.xml"
8310 (("\\$\\{test.home\\}/java") "${test.home}"))
8311 #t))
8312 ;; tests require to have a working antlr4 binary
8313 (delete 'check)
8314 (add-after 'bin-install 'check
8315 (lambda _
8316 (invoke "ant" "compile-tests")
8317 (invoke "ant" "check" "-Dtest.home=runtime-testsuite/annotations/src")
8318 (invoke "ant" "check" "-Dtest.home=runtime-testsuite/test")
8319 (invoke "ant" "check" "-Dtest.home=tool-testsuite/test")
8320 #t))
8321 (add-before 'check 'remove-unrelated-languages
8322 (lambda _
8323 ;; There are tests for other languages that ANTLR can generate, but
8324 ;; we don't have the infrastructure for that yet. Let's test Java
8325 ;; generation only.
8326 (for-each
8327 (lambda (language)
8328 (delete-file-recursively
8329 (string-append "runtime-testsuite/test/org/antlr/v4/test/runtime/"
8330 language)))
8331 '("cpp" "csharp" "go" "javascript" "php" "python" "python2"
8332 "python3" "swift"))
8333 #t))
8334 (add-before 'check 'generate-test-parsers
8335 (lambda* (#:key outputs #:allow-other-keys)
8336 (define (run-antlr dir filename package)
8337 (invoke "antlr4" "-lib" dir "-visitor" "-no-listener"
8338 "-package" package (string-append dir "/" filename)
8339 "-Xlog"))
8340 (setenv "PATH" (string-append (getenv "PATH") ":"
8341 (assoc-ref outputs "out") "/bin"))
8342 (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api"
8343 "Java.g4" "org.antlr.v4.test.runtime.java.api")
8344 (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api"
8345 "VisitorBasic.g4" "org.antlr.v4.test.runtime.java.api")
8346 (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api"
8347 "VisitorCalc.g4" "org.antlr.v4.test.runtime.java.api")
8348 #t))
8349 (add-before 'check 'remove-graphemes
8350 (lambda _
8351 ;; When running antlr on grahemes.g4, we get a runtime exception:
8352 ;; set is empty. So delete the file that depends on it.
8353 (delete-file
8354 "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api/perf/TimeLexerSpeed.java")
8355 #t))
8356 (add-after 'install 'bin-install
8357 (lambda* (#:key inputs outputs #:allow-other-keys)
8358 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
8359 (bin (string-append (assoc-ref outputs "out") "/bin")))
8360 (mkdir-p bin)
8361 (with-output-to-file (string-append bin "/antlr4")
8362 (lambda _
8363 (display
8364 (string-append "#!" (which "sh") "\n"
8365 "java -cp " jar "/antlr4.jar:"
8366 (string-join
8367 (apply
8368 append
8369 (map
8370 (lambda (input)
8371 (find-files (assoc-ref inputs input)
8372 ".*\\.jar"))
8373 '("antlr3" "java-stringtemplate"
8374 "java-antlr4-runtime" "java-treelayout"
8375 "java-jsonp-api" "java-icu4j")))
8376 ":")
8377 " org.antlr.v4.Tool $*"))))
8378 (chmod (string-append bin "/antlr4") #o755)
8379 #t)))
8380 (add-before 'build 'copy-resources
8381 (lambda _
8382 (copy-recursively "tool/resources/" "build/classes")
8383 #t))
8384 (add-before 'build 'generate-unicode
8385 (lambda _
8386 ;; First: build the generator
8387 (invoke "javac" "-cp" (getenv "CLASSPATH")
8388 "tool/src/org/antlr/v4/unicode/UnicodeRenderer.java"
8389 "tool/src/org/antlr/v4/unicode/UnicodeDataTemplateController.java")
8390 ;; Then use it
8391 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8392 ":tool/src:runtime/Java")
8393 "org.antlr.v4.unicode.UnicodeRenderer"
8394 "tool/resources/org/antlr/v4/tool/templates"
8395 "unicodedata"
8396 "tool/src/org/antlr/v4/unicode/UnicodeData.java")
8397 ;; It seems there is a bug with our ST4
8398 (substitute* "tool/src/org/antlr/v4/unicode/UnicodeData.java"
8399 (("\\\\>") ">"))
8400 ;; Remove the additional file
8401 (delete-file "tool/src/org/antlr/v4/unicode/UnicodeRenderer.java")
8402 #t))
8403 (add-before 'build 'generate-grammar
8404 (lambda* (#:key inputs #:allow-other-keys)
8405 (with-directory-excursion "tool/src/org/antlr/v4/parse"
8406 (for-each (lambda (file)
8407 (display file)
8408 (newline)
8409 (invoke "antlr3" file))
8410 '("ANTLRLexer.g" "ANTLRParser.g" "BlockSetTransformer.g"
8411 "GrammarTreeVisitor.g" "ATNBuilder.g"
8412 "ActionSplitter.g" "LeftRecursiveRuleWalker.g")))
8413 (with-directory-excursion "tool/src/org/antlr/v4/codegen"
8414 (install-file "../parse/ANTLRParser.tokens" ".")
8415 (display "SourceGenTriggers.g\n")
8416 (invoke "antlr3" "SourceGenTriggers.g"))
8417 #t)))))
8418 (inputs
8419 `(("antlr3" ,antlr3)
8420 ("java-antlr4-runtime" ,java-antlr4-runtime)
8421 ("java-icu4j" ,java-icu4j)
8422 ("java-jsonp-api" ,java-jsonp-api)
8423 ("java-stringtemplate" ,java-stringtemplate)
8424 ("java-treelayout" ,java-treelayout)))
8425 (native-inputs
8426 `(("java-junit" ,java-junit)))
8427 (synopsis "Parser and lexer generator in Java")
8428 (description "ANTLR (ANother Tool for Language Recognition) is a powerful
8429parser generator for reading, processing, executing, or translating structured
8430text or binary files. It's widely used to build languages, tools, and
8431frameworks. From a grammar, ANTLR generates a parser that can build and walk
8432parse trees.")))
8433
742242a5
GB
8434(define-public java-commons-cli-1.2
8435 ;; This is a bootstrap dependency for Maven2.
8436 (package
8437 (inherit java-commons-cli)
8438 (version "1.2")
8439 (source (origin
8440 (method url-fetch)
8441 (uri (string-append "mirror://apache/commons/cli/source/"
8442 "commons-cli-" version "-src.tar.gz"))
8443 (sha256
8444 (base32
8445 "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm"))))
8446 (arguments
8447 `(#:jar-name "commons-cli.jar"
8448 #:phases
8449 (modify-phases %standard-phases
8450 (add-before 'check 'fix-build-xml
8451 (lambda* (#:key inputs #:allow-other-keys)
8452 (substitute* "build.xml"
8453 (("dir=\"\\$\\{test.home\\}/java\"")
8454 "dir=\"${test.home}\""))
8455 #t)))))
8456 (native-inputs
8457 `(("java-junit" ,java-junit)))))
30deadee
JL
8458
8459(define-public java-microemulator-cldc
8460 (package
8461 (name "java-microemulator-cldc")
8462 (version "2.0.4")
8463 (source (origin
8464 (method url-fetch)
8465 (uri (string-append "https://github.com/barteo/microemu/archive/"
8466 "microemulator_"
8467 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
8468 version)
8469 ".tar.gz"))
8470 (file-name (string-append name "-" version ".tar.gz"))
8471 (sha256
8472 (base32
8473 "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll"))))
8474 (build-system ant-build-system)
8475 (arguments
8476 `(#:jar-name "microemulator-cldc.jar"
8477 #:source-dir "microemu-cldc/src/main/java"
8478 #:tests? #f)); Requires even older software
8479 (home-page "https://github.com/barteo/microemu")
8480 (synopsis "J2ME CLDC emulator")
8481 (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP
60738bdc 8482Emulator. It demonstrates MIDlet based applications in web browser
30deadee
JL
8483applet and can be run as a standalone java application.")
8484 (license (list license:asl2.0
8485 ;; or altenatively:
8486 license:lgpl2.1+))))
8e2f3e5e
JL
8487
8488(define-public java-datanucleus-javax-persistence
8489 (package
8490 (name "java-datanucleus-javax-persistence")
8491 (version "2.2.0")
8492 (source (origin
8493 (method url-fetch)
8494 (uri (string-append "https://github.com/datanucleus/"
8495 "javax.persistence/archive/javax.persistence-"
8496 version "-release.tar.gz"))
8497 (sha256
8498 (base32
8499 "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx"))))
8500 (build-system ant-build-system)
8501 (arguments
8502 `(#:jar-name "java-datanucleus-javax-persistence.jar"
8503 #:jdk ,icedtea-8
8504 #:source-dir "src/main/java"
8505 #:tests? #f)); no tests
8506 (home-page "https://github.com/datanucleus/javax.persistence")
8507 (synopsis "JPA API")
8508 (description "This package contains a clean definition of JPA API intended
8509for use with DataNucleus JPA since the JCP haven't provided an official JPA API
8510jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification
8511used to generate this API.")
8512 (license (list license:edl1.0 license:epl1.0))))
3240ddbf
JL
8513
8514(define-public java-osgi-cmpn
8515 (package
8516 (name "java-osgi-cmpn")
8517 (version "6.0.0")
8518 (source (origin
8519 (method url-fetch)
7779ad50 8520 (uri (string-append "https://repo1.maven.org/maven2/"
3240ddbf
JL
8521 "org/osgi/osgi.cmpn/" version "/osgi.cmpn-"
8522 version "-sources.jar"))
8523 (sha256
8524 (base32
8525 "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys"))))
8526 (build-system ant-build-system)
8527 (arguments
8528 `(#:jar-name "osgi-cmpn.jar"
8529 #:tests? #f)); no tests
8530 (inputs
8531 `(("annotation" ,java-osgi-annotation)
8532 ("core" ,java-osgi-core)
8533 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
8534 ("microemulator" ,java-microemulator-cldc)
8535 ("servlet" ,java-classpathx-servletapi)))
c353d014 8536 (home-page "https://www.osgi.org")
3240ddbf
JL
8537 (synopsis "Compendium specification module of OSGi framework")
8538 (description
8539 "OSGi, for Open Services Gateway initiative framework, is a module system
8540and service platform for the Java programming language. This package contains
8541the compendium specification module, providing interfaces and classes for use
8542in compiling bundles.")
8543 (license license:asl2.0)))
747c7574
JL
8544
8545(define-public java-osgi-service-component-annotations
8546 (package
8547 (name "java-osgi-service-component-annotations")
8548 (version "1.3.0")
8549 (source (origin
8550 (method url-fetch)
fa315559 8551 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
747c7574
JL
8552 "org.osgi.service.component.annotations/"
8553 version "/org.osgi.service.component.annotations-"
8554 version "-sources.jar"))
8555 (sha256
8556 (base32
8557 "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0"))))
8558 (build-system ant-build-system)
8559 (arguments
8560 `(#:jar-name "osgi-service-component-annotations.jar"
8561 #:tests? #f)); no tests
8562 (inputs
8563 `(("annotation" ,java-osgi-annotation)))
c353d014 8564 (home-page "https://www.osgi.org")
747c7574
JL
8565 (synopsis "Support annotations for osgi-service-component")
8566 (description
8567 "OSGi, for Open Services Gateway initiative framework, is a module system
8568and service platform for the Java programming language. This package contains
8569the support annotations for osgi-service-component.")
8570 (license license:asl2.0)))
999b5fb4
JL
8571
8572(define-public java-osgi-dto
8573 (package
8574 (name "java-osgi-dto")
8575 (version "1.0.0")
8576 (source (origin
8577 (method url-fetch)
fc1c5dbd 8578 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
999b5fb4
JL
8579 "org.osgi.dto/" version "/org.osgi.dto-"
8580 version "-sources.jar"))
8581 (sha256
8582 (base32
8583 "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr"))))
8584 (build-system ant-build-system)
8585 (arguments
8586 `(#:jar-name "osgi-dto.jar"
8587 #:tests? #f)); no tests
8588 (inputs
8589 `(("annotation" ,java-osgi-annotation)))
c353d014 8590 (home-page "https://www.osgi.org")
999b5fb4
JL
8591 (synopsis "Data Transfer Objects")
8592 (description
8593 "OSGi, for Open Services Gateway initiative framework, is a module system
8594and service platform for the Java programming language. This package contains
8595the Data Transfer Objects. It is easily serializable having only public fields
8596of primitive types and their wrapper classes, Strings, and DTOs. List, Set,
8597Map and array aggregates may also be used. The aggregates must only hold
8598objects of the listed types or aggregates.")
8599 (license license:asl2.0)))
c304ce6a
JL
8600
8601(define-public java-osgi-resource
8602 (package
8603 (name "java-osgi-resource")
8604 (version "1.0.0")
8605 (source (origin
8606 (method url-fetch)
1f2643fa 8607 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
c304ce6a
JL
8608 "org.osgi.resource/"
8609 version "/org.osgi.resource-"
8610 version "-sources.jar"))
8611 (sha256
8612 (base32
8613 "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d"))))
8614 (build-system ant-build-system)
8615 (arguments
8616 `(#:jar-name "osgi-resource.jar"
8617 #:tests? #f)); no tests
8618 (inputs
8619 `(("annotation" ,java-osgi-annotation)
8620 ("dto" ,java-osgi-dto)))
c353d014 8621 (home-page "https://www.osgi.org")
c304ce6a
JL
8622 (synopsis "OSGI Resource")
8623 (description
8624 "OSGi, for Open Services Gateway initiative framework, is a module system
8625and service platform for the Java programming language. This package contains
8626the definition of common types in osgi packages.")
8627 (license license:asl2.0)))
c2b14516
JL
8628
8629(define-public java-osgi-namespace-contract
8630 (package
8631 (name "java-osgi-namespace-contract")
8632 (version "1.0.0")
8633 (source (origin
8634 (method url-fetch)
60f5ab0b 8635 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
c2b14516
JL
8636 "org.osgi.namespace.contract/"
8637 version "/org.osgi.namespace.contract-"
8638 version "-sources.jar"))
8639 (sha256
8640 (base32
8641 "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36"))))
8642 (build-system ant-build-system)
8643 (inputs
8644 `(("resource" ,java-osgi-resource)
8645 ("annotation" ,java-osgi-annotation)))
8646 (arguments
8647 `(#:jar-name "osgi-namespace-contract.jar"
8648 #:tests? #f)); no tests
c353d014 8649 (home-page "https://www.osgi.org")
c2b14516
JL
8650 (synopsis "Contract Capability and Requirement Namespace")
8651 (description
8652 "OSGi, for Open Services Gateway initiative framework, is a module system
8653and service platform for the Java programming language. This package contains
8654the names for the attributes and directives for a namespace with contracts.")
8655 (license license:asl2.0)))
f809c963
JL
8656
8657(define-public java-osgi-namespace-extender
8658 (package
8659 (name "java-osgi-namespace-extender")
8660 (version "1.0.1")
8661 (source (origin
8662 (method url-fetch)
fccce661 8663 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
f809c963
JL
8664 "org.osgi.namespace.extender/"
8665 version "/org.osgi.namespace.extender-"
8666 version "-sources.jar"))
8667 (sha256
8668 (base32
8669 "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz"))))
8670 (build-system ant-build-system)
8671 (inputs
8672 `(("resource" ,java-osgi-resource)
8673 ("annotation" ,java-osgi-annotation)))
8674 (arguments
8675 `(#:jar-name "osgi-namespace-extendent.jar"
8676 #:tests? #f)); no tests
c353d014 8677 (home-page "https://www.osgi.org")
f809c963
JL
8678 (synopsis "Extender Capability and Requirement Namespace")
8679 (description
8680 "OSGi, for Open Services Gateway initiative framework, is a module system
8681and service platform for the Java programming language. This package contains
b784962d
JL
8682the names for the attributes and directives for an extender namespace.")
8683 (license license:asl2.0)))
8684
8685(define-public java-osgi-namespace-service
8686 (package
8687 (name "java-osgi-namespace-service")
8688 (version "1.0.0")
8689 (source (origin
8690 (method url-fetch)
ec4ba417 8691 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
b784962d
JL
8692 "org.osgi.namespace.service/"
8693 version "/org.osgi.namespace.service-"
8694 version "-sources.jar"))
8695 (sha256
8696 (base32
8697 "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8"))))
8698 (build-system ant-build-system)
8699 (inputs
8700 `(("resource" ,java-osgi-resource)
8701 ("annotation" ,java-osgi-annotation)))
8702 (arguments
8703 `(#:jar-name "osgi-namespace-service.jar"
8704 #:tests? #f)); no tests
c353d014 8705 (home-page "https://www.osgi.org")
b784962d
JL
8706 (synopsis "Service Capability and Requirement Namespace")
8707 (description
8708 "OSGi, for Open Services Gateway initiative framework, is a module system
8709and service platform for the Java programming language. This package contains
8710the names for the attributes and directives for a service namespace.")
f809c963 8711 (license license:asl2.0)))
0f0c5218
JL
8712
8713(define-public java-osgi-util-function
8714 (package
8715 (name "java-osgi-util-function")
8716 (version "1.0.0")
8717 (source (origin
8718 (method url-fetch)
43be0299 8719 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
0f0c5218
JL
8720 "org.osgi.util.function/"
8721 version "/org.osgi.util.function-"
8722 version "-sources.jar"))
8723 (sha256
8724 (base32
8725 "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x"))))
8726 (build-system ant-build-system)
8727 (arguments
8728 `(#:jar-name "osgi-util-function.jar"
8729 #:tests? #f)); no tests
8730 (inputs
8731 `(("annotation" ,java-osgi-annotation)))
c353d014 8732 (home-page "https://www.osgi.org")
0f0c5218
JL
8733 (synopsis "OSGI Util Function")
8734 (description
8735 "OSGi, for Open Services Gateway initiative framework, is a module system
8736and service platform for the Java programming language. This package contains
8737an interface for a function that accepts a single argument and produces a result.")
8738 (license license:asl2.0)))
27103135
JL
8739
8740(define-public java-osgi-util-promise
8741 (package
8742 (name "java-osgi-util-promise")
8743 (version "1.0.0")
8744 (source (origin
8745 (method url-fetch)
c962e6c4 8746 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
27103135
JL
8747 "org.osgi.util.promise/"
8748 version "/org.osgi.util.promise-"
8749 version "-sources.jar"))
8750 (sha256
8751 (base32
8752 "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c"))))
8753 (build-system ant-build-system)
8754 (arguments
8755 `(#:jar-name "osgi-util-promise.jar"
8756 #:tests? #f)); no tests
8757 (inputs
8758 `(("annotation" ,java-osgi-annotation)
8759 ("function" ,java-osgi-util-function)))
c353d014 8760 (home-page "https://www.osgi.org")
27103135
JL
8761 (synopsis "Promise of a value")
8762 (description
8763 "OSGi, for Open Services Gateway initiative framework, is a module system
8764and service platform for the Java programming language. This package contains
8765an interface and utilitary classes for promises. A Promise represents a future
8766value. It handles the interactions for asynchronous processing.")
8767 (license license:asl2.0)))
2b1fdb2b
JL
8768
8769(define-public java-osgi-service-metatype-annotations
8770 (package
8771 (name "java-osgi-service-metatype-annotations")
8772 (version "1.3.0")
8773 (source (origin
8774 (method url-fetch)
98b1985f 8775 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
2b1fdb2b
JL
8776 "org.osgi.service.metatype.annotations/"
8777 version "/org.osgi.service.metatype.annotations-"
8778 version "-sources.jar"))
8779 (sha256
8780 (base32
8781 "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6"))))
8782 (build-system ant-build-system)
8783 (arguments
8784 `(#:jar-name "osgi-service-metatype-annotations.jar"
8785 #:tests? #f)); no tests
8786 (inputs
8787 `(("annotation" ,java-osgi-annotation)))
c353d014 8788 (home-page "https://www.osgi.org")
2b1fdb2b
JL
8789 (synopsis "Support annotations for metatype")
8790 (description
8791 "OSGi, for Open Services Gateway initiative framework, is a module system
8792and service platform for the Java programming language. This package contains
8793the support annotations for metatype.")
8794 (license license:asl2.0)))
a13acfbe
JL
8795
8796(define-public java-osgi-service-repository
8797 (package
8798 (name "java-osgi-service-repository")
8799 (version "1.1.0")
8800 (source (origin
8801 (method url-fetch)
7a5c5017 8802 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
a13acfbe
JL
8803 "org.osgi.service.repository/"
8804 version "/org.osgi.service.repository-"
8805 version "-sources.jar"))
8806 (sha256
8807 (base32
8808 "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n"))))
8809 (build-system ant-build-system)
8810 (arguments
8811 `(#:jar-name "osgi-service-repository.jar"
8812 #:tests? #f)); no tests
8813 (inputs
8814 `(("annotation" ,java-osgi-annotation)
8815 ("promise" ,java-osgi-util-promise)
8816 ("resource" ,java-osgi-resource)))
c353d014 8817 (home-page "https://www.osgi.org")
a13acfbe
JL
8818 (synopsis "OSGI service repository")
8819 (description
8820 "OSGi, for Open Services Gateway initiative framework, is a module system
8821and service platform for the Java programming language. This package contains
8822a repository service that contains resources.")
8823 (license license:asl2.0)))
dfd91541
JL
8824
8825(define-public java-osgi-framework
8826 (package
8827 (name "java-osgi-framework")
8828 (version "1.8.0")
8829 (source (origin
8830 (method url-fetch)
05662561 8831 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
dfd91541
JL
8832 "org.osgi.framework/" version "/org.osgi.framework-"
8833 version "-sources.jar"))
8834 (sha256
8835 (base32
8836 "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s"))))
8837 (build-system ant-build-system)
8838 (arguments
8839 `(#:jar-name "osgi-framework.jar"
8840 #:tests? #f)); no tests
8841 (inputs
8842 `(("annotation" ,java-osgi-annotation)
8843 ("resource" ,java-osgi-resource)
8844 ("dto" ,java-osgi-dto)))
c353d014 8845 (home-page "https://www.osgi.org")
dfd91541
JL
8846 (synopsis "OSGi framework")
8847 (description
8848 "OSGi, for Open Services Gateway initiative framework, is a module system
8849and service platform for the Java programming language.")
8850 (license license:asl2.0)))
98c9f16c
JL
8851
8852(define-public java-osgi-service-log
8853 (package
8854 (name "java-osgi-service-log")
8855 (version "1.3.0")
8856 (source (origin
8857 (method url-fetch)
9b0bf25c 8858 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
98c9f16c
JL
8859 "org.osgi.service.log/"
8860 version "/org.osgi.service.log-"
8861 version "-sources.jar"))
8862 (sha256
8863 (base32
8864 "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0"))))
8865 (build-system ant-build-system)
8866 (arguments
8867 `(#:jar-name "osgi-service-log.jar"
8868 #:tests? #f)); no tests
8869 (inputs
8870 `(("java-osgi-framework" ,java-osgi-framework)))
c353d014 8871 (home-page "https://www.osgi.org")
98c9f16c
JL
8872 (synopsis "Provides methods for bundles to write messages to the log")
8873 (description
8874 "OSGi, for Open Services Gateway initiative framework, is a module system
8875and service platform for the Java programming language. This package contains
8876the log service.")
8877 (license license:asl2.0)))
dd76d44b
JL
8878
8879(define-public java-osgi-service-jdbc
8880 (package
8881 (name "java-osgi-service-jdbc")
8882 (version "1.0.0")
8883 (source (origin
8884 (method url-fetch)
4a6a7b2d 8885 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
dd76d44b
JL
8886 "org.osgi.service.jdbc/"
8887 version "/org.osgi.service.jdbc-"
8888 version "-sources.jar"))
8889 (sha256
8890 (base32
8891 "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz"))))
8892 (build-system ant-build-system)
8893 (arguments
8894 `(#:jar-name "osgi-service-jdbc.jar"
8895 #:tests? #f)); no tests
c353d014 8896 (home-page "https://www.osgi.org")
dd76d44b
JL
8897 (synopsis "Factory for JDBC connection factories")
8898 (description
8899 "OSGi, for Open Services Gateway initiative framework, is a module system
8900and service platform for the Java programming language. This package contains
8901a factory for JDBC connection factories. There are 3 preferred connection
8902factories for getting JDBC connections:
8903
8904@itemize
8905@item @code{javax.sql.DataSource};
8906@item @code{javax.sql.ConnectionPoolDataSource};
8907@item @code{javax.sql.XADataSource}.
8908@end itemize")
8909 (license license:asl2.0)))
291d3f22
JL
8910
8911(define-public java-osgi-service-resolver
8912 (package
8913 (name "java-osgi-service-resolver")
8914 (version "1.0.1")
8915 (source (origin
8916 (method url-fetch)
b787534b 8917 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
291d3f22
JL
8918 "org.osgi.service.resolver/"
8919 version "/org.osgi.service.resolver-"
8920 version "-sources.jar"))
8921 (sha256
8922 (base32
8923 "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd"))))
8924 (build-system ant-build-system)
8925 (arguments
8926 `(#:jar-name "osgi-service-resolver.jar"
8927 #:tests? #f)); no tests
8928 (inputs
8929 `(("annotation" ,java-osgi-annotation)
8930 ("resource" ,java-osgi-resource)))
c353d014 8931 (home-page "https://www.osgi.org")
291d3f22
JL
8932 (synopsis "OSGI Resolver service")
8933 (description
8934 "OSGi, for Open Services Gateway initiative framework, is a module system
8935and service platform for the Java programming language. This package contains
8936a resolver service that resolves the specified resources in the context supplied
8937by the caller.")
8938 (license license:asl2.0)))
1884bb81
JL
8939
8940(define-public java-osgi-util-tracker
8941 (package
8942 (name "java-osgi-util-tracker")
8943 (version "1.5.1")
8944 (source (origin
8945 (method url-fetch)
e0695da9 8946 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
1884bb81
JL
8947 "org.osgi.util.tracker/"
8948 version "/org.osgi.util.tracker-"
8949 version "-sources.jar"))
8950 (sha256
8951 (base32
8952 "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz"))))
8953 (build-system ant-build-system)
8954 (arguments
8955 `(#:jar-name "osgi-util-tracker.jar"
8956 #:tests? #f)); no tests
8957 (inputs
8958 `(("framework" ,java-osgi-framework)
8959 ("annotation" ,java-osgi-annotation)))
c353d014 8960 (home-page "https://www.osgi.org")
1884bb81
JL
8961 (synopsis "Bundle tracking")
8962 (description
8963 "OSGi, for Open Services Gateway initiative framework, is a module system
8964and service platform for the Java programming language. This package contains
8965bundle tracking utility classes.")
8966 (license license:asl2.0)))
fb9c48b8
JL
8967
8968(define-public java-osgi-service-cm
8969 (package
8970 (name "java-osgi-service-cm")
8971 (version "1.5.0")
8972 (source (origin
8973 (method url-fetch)
f8f2fefb 8974 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
fb9c48b8
JL
8975 "org.osgi.service.cm/"
8976 version "/org.osgi.service.cm-"
8977 version "-sources.jar"))
8978 (sha256
8979 (base32
8980 "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6"))))
8981 (build-system ant-build-system)
8982 (arguments
8983 `(#:jar-name "osgi-service-cm.jar"
8984 #:tests? #f)); no tests
8985 (inputs
8986 `(("framework" ,java-osgi-framework)
8987 ("annotation" ,java-osgi-annotation)))
c353d014 8988 (home-page "https://www.osgi.org")
fb9c48b8
JL
8989 (synopsis "OSGI Configuration Management")
8990 (description
8991 "OSGi, for Open Services Gateway initiative framework, is a module system
8992and service platform for the Java programming language. This package contains
8993utility classes for the configuration of services.")
8994 (license license:asl2.0)))
500aac75
JL
8995
8996(define-public java-osgi-service-packageadmin
8997 (package
8998 (name "java-osgi-service-packageadmin")
8999 (version "1.2.0")
9000 (source (origin
9001 (method url-fetch)
839e3e89 9002 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
500aac75
JL
9003 "org.osgi.service.packageadmin/"
9004 version "/org.osgi.service.packageadmin-"
9005 version "-sources.jar"))
9006 (sha256
9007 (base32
9008 "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52"))))
9009 (build-system ant-build-system)
9010 (arguments
9011 `(#:jar-name "osgi-service-packageadmin.jar"
9012 #:tests? #f)); no tests
9013 (inputs
9014 `(("framework" ,java-osgi-framework)))
c353d014 9015 (home-page "https://www.osgi.org")
500aac75
JL
9016 (synopsis "OSGI Package Administration")
9017 (description
9018 "OSGi, for Open Services Gateway initiative framework, is a module system
9019and service platform for the Java programming language. This package contains
9020the packageadmin service.")
9021 (license license:asl2.0)))
77a4f1ae
JL
9022
9023(define-public java-ops4j-base-lang
9024 (package
9025 (name "java-ops4j-base-lang")
9026 (version "1.5.0")
9027 (source (origin
9028 (method url-fetch)
9029 (uri (string-append "https://github.com/ops4j/org.ops4j.base/"
9030 "archive/base-" version ".tar.gz"))
9031 (sha256
9032 (base32
9033 "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw"))))
9034 (build-system ant-build-system)
9035 (arguments
9036 `(#:jar-name "java-ops4j-base-lang.jar"
9037 #:source-dir "ops4j-base-lang/src/main/java"
9038 #:tests? #f; no tests
9039 #:phases
9040 (modify-phases %standard-phases
9041 (add-before 'build 'add-test-file
9042 (lambda _
9043 ;; That file is required by a test in ops4j-pax-exam-core-spi
9044 (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang")
9045 (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties"
9046 (lambda _
9047 (display
9048 (string-append
9049 "version=" ,version "\n"
9050 "groupId=org.ops4j.base"
2c8ac364
MW
9051 "artifactId=ops4j-base-lang\n"))))
9052 #t)))))
77a4f1ae
JL
9053 (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview")
9054 (synopsis "Utility classes and extensions to be used in OPS4J projects")
9055 (description "OPS4J stands for Open Participation Software for Java. This
9056package contains utilities and extensions related to @code{java.lang}.")
9057 (license license:asl2.0)))
b2353495
JL
9058
9059(define-public java-ops4j-base-monitors
9060 (package
9061 (inherit java-ops4j-base-lang)
9062 (name "java-ops4j-base-monitors")
9063 (arguments
9064 `(#:jar-name "java-ops4j-base-monitors.jar"
9065 #:source-dir "ops4j-base-monitors/src/main/java"
9066 #:tests? #f)); no tests
9067 (inputs
9068 `(("lang" ,java-ops4j-base-lang)))
9069 (description "OPS4J stands for Open Participation Software for Java. This
9070package contains utilities and extensions related to monitoring.")))
322d349a
JL
9071
9072(define-public java-ops4j-base-io
9073 (package
9074 (inherit java-ops4j-base-lang)
9075 (name "java-ops4j-base-io")
9076 (arguments
9077 `(#:jar-name "java-ops4j-base-io.jar"
9078 #:source-dir "ops4j-base-io/src/main/java"
9079 #:test-dir "ops4j-base-io/src/test"
9080 #:test-exclude
9081 (list "**/ListerTest.java")))
9082 (inputs
9083 `(("lang" ,java-ops4j-base-monitors)
9084 ("lang" ,java-ops4j-base-lang)))
9085 (native-inputs
9086 `(("junit" ,java-junit)
9087 ("hamcrest" ,java-hamcrest-core)))
9088 (description "OPS4J stands for Open Participation Software for Java. This
9089package contains utilities and extensions related to handling streams and files.")))
559919c1
JL
9090
9091(define-public java-ops4j-base-util
9092 (package
9093 (inherit java-ops4j-base-lang)
9094 (name "java-ops4j-base-util")
9095 (arguments
9096 `(#:jar-name "java-ops4j-base-util.jar"
9097 #:source-dir "ops4j-base-util/src/main/java"
9098 #:test-dir "ops4j-base-util/src/test"))
9099 (inputs
9100 `(("lang" ,java-ops4j-base-lang)))
9101 (native-inputs
9102 `(("junit" ,java-junit)))
9103 (description "OPS4J stands for Open Participation Software for Java. This
9104package contains utilities and extensions related to environment, i18n and
9105mime types.")))
60dcec7a
JL
9106
9107(define-public java-ops4j-base-util-property
9108 (package
9109 (inherit java-ops4j-base-lang)
9110 (name "java-ops4j-base-util-property")
9111 (arguments
9112 `(#:jar-name "java-ops4j-base-util-property.jar"
9113 #:source-dir "ops4j-base-util-property/src/main/java"
9114 #:tests? #f)); no tests
9115 (inputs
9116 `(("lang" ,java-ops4j-base-lang)
9117 ("util" ,java-ops4j-base-util)))
9118 (description "OPS4J stands for Open Participation Software for Java. This
9119package contains utilities and extensions related to resolving properties from
9120different sources.")))
0edf8cf0
JL
9121
9122(define-public java-ops4j-base-store
9123 (package
9124 (inherit java-ops4j-base-lang)
9125 (name "java-ops4j-base-store")
9126 (arguments
9127 `(#:jar-name "java-ops4j-base-store.jar"
9128 #:source-dir "ops4j-base-store/src/main/java"
9129 #:tests? #f)); no tests
9130 (inputs
9131 `(("lang" ,java-ops4j-base-lang)
9132 ("slf4j" ,java-slf4j-api)
9133 ("io" ,java-ops4j-base-io)))
9134 (description "OPS4J stands for Open Participation Software for Java. This
9135package contains utilities for storing and retrieving data from an
9136@code{InputStream}.")))
214fcd8a
JL
9137
9138(define-public java-ops4j-base-spi
9139 (package
9140 (inherit java-ops4j-base-lang)
9141 (name "java-ops4j-base-spi")
9142 (arguments
9143 `(#:jar-name "java-ops4j-base-spi.jar"
9144 #:source-dir "ops4j-base-spi/src/main/java"
9145 #:test-dir "ops4j-base-spi/src/test"))
9146 (native-inputs
9147 `(("junit" ,java-junit)
9148 ("hamcrest" ,java-hamcrest-core)))
9149 (description "OPS4J stands for Open Participation Software for Java. This
9150package contains utilities for obtaining services via the Java SE 6
9151@code{ServiceLoader}.")))
e1edf42e
JL
9152
9153(define-public java-aqute-bnd-annotation
9154 (package
9155 (name "java-aqute-bnd-annotation")
2cac8891 9156 (version "3.5.0")
e1edf42e
JL
9157 (source (origin
9158 (method url-fetch)
9159 (uri (string-append "https://github.com/bndtools/bnd/archive/"
9160 version ".REL.tar.gz"))
9161 (file-name (string-append name "-" version ".tar.gz"))
9162 (sha256
9163 (base32
2cac8891 9164 "1ggyiq0as0f6cz333a0dh98j72kmvv5pf2s47v9554yh905lfqdl"))))
e1edf42e
JL
9165 (build-system ant-build-system)
9166 (arguments
9167 `(#:jar-name "java-aqute-bnd-annotation.jar"
9168 #:source-dir "biz.aQute.bnd.annotation/src"
9169 #:tests? #f)); empty test dir
27c0eade 9170 (home-page "https://bnd.bndtools.org/")
e1edf42e
JL
9171 (synopsis "Tools for OSGi")
9172 (description "Bnd is a swiss army knife for OSGi, it creates manifest
9173headers based on analyzing the class code, it verifies the project settings,
9174it manages project dependencies, gives diffs jars, and much more.")
9175 (license license:asl2.0)))
60ba2978
JL
9176
9177(define-public java-aqute-libg
9178 (package
9179 (inherit java-aqute-bnd-annotation)
9180 (name "java-aqute-libg")
9181 (arguments
9182 `(#:jar-name "java-aqute-libg.jar"
78754995
GB
9183 ;; The build fails when source/target more recent than 1.7. This
9184 ;; is a known issue. See: https://github.com/bndtools/bnd/issues/1327
9185 ;;
9186 ;; It is closed as won't fix. There is no way to change the source
9187 ;; so that it works on 1.8, and still works on 1.6, the upstream
9188 ;; target. It work fine on 1.7, so we use 1.7.
9189 #:make-flags (list "-Dant.build.javac.source=1.7"
9190 "-Dant.build.javac.target=1.7")
2ab089b7
GB
9191 #:phases
9192 (modify-phases %standard-phases
9193 (add-before 'configure 'chdir
9194 ;; Change to aQute.libg directory, so that the relative
9195 ;; paths in the tests aren't broken.
9196 (lambda _
9197 (chdir "aQute.libg")
9198 #t))
9199 (add-before 'check 'create-test-directory
9200 ;; Copy the test directory to test/java, since that's where
9201 ;; ant-build-system's default project in build.xml expects to find
9202 ;; the test classes. Leave a copy in the original place to not
9203 ;; break paths in tests.
9204 (lambda _
9205 (mkdir "src/test")
9206 (copy-recursively "test" "src/test/java")
9207 #t)))))
60ba2978
JL
9208 (inputs
9209 `(("slf4j" ,java-slf4j-api)
9210 ("osgi-annot" ,java-osgi-annotation)
9211 ("java-osgi-cmpn" ,java-osgi-cmpn)
2ab089b7
GB
9212 ("osgi" ,java-osgi-core)))
9213 (native-inputs
9214 `(("hamcrest" ,java-hamcrest-core)
9215 ("java-junit" ,java-junit)))))
5f26a131
JL
9216
9217(define-public java-aqute-bndlib
9218 (package
9219 (inherit java-aqute-bnd-annotation)
9220 (name "java-aqute-bndlib")
9221 (arguments
9222 `(#:jar-name "java-bndlib.jar"
9223 #:source-dir "biz.aQute.bndlib/src"
9224 #:tests? #f)); no tests
9225 (inputs
9226 `(("slf4j" ,java-slf4j-api)
9227 ("osgi-annot" ,java-osgi-annotation)
9228 ("java-aqute-libg" ,java-aqute-libg)
9229 ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation)
9230 ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations)
9231 ("java-osgi-service-repository" ,java-osgi-service-repository)
9232 ("java-osgi-service-log" ,java-osgi-service-log)
9233 ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations)
9234 ("java-osgi-namespace-contract" ,java-osgi-namespace-contract)
9235 ("java-osgi-namespace-extender" ,java-osgi-namespace-extender)
9236 ("java-osgi-namespace-service" ,java-osgi-namespace-service)
9237 ("promise" ,java-osgi-util-promise)
9238 ("osgi" ,java-osgi-core)))))
869803aa 9239
25aef81d
JL
9240(define-public java-ops4j-pax-tinybundles
9241 (package
9242 (name "java-ops4j-pax-tinybundles")
9243 (version "2.1.1")
9244 (source (origin
9245 (method url-fetch)
9246 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/"
9247 "archive/tinybundles-" version ".tar.gz"))
9248 (sha256
9249 (base32
9250 "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871"))))
9251 (arguments
9252 `(#:jar-name "java-ops4j-pax-tinybundles.jar"
9253 #:source-dir "src/main/java"
9254 #:test-exclude
9255 ;; Abstract base classes for other tests
9256 (list "**/BndTest.java" "**/CoreTest.java")
9257 #:phases
9258 (modify-phases %standard-phases
9259 (add-before 'check 'fix-version
9260 (lambda _
9261 ;; This test has a reference to an old version of bndlib we are not
9262 ;; packaging. It uses the version referenced in pom.xml. We replace
9263 ;; it with our own version.
9264 (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
0f277802 9265 (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*")
2c8ac364
MW
9266 ,(package-version java-aqute-bndlib)))
9267 #t)))))
25aef81d
JL
9268 (inputs
9269 `(("lang" ,java-ops4j-base-lang)
9270 ("io" ,java-ops4j-base-io)
9271 ("store" ,java-ops4j-base-store)
9272 ("slf4j" ,java-slf4j-api)
9273 ("libg" ,java-aqute-libg)
9274 ("bndlib" ,java-aqute-bndlib)))
9275 (native-inputs
9276 `(("junit" ,java-junit)
9277 ("hamcrest" ,java-hamcrest-core)
9278 ("log4j" ,java-log4j-api)
9279 ("bndannotation" ,java-aqute-bnd-annotation)
9280 ("framework" ,java-osgi-framework)))
9281 (build-system ant-build-system)
9282 (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles")
9283 (synopsis "Java APIs to create OSGi related artifacts")
9284 (description "Tinybundles is all about creating OSGi related artifacts like
6fa0914a 9285Bundles, Fragments and Deployment Packages with Java Api. It is very convenient
25aef81d
JL
9286to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the
9287other hand, this library can be a foundation of real end user tools that need
9288to create those artifacts.")
9289 (license license:asl2.0)))
e179add0
JL
9290
9291(define-public java-ops4j-pax-exam-core
9292 (package
9293 (name "java-ops4j-pax-exam-core")
9294 (version "4.11.0")
9295 (source (origin
9296 (method url-fetch)
9297 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/"
9298 "archive/exam-reactor-" version ".tar.gz"))
9299 (sha256
9300 (base32
9301 "08mzw8nkah3rj3vznlplnawspxhp61zgvb44ifqa1rni1cvbms2g"))))
9302 (arguments
9303 `(#:jar-name "java-ops4j-pax-exam-core.jar"
9304 #:source-dir "core/pax-exam/src/main/java"
9305 #:test-dir "core/pax-exam/src/test"))
9306 (inputs
9307 `(("slf4j" ,java-slf4j-api)
9308 ("lang" ,java-ops4j-base-lang)
9309 ("io" ,java-ops4j-base-io)
9310 ("util-property" ,java-ops4j-base-util-property)
9311 ("util-store" ,java-ops4j-base-store)
9312 ("java-osgi-core" ,java-osgi-core)))
9313 (native-inputs
9314 `(("junit" ,java-junit)
9315 ("hamcrest" ,java-hamcrest-core)))
9316 (build-system ant-build-system)
9317 (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview")
9318 (synopsis "In-Container Testing for OSGi, Java EE and CDI")
9319 (description "Pax Exam creates OSGi bundles for testing purposes. It lets
9320the user take control of the OSGi framework, the test framework (e.g. JUnit) and
9321the system under test at the same time.")
9322 (license license:asl2.0)))
7a7c2b75
JL
9323
9324(define-public java-ops4j-pax-exam-core-spi
9325 (package
9326 (inherit java-ops4j-pax-exam-core)
9327 (name "java-ops4j-pax-exam-core-spi")
9328 (arguments
9329 `(#:jar-name "java-ops4j-pax-exam-spi.jar"
9330 #:source-dir "src/main/java"
9331 #:test-exclude
9332 (list
9333 ;; Abstract base class, not a test
9334 "**/BaseStagedReactorTest.java"
9335 ;; Depends on org.mortbay.jetty.testwars:test-war-dump
9336 "**/WarBuilderTest.java")
9337 #:phases
9338 (modify-phases %standard-phases
9339 (add-before 'configure 'chdir
9340 (lambda _
9341 ;; Tests assume we are in this directory
2c8ac364
MW
9342 (chdir "core/pax-exam-spi")
9343 #t))
7a7c2b75
JL
9344 (add-before 'check 'fix-tests
9345 (lambda _
9346 ;; One test checks that this file is present.
9347 (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi")
9348 (with-output-to-file
9349 "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties"
9350 (lambda _
9351 (display
9352 (string-append "artifactId = pax-exam-spi\n"
9353 "version = " ,(package-version java-ops4j-pax-exam-core-spi)))))
9354 ;; Maven puts compilation results in the target directory, while we
9355 ;; put them in the build directory.
9356 (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java"
9357 "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java"
9358 "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java")
9359 (("target") "build"))
9360 ;; One test is expected to fail, but it doesn't throw the expected exception
9361 (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java"
2c8ac364
MW
9362 (("AssertionError") "IllegalArgumentException"))
9363 #t)))))
7a7c2b75
JL
9364 (inputs
9365 `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core)
9366 ("lang" ,java-ops4j-base-lang)
9367 ("monitors" ,java-ops4j-base-monitors)
9368 ("store" ,java-ops4j-base-store)
9369 ("io" ,java-ops4j-base-io)
9370 ("spi" ,java-ops4j-base-spi)
9371 ("osgi" ,java-osgi-core)
9372 ("slf4j" ,java-slf4j-api)
9373 ("tinybundles" ,java-ops4j-pax-tinybundles)))
9374 (native-inputs
9375 `(("mockito" ,java-mockito-1)
9376 ("junit" ,java-junit)
9377 ("hamcrest" ,java-hamcrest-core)
9378 ("cglib" ,java-cglib)
9379 ("objenesis" ,java-objenesis)
9380 ("asm" ,java-asm)))))
4496d77f
JL
9381
9382(define-public java-ops4j-pax-exam-core-junit
9383 (package
9384 (inherit java-ops4j-pax-exam-core)
9385 (name "java-ops4j-pax-exam-core-junit")
9386 (arguments
9387 `(#:jar-name "ops4j-pax-exam-core-junit.jar"
9388 #:source-dir "drivers/pax-exam-junit4/src/main/java"
9389 #:tests? #f)); no tests
9390 (inputs
9391 `(("junit" ,java-junit)
9392 ("slf4j" ,java-slf4j-api)
9393 ("core" ,java-ops4j-pax-exam-core)
9394 ("spi" ,java-ops4j-pax-exam-core-spi)))
9395 (native-inputs '())))
cb05f60d
JL
9396
9397(define-public java-fasterxml-jackson-annotations
9398 (package
9399 (name "java-fasterxml-jackson-annotations")
93dceea4 9400 (version "2.9.4")
cb05f60d
JL
9401 (source (origin
9402 (method url-fetch)
9403 (uri (string-append "https://github.com/FasterXML/"
9404 "jackson-annotations/archive/"
9405 "jackson-annotations-" version ".tar.gz"))
9406 (sha256
9407 (base32
93dceea4 9408 "0mr95xd0da6a4g95zvrl1ryk5n5zv2rc696w3xnsr5hxk2gicfc4"))))
cb05f60d
JL
9409 (build-system ant-build-system)
9410 (arguments
9411 `(#:jar-name "jackson-annotations.jar"
9412 #:source-dir "src/main/java"
9413 #:test-dir "src/test"))
9414 (native-inputs
9415 `(("junit" ,java-junit)))
9416 (home-page "https://github.com/FasterXML/jackson-annotations")
9417 (synopsis "General purpose annotations for the Jackson Data Processor")
9418 (description "This package contains general purpose annotations for the
9419Jackson Data Processor, used on value and handler types. The only annotations
9420not included are ones that require dependency to the Databind package.")
9421 (license license:asl2.0)))
0b5481df
JL
9422
9423(define-public java-fasterxml-jackson-core
9424 (package
9425 (name "java-fasterxml-jackson-core")
38a0fc38 9426 (version "2.9.4")
0b5481df
JL
9427 (source (origin
9428 (method url-fetch)
9429 (uri (string-append "https://github.com/FasterXML/"
9430 "jackson-core/archive/"
9431 "jackson-core-" version ".tar.gz"))
9432 (sha256
9433 (base32
38a0fc38 9434 "159hsnk17jr1gyzkf01cxvsn45srnk37g949r7364qlsr527gjgd"))))
0b5481df
JL
9435 (build-system ant-build-system)
9436 (arguments
9437 `(#:jar-name "jackson-core.jar"
9438 #:source-dir "src/main/java"
9439 #:test-dir "src/test"
9440 #:test-exclude
9441 (list
9442 ;; Expected failure. pom.xml excludes these
9443 "**/failing/**"
9444 ;; Base classes that have no constructor for junit
9445 "**/BaseTest.java"
9446 "**/ConcurrencyReadTest.java"
9447 "**/ManualCharAccessTest.java"
9448 "**/ManualCharAccessTest.java"
9449 "**/TrailingCommasTest.java"
9450 "**/AsyncMissingValuesInObjectTest.java"
9451 "**/AsyncMissingValuesInArrayTest.java")
9452 #:phases
9453 (modify-phases %standard-phases
9454 (add-before 'configure 'generate-PackageVersion.java
9455 (lambda _
9456 (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java")
9457 (in (string-append out ".in")))
9458 (copy-file in out)
9459 (substitute* out
9460 (("@package@") "com.fasterxml.jackson.core.json")
9461 (("@projectversion@") ,version)
9462 (("@projectgroupid@") "com.fasterxml.jackson.core")
2c8ac364
MW
9463 (("@projectartifactid@") "jackson-core")))
9464 #t))
0b5481df
JL
9465 (add-before 'build 'copy-resources
9466 (lambda _
9467 (copy-recursively "src/main/resources"
2c8ac364
MW
9468 "build/classes")
9469 #t))
0b5481df
JL
9470 (add-before 'check 'copy-test-resources
9471 (lambda _
9472 (copy-recursively "src/test/resources"
2c8ac364
MW
9473 "build/test-classes")
9474 #t)))))
0b5481df
JL
9475 (native-inputs
9476 `(("junit" ,java-junit)
9477 ("hamcrest" ,java-hamcrest-core)))
9478 (home-page "https://github.com/FasterXML/jackson-core")
9479 (synopsis "")
9480 (description "")
9481 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
f234c7a0
JL
9482
9483(define-public java-fasterxml-jackson-databind
9484 (package
9485 (name "java-fasterxml-jackson-databind")
3c1edff5 9486 (version "2.9.4")
f234c7a0
JL
9487 (source (origin
9488 (method url-fetch)
9489 (uri (string-append "https://github.com/FasterXML/"
9490 "jackson-databind/archive/"
9491 "jackson-databind-" version ".tar.gz"))
9492 (sha256
9493 (base32
3c1edff5 9494 "1zd2cw4z6kdkbx8za96xh9pyicv2a2l7y0rkcx2fqd8hv6d47s08"))))
f234c7a0
JL
9495 (build-system ant-build-system)
9496 (arguments
9497 `(#:jar-name "jackson-databind.jar"
9498 #:source-dir "src/main/java"
9499 #:tests? #f; requires javax.measures for which I can't find a free implementation
9500 #:phases
9501 (modify-phases %standard-phases
9502 (add-before 'configure 'generate-PackageVersion.java
9503 (lambda _
9504 (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java")
9505 (in (string-append out ".in")))
9506 (copy-file in out)
9507 (substitute* out
9508 (("@package@") "com.fasterxml.jackson.databind.cfg")
9509 (("@projectversion@") ,version)
9510 (("@projectgroupid@") "com.fasterxml.jackson.databind")
2c8ac364
MW
9511 (("@projectartifactid@") "jackson-databind")))
9512 #t))
f234c7a0
JL
9513 (add-before 'build 'copy-resources
9514 (lambda _
2c8ac364
MW
9515 (copy-recursively "src/main/resources" "build/classes")
9516 #t)))))
f234c7a0
JL
9517 (inputs
9518 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
9519 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)))
9520 (home-page "https://github.com/FasterXML/jackson-databind")
9521 (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor")
9522 (description "This package contains the general-purpose data-binding
9523functionality and tree-model for Jackson Data Processor. It builds on core
9524streaming parser/generator package, and uses Jackson Annotations for
9525configuration.")
9526 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
d57d8b89
JL
9527
9528(define-public java-fasterxml-jackson-modules-base-jaxb
9529 (package
9530 (name "java-fasterxml-jackson-modules-base-jaxb")
07207211 9531 (version "2.9.4")
d57d8b89
JL
9532 (source (origin
9533 (method url-fetch)
9534 (uri (string-append "https://github.com/FasterXML/"
9535 "jackson-modules-base/archive/"
9536 "jackson-modules-base-" version ".tar.gz"))
9537 (sha256
9538 (base32
07207211 9539 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
d57d8b89
JL
9540 (build-system ant-build-system)
9541 (arguments
9542 `(#:jar-name "jackson-modules-base-jaxb.jar"
9543 #:source-dir "jaxb/src/main/java"
9544 #:test-dir "jaxb/src/test"
9545 #:test-exclude
9546 ;; Base class for tests
9547 (list "**/BaseJaxbTest.java")
9548 #:phases
9549 (modify-phases %standard-phases
9550 (add-before 'configure 'generate-PackageVersion.java
9551 (lambda _
9552 (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/"
9553 "jackson/module/jaxb/PackageVersion.java"))
9554 (in (string-append out ".in")))
9555 (copy-file in out)
9556 (substitute* out
9557 (("@package@") "com.fasterxml.jackson.module.jaxb")
9558 (("@projectversion@") ,version)
9559 (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb")
2c8ac364
MW
9560 (("@projectartifactid@") "jackson-module-jaxb")))
9561 #t))
d57d8b89
JL
9562 (add-before 'build 'copy-resources
9563 (lambda _
2c8ac364
MW
9564 (copy-recursively "jaxb/src/main/resources" "build/classes")
9565 #t)))))
d57d8b89
JL
9566 (inputs
9567 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
9568 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
9569 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
9570 (native-inputs
9571 `(("java-junit" ,java-junit)))
9572 (home-page "https://github.com/FasterXML/jackson-modules-base")
9573 (synopsis "Jaxb annotations jackson module")
9574 (description "This package is the jaxb annotations module for jackson.")
9575 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
0f296d37 9576
5165fb40
DM
9577(define-public java-fasterxml-jackson-modules-base-mrbean
9578 (package
9579 (name "java-fasterxml-jackson-modules-base-mrbean")
9580 (version "2.9.4")
9581 (source (origin
9582 (method url-fetch)
9583 (uri (string-append "https://github.com/FasterXML/"
9584 "jackson-modules-base/archive/"
9585 "jackson-modules-base-" version ".tar.gz"))
9586 (sha256
9587 (base32
9588 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
9589 (build-system ant-build-system)
9590 (arguments
9591 `(#:jar-name "jackson-modules-base-mrbean.jar"
9592 #:source-dir "mrbean/src/main/java"
9593 #:test-dir "mrbean/src/test"
9594 #:test-exclude
9595 ;; Base class for tests
9596 (list "**/BaseTest.java")
9597 #:phases
9598 (modify-phases %standard-phases
9599 (add-before 'configure 'generate-PackageVersion.java
9600 (lambda _
9601 (let* ((out (string-append "mrbean/src/main/java/com/fasterxml/"
9602 "jackson/module/mrbean/PackageVersion.java"))
9603 (in (string-append out ".in")))
9604 (copy-file in out)
9605 (substitute* out
9606 (("@package@") "com.fasterxml.jackson.module.mrbean")
9607 (("@projectversion@") ,version)
9608 (("@projectgroupid@") "com.fasterxml.jackson.module.mrbean")
9609 (("@projectartifactid@") "jackson-module-mrbean")))
9610 #t)))))
9611 (inputs
9612 `(("java-asm" ,java-asm)
9613 ("java-fasterxml-jackson-annotations"
9614 ,java-fasterxml-jackson-annotations)
9615 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
9616 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
9617 (native-inputs
9618 `(("java-junit" ,java-junit)))
9619 (home-page "https://github.com/FasterXML/jackson-modules-base")
9620 (synopsis "POJO type materialization for Java")
9621 (description "This package implements POJO type materialization.
9622Databinders can construct implementation classes for Java interfaces as part
9623of deserialization.")
9624 (license license:asl2.0)))
9625
0f296d37
JL
9626(define-public java-snakeyaml
9627 (package
9628 (name "java-snakeyaml")
9629 (version "1.18")
9630 (source (origin
9631 (method url-fetch)
9632 (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
9633 version ".tar.gz"))
307856cd 9634 (file-name (string-append name "-" version ".tar.gz"))
0f296d37
JL
9635 (sha256
9636 (base32
b19f155c 9637 "0474cqcv46zgv9bhms2vgawakq1vyj0hp3h3f1bfys46msia90bh"))))
0f296d37
JL
9638 (build-system ant-build-system)
9639 (arguments
9640 `(#:jar-name "java-snakeyaml.jar"
9641 #:source-dir "src/main/java"
9642 ;; Tests require velocity, a cyclic dependency, and
9643 ;; java-spring-framework-context which is not packaged.
9644 #:tests? #f))
9645 (home-page "https://bitbucket.org/asomov/snakeyaml")
9646 (synopsis "YAML processor")
9647 (description "SnakeYAML is a YAML processor for the Java Virtual Machine.")
9648 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
087c8fd2
JL
9649
9650(define-public java-fasterxml-jackson-dataformat-yaml
9651 (package
9652 (name "java-fasterxml-jackson-dataformat-yaml")
1f2be88f 9653 (version "2.9.4")
087c8fd2
JL
9654 (source (origin
9655 (method url-fetch)
9656 (uri (string-append "https://github.com/FasterXML/"
9657 "jackson-dataformats-text/archive/"
9658 "jackson-dataformats-text-" version ".tar.gz"))
9659 (sha256
9660 (base32
1f2be88f 9661 "1hikl06khaxbg439avf442qifcadap8w0lx13f0nnhp2vh3dkbz7"))))
087c8fd2
JL
9662 (build-system ant-build-system)
9663 (arguments
9664 `(#:jar-name "jackson-dataformat-yaml.jar"
9665 #:source-dir "yaml/src/main/java"
9666 #:test-dir "yaml/src/test"
9667 #:test-exclude (list "**/failing/**.java")
9668 #:phases
9669 (modify-phases %standard-phases
9670 (add-before 'configure 'generate-PackageVersion.java
9671 (lambda _
9672 (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java")
9673 (in (string-append out ".in")))
9674 (copy-file in out)
9675 (substitute* out
9676 (("@package@") "com.fasterxml.jackson.dataformat.yaml")
9677 (("@projectversion@") ,version)
9678 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml")
2c8ac364
MW
9679 (("@projectartifactid@") "jackson-dataformat-yaml")))
9680 #t)))))
087c8fd2
JL
9681 (inputs
9682 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
9683 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
9684 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
9685 ("java-snakeyaml" ,java-snakeyaml)))
9686 (native-inputs
9687 `(("junit" ,java-junit)
9688 ("hamcrest" ,java-hamcrest-core)
9689 ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi)
9690 ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit)
9691 ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core)))
9692 (home-page "https://github.com/FasterXML/jackson-dataformats-text")
9693 (synopsis "Yaml backend for Jackson")
9694 (description "Dataformat backends are used to support format alternatives
9695to JSON, supported by default. This is done by sub-classing Jackson core
9696abstractions.")
9697 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
6fd07b98
JL
9698
9699(define-public java-stax2-api
9700 (package
9701 (name "java-stax2-api")
9702 (version "4.0.0")
9703 (source (origin
9704 (method url-fetch)
9705 (uri (string-append "https://github.com/FasterXML/stax2-api/archive/"
9706 "stax2-api-" version ".tar.gz"))
9707 (sha256
9708 (base32
9709 "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq"))))
9710 (build-system ant-build-system)
9711 (arguments
9712 `(#:jar-name "java-stax2-api.jar"
9713 #:source-dir "src/main/java"
9714 #:tests? #f)); no tests
9715 (home-page "https://github.com/FasterXML/stax2-api")
9716 (synopsis "Stax2 API")
9717 (description "Stax2 API is an extension to basic Stax 1.0 API that adds
9718significant new functionalities, such as full-featured bi-direction validation
9719interface and high-performance Typed Access API.")
9720 (license license:bsd-2)))
40f193f3
JL
9721
9722(define-public java-woodstox-core
9723 (package
9724 (name "java-woodstox-core")
9725 (version "5.0.3")
9726 (source (origin
9727 (method url-fetch)
9728 (uri (string-append "https://github.com/FasterXML/woodstox/archive/"
9729 "woodstox-core-" version ".tar.gz"))
9730 (sha256
9731 (base32
9732 "1i7pdgb8jbw6gdy5kmm0l6rz109n2ns92pqalpyp24vb8vlvdfd4"))))
9733 (build-system ant-build-system)
9734 (arguments
9735 `(#:jar-name "woodstox.jar"
9736 #:test-exclude
9737 (list "**/Base*.java" "failing/**")
9738 #:phases
9739 (modify-phases %standard-phases
9740 (add-before 'build 'remove-msv-dep
9741 (lambda _
9742 ;; we don't need osgi, and it depends on msv
9743 (delete-file-recursively "src/main/java/com/ctc/wstx/osgi")
9744 ;; msv's latest release is from 2011 and we don't need it
9745 (delete-file-recursively "src/main/java/com/ctc/wstx/msv")
9746 (delete-file-recursively "src/test/java/wstxtest/osgi")
2c8ac364
MW
9747 (delete-file-recursively "src/test/java/wstxtest/msv")
9748 #t))
40f193f3
JL
9749 (add-before 'build 'copy-resources
9750 (lambda _
2c8ac364
MW
9751 (copy-recursively "src/main/resources" "build/classes")
9752 #t)))))
40f193f3
JL
9753 (inputs
9754 `(("stax2" ,java-stax2-api)))
9755 (native-inputs
9756 `(("junit" ,java-junit)))
9757 (home-page "https://github.com/FasterXML/woodstox")
9758 (synopsis "Stax XML API implementation")
9759 (description "Woodstox is a stax XML API implementation.")
9760 (license license:asl2.0)))
262a4d33
JL
9761
9762(define-public java-fasterxml-jackson-dataformat-xml
9763 (package
9764 (name "java-fasterxml-jackson-dataformat-xml")
f3bbe029 9765 (version "2.9.4")
262a4d33
JL
9766 (source (origin
9767 (method url-fetch)
9768 (uri (string-append "https://github.com/FasterXML/"
9769 "jackson-dataformat-xml/archive/"
9770 "jackson-dataformat-xml-" version ".tar.gz"))
9771 (sha256
9772 (base32
f3bbe029 9773 "111fkkl90w31jbf30kgj82qdcxlw4sxppki7i198liw0ck1jcavq"))))
262a4d33
JL
9774 (build-system ant-build-system)
9775 (arguments
9776 `(#:jar-name "jackson-dataformat-xml.jar"
9777 #:source-dir "src/main/java"
9778 #:test-exclude
9779 (list "**/failing/**")
9780 #:phases
9781 (modify-phases %standard-phases
9782 (add-before 'configure 'generate-PackageVersion.java
9783 (lambda _
9784 (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java")
9785 (in (string-append out ".in")))
9786 (copy-file in out)
9787 (newline)
9788 (substitute* out
9789 (("@package@") "com.fasterxml.jackson.dataformat.xml")
9790 (("@projectversion@") ,version)
9791 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml")
2c8ac364
MW
9792 (("@projectartifactid@") "jackson-dataformat-xml")))
9793 #t))
262a4d33
JL
9794 (add-before 'build 'copy-resources
9795 (lambda _
2c8ac364
MW
9796 (copy-recursively "src/main/resources" "build/classes")
9797 #t)))))
262a4d33
JL
9798 (inputs
9799 `(("jackson-annotations" ,java-fasterxml-jackson-annotations)
9800 ("jackson-core" ,java-fasterxml-jackson-core)
9801 ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb)
9802 ("jackson-databind" ,java-fasterxml-jackson-databind)
9803 ("stax2-api" ,java-stax2-api)
9804 ("woodstox" ,java-woodstox-core)))
9805 (native-inputs
9806 `(("junit" ,java-junit)
9807 ("hamcrest" ,java-hamcrest-core)))
9808 (home-page "https://github.com/FasterXML/jackson-dataformat-xml")
9809 (synopsis "Read and write XML")
9810 (description "This package contains Jackson extension component for reading
9811and writing XML encoded data.
9812
9813Further, the goal is to emulate how JAXB data-binding works with \"Code-first\"
9814approach (that is, no support is added for \"Schema-first\" approach). Support
9815for JAXB annotations is provided by JAXB annotation module; this module
9816provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator},
9817@code{JsonFactory}) as well as small number of higher level overrides needed to
9818make data-binding work.")
9819 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
90a127c7
JL
9820
9821(define-public java-hdrhistogram
9822 (package
9823 (name "java-hdrhistogram")
9824 (version "2.1.9")
9825 (source (origin
819ead35
EF
9826 (method git-fetch)
9827 (uri (git-reference
9828 (url "https://github.com/HdrHistogram/HdrHistogram")
9829 (commit (string-append "HdrHistogram-" version))))
9830 (file-name (git-file-name name version))
90a127c7
JL
9831 (sha256
9832 (base32
819ead35 9833 "1cw8aa1vk258k42xs6wpy72m4gbai540jq032qsa7c5586iawx2d"))))
90a127c7
JL
9834 (build-system ant-build-system)
9835 (arguments
9836 `(#:jar-name "java-hdrhistogram.jar"
9837 #:source-dir "src/main/java"
9838 #:phases
9839 (modify-phases %standard-phases
819ead35
EF
9840 (add-after 'unpack 'make-files-writable
9841 (lambda _
9842 (for-each make-file-writable (find-files "."))
9843 #t))
90a127c7
JL
9844 (add-before 'configure 'set-version
9845 (lambda _
9846 (let* ((version-java "src/main/java/org/HdrHistogram/Version.java")
9847 (template (string-append version-java ".template")))
9848 (copy-file template version-java)
9849 (substitute* version-java
9850 (("\\$VERSION\\$") ,version)
9851 (("\\$BUILD_TIME\\$") "0"))
9852 #t))))))
9853 (native-inputs
9854 `(("junit" ,java-junit)
9855 ("hamcrest" ,java-hamcrest-core)))
9856 (home-page "https://hdrhistogram.github.io/HdrHistogram")
9857 (synopsis "High dynamic range histogram")
61fa3c67 9858 (description "Hdrhistogram creates histograms that support
90a127c7
JL
9859recording and analyzing sampled data value counts across a configurable integer
9860value range with configurable value precision within the range. Value precision
9861is expressed as the number of significant digits in the value recording, and
9862provides control over value quantization behavior across the value range and
9863the subsequent value resolution at any given level.")
9864 (license license:public-domain)))
5d104a27 9865
c5ff11dc
RW
9866(define-public java-cofoja
9867 (package
9868 (name "java-cofoja")
9869 (version "1.3")
9870 (source (origin
9871 (method git-fetch)
9872 (uri (git-reference
b0e7b699 9873 (url "https://github.com/nhatminhle/cofoja")
c5ff11dc
RW
9874 (commit (string-append "v" version))))
9875 (file-name (string-append "java-cofoja-" version "-checkout"))
9876 (sha256
9877 (base32
9878 "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w"))))
9879 (build-system ant-build-system)
9880 (arguments
9881 `(#:build-target "dist"
9882 #:test-target "test"
9883 #:jdk ,icedtea-8
9884 #:make-flags
9885 (list "-Ddist.dir=dist")
9886 #:modules ((guix build ant-build-system)
9887 (guix build java-utils)
9888 (guix build utils)
9889 (srfi srfi-1)
9890 (ice-9 match))
9891 #:phases
9892 (modify-phases %standard-phases
9893 ;; The bulid system ignores the class path the ant-build-system sets
9894 ;; up and instead expects to find all dependencies in the "lib"
9895 ;; directory.
9896 (add-after 'unpack 'create-libdir
9897 (lambda* (#:key inputs #:allow-other-keys)
9898 (mkdir-p "lib")
9899 (for-each
9900 (lambda (file)
9901 (let ((target (string-append "lib/" (basename file))))
9902 (unless (file-exists? target)
9903 (symlink file target))))
9904 (append-map (match-lambda
9905 ((label . dir)
9906 (find-files dir "\\.jar$")))
9907 inputs))
9908 #t))
9909 (replace 'install (install-jars "dist")))))
9910 (inputs
9911 `(("java-asm" ,java-asm)))
9912 (native-inputs
9913 `(("java-junit" ,java-junit)))
9914 (home-page "https://github.com/nhatminhle/cofoja")
9915 (synopsis "Contracts for Java")
9916 (description "Contracts for Java, or Cofoja for short, is a contract
9917programming framework and test tool for Java, which uses annotation processing
9918and bytecode instrumentation to provide run-time checking. (In particular,
9919this is not a static analysis tool.)")
9920 (license license:lgpl3+)))
9921
5d104a27
JL
9922(define-public java-aopalliance
9923 (package
9924 (name "java-aopalliance")
9925 (version "1.0")
9926 (source (origin
9927 (method git-fetch)
9928 ;; Note: this git repository is not official, but contains the
9929 ;; source code that is in the CVS repository. Downloading the
9930 ;; tarball from sourceforge is undeterministic, and the cvs download
9931 ;; fails.
9932 (uri (git-reference
9933 (url "https://github.com/hoverruan/aopalliance")
9934 (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0")))
9935 (file-name (string-append name "-" version))
9936 (sha256
9937 (base32
9938 "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr"))))
9939 (build-system ant-build-system)
9940 (arguments
9941 `(#:jar-name "java-aopalliance.jar"
9942 #:jdk ,icedtea-8
9943 #:tests? #f; no tests
6671d6a1
JL
9944 #:source-dir "aopalliance/src/main"
9945 #:modules ((guix build ant-build-system)
9946 (guix build utils)
9947 (guix build maven pom)
9948 (guix build java-utils)
9949 (sxml simple))
9950 #:phases
9951 (modify-phases %standard-phases
9952 (add-before 'install 'create-pom
9953 (lambda _
9954 (with-output-to-file "pom.xml"
9955 (lambda _
9956 (sxml->xml
9957 `((project
9958 (modelVersion "4.0.0")
9959 (name "aopalliance")
9960 (groupId "aopalliance")
9961 (artifactId "aopalliance")
9962 (version "1.0"))))))
9963 #t))
9964 (replace 'install
9965 (install-from-pom "pom.xml")))))
5d104a27
JL
9966 (home-page "http://aopalliance.sourceforge.net")
9967 (synopsis "Aspect-Oriented Programming")
9968 (description "The AOP Alliance project is a joint project between several
9969software engineering people who are interested in Aspect-Oriented Programming
9970(AOP) and Java.")
9971 (license license:public-domain)))
454536e0
JL
9972
9973(define-public java-javax-inject
9974 (package
9975 (name "java-javax-inject")
6671d6a1 9976 (version "1")
454536e0 9977 (source (origin
6671d6a1
JL
9978 (method git-fetch)
9979 (uri (git-reference
9980 (url "https://github.com/javax-inject/javax-inject")
9981 (commit version)))
9982 (file-name (git-file-name name version))
454536e0
JL
9983 (sha256
9984 (base32
6671d6a1 9985 "1rspl0nkvk1jif6nccikw93xic6ljj2b6kpy2mffwi2mnvc13j7x"))))
454536e0
JL
9986 (build-system ant-build-system)
9987 (arguments
9988 `(#:jar-name "java-javax-inject.jar"
6671d6a1
JL
9989 #:tests? #f; no tests
9990 #:phases
9991 (modify-phases %standard-phases
9992 (replace 'install
9993 (install-from-pom "pom.xml")))))
702a1012 9994 (home-page "https://github.com/javax-inject/javax-inject")
454536e0
JL
9995 (synopsis "JSR-330: Dependency Injection for Java")
9996 (description "This package specifies a means for obtaining objects in such
9997a way as to maximize reusability, testability and maintainability compared to
9998traditional approaches such as constructors, factories, and service locators
9999(e.g., JNDI). This process, known as dependency injection, is beneficial to
10000most nontrivial applications.
10001
10002Many types depend on other types. For example, a @var{Stopwatch} might depend
10003on a @var{TimeSource}. The types on which a type depends are known as its
10004dependencies. The process of finding an instance of a dependency to use at run
10005time is known as resolving the dependency. If no such instance can be found,
10006the dependency is said to be unsatisfied, and the application is broken.")
10007 (license license:asl2.0)))
5766984b
JL
10008
10009(define-public java-guice
10010 (package
10011 (name "java-guice")
10012 (version "4.1")
10013 (source (origin
b176f69f
EF
10014 (method git-fetch)
10015 (uri (git-reference
10016 (url "https://github.com/google/guice")
10017 (commit version)))
10018 (file-name (git-file-name name version))
9936ffe7
BH
10019 (modules '((guix build utils)))
10020 (snippet
10021 `(begin
b176f69f 10022 (for-each delete-file (find-files "." ".*.jar")) #t))
5766984b
JL
10023 (sha256
10024 (base32
b176f69f 10025 "18im5hdfl4q1b9chww2s1ii60sn3ydyyar32a2sf2p2g8zlbdswq"))))
5766984b
JL
10026 (build-system ant-build-system)
10027 (arguments
10028 `(#:jar-name "java-guice.jar"
10029 #:jdk ,icedtea-8
10030 #:tests? #f; FIXME: tests are not in a java sub directory
b176f69f
EF
10031 #:source-dir "core/src"
10032 #:phases
10033 (modify-phases %standard-phases
10034 (add-after 'unpack 'make-files-writable
10035 (lambda _
10036 (for-each make-file-writable (find-files "."))
6671d6a1
JL
10037 #t))
10038 (replace 'install
10039 (install-from-pom "core/pom.xml")))))
10040 (propagated-inputs
10041 `(("java-aopalliance" ,java-aopalliance)
10042 ("java-asm" ,java-asm)
5766984b 10043 ("java-cglib" ,java-cglib)
6671d6a1 10044 ("java-guava" ,java-guava)
5766984b 10045 ("java-javax-inject" ,java-javax-inject)
6671d6a1 10046 ("java-guice-parent-pom" ,java-guice-parent-pom)))
5766984b
JL
10047 (home-page "https://github.com/google/guice")
10048 (synopsis "Lightweight dependency injection framework")
b176f69f 10049 (description "Guice is a lightweight dependency injection framework for
5766984b
JL
10050Java 6 and above.")
10051 (license license:asl2.0)))
ec4e8ad7
JL
10052
10053(define-public java-guice-servlet
10054 (package
10055 (inherit java-guice)
10056 (name "java-guice-servlet")
10057 (arguments
10058 `(#:jar-name "guice-servlet.jar"
10059 #:source-dir "extensions/servlet/src/"
10060 #:jdk ,icedtea-8
b176f69f
EF
10061 #:tests? #f ; FIXME: not in a java subdir
10062 #:phases
10063 (modify-phases %standard-phases
10064 (add-after 'unpack 'make-files-writable
10065 (lambda _
10066 (for-each make-file-writable (find-files "."))
10067 #t)))))
ec4e8ad7
JL
10068 (inputs
10069 `(("guice" ,java-guice)
10eddaca 10070 ("servlet" ,java-classpathx-servletapi)
ec4e8ad7 10071 ,@(package-inputs java-guice)))))
b12fe1e5 10072
6671d6a1
JL
10073(define java-guice-parent-pom
10074 (package
10075 (inherit java-guice)
10076 (name "java-guice-parent-pom")
10077 (arguments
10078 `(#:tests? #f
10079 #:phases
10080 (modify-phases %standard-phases
10081 (delete 'configure)
10082 (delete 'build)
10083 (add-after 'install 'install-extensions
10084 (install-pom-file "extensions/pom.xml"))
10085 (replace 'install
10086 (install-pom-file "pom.xml")))))
10087 (propagated-inputs
10088 `(("java-google-parent-pom" ,java-google-parent-pom-5)))))
10089
10090(define java-google-parent-pom-5
10091 (package
10092 (name "java-google-parent-pom")
10093 (version "5")
10094 (source (origin
10095 (method git-fetch)
10096 (uri (git-reference
10097 (url "https://github.com/google/google-maven-parents")
10098 (commit (string-append "google-" version))))
10099 (file-name (git-file-name name version))
10100 (sha256
10101 (base32
10102 "0zb7hx24p8k8rfdvix2vsbfqn73jhrycdndvhf8j5gbii9wbqibv"))))
10103 (build-system ant-build-system)
10104 (arguments
10105 `(#:tests? #f
10106 #:phases
10107 (modify-phases %standard-phases
10108 (delete 'configure)
10109 (delete 'build)
10110 (replace 'install
10111 (install-pom-file "pom.xml")))))
10112 (home-page "https://github.com/google/google-maven-parents")
10113 (synopsis "Google parent pom")
10114 (description "This package contains the Maven parent POM for other Google
10115Java projects.")
10116 (license license:asl2.0)))
10117
b12fe1e5
JL
10118(define-public java-assertj
10119 (package
10120 (name "java-assertj")
10121 (version "3.8.0")
10122 (source (origin
04ca89d8
EF
10123 (method git-fetch)
10124 (uri (git-reference
10125 (url "https://github.com/joel-costigliola/assertj-core")
10126 (commit (string-append "assertj-core-" version))))
10127 (file-name (git-file-name name version))
b12fe1e5
JL
10128 (sha256
10129 (base32
04ca89d8 10130 "1k35cg2in7pzk4pbdjryr0pll5lgk1r6ngrn0j8cdlgi7w8zh2d1"))))
b12fe1e5
JL
10131 (build-system ant-build-system)
10132 (arguments
10133 `(#:jar-name "java-assertj.jar"
10134 #:jdk ,icedtea-8
10135 #:source-dir "src/main/java"
10136 #:tests? #f)); depends on tng-junit which depends on assertj
10137 (inputs
10138 `(("cglib" ,java-cglib)
10139 ("junit" ,java-junit)
10140 ("hamcrest" ,java-hamcrest-core)))
10141 (native-inputs
10142 `(("mockito" ,java-mockito-1)))
10143 (home-page "https://joel-costigliola.github.io/assertj/index.html")
10144 (synopsis "Fluent assertions for java")
10145 (description "AssertJ core is a Java library that provides a fluent
10146interface for writing assertions. Its main goal is to improve test code
10147readability and make maintenance of tests easier.")
10148 (license license:asl2.0)))
6768e0a7
JL
10149
10150(define-public java-jboss-javassist
10151 (package
10152 (name "java-jboss-javassist")
10153 (version "3.21.0")
10154 (source (origin
8b408789
EF
10155 (method git-fetch)
10156 (uri (git-reference
10157 (url "https://github.com/jboss-javassist/javassist")
10158 (commit
10159 (string-append "rel_"
10160 (string-map
10161 (lambda (x) (if (eq? x #\.) #\_ x)) version)
10162 "_ga"))))
10163 (file-name (git-file-name name version))
6768e0a7
JL
10164 (sha256
10165 (base32
87ce1fc5
EF
10166 "0h3zlcyqiaq01fspm69h7vki67raw305w89p4ha8vlhpzw02qifm"))
10167 (modules '((guix build utils)))
10168 (snippet
10169 '(begin
10170 (delete-file "javassist.jar")))))
6768e0a7
JL
10171 (build-system ant-build-system)
10172 (arguments
10173 `(#:jar-name "java-jboss-javassist.jar"
10174 #:jdk ,icedtea-8
10175 #:source-dir "src/main"
10176 #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3
10177 #:phases
10178 (modify-phases %standard-phases
8b408789 10179 (add-after 'unpack 'make-files-writable
6768e0a7 10180 (lambda _
8b408789 10181 (for-each make-file-writable (find-files "."))
6768e0a7
JL
10182 #t)))))
10183 (native-inputs
10184 `(("junit" ,java-junit)))
10185 (home-page "https://github.com/jboss-javassist/javassist")
10186 (synopsis "Java bytecode engineering toolkit")
10187 (description "Javassist (JAVA programming ASSISTant) makes Java bytecode
10188manipulation simple. It is a class library for editing bytecodes in Java; it
10189enables Java programs to define a new class at runtime and to modify a class
10190file when the JVM loads it.")
10191 (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl.
a6dd06d0
JL
10192
10193(define-public java-jcommander
10194 (package
10195 (name "java-jcommander")
10196 (version "1.71")
10197 (source (origin
4e257acf
EF
10198 (method git-fetch)
10199 (uri (git-reference
10200 (url "https://github.com/cbeust/jcommander")
10201 (commit version)))
10202 (file-name (git-file-name name version))
a6dd06d0
JL
10203 (sha256
10204 (base32
4e257acf 10205 "12vcpc19sd7jhvjgp7xz1qjanfix162xb3x2q5zah93rjklj1h57"))))
a6dd06d0
JL
10206 (build-system ant-build-system)
10207 (arguments
10208 `(#:jar-name "java-jcommander.jar"
10209 #:jdk ,icedtea-8
10210 #:tests? #f; requires testng which depends on jcommander
10211 #:source-dir "src/main/java"))
dcfdc908 10212 (home-page "https://jcommander.org")
a6dd06d0
JL
10213 (synopsis "Command line parameters parser")
10214 (description "JCommander is a very small Java framework that makes it
10215trivial to parse command line parameters. Parameters are declared with
10216annotations.")
10217 (license license:asl2.0)))
11bc385b
JL
10218
10219(define-public java-bsh
10220 (package
10221 (name "java-bsh")
10222 (version "2.0b6")
10223 (source (origin
3e51f9eb
EF
10224 (method git-fetch)
10225 (uri (git-reference
10226 (url "https://github.com/beanshell/beanshell")
10227 (commit version)))
10228 (file-name (git-file-name name version))
11bc385b
JL
10229 (sha256
10230 (base32
b8d977b1
JL
10231 "0kz3f0xjack6c9syssi4qjw1rbd3q5963sk5pmr143hiibxa9csw"))
10232 (modules '((guix build utils)))
10233 (snippet
10234 '(begin
10235 ;; Delete bundled third-party jar archives.
10236 (for-each delete-file (find-files "." ".*.jar$"))
10237 (for-each (lambda (file) (chmod file #o644))
10238 (find-files "." "."))
10239 #t))))
11bc385b
JL
10240 (build-system ant-build-system)
10241 (arguments
10242 `(#:build-target "jarall"
10243 #:test-target "junit-tests-all"
c1fb0d8e 10244 #:make-flags (list "-DDATE" "(no date for reproducibility)")
11bc385b
JL
10245 #:phases
10246 (modify-phases %standard-phases
b8d977b1
JL
10247 (add-before 'install 'fix-pom
10248 (lambda _
10249 (substitute* "pom.xml"
10250 (("org.apache-extras.beanshell") "org.beanshell"))
10251 #t))
11bc385b 10252 (replace 'install
51087d51 10253 (install-from-pom "pom.xml")))))
b8d977b1
JL
10254 (inputs
10255 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
10256 ("java-commons-bsf" ,java-commons-bsf)))
10257 (native-inputs
10258 `(("java-junit" ,java-junit)
10259 ("javacc" ,javacc-3)))
11bc385b
JL
10260 (home-page "http://beanshell.org/")
10261 (synopsis "Lightweight Scripting for Java")
10262 (description "BeanShell is a small, free, embeddable Java source
10263interpreter with object scripting language features, written in Java.
10264BeanShell dynamically executes standard Java syntax and extends it with common
10265scripting conveniences such as loose types, commands, and method closures like
10266those in Perl and JavaScript.")
10267 (license license:asl2.0)))
7a343e97
JL
10268
10269(define-public java-fest-util
10270 (package
10271 (name "java-fest-util")
10272 (version "1.2.5")
10273 (source (origin
00f3190d
EF
10274 (method git-fetch)
10275 (uri (git-reference
10276 (url "https://github.com/alexruiz/fest-util/")
10277 (commit (string-append "fest-util-" version))))
10278 (file-name (git-file-name name version))
7a343e97
JL
10279 (sha256
10280 (base32
00f3190d 10281 "02kgal7v85snyyvcsxvn4qphid455f4smh2wri1il8d9asw0djbz"))))
7a343e97
JL
10282 (build-system ant-build-system)
10283 (arguments
10284 `(#:jar-name "java-fest-util.jar"
10285 #:source-dir "src/main/java"))
10286 (native-inputs
10287 `(("junit" ,java-junit)
10288 ("hamcrest" ,java-hamcrest-core)))
10289 (home-page "https://github.com/alexruiz/fest-util")
10290 (synopsis "FEST common utilities")
10291 (description "Common utilities used in all FEST module.")
10292 (license license:asl2.0)))
3c6c8358
JL
10293
10294(define-public java-fest-test
10295 (package
10296 (name "java-fest-test")
10297 (version "2.1.0")
10298 (source (origin
79e74008
EF
10299 (method git-fetch)
10300 (uri (git-reference
10301 (url "https://github.com/alexruiz/fest-test/")
10302 (commit (string-append "fest-test-" version))))
10303 (file-name (git-file-name name version))
3c6c8358
JL
10304 (sha256
10305 (base32
79e74008 10306 "0mg1d2jfh7kbx2c40dchbjr6d8pv59snsyb13mfxsr7xk5n69qbn"))))
3c6c8358
JL
10307 (build-system ant-build-system)
10308 (arguments
10309 `(#:jar-name "java-fest-test.jar"
10310 #:source-dir "src/main/java"
10311 #:tests? #f)); no tests
10312 (inputs
10313 `(("junit" ,java-junit)))
10314 (home-page "https://github.com/alexruiz/fest-test")
10315 (synopsis "Common FEST testing infrastructure")
10316 (description "Fest-test contains the common FEST testing infrastructure.")
10317 (license license:asl2.0)))
ca98e448
JL
10318
10319(define-public java-fest-assert
10320 (package
10321 (name "java-fest-assert")
10322 (version "2.0M10")
10323 (source (origin
e9917c69
EF
10324 (method git-fetch)
10325 (uri (git-reference
10326 (url "https://github.com/alexruiz/fest-assert-2.x/")
10327 (commit (string-append "fest-assert-core-" version))))
10328 (file-name (git-file-name name version))
ca98e448
JL
10329 (sha256
10330 (base32
e9917c69 10331 "1cp8zzyag3s85fz2w68sda9zzaal1y5f9wl8g72wkm12an40w6by"))))
ca98e448
JL
10332 (build-system ant-build-system)
10333 (arguments
10334 `(#:jar-name "java-fest-assert.jar"
10335 #:source-dir "src/main/java"
10336 #:test-exclude
10337 (list
10338 "**/Abstract*.java"
10339 "**/*BaseTest.java"
10340 ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses
10341 "**/MessageFormatter_format_Test.java"
10342 "**/internal/*/*_assert*_Test.java")))
10343 (inputs
10344 `(("java-fest-util" ,java-fest-util)))
10345 (native-inputs
10346 `(("java-junit" ,java-junit)
10347 ("java-fest-test" ,java-fest-test)
10348 ("java-hamcrest-core" ,java-hamcrest-core)
10349 ("java-mockito" ,java-mockito-1)
10350 ("java-cglib" ,java-cglib)
10351 ("java-objenesis" ,java-objenesis)
10352 ("java-asm" ,java-asm)))
10353 (home-page "https://github.com/alexruiz/fest-assert-2.x")
10354 (synopsis "FEST fluent assertions")
10355 (description "FEST-Assert provides a fluent interface for assertions.")
10356 (license license:asl2.0)))
0442d897
JL
10357
10358(define-public java-testng
10359 (package
10360 (name "java-testng")
3422e10e 10361 (version "6.14.3")
0442d897 10362 (source (origin
36b39d16
RW
10363 (method git-fetch)
10364 (uri (git-reference
b0e7b699 10365 (url "https://github.com/cbeust/testng")
36b39d16
RW
10366 (commit version)))
10367 (file-name (string-append name "-" version "-checkout"))
0442d897
JL
10368 (sha256
10369 (base32
3422e10e 10370 "0y6vq30i5g276kw0v2bhbvci22ijg7ax49ap2611yqlhbs4d6dqv"))))
0442d897
JL
10371 (build-system ant-build-system)
10372 (arguments
10373 `(#:jdk ,icedtea-8; java.util.function
10374 #:jar-name "java-testng.jar"
10375 #:source-dir "src/main/java"
10376 #:phases
10377 (modify-phases %standard-phases
36b39d16
RW
10378 ;; FIXME: I don't know why these tests fail
10379 (add-after 'unpack 'delete-failing-tests
10380 (lambda _
10381 (substitute* "src/test/resources/testng.xml"
10382 (("<class name=\"test.configuration.github1625.TestRunnerIssue1625\"/>") "")
10383 (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") ""))
10384 #t))
10385 ;; We don't have groovy
10386 (add-after 'unpack 'delete-groovy-tests
10387 (lambda _
10388 (delete-file-recursively "src/test/java/test/dependent/issue1648/")
10389 (substitute* "src/test/resources/testng.xml"
10390 (("<class name=\"test.dependent.issue1648.TestRunner\"/>") ""))
10391 #t))
0442d897
JL
10392 (add-before 'build 'copy-resources
10393 (lambda _
10394 (copy-recursively "src/main/resources" "build/classes")
10395 #t))
10396 (add-before 'check 'copy-test-resources
10397 (lambda _
10398 (copy-recursively "src/test/resources" "build/test-classes")
10399 #t))
10400 (replace 'check
10401 (lambda _
2c8ac364 10402 (invoke "ant" "compile-tests")
0442d897
JL
10403 ;; we don't have groovy
10404 (substitute* "src/test/resources/testng.xml"
10405 (("<class name=\"test.groovy.GroovyTest\" />") ""))
2c8ac364
MW
10406 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
10407 ":build/classes"
10408 ":build/test-classes")
10409 "-Dtest.resources.dir=src/test/resources"
10410 "org.testng.TestNG" "src/test/resources/testng.xml"))))))
0442d897
JL
10411 (propagated-inputs
10412 `(("junit" ,java-junit)
10413 ("java-jsr305" ,java-jsr305)
10414 ("java-bsh" ,java-bsh)
10415 ("java-jcommander" ,java-jcommander)
10416 ("java-guice" ,java-guice)
10417 ("snakeyaml" ,java-snakeyaml)))
10418 (native-inputs
10419 `(("guava" ,java-guava)
10420 ("java-javax-inject" ,java-javax-inject)
10421 ("java-hamcrest" ,java-hamcrest-all)
10422 ("java-assertj" ,java-assertj)
36b39d16 10423 ("java-mockito" ,java-mockito-1)
0442d897
JL
10424 ("cglib" ,java-cglib)
10425 ("asm" ,java-asm)
10426 ("aopalliance" ,java-aopalliance)))
c9010605 10427 (home-page "https://testng.org")
0442d897
JL
10428 (synopsis "Testing framework")
10429 (description "TestNG is a testing framework inspired from JUnit and NUnit
10430but introducing some new functionalities that make it more powerful and easier
10431to use.")
10432 (license license:asl2.0)))
1717a7de
JL
10433
10434(define-public java-jnacl
3e87923a
RW
10435 (let ((commit "094e819afdd63ea81a499b3bcb42a271006bebd9")
10436 (revision "2"))
10437 (package
10438 (name "java-jnacl")
10439 (version (string-append "0.1.0-" revision "." (string-take commit 7)))
10440 (source (origin
10441 (method git-fetch)
10442 (uri (git-reference
b0e7b699 10443 (url "https://github.com/neilalexander/jnacl")
3e87923a 10444 (commit commit)))
6c34ad73 10445 (file-name (git-file-name name version))
3e87923a
RW
10446 (sha256
10447 (base32
10448 "1d6g6xhn83byv5943n7935wwjsk0ibk0qdvqgr699qqgqqmwisbb"))))
10449 (build-system ant-build-system)
10450 (arguments
8c7d32e0 10451 `(#:jar-name "jnacl.jar"
3e87923a
RW
10452 #:source-dir "src/main/java"
10453 #:jdk ,icedtea-8
10454 #:phases
10455 (modify-phases %standard-phases
10456 (add-before 'build 'fix-tests
10457 (lambda _
10458 (substitute* '("src/test/java/com/neilalexander/jnacl/NaClTest.java"
10459 "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java")
10460 (("assertions.Assertions") "assertions.api.Assertions"))
10461 #t))
10462 (replace 'check
10463 (lambda _
10464 (invoke "ant" "compile-tests")
10465 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
10466 ":build/classes"
10467 ":build/test-classes")
10468 "org.testng.TestNG" "-testclass"
10469 "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class")
10470 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
10471 ":build/classes"
10472 ":build/test-classes")
10473 "org.testng.TestNG" "-testclass"
2c8ac364 10474 "build/test-classes/com/neilalexander/jnacl/NaClTest.class"))))))
3e87923a
RW
10475 (native-inputs
10476 `(("java-testng" ,java-testng)
10477 ("java-fest-util" ,java-fest-util)
10478 ("java-fest-assert" ,java-fest-assert)))
10479 (home-page "https://github.com/neilalexander/jnacl")
10480 (synopsis "Java implementation of NaCl")
10481 (description "Pure Java implementation of the NaCl: Networking and
1717a7de 10482Cryptography library.")
3e87923a 10483 (license license:bsd-2))))
eaf3cb7a
JL
10484
10485(define-public java-mvel2
10486 (package
10487 (name "java-mvel2")
10488 (version "2.3.1")
10489 (source (origin
10490 (method url-fetch)
10491 (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-"
10492 version ".Final.tar.gz"))
10493 (sha256
10494 (base32
10495 "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z"))))
10496 (build-system ant-build-system)
10497 (arguments
10498 `(#:jar-name "mvel2.jar"
10499 #:source-dir "src/main/java"
10500 #:test-exclude
10501 (list "**/Abstract*.java"
10502 ;; Base class with no tests
10503 "**/MVELThreadTest.java")
10504 #:phases
10505 (modify-phases %standard-phases
10506 (add-after 'install 'install-bin
10507 (lambda* (#:key outputs #:allow-other-keys)
10508 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
10509 (mkdir-p bin)
10510 (with-output-to-file (string-append bin "/mvel2")
10511 (lambda _
10512 (display
10513 (string-append
10514 "#!" (which "bash") "\n"
10515 "if [ \"$#\" -ne \"2\" ]; then\n"
10516 "echo 'Usage: mvel2 <script> <out.dir>'\n"
10517 "exit\n"
10518 "fi\n"
10519 "java -Dout.dir=$2 -cp " (getenv "CLASSPATH")
10520 ":" (assoc-ref outputs "out") "/share/java/mvel2.jar"
10521 " org.mvel2.sh.Main $1"))))
10522 (chmod (string-append bin "/mvel2") #o755))
10523 #t)))))
10524 (native-inputs
10525 `(("junit" ,java-junit)
10526 ("hamcrest" ,java-hamcrest-core)))
10527 (home-page "https://github.com/mvel/mvel")
10528 (synopsis "MVFLEX Expression Language")
10529 (description "MVEL has largely been inspired by Java syntax, but has some
10530fundamental differences aimed at making it more efficient as an expression
10531language, such as operators that directly support collection, array and string
10532matching, as well as regular expressions. MVEL is used to evaluate expressions
10533written using Java syntax.
10534
10535In addition to the expression language, MVEL serves as a templating language for
10536configuration and string construction.")
10537 (license license:asl2.0)))
d54d7d31 10538
9e325e8c
RW
10539(define-public java-commons-jexl-2
10540 (package
10541 (name "java-commons-jexl")
10542 (version "2.1.1")
10543 (source (origin
10544 (method url-fetch)
10545 (uri (string-append "mirror://apache/commons/jexl/source/"
10546 "commons-jexl-" version "-src.tar.gz"))
10547 (sha256
10548 (base32
10549 "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz"))))
10550 (build-system ant-build-system)
10551 (arguments
10552 `(#:jar-name "commons-jexl-2.jar"
10553 #:jdk ,icedtea-8
10554 #:source-dir "src/main/java"
10555 #:phases
10556 (modify-phases %standard-phases
10557 (add-before 'check 'disable-broken-tests
10558 (lambda* (#:key inputs #:allow-other-keys)
10559 (with-directory-excursion "src/test/java/org/apache/commons/jexl2/"
10560 (substitute* "ArithmeticTest.java"
10561 (("asserter.assertExpression\\(\"3 / 0\"") "//")
10562 (("asserter.assertExpression\\(\"imanull") "//"))
10563 ;; This test fails with "ambiguous method invocation"
10564 (delete-file "CacheTest.java")
10565 ;; This test doesn't have access to the temp directory
10566 (substitute* "ClassCreatorTest.java"
10567 (("java.io.tmpdir") "user.dir"))
10568 ;; This test fails in trying to detect whether it can run.
10569 (substitute* "ClassCreator.java"
10570 (("boolean canRun =.*") "boolean canRun = false;\n"))
10571 ;; ...and these tests depend on it.
10572 (delete-file "scripting/JexlScriptEngineOptionalTest.java")
10573 (delete-file "scripting/JexlScriptEngineTest.java"))
10574 #t))
10575 (add-before 'build 'run-javacc
10576 (lambda _
10577 (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/"
080d0b60
RW
10578 (invoke "java" "jjtree" "Parser.jjt")
10579 (invoke "java" "javacc" "Parser.jj"))
10580 #t)))))
9e325e8c
RW
10581 (inputs
10582 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
10583 (native-inputs
10584 `(("java-junit" ,java-junit)
10585 ("java-hamcrest-core" ,java-hamcrest-core)
10586 ("javacc" ,javacc-4)))
10587 (home-page "https://commons.apache.org/proper/commons-jexl/")
10588 (synopsis "Java Expression Language ")
10589 (description "JEXL is a library intended to facilitate the implementation
10590of dynamic and scripting features in applications and frameworks written in
10591Java. JEXL implements an Expression Language based on some extensions to the
10592JSTL Expression Language supporting most of the constructs seen in
10593shell-script or ECMAScript. Its goal is to expose scripting features usable
10594by technical operatives or consultants working with enterprise platforms.")
10595 (license license:asl2.0)))
10596
d54d7d31
JL
10597(define-public java-lz4
10598 (package
10599 (name "java-lz4")
10600 (version "1.4.0")
10601 (source (origin
6632fc28
EF
10602 (method git-fetch)
10603 (uri (git-reference
10604 (url "https://github.com/lz4/lz4-java")
10605 (commit version)))
10606 (file-name (git-file-name name version))
d54d7d31
JL
10607 (sha256
10608 (base32
6632fc28 10609 "0ydjakhv3cz34mfvv14qrh2ksdxifgjwwagjy7r46qr3f68hnf6y"))))
d54d7d31
JL
10610 (build-system ant-build-system)
10611 (arguments
10612 `(#:jar-name "lz4.jar"
10613 #:jdk ,icedtea-8
10614 #:source-dir "src/java:src/java-unsafe"
10615 #:tests? #f; FIXME: requires more dependencies
10616 #:phases
10617 (modify-phases %standard-phases
6632fc28
EF
10618 (add-after 'unpack 'make-files-writable
10619 (lambda _
10620 (for-each make-file-writable (find-files "."))
10621 #t))
d54d7d31
JL
10622 (add-before 'configure 'generate-source
10623 (lambda _
10624 (with-directory-excursion "src/build/source_templates"
1b6bc516
RW
10625 (invoke "mvel2" "../gen_sources.mvel" "../../java"))
10626 #t)))))
d54d7d31
JL
10627 (native-inputs
10628 `(("mvel" ,java-mvel2)))
10629 (home-page "https://jpountz.github.io/lz4-java")
10630 (synopsis "Compression algorithm")
10631 (description "LZ4 - Java is a Java port of the popular lz4 compression
10632algorithms and xxHash hashing algorithm.")
10633 (license license:asl2.0)))
62315865 10634
50d70a72 10635(define-public java-bouncycastle
62315865 10636 (package
50d70a72 10637 (name "java-bouncycastle")
248a9e16 10638 (version "1.60")
62315865 10639 (source (origin
a8f01c45
EF
10640 (method git-fetch)
10641 (uri (git-reference
10642 (url "http://git.bouncycastle.org/repositories/bc-java")
10643 ;(url "https://github.com/bcgit/bc-java")
10644 (commit (string-append "r1rv" (substring version 2 4)))))
10645 (file-name (git-file-name name version))
62315865
JL
10646 (sha256
10647 (base32
a8f01c45 10648 "1m921a1ac2dl797ffzg3d4j97ch308f25spb4jgsj3npfmmys5gb"))
50d70a72
JL
10649 (modules '((guix build utils)))
10650 (snippet
10651 '(begin
10652 (for-each delete-file
10653 (find-files "." "\\.jar$"))
10654 #t))))
62315865
JL
10655 (build-system ant-build-system)
10656 (arguments
50d70a72 10657 `(#:jdk ,icedtea-8
0c68f7fd 10658 #:tests? #f
62315865
JL
10659 #:phases
10660 (modify-phases %standard-phases
50d70a72 10661 (replace 'build
62315865 10662 (lambda _
50d70a72 10663 (invoke "ant" "-f" "ant/jdk15+.xml" "build-provider")
2c8ac364 10664 (invoke "ant" "-f" "ant/jdk15+.xml" "build")))
0c68f7fd
RW
10665 ;; FIXME: the tests freeze.
10666 ;; (replace 'check
10667 ;; (lambda _
10668 ;; (invoke "ant" "-f" "ant/jdk15+.xml" "test")))
50d70a72
JL
10669 (replace 'install
10670 (install-jars "build/artifacts/jdk1.5/jars")))))
10671 (inputs
10672 `(("java-javax-mail" ,java-javax-mail)))
31208367
JL
10673 (native-inputs
10674 `(("unzip" ,unzip)
50d70a72
JL
10675 ("junit" ,java-junit)
10676 ("java-native-access" ,java-native-access)
10677 ("java-native-access-platform" ,java-native-access-platform)))
31208367
JL
10678 (home-page "https://www.bouncycastle.org")
10679 (synopsis "Cryptographic library")
50d70a72
JL
10680 (description "Bouncy Castle is a cryptographic library for the Java
10681programming language.")
31208367 10682 (license license:expat)))
a53d9ac0
JL
10683
10684(define-public java-lmax-disruptor
10685 (package
10686 (name "java-lmax-disruptor")
10687 (version "3.3.7")
10688 (source (origin
10689 (method url-fetch)
10690 (uri (string-append "https://github.com/LMAX-Exchange/disruptor/"
10691 "archive/" version ".tar.gz"))
10692 (file-name (string-append name "-" version ".tar.gz"))
10693 (sha256
10694 (base32
10695 "17da2gwj5abnlsfgn2xqjk5lgzbg4vkb0hdv2dvc8r2fx4bi7w3g"))))
10696 (build-system ant-build-system)
10697 (arguments
10698 `(#:jar-name "java-lmax-disruptor.jar"
10699 #:jdk ,icedtea-8
10700 #:tests? #f)); tests hang
10701 (inputs
10702 `(("junit" ,java-junit)
10703 ("java-hdrhistogram" ,java-hdrhistogram)
10704 ("java-jmock" ,java-jmock)
10705 ("java-jmock-legacy" ,java-jmock-legacy)
10706 ("java-jmock-junit4" ,java-jmock-junit4)
10707 ("java-hamcrest-all" ,java-hamcrest-all)))
10708 (native-inputs
10709 `(("cglib" ,java-cglib)
10710 ("objenesis" ,java-objenesis)
10711 ("asm" ,java-asm)))
10712 (home-page "https://www.lmax.com/disruptor")
10713 (synopsis "High performance inter-thread communication")
10714 (description "LMAX Disruptor is a software pattern and software component
10715for high performance inter-thread communication that avoids the need for
10716message queues or resource locking.")
10717 (license license:asl2.0)))
5619556b 10718
5e3abfc8
RW
10719(define-public java-commons-bcel
10720 (package
10721 (name "java-commons-bcel")
10722 (version "6.1")
10723 (source (origin
10724 (method url-fetch)
10725 (uri (string-append "mirror://apache/commons/bcel/source/bcel-"
10726 version "-src.tar.gz"))
10727 (sha256
10728 (base32
10729 "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy"))))
10730 (build-system ant-build-system)
10731 (arguments
10732 `(#:jar-name "bcel.jar"
10733 #:jdk ,icedtea-8
10734 #:source-dir "src/main/java"
10735 #:test-dir "src/test/java"
10736 ;; FIXME: Tests require the unpackaged jna.
10737 #:tests? #f))
10738 (home-page "https://commons.apache.org/proper/commons-bcel/")
10739 (synopsis "Byte code engineering library")
10740 (description "The Byte Code Engineering Library (Apache Commons BCEL) is
10741intended to give users a convenient way to analyze, create, and
10742manipulate (binary) Java class files. Classes are represented by objects
10743which contain all the symbolic information of the given class: methods, fields
10744and byte code instructions, in particular.
10745
10746Such objects can be read from an existing file, be transformed by a
10747program (e.g. a class loader at run-time) and written to a file again. An
10748even more interesting application is the creation of classes from scratch at
10749run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful
10750if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format
10751of Java @code{.class} files.")
10752 (license license:asl2.0)))
10753
5619556b
JL
10754(define-public java-xerial-core
10755 (package
10756 (name "java-xerial-core")
10757 (version "2.1")
10758 (source (origin
10759 (method url-fetch)
10760 (uri (string-append "https://github.com/xerial/xerial-java/archive/"
10761 version ".tar.gz"))
10762 (file-name (string-append name "-" version ".tar.gz"))
10763 (sha256
10764 (base32
10765 "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d"))))
10766 (build-system ant-build-system)
10767 (arguments
10768 `(#:jar-name "xerial-core.jar"
10769 #:source-dir "xerial-core/src/main/java"
10770 #:test-dir "xerial-core/src/test"
10771 #:phases
10772 (modify-phases %standard-phases
10773 (add-before 'build 'copy-resources
10774 (lambda _
10775 (copy-recursively "xerial-core/src/main/resources"
10776 "build/classes")
10777 #t)))))
10778 (native-inputs
10779 `(("junit" ,java-junit)
10780 ("hamcrest" ,java-hamcrest-core)))
10781 (home-page "https://github.com/xerial/xerial-java")
f4548394 10782 (synopsis "Data management libraries for Java")
5619556b 10783 (description "Xerial is a set of data management libraries for the Java
f4548394 10784programming language. The ultimate goal of the Xerial project is to manage
5619556b
JL
10785everything as database, including class objects, text format data, data
10786streams, etc.")
10787 (license license:asl2.0)))
8d6a4815
JL
10788
10789(define-public java-powermock-reflect
10790 (package
10791 (name "java-powermock-reflect")
10792 (version "1.7.3")
10793 (source (origin
10794 (method url-fetch)
10795 (uri (string-append "https://github.com/powermock/powermock/"
10796 "archive/powermock-" version ".tar.gz"))
10797 (file-name (string-append name "-" version ".tar.gz"))
10798 (sha256
10799 (base32
10800 "0sbgi5vqq7k72wzcdjb20s370vyd4hsbnx71pzb8ishml3gy7fwy"))
10801 (patches
10802 (search-patches "java-powermock-fix-java-files.patch"))))
10803 (build-system ant-build-system)
10804 (arguments
10805 `(#:jar-name "java-powermock-reflect.jar"
10806 #:jdk ,icedtea-8
10807 #:source-dir "powermock-reflect/src/main/java"
10808 #:test-dir "powermock-reflect/src/test"))
10809 (inputs
10810 `(("java-objenesis" ,java-objenesis)))
10811 (native-inputs
10812 `(("junit" ,java-junit)
10813 ("cglib" ,java-cglib)
10814 ("asm" ,java-asm)
10815 ("hamcrest" ,java-hamcrest-core)
10816 ("assertj" ,java-assertj)))
10817 (home-page "https://github.com/powermock/powermock")
10818 (synopsis "Mock library extension framework")
10819 (description "PowerMock is a framework that extends other mock libraries
10820such as EasyMock with more powerful capabilities. PowerMock uses a custom
10821classloader and bytecode manipulation to enable mocking of static methods,
10822constructors, final classes and methods, private methods, removal of static
10823initializers and more. By using a custom classloader no changes need to be
10824done to the IDE or continuous integration servers which simplifies adoption.")
10825 (license license:asl2.0)))
d4a4d5da
JL
10826
10827(define-public java-powermock-core
10828 (package
10829 (inherit java-powermock-reflect)
10830 (name "java-powermock-core")
10831 (arguments
10832 `(#:jar-name "java-powermock-core.jar"
10833 #:source-dir "powermock-core/src/main/java"
10834 #:test-dir "powermock-core/src/test"
10835 #:tests? #f; requires powermock-api
59e0021c
JL
10836 #:jdk ,icedtea-8
10837 #:phases
10838 (modify-phases %standard-phases
10839 (add-before 'build 'copy-resources
10840 (lambda _
10841 (copy-recursively "powermock-core/src/main/resources"
2c8ac364
MW
10842 "build/classes")
10843 #t)))))
d4a4d5da
JL
10844 (inputs
10845 `(("reflect" ,java-powermock-reflect)
10846 ("javassist" ,java-jboss-javassist)))
10847 (native-inputs
10848 `(("junit" ,java-junit)
10849 ("assertj" ,java-assertj)
10850 ("mockito" ,java-mockito-1)))))
2d5d65d7
JL
10851
10852(define-public java-powermock-api-support
10853 (package
10854 (inherit java-powermock-reflect)
10855 (name "java-powermock-api-support")
10856 (build-system ant-build-system)
10857 (arguments
10858 `(#:jar-name "java-powermock-api-support.jar"
10859 #:jdk ,icedtea-8
10860 #:source-dir "powermock-api/powermock-api-support/src/main/java"
10861 #:tests? #f)); no tests
10862 (inputs
10863 `(("core" ,java-powermock-core)
10864 ("reflect" ,java-powermock-reflect)))))
6c21d46c
JL
10865
10866(define-public java-powermock-modules-junit4-common
10867 (package
10868 (inherit java-powermock-reflect)
10869 (name "java-powermock-modules-junit4-common")
10870 (build-system ant-build-system)
10871 (arguments
10872 `(#:jar-name "java-powermock-modules-junit4-common.jar"
10873 #:jdk ,icedtea-8
10874 #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java"
10875 #:test-dir "powermock-modules/powermock-module-junit4-common/src/test"))
10876 (inputs
10877 `(("core" ,java-powermock-core)
10878 ("easymock" ,java-easymock)
10879 ("reflect" ,java-powermock-reflect)
10880 ("hamcrest" ,java-hamcrest-core)
10881 ("cglib" ,java-cglib)))))
33db1681
JL
10882
10883(define-public java-powermock-modules-junit4
10884 (package
10885 (inherit java-powermock-reflect)
10886 (name "java-powermock-modules-junit4")
10887 (build-system ant-build-system)
10888 (arguments
10889 `(#:jar-name "java-powermock-modules-junit4.jar"
10890 #:jdk ,icedtea-8
10891 #:source-dir "powermock-modules/powermock-module-junit4/src/main/java"
1124683d
JL
10892 #:test-dir "powermock-modules/powermock-module-junit4/src/test"
10893 #:phases
10894 (modify-phases %standard-phases
10895 (add-before 'build 'fix-junit-detection
10896 (lambda _
10897 ;; Our junit version is 4.12-SNAPSHOT
10898 (substitute* (find-files "powermock-modules/powermock-module-junit4"
10899 "PowerMockJUnit4MethodValidator.java")
2c8ac364
MW
10900 (("4.12") "4.12-SNAPSHOT"))
10901 #t)))))
33db1681
JL
10902 (inputs
10903 `(("core" ,java-powermock-core)
10904 ("reflect" ,java-powermock-reflect)
10905 ("common" ,java-powermock-modules-junit4-common)
10906 ("cglib" ,java-cglib)))
10907 (native-inputs
10908 `(("easymock" ,java-easymock)
10909 ("hamcrest" ,java-hamcrest-core)
10910 ("objenesis" ,java-objenesis)
10911 ("asm" ,java-asm)
10912 ("junit" ,java-junit)))))
4d508975
JL
10913
10914(define-public java-powermock-api-easymock
10915 (package
10916 (inherit java-powermock-reflect)
10917 (name "java-powermock-api-easymock")
10918 (build-system ant-build-system)
10919 (arguments
10920 `(#:jar-name "java-powermock-api-easymock.jar"
10921 #:jdk ,icedtea-8
10922 #:source-dir "powermock-api/powermock-api-easymock/src/main/java"
10923 #:tests? #f; no tests
10924 #:phases
10925 (modify-phases %standard-phases
10926 (add-before 'build 'fix-file
10927 (lambda _
10928 ;; FIXME: This looks wrong, but it fixes a build error.
10929 (with-directory-excursion "powermock-api/powermock-api-easymock"
10930 (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java"
10931 (("classLoader instanceof MockClassLoader") "false")
10932 (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";")))
10933 #t)))))
10934 (inputs
10935 `(("core" ,java-powermock-core)
10936 ("easymock" ,java-easymock)
10937 ("reflect" ,java-powermock-reflect)
10938 ("support" ,java-powermock-api-support)
10939 ("cglib" ,java-cglib)))))
5fb3e822
JL
10940
10941(define-public java-jboss-jms-api-spec
10942 (package
10943 (name "java-jboss-jms-api-spec")
10944 (version "2.0")
10945 (source (origin
10946 (method url-fetch)
10947 (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/"
10948 "archive/jboss-jms-api_" version
10949 "_spec-1.0.1.Final.tar.gz"))
10950 (sha256
10951 (base32
10952 "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m"))))
10953 (build-system ant-build-system)
10954 (arguments
10955 `(#:jar-name "java-jboss-jms-api_spec.jar"
10956 #:jdk ,icedtea-8
10957 #:source-dir "."
10958 #:tests? #f)); no tests
10959 (home-page "https://github.com/jboss/jboss-jms-api_spec")
10960 (synopsis "Java Message Service API specification")
10961 (description "Java Message Service (JMS) API is used to send messages
10962messages between two or more clients. It is a messaging standard that allows
10963application components to create, send, receive, and read messages.")
10964 ; either gpl2 only with GPL Classpath Exception, or cddl.
10965 (license (list license:gpl2 license:cddl1.0))))
3ff47c66
JL
10966
10967(define-public java-mail
10968 (package
10969 (name "java-mail")
10970 (version "1.6.0")
10971 (source (origin
10972 (method url-fetch)
10973 (uri (string-append "https://github.com/javaee/javamail/archive/"
10974 "JAVAMAIL-1_6_0.tar.gz"))
10975 (sha256
10976 (base32
10977 "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92"))))
10978 (build-system ant-build-system)
10979 (arguments
10980 `(#:jar-name "java-mail.jar"
10981 #:jdk ,icedtea-8
10982 #:source-dir "mail/src/main/java"
10983 #:test-dir "mail/src/test"
10984 #:test-exclude
10985 (list "**/CollectorFormatterTest.java"
10986 "**/CompactFormatterTest.java"
10987 "**/DurationFilterTest.java"
10988 "**/MailHandlerTest.java"
10989 "**/GetLocalAddressTest.java"
10990 ;; FIXME: both end with:
10991 ;; java.lang.ClassNotFoundException:
10992 ;; javax.mail.internet.MimeMultipartParseTest
10993 "**/MimeMultipartParseTest.java"
10994 "**/SearchTermSerializationTest.java")
10995 #:phases
10996 (modify-phases %standard-phases
10997 (add-before 'configure 'move-version.java
10998 (lambda _
10999 (copy-file "mail/src/main/resources/javax/mail/Version.java"
218d1dde
RW
11000 "mail/src/main/java/javax/mail/Version.java")
11001 #t))
3ff47c66
JL
11002 (add-before 'build 'copy-resources
11003 (lambda _
11004 (copy-recursively "mail/src/main/resources/META-INF"
11005 "build/classes/META-INF")
11006 #t)))))
11007 (native-inputs
11008 `(("junit" ,java-junit)
11009 ("hamcrest" ,java-hamcrest-core)))
11010 (home-page "https://javaee.github.io/javamail/")
7230f6d5 11011 (synopsis "Mail-related functionality in Java")
3ff47c66
JL
11012 (description "The JavaMail API provides a platform-independent and
11013protocol-independent framework to build mail and messaging applications.")
11014 ;; General Public License Version 2 only ("GPL") or the Common Development
11015 ;; and Distribution License("CDDL")
11016 (license (list license:cddl1.1
11017 license:gpl2)))); with classpath exception
217b20e4
JL
11018
11019(define-public java-jeromq
11020 (package
11021 (name "java-jeromq")
4aa0a1df 11022 (version "0.4.3")
217b20e4 11023 (source (origin
4aa0a1df
RW
11024 (method git-fetch)
11025 (uri (git-reference
b0e7b699 11026 (url "https://github.com/zeromq/jeromq")
4aa0a1df
RW
11027 (commit (string-append "v" version))))
11028 (file-name (string-append name "-" version "-checkout"))
217b20e4
JL
11029 (sha256
11030 (base32
594bd3a0
GB
11031 "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj"))
11032 (patches (search-patches "java-jeromq-fix-tests.patch"))))
217b20e4
JL
11033 (build-system ant-build-system)
11034 (arguments
11035 `(#:jar-name "java-jeromq.jar"
11036 #:source-dir "src/main/java"
11037 #:jdk ,icedtea-8
11038 #:test-exclude
11039 (list
11040 "**/Abstract*.java"
11041 ;; Requires network
11042 "**/ZBeaconTest.java"
11043 ;; Failures
4aa0a1df 11044 "**/DealerSpecTest.java"
217b20e4 11045 "**/CustomDecoderTest.java"
594bd3a0
GB
11046 "**/CustomEncoderTest.java"
11047 "**/ConnectRidTest.java"
11048 "**/ReqSpecTest.java"
11049 "**/PushPullSpecTest.java"
11050 "**/PubSubHwmTest.java"
11051 "**/RouterSpecTest.java"
11052 "**/ProxyTest.java")))
217b20e4
JL
11053 (inputs
11054 `(("java-jnacl" ,java-jnacl)))
11055 (native-inputs
11056 `(("java-hamcrest-core" ,java-hamcrest-core)
11057 ("junit" ,java-junit)))
11058 (home-page "http://zeromq.org/bindings:java")
11059 (synopsis "Java binding for 0MQ")
11060 (description "Jeromq provides the java bindings for 0MQ.")
11061 (license license:mpl2.0)))
46c6905a
JL
11062
11063(define-public java-kafka-clients
11064 (package
11065 (name "java-kafka-clients")
11066 (version "1.0.0")
11067 (source (origin
11068 (method url-fetch)
11069 (uri (string-append "mirror://apache/kafka/" version "/kafka-"
11070 version "-src.tgz"))
11071 (sha256
11072 (base32
11073 "1yxmnsmliwm7671q5yy9bl4jdqyyn00n26cggz9brwczx80w1vfq"))))
11074 (build-system ant-build-system)
11075 (arguments
11076 `(#:jar-name "java-kafka-clients.jar"
11077 #:jdk ,icedtea-8
11078 #:source-dir "clients/src/main/java"
11079 #:test-dir "clients/src/test"
11080 #:test-exclude
11081 (list
11082 ;; This file does not contain a class
11083 "**/IntegrationTest.java"
11084 ;; Requires network
11085 "**/ClientUtilsTest.java"
11086 ;; End with errors that seem related to our powermock
11087 "**/KafkaProducerTest.java"
11088 "**/BufferPoolTest.java")))
11089 (inputs
11090 `(("java-slf4j-api" ,java-slf4j-api)
11091 ("java-lz4" ,java-lz4)))
11092 (native-inputs
11093 `(("junit" ,java-junit)
11094 ("hamcrest" ,java-hamcrest-all)
11095 ("objenesis" ,java-objenesis)
11096 ("asm" ,java-asm)
11097 ("cglib" ,java-cglib)
11098 ("javassist" ,java-jboss-javassist)
11099 ("snappy" ,java-snappy)
11100 ("easymock" ,java-easymock)
11101 ("powermock" ,java-powermock-core)
11102 ("powermock-easymock" ,java-powermock-api-easymock)
11103 ("powermock-junit4-common" ,java-powermock-modules-junit4-common)
11104 ("powermock-junit4" ,java-powermock-modules-junit4)
11105 ("powermock-support" ,java-powermock-api-support)
50d70a72 11106 ("java-bouncycastle" ,java-bouncycastle)))
46c6905a
JL
11107 (home-page "https://kafka.apache.org")
11108 (synopsis "Distributed streaming platform")
11109 (description "Kafka is a distributed streaming platform, which means:
11110@itemize
11111@item it can publish and subscribe to streams of records;
11112@item it can store streams of records in a fault-tolerant way;
11113@item it can process streams of records as they occur.
11114@end itemize")
11115 ;; Either cddl or gpl2 only.
11116 (license (list license:cddl1.1; actually cddl1.1
11117 license:gpl2)))); with classpath exception
0b54e190
JL
11118
11119(define-public java-jdom
11120 (package
11121 (name "java-jdom")
11122 (version "1.1.3")
11123 (source (origin
11124 (method url-fetch)
11125 (uri (string-append "http://jdom.org/dist/binary/archive/jdom-"
11126 version ".tar.gz"))
11127 (sha256
11128 (base32
11129 "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl"))))
11130 (build-system ant-build-system)
11131 (arguments
11132 `(#:build-target "package"
11133 #:tests? #f; tests are run as part of the build process
11134 #:phases
11135 (modify-phases %standard-phases
11136 (replace 'install
11137 (install-jars "build")))))
11138 (home-page "http://jdom.org/")
11139 (synopsis "Access, manipulate, and output XML data")
11140 (description "Java-based solution for accessing, manipulating, and
11141outputting XML data from Java code.")
11142 (license license:bsd-4)))
78745d33
JL
11143
11144(define-public java-geronimo-xbean-reflect
11145 (package
11146 (name "java-geronimo-xbean-reflect")
11147 (version "4.5")
11148 (source (origin
11149 (method svn-fetch)
11150 (uri (svn-reference
11151 (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/")
11152 (revision 1807396)))
11153 (file-name (string-append name "-" version))
11154 (sha256
11155 (base32
11156 "18q3i6jgm6rkw8aysfgihgywrdc5nvijrwnslmi3ww497jvri6ja"))))
11157 (build-system ant-build-system)
11158 (arguments
11159 `(#:jar-name "geronimo-xbean-reflect.jar"
11160 #:source-dir "xbean-reflect/src/main/java"
11161 #:test-dir "xbean-reflect/src/test"
11162 #:jdk ,icedtea-8
11163 #:test-exclude
11164 (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java"
11165 "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java"
11166 "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java")
11167 #:phases
11168 (modify-phases %standard-phases
11169 (add-before 'build 'fix-source
11170 (lambda _
11171 (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/"))
11172 ;; org.apache.xbean.asm6 is actually repackaged java-asm
11173 (substitute* (string-append dir "XbeanAsmParameterNameLoader.java")
11174 (("org.apache.xbean.asm5") "org.objectweb.asm"))
02ed96dc
JL
11175 #t)))
11176 (replace 'install (install-from-pom "xbean-reflect/pom.xml")))))
78745d33
JL
11177 (inputs
11178 `(("asm" ,java-asm)
11179 ("log4j" ,java-log4j-api)
11180 ("log4j-1.2" ,java-log4j-1.2-api)
11181 ("log4j-core" ,java-log4j-core)
11182 ("logging" ,java-commons-logging-minimal)))
02ed96dc
JL
11183 (propagated-inputs
11184 `(("java-geronimo-parent-pom" ,java-geronimo-parent-pom)))
78745d33
JL
11185 (native-inputs
11186 `(("junit" ,java-junit)))
11187 (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/")
11188 (synopsis "Dependency injection helper")
11189 (description "Xbean-reflect provides very flexible ways to create objects
11190and graphs of objects for dependency injection frameworks")
11191 (license license:asl2.0)))
09c44196 11192
02ed96dc
JL
11193(define java-geronimo-genesis-2.1
11194 (package
11195 (name "java-geronimo-genesis")
11196 (version "2.1")
11197 (source (origin
11198 (method svn-fetch)
11199 (uri (svn-reference
11200 (url (string-append "https://svn.apache.org/repos/asf/"
11201 "geronimo/genesis/tags/genesis-"
11202 version))
11203 (revision 1807396)))
11204 (file-name (string-append name "-" version "-source"))
11205 (sha256
11206 (base32
11207 "119yn795jvnjf52si84q192s8wag1k013iabg78b7wnadssnnh31"))))
11208 (build-system ant-build-system)
11209 (arguments
11210 `(#:tests? #f
11211 #:phases
11212 (modify-phases %standard-phases
11213 (delete 'configure)
11214 (delete 'build)
11215 (replace 'install
11216 (install-pom-file "pom.xml"))
11217 (add-after 'install 'install-enforcer-rules
11218 (install-pom-file "genesis-enforcer-rules/pom.xml"))
11219 (add-after 'install 'install-flava
11220 (install-pom-file "genesis-default-flava/pom.xml"))
11221 (add-after 'install 'install-packaging
11222 (install-pom-file "genesis-packaging/pom.xml"))
11223 (add-after 'install-flava 'install-flava-java4
11224 (install-pom-file "genesis-default-flava/genesis-java1.4-flava/pom.xml"))
11225 (add-after 'install-flava 'install-flava-java5
11226 (install-pom-file "genesis-default-flava/genesis-java5-flava/pom.xml"))
11227 (add-after 'install-flava 'install-flava-java6
11228 (install-pom-file "genesis-default-flava/genesis-java6-flava/pom.xml")))))
11229 (propagated-inputs
11230 `(("apache-parent-pom" ,apache-parent-pom-13)))
11231 (home-page "https://geronimo.apache.org")
11232 (synopsis "Collection of maven POM files for the Geronimo project")
11233 (description "Apache Geronimo is a server runtime. This package contains
11234only pom files used by other components in the Geronimo project.")
11235 (license license:asl2.0)))
11236
11237(define java-geronimo-parent-pom
11238 (package
11239 (inherit java-geronimo-xbean-reflect)
11240 (name "java-geronimo-parent-pom")
11241 (arguments
11242 `(#:tests? #f
11243 #:phases
11244 (modify-phases %standard-phases
11245 (delete 'configure)
11246 (delete 'build)
11247 (replace 'install
11248 (install-pom-file "pom.xml")))))
11249 (propagated-inputs
11250 `(("java-geronimo-genesis" ,java-geronimo-genesis-2.1)))))
11251
3fda539b
JL
11252(define-public java-geronimo-xbean-bundleutils
11253 (package
11254 (inherit java-geronimo-xbean-reflect)
11255 (name "java-geronimo-xbean-bundleutils")
11256 (arguments
11257 `(#:jar-name "geronimo-xbean-bundleutils.jar"
11258 #:source-dir "xbean-bundleutils/src/main/java"
11259 #:test-dir "xbean-bundleutils/src/test"
11260 #:phases
11261 (modify-phases %standard-phases
11262 (add-before 'build 'fix-java
11263 (lambda _
11264 ;; We use a more recent version of osgi, so this file requires
11265 ;; more interface method implementations.
11266 (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java"
11267 (("import org.osgi.framework.ServiceRegistration;")
11268 "import org.osgi.framework.ServiceRegistration;
11269import org.osgi.framework.ServiceFactory;
11270import java.util.Collection;
11271import org.osgi.framework.ServiceObjects;")
11272 (("public Bundle getBundle\\(\\)")
11273 "@Override
11274public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) {
11275 throw new UnsupportedOperationException();
11276}
11277@Override
11278public <S> ServiceRegistration<S> registerService(Class<S> clazz,
11279 ServiceFactory<S> factory, Dictionary<String, ?> properties) {
11280 throw new UnsupportedOperationException();
11281}
11282public Bundle getBundle()"))
11283 #t)))))
11284 (inputs
11285 `(("java-slf4j" ,java-slf4j-api)
11286 ("java-asm" ,java-asm)
11287 ("java-osgi-framework" ,java-osgi-framework)
11288 ("java-eclipse-osgi" ,java-eclipse-osgi)
11289 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)))))
6671d6a1 11290
0cb9ce32
JL
11291(define-public java-geronimo-xbean-asm-util
11292 (package
11293 (inherit java-geronimo-xbean-reflect)
11294 (name "java-geronimo-xbean-asm-util")
11295 (arguments
11296 `(#:jar-name "geronimo-xbean-asm-util.jar"
11297 #:source-dir "xbean-asm-util/src/main/java"
11298 #:tests? #f)); no tests
11299 (inputs
11300 `(("java-asm" ,java-asm)))
11301 (native-inputs '())))
6671d6a1 11302
8d510f65
JL
11303(define-public java-geronimo-xbean-finder
11304 (package
11305 (inherit java-geronimo-xbean-reflect)
11306 (name "java-geronimo-xbean-finder")
11307 (arguments
11308 `(#:jar-name "geronimo-xbean-finder.jar"
11309 #:source-dir "xbean-finder/src/main/java"
11310 #:test-dir "xbean-finder/src/test"))
11311 (inputs
11312 `(("java-slf4j-api" ,java-slf4j-api)
11313 ("java-asm" ,java-asm)
11314 ("java-geronimo-xbean-bundleutils" ,java-geronimo-xbean-bundleutils)
11315 ("java-geronimo-xbean-asm-util" ,java-geronimo-xbean-asm-util)
11316 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)
11317 ("java-osgi-framework" ,java-osgi-framework)))
11318 (native-inputs
11319 `(("java-junit" ,java-junit)
11320 ("java-hamcrest-core" ,java-hamcrest-core)))))
3fda539b 11321
09c44196
JL
11322(define-public java-gson
11323 (package
11324 (name "java-gson")
11325 (version "2.8.2")
11326 (source (origin
11327 (method url-fetch)
11328 (uri (string-append "https://github.com/google/gson/archive/"
11329 "gson-parent-" version ".tar.gz"))
11330 (sha256
11331 (base32
11332 "1j4qnp7v046q0k48c4kyf69sxaasx2h949d3cqwsm3kzxms3x0f9"))))
11333 (build-system ant-build-system)
11334 (arguments
11335 `(#:jar-name "gson.jar"
11336 #:source-dir "gson/src/main/java"
11337 #:test-dir "gson/src/test"))
11338 (native-inputs
11339 `(("java-junit" ,java-junit)
11340 ("java-hamcrest-core" ,java-hamcrest-core)))
11341 (home-page "https://github.com/google/gson")
11342 (synopsis "Java serialization/deserialization library from/to JSON")
11343 (description "Gson is a Java library that can be used to convert Java
11344Objects into their JSON representation. It can also be used to convert a JSON
11345string to an equivalent Java object. Gson can work with arbitrary Java objects
11346including pre-existing objects that you do not have source-code of.")
11347 (license license:asl2.0)))
335aa20b
JL
11348
11349(define-public java-hawtjni
11350 (package
11351 (name "java-hawtjni")
11352 (version "1.15")
11353 (source (origin
11354 (method url-fetch)
11355 (uri (string-append "https://github.com/fusesource/hawtjni/archive/"
11356 "hawtjni-project-" version ".tar.gz"))
11357 (sha256
11358 (base32
11359 "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g"))))
11360 (build-system ant-build-system)
11361 (arguments
11362 `(#:jar-name "hawtjni.jar"
11363 #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java"
11364 #:tests? #f; no tests
11365 #:phases
11366 (modify-phases %standard-phases
11367 (add-before 'build 'build-native
11368 (lambda* (#:key inputs #:allow-other-keys)
6338ea9a
RW
11369 (let ((include (string-append "-I" (assoc-ref inputs "jdk") "/include/linux")))
11370 (with-directory-excursion "hawtjni-generator/src/main/resources/"
11371 (invoke "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o"
11372 "-fPIC" "-O2" include)
11373 (invoke "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o"
11374 "-fPIC" "-O2" include)
11375 (invoke "gcc" "-o" "libhawtjni.so" "-shared"
11376 "hawtjni.o" "hawtjni-callback.o")))
11377 #t))
335aa20b
JL
11378 (add-after 'install 'install-native
11379 (lambda* (#:key outputs #:allow-other-keys)
11380 (let* ((out (assoc-ref outputs "out"))
11381 (lib (string-append out "/lib"))
11382 (inc (string-append out "/include")))
335aa20b 11383 (with-directory-excursion "hawtjni-generator/src/main/resources/"
6338ea9a
RW
11384 (install-file "libhawtjni.so" lib)
11385 (install-file "hawtjni.h" inc)))
b777e194
JL
11386 #t))
11387 (add-before 'install 'install-parent
11388 (install-pom-file "pom.xml"))
11389 (replace 'install
11390 (install-from-pom "hawtjni-runtime/pom.xml")))))
335aa20b
JL
11391 (inputs
11392 `(("java-commons-cli" ,java-commons-cli)
11393 ("java-asm" ,java-asm)
11394 ("java-geronimo-xbean-finder" ,java-geronimo-xbean-finder)))
11395 (home-page "https://fusesource.github.io/hawtjni/")
11396 (synopsis "JNI code generator")
11397 (description "HawtJNI is a code generator that produces the JNI code needed
11398to implement Java native methods. It is based on the jnigen code generator
11399that is part of the SWT Tools project.")
11400 (license license:asl2.0)))
d0c62afa
JL
11401
11402(define-public java-jansi-native
11403 (package
11404 (name "java-jansi-native")
11405 (version "1.7")
11406 (source (origin
11407 (method url-fetch)
11408 (uri (string-append "https://github.com/fusesource/jansi-native/"
11409 "archive/jansi-native-" version ".tar.gz"))
11410 (sha256
11411 (base32
11412 "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf"))))
11413 (build-system ant-build-system)
11414 (arguments
11415 `(#:jar-name "jansi-native.jar"
11416 #:source-dir "src/main/java"
11417 #:tests? #f; no tests
11418 #:phases
11419 (modify-phases %standard-phases
11420 (add-before 'build 'build-native
11421 (lambda* (#:key inputs #:allow-other-keys)
11422 ;; there are more required files for windows in windows/
11423 (with-directory-excursion "src/main/native-package/src"
11424 (substitute* "jansi_ttyname.c"
11425 (("#include \"jansi_.*") ""))
e85c1bf6
RW
11426 (invoke "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o"
11427 (string-append "-I" (assoc-ref inputs "java-hawtjni")
11428 "/include")
11429 (string-append "-I" (assoc-ref inputs "jdk")
11430 "/include/linux")
11431 "-fPIC" "-O2")
2c8ac364 11432 (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o"))))
d0c62afa
JL
11433 (add-before 'build 'install-native
11434 (lambda _
11435 (let ((dir (string-append "build/classes/META-INF/native/"
11436 ,(match (%current-system)
11437 ((or "i686-linux" "armhf-linux")
11438 "linux32")
3c4103c8
LC
11439 ((or "x86_64-linux" "aarch64-linux"
11440 "mips64el-linux")
9820d6ed
JN
11441 "linux64")
11442 (_ "unknown-kernel")))))
d0c62afa
JL
11443 (install-file "src/main/native-package/src/libjansi.so" dir))
11444 #t))
11445 (add-after 'install 'install-native
11446 (lambda* (#:key outputs #:allow-other-keys)
d0c62afa
JL
11447 (install-file "src/main/native-package/src/jansi.h"
11448 (string-append (assoc-ref outputs "out") "/include"))
b777e194
JL
11449 #t))
11450 (add-before 'install 'fix-pom
11451 (lambda _
11452 ;; pom contains variables to complete name, but we don't support that
11453 (substitute* "pom.xml"
11454 (("\\$\\{platform\\}") "native"))
11455 #t))
11456 (replace 'install
11457 (install-from-pom "pom.xml")))))
11458 (propagated-inputs
d0c62afa
JL
11459 `(("java-hawtjni" ,java-hawtjni)))
11460 (home-page "https://fusesource.github.io/jansi/")
11461 (synopsis "Native library for jansi")
3d6925ef
RW
11462 (description "This package provides the native library for jansi, a small
11463Java library that allows you to use ANSI escape sequences to format your
11464console output.")
d0c62afa 11465 (license license:asl2.0)))
a87ea1ad
JL
11466
11467(define-public java-jansi
11468 (package
11469 (name "java-jansi")
11470 (version "1.16")
11471 (source (origin
11472 (method url-fetch)
11473 (uri (string-append "https://github.com/fusesource/jansi/archive/"
11474 "jansi-project-" version ".tar.gz"))
11475 (sha256
11476 (base32
11477 "11kh3144i3fzp21dpy8zg52mjmsr214k7km9p8ly0rqk2px0qq2z"))))
11478 (build-system ant-build-system)
11479 (arguments
11480 `(#:jar-name "jansi.jar"
11481 #:source-dir "jansi/src/main/java"
11482 #:test-dir "jansi/src/test"
11483 #:phases
11484 (modify-phases %standard-phases
11485 (add-after 'check 'clear-term
11486 (lambda _
b777e194
JL
11487 (invoke "echo" "-e" "\\e[0m")))
11488 (add-before 'install 'install-parent
11489 (install-pom-file "pom.xml"))
11490 (add-before 'install 'fix-pom
11491 (lambda _
11492 ;; pom adds jansi native versions for different platforms, but we
11493 ;; only need one, so use native instead
11494 (substitute* "jansi/pom.xml"
11495 (("windows32") "native")
11496 (("windows64") "native")
11497 (("osx") "native")
11498 (("linux32") "native")
11499 (("linux64") "native")
11500 (("freebsd32") "native")
11501 (("freebsd64") "native"))
11502 #t))
11503 (replace 'install
11504 (install-from-pom "jansi/pom.xml")))))
11505 (propagated-inputs
a87ea1ad
JL
11506 `(("java-jansi-native" ,java-jansi-native)))
11507 (native-inputs
11508 `(("java-junit" ,java-junit)
11509 ("java-hamcrest-core" ,java-hamcrest-core)))
11510 (home-page "https://fusesource.github.io/jansi/")
11511 (synopsis "Portable ANSI escape sequences")
11512 (description "Jansi is a Java library that allows you to use ANSI escape
11513sequences to format your console output which works on every platform.")
11514 (license license:asl2.0)))
cc061329
JL
11515
11516(define-public java-jboss-el-api-spec
11517 (package
11518 (name "java-jboss-el-api-spec")
11519 (version "3.0")
11520 (source (origin
11521 (method url-fetch)
11522 (uri (string-append "https://github.com/jboss/jboss-el-api_spec/"
11523 "archive/jboss-el-api_" version
11524 "_spec-1.0.7.Final.tar.gz"))
11525 (sha256
11526 (base32
11527 "1j45ljxalwlibxl7g7iv952sjxkw275m8vyxxij8l6wdd5pf0pdh"))))
11528 (build-system ant-build-system)
11529 (arguments
11530 `(#:jar-name "java-jboss-el-api_spec.jar"
51087d51
JL
11531 #:modules ((guix build ant-build-system)
11532 (guix build utils)
11533 (guix build maven pom)
11534 (guix build java-utils)
11535 (sxml simple))
11536 #:phases
11537 (modify-phases %standard-phases
11538 ;; the origin of javax.el:javax.el-api is unknown, so we use this package
11539 ;; instead, which implements the same thing. We override the pom file
11540 ;; to "rename" the package so it can be found by maven.
11541 (add-before 'install 'override-pom
11542 (lambda _
11543 (delete-file "pom.xml")
11544 (with-output-to-file "pom.xml"
11545 (lambda _
11546 (sxml->xml
11547 `(project
11548 (modelVersion "4.0.0")
11549 (name "el-api")
11550 (groupId "javax.el")
11551 (artifactId "javax.el-api")
11552 (version "3.0")))))
11553 #t))
11554 (replace 'install
11555 (install-from-pom "pom.xml")))))
cc061329
JL
11556 (inputs
11557 `(("java-junit" ,java-junit)))
11558 (home-page "https://github.com/jboss/jboss-el-api_spec")
11559 (synopsis "JSR-341 expression language 3.0 API")
11560 (description "This package contains an implementation of the JSR-341
11561specification for the expression language 3.0. It implements an expression
11562language inspired by ECMAScript and XPath. This language is used with
11563JavaServer Pages (JSP).")
11564 ;; Either GPL2 only or CDDL.
11565 (license (list license:gpl2 license:cddl1.1))))
cc03a786
JL
11566
11567(define-public java-jboss-interceptors-api-spec
11568 (package
11569 (name "java-jboss-interceptors-api-spec")
11570 (version "1.2")
11571 (source (origin
11572 (method url-fetch)
11573 (uri (string-append "https://github.com/jboss/jboss-interceptors-api_spec/"
11574 "archive/jboss-interceptors-api_" version
11575 "_spec-1.0.0.Final.tar.gz"))
11576 (sha256
11577 (base32
11578 "0wv8x0jp9a5qxlrgkhb5jdk2gr6vi87b4j4kjb8ryxiy9gn8g51z"))))
11579 (build-system ant-build-system)
11580 (arguments
11581 `(#:jar-name "java-jboss-interceptors-api_spec.jar"
11582 #:jdk ,icedtea-8
11583 #:source-dir "."
51087d51
JL
11584 #:tests? #f; no tests
11585 #:modules ((guix build ant-build-system)
11586 (guix build utils)
11587 (guix build maven pom)
11588 (guix build java-utils)
11589 (sxml simple))
11590 #:phases
11591 (modify-phases %standard-phases
11592 ;; the origin of javax.interceptor:javax.interceptor-api is unknown,
11593 ;; so we use this package instead, which implements the same thing.
11594 ;; We override the pom file to "rename" the package so it can be found
11595 ;; by maven.
11596 (add-before 'install 'override-pom
11597 (lambda _
11598 (delete-file "pom.xml")
11599 (with-output-to-file "pom.xml"
11600 (lambda _
11601 (sxml->xml
11602 `(project
11603 (modelVersion "4.0.0")
11604 (name "interceptor-api")
11605 (groupId "javax.interceptor")
11606 (artifactId "javax.interceptor-api")
11607 (version "3.0")))))
11608 #t))
11609 (replace 'install
11610 (install-from-pom "pom.xml")))))
cc03a786
JL
11611 (home-page "https://github.com/jboss/jboss-interceptors-api_spec")
11612 (synopsis "Interceptors 1.2 API classes from JSR 318")
11613 (description "Java-jboss-interceptors-api-spec implements the Interceptors
11614API. Interceptors are used to interpose on business method invocations and
11615specific events.")
11616 ;; Either GPL2 only or CDDL.
11617 (license (list license:gpl2 license:cddl1.1))))
a10a451c
JL
11618
11619(define-public java-cdi-api
11620 (package
11621 (name "java-cdi-api")
11622 (version "2.0")
11623 (source (origin
11624 (method url-fetch)
11625 (uri (string-append "https://github.com/cdi-spec/cdi/archive/"
11626 version ".tar.gz"))
11627 (file-name (string-append name "-" version ".tar.gz"))
11628 (sha256
11629 (base32
11630 "1iv8b8bp07c5kmqic14jsr868vycjv4qv02lf3pkgp9z21mnfg5y"))))
11631 (build-system ant-build-system)
11632 (arguments
11633 `(#:source-dir "api/src/main/java"
11634 #:jar-name "java-cdi-api.jar"
11635 #:test-dir "api/src/test"
11636 #:jdk ,icedtea-8
51087d51
JL
11637 #:tests? #f; Tests fail because we don't have a CDI provider yet
11638 #:phases
11639 (modify-phases %standard-phases
11640 (replace 'install
11641 (install-from-pom "api/pom.xml")))))
11642 (propagated-inputs
a10a451c
JL
11643 `(("java-javax-inject" ,java-javax-inject)
11644 ("java-jboss-el-api-spec" ,java-jboss-el-api-spec)
51087d51
JL
11645 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)
11646 ("java-weld-parent-pom" ,java-weld-parent-pom)))
a10a451c
JL
11647 (native-inputs
11648 `(("java-testng" ,java-testng)
11649 ("java-hamcrest-core" ,java-hamcrest-core)))
11650 (home-page "http://cdi-spec.org/")
11651 (synopsis "Contexts and Dependency Injection APIs")
11652 (description "Java-cdi-api contains the required APIs for Contexts and
11653Dependency Injection (CDI).")
11654 (license license:asl2.0)))
d57fd728
JL
11655
11656(define-public java-joda-convert
11657 (package
11658 (name "java-joda-convert")
11659 (version "1.9.2")
11660 (source (origin
11661 (method url-fetch)
11662 (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v"
11663 version ".tar.gz"))
11664 (file-name (string-append name "-" version ".tar.gz"))
11665 (sha256
11666 (base32
11667 "0vp346xz7dh9br4q7xazhc7hvzf76a6hf95fki9bg67q5jr0kjh7"))))
11668 (build-system ant-build-system)
11669 (arguments
11670 `(#:jar-name (string-append ,name "-" ,version ".jar")
11671 #:source-dir "src/main/java"
11672 #:test-include (list "**/Test*.java")
11673 ;; Contains only interfaces and base classes (no test)
11674 #:test-exclude (list "**/test*/**.java")))
11675 (inputs
11676 `(("java-guava" ,java-guava)))
11677 (native-inputs
11678 `(("java-junit" ,java-junit)
11679 ("java-hamcrest-core" ,java-hamcrest-core)))
c82ddf33 11680 (home-page "https://www.joda.org/joda-convert/")
d57fd728
JL
11681 (synopsis "Conversion between Objects and Strings")
11682 (description "Joda-Convert provides a small set of classes to aid
11683conversion between Objects and Strings. It is not intended to tackle the
11684wider problem of Object to Object transformation.")
11685 (license license:asl2.0)))
0158ea8a
JL
11686
11687(define-public java-joda-time
11688 (package
11689 (name "java-joda-time")
11690 (version "2.9.9")
11691 (source (origin
11692 (method url-fetch)
11693 (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v"
11694 version ".tar.gz"))
11695 (file-name (string-append name "-" version ".tar.gz"))
11696 (sha256
11697 (base32
11698 "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1"))))
11699 (build-system ant-build-system)
11700 (arguments
11701 `(#:jar-name "java-joda-time.jar"
11702 #:source-dir "src/main/java"
11703 #:test-include (list "**/Test*.java")
11704 ;; There is no runnable test in these files
11705 #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java")
11706 #:phases
11707 (modify-phases %standard-phases
11708 (add-after 'build 'build-resources
11709 (lambda _
11710 (mkdir-p "build/classes/org/joda/time/tz/data")
11711 (mkdir-p "build/classes/org/joda/time/format")
6d0368eb
JL
11712 ;; This will produce the following exception:
11713 ;; java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap"
11714 ;; which is normal, because it doesn't exist yet. It still generates
11715 ;; the same file as in the binary one can find on maven.
11716 (invoke "java" "-cp"
11717 (string-append "build/classes:" (getenv "CLASSPATH"))
11718 "org.joda.time.tz.ZoneInfoCompiler"
11719 "-src" "src/main/java/org/joda/time/tz/src"
11720 "-dst" "build/classes/org/joda/time/tz/data"
11721 "africa" "antarctica" "asia" "australasia"
11722 "europe" "northamerica" "southamerica"
11723 "pacificnew" "etcetera" "backward" "systemv")
0158ea8a
JL
11724 (for-each (lambda (f)
11725 (copy-file f (string-append
11726 "build/classes/org/joda/time/format/"
11727 (basename f))))
11728 (find-files "src/main/java/org/joda/time/format" ".*.properties"))
11729 #t))
11730 (add-before 'install 'regenerate-jar
11731 (lambda _
11732 ;; We need to regenerate the jar file to add generated data.
11733 (delete-file "build/jar/java-joda-time.jar")
6d0368eb 11734 (invoke "ant" "jar")))
0158ea8a
JL
11735 (add-before 'check 'copy-test-resources
11736 (lambda _
11737 (mkdir-p "build/test-classes/org/joda/time/tz/data")
11738 (copy-file "src/test/resources/tzdata/ZoneInfoMap"
11739 "build/test-classes/org/joda/time/tz/data/ZoneInfoMap")
11740 (copy-recursively "src/test/resources" "build/test-classes")
11741 #t)))))
11742 (inputs
11743 `(("java-joda-convert" ,java-joda-convert)))
11744 (native-inputs
11745 `(("java-junit" ,java-junit)
11746 ("java-hamcrest-core" ,java-hamcrest-core)
11747 ("tzdata" ,tzdata)))
14544d2f 11748 (home-page "https://www.joda.org/joda-time/")
0158ea8a
JL
11749 (synopsis "Replacement for the Java date and time classes")
11750 (description "Joda-Time is a replacement for the Java date and time
11751classes prior to Java SE 8.")
11752 (license license:asl2.0)))
6d0368eb
JL
11753
11754(define-public java-xerces
11755 (package
11756 (name "java-xerces")
695fb93e 11757 (version "2.12.1")
6d0368eb
JL
11758 (source
11759 (origin
11760 (method url-fetch)
11761 (uri (string-append "mirror://apache/xerces/j/source/"
11762 "Xerces-J-src." version ".tar.gz"))
11763 (sha256
695fb93e 11764 (base32 "0494kq36gw3nah19ifb720vwxbpg4ww0k6m3zq6wyanw6a083p6s"))
6d0368eb
JL
11765 (patches (search-patches
11766 "java-xerces-xjavac_taskdef.patch"
11767 "java-xerces-build_dont_unzip.patch"
11768 "java-xerces-bootclasspath.patch"))))
11769 (build-system ant-build-system)
11770 (arguments
11771 `(#:tests? #f;; Test files are not present
11772 #:test-target "test"
11773 #:jdk ,icedtea-8
11774 #:phases
11775 (modify-phases %standard-phases
11776 (add-after 'unpack 'create-build.properties
11777 (lambda* (#:key inputs #:allow-other-keys)
11778 (let ((jaxp (assoc-ref inputs "java-jaxp"))
11779 (resolver (assoc-ref inputs "java-apache-xml-commons-resolver")))
11780 (with-output-to-file "build.properties"
11781 (lambda _
11782 (format #t
11783 "jar.jaxp = ~a/share/java/jaxp.jar~@
11784 jar.apis-ext = ~a/share/java/jaxp.jar~@
11785 jar.resolver = ~a/share/java/xml-resolver.jar~%"
11786 jaxp jaxp resolver)))
11787 ;; Make xerces use our version of jaxp in tests
11788 (substitute* "build.xml"
11789 (("xml-apis.jar")
11790 (string-append jaxp "/share/java/jaxp.jar"))
11791 (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}")
11792 "${jar.apis}")))
11793 #t))
11794 (replace 'install (install-jars "build")))))
11795 (inputs
11796 `(("java-apache-xml-commons-resolver" ,java-apache-xml-commons-resolver)
11797 ("java-jaxp" ,java-jaxp)))
11798 (home-page "https://xerces.apache.org/xerces2-j/")
11799 (synopsis "Validating XML parser for Java with DOM level 3 support")
11800 (description "The Xerces2 Java parser is the reference implementation of
11801XNI, the Xerces Native Interface, and also a fully conforming XML Schema
11802processor.
11803
11804Xerces2-J supports the following standards and APIs:
11805
11806@itemize
11807@item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation
11808@item Namespaces in XML Recommendation
11809@item Document Object Model (DOM) Level 2 Core, Events, and Traversal and
11810 Range Recommendations
11811@item Simple API for XML (SAX) 2.0.1 Core and Extension
11812@item Java APIs for XML Processing (JAXP) 1.2.01
11813@item XML Schema 1.0 Structures and Datatypes Recommendations
11814@item Experimental implementation of the Document Object Model (DOM) Level 3
11815 Core and Load/Save Working Drafts
11816@item Provides a partial implementation of the XML Inclusions (XInclude) W3C
11817 Candidate Recommendation
11818@end itemize
11819
11820Xerces is now able to parse documents written according to the XML 1.1
11821Candidate Recommendation, except that it does not yet provide an option to
11822enable normalization checking as described in section 2.13 of this
11823specification. It also handles namespaces according to the XML Namespaces 1.1
11824Candidate Recommendation, and will correctly serialize XML 1.1 documents if
11825the DOM level 3 load/save API's are in use.")
11826 (license license:asl2.0)))
e06bf428 11827
ae6922ed
DM
11828(define-public java-jakarta-regexp
11829 (package
11830 (name "java-jakarta-regexp")
11831 (version "1.5")
11832 (source
11833 (origin
11834 (method url-fetch)
11835 (uri (string-append
11836 "https://archive.apache.org/dist/jakarta/regexp/jakarta-regexp-"
11837 version ".tar.gz"))
11838 (sha256
11839 (base32
11840 "0zg9rmyif48dck0cv6ynpxv23mmcsx265am1fnnxss7brgw0ms3r"))))
11841 (build-system ant-build-system)
11842 (arguments
11843 `(#:test-target "test"
11844 #:phases
11845 (modify-phases %standard-phases
11846 (replace 'install
11847 (lambda* (#:key outputs #:allow-other-keys)
11848 (let* ((out (assoc-ref outputs "out"))
11849 (out-share (string-append out "/share/java")))
11850 (mkdir-p out-share)
11851 (for-each (lambda (name)
11852 (install-file name out-share))
11853 (find-files "build" "^jakarta-regexp-.*\\.jar$"))
11854 #t))))))
11855 (home-page "https://attic.apache.org/projects/jakarta-regexp.html")
11856 (synopsis "Regular expression parser generator for Java.")
11857 (description "@code{jakarta-regexp} is an old regular expression parser
11858generator for Java.")
11859 (license license:asl2.0)))
11860
e06bf428
JL
11861(define-public java-jline
11862 (package
11863 (name "java-jline")
11864 (version "1.0")
11865 (source (origin
11866 (method url-fetch)
11867 (uri (string-append "https://github.com/jline/jline1/archive/jline-"
11868 version ".tar.gz"))
11869 (sha256
11870 (base32
11871 "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir"))))
11872 (build-system ant-build-system)
11873 (arguments
11874 `(#:jar-name "jline.jar"
11875 #:source-dir "src/main/java"
11876 #:test-dir "src/test"
11877 #:phases
11878 (modify-phases %standard-phases
11879 (add-before 'build 'copy-resources
11880 (lambda _
11881 (copy-recursively "src/main/resources" "build/classes")
11882 #t)))))
11883 (native-inputs
11884 `(("java-junit" ,java-junit)))
11885 (home-page "https://jline.github.io")
11886 (synopsis "Console input handling library")
11887 (description "JLine is a Java library for handling console input. It is
11888similar in functionality to BSD editline and GNU readline but with additional
11889features that bring it on par with the Z shell line editor.")
11890 (license license:bsd-3)))
7ac4f054 11891
49d74311
JL
11892(define-public java-jline-2
11893 (package
11894 (inherit java-jline)
11895 (version "2.14.5")
11896 (source (origin
11897 (method url-fetch)
11898 (uri (string-append "https://github.com/jline/jline2/archive/jline-"
11899 version ".tar.gz"))
11900 (sha256
11901 (base32
11902 "1c6qa26mf0viw8hg4jnv72s7i1qb1gh1l8rrzcdvqhqhx82rkdlf"))))
11903 (arguments
11904 `(#:jdk ,icedtea-8
11905 ,@(package-arguments java-jline)))
11906 (inputs
11907 `(("java-jansi" ,java-jansi)
11908 ("java-jansi-native" ,java-jansi-native)))
11909 (native-inputs
11910 `(("java-powermock-modules-junit4" ,java-powermock-modules-junit4)
11911 ("java-powermock-modules-junit4-common" ,java-powermock-modules-junit4-common)
11912 ("java-powermock-api-easymock" ,java-powermock-api-easymock)
11913 ("java-powermock-api-support" ,java-powermock-api-support)
11914 ("java-powermock-core" ,java-powermock-core)
11915 ("java-powermock-reflect" ,java-powermock-reflect)
11916 ("java-easymock" ,java-easymock)
11917 ("java-jboss-javassist" ,java-jboss-javassist)
11918 ("java-objenesis" ,java-objenesis)
11919 ("java-asm" ,java-asm)
11920 ("java-hamcrest-core" ,java-hamcrest-core)
11921 ("java-cglib" ,java-cglib)
11922 ("java-junit" ,java-junit)
11923 ("java-hawtjni" ,java-hawtjni)))))
11924
7ac4f054
JL
11925(define-public java-xmlunit
11926 (package
11927 (name "java-xmlunit")
11928 (version "2.5.1")
11929 (source (origin
11930 (method url-fetch)
11931 (uri (string-append "https://github.com/xmlunit/xmlunit/archive/v"
11932 version ".tar.gz"))
11933 (file-name (string-append name "-" version ".tar.gz"))
11934 (sha256
11935 (base32
11936 "035rivlnmwhfqj0fzviciv0bkh1h95ps1iwnh2kjcvdbk5nccm4z"))))
11937 (build-system ant-build-system)
11938 (arguments
11939 `(#:jar-name "java-xmlunit.jar"
11940 #:source-dir "xmlunit-core/src/main/java"
11941 #:test-dir "xmlunit-core/src/test"
11942 #:phases
11943 (modify-phases %standard-phases
11944 (add-before 'check 'copy-test-resources
11945 (lambda* (#:key inputs #:allow-other-keys)
11946 (copy-recursively (assoc-ref inputs "resources") "../test-resources")
11947 #t)))))
11948 (native-inputs
11949 `(("java-junit" ,java-junit)
11950 ("java-mockito-1" ,java-mockito-1)
11951 ("java-hamcrest-all" ,java-hamcrest-all)
11952 ("java-objenesis" ,java-objenesis)
11953 ("java-asm" ,java-asm)
11954 ("java-cglib" ,java-cglib)
11955 ("resources"
11956 ,(origin
11957 (method git-fetch)
11958 (uri (git-reference
b0e7b699 11959 (url "https://github.com/xmlunit/test-resources")
7ac4f054
JL
11960 (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec")))
11961 (file-name "java-xmlunit-test-resources")
11962 (sha256
11963 (base32
11964 "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr"))))))
c4944d6c 11965 (home-page "https://www.xmlunit.org/")
7ac4f054
JL
11966 (synopsis "XML output testing")
11967 (description "XMLUnit provides you with the tools to verify the XML you
11968emit is the one you want to create. It provides helpers to validate against
11969an XML Schema, assert the values of XPath queries or compare XML documents
11970against expected outcomes.")
11971 (license license:asl2.0)))
73a1f10a
JL
11972
11973(define-public java-xmlunit-legacy
11974 (package
11975 (inherit java-xmlunit)
11976 (name "java-xmlunit-legacy")
11977 (arguments
11978 `(#:jar-name "java-xmlunit-legacy.jar"
11979 #:source-dir "xmlunit-legacy/src/main/java"
11980 #:test-dir "xmlunit-legacy/src/test"))
11981 (inputs
11982 `(("java-xmlunit" ,java-xmlunit)
11983 ("java-junit" ,java-junit)))
11984 (native-inputs
11985 `(("java-mockito-1" ,java-mockito-1)))))
93abc975 11986
f5cc5ead
JL
11987(define-public java-xmlunit-matchers
11988 (package
11989 (inherit java-xmlunit)
11990 (name "java-xmlunit-matchers")
11991 (arguments
11992 `(#:jar-name "java-xmlunit-matchers.jar"
11993 #:source-dir "xmlunit-matchers/src/main/java"
11994 #:test-dir "xmlunit-matchers/src/test"
11995 #:test-exclude
11996 ;; Cannot open xsd for http://www.xmlunit.org/test-support/Book.xsd
11997 (list "**/ValidationMatcherTest.java")
11998 #:phases
11999 (modify-phases %standard-phases
12000 (add-before 'build 'copy-test-class
12001 (lambda _
12002 (copy-file "xmlunit-core/src/test/java/org/xmlunit/TestResources.java"
12003 "xmlunit-matchers/src/test/java/org/xmlunit/TestResources.java")
12004 #t))
12005 (add-before 'build 'fix-test-resources-path
12006 (lambda _
12007 (substitute* (find-files "xmlunit-matchers/src/test" ".*.java")
12008 (("../test-resources") "test-resources"))
12009 #t))
12010 (add-before 'check 'copy-test-resources
12011 (lambda* (#:key inputs #:allow-other-keys)
12012 (copy-recursively (assoc-ref inputs "resources") "test-resources")
12013 #t)))))
12014 (inputs
12015 `(("java-xmlunit" ,java-xmlunit)
12016 ("java-junit" ,java-junit)))))
12017
93abc975
RW
12018(define-public java-openchart2
12019 (package
12020 (name "java-openchart2")
12021 (version "1.4.3")
12022 (source (origin
12023 (method url-fetch)
12024 (uri (string-append "http://download.approximatrix.com/openchart2/"
12025 "openchart2-" version ".source.zip"))
12026 (sha256
12027 (base32
12028 "1xq96zm5r02n1blja0072jmmsifmxc40lbyfbnmcnr6mw42frh4g"))))
12029 (build-system ant-build-system)
12030 (arguments
12031 `(#:test-target "test"
12032 #:phases
12033 (modify-phases %standard-phases
12034 (add-after 'unpack 'fix-junit-errors
12035 (lambda _
12036 (with-directory-excursion "unittest/src/com/approximatrix/charting/"
12037 (substitute* '("coordsystem/ticklocator/NumericXTickLocatorTest.java"
12038 "coordsystem/ticklocator/NumericYTickLocatorTest.java"
12039 "coordsystem/ticklocator/ObjectXTickLocatorTest.java"
12040 "model/DefaultChartDataModelConstraintsTest.java"
12041 "model/MultiScatterDataModelConstraintsTest.java"
12042 "model/threedimensional/DotPlotDataModelConstraintsTest.java")
12043 (("(assertEquals[^;]+);" before _)
12044 (string-append (string-drop-right before 2) ", 1E-6);"))))
12045 #t))
12046 (replace 'install (install-jars ".")))))
12047 (native-inputs
12048 `(("unzip" ,unzip)
12049 ("java-junit" ,java-junit)
12050 ("java-hamcrest-core" ,java-hamcrest-core)))
a809d632 12051 (home-page "https://approximatrix.com/products/openchart2/")
93abc975
RW
12052 (synopsis "Simple plotting for Java")
12053 (description "Openchart2 provides a simple, yet powerful, interface for
12054Java programmers to create two-dimensional charts and plots. The library
12055features an assortment of graph styles, including advanced scatter plots, bar
12056graphs, and pie charts.")
12057 (license license:lgpl2.1+)))
5f5b31c6
JL
12058
12059(define-public java-commons-httpclient
12060 (package
12061 (name "java-commons-httpclient")
12062 (version "3.1")
12063 (source (origin
12064 (method url-fetch)
9a01efa2 12065 (uri (string-append "mirror://apache/httpcomponents/"
5f5b31c6
JL
12066 "commons-httpclient/source/commons-httpclient-"
12067 version "-src.tar.gz"))
12068 (sha256
12069 (base32
12070 "1wlpn3cfy3d4inxy6g7wxcsa8p7sshn6aldk9y4ia3lb879rd97r"))))
12071 (build-system ant-build-system)
12072 (arguments
12073 `(#:build-target "compile"
12074 #:test-target "test"
12075 #:tests? #f; requires junit-textui (junit 3)
12076 #:phases
12077 (modify-phases %standard-phases
12078 (add-before 'build 'fix-accent
12079 (lambda _
12080 (for-each (lambda (file)
12081 (with-fluids ((%default-port-encoding "ISO-8859-1"))
12082 (substitute* file
12083 (("\\* @author Ortwin .*") "* @author Ortwin Glueck\n"))))
12084 '("src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java"
12085 "src/examples/TrivialApp.java" "src/examples/ClientApp.java"
12086 "src/test/org/apache/commons/httpclient/TestHttps.java"
2c8ac364
MW
12087 "src/test/org/apache/commons/httpclient/TestURIUtil2.java"))
12088 #t))
5f5b31c6
JL
12089 (replace 'install
12090 (lambda* (#:key outputs #:allow-other-keys)
12091 (invoke "ant" "dist"
12092 (string-append "-Ddist.home=" (assoc-ref outputs "out")
12093 "/share/java"))
12094 #t)))))
12095 (propagated-inputs
12096 `(("java-commons-logging" ,java-commons-logging-minimal)
12097 ("java-commons-codec" ,java-commons-codec)))
12098 (home-page "https://hc.apache.org")
12099 (synopsis "HTTP/1.1 compliant HTTP agent implementation")
12100 (description "This package contains an HTTP/1.1 compliant HTTP agent
12101implementation. It also provides reusable components for client-side
12102authentication, HTTP state management, and HTTP connection management.")
12103 (license license:asl2.0)))
5fe981dc
JL
12104
12105(define-public java-commons-vfs
12106 (package
12107 (name "java-commons-vfs")
12108 (version "2.2")
12109 (source (origin
12110 (method url-fetch)
12111 (uri (string-append "mirror://apache/commons/vfs/source/"
12112 "commons-vfs2-distribution-" version "-src.tar.gz"))
12113 (file-name (string-append name "-" version ".tar.gz"))
12114 (sha256
12115 (base32
12116 "1cnq1iaghbp4cslpnvwbp83i5v234x87irssqynhwpfgw7caf1s3"))
12117 (modules '((guix build utils)))
12118 (snippet
12119 '(begin
12120 (for-each delete-file
12121 (find-files "." "\\.jar$"))
12122 #t))))
12123 (build-system ant-build-system)
12124 (arguments
12125 `(#:jar-name "commons-vfs.jar"
12126 #:source-dir "commons-vfs2/src/main/java"
12127 #:test-dir "commons-vfs2/src/test"
12128 ; FIXME: tests depend on many things: apache sshd, hadoop, ftpserver, ...
12129 #:tests? #f
12130 #:phases
12131 (modify-phases %standard-phases
12132 (add-before 'build 'remove-hadoop-and-webdav
12133 ; Remove these files as they are not required and depend on difficult
12134 ; packages.
12135 (lambda _
12136 (for-each delete-file-recursively
12137 '("commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/webdav"
2c8ac364
MW
12138 "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs"))
12139 #t)))))
5fe981dc
JL
12140 (inputs
12141 `(("java-commons-collections4" ,java-commons-collections4)
12142 ("java-commons-compress" ,java-commons-compress)
12143 ("java-commons-httpclient" ,java-commons-httpclient)
12144 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
12145 ("java-commons-net" ,java-commons-net)
12146 ("java-jsch" ,java-jsch)))
4f236f84 12147 (home-page "https://commons.apache.org/proper/commons-vfs/")
52beae7b 12148 (synopsis "Java file system library")
5fe981dc
JL
12149 (description "Commons VFS provides a single API for accessing various
12150different file systems. It presents a uniform view of the files from various
12151different sources, such as the files on local disk, on an HTTP server, or
12152inside a Zip archive.")
12153 (license license:asl2.0)))
f7b512c0
JL
12154
12155(define-public java-jakarta-oro
12156 (package
12157 (name "java-jakarta-oro")
12158 (version "2.0.8")
12159 (source (origin
12160 (method url-fetch)
9a01efa2 12161 (uri (string-append "mirror://apache/jakarta/oro/"
f7b512c0
JL
12162 "jakarta-oro-" version ".tar.gz"))
12163 (sha256
12164 (base32
12165 "0rpmnsskiwmsy8r0sckz5n5dbvh3vkxx8hpm177c754r8xy3qksc"))
12166 (modules '((guix build utils)))
12167 (snippet
12168 `(begin
12169 (delete-file (string-append "jakarta-oro-" ,version ".jar"))
12170 #t))))
12171 (build-system ant-build-system)
12172 (arguments
12173 `(#:build-target "package"
c1b11a52 12174 #:make-flags (list "-DDATE" "(no recorded date for reproducibility)")
f7b512c0
JL
12175 #:tests? #f; tests are run as part of the build process
12176 #:phases
12177 (modify-phases %standard-phases
12178 (replace 'install
12179 (install-jars ,(string-append "jakarta-oro-" version))))))
12180 (home-page "https://jakarta.apache.org/oro/")
12181 (synopsis "Text-processing for Java")
12182 (description "The Jakarta-ORO Java classes are a set of text-processing
12183Java classes that provide Perl5 compatible regular expressions, AWK-like
12184regular expressions, glob expressions, and utility classes for performing
12185substitutions, splits, filtering filenames, etc. This library is the successor
12186of the OROMatcher, AwkTools, PerlTools, and TextTools libraries originally
12187from ORO, Inc.")
12188 (license license:asl1.1)))
a970288c
JL
12189
12190(define-public java-native-access
12191 (package
12192 (name "java-native-access")
12193 (version "4.5.1")
12194 (source (origin
12195 (method url-fetch)
12196 (uri (string-append "https://github.com/java-native-access/jna/"
12197 "archive/" version ".tar.gz"))
12198 (file-name (string-append name "-" version ".tar.gz"))
12199 (sha256
12200 (base32
12201 "0zrpzkib6b905i018a9pqlzkqinphywr6y4jwv6mwp63jjqvqkd9"))
12202 (modules '((guix build utils)))
12203 (snippet
12204 `(begin
12205 (for-each delete-file (find-files "." ".*.jar"))
12206 (delete-file-recursively "native/libffi")
12207 (delete-file-recursively "dist")
12208 #t))))
12209 (build-system ant-build-system)
12210 (arguments
12211 `(#:tests? #f; FIXME: tests require reflections.jar
12212 #:test-target "test"
12213 #:make-flags (list "-Ddynlink.native=true")
12214 #:phases
12215 (modify-phases %standard-phases
12216 (add-before 'build 'fix-build.xml
12217 (lambda* (#:key inputs #:allow-other-keys)
12218 (substitute* "build.xml"
12219 ;; Since we removed the bundled ant.jar, give the correct path
12220 (("lib/ant.jar") (string-append (assoc-ref inputs "ant") "/lib/ant.jar"))
12221 ;; We removed generated native libraries. We can only rebuild one
12222 ;; so don't fail if we can't find a native library for another architecture.
12223 (("zipfileset") "zipfileset erroronmissingarchive=\"false\""))
12224 ;; Copy test dependencies
fff4fcc4 12225 (copy-file (car (find-files (assoc-ref inputs "java-junit") "jar$"))
a970288c 12226 "lib/junit.jar")
fff4fcc4
JL
12227 (copy-file (car (find-files (assoc-ref inputs "java-hamcrest-core")
12228 "jar$"))
a970288c
JL
12229 "lib/hamcrest-core.jar")
12230 ;; FIXME: once reflections.jar is built, copy it to lib/test.
12231 #t))
12232 (add-before 'build 'build-native
12233 (lambda _
12234 (invoke "ant" "-Ddynlink.native=true" "native")
12235 #t))
12236 (replace 'install
12237 (install-jars "build")))))
12238 (inputs
12239 `(("libffi" ,libffi)
12240 ("libx11" ,libx11)
12241 ("libxt" ,libxt)))
12242 (native-inputs
12243 `(("java-junit" ,java-junit)
12244 ("java-hamcrest-core" ,java-hamcrest-core)))
12245 (home-page "https://github.com/java-native-access/jna")
12246 (synopsis "Access to native shared libraries from Java")
12247 (description "JNA provides Java programs easy access to native shared
12248libraries without writing anything but Java code - no JNI or native code is
12249required. JNA allows you to call directly into native functions using natural
12250Java method invocation.")
12251 ;; Java Native Access project (JNA) is dual-licensed under 2
12252 ;; alternative Free licenses: LGPL 2.1 or later and Apache License 2.0.
12253 (license (list
12254 license:asl2.0
12255 license:lgpl2.1+))))
cfb55cfc
JL
12256
12257(define-public java-native-access-platform
12258 (package
12259 (inherit java-native-access)
12260 (name "java-native-access-platform")
12261 (arguments
12262 `(#:test-target "test"
12263 #:tests? #f; require jna-test.jar
12264 #:phases
12265 (modify-phases %standard-phases
12266 (add-before 'build 'chdir
12267 (lambda _
12268 (chdir "contrib/platform")
12269 #t))
12270 (add-after 'chdir 'fix-ant
12271 (lambda* (#:key inputs #:allow-other-keys)
12272 (substitute* "nbproject/project.properties"
12273 (("../../build/jna.jar")
12274 (string-append (assoc-ref inputs "java-native-access")
12275 "/share/java/jna.jar"))
12276 (("../../lib/hamcrest-core-.*.jar")
fff4fcc4
JL
12277 (car (find-files (assoc-ref inputs "java-hamcrest-core")
12278 "jar$")))
cfb55cfc 12279 (("../../lib/junit.jar")
fff4fcc4
JL
12280 (car (find-files (assoc-ref inputs "java-junit")
12281 "jar$"))))
cfb55cfc
JL
12282 #t))
12283 (replace 'install
12284 (install-jars "dist")))))
12285 (inputs
12286 `(("java-native-access" ,java-native-access)))
12287 (synopsis "Cross-platform mappings for jna")
7230f6d5 12288 (description "java-native-access-platform has cross-platform mappings
cfb55cfc
JL
12289and mappings for a number of commonly used platform functions, including a
12290large number of Win32 mappings as well as a set of utility classes that
12291simplify native access.")))
470674a5
JL
12292
12293(define-public java-jsch-agentproxy-core
12294 (package
12295 (name "java-jsch-agentproxy-core")
12296 (version "0.0.8")
12297 (source (origin
12298 (method url-fetch)
12299 (uri (string-append "https://github.com/ymnk/jsch-agent-proxy/archive/"
12300 version ".tar.gz"))
12301 (file-name (string-append name "-" version ".tar.gz"))
12302 (sha256
12303 (base32
12304 "02iqg6jbc1kxvfzqcg6wy9ygqxfm82bw5rf6vnswqy4y572niz4q"))))
12305 (build-system ant-build-system)
12306 (arguments
12307 `(#:jar-name "jsch-agentproxy-core.jar"
12308 #:source-dir "jsch-agent-proxy-core/src/main/java"
12309 #:tests? #f)); no tests
12310 (home-page "https://github.com/ymnk/jsch-agent-proxy")
f1d79c97 12311 (synopsis "Core component of the proxy to ssh-agent and Pageant in Java")
470674a5
JL
12312 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12313and Pageant included Putty. It will be easily integrated into JSch, and users
12314will be allowed to use these programs for authentication.")
12315 (license license:bsd-3)))
f1d79c97
JL
12316
12317(define-public java-jsch-agentproxy-sshagent
12318 (package
12319 (inherit java-jsch-agentproxy-core)
12320 (name "java-jsch-agentproxy-sshagent")
12321 (arguments
12322 `(#:jar-name "jsch-agentproxy-sshagent.jar"
12323 #:source-dir "jsch-agent-proxy-sshagent/src/main/java"
12324 #:tests? #f)); no tests
12325 (inputs
12326 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
12327 (synopsis "Proxy to ssh-agent")
12328 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12329and Pageant included in Putty. This component contains the code for a proxy to
12330ssh-agent.")))
f438e638
JL
12331
12332(define-public java-jsch-agentproxy-usocket-jna
12333 (package
12334 (inherit java-jsch-agentproxy-core)
12335 (name "java-jsch-agentproxy-usocket-jna")
12336 (arguments
12337 `(#:jar-name "jsch-agentproxy-usocket-jna.jar"
12338 #:source-dir "jsch-agent-proxy-usocket-jna/src/main/java"
12339 #:tests? #f)); no tests
12340 (inputs
12341 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
12342 ("java-native-access" ,java-native-access)))
12343 (synopsis "USocketFactory implementation using JNA")
12344 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12345and Pageant included in Putty. This component contains an implementation of
12346USocketFactory using @dfn{JNA} (Java Native Access).")))
475225e3
JL
12347
12348(define-public java-jsch-agentproxy-pageant
12349 (package
12350 (inherit java-jsch-agentproxy-core)
12351 (name "java-jsch-agentproxy-pageant")
12352 (arguments
12353 `(#:jar-name "jsch-agentproxy-pageant.jar"
12354 #:source-dir "jsch-agent-proxy-pageant/src/main/java"
12355 #:tests? #f)); no tests
12356 (inputs
12357 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
12358 ("java-native-access" ,java-native-access)
12359 ("java-native-access-platform" ,java-native-access-platform)))
12360 (synopsis "Proxy to pageant")
12361 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12362and Pageant included in Putty. This component contains the code for a proxy to
12363pageant.")))
96d6d9c7
JL
12364
12365(define-public java-jsch-agentproxy-usocket-nc
12366 (package
12367 (inherit java-jsch-agentproxy-core)
12368 (name "java-jsch-agentproxy-usocket-nc")
12369 (arguments
12370 `(#:jar-name "jsch-agentproxy-usocket-nc.jar"
12371 #:source-dir "jsch-agent-proxy-usocket-nc/src/main/java"
12372 #:tests? #f)); no tests
12373 (inputs
12374 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
12375 (synopsis "USocketFactory implementation using netcat")
12376 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12377and Pageant included in Putty. This component contains an implementation of
12378USocketFactory using netcat.")))
5a46b17b
JL
12379
12380(define-public java-jsch-agentproxy-connector-factory
12381 (package
12382 (inherit java-jsch-agentproxy-core)
12383 (name "java-jsch-agentproxy-connector-factory")
12384 (arguments
12385 `(#:jar-name "jsch-agentproxy-connector-factory.jar"
12386 #:source-dir "jsch-agent-proxy-connector-factory/src/main/java"
12387 #:tests? #f)); no tests
12388 (inputs
12389 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
12390 ("java-jsch-agentproxy-sshagent" ,java-jsch-agentproxy-sshagent)
12391 ("java-jsch-agentproxy-usocket-jna" ,java-jsch-agentproxy-usocket-jna)
12392 ("java-jsch-agentproxy-pageant" ,java-jsch-agentproxy-pageant)
12393 ("java-jsch-agentproxy-usocket-nc" ,java-jsch-agentproxy-usocket-nc)))
12394 (synopsis "Connector factory for jsch agent proxy")
12395 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12396and Pageant included in Putty. This component contains a connector factory.")))
b0fbf596
JL
12397
12398(define-public java-jsch-agentproxy-jsch
12399 (package
12400 (inherit java-jsch-agentproxy-core)
12401 (name "java-jsch-agentproxy-jsch")
12402 (arguments
12403 `(#:jar-name "jsch-agentproxy-jsch.jar"
12404 #:source-dir "jsch-agent-proxy-jsch/src/main/java"
12405 #:tests? #f)); no tests
12406 (inputs
12407 `(("java-jsch" ,java-jsch)
12408 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
12409 (synopsis "JSch integration library for agentproxy")
12410 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12411and Pageant included in Putty. This component contains a library to use
12412jsch-agent-proxy with JSch.")))
f1f4a4f0
JL
12413
12414(define-public java-apache-ivy
12415 (package
12416 (name "java-apache-ivy")
12417 (version "2.4.0")
12418 (source (origin
12419 (method url-fetch)
12420 (uri (string-append "mirror://apache//ant/ivy/" version
12421 "/apache-ivy-" version "-src.tar.gz"))
12422 (sha256
12423 (base32
12424 "1xkfn57g2m7l6y0xdq75x5rnrgk52m9jx2xah70g3ggl8750hbr0"))
12425 (patches
12426 (search-patches
12427 "java-apache-ivy-port-to-latest-bouncycastle.patch"))))
12428 (build-system ant-build-system)
12429 (arguments
12430 `(#:jar-name "ivy.jar"
12431 #:tests? #f
12432 #:phases
12433 (modify-phases %standard-phases
12434 (add-before 'build 'remove-example
12435 (lambda _
12436 (delete-file-recursively "src/example")
12437 #t))
12438 (add-before 'build 'copy-resources
12439 (lambda _
12440 (with-directory-excursion "src/java"
12441 (for-each (lambda (file)
12442 (install-file file (string-append "../../build/classes/" (dirname file))))
12443 (append
12444 (find-files "." ".*.css")
12445 (find-files "." ".*.ent")
12446 (find-files "." ".*.html")
12447 (find-files "." ".*.properties")
12448 (find-files "." ".*.xsd")
12449 (find-files "." ".*.xsl")
2c8ac364
MW
12450 (find-files "." ".*.xml"))))
12451 #t))
f1f4a4f0
JL
12452 (add-before 'build 'fix-vfs
12453 (lambda _
12454 (substitute*
12455 '("src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java"
12456 "src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java")
12457 (("import org.apache.commons.vfs") "import org.apache.commons.vfs2"))
12458 #t))
12459 (add-before 'install 'copy-manifest
12460 (lambda _
12461 (install-file "META-INF/MANIFEST.MF" "build/classes/META-INF")
12462 #t))
12463 (add-before 'install 'repack
12464 (lambda _
12465 (invoke "jar" "-cmf" "build/classes/META-INF/MANIFEST.MF" "build/jar/ivy.jar"
2c8ac364 12466 "-C" "build/classes" ".")))
f1f4a4f0
JL
12467 (add-after 'install 'install-bin
12468 (lambda* (#:key outputs #:allow-other-keys)
12469 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
12470 (ivy (string-append bin "/ivy"))
12471 (jar (string-append (assoc-ref outputs "out") "/share/java/ivy.jar")))
12472 (mkdir-p bin)
12473 (with-output-to-file ivy
12474 (lambda _
12475 (display (string-append
12476 "#!" (which "sh") "\n"
12477 "if [[ -z $CLASSPATH ]]; then\n"
12478 " cp=\"" (getenv "CLASSPATH") ":" jar "\"\n"
12479 "else\n"
12480 " cp=\"" (getenv "CLASSPATH") ":" jar ":$CLASSPATH\"\n"
12481 "fi\n"
12482 (which "java") " -cp $cp org.apache.ivy.Main $@\n"))))
12483 (chmod ivy #o755)
12484 #t))))))
12485 (inputs
12486 `(("java-bouncycastle" ,java-bouncycastle)
12487 ("java-commons-cli" ,java-commons-cli)
12488 ("java-commons-collections" ,java-commons-collections)
12489 ("java-commons-httpclient" ,java-commons-httpclient)
12490 ("java-commons-lang" ,java-commons-lang)
12491 ("java-commons-vfs" ,java-commons-vfs)
12492 ("java-jakarta-oro" ,java-jakarta-oro)
12493 ("java-jsch" ,java-jsch)
12494 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
12495 ("java-jsch-agentproxy-connector-factory" ,java-jsch-agentproxy-connector-factory)
12496 ("java-jsch-agentproxy-jsch" ,java-jsch-agentproxy-jsch)
12497 ("java-junit" ,java-junit)))
12498 (home-page "https://ant.apache.org/ivy")
12499 (synopsis "Dependency manager for the Java programming language")
12500 (description "Ivy is a tool for managing (recording, tracking, resolving
12501and reporting) project dependencies. It is characterized by the following:
12502
12503@itemize
12504@item flexibility and configurability - Ivy is essentially process agnostic
12505 and is not tied to any methodology or structure. Instead it provides the
12506 necessary flexibility and configurability to be adapted to a broad range
12507 of dependency management and build processes.
12508@item tight integration with Apache Ant - while available as a standalone tool,
12509 Ivy works particularly well with Apache Ant providing a number of
12510 powerful Ant tasks ranging from dependency resolution to dependency
12511 reporting and publication.
12512@end itemize")
12513 (license license:asl2.0)))
1a1810f5
JL
12514
12515(define-public java-eclipse-sisu-inject
12516 (package
12517 (name "java-eclipse-sisu-inject")
6671d6a1 12518 (version "0.3.4")
1a1810f5 12519 (source (origin
ae69b39e
BH
12520 (method git-fetch)
12521 (uri (git-reference
12522 (url "https://github.com/eclipse/sisu.inject/")
6671d6a1 12523 (commit (string-append "releases/" version))))
ae69b39e 12524 (file-name (git-file-name name version))
1a1810f5
JL
12525 (sha256
12526 (base32
6671d6a1 12527 "16044sizdb0rjbhlfbmcnpds5y7by7dyn9b0c11606aikqi8k3x6"))))
1a1810f5
JL
12528 (build-system ant-build-system)
12529 (arguments
12530 `(#:jar-name "eclipse-sisu-inject.jar"
12531 #:source-dir "org.eclipse.sisu.inject/src"
6671d6a1
JL
12532 #:tests? #f; no tests
12533 #:phases
12534 (modify-phases %standard-phases
12535 (replace 'install
12536 (install-from-pom "org.eclipse.sisu.inject/pom.xml")))))
12537 (propagated-inputs
1a1810f5 12538 `(("java-guice" ,java-guice)
6671d6a1
JL
12539 ("java-sisu-inject-parent-pom" ,java-sisu-inject-parent-pom)))
12540 (inputs
12541 `(("java-guice-servlet" ,java-guice-servlet)
1a1810f5 12542 ("java-javax-inject" ,java-javax-inject)
4b472f6a 12543 ("java-javaee-servletapi" ,java-javaee-servletapi)
1a1810f5
JL
12544 ("java-junit" ,java-junit)
12545 ("java-slf4j-api" ,java-slf4j-api)
12546 ("java-jsr305" ,java-jsr305)
12547 ("java-jsr250" ,java-jsr250)
12548 ("java-cdi-api" ,java-cdi-api)
12549 ("java-osgi-framework" ,java-osgi-framework)
12550 ("java-osgi-util-tracker" ,java-osgi-util-tracker)
12551 ("java-testng" ,java-testng)))
12552 (home-page "https://www.eclipse.org/sisu/")
12553 (synopsis "Classpath scanning, auto-binding, and dynamic auto-wiring")
12554 (description "Sisu is a modular JSR330-based container that supports
12555classpath scanning, auto-binding, and dynamic auto-wiring. Sisu uses
12556Google-Guice to perform dependency injection and provide the core JSR330
12557support, but removes the need to write explicit bindings in Guice modules.
12558Integration with other containers via the Eclipse Extension Registry and the
12559OSGi Service Registry is a goal of this project.")
12560 (license license:epl1.0)))
7049dea1 12561
6671d6a1
JL
12562(define java-sisu-inject-parent-pom
12563 (package
12564 (inherit java-eclipse-sisu-inject)
12565 (name "java-sisu-inject-parent-pom")
12566 (arguments
12567 `(#:tests? #f
12568 #:phases
12569 (modify-phases %standard-phases
12570 (delete 'configure)
12571 (delete 'build)
12572 (replace 'install
12573 (install-pom-file "pom.xml")))))
12574 (propagated-inputs '())))
12575
7049dea1
JL
12576(define-public java-eclipse-sisu-plexus
12577 (package
12578 (name "java-eclipse-sisu-plexus")
e0c0b078 12579 (version "0.3.4")
7049dea1 12580 (source (origin
3560a2cd
EF
12581 (method git-fetch)
12582 (uri (git-reference
b0e7b699 12583 (url "https://github.com/eclipse/sisu.plexus")
3560a2cd
EF
12584 (commit (string-append "releases/" version))))
12585 (file-name (git-file-name name version))
7049dea1
JL
12586 (sha256
12587 (base32
e0c0b078 12588 "17mjlajnsqnk07cc58h1qpxrif85yb2m2y0pyba48yjjgikk8r9f"))
7049dea1
JL
12589 (modules '((guix build utils)))
12590 (snippet
12591 '(begin
12592 (for-each delete-file (find-files "." ".*.jar"))
12593 (rename-file "org.eclipse.sisu.plexus.tests/src"
12594 "org.eclipse.sisu.plexus.tests/java")
12595 #t))))
12596 (build-system ant-build-system)
12597 (arguments
12598 `(#:jar-name "eclipse-sisu-plexus.jar"
12599 #:source-dir "org.eclipse.sisu.plexus/src"
12600 #:test-dir "org.eclipse.sisu.plexus.tests"
12601 #:test-exclude
12602 (list
12603 ;; This test fails probably because we can't generate the necessary
12604 ;; meta-inf files.
12605 "**/PlexusLoggingTest.*"
12606 ;; FIXME: This test fails because of some injection error
12607 "**/PlexusRequirementTest.*")
12608 #:jdk ,icedtea-8
12609 #:phases
12610 (modify-phases %standard-phases
12611 (add-before 'build 'copy-resources
12612 (lambda _
12613 (install-file "org.eclipse.sisu.plexus/META-INF/plexus/components.xml"
12614 "build/classes/META-INF/plexus")
12615 #t))
12616 (add-before 'check 'build-test-jar
12617 (lambda _
12618 (with-directory-excursion "org.eclipse.sisu.plexus.tests/resources/component-jar/src/main/"
12619 (mkdir "build")
12620 (with-directory-excursion "java"
12621 (apply invoke "javac" "-cp"
12622 (string-append (getenv "CLASSPATH")
12623 ":../../../../../build/classes")
12624 (find-files "." ".*.java"))
12625 (for-each (lambda (file) (install-file file (string-append "../build/" file)))
12626 (find-files "." ".*.jar")))
12627 (mkdir-p "build/META-INF/plexus")
12628 (copy-file "resources/META-INF/plexus/components.xml"
12629 "build/META-INF/plexus/components.xml")
12630 (with-directory-excursion "build"
12631 (invoke "jar" "cf" "../../../component-jar-0.1.jar" ".")))
12632 (with-directory-excursion "org.eclipse.sisu.plexus.tests/"
12633 (copy-recursively "META-INF" "../build/test-classes/META-INF")
12634 (substitute* "java/org/eclipse/sisu/plexus/DefaultPlexusContainerTest.java"
12635 (("resources/component-jar")
12636 "org.eclipse.sisu.plexus.tests/resources/component-jar")))
51087d51
JL
12637 #t))
12638 (replace 'install
12639 (install-from-pom "org.eclipse.sisu.plexus/pom.xml")))))
12640 (propagated-inputs
7049dea1 12641 `(("java-plexus-classworlds" ,java-plexus-classworlds)
51087d51 12642 ("java-plexus-utils" ,java-plexus-utils)
7049dea1 12643 ("java-plexus-component-annotations" ,java-plexus-component-annotations)
51087d51 12644 ("java-cdi-api" ,java-cdi-api)
7049dea1 12645 ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)
51087d51
JL
12646 ("java-sisu-plexus-parent-pom" ,java-sisu-plexus-parent-pom)))
12647 (inputs
12648 `(("java-osgi-framework" ,java-osgi-framework)
7049dea1 12649 ("java-slf4j-api" ,java-slf4j-api)
51087d51
JL
12650 ("java-javax-inject" ,java-javax-inject)
12651 ("java-guice" ,java-guice)
12652 ("java-guava" ,java-guava)
7049dea1 12653 ("java-aopalliance" ,java-aopalliance)
51087d51
JL
12654 ("java-asm" ,java-asm)
12655 ("java-cglib" ,java-cglib)))
12656 (native-inputs
12657 `(("java-junit" ,java-junit)))
7049dea1
JL
12658 (home-page "https://www.eclipse.org/sisu/")
12659 (synopsis "Plexus support for the sisu container")
12660 (description "Sisu is a modular JSR330-based container that supports
12661classpath scanning, auto-binding, and dynamic auto-wiring. This package
12662adds Plexus support to the Sisu-Inject container.")
12663 (license license:epl1.0)))
3fa18fe7 12664
51087d51
JL
12665(define java-sisu-plexus-parent-pom
12666 (package
12667 (inherit java-eclipse-sisu-plexus)
12668 (name "java-sisu-plexus-parent-pom")
12669 (arguments
12670 `(#:tests? #f
12671 #:phases
12672 (modify-phases %standard-phases
12673 (delete 'configure)
12674 (delete 'build)
12675 (replace 'install
12676 (install-pom-file "pom.xml")))))
12677 (propagated-inputs
12678 `(("java-sonatype-oss-parent-pom-9" ,java-sonatype-oss-parent-pom-9)))))
12679
3fa18fe7
JL
12680(define-public java-commons-compiler
12681 (package
12682 (name "java-commons-compiler")
12683 (version "3.0.8")
12684 (source (origin
12685 (method git-fetch)
12686 (uri (git-reference
12687 (url "https://github.com/janino-compiler/janino")
12688 (commit "91aa95686d1e4ca3b16a984a03a38686572331b2")))
12689 (file-name (string-append name "-" version))
12690 (sha256
12691 (base32
12692 "04hfdl59sgh20qkxzgnibvs8f9hy6n7znxwpk611y5d89977y62r"))
12693 (modules '((guix build utils)))
12694 (snippet
12695 '(begin
12696 (for-each delete-file
12697 (find-files "." "\\.jar$"))
12698 #t))))
12699 (build-system ant-build-system)
12700 (arguments
12701 `(#:jar-name "commons-compiler.jar"
12702 #:source-dir "commons-compiler/src/main"
12703 #:tests? #f)); no tests
12704 (home-page "https://github.com/janino-compiler/janino")
12705 (synopsis "Java compiler")
12706 (description "Commons-compiler contains an API for janino, including the
12707@code{IExpressionEvaluator}, @code{IScriptEvaluator}, @code{IClassBodyEvaluator}
12708and @code{ISimpleCompiler} interfaces.")
12709 (license license:bsd-3)))
3402e651
JL
12710
12711(define-public java-janino
12712 (package
12713 (inherit java-commons-compiler)
12714 (name "java-janino")
12715 (arguments
12716 `(#:jar-name "janino.jar"
12717 #:source-dir "src/main/java"
12718 #:phases
12719 (modify-phases %standard-phases
12720 (add-before 'configure 'chdir
12721 (lambda _
2c8ac364
MW
12722 (chdir "janino")
12723 #t)))))
3402e651
JL
12724 (inputs
12725 `(("java-commons-compiler" ,java-commons-compiler)))
12726 (native-inputs
12727 `(("java-junit" ,java-junit)
12728 ("java-hamcrest-core" ,java-hamcrest-core)))
12729 (description "Janino is a Java compiler. Janino can compile a set of
12730source files to a set of class files like @code{javac}, but also compile a
12731Java expression, block, class body or source file in memory, load the bytecode
12732and execute it directly in the same JVM. @code{janino} can also be used for
12733static code analysis or code manipulation.")))
7d8207a4
JL
12734
12735(define-public java-logback-core
12736 (package
12737 (name "java-logback-core")
12738 (version "1.2.3")
12739 (source (origin
12740 (method url-fetch)
12741 (uri (string-append "https://github.com/qos-ch/logback/archive/v_"
12742 version ".tar.gz"))
b1ccd2a1 12743 (file-name (string-append name "-" version ".tar.gz"))
7d8207a4
JL
12744 (sha256
12745 (base32
12746 "1x6ga74yfgm94cfx98gybakbrlilx8i2gn6dx13l40kasmys06mi"))
12747 (modules '((guix build utils)))
12748 (snippet
2c8ac364
MW
12749 '(begin
12750 (delete-file-recursively "logback-access/lib")
12751 #t))))
7d8207a4
JL
12752 (build-system ant-build-system)
12753 (arguments
12754 `(#:jar-name "logback.jar"
12755 #:source-dir "src/main/java"
12756 #:test-dir "src/test"
12757 #:test-exclude
12758 ;; These tests fail with Unable to set MockitoNamingPolicy on cglib generator
12759 ;; which creates FastClasses
12760 (list "**/AllCoreTest.*"
12761 "**/AutoFlushingObjectWriterTest.*"
12762 "**/PackageTest.*"
12763 "**/ResilientOutputStreamTest.*"
12764 ;; And we still don't want to run abstract classes
12765 "**/Abstract*.*")
12766 #:phases
12767 (modify-phases %standard-phases
12768 (add-before 'configure 'chdir
12769 (lambda _
12770 (chdir "logback-core")
12771 #t)))))
12772 (inputs
12773 `(("java-javax-mail" ,java-javax-mail)
4b472f6a 12774 ("servlet" ,java-javaee-servletapi)
7d8207a4
JL
12775 ("java-commons-compiler" ,java-commons-compiler)
12776 ("java-janino" ,java-janino)))
12777 (native-inputs
12778 `(("java-junit" ,java-junit)
12779 ("java-hamcrest-core" ,java-hamcrest-core)
12780 ("java-mockito-1" ,java-mockito-1)
12781 ("java-cglib" ,java-cglib)
12782 ("java-asm" ,java-asm)
12783 ("java-objenesis" ,java-objenesis)
12784 ("java-joda-time" ,java-joda-time)))
12785 (home-page "https://logback.qos.ch")
12786 (synopsis "Logging for java")
12787 (description "Logback is intended as a successor to the popular log4j project.
12788This module lays the groundwork for the other two modules.")
12789 ;; Either epl1.0 or lgpl2.1
12790 (license (list license:epl1.0
12791 license:lgpl2.1))))
3a69f5f2
JL
12792
12793(define-public java-logback-classic
12794 (package
12795 (inherit java-logback-core)
12796 (name "java-logback-classic")
12797 (arguments
12798 `(#:jar-name "logback-classic.jar"
12799 #:source-dir "src/main/java"
12800 #:test-dir "src/test"
12801 #:tests? #f; tests require more packages: h2, greenmail, hsql, subethamail, slf4j, log4j, felix
12802 #:jdk ,icedtea-8
12803 #:phases
12804 (modify-phases %standard-phases
12805 (add-before 'configure 'chdir
12806 (lambda _
12807 (chdir "logback-classic")
12808 #t))
12809 (replace 'build
12810 (lambda* (#:key inputs #:allow-other-keys)
12811 (mkdir-p "build/classes")
12812 (setenv "CLASSPATH"
12813 (string-join
12814 (apply append (map (lambda (input)
12815 (find-files (assoc-ref inputs input)
12816 ".*.jar"))
12817 '("java-logback-core" "java-slf4j-api"
4b472f6a 12818 "java-commons-compiler" "servlet"
3a69f5f2
JL
12819 "groovy")))
12820 ":"))
12821 (apply invoke "groovyc" "-d" "build/classes" "-j"
12822 (find-files "src/main/" ".*\\.(groovy|java)$"))
12823 (invoke "ant" "jar")
12824 #t)))))
12825 (inputs
12826 `(("java-logback-core" ,java-logback-core)
12827 ("java-slf4j-api" ,java-slf4j-api)
12828 ,@(package-inputs java-logback-core)))
12829 (native-inputs
12830 `(("groovy" ,groovy)))
12831 (description "Logback is intended as a successor to the popular log4j project.
12832This module can be assimilated to a significantly improved version of log4j.
12833Moreover, @code{logback-classic} natively implements the slf4j API so that you
12834can readily switch back and forth between logback and other logging frameworks
12835such as log4j or @code{java.util.logging} (JUL).")))
ab621bf1 12836
c786dff0
LC
12837(define-public java-jgit
12838 (package
12839 (name "java-jgit")
12840 (version "4.7.0.201704051617-r")
12841 (source (origin
12842 (method url-fetch)
12843 (uri (string-append "https://repo1.maven.org/maven2/"
12844 "org/eclipse/jgit/org.eclipse.jgit/"
12845 version "/org.eclipse.jgit-"
12846 version "-sources.jar"))
12847 (sha256
12848 (base32
12849 "13ii4jn02ynzq6i7gsyi21k2i94jpc85wf6bcm31q4cyvzv0mk4k"))))
12850 (build-system ant-build-system)
12851 (arguments
12852 `(#:tests? #f ; There are no tests to run.
12853 #:jar-name "jgit.jar"
12854 ;; JGit must be built with a JDK supporting Java 8.
12855 #:jdk ,icedtea-8
12856 ;; Target our older default JDK.
12857 #:make-flags (list "-Dtarget=1.7")
12858 #:phases
12859 (modify-phases %standard-phases
12860 ;; The jar file generated by the default build.xml does not include
12861 ;; the text properties files, so we need to add them.
12862 (add-after 'build 'add-properties
12863 (lambda* (#:key jar-name #:allow-other-keys)
12864 (with-directory-excursion "src"
12865 (apply invoke "jar" "-uf"
12866 (string-append "../build/jar/" jar-name)
12867 (find-files "." "\\.properties$")))
12868 #t)))))
12869 (inputs
12870 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
12871 ("java-javaewah" ,java-javaewah)
12872 ("java-jsch" ,java-jsch)
12873 ("java-slf4j-api" ,java-slf4j-api)))
12874 (home-page "https://eclipse.org/jgit/")
12875 (synopsis "Java library implementing the Git version control system")
12876 (description "JGit is a lightweight, pure Java library implementing the
12877Git version control system, providing repository access routines, support for
12878network protocols, and core version control algorithms.")
12879 (license license:edl1.0)))
12880
12881;; For axoloti. This package can still be built with icedtea-7, which is
12882;; currently used as the default JDK.
12883(define-public java-jgit-4.2
12884 (package (inherit java-jgit)
12885 (version "4.2.0.201601211800-r")
12886 (source (origin
12887 (method url-fetch)
12888 (uri (string-append "https://repo1.maven.org/maven2/"
12889 "org/eclipse/jgit/org.eclipse.jgit/"
12890 version "/org.eclipse.jgit-"
12891 version "-sources.jar"))
12892 (sha256
12893 (base32
12894 "15gm537iivhnzlkjym4x3wn5jqdjdragsw9pdpzqqg21nrc817mm"))))
12895 (build-system ant-build-system)
12896 (arguments
12897 (substitute-keyword-arguments (package-arguments java-jgit)
12898 ;; Build for default JDK.
12899 ((#:jdk _) icedtea-7)
12900 ((#:phases phases)
12901 `(modify-phases ,phases
12902 (add-after 'unpack 'use-latest-javaewah-API
12903 (lambda _
12904 (substitute* "src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java"
12905 (("wordinbits") "WORD_IN_BITS"))
12906 #t))))))
12907 (inputs
12908 `(("java-javaewah" ,java-javaewah)
12909 ("java-jsch" ,java-jsch)
12910 ("java-slf4j-api" ,java-slf4j-api)))))
717b6ba6
CZ
12911
12912(define-public abcl
12913 (package
12914 (name "abcl")
514001e9 12915 (version "1.6.0")
717b6ba6
CZ
12916 (source
12917 (origin
12918 (method url-fetch)
12919 (uri (string-append "https://abcl.org/releases/"
12920 version "/abcl-src-" version ".tar.gz"))
12921 (sha256
12922 (base32
514001e9 12923 "0hvbcsffr8n2xwdixc8wyw1bfl9fxn2gyy0c4nma7j9zbn0wwgw9"))
717b6ba6
CZ
12924 (patches
12925 (search-patches
12926 "abcl-fix-build-xml.patch"))))
12927 (build-system ant-build-system)
12928 (native-inputs
12929 `(("java-junit" ,java-junit)))
12930 (arguments
12931 `(#:build-target "abcl.jar"
12932 #:test-target "abcl.test"
12933 #:phases
12934 (modify-phases %standard-phases
12935 (replace 'install
12936 (lambda* (#:key outputs #:allow-other-keys)
12937 (let ((share (string-append (assoc-ref outputs "out")
12938 "/share/java/"))
12939 (bin (string-append (assoc-ref outputs "out")
12940 "/bin/")))
12941 (mkdir-p share)
12942 (install-file "dist/abcl.jar" share)
12943 (install-file "dist/abcl-contrib.jar" share)
12944 (mkdir-p bin)
12945 (with-output-to-file (string-append bin "abcl")
12946 (lambda _
12947 (let ((classpath (string-append
12948 share "abcl.jar"
12949 ":"
12950 share "abcl-contrib.jar")))
12951 (display (string-append
12952 "#!" (which "sh") "\n"
12953 "if [[ -z $CLASSPATH ]]; then\n"
12954 " cp=\"" classpath "\"\n"
12955 "else\n"
12956 " cp=\"" classpath ":$CLASSPATH\"\n"
12957 "fi\n"
12958 "exec " (which "java")
12959 " -cp $cp org.armedbear.lisp.Main $@\n")))))
12960 (chmod (string-append bin "abcl") #o755)
12961 #t))))))
12962 (home-page "https://abcl.org/")
12963 (synopsis "Common Lisp Implementation on the JVM")
12964 (description
12965 "@dfn{Armed Bear Common Lisp} (ABCL) is a full implementation of the Common
12966Lisp language featuring both an interpreter and a compiler, running in the
12967JVM. It supports JSR-223 (Java scripting API): it can be a scripting engine
12968in any Java application. Additionally, it can be used to implement (parts of)
12969the application using Java to Lisp integration APIs.")
12970 (license (list license:gpl2+
12971 ;; named-readtables is released under 3 clause BSD
12972 license:bsd-3
12973 ;; jfli is released under CPL 1.0
12974 license:cpl1.0))))
da655b1e
JL
12975
12976(define-public java-jsonp-api
12977 (package
12978 (name "java-jsonp-api")
83c4c502 12979 (version "1.1.6")
da655b1e
JL
12980 (source (origin
12981 (method git-fetch)
12982 (uri (git-reference
12983 (url "https://github.com/eclipse-ee4j/jsonp")
83c4c502 12984 (commit (string-append "1.1-" version "-RELEASE"))))
da655b1e
JL
12985 (file-name (git-file-name name version))
12986 (sha256
12987 (base32
83c4c502 12988 "0zrj03hkr3jdmqlb4ipjr37cqpp2q2814qpmxi7srlwpdqs0ibgc"))))
da655b1e
JL
12989 (build-system ant-build-system)
12990 (arguments
12991 `(#:jar-name "jsonp-api.jar"
12992 #:tests? #f
12993 #:source-dir "api/src/main/java"
12994 #:test-dir "api/src/test"))
12995 (home-page "https://eclipse-ee4j.github.io/jsonp/")
12996 (synopsis "JSON Processing in Java")
12997 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
12998parse, generate, transform and query) JSON messages. It produces and
12999consumes JSON text in a streaming fashion (similar to StAX API for XML)
44a057a1 13000and allows building a Java object model for JSON text using API classes
da655b1e
JL
13001(similar to DOM API for XML).")
13002 ;; either gpl2 only with classpath exception, or epl2.0.
13003 (license (list license:gpl2
13004 license:epl2.0))))
d45f73c9
JL
13005
13006(define-public java-jsonp-impl
13007 (package
13008 (inherit java-jsonp-api)
13009 (name "java-jsonp-impl")
13010 (arguments
13011 `(#:jar-name "jsonp-impl.jar"
13012 #:tests? #f
13013 #:source-dir "impl/src/main/java"
83c4c502
JL
13014 #:test-dir "impl/src/test"
13015 #:phases
13016 (modify-phases %standard-phases
13017 (add-before 'build 'copy-resources
13018 (lambda _
13019 (copy-recursively
13020 "impl/src/main/resources/"
13021 "build/classes")
13022 #t)))))
d45f73c9
JL
13023 (propagated-inputs
13024 `(("java-jsonp-api" ,java-jsonp-api)))
13025 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
13026parse, generate, transform and query) JSON messages. This package contains
13027a reference implementation of that API.")))
357f4564
JL
13028
13029(define-public java-xmp
13030 (package
13031 (name "java-xmp")
13032 (version "5.1.3")
13033 (source (origin
13034 (method url-fetch)
13035 (uri (string-append "http://download.macromedia.com/pub/developer"
13036 "/xmp/sdk/XMPCoreJava-" version ".zip"))
13037 (sha256
13038 (base32
13039 "14nai2mmsg7l5ya2y5mx4w4lr1az3sk2fjz6hiy4zdrsavgvl1g7"))))
13040 (build-system ant-build-system)
13041 (arguments
13042 `(#:build-target "build"
13043 #:tests? #f; no tests
13044 #:phases
13045 (modify-phases %standard-phases
13046 (add-after 'unpack 'chdir
13047 (lambda _
13048 (chdir "XMPCore")
13049 #t))
13050 (add-before 'build 'fix-timestamp
13051 (lambda _
13052 (substitute* "build.xml"
13053 (("\\$\\{BuildDate\\}") "1970 Jan 01 00:00:00-GMT"))
13054 #t))
13055 (replace 'install
13056 (install-jars "."))
13057 (add-after 'install 'install-doc
13058 (lambda* (#:key outputs #:allow-other-keys)
13059 (copy-recursively
13060 "docs"
13061 (string-append (assoc-ref outputs "out") "/share/doc/java-xmp"))
13062 #t)))))
13063 (native-inputs
13064 `(("unzip" ,unzip)))
13065 (home-page "https://www.adobe.com/devnet/xmp.html")
13066 (synopsis "Extensible Metadat Platform (XMP) support in Java")
13067 (description "Adobe's Extensible Metadata Platform (XMP) is a labeling
13068technology that allows you to embed data about a file, known as metadata,
13069into the file itself. The XMP Toolkit for Java is based on the C++ XMPCore
13070library and the API is similar.")
13071 (license license:bsd-3)))
a005c63a
JL
13072
13073(define-public java-metadata-extractor
13074 (package
13075 (name "java-metadata-extractor")
13076 (version "2.11.0")
13077 (source (origin
13078 (method git-fetch)
13079 (uri (git-reference
13080 (url "https://github.com/drewnoakes/metadata-extractor")
13081 (commit version)))
13082 (file-name (git-file-name name version))
13083 (sha256
13084 (base32
13085 "06yrq0swrl1r40yjbk5kqzjxr04jlkq9lfi711jvfgjf5kp2qinj"))))
13086 (build-system ant-build-system)
13087 (arguments
13088 `(#:jar-name "metadata-extractor.jar"
13089 #:source-dir "Source"
13090 #:test-dir "Tests"
13091 #:phases
13092 (modify-phases %standard-phases
13093 (add-before 'check 'fix-test-dir
13094 (lambda _
13095 (substitute* "build.xml"
13096 (("/java\">") "\">"))
13097 #t)))))
13098 (propagated-inputs
13099 `(("java-xmp" ,java-xmp)))
13100 (native-inputs
13101 `(("java-hamcrest-core" ,java-hamcrest-core)
13102 ("java-junit" ,java-junit)))
13103 (home-page "https://github.com/drewnoakes/metadata-extractor")
13104 (synopsis "Extract metadata from image and video files")
13105 (description "Metadata-extractor is a straightforward Java library for
13106reading metadata from image files. It is able to read metadata in Exif,
13107IPTC, XMP, ICC and more formats.")
13108 (license license:asl2.0)))
0dd6089d
JL
13109
13110(define-public java-svg-salamander
13111 (package
13112 (name "java-svg-salamander")
13113 (version "1.1.2")
13114 (source (origin
13115 (method git-fetch)
13116 (uri (git-reference
13117 (url "https://github.com/blackears/svgSalamander")
13118 (commit (string-append "v" version))))
13119 (file-name (git-file-name name version))
13120 (sha256
13121 (base32
13122 "1zv3kjdkf6iqf02x6ln76254y634j2ji448y706a65lsbfjmmicf"))
13123 (modules '((guix build utils)))
13124 (snippet
58c3a4f5
BH
13125 '(begin
13126 (for-each delete-file (find-files "." ".*.jar"))
13127 #t))
0dd6089d
JL
13128 (patches
13129 (search-patches "java-svg-salamander-Fix-non-det.patch"))))
13130 (build-system ant-build-system)
13131 (arguments
13132 `(#:tests? #f; no tests
13133 #:phases
13134 (modify-phases %standard-phases
13135 (add-after 'unpack 'chdir
13136 (lambda _
13137 (chdir "svg-core")
13138 #t))
13139 (add-before 'build 'copy-jars
13140 (lambda* (#:key inputs #:allow-other-keys)
13141 (copy-file (car (find-files (assoc-ref inputs "javacc") "\\.jar$"))
13142 "../libraries/javacc.jar")
13143 (copy-file (car (find-files (assoc-ref inputs "ant") "ant\\.jar$"))
13144 "../libraries/ant.jar")
13145 #t))
13146 (replace 'install
13147 (install-jars "dist")))))
13148 (native-inputs
13149 `(("javacc" ,javacc)))
13150 (home-page "https://github.com/blackears/svgSalamander")
13151 (synopsis "SVG engine for Java")
13152 (description "SVG Salamander is an SVG engine for Java that's designed
13153to be small, fast, and allow programmers to use it with a minimum of fuss.
13154It's in particular targeted for making it easy to integrate SVG into Java
13155games and making it much easier for artists to design 2D game content - from
13156rich interactive menus to charts and graphcs to complex animations.")
13157 (license license:bsd-2)))
ff56e6ef
JL
13158
13159(define-public java-jboss-transaction-api-spec
13160 (package
13161 (name "java-jboss-transaction-api-spec")
13162 (version "1.2+1.1.1")
13163 (source (origin
13164 (method git-fetch)
13165 (uri (git-reference
13166 (url "https://github.com/jboss/jboss-transaction-api_spec")
13167 (commit "jboss-transaction-api_1.2_spec-1.1.1.Final")))
13168 (file-name (git-file-name name version))
13169 (sha256
13170 (base32
13171 "1xbfq5hvb86izflydxrqqv3k26c1ba2m0ap6m97shqrsdi9by4wy"))))
13172 (build-system ant-build-system)
13173 (arguments
13174 `(#:jar-name "java-jboss-transaction-api_spec.jar"
13175 #:source-dir "src/main/java"
13176 #:tests? #f)); no tests
13177 (inputs
13178 `(("java-cdi-api" ,java-cdi-api)
13179 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)))
13180 (home-page "https://github.com/jboss/jboss-transaction-api_spec")
13181 (synopsis "Generic transaction management API in Java")
13182 (description "Java-jboss-transaction-api-spec implements the Transactions
13183API. A transaction is a unit of work containing one or more operations
13184involving one or more shared resources having ACID (Atomicity, Consistency,
13185Isolation and Durability) properties.")
13186 ;; either gpl2 only with classpath exception or cddl.
13187 (license (list license:gpl2 license:cddl1.0))))
8ba990e6
JL
13188
13189(define-public java-picocli
13190 (package
13191 (name "java-picocli")
13192 (version "4.3.2")
13193 (source (origin
13194 (method git-fetch)
13195 (uri (git-reference
13196 (url "https://github.com/remkop/picocli")
13197 (commit (string-append "v" version))))
b5698f5b 13198 (file-name (git-file-name name version))
8ba990e6
JL
13199 (sha256
13200 (base32
13201 "1sxp6rxjfgjd98ly14b3d15dvxkm5wg4g46w12jyhmr0kmkaca3c"))))
13202 (build-system ant-build-system)
13203 (arguments
13204 `(#:jar-name "picocli.jar"
13205 #:source-dir "src/main/java"
13206 ;; Tests require missing dependencies (junitparams, system-rules)
13207 #:tests? #f))
13208 (home-page "https://picocli.info")
13209 (synopsis "REPL for the JVM")
13210 (description "Picocli is a framework for building command line applications
13211for the JVM. It supports colors, autocompletion, subcommands, and more. Written
13212in Java, usable from Groovy, Kotlin, Scala, etc.")
13213 (license license:asl2.0)))
a5f8d4e0
JL
13214
13215(define-public java-jetbrains-annotations
13216 (package
13217 (name "java-jetbrains-annotations")
13218 (version "19.0.0")
13219 (source (origin
13220 (method git-fetch)
13221 (uri (git-reference
13222 (url "https://github.com/JetBrains/java-annotations")
13223 (commit version)))
13224 (file-name (git-file-name name version))
13225 (sha256
13226 (base32
13227 "0z6i1xs60cd5ffz23c49sq68wn5mphhs3xpar1n93ppama2ng80v"))))
13228 (build-system ant-build-system)
13229 (arguments
13230 `(#:jar-name "jetbrains-annotations.jar"
13231 #:source-dir "common/src/main/java:java8/src/main/java"
13232 #:tests? #f)); no tests
13233 (home-page "https://github.com/JetBrains/java-annotations")
13234 (synopsis "Annotations for Java and other JVM languages")
13235 (description "This package contains a set of Java annotations which can be
13236used in JVM-based languages. They serve as an additional documentation and
13237can be interpreted by IDEs and static analysis tools to improve code analysis.")
13238 (license license:expat)))